@g4rcez/components 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/floating/modal.d.ts +1 -1
- package/dist/components/floating/modal.d.ts.map +1 -1
- package/dist/components/floating/modal.js +1 -1
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +13 -24
- package/dist/components/table/pagination.d.ts +2 -0
- package/dist/components/table/pagination.d.ts.map +1 -0
- package/dist/components/table/pagination.js +24 -0
- package/dist/components/table/table-lib.d.ts +2 -0
- package/dist/components/table/table-lib.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3349 -3345
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +36 -36
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
(function(re,
|
|
1
|
+
(function(re,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],b):(re=typeof globalThis<"u"?globalThis:re||self,b(re.components={},re.React,re["react/jsx-runtime"],re.ReactDOM))})(this,function(re,b,S,Bf){"use strict";var lL=Object.defineProperty;var cL=(re,b,S)=>b in re?lL(re,b,{enumerable:!0,configurable:!0,writable:!0,value:S}):re[b]=S;var ne=(re,b,S)=>cL(re,typeof b!="symbol"?b+"":b,S);function zf(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 M=zf(b),Wf=zf(Bf);function jn(e){return Hf(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pn(e){var t;return(t=(Hf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hf(e){return e instanceof Node||e instanceof Vt(e).Node}function Re(e){return e instanceof Element||e instanceof Vt(e).Element}function st(e){return e instanceof HTMLElement||e instanceof Vt(e).HTMLElement}function Ya(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}function Uo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Wt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function v0(e){return["table","td","th"].includes(jn(e))}function Js(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qa(e){const t=Ka(),n=Re(e)?Wt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b0(e){let t=On(e);for(;st(t)&&!Bn(t);){if(qa(t))return t;if(Js(t))return null;t=On(t)}return null}function Ka(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bn(e){return["html","body","#document"].includes(jn(e))}function Wt(e){return Vt(e).getComputedStyle(e)}function ei(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function On(e){if(jn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ya(e)&&e.host||Pn(e);return Ya(t)?t.host:t}function Uf(e){const t=On(e);return Bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Uo(t)?t:Uf(t)}function zn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Uf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Vt(o);return s?t.concat(i,i.visualViewport||[],Uo(o)?o:[],i.frameElement&&n?zn(i.frameElement):[]):t.concat(o,zn(o,[],n))}function tn(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 pt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ya(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Za(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Gf(){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 Yf(e){return e.mozInputSource===0&&e.isTrusted?!0:Ja()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Xa(e){return w0()?!1:!Ja()&&e.width===0&&e.height===0||Ja()&&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 Qa(){return/apple/i.test(navigator.vendor)}function Ja(){const e=/android/i;return e.test(Za())||e.test(Gf())}function qf(){return Za().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function w0(){return Gf().includes("jsdom/")}function Go(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function x0(e){return"nativeEvent"in e}function S0(e){return e.matches("html,body")}function mt(e){return(e==null?void 0:e.ownerDocument)||document}function el(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 Wn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const T0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tl(e){return st(e)&&e.matches(T0)}function It(e){e.preventDefault(),e.stopPropagation()}function Kf(e){return e?e.getAttribute("role")==="combobox"&&tl(e):!1}const cn=Math.min,Ht=Math.max,ti=Math.round,Br=Math.floor,Hn=e=>({x:e,y:e}),E0={left:"right",right:"left",bottom:"top",top:"bottom"},C0={start:"end",end:"start"};function nl(e,t,n){return Ht(e,cn(t,n))}function zr(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function Wr(e){return e.split("-")[1]}function Zf(e){return e==="x"?"y":"x"}function rl(e){return e==="y"?"height":"width"}function pr(e){return["top","bottom"].includes(Un(e))?"y":"x"}function ol(e){return Zf(pr(e))}function P0(e,t,n){n===void 0&&(n=!1);const r=Wr(e),o=ol(e),s=rl(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ni(i)),[i,ni(i)]}function O0(e){const t=ni(e);return[sl(e),t,sl(t)]}function sl(e){return e.replace(/start|end/g,t=>C0[t])}function k0(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function _0(e,t,n,r){const o=Wr(e);let s=k0(Un(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(sl)))),s}function ni(e){return e.replace(/left|right|bottom|top/g,t=>E0[t])}function A0(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xf(e){return typeof e!="number"?A0(e):{top:e,right:e,bottom:e,left:e}}function ri(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}}/*!
|
|
2
2
|
* tabbable 6.2.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var D0=["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])"],oi=D0.join(","),Jf=typeof Element>"u",Hr=Jf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,si=!Jf&&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},ii=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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},M0=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},N0=function(t,n,r){if(ii(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(oi));return n&&Hr.call(t,oi)&&o.unshift(t),o=o.filter(r),o},F0=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ii(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Hr.call(i,oi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),d=!ii(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&d){var h=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},ed=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},td=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||M0(t))&&!ed(t)?0:t.tabIndex},L0=function(t,n){var r=td(t);return r<0&&n&&!ed(t)?0:r},V0=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},nd=function(t){return t.tagName==="INPUT"},R0=function(t){return nd(t)&&t.type==="hidden"},$0=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},j0=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},B0=function(t){if(!t.name)return!0;var n=t.form||si(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=j0(o,t.form);return!s||s===t},W0=function(t){return nd(t)&&t.type==="radio"},z0=function(t){return W0(t)&&!B0(t)},H0=function(t){var n,r=t&&si(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=si(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},rd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},U0=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Hr.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Hr.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=si(t);if(l&&!l.shadowRoot&&o(l)===!0)return rd(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(H0(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return rd(t);return!1},G0=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 Hr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Y0=function(t,n){return!(n.disabled||ii(n)||R0(n)||U0(n,t)||$0(n)||G0(n))},al=function(t,n){return!(z0(n)||td(n)<0||!Y0(t,n))},q0=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},K0=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=L0(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(V0).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Yo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=F0([t],n.includeContainer,{filter:al.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:q0}):r=N0(t,n.includeContainer,al.bind(null,n)),K0(r)},Z0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Hr.call(t,oi)===!1?!1:al(n,t)};function od(e,t,n){let{reference:r,floating:o}=e;const s=pr(t),i=sl(t),a=ol(i),l=Un(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(zr(t)){case"start":h[i]-=d*(n&&c?-1:1);break;case"end":h[i]+=d*(n&&c?-1:1);break}return h}const X0=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=od(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:b,y:g,data:T,reset:x}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=g??f,h={...h,[y]:{...h[y],...T}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=od(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function ll(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Wr(t,e),p=Qf(h),y=a[d?f==="floating"?"reference":"floating":f],v=ri(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},x=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:g,strategy:l}):b);return{top:(v.top-x.top+p.top)/T.y,bottom:(x.bottom-v.bottom+p.bottom)/T.y,left:(v.left-x.left+p.left)/T.x,right:(x.right-v.right+p.right)/T.x}}const Q0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Wr(e,t)||{};if(c==null)return{};const f=Qf(u),d={x:n,y:r},h=sl(o),p=ol(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",b=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-d[h]-s.floating[p],x=d[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const O=T/2-x/2,I=C/2-m[p]/2-1,N=cn(f[v],I),L=cn(f[b],I),_=N,j=C-m[p]-L,D=C/2-m[p]/2+O,k=rl(_,D,j),F=!l.arrow&&zr(o)!=null&&D!==k&&s.reference[p]/2-(D<_?N:L)-m[p]/2<0,R=F?D<_?D-_:D-j:0;return{[h]:d[h]+R,data:{[h]:k,centerOffset:D-k-R,...F&&{alignmentOffset:R}},reset:F}}}),J0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=Wr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),b=pr(a),g=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=d||(g||!m?[ni(a)]:k0(a)),E=p!=="none";!d&&E&&x.push(...A0(a,m,p,T));const C=[a,...x],O=await ll(t,y),I=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(O[v]),f){const D=O0(o,i,T);I.push(O[D[0]],O[D[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(D=>D<=0)){var L,_;const D=(((L=s.flip)==null?void 0:L.index)||0)+1,k=C[D];if(k)return{data:{index:D,overflows:N},reset:{placement:k}};let F=(_=N.filter(R=>R.overflows[0]<=0).sort((R,W)=>R.overflows[1]-W.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(h){case"bestFit":{var j;const R=(j=N.filter(W=>{if(E){const q=pr(W.placement);return q===b||q==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((W,q)=>W[1]-q[1])[0])==null?void 0:j[0];R&&(F=R);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function ew(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Un(n),a=zr(n),l=pr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=Wr(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const tw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await ew(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},nw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...l}=Wr(e,t),c={x:n,y:r},u=await ll(t,l),f=pr(Un(o)),d=Xf(f);let h=c[d],p=c[f];if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=h+u[y],g=h-u[v];h=rl(b,h,g)}if(i){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=p+u[y],g=p-u[v];p=rl(b,p,g)}const m=a.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},rw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=Wr(e,t),l=await ll(t,a),c=Un(n),u=zr(n),f=pr(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=d-l.left-l.right,b=cn(h-l[p],y),g=cn(d-l[m],v),T=!t.middlewareData.shift;let x=b,E=g;if(f?E=u||T?cn(g,v):v:x=u||T?cn(b,y):y,T&&!u){const O=Ht(l.left,0),I=Ht(l.right,0),N=Ht(l.top,0),L=Ht(l.bottom,0);f?E=d-2*(O!==0||I!==0?O+I:Ht(l.left,l.right)):x=h-2*(N!==0||L!==0?N+L:Ht(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:x});const C=await o.getDimensions(s.floating);return d!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function sd(e){const t=zt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ti(n)!==s||ti(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function cl(e){return $e(e)?e:e.contextElement}function Ur(e){const t=cl(e);if(!st(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=sd(t);let i=(s?ti(n.width):n.width)/r,a=(s?ti(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ow=Hn(0);function id(e){const t=Vt(e);return!Za()||!t.visualViewport?ow:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=cl(e);let i=Hn(1);t&&(r?$e(r)&&(i=Ur(r)):i=Ur(e));const a=sw(s,n,r)?id(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const d=Vt(s),h=r&&$e(r)?Vt(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const y=Ur(m),v=m.getBoundingClientRect(),b=zt(m),g=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=T,p=Vt(m),m=p.frameElement}}return ri({width:u,height:f,x:l,y:c})}function iw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Pn(r),a=t?Js(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),f=st(r);if((f||!f&&!s)&&((jn(r)!=="body"||Uo(i))&&(l=ei(r)),st(r))){const d=mr(r);c=Ur(r),u.x=d.x+r.clientLeft,u.y=d.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 aw(e){return Array.from(e.getClientRects())}function ad(e){return mr(Pn(e)).left+ei(e).scrollLeft}function lw(e){const t=Pn(e),n=ei(e),r=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ad(e);const a=-n.scrollTop;return zt(r).direction==="rtl"&&(i+=Ht(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function cw(e,t){const n=Vt(e),r=Pn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Za();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function uw(e,t){const n=mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=st(e)?Ur(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function ld(e,t,n){let r;if(t==="viewport")r=cw(e,n);else if(t==="document")r=lw(Pn(e));else if($e(t))r=uw(t,n);else{const o=id(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ri(r)}function cd(e,t){const n=On(e);return n===t||!$e(n)||Bn(n)?!1:zt(n).position==="fixed"||cd(n,t)}function fw(e,t){const n=t.get(e);if(n)return n;let r=Wn(e,[],!1).filter(a=>$e(a)&&jn(a)!=="body"),o=null;const s=zt(e).position==="fixed";let i=s?On(e):e;for(;$e(i)&&!Bn(i);){const a=zt(i),l=Ka(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Uo(i)&&!l&&cd(e,i))?r=r.filter(u=>u!==i):o=a,i=On(i)}return t.set(e,r),r}function dw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Js(t)?[]:fw(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=ld(t,u,o);return c.top=Ht(f.top,c.top),c.right=cn(f.right,c.right),c.bottom=cn(f.bottom,c.bottom),c.left=Ht(f.left,c.left),c},ld(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hw(e){const{width:t,height:n}=sd(e);return{width:t,height:n}}function pw(e,t,n){const r=st(t),o=Pn(t),s=n==="fixed",i=mr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((jn(t)!=="body"||Uo(o))&&(a=ei(t)),r){const f=mr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=ad(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function ul(e){return zt(e).position==="static"}function ud(e,t){return!st(e)||zt(e).position==="fixed"?null:t?t(e):e.offsetParent}function fd(e,t){const n=Vt(e);if(Js(e))return n;if(!st(e)){let o=On(e);for(;o&&!Bn(o);){if($e(o)&&!ul(o))return o;o=On(o)}return n}let r=ud(e,t);for(;r&&b0(r)&&ul(r);)r=ud(r,t);return r&&Bn(r)&&ul(r)&&!Ka(r)?n:r||w0(e)||n}const mw=async function(e){const t=this.getOffsetParent||fd,n=this.getDimensions,r=await n(e.floating);return{reference:pw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gw(e){return zt(e).direction==="rtl"}const yw={convertOffsetParentRelativeRectToViewportRelativeRect:iw,getDocumentElement:Pn,getClippingRect:dw,getOffsetParent:fd,getElementRects:mw,getClientRects:aw,getDimensions:hw,getScale:Ur,isElement:$e,isRTL:gw};function vw(e,t){let n=null,r;const o=Pn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Br(u),p=Br(o.clientWidth-(c+f)),m=Br(o.clientHeight-(u+d)),y=Br(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Ht(0,cn(1,l))||1};let g=!0;function T(x){const E=x[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return i(!0),s}function fl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=cl(e),u=o||s?[...c?Wn(c):[],...Wn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=c&&a?vw(c,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?mr(e):null;l&&y();function y(){const v=mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const bw=tw,ww=nw,xw=J0,Sw=rw,dd=Q0,Tw=(e,t,n)=>{const r=new Map,o={platform:yw,...n},s={...o.platform,_c:r};return X0(e,t,{...o,platform:s})};var ai=typeof document<"u"?w.useLayoutEffect:w.useEffect;function li(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(!li(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!li(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function hd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pd(e,t){const n=hd(e);return Math.round(t*n)/n}function md(e){const t=M.useRef(e);return ai(()=>{t.current=e}),t}function Ew(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=M.useState(r);li(d,r)||h(r);const[p,m]=M.useState(null),[y,v]=M.useState(null),b=M.useCallback(R=>{R!==E.current&&(E.current=R,m(R))},[]),g=M.useCallback(R=>{R!==C.current&&(C.current=R,v(R))},[]),T=s||p,x=i||y,E=M.useRef(null),C=M.useRef(null),O=M.useRef(u),I=l!=null,N=md(l),L=md(o),_=M.useCallback(()=>{if(!E.current||!C.current)return;const R={placement:t,strategy:n,middleware:d};L.current&&(R.platform=L.current),Tw(E.current,C.current,R).then(W=>{const q={...W,isPositioned:!0};j.current&&!li(O.current,q)&&(O.current=q,Hf.flushSync(()=>{f(q)}))})},[d,t,n,L]);ai(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[c]);const j=M.useRef(!1);ai(()=>(j.current=!0,()=>{j.current=!1}),[]),ai(()=>{if(T&&(E.current=T),x&&(C.current=x),T&&x){if(N.current)return N.current(T,x,_);_()}},[T,x,_,N,I]);const D=M.useMemo(()=>({reference:E,floating:C,setReference:b,setFloating:g}),[b,g]),k=M.useMemo(()=>({reference:T,floating:x}),[T,x]),F=M.useMemo(()=>{const R={position:n,left:0,top:0};if(!k.floating)return R;const W=pd(k.floating,u.x),q=pd(k.floating,u.y);return a?{...R,transform:"translate("+W+"px, "+q+"px)",...hd(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:q}},[n,a,k.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:_,refs:D,elements:k,floatingStyles:F}),[u,_,D,k,F])}const Cw=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?dd({element:r.current,padding:o}).fn(n):{}:r?dd({element:r,padding:o}).fn(n):{}}}},dl=(e,t)=>({...bw(e),options:[e,t]}),gd=(e,t)=>({...ww(e),options:[e,t]}),yd=(e,t)=>({...xw(e),options:[e,t]}),Pw=(e,t)=>({...Sw(e),options:[e,t]}),vd=(e,t)=>({...Cw(e),options:[e,t]}),bd={...M},Ow=bd.useInsertionEffect||(e=>e());function Ut(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ow(()=>{t.current=e}),M.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 hl="ArrowUp",qo="ArrowDown",Gr="ArrowLeft",Yr="ArrowRight";function ci(e,t,n){return Math.floor(e/t)!==n}function Ko(e,t){return t<0||t>=e.current.length}function pl(e,t){return Tt(e,{disabledIndices:t})}function wd(e,t){return Tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ui(i,a,o));return a}function kw(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===hl){if(u&&It(n),c===-1)f=l;else if(f=Tt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const d=c%s,h=l%s,p=l-(h-d);h===d?f=l:f=h>d?p:p-s}Ko(e,f)&&(f=c)}if(n.key===qo&&(u&&It(n),c===-1?f=a:(f=Tt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=Tt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ko(e,f)&&(f=c)),r==="both"){const d=Br(c/s);n.key===Yr&&(u&&It(n),c%s!==s-1?(f=Tt(e,{startingIndex:c,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i})),ci(f,s,d)&&(f=c)),n.key===Gr&&(u&&It(n),c%s!==0?(f=Tt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),ci(f,s,d)&&(f=c));const h=Br(l/s)===d;Ko(e,f)&&(o&&h?f=n.key===Gr?l:Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function _w(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function Aw(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function Iw(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ui(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 xd=0;function Gn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(xd);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():xd=requestAnimationFrame(s)}var ze=typeof document<"u"?w.useLayoutEffect:w.useEffect;function qr(){return qr=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},qr.apply(this,arguments)}let Sd=!1,Dw=0;const Td=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Dw++;function Mw(){const[e,t]=M.useState(()=>Sd?Td():void 0);return ze(()=>{e==null&&t(Td())},[]),M.useEffect(()=>{Sd=!0},[]),e}const Zo=bd.useId||Mw;let Xo;process.env.NODE_ENV!=="production"&&(Xo=new Set);function fi(){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=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.warn(o)}}function Nw(){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=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.error(o)}}const Ed=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fi("The `ref` prop is required for `FloatingArrow`."));const y=Zo(),[v,b]=M.useState(!1);if(ze(()=>{if(!o)return;zt(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const g=c*2,T=g/2,x=i/2*(l/-8+1),E=a/2*l/4,[C,O]=r.split("-"),I=!!d,N=C==="top"||C==="bottom",L=u&&O==="end"?"bottom":"top";let _=u&&O==="end"?"right":"left";u&&v&&(_=O==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",D=(s==null?void 0:s.y)!=null?u||s.y:"",k=d||"M0,0"+(" H"+i)+(" L"+(i-x)+","+(a-E))+(" Q"+i/2+","+a+" "+x+","+(a-E))+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return M.createElement("svg",qr({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:j,[L]:D,[C]:N||I?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:k}),M.createElement("path",{stroke:g&&!d?m.fill:"none",d:k}),M.createElement("clipPath",{id:y},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function Fw(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Lw=M.createContext(null),Vw=M.createContext(null),di=()=>{var e;return((e=M.useContext(Lw))==null?void 0:e.id)||null},Qo=()=>M.useContext(Vw);function Yn(e){return"data-floating-ui-"+e}function Dt(e){const t=w.useRef(e);return ze(()=>{t.current=e}),t}const Cd=Yn("safe-polygon");function ml(e,t,n){return n&&!Go(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Rw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=Qo(),p=di(),m=Dt(c),y=Dt(l),v=Dt(n),b=M.useRef(),g=M.useRef(-1),T=M.useRef(),x=M.useRef(-1),E=M.useRef(!0),C=M.useRef(!1),O=M.useRef(()=>{}),I=M.useCallback(()=>{var k;const F=(k=o.current.openEvent)==null?void 0:k.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function k(F){let{open:R}=F;R||(clearTimeout(g.current),clearTimeout(x.current),E.current=!0)}return s.on("openchange",k),()=>{s.off("openchange",k)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function k(R){I()&&r(!1,R,"hover")}const F=mt(i.floating).documentElement;return F.addEventListener("mouseleave",k),()=>{F.removeEventListener("mouseleave",k)}},[i.floating,n,r,a,m,I]);const N=M.useCallback(function(k,F,R){F===void 0&&(F=!0),R===void 0&&(R="hover");const W=ml(y.current,"close",b.current);W&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,k,R),W)):F&&(clearTimeout(g.current),r(!1,k,R))},[y,r]),L=Ut(()=>{O.current(),T.current=void 0}),_=Ut(()=>{if(C.current){const k=mt(i.floating).body;k.style.pointerEvents="",k.removeAttribute(Cd),C.current=!1}});M.useEffect(()=>{if(!a)return;function k(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(P){if(clearTimeout(g.current),E.current=!1,u&&!Go(b.current)||f>0&&!ml(y.current,"open"))return;const V=ml(y.current,"open",b.current);V?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},V):r(!0,P,"hover")}function R(P){if(k())return;O.current();const V=mt(i.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P,!0,"safe-polygon")}});const ie=T.current;V.addEventListener("mousemove",ie),O.current=()=>{V.removeEventListener("mousemove",ie)};return}(b.current==="touch"?!pt(i.floating,P.relatedTarget):!0)&&N(P)}function W(P){k()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P)}})(P))}if($e(i.domReference)){var q;const P=i.domReference;return n&&P.addEventListener("mouseleave",W),(q=i.floating)==null||q.addEventListener("mouseleave",W),d&&P.addEventListener("mousemove",F,{once:!0}),P.addEventListener("mouseenter",F),P.addEventListener("mouseleave",R),()=>{var V;n&&P.removeEventListener("mouseleave",W),(V=i.floating)==null||V.removeEventListener("mouseleave",W),d&&P.removeEventListener("mousemove",F),P.removeEventListener("mouseenter",F),P.removeEventListener("mouseleave",R)}}},[i,a,e,u,f,d,N,L,_,r,n,v,h,y,m,o]),ze(()=>{var k;if(a&&n&&(k=m.current)!=null&&k.__options.blockPointerEvents&&I()){const R=mt(i.floating).body;R.setAttribute(Cd,""),R.style.pointerEvents="none",C.current=!0;const W=i.floating;if($e(i.domReference)&&W){var F;const q=i.domReference,P=h==null||(F=h.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return P&&(P.style.pointerEvents=""),q.style.pointerEvents="auto",W.style.pointerEvents="auto",()=>{q.style.pointerEvents="",W.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),ze(()=>{n||(b.current=void 0,L(),_())},[n,L,_]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(x.current),_()},[a,i.domReference,L,_]);const j=M.useMemo(()=>{function k(F){b.current=F.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(F){const{nativeEvent:R}=F;function W(){!E.current&&!v.current&&r(!0,R,"hover")}u&&!Go(b.current)||n||f===0||(clearTimeout(x.current),b.current==="touch"?W():x.current=window.setTimeout(W,f))}}},[u,r,n,v,f]),D=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(k){N(k.nativeEvent,!1)}}),[N]);return M.useMemo(()=>a?{reference:j,floating:D}:{},[a,j,D])}function $w(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Kr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function jw(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Kr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Zr=new WeakMap,hi=new WeakSet,pi={},gl=0;const Bw=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Pd=e=>e&&(e.host||Pd(e.parentNode)),Ww=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Pd(n);return e.contains(r)?r:null}).filter(n=>n!=null);function zw(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Ww(t,e),a=new Set,l=new Set(i),c=[];pi[o]||(pi[o]=new WeakMap);const u=pi[o];i.forEach(f),d(t),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(jn(p)!=="script")if(a.has(p))d(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Zr.get(p)||0)+1,b=(u.get(p)||0)+1;Zr.set(p,v),u.set(p,b),c.push(p),v===1&&y&&hi.add(p),b===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return gl++,()=>{c.forEach(h=>{const p=(Zr.get(h)||0)-1,m=(u.get(h)||0)-1;Zr.set(h,p),u.set(h,m),p||(!hi.has(h)&&s&&h.removeAttribute(s),hi.delete(h)),m||h.removeAttribute(o)}),gl--,gl||(Zr=new WeakMap,Zr=new WeakMap,hi=new WeakSet,pi={})}}function Od(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=mt(e[0]).body;return zw(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kd(e,t){const n=Yo(e,Xr());t==="prev"&&n.reverse();const r=n.indexOf(tn(mt(e)));return n.slice(r+1)[0]}function _d(){return kd(document.body,"next")}function Ad(){return kd(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function Hw(e){Yo(e,Xr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Uw(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 Gw(e,t,n){const r=e.indexOf(t);function o(i){const a=Yn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||pt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const yl={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 Yw;function Id(e){e.key==="Tab"&&(e.target,clearTimeout(Yw))}const mi=M.forwardRef(function(t,n){const[r,o]=M.useState();ze(()=>(Ja()&&o("button"),document.addEventListener("keydown",Id),()=>{document.removeEventListener("keydown",Id)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:yl};return M.createElement("span",qr({},t,s))}),Dd=M.createContext(null),Md=Yn("portal");function qw(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Nd(),[s,i]=M.useState(null),a=M.useRef(null);return ze(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),ze(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Md,""),l.appendChild(c),a.current=c,i(c)},[t,r]),ze(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!$e(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(Md,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function gi(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=qw({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),d=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Jo(p)&&(p.type==="focusin"?Uw:Hw)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(Dd.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},d&&s&&M.createElement(mi,{"data-type":"outside",ref:l,onFocus:h=>{if(Jo(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=Ad()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),d&&s&&M.createElement("span",{"aria-owns":s.id,style:yl}),s&&Hf.createPortal(t,s),d&&s&&M.createElement(mi,{"data-type":"outside",ref:c,onFocus:h=>{if(Jo(h,s)){var p;(p=f.current)==null||p.focus()}else{const m=_d()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Nd=()=>M.useContext(Dd),Fd=20;let gr=[];function vl(e){gr=gr.filter(n=>n.isConnected);let t=e;if(!(!t||jn(t)==="body")){if(!Z0(t,Xr())){const n=Yo(t,Xr())[0];n&&(t=n)}gr.push(t),gr.length>Fd&&(gr=gr.slice(-Fd))}}function Ld(){return gr.slice().reverse().find(e=>e.isConnected)}const Kw=M.forwardRef(function(t,n){return M.createElement("button",qr({},t,{type:"button",ref:n,tabIndex:-1,style:yl}))});function bl(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:d,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:b,elements:{domReference:g,floating:T}}=t,x=typeof i=="number"&&i<0,E=Zf(g)&&x,C=Bw()?s:!0,O=Dt(o),I=Dt(i),N=Dt(a),L=Qo(),_=Nd(),j=M.useRef(null),D=M.useRef(null),k=M.useRef(!1),F=M.useRef(!1),R=M.useRef(-1),W=_!=null,q=T==null?void 0:T.firstElementChild,P=(q==null?void 0:q.id)===b?q:T,V=Ut(function(H){return H===void 0&&(H=P),H?Yo(H,Xr()):[]}),Q=Ut(H=>{const A=V(H);return O.current.map($=>g&&$==="reference"?g:P&&$==="floating"?P:A).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H($){if($.key==="Tab"){pt(P,tn(mt(P)))&&V().length===0&&!E&&It($);const z=Q(),Y=zn($);O.current[0]==="reference"&&Y===g&&(It($),$.shiftKey?Gn(z[z.length-1]):Gn(z[1])),O.current[1]==="floating"&&Y===P&&$.shiftKey&&(It($),Gn(z[0]))}}const A=mt(P);return A.addEventListener("keydown",H),()=>{A.removeEventListener("keydown",H)}},[r,g,P,c,O,E,V,Q]),M.useEffect(()=>{if(r||!T)return;function H(A){const $=zn(A),Y=V().indexOf($);Y!==-1&&(R.current=Y)}return T.addEventListener("focusin",H),()=>{T.removeEventListener("focusin",H)}},[r,T,V]),M.useEffect(()=>{if(r||!f)return;function H(){F.current=!0,setTimeout(()=>{F.current=!1})}function A($){const z=$.relatedTarget;queueMicrotask(()=>{const Y=!(pt(g,z)||pt(T,z)||pt(z,T)||pt(_==null?void 0:_.portalNode,z)||z!=null&&z.hasAttribute(Yn("focus-guard"))||L&&(Kr(L.nodesRef.current,p).find(Z=>{var de,B;return pt((de=Z.context)==null?void 0:de.elements.floating,z)||pt((B=Z.context)==null?void 0:B.elements.domReference,z)})||$w(L.nodesRef.current,p).find(Z=>{var de,B;return((de=Z.context)==null?void 0:de.elements.floating)===z||((B=Z.context)==null?void 0:B.elements.domReference)===z})));if(l&&Y&&tn(mt(P))===mt(P).body){st(P)&&(P==null||P.focus());const Z=R.current,de=V(),B=de[Z]||de[de.length-1]||P;st(B)&&B.focus()}(E||!c)&&z&&Y&&!F.current&&z!==Ld()&&(k.current=!0,m(!1,$))})}if(T&&st(g))return g.addEventListener("focusout",A),g.addEventListener("pointerdown",H),T.addEventListener("focusout",A),()=>{g.removeEventListener("focusout",A),g.removeEventListener("pointerdown",H),T.removeEventListener("focusout",A)}},[r,g,T,P,c,p,L,_,m,f,l,V,E]),M.useEffect(()=>{var H;if(r)return;const A=Array.from((_==null||(H=_.portalNode)==null?void 0:H.querySelectorAll("["+Yn("portal")+"]"))||[]);if(T){const $=[T,...A,j.current,D.current,O.current.includes("reference")||E?g:null].filter(Y=>Y!=null),z=c||E?Od($,C,!C):Od($);return()=>{z()}}},[r,g,T,c,O,_,E,C]),ze(()=>{if(r||!st(P))return;const H=mt(P),A=tn(H);queueMicrotask(()=>{const $=Q(P),z=I.current,Y=(typeof z=="number"?$[z]:z.current)||P,Z=pt(P,A);!x&&!Z&&d&&Gn(Y,{preventScroll:Y===P})})},[r,d,P,x,Q,I]),ze(()=>{if(r||!P)return;let H=!1;const A=mt(P),$=tn(A);let Y=v.current.openEvent;const Z=h.domReference.current;vl($);function de(B){let{open:Me,reason:rt,event:He,nested:ot}=B;Me&&(Y=He),rt==="escape-key"&&h.domReference.current&&vl(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(k.current=!0),rt==="outside-press"&&(ot?(k.current=!1,H=!0):k.current=!(qf(He)||Qa(He)))}return y.on("openchange",de),()=>{y.off("openchange",de);const B=tn(A),Me=pt(T,B)||L&&Kr(L.nodesRef.current,p).some(ue=>{var Ee;return pt((Ee=ue.context)==null?void 0:Ee.elements.floating,B)});(Me||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&vl(h.domReference.current);const He=Z||$,ot=Yo(mt(He).body,Xr());queueMicrotask(()=>{let ue=Ld();!ue&&st(He)&&T&&(ue=Gw(ot,He,T)),N.current&&!k.current&&st(ue)&&(!(ue!==B&&B!==A.body)||Me)&&ue.focus({preventScroll:H})})}},[r,T,P,N,v,h,y,L,p]),ze(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,d,m,h,f]),ze(()=>{if(r||!P||typeof MutationObserver!="function"||x)return;const H=()=>{const $=P.getAttribute("tabindex"),z=V(),Y=tn(mt(T)),Z=z.indexOf(Y);Z!==-1&&(R.current=Z),O.current.includes("floating")||Y!==h.domReference.current&&z.length===0?$!=="0"&&P.setAttribute("tabindex","0"):$!=="-1"&&P.setAttribute("tabindex","-1")};H();const A=new MutationObserver(H);return A.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{A.disconnect()}},[r,T,P,h,O,V,x]);function ie(H){return r||!u||!c?null:M.createElement(Kw,{ref:H==="start"?j:D,onClick:A=>m(!1,A.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(W||c);return M.createElement(M.Fragment,null,ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:H=>{if(c){const $=Q();Gn(o[0]==="reference"?$[0]:$[$.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(k.current=!1,Jo(H,_.portalNode)){const $=_d()||g;$==null||$.focus()}else{var A;(A=_.beforeOutsideRef.current)==null||A.focus()}}}),!E&&ie("start"),n,ie("end"),ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:H=>{if(c)Gn(Q()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(f&&(k.current=!0),Jo(H,_.portalNode)){const $=Ad()||g;$==null||$.focus()}else{var A;(A=_.afterOutsideRef.current)==null||A.focus()}}}))}const wl=new Set,Zw=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Zo();return ze(()=>{if(!r)return;wl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Xa()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,d=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(d-Math.floor(y))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{wl.delete(s),wl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,d)))}},[s,r]),M.createElement("div",qr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Vd(e){return st(e.target)&&e.target.tagName==="BUTTON"}function Rd(e){return nl(e)}function $d(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=M.useRef(),d=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||Vd(p))&&(p.key===" "&&!Rd(s)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Vd(p)||Rd(s)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:h}:{},[i,h])}const Xw={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Qw={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jd=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 yi(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=t,m=Qo(),y=Ut(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,b=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:x}=jd(h),{escapeKey:E,outsidePress:C}=jd(p),O=Ut(D=>{var k;if(!n||!i||!a||D.key!=="Escape")return;const F=(k=s.current.floatingContext)==null?void 0:k.nodeId,R=m?Kr(m.nodesRef.current,F):[];if(!T&&(D.stopPropagation(),R.length>0)){let W=!0;if(R.forEach(q=>{var P;if((P=q.context)!=null&&P.open&&!q.context.dataRef.current.__escapeKeyBubbles){W=!1;return}}),!W)return}r(!1,S0(D)?D.nativeEvent:D,"escape-key")}),I=Ut(D=>{var k;const F=()=>{var R;O(D),(R=zn(D))==null||R.removeEventListener("keydown",F)};(k=zn(D))==null||k.addEventListener("keydown",F)}),N=Ut(D=>{var k;const F=b.current;b.current=!1;const R=g.current;if(g.current=!1,c==="click"&&R||F||typeof v=="function"&&!v(D))return;const W=zn(D),q="["+Yn("inert")+"]",P=mt(o.floating).querySelectorAll(q);let V=$e(W)?W:null;for(;V&&!Bn(V);){const H=On(V);if(Bn(H)||!$e(H))break;V=H}if(P.length&&$e(W)&&!T0(W)&&!pt(W,o.floating)&&Array.from(P).every(H=>!pt(V,H)))return;if(st(W)&&j){const H=W.clientWidth>0&&W.scrollWidth>W.clientWidth,A=W.clientHeight>0&&W.scrollHeight>W.clientHeight;let $=A&&D.offsetX>W.clientWidth;if(A&&zt(W).direction==="rtl"&&($=D.offsetX<=W.offsetWidth-W.clientWidth),$||H&&D.offsetY>W.clientHeight)return}const Q=(k=s.current.floatingContext)==null?void 0:k.nodeId,ie=m&&Kr(m.nodesRef.current,Q).some(H=>{var A;return tl(D,(A=H.context)==null?void 0:A.elements.floating)});if(tl(D,o.floating)||tl(D,o.domReference)||ie)return;const ee=m?Kr(m.nodesRef.current,Q):[];if(ee.length>0){let H=!0;if(ee.forEach(A=>{var $;if(($=A.context)!=null&&$.open&&!A.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,D,"outside-press")}),L=Ut(D=>{var k;const F=()=>{var R;N(D),(R=zn(D))==null||R.removeEventListener(c,F)};(k=zn(D))==null||k.addEventListener(c,F)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=x;function D(R){r(!1,R,"ancestor-scroll")}const k=mt(o.floating);a&&k.addEventListener("keydown",E?I:O,E),v&&k.addEventListener(c,C?L:N,C);let F=[];return d&&($e(o.domReference)&&(F=Wn(o.domReference)),$e(o.floating)&&(F=F.concat(Wn(o.floating))),!$e(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(Wn(o.reference.contextElement)))),F=F.filter(R=>{var W;return R!==((W=k.defaultView)==null?void 0:W.visualViewport)}),F.forEach(R=>{R.addEventListener("scroll",D,{passive:!0})}),()=>{a&&k.removeEventListener("keydown",E?I:O,E),v&&k.removeEventListener(c,C?L:N,C),F.forEach(R=>{R.removeEventListener("scroll",D)})}},[s,o,a,v,c,n,r,d,i,T,x,O,E,I,N,C,L]),M.useEffect(()=>{b.current=!1},[v,c]);const _=M.useMemo(()=>({onKeyDown:O,[Xw[f]]:D=>{u&&r(!1,D.nativeEvent,"reference-press")}}),[O,r,u,f]),j=M.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[Qw[c]]:()=>{b.current=!0}}),[O,c]);return M.useMemo(()=>i?{reference:_,floating:j}:{},[i,_,j])}function Jw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),s=M.useRef({}),[i]=M.useState(()=>Fw()),a=di()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!$e(h)&&Nw("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]=M.useState(r.reference),u=Ut((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=M.useMemo(()=>({setPositionReference:c}),[]),d=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:d,events:i,floatingId:o,refs:f}),[t,u,d,i,o,f])}function vi(e){e===void 0&&(e={});const{nodeId:t}=e,n=Jw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,f=M.useRef(null),d=Qo();ze(()=>{u&&(f.current=u)},[u]);const h=Ew({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=$e(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{($e(g)||g===null)&&(f.current=g,i(g)),($e(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!$e(g))&&h.refs.setReference(g)},[h.refs]),y=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=M.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return ze(()=>{r.dataRef.current.floatingContext=b;const g=d==null?void 0:d.nodesRef.current.find(T=>T.id===t);g&&(g.context=b)}),M.useMemo(()=>({...h,context:b,refs:y,elements:v}),[h,y,v,b])}function ex(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&st(i.domReference)&&i.domReference===tn(mt(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),M.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=M.useMemo(()=>({onPointerDown(h){Qa(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=zn(h.nativeEvent);if(l&&$e(p))try{if(Ja()&&Kf())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!nl(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=$e(p)&&p.hasAttribute(Yn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=tn(i.domReference?i.domReference.ownerDocument:document);!p&&b===i.domReference||pt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,b)||pt(i.domReference,b)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:d}:{},[a,d])}const Bd="active",Wd="selected";function xl(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Bd]:i,[Wd]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Bd,Wd].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function bi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>xl(a,e,"reference"),t),s=M.useCallback(a=>xl(a,e,"floating"),n),i=M.useCallback(a=>xl(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let zd=!1;function wi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Hd(e,t){return wi(t,e===hl||e===qo,e===Gr||e===Yr)}function Sl(e,t,n){return wi(t,e===qo,n?e===Gr:e===Yr)||e==="Enter"||e===" "||e===""}function tx(e,t,n){return wi(t,n?e===Gr:e===Yr,e===qo)}function Ud(e,t,n){return wi(t,n?e===Yr:e===Gr,e===hl)}function nx(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:b=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:x=!0,virtualItemRef:E,itemSizes:C,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||fi("`useListNavigation` looping must be enabled to allow escaping."),p||fi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&fi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=di(),N=Qo(),L=Ut(a),_=M.useRef(m),j=M.useRef(c??-1),D=M.useRef(null),k=M.useRef(!0),F=M.useRef(L),R=M.useRef(!!o.floating),W=M.useRef(n),q=M.useRef(!1),P=M.useRef(!1),V=Dt(b),Q=Dt(n),ie=Dt(x),ee=Dt(o.floating),H=Dt(c),[A,$]=M.useState(),[z,Y]=M.useState(),Z=Ut(function(ue,Ee,le){le===void 0&&(le=!1);function Oe(ke){p?($(ke.id),N==null||N.events.emit("virtualfocus",ke),E&&(E.current=ke)):Gn(ke,{preventScroll:!0,sync:Kf()&&Ja()?zd||q.current:!1})}const ut=ue.current[Ee.current];ut&&Oe(ut),requestAnimationFrame(()=>{const ke=ue.current[Ee.current]||ut;if(!ke)return;ut||Oe(ke);const ft=ie.current;ft&&B&&(le||!k.current)&&(ke.scrollIntoView==null||ke.scrollIntoView(typeof ft=="boolean"?{block:"nearest",inline:"nearest"}:ft))})});ze(()=>{document.createElement("div").focus({get preventScroll(){return zd=!0,!1}})},[]),ze(()=>{l&&(n&&o.floating?_.current&&c!=null&&(P.current=!0,j.current=c,L(c)):R.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,L]),ze(()=>{if(l&&n&&o.floating)if(i==null){if(q.current=!1,H.current!=null)return;if(R.current&&(j.current=-1,Z(s,j)),(!W.current||!R.current)&&_.current&&(D.current!=null||_.current===!0&&D.current==null)){let ue=0;const Ee=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Ee),ue++):(j.current=D.current==null||Sl(D.current,g,h)||d?pl(s,V.current):wd(s,V.current),D.current=null,L(j.current))};Ee()}}else Ko(s,i)||(j.current=i,Z(s,j,P.current),P.current=!1)},[l,n,o.floating,i,H,d,s,g,h,L,Z,V]),ze(()=>{var ue;if(!l||o.floating||!N||p||!R.current)return;const Ee=N.nodesRef.current,le=(ue=Ee.find(ke=>ke.id===I))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Oe=tn(mt(o.floating)),ut=Ee.some(ke=>ke.context&&pt(ke.context.elements.floating,Oe));le&&!ut&&k.current&&le.focus({preventScroll:!0})},[l,o.floating,N,I,p]),ze(()=>{if(!l||!N||!p||I)return;function ue(Ee){Y(Ee.id),E&&(E.current=Ee)}return N.events.on("virtualfocus",ue),()=>{N.events.off("virtualfocus",ue)}},[l,N,p,I,E]),ze(()=>{F.current=L,R.current=!!o.floating}),ze(()=>{n||(D.current=null)},[n]),ze(()=>{W.current=n},[n]);const de=i!=null,B=M.useMemo(()=>{function ue(le){if(!n)return;const Oe=s.current.indexOf(le);Oe!==-1&&L(Oe)}return{onFocus(le){let{currentTarget:Oe}=le;ue(Oe)},onClick:le=>{let{currentTarget:Oe}=le;return Oe.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:Oe}=le;ue(Oe)},onPointerLeave(le){let{pointerType:Oe}=le;!k.current||Oe==="touch"||(j.current=-1,Z(s,j),L(null),p||Gn(ee.current,{preventScroll:!0}))}}}},[n,ee,Z,y,s,L,p]),Me=Ut(ue=>{if(k.current=!1,q.current=!0,!Q.current&&ue.currentTarget===ee.current)return;if(d&&Ud(ue.key,g,h)){It(ue),r(!1,ue.nativeEvent,"list-navigation"),st(o.domReference)&&!p&&o.domReference.focus();return}const Ee=j.current,le=pl(s,b),Oe=wd(s,b);if(ue.key==="Home"&&(It(ue),j.current=le,L(j.current)),ue.key==="End"&&(It(ue),j.current=Oe,L(j.current)),T>1){const ut=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ke=_w(ut,T,O),ft=ke.findIndex(se=>se!=null&&!ui(s.current,se,b)),X=ke.reduce((se,_e,Ke)=>_e!=null&&!ui(s.current,_e,b)?Ke:se,-1);if(j.current=ke[kw({current:ke.map(se=>se!=null?s.current[se]:null)},{event:ue,orientation:g,loop:f,cols:T,disabledIndices:Iw([...b||s.current.map((se,_e)=>ui(s.current,_e)?_e:void 0),void 0],ke),minIndex:ft,maxIndex:X,prevIndex:Aw(j.current>Oe?le:j.current,ut,ke,T,ue.key===qo?"bl":ue.key===Yr?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(Hd(ue.key,g)){if(It(ue),n&&!p&&tn(ue.currentTarget.ownerDocument)===ue.currentTarget){j.current=Sl(ue.key,g,h)?le:Oe,L(j.current);return}Sl(ue.key,g,h)?f?j.current=Ee>=Oe?u&&Ee!==s.current.length?-1:le:Tt(s,{startingIndex:Ee,disabledIndices:b}):j.current=Math.min(Oe,Tt(s,{startingIndex:Ee,disabledIndices:b})):f?j.current=Ee<=le?u&&Ee!==-1?s.current.length:Oe:Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:b}):j.current=Math.max(le,Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:b})),Ko(s,j.current)?L(null):L(j.current)}}),rt=M.useMemo(()=>p&&n&&de&&{"aria-activedescendant":z||A},[p,n,de,z,A]),He=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Zf(o.domReference)&&rt,onKeyDown:Me,onPointerMove(){k.current=!0}}),[rt,Me,o.domReference,g]),ot=M.useMemo(()=>{function ue(le){m==="auto"&&qf(le.nativeEvent)&&(_.current=!0)}function Ee(le){_.current=m,m==="auto"&&Qa(le.nativeEvent)&&(_.current=!0)}return{...rt,onKeyDown(le){k.current=!1;const Oe=le.key.indexOf("Arrow")===0,ut=tx(le.key,g,h),ke=Ud(le.key,g,h),ft=Hd(le.key,g),X=(d?ut:ft)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const St=N==null?void 0:N.nodesRef.current.find(Lt=>Lt.parentId==null),At=N&&St?jw(N.nodesRef.current,St.id):null;if(Oe&&At&&E){const Lt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(ut||ke){var se,_e;const jr=((se=At.context)==null?void 0:se.elements.domReference)===le.currentTarget,zo=ke&&!jr?(_e=At.context)==null?void 0:_e.elements.domReference:ut?s.current.find(Ho=>(Ho==null?void 0:Ho.id)===A):null;zo&&(It(le),zo.dispatchEvent(Lt),Y(void 0))}if(ft&&At.context&&At.context.open&&At.parentId&&le.currentTarget!==At.context.elements.domReference){var Ke;It(le),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return Me(le)}if(!(!n&&!v&&Oe)){if(X&&(D.current=d&&ft?null:le.key),d){ut&&(It(le),n?(j.current=pl(s,V.current),L(j.current)):r(!0,le.nativeEvent,"list-navigation"));return}ft&&(c!=null&&(j.current=c),It(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):Me(le),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:ue,onClick:ue}},[A,rt,Me,V,m,s,d,L,r,n,v,g,h,c,N,p,E]);return M.useMemo(()=>l?{reference:ot,floating:He,item:B}:{},[l,ot,He,B])}const rx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=rx.get(i))!=null?n:i,l=Zo(),u=di()!=null,f=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),d=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=M.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:f,floating:d,item:h}:{},[s,f,d,h])}const Gd=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qr(e,t){return typeof e=="function"?e(t):e}function ox(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function sx(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=ox(n,i);return!c&&a==="close"&&l("unmounted"),ze(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function ix(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,d=(u?i:i.close)||0,[h,p]=M.useState(()=>({...Qr(s,c),...Qr(n,c)})),{isMounted:m,status:y}=sx(e,{duration:i}),v=Dt(n),b=Dt(r),g=Dt(o),T=Dt(s);return ze(()=>{const x=Qr(v.current,c),E=Qr(g.current,c),C=Qr(T.current,c),O=Qr(b.current,c)||Object.keys(x).reduce((I,N)=>(I[N]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...x})),y==="open"&&p({transitionProperty:Object.keys(O).map(Gd).join(","),transitionDuration:f+"ms",...C,...O}),y==="close"){const I=E||x;p({transitionProperty:Object.keys(I).map(Gd).join(","),transitionDuration:d+"ms",...C,...I})}},[d,g,v,b,T,f,y,c]),{isMounted:m,styles:h}}class Si{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Si.getDescendantProperty(a[l],s,r);else s&&Si.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Jr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Si.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Jr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Jr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Jr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}/**
|
|
4
|
+
*/var I0=["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])"],oi=I0.join(","),Qf=typeof Element>"u",Hr=Qf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,si=!Qf&&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},ii=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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},D0=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},M0=function(t,n,r){if(ii(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(oi));return n&&Hr.call(t,oi)&&o.unshift(t),o=o.filter(r),o},N0=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ii(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Hr.call(i,oi);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),d=!ii(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&d){var h=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return o},Jf=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ed=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||D0(t))&&!Jf(t)?0:t.tabIndex},F0=function(t,n){var r=ed(t);return r<0&&n&&!Jf(t)?0:r},L0=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},td=function(t){return t.tagName==="INPUT"},V0=function(t){return td(t)&&t.type==="hidden"},$0=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R0=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},j0=function(t){if(!t.name)return!0;var n=t.form||si(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){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",i.message),!1}var s=R0(o,t.form);return!s||s===t},B0=function(t){return td(t)&&t.type==="radio"},z0=function(t){return B0(t)&&!j0(t)},W0=function(t){var n,r=t&&si(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,f;r=si(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return s},nd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},H0=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Hr.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Hr.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=si(t);if(l&&!l.shadowRoot&&o(l)===!0)return nd(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(W0(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return nd(t);return!1},U0=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 Hr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},G0=function(t,n){return!(n.disabled||ii(n)||V0(n)||H0(n,t)||$0(n)||U0(n))},il=function(t,n){return!(z0(n)||ed(n)<0||!G0(t,n))},Y0=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},q0=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=F0(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(L0).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Yo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=N0([t],n.includeContainer,{filter:il.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Y0}):r=M0(t,n.includeContainer,il.bind(null,n)),q0(r)},K0=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Hr.call(t,oi)===!1?!1:il(n,t)};function rd(e,t,n){let{reference:r,floating:o}=e;const s=pr(t),i=ol(t),a=rl(i),l=Un(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wr(t)){case"start":h[i]-=d*(n&&c?-1:1);break;case"end":h[i]+=d*(n&&c?-1:1);break}return h}const Z0=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=rd(c,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x:w,y:g,data:T,reset:x}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=w??u,f=g??f,h={...h,[y]:{...h[y],...T}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=rd(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}};async function al(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=zr(t,e),p=Xf(h),y=a[d?f==="floating"?"reference":"floating":f],v=ri(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},x=ri(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:g,strategy:l}):w);return{top:(v.top-x.top+p.top)/T.y,bottom:(x.bottom-v.bottom+p.bottom)/T.y,left:(v.left-x.left+p.left)/T.x,right:(x.right-v.right+p.right)/T.x}}const X0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=zr(e,t)||{};if(c==null)return{};const f=Xf(u),d={x:n,y:r},h=ol(o),p=rl(h),m=await i.getDimensions(c),y=h==="y",v=y?"top":"left",w=y?"bottom":"right",g=y?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[h]-d[h]-s.floating[p],x=d[h]-s.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[g]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[g]||s.floating[p]);const O=T/2-x/2,I=C/2-m[p]/2-1,N=cn(f[v],I),L=cn(f[w],I),_=N,j=C-m[p]-L,D=C/2-m[p]/2+O,k=nl(_,D,j),F=!l.arrow&&Wr(o)!=null&&D!==k&&s.reference[p]/2-(D<_?N:L)-m[p]/2<0,$=F?D<_?D-_:D-j:0;return{[h]:d[h]+$,data:{[h]:k,centerOffset:D-k-$,...F&&{alignmentOffset:$}},reset:F}}}),Q0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=zr(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),w=pr(a),g=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=d||(g||!m?[ni(a)]:O0(a)),E=p!=="none";!d&&E&&x.push(..._0(a,m,p,T));const C=[a,...x],O=await al(t,y),I=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(O[v]),f){const D=P0(o,i,T);I.push(O[D[0]],O[D[1]])}if(N=[...N,{placement:o,overflows:I}],!I.every(D=>D<=0)){var L,_;const D=(((L=s.flip)==null?void 0:L.index)||0)+1,k=C[D];if(k)return{data:{index:D,overflows:N},reset:{placement:k}};let F=(_=N.filter($=>$.overflows[0]<=0).sort(($,z)=>$.overflows[1]-z.overflows[1])[0])==null?void 0:_.placement;if(!F)switch(h){case"bestFit":{var j;const $=(j=N.filter(z=>{if(E){const q=pr(z.placement);return q===w||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:j[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function J0(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Un(n),a=Wr(n),l=pr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=zr(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const ew=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await J0(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},tw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...l}=zr(e,t),c={x:n,y:r},u=await al(t,l),f=pr(Un(o)),d=Zf(f);let h=c[d],p=c[f];if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=h+u[y],g=h-u[v];h=nl(w,h,g)}if(i){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=p+u[y],g=p-u[v];p=nl(w,p,g)}const m=a.fn({...t,[d]:h,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},nw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:s}=t,{apply:i=()=>{},...a}=zr(e,t),l=await al(t,a),c=Un(n),u=Wr(n),f=pr(n)==="y",{width:d,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const y=h-l.top-l.bottom,v=d-l.left-l.right,w=cn(h-l[p],y),g=cn(d-l[m],v),T=!t.middlewareData.shift;let x=w,E=g;if(f?E=u||T?cn(g,v):v:x=u||T?cn(w,y):y,T&&!u){const O=Ht(l.left,0),I=Ht(l.right,0),N=Ht(l.top,0),L=Ht(l.bottom,0);f?E=d-2*(O!==0||I!==0?O+I:Ht(l.left,l.right)):x=h-2*(N!==0||L!==0?N+L:Ht(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:x});const C=await o.getDimensions(s.floating);return d!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function od(e){const t=Wt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=st(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ti(n)!==s||ti(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function ll(e){return Re(e)?e:e.contextElement}function Ur(e){const t=ll(e);if(!st(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=od(t);let i=(s?ti(n.width):n.width)/r,a=(s?ti(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const rw=Hn(0);function sd(e){const t=Vt(e);return!Ka()||!t.visualViewport?rw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ow(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vt(e)?!1:t}function mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=ll(e);let i=Hn(1);t&&(r?Re(r)&&(i=Ur(r)):i=Ur(e));const a=ow(s,n,r)?sd(s):Hn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const d=Vt(s),h=r&&Re(r)?Vt(r):r;let p=d,m=p.frameElement;for(;m&&r&&h!==p;){const y=Ur(m),v=m.getBoundingClientRect(),w=Wt(m),g=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=g,c+=T,p=Vt(m),m=p.frameElement}}return ri({width:u,height:f,x:l,y:c})}function sw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Pn(r),a=t?Js(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),f=st(r);if((f||!f&&!s)&&((jn(r)!=="body"||Uo(i))&&(l=ei(r)),st(r))){const d=mr(r);c=Ur(r),u.x=d.x+r.clientLeft,u.y=d.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 iw(e){return Array.from(e.getClientRects())}function id(e){return mr(Pn(e)).left+ei(e).scrollLeft}function aw(e){const t=Pn(e),n=ei(e),r=e.ownerDocument.body,o=Ht(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ht(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+id(e);const a=-n.scrollTop;return Wt(r).direction==="rtl"&&(i+=Ht(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function lw(e,t){const n=Vt(e),r=Pn(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Ka();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function cw(e,t){const n=mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=st(e)?Ur(e):Hn(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function ad(e,t,n){let r;if(t==="viewport")r=lw(e,n);else if(t==="document")r=aw(Pn(e));else if(Re(t))r=cw(t,n);else{const o=sd(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ri(r)}function ld(e,t){const n=On(e);return n===t||!Re(n)||Bn(n)?!1:Wt(n).position==="fixed"||ld(n,t)}function uw(e,t){const n=t.get(e);if(n)return n;let r=zn(e,[],!1).filter(a=>Re(a)&&jn(a)!=="body"),o=null;const s=Wt(e).position==="fixed";let i=s?On(e):e;for(;Re(i)&&!Bn(i);){const a=Wt(i),l=qa(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Uo(i)&&!l&&ld(e,i))?r=r.filter(u=>u!==i):o=a,i=On(i)}return t.set(e,r),r}function fw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Js(t)?[]:uw(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=ad(t,u,o);return c.top=Ht(f.top,c.top),c.right=cn(f.right,c.right),c.bottom=cn(f.bottom,c.bottom),c.left=Ht(f.left,c.left),c},ad(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dw(e){const{width:t,height:n}=od(e);return{width:t,height:n}}function hw(e,t,n){const r=st(t),o=Pn(t),s=n==="fixed",i=mr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Hn(0);if(r||!r&&!s)if((jn(t)!=="body"||Uo(o))&&(a=ei(t)),r){const f=mr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=id(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function cl(e){return Wt(e).position==="static"}function cd(e,t){return!st(e)||Wt(e).position==="fixed"?null:t?t(e):e.offsetParent}function ud(e,t){const n=Vt(e);if(Js(e))return n;if(!st(e)){let o=On(e);for(;o&&!Bn(o);){if(Re(o)&&!cl(o))return o;o=On(o)}return n}let r=cd(e,t);for(;r&&v0(r)&&cl(r);)r=cd(r,t);return r&&Bn(r)&&cl(r)&&!qa(r)?n:r||b0(e)||n}const pw=async function(e){const t=this.getOffsetParent||ud,n=this.getDimensions,r=await n(e.floating);return{reference:hw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mw(e){return Wt(e).direction==="rtl"}const gw={convertOffsetParentRelativeRectToViewportRelativeRect:sw,getDocumentElement:Pn,getClippingRect:fw,getOffsetParent:ud,getElementRects:pw,getClientRects:iw,getDimensions:dw,getScale:Ur,isElement:Re,isRTL:mw};function yw(e,t){let n=null,r;const o=Pn(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Br(u),p=Br(o.clientWidth-(c+f)),m=Br(o.clientHeight-(u+d)),y=Br(c),w={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:Ht(0,cn(1,l))||1};let g=!0;function T(x){const E=x[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(T,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,w)}n.observe(e)}return i(!0),s}function ul(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ll(e),u=o||s?[...c?zn(c):[],...zn(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=c&&a?yw(c,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,m=l?mr(e):null;l&&y();function y(){const v=mr(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const vw=ew,bw=tw,ww=Q0,xw=nw,fd=X0,Sw=(e,t,n)=>{const r=new Map,o={platform:gw,...n},s={...o.platform,_c:r};return Z0(e,t,{...o,platform:s})};var ai=typeof document<"u"?b.useLayoutEffect:b.useEffect;function li(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(!li(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!li(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function dd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hd(e,t){const n=dd(e);return Math.round(t*n)/n}function pd(e){const t=M.useRef(e);return ai(()=>{t.current=e}),t}function Tw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=M.useState(r);li(d,r)||h(r);const[p,m]=M.useState(null),[y,v]=M.useState(null),w=M.useCallback($=>{$!==E.current&&(E.current=$,m($))},[]),g=M.useCallback($=>{$!==C.current&&(C.current=$,v($))},[]),T=s||p,x=i||y,E=M.useRef(null),C=M.useRef(null),O=M.useRef(u),I=l!=null,N=pd(l),L=pd(o),_=M.useCallback(()=>{if(!E.current||!C.current)return;const $={placement:t,strategy:n,middleware:d};L.current&&($.platform=L.current),Sw(E.current,C.current,$).then(z=>{const q={...z,isPositioned:!0};j.current&&!li(O.current,q)&&(O.current=q,Wf.flushSync(()=>{f(q)}))})},[d,t,n,L]);ai(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const j=M.useRef(!1);ai(()=>(j.current=!0,()=>{j.current=!1}),[]),ai(()=>{if(T&&(E.current=T),x&&(C.current=x),T&&x){if(N.current)return N.current(T,x,_);_()}},[T,x,_,N,I]);const D=M.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:g}),[w,g]),k=M.useMemo(()=>({reference:T,floating:x}),[T,x]),F=M.useMemo(()=>{const $={position:n,left:0,top:0};if(!k.floating)return $;const z=hd(k.floating,u.x),q=hd(k.floating,u.y);return a?{...$,transform:"translate("+z+"px, "+q+"px)",...dd(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,k.floating,u.x,u.y]);return M.useMemo(()=>({...u,update:_,refs:D,elements:k,floatingStyles:F}),[u,_,D,k,F])}const Ew=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?fd({element:r.current,padding:o}).fn(n):{}:r?fd({element:r,padding:o}).fn(n):{}}}},fl=(e,t)=>({...vw(e),options:[e,t]}),md=(e,t)=>({...bw(e),options:[e,t]}),gd=(e,t)=>({...ww(e),options:[e,t]}),Cw=(e,t)=>({...xw(e),options:[e,t]}),yd=(e,t)=>({...Ew(e),options:[e,t]}),vd={...M},Pw=vd.useInsertionEffect||(e=>e());function Ut(e){const t=M.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Pw(()=>{t.current=e}),M.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 dl="ArrowUp",qo="ArrowDown",Gr="ArrowLeft",Yr="ArrowRight";function ci(e,t,n){return Math.floor(e/t)!==n}function Ko(e,t){return t<0||t>=e.current.length}function hl(e,t){return Tt(e,{disabledIndices:t})}function bd(e,t){return Tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:s=1}=t===void 0?{}:t;const i=e.current;let a=n;do a+=r?-s:s;while(a>=0&&a<=i.length-1&&ui(i,a,o));return a}function Ow(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===dl){if(u&&It(n),c===-1)f=l;else if(f=Tt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||f<0)){const d=c%s,h=l%s,p=l-(h-d);h===d?f=l:f=h>d?p:p-s}Ko(e,f)&&(f=c)}if(n.key===qo&&(u&&It(n),c===-1?f=a:(f=Tt(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(f=Tt(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ko(e,f)&&(f=c)),r==="both"){const d=Br(c/s);n.key===Yr&&(u&&It(n),c%s!==s-1?(f=Tt(e,{startingIndex:c,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c-c%s-1,disabledIndices:i})),ci(f,s,d)&&(f=c)),n.key===Gr&&(u&&It(n),c%s!==0?(f=Tt(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&ci(f,s,d)&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(f=Tt(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),ci(f,s,d)&&(f=c));const h=Br(l/s)===d;Ko(e,f)&&(o&&h?f=n.key===Gr?l:Tt(e,{startingIndex:c-c%s-1,disabledIndices:i}):f=c)}return f}function kw(e,t,n){const r=[];let o=0;return e.forEach((s,i)=>{let{width:a,height:l}=s;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+i+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let d=0;d<l;d++)u.push(o+f+d*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=i}),c=!0):o++}}),[...r]}function _w(e,t,n,r,o){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e)}}function Aw(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ui(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 wd=0;function Gn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(wd);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():wd=requestAnimationFrame(s)}var We=typeof document<"u"?b.useLayoutEffect:b.useEffect;function qr(){return qr=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},qr.apply(this,arguments)}let xd=!1,Iw=0;const Sd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Iw++;function Dw(){const[e,t]=M.useState(()=>xd?Sd():void 0);return We(()=>{e==null&&t(Sd())},[]),M.useEffect(()=>{xd=!0},[]),e}const Zo=vd.useId||Dw;let Xo;process.env.NODE_ENV!=="production"&&(Xo=new Set);function fi(){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=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.warn(o)}}function Mw(){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=Xo)!=null&&e.has(o))){var s;(s=Xo)==null||s.add(o),console.error(o)}}const Td=M.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:s}},width:i=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d,style:{transform:h,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||fi("The `ref` prop is required for `FloatingArrow`."));const y=Zo(),[v,w]=M.useState(!1);if(We(()=>{if(!o)return;Wt(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const g=c*2,T=g/2,x=i/2*(l/-8+1),E=a/2*l/4,[C,O]=r.split("-"),I=!!d,N=C==="top"||C==="bottom",L=u&&O==="end"?"bottom":"top";let _=u&&O==="end"?"right":"left";u&&v&&(_=O==="end"?"left":"right");const j=(s==null?void 0:s.x)!=null?u||s.x:"",D=(s==null?void 0:s.y)!=null?u||s.y:"",k=d||"M0,0"+(" H"+i)+(" L"+(i-x)+","+(a-E))+(" Q"+i/2+","+a+" "+x+","+(a-E))+" Z",F={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[C];return M.createElement("svg",qr({},m,{"aria-hidden":!0,ref:n,width:I?i:i+g,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[_]:j,[L]:D,[C]:N||I?"100%":"calc(100% - "+g/2+"px)",transform:""+F+(h??""),...p}}),g>0&&M.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:g+(d?0:1),d:k}),M.createElement("path",{stroke:g&&!d?m.fill:"none",d:k}),M.createElement("clipPath",{id:y},M.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+g,height:i})))});function Nw(){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 Fw=M.createContext(null),Lw=M.createContext(null),di=()=>{var e;return((e=M.useContext(Fw))==null?void 0:e.id)||null},Qo=()=>M.useContext(Lw);function Yn(e){return"data-floating-ui-"+e}function Dt(e){const t=b.useRef(e);return We(()=>{t.current=e}),t}const Ed=Yn("safe-polygon");function pl(e,t,n){return n&&!Go(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Vw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=Qo(),p=di(),m=Dt(c),y=Dt(l),v=Dt(n),w=M.useRef(),g=M.useRef(-1),T=M.useRef(),x=M.useRef(-1),E=M.useRef(!0),C=M.useRef(!1),O=M.useRef(()=>{}),I=M.useCallback(()=>{var k;const F=(k=o.current.openEvent)==null?void 0:k.type;return(F==null?void 0:F.includes("mouse"))&&F!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function k(F){let{open:$}=F;$||(clearTimeout(g.current),clearTimeout(x.current),E.current=!0)}return s.on("openchange",k),()=>{s.off("openchange",k)}},[a,s]),M.useEffect(()=>{if(!a||!m.current||!n)return;function k($){I()&&r(!1,$,"hover")}const F=mt(i.floating).documentElement;return F.addEventListener("mouseleave",k),()=>{F.removeEventListener("mouseleave",k)}},[i.floating,n,r,a,m,I]);const N=M.useCallback(function(k,F,$){F===void 0&&(F=!0),$===void 0&&($="hover");const z=pl(y.current,"close",w.current);z&&!T.current?(clearTimeout(g.current),g.current=window.setTimeout(()=>r(!1,k,$),z)):F&&(clearTimeout(g.current),r(!1,k,$))},[y,r]),L=Ut(()=>{O.current(),T.current=void 0}),_=Ut(()=>{if(C.current){const k=mt(i.floating).body;k.style.pointerEvents="",k.removeAttribute(Ed),C.current=!1}});M.useEffect(()=>{if(!a)return;function k(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(P){if(clearTimeout(g.current),E.current=!1,u&&!Go(w.current)||f>0&&!pl(y.current,"open"))return;const V=pl(y.current,"open",w.current);V?g.current=window.setTimeout(()=>{v.current||r(!0,P,"hover")},V):r(!0,P,"hover")}function $(P){if(k())return;O.current();const V=mt(i.floating);if(clearTimeout(x.current),m.current&&o.current.floatingContext){n||clearTimeout(g.current),T.current=m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P,!0,"safe-polygon")}});const ie=T.current;V.addEventListener("mousemove",ie),O.current=()=>{V.removeEventListener("mousemove",ie)};return}(w.current==="touch"?!pt(i.floating,P.relatedTarget):!0)&&N(P)}function z(P){k()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:h,x:P.clientX,y:P.clientY,onClose(){_(),L(),N(P)}})(P))}if(Re(i.domReference)){var q;const P=i.domReference;return n&&P.addEventListener("mouseleave",z),(q=i.floating)==null||q.addEventListener("mouseleave",z),d&&P.addEventListener("mousemove",F,{once:!0}),P.addEventListener("mouseenter",F),P.addEventListener("mouseleave",$),()=>{var V;n&&P.removeEventListener("mouseleave",z),(V=i.floating)==null||V.removeEventListener("mouseleave",z),d&&P.removeEventListener("mousemove",F),P.removeEventListener("mouseenter",F),P.removeEventListener("mouseleave",$)}}},[i,a,e,u,f,d,N,L,_,r,n,v,h,y,m,o]),We(()=>{var k;if(a&&n&&(k=m.current)!=null&&k.__options.blockPointerEvents&&I()){const $=mt(i.floating).body;$.setAttribute(Ed,""),$.style.pointerEvents="none",C.current=!0;const z=i.floating;if(Re(i.domReference)&&z){var F;const q=i.domReference,P=h==null||(F=h.nodesRef.current.find(V=>V.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return P&&(P.style.pointerEvents=""),q.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,i,h,m,I]),We(()=>{n||(w.current=void 0,L(),_())},[n,L,_]),M.useEffect(()=>()=>{L(),clearTimeout(g.current),clearTimeout(x.current),_()},[a,i.domReference,L,_]);const j=M.useMemo(()=>{function k(F){w.current=F.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(F){const{nativeEvent:$}=F;function z(){!E.current&&!v.current&&r(!0,$,"hover")}u&&!Go(w.current)||n||f===0||(clearTimeout(x.current),w.current==="touch"?z():x.current=window.setTimeout(z,f))}}},[u,r,n,v,f]),D=M.useMemo(()=>({onMouseEnter(){clearTimeout(g.current)},onMouseLeave(k){N(k.nativeEvent,!1)}}),[N]);return M.useMemo(()=>a?{reference:j,floating:D}:{},[a,j,D])}function $w(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){const s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Kr(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function Rw(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),Kr(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let Zr=new WeakMap,hi=new WeakSet,pi={},ml=0;const jw=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Cd=e=>e&&(e.host||Cd(e.parentNode)),Bw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Cd(n);return e.contains(r)?r:null}).filter(n=>n!=null);function zw(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=Bw(t,e),a=new Set,l=new Set(i),c=[];pi[o]||(pi[o]=new WeakMap);const u=pi[o];i.forEach(f),d(t),a.clear();function f(h){!h||a.has(h)||(a.add(h),h.parentNode&&f(h.parentNode))}function d(h){!h||l.has(h)||[].forEach.call(h.children,p=>{if(jn(p)!=="script")if(a.has(p))d(p);else{const m=s?p.getAttribute(s):null,y=m!==null&&m!=="false",v=(Zr.get(p)||0)+1,w=(u.get(p)||0)+1;Zr.set(p,v),u.set(p,w),c.push(p),v===1&&y&&hi.add(p),w===1&&p.setAttribute(o,""),!y&&s&&p.setAttribute(s,"true")}})}return ml++,()=>{c.forEach(h=>{const p=(Zr.get(h)||0)-1,m=(u.get(h)||0)-1;Zr.set(h,p),u.set(h,m),p||(!hi.has(h)&&s&&h.removeAttribute(s),hi.delete(h)),m||h.removeAttribute(o)}),ml--,ml||(Zr=new WeakMap,Zr=new WeakMap,hi=new WeakSet,pi={})}}function Pd(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=mt(e[0]).body;return zw(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Od(e,t){const n=Yo(e,Xr());t==="prev"&&n.reverse();const r=n.indexOf(tn(mt(e)));return n.slice(r+1)[0]}function kd(){return Od(document.body,"next")}function _d(){return Od(document.body,"prev")}function Jo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function Ww(e){Yo(e,Xr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Hw(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 Uw(e,t,n){const r=e.indexOf(t);function o(i){const a=Yn("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||pt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const gl={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 Gw;function Ad(e){e.key==="Tab"&&(e.target,clearTimeout(Gw))}const mi=M.forwardRef(function(t,n){const[r,o]=M.useState();We(()=>(Qa()&&o("button"),document.addEventListener("keydown",Ad),()=>{document.removeEventListener("keydown",Ad)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Yn("focus-guard")]:"",style:gl};return M.createElement("span",qr({},t,s))}),Id=M.createContext(null),Dd=Yn("portal");function Yw(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Zo(),o=Md(),[s,i]=M.useState(null),a=M.useRef(null);return We(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),We(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Dd,""),l.appendChild(c),a.current=c,i(c)},[t,r]),We(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Re(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(Dd,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function gi(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=Yw({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),f=M.useRef(null),d=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function h(p){s&&Jo(p)&&(p.type==="focusin"?Hw:Ww)(s)}return s.addEventListener("focusin",h,!0),s.addEventListener("focusout",h,!0),()=>{s.removeEventListener("focusin",h,!0),s.removeEventListener("focusout",h,!0)}},[s,o,i==null?void 0:i.modal]),M.createElement(Id.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:s,setFocusManagerState:a}),[o,s])},d&&s&&M.createElement(mi,{"data-type":"outside",ref:l,onFocus:h=>{if(Jo(h,s)){var p;(p=u.current)==null||p.focus()}else{const m=_d()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),d&&s&&M.createElement("span",{"aria-owns":s.id,style:gl}),s&&Wf.createPortal(t,s),d&&s&&M.createElement(mi,{"data-type":"outside",ref:c,onFocus:h=>{if(Jo(h,s)){var p;(p=f.current)==null||p.focus()}else{const m=kd()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,h.nativeEvent))}}}))}const Md=()=>M.useContext(Id),Nd=20;let gr=[];function yl(e){gr=gr.filter(n=>n.isConnected);let t=e;if(!(!t||jn(t)==="body")){if(!K0(t,Xr())){const n=Yo(t,Xr())[0];n&&(t=n)}gr.push(t),gr.length>Nd&&(gr=gr.slice(-Nd))}}function Fd(){return gr.slice().reverse().find(e=>e.isConnected)}const qw=M.forwardRef(function(t,n){return M.createElement("button",qr({},t,{type:"button",ref:n,tabIndex:-1,style:gl}))});function vl(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:d,refs:h,nodeId:p,onOpenChange:m,events:y,dataRef:v,floatingId:w,elements:{domReference:g,floating:T}}=t,x=typeof i=="number"&&i<0,E=Kf(g)&&x,C=jw()?s:!0,O=Dt(o),I=Dt(i),N=Dt(a),L=Qo(),_=Md(),j=M.useRef(null),D=M.useRef(null),k=M.useRef(!1),F=M.useRef(!1),$=M.useRef(-1),z=_!=null,q=T==null?void 0:T.firstElementChild,P=(q==null?void 0:q.id)===w?q:T,V=Ut(function(H){return H===void 0&&(H=P),H?Yo(H,Xr()):[]}),Q=Ut(H=>{const A=V(H);return O.current.map(R=>g&&R==="reference"?g:P&&R==="floating"?P:A).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function H(R){if(R.key==="Tab"){pt(P,tn(mt(P)))&&V().length===0&&!E&&It(R);const W=Q(),Y=Wn(R);O.current[0]==="reference"&&Y===g&&(It(R),R.shiftKey?Gn(W[W.length-1]):Gn(W[1])),O.current[1]==="floating"&&Y===P&&R.shiftKey&&(It(R),Gn(W[0]))}}const A=mt(P);return A.addEventListener("keydown",H),()=>{A.removeEventListener("keydown",H)}},[r,g,P,c,O,E,V,Q]),M.useEffect(()=>{if(r||!T)return;function H(A){const R=Wn(A),Y=V().indexOf(R);Y!==-1&&($.current=Y)}return T.addEventListener("focusin",H),()=>{T.removeEventListener("focusin",H)}},[r,T,V]),M.useEffect(()=>{if(r||!f)return;function H(){F.current=!0,setTimeout(()=>{F.current=!1})}function A(R){const W=R.relatedTarget;queueMicrotask(()=>{const Y=!(pt(g,W)||pt(T,W)||pt(W,T)||pt(_==null?void 0:_.portalNode,W)||W!=null&&W.hasAttribute(Yn("focus-guard"))||L&&(Kr(L.nodesRef.current,p).find(Z=>{var de,B;return pt((de=Z.context)==null?void 0:de.elements.floating,W)||pt((B=Z.context)==null?void 0:B.elements.domReference,W)})||$w(L.nodesRef.current,p).find(Z=>{var de,B;return((de=Z.context)==null?void 0:de.elements.floating)===W||((B=Z.context)==null?void 0:B.elements.domReference)===W})));if(l&&Y&&tn(mt(P))===mt(P).body){st(P)&&(P==null||P.focus());const Z=$.current,de=V(),B=de[Z]||de[de.length-1]||P;st(B)&&B.focus()}(E||!c)&&W&&Y&&!F.current&&W!==Fd()&&(k.current=!0,m(!1,R))})}if(T&&st(g))return g.addEventListener("focusout",A),g.addEventListener("pointerdown",H),T.addEventListener("focusout",A),()=>{g.removeEventListener("focusout",A),g.removeEventListener("pointerdown",H),T.removeEventListener("focusout",A)}},[r,g,T,P,c,p,L,_,m,f,l,V,E]),M.useEffect(()=>{var H;if(r)return;const A=Array.from((_==null||(H=_.portalNode)==null?void 0:H.querySelectorAll("["+Yn("portal")+"]"))||[]);if(T){const R=[T,...A,j.current,D.current,O.current.includes("reference")||E?g:null].filter(Y=>Y!=null),W=c||E?Pd(R,C,!C):Pd(R);return()=>{W()}}},[r,g,T,c,O,_,E,C]),We(()=>{if(r||!st(P))return;const H=mt(P),A=tn(H);queueMicrotask(()=>{const R=Q(P),W=I.current,Y=(typeof W=="number"?R[W]:W.current)||P,Z=pt(P,A);!x&&!Z&&d&&Gn(Y,{preventScroll:Y===P})})},[r,d,P,x,Q,I]),We(()=>{if(r||!P)return;let H=!1;const A=mt(P),R=tn(A);let Y=v.current.openEvent;const Z=h.domReference.current;yl(R);function de(B){let{open:Me,reason:rt,event:He,nested:ot}=B;Me&&(Y=He),rt==="escape-key"&&h.domReference.current&&yl(h.domReference.current),rt==="hover"&&He.type==="mouseleave"&&(k.current=!0),rt==="outside-press"&&(ot?(k.current=!1,H=!0):k.current=!(Yf(He)||Xa(He)))}return y.on("openchange",de),()=>{y.off("openchange",de);const B=tn(A),Me=pt(T,B)||L&&Kr(L.nodesRef.current,p).some(ue=>{var Ee;return pt((Ee=ue.context)==null?void 0:Ee.elements.floating,B)});(Me||Y&&["click","mousedown"].includes(Y.type))&&h.domReference.current&&yl(h.domReference.current);const He=Z||R,ot=Yo(mt(He).body,Xr());queueMicrotask(()=>{let ue=Fd();!ue&&st(He)&&T&&(ue=Uw(ot,He,T)),N.current&&!k.current&&st(ue)&&(!(ue!==B&&B!==A.body)||Me)&&ue.focus({preventScroll:H})})}},[r,T,P,N,v,h,y,L,p]),We(()=>{if(!r&&_)return _.setFocusManagerState({modal:c,closeOnFocusOut:f,open:d,onOpenChange:m,refs:h}),()=>{_.setFocusManagerState(null)}},[r,_,c,d,m,h,f]),We(()=>{if(r||!P||typeof MutationObserver!="function"||x)return;const H=()=>{const R=P.getAttribute("tabindex"),W=V(),Y=tn(mt(T)),Z=W.indexOf(Y);Z!==-1&&($.current=Z),O.current.includes("floating")||Y!==h.domReference.current&&W.length===0?R!=="0"&&P.setAttribute("tabindex","0"):R!=="-1"&&P.setAttribute("tabindex","-1")};H();const A=new MutationObserver(H);return A.observe(P,{childList:!0,subtree:!0,attributes:!0}),()=>{A.disconnect()}},[r,T,P,h,O,V,x]);function ie(H){return r||!u||!c?null:M.createElement(qw,{ref:H==="start"?j:D,onClick:A=>m(!1,A.nativeEvent)},typeof u=="string"?u:"Dismiss")}const ee=!r&&C&&(c?!E:!0)&&(z||c);return M.createElement(M.Fragment,null,ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.beforeInsideRef,onFocus:H=>{if(c){const R=Q();Gn(o[0]==="reference"?R[0]:R[R.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(k.current=!1,Jo(H,_.portalNode)){const R=kd()||g;R==null||R.focus()}else{var A;(A=_.beforeOutsideRef.current)==null||A.focus()}}}),!E&&ie("start"),n,ie("end"),ee&&M.createElement(mi,{"data-type":"inside",ref:_==null?void 0:_.afterInsideRef,onFocus:H=>{if(c)Gn(Q()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(f&&(k.current=!0),Jo(H,_.portalNode)){const R=_d()||g;R==null||R.focus()}else{var A;(A=_.afterOutsideRef.current)==null||A.focus()}}}))}const bl=new Set,Kw=M.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=Zo();return We(()=>{if(!r)return;bl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Za()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,f=a.left?parseFloat(a.left):window.scrollX,d=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var h,p;const m=((h=window.visualViewport)==null?void 0:h.offsetLeft)||0,y=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(d-Math.floor(y))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{bl.delete(s),bl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,d)))}},[s,r]),M.createElement("div",qr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Ld(e){return st(e.target)&&e.target.tagName==="BUTTON"}function Vd(e){return tl(e)}function $d(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=M.useRef(),d=M.useRef(!1),h=M.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent,"click"):(p.preventDefault(),r(!0,p.nativeEvent,"click"))))},onClick(p){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Go(m,!0)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,p.nativeEvent,"click"):r(!0,p.nativeEvent,"click"))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||Ld(p))&&(p.key===" "&&!Vd(s)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Ld(p)||Vd(s)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return M.useMemo(()=>i?{reference:h}:{},[i,h])}const Zw={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Xw={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Rd=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 yi(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:p}=t,m=Qo(),y=Ut(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,w=M.useRef(!1),g=M.useRef(!1),{escapeKey:T,outsidePress:x}=Rd(h),{escapeKey:E,outsidePress:C}=Rd(p),O=Ut(D=>{var k;if(!n||!i||!a||D.key!=="Escape")return;const F=(k=s.current.floatingContext)==null?void 0:k.nodeId,$=m?Kr(m.nodesRef.current,F):[];if(!T&&(D.stopPropagation(),$.length>0)){let z=!0;if($.forEach(q=>{var P;if((P=q.context)!=null&&P.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,x0(D)?D.nativeEvent:D,"escape-key")}),I=Ut(D=>{var k;const F=()=>{var $;O(D),($=Wn(D))==null||$.removeEventListener("keydown",F)};(k=Wn(D))==null||k.addEventListener("keydown",F)}),N=Ut(D=>{var k;const F=w.current;w.current=!1;const $=g.current;if(g.current=!1,c==="click"&&$||F||typeof v=="function"&&!v(D))return;const z=Wn(D),q="["+Yn("inert")+"]",P=mt(o.floating).querySelectorAll(q);let V=Re(z)?z:null;for(;V&&!Bn(V);){const H=On(V);if(Bn(H)||!Re(H))break;V=H}if(P.length&&Re(z)&&!S0(z)&&!pt(z,o.floating)&&Array.from(P).every(H=>!pt(V,H)))return;if(st(z)&&j){const H=z.clientWidth>0&&z.scrollWidth>z.clientWidth,A=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let R=A&&D.offsetX>z.clientWidth;if(A&&Wt(z).direction==="rtl"&&(R=D.offsetX<=z.offsetWidth-z.clientWidth),R||H&&D.offsetY>z.clientHeight)return}const Q=(k=s.current.floatingContext)==null?void 0:k.nodeId,ie=m&&Kr(m.nodesRef.current,Q).some(H=>{var A;return el(D,(A=H.context)==null?void 0:A.elements.floating)});if(el(D,o.floating)||el(D,o.domReference)||ie)return;const ee=m?Kr(m.nodesRef.current,Q):[];if(ee.length>0){let H=!0;if(ee.forEach(A=>{var R;if((R=A.context)!=null&&R.open&&!A.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r(!1,D,"outside-press")}),L=Ut(D=>{var k;const F=()=>{var $;N(D),($=Wn(D))==null||$.removeEventListener(c,F)};(k=Wn(D))==null||k.addEventListener(c,F)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=x;function D($){r(!1,$,"ancestor-scroll")}const k=mt(o.floating);a&&k.addEventListener("keydown",E?I:O,E),v&&k.addEventListener(c,C?L:N,C);let F=[];return d&&(Re(o.domReference)&&(F=zn(o.domReference)),Re(o.floating)&&(F=F.concat(zn(o.floating))),!Re(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(zn(o.reference.contextElement)))),F=F.filter($=>{var z;return $!==((z=k.defaultView)==null?void 0:z.visualViewport)}),F.forEach($=>{$.addEventListener("scroll",D,{passive:!0})}),()=>{a&&k.removeEventListener("keydown",E?I:O,E),v&&k.removeEventListener(c,C?L:N,C),F.forEach($=>{$.removeEventListener("scroll",D)})}},[s,o,a,v,c,n,r,d,i,T,x,O,E,I,N,C,L]),M.useEffect(()=>{w.current=!1},[v,c]);const _=M.useMemo(()=>({onKeyDown:O,[Zw[f]]:D=>{u&&r(!1,D.nativeEvent,"reference-press")}}),[O,r,u,f]),j=M.useMemo(()=>({onKeyDown:O,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[Xw[c]]:()=>{w.current=!0}}),[O,c]);return M.useMemo(()=>i?{reference:_,floating:j}:{},[i,_,j])}function Qw(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Zo(),s=M.useRef({}),[i]=M.useState(()=>Nw()),a=di()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!Re(h)&&Mw("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]=M.useState(r.reference),u=Ut((h,p,m)=>{s.current.openEvent=h?p:void 0,i.emit("openchange",{open:h,event:p,reason:m,nested:a}),n==null||n(h,p,m)}),f=M.useMemo(()=>({setPositionReference:c}),[]),d=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:d,events:i,floatingId:o,refs:f}),[t,u,d,i,o,f])}function vi(e){e===void 0&&(e={});const{nodeId:t}=e,n=Qw({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.reference)||s,f=M.useRef(null),d=Qo();We(()=>{u&&(f.current=u)},[u]);const h=Tw({...e,elements:{...o,...a&&{reference:a}}}),p=M.useCallback(g=>{const T=Re(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(T),h.refs.setReference(T)},[h.refs]),m=M.useCallback(g=>{(Re(g)||g===null)&&(f.current=g,i(g)),(Re(h.refs.reference.current)||h.refs.reference.current===null||g!==null&&!Re(g))&&h.refs.setReference(g)},[h.refs]),y=M.useMemo(()=>({...h.refs,setReference:m,setPositionReference:p,domReference:f}),[h.refs,m,p]),v=M.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=M.useMemo(()=>({...h,...r,refs:y,elements:v,nodeId:t}),[h,y,v,t,r]);return We(()=>{r.dataRef.current.floatingContext=w;const g=d==null?void 0:d.nodesRef.current.find(T=>T.id===t);g&&(g.context=w)}),M.useMemo(()=>({...h,context:w,refs:y,elements:v}),[h,y,v,w])}function Jw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:s,elements:i}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=M.useRef(!1),u=M.useRef(),f=M.useRef(!0);M.useEffect(()=>{if(!a)return;const h=Vt(i.domReference);function p(){!n&&st(i.domReference)&&i.domReference===tn(mt(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return h.addEventListener("blur",p),h.addEventListener("keydown",m,!0),()=>{h.removeEventListener("blur",p),h.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),M.useEffect(()=>{if(!a)return;function h(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),M.useEffect(()=>()=>{clearTimeout(u.current)},[]);const d=M.useMemo(()=>({onPointerDown(h){Xa(h.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const p=Wn(h.nativeEvent);if(l&&Re(p))try{if(Qa()&&qf())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!tl(p))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const p=h.relatedTarget,m=h.nativeEvent,y=Re(p)&&p.hasAttribute(Yn("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const w=tn(i.domReference?i.domReference.ownerDocument:document);!p&&w===i.domReference||pt((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,w)||pt(i.domReference,w)||y||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return M.useMemo(()=>a?{reference:d}:{},[a,d])}const jd="active",Bd="selected";function wl(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[jd]:i,[Bd]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...t.map(i=>{const a=i?i[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[jd,Bd].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var d,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(d=r.get(c))==null?void 0:d.map(y=>y(...p)).find(y=>y!==void 0)}}}else i[c]=u}),i),{})}}function bi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>wl(a,e,"reference"),t),s=M.useCallback(a=>wl(a,e,"floating"),n),i=M.useCallback(a=>wl(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let zd=!1;function wi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Wd(e,t){return wi(t,e===dl||e===qo,e===Gr||e===Yr)}function xl(e,t,n){return wi(t,e===qo,n?e===Gr:e===Yr)||e==="Enter"||e===" "||e===""}function ex(e,t,n){return wi(t,n?e===Gr:e===Yr,e===qo)}function Hd(e,t,n){return wi(t,n?e===Yr:e===Gr,e===dl)}function tx(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:s,activeIndex:i,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:d=!1,rtl:h=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:v=!0,disabledIndices:w=void 0,orientation:g="vertical",cols:T=1,scrollItemIntoView:x=!0,virtualItemRef:E,itemSizes:C,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||fi("`useListNavigation` looping must be enabled to allow escaping."),p||fi("`useListNavigation` must be virtual to allow escaping.")),g==="vertical"&&T>1&&fi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=di(),N=Qo(),L=Ut(a),_=M.useRef(m),j=M.useRef(c??-1),D=M.useRef(null),k=M.useRef(!0),F=M.useRef(L),$=M.useRef(!!o.floating),z=M.useRef(n),q=M.useRef(!1),P=M.useRef(!1),V=Dt(w),Q=Dt(n),ie=Dt(x),ee=Dt(o.floating),H=Dt(c),[A,R]=M.useState(),[W,Y]=M.useState(),Z=Ut(function(ue,Ee,le){le===void 0&&(le=!1);function Oe(ke){p?(R(ke.id),N==null||N.events.emit("virtualfocus",ke),E&&(E.current=ke)):Gn(ke,{preventScroll:!0,sync:qf()&&Qa()?zd||q.current:!1})}const ut=ue.current[Ee.current];ut&&Oe(ut),requestAnimationFrame(()=>{const ke=ue.current[Ee.current]||ut;if(!ke)return;ut||Oe(ke);const ft=ie.current;ft&&B&&(le||!k.current)&&(ke.scrollIntoView==null||ke.scrollIntoView(typeof ft=="boolean"?{block:"nearest",inline:"nearest"}:ft))})});We(()=>{document.createElement("div").focus({get preventScroll(){return zd=!0,!1}})},[]),We(()=>{l&&(n&&o.floating?_.current&&c!=null&&(P.current=!0,j.current=c,L(c)):$.current&&(j.current=-1,F.current(null)))},[l,n,o.floating,c,L]),We(()=>{if(l&&n&&o.floating)if(i==null){if(q.current=!1,H.current!=null)return;if($.current&&(j.current=-1,Z(s,j)),(!z.current||!$.current)&&_.current&&(D.current!=null||_.current===!0&&D.current==null)){let ue=0;const Ee=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(Ee),ue++):(j.current=D.current==null||xl(D.current,g,h)||d?hl(s,V.current):bd(s,V.current),D.current=null,L(j.current))};Ee()}}else Ko(s,i)||(j.current=i,Z(s,j,P.current),P.current=!1)},[l,n,o.floating,i,H,d,s,g,h,L,Z,V]),We(()=>{var ue;if(!l||o.floating||!N||p||!$.current)return;const Ee=N.nodesRef.current,le=(ue=Ee.find(ke=>ke.id===I))==null||(ue=ue.context)==null?void 0:ue.elements.floating,Oe=tn(mt(o.floating)),ut=Ee.some(ke=>ke.context&&pt(ke.context.elements.floating,Oe));le&&!ut&&k.current&&le.focus({preventScroll:!0})},[l,o.floating,N,I,p]),We(()=>{if(!l||!N||!p||I)return;function ue(Ee){Y(Ee.id),E&&(E.current=Ee)}return N.events.on("virtualfocus",ue),()=>{N.events.off("virtualfocus",ue)}},[l,N,p,I,E]),We(()=>{F.current=L,$.current=!!o.floating}),We(()=>{n||(D.current=null)},[n]),We(()=>{z.current=n},[n]);const de=i!=null,B=M.useMemo(()=>{function ue(le){if(!n)return;const Oe=s.current.indexOf(le);Oe!==-1&&L(Oe)}return{onFocus(le){let{currentTarget:Oe}=le;ue(Oe)},onClick:le=>{let{currentTarget:Oe}=le;return Oe.focus({preventScroll:!0})},...y&&{onMouseMove(le){let{currentTarget:Oe}=le;ue(Oe)},onPointerLeave(le){let{pointerType:Oe}=le;!k.current||Oe==="touch"||(j.current=-1,Z(s,j),L(null),p||Gn(ee.current,{preventScroll:!0}))}}}},[n,ee,Z,y,s,L,p]),Me=Ut(ue=>{if(k.current=!1,q.current=!0,!Q.current&&ue.currentTarget===ee.current)return;if(d&&Hd(ue.key,g,h)){It(ue),r(!1,ue.nativeEvent,"list-navigation"),st(o.domReference)&&!p&&o.domReference.focus();return}const Ee=j.current,le=hl(s,w),Oe=bd(s,w);if(ue.key==="Home"&&(It(ue),j.current=le,L(j.current)),ue.key==="End"&&(It(ue),j.current=Oe,L(j.current)),T>1){const ut=C||Array.from({length:s.current.length},()=>({width:1,height:1})),ke=kw(ut,T,O),ft=ke.findIndex(se=>se!=null&&!ui(s.current,se,w)),X=ke.reduce((se,_e,Ke)=>_e!=null&&!ui(s.current,_e,w)?Ke:se,-1);if(j.current=ke[Ow({current:ke.map(se=>se!=null?s.current[se]:null)},{event:ue,orientation:g,loop:f,cols:T,disabledIndices:Aw([...w||s.current.map((se,_e)=>ui(s.current,_e)?_e:void 0),void 0],ke),minIndex:ft,maxIndex:X,prevIndex:_w(j.current>Oe?le:j.current,ut,ke,T,ue.key===qo?"bl":ue.key===Yr?"tr":"tl"),stopEvent:!0})],L(j.current),g==="both")return}if(Wd(ue.key,g)){if(It(ue),n&&!p&&tn(ue.currentTarget.ownerDocument)===ue.currentTarget){j.current=xl(ue.key,g,h)?le:Oe,L(j.current);return}xl(ue.key,g,h)?f?j.current=Ee>=Oe?u&&Ee!==s.current.length?-1:le:Tt(s,{startingIndex:Ee,disabledIndices:w}):j.current=Math.min(Oe,Tt(s,{startingIndex:Ee,disabledIndices:w})):f?j.current=Ee<=le?u&&Ee!==-1?s.current.length:Oe:Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:w}):j.current=Math.max(le,Tt(s,{startingIndex:Ee,decrement:!0,disabledIndices:w})),Ko(s,j.current)?L(null):L(j.current)}}),rt=M.useMemo(()=>p&&n&&de&&{"aria-activedescendant":W||A},[p,n,de,W,A]),He=M.useMemo(()=>({"aria-orientation":g==="both"?void 0:g,...!Kf(o.domReference)&&rt,onKeyDown:Me,onPointerMove(){k.current=!0}}),[rt,Me,o.domReference,g]),ot=M.useMemo(()=>{function ue(le){m==="auto"&&Yf(le.nativeEvent)&&(_.current=!0)}function Ee(le){_.current=m,m==="auto"&&Xa(le.nativeEvent)&&(_.current=!0)}return{...rt,onKeyDown(le){k.current=!1;const Oe=le.key.indexOf("Arrow")===0,ut=ex(le.key,g,h),ke=Hd(le.key,g,h),ft=Wd(le.key,g),X=(d?ut:ft)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const St=N==null?void 0:N.nodesRef.current.find(Lt=>Lt.parentId==null),At=N&&St?Rw(N.nodesRef.current,St.id):null;if(Oe&&At&&E){const Lt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(ut||ke){var se,_e;const jr=((se=At.context)==null?void 0:se.elements.domReference)===le.currentTarget,Wo=ke&&!jr?(_e=At.context)==null?void 0:_e.elements.domReference:ut?s.current.find(Ho=>(Ho==null?void 0:Ho.id)===A):null;Wo&&(It(le),Wo.dispatchEvent(Lt),Y(void 0))}if(ft&&At.context&&At.context.open&&At.parentId&&le.currentTarget!==At.context.elements.domReference){var Ke;It(le),(Ke=At.context.elements.domReference)==null||Ke.dispatchEvent(Lt);return}}return Me(le)}if(!(!n&&!v&&Oe)){if(X&&(D.current=d&&ft?null:le.key),d){ut&&(It(le),n?(j.current=hl(s,V.current),L(j.current)):r(!0,le.nativeEvent,"list-navigation"));return}ft&&(c!=null&&(j.current=c),It(le),!n&&v?r(!0,le.nativeEvent,"list-navigation"):Me(le),n&&L(j.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:Ee,onMouseDown:ue,onClick:ue}},[A,rt,Me,V,m,s,d,L,r,n,v,g,h,c,N,p,E]);return M.useMemo(()=>l?{reference:ot,floating:He,item:B}:{},[l,ot,He,B])}const nx=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function xi(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=nx.get(i))!=null?n:i,l=Zo(),u=di()!=null,f=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,i]),d=M.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),h=M.useCallback(p=>{let{active:m,selected:y}=p;const v={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...v,"aria-selected":m&&y};case"combobox":return{...v,...m&&{"aria-selected":!0}}}return{}},[o,i]);return M.useMemo(()=>s?{reference:f,floating:d,item:h}:{},[s,f,d,h])}const Ud=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Qr(e,t){return typeof e=="function"?e(t):e}function rx(e,t){const[n,r]=M.useState(e);return e&&!n&&r(!0),M.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function ox(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=(typeof o=="number"?o:o.close)||0,[a,l]=M.useState("unmounted"),c=rx(n,i);return!c&&a==="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:a}}function sx(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:s,duration:i=250}=t,a=e.placement,l=a.split("-")[0],c=M.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",f=(u?i:i.open)||0,d=(u?i:i.close)||0,[h,p]=M.useState(()=>({...Qr(s,c),...Qr(n,c)})),{isMounted:m,status:y}=ox(e,{duration:i}),v=Dt(n),w=Dt(r),g=Dt(o),T=Dt(s);return We(()=>{const x=Qr(v.current,c),E=Qr(g.current,c),C=Qr(T.current,c),O=Qr(w.current,c)||Object.keys(x).reduce((I,N)=>(I[N]="",I),{});if(y==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...C,...x})),y==="open"&&p({transitionProperty:Object.keys(O).map(Ud).join(","),transitionDuration:f+"ms",...C,...O}),y==="close"){const I=E||x;p({transitionProperty:Object.keys(I).map(Ud).join(","),transitionDuration:d+"ms",...C,...I})}},[d,g,v,w,T,f,y,c]),{isMounted:m,styles:h}}class Si{static getDescendantProperty(t,n,r=[]){let o,s,i,a,l,c;if(n){if(i=n.indexOf("."),i===-1?o=n:(o=n.slice(0,i),s=n.slice(i+1)),a=t[o],a!==null&&typeof a<"u")if(!s&&(typeof a=="string"||typeof a=="number"))r.push(a);else if(Object.prototype.toString.call(a)==="[object Array]")for(l=0,c=a.length;l<c;l++)Si.getDescendantProperty(a[l],s,r);else s&&Si.getDescendantProperty(a,s,r)}else r.push(t);return r}}class Jr{constructor(t=[],n=[],r={}){Array.isArray(n)||(r=n,n=[]),this.haystack=t,this.keys=n,this.options=Object.assign({caseSensitive:!1,sort:!1},r)}search(t=""){if(t==="")return this.haystack;const n=[];for(let r=0;r<this.haystack.length;r++){const o=this.haystack[r];if(this.keys.length===0){const s=Jr.isMatch(o,t,this.options.caseSensitive);s&&n.push({item:o,score:s})}else for(let s=0;s<this.keys.length;s++){const i=Si.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=Jr.isMatch(i[l],t,this.options.caseSensitive);if(c){a=!0,n.push({item:o,score:c});break}}if(a)break}}return this.options.sort&&n.sort((r,o)=>r.score-o.score),n.map(r=>r.item)}static isMatch(t,n,r){t=String(t),n=String(n),r||(t=t.toLocaleLowerCase(),n=n.toLocaleLowerCase());const o=Jr.nearestIndexesFor(t,n);return o?t===n?1:o.length>1?2+(o[o.length-1]-o[0]):2+o[0]:!1}static nearestIndexesFor(t,n){const r=n.split("");let o=[];return Jr.indexesOfFirstLetter(t,n).forEach((i,a)=>{let l=i+1;o[a]=[i];for(let c=1;c<r.length;c++){const u=r[c];if(l=t.indexOf(u,l),l===-1){o[a]=!1;break}o[a].push(l),l++}}),o=o.filter(i=>i!==!1),o.length?o.sort((i,a)=>i.length===1?i[0]-a[0]:(i=i[i.length-1]-i[0],a=a[a.length-1]-a[0],i-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,s)=>o!==r?!1:s).filter(o=>o!==!1)}}/**
|
|
5
5
|
* @license lucide-react v0.414.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/const
|
|
9
|
+
*/const ix=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gd=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
10
10
|
* @license lucide-react v0.414.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/var
|
|
14
|
+
*/var ax={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
15
15
|
* @license lucide-react v0.414.0 - ISC
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/const
|
|
19
|
+
*/const lx=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>b.createElement("svg",{ref:l,...ax,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Gd("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
20
20
|
* @license lucide-react v0.414.0 - ISC
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/const Et=(e,t)=>{const n=
|
|
24
|
+
*/const Et=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(lx,{ref:s,iconNode:t,className:Gd(`lucide-${ix(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
25
25
|
* @license lucide-react v0.414.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const
|
|
29
|
+
*/const Yd=Et("ArrowUpNarrowWide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]);/**
|
|
30
30
|
* @license lucide-react v0.414.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/const
|
|
34
|
+
*/const cx=Et("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
35
35
|
* @license lucide-react v0.414.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const
|
|
39
|
+
*/const Sl=Et("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
40
40
|
* @license lucide-react v0.414.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
44
|
+
*/const ux=Et("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
45
45
|
* @license lucide-react v0.414.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
49
|
+
*/const qd=Et("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
50
50
|
* @license lucide-react v0.414.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const fx=Et("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
55
55
|
* @license lucide-react v0.414.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const dx=Et("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
60
60
|
* @license lucide-react v0.414.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const hx=Et("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
65
65
|
* @license lucide-react v0.414.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const px=Et("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
70
70
|
* @license lucide-react v0.414.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const mx=Et("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
75
75
|
* @license lucide-react v0.414.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const gx=Et("Group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]);/**
|
|
80
80
|
* @license lucide-react v0.414.0 - ISC
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
84
|
+
*/const Tl=Et("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
85
85
|
* @license lucide-react v0.414.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const
|
|
89
|
+
*/const Kd=Et("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
90
90
|
* @license lucide-react v0.414.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
@@ -96,38 +96,38 @@
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const yx=Et("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
100
100
|
* @license lucide-react v0.414.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const bx=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xd=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current};function Qd(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=Qd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Qd(e))&&(r&&(r+=" "),r+=t);return r}var Jd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xx(e){if(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 Sx=Error,Tx=EvalError,Ex=RangeError,Cx=ReferenceError,th=SyntaxError,es=TypeError,Px=URIError,Ox=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(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},nh=typeof Symbol<"u"&&Symbol,kx=Ox,_x=function(){return typeof nh!="function"||typeof Symbol!="function"||typeof nh("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:kx()},Cl={__proto__:null,foo:{}},Ax=Object,Ix=function(){return{__proto__:Cl}.foo===Cl.foo&&!(Cl instanceof Ax)},Dx="Function.prototype.bind called on incompatible ",Mx=Object.prototype.toString,Nx=Math.max,Fx="[object Function]",rh=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},Lx=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Vx=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Rx=function(t){var n=this;if(typeof n!="function"||Mx.apply(n)!==Fx)throw new TypeError(Dx+n);for(var r=Lx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,rh(r,arguments));return Object(u)===u?u:this}return n.apply(t,rh(r,arguments))},i=Nx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Vx(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},$x=Rx,Pl=Function.prototype.bind||$x,jx=Function.prototype.call,Bx=Object.prototype.hasOwnProperty,Wx=Pl,zx=Wx.call(jx,Bx),Se,Hx=Sx,Ux=Tx,Gx=Ex,Yx=Cx,to=th,no=es,qx=Px,oh=Function,Ol=function(e){try{return oh('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var kl=function(){throw new no},Kx=yr?function(){try{return arguments.callee,kl}catch{try{return yr(arguments,"callee").get}catch{return kl}}}():kl,ro=_x(),Zx=Ix(),gt=Object.getPrototypeOf||(Zx?function(e){return e.__proto__}:null),oo={},Xx=typeof Uint8Array>"u"||!gt?Se:gt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":ro&>?gt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":oo,"%AsyncGenerator%":oo,"%AsyncGeneratorFunction%":oo,"%AsyncIteratorPrototype%":oo,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Hx,"%eval%":eval,"%EvalError%":Ux,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":oh,"%GeneratorFunction%":oo,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ro&>?gt(gt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ro||!gt?Se:gt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Gx,"%ReferenceError%":Yx,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ro||!gt?Se:gt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ro&>?gt(""[Symbol.iterator]()):Se,"%Symbol%":ro?Symbol:Se,"%SyntaxError%":to,"%ThrowTypeError%":Kx,"%TypedArray%":Xx,"%TypeError%":no,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":qx,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(gt)try{null.error}catch(e){var Qx=gt(gt(e));vr["%Error.prototype%"]=Qx}var Jx=function e(t){var n;if(t==="%AsyncFunction%")n=Ol("async function () {}");else if(t==="%GeneratorFunction%")n=Ol("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Ol("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&>&&(n=gt(o.prototype))}return vr[t]=n,n},sh={__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"]},ts=Pl,Ti=zx,eS=ts.call(Function.call,Array.prototype.concat),tS=ts.call(Function.apply,Array.prototype.splice),ih=ts.call(Function.call,String.prototype.replace),Ei=ts.call(Function.call,String.prototype.slice),nS=ts.call(Function.call,RegExp.prototype.exec),rS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oS=/\\(\\)?/g,sS=function(t){var n=Ei(t,0,1),r=Ei(t,-1);if(n==="%"&&r!=="%")throw new to("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new to("invalid intrinsic syntax, expected opening `%`");var o=[];return ih(t,rS,function(s,i,a,l){o[o.length]=a?ih(l,oS,"$1"):i||s}),o},iS=function(t,n){var r=t,o;if(Ti(sh,r)&&(o=sh[r],r="%"+o[0]+"%"),Ti(vr,r)){var s=vr[r];if(s===oo&&(s=Jx(r)),typeof s>"u"&&!n)throw new no("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new to("intrinsic "+t+" does not exist!")},so=function(t,n){if(typeof t!="string"||t.length===0)throw new no("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new no('"allowMissing" argument must be a boolean');if(nS(/^%?[^%]*%?$/,t)===null)throw new to("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=sS(t),o=r.length>0?r[0]:"",s=iS("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],tS(r,eS([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Ei(d,0,1),p=Ei(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new to("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,i="%"+o+"%",Ti(vr,i))a=vr[i];else if(a!=null){if(!(d in a)){if(!n)throw new no("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ti(a,d),a=a[d];f&&!l&&(vr[i]=a)}}return a},ah={exports:{}},_l,lh;function Al(){if(lh)return _l;lh=1;var e=so,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return _l=t,_l}var aS=so,Ci=aS("%Object.getOwnPropertyDescriptor%",!0);if(Ci)try{Ci([],"length")}catch{Ci=null}var ch=Ci,uh=Al(),lS=th,io=es,fh=ch,cS=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!fh&&fh(t,n);if(uh)uh(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new lS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Il=Al(),dh=function(){return!!Il};dh.hasArrayLengthDefineBug=function(){if(!Il)return null;try{return Il([],"length",{value:1}).length!==1}catch{return!0}};var uS=dh,fS=so,hh=cS,dS=uS(),ph=ch,mh=es,hS=fS("%Math.floor%"),pS=function(t,n){if(typeof t!="function")throw new mh("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||hS(n)!==n)throw new mh("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&ph){var i=ph(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(dS?hh(t,"length",n,!0,!0):hh(t,"length",n)),t};(function(e){var t=Pl,n=so,r=pS,o=es,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=Al(),c=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(ah);var mS=ah.exports,gh=so,yh=mS,gS=yh(gh("String.prototype.indexOf")),yS=function(t,n){var r=gh(t,!!n);return typeof r=="function"&&gS(t,".prototype.")>-1?yh(r):r};const vS=xx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Dl=typeof Map=="function"&&Map.prototype,Ml=Object.getOwnPropertyDescriptor&&Dl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pi=Dl&&Ml&&typeof Ml.get=="function"?Ml.get:null,vh=Dl&&Map.prototype.forEach,Nl=typeof Set=="function"&&Set.prototype,Fl=Object.getOwnPropertyDescriptor&&Nl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Oi=Nl&&Fl&&typeof Fl.get=="function"?Fl.get:null,bh=Nl&&Set.prototype.forEach,bS=typeof WeakMap=="function"&&WeakMap.prototype,ns=bS?WeakMap.prototype.has:null,wS=typeof WeakSet=="function"&&WeakSet.prototype,rs=wS?WeakSet.prototype.has:null,xS=typeof WeakRef=="function"&&WeakRef.prototype,wh=xS?WeakRef.prototype.deref:null,SS=Boolean.prototype.valueOf,TS=Object.prototype.toString,ES=Function.prototype.toString,CS=String.prototype.match,Ll=String.prototype.slice,qn=String.prototype.replace,PS=String.prototype.toUpperCase,xh=String.prototype.toLowerCase,Sh=RegExp.prototype.test,Th=Array.prototype.concat,un=Array.prototype.join,OS=Array.prototype.slice,Eh=Math.floor,Vl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Rl=Object.getOwnPropertySymbols,$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ao=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ct=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ao||!0)?Symbol.toStringTag:null,Ch=Object.prototype.propertyIsEnumerable,Ph=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Oh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Sh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Eh(-e):Eh(e);if(r!==e){var o=String(r),s=Ll.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var jl=vS,kh=jl.custom,_h=Dh(kh)?kh:null,kS=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Kn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Kn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Nh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Oh(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Oh(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Bl(t)?"[Array]":"[Object]";var f=GS(s,r);if(typeof o>"u")o=[];else if(Mh(o,t)>=0)return"[Circular]";function d(j,D,k){if(D&&(o=OS.call(o),o.push(D)),k){var F={depth:s.depth};return Kn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Ih(t)){var h=VS(t),p=ki(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Dh(t)){var m=ao?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):$l.call(t);return typeof t=="object"&&!ao?os(m):m}if(zS(t)){for(var y="<"+xh.call(String(t.nodeName)),v=t.attributes||[],b=0;b<v.length;b++)y+=" "+v[b].name+"="+Ah(_S(v[b].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+xh.call(String(t.nodeName))+">",y}if(Bl(t)){if(t.length===0)return"[]";var g=ki(t,d);return f&&!US(g)?"["+zl(g,f)+"]":"[ "+un.call(g,", ")+" ]"}if(IS(t)){var T=ki(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Ch.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Th.call("[cause]: "+d(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&i){if(_h&&typeof t[_h]=="function"&&jl)return jl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(RS(t)){var x=[];return vh&&vh.call(t,function(j,D){x.push(d(D,t,!0)+" => "+d(j,t))}),Fh("Map",Pi.call(t),x,f)}if(BS(t)){var E=[];return bh&&bh.call(t,function(j){E.push(d(j,t))}),Fh("Set",Oi.call(t),E,f)}if($S(t))return Wl("WeakMap");if(WS(t))return Wl("WeakSet");if(jS(t))return Wl("WeakRef");if(MS(t))return os(d(Number(t)));if(FS(t))return os(d(Vl.call(t)));if(NS(t))return os(SS.call(t));if(DS(t))return os(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Jd<"u"&&t===Jd)return"{ [object globalThis] }";if(!AS(t)&&!Ih(t)){var C=ki(t,d),O=Ph?Ph(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",N=!O&&Ct&&Object(t)===t&&Ct in t?Ll.call(Zn(t),8,-1):I?"Object":"",L=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=L+(N||I?"["+un.call(Th.call([],N||[],I||[]),": ")+"] ":"");return C.length===0?_+"{}":f?_+"{"+zl(C,f)+"}":_+"{ "+un.call(C,", ")+" }"}return String(t)};function Ah(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function _S(e){return qn.call(String(e),/"/g,""")}function Bl(e){return Zn(e)==="[object Array]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function AS(e){return Zn(e)==="[object Date]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ih(e){return Zn(e)==="[object RegExp]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function IS(e){return Zn(e)==="[object Error]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function DS(e){return Zn(e)==="[object String]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function MS(e){return Zn(e)==="[object Number]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function NS(e){return Zn(e)==="[object Boolean]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Dh(e){if(ao)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!$l)return!1;try{return $l.call(e),!0}catch{}return!1}function FS(e){if(!e||typeof e!="object"||!Vl)return!1;try{return Vl.call(e),!0}catch{}return!1}var LS=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return LS.call(e,t)}function Zn(e){return TS.call(e)}function VS(e){if(e.name)return e.name;var t=CS.call(ES.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Mh(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function RS(e){if(!Pi||!e||typeof e!="object")return!1;try{Pi.call(e);try{Oi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function $S(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{rs.call(e,rs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function jS(e){if(!wh||!e||typeof e!="object")return!1;try{return wh.call(e),!0}catch{}return!1}function BS(e){if(!Oi||!e||typeof e!="object")return!1;try{Oi.call(e);try{Pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function WS(e){if(!rs||!e||typeof e!="object")return!1;try{rs.call(e,rs);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function zS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Nh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Nh(Ll.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,HS);return Ah(o,"single",t)}function HS(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+PS.call(t.toString(16))}function os(e){return"Object("+e+")"}function Wl(e){return e+" { ? }"}function Fh(e,t,n,r){var o=r?zl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function US(e){for(var t=0;t<e.length;t++)if(Mh(e[t],`
|
|
105
|
-
`)>=0)return!1;return!0}function
|
|
104
|
+
*/const vx=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zd=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};function Xd(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=Xd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Xd(e))&&(r&&(r+=" "),r+=t);return r}var Qd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wx(e){if(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 xx=Error,Sx=EvalError,Tx=RangeError,Ex=ReferenceError,eh=SyntaxError,es=TypeError,Cx=URIError,Px=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(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==o||i.enumerable!==!0)return!1}return!0},th=typeof Symbol<"u"&&Symbol,Ox=Px,kx=function(){return typeof th!="function"||typeof Symbol!="function"||typeof th("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ox()},El={__proto__:null,foo:{}},_x=Object,Ax=function(){return{__proto__:El}.foo===El.foo&&!(El instanceof _x)},Ix="Function.prototype.bind called on incompatible ",Dx=Object.prototype.toString,Mx=Math.max,Nx="[object Function]",nh=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var s=0;s<n.length;s+=1)r[s+t.length]=n[s];return r},Fx=function(t,n){for(var r=[],o=n,s=0;o<t.length;o+=1,s+=1)r[s]=t[o];return r},Lx=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},Vx=function(t){var n=this;if(typeof n!="function"||Dx.apply(n)!==Nx)throw new TypeError(Ix+n);for(var r=Fx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,nh(r,arguments));return Object(u)===u?u:this}return n.apply(t,nh(r,arguments))},i=Mx(0,n.length-r.length),a=[],l=0;l<i;l++)a[l]="$"+l;if(o=Function("binder","return function ("+Lx(a,",")+"){ return binder.apply(this,arguments); }")(s),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},$x=Vx,Cl=Function.prototype.bind||$x,Rx=Function.prototype.call,jx=Object.prototype.hasOwnProperty,Bx=Cl,zx=Bx.call(Rx,jx),Se,Wx=xx,Hx=Sx,Ux=Tx,Gx=Ex,to=eh,no=es,Yx=Cx,rh=Function,Pl=function(e){try{return rh('"use strict"; return ('+e+").constructor;")()}catch{}},yr=Object.getOwnPropertyDescriptor;if(yr)try{yr({},"")}catch{yr=null}var Ol=function(){throw new no},qx=yr?function(){try{return arguments.callee,Ol}catch{try{return yr(arguments,"callee").get}catch{return Ol}}}():Ol,ro=kx(),Kx=Ax(),gt=Object.getPrototypeOf||(Kx?function(e){return e.__proto__}:null),oo={},Zx=typeof Uint8Array>"u"||!gt?Se:gt(Uint8Array),vr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":ro&>?gt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":oo,"%AsyncGenerator%":oo,"%AsyncGeneratorFunction%":oo,"%AsyncIteratorPrototype%":oo,"%Atomics%":typeof Atomics>"u"?Se:Atomics,"%BigInt%":typeof BigInt>"u"?Se:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Se:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Se:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Se:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Wx,"%eval%":eval,"%EvalError%":Hx,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":rh,"%GeneratorFunction%":oo,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ro&>?gt(gt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ro||!gt?Se:gt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Se:Promise,"%Proxy%":typeof Proxy>"u"?Se:Proxy,"%RangeError%":Ux,"%ReferenceError%":Gx,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ro||!gt?Se:gt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ro&>?gt(""[Symbol.iterator]()):Se,"%Symbol%":ro?Symbol:Se,"%SyntaxError%":to,"%ThrowTypeError%":qx,"%TypedArray%":Zx,"%TypeError%":no,"%Uint8Array%":typeof Uint8Array>"u"?Se:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Se:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Se:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Se:Uint32Array,"%URIError%":Yx,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(gt)try{null.error}catch(e){var Xx=gt(gt(e));vr["%Error.prototype%"]=Xx}var Qx=function e(t){var n;if(t==="%AsyncFunction%")n=Pl("async function () {}");else if(t==="%GeneratorFunction%")n=Pl("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Pl("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&>&&(n=gt(o.prototype))}return vr[t]=n,n},oh={__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"]},ts=Cl,Ti=zx,Jx=ts.call(Function.call,Array.prototype.concat),eS=ts.call(Function.apply,Array.prototype.splice),sh=ts.call(Function.call,String.prototype.replace),Ei=ts.call(Function.call,String.prototype.slice),tS=ts.call(Function.call,RegExp.prototype.exec),nS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rS=/\\(\\)?/g,oS=function(t){var n=Ei(t,0,1),r=Ei(t,-1);if(n==="%"&&r!=="%")throw new to("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new to("invalid intrinsic syntax, expected opening `%`");var o=[];return sh(t,nS,function(s,i,a,l){o[o.length]=a?sh(l,rS,"$1"):i||s}),o},sS=function(t,n){var r=t,o;if(Ti(oh,r)&&(o=oh[r],r="%"+o[0]+"%"),Ti(vr,r)){var s=vr[r];if(s===oo&&(s=Qx(r)),typeof s>"u"&&!n)throw new no("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new to("intrinsic "+t+" does not exist!")},so=function(t,n){if(typeof t!="string"||t.length===0)throw new no("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new no('"allowMissing" argument must be a boolean');if(tS(/^%?[^%]*%?$/,t)===null)throw new to("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=oS(t),o=r.length>0?r[0]:"",s=sS("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],eS(r,Jx([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],h=Ei(d,0,1),p=Ei(d,-1);if((h==='"'||h==="'"||h==="`"||p==='"'||p==="'"||p==="`")&&h!==p)throw new to("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),o+="."+d,i="%"+o+"%",Ti(vr,i))a=vr[i];else if(a!=null){if(!(d in a)){if(!n)throw new no("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&u+1>=r.length){var m=yr(a,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else f=Ti(a,d),a=a[d];f&&!l&&(vr[i]=a)}}return a},ih={exports:{}},kl,ah;function _l(){if(ah)return kl;ah=1;var e=so,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return kl=t,kl}var iS=so,Ci=iS("%Object.getOwnPropertyDescriptor%",!0);if(Ci)try{Ci([],"length")}catch{Ci=null}var lh=Ci,ch=_l(),aS=eh,io=es,uh=lh,lS=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new io("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new io("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new io("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new io("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new io("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new io("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!uh&&uh(t,n);if(ch)ch(t,n,{configurable:i===null&&l?l.configurable:!i,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:s===null&&l?l.writable:!s});else if(a||!o&&!s&&!i)t[n]=r;else throw new aS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Al=_l(),fh=function(){return!!Al};fh.hasArrayLengthDefineBug=function(){if(!Al)return null;try{return Al([],"length",{value:1}).length!==1}catch{return!0}};var cS=fh,uS=so,dh=lS,fS=cS(),hh=lh,ph=es,dS=uS("%Math.floor%"),hS=function(t,n){if(typeof t!="function")throw new ph("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||dS(n)!==n)throw new ph("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&hh){var i=hh(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(fS?dh(t,"length",n,!0,!0):dh(t,"length",n)),t};(function(e){var t=Cl,n=so,r=hS,o=es,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=_l(),c=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new o("a function is required");var h=a(t,i,arguments);return r(h,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(ih);var pS=ih.exports,mh=so,gh=pS,mS=gh(mh("String.prototype.indexOf")),gS=function(t,n){var r=mh(t,!!n);return typeof r=="function"&&mS(t,".prototype.")>-1?gh(r):r};const yS=wx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Il=typeof Map=="function"&&Map.prototype,Dl=Object.getOwnPropertyDescriptor&&Il?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pi=Il&&Dl&&typeof Dl.get=="function"?Dl.get:null,yh=Il&&Map.prototype.forEach,Ml=typeof Set=="function"&&Set.prototype,Nl=Object.getOwnPropertyDescriptor&&Ml?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Oi=Ml&&Nl&&typeof Nl.get=="function"?Nl.get:null,vh=Ml&&Set.prototype.forEach,vS=typeof WeakMap=="function"&&WeakMap.prototype,ns=vS?WeakMap.prototype.has:null,bS=typeof WeakSet=="function"&&WeakSet.prototype,rs=bS?WeakSet.prototype.has:null,wS=typeof WeakRef=="function"&&WeakRef.prototype,bh=wS?WeakRef.prototype.deref:null,xS=Boolean.prototype.valueOf,SS=Object.prototype.toString,TS=Function.prototype.toString,ES=String.prototype.match,Fl=String.prototype.slice,qn=String.prototype.replace,CS=String.prototype.toUpperCase,wh=String.prototype.toLowerCase,xh=RegExp.prototype.test,Sh=Array.prototype.concat,un=Array.prototype.join,PS=Array.prototype.slice,Th=Math.floor,Ll=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Vl=Object.getOwnPropertySymbols,$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ao=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ct=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ao||!0)?Symbol.toStringTag:null,Eh=Object.prototype.propertyIsEnumerable,Ch=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Ph(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||xh.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Th(-e):Th(e);if(r!==e){var o=String(r),s=Fl.call(t,o.length+1);return qn.call(o,n,"$&_")+"."+qn.call(qn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return qn.call(t,n,"$&_")}var Rl=yS,Oh=Rl.custom,kh=Ih(Oh)?Oh:null,OS=function e(t,n,r,o){var s=n||{};if(Kn(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Kn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=Kn(s,"customInspect")?s.customInspect:!0;if(typeof i!="boolean"&&i!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Kn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Kn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Mh(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Ph(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Ph(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return jl(t)?"[Array]":"[Object]";var f=US(s,r);if(typeof o>"u")o=[];else if(Dh(o,t)>=0)return"[Circular]";function d(j,D,k){if(D&&(o=PS.call(o),o.push(D)),k){var F={depth:s.depth};return Kn(s,"quoteStyle")&&(F.quoteStyle=s.quoteStyle),e(j,F,r+1,o)}return e(j,s,r+1,o)}if(typeof t=="function"&&!Ah(t)){var h=LS(t),p=ki(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+un.call(p,", ")+" }":"")}if(Ih(t)){var m=ao?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):$l.call(t);return typeof t=="object"&&!ao?os(m):m}if(zS(t)){for(var y="<"+wh.call(String(t.nodeName)),v=t.attributes||[],w=0;w<v.length;w++)y+=" "+v[w].name+"="+_h(kS(v[w].value),"double",s);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+wh.call(String(t.nodeName))+">",y}if(jl(t)){if(t.length===0)return"[]";var g=ki(t,d);return f&&!HS(g)?"["+zl(g,f)+"]":"[ "+un.call(g,", ")+" ]"}if(AS(t)){var T=ki(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Eh.call(t,"cause")?"{ ["+String(t)+"] "+un.call(Sh.call("[cause]: "+d(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+un.call(T,", ")+" }"}if(typeof t=="object"&&i){if(kh&&typeof t[kh]=="function"&&Rl)return Rl(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(VS(t)){var x=[];return yh&&yh.call(t,function(j,D){x.push(d(D,t,!0)+" => "+d(j,t))}),Nh("Map",Pi.call(t),x,f)}if(jS(t)){var E=[];return vh&&vh.call(t,function(j){E.push(d(j,t))}),Nh("Set",Oi.call(t),E,f)}if($S(t))return Bl("WeakMap");if(BS(t))return Bl("WeakSet");if(RS(t))return Bl("WeakRef");if(DS(t))return os(d(Number(t)));if(NS(t))return os(d(Ll.call(t)));if(MS(t))return os(xS.call(t));if(IS(t))return os(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Qd<"u"&&t===Qd)return"{ [object globalThis] }";if(!_S(t)&&!Ah(t)){var C=ki(t,d),O=Ch?Ch(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",N=!O&&Ct&&Object(t)===t&&Ct in t?Fl.call(Zn(t),8,-1):I?"Object":"",L=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",_=L+(N||I?"["+un.call(Sh.call([],N||[],I||[]),": ")+"] ":"");return C.length===0?_+"{}":f?_+"{"+zl(C,f)+"}":_+"{ "+un.call(C,", ")+" }"}return String(t)};function _h(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function kS(e){return qn.call(String(e),/"/g,""")}function jl(e){return Zn(e)==="[object Array]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function _S(e){return Zn(e)==="[object Date]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ah(e){return Zn(e)==="[object RegExp]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function AS(e){return Zn(e)==="[object Error]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function IS(e){return Zn(e)==="[object String]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function DS(e){return Zn(e)==="[object Number]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function MS(e){return Zn(e)==="[object Boolean]"&&(!Ct||!(typeof e=="object"&&Ct in e))}function Ih(e){if(ao)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!$l)return!1;try{return $l.call(e),!0}catch{}return!1}function NS(e){if(!e||typeof e!="object"||!Ll)return!1;try{return Ll.call(e),!0}catch{}return!1}var FS=Object.prototype.hasOwnProperty||function(e){return e in this};function Kn(e,t){return FS.call(e,t)}function Zn(e){return SS.call(e)}function LS(e){if(e.name)return e.name;var t=ES.call(TS.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Dh(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function VS(e){if(!Pi||!e||typeof e!="object")return!1;try{Pi.call(e);try{Oi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function $S(e){if(!ns||!e||typeof e!="object")return!1;try{ns.call(e,ns);try{rs.call(e,rs)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function RS(e){if(!bh||!e||typeof e!="object")return!1;try{return bh.call(e),!0}catch{}return!1}function jS(e){if(!Oi||!e||typeof e!="object")return!1;try{Oi.call(e);try{Pi.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function BS(e){if(!rs||!e||typeof e!="object")return!1;try{rs.call(e,rs);try{ns.call(e,ns)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function zS(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Mh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Mh(Fl.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WS);return _h(o,"single",t)}function WS(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+CS.call(t.toString(16))}function os(e){return"Object("+e+")"}function Bl(e){return e+" { ? }"}function Nh(e,t,n,r){var o=r?zl(n,r):un.call(n,", ");return e+" ("+t+") {"+o+"}"}function HS(e){for(var t=0;t<e.length;t++)if(Dh(e[t],`
|
|
105
|
+
`)>=0)return!1;return!0}function US(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=un.call(Array(e.indent+1)," ");else return null;return{base:n,prev:un.call(Array(t+1),n)}}function zl(e,t){if(e.length===0)return"";var n=`
|
|
106
106
|
`+t.prev+t.base;return n+un.call(e,","+n)+`
|
|
107
|
-
`+t.prev}function ki(e,t){var n=Bl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof Rl=="function"?Rl(e):[],i;if(ao){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||ao&&i["$"+l]instanceof Symbol||(Sh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Rl=="function")for(var c=0;c<s.length;c++)Ch.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Lh=so,lo=yS,YS=kS,qS=es,_i=Lh("%WeakMap%",!0),Ai=Lh("%Map%",!0),KS=lo("WeakMap.prototype.get",!0),ZS=lo("WeakMap.prototype.set",!0),XS=lo("WeakMap.prototype.has",!0),QS=lo("Map.prototype.get",!0),JS=lo("Map.prototype.set",!0),eT=lo("Map.prototype.has",!0),Hl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},tT=function(e,t){var n=Hl(e,t);return n&&n.value},nT=function(e,t,n){var r=Hl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},rT=function(e,t){return!!Hl(e,t)},oT=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new qS("Side channel does not contain "+YS(s))},get:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return KS(t,s)}else if(Ai){if(n)return QS(n,s)}else if(r)return tT(r,s)},has:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return XS(t,s)}else if(Ai){if(n)return eT(n,s)}else if(r)return rT(r,s);return!1},set:function(s,i){_i&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new _i),ZS(t,s,i)):Ai?(n||(n=new Ai),JS(n,s,i)):(r||(r={key:{},next:null}),nT(r,s,i))}};return o},sT=String.prototype.replace,iT=/%20/g,Ul={RFC1738:"RFC1738",RFC3986:"RFC3986"},Vh={default:Ul.RFC3986,formatters:{RFC1738:function(e){return sT.call(e,iT,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ul.RFC1738,RFC3986:Ul.RFC3986},aT=Vh,Gl=Object.prototype.hasOwnProperty,br=Array.isArray,fn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),lT=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Rh=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},cT=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Gl.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=Rh(t,r)),br(t)&&br(n)?(n.forEach(function(s,i){if(Gl.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Gl.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},uT=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},fT=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},dT=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===aT.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+fn[c];continue}if(c<2048){a=a+(fn[192|c>>6]+fn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(fn[224|c>>12]+fn[128|c>>6&63]+fn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=fn[240|c>>18]+fn[128|c>>12&63]+fn[128|c>>6&63]+fn[128|c&63]}return a},hT=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return lT(n),t},pT=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},mT=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},gT=function(t,n){return[].concat(t,n)},yT=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},$h={arrayToObject:Rh,assign:uT,combine:gT,compact:hT,decode:fT,encode:dT,isBuffer:mT,isRegExp:pT,maybeMap:yT,merge:cT},vT=$h,jh=Vh,bT=Date.prototype.toISOString,Bh=jh.default;vT.encode,jh.formatters[Bh];var wT=$h;wT.decode;var Ii=(e,t,n)=>n?Math.min(e,t)===e?t:Math.max(e,n)===e?n:e:Math.max(e,t)===t?e:t,Wh=e=>Array.isArray(e),Yl=e=>e===void 0,ql=e=>e===null,xT=Function.bind.call(Function.call,Object.prototype.toString),ST=e=>!!e&&xT(e)==="[object Error]"||e instanceof Error,zh=(e,t)=>e instanceof t,TT=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},ET=e=>Object.prototype.toString.call(e)==="[object Date]"&&zh(e,Date),kn={array:Wh,date:ET,empty:e=>ql(e)||Yl(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:zh,isError:ST,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ql(e)||Yl(e),null:ql,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Wh(e)&&typeof e=="object",primitive:TT,string:e=>typeof e=="string",undefined:Yl},Kl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=Kl(s?[]:{},o,n)}else e[r]=Kl(e[r],o,n)}else e[r]=n;return e},CT=e=>Object.keys(e),PT=e=>e.replace("[",".").replace("]","").split("."),Hh=(e,t,n)=>{const r=Array.isArray(t)?t:PT(t),o=structuredClone(e);return Kl(o,r,n),o};const Zl="-";function OT(e){const t=_T(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Zl);return a[0]===""&&a.length!==1&&a.shift(),Uh(a,t)||kT(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Uh(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Uh(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Zl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Gh=/^\[(.+)\]$/;function kT(e){if(Gh.test(e)){const t=Gh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function _T(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return IT(Object.entries(e.classGroups),n).forEach(([s,i])=>{Xl(i,r,s,t)}),r}function Xl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Yh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(AT(o)){Xl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Xl(i,Yh(t,s),n,r)})})}function Yh(e,t){let n=e;return t.split(Zl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function AT(e){return e.isThemeGetter}function IT(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function DT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const qh="!";function MT(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){f=y;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(qh),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function NT(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function FT(e){return{cache:DT(e.cacheSize),parseClassName:MT(e),...OT(e)}}const LT=/\s+/;function VT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(LT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:i};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:i};f=!1}const h=NT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+qh:h,classGroupId:d,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function RT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kh(t))&&(r&&(r+=" "),r+=n);return r}function Kh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Kh(e[r]))&&(n&&(n+=" "),n+=t);return n}function $T(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=FT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=VT(l,n);return o(l,u),u}return function(){return s(RT.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Zh=/^\[(?:([a-z-]+):)?(.+)\]$/i,jT=/^\d+\/\d+$/,BT=new Set(["px","full","screen"]),WT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\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$/,HT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,UT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return wr(e)||BT.has(e)||jT.test(e)}function Xn(e){return co(e,"length",e1)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function Di(e){return co(e,"number",wr)}function ss(e){return!!e&&Number.isInteger(Number(e))}function YT(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return Zh.test(e)}function Qn(e){return WT.test(e)}const qT=new Set(["length","size","percentage"]);function KT(e){return co(e,qT,Xh)}function ZT(e){return co(e,"position",Xh)}const XT=new Set(["image","url"]);function QT(e){return co(e,XT,n1)}function JT(e){return co(e,"",t1)}function is(){return!0}function co(e,t,n){const r=Zh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function e1(e){return zT.test(e)&&!HT.test(e)}function Xh(){return!1}function t1(e){return UT.test(e)}function n1(e){return GT.test(e)}function r1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),f=Ue("invert"),d=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),y=Ue("margin"),v=Ue("opacity"),b=Ue("padding"),g=Ue("saturate"),T=Ue("scale"),x=Ue("sepia"),E=Ue("skew"),C=Ue("space"),O=Ue("translate"),I=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],_=()=>[ve,t],j=()=>["",_n,Xn],D=()=>["auto",wr,ve],k=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[wr,Di],Q=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[is],spacing:[_n,Xn],blur:["none","",Qn,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",Qn,ve],borderSpacing:_(),borderWidth:j(),contrast:V(),grayscale:q(),hueRotate:Q(),invert:q(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[YT,Xn],inset:L(),margin:L(),opacity:V(),padding:_(),saturate:V(),scale:V(),sepia:q(),skew:Q(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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"],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:[...k(),ve]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ss,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",ss,ve]}],"grid-cols":[{"grid-cols":[is]}],"col-start-end":[{col:["auto",{span:["full",ss,ve]},ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[is]}],"row-start-end":[{row:["auto",{span:[ss,ve]},ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Di]}],"font-family":[{font:[is]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,Di]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Xn]}],"underline-offset":[{"underline-offset":["auto",_n,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),ZT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",KT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},QT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...F()]}],"outline-offset":[{"outline-offset":[_n,ve]}],"outline-w":[{outline:[_n,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_n,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,JT]}],"shadow-color":[{shadow:[is]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ss,ve]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Xn,Di]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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"],"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"]}}}const o1=$T(r1),Ql=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},s1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),i1=e=>kn.function(e),Rt=(...e)=>o1(wx(e)),Jl=(e,t)=>{var r;console.log(e,t);const n=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;n==null||n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Qh=({reportStatus:e,hideLeft:t=!1,className:n,children:r,title:o})=>S.jsxs("div",{className:Rt("w-full justify-between",t&&r===null?"hidden":"flex",n),children:[t?null:S.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,e?S.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[S.jsx(hx,{className:"hidden aspect-square h-3 w-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}),S.jsx(px,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),Mi=({optionalText:e="Optional",left:t,rightLabel:n,container:r,right:o,children:s,error:i,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return S.jsxs("fieldset",{"data-error":!!i,form:a,className:Rt("group inline-block w-full",r),children:[S.jsxs("label",{form:a,htmlFor:p,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!d&&!n?S.jsx(Qh,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:e||n?S.jsxs(w.Fragment,{children:[h?null:S.jsx("span",{className:"text-opacity-70",children:e}),n?S.jsx(w.Fragment,{children:n}):null]}):null}):null,S.jsxs("div",{className:"relative group 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-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[t?S.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,s,o?S.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),S.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:i})]})},Jh=w.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>S.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:S.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),a1={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},l1={caseSensitive:!1,sort:!1},c1=[],u1=w.forwardRef(({options:e,required:t=!0,...n},r)=>{const[o,s]=w.useState(!1),[i,a]=w.useState(""),[l,c]=w.useState(n.value??n.defaultValue??""),[u,f]=w.useState(null),d=w.useRef(c1),h=Xd(u),p=new Jr(e,["value"],l1).search(i),{x:m,y,strategy:v,refs:b,context:g}=vi({open:o,transform:!0,onOpenChange:s,whileElementsMounted:fl,middleware:[dl(4),Pw({padding:10,apply(_){Object.assign(_.elements.floating.style,{width:`${_.rects.reference.width}px`,maxHeight:`${Math.min(480,_.availableHeight)}px`})}})]});w.useImperativeHandle(r,()=>{var _;return(_=b.domReference)==null?void 0:_.current},[b]);const T=ix(g,a1),{getReferenceProps:x,getFloatingProps:E,getItemProps:C}=bi([xi(g,{role:"listbox"}),yi(g),nx(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:_=>{const j=p.length-1;if(_===null&&h===0)return f(j);if(_===null&&h===j)return f(0);const D=_??h??null;return D===null?void 0:f(D)}})]),O=_=>{c(_.value),Jl(b.reference.current,_.value),s(!1),a("")},I=_=>{var D;const j=_.target.value;return a(j),!o&&j===""||j?s(!0):(D=n.onChange)==null?void 0:D.call(n,_)},N=()=>{s(!0),a("")},L=()=>{a(""),c(""),Jl(b.reference.current,""),s(!1)};return S.jsxs("fieldset",{className:"relative w-auto",children:[S.jsx(Mi,{...n,required:t,right:S.jsxs("span",{className:"flex items-center gap-0.5",children:[S.jsx(Tl,{size:20}),l?S.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:S.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:S.jsx("input",{...x({...n,onChange:I,onFocus:N,ref:b.setReference,onClick:_=>_.currentTarget.focus(),onKeyDown(_){if(_.key==="Escape")return _.currentTarget.blur(),s(!1);if(_.key==="Enter"){if(u!==null&&p[u])return _.preventDefault(),O(p[u]);if(p.length===1)return _.preventDefault(),O(p[0])}}}),required:t,value:o?i:l,"aria-autocomplete":"list",autoComplete:"off",className:Rt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||i?"pe-12":"",n.left?"ps-8":"",n.className)})}),S.jsx(gi,{preserveTabOrder:!0,children:S.jsx(bl,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:S.jsx("ul",{...E({ref:b.setFloating,style:{position:v,left:m??0,top:y??0,...T.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((_,j)=>w.createElement(Jh,{...C({onClick:()=>O(_),ref:D=>void(d.current[j]=D)}),key:`${_.value}-option`,option:_,selected:u===j,active:l===_.value}))})})})]})});var vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},vt.apply(this,arguments)};function ec(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 tc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var as=function(e){return e.replace(new RegExp(" ","g")," ")},ep=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)},f1=function(e){return e.replace(/^0+([0-9]+)/,"$1")},tp=function(e,t,n){var r=e.length-2,o=f1(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},np=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},rp=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},d1=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},nc=function(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t},h1=function(e){return e==="money"||e==="currency"},p1=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return vt(vt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},rc=function(e,t){var n=ep(np(e),t.fraction.length),r="".concat(t.currency).concat(tp(n,t.group,t.decimal));return as(r)},m1=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=ec(e,["locale","currency","currencyDisplay","mask","onChange"]),u=w.useRef(null);w.useImperativeHandle(t,function(){return u.current});var f=w.useMemo(function(){var p=p1(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),d=function(p){var m=rc(p.target.value,f),y=rp(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?rc(c.defaultValue,f):void 0;return w.createElement("input",vt({},c,{value:typeof c.value=="string"?rc(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),g1=1,y1=function(e){return e==="percentage"||e==="percent"||e==="percentual"},v1=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return vt(vt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},oc=function(e,t){var n=ep(np(e),t.fraction.length),r="".concat(tp(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},b1=w.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=ec(e,["locale","mask","onChange","onKeyUp"]),a=w.useRef(null),l=tc(w.useState(function(){var v,b;return(b=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];w.useImperativeHandle(t,function(){return a.current}),w.useEffect(function(){var v,b=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(oc(b,f))},[i.value]);var f=w.useMemo(function(){var v=v1(r);return v.percentSign=as("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-g1,h=function(v){var b,g=a.current;g&&(g.setSelectionRange(d,d),v&&((b=i.onFocus)===null||b===void 0||b.call(i,v)))},p=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var g=b.selectionStart,T=b.selectionEnd,x=g!==T,E=d<g;!x&&E&&h()}s==null||s(v)},m=function(v){var b=oc(v.target.value,f),g=rp(b);u(b),v.target.value=b,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};w.useEffect(function(){return h()},[c]);var y=i.defaultValue?oc(i.defaultValue,f):void 0;return w.createElement("input",vt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},w1=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Ni[s];i===void 0?r.push(s.replace(ls.dots,"\\.").replace(ls.openParenthesis,"\\(").replace(ls.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ls.leadingBars,"\\")},cs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return sc(o,n);var s=w1(o);return n?"^".concat(s,"$"):s},x1=function(e){return e.replace(ls.escape,"\\$&")},sc=function(e,t){var n=e.map(function(r){return typeof r=="string"?x1(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Ni={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]/}},S1=/\d/,op="(dd) 9dddd-dddd",sp="(dd) dddd-dddd",ip="ddd.ddd.ddd-dd",ap="dd.ddd.ddd/dddd-dd",Fi=function(e){return e.replace(/\D/g,"")},T1=["2",/[0-3]/,":",/[0-5]/,/\d/],E1=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],$t={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:ip,isoDate:"dddd-dd-dd",cnpj:ap,telephone:sp,cellphone:op,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Fi(e).length<=11?ip:ap},int:function(e){return e===void 0&&(e=""),S1.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=Fi(e);return t.length<11?sp:op},time:function(e){var t=Fi(e),n=t[0];return n==="2"?T1:E1}},jt=function(e,t,n){var r;return n===void 0&&(n={}),vt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:cs(e,"",!0),infinity:n.infinity},n)},Pt={cellTelephone:jt($t.cellTelephone,"tel"),cellphone:jt($t.cellphone,"tel"),cep:jt($t.cep,"decimal"),cnpj:jt($t.cnpj,"decimal"),color:jt($t.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:jt($t.cpf,"decimal"),cpfCnpj:jt($t.cpfCnpj,"decimal",{transform:Fi}),creditCard:jt($t.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:jt($t.date,"decimal"),int:jt($t.int,"decimal",{pattern:"[0-9]+"}),isoDate:jt($t.isoDate,"decimal"),telephone:jt($t.telephone,"tel"),time:jt($t.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:jt($t.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function lp(e,t,n,r){var o,s;r===void 0&&(r=Ni);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],d=i[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&s!==void 0?s:d),c+=1,l+=1}return a}var cp=function(e){return e},C1=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(cs(e,n,t));return r.test(n)};function P1(e){var t=w.useRef(e);return w.useEffect(function(){t.current=e},[e]),t.current}var O1=w.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,d=e.as,h=ec(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=w.useRef(null);w.useImperativeHandle(t,function(){return p.current});var m=nc(a),y=nc(f),v=nc(u),b=w.useRef(C1(u,s,h.value||h.defaultValue)),g=d??"input",T=tc(w.useState(""),2),x=T[0],E=T[1],C=P1(x),O=w.useCallback(function(k,F){var R,W,q=(R=k??F)!==null&&R!==void 0?R:"";if(u===void 0)return q;var P=(W=q==null?void 0:q.toString())!==null&&W!==void 0?W:"";return lp(P,typeof u=="function"?u(P):u,i??cp,c??Ni)},[i,u,c]),I=tc(w.useState(function(){return O(h.value,h.defaultValue)}),2),N=I[0],L=I[1],_=O(h.defaultValue,h.defaultValue),j=w.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var k=u(N);return Array.isArray(k)?sc(k,s):cs(u,N,s)}return typeof u=="string"?cs(u,N,s):sc(u,s)},[l,N,s,u]);w.useEffect(function(){if(h.value!==void 0){var k=O(h.value,h.defaultValue);L(k),p.current!==null&&(p.current.value=k)}},[h.value,u,i,h.defaultValue]);var D=function(k){var F,R,W,q,P,V=k.currentTarget,Q=k.target.value;if(v.current===void 0)return L(Q),(F=y.current)===null||F===void 0||F.call(y,Q),(R=m.current)===null||R===void 0||R.call(m,k),f==null?void 0:f(Q);var ie=new RegExp(cs(v.current,Q,s)),ee=(W=V.selectionEnd)!==null&&W!==void 0?W:0,H=function(Z,de,B){if(Z.type!=="number")return Z.setSelectionRange(de,B)};if(r&&b.current&&Q.length>=N.length)return V.value=N,H(V,ee-1,ee-1);var A=!1;Q.length<C.length&&(b.current=!1,A=!0),ie.test(Q)&&(b.current=!0);var $=ee,z=Q[$-1],Y=lp(Q,typeof v.current=="function"?v.current(Q):v.current,i??cp,c??Ni);for(V.value=Y,L(Y);$<Y.length&&Y.charAt($-1)!==z;)$+=1;A?H(V,ee,ee):H(V,$,$),k.target.value=Y,E(Y),(q=y.current)===null||q===void 0||q.call(y,Y),(P=m.current)===null||P===void 0||P.call(m,k)};return w.createElement(g,vt({},h,{ref:p,pattern:j,onChange:D,defaultValue:up(h.defaultValue)?_:void 0,value:up(h.value)?O(h.value,h.value):h.value}))}),up=function(e){return typeof e=="string"},fp=w.forwardRef(function(e,t){return h1(e.mask)?w.createElement(m1,vt({},e,{mask:void 0,ref:t})):y1(e.mask)?w.createElement(b1,vt({},e,{mask:void 0,ref:t})):w.createElement(O1,vt({},e,{ref:t}))}),Bt=function(e){return function(t){return w.createElement(fp,vt({},e,t))}};Bt(Pt.cellTelephone),Bt(Pt.cellphone),Bt(Pt.cep),Bt(Pt.cnpj),Bt(Pt.color),Bt(Pt.cpf),Bt(Pt.cpfCnpj),Bt(Pt.creditCard),Bt(Pt.date),Bt(Pt.int),Bt(Pt.isoDate),Bt(Pt.telephone),Bt(Pt.time),Bt(Pt.uuid);var dp=w.forwardRef(function(t,n){var r=w.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&d1(Pt,t.mask)?Pt[t.mask]:{mask:t.mask}},[t.mask]),o=vt(vt({},t),r);return w.createElement(fp,vt({},o,{ref:n}))});const us=w.forwardRef(({type:e="text",container:t,next:n,rightLabel:r,optionalText:o,hideLeft:s=!1,right:i,left:a,...l},c)=>{const u=l.id??l.name,f=w.useRef(null);return w.useEffect(()=>{if(f.current===null)return;const d=f.current,h=()=>d.setAttribute("data-initialized","true"),p=m=>{const y=m;if(y.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const b=document.getElementById(v);if(b)return b.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),S.jsx(Mi,{...l,right:i,left:a,hideLeft:s,rightLabel:r,optionalText:o,container:Rt("group inline-block w-full",t),children:S.jsx(dp,{...l,type:e,"data-next":n,ref:Ql(c,f),id:u,name:u,className:Rt("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",i?"pe-4":"",a?"ps-4":"",l.className)})})}),xr=w.forwardRef(({container:e,required:t=!0,options:n,...r},o)=>{const s=w.useRef(null),i=r.id??r.name;return w.useEffect(()=>{if(s.current===null)return;const a=s.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),S.jsx(Mi,{...r,required:t,container:Rt("group inline-block w-full",e),right:S.jsx(Tl,{size:20}),children:S.jsxs("select",{...r,ref:Ql(o,s),id:i,name:i,required:t,"data-selected":!!r.value||!1,className:Rt("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[S.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>S.jsx("option",{...a,children:a.label??a.value},`${i}-select-option-${a.value}`))]})})}),k1=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],_1=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],A1=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],I1=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],hp=(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 pp(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?I1:A1:t.binary?_1:k1,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=hp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=hp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var ic={exports:{}},Li={exports:{}},Ne={};/** @license React v16.13.1
|
|
107
|
+
`+t.prev}function ki(e,t){var n=jl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Kn(e,o)?t(e[o],e):""}var s=typeof Vl=="function"?Vl(e):[],i;if(ao){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Kn(e,l)&&(n&&String(Number(l))===l&&l<e.length||ao&&i["$"+l]instanceof Symbol||(xh.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Vl=="function")for(var c=0;c<s.length;c++)Eh.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Fh=so,lo=gS,GS=OS,YS=es,_i=Fh("%WeakMap%",!0),Ai=Fh("%Map%",!0),qS=lo("WeakMap.prototype.get",!0),KS=lo("WeakMap.prototype.set",!0),ZS=lo("WeakMap.prototype.has",!0),XS=lo("Map.prototype.get",!0),QS=lo("Map.prototype.set",!0),JS=lo("Map.prototype.has",!0),Wl=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},eT=function(e,t){var n=Wl(e,t);return n&&n.value},tT=function(e,t,n){var r=Wl(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},nT=function(e,t){return!!Wl(e,t)},rT=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new YS("Side channel does not contain "+GS(s))},get:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return qS(t,s)}else if(Ai){if(n)return XS(n,s)}else if(r)return eT(r,s)},has:function(s){if(_i&&s&&(typeof s=="object"||typeof s=="function")){if(t)return ZS(t,s)}else if(Ai){if(n)return JS(n,s)}else if(r)return nT(r,s);return!1},set:function(s,i){_i&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new _i),KS(t,s,i)):Ai?(n||(n=new Ai),QS(n,s,i)):(r||(r={key:{},next:null}),tT(r,s,i))}};return o},oT=String.prototype.replace,sT=/%20/g,Hl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Lh={default:Hl.RFC3986,formatters:{RFC1738:function(e){return oT.call(e,sT,"+")},RFC3986:function(e){return String(e)}},RFC1738:Hl.RFC1738,RFC3986:Hl.RFC3986},iT=Lh,Ul=Object.prototype.hasOwnProperty,br=Array.isArray,fn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),aT=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(br(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Vh=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},lT=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(br(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ul.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=Vh(t,r)),br(t)&&br(n)?(n.forEach(function(s,i){if(Ul.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return Ul.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},cT=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},uT=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},fT=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;++l){var c=i.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===iT.RFC1738&&(c===40||c===41)){a+=i.charAt(l);continue}if(c<128){a=a+fn[c];continue}if(c<2048){a=a+(fn[192|c>>6]+fn[128|c&63]);continue}if(c<55296||c>=57344){a=a+(fn[224|c>>12]+fn[128|c>>6&63]+fn[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|i.charCodeAt(l)&1023),a+=fn[240|c>>18]+fn[128|c>>12&63]+fn[128|c>>6&63]+fn[128|c&63]}return a},dT=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return aT(n),t},hT=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},pT=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},mT=function(t,n){return[].concat(t,n)},gT=function(t,n){if(br(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},$h={arrayToObject:Vh,assign:cT,combine:mT,compact:dT,decode:uT,encode:fT,isBuffer:pT,isRegExp:hT,maybeMap:gT,merge:lT},yT=$h,Rh=Lh,vT=Date.prototype.toISOString,jh=Rh.default;yT.encode,Rh.formatters[jh];var bT=$h;bT.decode;var Bh=e=>Array.isArray(e),Gl=e=>e===void 0,Yl=e=>e===null,wT=Function.bind.call(Function.call,Object.prototype.toString),xT=e=>!!e&&wT(e)==="[object Error]"||e instanceof Error,zh=(e,t)=>e instanceof t,ST=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},TT=e=>Object.prototype.toString.call(e)==="[object Date]"&&zh(e,Date),kn={array:Bh,date:TT,empty:e=>Yl(e)||Gl(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:zh,isError:xT,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Yl(e)||Gl(e),null:Yl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Bh(e)&&typeof e=="object",primitive:ST,string:e=>typeof e=="string",undefined:Gl},ql=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const s=`${+o[0]}`===o[0];e[r]=s?[]:{}}if(typeof e[r]!="object"){const s=`${+o[0]}`===o[0];e[r]=ql(s?[]:{},o,n)}else e[r]=ql(e[r],o,n)}else e[r]=n;return e},ET=e=>Object.keys(e),CT=e=>e.replace("[",".").replace("]","").split("."),Wh=(e,t,n)=>{const r=Array.isArray(t)?t:CT(t),o=structuredClone(e);return ql(o,r,n),o};const Kl="-";function PT(e){const t=kT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Kl);return a[0]===""&&a.length!==1&&a.shift(),Hh(a,t)||OT(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Hh(e,t){var i;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 s=e.join(Kl);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Uh=/^\[(.+)\]$/;function OT(e){if(Uh.test(e)){const t=Uh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function kT(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return AT(Object.entries(e.classGroups),n).forEach(([s,i])=>{Zl(i,r,s,t)}),r}function Zl(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Gh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(_T(o)){Zl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Zl(i,Gh(t,s),n,r)})})}function Gh(e,t){let n=e;return t.split(Kl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function _T(e){return e.isThemeGetter}function AT(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e}function IT(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Yh="!";function DT(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length;function i(a){const l=[];let c=0,u=0,f;for(let y=0;y<a.length;y++){let v=a[y];if(c===0){if(v===o&&(r||a.slice(y,y+s)===t)){l.push(a.slice(u,y)),u=y+s;continue}if(v==="/"){f=y;continue}}v==="["?c++:v==="]"&&c--}const d=l.length===0?a:a.substring(u),h=d.startsWith(Yh),p=h?d.substring(1):d,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function MT(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function NT(e){return{cache:IT(e.cacheSize),parseClassName:DT(e),...PT(e)}}const FT=/\s+/;function LT(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(FT).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let f=!!u,d=r(f?c.substring(0,u):c);if(!d){if(!f)return{isTailwindClass:!1,originalClassName:i};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:i};f=!1}const h=MT(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Yh:h,classGroupId:d,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=i,u=a+l;return s.has(u)?!1:(s.add(u),o(l,c).forEach(f=>s.add(a+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function VT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qh(t))&&(r&&(r+=" "),r+=n);return r}function qh(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qh(e[r]))&&(n&&(n+=" "),n+=t);return n}function $T(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=NT(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=LT(l,n);return o(l,u),u}return function(){return s(VT.apply(null,arguments))}}function Ue(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Kh=/^\[(?:([a-z-]+):)?(.+)\]$/i,RT=/^\d+\/\d+$/,jT=new Set(["px","full","screen"]),BT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\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$/,WT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _n(e){return wr(e)||jT.has(e)||RT.test(e)}function Xn(e){return co(e,"length",JT)}function wr(e){return!!e&&!Number.isNaN(Number(e))}function Ii(e){return co(e,"number",wr)}function ss(e){return!!e&&Number.isInteger(Number(e))}function GT(e){return e.endsWith("%")&&wr(e.slice(0,-1))}function ve(e){return Kh.test(e)}function Qn(e){return BT.test(e)}const YT=new Set(["length","size","percentage"]);function qT(e){return co(e,YT,Zh)}function KT(e){return co(e,"position",Zh)}const ZT=new Set(["image","url"]);function XT(e){return co(e,ZT,t1)}function QT(e){return co(e,"",e1)}function is(){return!0}function co(e,t,n){const r=Kh.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function JT(e){return zT.test(e)&&!WT.test(e)}function Zh(){return!1}function e1(e){return HT.test(e)}function t1(e){return UT.test(e)}function n1(){const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),o=Ue("borderColor"),s=Ue("borderRadius"),i=Ue("borderSpacing"),a=Ue("borderWidth"),l=Ue("contrast"),c=Ue("grayscale"),u=Ue("hueRotate"),f=Ue("invert"),d=Ue("gap"),h=Ue("gradientColorStops"),p=Ue("gradientColorStopPositions"),m=Ue("inset"),y=Ue("margin"),v=Ue("opacity"),w=Ue("padding"),g=Ue("saturate"),T=Ue("scale"),x=Ue("sepia"),E=Ue("skew"),C=Ue("space"),O=Ue("translate"),I=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ve,t],_=()=>[ve,t],j=()=>["",_n,Xn],D=()=>["auto",wr,ve],k=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ve],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[wr,Ii],Q=()=>[wr,ve];return{cacheSize:500,separator:":",theme:{colors:[is],spacing:[_n,Xn],blur:["none","",Qn,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",Qn,ve],borderSpacing:_(),borderWidth:j(),contrast:V(),grayscale:q(),hueRotate:Q(),invert:q(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[GT,Xn],inset:L(),margin:L(),opacity:V(),padding:_(),saturate:V(),scale:V(),sepia:q(),skew:Q(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Qn]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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"],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:[...k(),ve]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ss,ve]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",ss,ve]}],"grid-cols":[{"grid-cols":[is]}],"col-start-end":[{col:["auto",{span:["full",ss,ve]},ve]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[is]}],"row-start-end":[{row:["auto",{span:[ss,ve]},ve]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Qn]},Qn]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Qn,Xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ii]}],"font-family":[{font:[is]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",wr,Ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_n,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_n,Xn]}],"underline-offset":[{"underline-offset":["auto",_n,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),KT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},XT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[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:["",...F()]}],"outline-offset":[{"outline-offset":[_n,ve]}],"outline-w":[{outline:[_n,Xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_n,Xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qn,QT]}],"shadow-color":[{shadow:[is]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Qn,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ss,ve]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_n,Xn,Ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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"],"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"]}}}const r1=$T(n1),Xl=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},o1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),s1=e=>kn.function(e),$t=(...e)=>r1(bx(e)),Ql=(e,t)=>{var r;console.log(e,t);const n=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;n==null||n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},Xh=({reportStatus:e,hideLeft:t=!1,className:n,children:r,title:o})=>S.jsxs("div",{className:$t("w-full justify-between",t&&r===null?"hidden":"flex",n),children:[t?null:S.jsxs("span",{className:"flex items-center gap-1 group-hover:text-primary group-focus-within:text-primary transition-colors group-error:text-danger",children:[o,e?S.jsxs("span",{className:"flex aspect-square h-4 w-4 items-center justify-center",children:[S.jsx(dx,{className:"hidden aspect-square h-3 w-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}),S.jsx(hx,{className:"hidden aspect-square h-3 w-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}),r]}),Di=({optionalText:e="Optional",left:t,rightLabel:n,container:r,right:o,children:s,error:i,form:a,id:l,name:c,title:u,placeholder:f,hideLeft:d,required:h})=>{const p=l??c;return S.jsxs("fieldset",{"data-error":!!i,form:a,className:$t("group inline-block w-full",r),children:[S.jsxs("label",{form:a,htmlFor:p,className:"inline-flex w-full cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger group-hover:border-primary",children:[!d&&!n?S.jsx(Xh,{hideLeft:d,reportStatus:!0,title:u,placeholder:f,children:e||n?S.jsxs(b.Fragment,{children:[h?null:S.jsx("span",{className:"text-opacity-70",children:e}),n?S.jsx(b.Fragment,{children:n}):null]}):null}):null,S.jsxs("div",{className:"relative group 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-focus-within:border-primary group-hover:border-primary group-error:border-danger",children:[t?S.jsx("span",{className:"absolute left-0 flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,s,o?S.jsx("span",{className:"absolute right-0 flex flex-nowrap gap-2 whitespace-nowrap pr-1",children:o}):null]})]}),S.jsx("p",{className:"mt-1 text-xs group-error:block group-error:text-danger",children:i})]})},Qh=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>S.jsx("li",{...o,ref:s,role:"option","aria-selected":e,className:"w-full",children:S.jsx("button",{type:"button",onClick:n,"aria-selected":e,className:`p-2 w-full text-left cursor-pointer ${e?"bg-primary text-primary-foreground":""} ${t?"bg-primary-subtle text-primary-foreground":""}`,children:r.label??r.value})})),i1={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},a1={caseSensitive:!1,sort:!1},l1=[],c1=b.forwardRef(({options:e,required:t=!0,...n},r)=>{const[o,s]=b.useState(!1),[i,a]=b.useState(""),[l,c]=b.useState(n.value??n.defaultValue??""),[u,f]=b.useState(null),d=b.useRef(l1),h=Zd(u),p=new Jr(e,["value"],a1).search(i),{x:m,y,strategy:v,refs:w,context:g}=vi({open:o,transform:!0,onOpenChange:s,whileElementsMounted:ul,middleware:[fl(4),Cw({padding:10,apply(_){Object.assign(_.elements.floating.style,{width:`${_.rects.reference.width}px`,maxHeight:`${Math.min(480,_.availableHeight)}px`})}})]});b.useImperativeHandle(r,()=>{var _;return(_=w.domReference)==null?void 0:_.current},[w]);const T=sx(g,i1),{getReferenceProps:x,getFloatingProps:E,getItemProps:C}=bi([xi(g,{role:"listbox"}),yi(g),tx(g,{listRef:d,loop:!0,activeIndex:u,allowEscape:!0,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:u,virtual:!0,onNavigate:_=>{const j=p.length-1;if(_===null&&h===0)return f(j);if(_===null&&h===j)return f(0);const D=_??h??null;return D===null?void 0:f(D)}})]),O=_=>{c(_.value),Ql(w.reference.current,_.value),s(!1),a("")},I=_=>{var D;const j=_.target.value;return a(j),!o&&j===""||j?s(!0):(D=n.onChange)==null?void 0:D.call(n,_)},N=()=>{s(!0),a("")},L=()=>{a(""),c(""),Ql(w.reference.current,""),s(!1)};return S.jsxs("fieldset",{className:"relative w-auto",children:[S.jsx(Di,{...n,required:t,right:S.jsxs("span",{className:"flex items-center gap-0.5",children:[S.jsx(Sl,{size:20}),l?S.jsx("button",{type:"button",onClick:L,className:"link:text-danger transition-colors",children:S.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:S.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:S.jsx("input",{...x({...n,onChange:I,onFocus:N,ref:w.setReference,onClick:_=>_.currentTarget.focus(),onKeyDown(_){if(_.key==="Escape")return _.currentTarget.blur(),s(!1);if(_.key==="Enter"){if(u!==null&&p[u])return _.preventDefault(),O(p[u]);if(p.length===1)return _.preventDefault(),O(p[0])}}}),required:t,value:o?i:l,"aria-autocomplete":"list",autoComplete:"off",className:$t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",n.right||i?"pe-12":"",n.left?"ps-8":"",n.className)})}),S.jsx(gi,{preserveTabOrder:!0,children:S.jsx(vl,{closeOnFocusOut:!0,guards:!0,returnFocus:!0,context:g,initialFocus:-1,visuallyHiddenDismiss:!0,children:S.jsx("ul",{...E({ref:w.setFloating,style:{position:v,left:m??0,top:y??0,...T.styles}}),"data-floating":"true",className:"bg-floating-background shadow-floating text-foreground list-none p-0 m-0 rounded-b-lg overflow-auto origin-[top_center] overflow-y-auto z-floating",children:p.map((_,j)=>b.createElement(Qh,{...C({onClick:()=>O(_),ref:D=>void(d.current[j]=D)}),key:`${_.value}-option`,option:_,selected:u===j,active:l===_.value}))})})})]})});var vt=function(){return vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},vt.apply(this,arguments)};function Jl(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 ec(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}typeof SuppressedError=="function"&&SuppressedError;var as=function(e){return e.replace(new RegExp(" ","g")," ")},Jh=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)},u1=function(e){return e.replace(/^0+([0-9]+)/,"$1")},ep=function(e,t,n){var r=e.length-2,o=u1(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},tp=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},np=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},f1=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},tc=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},d1=function(e){return e==="money"||e==="currency"},h1=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return vt(vt({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},nc=function(e,t){var n=Jh(tp(e),t.fraction.length),r="".concat(t.currency).concat(ep(n,t.group,t.decimal));return as(r)},p1=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,s=o===void 0?"BRL":o,i=e.currencyDisplay,a=i===void 0?"symbol":i;e.mask;var l=e.onChange,c=Jl(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=h1(r,s,a);return p.currency=as("".concat(p.currency.trim()," ")),p.literal=as(p.literal.trim()),p},[r,s]),d=function(p){var m=nc(p.target.value,f),y=np(m);p.target.value=m,p.target.setAttribute("data-number",y.toString()),l==null||l(p),y!==0&&(u.current.selectionEnd=m.length)},h=c.defaultValue?nc(c.defaultValue,f):void 0;return b.createElement("input",vt({},c,{value:typeof c.value=="string"?nc(c.value,f):c.value,defaultValue:h,type:"text",ref:u,onChange:d,inputMode:"decimal"}))}),m1=1,g1=function(e){return e==="percentage"||e==="percent"||e==="percentual"},y1=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return vt(vt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},rc=function(e,t){var n=Jh(tp(e),t.fraction.length),r="".concat(ep(n,t.group,t.decimal)," ").concat(t.percentSign);return as(r)},v1=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,s=e.onKeyUp,i=Jl(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=ec(b.useState(function(){var v,w;return(w=(v=i.value)===null||v===void 0?void 0:v.toString())!==null&&w!==void 0?w:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var v,w=Number.parseFloat("".concat((v=i.value)!==null&&v!==void 0?v:"0")).toFixed(f.fraction.length);u(rc(w,f))},[i.value]);var f=b.useMemo(function(){var v=y1(r);return v.percentSign=as("".concat(v.percentSign)),v},[r]),d=c.length-f.percentSign.length-m1,h=function(v){var w,g=a.current;g&&(g.setSelectionRange(d,d),v&&((w=i.onFocus)===null||w===void 0||w.call(i,v)))},p=function(v){var w=v.currentTarget;if(w.selectionStart!==null){var g=w.selectionStart,T=w.selectionEnd,x=g!==T,E=d<g;!x&&E&&h()}s==null||s(v)},m=function(v){var w=rc(v.target.value,f),g=np(w);u(w),v.target.value=w,v.target.setAttribute("data-number",g.toString()),o==null||o(v)};b.useEffect(function(){return h()},[c]);var y=i.defaultValue?rc(i.defaultValue,f):void 0;return b.createElement("input",vt({},i,{defaultValue:y,inputMode:"decimal",onChange:m,onFocus:h,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},b1=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Mi[s];i===void 0?r.push(s.replace(ls.dots,"\\.").replace(ls.openParenthesis,"\\(").replace(ls.closeParenthesis,"\\)")):r.push((t=i.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ls.leadingBars,"\\")},cs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return oc(o,n);var s=b1(o);return n?"^".concat(s,"$"):s},w1=function(e){return e.replace(ls.escape,"\\$&")},oc=function(e,t){var n=e.map(function(r){return typeof r=="string"?w1(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Mi={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]/}},x1=/\d/,rp="(dd) 9dddd-dddd",op="(dd) dddd-dddd",sp="ddd.ddd.ddd-dd",ip="dd.ddd.ddd/dddd-dd",Ni=function(e){return e.replace(/\D/g,"")},S1=["2",/[0-3]/,":",/[0-5]/,/\d/],T1=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Rt={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:sp,isoDate:"dddd-dd-dd",cnpj:ip,telephone:op,cellphone:rp,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ni(e).length<=11?sp:ip},int:function(e){return e===void 0&&(e=""),x1.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=Ni(e);return t.length<11?op:rp},time:function(e){var t=Ni(e),n=t[0];return n==="2"?S1:T1}},jt=function(e,t,n){var r;return n===void 0&&(n={}),vt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:cs(e,"",!0),infinity:n.infinity},n)},Pt={cellTelephone:jt(Rt.cellTelephone,"tel"),cellphone:jt(Rt.cellphone,"tel"),cep:jt(Rt.cep,"decimal"),cnpj:jt(Rt.cnpj,"decimal"),color:jt(Rt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:jt(Rt.cpf,"decimal"),cpfCnpj:jt(Rt.cpfCnpj,"decimal",{transform:Ni}),creditCard:jt(Rt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:jt(Rt.date,"decimal"),int:jt(Rt.int,"decimal",{pattern:"[0-9]+"}),isoDate:jt(Rt.isoDate,"decimal"),telephone:jt(Rt.telephone,"tel"),time:jt(Rt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:jt(Rt.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function ap(e,t,n,r){var o,s;r===void 0&&(r=Mi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],f=u instanceof RegExp?u:r[u],d=i[c];if(f===void 0){a+=u,d===u&&(c+=1),l+=1;continue}var h=f instanceof RegExp?{regex:f}:f;h.regex.test(d)&&(a+=(s=(o=h.parse)===null||o===void 0?void 0:o.call(h,d))!==null&&s!==void 0?s:d),c+=1,l+=1}return a}var lp=function(e){return e},E1=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(cs(e,n,t));return r.test(n)};function C1(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var P1=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,s=o===void 0?!0:o,i=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,d=e.as,h=Jl(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=tc(a),y=tc(f),v=tc(u),w=b.useRef(E1(u,s,h.value||h.defaultValue)),g=d??"input",T=ec(b.useState(""),2),x=T[0],E=T[1],C=C1(x),O=b.useCallback(function(k,F){var $,z,q=($=k??F)!==null&&$!==void 0?$:"";if(u===void 0)return q;var P=(z=q==null?void 0:q.toString())!==null&&z!==void 0?z:"";return ap(P,typeof u=="function"?u(P):u,i??lp,c??Mi)},[i,u,c]),I=ec(b.useState(function(){return O(h.value,h.defaultValue)}),2),N=I[0],L=I[1],_=O(h.defaultValue,h.defaultValue),j=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var k=u(N);return Array.isArray(k)?oc(k,s):cs(u,N,s)}return typeof u=="string"?cs(u,N,s):oc(u,s)},[l,N,s,u]);b.useEffect(function(){if(h.value!==void 0){var k=O(h.value,h.defaultValue);L(k),p.current!==null&&(p.current.value=k)}},[h.value,u,i,h.defaultValue]);var D=function(k){var F,$,z,q,P,V=k.currentTarget,Q=k.target.value;if(v.current===void 0)return L(Q),(F=y.current)===null||F===void 0||F.call(y,Q),($=m.current)===null||$===void 0||$.call(m,k),f==null?void 0:f(Q);var ie=new RegExp(cs(v.current,Q,s)),ee=(z=V.selectionEnd)!==null&&z!==void 0?z:0,H=function(Z,de,B){if(Z.type!=="number")return Z.setSelectionRange(de,B)};if(r&&w.current&&Q.length>=N.length)return V.value=N,H(V,ee-1,ee-1);var A=!1;Q.length<C.length&&(w.current=!1,A=!0),ie.test(Q)&&(w.current=!0);var R=ee,W=Q[R-1],Y=ap(Q,typeof v.current=="function"?v.current(Q):v.current,i??lp,c??Mi);for(V.value=Y,L(Y);R<Y.length&&Y.charAt(R-1)!==W;)R+=1;A?H(V,ee,ee):H(V,R,R),k.target.value=Y,E(Y),(q=y.current)===null||q===void 0||q.call(y,Y),(P=m.current)===null||P===void 0||P.call(m,k)};return b.createElement(g,vt({},h,{ref:p,pattern:j,onChange:D,defaultValue:cp(h.defaultValue)?_:void 0,value:cp(h.value)?O(h.value,h.value):h.value}))}),cp=function(e){return typeof e=="string"},up=b.forwardRef(function(e,t){return d1(e.mask)?b.createElement(p1,vt({},e,{mask:void 0,ref:t})):g1(e.mask)?b.createElement(v1,vt({},e,{mask:void 0,ref:t})):b.createElement(P1,vt({},e,{ref:t}))}),Bt=function(e){return function(t){return b.createElement(up,vt({},e,t))}};Bt(Pt.cellTelephone),Bt(Pt.cellphone),Bt(Pt.cep),Bt(Pt.cnpj),Bt(Pt.color),Bt(Pt.cpf),Bt(Pt.cpfCnpj),Bt(Pt.creditCard),Bt(Pt.date),Bt(Pt.int),Bt(Pt.isoDate),Bt(Pt.telephone),Bt(Pt.time),Bt(Pt.uuid);var fp=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&f1(Pt,t.mask)?Pt[t.mask]:{mask:t.mask}},[t.mask]),o=vt(vt({},t),r);return b.createElement(up,vt({},o,{ref:n}))});const us=b.forwardRef(({type:e="text",container:t,next:n,rightLabel:r,optionalText:o,hideLeft:s=!1,right:i,left:a,...l},c)=>{const u=l.id??l.name,f=b.useRef(null);return b.useEffect(()=>{if(f.current===null)return;const d=f.current,h=()=>d.setAttribute("data-initialized","true"),p=m=>{const y=m;if(y.key==="Enter"&&d.enterKeyHint==="next"){const v=d.getAttribute("data-next");if(v){const w=document.getElementById(v);if(w)return w.focus(),void y.preventDefault()}}};return d.addEventListener("keydown",p),d.addEventListener("focus",h),()=>{d.removeEventListener("keydown",p),d.removeEventListener("focus",h)}},[]),S.jsx(Di,{...l,right:i,left:a,hideLeft:s,rightLabel:r,optionalText:o,container:$t("group inline-block w-full",t),children:S.jsx(fp,{...l,type:e,"data-next":n,ref:Xl(c,f),id:u,name:u,className:$t("input text-foreground group h-10 w-full flex-1 rounded-md bg-transparent p-2 placeholder-input-mask outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error",i?"pe-4":"",a?"ps-4":"",l.className)})})}),xr=b.forwardRef(({container:e,required:t=!0,options:n,...r},o)=>{const s=b.useRef(null),i=r.id??r.name;return b.useEffect(()=>{if(s.current===null)return;const a=s.current,l=()=>a.setAttribute("data-initialized","true"),c=()=>a.setAttribute("data-selected","true");return a.addEventListener("focus",l),a.addEventListener("change",c),()=>{a.removeEventListener("focus",l),a.removeEventListener("change",c)}},[]),S.jsx(Di,{...r,required:t,container:$t("group inline-block w-full",e),right:S.jsx(Sl,{size:20}),children:S.jsxs("select",{...r,ref:Xl(o,s),id:i,name:i,required:t,"data-selected":!!r.value||!1,className:$t("input bg-transparent text-foreground select group h-10 w-full flex-1 rounded-md p-2 placeholder-input-placeholder outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",r.className),children:[S.jsx("option",{value:"",hidden:!0,disabled:!0,children:r.placeholder}),n.map(a=>S.jsx("option",{...a,children:a.label??a.value},`${i}-select-option-${a.value}`))]})})}),O1=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],k1=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],_1=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],A1=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],dp=(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 hp(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?A1:_1:t.binary?k1:O1,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,s=o?"-":t.signed?"+":"";o&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){const u=dp(e,t.locale,i);return s+u+r+n[0]}const a=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**a,i||(e=e.toPrecision(3));const l=dp(Number(e),t.locale,i),c=n[a];return s+l+r+c}var sc={exports:{}},Fi={exports:{}},Ne={};/** @license React v16.13.1
|
|
108
108
|
* react-is.production.min.js
|
|
109
109
|
*
|
|
110
110
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the MIT license found in the
|
|
113
113
|
* LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/var
|
|
114
|
+
*/var pp;function I1(){if(pp)return Ne;pp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(x){if(typeof x=="object"&&x!==null){var E=x.$$typeof;switch(E){case t:switch(x=x.type,x){case l:case c:case r:case s:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case a:case u:case p:case h:case i:return x;default:return E}}case n:return E}}}function T(x){return g(x)===c}return Ne.AsyncMode=l,Ne.ConcurrentMode=c,Ne.ContextConsumer=a,Ne.ContextProvider=i,Ne.Element=t,Ne.ForwardRef=u,Ne.Fragment=r,Ne.Lazy=p,Ne.Memo=h,Ne.Portal=n,Ne.Profiler=s,Ne.StrictMode=o,Ne.Suspense=f,Ne.isAsyncMode=function(x){return T(x)||g(x)===l},Ne.isConcurrentMode=T,Ne.isContextConsumer=function(x){return g(x)===a},Ne.isContextProvider=function(x){return g(x)===i},Ne.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ne.isForwardRef=function(x){return g(x)===u},Ne.isFragment=function(x){return g(x)===r},Ne.isLazy=function(x){return g(x)===p},Ne.isMemo=function(x){return g(x)===h},Ne.isPortal=function(x){return g(x)===n},Ne.isProfiler=function(x){return g(x)===s},Ne.isStrictMode=function(x){return g(x)===o},Ne.isSuspense=function(x){return g(x)===f},Ne.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===s||x===o||x===f||x===d||typeof x=="object"&&x!==null&&(x.$$typeof===p||x.$$typeof===h||x.$$typeof===i||x.$$typeof===a||x.$$typeof===u||x.$$typeof===y||x.$$typeof===v||x.$$typeof===w||x.$$typeof===m)},Ne.typeOf=g,Ne}var Fe={};/** @license React v16.13.1
|
|
115
115
|
* react-is.development.js
|
|
116
116
|
*
|
|
117
117
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the MIT license found in the
|
|
120
120
|
* LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/var
|
|
121
|
+
*/var mp;function D1(){return mp||(mp=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,s=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function g(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===s||B===o||B===f||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===h||B.$$typeof===i||B.$$typeof===a||B.$$typeof===u||B.$$typeof===y||B.$$typeof===v||B.$$typeof===w||B.$$typeof===m)}function T(B){if(typeof B=="object"&&B!==null){var Me=B.$$typeof;switch(Me){case t:var rt=B.type;switch(rt){case l:case c:case r:case s:case o:case f:return rt;default:var He=rt&&rt.$$typeof;switch(He){case a:case u:case p:case h:case i:return He;default:return Me}}case n:return Me}}}var x=l,E=c,C=a,O=i,I=t,N=u,L=r,_=p,j=h,D=n,k=s,F=o,$=f,z=!1;function q(B){return z||(z=!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.")),P(B)||T(B)===l}function P(B){return T(B)===c}function V(B){return T(B)===a}function Q(B){return T(B)===i}function ie(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function ee(B){return T(B)===u}function H(B){return T(B)===r}function A(B){return T(B)===p}function R(B){return T(B)===h}function W(B){return T(B)===n}function Y(B){return T(B)===s}function Z(B){return T(B)===o}function de(B){return T(B)===f}Fe.AsyncMode=x,Fe.ConcurrentMode=E,Fe.ContextConsumer=C,Fe.ContextProvider=O,Fe.Element=I,Fe.ForwardRef=N,Fe.Fragment=L,Fe.Lazy=_,Fe.Memo=j,Fe.Portal=D,Fe.Profiler=k,Fe.StrictMode=F,Fe.Suspense=$,Fe.isAsyncMode=q,Fe.isConcurrentMode=P,Fe.isContextConsumer=V,Fe.isContextProvider=Q,Fe.isElement=ie,Fe.isForwardRef=ee,Fe.isFragment=H,Fe.isLazy=A,Fe.isMemo=R,Fe.isPortal=W,Fe.isProfiler=Y,Fe.isStrictMode=Z,Fe.isSuspense=de,Fe.isValidElementType=g,Fe.typeOf=T}()),Fe}var gp;function yp(){return gp||(gp=1,process.env.NODE_ENV==="production"?Fi.exports=I1():Fi.exports=D1()),Fi.exports}/*
|
|
122
122
|
object-assign
|
|
123
123
|
(c) Sindre Sorhus
|
|
124
124
|
@license MIT
|
|
125
|
-
*/var
|
|
126
|
-
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var B=de(
|
|
127
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
128
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
129
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
130
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hp(e,t){if(e){if(typeof e=="string")return yc(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 yc(e,t)}}function yc(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 AE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function IE(e){if(Array.isArray(e))return e}function Up(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 Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Up(Object(n),!0).forEach(function(r){vc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ji(e,t){if(e==null)return{};var n=DE(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var bc=w.forwardRef(function(e,t){var n=e.children,r=ji(e,xE),o=Yp(r),s=o.open,i=ji(o,SE);return w.useImperativeHandle(t,function(){return{open:s}},[s]),w.createElement(w.Fragment,null,n(Xe(Xe({},i),{},{open:s})))});bc.displayName="Dropzone";var Gp={disabled:!1,getFilesFromEvent:H1,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};bc.defaultProps=Gp,bc.propTypes={children:je.func,accept:je.objectOf(je.arrayOf(je.string)),multiple:je.bool,preventDropOnDocument:je.bool,noClick:je.bool,noKeyboard:je.bool,noDrag:je.bool,noDragEventsBubbling:je.bool,minSize:je.number,maxSize:je.number,maxFiles:je.number,disabled:je.bool,getFilesFromEvent:je.func,onFileDialogCancel:je.func,onFileDialogOpen:je.func,useFsAccessApi:je.bool,autoFocus:je.bool,onDragEnter:je.func,onDragLeave:je.func,onDragOver:je.func,onDrop:je.func,onDropAccepted:je.func,onDropRejected:je.func,onError:je.func,validator:je.func};var wc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Yp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xe(Xe({},Gp),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,x=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,O=t.onError,I=t.validator,N=w.useMemo(function(){return vE(n)},[n]),L=w.useMemo(function(){return yE(n)},[n]),_=w.useMemo(function(){return typeof y=="function"?y:qp},[y]),j=w.useMemo(function(){return typeof m=="function"?m:qp},[m]),D=w.useRef(null),k=w.useRef(null),F=w.useReducer(ME,wc),R=gc(F,2),W=R[0],q=R[1],P=W.isFocused,V=W.isFileDialogActive,Q=w.useRef(typeof window<"u"&&window.isSecureContext&&v&&gE()),ie=function(){!Q.current&&V&&setTimeout(function(){if(k.current){var se=k.current.files;se.length||(q({type:"closeDialog"}),j())}},300)};w.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[k,V,j,Q]);var ee=w.useRef([]),H=function(se){D.current&&D.current.contains(se.target)||(se.preventDefault(),ee.current=[])};w.useEffect(function(){return g&&(document.addEventListener("dragover",Bp,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",Bp),document.removeEventListener("drop",H))}},[D,g]),w.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var A=w.useCallback(function(X){O?O(X):console.error(X)},[O]),$=w.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[].concat(CE(ee.current),[X.target]),$i(X)&&Promise.resolve(o(X)).then(function(se){if(!(Ri(X)&&!C)){var _e=se.length,Ke=_e>0&&dE({files:se,accept:N,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),St=_e>0&&!Ke;q({isDragAccept:Ke,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(se){return A(se)})},[o,c,A,C,N,i,s,a,l,I]),z=w.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=$i(X);if(se&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return se&&f&&f(X),!1},[f,C]),Y=w.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=ee.current.filter(function(Ke){return D.current&&D.current.contains(Ke)}),_e=se.indexOf(X.target);_e!==-1&&se.splice(_e,1),ee.current=se,!(se.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),$i(X)&&u&&u(X))},[D,u,C]),Z=w.useCallback(function(X,se){var _e=[],Ke=[];X.forEach(function(St){var At=$p(St,N),Lt=gc(At,2),jr=Lt[0],zo=Lt[1],Ho=jp(St,i,s),Ya=gc(Ho,2),Vf=Ya[0],Rf=Ya[1],$f=I?I(St):null;if(jr&&Vf&&!$f)_e.push(St);else{var jf=[zo,Rf];$f&&(jf=jf.concat($f)),Ke.push({file:St,errors:jf.filter(function(aL){return aL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(St){Ke.push({file:St,errors:[fE]})}),_e.splice(0)),q({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),d&&d(_e,Ke,se),Ke.length>0&&p&&p(Ke,se),_e.length>0&&h&&h(_e,se)},[q,a,N,i,s,l,d,h,p,I]),de=w.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[],$i(X)&&Promise.resolve(o(X)).then(function(se){Ri(X)&&!C||Z(se,X)}).catch(function(se){return A(se)}),q({type:"reset"})},[o,Z,A,C]),B=w.useCallback(function(){if(Q.current){q({type:"openDialog"}),_();var X={multiple:a,types:L};window.showOpenFilePicker(X).then(function(se){return o(se)}).then(function(se){Z(se,null),q({type:"closeDialog"})}).catch(function(se){bE(se)?(j(se),q({type:"closeDialog"})):wE(se)?(Q.current=!1,k.current?(k.current.value=null,k.current.click()):A(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."))):A(se)});return}k.current&&(q({type:"openDialog"}),_(),k.current.value=null,k.current.click())},[q,_,j,v,Z,A,L,a]),Me=w.useCallback(function(X){!D.current||!D.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[D,B]),rt=w.useCallback(function(){q({type:"focus"})},[]),He=w.useCallback(function(){q({type:"blur"})},[]),ot=w.useCallback(function(){T||(mE()?setTimeout(B,0):B())},[T,B]),ue=function(se){return r?null:se},Ee=function(se){return x?null:ue(se)},le=function(se){return E?null:ue(se)},Oe=function(se){C&&se.stopPropagation()},ut=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.role,St=X.onKeyDown,At=X.onFocus,Lt=X.onBlur,jr=X.onClick,zo=X.onDragEnter,Ho=X.onDragOver,Ya=X.onDragLeave,Vf=X.onDrop,Rf=ji(X,TE);return Xe(Xe(vc({onKeyDown:Ee(dn(St,Me)),onFocus:Ee(dn(At,rt)),onBlur:Ee(dn(Lt,He)),onClick:ue(dn(jr,ot)),onDragEnter:le(dn(zo,$)),onDragOver:le(dn(Ho,z)),onDragLeave:le(dn(Ya,Y)),onDrop:le(dn(Vf,de)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,D),!r&&!x?{tabIndex:0}:{}),Rf)}},[D,Me,rt,He,ot,$,z,Y,de,x,E,r]),ke=w.useCallback(function(X){X.stopPropagation()},[]),ft=w.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.onChange,St=X.onClick,At=ji(X,EE),Lt=vc({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ue(dn(Ke,de)),onClick:ue(dn(St,ke)),tabIndex:-1},_e,k);return Xe(Xe({},Lt),At)}},[k,n,a,de,r]);return Xe(Xe({},W),{},{isFocused:P&&!r,getRootProps:ut,getInputProps:ft,rootRef:D,inputRef:k,open:ue(B)})}function ME(e,t){switch(t.type){case"focus":return Xe(Xe({},e),{},{isFocused:!0});case"blur":return Xe(Xe({},e),{},{isFocused:!1});case"openDialog":return Xe(Xe({},wc),{},{isFileDialogActive:!0});case"closeDialog":return Xe(Xe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xe(Xe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xe(Xe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xe({},wc);default:return e}}function qp(){}function Kp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Kp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function NE(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Kp(e))&&(r&&(r+=" "),r+=t);return r}const Zp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Xp=NE,xc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=Zp(u)||Zp(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,f,d]:c},[]);return Xp(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},hs=w.forwardRef(function({as:t,...n},r){const o=t||"span";return S.jsx(o,{...n,ref:r})}),FE=xc("inline-flex duration-700 data-[loading=true]:opacity-40 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-30 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary hover:bg-primary-hover text-primary-foreground",warn:"bg-warn hover:bg-warn-hover text-warn-foreground",danger:"bg-danger hover:bg-danger-hover text-danger-foreground",secondary:"bg-secondary hover:bg-secondary-hover text-secondary-foreground",success:"bg-success hover:bg-success-hover text-success-foreground",info:"bg-info hover:bg-info-hover text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ps=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return S.jsxs(hs,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:Rt(FE({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),LE=e=>S.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>S.jsx("li",{className:"flex flex-1",children:S.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:Rt("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),VE={isImage:e=>e.type.includes("image")},RE=e=>{const[t,n]=w.useState({url:"",type:"",size:""});return w.useEffect(()=>{if(VE.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:pp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:pp(e.file.size)})},[e.file]),t.type==="img"?S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[S.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{})})]}):S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[S.jsx(mx,{size:48}),S.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{className:"text-danger"})})]})},$E=e=>S.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>S.jsx(RE,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),jE=e=>e.isDragActive?S.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?S.jsx($E,{onDeleteFile:e.onDeleteFile,files:e.files}):S.jsx(w.Fragment,{children:e.idle}),BE=S.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[S.jsx(vx,{size:64}),S.jsxs("p",{children:["You can drag your files or"," ",S.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),WE=({idle:e=BE,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=w.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Yp({onDrop:i});return S.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[S.jsx("input",{...l(r),name:r.name,id:r.name}),S.jsx(jE,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},zE=["INPUT","SELECT"],Qp=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{zE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},HE=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return S.jsx("form",{...e,onSubmit:t})},UE=({children:e,...t})=>{const n=w.useId(),[r,o]=w.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return S.jsxs("div",{className:"flex items-center",children:[S.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),S.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:S.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),S.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:S.jsx("span",{className:"font-medium text-foreground",children:e})})]})},Bi=0,Jn=1,ho=2,Jp=4;function ms(e,t){return n=>e(t(n))}function GE(e,t){return t(e)}function em(e,t){return n=>e(t,n)}function tm(e,t){return()=>e(t)}function Wi(e,t){return t(e),e}function Ge(...e){return e}function YE(e){e()}function nm(e){return()=>e}function qE(...e){return()=>{e.map(YE)}}function Sc(e){return e!==void 0}function Tr(){}function Le(e,t){return e(Jn,t)}function be(e,t){e(Bi,t)}function Tc(e){e(ho)}function Ot(e){return e(Jp)}function ce(e,t){return Le(e,em(t,Bi))}function hn(e,t){const n=e(Jn,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case ho:e.splice(0,e.length);return;case Jn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Bi:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function K(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case Jn:o(t);break;case Bi:t=o;break;case Jp:return t}return n(r,o)}}function KE(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Jn:return s?n===s?void 0:(r(),n=s,t=Le(e,s),t):(r(),Tr);case ho:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Gt(e){return Wi(Ce(),t=>ce(e,t))}function kt(e,t){return Wi(K(t),n=>ce(e,n))}function ZE(...e){return t=>e.reduceRight(GE,t)}function U(e,...t){const n=ZE(...t);return(r,o)=>{switch(r){case Jn:return Le(e,n(o));case ho:Tc(e);return}}}function rm(e,t){return e===t}function Ye(e=rm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function oe(e){return t=>ms(t,e)}function pn(e){return t=>()=>t(e)}function mn(e,t){return n=>r=>n(t=e(t,r))}function po(e){return t=>n=>{e>0?e--:t(n)}}function er(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function om(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function sm(...e){return function(t,n){switch(t){case Jn:return qE(...e.map(r=>Le(r,n)));case ho:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=rm){return U(e,Ye(t))}function yt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case Jn:return r===o&&i(n),Le(t,i);case ho:return Tc(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ae(e,t=[],{singleton:n}={singleton:!0}){return{id:XE(),constructor:e,dependencies:t,singleton:n}}const XE=()=>Symbol();function QE(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function JE(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const zi=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Ec(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=w.createContext({});function l(v,b){v.propsReady&&be(v.propsReady,!1);for(const g of r){const T=v[t.required[g]];be(T,b[g])}for(const g of o)if(g in b){const T=v[t.optional[g]];be(T,b[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((b,g)=>(b[g]=T=>{const x=v[t.methods[g]];be(x,T)},b),{})}function u(v){return i.reduce((b,g)=>(b[g]=KE(v[t.events[g]]),b),{})}const f=w.forwardRef((v,b)=>{const{children:g,...T}=v,[x]=w.useState(()=>Wi(QE(e),C=>l(C,T))),[E]=w.useState(tm(u,x));return zi(()=>{for(const C of i)C in T&&Le(E[C],T[C]);return()=>{Object.values(E).map(Tc)}},[T,E,x]),zi(()=>{l(x,T)}),w.useImperativeHandle(b,nm(c(x))),w.createElement(a.Provider,{value:x},n?w.createElement(n,JE([...r,...o,...i],T),g):g)}),d=v=>w.useCallback(em(be,w.useContext(a)[v]),[v]),h=v=>{const g=w.useContext(a)[v],T=w.useCallback(x=>Le(g,x),[g]);return w.useSyncExternalStore(T,()=>Ot(g),()=>Ot(g))},p=v=>{const g=w.useContext(a)[v],[T,x]=w.useState(tm(Ot,g));return zi(()=>Le(g,E=>{E!==T&&x(nm(E))}),[g,T]),T},m=w.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,b)=>{const T=w.useContext(a)[v];zi(()=>Le(T,b),[b,T])}}}const eC=typeof document<"u"?w.useLayoutEffect:w.useEffect;var Yt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Yt||{});const tC={0:"debug",1:"log",2:"warn",3:"error"},nC=()=>typeof globalThis>"u"?window:globalThis,tr=Ae(()=>{const e=K(3);return{log:K((n,r,o=1)=>{var s;const i=(s=nC().VIRTUOSO_LOG_LEVEL)!=null?s:Ot(e);o>=i&&console[tC[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Cc(e,t=!0){const n=w.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=w.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function gn(e,t=!0){return Cc(e,t).callbackRef}function im(e,t,n,r,o,s,i){const a=w.useCallback(l=>{const c=rC(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),s==null||s(oC("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Cc(a,n)}function rC(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Yt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function oC(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}function nn(e,t){return Math.round(e.getBoundingClientRect()[t])}function am(e,t){return Math.abs(e-t)<1.01}function lm(e,t,n,r=Tr,o){const s=w.useRef(null),i=w.useRef(null),a=w.useRef(null),l=w.useCallback(f=>{const d=f.target,h=d===window||d===document,p=h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=h?document.documentElement.scrollHeight:d.scrollHeight,y=h?window.innerHeight:d.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():Wf.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);w.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const d=s.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,y;d===window?(m=Math.max(nn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,p=nn(d,"height"),y=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),am(p,m)||f.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,d.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Mt=Ae(()=>{const e=Ce(),t=Ce(),n=K(0),r=Ce(),o=K(0),s=Ce(),i=Ce(),a=K(0),l=K(0),c=K(0),u=K(0),f=Ce(),d=Ce(),h=K(!1);return ce(U(e,oe(({scrollTop:p})=>p)),t),ce(U(e,oe(({scrollHeight:p})=>p)),i),ce(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),gs={lvl:0};function cm(e,t,n,r=gs,o=gs){return{k:e,v:t,lvl:n,l:r,r:o}}function Be(e){return e===gs}function mo(){return gs}function Pc(e,t){if(Be(e))return gs;const{k:n,l:r,r:o}=e;if(t===n){if(Be(r))return o;if(Be(o))return r;{const[s,i]=um(r);return Hi(dt(e,{k:s,v:i,l:fm(r)}))}}else return t<n?Hi(dt(e,{l:Pc(r,t)})):Hi(dt(e,{r:Pc(o,t)}))}function ys(e,t){if(!Be(e))return t===e.k?e.v:t<e.k?ys(e.l,t):ys(e.r,t)}function rn(e,t,n="k"){if(Be(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=rn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return rn(e.l,t,n)}function qt(e,t,n){return Be(e)?cm(t,n,1):t===e.k?dt(e,{k:t,v:n}):t<e.k?dm(dt(e,{l:qt(e.l,t,n)})):dm(dt(e,{r:qt(e.r,t,n)}))}function Oc(e,t,n){if(Be(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Oc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Oc(i,t,n))),a}function Er(e){return Be(e)?[]:[...Er(e.l),{k:e.k,v:e.v},...Er(e.r)]}function um(e){return Be(e.r)?[e.k,e.v]:um(e.r)}function fm(e){return Be(e.r)?e.l:Hi(dt(e,{r:fm(e.r)}))}function dt(e,t){return cm(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 kc(e){return Be(e)||e.lvl>e.r.lvl}function dm(e){return _c(pm(e))}function Hi(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(kc(t))return pm(dt(e,{lvl:r-1}));if(!Be(t)&&!Be(t.r))return dt(t.r,{l:dt(t,{r:t.r.l}),r:dt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(kc(e))return _c(dt(e,{lvl:r-1}));if(!Be(n)&&!Be(n.l)){const o=n.l,s=kc(o)?n.lvl-1:n.lvl;return dt(o,{l:dt(e,{r:o.l,lvl:r-1}),r:_c(dt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Ui(e,t,n){if(Be(e))return[];const r=rn(e,t)[0];return sC(Oc(e,r,n))}function hm(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function sC(e){return hm(e,({k:t,v:n})=>({index:t,value:n}))}function _c(e){const{r:t,lvl:n}=e;return!Be(t)&&!Be(t.r)&&t.lvl===n&&t.r.lvl===n?dt(t,{l:dt(e,{r:t.l}),lvl:n+1}):e}function pm(e){const{l:t}=e;return!Be(t)&&t.lvl===e.lvl?dt(t,{r:dt(e,{l:t.r})}):e}function Gi(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function mm(e,t,n){return e[Gi(e,t,n)]}function iC(e,t,n,r){const o=Gi(e,t,r),s=Gi(e,n,r,o);return e.slice(o,s+1)}const Ac=Ae(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function aC(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function gm(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 lC(e,t){let n=Be(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Be(e)){e=qt(e,0,o);continue}const a=Ui(e,s-1,i+1);if(a.some(aC(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(i>=u||o===d)&&(e=Pc(e,u)):(c=d!==o,l=!0),f>i&&i>=u&&d!==o&&(e=qt(e,i+1,d));c&&(e=qt(e,s,o))}return[e,n]}function cC(){return{offsetTree:[],sizeTree:mo(),groupOffsetTree:mo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Ic({index:e},t){return t===e?0:t<e?-1:1}function uC({offset:e},t){return t===e?0:t<e?-1:1}function fC(e){return{index:e.index,value:e}}function dC(e,t,n,r=0){return r>0&&(t=Math.max(t,mm(e,r,Ic).offset)),hm(iC(e,t,n,uC),fC)}function Dc(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Gi(o,t-1,Ic),a=o[l].offset;const u=rn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===rn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ui(n,t,1/0)){const f=c-s,d=f*i+a+f*r;o.push({offset:d,size:u,index:c}),s=c,a=d,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function hC(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Yt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Be(s)&&t.length===2){const d=t[0].size,h=t[1].size;i=n.reduce((p,m)=>qt(qt(p,m,d),m+1,h),i)}else[i,a]=lC(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Dc(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>qt(d,h,vs(h,l,o)),mo()),groupIndices:n}}function vs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=mm(t,e,Ic),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function pC(e){return typeof e.groupIndex<"u"}function ym(e,t,n){if(pC(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=vm(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function vm(e,t){if(!Yi(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Yi(e){return!Be(e.groupOffsetTree)}function mC(e){return Er(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const gC={offsetHeight:"height",offsetWidth:"width"},yn=Ae(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=kt(r,0),s=Ce(),i=Ce(),a=K(0),l=K([]),c=K(void 0),u=K(void 0),f=K((x,E)=>nn(x,gC[E])),d=K(void 0),h=K(0),p=cC(),m=kt(U(n,we(l,e,h),mn(hC,p),Ye()),p),y=kt(U(l,Ye(),mn((x,E)=>({prev:x.current,current:E}),{prev:[],current:[]}),oe(({prev:x})=>x)),[]);ce(U(l,pe(x=>x.length>0),we(m,h),oe(([x,E,C])=>{const O=x.reduce((I,N,L)=>qt(I,N,vs(N,E.offsetTree,C)||L),mo());return{...E,groupIndices:x,groupOffsetTree:O}})),m),ce(U(r,we(m),pe(([x,{lastIndex:E}])=>x<E),oe(([x,{lastIndex:E,lastSize:C}])=>[{startIndex:x,endIndex:E,size:C}])),n),ce(c,u);const v=kt(U(c,oe(x=>x===void 0)),!0);ce(U(u,pe(x=>x!==void 0&&Be(Ot(m).sizeTree)),oe(x=>[{startIndex:0,endIndex:0,size:x}])),n);const b=Gt(U(n,we(m),mn(({sizes:x},[E,C])=>({changed:C!==x,sizes:C}),{changed:!1,sizes:p}),oe(x=>x.changed)));Le(U(a,mn((x,E)=>({diff:x.prev-E,prev:E}),{diff:0,prev:0}),oe(x=>x.diff)),x=>{const{groupIndices:E}=Ot(m);if(x>0)be(t,!0),be(s,x+gm(x,E));else if(x<0){const C=Ot(y);C.length>0&&(x-=gm(-x,C)),be(i,x)}}),Le(U(a,we(e)),([x,E])=>{x<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Yt.ERROR)});const g=Gt(s);ce(U(s,we(m),oe(([x,E])=>{const C=E.groupIndices.length>0,O=[],I=E.lastSize;if(C){const N=ys(E.sizeTree,0);let L=0,_=0;for(;L<x;){const k=E.groupIndices[_],F=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-k-1;O.push({startIndex:k,endIndex:k,size:N}),O.push({startIndex:k+1,endIndex:k+1+F-1,size:I}),_++,L+=F+1}const j=Er(E.sizeTree);return L!==x&&j.shift(),j.reduce((k,{k:F,v:R})=>{let W=k.ranges;return k.prevSize!==0&&(W=[...k.ranges,{startIndex:k.prevIndex,endIndex:F+x-1,size:k.prevSize}]),{ranges:W,prevIndex:F+x,prevSize:R}},{ranges:O,prevIndex:x,prevSize:0}).ranges}return Er(E.sizeTree).reduce((N,{k:L,v:_})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:L+x-1,size:N.prevSize}],prevIndex:L+x,prevSize:_}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Gt(U(i,we(m,h),oe(([x,{offsetTree:E},C])=>{const O=-x;return vs(O,E,C)})));return ce(U(i,we(m,h),oe(([x,E,C])=>{if(E.groupIndices.length>0){if(Be(E.sizeTree))return E;let I=mo();const N=Ot(y);let L=0,_=0,j=0;for(;L<-x;){j=N[_];const k=N[_+1]-j-1;_++,L+=k+1}if(I=Er(E.sizeTree).reduce((k,{k:F,v:R})=>qt(k,Math.max(0,F+x),R),I),L!==-x){const k=ys(E.sizeTree,j);I=qt(I,0,k);const F=rn(E.sizeTree,-x+1)[1];I=qt(I,1,F)}return{...E,sizeTree:I,...Dc(E.offsetTree,0,I,C)}}else{const I=Er(E.sizeTree).reduce((N,{k:L,v:_})=>qt(N,Math.max(0,L+x),_),mo());return{...E,sizeTree:I,...Dc(E.offsetTree,0,I,C)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:b,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},Ge(tr,Ac),{singleton:!0}),yC=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function bm(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!yC)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const bs=Ae(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Ce(),p=Ce(),m=K(0);let y=null,v=null,b=null;function g(){y&&(y(),y=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ce(U(h,we(e,s,t,m,l,c,d),we(r,u,f),oe(([[T,x,E,C,O,I,N,L],_,j,D])=>{const k=bm(T),{align:F,behavior:R,offset:W}=k,q=C-1,P=ym(k,x,q);let V=vs(P,x.offsetTree,_)+I;F==="end"?(V+=j+rn(x.sizeTree,P)[1]-E+D,P===q&&(V+=N)):F==="center"?V+=(j+rn(x.sizeTree,P)[1]-E+D)/2:V-=O,W&&(V+=W);const Q=ie=>{g(),ie?(L("retrying to scroll to",{location:T},Yt.DEBUG),be(h,T)):(be(p,!0),L("list did not change, scroll successful",{},Yt.DEBUG))};if(g(),R==="smooth"){let ie=!1;b=Le(n,ee=>{ie=ie||ee}),y=hn(a,()=>{Q(ie)})}else y=hn(U(n,vC(150)),Q);return v=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:P,top:V,behavior:R},Yt.DEBUG),{top:V,behavior:R}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ge(yn,Mt,tr),{singleton:!0});function vC(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ws="up",xs="down",bC="none",wC={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},xC=0,Ss=Ae(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=K(!1),a=K(!0),l=Ce(),c=Ce(),u=K(4),f=K(xC),d=kt(U(sm(U(ge(t),po(1),pn(!0)),U(ge(t),po(1),pn(!1),om(100))),Ye()),!1),h=kt(U(sm(U(s,pn(!0)),U(s,pn(!1),om(200))),Ye()),!1);ce(U(yt(ge(t),ge(f)),oe(([b,g])=>b<=g),Ye()),a),ce(U(a,er(50)),c);const p=Gt(U(yt(e,ge(n),ge(r),ge(o),ge(u)),mn((b,[{scrollTop:g,scrollHeight:T},x,E,C,O])=>{const I=g+x-T>-O,N={viewportHeight:x,scrollTop:g,scrollHeight:T};if(I){let _,j;return g>b.state.scrollTop?(_="SCROLLED_DOWN",j=b.state.scrollTop-g):(_="SIZE_DECREASED",j=b.state.scrollTop-g||b.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:_,scrollTopDelta:j}}let L;return N.scrollHeight>b.state.scrollHeight?L="SIZE_INCREASED":x<b.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<b.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:N}},wC),Ye((b,g)=>b&&b.atBottom===g.atBottom))),m=kt(U(e,mn((b,{scrollTop:g,scrollHeight:T,viewportHeight:x})=>{if(am(b.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+x)<1;return b.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:b.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(b=>b.changed),oe(b=>b.jump)),0);ce(U(p,oe(b=>b.atBottom)),i),ce(U(i,er(50)),l);const y=K(xs);ce(U(e,oe(({scrollTop:b})=>b),Ye(),mn((b,g)=>Ot(h)?{direction:b.direction,prevScrollTop:g}:{direction:g<b.prevScrollTop?ws:xs,prevScrollTop:g},{direction:xs,prevScrollTop:0}),oe(b=>b.direction)),y),ce(U(e,er(50),pn(bC)),y);const v=K(0);return ce(U(d,pe(b=>!b),pn(0)),v),ce(U(t,er(100),we(d),pe(([b,g])=>!!g),mn(([b,g],[T])=>[g,T],[0,0]),oe(([b,g])=>g-b)),v),{isScrolling:d,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},Ge(Mt)),nr=Ae(([{log:e}])=>{const t=K(!1),n=Gt(U(t,pe(r=>r),Ye()));return Le(t,r=>{r&&Ot(e)("props updated",{},Yt.DEBUG)}),{propsReady:t,didMount:n}},Ge(tr),{singleton:!0});function Mc(e,t){e==0?t():requestAnimationFrame(()=>Mc(e-1,t))}function Nc(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ts=Ae(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=K(!0),l=K(0),c=K(!0);return ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),a),ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),c),Le(U(yt(t,i),we(a,e,n,c),pe(([[,u],f,{sizeTree:d},h,p])=>u&&(!Be(d)||Sc(h))&&!f&&!p),we(l)),([,u])=>{hn(s,()=>{be(c,!0)}),Mc(4,()=>{hn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ge(yn,Mt,bs,nr),{singleton:!0});function wm(e){return e?e==="smooth"?"smooth":"auto":!1}const SC=(e,t)=>typeof e=="function"?wm(e(t)):t&&wm(e),TC=Ae(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=K(!1),f=Ce();let d=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}Le(U(yt(U(ge(e),po(1)),a),we(ge(u),n,s,c),oe(([[m,y],v,b,g,T])=>{let x=y&&g,E="auto";return x&&(E=SC(v,b||T),x=x&&!!E),{totalCount:m,shouldFollow:x,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=hn(t,()=>{Ot(l)("following output to ",{totalCount:m},Yt.DEBUG),h(y),d=null})});function p(m){const y=hn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(Ot(l)("scrolling to bottom due to increased size",{},Yt.DEBUG),h("auto"))});setTimeout(y,100)}return Le(U(yt(ge(u),e,i),pe(([m,,y])=>m&&y),mn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Ot(s)&&p(m!==!1)}),Le(f,()=>{p(Ot(u)!==!1)}),Le(yt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},Ge(yn,Ss,bs,Ts,nr,tr,Mt));function EC(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const xm=Ae(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Gt(U(s,oe(EC)));return ce(U(a,oe(l=>l.totalCount)),e),ce(U(a,oe(l=>l.groupIndices)),t),ce(U(yt(r,n,o),pe(([l,c])=>Yi(c)),oe(([l,c,u])=>rn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ye(),oe(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ge(yn,Mt));function Es(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function Sm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const qi="top",Ki="bottom",Tm="none";function Em(e,t,n){return typeof e=="number"?n===ws&&t===qi||n===xs&&t===Ki?e:0:n===ws?t===qi?e.main:e.reverse:t===Ki?e.main:e.reverse}function Cm(e,t){return typeof e=="number"?e:e[t]||0}const Fc=Ae(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=K(0),a=K(0),l=K(0),c=kt(U(yt(ge(e),ge(t),ge(r),ge(s,Es),ge(l),ge(i),ge(o),ge(n),ge(a)),oe(([u,f,d,[h,p],m,y,v,b,g])=>{const T=u-b,x=y+v,E=Math.max(d-T,0);let C=Tm;const O=Cm(g,qi),I=Cm(g,Ki);return h-=b,h+=d+v,p+=d+v,p-=b,h>u+x-O&&(C=ws),p<u-E+f+I&&(C=xs),C!==Tm?[Math.max(T-d-Em(m,qi,C)-O,0),T-E-v+f+Em(m,Ki,C)+I]:null}),pe(u=>u!=null),Ye(Es)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ge(Mt),{singleton:!0});function CC(e,t,n){if(Yi(t)){const r=vm(e,t);return[{index:rn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Lc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Pm(e,t,n){if(e.length===0)return[];if(!Yi(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Ui(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Zi(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,d=a+f*i+(f-1)*r,h=c,p=d-u;return{items:Pm(e,o,s),topItems:Pm(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Om(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Nc(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return Zi(c,[],a,o,n,r)}const Cr=Ae(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=K([]),y=K(0),v=Ce();ce(s.topItemsIndexes,m);const b=kt(U(yt(h,p,ge(i,Es),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,C,,O,,,,,,,I])=>{const N=I&&I.length!==O;return E&&!C&&!N}),oe(([,,[E,C],O,I,N,L,_,j,D,k])=>{const F=I,{sizeTree:R,offsetTree:W}=F,q=Ot(y);if(O===0)return{...Lc,totalCount:O};if(E===0&&C===0)return q===0?{...Lc,totalCount:O}:Om(q,N,I,j,D,k||[]);if(Be(R))return q>0?null:Zi(CC(Nc(N,O),F,k),[],O,D,F,j);const P=[];if(_.length>0){const H=_[0],A=_[_.length-1];let $=0;for(const z of Ui(R,H,A)){const Y=z.value,Z=Math.max(z.start,H),de=Math.min(z.end,A);for(let B=Z;B<=de;B++)P.push({index:B,size:Y,offset:$,data:k&&k[B]}),$+=Y}}if(!L)return Zi([],P,O,D,F,j);const V=_.length>0?_[_.length-1]+1:0,Q=dC(W,E,C,V);if(Q.length===0)return null;const ie=O-1,ee=Wi([],H=>{for(const A of Q){const $=A.value;let z=$.offset,Y=A.start;const Z=$.size;if($.offset<E){Y+=Math.floor((E-$.offset+D)/(Z+D));const B=Y-A.start;z+=B*Z+B*D}Y<V&&(z+=(V-Y)*Z,Y=V);const de=Math.min(A.end,ie);for(let B=Y;B<=de&&!(z>=C);B++)H.push({index:B,size:Z,offset:z,data:k&&k[B]}),z+=Z+D}});return Zi(ee,P,O,D,F,j)}),pe(E=>E!==null),Ye()),Lc);ce(U(n,pe(Sc),oe(E=>E==null?void 0:E.length)),t),ce(U(b,oe(E=>E.topListHeight)),f),ce(f,l),ce(U(b,oe(E=>[E.top,E.bottom])),a),ce(U(b,oe(E=>E.items)),v);const g=Gt(U(b,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},C])=>E[E.length-1].originalIndex===C-1),oe(([,E,C])=>[E-1,C]),Ye(Es),oe(([E])=>E))),T=Gt(U(b,er(200),pe(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),oe(({items:E})=>E[0].index),Ye())),x=Gt(U(b,pe(({items:E})=>E.length>0),oe(({items:E})=>{let C=0,O=E.length-1;for(;E[C].type==="group"&&C<O;)C++;for(;E[O].type==="group"&&O>C;)O--;return{startIndex:E[C].index,endIndex:E[O].index}}),Ye(Sm)));return{listState:b,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:x,itemsRendered:v,initialItemCount:y,...d}},Ge(yn,xm,Fc,Ts,bs,Ss,nr,Ac),{singleton:!0}),PC=Ae(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ce(U(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),oe(([[,l],c,u,f,d,h=[]])=>Om(l,c,u,f,d,h))),i),{}),Ge(yn,Ts,Cr,nr),{singleton:!0}),km=Ae(([{scrollVelocity:e}])=>{const t=K(!1),n=Ce(),r=K(!1);return ce(U(e,we(r,t,n),pe(([o,s])=>!!s),oe(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Ye()),t),Le(U(yt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ge(Ss),{singleton:!0}),OC=Ae(([{topItemsIndexes:e}])=>{const t=K(0);return ce(U(t,pe(n=>n>0),oe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ge(Cr)),_m=Ae(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=kt(U(yt(e,r,t,n,o),oe(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ce(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ge(Mt,Cr),{singleton:!0});function Am(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const kC=Am(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_C=Ae(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Gt(U(l,we(a),mn(([,v,b,g],[{items:T,totalCount:x,bottom:E,offsetBottom:C},O])=>{const I=E+C;let N=0;return b===x&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(N=I-g,N!==0&&(N+=O))),[N,T,x,I]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,b,g,,,T])=>!T&&!g&&v!==0&&b===ws),oe(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},Yt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return Le(U(m,we(n,o)),([v,b,g])=>{g&&kC()?be(n,b-v):y(-v)}),Le(U(yt(kt(o,!1),n,p),pe(([v,b,g])=>!v&&!g&&b!==0),oe(([v,b])=>b),er(1)),y),ce(U(u,oe(v=>({top:-v}))),e),Le(U(c,we(f,d),oe(([v,{lastSize:b,groupIndices:g,sizeTree:T},x])=>{function E(C){return C*(b+x)}if(g.length===0)return E(v);{let C=0;const O=ys(T,0);let I=0,N=0;for(;I<v;){I++,C+=O;let L=g.length===N+1?1/0:g[N+1]-g[N]-1;I+L>v&&(C-=O,L=v-I+1),I+=L,C+=E(L),N++}return C}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ge(Mt,Ss,Cr,yn,tr,Ac)),AC=Ae(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=K(0);return Le(U(e,we(r),pe(([,o])=>o!==0),oe(([,o])=>({top:o}))),o=>{hn(U(n,po(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ge(nr,Mt,Cr),{singleton:!0}),IC=Ae(([{viewportHeight:e},{totalListHeight:t}])=>{const n=K(!1),r=kt(U(yt(n,e,t),pe(([o])=>o),oe(([,o,s])=>Math.max(0,o-s)),er(0),Ye()),0);return{alignToBottom:n,paddingTopAddition:r}},Ge(Mt,_m),{singleton:!0}),Vc=Ae(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=K(!1),i=K(void 0);return ce(U(yt(n,r),oe(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ce(U(e,we(r),oe(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ge(Mt)),DC=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,MC=Ae(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ce(U(u,we(e,o,t,s,i,a,r),we(n),oe(([[f,d,h,p,m,y,v,b],g])=>{const{done:T,behavior:x,align:E,calculateViewLocation:C=DC,...O}=f,I=ym(f,d,p-1),N=vs(I,d.offsetTree,g)+m+y,L=N+rn(d.sizeTree,I)[1],_=b+y,j=b+h-v,D=C({itemTop:N,itemBottom:L,viewportTop:_,viewportBottom:j,locationParams:{behavior:x,align:E,...O}});return D?T&&hn(U(l,pe(k=>k===!1),po(Ot(l)?1:2)),T):T&&T(),D}),pe(f=>f!==null)),c),{scrollIntoView:u}},Ge(yn,Mt,bs,Cr,tr),{singleton:!0}),NC=Ae(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=K(void 0),f=K(null),d=K(null);return ce(a,f),ce(l,d),Le(U(c,we(e,n,i,f,d,r)),([h,p,m,y,v,b,g])=>{const T=mC(p.sizeTree);y&&v!==null&&b!==null&&(m=v.scrollTop-b.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ce(U(u,pe(Sc),oe(FC)),o),ce(U(s,we(u),pe(([,h])=>h!==void 0),Ye(),oe(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ge(yn,Mt,Ts,nr,Vc));function FC(e){return{offset:e.scrollTop,index:0,align:"start"}}const LC=Ae(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ge(Fc,PC,nr,km,_m,AC,IC,Vc,MC,tr)),Im=Ae(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:b,topItemsIndexes:g,...T},{scrollToIndex:x},E,{topItemCount:C},{groupCounts:O},I])=>(ce(T.rangeChanged,I.scrollSeekRangeChanged),ce(U(I.windowViewportRect,oe(N=>N.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:b,scrollToIndex:x,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:f,...y}),Ge(yn,Ts,Mt,NC,TC,Cr,bs,_C,OC,xm,LC)),Rc="-webkit-sticky",Dm="sticky",Mm=Am(()=>{if(typeof document>"u")return Dm;const e=document.createElement("div");return e.style.position=Rc,e.style.position===Rc?Rc:Dm});function $c(e,t){const n=w.useRef(null),r=w.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const d=t.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Cc(r),i=w.useCallback(()=>{r(s.current)},[r,s]);return w.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Xi=w.createContext(void 0),Nm=w.createContext(void 0);function jc(e){return e}const VC=Ae(([e,t])=>({...e,...t}),Ge(Im,Ae(()=>{const e=K(l=>`Item ${l}`),t=K(null),n=K(l=>`Group ${l}`),r=K({}),o=K(jc),s=K("div"),i=K(Tr),a=(l,c=null)=>kt(U(r,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),RC=({height:e})=>w.createElement("div",{style:{height:e}}),$C={position:Mm(),zIndex:1,overflowAnchor:"none"},jC={overflowAnchor:"none"},Fm=w.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Zt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Zt("windowScrollContainerState"),a=Zt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),f=Te("groupContent"),d=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=Zt("gap"),{callbackRef:y}=im(r,h,d,t?Tr:l,p,m,s),[v,b]=w.useState(0);zc("deviation",D=>{v!==D&&b(D)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||RC,x=Te("ListComponent"),E=Te("ItemComponent"),C=Te("GroupComponent"),O=Te("computeItemKey"),I=Te("isSeeking"),N=Te("groupIndices").length>0,L=Te("alignToBottom"),_=Te("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:L?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?w.createElement(g,et(g,u)):w.createElement(x,{...et(x,u),ref:y,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const k=D.originalIndex,F=O(k+n.firstItemIndex,D.data,u);return I?w.createElement(T,{...et(T,u),key:F,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?w.createElement(C,{...et(C,u),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,style:$C},f(D.index,u)):w.createElement(E,{...et(E,u),...Lm(E,D.data),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,style:jC},N?c(D.index,D.groupIndex,D.data,u):c(D.index,D.data,u))}))}),BC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),WC={width:"100%",position:Mm(),top:0,zIndex:1};function et(e,t){if(typeof e!="string")return{context:t}}function Lm(e,t){return{item:typeof e=="string"?void 0:t}}const zC=w.memo(function(){const t=Te("HeaderComponent"),n=Zt("headerHeight"),r=Te("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),HC=w.memo(function(){const t=Te("FooterComponent"),n=Zt("footerHeight"),r=Te("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null});function Bc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=lm(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),w.createElement(c,{ref:h,style:{...BC,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...et(c,d)},i)})}function Wc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return w.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=lm(l,u,c,Tr,h);return eC(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),w.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...et(c,p)},i)})}const UC=({children:e})=>{const t=w.useContext(Xi),n=Zt("viewportHeight"),r=Zt("fixedItemHeight"),o=Te("alignToBottom"),s=gn(w.useMemo(()=>ms(n,i=>nn(i,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:go(o),ref:s,"data-viewport-type":"element"},e)},GC=({children:e})=>{const t=w.useContext(Xi),n=Zt("windowViewportRect"),r=Zt("fixedItemHeight"),o=Te("customScrollParent"),s=$c(n,o),i=Te("alignToBottom");return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:go(i),"data-viewport-type":"window"},e)},YC=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...WC,marginTop:`${n}px`},o=Te("context");return w.createElement(t,{style:r,...et(t,o)},e)},qC=w.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?XC:ZC,i=o||n?GC:UC;return w.createElement(s,{...t},r&&w.createElement(YC,null,w.createElement(Fm,{showTopList:!0})),w.createElement(i,null,w.createElement(zC,null),w.createElement(Fm,null),w.createElement(HC,null)))}),{Component:KC,usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}=Ec(VC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},qC),ZC=Bc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),XC=Wc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),QC=KC,Vm={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},JC={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Rm,ceil:$m,floor:Qi,min:Hc,max:Cs}=Math;function eP(e){return{...JC,items:e}}function jm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function tP(e,t){return e&&e.column===t.column&&e.row===t.row}function Ji(e,t){return e&&e.width===t.width&&e.height===t.height}const nP=Ae(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,windowScrollTo:g},T])=>{const x=K(0),E=K(0),C=K(Vm),O=K({height:0,width:0}),I=K({height:0,width:0}),N=Ce(),L=Ce(),_=K(0),j=K(null),D=K({row:0,column:0}),k=Ce(),F=Ce(),R=K(!1),W=K(0),q=K(!0),P=K(!1);Le(U(p,we(W),pe(([A,$])=>!!$)),()=>{be(q,!1),be(E,0)}),Le(U(yt(p,q,I,O,W,P),pe(([A,$,z,Y,,Z])=>A&&!$&&z.height!==0&&Y.height!==0&&!Z)),([,,,,A])=>{be(P,!0),Mc(1,()=>{be(N,A)}),hn(U(r),()=>{be(n,[0,0]),be(q,!0)})}),ce(U(F,pe(A=>A!=null&&A.scrollTop>0),pn(0)),E),Le(U(p,we(F),pe(([,A])=>A!=null)),([,A])=>{A&&(be(O,A.viewport),be(I,A==null?void 0:A.item),be(D,A.gap),A.scrollTop>0&&(be(R,!0),hn(U(r,po(1)),$=>{be(R,!1)}),be(i,{top:A.scrollTop})))}),ce(U(O,oe(({height:A})=>A)),o),ce(U(yt(ge(O,Ji),ge(I,Ji),ge(D,(A,$)=>A&&A.column===$.column&&A.row===$.row),ge(r)),oe(([A,$,z,Y])=>({viewport:A,item:$,gap:z,scrollTop:Y}))),k),ce(U(yt(ge(x),t,ge(D,tP),ge(I,Ji),ge(O,Ji),ge(j),ge(E),ge(R),ge(q),ge(W)),pe(([,,,,,,,A])=>!A),oe(([A,[$,z],Y,Z,de,B,Me,,rt,He])=>{const{row:ot,column:ue}=Y,{height:Ee,width:le}=Z,{width:Oe}=de;if(Me===0&&(A===0||Oe===0))return Vm;if(le===0){const Lt=Nc(He,A),jr=Lt===0?Math.max(Me-1,0):Lt;return eP(jm(Lt,jr,B))}const ut=Wm(Oe,le,ue);let ke,ft;rt?$===0&&z===0&&Me>0?(ke=0,ft=Me-1):(ke=ut*Qi(($+ot)/(Ee+ot)),ft=ut*$m((z+ot)/(Ee+ot))-1,ft=Hc(A-1,Cs(ft,ut-1)),ke=Hc(ft,Cs(0,ke))):(ke=0,ft=-1);const X=jm(ke,ft,B),{top:se,bottom:_e}=Bm(de,Y,Z,X),Ke=$m(A/ut),At=Ke*Ee+(Ke-1)*ot-_e;return{items:X,offsetTop:se,offsetBottom:At,top:se,bottom:_e,itemHeight:Ee,itemWidth:le}})),C),ce(U(j,pe(A=>A!==null),oe(A=>A.length)),x),ce(U(yt(O,I,C,D),pe(([A,$,{items:z}])=>z.length>0&&$.height!==0&&A.height!==0),oe(([A,$,{items:z},Y])=>{const{top:Z,bottom:de}=Bm(A,Y,$,z);return[Z,de]}),Ye(Es)),n);const V=K(!1);ce(U(r,we(V),oe(([A,$])=>$||A!==0)),V);const Q=Gt(U(ge(C),pe(({items:A})=>A.length>0),we(x,V),pe(([{items:A},$,z])=>z&&A[A.length-1].index===$-1),oe(([,A])=>A-1),Ye())),ie=Gt(U(ge(C),pe(({items:A})=>A.length>0&&A[0].index===0),pn(0),Ye())),ee=Gt(U(ge(C),we(R),pe(([{items:A},$])=>A.length>0&&!$),oe(([{items:A}])=>({startIndex:A[0].index,endIndex:A[A.length-1].index})),Ye(Sm),er(0)));ce(ee,d.scrollSeekRangeChanged),ce(U(N,we(O,I,x,D),oe(([A,$,z,Y,Z])=>{const de=bm(A),{align:B,behavior:Me,offset:rt}=de;let He=de.index;He==="LAST"&&(He=Y-1),He=Cs(0,He,Hc(Y-1,He));let ot=Uc($,Z,z,He);return B==="end"?ot=Rm(ot-$.height+z.height):B==="center"&&(ot=Rm(ot-$.height/2+z.height/2)),rt&&(ot+=rt),{top:ot,behavior:Me}})),i);const H=kt(U(C,oe(A=>A.offsetBottom+A.bottom)),0);return ce(U(m,oe(A=>({width:A.visibleWidth,height:A.visibleHeight}))),O),{data:j,totalCount:x,viewportDimensions:O,itemDimensions:I,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:b,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:D,restoreStateFrom:F,...d,initialTopMostItemIndex:W,gridState:C,totalListHeight:H,...f,startReached:ie,endReached:Q,rangeChanged:ee,stateChanged:k,propsReady:h,stateRestoreInProgress:R,...T}},Ge(Fc,Mt,Ss,km,nr,Vc,tr));function Bm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Uc(e,t,n,r[0].index),i=Uc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Uc(e,t,n,r){const o=Wm(e.width,n.width,t.column),s=Qi(r/o),i=s*n.height+Cs(0,s-1)*t.row;return i>0?i+t.row:i}function Wm(e,t,n){return Cs(1,Qi((e+n)/(Qi(t)+n)))}const rP=Ae(([e,t])=>({...e,...t}),Ge(nP,Ae(()=>{const e=K(c=>`Item ${c}`),t=K({}),n=K(null),r=K("virtuoso-grid-item"),o=K("virtuoso-grid-list"),s=K(jc),i=K("div"),a=K(Tr),l=(c,u=null)=>kt(U(t,oe(f=>f[c]),Ye()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),oP=w.memo(function(){const t=Qe("gridState"),n=Qe("listClassName"),r=Qe("itemClassName"),o=Qe("itemContent"),s=Qe("computeItemKey"),i=Qe("isSeeking"),a=on("scrollHeight"),l=Qe("ItemComponent"),c=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),f=Qe("context"),d=on("itemDimensions"),h=on("gap"),p=Qe("log"),m=Qe("stateRestoreInProgress"),y=gn(w.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;a(b);const g=v.firstChild;if(g){const{width:T,height:x}=g.getBoundingClientRect();d({width:T,height:x})}h({row:Hm("row-gap",getComputedStyle(v).rowGap,p),column:Hm("column-gap",getComputedStyle(v).columnGap,p)})},[a,d,h,p]));return m?null:w.createElement(c,{ref:y,className:n,...et(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const b=s(v.index,v.data,f);return i?w.createElement(u,{key:b,...et(u,f),index:v.index,height:t.itemHeight,width:t.itemWidth}):w.createElement(l,{...et(l,f),className:r,"data-index":v.index,key:b},o(v.index,v.data,f))}))}),sP=w.memo(function(){const t=Qe("HeaderComponent"),n=on("headerHeight"),r=Qe("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),iP=w.memo(function(){const t=Qe("FooterComponent"),n=on("footerHeight"),r=Qe("headerFooterTag"),o=gn(w.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?w.createElement(r,{ref:o},w.createElement(t,et(t,s))):null}),aP=({children:e})=>{const t=w.useContext(Nm),n=on("itemDimensions"),r=on("viewportDimensions"),o=gn(w.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return w.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),w.createElement("div",{style:go(!1),ref:o},e)},lP=({children:e})=>{const t=w.useContext(Nm),n=on("windowViewportRect"),r=on("itemDimensions"),o=Qe("customScrollParent"),s=$c(n,o);return w.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),w.createElement("div",{ref:s,style:go(!1)},e)},cP=w.memo(function({...t}){const n=Qe("useWindowScroll"),r=Qe("customScrollParent"),o=r||n?fP:uP,s=r||n?lP:aP;return w.createElement(o,{...t},w.createElement(s,null,w.createElement(sP,null),w.createElement(oP,null),w.createElement(iP,null)))}),{Component:yL,usePublisher:on,useEmitterValue:Qe,useEmitter:zm}=Ec(rP,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},cP),uP=Bc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm}),fP=Wc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm});function Hm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}const dP=Ae(([e,t])=>({...e,...t}),Ge(Im,Ae(()=>{const e=K(l=>w.createElement("td",null,"Item $",l)),t=K(null),n=K(null),r=K(null),o=K({}),s=K(jc),i=K(Tr),a=(l,c=null)=>kt(U(o,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),hP=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e}})),pP=({height:e})=>w.createElement("tr",null,w.createElement("td",{style:{height:e,padding:0,border:0}})),mP={overflowAnchor:"none"},gP=w.memo(function(){const t=Ve("listState"),n=sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),s=sn("windowScrollContainerState"),i=sn("scrollContainerState"),a=o||r?s:i,l=Ve("itemContent"),c=Ve("trackItemSizes"),u=Ve("itemSize"),f=Ve("log"),{callbackRef:d,ref:h}=im(n,u,c,a,f,void 0,o),[p,m]=w.useState(0);Gc("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=Ve("EmptyPlaceholder"),v=Ve("ScrollSeekPlaceholder")||hP,b=Ve("FillerRow")||pP,g=Ve("TableBodyComponent"),T=Ve("TableRowComponent"),x=Ve("computeItemKey"),E=Ve("isSeeking"),C=Ve("paddingTopAddition"),O=Ve("firstItemIndex"),I=Ve("statefulTotalCount"),N=Ve("context");if(I===0&&y)return w.createElement(y,et(y,N));const L=t.offsetTop+C+p,_=t.offsetBottom,j=L>0?w.createElement(b,{height:L,key:"padding-top",context:N}):null,D=_>0?w.createElement(b,{height:_,key:"padding-bottom",context:N}):null,k=t.items.map(F=>{const R=F.originalIndex,W=x(R+O,F.data,N);return E?w.createElement(v,{...et(v,N),key:W,index:F.index,height:F.size,type:F.type||"item"}):w.createElement(T,{...et(T,N),...Lm(T,F.data),key:W,"data-index":R,"data-known-size":F.size,"data-item-index":F.index,style:mP},l(F.index,F.data,N))});return w.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...et(g,N)},[j,...k,D])}),yP=({children:e})=>{const t=w.useContext(Xi),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=gn(w.useMemo(()=>ms(n,s=>nn(s,"height")),[n]));return w.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),w.createElement("div",{style:go(!1),ref:o,"data-viewport-type":"element"},e)},vP=({children:e})=>{const t=w.useContext(Xi),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ve("customScrollParent"),s=$c(n,o);return w.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),w.createElement("div",{ref:s,style:go(!1),"data-viewport-type":"window"},e)},bP=w.memo(function(t){const n=Ve("useWindowScroll"),r=Ve("customScrollParent"),o=sn("fixedHeaderHeight"),s=sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),l=Ve("context"),c=gn(w.useMemo(()=>ms(o,b=>nn(b,"height")),[o])),u=gn(w.useMemo(()=>ms(s,b=>nn(b,"height")),[s])),f=r||n?SP:xP,d=r||n?vP:yP,h=Ve("TableComponent"),p=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),y=i?w.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...et(p,l)},i()):null,v=a?w.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...et(m,l)},a()):null;return w.createElement(f,{...t},w.createElement(d,null,w.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...et(h,l)},[y,w.createElement(gP,{key:"TableBody"}),v])))}),{Component:wP,usePublisher:sn,useEmitterValue:Ve,useEmitter:Gc}=Ec(dP,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bP),xP=Bc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Gc}),SP=Wc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Gc}),TP=wP,EP=e=>{const[t,n]=w.useState(0);return w.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(console.log(o),!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},Um=({children:e,className:t="",size:n,...r})=>S.jsxs("label",{className:"font-normal flex items-center gap-2",children:[S.jsx("input",{...r,type:"checkbox",className:Rt("form-checkbox h-4 w-4 app rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border select-none",t),...r}),e]}),CP={Item:w.forwardRef(function(t,n){return S.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:w.forwardRef(function(t,n){return S.jsx("ul",{...t,ref:n,className:"space-y-3"})})},PP=e=>{const t=w.useRef(null),n=EP(t);return S.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[S.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:[S.jsx("header",{className:"border-b border-card-border pb-2"}),S.jsxs("div",{className:"px-8 space-y-2",children:[S.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),S.jsx(QC,{height:n,useWindowScroll:!0,data:e.source,components:CP,itemContent:(r,o)=>S.jsx(w.Fragment,{children:S.jsx(Um,{children:S.jsx(e.Item,{data:o})})})})]})]}),S.jsx("div",{children:S.jsx(ps,{children:S.jsx(Kd,{})})}),S.jsx("div",{})]})};function We(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function yo(e,t){const n=We(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ea(e,t){const n=We(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Gm=6048e5,OP=864e5,kP=6e4,_P=36e5,AP=1e3;let IP={};function Pr(){return IP}function vn(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=We(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function vo(e){return vn(e,{weekStartsOn:1})}function Ym(e){const t=We(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=vo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=vo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function bo(e){const t=We(e);return t.setHours(0,0,0,0),t}function ta(e){const t=We(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 DP(e,t){const n=bo(e),r=bo(t),o=+n-ta(n),s=+r-ta(r);return Math.round((o-s)/OP)}function MP(e){const t=Ym(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vo(n)}function qm(e,t){const n=t*7;return yo(e,n)}function Km(e,t){return ea(e,t*12)}function NP(e){return qe(e,Date.now())}function FP(e,t){const n=bo(e),r=bo(t);return+n==+r}function LP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VP(e){if(!LP(e)&&typeof e!="number")return!1;const t=We(e);return!isNaN(Number(t))}function Zm(e,t){const n=We(e.start),r=We(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(We(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Xm(e){const t=We(e);return t.setDate(1),t.setHours(0,0,0,0),t}function RP(e){const t=We(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $P(e,t){var a,l;const n=Pr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=We(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const jP={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"}},BP=(e,t,n)=>{let r;const o=jP[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 Yc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const WP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},HP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},UP={date:Yc({formats:WP,defaultWidth:"full"}),time:Yc({formats:zP,defaultWidth:"full"}),dateTime:Yc({formats:HP,defaultWidth:"full"})},GP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YP=(e,t,n,r)=>GP[e];function Ps(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const qP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},KP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ZP={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"]},XP={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"]},QP={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"}},JP={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"}},eO={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:Ps({values:qP,defaultWidth:"wide"}),quarter:Ps({values:KP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ps({values:ZP,defaultWidth:"wide"}),day:Ps({values:XP,defaultWidth:"wide"}),dayPeriod:Ps({values:QP,defaultWidth:"wide",formattingValues:JP,defaultFormattingWidth:"wide"})};function Os(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?nO(a,f=>f.test(i)):tO(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function tO(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rO(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const oO=/^(\d+)(th|st|nd|rd)?/i,sO=/\d+/i,iO={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},aO={any:[/^b/i,/^(a|c)/i]},lO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cO={any:[/1/i,/2/i,/3/i,/4/i]},uO={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},fO={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]},dO={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},hO={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]},pO={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},mO={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}},gO={ordinalNumber:rO({matchPattern:oO,parsePattern:sO,valueCallback:e=>parseInt(e,10)}),era:Os({matchPatterns:iO,defaultMatchWidth:"wide",parsePatterns:aO,defaultParseWidth:"any"}),quarter:Os({matchPatterns:lO,defaultMatchWidth:"wide",parsePatterns:cO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Os({matchPatterns:uO,defaultMatchWidth:"wide",parsePatterns:fO,defaultParseWidth:"any"}),day:Os({matchPatterns:dO,defaultMatchWidth:"wide",parsePatterns:hO,defaultParseWidth:"any"}),dayPeriod:Os({matchPatterns:pO,defaultMatchWidth:"any",parsePatterns:mO,defaultParseWidth:"any"})},Qm={code:"en-US",formatDistance:BP,formatLong:UP,formatRelative:YP,localize:eO,match:gO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yO(e){const t=We(e);return DP(t,RP(t))+1}function Jm(e){const t=We(e),n=+vo(t)-+MP(t);return Math.round(n/Gm)+1}function qc(e,t){var u,f,d,h;const n=We(e),r=n.getFullYear(),o=Pr(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(d=o.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=vn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=vn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function vO(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=qc(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),vn(s,t)}function eg(e,t){const n=We(e),r=+vn(n,t)-+vO(n,t);return Math.round(r/Gm)+1}function Re(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Re(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Re(n+1,2)},d(e,t){return Re(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 Re(e.getHours()%12||12,t.length)},H(e,t){return Re(e.getHours(),t.length)},m(e,t){return Re(e.getMinutes(),t.length)},s(e,t){return Re(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Re(o,t.length)}},wo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},tg={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 rr.y(e,t)},Y:function(e,t,n,r){const o=qc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Re(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Re(s,t.length)},R:function(e,t){const n=Ym(e);return Re(n,t.length)},u:function(e,t){const n=e.getFullYear();return Re(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 Re(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 Re(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 rr.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 Re(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=eg(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Re(o,t.length)},I:function(e,t,n){const r=Jm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Re(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=yO(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Re(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Re(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Re(s,t.length);case"co":return n.ordinalNumber(s,{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 Re(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=wo.noon:r===0?o=wo.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=wo.evening:r>=12?o=wo.afternoon:r>=4?o=wo.morning:o=wo.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 rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Re(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Re(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return rg(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return rg(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ng(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ng(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Re(r,t.length)},T:function(e,t,n){const r=e.getTime();return Re(r,t.length)}};function ng(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+Re(s,2)}function rg(e,t){return e%60===0?(e>0?"-":"+")+Re(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Re(Math.trunc(r/60),2),s=Re(r%60,2);return n+o+t+s}const og=(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"})}},sg=(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"})}},Kc={p:sg,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return og(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",og(r,t)).replace("{{time}}",sg(o,t))}},bO=/^D+$/,wO=/^Y+$/,xO=["D","DD","YY","YYYY"];function ig(e){return bO.test(e)}function ag(e){return wO.test(e)}function Zc(e,t,n){const r=SO(e,t,n);if(console.warn(r),xO.includes(e))throw new RangeError(r)}function SO(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 TO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CO=/^'([^]*?)'?$/,PO=/''/g,OO=/[a-zA-Z]/;function kO(e,t,n){var u,f,d,h;const r=Pr(),o=r.locale??Qm,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=We(e);if(!VP(a))throw new RangeError("Invalid time value");let l=t.match(EO).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=Kc[m];return y(p,o.formatLong)}return p}).join("").match(TO).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:_O(p)};if(tg[m])return{isToken:!0,value:p};if(m.match(OO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(ag(m)||ig(m))&&Zc(m,t,String(e));const y=tg[m[0]];return y(a,m,o.localize,c)}).join("")}function _O(e){const t=e.match(CO);return t?t[1].replace(PO,"'"):e}function AO(){return Object.assign({},Pr())}function IO(e){let n=We(e).getDay();return n===0&&(n=7),n}function DO(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const MO=10;class lg{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class NO extends lg{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class FO extends lg{constructor(){super(...arguments);ne(this,"priority",MO);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,DO(n,Date))}}class Ie{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new NO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class LO extends Ie{constructor(){super(...arguments);ne(this,"priority",140);ne(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 it={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}/},bn={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 at(e,t){return e&&{value:t(e.value),rest:e.rest}}function Je(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wn(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,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*_P+s*kP+i*AP),rest:t.slice(n[0].length)}}function cg(e){return Je(it.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Je(it.singleDigit,t);case 2:return Je(it.twoDigits,t);case 3:return Je(it.threeDigits,t);case 4:return Je(it.fourDigits,t);default:return Je(new RegExp("^\\d{1,"+e+"}"),t)}}function na(e,t){switch(e){case 1:return Je(it.singleDigitSigned,t);case 2:return Je(it.twoDigitsSigned,t);case 3:return Je(it.threeDigitsSigned,t);case 4:return Je(it.fourDigitsSigned,t);default:return Je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Xc(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 ug(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function fg(e){return e%400===0||e%4===0&&e%100!==0}class VO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return at(tt(4,n),s);case"yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=ug(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class RO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return at(tt(4,n),s);case"Yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=qc(n,s);if(o.isTwoDigitYear){const l=ug(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}}class $O extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return na(r==="R"?4:r.length,n)}set(n,r,o){const s=qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),vo(s)}}class jO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return na(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class BO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(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 tt(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 WO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(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 tt(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 zO extends Ie{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return at(Je(it.month,n),s);case"MM":return at(tt(2,n),s);case"Mo":return at(o.ordinalNumber(n,{unit:"month"}),s);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 HO extends Ie{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return at(Je(it.month,n),s);case"LL":return at(tt(2,n),s);case"Lo":return at(o.ordinalNumber(n,{unit:"month"}),s);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 UO(e,t,n){const r=We(e),o=eg(r,n)-t;return r.setDate(r.getDate()-o*7),r}class GO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Je(it.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return vn(UO(n,o,s),s)}}function YO(e,t){const n=We(e),r=Jm(n)-t;return n.setDate(n.getDate()-r*7),n}class qO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(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 Je(it.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return vo(YO(n,o))}}const KO=[31,28,31,30,31,30,31,31,30,31,30,31],ZO=[31,29,31,30,31,30,31,31,30,31,30,31];class XO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Je(it.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=fg(o),i=n.getMonth();return s?r>=1&&r<=ZO[i]:r>=1&&r<=KO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class QO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(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 Je(it.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return fg(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 Qc(e,t,n){var f,d,h,p;const r=Pr(),o=(n==null?void 0:n.weekStartsOn)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=We(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return yo(s,u)}class JO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(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,s){return n=Qc(n,o,s),n.setHours(0,0,0,0),n}}class ek extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return at(tt(r.length,n),i);case"eo":return at(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Qc(n,o,s),n.setHours(0,0,0,0),n}}class tk extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return at(tt(r.length,n),i);case"co":return at(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Qc(n,o,s),n.setHours(0,0,0,0),n}}function nk(e,t){const n=We(e),r=IO(n),o=t-r;return yo(n,o)}class rk extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return at(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return at(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return at(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return at(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"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=nk(n,o),n.setHours(0,0,0,0),n}}class ok extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Xc(o),0,0,0),n}}class sk extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Xc(o),0,0,0),n}}class ik extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Xc(o),0,0,0),n}}class ak extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Je(it.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class lk extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Je(it.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class ck extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Je(it.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 uk extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Je(it.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class fk extends Ie{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Je(it.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class dk extends Ie{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Je(it.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class hk extends Ie{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return at(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class pk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return wn(bn.basicOptionalMinutes,n);case"XX":return wn(bn.basic,n);case"XXXX":return wn(bn.basicOptionalSeconds,n);case"XXXXX":return wn(bn.extendedOptionalSeconds,n);case"XXX":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ta(n)-o)}}class mk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return wn(bn.basicOptionalMinutes,n);case"xx":return wn(bn.basic,n);case"xxxx":return wn(bn.basicOptionalSeconds,n);case"xxxxx":return wn(bn.extendedOptionalSeconds,n);case"xxx":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ta(n)-o)}}class gk extends Ie{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return cg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class yk extends Ie{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return cg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const vk={G:new LO,y:new VO,Y:new RO,R:new $O,u:new jO,Q:new BO,q:new WO,M:new zO,L:new HO,w:new GO,I:new qO,d:new XO,D:new QO,E:new JO,e:new ek,c:new tk,i:new rk,a:new ok,b:new sk,B:new ik,h:new ak,H:new lk,K:new ck,k:new uk,m:new fk,s:new dk,S:new hk,X:new pk,x:new mk,t:new gk,T:new yk},bk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xk=/^'([^]*?)'?$/,Sk=/''/g,Tk=/\S/,Ek=/[a-zA-Z]/;function Ck(e,t,n,r){var m,y,v,b;const o=AO(),s=o.locale??Qm,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((b=(v=o.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0;if(t==="")return e===""?We(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new FO],u=t.match(wk).map(g=>{const T=g[0];if(T in Kc){const x=Kc[T];return x(g,s.formatLong)}return g}).join("").match(bk),f=[];for(let g of u){ag(g)&&Zc(g,t,e),ig(g)&&Zc(g,t,e);const T=g[0],x=vk[T];if(x){const{incompatibleTokens:E}=x;if(Array.isArray(E)){const O=f.find(I=>E.includes(I.token)||I.token===T);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${g}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:T,fullToken:g});const C=x.run(e,g,s.match,l);if(!C)return qe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(Ek))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=Pk(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&Tk.test(e))return qe(n,NaN);const d=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,x)=>x.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,x)=>x.subPriority-T.subPriority)).map(g=>g[0]);let h=We(n);if(isNaN(h.getTime()))return qe(n,NaN);const p={};for(const g of d){if(!g.validate(h,l))return qe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return qe(n,h)}function Pk(e){return e.match(xk)[1].replace(Sk,"'")}function Ok(e,t){const n=We(e),r=We(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function kk(e){return FP(e,NP(e))}function _k(e,t){return yo(e,-t)}function dg(e,t){return ea(e,-t)}function Ak(e,t){return qm(e,-t)}function Ik(e,t){return Km(e,-t)}const xo=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),ra=w.createContext({}),oa=w.createContext(null),Jc=typeof document<"u",sa=Jc?w.useLayoutEffect:w.useEffect,hg=w.createContext({strict:!1}),ia=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),pg="data-"+ia("framerAppearId"),Dk={skipAnimations:!1,useManualTiming:!1};function Mk(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const h=f&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const aa=["read","resolveKeyframes","update","preRender","render","postRender"],Nk=40;function mg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=aa.reduce((v,b)=>(v[b]=Mk(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,Nk),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:aa.reduce((v,b)=>{const g=i[b];return v[b]=(T,x=!1,E=!1)=>(n||p(),g.schedule(T,x,E)),v},{}),cancel:v=>{for(let b=0;b<aa.length;b++)i[aa[b]].cancel(v)},state:o,steps:i}}const{schedule:eu,cancel:SL}=mg(queueMicrotask,!1);function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const gg=w.createContext({});let yg=!1;function Fk(e,t,n,r,o){const{visualElement:s}=w.useContext(ra),i=w.useContext(hg),a=w.useContext(oa),l=w.useContext(xo).reducedMotion,c=w.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=w.useContext(gg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Vk(c.current,n,o,f),w.useInsertionEffect(()=>{u&&u.update(n,a)});const d=w.useRef(!!(n[pg]&&!window.HandoffComplete));return sa(()=>{u&&(u.updateFeatures(),eu.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,yg||(yg=!0,queueMicrotask(Lk))))}),u}function Lk(){window.HandoffComplete=!0}function Vk(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vg(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&So(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function vg(e){if(e)return e.options.allowProjection!==!1?e.projection:vg(e.parent)}function Rk(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}function ks(e){return typeof e=="string"||Array.isArray(e)}function _s(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const tu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nu=["initial",...tu];function la(e){return _s(e.animate)||nu.some(t=>ks(e[t]))}function bg(e){return!!(la(e)||e.variants)}function $k(e,t){if(la(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function jk(e){const{initial:t,animate:n}=$k(e,w.useContext(ra));return w.useMemo(()=>({initial:t,animate:n}),[wg(t),wg(n)])}function wg(e){return Array.isArray(e)?e.join(" "):e}const xg={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"]},To={};for(const e in xg)To[e]={isEnabled:t=>xg[e].some(n=>!!t[n])};function Bk(e){for(const t in e)To[t]={...To[t],...e[t]}}const As=w.createContext({}),Wk=Symbol.for("motionComponentSymbol"),bt=e=>e;let Eo=bt,an=bt;process.env.NODE_ENV!=="production"&&(Eo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});function zk({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&Bk(e);function s(a,l){let c;const u={...w.useContext(xo),...a,layoutId:Hk(a)},{isStatic:f}=u,d=jk(a),h=r(a,f);if(!f&&Jc){Uk(u,e);const p=Gk(u);c=p.MeasureLayout,d.visualElement=Fk(o,h,u,t,p.ProjectionNode)}return S.jsxs(ra.Provider,{value:d,children:[c&&d.visualElement?S.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,Rk(h,d.visualElement,l),h,f,d.visualElement)]})}const i=w.forwardRef(s);return i[Wk]=o,i}function Hk({layoutId:e}){const t=w.useContext(As).id;return t&&e!==void 0?t+"-"+e:e}function Uk(e,t){const n=w.useContext(hg).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?Eo(!1,r):an(!1,r)}}function Gk(e){const{drag:t,layout:n}=To;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}}function Yk(e){function t(r,o={}){return zk(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const qk=["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 ru(e){return typeof e!="string"||e.includes("-")?!1:!!(qk.indexOf(e)>-1||/[A-Z]/u.test(e))}const ca={};function Kk(e){Object.assign(ca,e)}const Is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(Is);function Sg(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ca[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),Zk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xk=Is.length;function Qk(e,t,n){let r="";for(let o=0;o<Xk;o++){const s=Is[o];if(e[s]!==void 0){const i=Zk[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Tg=e=>t=>typeof t=="string"&&t.startsWith(e),Eg=Tg("--"),Jk=Tg("var(--"),ou=e=>Jk(e)?e_.test(e.split("/*")[0].trim()):!1,e_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,t_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,sr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ds={...Co,transform:e=>sr(0,1,e)},ua={...Co,default:1},Ms=e=>Math.round(e*1e5)/1e5,su=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,n_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,r_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ns(e){return typeof e=="string"}function o_(e){return e==null}const Fs=e=>({test:t=>Ns(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=Fs("deg"),xn=Fs("%"),fe=Fs("px"),s_=Fs("vh"),i_=Fs("vw"),Cg={...xn,parse:e=>xn.parse(e)/100,transform:e=>xn.transform(e*100)},Pg={...Co,transform:Math.round},Og={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:ua,scaleX:ua,scaleY:ua,scaleZ:ua,skew:ir,skewX:ir,skewY:ir,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Ds,originX:Cg,originY:Cg,originZ:fe,zIndex:Pg,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:Ds,strokeOpacity:Ds,numOctaves:Pg};function iu(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(Eg(u)){o[u]=f;continue}const d=Og[u],h=t_(f,d);if(or.has(u)){if(a=!0,s[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=Qk(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=i;r.transformOrigin=`${u} ${f} ${d}`}}const au=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function kg(e,t,n){for(const r in t)!wt(t[r])&&!Sg(r,n)&&(e[r]=t[r])}function a_({transformTemplate:e},t){return w.useMemo(()=>{const n=au();return iu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function l_(e,t){const n=e.style||{},r={};return kg(r,n,e),Object.assign(r,a_(e,t)),r}function c_(e,t){const n={},r=l_(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 u_=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 fa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||u_.has(e)}let _g=e=>!fa(e);function Ag(e){e&&(_g=t=>t.startsWith("on")?!fa(t):e(t))}try{Ag(require("@emotion/is-prop-valid").default)}catch{}function f_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(_g(o)||n===!0&&fa(o)||!t&&!fa(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ig(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function d_(e,t,n){const r=Ig(t,e.x,e.width),o=Ig(n,e.y,e.height);return`${r} ${o}`}const h_={offset:"stroke-dashoffset",array:"stroke-dasharray"},p_={offset:"strokeDashoffset",array:"strokeDasharray"};function m_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?h_:p_;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function lu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(iu(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:p}=e;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=d_(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&m_(d,i,a,l,!1)}const Dg=()=>({...au(),attrs:{}}),cu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function g_(e,t,n,r){const o=w.useMemo(()=>{const s=Dg();return lu(s,t,cu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};kg(s,e.style,e),o.style={...s,...o.style}}return o}function y_(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(ru(n)?g_:c_)(r,s,i,n),c=f_(r,typeof n=="string",e),u=n!==w.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=w.useMemo(()=>wt(f)?f.get():f,[f]);return w.createElement(n,{...u,children:d})}}function Mg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Ng=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 Fg(e,t,n,r){Mg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ng.has(o)?o:ia(o),t.attrs[o])}function uu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||Sg(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Lg(e,t,n){const r=uu(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=Is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Vg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fu(e,t,n,r){if(typeof t=="function"){const[o,s]=Vg(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Vg(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function ar(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const du=e=>Array.isArray(e),v_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),b_=e=>du(e)?e[e.length-1]||0:e;function da(e){const t=wt(e)?e.get():e;return v_(t)?t.toValue():t}const Rg=new Set(["opacity","clipPath","filter","transform"]);function $g(e){if(or.has(e))return"transform";if(Rg.has(e))return ia(e)}function ha(e,t){e.indexOf(t)===-1&&e.push(t)}function pa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function w_([...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,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function x_({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:T_(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const jg=e=>(t,n)=>{const r=w.useContext(ra),o=w.useContext(oa),s=()=>x_(e,t,r,o,n);return n?s():ar(s)};function S_(e,t){const n=$g(t);n&&ha(e,n)}function Bg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=fu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function T_(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=da(c[y]);let{initial:u,animate:f}=e;const d=la(e),h=bg(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!_s(m)&&Bg(e,m,(y,v)=>{for(const b in y){let g=y[b];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(i[b]=g)}for(const b in v)i[b]=v[b]}),l&&(f&&u!==!1&&!_s(f)&&Bg(e,f,y=>{for(const v in y)S_(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:De,cancel:Sn,state:xt,steps:hu}=mg(typeof requestAnimationFrame<"u"?requestAnimationFrame:bt,!0),E_={useVisualState:jg({scrapeMotionValuesFromProps:Lg,createRenderState:Dg,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{lu(n,r,cu(t.tagName),e.transformTemplate),Fg(t,n)})}})},C_={useVisualState:jg({applyWillChange:!0,scrapeMotionValuesFromProps:uu,createRenderState:au})};function P_(e,{forwardMotionProps:t=!1},n,r){return{...ru(e)?E_:C_,preloadedFeatures:n,useRender:y_(t),createVisualElement:r,Component:e}}function An(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Wg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ma(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const O_=e=>t=>Wg(t)&&e(t,ma(t));function In(e,t,n,r){return An(e,t,O_(n),r)}const k_=(e,t)=>n=>t(e(n)),Dn=(...e)=>e.reduce(k_);function zg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Hg=zg("dragHorizontal"),Ug=zg("dragVertical");function Gg(e){let t=!1;if(e==="y")t=Ug();else if(e==="x")t=Hg();else{const n=Hg(),r=Ug();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Yg(){const e=Gg(!0);return e?(e(),!1):!0}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function qg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Yg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class __ extends lr{mount(){this.unmount=Dn(qg(this.node,!0),qg(this.node,!1))}unmount(){}}class A_ extends lr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Dn(An(this.node.current,"focus",()=>this.onFocus()),An(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Kg=(e,t)=>t?e===t?!0:Kg(e,t.parentElement):!1;function pu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ma(n))}class I_ extends lr{constructor(){super(...arguments),this.removeStartListeners=bt,this.removeEndListeners=bt,this.removeAccessibleListeners=bt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!Kg(this.node.current,a.target)?u:c;d&&De.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Dn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||pu("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=An(this.node.current,"keyup",i),pu("down",(a,l)=>{this.startPress(a,l)})},n=An(this.node.current,"keydown",t),r=()=>{this.isPressing&&pu("cancel",(s,i)=>this.cancelPress(s,i))},o=An(this.node.current,"blur",r);this.removeAccessibleListeners=Dn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Yg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=An(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Dn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const mu=new WeakMap,gu=new WeakMap,D_=e=>{const t=mu.get(e.target);t&&t(e)},M_=e=>{e.forEach(D_)};function N_({root:e,...t}){const n=e||document;gu.has(n)||gu.set(n,{});const r=gu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(M_,{root:e,...t})),r[o]}function F_(e,t,n){const r=N_(t);return mu.set(e,n),r.observe(e),()=>{mu.delete(e),r.unobserve(e)}}const L_={some:0,all:1};class V_ extends lr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:L_[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return F_(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(R_(t,n))&&this.startObserver()}unmount(){}}function R_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $_={inView:{Feature:V_},tap:{Feature:I_},focus:{Feature:A_},hover:{Feature:__}};function Zg(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}function ga(e,t,n){const r=e.getProps();return fu(r,t,n!==void 0?n:r.custom,e)}const Mn=e=>e*1e3,Nn=e=>e/1e3,j_={type:"spring",stiffness:500,damping:25,restSpeed:10},B_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),W_={type:"keyframes",duration:.8},z_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},H_=(e,{keyframes:t})=>t.length>2?W_:or.has(e)?e.startsWith("scale")?B_(t[1]):j_:z_;function U_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function yu(e,t){return e[t]||e.default||e}const G_=e=>e!==null;function ya(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(G_),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let va;function Y_(){va=void 0}const cr={now:()=>(va===void 0&&cr.set(xt.isProcessing||Dk.useManualTiming?xt.timestamp:performance.now()),va),set:e=>{va=e,queueMicrotask(Y_)}},Xg=e=>/^0[^.\s]+$/u.test(e);function q_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xg(e):!0}const Qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),K_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Z_(e){const t=K_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const X_=4;function Jg(e,t,n=1){an(n<=X_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Z_(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Qg(i)?parseFloat(i):i}return ou(o)?Jg(o,t,n+1):o}const Q_=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ey=e=>e===Co||e===fe,ty=(e,t)=>parseFloat(e.split(", ")[t]),ny=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ty(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?ty(s[1],e):0}},J_=new Set(["x","y","z"]),eA=Is.filter(e=>!J_.has(e));function tA(e){const t=[];return eA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Po={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:ny(4,13),y:ny(5,14)};Po.translateX=Po.x,Po.translateY=Po.y;const ry=e=>t=>t.test(e),oy=[Co,fe,xn,ir,i_,s_,{test:e=>e==="auto",parse:e=>e}],sy=e=>oy.find(ry(e)),kr=new Set;let vu=!1,bu=!1;function iy(){if(bu){const e=Array.from(kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=tA(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}bu=!1,vu=!1,kr.forEach(e=>e.complete()),kr.clear()}function ay(){kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(bu=!0)})}function nA(){ay(),iy()}class wu{constructor(t,n,r,o,s,i=!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=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(kr.add(this),vu||(vu=!0,De.read(ay),De.resolveKeyframes(iy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xu=(e,t)=>n=>!!(Ns(n)&&r_.test(n)&&n.startsWith(e)||t&&!o_(n)&&Object.prototype.hasOwnProperty.call(n,t)),ly=(e,t,n)=>r=>{if(!Ns(r))return r;const[o,s,i,a]=r.match(su);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},rA=e=>sr(0,255,e),Su={...Co,transform:e=>Math.round(rA(e))},_r={test:xu("rgb","red"),parse:ly("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Su.transform(e)+", "+Su.transform(t)+", "+Su.transform(n)+", "+Ms(Ds.transform(r))+")"};function oA(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 Tu={test:xu("#"),parse:oA,transform:_r.transform},Oo={test:xu("hsl","hue"),parse:ly("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xn.transform(Ms(t))+", "+xn.transform(Ms(n))+", "+Ms(Ds.transform(r))+")"},_t={test:e=>_r.test(e)||Tu.test(e)||Oo.test(e),parse:e=>_r.test(e)?_r.parse(e):Oo.test(e)?Oo.parse(e):Tu.parse(e),transform:e=>Ns(e)?e:e.hasOwnProperty("red")?_r.transform(e):Oo.transform(e)};function sA(e){var t,n;return isNaN(e)&&Ns(e)&&(((t=e.match(su))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(n_))===null||n===void 0?void 0:n.length)||0)>0}const cy="number",uy="color",iA="var",aA="var(",fy="${}",lA=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(lA,l=>(_t.test(l)?(r.color.push(s),o.push(uy),n.push(_t.parse(l))):l.startsWith(aA)?(r.var.push(s),o.push(iA),n.push(l)):(r.number.push(s),o.push(cy),n.push(parseFloat(l))),++s,fy)).split(fy);return{values:n,split:a,indexes:r,types:o}}function dy(e){return Ls(e).values}function hy(e){const{split:t,types:n}=Ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===cy?s+=Ms(o[i]):a===uy?s+=_t.transform(o[i]):s+=o[i]}return s}}const cA=e=>typeof e=="number"?0:e;function uA(e){const t=dy(e);return hy(e)(t.map(cA))}const ur={test:sA,parse:dy,createTransformer:hy,getAnimatableNone:uA},fA=new Set(["brightness","contrast","saturate","opacity"]);function dA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(su)||[];if(!r)return e;const o=n.replace(r,"");let s=fA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const hA=/\b([a-z-]*)\(.*?\)/gu,Eu={...ur,getAnimatableNone:e=>{const t=e.match(hA);return t?t.map(dA).join(" "):e}},pA={...Og,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Eu,WebkitFilter:Eu},Cu=e=>pA[e];function py(e,t){let n=Cu(e);return n!==Eu&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mA=new Set(["auto","none","0"]);function gA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!mA.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=py(n,o)}class my extends wu{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ou(c))){const u=Jg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Q_.has(r)||t.length!==2)return;const[o,s]=t,i=sy(o),a=sy(s);if(i!==a)if(ey(i)&&ey(a))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++)q_(t[o])&&r.push(o);r.length&&gA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Po[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.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Po[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function gy(e){let t;return()=>(t===void 0&&(t=e()),t)}const yy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function yA(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 vA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=yy(o,t),a=yy(s,t);return Eo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:yA(e)||n==="spring"&&r}class vy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nA(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!vA(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ya(t,this.options,n)),a==null||a(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function by(e,t){return t?e*(1e3/t):0}const bA=5;function wy(e,t,n){const r=Math.max(t-bA,0);return by(n-e(r),t-r)}const Pu=.001,wA=.01,xy=10,xA=.05,SA=1;function TA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Eo(e<=Mn(xy),"Spring duration must be 10 seconds or less");let i=1-t;i=sr(xA,SA,i),e=sr(wA,xy,Nn(e)),i<1?(o=c=>{const u=c*i,f=u*e,d=u-n,h=Ou(c,i),p=Math.exp(-f);return Pu-d/h*p},s=c=>{const f=c*i*e,d=f*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Ou(Math.pow(c,2),i);return(-o(c)+Pu>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Pu+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=CA(o,s,a);if(e=Mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const EA=12;function CA(e,t,n){let r=n;for(let o=1;o<EA;o++)r=r-e(r)/t(r);return r}function Ou(e,t){return e*Math.sqrt(1-t*t)}const PA=["duration","bounce"],OA=["stiffness","damping","mass"];function Sy(e,t){return t.some(n=>e[n]!==void 0)}function kA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Sy(e,OA)&&Sy(e,PA)){const n=TA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Ty({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=kA({...r,velocity:-Nn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Nn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let b;if(p<1){const g=Ou(y,p);b=T=>{const x=Math.exp(-p*y*T);return s-x*((h+p*y*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)b=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);b=T=>{const x=Math.exp(-p*y*T),E=Math.min(g*T,300);return s-x*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:d&&u||null,next:g=>{const T=b(g);if(d)i.done=g>=u;else{let x=h;g!==0&&(p<1?x=wy(b,g,T):x=0);const E=Math.abs(x)<=n,C=Math.abs(s-T)<=t;i.done=E&&C}return i.value=i.done?s:T,i}}}function Ey({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*t;const y=f+m,v=i===void 0?y:i(y);v!==y&&(m=v-f);const b=O=>-m*Math.exp(-O/r),g=O=>v+b(O),T=O=>{const I=b(O),N=g(O);d.done=Math.abs(I)<=c,d.value=d.done?v:N};let x,E;const C=O=>{h(d.value)&&(x=O,E=Ty({keyframes:[d.value,p(d.value)],velocity:wy(g,O,d.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:O=>{let I=!1;return!E&&x===void 0&&(I=!0,T(O),C(O)),x!==void 0&&O>=x?E.next(O-x):(!I&&T(O),d)}}}const Cy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,_A=1e-7,AA=12;function IA(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Cy(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>_A&&++a<AA);return i}function Vs(e,t,n,r){if(e===t&&n===r)return bt;const o=s=>IA(s,0,1,e,n);return s=>s===0||s===1?s:Cy(o(s),t,r)}const DA=Vs(.42,0,1,1),MA=Vs(0,0,.58,1),Py=Vs(.42,0,.58,1),NA=e=>Array.isArray(e)&&typeof e[0]!="number",Oy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ky=e=>t=>1-e(1-t),ku=e=>1-Math.sin(Math.acos(e)),_y=ky(ku),FA=Oy(ku),Ay=Vs(.33,1.53,.69,.99),_u=ky(Ay),LA=Oy(_u),Iy={linear:bt,easeIn:DA,easeInOut:Py,easeOut:MA,circIn:ku,circInOut:FA,circOut:_y,backIn:_u,backInOut:LA,backOut:Ay,anticipate:e=>(e*=2)<1?.5*_u(e):.5*(2-Math.pow(2,-10*(e-1)))},Dy=e=>{if(Array.isArray(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return an(Iy[e]!==void 0,`Invalid easing type '${e}'`),Iy[e];return e},Rs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function Au(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 VA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Au(l,a,e+1/3),s=Au(l,a,e),i=Au(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ba(e,t){return n=>n>0?t:e}const Iu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},RA=[Tu,_r,Oo],$A=e=>RA.find(t=>t.test(e));function My(e){const t=$A(e);if(Eo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Oo&&(n=VA(n)),n}const Ny=(e,t)=>{const n=My(e),r=My(t);if(!n||!r)return ba(e,t);const o={...n};return s=>(o.red=Iu(n.red,r.red,s),o.green=Iu(n.green,r.green,s),o.blue=Iu(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),_r.transform(o))},Du=new Set(["none","hidden"]);function jA(e,t){return Du.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>Ze(e,t,n)}function Mu(e){return typeof e=="number"?BA:typeof e=="string"?ou(e)?ba:_t.test(e)?Ny:HA:Array.isArray(e)?Fy:typeof e=="object"?_t.test(e)?Ny:WA:ba}function Fy(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Mu(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function WA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Mu(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function zA(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const HA=(e,t)=>{const n=ur.createTransformer(t),r=Ls(e),o=Ls(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?Du.has(e)&&!o.values.length||Du.has(t)&&!r.values.length?jA(e,t):Dn(Fy(zA(r,o),o.values),n):(Eo(!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.`),ba(e,t))};function Ly(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):Mu(e)(e,t)}function UA(e,t,n){const r=[],o=n||Ly,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||bt:t;a=Dn(l,a)}r.push(a)}return r}function Vy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(an(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=UA(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=Rs(e[u],e[u+1],c);return i[u](f)};return n?c=>l(sr(e[0],e[s-1],c)):l}function GA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Rs(0,t,r);e.push(Ze(n,1,o))}}function YA(e){const t=[0];return GA(t,e.length-1),t}function qA(e,t){return e.map(n=>n*t)}function KA(e,t){return e.map(()=>t||Py).splice(0,e.length-1)}function wa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=NA(r)?r.map(Dy):Dy(r),s={done:!1,value:t[0]},i=qA(n&&n.length===t.length?n:YA(t),e),a=Vy(i,t,{ease:Array.isArray(o)?o:KA(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Ry=2e4;function ZA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ry;)t+=n,r=e.next(t);return t>=Ry?1/0:t}const XA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>Sn(t),now:()=>xt.isProcessing?xt.timestamp:cr.now()}},QA={decay:Ey,inertia:Ey,tween:wa,keyframes:wa,spring:Ty},JA=e=>e/100;class Nu extends vy{constructor({KeyframeResolver:t=wu,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=QA[n]||wa;let l,c;a!==wa&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&an(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Dn(JA,Ly(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=ZA(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}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:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const O=Math.min(this.currentTime,u)/f;let I=Math.floor(O),N=O%1;!N&&O>=1&&(N=1),N===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/f)):p==="mirror"&&(T=i)),g=sr(0,1,N)*f}const x=b?{done:!1,value:l[0]}:T.next(g);a&&(x.value=a(x.value));let{done:E}=x;!b&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(x.value=ya(l,this.options,o)),y&&y(x.value),C&&this.finish(),x}get duration(){const{resolved:t}=this;return t?Nn(t.calculatedDuration):0}get time(){return Nn(this.currentTime)}set time(t){t=Mn(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=Nn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=XA,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),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 $y=e=>Array.isArray(e)&&typeof e[0]=="number";function jy(e){return!!(!e||typeof e=="string"&&e in Fu||$y(e)||Array.isArray(e)&&e.every(jy))}const $s=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$s([0,.65,.55,1]),circOut:$s([.55,0,1,.45]),backIn:$s([.31,.01,.66,-.59]),backOut:$s([.33,1.53,.69,.99])};function eI(e){return By(e)||Fu.easeOut}function By(e){if(e)return $y(e)?$s(e):Array.isArray(e)?e.map(eI):Fu[e]}function tI(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=By(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const nI=gy(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xa=10,rI=2e4;function oI(e){return e.type==="spring"||!jy(e.ease)}function sI(e,t){const n=new Nu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<rI;)r=n.sample(s),o.push(r.value),s+=xa;return{times:void 0,keyframes:o,duration:s-xa,ease:"linear"}}class Wy extends vy{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new my(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(oI(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=sI(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=tI(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=cr.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ya(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Nn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Nn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mn(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}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return bt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return bt}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;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Nu({...d,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=Mn(this.time);c.setWithVelocity(h.sample(p-xa).value,h.sample(p).value,xa)}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:s,damping:i,type:a}=t;return nI()&&r&&Rg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function iI(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return De.update(r,!0),()=>Sn(r)}const aI=gy(()=>window.ScrollTimeline!==void 0);class lI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(aI()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),iI(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Lu=(e,t,n,r={},o,s,i)=>a=>{const l=yu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Mn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};U_(l)||(f={...f,...H_(e,f)}),f.duration&&(f.duration=Mn(f.duration)),f.repeatDelay&&(f.repeatDelay=Mn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const h=ya(f.keyframes,l);if(h!==void 0)return De.update(()=>{f.onUpdate(h),f.onComplete()}),new lI([])}return!s&&Wy.supports(f)?new Wy(f):new Nu(f)};class Vu{constructor(){this.subscriptions=[]}add(t){return ha(this.subscriptions,t),()=>pa(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zy=new Set;function Ru(e,t,n){e||zy.has(t)||(console.warn(t),zy.add(t))}const Hy=30,cI=e=>!isNaN(parseFloat(e)),js={current:void 0};class Uy{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=cr.now();this.updatedAt!==s&&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=cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ru(!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 Vu);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.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 js.current&&js.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hy);return by(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 ko(e,t){return new Uy(e,t)}function uI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ko(n))}function fI(e,t){const n=ga(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=b_(s[i]);uI(e,i,a)}}function Gy(e){return e.getProps()[pg]}class dI extends Uy{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=$g(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(pa(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function hI(e){return!!(wt(e)&&e.add)}function $u(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new dI("auto"),e.addValue("willChange",r)),hI(r))return r.add(t)}function pI({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Yy(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),h=l[f];if(h===void 0||u&&pI(u,f))continue;const p={delay:n,elapsed:0,...yu(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Gy(e);if(v){const b=window.HandoffAppearAnimations(v,f,d,De);b!==null&&(p.elapsed=b,m=!0)}}d.start(Lu(f,d,h,e.shouldReduceMotion&&or.has(f)?{type:!1}:p,e,m,$u(e,f)));const y=d.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&fI(e,a)})}),c}function ju(e,t,n={}){var r;const o=ga(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Yy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return mI(e,t,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function mI(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(gI).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(ju(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function gI(e,t){return e.sortNodePosition(t)}function yI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ju(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ju(e,t,n);else{const o=typeof t=="function"?ga(e,t,n.custom):t;r=Promise.all(Yy(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const vI=[...tu].reverse(),bI=tu.length;function wI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>yI(e,n,r)))}function xI(e){let t=wI(e),n=qy(),r=!0;const o=l=>(c,u)=>{var f;const d=ga(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<bI;y++){const v=vI[y],b=n[v],g=c[v]!==void 0?c[v]:u[v],T=ks(g),x=v===l?b.isActive:null;x===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...h},!b.isActive&&x===null||!g&&!b.prevProp||_s(g)||typeof g=="boolean")continue;let O=SI(b.prevProp,g)||v===l&&b.isActive&&!E&&T||y>p&&T,I=!1;const N=Array.isArray(g)?g:[g];let L=N.reduce(o(v),{});x===!1&&(L={});const{prevResolvedValues:_={}}=b,j={..._,...L},D=k=>{O=!0,d.has(k)&&(I=!0,d.delete(k)),b.needsAnimating[k]=!0;const F=e.getValue(k);F&&(F.liveStyle=!1)};for(const k in j){const F=L[k],R=_[k];if(h.hasOwnProperty(k))continue;let W=!1;du(F)&&du(R)?W=!Zg(F,R):W=F!==R,W?F!=null?D(k):d.add(k):F!==void 0&&d.has(k)?D(k):b.protectedKeys[k]=!0}b.prevProp=g,b.prevResolvedValues=L,b.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(O=!1),O&&(!E||I)&&f.push(...N.map(k=>({animation:k,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const b=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=b??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=qy(),r=!0}}}function SI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zg(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qy(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class TI extends lr{constructor(t){super(t),t.animationState||(t.animationState=xI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_s(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 EI=0;class CI extends lr{constructor(){super(...arguments),this.id=EI++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const PI={animation:{Feature:TI},exit:{Feature:CI}},Ky=(e,t)=>Math.abs(e-t);function OI(e,t){const n=Ky(e.x,t.x),r=Ky(e.y,t.y);return Math.sqrt(n**2+r**2)}class Zy{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!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 f=Wu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=OI(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=xt;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Bu(d,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Wu(f.type==="pointercancel"?this.lastMoveEventInfo:Bu(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Wg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ma(t),a=Bu(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Wu(a,this.history)),this.removeListeners=Dn(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Sn(this.updatePoint)}}function Bu(e,t){return t?{point:t(e.point)}:e}function Xy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Wu({point:e},t){return{point:e,delta:Xy(e,Qy(t)),offset:Xy(e,kI(t)),velocity:_I(t,.1)}}function kI(e){return e[0]}function Qy(e){return e[e.length-1]}function _I(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Qy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const s=Nn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Jy=1e-4,AI=1-Jy,II=1+Jy,ev=.01,DI=0-ev,MI=0+ev;function Kt(e){return e.max-e.min}function NI(e,t,n){return Math.abs(e-t)<=n}function tv(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Kt(n)/Kt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=AI&&e.scale<=II||isNaN(e.scale))&&(e.scale=1),(e.translate>=DI&&e.translate<=MI||isNaN(e.translate))&&(e.translate=0)}function Bs(e,t,n,r){tv(e.x,t.x,n.x,r?r.originX:void 0),tv(e.y,t.y,n.y,r?r.originY:void 0)}function nv(e,t,n){e.min=n.min+t.min,e.max=e.min+Kt(t)}function FI(e,t,n){nv(e.x,t.x,n.x),nv(e.y,t.y,n.y)}function rv(e,t,n){e.min=t.min-n.min,e.max=e.min+Kt(t)}function Ws(e,t,n){rv(e.x,t.x,n.x),rv(e.y,t.y,n.y)}function LI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function ov(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function VI(e,{top:t,left:n,bottom:r,right:o}){return{x:ov(e.x,n,o),y:ov(e.y,t,r)}}function sv(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 RI(e,t){return{x:sv(e.x,t.x),y:sv(e.y,t.y)}}function $I(e,t){let n=.5;const r=Kt(e),o=Kt(t);return o>r?n=Rs(t.min,t.max-r,e.min):r>o&&(n=Rs(e.min,e.max-o,t.min)),sr(0,1,n)}function jI(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 zu=.35;function BI(e=zu){return e===!1?e=0:e===!0&&(e=zu),{x:iv(e,"left","right"),y:iv(e,"top","bottom")}}function iv(e,t,n){return{min:av(e,t),max:av(e,n)}}function av(e,t){return typeof e=="number"?e:e[t]||0}const lv=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:lv(),y:lv()}),cv=()=>({min:0,max:0}),lt=()=>({x:cv(),y:cv()});function Xt(e){return[e("x"),e("y")]}function uv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function WI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Hu(e){return e===void 0||e===1}function Uu({scale:e,scaleX:t,scaleY:n}){return!Hu(e)||!Hu(t)||!Hu(n)}function Ir(e){return Uu(e)||fv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fv(e){return dv(e.x)||dv(e.y)}function dv(e){return e&&e!=="0%"}function Sa(e,t,n){const r=e-n,o=t*r;return n+o}function hv(e,t,n,r,o){return o!==void 0&&(e=Sa(e,o,r)),Sa(e,n,r)+t}function Gu(e,t=0,n=1,r,o){e.min=hv(e.min,t,n,r,o),e.max=hv(e.max,t,n,r,o)}function pv(e,{x:t,y:n}){Gu(e.x,t.translate,t.scale,t.originPoint),Gu(e.y,n.translate,n.scale,n.originPoint)}const mv=.999999999999,gv=1.0000000000001;function HI(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,pv(e,i)),r&&Ir(s.latestValues)&&Ao(e,s.latestValues))}t.x<gv&&t.x>mv&&(t.x=1),t.y<gv&&t.y>mv&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function yv(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);Gu(e,t,n,s,r)}function Ao(e,t){yv(e.x,t.x,t.scaleX,t.scale,t.originX),yv(e.y,t.y,t.scaleY,t.scale,t.originY)}function vv(e,t){return uv(zI(e.getBoundingClientRect(),t))}function UI(e,t,n){const r=vv(e,n),{scroll:o}=t;return o&&(fr(r.x,o.offset.x),fr(r.y,o.offset.y)),r}const bv=({current:e})=>e?e.ownerDocument.defaultView:null,GI=new WeakMap;class YI{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ma(u,"page").point)},s=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Gg(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xt(v=>{let b=this.getAxisMotionValue(v).get()||0;if(xn.test(b)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[v];T&&(b=Kt(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&De.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=$u(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=qI(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Xt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Zy(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:bv(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&De.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ta(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=LI(i,this.constraints[t],this.elastic[t])),s.set(i)}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,s=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=VI(o.layoutBox,n):this.constraints=!1,this.elastic=BI(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=jI(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(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 s=UI(r,o.root,this.visualElement.getTransformPagePoint());let i=RI(o.layout.layoutBox,s);if(n){const a=n(WI(i));this.hasMutatedConstraints=!!a,a&&(i=uv(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!Ta(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Lu(t,r,0,n,this.visualElement,!1,$u(this.visualElement,t)))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(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){Xt(n=>{const{drag:r}=this.getProps();if(!Ta(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=$I({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xt(i=>{if(!Ta(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;GI.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();So(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const i=An(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=zu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ta(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class KI extends lr{constructor(t){super(t),this.removeGroupControls=bt,this.removeListeners=bt,this.controls=new YI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const wv=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class ZI extends lr{constructor(){super(...arguments),this.removePointerDownListener=bt}onPointerDown(t){this.session=new Zy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:wv(t),onStart:wv(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&De.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function XI(){const e=w.useContext(oa);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=w.useId();return w.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ea={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function xv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=xv(e,t.target.x),r=xv(e,t.target.y);return`${n}% ${r}%`}},QI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const s=ur.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class JI extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Kk(eD),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ea.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||De.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),eu.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 Sv(e){const[t,n]=XI(),r=w.useContext(As);return S.jsx(JI,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(gg),isPresent:t,safeToRemove:n})}const eD={borderRadius:{...zs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zs,borderTopRightRadius:zs,borderBottomLeftRadius:zs,borderBottomRightRadius:zs,boxShadow:QI},Tv=["TopLeft","TopRight","BottomLeft","BottomRight"],tD=Tv.length,Ev=e=>typeof e=="string"?parseFloat(e):e,Cv=e=>typeof e=="number"||fe.test(e);function nD(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,rD(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,oD(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<tD;i++){const a=`border${Tv[i]}Radius`;let l=Pv(t,a),c=Pv(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Cv(l)===Cv(c)?(e[a]=Math.max(Ze(Ev(l),Ev(c),r),0),(xn.test(c)||xn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Pv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rD=Ov(0,.5,_y),oD=Ov(.5,.95,bt);function Ov(e,t,n){return r=>r<e?0:r>t?1:n(Rs(e,t,r))}function kv(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){kv(e.x,t.x),kv(e.y,t.y)}function _v(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Av(e,t,n,r,o){return e-=t,e=Sa(e,1/n,r),o!==void 0&&(e=Sa(e,1/o,r)),e}function sD(e,t=0,n=1,r=.5,o,s=e,i=e){if(xn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=Av(e.min,t,n,a,o),e.max=Av(e.max,t,n,a,o)}function Iv(e,t,[n,r,o],s,i){sD(e,t[n],t[r],t[o],t.scale,s,i)}const iD=["x","scaleX","originX"],aD=["y","scaleY","originY"];function Dv(e,t,n,r){Iv(e.x,t,iD,n?n.x:void 0,r?r.x:void 0),Iv(e.y,t,aD,n?n.y:void 0,r?r.y:void 0)}function Mv(e){return e.translate===0&&e.scale===1}function Nv(e){return Mv(e.x)&&Mv(e.y)}function lD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Fv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Lv(e){return Kt(e.x)/Kt(e.y)}function Vv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cD{constructor(){this.members=[]}add(t){ha(this.members,t),t.scheduleRender()}remove(t){if(pa(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 s=this.members[o];if(s.isPresent!==!1){r=s;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 uD(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const fD=(e,t)=>e.depth-t.depth;class dD{constructor(){this.children=[],this.isDirty=!1}add(t){ha(this.children,t),this.isDirty=!0}remove(t){pa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(fD),this.isDirty=!1,this.children.forEach(t)}}function hD(e,t){const n=cr.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Sn(r),e(s-t))};return De.read(r,!0),()=>Sn(r)}function pD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function mD(e,t,n){const r=wt(e)?e:ko(e);return r.start(Lu("",r,t,n)),r.animation}const Dr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Yu=["","X","Y","Z"],gD={visibility:"hidden"},Rv=1e3;let yD=0;function qu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $v(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Gy(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?$v(e.parent):!1:!1}function jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=yD++,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,window.MotionDebug&&(Dr.totalNodes=Dr.resolvedTargetDeltas=Dr.recalculatedProjection=0),this.nodes.forEach(wD),this.nodes.forEach(CD),this.nodes.forEach(PD),this.nodes.forEach(xD),window.MotionDebug&&window.MotionDebug.record(Dr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new dD)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Vu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=pD(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=hD(d,250),Ea.hasAnimatedSinceResize&&(Ea.hasAnimatedSinceResize=!1,this.nodes.forEach(Wv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ID,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Fv(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const T={...yu(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else d||Wv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Sn(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(OD),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&$v(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bv);return}this.isUpdating||this.nodes.forEach(TD),this.isUpdating=!1,this.nodes.forEach(ED),this.nodes.forEach(vD),this.nodes.forEach(bD),this.clearAllSnapshots();const a=cr.now();xt.delta=sr(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,hu.update.process(xt),hu.preRender.process(xt),hu.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,eu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(SD),this.sharedNodes.forEach(kD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Nv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ir(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),DD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return lt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(fr(a.x,l.offset.x),fr(a.y,l.offset.y)),a}removeElementScroll(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Qt(a,i);const{scroll:d}=this.root;d&&(fr(a.x,-d.offset.x),fr(a.y,-d.offset.y))}fr(a.x,u.offset.x),fr(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=lt();Qt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ir(u.latestValues)&&Ao(l,u.latestValues)}return Ir(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ir(c.latestValues))continue;Uu(c.latestValues)&&c.updateSnapshot();const u=lt(),f=c.measurePageBox();Qt(u,f),Dv(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ir(this.latestValues)&&Dv(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ws(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),FI(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),pv(this.target,this.targetDelta)):Qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Ws(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Dr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Uu(this.parent.latestValues)||fv(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 i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===xt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;Qt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;HI(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_v(this.prevProjectionDelta.x,this.projectionDelta.x),_v(this.prevProjectionDelta.y,this.projectionDelta.y)),Bs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Vv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Dr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_o(),this.projectionDelta=_o(),this.projectionDeltaWithTransform=_o()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=_o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=lt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(AD));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const x=T/1e3;zv(f.x,i.x,x),zv(f.y,i.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ws(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_D(this.relativeTarget,this.relativeTargetOrigin,d,x),g&&lD(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=lt()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,nD(u,c,this.latestValues,x,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Sn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{Ea.hasAnimatedSinceResize=!0,this.currentAnimation=mD(0,Rv,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&qv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const f=Kt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const d=Kt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+d}Qt(a,l),Ao(a,u),Bs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new cD),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&qu("z",i,c,this.animationValues);for(let u=0;u<Yu.length;u++)qu(`rotate${Yu[u]}`,i,c,this.animationValues),qu(`skew${Yu[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gD;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=da(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=da(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ir(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=uD(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in ca){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=ca[m],b=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let T=0;T<g;T++)c[v[T]]=b}else c[m]=b}return this.options.layoutId&&(c.pointerEvents=f===this?da(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Bv),this.root.sharedNodes.clear()}}}function vD(e){e.updateLayout()}function bD(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:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(d);d.min=r[f].min,d.max=d.min+h}):qv(s,n.layoutBox,r)&&Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=_o();Bs(a,r,n.layoutBox);const l=_o();i?Bs(l,e.applyTransform(o,!0),n.measuredBox):Bs(l,r,n.layoutBox);const c=!Nv(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=lt();Ws(p,n.layoutBox,d.layoutBox);const m=lt();Ws(m,r,h.layoutBox),Fv(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function wD(e){window.MotionDebug&&Dr.totalNodes++,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 xD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function SD(e){e.clearSnapshot()}function Bv(e){e.clearMeasurements()}function TD(e){e.isLayoutDirty=!1}function ED(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function CD(e){e.resolveTargetDelta()}function PD(e){e.calcProjection()}function OD(e){e.resetSkewAndRotation()}function kD(e){e.removeLeadSnapshot()}function zv(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hv(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function _D(e,t,n,r){Hv(e.x,t.x,n.x,r),Hv(e.y,t.y,n.y,r)}function AD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ID={duration:.45,ease:[.4,0,.1,1]},Uv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gv=Uv("applewebkit/")&&!Uv("chrome/")?Math.round:bt;function Yv(e){e.min=Gv(e.min),e.max=Gv(e.max)}function DD(e){Yv(e.x),Yv(e.y)}function qv(e,t,n){return e==="position"||e==="preserve-aspect"&&!NI(Lv(t),Lv(n),.2)}const MD=jv({attachResizeListener:(e,t)=>An(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ku={current:void 0},Kv=jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ku.current){const e=new MD({});e.mount(window),e.setOptions({layoutScroll:!0}),Ku.current=e}return Ku.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ND={pan:{Feature:ZI},drag:{Feature:KI,ProjectionNode:Kv,MeasureLayout:Sv}},Zu={current:null},Zv={current:!1};function FD(){if(Zv.current=!0,!!Jc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zu.current=e.matches;e.addListener(t),t()}else Zu.current=!1}function LD(e,t,n){for(const r in t){const o=t[r],s=n[r];if(wt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Ru(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(wt(s))e.addValue(r,ko(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,ko(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Xv=new WeakMap,VD=[...oy,_t,ur],RD=e=>VD.find(ry(e)),Qv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$D=nu.length;class jD{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;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=a,this.blockInitialAnimation=!!s,this.isControllingVariants=la(n),this.isVariantNode=bg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&wt(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Xv.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)),Zv.current||FD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zu.current,process.env.NODE_ENV!=="production"&&Ru(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(){Xv.delete(this.current),this.projection&&this.projection.unmount(),Sn(this.notifyUpdate),Sn(this.render),this.valueSubscriptions.forEach(t=>t()),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){const r=or.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 To){const n=To[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qv.length;r++){const o=Qv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=LD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<$D;r++){const o=nu[r],s=this.props[o];(ks(s)||s===!1)&&(n[o]=s)}return n}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=ko(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"&&(Qg(o)||Xg(o))?o=parseFloat(o):!RD(o)&&ur.test(n)&&(o=py(t,n)),this.setBaseTarget(t,wt(o)?o.get():o)),wt(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 i=fu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Jv extends jD{constructor(){super(...arguments),this.KeyframeResolver=my}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]}}function BD(e){return window.getComputedStyle(e)}class WD extends Jv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Mg}readValueFromInstance(t,n){if(or.has(n)){const r=Cu(n);return r&&r.default||0}else{const r=BD(t),o=(Eg(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return vv(t,n)}build(t,n,r){iu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return uu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zD extends Jv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(or.has(n)){const r=Cu(n);return r&&r.default||0}return n=Ng.has(n)?n:ia(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Lg(t,n,r)}build(t,n,r){lu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Fg(t,n,r,o)}mount(t){this.isSVGTag=cu(t.tagName),super.mount(t)}}const HD=(e,t)=>ru(e)?new zD(t):new WD(t,{allowProjection:e!==w.Fragment}),UD={...PI,...$_,...ND,...{layout:{ProjectionNode:Kv,MeasureLayout:Sv}}},Jt=Yk((e,t)=>P_(e,t,UD,HD));function eb(){const e=w.useRef(!1);return sa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function tb(){const e=eb(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>De.postRender(r),[r]),t]}class GD extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function YD({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=w.useContext(xo);return w.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
125
|
+
*/var ic,vp;function M1(){if(vp)return ic;vp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[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 ic=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var d=0;d<c.length;d++)n.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},ic}var ac,bp;function lc(){if(bp)return ac;bp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ac=e,ac}var cc,wp;function xp(){return wp||(wp=1,cc=Function.call.bind(Object.prototype.hasOwnProperty)),cc}var uc,Sp;function N1(){if(Sp)return uc;Sp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lc(),n={},r=xp();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var d=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=s[u](i,u,l,a,null,t)}catch(p){f=p}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},uc=o,uc}var fc,Tp;function F1(){if(Tp)return fc;Tp=1;var e=yp(),t=M1(),n=lc(),r=xp(),o=N1(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return fc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(P){var V=P&&(c&&P[c]||P[u]);if(typeof V=="function")return V}var d="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:g,element:T(),elementType:x(),instanceOf:E,node:N(),objectOf:O,oneOf:C,oneOfType:I,shape:_,exact:j};function p(P,V){return P===V?P!==0||1/P===1/V:P!==P&&V!==V}function m(P,V){this.message=P,this.data=V&&typeof V=="object"?V:{},this.stack=""}m.prototype=Error.prototype;function y(P){if(process.env.NODE_ENV!=="production")var V={},Q=0;function ie(H,A,R,W,Y,Z,de){if(W=W||d,Z=Z||R,de!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Me=W+":"+R;!V[Me]&&Q<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+W+"`. 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."),V[Me]=!0,Q++)}}return A[R]==null?H?A[R]===null?new m("The "+Y+" `"+Z+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+Y+" `"+Z+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:P(A,R,W,Y,Z)}var ee=ie.bind(null,!1);return ee.isRequired=ie.bind(null,!0),ee}function v(P){function V(Q,ie,ee,H,A,R){var W=Q[ie],Y=F(W);if(Y!==P){var Z=$(W);return new m("Invalid "+H+" `"+A+"` of type "+("`"+Z+"` supplied to `"+ee+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return y(V)}function w(){return y(i)}function g(P){function V(Q,ie,ee,H,A){if(typeof P!="function")return new m("Property `"+A+"` of component `"+ee+"` has invalid PropType notation inside arrayOf.");var R=Q[ie];if(!Array.isArray(R)){var W=F(R);return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an array."))}for(var Y=0;Y<R.length;Y++){var Z=P(R,Y,ee,H,A+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return y(V)}function T(){function P(V,Q,ie,ee,H){var A=V[Q];if(!a(A)){var R=F(A);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return y(P)}function x(){function P(V,Q,ie,ee,H){var A=V[Q];if(!e.isValidElementType(A)){var R=F(A);return new m("Invalid "+ee+" `"+H+"` of type "+("`"+R+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return y(P)}function E(P){function V(Q,ie,ee,H,A){if(!(Q[ie]instanceof P)){var R=P.name||d,W=q(Q[ie]);return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected ")+("instance of `"+R+"`."))}return null}return y(V)}function C(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function V(Q,ie,ee,H,A){for(var R=Q[ie],W=0;W<P.length;W++)if(p(R,P[W]))return null;var Y=JSON.stringify(P,function(de,B){var Me=$(B);return Me==="symbol"?String(B):B});return new m("Invalid "+H+" `"+A+"` of value `"+String(R)+"` "+("supplied to `"+ee+"`, expected one of "+Y+"."))}return y(V)}function O(P){function V(Q,ie,ee,H,A){if(typeof P!="function")return new m("Property `"+A+"` of component `"+ee+"` has invalid PropType notation inside objectOf.");var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type "+("`"+W+"` supplied to `"+ee+"`, expected an object."));for(var Y in R)if(r(R,Y)){var Z=P(R,Y,ee,H,A+"."+Y,n);if(Z instanceof Error)return Z}return null}return y(V)}function I(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<P.length;V++){var Q=P[V];if(typeof Q!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(Q)+" at index "+V+"."),i}function ie(ee,H,A,R,W){for(var Y=[],Z=0;Z<P.length;Z++){var de=P[Z],B=de(ee,H,A,R,W,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var Me=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new m("Invalid "+R+" `"+W+"` supplied to "+("`"+A+"`"+Me+"."))}return y(ie)}function N(){function P(V,Q,ie,ee,H){return D(V[Q])?null:new m("Invalid "+ee+" `"+H+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return y(P)}function L(P,V,Q,ie,ee){return new m((P||"React class")+": "+V+" type `"+Q+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ee+"`.")}function _(P){function V(Q,ie,ee,H,A){var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));for(var Y in P){var Z=P[Y];if(typeof Z!="function")return L(ee,H,A,Y,$(Z));var de=Z(R,Y,ee,H,A+"."+Y,n);if(de)return de}return null}return y(V)}function j(P){function V(Q,ie,ee,H,A){var R=Q[ie],W=F(R);if(W!=="object")return new m("Invalid "+H+" `"+A+"` of type `"+W+"` "+("supplied to `"+ee+"`, expected `object`."));var Y=t({},Q[ie],P);for(var Z in Y){var de=P[Z];if(r(P,Z)&&typeof de!="function")return L(ee,H,A,Z,$(de));if(!de)return new m("Invalid "+H+" `"+A+"` key `"+Z+"` supplied to `"+ee+"`.\nBad object: "+JSON.stringify(Q[ie],null," ")+`
|
|
126
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var B=de(R,Z,ee,H,A+"."+Z,n);if(B)return B}return null}return y(V)}function D(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(D);if(P===null||a(P))return!0;var V=f(P);if(V){var Q=V.call(P),ie;if(V!==P.entries){for(;!(ie=Q.next()).done;)if(!D(ie.value))return!1}else for(;!(ie=Q.next()).done;){var ee=ie.value;if(ee&&!D(ee[1]))return!1}}else return!1;return!0;default:return!1}}function k(P,V){return P==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function F(P){var V=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":k(V,P)?"symbol":V}function $(P){if(typeof P>"u"||P===null)return""+P;var V=F(P);if(V==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return V}function z(P){var V=$(P);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function q(P){return!P.constructor||!P.constructor.name?d:P.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},fc}var dc,Ep;function L1(){if(Ep)return dc;Ep=1;var e=lc();function t(){}function n(){}return n.resetWarningCache=t,dc=function(){function r(i,a,l,c,u,f){if(f!==e){var d=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 d.name="Invariant Violation",d}}r.isRequired=r;function o(){return r}var s={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 s.PropTypes=s,s},dc}if(process.env.NODE_ENV!=="production"){var V1=yp(),$1=!0;sc.exports=F1()(V1.isElement,$1)}else sc.exports=L1()();var R1=sc.exports;const je=Jd(R1);function uo(e,t,n,r){function o(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function fo(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Cp(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Pp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var j1=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function fs(e,t){var n=B1(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function B1(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=j1.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var z1=[".DS_Store","Thumbs.db"];function W1(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return Li(e)&&H1(e.dataTransfer)?[2,q1(e.dataTransfer,e.type)]:U1(e)?[2,G1(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Y1(e)]:[2,[]]})})}function H1(e){return Li(e)}function U1(e){return Li(e)&&Li(e.target)}function Li(e){return typeof e=="object"&&e!==null}function G1(e){return hc(e.target.files).map(function(t){return fs(t)})}function Y1(e){return uo(this,void 0,void 0,function(){var t;return fo(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return fs(r)})]}})})}function q1(e,t){return uo(this,void 0,void 0,function(){var n,r;return fo(this,function(o){switch(o.label){case 0:return e.items?(n=hc(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(K1))]):[3,2];case 1:return r=o.sent(),[2,Op(kp(r))];case 2:return[2,Op(hc(e.files).map(function(s){return fs(s)}))]}})})}function Op(e){return e.filter(function(t){return z1.indexOf(t.name)===-1})}function hc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function K1(e){if(typeof e.webkitGetAsEntry!="function")return _p(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Ap(t):_p(e)}function kp(e){return e.reduce(function(t,n){return Pp(Pp([],Cp(t),!1),Cp(Array.isArray(n)?kp(n):[n]),!1)},[])}function _p(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=fs(t);return Promise.resolve(n)}function Z1(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return[2,e.isDirectory?Ap(e):X1(e)]})})}function Ap(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return uo(i,void 0,void 0,function(){var l,c,u;return fo(this,function(f){switch(f.label){case 0:if(a.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map(Z1)),o.push(u),s(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function X1(e){return uo(this,void 0,void 0,function(){return fo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=fs(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var Q1=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?s===a.replace(/\/.*$/,""):o===a})}return!0};function Ip(e){return tE(e)||eE(e)||Fp(e)||J1()}function J1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
127
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eE(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tE(e){if(Array.isArray(e))return pc(e)}function Dp(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 Mp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dp(Object(n),!0).forEach(function(r){Np(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Np(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ds(e,t){return oE(e)||rE(e,t)||Fp(e,t)||nE()}function nE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
128
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fp(e,t){if(e){if(typeof e=="string")return pc(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 pc(e,t)}}function pc(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 rE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function oE(e){if(Array.isArray(e))return e}var sE="file-invalid-type",iE="file-too-large",aE="file-too-small",lE="too-many-files",cE=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:sE,message:"File type must be ".concat(n)}},Lp=function(t){return{code:iE,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Vp=function(t){return{code:aE,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},uE={code:lE,message:"Too many files"};function $p(e,t){var n=e.type==="application/x-moz-file"||Q1(e,t);return[n,n?null:cE(t)]}function Rp(e,t,n){if(Sr(e.size))if(Sr(t)&&Sr(n)){if(e.size>n)return[!1,Lp(n)];if(e.size<t)return[!1,Vp(t)]}else{if(Sr(t)&&e.size<t)return[!1,Vp(t)];if(Sr(n)&&e.size>n)return[!1,Lp(n)]}return[!0,null]}function Sr(e){return e!=null}function fE(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,i=e.maxFiles,a=e.validator;return!s&&t.length>1||s&&i>=1&&t.length>i?!1:t.every(function(l){var c=$p(l,n),u=ds(c,1),f=u[0],d=Rp(l,r,o),h=ds(d,1),p=h[0],m=a?a(l):null;return f&&p&&!m})}function Vi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function $i(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 jp(e){e.preventDefault()}function dE(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function hE(e){return e.indexOf("Edge/")!==-1}function pE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return dE(e)||hE(e)}function dn(){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,s=new Array(o>1?o-1:0),i=1;i<o;i++)s[i-1]=arguments[i];return t.some(function(a){return!Vi(r)&&a&&a.apply(void 0,[r].concat(s)),Vi(r)})}}function mE(){return"showOpenFilePicker"in window}function gE(e){if(Sr(e)){var t=Object.entries(e).filter(function(n){var r=ds(n,2),o=r[0],s=r[1],i=!0;return Bp(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.')),i=!1),(!Array.isArray(s)||!s.every(zp))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=ds(r,2),s=o[0],i=o[1];return Mp(Mp({},n),{},Np({},s,i))},{});return[{description:"Files",accept:t}]}return e}function yE(e){if(Sr(e))return Object.entries(e).reduce(function(t,n){var r=ds(n,2),o=r[0],s=r[1];return[].concat(Ip(t),[o],Ip(s))},[]).filter(function(t){return Bp(t)||zp(t)}).join(",")}function vE(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function bE(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Bp(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function zp(e){return/^.*\.[\w]+$/.test(e)}var wE=["children"],xE=["open"],SE=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],TE=["refKey","onChange","onClick"];function EE(e){return OE(e)||PE(e)||Wp(e)||CE()}function CE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
129
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PE(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OE(e){if(Array.isArray(e))return gc(e)}function mc(e,t){return AE(e)||_E(e,t)||Wp(e,t)||kE()}function kE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
130
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wp(e,t){if(e){if(typeof e=="string")return gc(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 gc(e,t)}}function gc(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 _E(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,i,a;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(r.push(i.value),!(t&&r.length===t));o=!0);}catch(l){s=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}return r}}function AE(e){if(Array.isArray(e))return e}function Hp(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 Xe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hp(Object(n),!0).forEach(function(r){yc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ri(e,t){if(e==null)return{};var n=IE(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IE(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var vc=b.forwardRef(function(e,t){var n=e.children,r=Ri(e,wE),o=Gp(r),s=o.open,i=Ri(o,xE);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(Xe(Xe({},i),{},{open:s})))});vc.displayName="Dropzone";var Up={disabled:!1,getFilesFromEvent:W1,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};vc.defaultProps=Up,vc.propTypes={children:je.func,accept:je.objectOf(je.arrayOf(je.string)),multiple:je.bool,preventDropOnDocument:je.bool,noClick:je.bool,noKeyboard:je.bool,noDrag:je.bool,noDragEventsBubbling:je.bool,minSize:je.number,maxSize:je.number,maxFiles:je.number,disabled:je.bool,getFilesFromEvent:je.func,onFileDialogCancel:je.func,onFileDialogOpen:je.func,useFsAccessApi:je.bool,autoFocus:je.bool,onDragEnter:je.func,onDragLeave:je.func,onDragOver:je.func,onDrop:je.func,onDropAccepted:je.func,onDropRejected:je.func,onError:je.func,validator:je.func};var bc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Gp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Xe(Xe({},Up),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,s=t.maxSize,i=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,y=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,g=t.preventDropOnDocument,T=t.noClick,x=t.noKeyboard,E=t.noDrag,C=t.noDragEventsBubbling,O=t.onError,I=t.validator,N=b.useMemo(function(){return yE(n)},[n]),L=b.useMemo(function(){return gE(n)},[n]),_=b.useMemo(function(){return typeof y=="function"?y:Yp},[y]),j=b.useMemo(function(){return typeof m=="function"?m:Yp},[m]),D=b.useRef(null),k=b.useRef(null),F=b.useReducer(DE,bc),$=mc(F,2),z=$[0],q=$[1],P=z.isFocused,V=z.isFileDialogActive,Q=b.useRef(typeof window<"u"&&window.isSecureContext&&v&&mE()),ie=function(){!Q.current&&V&&setTimeout(function(){if(k.current){var se=k.current.files;se.length||(q({type:"closeDialog"}),j())}},300)};b.useEffect(function(){return window.addEventListener("focus",ie,!1),function(){window.removeEventListener("focus",ie,!1)}},[k,V,j,Q]);var ee=b.useRef([]),H=function(se){D.current&&D.current.contains(se.target)||(se.preventDefault(),ee.current=[])};b.useEffect(function(){return g&&(document.addEventListener("dragover",jp,!1),document.addEventListener("drop",H,!1)),function(){g&&(document.removeEventListener("dragover",jp),document.removeEventListener("drop",H))}},[D,g]),b.useEffect(function(){return!r&&w&&D.current&&D.current.focus(),function(){}},[D,w,r]);var A=b.useCallback(function(X){O?O(X):console.error(X)},[O]),R=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[].concat(EE(ee.current),[X.target]),$i(X)&&Promise.resolve(o(X)).then(function(se){if(!(Vi(X)&&!C)){var _e=se.length,Ke=_e>0&&fE({files:se,accept:N,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),St=_e>0&&!Ke;q({isDragAccept:Ke,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),c&&c(X)}}).catch(function(se){return A(se)})},[o,c,A,C,N,i,s,a,l,I]),W=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=$i(X);if(se&&X.dataTransfer)try{X.dataTransfer.dropEffect="copy"}catch{}return se&&f&&f(X),!1},[f,C]),Y=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X);var se=ee.current.filter(function(Ke){return D.current&&D.current.contains(Ke)}),_e=se.indexOf(X.target);_e!==-1&&se.splice(_e,1),ee.current=se,!(se.length>0)&&(q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),$i(X)&&u&&u(X))},[D,u,C]),Z=b.useCallback(function(X,se){var _e=[],Ke=[];X.forEach(function(St){var At=$p(St,N),Lt=mc(At,2),jr=Lt[0],Wo=Lt[1],Ho=Rp(St,i,s),Ga=mc(Ho,2),Lf=Ga[0],Vf=Ga[1],$f=I?I(St):null;if(jr&&Lf&&!$f)_e.push(St);else{var Rf=[Wo,Vf];$f&&(Rf=Rf.concat($f)),Ke.push({file:St,errors:Rf.filter(function(aL){return aL})})}}),(!a&&_e.length>1||a&&l>=1&&_e.length>l)&&(_e.forEach(function(St){Ke.push({file:St,errors:[uE]})}),_e.splice(0)),q({acceptedFiles:_e,fileRejections:Ke,type:"setFiles"}),d&&d(_e,Ke,se),Ke.length>0&&p&&p(Ke,se),_e.length>0&&h&&h(_e,se)},[q,a,N,i,s,l,d,h,p,I]),de=b.useCallback(function(X){X.preventDefault(),X.persist(),Oe(X),ee.current=[],$i(X)&&Promise.resolve(o(X)).then(function(se){Vi(X)&&!C||Z(se,X)}).catch(function(se){return A(se)}),q({type:"reset"})},[o,Z,A,C]),B=b.useCallback(function(){if(Q.current){q({type:"openDialog"}),_();var X={multiple:a,types:L};window.showOpenFilePicker(X).then(function(se){return o(se)}).then(function(se){Z(se,null),q({type:"closeDialog"})}).catch(function(se){vE(se)?(j(se),q({type:"closeDialog"})):bE(se)?(Q.current=!1,k.current?(k.current.value=null,k.current.click()):A(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."))):A(se)});return}k.current&&(q({type:"openDialog"}),_(),k.current.value=null,k.current.click())},[q,_,j,v,Z,A,L,a]),Me=b.useCallback(function(X){!D.current||!D.current.isEqualNode(X.target)||(X.key===" "||X.key==="Enter"||X.keyCode===32||X.keyCode===13)&&(X.preventDefault(),B())},[D,B]),rt=b.useCallback(function(){q({type:"focus"})},[]),He=b.useCallback(function(){q({type:"blur"})},[]),ot=b.useCallback(function(){T||(pE()?setTimeout(B,0):B())},[T,B]),ue=function(se){return r?null:se},Ee=function(se){return x?null:ue(se)},le=function(se){return E?null:ue(se)},Oe=function(se){C&&se.stopPropagation()},ut=b.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.role,St=X.onKeyDown,At=X.onFocus,Lt=X.onBlur,jr=X.onClick,Wo=X.onDragEnter,Ho=X.onDragOver,Ga=X.onDragLeave,Lf=X.onDrop,Vf=Ri(X,SE);return Xe(Xe(yc({onKeyDown:Ee(dn(St,Me)),onFocus:Ee(dn(At,rt)),onBlur:Ee(dn(Lt,He)),onClick:ue(dn(jr,ot)),onDragEnter:le(dn(Wo,R)),onDragOver:le(dn(Ho,W)),onDragLeave:le(dn(Ga,Y)),onDrop:le(dn(Lf,de)),role:typeof Ke=="string"&&Ke!==""?Ke:"presentation"},_e,D),!r&&!x?{tabIndex:0}:{}),Vf)}},[D,Me,rt,He,ot,R,W,Y,de,x,E,r]),ke=b.useCallback(function(X){X.stopPropagation()},[]),ft=b.useMemo(function(){return function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},se=X.refKey,_e=se===void 0?"ref":se,Ke=X.onChange,St=X.onClick,At=Ri(X,TE),Lt=yc({accept:N,multiple:a,type:"file",style:{display:"none"},onChange:ue(dn(Ke,de)),onClick:ue(dn(St,ke)),tabIndex:-1},_e,k);return Xe(Xe({},Lt),At)}},[k,n,a,de,r]);return Xe(Xe({},z),{},{isFocused:P&&!r,getRootProps:ut,getInputProps:ft,rootRef:D,inputRef:k,open:ue(B)})}function DE(e,t){switch(t.type){case"focus":return Xe(Xe({},e),{},{isFocused:!0});case"blur":return Xe(Xe({},e),{},{isFocused:!1});case"openDialog":return Xe(Xe({},bc),{},{isFileDialogActive:!0});case"closeDialog":return Xe(Xe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Xe(Xe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Xe(Xe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xe({},bc);default:return e}}function Yp(){}function qp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ME(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qp(e))&&(r&&(r+=" "),r+=t);return r}const Kp=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zp=ME,wc=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=Kp(u)||Kp(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[m,y]=p;return Array.isArray(y)?y.includes({...s,...a}[m]):{...s,...a}[m]===y})?[...c,f,d]:c},[]);return Zp(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},hs=b.forwardRef(function({as:t,...n},r){const o=t||"span";return S.jsx(o,{...n,ref:r})}),NE=wc("inline-flex duration-700 data-[loading=true]:opacity-40 data-[loading=true]:animate-pulse gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-30 disabled:text-opacity-60 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-10 p-2 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-md",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",main:"bg-primary hover:bg-primary-hover text-primary-foreground",warn:"bg-warn hover:bg-warn-hover text-warn-foreground",danger:"bg-danger hover:bg-danger-hover text-danger-foreground",secondary:"bg-secondary hover:bg-secondary-hover text-secondary-foreground",success:"bg-success hover:bg-success-hover text-success-foreground",info:"bg-info hover:bg-info-hover text-info-foreground"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ps=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:s="button",size:i,rounded:a,...l},c){const u=r||l.disabled;return S.jsxs(hs,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,as:l.as??"button",onClick:u?void 0:l.onClick,className:$t(NE({size:i,rounded:a,theme:o}),t),children:[l.children,n]})}),FE=e=>S.jsx("ul",{className:"border-main-bg text-main-foreground flex w-full flex-row rounded-md border-2",children:e.buttons.map(t=>S.jsx("li",{className:"flex flex-1",children:S.jsx("button",{...t,type:t.type||"button","data-active":e.active===t.name?"true":"false",className:$t("flex flex-1 items-center gap-1.5 rounded-sm border-r-2 px-4 py-2 last:border-r-0","cursor-pointer justify-center whitespace-nowrap align-middle font-medium","focus-visible:ring-ring shadow-sm focus-visible:outline-none focus-visible:ring-2 disabled:text-opacity-80","data-[active=true]:bg-main-bg text-body data-[active=true]:text-main transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-50")})},`button-group-${t.name}`))}),LE={isImage:e=>e.type.includes("image")},VE=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(LE.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:hp(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:hp(e.file.size)})},[e.file]),t.type==="img"?S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[S.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),S.jsxs("div",{className:"flex flex-col",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{})})]}):S.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[S.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[S.jsx(px,{size:48}),S.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[S.jsx("span",{children:e.file.name}),S.jsx("span",{children:t.size})]})]}),S.jsx(ps,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:S.jsx(eo,{className:"text-danger"})})]})},$E=e=>S.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>S.jsx(VE,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),RE=e=>e.isDragActive?S.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?S.jsx($E,{onDeleteFile:e.onDeleteFile,files:e.files}):S.jsx(b.Fragment,{children:e.idle}),jE=S.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[S.jsx(yx,{size:64}),S.jsxs("p",{children:["You can drag your files or"," ",S.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),BE=({idle:e=jE,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=f=>{n==null||n(f),s(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=Gp({onDrop:i});return S.jsxs("div",{...a(),"data-active":(u=r.files)!=null&&u.length?r.files.length>0:!1,className:"flex text-foreground flex-col items-center justify-center border-2 rounded-lg p-6 border-card-border data-[active=true]:bg-card-background data-[active=true]:border-solid data-[active=false]:border-dashed",children:[S.jsx("input",{...l(r),name:r.name,id:r.name}),S.jsx(RE,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},zE=["INPUT","SELECT"],Xp=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{zE.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},WE=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return S.jsx("form",{...e,onSubmit:t})},HE=({children:e,...t})=>{const n=b.useId(),[r,o]=b.useState(!1),s=t.checked??r,i=a=>{var u;const c=a.target.dataset.checked!=="true";o(c),(u=t==null?void 0:t.onCheck)==null||u.call(t,c)};return S.jsxs("div",{className:"flex items-center",children:[S.jsx("input",{...t,hidden:!0,type:"checkbox",checked:s,onChange:a=>o(a.target.checked)}),S.jsx("button",{type:"button",role:"switch",onClick:i,"aria-checked":s,"data-checked":s,"aria-labelledby":`${n}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary transition-colors ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:S.jsx("span",{"aria-hidden":"true","data-checked":s,className:"data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch pointer-events-none inline-block size-5 aspect-square data-[checked=false]translate-x-0 data-[checked=true]:translate-x-5 transform rounded-full shadow ring-0 transition ease-in-out"})}),S.jsx("span",{className:"ml-3 text-sm",id:`${n}-label`,children:S.jsx("span",{className:"font-medium text-foreground",children:e})})]})},ji=0,Jn=1,ho=2,Qp=4;function ms(e,t){return n=>e(t(n))}function UE(e,t){return t(e)}function Jp(e,t){return n=>e(t,n)}function em(e,t){return()=>e(t)}function Bi(e,t){return t(e),e}function Ge(...e){return e}function GE(e){e()}function tm(e){return()=>e}function YE(...e){return()=>{e.map(GE)}}function xc(e){return e!==void 0}function Tr(){}function Le(e,t){return e(Jn,t)}function be(e,t){e(ji,t)}function Sc(e){e(ho)}function Ot(e){return e(Qp)}function ce(e,t){return Le(e,Jp(t,ji))}function hn(e,t){const n=e(Jn,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case ho:e.splice(0,e.length);return;case Jn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ji:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function K(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case Jn:o(t);break;case ji:t=o;break;case Qp:return t}return n(r,o)}}function qE(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case Jn:return s?n===s?void 0:(r(),n=s,t=Le(e,s),t):(r(),Tr);case ho:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Gt(e){return Bi(Ce(),t=>ce(e,t))}function kt(e,t){return Bi(K(t),n=>ce(e,n))}function KE(...e){return t=>e.reduceRight(UE,t)}function U(e,...t){const n=KE(...t);return(r,o)=>{switch(r){case Jn:return Le(e,n(o));case ho:Sc(e);return}}}function nm(e,t){return e===t}function Ye(e=nm){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function pe(e){return t=>n=>{e(n)&&t(n)}}function oe(e){return t=>ms(t,e)}function pn(e){return t=>()=>t(e)}function mn(e,t){return n=>r=>n(t=e(t,r))}function po(e){return t=>n=>{e>0?e--:t(n)}}function er(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function rm(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function we(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{const c=n;n=n|a,t[i]=l,c!==o&&n===o&&r&&(r(),r=null)})}),s=>i=>{const a=()=>s([i].concat(t));n===o?a():r=a}}function om(...e){return function(t,n){switch(t){case Jn:return YE(...e.map(r=>Le(r,n)));case ho:return;default:throw new Error(`unrecognized action ${t}`)}}}function ge(e,t=nm){return U(e,Ye(t))}function yt(...e){const t=Ce(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((s,i)=>{const a=Math.pow(2,i);Le(s,l=>{n[i]=l,r=r|a,r===o&&be(t,n)})}),function(s,i){switch(s){case Jn:return r===o&&i(n),Le(t,i);case ho:return Sc(t);default:throw new Error(`unrecognized action ${s}`)}}}function Ae(e,t=[],{singleton:n}={singleton:!0}){return{id:ZE(),constructor:e,dependencies:t,singleton:n}}const ZE=()=>Symbol();function XE(e){const t=new Map,n=({id:r,constructor:o,dependencies:s,singleton:i})=>{if(i&&t.has(r))return t.get(r);const a=o(s.map(l=>n(l)));return i&&t.set(r,a),a};return n(e)}function QE(e,t){const n={},r={};let o=0;const s=e.length;for(;o<s;)r[e[o]]=1,o+=1;for(const i in t)r.hasOwnProperty(i)||(n[i]=t[i]);return n}const zi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Tc(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),s=Object.keys(t.methods||{}),i=Object.keys(t.events||{}),a=b.createContext({});function l(v,w){v.propsReady&&be(v.propsReady,!1);for(const g of r){const T=v[t.required[g]];be(T,w[g])}for(const g of o)if(g in w){const T=v[t.optional[g]];be(T,w[g])}v.propsReady&&be(v.propsReady,!0)}function c(v){return s.reduce((w,g)=>(w[g]=T=>{const x=v[t.methods[g]];be(x,T)},w),{})}function u(v){return i.reduce((w,g)=>(w[g]=qE(v[t.events[g]]),w),{})}const f=b.forwardRef((v,w)=>{const{children:g,...T}=v,[x]=b.useState(()=>Bi(XE(e),C=>l(C,T))),[E]=b.useState(em(u,x));return zi(()=>{for(const C of i)C in T&&Le(E[C],T[C]);return()=>{Object.values(E).map(Sc)}},[T,E,x]),zi(()=>{l(x,T)}),b.useImperativeHandle(w,tm(c(x))),b.createElement(a.Provider,{value:x},n?b.createElement(n,QE([...r,...o,...i],T),g):g)}),d=v=>b.useCallback(Jp(be,b.useContext(a)[v]),[v]),h=v=>{const g=b.useContext(a)[v],T=b.useCallback(x=>Le(g,x),[g]);return b.useSyncExternalStore(T,()=>Ot(g),()=>Ot(g))},p=v=>{const g=b.useContext(a)[v],[T,x]=b.useState(em(Ot,g));return zi(()=>Le(g,E=>{E!==T&&x(tm(E))}),[g,T]),T},m=b.version.startsWith("18")?h:p;return{Component:f,usePublisher:d,useEmitterValue:m,useEmitter:(v,w)=>{const T=b.useContext(a)[v];zi(()=>Le(T,w),[w,T])}}}const JE=typeof document<"u"?b.useLayoutEffect:b.useEffect;var Yt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Yt||{});const eC={0:"debug",1:"log",2:"warn",3:"error"},tC=()=>typeof globalThis>"u"?window:globalThis,tr=Ae(()=>{const e=K(3);return{log:K((n,r,o=1)=>{var s;const i=(s=tC().VIRTUOSO_LOG_LEVEL)!=null?s:Ot(e);o>=i&&console[eC[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Ec(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(s=>{requestAnimationFrame(()=>{const i=s[0].target;i.offsetParent!==null&&e(i)})}),[e]);r=s=>{s&&t?(o.observe(s),n.current=s):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function gn(e,t=!0){return Ec(e,t).callbackRef}function sm(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=nC(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",d=i?i.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,h=i?i.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(d,0),scrollHeight:h,viewportHeight:p}),s==null||s(rC("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return Ec(a,n)}function nC(e,t,n,r){const o=e.length;if(o===0)return null;const s=[];for(let i=0;i<o;i++){const a=e.item(i);if(!a||a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},Yt.ERROR),u===c)continue;const f=s[s.length-1];s.length===0||f.size!==u||f.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function rC(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}function nn(e,t){return Math.round(e.getBoundingClientRect()[t])}function im(e,t){return Math.abs(e-t)<1.01}function am(e,t,n,r=Tr,o){const s=b.useRef(null),i=b.useRef(null),a=b.useRef(null),l=b.useCallback(f=>{const d=f.target,h=d===window||d===document,p=h?window.pageYOffset||document.documentElement.scrollTop:d.scrollTop,m=h?document.documentElement.scrollHeight:d.scrollHeight,y=h?window.innerHeight:d.offsetHeight,v=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:y})};f.suppressFlushSync?v():Bf.flushSync(v),i.current!==null&&(p===i.current||p<=0||p===m-y)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||s.current;return r(o||s.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(f){const d=s.current;if(!d||"offsetHeight"in d&&d.offsetHeight===0)return;const h=f.behavior==="smooth";let p,m,y;d===window?(m=Math.max(nn(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,y=document.documentElement.scrollTop):(m=d.scrollHeight,p=nn(d,"height"),y=d.scrollTop);const v=m-p;if(f.top=Math.ceil(Math.max(Math.min(v,f.top),0)),im(p,m)||f.top===y){e({scrollTop:y,scrollHeight:m,viewportHeight:p}),h&&t(!0);return}h?(i.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,d.scrollTo(f)}function u(f){s.current.scrollBy(f)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Mt=Ae(()=>{const e=Ce(),t=Ce(),n=K(0),r=Ce(),o=K(0),s=Ce(),i=Ce(),a=K(0),l=K(0),c=K(0),u=K(0),f=Ce(),d=Ce(),h=K(!1);return ce(U(e,oe(({scrollTop:p})=>p)),t),ce(U(e,oe(({scrollHeight:p})=>p)),i),ce(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:f,scrollBy:d,statefulScrollTop:o,deviation:n,scrollingInProgress:h}},[],{singleton:!0}),gs={lvl:0};function lm(e,t,n,r=gs,o=gs){return{k:e,v:t,lvl:n,l:r,r:o}}function Be(e){return e===gs}function mo(){return gs}function Cc(e,t){if(Be(e))return gs;const{k:n,l:r,r:o}=e;if(t===n){if(Be(r))return o;if(Be(o))return r;{const[s,i]=cm(r);return Wi(dt(e,{k:s,v:i,l:um(r)}))}}else return t<n?Wi(dt(e,{l:Cc(r,t)})):Wi(dt(e,{r:Cc(o,t)}))}function ys(e,t){if(!Be(e))return t===e.k?e.v:t<e.k?ys(e.l,t):ys(e.r,t)}function rn(e,t,n="k"){if(Be(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=rn(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return rn(e.l,t,n)}function qt(e,t,n){return Be(e)?lm(t,n,1):t===e.k?dt(e,{k:t,v:n}):t<e.k?fm(dt(e,{l:qt(e.l,t,n)})):fm(dt(e,{r:qt(e.r,t,n)}))}function Pc(e,t,n){if(Be(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(Pc(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(Pc(i,t,n))),a}function Er(e){return Be(e)?[]:[...Er(e.l),{k:e.k,v:e.v},...Er(e.r)]}function cm(e){return Be(e.r)?[e.k,e.v]:cm(e.r)}function um(e){return Be(e.r)?e.l:Wi(dt(e,{r:um(e.r)}))}function dt(e,t){return lm(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 Oc(e){return Be(e)||e.lvl>e.r.lvl}function fm(e){return kc(hm(e))}function Wi(e){const{l:t,r:n,lvl:r}=e;if(n.lvl>=r-1&&t.lvl>=r-1)return e;if(r>n.lvl+1){if(Oc(t))return hm(dt(e,{lvl:r-1}));if(!Be(t)&&!Be(t.r))return dt(t.r,{l:dt(t,{r:t.r.l}),r:dt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(Oc(e))return kc(dt(e,{lvl:r-1}));if(!Be(n)&&!Be(n.l)){const o=n.l,s=Oc(o)?n.lvl-1:n.lvl;return dt(o,{l:dt(e,{r:o.l,lvl:r-1}),r:kc(dt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Hi(e,t,n){if(Be(e))return[];const r=rn(e,t)[0];return oC(Pc(e,r,n))}function dm(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const s=[];for(let i=1;i<n;i++){const{index:a,value:l}=t(e[i]);s.push({start:r,end:a-1,value:o}),r=a,o=l}return s.push({start:r,end:1/0,value:o}),s}function oC(e){return dm(e,({k:t,v:n})=>({index:t,value:n}))}function kc(e){const{r:t,lvl:n}=e;return!Be(t)&&!Be(t.r)&&t.lvl===n&&t.r.lvl===n?dt(t,{l:dt(e,{r:t.l}),lvl:n+1}):e}function hm(e){const{l:t}=e;return!Be(t)&&t.lvl===e.lvl?dt(t,{r:dt(e,{l:t.r})}):e}function Ui(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const s=Math.floor((r+o)/2),i=e[s],a=n(i,t);if(a===0)return s;if(a===-1){if(o-r<2)return s-1;o=s-1}else{if(o===r)return s;r=s+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function pm(e,t,n){return e[Ui(e,t,n)]}function sC(e,t,n,r){const o=Ui(e,t,r),s=Ui(e,n,r,o);return e.slice(o,s+1)}const _c=Ae(()=>({recalcInProgress:K(!1)}),[],{singleton:!0});function iC(e){const{size:t,startIndex:n,endIndex:r}=e;return o=>o.start===n&&(o.end===r||o.end===1/0)&&o.value===t}function mm(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 aC(e,t){let n=Be(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),Be(e)){e=qt(e,0,o);continue}const a=Hi(e,s-1,i+1);if(a.some(iC(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:d}of a)l?(i>=u||o===d)&&(e=Cc(e,u)):(c=d!==o,l=!0),f>i&&i>=u&&d!==o&&(e=qt(e,i+1,d));c&&(e=qt(e,s,o))}return[e,n]}function lC(){return{offsetTree:[],sizeTree:mo(),groupOffsetTree:mo(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Ac({index:e},t){return t===e?0:t<e?-1:1}function cC({offset:e},t){return t===e?0:t<e?-1:1}function uC(e){return{index:e.index,value:e}}function fC(e,t,n,r=0){return r>0&&(t=Math.max(t,pm(e,r,Ac).offset)),dm(sC(e,t,n,cC),uC)}function Ic(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=Ui(o,t-1,Ac),a=o[l].offset;const u=rn(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===rn(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Hi(n,t,1/0)){const f=c-s,d=f*i+a+f*r;o.push({offset:d,size:u,index:c}),s=c,a=d,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function dC(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,Yt.DEBUG);const s=e.sizeTree;let i=s,a=0;if(n.length>0&&Be(s)&&t.length===2){const d=t[0].size,h=t[1].size;i=n.reduce((p,m)=>qt(qt(p,m,d),m+1,h),i)}else[i,a]=aC(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=Ic(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((d,h)=>qt(d,h,vs(h,l,o)),mo()),groupIndices:n}}function vs(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=pm(t,e,Ac),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function hC(e){return typeof e.groupIndex<"u"}function gm(e,t,n){if(hC(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=ym(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function ym(e,t){if(!Gi(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Gi(e){return!Be(e.groupOffsetTree)}function pC(e){return Er(e).map(({k:t,v:n},r,o)=>{const s=o[r+1],i=s?s.k-1:1/0;return{startIndex:t,endIndex:i,size:n}})}const mC={offsetHeight:"height",offsetWidth:"width"},yn=Ae(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=kt(r,0),s=Ce(),i=Ce(),a=K(0),l=K([]),c=K(void 0),u=K(void 0),f=K((x,E)=>nn(x,mC[E])),d=K(void 0),h=K(0),p=lC(),m=kt(U(n,we(l,e,h),mn(dC,p),Ye()),p),y=kt(U(l,Ye(),mn((x,E)=>({prev:x.current,current:E}),{prev:[],current:[]}),oe(({prev:x})=>x)),[]);ce(U(l,pe(x=>x.length>0),we(m,h),oe(([x,E,C])=>{const O=x.reduce((I,N,L)=>qt(I,N,vs(N,E.offsetTree,C)||L),mo());return{...E,groupIndices:x,groupOffsetTree:O}})),m),ce(U(r,we(m),pe(([x,{lastIndex:E}])=>x<E),oe(([x,{lastIndex:E,lastSize:C}])=>[{startIndex:x,endIndex:E,size:C}])),n),ce(c,u);const v=kt(U(c,oe(x=>x===void 0)),!0);ce(U(u,pe(x=>x!==void 0&&Be(Ot(m).sizeTree)),oe(x=>[{startIndex:0,endIndex:0,size:x}])),n);const w=Gt(U(n,we(m),mn(({sizes:x},[E,C])=>({changed:C!==x,sizes:C}),{changed:!1,sizes:p}),oe(x=>x.changed)));Le(U(a,mn((x,E)=>({diff:x.prev-E,prev:E}),{diff:0,prev:0}),oe(x=>x.diff)),x=>{const{groupIndices:E}=Ot(m);if(x>0)be(t,!0),be(s,x+mm(x,E));else if(x<0){const C=Ot(y);C.length>0&&(x-=mm(-x,C)),be(i,x)}}),Le(U(a,we(e)),([x,E])=>{x<0&&E("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},Yt.ERROR)});const g=Gt(s);ce(U(s,we(m),oe(([x,E])=>{const C=E.groupIndices.length>0,O=[],I=E.lastSize;if(C){const N=ys(E.sizeTree,0);let L=0,_=0;for(;L<x;){const k=E.groupIndices[_],F=E.groupIndices.length===_+1?1/0:E.groupIndices[_+1]-k-1;O.push({startIndex:k,endIndex:k,size:N}),O.push({startIndex:k+1,endIndex:k+1+F-1,size:I}),_++,L+=F+1}const j=Er(E.sizeTree);return L!==x&&j.shift(),j.reduce((k,{k:F,v:$})=>{let z=k.ranges;return k.prevSize!==0&&(z=[...k.ranges,{startIndex:k.prevIndex,endIndex:F+x-1,size:k.prevSize}]),{ranges:z,prevIndex:F+x,prevSize:$}},{ranges:O,prevIndex:x,prevSize:0}).ranges}return Er(E.sizeTree).reduce((N,{k:L,v:_})=>({ranges:[...N.ranges,{startIndex:N.prevIndex,endIndex:L+x-1,size:N.prevSize}],prevIndex:L+x,prevSize:_}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Gt(U(i,we(m,h),oe(([x,{offsetTree:E},C])=>{const O=-x;return vs(O,E,C)})));return ce(U(i,we(m,h),oe(([x,E,C])=>{if(E.groupIndices.length>0){if(Be(E.sizeTree))return E;let I=mo();const N=Ot(y);let L=0,_=0,j=0;for(;L<-x;){j=N[_];const k=N[_+1]-j-1;_++,L+=k+1}if(I=Er(E.sizeTree).reduce((k,{k:F,v:$})=>qt(k,Math.max(0,F+x),$),I),L!==-x){const k=ys(E.sizeTree,j);I=qt(I,0,k);const F=rn(E.sizeTree,-x+1)[1];I=qt(I,1,F)}return{...E,sizeTree:I,...Ic(E.offsetTree,0,I,C)}}else{const I=Er(E.sizeTree).reduce((N,{k:L,v:_})=>qt(N,Math.max(0,L+x),_),mo());return{...E,sizeTree:I,...Ic(E.offsetTree,0,I,C)}}})),m),{data:d,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:g,firstItemIndex:a,gap:h,sizes:m,listRefresh:w,statefulTotalCount:o,trackItemSizes:v,itemSize:f}},Ge(tr,_c),{singleton:!0}),gC=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function vm(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!gC)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const bs=Ae(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:d}])=>{const h=Ce(),p=Ce(),m=K(0);let y=null,v=null,w=null;function g(){y&&(y(),y=null),w&&(w(),w=null),v&&(clearTimeout(v),v=null),be(o,!1)}return ce(U(h,we(e,s,t,m,l,c,d),we(r,u,f),oe(([[T,x,E,C,O,I,N,L],_,j,D])=>{const k=vm(T),{align:F,behavior:$,offset:z}=k,q=C-1,P=gm(k,x,q);let V=vs(P,x.offsetTree,_)+I;F==="end"?(V+=j+rn(x.sizeTree,P)[1]-E+D,P===q&&(V+=N)):F==="center"?V+=(j+rn(x.sizeTree,P)[1]-E+D)/2:V-=O,z&&(V+=z);const Q=ie=>{g(),ie?(L("retrying to scroll to",{location:T},Yt.DEBUG),be(h,T)):(be(p,!0),L("list did not change, scroll successful",{},Yt.DEBUG))};if(g(),$==="smooth"){let ie=!1;w=Le(n,ee=>{ie=ie||ee}),y=hn(a,()=>{Q(ie)})}else y=hn(U(n,yC(150)),Q);return v=setTimeout(()=>{g()},1200),be(o,!0),L("scrolling from index to",{index:P,top:V,behavior:$},Yt.DEBUG),{top:V,behavior:$}})),i),{scrollToIndex:h,scrollTargetReached:p,topListHeight:m}},Ge(yn,Mt,tr),{singleton:!0});function yC(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const ws="up",xs="down",vC="none",bC={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},wC=0,Ss=Ae(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=K(!1),a=K(!0),l=Ce(),c=Ce(),u=K(4),f=K(wC),d=kt(U(om(U(ge(t),po(1),pn(!0)),U(ge(t),po(1),pn(!1),rm(100))),Ye()),!1),h=kt(U(om(U(s,pn(!0)),U(s,pn(!1),rm(200))),Ye()),!1);ce(U(yt(ge(t),ge(f)),oe(([w,g])=>w<=g),Ye()),a),ce(U(a,er(50)),c);const p=Gt(U(yt(e,ge(n),ge(r),ge(o),ge(u)),mn((w,[{scrollTop:g,scrollHeight:T},x,E,C,O])=>{const I=g+x-T>-O,N={viewportHeight:x,scrollTop:g,scrollHeight:T};if(I){let _,j;return g>w.state.scrollTop?(_="SCROLLED_DOWN",j=w.state.scrollTop-g):(_="SIZE_DECREASED",j=w.state.scrollTop-g||w.scrollTopDelta),{atBottom:!0,state:N,atBottomBecause:_,scrollTopDelta:j}}let L;return N.scrollHeight>w.state.scrollHeight?L="SIZE_INCREASED":x<w.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":g<w.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:N}},bC),Ye((w,g)=>w&&w.atBottom===g.atBottom))),m=kt(U(e,mn((w,{scrollTop:g,scrollHeight:T,viewportHeight:x})=>{if(im(w.scrollHeight,T))return{scrollTop:g,scrollHeight:T,jump:0,changed:!1};{const E=T-(g+x)<1;return w.scrollTop!==g&&E?{scrollHeight:T,scrollTop:g,jump:w.scrollTop-g,changed:!0}:{scrollHeight:T,scrollTop:g,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),pe(w=>w.changed),oe(w=>w.jump)),0);ce(U(p,oe(w=>w.atBottom)),i),ce(U(i,er(50)),l);const y=K(xs);ce(U(e,oe(({scrollTop:w})=>w),Ye(),mn((w,g)=>Ot(h)?{direction:w.direction,prevScrollTop:g}:{direction:g<w.prevScrollTop?ws:xs,prevScrollTop:g},{direction:xs,prevScrollTop:0}),oe(w=>w.direction)),y),ce(U(e,er(50),pn(vC)),y);const v=K(0);return ce(U(d,pe(w=>!w),pn(0)),v),ce(U(t,er(100),we(d),pe(([w,g])=>!!g),mn(([w,g],[T])=>[g,T],[0,0]),oe(([w,g])=>g-w)),v),{isScrolling:d,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:y,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:v,lastJumpDueToItemResize:m}},Ge(Mt)),nr=Ae(([{log:e}])=>{const t=K(!1),n=Gt(U(t,pe(r=>r),Ye()));return Le(t,r=>{r&&Ot(e)("props updated",{},Yt.DEBUG)}),{propsReady:t,didMount:n}},Ge(tr),{singleton:!0});function Dc(e,t){e==0?t():requestAnimationFrame(()=>Dc(e-1,t))}function Mc(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Ts=Ae(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=K(!0),l=K(0),c=K(!0);return ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),a),ce(U(i,we(l),pe(([u,f])=>!!f),pn(!1)),c),Le(U(yt(t,i),we(a,e,n,c),pe(([[,u],f,{sizeTree:d},h,p])=>u&&(!Be(d)||xc(h))&&!f&&!p),we(l)),([,u])=>{hn(s,()=>{be(c,!0)}),Dc(4,()=>{hn(r,()=>{be(a,!0)}),be(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Ge(yn,Mt,bs,nr),{singleton:!0});function bm(e){return e?e==="smooth"?"smooth":"auto":!1}const xC=(e,t)=>typeof e=="function"?bm(e(t)):t&&bm(e),SC=Ae(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=K(!1),f=Ce();let d=null;function h(m){be(o,{index:"LAST",align:"end",behavior:m})}Le(U(yt(U(ge(e),po(1)),a),we(ge(u),n,s,c),oe(([[m,y],v,w,g,T])=>{let x=y&&g,E="auto";return x&&(E=xC(v,w||T),x=x&&!!E),{totalCount:m,shouldFollow:x,followOutputBehavior:E}}),pe(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:y})=>{d&&(d(),d=null),d=hn(t,()=>{Ot(l)("following output to ",{totalCount:m},Yt.DEBUG),h(y),d=null})});function p(m){const y=hn(r,v=>{m&&!v.atBottom&&v.notAtBottomBecause==="SIZE_INCREASED"&&!d&&(Ot(l)("scrolling to bottom due to increased size",{},Yt.DEBUG),h("auto"))});setTimeout(y,100)}return Le(U(yt(ge(u),e,i),pe(([m,,y])=>m&&y),mn(({value:m},[,y])=>({refreshed:m===y,value:y}),{refreshed:!1,value:0}),pe(({refreshed:m})=>m),we(u,e)),([,m])=>{Ot(s)&&p(m!==!1)}),Le(f,()=>{p(Ot(u)!==!1)}),Le(yt(ge(u),r),([m,y])=>{m&&!y.atBottom&&y.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")}),{followOutput:u,autoscrollToBottom:f}},Ge(yn,Ss,bs,Ts,nr,tr,Mt));function TC(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const wm=Ae(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Gt(U(s,oe(TC)));return ce(U(a,oe(l=>l.totalCount)),e),ce(U(a,oe(l=>l.groupIndices)),t),ce(U(yt(r,n,o),pe(([l,c])=>Gi(c)),oe(([l,c,u])=>rn(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ye(),oe(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Ge(yn,Mt));function Es(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function xm(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Yi="top",qi="bottom",Sm="none";function Tm(e,t,n){return typeof e=="number"?n===ws&&t===Yi||n===xs&&t===qi?e:0:n===ws?t===Yi?e.main:e.reverse:t===qi?e.main:e.reverse}function Em(e,t){return typeof e=="number"?e:e[t]||0}const Nc=Ae(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=K(0),a=K(0),l=K(0),c=kt(U(yt(ge(e),ge(t),ge(r),ge(s,Es),ge(l),ge(i),ge(o),ge(n),ge(a)),oe(([u,f,d,[h,p],m,y,v,w,g])=>{const T=u-w,x=y+v,E=Math.max(d-T,0);let C=Sm;const O=Em(g,Yi),I=Em(g,qi);return h-=w,h+=d+v,p+=d+v,p-=w,h>u+x-O&&(C=ws),p<u-E+f+I&&(C=xs),C!==Sm?[Math.max(T-d-Tm(m,Yi,C)-O,0),T-E-v+f+Tm(m,qi,C)+I]:null}),pe(u=>u!=null),Ye(Es)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Ge(Mt),{singleton:!0});function EC(e,t,n){if(Gi(t)){const r=ym(e,t);return[{index:rn(t.groupOffsetTree,r)[0],size:0,offset:0},{index:r,size:0,offset:0,data:n&&n[0]}]}return[{index:e,size:0,offset:0,data:n&&n[0]}]}const Fc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Cm(e,t,n){if(e.length===0)return[];if(!Gi(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,s=[],i=Hi(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=i.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={type:"group",index:l}:u={index:c.index-(l+1)+n,groupIndex:l},s.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return s}function Ki(e,t,n,r,o,s){const{lastSize:i,lastOffset:a,lastIndex:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const m=e[e.length-1];u=m.offset+m.size}const f=n-l,d=a+f*i+(f-1)*r,h=c,p=d-u;return{items:Cm(e,o,s),topItems:Cm(t,o,s),topListHeight:t.reduce((m,y)=>y.size+m,0),offsetTop:c,offsetBottom:p,top:h,bottom:u,totalCount:n,firstItemIndex:s}}function Pm(e,t,n,r,o,s){let i=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-i>=e)break;i++}const a=e+i,l=Mc(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:s[f+l]}));return Ki(c,[],a,o,n,r)}const Cr=Ae(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},d,{didMount:h},{recalcInProgress:p}])=>{const m=K([]),y=K(0),v=Ce();ce(s.topItemsIndexes,m);const w=kt(U(yt(h,p,ge(i,Es),ge(t),ge(e),ge(u),c,ge(m),ge(r),ge(o),n),pe(([E,C,,O,,,,,,,I])=>{const N=I&&I.length!==O;return E&&!C&&!N}),oe(([,,[E,C],O,I,N,L,_,j,D,k])=>{const F=I,{sizeTree:$,offsetTree:z}=F,q=Ot(y);if(O===0)return{...Fc,totalCount:O};if(E===0&&C===0)return q===0?{...Fc,totalCount:O}:Pm(q,N,I,j,D,k||[]);if(Be($))return q>0?null:Ki(EC(Mc(N,O),F,k),[],O,D,F,j);const P=[];if(_.length>0){const H=_[0],A=_[_.length-1];let R=0;for(const W of Hi($,H,A)){const Y=W.value,Z=Math.max(W.start,H),de=Math.min(W.end,A);for(let B=Z;B<=de;B++)P.push({index:B,size:Y,offset:R,data:k&&k[B]}),R+=Y}}if(!L)return Ki([],P,O,D,F,j);const V=_.length>0?_[_.length-1]+1:0,Q=fC(z,E,C,V);if(Q.length===0)return null;const ie=O-1,ee=Bi([],H=>{for(const A of Q){const R=A.value;let W=R.offset,Y=A.start;const Z=R.size;if(R.offset<E){Y+=Math.floor((E-R.offset+D)/(Z+D));const B=Y-A.start;W+=B*Z+B*D}Y<V&&(W+=(V-Y)*Z,Y=V);const de=Math.min(A.end,ie);for(let B=Y;B<=de&&!(W>=C);B++)H.push({index:B,size:Z,offset:W,data:k&&k[B]}),W+=Z+D}});return Ki(ee,P,O,D,F,j)}),pe(E=>E!==null),Ye()),Fc);ce(U(n,pe(xc),oe(E=>E==null?void 0:E.length)),t),ce(U(w,oe(E=>E.topListHeight)),f),ce(f,l),ce(U(w,oe(E=>[E.top,E.bottom])),a),ce(U(w,oe(E=>E.items)),v);const g=Gt(U(w,pe(({items:E})=>E.length>0),we(t,n),pe(([{items:E},C])=>E[E.length-1].originalIndex===C-1),oe(([,E,C])=>[E-1,C]),Ye(Es),oe(([E])=>E))),T=Gt(U(w,er(200),pe(({items:E,topItems:C})=>E.length>0&&E[0].originalIndex===C.length),oe(({items:E})=>E[0].index),Ye())),x=Gt(U(w,pe(({items:E})=>E.length>0),oe(({items:E})=>{let C=0,O=E.length-1;for(;E[C].type==="group"&&C<O;)C++;for(;E[O].type==="group"&&O>C;)O--;return{startIndex:E[C].index,endIndex:E[O].index}}),Ye(xm)));return{listState:w,topItemsIndexes:m,endReached:g,startReached:T,rangeChanged:x,itemsRendered:v,initialItemCount:y,...d}},Ge(yn,wm,Nc,Ts,bs,Ss,nr,_c),{singleton:!0}),CC=Ae(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ce(U(a,we(s),pe(([,l])=>l!==0),we(o,e,t,r,n),oe(([[,l],c,u,f,d,h=[]])=>Pm(l,c,u,f,d,h))),i),{}),Ge(yn,Ts,Cr,nr),{singleton:!0}),Om=Ae(([{scrollVelocity:e}])=>{const t=K(!1),n=Ce(),r=K(!1);return ce(U(e,we(r,t,n),pe(([o,s])=>!!s),oe(([o,s,i,a])=>{const{exit:l,enter:c}=s;if(i){if(l(o,a))return!1}else if(c(o,a))return!0;return i}),Ye()),t),Le(U(yt(t,e,n),we(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Ge(Ss),{singleton:!0}),PC=Ae(([{topItemsIndexes:e}])=>{const t=K(0);return ce(U(t,pe(n=>n>0),oe(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Ge(Cr)),km=Ae(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=kt(U(yt(e,r,t,n,o),oe(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return ce(ge(i),s),{totalListHeight:i,totalListHeightChanged:s}},Ge(Mt,Cr),{singleton:!0});function _m(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const OC=_m(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kC=Ae(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:d},{log:h},{recalcInProgress:p}])=>{const m=Gt(U(l,we(a),mn(([,v,w,g],[{items:T,totalCount:x,bottom:E,offsetBottom:C},O])=>{const I=E+C;let N=0;return w===x&&v.length>0&&T.length>0&&(T[0].originalIndex===0&&v[0].originalIndex===0||(N=I-g,N!==0&&(N+=O))),[N,T,x,I]},[0,[],0,0]),pe(([v])=>v!==0),we(t,i,r,s,h,p),pe(([,v,w,g,,,T])=>!T&&!g&&v!==0&&w===ws),oe(([[v],,,,,w])=>(w("Upward scrolling compensation",{amount:v},Yt.DEBUG),v))));function y(v){v>0?(be(e,{top:-v,behavior:"auto"}),be(n,0)):(be(n,0),be(e,{top:-v,behavior:"auto"}))}return Le(U(m,we(n,o)),([v,w,g])=>{g&&OC()?be(n,w-v):y(-v)}),Le(U(yt(kt(o,!1),n,p),pe(([v,w,g])=>!v&&!g&&w!==0),oe(([v,w])=>w),er(1)),y),ce(U(u,oe(v=>({top:-v}))),e),Le(U(c,we(f,d),oe(([v,{lastSize:w,groupIndices:g,sizeTree:T},x])=>{function E(C){return C*(w+x)}if(g.length===0)return E(v);{let C=0;const O=ys(T,0);let I=0,N=0;for(;I<v;){I++,C+=O;let L=g.length===N+1?1/0:g[N+1]-g[N]-1;I+L>v&&(C-=O,L=v-I+1),I+=L,C+=E(L),N++}return C}})),v=>{be(n,v),requestAnimationFrame(()=>{be(e,{top:v}),requestAnimationFrame(()=>{be(n,0),be(p,!1)})})}),{deviation:n}},Ge(Mt,Ss,Cr,yn,tr,_c)),_C=Ae(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=K(0);return Le(U(e,we(r),pe(([,o])=>o!==0),oe(([,o])=>({top:o}))),o=>{hn(U(n,po(1),pe(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{be(t,o)})})}),{initialScrollTop:r}},Ge(nr,Mt,Cr),{singleton:!0}),AC=Ae(([{viewportHeight:e},{totalListHeight:t}])=>{const n=K(!1),r=kt(U(yt(n,e,t),pe(([o])=>o),oe(([,o,s])=>Math.max(0,o-s)),er(0),Ye()),0);return{alignToBottom:n,paddingTopAddition:r}},Ge(Mt,km),{singleton:!0}),Lc=Ae(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=K(!1),i=K(void 0);return ce(U(yt(n,r),oe(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ce(U(e,we(r),oe(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Ge(Mt)),IC=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:s,...i}})=>e<n?{...i,behavior:o,align:s??"start"}:t>r?{...i,behavior:o,align:s??"end"}:null,DC=Ae(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ce(U(u,we(e,o,t,s,i,a,r),we(n),oe(([[f,d,h,p,m,y,v,w],g])=>{const{done:T,behavior:x,align:E,calculateViewLocation:C=IC,...O}=f,I=gm(f,d,p-1),N=vs(I,d.offsetTree,g)+m+y,L=N+rn(d.sizeTree,I)[1],_=w+y,j=w+h-v,D=C({itemTop:N,itemBottom:L,viewportTop:_,viewportBottom:j,locationParams:{behavior:x,align:E,...O}});return D?T&&hn(U(l,pe(k=>k===!1),po(Ot(l)?1:2)),T):T&&T(),D}),pe(f=>f!==null)),c),{scrollIntoView:u}},Ge(yn,Mt,bs,Cr,tr),{singleton:!0}),MC=Ae(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=K(void 0),f=K(null),d=K(null);return ce(a,f),ce(l,d),Le(U(c,we(e,n,i,f,d,r)),([h,p,m,y,v,w,g])=>{const T=pC(p.sizeTree);y&&v!==null&&w!==null&&(m=v.scrollTop-w.offsetTop),m-=g,h({ranges:T,scrollTop:m})}),ce(U(u,pe(xc),oe(NC)),o),ce(U(s,we(u),pe(([,h])=>h!==void 0),Ye(),oe(([,h])=>h.ranges)),t),{getState:c,restoreStateFrom:u}},Ge(yn,Mt,Ts,nr,Lc));function NC(e){return{offset:e.scrollTop,index:0,align:"start"}}const FC=Ae(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Ge(Nc,CC,nr,Om,km,_C,AC,Lc,DC,tr)),Am=Ae(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p},m,y,v,{listState:w,topItemsIndexes:g,...T},{scrollToIndex:x},E,{topItemCount:C},{groupCounts:O},I])=>(ce(T.rangeChanged,I.scrollSeekRangeChanged),ce(U(I.windowViewportRect,oe(N=>N.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:d,scrolledToInitialItem:h,initialItemFinalLocationReached:p,topItemsIndexes:g,topItemCount:C,groupCounts:O,fixedItemHeight:n,defaultItemHeight:r,gap:u,...v,statefulTotalCount:c,listState:w,scrollToIndex:x,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:f,...y}),Ge(yn,Ts,Mt,MC,SC,Cr,bs,kC,PC,wm,FC)),Vc="-webkit-sticky",Im="sticky",Dm=_m(()=>{if(typeof document>"u")return Im;const e=document.createElement("div");return e.style.position=Vc,e.style.position===Vc?Vc:Im});function $c(e,t){const n=b.useRef(null),r=b.useCallback(a=>{if(a===null||!a.offsetParent)return;const l=a.getBoundingClientRect(),c=l.width;let u,f;if(t){const d=t.getBoundingClientRect(),h=l.top-d.top;u=d.height-Math.max(0,h),f=h+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),f=l.top+window.pageYOffset;n.current={offsetTop:f,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=Ec(r),i=b.useCallback(()=>{r(s.current)},[r,s]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",i);const a=new ResizeObserver(()=>{requestAnimationFrame(i)});return a.observe(t),()=>{t.removeEventListener("scroll",i),a.unobserve(t)}}else return window.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[i,t]),o}const Zi=b.createContext(void 0),Mm=b.createContext(void 0);function Rc(e){return e}const LC=Ae(([e,t])=>({...e,...t}),Ge(Am,Ae(()=>{const e=K(l=>`Item ${l}`),t=K(null),n=K(l=>`Group ${l}`),r=K({}),o=K(Rc),s=K("div"),i=K(Tr),a=(l,c=null)=>kt(U(r,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:s,scrollerRef:i,FooterComponent:a("Footer"),HeaderComponent:a("Header"),TopItemListComponent:a("TopItemList"),ListComponent:a("List","div"),ItemComponent:a("Item","div"),GroupComponent:a("Group","div"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder")}}))),VC=({height:e})=>b.createElement("div",{style:{height:e}}),$C={position:Dm(),zIndex:1,overflowAnchor:"none"},RC={overflowAnchor:"none"},Nm=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Zt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Zt("windowScrollContainerState"),a=Zt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),f=Te("groupContent"),d=Te("trackItemSizes"),h=Te("itemSize"),p=Te("log"),m=Zt("gap"),{callbackRef:y}=sm(r,h,d,t?Tr:l,p,m,s),[v,w]=b.useState(0);zc("deviation",D=>{v!==D&&w(D)});const g=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||VC,x=Te("ListComponent"),E=Te("ItemComponent"),C=Te("GroupComponent"),O=Te("computeItemKey"),I=Te("isSeeking"),N=Te("groupIndices").length>0,L=Te("alignToBottom"),_=Te("initialItemFinalLocationReached"),j=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:v!==0?v:L?"auto":0,..._?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&g?b.createElement(g,et(g,u)):b.createElement(x,{...et(x,u),ref:y,style:j,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(D=>{const k=D.originalIndex,F=O(k+n.firstItemIndex,D.data,u);return I?b.createElement(T,{...et(T,u),key:F,index:D.index,height:D.size,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?b.createElement(C,{...et(C,u),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,style:$C},f(D.index,u)):b.createElement(E,{...et(E,u),...Fm(E,D.data),key:F,"data-index":k,"data-known-size":D.size,"data-item-index":D.index,"data-item-group-index":D.groupIndex,style:RC},N?c(D.index,D.groupIndex,D.data,u):c(D.index,D.data,u))}))}),jC={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},go=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),BC={width:"100%",position:Dm(),top:0,zIndex:1};function et(e,t){if(typeof e!="string")return{context:t}}function Fm(e,t){return{item:typeof e=="string"?void 0:t}}const zC=b.memo(function(){const t=Te("HeaderComponent"),n=Zt("headerHeight"),r=Te("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),WC=b.memo(function(){const t=Te("FooterComponent"),n=Zt("footerHeight"),r=Te("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null});function jc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),d=n("context"),{scrollerRef:h,scrollByCallback:p,scrollToCallback:m}=am(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:h,style:{...jC,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...et(c,d)},i)})}function Bc({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:s,children:i,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),d=n("deviation"),h=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:y,scrollToCallback:v}=am(l,u,c,Tr,h);return JE(()=>(m.current=h||window,()=>{m.current=null}),[m,h]),t("windowScrollTo",v),t("scrollBy",y),b.createElement(c,{style:{position:"relative",...s,...f!==0?{height:f+d}:{}},"data-virtuoso-scroller":!0,...a,...et(c,p)},i)})}const HC=({children:e})=>{const t=b.useContext(Zi),n=Zt("viewportHeight"),r=Zt("fixedItemHeight"),o=Te("alignToBottom"),s=gn(b.useMemo(()=>ms(n,i=>nn(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:go(o),ref:s,"data-viewport-type":"element"},e)},UC=({children:e})=>{const t=b.useContext(Zi),n=Zt("windowViewportRect"),r=Zt("fixedItemHeight"),o=Te("customScrollParent"),s=$c(n,o),i=Te("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:go(i),"data-viewport-type":"window"},e)},GC=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={...BC,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...et(t,o)},e)},YC=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?ZC:KC,i=o||n?UC:HC;return b.createElement(s,{...t},r&&b.createElement(GC,null,b.createElement(Nm,{showTopList:!0})),b.createElement(i,null,b.createElement(zC,null),b.createElement(Nm,null),b.createElement(WC,null)))}),{Component:qC,usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}=Tc(LC,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},YC),KC=jc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),ZC=Bc({usePublisher:Zt,useEmitterValue:Te,useEmitter:zc}),XC=qC,Lm={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},QC={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Vm,ceil:$m,floor:Xi,min:Wc,max:Cs}=Math;function JC(e){return{...QC,items:e}}function Rm(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const s=n===null?null:n[o+e];return{index:o+e,data:s}})}function eP(e,t){return e&&e.column===t.column&&e.row===t.row}function Qi(e,t){return e&&e.width===t.width&&e.height===t.height}const tP=Ae(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,d,{propsReady:h,didMount:p},{windowViewportRect:m,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,windowScrollTo:g},T])=>{const x=K(0),E=K(0),C=K(Lm),O=K({height:0,width:0}),I=K({height:0,width:0}),N=Ce(),L=Ce(),_=K(0),j=K(null),D=K({row:0,column:0}),k=Ce(),F=Ce(),$=K(!1),z=K(0),q=K(!0),P=K(!1);Le(U(p,we(z),pe(([A,R])=>!!R)),()=>{be(q,!1),be(E,0)}),Le(U(yt(p,q,I,O,z,P),pe(([A,R,W,Y,,Z])=>A&&!R&&W.height!==0&&Y.height!==0&&!Z)),([,,,,A])=>{be(P,!0),Dc(1,()=>{be(N,A)}),hn(U(r),()=>{be(n,[0,0]),be(q,!0)})}),ce(U(F,pe(A=>A!=null&&A.scrollTop>0),pn(0)),E),Le(U(p,we(F),pe(([,A])=>A!=null)),([,A])=>{A&&(be(O,A.viewport),be(I,A==null?void 0:A.item),be(D,A.gap),A.scrollTop>0&&(be($,!0),hn(U(r,po(1)),R=>{be($,!1)}),be(i,{top:A.scrollTop})))}),ce(U(O,oe(({height:A})=>A)),o),ce(U(yt(ge(O,Qi),ge(I,Qi),ge(D,(A,R)=>A&&A.column===R.column&&A.row===R.row),ge(r)),oe(([A,R,W,Y])=>({viewport:A,item:R,gap:W,scrollTop:Y}))),k),ce(U(yt(ge(x),t,ge(D,eP),ge(I,Qi),ge(O,Qi),ge(j),ge(E),ge($),ge(q),ge(z)),pe(([,,,,,,,A])=>!A),oe(([A,[R,W],Y,Z,de,B,Me,,rt,He])=>{const{row:ot,column:ue}=Y,{height:Ee,width:le}=Z,{width:Oe}=de;if(Me===0&&(A===0||Oe===0))return Lm;if(le===0){const Lt=Mc(He,A),jr=Lt===0?Math.max(Me-1,0):Lt;return JC(Rm(Lt,jr,B))}const ut=Bm(Oe,le,ue);let ke,ft;rt?R===0&&W===0&&Me>0?(ke=0,ft=Me-1):(ke=ut*Xi((R+ot)/(Ee+ot)),ft=ut*$m((W+ot)/(Ee+ot))-1,ft=Wc(A-1,Cs(ft,ut-1)),ke=Wc(ft,Cs(0,ke))):(ke=0,ft=-1);const X=Rm(ke,ft,B),{top:se,bottom:_e}=jm(de,Y,Z,X),Ke=$m(A/ut),At=Ke*Ee+(Ke-1)*ot-_e;return{items:X,offsetTop:se,offsetBottom:At,top:se,bottom:_e,itemHeight:Ee,itemWidth:le}})),C),ce(U(j,pe(A=>A!==null),oe(A=>A.length)),x),ce(U(yt(O,I,C,D),pe(([A,R,{items:W}])=>W.length>0&&R.height!==0&&A.height!==0),oe(([A,R,{items:W},Y])=>{const{top:Z,bottom:de}=jm(A,Y,R,W);return[Z,de]}),Ye(Es)),n);const V=K(!1);ce(U(r,we(V),oe(([A,R])=>R||A!==0)),V);const Q=Gt(U(ge(C),pe(({items:A})=>A.length>0),we(x,V),pe(([{items:A},R,W])=>W&&A[A.length-1].index===R-1),oe(([,A])=>A-1),Ye())),ie=Gt(U(ge(C),pe(({items:A})=>A.length>0&&A[0].index===0),pn(0),Ye())),ee=Gt(U(ge(C),we($),pe(([{items:A},R])=>A.length>0&&!R),oe(([{items:A}])=>({startIndex:A[0].index,endIndex:A[A.length-1].index})),Ye(xm),er(0)));ce(ee,d.scrollSeekRangeChanged),ce(U(N,we(O,I,x,D),oe(([A,R,W,Y,Z])=>{const de=vm(A),{align:B,behavior:Me,offset:rt}=de;let He=de.index;He==="LAST"&&(He=Y-1),He=Cs(0,He,Wc(Y-1,He));let ot=Hc(R,Z,W,He);return B==="end"?ot=Vm(ot-R.height+W.height):B==="center"&&(ot=Vm(ot-R.height/2+W.height/2)),rt&&(ot+=rt),{top:ot,behavior:Me}})),i);const H=kt(U(C,oe(A=>A.offsetBottom+A.bottom)),0);return ce(U(m,oe(A=>({width:A.visibleWidth,height:A.visibleHeight}))),O),{data:j,totalCount:x,viewportDimensions:O,itemDimensions:I,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:N,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:g,useWindowScroll:y,customScrollParent:v,windowScrollContainerState:w,deviation:_,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:D,restoreStateFrom:F,...d,initialTopMostItemIndex:z,gridState:C,totalListHeight:H,...f,startReached:ie,endReached:Q,rangeChanged:ee,stateChanged:k,propsReady:h,stateRestoreInProgress:$,...T}},Ge(Nc,Mt,Ss,Om,nr,Lc,tr));function jm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=Hc(e,t,n,r[0].index),i=Hc(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function Hc(e,t,n,r){const o=Bm(e.width,n.width,t.column),s=Xi(r/o),i=s*n.height+Cs(0,s-1)*t.row;return i>0?i+t.row:i}function Bm(e,t,n){return Cs(1,Xi((e+n)/(Xi(t)+n)))}const nP=Ae(([e,t])=>({...e,...t}),Ge(tP,Ae(()=>{const e=K(c=>`Item ${c}`),t=K({}),n=K(null),r=K("virtuoso-grid-item"),o=K("virtuoso-grid-list"),s=K(Rc),i=K("div"),a=K(Tr),l=(c,u=null)=>kt(U(t,oe(f=>f[c]),Ye()),u);return{context:n,itemContent:e,components:t,computeItemKey:s,itemClassName:r,listClassName:o,headerFooterTag:i,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}))),rP=b.memo(function(){const t=Qe("gridState"),n=Qe("listClassName"),r=Qe("itemClassName"),o=Qe("itemContent"),s=Qe("computeItemKey"),i=Qe("isSeeking"),a=on("scrollHeight"),l=Qe("ItemComponent"),c=Qe("ListComponent"),u=Qe("ScrollSeekPlaceholder"),f=Qe("context"),d=on("itemDimensions"),h=on("gap"),p=Qe("log"),m=Qe("stateRestoreInProgress"),y=gn(b.useMemo(()=>v=>{const w=v.parentElement.parentElement.scrollHeight;a(w);const g=v.firstChild;if(g){const{width:T,height:x}=g.getBoundingClientRect();d({width:T,height:x})}h({row:Wm("row-gap",getComputedStyle(v).rowGap,p),column:Wm("column-gap",getComputedStyle(v).columnGap,p)})},[a,d,h,p]));return m?null:b.createElement(c,{ref:y,className:n,...et(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(v=>{const w=s(v.index,v.data,f);return i?b.createElement(u,{key:w,...et(u,f),index:v.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...et(l,f),className:r,"data-index":v.index,key:w},o(v.index,v.data,f))}))}),oP=b.memo(function(){const t=Qe("HeaderComponent"),n=on("headerHeight"),r=Qe("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),sP=b.memo(function(){const t=Qe("FooterComponent"),n=on("footerHeight"),r=Qe("headerFooterTag"),o=gn(b.useMemo(()=>i=>n(nn(i,"height")),[n])),s=Qe("context");return t?b.createElement(r,{ref:o},b.createElement(t,et(t,s))):null}),iP=({children:e})=>{const t=b.useContext(Mm),n=on("itemDimensions"),r=on("viewportDimensions"),o=gn(b.useMemo(()=>s=>{r(s.getBoundingClientRect())},[r]));return b.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),b.createElement("div",{style:go(!1),ref:o},e)},aP=({children:e})=>{const t=b.useContext(Mm),n=on("windowViewportRect"),r=on("itemDimensions"),o=Qe("customScrollParent"),s=$c(n,o);return b.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),b.createElement("div",{ref:s,style:go(!1)},e)},lP=b.memo(function({...t}){const n=Qe("useWindowScroll"),r=Qe("customScrollParent"),o=r||n?uP:cP,s=r||n?aP:iP;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(oP,null),b.createElement(rP,null),b.createElement(sP,null)))}),{Component:yL,usePublisher:on,useEmitterValue:Qe,useEmitter:zm}=Tc(nP,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged"}},lP),cP=jc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm}),uP=Bc({usePublisher:on,useEmitterValue:Qe,useEmitter:zm});function Wm(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yt.WARN),t==="normal"?0:parseInt(t??"0",10)}const fP=Ae(([e,t])=>({...e,...t}),Ge(Am,Ae(()=>{const e=K(l=>b.createElement("td",null,"Item $",l)),t=K(null),n=K(null),r=K(null),o=K({}),s=K(Rc),i=K(Tr),a=(l,c=null)=>kt(U(o,oe(u=>u[l]),Ye()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:s,scrollerRef:i,TableComponent:a("Table","table"),TableHeadComponent:a("TableHead","thead"),TableFooterComponent:a("TableFoot","tfoot"),TableBodyComponent:a("TableBody","tbody"),TableRowComponent:a("TableRow","tr"),ScrollerComponent:a("Scroller","div"),EmptyPlaceholder:a("EmptyPlaceholder"),ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),FillerRow:a("FillerRow")}}))),dP=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),hP=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),pP={overflowAnchor:"none"},mP=b.memo(function(){const t=Ve("listState"),n=sn("sizeRanges"),r=Ve("useWindowScroll"),o=Ve("customScrollParent"),s=sn("windowScrollContainerState"),i=sn("scrollContainerState"),a=o||r?s:i,l=Ve("itemContent"),c=Ve("trackItemSizes"),u=Ve("itemSize"),f=Ve("log"),{callbackRef:d,ref:h}=sm(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);Uc("deviation",F=>{p!==F&&(h.current.style.marginTop=`${F}px`,m(F))});const y=Ve("EmptyPlaceholder"),v=Ve("ScrollSeekPlaceholder")||dP,w=Ve("FillerRow")||hP,g=Ve("TableBodyComponent"),T=Ve("TableRowComponent"),x=Ve("computeItemKey"),E=Ve("isSeeking"),C=Ve("paddingTopAddition"),O=Ve("firstItemIndex"),I=Ve("statefulTotalCount"),N=Ve("context");if(I===0&&y)return b.createElement(y,et(y,N));const L=t.offsetTop+C+p,_=t.offsetBottom,j=L>0?b.createElement(w,{height:L,key:"padding-top",context:N}):null,D=_>0?b.createElement(w,{height:_,key:"padding-bottom",context:N}):null,k=t.items.map(F=>{const $=F.originalIndex,z=x($+O,F.data,N);return E?b.createElement(v,{...et(v,N),key:z,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(T,{...et(T,N),...Fm(T,F.data),key:z,"data-index":$,"data-known-size":F.size,"data-item-index":F.index,style:pP},l(F.index,F.data,N))});return b.createElement(g,{ref:d,"data-testid":"virtuoso-item-list",...et(g,N)},[j,...k,D])}),gP=({children:e})=>{const t=b.useContext(Zi),n=sn("viewportHeight"),r=sn("fixedItemHeight"),o=gn(b.useMemo(()=>ms(n,s=>nn(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:go(!1),ref:o,"data-viewport-type":"element"},e)},yP=({children:e})=>{const t=b.useContext(Zi),n=sn("windowViewportRect"),r=sn("fixedItemHeight"),o=Ve("customScrollParent"),s=$c(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:s,style:go(!1),"data-viewport-type":"window"},e)},vP=b.memo(function(t){const n=Ve("useWindowScroll"),r=Ve("customScrollParent"),o=sn("fixedHeaderHeight"),s=sn("fixedFooterHeight"),i=Ve("fixedHeaderContent"),a=Ve("fixedFooterContent"),l=Ve("context"),c=gn(b.useMemo(()=>ms(o,w=>nn(w,"height")),[o])),u=gn(b.useMemo(()=>ms(s,w=>nn(w,"height")),[s])),f=r||n?xP:wP,d=r||n?yP:gP,h=Ve("TableComponent"),p=Ve("TableHeadComponent"),m=Ve("TableFooterComponent"),y=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...et(p,l)},i()):null,v=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...et(m,l)},a()):null;return b.createElement(f,{...t},b.createElement(d,null,b.createElement(h,{style:{borderSpacing:0,overflowAnchor:"none"},...et(h,l)},[y,b.createElement(mP,{key:"TableBody"}),v])))}),{Component:bP,usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}=Tc(fP,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},vP),wP=jc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}),xP=Bc({usePublisher:sn,useEmitterValue:Ve,useEmitter:Uc}),SP=bP,TP=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(console.log(o),!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},Hm=({children:e,className:t="",size:n,...r})=>S.jsxs("label",{className:"font-normal flex items-center gap-2",children:[S.jsx("input",{...r,type:"checkbox",className:$t("form-checkbox h-4 w-4 app rounded border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border select-none",t),...r}),e]}),EP={Item:b.forwardRef(function(t,n){return S.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return S.jsx("ul",{...t,ref:n,className:"space-y-3"})})},CP=e=>{const t=b.useRef(null),n=TP(t);return S.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[S.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:[S.jsx("header",{className:"border-b border-card-border pb-2"}),S.jsxs("div",{className:"px-8 space-y-2",children:[S.jsx(us,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),S.jsx(XC,{height:n,useWindowScroll:!0,data:e.source,components:EP,itemContent:(r,o)=>S.jsx(b.Fragment,{children:S.jsx(Hm,{children:S.jsx(e.Item,{data:o})})})})]})]}),S.jsx("div",{children:S.jsx(ps,{children:S.jsx(qd,{})})}),S.jsx("div",{})]})};function ze(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function qe(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function yo(e,t){const n=ze(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ji(e,t){const n=ze(e);if(isNaN(t))return qe(e,NaN);if(!t)return n;const r=n.getDate(),o=qe(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const Um=6048e5,PP=864e5,OP=6e4,kP=36e5,_P=1e3;let AP={};function Pr(){return AP}function vn(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function vo(e){return vn(e,{weekStartsOn:1})}function Gm(e){const t=ze(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=vo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=vo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function bo(e){const t=ze(e);return t.setHours(0,0,0,0),t}function ea(e){const t=ze(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 IP(e,t){const n=bo(e),r=bo(t),o=+n-ea(n),s=+r-ea(r);return Math.round((o-s)/PP)}function DP(e){const t=Gm(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),vo(n)}function Ym(e,t){const n=t*7;return yo(e,n)}function qm(e,t){return Ji(e,t*12)}function MP(e){return qe(e,Date.now())}function NP(e,t){const n=bo(e),r=bo(t);return+n==+r}function FP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function LP(e){if(!FP(e)&&typeof e!="number")return!1;const t=ze(e);return!isNaN(Number(t))}function Km(e,t){const n=ze(e.start),r=ze(e.end);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0);let a=1;const l=[];for(;+i<=s;)l.push(ze(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function Zm(e){const t=ze(e);return t.setDate(1),t.setHours(0,0,0,0),t}function VP(e){const t=ze(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function $P(e,t){var a,l;const n=Pr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=ze(e),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const RP={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"}},jP=(e,t,n)=>{let r;const o=RP[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 Gc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const BP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},WP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HP={date:Gc({formats:BP,defaultWidth:"full"}),time:Gc({formats:zP,defaultWidth:"full"}),dateTime:Gc({formats:WP,defaultWidth:"full"})},UP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},GP=(e,t,n,r)=>UP[e];function Ps(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const YP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},KP={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"]},ZP={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"]},XP={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"}},QP={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"}},JP={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:Ps({values:YP,defaultWidth:"wide"}),quarter:Ps({values:qP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ps({values:KP,defaultWidth:"wide"}),day:Ps({values:ZP,defaultWidth:"wide"}),dayPeriod:Ps({values:XP,defaultWidth:"wide",formattingValues:QP,defaultFormattingWidth:"wide"})};function Os(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?tO(a,f=>f.test(i)):eO(a,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(i.length);return{value:c,rest:u}}}function eO(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nO(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const rO=/^(\d+)(th|st|nd|rd)?/i,oO=/\d+/i,sO={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},iO={any:[/^b/i,/^(a|c)/i]},aO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lO={any:[/1/i,/2/i,/3/i,/4/i]},cO={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},uO={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]},fO={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},dO={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]},hO={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},pO={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}},mO={ordinalNumber:nO({matchPattern:rO,parsePattern:oO,valueCallback:e=>parseInt(e,10)}),era:Os({matchPatterns:sO,defaultMatchWidth:"wide",parsePatterns:iO,defaultParseWidth:"any"}),quarter:Os({matchPatterns:aO,defaultMatchWidth:"wide",parsePatterns:lO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Os({matchPatterns:cO,defaultMatchWidth:"wide",parsePatterns:uO,defaultParseWidth:"any"}),day:Os({matchPatterns:fO,defaultMatchWidth:"wide",parsePatterns:dO,defaultParseWidth:"any"}),dayPeriod:Os({matchPatterns:hO,defaultMatchWidth:"any",parsePatterns:pO,defaultParseWidth:"any"})},Xm={code:"en-US",formatDistance:jP,formatLong:HP,formatRelative:GP,localize:JP,match:mO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gO(e){const t=ze(e);return IP(t,VP(t))+1}function Qm(e){const t=ze(e),n=+vo(t)-+DP(t);return Math.round(n/Um)+1}function Yc(e,t){var u,f,d,h;const n=ze(e),r=n.getFullYear(),o=Pr(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(d=o.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=vn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=vn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function yO(e,t){var a,l,c,u;const n=Pr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=Yc(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),vn(s,t)}function Jm(e,t){const n=ze(e),r=+vn(n,t)-+yO(n,t);return Math.round(r/Um)+1}function $e(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const rr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return $e(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):$e(n+1,2)},d(e,t){return $e(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 $e(e.getHours()%12||12,t.length)},H(e,t){return $e(e.getHours(),t.length)},m(e,t){return $e(e.getMinutes(),t.length)},s(e,t){return $e(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return $e(o,t.length)}},wo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eg={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 rr.y(e,t)},Y:function(e,t,n,r){const o=Yc(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return $e(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):$e(s,t.length)},R:function(e,t){const n=Gm(e);return $e(n,t.length)},u:function(e,t){const n=e.getFullYear();return $e(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 $e(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 $e(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 rr.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 $e(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=Jm(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):$e(o,t.length)},I:function(e,t,n){const r=Qm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):$e(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):rr.d(e,t)},D:function(e,t,n){const r=gO(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):$e(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return $e(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return $e(s,t.length);case"co":return n.ordinalNumber(s,{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 $e(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=wo.noon:r===0?o=wo.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=wo.evening:r>=12?o=wo.afternoon:r>=4?o=wo.morning:o=wo.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 rr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):rr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):$e(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):rr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):rr.s(e,t)},S:function(e,t){return rr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ng(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ng(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tg(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return $e(r,t.length)},T:function(e,t,n){const r=e.getTime();return $e(r,t.length)}};function tg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+$e(s,2)}function ng(e,t){return e%60===0?(e>0?"-":"+")+$e(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=$e(Math.trunc(r/60),2),s=$e(r%60,2);return n+o+t+s}const rg=(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"})}},og=(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"})}},qc={p:og,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",rg(r,t)).replace("{{time}}",og(o,t))}},vO=/^D+$/,bO=/^Y+$/,wO=["D","DD","YY","YYYY"];function sg(e){return vO.test(e)}function ig(e){return bO.test(e)}function Kc(e,t,n){const r=xO(e,t,n);if(console.warn(r),wO.includes(e))throw new RangeError(r)}function xO(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 SO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EO=/^'([^]*?)'?$/,CO=/''/g,PO=/[a-zA-Z]/;function OO(e,t,n){var u,f,d,h;const r=Pr(),o=r.locale??Xm,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,a=ze(e);if(!LP(a))throw new RangeError("Invalid time value");let l=t.match(TO).map(p=>{const m=p[0];if(m==="p"||m==="P"){const y=qc[m];return y(p,o.formatLong)}return p}).join("").match(SO).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:kO(p)};if(eg[m])return{isToken:!0,value:p};if(m.match(PO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(ig(m)||sg(m))&&Kc(m,t,String(e));const y=eg[m[0]];return y(a,m,o.localize,c)}).join("")}function kO(e){const t=e.match(EO);return t?t[1].replace(CO,"'"):e}function _O(){return Object.assign({},Pr())}function AO(e){let n=ze(e).getDay();return n===0&&(n=7),n}function IO(e,t){const n=t instanceof Date?qe(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const DO=10;class ag{constructor(){ne(this,"subPriority",0)}validate(t,n){return!0}}class MO extends ag{constructor(t,n,r,o,s){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,s&&(this.subPriority=s)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class NO extends ag{constructor(){super(...arguments);ne(this,"priority",DO);ne(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,IO(n,Date))}}class Ie{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new MO(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class FO extends Ie{constructor(){super(...arguments);ne(this,"priority",140);ne(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 it={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}/},bn={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 at(e,t){return e&&{value:t(e.value),rest:e.rest}}function Je(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wn(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,s=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*kP+s*OP+i*_P),rest:t.slice(n[0].length)}}function lg(e){return Je(it.anyDigitsSigned,e)}function tt(e,t){switch(e){case 1:return Je(it.singleDigit,t);case 2:return Je(it.twoDigits,t);case 3:return Je(it.threeDigits,t);case 4:return Je(it.fourDigits,t);default:return Je(new RegExp("^\\d{1,"+e+"}"),t)}}function ta(e,t){switch(e){case 1:return Je(it.singleDigitSigned,t);case 2:return Je(it.twoDigitsSigned,t);case 3:return Je(it.threeDigitsSigned,t);case 4:return Je(it.fourDigitsSigned,t);default:return Je(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Zc(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 cg(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const s=r+50,i=Math.trunc(s/100)*100,a=e>=s%100;o=e+i-(a?100:0)}return n?o:1-o}function ug(e){return e%400===0||e%4===0&&e%100!==0}class LO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="yy"});switch(r){case"y":return at(tt(4,n),s);case"yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const s=n.getFullYear();if(o.isTwoDigitYear){const a=cg(o.year,s);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const i=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(i,0,1),n.setHours(0,0,0,0),n}}class VO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const s=i=>({year:i,isTwoDigitYear:r==="YY"});switch(r){case"Y":return at(tt(4,n),s);case"Yo":return at(o.ordinalNumber(n,{unit:"year"}),s);default:return at(tt(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=Yc(n,s);if(o.isTwoDigitYear){const l=cg(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),vn(n,s)}}class $O extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return ta(r==="R"?4:r.length,n)}set(n,r,o){const s=qe(n,0);return s.setFullYear(o,0,4),s.setHours(0,0,0,0),vo(s)}}class RO extends Ie{constructor(){super(...arguments);ne(this,"priority",130);ne(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return ta(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class jO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(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 tt(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 BO extends Ie{constructor(){super(...arguments);ne(this,"priority",120);ne(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 tt(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 zO extends Ie{constructor(){super(...arguments);ne(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ne(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return at(Je(it.month,n),s);case"MM":return at(tt(2,n),s);case"Mo":return at(o.ordinalNumber(n,{unit:"month"}),s);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 WO extends Ie{constructor(){super(...arguments);ne(this,"priority",110);ne(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const s=i=>i-1;switch(r){case"L":return at(Je(it.month,n),s);case"LL":return at(tt(2,n),s);case"Lo":return at(o.ordinalNumber(n,{unit:"month"}),s);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 HO(e,t,n){const r=ze(e),o=Jm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class UO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return Je(it.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return vn(HO(n,o,s),s)}}function GO(e,t){const n=ze(e),r=Qm(n)-t;return n.setDate(n.getDate()-r*7),n}class YO extends Ie{constructor(){super(...arguments);ne(this,"priority",100);ne(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 Je(it.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return vo(GO(n,o))}}const qO=[31,28,31,30,31,30,31,31,30,31,30,31],KO=[31,29,31,30,31,30,31,31,30,31,30,31];class ZO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subPriority",1);ne(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return Je(it.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=ug(o),i=n.getMonth();return s?r>=1&&r<=KO[i]:r>=1&&r<=qO[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class XO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"subpriority",1);ne(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 Je(it.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return tt(r.length,n)}}validate(n,r){const o=n.getFullYear();return ug(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 Xc(e,t,n){var f,d,h,p;const r=Pr(),o=(n==null?void 0:n.weekStartsOn)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,s=ze(e),i=s.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(i+c)%7:(l+c)%7-(i+c)%7;return yo(s,u)}class QO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(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,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}class JO extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return at(tt(r.length,n),i);case"eo":return at(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}class ek extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,s){const i=a=>{const l=Math.floor((a-1)/7)*7;return(a+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return at(tt(r.length,n),i);case"co":return at(o.ordinalNumber(n,{unit:"day"}),i);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,s){return n=Xc(n,o,s),n.setHours(0,0,0,0),n}}function tk(e,t){const n=ze(e),r=AO(n),o=t-r;return yo(n,o)}class nk extends Ie{constructor(){super(...arguments);ne(this,"priority",90);ne(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const s=i=>i===0?7:i;switch(r){case"i":case"ii":return tt(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return at(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiii":return at(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return at(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return at(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"}),s)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=tk(n,o),n.setHours(0,0,0,0),n}}class rk extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Zc(o),0,0,0),n}}class ok extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Zc(o),0,0,0),n}}class sk extends Ie{constructor(){super(...arguments);ne(this,"priority",80);ne(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(Zc(o),0,0,0),n}}class ik extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return Je(it.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const s=n.getHours()>=12;return s&&o<12?n.setHours(o+12,0,0,0):!s&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class ak extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return Je(it.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class lk extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return Je(it.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(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 ck extends Ie{constructor(){super(...arguments);ne(this,"priority",70);ne(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return Je(it.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return tt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const s=o<=24?o%24:o;return n.setHours(s,0,0,0),n}}class uk extends Ie{constructor(){super(...arguments);ne(this,"priority",60);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return Je(it.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class fk extends Ie{constructor(){super(...arguments);ne(this,"priority",50);ne(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return Je(it.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return tt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class dk extends Ie{constructor(){super(...arguments);ne(this,"priority",30);ne(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return at(tt(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class hk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return wn(bn.basicOptionalMinutes,n);case"XX":return wn(bn.basic,n);case"XXXX":return wn(bn.basicOptionalSeconds,n);case"XXXXX":return wn(bn.extendedOptionalSeconds,n);case"XXX":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class pk extends Ie{constructor(){super(...arguments);ne(this,"priority",10);ne(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return wn(bn.basicOptionalMinutes,n);case"xx":return wn(bn.basic,n);case"xxxx":return wn(bn.basicOptionalSeconds,n);case"xxxxx":return wn(bn.extendedOptionalSeconds,n);case"xxx":default:return wn(bn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-ea(n)-o)}}class mk extends Ie{constructor(){super(...arguments);ne(this,"priority",40);ne(this,"incompatibleTokens","*")}parse(n){return lg(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class gk extends Ie{constructor(){super(...arguments);ne(this,"priority",20);ne(this,"incompatibleTokens","*")}parse(n){return lg(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const yk={G:new FO,y:new LO,Y:new VO,R:new $O,u:new RO,Q:new jO,q:new BO,M:new zO,L:new WO,w:new UO,I:new YO,d:new ZO,D:new XO,E:new QO,e:new JO,c:new ek,i:new nk,a:new rk,b:new ok,B:new sk,h:new ik,H:new ak,K:new lk,k:new ck,m:new uk,s:new fk,S:new dk,X:new hk,x:new pk,t:new mk,T:new gk},vk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wk=/^'([^]*?)'?$/,xk=/''/g,Sk=/\S/,Tk=/[a-zA-Z]/;function Ek(e,t,n,r){var m,y,v,w;const o=_O(),s=o.locale??Xm,i=o.firstWeekContainsDate??((y=(m=o.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,a=o.weekStartsOn??((w=(v=o.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0;if(t==="")return e===""?ze(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new NO],u=t.match(bk).map(g=>{const T=g[0];if(T in qc){const x=qc[T];return x(g,s.formatLong)}return g}).join("").match(vk),f=[];for(let g of u){ig(g)&&Kc(g,t,e),sg(g)&&Kc(g,t,e);const T=g[0],x=yk[T];if(x){const{incompatibleTokens:E}=x;if(Array.isArray(E)){const O=f.find(I=>E.includes(I.token)||I.token===T);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${g}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:T,fullToken:g});const C=x.run(e,g,s.match,l);if(!C)return qe(n,NaN);c.push(C.setter),e=C.rest}else{if(T.match(Tk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(g==="''"?g="'":T==="'"&&(g=Ck(g)),e.indexOf(g)===0)e=e.slice(g.length);else return qe(n,NaN)}}if(e.length>0&&Sk.test(e))return qe(n,NaN);const d=c.map(g=>g.priority).sort((g,T)=>T-g).filter((g,T,x)=>x.indexOf(g)===T).map(g=>c.filter(T=>T.priority===g).sort((T,x)=>x.subPriority-T.subPriority)).map(g=>g[0]);let h=ze(n);if(isNaN(h.getTime()))return qe(n,NaN);const p={};for(const g of d){if(!g.validate(h,l))return qe(n,NaN);const T=g.set(h,p,l);Array.isArray(T)?(h=T[0],Object.assign(p,T[1])):h=T}return qe(n,h)}function Ck(e){return e.match(wk)[1].replace(xk,"'")}function Pk(e,t){const n=ze(e),r=ze(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ok(e){return NP(e,MP(e))}function kk(e,t){return yo(e,-t)}function fg(e,t){return Ji(e,-t)}function _k(e,t){return Ym(e,-t)}function Ak(e,t){return qm(e,-t)}const xo=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),na=b.createContext({}),ra=b.createContext(null),Qc=typeof document<"u",oa=Qc?b.useLayoutEffect:b.useEffect,dg=b.createContext({strict:!1}),sa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hg="data-"+sa("framerAppearId"),Ik={skipAnimations:!1,useManualTiming:!1};function Dk(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const h=f&&r?t:n;return u&&s.add(c),h.has(c)||h.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(c))}};return l}const ia=["read","resolveKeyframes","update","preRender","render","postRender"],Mk=40;function pg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=ia.reduce((v,w)=>(v[w]=Dk(s),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=i,h=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,Mk),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ia.reduce((v,w)=>{const g=i[w];return v[w]=(T,x=!1,E=!1)=>(n||p(),g.schedule(T,x,E)),v},{}),cancel:v=>{for(let w=0;w<ia.length;w++)i[ia[w]].cancel(v)},state:o,steps:i}}const{schedule:Jc,cancel:SL}=pg(queueMicrotask,!1);function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const mg=b.createContext({});let gg=!1;function Nk(e,t,n,r,o){const{visualElement:s}=b.useContext(na),i=b.useContext(dg),a=b.useContext(ra),l=b.useContext(xo).reducedMotion,c=b.useRef();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=b.useContext(mg);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Lk(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const d=b.useRef(!!(n[hg]&&!window.HandoffComplete));return oa(()=>{u&&(u.updateFeatures(),Jc.render(u.render),d.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,gg||(gg=!0,queueMicrotask(Fk))))}),u}function Fk(){window.HandoffComplete=!0}function Lk(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yg(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&So(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function yg(e){if(e)return e.options.allowProjection!==!1?e.projection:yg(e.parent)}function Vk(e,t,n){return b.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):So(n)&&(n.current=r))},[t])}function ks(e){return typeof e=="string"||Array.isArray(e)}function _s(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const eu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tu=["initial",...eu];function aa(e){return _s(e.animate)||tu.some(t=>ks(e[t]))}function vg(e){return!!(aa(e)||e.variants)}function $k(e,t){if(aa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ks(n)?n:void 0,animate:ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function Rk(e){const{initial:t,animate:n}=$k(e,b.useContext(na));return b.useMemo(()=>({initial:t,animate:n}),[bg(t),bg(n)])}function bg(e){return Array.isArray(e)?e.join(" "):e}const wg={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"]},To={};for(const e in wg)To[e]={isEnabled:t=>wg[e].some(n=>!!t[n])};function jk(e){for(const t in e)To[t]={...To[t],...e[t]}}const As=b.createContext({}),Bk=Symbol.for("motionComponentSymbol"),bt=e=>e;let Eo=bt,an=bt;process.env.NODE_ENV!=="production"&&(Eo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},an=(e,t)=>{if(!e)throw new Error(t)});function zk({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&jk(e);function s(a,l){let c;const u={...b.useContext(xo),...a,layoutId:Wk(a)},{isStatic:f}=u,d=Rk(a),h=r(a,f);if(!f&&Qc){Hk(u,e);const p=Uk(u);c=p.MeasureLayout,d.visualElement=Nk(o,h,u,t,p.ProjectionNode)}return S.jsxs(na.Provider,{value:d,children:[c&&d.visualElement?S.jsx(c,{visualElement:d.visualElement,...u}):null,n(o,a,Vk(h,d.visualElement,l),h,f,d.visualElement)]})}const i=b.forwardRef(s);return i[Bk]=o,i}function Wk({layoutId:e}){const t=b.useContext(As).id;return t&&e!==void 0?t+"-"+e:e}function Hk(e,t){const n=b.useContext(dg).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?Eo(!1,r):an(!1,r)}}function Uk(e){const{drag:t,layout:n}=To;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}}function Gk(e){function t(r,o={}){return zk(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const Yk=["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 nu(e){return typeof e!="string"||e.includes("-")?!1:!!(Yk.indexOf(e)>-1||/[A-Z]/u.test(e))}const la={};function qk(e){Object.assign(la,e)}const Is=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(Is);function xg(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!la[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),Kk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zk=Is.length;function Xk(e,t,n){let r="";for(let o=0;o<Zk;o++){const s=Is[o];if(e[s]!==void 0){const i=Kk[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Sg=e=>t=>typeof t=="string"&&t.startsWith(e),Tg=Sg("--"),Qk=Sg("var(--"),ru=e=>Qk(e)?Jk.test(e.split("/*")[0].trim()):!1,Jk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,e_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,sr=(e,t,n)=>n>t?t:n<e?e:n,Co={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ds={...Co,transform:e=>sr(0,1,e)},ca={...Co,default:1},Ms=e=>Math.round(e*1e5)/1e5,ou=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,t_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,n_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Ns(e){return typeof e=="string"}function r_(e){return e==null}const Fs=e=>({test:t=>Ns(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ir=Fs("deg"),xn=Fs("%"),fe=Fs("px"),o_=Fs("vh"),s_=Fs("vw"),Eg={...xn,parse:e=>xn.parse(e)/100,transform:e=>xn.transform(e*100)},Cg={...Co,transform:Math.round},Pg={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,size:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,rotate:ir,rotateX:ir,rotateY:ir,rotateZ:ir,scale:ca,scaleX:ca,scaleY:ca,scaleZ:ca,skew:ir,skewX:ir,skewY:ir,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:Ds,originX:Eg,originY:Eg,originZ:fe,zIndex:Cg,backgroundPositionX:fe,backgroundPositionY:fe,fillOpacity:Ds,strokeOpacity:Ds,numOctaves:Cg};function su(e,t,n){const{style:r,vars:o,transform:s,transformOrigin:i}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(Tg(u)){o[u]=f;continue}const d=Pg[u],h=e_(f,d);if(or.has(u)){if(a=!0,s[u]=h,!c)continue;f!==(d.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=h):r[u]=h}if(t.transform||(a||n?r.transform=Xk(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=i;r.transformOrigin=`${u} ${f} ${d}`}}const iu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Og(e,t,n){for(const r in t)!wt(t[r])&&!xg(r,n)&&(e[r]=t[r])}function i_({transformTemplate:e},t){return b.useMemo(()=>{const n=iu();return su(n,t,e),Object.assign({},n.vars,n.style)},[t])}function a_(e,t){const n=e.style||{},r={};return Og(r,n,e),Object.assign(r,i_(e,t)),r}function l_(e,t){const n={},r=a_(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 c_=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 ua(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||c_.has(e)}let kg=e=>!ua(e);function _g(e){e&&(kg=t=>t.startsWith("on")?!ua(t):e(t))}try{_g(require("@emotion/is-prop-valid").default)}catch{}function u_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(kg(o)||n===!0&&ua(o)||!t&&!ua(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ag(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function f_(e,t,n){const r=Ag(t,e.x,e.width),o=Ag(n,e.y,e.height);return`${r} ${o}`}const d_={offset:"stroke-dashoffset",array:"stroke-dasharray"},h_={offset:"strokeDashoffset",array:"strokeDasharray"};function p_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?d_:h_;e[s.offset]=fe.transform(-r);const i=fe.transform(t),a=fe.transform(n);e[s.array]=`${i} ${a}`}function au(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(su(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:p}=e;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=f_(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&p_(d,i,a,l,!1)}const Ig=()=>({...iu(),attrs:{}}),lu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function m_(e,t,n,r){const o=b.useMemo(()=>{const s=Ig();return au(s,t,lu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Og(s,e.style,e),o.style={...s,...o.style}}return o}function g_(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(nu(n)?m_:l_)(r,s,i,n),c=u_(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,d=b.useMemo(()=>wt(f)?f.get():f,[f]);return b.createElement(n,{...u,children:d})}}function Dg(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Mg=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 Ng(e,t,n,r){Dg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Mg.has(o)?o:sa(o),t.attrs[o])}function cu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(wt(o[i])||t.style&&wt(t.style[i])||xg(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),s}function Fg(e,t,n){const r=cu(e,t,n);for(const o in e)if(wt(e[o])||wt(t[o])){const s=Is.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Lg(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uu(e,t,n,r){if(typeof t=="function"){const[o,s]=Lg(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Lg(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function ar(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const fu=e=>Array.isArray(e),y_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),v_=e=>fu(e)?e[e.length-1]||0:e;function fa(e){const t=wt(e)?e.get():e;return y_(t)?t.toValue():t}const Vg=new Set(["opacity","clipPath","filter","transform"]);function $g(e){if(or.has(e))return"transform";if(Vg.has(e))return sa(e)}function da(e,t){e.indexOf(t)===-1&&e.push(t)}function ha(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function b_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[s]=e.splice(t,1);e.splice(o,0,s)}return e}function w_({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:S_(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Rg=e=>(t,n)=>{const r=b.useContext(na),o=b.useContext(ra),s=()=>w_(e,t,r,o,n);return n?s():ar(s)};function x_(e,t){const n=$g(t);n&&da(e,n)}function jg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=uu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function S_(e,t,n,r,o){var s;const i={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,c=o(e,{});for(const y in c)i[y]=fa(c[y]);let{initial:u,animate:f}=e;const d=aa(e),h=vg(e);t&&h&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?f:u;return m&&typeof m!="boolean"&&!_s(m)&&jg(e,m,(y,v)=>{for(const w in y){let g=y[w];if(Array.isArray(g)){const T=p?g.length-1:0;g=g[T]}g!==null&&(i[w]=g)}for(const w in v)i[w]=v[w]}),l&&(f&&u!==!1&&!_s(f)&&jg(e,f,y=>{for(const v in y)x_(a,v)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:De,cancel:Sn,state:xt,steps:du}=pg(typeof requestAnimationFrame<"u"?requestAnimationFrame:bt,!0),T_={useVisualState:Rg({scrapeMotionValuesFromProps:Fg,createRenderState:Ig,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{au(n,r,lu(t.tagName),e.transformTemplate),Ng(t,n)})}})},E_={useVisualState:Rg({applyWillChange:!0,scrapeMotionValuesFromProps:cu,createRenderState:iu})};function C_(e,{forwardMotionProps:t=!1},n,r){return{...nu(e)?T_:E_,preloadedFeatures:n,useRender:g_(t),createVisualElement:r,Component:e}}function An(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Bg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pa(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const P_=e=>t=>Bg(t)&&e(t,pa(t));function In(e,t,n,r){return An(e,t,P_(n),r)}const O_=(e,t)=>n=>t(e(n)),Dn=(...e)=>e.reduce(O_);function zg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Wg=zg("dragHorizontal"),Hg=zg("dragVertical");function Ug(e){let t=!1;if(e==="y")t=Hg();else if(e==="x")t=Wg();else{const n=Wg(),r=Hg();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Gg(){const e=Ug(!0);return e?(e(),!1):!0}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Gg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&De.postRender(()=>l(s,i))};return In(e.current,n,o,{passive:!e.getProps()[r]})}class k_ extends lr{mount(){this.unmount=Dn(Yg(this.node,!0),Yg(this.node,!1))}unmount(){}}class __ extends lr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Dn(An(this.node.current,"focus",()=>this.onFocus()),An(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qg=(e,t)=>t?e===t?!0:qg(e,t.parentElement):!1;function hu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,pa(n))}class A_ extends lr{constructor(){super(...arguments),this.removeStartListeners=bt,this.removeEndListeners=bt,this.removeAccessibleListeners=bt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=In(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),d=!f&&!qg(this.node.current,a.target)?u:c;d&&De.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=In(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Dn(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||hu("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&De.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=An(this.node.current,"keyup",i),hu("down",(a,l)=>{this.startPress(a,l)})},n=An(this.node.current,"keydown",t),r=()=>{this.isPressing&&hu("cancel",(s,i)=>this.cancelPress(s,i))},o=An(this.node.current,"blur",r);this.removeAccessibleListeners=Dn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=In(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=An(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Dn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const pu=new WeakMap,mu=new WeakMap,I_=e=>{const t=pu.get(e.target);t&&t(e)},D_=e=>{e.forEach(I_)};function M_({root:e,...t}){const n=e||document;mu.has(n)||mu.set(n,{});const r=mu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(D_,{root:e,...t})),r[o]}function N_(e,t,n){const r=M_(t);return pu.set(e,n),r.observe(e),()=>{pu.delete(e),r.unobserve(e)}}const F_={some:0,all:1};class L_ extends lr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:F_[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return N_(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(V_(t,n))&&this.startObserver()}unmount(){}}function V_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $_={inView:{Feature:L_},tap:{Feature:A_},focus:{Feature:__},hover:{Feature:k_}};function Kg(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}function ma(e,t,n){const r=e.getProps();return uu(r,t,n!==void 0?n:r.custom,e)}const Mn=e=>e*1e3,Nn=e=>e/1e3,R_={type:"spring",stiffness:500,damping:25,restSpeed:10},j_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),B_={type:"keyframes",duration:.8},z_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},W_=(e,{keyframes:t})=>t.length>2?B_:or.has(e)?e.startsWith("scale")?j_(t[1]):R_:z_;function H_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function gu(e,t){return e[t]||e.default||e}const U_=e=>e!==null;function ga(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(U_),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let ya;function G_(){ya=void 0}const cr={now:()=>(ya===void 0&&cr.set(xt.isProcessing||Ik.useManualTiming?xt.timestamp:performance.now()),ya),set:e=>{ya=e,queueMicrotask(G_)}},Zg=e=>/^0[^.\s]+$/u.test(e);function Y_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Zg(e):!0}const Xg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),q_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K_(e){const t=q_.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Z_=4;function Qg(e,t,n=1){an(n<=Z_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=K_(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Xg(i)?parseFloat(i):i}return ru(o)?Qg(o,t,n+1):o}const X_=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Jg=e=>e===Co||e===fe,ey=(e,t)=>parseFloat(e.split(", ")[t]),ty=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return ey(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?ey(s[1],e):0}},Q_=new Set(["x","y","z"]),J_=Is.filter(e=>!Q_.has(e));function eA(e){const t=[];return J_.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Po={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:ty(4,13),y:ty(5,14)};Po.translateX=Po.x,Po.translateY=Po.y;const ny=e=>t=>t.test(e),ry=[Co,fe,xn,ir,s_,o_,{test:e=>e==="auto",parse:e=>e}],oy=e=>ry.find(ny(e)),kr=new Set;let yu=!1,vu=!1;function sy(){if(vu){const e=Array.from(kr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=eA(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(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vu=!1,yu=!1,kr.forEach(e=>e.complete()),kr.clear()}function iy(){kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vu=!0)})}function tA(){iy(),sy()}class bu{constructor(t,n,r,o,s,i=!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=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(kr.add(this),yu||(yu=!0,De.read(iy),De.resolveKeyframes(sy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const wu=(e,t)=>n=>!!(Ns(n)&&n_.test(n)&&n.startsWith(e)||t&&!r_(n)&&Object.prototype.hasOwnProperty.call(n,t)),ay=(e,t,n)=>r=>{if(!Ns(r))return r;const[o,s,i,a]=r.match(ou);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},nA=e=>sr(0,255,e),xu={...Co,transform:e=>Math.round(nA(e))},_r={test:wu("rgb","red"),parse:ay("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+xu.transform(e)+", "+xu.transform(t)+", "+xu.transform(n)+", "+Ms(Ds.transform(r))+")"};function rA(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 Su={test:wu("#"),parse:rA,transform:_r.transform},Oo={test:wu("hsl","hue"),parse:ay("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xn.transform(Ms(t))+", "+xn.transform(Ms(n))+", "+Ms(Ds.transform(r))+")"},_t={test:e=>_r.test(e)||Su.test(e)||Oo.test(e),parse:e=>_r.test(e)?_r.parse(e):Oo.test(e)?Oo.parse(e):Su.parse(e),transform:e=>Ns(e)?e:e.hasOwnProperty("red")?_r.transform(e):Oo.transform(e)};function oA(e){var t,n;return isNaN(e)&&Ns(e)&&(((t=e.match(ou))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(t_))===null||n===void 0?void 0:n.length)||0)>0}const ly="number",cy="color",sA="var",iA="var(",uy="${}",aA=/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 Ls(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(aA,l=>(_t.test(l)?(r.color.push(s),o.push(cy),n.push(_t.parse(l))):l.startsWith(iA)?(r.var.push(s),o.push(sA),n.push(l)):(r.number.push(s),o.push(ly),n.push(parseFloat(l))),++s,uy)).split(uy);return{values:n,split:a,indexes:r,types:o}}function fy(e){return Ls(e).values}function dy(e){const{split:t,types:n}=Ls(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===ly?s+=Ms(o[i]):a===cy?s+=_t.transform(o[i]):s+=o[i]}return s}}const lA=e=>typeof e=="number"?0:e;function cA(e){const t=fy(e);return dy(e)(t.map(lA))}const ur={test:oA,parse:fy,createTransformer:dy,getAnimatableNone:cA},uA=new Set(["brightness","contrast","saturate","opacity"]);function fA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ou)||[];if(!r)return e;const o=n.replace(r,"");let s=uA.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const dA=/\b([a-z-]*)\(.*?\)/gu,Tu={...ur,getAnimatableNone:e=>{const t=e.match(dA);return t?t.map(fA).join(" "):e}},hA={...Pg,color:_t,backgroundColor:_t,outlineColor:_t,fill:_t,stroke:_t,borderColor:_t,borderTopColor:_t,borderRightColor:_t,borderBottomColor:_t,borderLeftColor:_t,filter:Tu,WebkitFilter:Tu},Eu=e=>hA[e];function hy(e,t){let n=Eu(e);return n!==Tu&&(n=ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pA=new Set(["auto","none","0"]);function mA(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!pA.has(s)&&Ls(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=hy(n,o)}class py extends bu{constructor(t,n,r,o){super(t,n,r,o,o==null?void 0:o.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ru(c))){const u=Qg(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!X_.has(r)||t.length!==2)return;const[o,s]=t,i=oy(o),a=oy(s);if(i!==a)if(Jg(i)&&Jg(a))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++)Y_(t[o])&&r.push(o);r.length&&mA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Po[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.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=Po[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function my(e){let t;return()=>(t===void 0&&(t=e()),t)}const gy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ur.test(e)||e==="0")&&!e.startsWith("url("));function gA(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 yA(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=gy(o,t),a=gy(s,t);return Eo(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:gA(e)||n==="spring"&&r}class yy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&tA(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yA(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(ga(t,this.options,n)),a==null||a(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function vy(e,t){return t?e*(1e3/t):0}const vA=5;function by(e,t,n){const r=Math.max(t-vA,0);return vy(n-e(r),t-r)}const Cu=.001,bA=.01,wy=10,wA=.05,xA=1;function SA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Eo(e<=Mn(wy),"Spring duration must be 10 seconds or less");let i=1-t;i=sr(wA,xA,i),e=sr(bA,wy,Nn(e)),i<1?(o=c=>{const u=c*i,f=u*e,d=u-n,h=Pu(c,i),p=Math.exp(-f);return Cu-d/h*p},s=c=>{const f=c*i*e,d=f*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=Pu(Math.pow(c,2),i);return(-o(c)+Cu>0?-1:1)*((d-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Cu+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=EA(o,s,a);if(e=Mn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const TA=12;function EA(e,t,n){let r=n;for(let o=1;o<TA;o++)r=r-e(r)/t(r);return r}function Pu(e,t){return e*Math.sqrt(1-t*t)}const CA=["duration","bounce"],PA=["stiffness","damping","mass"];function xy(e,t){return t.some(n=>e[n]!==void 0)}function OA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xy(e,PA)&&xy(e,CA)){const n=SA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Sy({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=OA({...r,velocity:-Nn(r.velocity||0)}),h=f||0,p=l/(2*Math.sqrt(a*c)),m=s-o,y=Nn(Math.sqrt(a/c)),v=Math.abs(m)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let w;if(p<1){const g=Pu(y,p);w=T=>{const x=Math.exp(-p*y*T);return s-x*((h+p*y*m)/g*Math.sin(g*T)+m*Math.cos(g*T))}}else if(p===1)w=g=>s-Math.exp(-y*g)*(m+(h+y*m)*g);else{const g=y*Math.sqrt(p*p-1);w=T=>{const x=Math.exp(-p*y*T),E=Math.min(g*T,300);return s-x*((h+p*y*m)*Math.sinh(E)+g*m*Math.cosh(E))/g}}return{calculatedDuration:d&&u||null,next:g=>{const T=w(g);if(d)i.done=g>=u;else{let x=h;g!==0&&(p<1?x=by(w,g,T):x=0);const E=Math.abs(x)<=n,C=Math.abs(s-T)<=t;i.done=E&&C}return i.value=i.done?s:T,i}}}function Ty({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,p=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let m=n*t;const y=f+m,v=i===void 0?y:i(y);v!==y&&(m=v-f);const w=O=>-m*Math.exp(-O/r),g=O=>v+w(O),T=O=>{const I=w(O),N=g(O);d.done=Math.abs(I)<=c,d.value=d.done?v:N};let x,E;const C=O=>{h(d.value)&&(x=O,E=Sy({keyframes:[d.value,p(d.value)],velocity:by(g,O,d.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return C(0),{calculatedDuration:null,next:O=>{let I=!1;return!E&&x===void 0&&(I=!0,T(O),C(O)),x!==void 0&&O>=x?E.next(O-x):(!I&&T(O),d)}}}const Ey=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kA=1e-7,_A=12;function AA(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Ey(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>kA&&++a<_A);return i}function Vs(e,t,n,r){if(e===t&&n===r)return bt;const o=s=>AA(s,0,1,e,n);return s=>s===0||s===1?s:Ey(o(s),t,r)}const IA=Vs(.42,0,1,1),DA=Vs(0,0,.58,1),Cy=Vs(.42,0,.58,1),MA=e=>Array.isArray(e)&&typeof e[0]!="number",Py=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Oy=e=>t=>1-e(1-t),Ou=e=>1-Math.sin(Math.acos(e)),ky=Oy(Ou),NA=Py(Ou),_y=Vs(.33,1.53,.69,.99),ku=Oy(_y),FA=Py(ku),Ay={linear:bt,easeIn:IA,easeInOut:Cy,easeOut:DA,circIn:Ou,circInOut:NA,circOut:ky,backIn:ku,backInOut:FA,backOut:_y,anticipate:e=>(e*=2)<1?.5*ku(e):.5*(2-Math.pow(2,-10*(e-1)))},Iy=e=>{if(Array.isArray(e)){an(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Vs(t,n,r,o)}else if(typeof e=="string")return an(Ay[e]!==void 0,`Invalid easing type '${e}'`),Ay[e];return e},$s=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ze=(e,t,n)=>e+(t-e)*n;function _u(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 LA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=_u(l,a,e+1/3),s=_u(l,a,e),i=_u(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function va(e,t){return n=>n>0?t:e}const Au=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},VA=[Su,_r,Oo],$A=e=>VA.find(t=>t.test(e));function Dy(e){const t=$A(e);if(Eo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Oo&&(n=LA(n)),n}const My=(e,t)=>{const n=Dy(e),r=Dy(t);if(!n||!r)return va(e,t);const o={...n};return s=>(o.red=Au(n.red,r.red,s),o.green=Au(n.green,r.green,s),o.blue=Au(n.blue,r.blue,s),o.alpha=Ze(n.alpha,r.alpha,s),_r.transform(o))},Iu=new Set(["none","hidden"]);function RA(e,t){return Iu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jA(e,t){return n=>Ze(e,t,n)}function Du(e){return typeof e=="number"?jA:typeof e=="string"?ru(e)?va:_t.test(e)?My:WA:Array.isArray(e)?Ny:typeof e=="object"?_t.test(e)?My:BA:va}function Ny(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Du(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function BA(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Du(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function zA(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const WA=(e,t)=>{const n=ur.createTransformer(t),r=Ls(e),o=Ls(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?Iu.has(e)&&!o.values.length||Iu.has(t)&&!r.values.length?RA(e,t):Dn(Ny(zA(r,o),o.values),n):(Eo(!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.`),va(e,t))};function Fy(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):Du(e)(e,t)}function HA(e,t,n){const r=[],o=n||Fy,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||bt:t;a=Dn(l,a)}r.push(a)}return r}function Ly(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(an(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=HA(t,r,o),a=i.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=$s(e[u],e[u+1],c);return i[u](f)};return n?c=>l(sr(e[0],e[s-1],c)):l}function UA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=$s(0,t,r);e.push(Ze(n,1,o))}}function GA(e){const t=[0];return UA(t,e.length-1),t}function YA(e,t){return e.map(n=>n*t)}function qA(e,t){return e.map(()=>t||Cy).splice(0,e.length-1)}function ba({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=MA(r)?r.map(Iy):Iy(r),s={done:!1,value:t[0]},i=YA(n&&n.length===t.length?n:GA(t),e),a=Ly(i,t,{ease:Array.isArray(o)?o:qA(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Vy=2e4;function KA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vy;)t+=n,r=e.next(t);return t>=Vy?1/0:t}const ZA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>Sn(t),now:()=>xt.isProcessing?xt.timestamp:cr.now()}},XA={decay:Ty,inertia:Ty,tween:ba,keyframes:ba,spring:Sy},QA=e=>e/100;class Mu extends yy{constructor({KeyframeResolver:t=bu,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:r,motionValue:o,keyframes:s}=this.options,i=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(s,i,r,o):this.resolver=new t(s,i,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=XA[n]||ba;let l,c;a!==ba&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&an(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Dn(QA,Fy(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=KA(u));const{calculatedDuration:f}=u,d=f+o,h=d*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}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:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-d*(this.speed>=0?1:-1),w=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,T=s;if(h){const O=Math.min(this.currentTime,u)/f;let I=Math.floor(O),N=O%1;!N&&O>=1&&(N=1),N===1&&I--,I=Math.min(I,h+1),!!(I%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/f)):p==="mirror"&&(T=i)),g=sr(0,1,N)*f}const x=w?{done:!1,value:l[0]}:T.next(g);a&&(x.value=a(x.value));let{done:E}=x;!w&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return C&&o!==void 0&&(x.value=ga(l,this.options,o)),y&&y(x.value),C&&this.finish(),x}get duration(){const{resolved:t}=this;return t?Nn(t.calculatedDuration):0}get time(){return Nn(this.currentTime)}set time(t){t=Mn(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=Nn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZA,onPlay:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),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 $y=e=>Array.isArray(e)&&typeof e[0]=="number";function Ry(e){return!!(!e||typeof e=="string"&&e in Nu||$y(e)||Array.isArray(e)&&e.every(Ry))}const Rs=([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:Rs([0,.65,.55,1]),circOut:Rs([.55,0,1,.45]),backIn:Rs([.31,.01,.66,-.59]),backOut:Rs([.33,1.53,.69,.99])};function JA(e){return jy(e)||Nu.easeOut}function jy(e){if(e)return $y(e)?Rs(e):Array.isArray(e)?e.map(JA):Nu[e]}function eI(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=jy(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const tI=my(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),wa=10,nI=2e4;function rI(e){return e.type==="spring"||!Ry(e.ease)}function oI(e,t){const n=new Mu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<nI;)r=n.sample(s),o.push(r.value),s+=wa;return{times:void 0,keyframes:o,duration:s-wa,ease:"linear"}}class By extends yy{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new py(o,(s,i)=>this.onKeyframesResolved(s,i),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:s,ease:i,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(rI(this.options)){const{onComplete:f,onUpdate:d,motionValue:h,...p}=this.options,m=oI(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,s=m.times,i=m.ease,a="keyframes"}const u=eI(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=cr.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(ga(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Nn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Nn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mn(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}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return bt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return bt}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;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...d}=this.options,h=new Mu({...d,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=Mn(this.time);c.setWithVelocity(h.sample(p-wa).value,h.sample(p).value,wa)}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:s,damping:i,type:a}=t;return tI()&&r&&Vg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function sI(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return De.update(r,!0),()=>Sn(r)}const iI=my(()=>window.ScrollTimeline!==void 0);class aI{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(iI()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),sI(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Fu=(e,t,n,r={},o,s,i)=>a=>{const l=gu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Mn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};H_(l)||(f={...f,...W_(e,f)}),f.duration&&(f.duration=Mn(f.duration)),f.repeatDelay&&(f.repeatDelay=Mn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const h=ga(f.keyframes,l);if(h!==void 0)return De.update(()=>{f.onUpdate(h),f.onComplete()}),new aI([])}return!s&&By.supports(f)?new By(f):new Mu(f)};class Lu{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>ha(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 s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zy=new Set;function Vu(e,t,n){e||zy.has(t)||(console.warn(t),zy.add(t))}const Wy=30,lI=e=>!isNaN(parseFloat(e)),js={current:void 0};class Hy{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=cr.now();this.updatedAt!==s&&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=cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lI(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Vu(!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 Lu);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.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 js.current&&js.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Wy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Wy);return vy(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 ko(e,t){return new Hy(e,t)}function cI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ko(n))}function uI(e,t){const n=ma(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=v_(s[i]);cI(e,i,a)}}function Uy(e){return e.getProps()[hg]}class fI extends Hy{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=$g(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(ha(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function dI(e){return!!(wt(e)&&e.add)}function $u(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new fI("auto"),e.addValue("willChange",r)),dI(r))return r.add(t)}function hI({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Gy(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),h=l[f];if(h===void 0||u&&hI(u,f))continue;const p={delay:n,elapsed:0,...gu(i||{},f)};let m=!1;if(window.HandoffAppearAnimations){const v=Uy(e);if(v){const w=window.HandoffAppearAnimations(v,f,d,De);w!==null&&(p.elapsed=w,m=!0)}}d.start(Fu(f,d,h,e.shouldReduceMotion&&or.has(f)?{type:!1}:p,e,m,$u(e,f)));const y=d.animation;y&&c.push(y)}return a&&Promise.all(c).then(()=>{De.update(()=>{a&&uI(e,a)})}),c}function Ru(e,t,n={}){var r;const o=ma(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Gy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return pI(e,t,u+c,f,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function pI(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(mI).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Ru(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function mI(e,t){return e.sortNodePosition(t)}function gI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ru(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ru(e,t,n);else{const o=typeof t=="function"?ma(e,t,n.custom):t;r=Promise.all(Gy(e,o,n))}return r.then(()=>{De.postRender(()=>{e.notify("AnimationComplete",t)})})}const yI=[...eu].reverse(),vI=eu.length;function bI(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gI(e,n,r)))}function wI(e){let t=bI(e),n=Yy(),r=!0;const o=l=>(c,u)=>{var f;const d=ma(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],d=new Set;let h={},p=1/0;for(let y=0;y<vI;y++){const v=yI[y],w=n[v],g=c[v]!==void 0?c[v]:u[v],T=ks(g),x=v===l?w.isActive:null;x===!1&&(p=y);let E=g===u[v]&&g!==c[v]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&x===null||!g&&!w.prevProp||_s(g)||typeof g=="boolean")continue;let O=xI(w.prevProp,g)||v===l&&w.isActive&&!E&&T||y>p&&T,I=!1;const N=Array.isArray(g)?g:[g];let L=N.reduce(o(v),{});x===!1&&(L={});const{prevResolvedValues:_={}}=w,j={..._,...L},D=k=>{O=!0,d.has(k)&&(I=!0,d.delete(k)),w.needsAnimating[k]=!0;const F=e.getValue(k);F&&(F.liveStyle=!1)};for(const k in j){const F=L[k],$=_[k];if(h.hasOwnProperty(k))continue;let z=!1;fu(F)&&fu($)?z=!Kg(F,$):z=F!==$,z?F!=null?D(k):d.add(k):F!==void 0&&d.has(k)?D(k):w.protectedKeys[k]=!0}w.prevProp=g,w.prevResolvedValues=L,w.isActive&&(h={...h,...L}),r&&e.blockInitialAnimation&&(O=!1),O&&(!E||I)&&f.push(...N.map(k=>({animation:k,options:{type:v}})))}if(d.size){const y={};d.forEach(v=>{const w=e.getBaseTarget(v),g=e.getValue(v);g&&(g.liveStyle=!0),y[v]=w??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Yy(),r=!0}}}function xI(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Kg(t,e):!1}function Ar(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yy(){return{animate:Ar(!0),whileInView:Ar(),whileHover:Ar(),whileTap:Ar(),whileDrag:Ar(),whileFocus:Ar(),exit:Ar()}}class SI extends lr{constructor(t){super(t),t.animationState||(t.animationState=wI(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_s(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 TI=0;class EI extends lr{constructor(){super(...arguments),this.id=TI++}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}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CI={animation:{Feature:SI},exit:{Feature:EI}},qy=(e,t)=>Math.abs(e-t);function PI(e,t){const n=qy(e.x,t.x),r=qy(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ky{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!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 f=Bu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=PI(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:m}=xt;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ju(d,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Bu(f.type==="pointercancel"?this.lastMoveEventInfo:ju(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,y),p&&p(f,y)},!Bg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=pa(t),a=ju(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=xt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Bu(a,this.history)),this.removeListeners=Dn(In(this.contextWindow,"pointermove",this.handlePointerMove),In(this.contextWindow,"pointerup",this.handlePointerUp),In(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Sn(this.updatePoint)}}function ju(e,t){return t?{point:t(e.point)}:e}function Zy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bu({point:e},t){return{point:e,delta:Zy(e,Xy(t)),offset:Zy(e,OI(t)),velocity:kI(t,.1)}}function OI(e){return e[0]}function Xy(e){return e[e.length-1]}function kI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Xy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Mn(t)));)n--;if(!r)return{x:0,y:0};const s=Nn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Qy=1e-4,_I=1-Qy,AI=1+Qy,Jy=.01,II=0-Jy,DI=0+Jy;function Kt(e){return e.max-e.min}function MI(e,t,n){return Math.abs(e-t)<=n}function ev(e,t,n,r=.5){e.origin=r,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=Kt(n)/Kt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_I&&e.scale<=AI||isNaN(e.scale))&&(e.scale=1),(e.translate>=II&&e.translate<=DI||isNaN(e.translate))&&(e.translate=0)}function Bs(e,t,n,r){ev(e.x,t.x,n.x,r?r.originX:void 0),ev(e.y,t.y,n.y,r?r.originY:void 0)}function tv(e,t,n){e.min=n.min+t.min,e.max=e.min+Kt(t)}function NI(e,t,n){tv(e.x,t.x,n.x),tv(e.y,t.y,n.y)}function nv(e,t,n){e.min=t.min-n.min,e.max=e.min+Kt(t)}function zs(e,t,n){nv(e.x,t.x,n.x),nv(e.y,t.y,n.y)}function FI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ze(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ze(n,e,r.max):Math.min(e,n)),e}function rv(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 LI(e,{top:t,left:n,bottom:r,right:o}){return{x:rv(e.x,n,o),y:rv(e.y,t,r)}}function ov(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 VI(e,t){return{x:ov(e.x,t.x),y:ov(e.y,t.y)}}function $I(e,t){let n=.5;const r=Kt(e),o=Kt(t);return o>r?n=$s(t.min,t.max-r,e.min):r>o&&(n=$s(e.min,e.max-o,t.min)),sr(0,1,n)}function RI(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 zu=.35;function jI(e=zu){return e===!1?e=0:e===!0&&(e=zu),{x:sv(e,"left","right"),y:sv(e,"top","bottom")}}function sv(e,t,n){return{min:iv(e,t),max:iv(e,n)}}function iv(e,t){return typeof e=="number"?e:e[t]||0}const av=()=>({translate:0,scale:1,origin:0,originPoint:0}),_o=()=>({x:av(),y:av()}),lv=()=>({min:0,max:0}),lt=()=>({x:lv(),y:lv()});function Xt(e){return[e("x"),e("y")]}function cv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wu(e){return e===void 0||e===1}function Hu({scale:e,scaleX:t,scaleY:n}){return!Wu(e)||!Wu(t)||!Wu(n)}function Ir(e){return Hu(e)||uv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function uv(e){return fv(e.x)||fv(e.y)}function fv(e){return e&&e!=="0%"}function xa(e,t,n){const r=e-n,o=t*r;return n+o}function dv(e,t,n,r,o){return o!==void 0&&(e=xa(e,o,r)),xa(e,n,r)+t}function Uu(e,t=0,n=1,r,o){e.min=dv(e.min,t,n,r,o),e.max=dv(e.max,t,n,r,o)}function hv(e,{x:t,y:n}){Uu(e.x,t.translate,t.scale,t.originPoint),Uu(e.y,n.translate,n.scale,n.originPoint)}const pv=.999999999999,mv=1.0000000000001;function WI(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ao(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,hv(e,i)),r&&Ir(s.latestValues)&&Ao(e,s.latestValues))}t.x<mv&&t.x>pv&&(t.x=1),t.y<mv&&t.y>pv&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function gv(e,t,n,r,o=.5){const s=Ze(e.min,e.max,o);Uu(e,t,n,s,r)}function Ao(e,t){gv(e.x,t.x,t.scaleX,t.scale,t.originX),gv(e.y,t.y,t.scaleY,t.scale,t.originY)}function yv(e,t){return cv(zI(e.getBoundingClientRect(),t))}function HI(e,t,n){const r=yv(e,n),{scroll:o}=t;return o&&(fr(r.x,o.offset.x),fr(r.y,o.offset.y)),r}const vv=({current:e})=>e?e.ownerDocument.defaultView:null,UI=new WeakMap;class GI{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(pa(u,"page").point)},s=(u,f)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ug(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xt(v=>{let w=this.getAxisMotionValue(v).get()||0;if(xn.test(w)){const{projection:g}=this.visualElement;if(g&&g.layout){const T=g.layout.layoutBox[v];T&&(w=Kt(T)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&De.postRender(()=>m(u,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=$u(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=YI(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Xt(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ky(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:vv(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&De.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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Sa(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=FI(i,this.constraints[t],this.elastic[t])),s.set(i)}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,s=this.constraints;n&&So(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=LI(o.layoutBox,n):this.constraints=!1,this.elastic=jI(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=RI(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!So(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 s=HI(r,o.root,this.visualElement.getTransformPagePoint());let i=VI(o.layout.layoutBox,s);if(n){const a=n(BI(i));this.hasMutatedConstraints=!!a,a&&(i=cv(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xt(u=>{if(!Sa(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Fu(t,r,0,n,this.visualElement,!1,$u(this.visualElement,t)))}stopAnimation(){Xt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xt(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){Xt(n=>{const{drag:r}=this.getProps();if(!Sa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-Ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!So(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=$I({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xt(i=>{if(!Sa(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ze(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;UI.set(this.visualElement,this);const t=this.visualElement.current,n=In(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();So(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),De.read(r);const i=An(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=zu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Sa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YI(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qI extends lr{constructor(t){super(t),this.removeGroupControls=bt,this.removeListeners=bt,this.controls=new GI(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bt}unmount(){this.removeGroupControls(),this.removeListeners()}}const bv=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class KI extends lr{constructor(){super(...arguments),this.removePointerDownListener=bt}onPointerDown(t){this.session=new Ky(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:bv(t),onStart:bv(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&De.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=In(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ZI(){const e=b.useContext(ra);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=b.useId();return b.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ta={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ws={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=wv(e,t.target.x),r=wv(e,t.target.y);return`${n}% ${r}%`}},XI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ur.parse(e);if(o.length>5)return r;const s=ur.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=Ze(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class QI extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;qk(JI),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ta.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||De.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Jc.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 xv(e){const[t,n]=ZI(),r=b.useContext(As);return S.jsx(QI,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(mg),isPresent:t,safeToRemove:n})}const JI={borderRadius:{...Ws,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ws,borderTopRightRadius:Ws,borderBottomLeftRadius:Ws,borderBottomRightRadius:Ws,boxShadow:XI},Sv=["TopLeft","TopRight","BottomLeft","BottomRight"],eD=Sv.length,Tv=e=>typeof e=="string"?parseFloat(e):e,Ev=e=>typeof e=="number"||fe.test(e);function tD(e,t,n,r,o,s){o?(e.opacity=Ze(0,n.opacity!==void 0?n.opacity:1,nD(r)),e.opacityExit=Ze(t.opacity!==void 0?t.opacity:1,0,rD(r))):s&&(e.opacity=Ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<eD;i++){const a=`border${Sv[i]}Radius`;let l=Cv(t,a),c=Cv(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ev(l)===Ev(c)?(e[a]=Math.max(Ze(Tv(l),Tv(c),r),0),(xn.test(c)||xn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,r))}function Cv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nD=Pv(0,.5,ky),rD=Pv(.5,.95,bt);function Pv(e,t,n){return r=>r<e?0:r>t?1:n($s(e,t,r))}function Ov(e,t){e.min=t.min,e.max=t.max}function Qt(e,t){Ov(e.x,t.x),Ov(e.y,t.y)}function kv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _v(e,t,n,r,o){return e-=t,e=xa(e,1/n,r),o!==void 0&&(e=xa(e,1/o,r)),e}function oD(e,t=0,n=1,r=.5,o,s=e,i=e){if(xn.test(t)&&(t=parseFloat(t),t=Ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ze(s.min,s.max,r);e===s&&(a-=t),e.min=_v(e.min,t,n,a,o),e.max=_v(e.max,t,n,a,o)}function Av(e,t,[n,r,o],s,i){oD(e,t[n],t[r],t[o],t.scale,s,i)}const sD=["x","scaleX","originX"],iD=["y","scaleY","originY"];function Iv(e,t,n,r){Av(e.x,t,sD,n?n.x:void 0,r?r.x:void 0),Av(e.y,t,iD,n?n.y:void 0,r?r.y:void 0)}function Dv(e){return e.translate===0&&e.scale===1}function Mv(e){return Dv(e.x)&&Dv(e.y)}function aD(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function Nv(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Fv(e){return Kt(e.x)/Kt(e.y)}function Lv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lD{constructor(){this.members=[]}add(t){da(this.members,t),t.scheduleRender()}remove(t){if(ha(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 s=this.members[o];if(s.isPresent!==!1){r=s;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 cD(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const uD=(e,t)=>e.depth-t.depth;class fD{constructor(){this.children=[],this.isDirty=!1}add(t){da(this.children,t),this.isDirty=!0}remove(t){ha(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uD),this.isDirty=!1,this.children.forEach(t)}}function dD(e,t){const n=cr.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Sn(r),e(s-t))};return De.read(r,!0),()=>Sn(r)}function hD(e){return e instanceof SVGElement&&e.tagName!=="svg"}function pD(e,t,n){const r=wt(e)?e:ko(e);return r.start(Fu("",r,t,n)),r.animation}const Dr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Gu=["","X","Y","Z"],mD={visibility:"hidden"},Vv=1e3;let gD=0;function Yu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function $v(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Uy(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?$v(e.parent):!1:!1}function Rv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=gD++,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,window.MotionDebug&&(Dr.totalNodes=Dr.resolvedTargetDeltas=Dr.recalculatedProjection=0),this.nodes.forEach(bD),this.nodes.forEach(ED),this.nodes.forEach(CD),this.nodes.forEach(wD),window.MotionDebug&&window.MotionDebug.record(Dr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new fD)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Lu),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hD(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const d=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=dD(d,250),Ta.hasAnimatedSinceResize&&(Ta.hasAnimatedSinceResize=!1,this.nodes.forEach(Bv))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||AD,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!Nv(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const T={...gu(m,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else d||Bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Sn(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(PD),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&$v(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jv);return}this.isUpdating||this.nodes.forEach(SD),this.isUpdating=!1,this.nodes.forEach(TD),this.nodes.forEach(yD),this.nodes.forEach(vD),this.clearAllSnapshots();const a=cr.now();xt.delta=sr(0,1e3/60,a-xt.timestamp),xt.timestamp=a,xt.isProcessing=!0,du.update.process(xt),du.preRender.process(xt),du.render.process(xt),xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xD),this.sharedNodes.forEach(OD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:i,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mv(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ir(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),ID(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return lt();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(fr(a.x,l.offset.x),fr(a.y,l.offset.y)),a}removeElementScroll(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;if(c!==this.root&&u&&f.layoutScroll){if(u.isRoot){Qt(a,i);const{scroll:d}=this.root;d&&(fr(a.x,-d.offset.x),fr(a.y,-d.offset.y))}fr(a.x,u.offset.x),fr(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=lt();Qt(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ao(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ir(u.latestValues)&&Ao(l,u.latestValues)}return Ir(this.latestValues)&&Ao(l,this.latestValues),l}removeTransform(i){const a=lt();Qt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ir(c.latestValues))continue;Hu(c.latestValues)&&c.updateSnapshot();const u=lt(),f=c.measurePageBox();Qt(u,f),Iv(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ir(this.latestValues)&&Iv(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;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(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!(!this.layout||!(f||d))){if(this.resolvedRelativeTargetAt=xt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NI(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Qt(this.target,this.layout.layoutBox),hv(this.target,this.targetDelta)):Qt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),zs(this.relativeTargetOrigin,this.target,h.target),Qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Dr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Hu(this.parent.latestValues)||uv(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 i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===xt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;Qt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;WI(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kv(this.prevProjectionDelta.x,this.projectionDelta.x),kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Bs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Lv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Lv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Dr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),i){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_o(),this.projectionDelta=_o(),this.projectionDeltaWithTransform=_o()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=_o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=lt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,y=this.getStack(),v=!y||y.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(_D));this.animationProgress=0;let g;this.mixTargetDelta=T=>{const x=T/1e3;zv(f.x,i.x,x),zv(f.y,i.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kD(this.relativeTarget,this.relativeTargetOrigin,d,x),g&&aD(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=lt()),Qt(g,this.relativeTarget)),m&&(this.animationValues=u,tD(u,c,this.latestValues,x,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Sn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{Ta.hasAnimatedSinceResize=!0,this.currentAnimation=pD(0,Vv,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.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 i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Yv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lt();const f=Kt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const d=Kt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+d}Qt(a,l),Ao(a,u),Bs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new lD),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Yu("z",i,c,this.animationValues);for(let u=0;u<Gu.length;u++)Yu(`rotate${Gu[u]}`,i,c,this.animationValues),Yu(`skew${Gu[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return mD;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=fa(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=fa(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ir(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=cD(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in la){if(d[m]===void 0)continue;const{correct:y,applyTo:v}=la[m],w=c.transform==="none"?d[m]:y(d[m],f);if(v){const g=v.length;for(let T=0;T<g;T++)c[v[T]]=w}else c[m]=w}return this.options.layoutId&&(c.pointerEvents=f===this?fa(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(jv),this.root.sharedNodes.clear()}}}function yD(e){e.updateLayout()}function vD(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:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(d);d.min=r[f].min,d.max=d.min+h}):Yv(s,n.layoutBox,r)&&Xt(f=>{const d=i?n.measuredBox[f]:n.layoutBox[f],h=Kt(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=_o();Bs(a,r,n.layoutBox);const l=_o();i?Bs(l,e.applyTransform(o,!0),n.measuredBox):Bs(l,r,n.layoutBox);const c=!Mv(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const p=lt();zs(p,n.layoutBox,d.layoutBox);const m=lt();zs(m,r,h.layoutBox),Nv(p,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function bD(e){window.MotionDebug&&Dr.totalNodes++,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 wD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xD(e){e.clearSnapshot()}function jv(e){e.clearMeasurements()}function SD(e){e.isLayoutDirty=!1}function TD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ED(e){e.resolveTargetDelta()}function CD(e){e.calcProjection()}function PD(e){e.resetSkewAndRotation()}function OD(e){e.removeLeadSnapshot()}function zv(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Wv(e,t,n,r){e.min=Ze(t.min,n.min,r),e.max=Ze(t.max,n.max,r)}function kD(e,t,n,r){Wv(e.x,t.x,n.x,r),Wv(e.y,t.y,n.y,r)}function _D(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const AD={duration:.45,ease:[.4,0,.1,1]},Hv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Uv=Hv("applewebkit/")&&!Hv("chrome/")?Math.round:bt;function Gv(e){e.min=Uv(e.min),e.max=Uv(e.max)}function ID(e){Gv(e.x),Gv(e.y)}function Yv(e,t,n){return e==="position"||e==="preserve-aspect"&&!MI(Fv(t),Fv(n),.2)}const DD=Rv({attachResizeListener:(e,t)=>An(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qu={current:void 0},qv=Rv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qu.current){const e=new DD({});e.mount(window),e.setOptions({layoutScroll:!0}),qu.current=e}return qu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MD={pan:{Feature:KI},drag:{Feature:qI,ProjectionNode:qv,MeasureLayout:xv}},Ku={current:null},Kv={current:!1};function ND(){if(Kv.current=!0,!!Qc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ku.current=e.matches;e.addListener(t),t()}else Ku.current=!1}function FD(e,t,n){for(const r in t){const o=t[r],s=n[r];if(wt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Vu(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(wt(s))e.addValue(r,ko(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,ko(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Zv=new WeakMap,LD=[...ry,_t,ur],VD=e=>LD.find(ny(e)),Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],$D=tu.length;class RD{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(d,h,p,m)=>new this.KeyframeResolver(d,h,p,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,De.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;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=a,this.blockInitialAnimation=!!s,this.isControllingVariants=aa(n),this.isVariantNode=vg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&wt(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Zv.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)),Kv.current||ND(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ku.current,process.env.NODE_ENV!=="production"&&Vu(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(){Zv.delete(this.current),this.projection&&this.projection.unmount(),Sn(this.notifyUpdate),Sn(this.render),this.valueSubscriptions.forEach(t=>t()),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){const r=or.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s(),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 To){const n=To[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 s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Xv.length;r++){const o=Xv[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=FD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<$D;r++){const o=tu[r],s=this.props[o];(ks(s)||s===!1)&&(n[o]=s)}return n}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=ko(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"&&(Xg(o)||Zg(o))?o=parseFloat(o):!VD(o)&&ur.test(n)&&(o=hy(t,n)),this.setBaseTarget(t,wt(o)?o.get():o)),wt(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 i=uu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!wt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Lu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Qv extends RD{constructor(){super(...arguments),this.KeyframeResolver=py}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]}}function jD(e){return window.getComputedStyle(e)}class BD extends Qv{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Dg}readValueFromInstance(t,n){if(or.has(n)){const r=Eu(n);return r&&r.default||0}else{const r=jD(t),o=(Tg(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return yv(t,n)}build(t,n,r){su(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class zD extends Qv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(or.has(n)){const r=Eu(n);return r&&r.default||0}return n=Mg.has(n)?n:sa(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fg(t,n,r)}build(t,n,r){au(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ng(t,n,r,o)}mount(t){this.isSVGTag=lu(t.tagName),super.mount(t)}}const WD=(e,t)=>nu(e)?new zD(t):new BD(t,{allowProjection:e!==b.Fragment}),HD={...CI,...$_,...MD,...{layout:{ProjectionNode:qv,MeasureLayout:xv}}},Jt=Gk((e,t)=>C_(e,t,HD,WD));function Jv(){const e=b.useRef(!1);return oa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function eb(){const e=Jv(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>De.postRender(r),[r]),t]}class UD extends M.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GD({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=b.useContext(xo);return b.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
131
131
|
[data-motion-pop-id="${n}"] {
|
|
132
132
|
position: absolute !important;
|
|
133
133
|
width: ${i}px !important;
|
|
@@ -135,7 +135,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
135
135
|
top: ${l}px !important;
|
|
136
136
|
left: ${c}px !important;
|
|
137
137
|
}
|
|
138
|
-
`),()=>{document.head.removeChild(u)}},[t]),S.jsx(
|
|
138
|
+
`),()=>{document.head.removeChild(u)}},[t]),S.jsx(UD,{isPresent:t,childRef:r,sizeRef:o,children:M.cloneElement(e,{ref:r})})}const Zu=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=ar(YD),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),M.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=S.jsx(GD,{isPresent:n,children:e})),S.jsx(ra.Provider,{value:c,children:e})};function YD(){return new Map}function qD(e){return b.useEffect(()=>()=>e(),[])}const Mr=e=>e.key||"";function KD(e,t){e.forEach(n=>{const r=Mr(n);t.set(r,n)})}function ZD(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ea=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{an(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(As).forceRender||eb()[0],l=Jv(),c=ZD(e);let u=c;const f=b.useRef(new Map).current,d=b.useRef(u),h=b.useRef(new Map).current,p=b.useRef(!0);if(oa(()=>{p.current=!1,KD(c,h),d.current=u}),qD(()=>{p.current=!0,h.clear(),f.clear()}),p.current)return S.jsx(S.Fragment,{children:u.map(w=>S.jsx(Zu,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:w},Mr(w)))});u=[...u];const m=d.current.map(Mr),y=c.map(Mr),v=m.length;for(let w=0;w<v;w++){const g=m[w];y.indexOf(g)===-1&&!f.has(g)&&f.set(g,void 0)}return i==="wait"&&f.size&&(u=[]),f.forEach((w,g)=>{if(y.indexOf(g)!==-1)return;const T=h.get(g);if(!T)return;const x=m.indexOf(g);let E=w;if(!E){const C=()=>{f.delete(g);const O=Array.from(h.keys()).filter(I=>!y.includes(I));if(O.forEach(I=>h.delete(I)),d.current=c.filter(I=>{const N=Mr(I);return N===g||O.includes(N)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=S.jsx(Zu,{isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:s,mode:i,children:T},Mr(T)),f.set(g,E)}u.splice(x,0,E)}),u=u.map(w=>{const g=w.key;return f.has(g)?w:S.jsx(Zu,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:w},Mr(w))}),process.env.NODE_ENV!=="production"&&i==="wait"&&u.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.`),S.jsx(S.Fragment,{children:f.size?u:u.map(w=>b.cloneElement(w))})};function XD({children:e,isValidProp:t,...n}){t&&_g(t),n={...b.useContext(xo),...n},n.isStatic=ar(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return S.jsx(xo.Provider,{value:r,children:e})}const QD=b.createContext(null),JD=e=>!e.isLayoutDirty&&e.willUpdate(!1);function tb(){const e=new Set,t=new WeakMap,n=()=>e.forEach(JD);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 nb=e=>e===!0,eM=e=>nb(e===!0)||e==="id",tM=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(As),o=b.useContext(QD),[s,i]=eb(),a=b.useRef(null),l=r.id||o;a.current===null&&(eM(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:nb(n)&&r.group||tb()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return S.jsx(As.Provider,{value:c,children:e})},rb=b.createContext(null);function nM(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const s=r>0?1:-1,i=e[o+s];if(!i)return e;const a=e[o],l=i.layout,c=Ze(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?b_(e,o,o+s):e}function rM({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=ar(()=>Jt(t)),l=[],c=b.useRef(!1);an(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,d)=>{const h=l.findIndex(p=>f===p.value);h!==-1?l[h].layout=d[n]:l.push({value:f,layout:d[n]}),l.sort(iM)},updateOrder:(f,d,h)=>{if(c.current)return;const p=nM(l,f,d,h);l!==p&&(c.current=!0,r(p.map(sM).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),S.jsx(a,{...s,ref:i,ignoreStrict:!0,children:S.jsx(rb.Provider,{value:u,children:e})})}const oM=b.forwardRef(rM);function sM(e){return e.value}function iM(e,t){return e.layout.min-t.layout.min}function Io(e){const t=ar(()=>ko(e)),{isStatic:n}=b.useContext(xo);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const aM=e=>e&&typeof e=="object"&&e.mix,lM=e=>aM(e)?e.mix:void 0;function cM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Ly(o,s,{mixer:lM(s[0]),...i});return t?a(r):a}function ob(e,t){const n=Io(t()),r=()=>n.set(t());return r(),oa(()=>{const o=()=>De.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Sn(r)}}),n}function uM(e){js.current=[],e();const t=ob(js.current,e);return js.current=void 0,t}function fM(e,t,n,r){if(typeof e=="function")return uM(e);const o=typeof t=="function"?t:cM(t,n,r);return Array.isArray(e)?sb(e,o):sb([e],([s])=>o(s))}function sb(e,t){const n=ar(()=>[]);return ob(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function ib(e,t=0){return wt(e)?e:Io(t)}function dM({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=ar(()=>Jt(r)),c=b.useContext(rb),u={x:ib(t.x),y:ib(t.y)},f=fM([u.x,u.y],([m,y])=>m||y?1:"unset");an(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:d,registerItem:h,updateOrder:p}=c;return S.jsx(l,{drag:d,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:s,onDrag:(m,y)=>{const{velocity:v}=y;v[d]&&p(n,u[d].get(),v[d]),o&&o(m,y)},onLayoutMeasure:m=>h(n,m),ref:a,ignoreStrict:!0,children:e})}const hM=b.forwardRef(dM),Ca={Group:oM,Item:hM};class pM{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 mM=()=>new pM;function gM(){return ar(mM)}var Xu={},Qu={exports:{}},Ju={};/**
|
|
139
139
|
* @license React
|
|
140
140
|
* use-sync-external-store-shim.production.min.js
|
|
141
141
|
*
|
|
@@ -143,7 +143,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the MIT license found in the
|
|
145
145
|
* LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/var
|
|
146
|
+
*/var ab;function yM(){if(ab)return Ju;ab=1;var e=b;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,d){var h=d(),p=r({inst:{value:h,getSnapshot:d}}),m=p[0].inst,y=p[1];return s(function(){m.value=h,m.getSnapshot=d,l(m)&&y({inst:m})},[f,h,d]),o(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),i(h),h}function l(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!n(f,h)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Ju.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Ju}var lb={};/**
|
|
147
147
|
* @license React
|
|
148
148
|
* use-sync-external-store-shim.development.js
|
|
149
149
|
*
|
|
@@ -151,7 +151,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
151
151
|
*
|
|
152
152
|
* This source code is licensed under the MIT license found in the
|
|
153
153
|
* LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/var
|
|
154
|
+
*/var cb;function vM(){return cb||(cb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(g){{for(var T=arguments.length,x=new Array(T>1?T-1:0),E=1;E<T;E++)x[E-1]=arguments[E];r("error",g,x)}}function r(g,T,x){{var E=t.ReactDebugCurrentFrame,C=E.getStackAddendum();C!==""&&(T+="%s",x=x.concat([C]));var O=x.map(function(I){return String(I)});O.unshift("Warning: "+T),Function.prototype.apply.call(console[g],console,O)}}function o(g,T){return g===T&&(g!==0||1/g===1/T)||g!==g&&T!==T}var s=typeof Object.is=="function"?Object.is:o,i=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function d(g,T,x){u||e.startTransition!==void 0&&(u=!0,n("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 E=T();if(!f){var C=T();s(E,C)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var O=i({inst:{value:E,getSnapshot:T}}),I=O[0].inst,N=O[1];return l(function(){I.value=E,I.getSnapshot=T,h(I)&&N({inst:I})},[g,E,T]),a(function(){h(I)&&N({inst:I});var L=function(){h(I)&&N({inst:I})};return g(L)},[g]),c(E),E}function h(g){var T=g.getSnapshot,x=g.value;try{var E=T();return!s(x,E)}catch{return!0}}function p(g,T,x){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?p:d,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;lb.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),lb}var ub;function fb(){return ub||(ub=1,process.env.NODE_ENV==="production"?Qu.exports=yM():Qu.exports=vM()),Qu.exports}/**
|
|
155
155
|
* @license React
|
|
156
156
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
157
157
|
*
|
|
@@ -159,7 +159,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the MIT license found in the
|
|
161
161
|
* LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/var
|
|
162
|
+
*/var db;function bM(){if(db)return Xu;db=1;var e=b,t=fb();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,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Xu.useSyncExternalStoreWithSelector=function(c,u,f,d,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function v(E){if(!w){if(w=!0,g=E,E=d(E),h!==void 0&&m.hasValue){var C=m.value;if(h(C,E))return T=C}return T=E}if(C=T,r(g,E))return C;var O=d(E);return h!==void 0&&h(C,O)?C:(g=E,T=O)}var w=!1,g,T,x=f===void 0?null:f;return[function(){return v(u())},x===null?void 0:function(){return v(x())}]},[u,f,d,h]);var y=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},Xu}var hb={};/**
|
|
163
163
|
* @license React
|
|
164
164
|
* use-sync-external-store-shim/with-selector.development.js
|
|
165
165
|
*
|
|
@@ -167,5 +167,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
167
167
|
*
|
|
168
168
|
* This source code is licensed under the MIT license found in the
|
|
169
169
|
* LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/var mb;function xM(){return mb||(mb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w,t=db();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,d,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var x=!1,E,C,O=function(_){if(!x){x=!0,E=_;var j=h(_);if(p!==void 0&&y.hasValue){var D=y.value;if(p(D,j))return C=D,D}return C=j,j}var k=E,F=C;if(r(k,_))return F;var R=h(_);return p!==void 0&&p(F,R)?F:(E=_,C=R,R)},I=d===void 0?null:d,N=function(){return O(f())},L=I===null?void 0:function(){return O(I())};return[N,L]},[f,d,h,p]),b=v[0],g=v[1],T=o(u,b,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}pb.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),pb}process.env.NODE_ENV==="production"?wM():xM();const Do=e=>{const t=w.useRef(e??{});return w.useEffect(()=>void(t.current=e),[e]),t},SM=e=>{const t=w.useRef();return w.useEffect(()=>{t.current=e},[e]),t.current},TM=e=>Object.entries(e),gb=e=>e instanceof Promise,yb=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),EM=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(d=>yb(u,d,s,f));return gb(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},CM=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>yb(c,u,s,o.current));return gb(a)?a.then(c=>l(c)):l(a)},tf=(e,t,n)=>{const[r,o]=w.useState(()=>e),s=Do(r),i=Do((n==null?void 0:n.props)??{}),a=Do(t),l=Do((n==null?void 0:n.postMiddleware)??[]),c=Do((n==null?void 0:n.interceptor)??[]),u=w.useRef(e),f=SM(r),d=Do(f),h=w.useRef(null);w.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[p]=w.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>d.current});return TM(y).reduce((v,[b,g])=>({...v,[b]:n!=null&&n.debug?EM(b,g,o,m,h,c.current):CM(b,g,o,m,h,c.current)}),{})});return[r,p,i.current]},PM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function OM(e,t){return w.useRef(PM(e,t)).current}function nf(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}nf.debounce=nf;var kM=nf;const vb=eh(kM);function _M(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=w.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=w.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=w.useRef(!1);w.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,h,p]=w.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N}=l.current.element.getBoundingClientRect(),L={left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N};l.current.element instanceof HTMLElement&&o&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),f.current&&!MM(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[b,u?vb(b,u):b,c?vb(b,c):b]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=b=>{!b||b===l.current.element||(m(),l.current.element=b,l.current.scrollContainers=bb(b),y())};return IM(p,!!n),AM(h),w.useEffect(()=>{m(),y()},[n,p,h]),w.useEffect(()=>m,[]),[v,i,d]}function AM(e){w.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function IM(e,t){w.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function bb(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...bb(e.parentElement)]}const DM=["x","y","top","bottom","left","right","width","height"],MM=(e,t)=>DM.every(n=>e[n]===t[n]),NM=({children:e})=>{const[t,n]=_M();return S.jsx(Jt.div,{animate:{height:n.height>0?n.height:"auto"},children:S.jsx("div",{ref:t,children:e})})},FM={type:"spring",bounce:.1,duration:.3},wb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),xb={middle:{x:"0%",opacity:1},enter:wb(1),exit:wb(-1)},Sb={exit:{visibility:"hidden"}},LM=e=>{const t=vn(Xm(e));return Zm({start:t,end:yo(t,41)})},Tb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),VM=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Xm(new Date(e).setMonth(r)),s=Tb(o,t);return S.jsx("option",{value:s,"data-index":r,children:s},s)}),rf={ArrowLeft:(e,t)=>t==="days"?_k(e,1):dg(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):ea(e,1),ArrowUp:(e,t)=>t==="days"?Ak(e,1):Ik(e,1),ArrowDown:(e,t)=>t==="days"?qm(e,1):Km(e,1)},Eb=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),Cb=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=tf({date:i,isAnimating:!1,year:Nr(i),direction:void 0,months:VM(i,e),week:Zm({start:vn(i),end:$P(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:bo(new Date)}),onExitComplete:()=>(Eb(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:Nr(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=ea(m.date,1);return{date:y,isAnimating:!0,direction:1,year:Nr(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=dg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:Nr(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:Nr(v)}},onChangeMonth:m=>{const y=m.target.value,b=Array.from(m.target.options).find(g=>g.value===y);if(b){const g=b.dataset.index||"",T=new Date(p.state().date);return T.setMonth(+g),{date:T,year:Nr(T)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in rf){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,b=kn.keyof(rf,y)?rf[y](v,m.shiftKey?"month":"days"):null;if(b!==null)return Eb(b),{date:b,year:Nr(b)}}return p.state()}})),c=LM(a.date),u=a.date.toISOString(),f=Tb(a.date,e);w.useEffect(()=>s==null?void 0:s(a.date),[u]);const d=OM(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),d(m)};return S.jsx(QD,{transition:FM,children:S.jsxs("div",{className:"relative overflow-hidden",children:[S.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:S.jsx(NM,{children:S.jsx(Ca,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,custom:a.direction,onExitComplete:l.onExitComplete,children:S.jsxs(Jt.div,{initial:"enter",animate:"middle",exit:"exit",children:[S.jsxs("header",{className:"relative flex justify-between",children:[S.jsx(Jt.button,{onClick:l.previousMonth,variants:Sb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",children:S.jsx(fx,{className:"h-4 w-4"})}),S.jsx(Jt.span,{variants:xb,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:S.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[S.jsx("select",{style:{width:`${f.length}ch`},value:f,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),S.jsx(dp,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),S.jsx(Jt.button,{variants:Sb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",onClick:l.nextMonth,children:S.jsx(Kd,{className:"h-4 w-4"})}),S.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%)"}})]}),S.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>S.jsx("span",{className:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),S.jsx(Jt.ul,{onKeyDown:l.onKeyDown,variants:xb,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=kk(p)&&n,b=(t==null?void 0:t(p))||!1,g=!Ok(p,a.date)||b;return S.jsx("li",{className:"w-full flex items-center justify-center",children:S.jsx("button",{type:"button","data-date":m,disabled:b,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},f)})})}),S.jsx("footer",{className:"text-center text-primary mt-2",children:S.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Mo=e=>{const t=w.useId(),[n,r]=w.useState(e.open),o=w.useRef(null),s=w.useMemo(()=>[dl(10),yd({fallbackAxisSideDirection:"end"}),gd(),vd({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=vi({open:n,middleware:s,transform:!0,whileElementsMounted:fl,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=$d(l),u=yi(l),f=xi(l),{getReferenceProps:d,getFloatingProps:h}=bi([c,u,f]);return S.jsxs(w.Fragment,{children:[S.jsx("button",{ref:i.setReference,...d(),type:"button",children:e.trigger}),n&&S.jsx(gi,{id:`${t}-portal`,children:S.jsx(bl,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:l,modal:!1,children:S.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[S.jsx(Ed,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),S.jsx("header",{className:"mb-2",children:S.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},Pb=new Date(1970,11,31),of={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Ob={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},RM={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")},$M=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=w.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[l,c]=w.useState(e||void 0),[u,f]=w.useState(!1),d=a.formatToParts(Pb).flatMap(b=>kn.keyof(of,b.type)?of[b.type](b.value):[]),h=a.formatToParts(Pb).reduce((b,g)=>b+(kn.keyof(Ob,g.type)?Ob[g.type](g.value):""),""),[p,m]=w.useState(l?a.formatToParts(l).reduce((b,g)=>b+(kn.keyof(of,g.type)?RM[g.type](l,g.value):""),""):""),y=b=>{const g=b.target.value;if(m(g),d.length===g.length&&d.every((x,E)=>{const C=g.charAt(E);return typeof x=="string"?C===x:x.test(C)})){const x=bo(Ck(g,h,new Date));c(x),o==null||o(x)}},v=b=>{c(b),o==null||o(b),m(kO(b,h))};return S.jsx(us,{...i,mask:d,value:p,onChange:y,className:"uppercase",formNoValidate:!u,placeholder:h,required:i.required??!0,error:u?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:S.jsxs(w.Fragment,{children:[S.jsx("input",{defaultValue:l==null?void 0:l.toISOString(),hidden:!0,type:"date",name:i.name}),S.jsx(Mo,{trigger:S.jsx(ux,{}),onChange:f,open:u,children:S.jsx(Cb,{...i,locale:t,date:l,onChange:v,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},jM=xc("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-subtle text-secondary-hover",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),BM=w.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return S.jsxs(hs,{...i,ref:a,"data-theme":o,as:i.as??"span",className:Rt(jM({size:s,theme:o}),t),children:[i.children,n]})}),kb=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>S.jsxs(hs,{...s,as:"div",className:Rt("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?S.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,S.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),WM=e=>S.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[S.jsxs("header",{className:"p-6 items-start flex gap-4",children:[S.jsx("div",{className:Rt("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:S.jsx("div",{children:S.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("header",{children:S.jsx("h3",{className:"text-base leading-none",children:e.title})}),S.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?S.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),_b=(e,t)=>{const[n,r]=w.useState(()=>t||e);return w.useEffect(()=>{r(e)},[e]),[n,r]},Ab=w.createContext(""),zM=e=>{const[t,n]=_b(e.active),r=Io(0),o=Io(0),s=w.useRef(null),i=e.useHash?"a":"button";w.useEffect(()=>{const c=s.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},f=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",f);let d=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(d=c.querySelector(`li[data-id=${h}]`),n(h)),d===null){d=c.querySelector("li[data-id]");const p=d.getAttribute("data-id")||"";n(p)}return u(d),()=>window.removeEventListener("resize",f)},[]),w.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=w.Children.toArray(e.children),l=c=>{const u=c.currentTarget,f=u.getBoundingClientRect();o.set(f.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return S.jsx(Ab.Provider,{value:t,children:S.jsx(kb,{container:"pt-0",header:S.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",children:[S.jsx(Jt.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden md:block"}),S.jsx("nav",{children:S.jsx("ul",{className:"divide-x divide-card-border overflow-x-auto flex justify-between md:justify-start",children:a.map(c=>{const u=c.props;return S.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:S.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:e.children})})},HM=()=>w.useContext(Ab),UM=e=>{const t=HM();return S.jsx(w.Fragment,{children:e.id===t?e.children:null})},GM=({children:e,as:t,title:n,...r})=>{const[o,s]=w.useState(!1),i=w.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=vi({open:o,onOpenChange:s,whileElementsMounted:fl,transform:!0,middleware:[dl(5),yd({fallbackAxisSideDirection:"start"}),gd(),vd({element:i,padding:5})]}),f=Rw(u,{move:!0}),d=ex(u),h=yi(u),p=xi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=bi([f,d,h,p]);return S.jsxs(w.Fragment,{children:[S.jsx(a,{ref:l.setReference,...m(r),children:n}),S.jsx(gi,{children:o&&S.jsxs(hs,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[S.jsx(Ed,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};function YM(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function qM(...e){return t=>e.forEach(n=>YM(n,t))}var Ib=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(ZM);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return S.jsx(sf,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return S.jsx(sf,{...r,ref:t,children:n})});Ib.displayName="Slot";var sf=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=QM(n);return M.cloneElement(n,{...XM(r,n.props),ref:t?qM(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});sf.displayName="SlotClone";var KM=({children:e})=>S.jsx(S.Fragment,{children:e});function ZM(e){return M.isValidElement(e)&&e.type===KM}function XM(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function QM(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)}const No="600ms",Db=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:No},enter:{[e]:0,opacity:1,animationDuration:No},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:No}}),JM=Db("left"),eN=Db("right"),Mb={drawer:e=>e==="left"?JM:eN,dialog:{initial:{opacity:0,scale:.95,animationDuration:No},enter:{opacity:1,scale:[1.05,1],animationDuration:No},exit:{opacity:0,scale:.97,animationDuration:No}}},tN=xc("isolate 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%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8"},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"}}),nN={top:0,left:0,right:0,bottom:0},rN=e=>{const t=(n,r)=>{if(e.parent.current){const o=e.parent.current,s=e.value.get()||o.getBoundingClientRect().width,i=e.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(s+i))}};return S.jsx(Jt.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:nN,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${e.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},oN=({type:e="dialog",resizer:t=!0,...n})=>{const r=e==="dialog",o=r?"none":n.position||"left",s=r?Mb.dialog:Mb.drawer(o),i=w.useId(),a=w.useId(),{refs:l,context:c}=vi({open:n.open,onOpenChange:n.onChange}),u=$d(c),f=xi(c),d=yi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=bi([u,f,d]),m=n.trigger,y=Io(void 0);return S.jsxs(w.Fragment,{children:[n.asChild?S.jsx(Ib,{ref:l.setReference,...h(),children:m}):S.jsx("button",{ref:l.setReference,...h(),type:"button",children:m}),S.jsx(gi,{children:S.jsx(Ca,{presenceAffectsLayout:!0,children:n.open&&S.jsx(Zw,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${e==="drawer"?"":"grid justify-center p-8"}`,children:S.jsx(bl,{modal:!0,closeOnFocusOut:!0,context:c,children:S.jsxs(Jt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:tN({position:o,type:e}),exit:"exit",initial:"initial",ref:l.setFloating,variants:s,style:{width:y},...p(),children:[!r&&t?S.jsx(rN,{value:y,parent:l.floating,type:o}):null,n.title||n.closable?S.jsxs("header",{className:"w-full relative",children:[n.title?S.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?S.jsx("nav",{className:"absolute -top-1 right-8",children:S.jsx("button",{type:"button",onClick:()=>{var v;return(v=n.onChange)==null?void 0:v.call(n,!1)},className:"p-1 transition-colors hover:text-danger focus:text-danger",children:S.jsx(bx,{})})}):null]}):null,S.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?S.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var sN=Object.defineProperty,Nb=Object.getOwnPropertySymbols,iN=Object.prototype.hasOwnProperty,aN=Object.prototype.propertyIsEnumerable,Fb=(e,t,n)=>t in e?sN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lN=(e,t)=>{for(var n in t||(t={}))iN.call(t,n)&&Fb(e,n,t[n]);if(Nb)for(var n of Nb(t))aN.call(t,n)&&Fb(e,n,t[n]);return e},af=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},cN=(e,t,n,r)=>ka(af,e,t,n,r),Fo=e=>typeof e=="object",dr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Fo(e)&&!Fo(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=>dr(e[r],t[r]))},uN=(e,t)=>(Fo(e)||Array.isArray(e))&&t?e[t]:e,fN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Oa=e=>/[0-9.]+/.test(e),Lb=e=>["string","number"].includes(typeof e),Vb=e=>e==null||(e==null?void 0:e.length)===0||e==="",Rb={eq:dr,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:Vb,notEmpty:e=>!Vb(e),in:(e,t)=>af(t,n=>dr(e,n)),notIn:(e,t)=>$b(t,n=>!dr(e,n))},dN=e=>{if(e in Rb)return Rb[e];throw new Error("Linq - Symbol not found")},Lo=(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},ka=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=dN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},hN=(e,t,n,r)=>ka(Lo,e,t,n,r),$b=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},pN=(e,t,n,r)=>ka($b,e,t,n,r),jb=e=>{if(e===null)return null;const t=lN({},e);return Object.keys(t).forEach(n=>t[n]=Fo(e[n])?jb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Bb=(e,t)=>{if(Fo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1},mN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},gN=e=>Lo(e,(t,n,r)=>Fo(t)?n===r.findIndex(o=>dr(o,t)):n===r.indexOf(t)),yN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Wb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},vN=(e,t)=>Wb(e,n=>n[t]),zb=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},bN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},wN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Oa(e)&&Oa(t)?r.map(i=>Number.parseInt(i)):r},lf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Oa(e)&&Oa(t)){const o=[],[s,i]=bN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return wN(e,t,r)},xN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?lf(r,o,1):lf(r,s,Number.parseInt(o,10))}return Lb(e)&&Lb(t)?lf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},cf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},Hb=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 s=t[n];t[n]=t[r],t[r]=s}return t},SN=(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)},TN=(e,t,n,r)=>ka(SN,e,t,n,r),Ub=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(fN(t))},EN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),CN=(e,t)=>e.sort(EN(t)),PN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Lo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},ON=class Bf{constructor(t=[]){this.array=t}static Range(...t){return xN(...t)}static New(t){return new Bf(t)}Where(t,n,r){return this.array=hN(this.array,t,n,r),this}Some(t,n,r){return cN(this.array,t,n,r)}All(t,n,r){return pN(this.array,t,n,r)}Reverse(){return this.array=Hb(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=TN(this.array,t,n,r),this}Distinct(){return this.array=gN(this.array),this}First(t){return t===void 0?this.array[0]:yN(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?cf((n,r)=>n+r,0,this.array):cf((n,r)=>n+uN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return vN(this.array,t)}GroupWith(t){return Wb(this.array,t)}Except(t){return Lo(this.array,n=>!Bb(t,n))}Intersect(t){return Lo(this.array,n=>Bb(t,n))}OrderBy(t,n){let r;return r=t?Ub(this.array,t):this.array.toSorted(),this.array=n==="desc"?Hb(r):r,this}Includes(t){return af(this.array,n=>dr(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 cf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(zb(this.array,n=>[t,n]))}Zip(t,n){return zb(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Lo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Bf(jb(this.array))}ToObject(t){return mN(this.array,t)}Sort(t){return Array.isArray(t)?CN(this.array,t):Ub(this.array,t)}Unique(t){return PN(this.array,t)}},Gb=ON;const Yb=e=>{const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t},_a=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),qb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),Kb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Zb=(e,t)=>{const n=qb(t,Kb.basic,e)||qb(t,Kb.extend,e);return n===void 0||n===e?void 0:n},uf=()=>typeof window>"u";var ff={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(b){window.console.log(b)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const b=v.getItem(y);try{return JSON.parse(b)}catch{return b??null}},s=y=>Object.keys(y).reduce((v,b)=>({...v,[b]:o(b,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},f=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],d={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=d.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,b={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=f.reduce((x,E)=>{const C=E.parse(b);return C===""?x:x.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const v=new Set,b=g=>{y().removeItem(g);const T=s(y());v.forEach(x=>x(T))};return{delete:b,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),b),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),v.forEach(x=>x(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=d,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(ff);const Xb=e=>e.headerLabel??e.thead??e.id,df=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Vo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Vo||{});const hf=e=>e.type==="number"?e.valueAsNumber:e.value,kN=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},_N={},AN=(e,t=_N)=>{const n=uf()?null:ff.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=tf({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return uf()||ff.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Nt={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},pf={[Vo.Text]:[Nt.is,Nt.isNot,Nt.contains,Nt.notContains,Nt.startsWith,Nt.endsWith],[Vo.Boolean]:[Nt.is,Nt.isNot],[Vo.Number]:[Nt.is,Nt.isNot,Nt.greaterThan,Nt.lessThan]},mf=(e,t={})=>{var i;const n=e.id,r=e.type??Vo.Text,o=(i=pf[r])==null?void 0:i[0].value,s=Nt[o];return{id:_a(),operation:s,label:Xb(e),name:n,type:r,value:"",...t}},IN=e=>{const t=()=>{const i=e.cols.at(0);e.set(a=>[...a,mf(i)])},n=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>{if(a!==u.id)return u;const f=e.cols.find(d=>l===d.id);return mf(f,{value:""})}))},r=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>u.id===a?{...u,operation:Nt[l]}:u))},o=i=>{const a=i.currentTarget.dataset.id||"";e.set(l=>l.filter(c=>c.id!==a))},s=i=>{const a=i.target.dataset.id||"",l=hf(i.target);e.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return S.jsx(w.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Filters",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(Zd,{size:14}),"Filtros ",e.filters.length===0?"":` (${e.filters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(i=>{const a=pf[i.type];return S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{title:"Filter",options:e.options,placeholder:"Name...",value:i.name,"data-id":i.id,onChange:n}),S.jsx(xr,{title:"Filter type","data-id":i.id,onChange:r,value:i.operation.value,options:a,placeholder:"Operator..."}),S.jsx(us,{"data-id":i.id,onChange:s,placeholder:"Search...",title:"Value",type:i.type,value:i.value}),S.jsx("div",{className:"flex items-center justify-center mt-5",children:S.jsx("button",{"data-id":i.id,type:"button",onClick:o,children:S.jsx(eo,{className:"text-danger",size:16})})})]},`filter-select-${i.id}`)}),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(El,{size:14})," New filter"]})})]})})})},DN=({filter:e,onDelete:t,set:n})=>{const r=s=>{const i=s.target.value,a=s.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Nt[i]}:c))},o=s=>{const i=s.target.dataset.id||"",a=hf(s.target);n(l=>l.map(c=>c.id===i?{...c,value:a}:c))};return S.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[S.jsx(xr,{onChange:r,options:pf[e.type],placeholder:"Operation...",title:"Filter type",value:e.operation.value}),S.jsx(us,{"data-id":e.id,onChange:o,placeholder:"Looking for...",title:"Value",type:e.type,value:e.value}),S.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:S.jsx(eo,{className:"text-danger",size:14})})]})},MN=({item:e,onPointerDown:t})=>{const n=Io(0);return S.jsxs(Pa.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[S.jsx("button",{type:"button",className:"cursor-grab",children:S.jsx(gx,{size:14})}),S.jsx("span",{children:e.groupName})]},e.groupId)},NN=e=>{var a;const t=df(e.cols),n=yM(),[r,o]=w.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new Gb(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(CT(h).map((y,v)=>{const b=h[y];return{...p,groupId:_a(),groupKey:u,index:v,rows:b,groupName:y}}))},i=()=>e.setGroups([]);return S.jsx(w.Fragment,{children:S.jsxs(Mo,{arrow:!1,title:"Groups",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(yx,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[S.jsxs("div",{className:"flex flex-nowrap items-center",children:[S.jsx(xr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),S.jsx(ps,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:S.jsx(eo,{size:16,className:"text-danger"})})]}),e.groups.length>0?S.jsxs("section",{className:"my-4",children:[S.jsx("header",{children:S.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),S.jsx(nM,{children:S.jsx(Pa.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>S.jsx(MN,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},FN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return console.log({acc:r,p:a,a:t,b:n,property:i}),r!==0?r:a},0),LN=(e,t)=>e.sort(FN(t)),gf={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},VN=[gf.asc,gf.desc],yf=(e,t="asc")=>({id:_a(),type:t,value:e.id,label:gf.asc.label}),RN=e=>{const t=()=>{const s=e.cols[0];s&&e.set(i=>[...i,yf(s)])},n=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,value:a}:c))},r=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,type:a}:c))},o=s=>{const i=s.currentTarget.dataset.id||"";e.set(a=>a.filter(l=>l.id!==i))};return S.jsx(w.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Order By",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[S.jsx(qd,{size:14}),"Order by ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(s=>S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{onChange:n(s.id),options:e.options,title:"Field",placeholder:"Selecione um campo...",value:s.value}),S.jsx(xr,{title:"Sort type",onChange:r(s.id),value:s.type,options:VN,placeholder:"Operação..."}),S.jsx("button",{className:"mt-4","data-id":s.id,onClick:o,children:S.jsx(eo,{className:"text-danger",size:14})})]},`sorter-select-${s.id}`)),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(El,{size:14})," Add sort"]})})]})})})},$N=e=>{const t=e.sorters.find(s=>s.id===e.col.id),[n,r]=w.useState(t?t.type:"undefined"),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");return w.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(a=>a.value!==e.col.id);const i=s.findIndex(a=>a.value===e.col.id);return i===-1?[...s,yf(e.col,n)]:(s[i]=yf(e.col,n),[...s])})},[n,e.col]),S.jsxs("button",{className:"isolate flex items-center",onClick:o,type:"button",children:[n==="asc"?S.jsx(Tl,{size:14}):null,n==="desc"?S.jsx(dx,{size:14}):null,n==="undefined"?S.jsx(qd,{size:14}):null]})},jN=e=>S.jsx("header",{className:"min-w-full mb-1",children:S.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[S.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[S.jsx("span",{children:S.jsx(IN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),S.jsx("span",{children:S.jsx(RN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),S.jsx("span",{children:S.jsx(NN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),S.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=>S.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[S.jsxs("span",{children:[S.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),S.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[S.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),S.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=hf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})}),BN={opacity:1},WN={opacity:.75,backgroundColor:"var(--table-border)"},zN={opacity:0,transition:{duration:.4,type:"spring"}},HN=e=>{var r;const t=e.filters.filter(o=>o.name===e.header.id),n=o=>{const s=o.currentTarget.dataset.id||"";return e.setFilters(i=>i.filter(a=>a.id!==s))};return S.jsx(Pa.Item,{...e.header.thProps,as:"th",exit:zN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:e.header,whileDrag:WN,animate:BN,className:`hidden font-medium text-secondary px-2 py-4 first:table-cell md:table-cell ${((r=e.header.thProps)==null?void 0:r.className)??""}`,children:S.jsx("span",{className:"flex items-center justify-between",children:S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(Mo,{title:`Filter by ${Xb(e.header)}`,arrow:!0,trigger:S.jsx(Zd,{size:14}),children:t.length===0===null?null:S.jsxs("ul",{className:"font-medium",children:[t.map(o=>S.jsx("li",{className:"my-1",children:S.jsx(DN,{onDelete:n,filter:o,set:e.setFilters})},`thead-filter-${o.id}`)),S.jsx("li",{children:S.jsxs("button",{onClick:()=>e.setFilters(o=>o.concat(mf(e.header))),className:"flex items-center",children:[S.jsx(El,{size:14})," Add"]})})]})}),S.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),S.jsx($N,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},UN=e=>S.jsx(Pa.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:S.jsx(Ca,{children:e.headers.map(t=>S.jsx(HN,{setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),GN=w.forwardRef((e,t)=>S.jsx("tbody",{...e,className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:S.jsx(Ca,{children:e.children})})),YN=w.forwardRef((e,t)=>S.jsx("table",{...e,ref:t,className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),qN=w.forwardRef((e,t)=>S.jsx("thead",{...e,className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),KN=w.forwardRef((e,t)=>S.jsx("tr",{...e,ref:t,className:`table-row ${e.className??""}`})),ZN=w.forwardRef((e,t)=>e.context.loadingMore?S.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:S.jsx("tr",{className:"bg-card-background",children:S.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:S.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),XN={TableHead:qN,Table:YN,TableBody:GN,TableRow:KN,TableFoot:ZN},QN=[0,0,0,0,0,0,0,0,0,0],JN=(e,t,n)=>{const r=n.cols,o=n.loading;return S.jsx(w.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=Zb(t,s.id),c=s.Element;return w.createElement("td",{...s.cellProps,"data-matrix":a,key:`accessor-${e}-${i}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?S.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?S.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):S.jsx(w.Fragment,{children:kn.nil(l)?"":l}))})})},eF=()=>S.jsx(w.Fragment,{}),tF=e=>{const t=e.asLink||"button",n=Math.ceil(e.totalItems/e.size),r=w.useMemo(()=>{const o=Ii(1,e.current-2,n),s=Ii(1,e.current+2,n),i=[1,o-1===1||o===1?null:-1,o,Ii(1,e.current-1,n),e.current,Ii(1,e.current+1,n),s,s+1===n||s===n?null:-n,n];return Array.from(new Set(i))},[]);return S.jsxs("footer",{className:"flex px-1 py-2 items-center justify-between flex-nowrap",children:[S.jsxs("p",{children:["Page ",e.current," of ",e.pages,". Total: ",e.totalItems," items"]}),S.jsx("nav",{children:S.jsxs("ul",{className:"flex items-center",children:[e.hasPrevious?S.jsx("li",{children:S.jsx(t,{href:"previous",className:"",children:"Previous"})}):null,r.map(o=>o===null?null:S.jsx(w.Fragment,{children:o===-1?S.jsx("li",{children:"..."}):o===-n?S.jsx("li",{children:"..."}):S.jsx("li",{className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${o===e.current?"text-primary border-primary":"border-transparent"}`,children:S.jsx(t,{href:o,className:"",children:o})},`pagination-${o}`)})),e.hasNext?S.jsx("li",{children:S.jsx(t,{href:"next",className:"",children:"Next"})}):null]})})]})},Qb=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,setSorters:l,...c})=>{const u=w.useRef(null),[f,d]=w.useState(!1),h=Yb(n),p=Yb(c.loadingMore),m=w.useMemo(()=>{if(c.loading)return QN;if(r)return c.rows;const y=new Gb(c.rows);return e.length>0&&e.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:y.Where(v.name,v.operation.symbol,v.value)),i.length===0?y.Select():LN(y.Select(),i)},[c.rows,e,i,c.loading]);return w.useEffect(()=>{if(u.current===null)return()=>{};const y=u.current,v=new IntersectionObserver(b=>{var x;return b.forEach(E=>console.log(E.isIntersecting,E.target)),b[b.length-1].isIntersecting&&p.current?((x=h.current)==null||x.call(h),void d(!0)):d(!1)});return v.observe(y),()=>v.disconnect()},[]),S.jsxs("div",{className:"min-w-full",children:[S.jsxs("div",{className:"group border border-table-border rounded-lg px-1",children:[S.jsx(TP,{data:m,useWindowScroll:!0,components:XN,totalCount:m.length,itemContent:JN,context:{loading:c.loading,loadingMore:c.loadingMore,cols:a},fixedFooterContent:f?eF:null,fixedHeaderContent:()=>S.jsx(UN,{sorters:i,setSorters:l,filters:e,setFilters:s,headers:a,setCols:o})}),S.jsx("div",{"aria-hidden":"true",ref:u,className:"h-0.5 w-full"})]}),t!==null?S.jsx(tF,{...t}):null]})},nF=(e,t)=>typeof t=="function"?t(e):t,rF=e=>{const t=e.operations??!0,n=w.useMemo(()=>df(e.cols),[e.cols]),[r,o]=tf({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:nF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return S.jsxs("div",{className:"relative min-w-full",children:[t?S.jsx(jN,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?S.jsx(Qb,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):S.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((s,i)=>S.jsx(Jt.div,{className:"min-w-full",children:S.jsx(Qb,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})};var oF=String.prototype.replace,sF=/%20/g,vf={RFC1738:"RFC1738",RFC3986:"RFC3986"},bf={default:vf.RFC3986,formatters:{RFC1738:function(e){return oF.call(e,sF,"+")},RFC3986:function(e){return String(e)}},RFC1738:vf.RFC1738,RFC3986:vf.RFC3986},iF=bf,wf=Object.prototype.hasOwnProperty,Fr=Array.isArray,Tn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),aF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Fr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Jb=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},lF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Fr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!wf.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Fr(t)&&!Fr(n)&&(o=Jb(t,r)),Fr(t)&&Fr(n)?(n.forEach(function(s,i){if(wf.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return wf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},cF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},uF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},xf=1024,fF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=xf){for(var c=i.length>=xf?i.slice(l,l+xf):i,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===iF.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=Tn[d];continue}if(d<2048){u[u.length]=Tn[192|d>>6]+Tn[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Tn[224|d>>12]+Tn[128|d>>6&63]+Tn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Tn[240|d>>18]+Tn[128|d>>12&63]+Tn[128|d>>6&63]+Tn[128|d&63]}a+=u.join("")}return a},dF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return aF(n),t},hF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},pF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},mF=function(t,n){return[].concat(t,n)},gF=function(t,n){if(Fr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},e0={arrayToObject:Jb,assign:cF,combine:mF,compact:dF,decode:uF,encode:fF,isBuffer:pF,isRegExp:hF,maybeMap:gF,merge:lF},t0=oT,Aa=e0,Hs=bf,yF=Object.prototype.hasOwnProperty,n0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,vF=Array.prototype.push,r0=function(e,t){vF.apply(e,En(t)?t:[t])},bF=Date.prototype.toISOString,o0=Hs.default,ht={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Aa.encode,encodeValuesOnly:!1,format:o0,formatter:Hs.formatters[o0],indices:!1,serializeDate:function(t){return bF.call(t)},skipNulls:!1,strictNullHandling:!1},wF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Sf={},xF=function e(t,n,r,o,s,i,a,l,c,u,f,d,h,p,m,y,v,b){for(var g=t,T=b,x=0,E=!1;(T=T.get(Sf))!==void 0&&!E;){var C=T.get(t);if(x+=1,typeof C<"u"){if(C===x)throw new RangeError("Cyclic object value");E=!0}typeof T.get(Sf)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=Aa.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,ht.encoder,v,"key",p):n;g=""}if(wF(g)||Aa.isBuffer(g)){if(c){var O=y?n:c(n,ht.encoder,v,"key",p);return[m(O)+"="+m(c(g,ht.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var N;if(r==="comma"&&En(g))y&&c&&(g=Aa.maybeMap(g,c)),N=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))N=u;else{var L=Object.keys(g);N=f?L.sort(f):L}var _=l?n.replace(/\./g,"%2E"):n,j=o&&En(g)&&g.length===1?_+"[]":_;if(s&&En(g)&&g.length===0)return j+"[]";for(var D=0;D<N.length;++D){var k=N[D],F=typeof k=="object"&&typeof k.value<"u"?k.value:g[k];if(!(a&&F===null)){var R=d&&l?k.replace(/\./g,"%2E"):k,W=En(g)?typeof r=="function"?r(j,R):j:j+(d?"."+R:"["+R+"]");b.set(t,x);var q=t0();q.set(Sf,b),r0(I,e(F,W,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,f,d,h,p,m,y,v,q))}}return I},SF=function(t){if(!t)return ht;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||ht.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Hs.default;if(typeof t.format<"u"){if(!yF.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=ht.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in n0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ht.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:ht.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ht.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ht.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ht.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ht.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ht.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ht.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ht.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ht.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ht.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ht.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ht.strictNullHandling}},TF=function(e,t){var n=e,r=SF(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=n0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=t0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||r0(i,xF(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},Ro=e0,Tf=Object.prototype.hasOwnProperty,EF=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ro.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},CF=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},s0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},PF="utf8=%26%2310003%3B",OF="utf8=%E2%9C%93",kF=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===OF?c="utf-8":i[l]===PF&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,ct.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),ct.decoder,c,"key"),p=Ro.maybeMap(s0(u.slice(d+1),n),function(y){return n.decoder(y,ct.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=CF(p)),u.indexOf("[]=")>-1&&(p=EF(p)?[p]:p);var m=Tf.call(r,h);m&&n.duplicates==="combine"?r[h]=Ro.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},_F=function(e,t,n,r){for(var o=r?t:s0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},AF=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Tf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Tf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),_F(u,n,r,o)}},IF=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ct.charset:t.charset,r=typeof t.duplicates>"u"?ct.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ct.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ct.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ct.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ct.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ct.decoder,delimiter:typeof t.delimiter=="string"||Ro.isRegExp(t.delimiter)?t.delimiter:ct.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ct.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ct.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ct.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},DF=function(e,t){var n=IF(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?kF(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=AF(a,r[a],n,typeof e=="string");o=Ro.merge(o,l,n)}return n.allowSparse===!0?o:Ro.compact(o)},MF=TF,NF=DF,FF=bf,LF={formats:FF,parse:NF,stringify:MF},Pe;(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 s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var i0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(i0||(i0={}));const te=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lr=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(e)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},G=Pe.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 en extends Error{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}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.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()}}en.create=e=>new en(e);const Us=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.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}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.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 G.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 G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let VF=Us;function Ef(){return VF}const Cf=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function J(e,t){const n=Ef(),r=Cf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(o=>!!o)});e.common.issues.push(r)}class Ft{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 me;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 s=await o.key,i=await o.value;r.push({key:s,value:i})}return Ft.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),Wt=e=>({status:"valid",value:e}),a0=e=>e.status==="aborted",l0=e=>e.status==="dirty",Ia=e=>e.status==="valid",Da=e=>typeof Promise<"u"&&e instanceof Promise;function Ma(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function c0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!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 ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));var Ys,qs;class Cn{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 u0=(e,t)=>{if(Ia(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 en(e.common.issues);return this._error=n,this._error}}};function ye(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:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{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)}get description(){return this._def.description}_getType(t){return Lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Da(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:Lr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return u0(o,s)}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:Lr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Da(o)?o:Promise.resolve(o));return u0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Rn({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return $n.create(this,this._def)}nullable(){return $r.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return Xs.create(this,this._def)}or(t){return La.create([this,t],this._def)}and(t){return Va.create(this,t,this._def)}transform(t){return new Rn({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Wa({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new p0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new za({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ha.create(this,t)}readonly(){return Ua.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const RF=/^c[^\s-]{8,}$/i,$F=/^[0-9a-z]+$/,jF=/^[0-9A-HJKMNP-TV-Z]{26}$/,BF=/^[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,WF=/^[a-z0-9_-]{21}$/i,zF=/^[-+]?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)?)??$/,HF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,UF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Pf;const GF=/^(?:(?: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])$/,YF=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,f0="((\\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])))",KF=new RegExp(`^${f0}$`);function d0(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 ZF(e){return new RegExp(`^${d0(e)}$`)}function XF(e){let t=`${f0}T${d0(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 QF(e,t){return!!((t==="v4"||!t)&&GF.test(e)||(t==="v6"||!t)&&YF.test(e))}class Fn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.string,received:s.parsedType}),me}const r=new Ft;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")HF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"email",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Pf||(Pf=new RegExp(UF,"u")),Pf.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"emoji",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")BF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"uuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")WF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"nanoid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")RF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")$F.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid2",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")jF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ulid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),J(o,{validation:"url",code:G.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"regex",code:G.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?XF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?KF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?ZF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?zF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"duration",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?QF(t.data,s.version)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ip",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?qF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"base64",code:G.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:G.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.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,...ae.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,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}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}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function JF(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Vr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.number,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?JF(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.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"&&Pe.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)}}Vr.create=e=>new Vr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class $o extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==te.bigint){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.bigint,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new $o({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new $o({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.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}}$o.create=e=>{var t;return new $o({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Of extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),me}return Wt(t.data)}}Of.create=e=>new Of({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ks extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_date}),me}const r=new Ft;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.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}}Ks.create=e=>new Ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class kf extends xe{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),me}return Wt(t.data)}}kf.create=e=>new kf({typeName:he.ZodSymbol,...ye(e)});class Na extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),me}return Wt(t.data)}}Na.create=e=>new Na({typeName:he.ZodUndefined,...ye(e)});class Fa extends xe{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),me}return Wt(t.data)}}Fa.create=e=>new Fa({typeName:he.ZodNull,...ye(e)});class _f extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Wt(t.data)}}_f.create=e=>new _f({typeName:he.ZodAny,...ye(e)});class jo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Wt(t.data)}}jo.create=e=>new jo({typeName:he.ZodUnknown,...ye(e)});class hr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),me}}hr.create=e=>new hr({typeName:he.ZodNever,...ye(e)});class Af extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),me}return Wt(t.data)}}Af.create=e=>new Af({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==te.array)return J(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(J(n,{code:i?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?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&&(J(n,{code:G.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&&(J(n,{code:G.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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Ft.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Ft.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Bo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$n.create(Bo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Bo(e.element)}):e instanceof $n?$n.create(Bo(e.unwrap())):e instanceof $r?$r.create(Bo(e.unwrap())):e instanceof Vn?Vn.create(e.items.map(t=>Bo(t))):e}class nt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==te.object){const c=this._getOrReturnCtx(t);return J(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof hr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof hr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(J(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>Ft.mergeObjectSync(r,c)):Ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Bo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $n;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return h0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)});class La extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new en(a.ctx.common.issues));return J(n,{code:G.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];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"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new en(l));return J(n,{code:G.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}La.create=(e,t)=>new La({options:e,typeName:he.ZodUnion,...ye(t)});const Ln=e=>e instanceof $a?Ln(e.schema):e instanceof Rn?Ln(e.innerType()):e instanceof ja?[e.value]:e instanceof Rr?e.options:e instanceof Ba?Pe.objectValues(e.enum):e instanceof Wa?Ln(e._def.innerType):e instanceof Na?[void 0]:e instanceof Fa?[null]:e instanceof $n?[void 0,...Ln(e.unwrap())]:e instanceof $r?[null,...Ln(e.unwrap())]:e instanceof p0||e instanceof Ua?Ln(e.unwrap()):e instanceof za?Ln(e._def.innerType):[];class If extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.object)return J(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}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 s of n){const i=Ln(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new If({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function Df(e,t){const n=Lr(e),r=Lr(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Df(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Df(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Va extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(a0(s)||a0(i))return me;const a=Df(s.value,i.value);return a.valid?((l0(s)||l0(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:G.invalid_intersection_types}),me)};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(([s,i])=>o(s,i)):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}))}}Va.create=(e,t,n)=>new Va({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Vn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return J(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return J(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Ft.mergeArray(n,i)):Ft.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Vn({...this._def,rest:t})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Ra extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.object)return J(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ft.mergeObjectAsync(n,o):Ft.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Ra({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Ra({keyType:Fn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Mf extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return J(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Mf.create=(e,t,n)=>new Mf({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class Wo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return J(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(J(r,{code:G.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&&(J(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Wo({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new Wo({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Wo.create=(e,t)=>new Wo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class Zs extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.function)return J(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),me;function r(a,l){return Cf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ef(),Us].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Cf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ef(),Us].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Xs){const a=this;return Wt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return Wt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new en([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zs({...this._def,args:Vn.create(t).rest(jo.create())})}returns(t){return new Zs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zs({args:t||Vn.create([]).rest(jo.create()),returns:n||jo.create(),typeName:he.ZodFunction,...ye(r)})}}class $a extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$a.create=(e,t)=>new $a({getter:e,typeName:he.ZodLazy,...ye(t)});class ja extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}ja.create=(e,t)=>new ja({value:e,typeName:he.ZodLiteral,...ye(t)});function h0(e,t){return new Rr({values:e,typeName:he.ZodEnum,...ye(t)})}class Rr extends xe{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Pe.joinValues(r),received:n.parsedType,code:G.invalid_type}),me}if(Ma(this,Ys)||c0(this,Ys,new Set(this._def.values)),!Ma(this,Ys).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:G.invalid_enum_value,options:r}),me}return Wt(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 Rr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Rr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ys=new WeakMap,Rr.create=h0;class Ba extends xe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Pe.objectValues(n);return J(r,{expected:Pe.joinValues(o),received:r.parsedType,code:G.invalid_type}),me}if(Ma(this,qs)||c0(this,qs,new Set(Pe.getValidEnumValues(this._def.values))),!Ma(this,qs).has(t.data)){const o=Pe.objectValues(n);return J(r,{received:r.data,code:G.invalid_enum_value,options:o}),me}return Wt(t.data)}get enum(){return this._def.values}}qs=new WeakMap,Ba.create=(e,t)=>new Ba({values:e,typeName:he.ZodNativeEnum,...ye(t)});class Xs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return J(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),me;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return Wt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xs.create=(e,t)=>new Xs({type:e,typeName:he.ZodPromise,...ye(t)});class Rn extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Gs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Gs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ia(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Ia(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}Rn.create=(e,t,n)=>new Rn({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),Rn.createWithPreprocess=(e,t,n)=>new Rn({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class $n extends xe{_parse(t){return this._getType(t)===te.undefined?Wt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:he.ZodOptional,...ye(t)});class $r extends xe{_parse(t){return this._getType(t)===te.null?Wt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$r.create=(e,t)=>new $r({innerType:e,typeName:he.ZodNullable,...ye(t)});class Wa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Wa.create=(e,t)=>new Wa({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Da(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Nf extends xe{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Nf.create=e=>new Nf({typeName:he.ZodNaN,...ye(e)});class p0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ha extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Gs(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me: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 Ha({in:t,out:n,typeName:he.ZodPipeline})}}class Ua extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Ia(o)&&(o.value=Object.freeze(o.value)),o);return Da(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ua.create=(e,t)=>new Ua({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.lazycreate;var he;(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"})(he||(he={})),Fn.create,Vr.create,Nf.create,$o.create,Of.create,Ks.create,kf.create,Na.create,Fa.create,_f.create,jo.create,hr.create,Af.create,ln.create,nt.create,nt.strictCreate,La.create,If.create,Va.create,Vn.create,Ra.create,Mf.create,Wo.create,Zs.create,$a.create,ja.create,Rr.create,Ba.create,Xs.create,Rn.create,$n.create,$r.create,Rn.createWithPreprocess,Ha.create;const eL={sort:(e,t)=>e.localeCompare(t),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},m0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return LF.parse(n.toString(),eL)},g0=e=>e.replace("[",".").replace("]","").split("."),Ff=(e,t)=>g0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Ga=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,tL=e=>{const[t,n]=w.useState(null),r=w.useRef({}),o=(l,c)=>{const u=Ff(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},s=(l,c)=>{const u=Ff(l,e);return{...c,name:l,id:l,type:kn.instance(u,Vr)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};w.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(Ga(u.element)),d=p=>{const m=u.schema.safeParse(Ga(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(b=>{const{[v]:g,...T}=b||{};return T===null||kn.empty(T)?null:T});if(y.required){const b=m.error.issues[0].message;y.setCustomValidity(b),n(g=>({...g,[v]:b}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Ga(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=kn.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=w.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=m0(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=Hh(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=Hh(f,h.name,Ga(h))}}),l({form:u,json:f,event:c,reset:()=>Qp(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},nL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"50%"},colors:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 9%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 20%, 80%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},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:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},rL={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 20%, 40%)",subtle:"hsla(210, 27%, 95%)",hover:"hsla(210, 21%, 27%)",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%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},oL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Qs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Qs(i,t,n,a))},[]),y0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:y0(i,t,n,a)}},{}),v0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Lf=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},sL={default:e=>Lf(e,{result:v0.default}),dark:e=>Lf(e,{result:v0.dark})},iL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Qs(e.colors,n),o=Qs(e.spacing,n),s=Qs(e.rounded,n);return Lf(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};re.Autocomplete=u1,re.Button=ps,re.ButtonGroup=LE,re.Calendar=Cb,re.Card=kb,re.Checkbox=Um,re.ColType=Vo,re.DatePicker=$M,re.Dropdown=Mo,re.FileUpload=WE,re.Form=HE,re.Input=us,re.InputFeedback=Qh,re.InputField=Mi,re.Modal=oN,re.Option=Jh,re.Polymorph=hs,re.Select=xr,re.Stats=WM,re.Switch=UE,re.Tab=UM,re.Table=rF,re.Tabs=zM,re.Tag=BM,re.Tooltip=GM,re.TransferList=PP,re.convertPath=g0,re.createColumns=kN,re.createDesignTokens=y0,re.createOptionCols=df,re.createStyles=sL,re.createTheme=iL,re.css=Rt,re.defaultDarkTheme=nL,re.defaultLightTheme=rL,re.dispatchInput=Jl,re.formReset=Qp,re.formToJson=m0,re.getSchemaShape=Ff,re.isReactComponent=s1,re.isReactFC=i1,re.isSsr=uf,re.mergeRefs=Ql,re.parsers=oL,re.path=Zb,re.reduceTokens=Qs,re.useForm=tL,re.usePrevious=Xd,re.useReactive=_b,re.useTablePreferences=AN,re.uuid=_a,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
170
|
+
*/var pb;function wM(){return pb||(pb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=b,t=fb();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,d,h,p){var m=s(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=a(function(){var x=!1,E,C,O=function(_){if(!x){x=!0,E=_;var j=h(_);if(p!==void 0&&y.hasValue){var D=y.value;if(p(D,j))return C=D,D}return C=j,j}var k=E,F=C;if(r(k,_))return F;var $=h(_);return p!==void 0&&p(F,$)?F:(E=_,C=$,$)},I=d===void 0?null:d,N=function(){return O(f())},L=I===null?void 0:function(){return O(I())};return[N,L]},[f,d,h,p]),w=v[0],g=v[1],T=o(u,w,g);return i(function(){y.hasValue=!0,y.value=T},[T]),l(T),T}hb.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),hb}process.env.NODE_ENV==="production"?bM():wM();const Do=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},xM=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},SM=e=>Object.entries(e),mb=e=>e instanceof Promise,gb=(e,t,n,r)=>t===e?n.reduce((o,s)=>s(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,s)=>s(o,t,r),{...t,...e}):n.reduce((o,s)=>s(o,t,r),e),TM=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,f)=>n(d=>gb(u,d,s,f));return mb(l)?l.then(u=>{o.current={method:e,props:r(),time:performance.now()-a},c(u,o.current)}):(o.current={method:e,props:r(),time:performance.now()-a},void c(l,o.current))},EM=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>gb(c,u,s,o.current));return mb(a)?a.then(c=>l(c)):l(a)},ef=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=Do(r),i=Do((n==null?void 0:n.props)??{}),a=Do(t),l=Do((n==null?void 0:n.postMiddleware)??[]),c=Do((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=xM(r),d=Do(f),h=b.useRef(null);b.useEffect(()=>{if(h.current===null)return;const m=h.current;l.current.forEach(y=>{y(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>i.current,y=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>d.current});return SM(y).reduce((v,[w,g])=>({...v,[w]:n!=null&&n.debug?TM(w,g,o,m,h,c.current):EM(w,g,o,m,h,c.current)}),{})});return[r,p,i.current]},CM=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function PM(e,t){return b.useRef(CM(e,t)).current}function tf(e,t,n){var r,o,s,i,a;t==null&&(t=100);function l(){var u=Date.now()-i;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(a=e.apply(s,o),s=o=null))}var c=function(){s=this,o=arguments,i=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(a=e.apply(s,o),s=o=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(s,o),s=o=null,clearTimeout(r),r=null)},c}tf.debounce=tf;var OM=tf;const yb=Jd(OM);function kM(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1};const s=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=b.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=b.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=b.useRef(!1);b.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,h,p]=b.useMemo(()=>{const w=()=>{if(!l.current.element)return;const{left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N}=l.current.element.getBoundingClientRect(),L={left:g,top:T,width:x,height:E,bottom:C,right:O,x:I,y:N};l.current.element instanceof HTMLElement&&o&&(L.height=l.current.element.offsetHeight,L.width=l.current.element.offsetWidth),Object.freeze(L),f.current&&!DM(l.current.lastBounds,L)&&a(l.current.lastBounds=L)};return[w,u?yb(w,u):w,c?yb(w,c):w]},[a,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",p,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function y(){l.current.element&&(l.current.resizeObserver=new s(p),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",p,{capture:!0,passive:!0})))}const v=w=>{!w||w===l.current.element||(m(),l.current.element=w,l.current.scrollContainers=vb(w),y())};return AM(p,!!n),_M(h),b.useEffect(()=>{m(),y()},[n,p,h]),b.useEffect(()=>m,[]),[v,i,d]}function _M(e){b.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function AM(e,t){b.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function vb(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(s=>s==="auto"||s==="scroll")&&t.push(e),[...t,...vb(e.parentElement)]}const IM=["x","y","top","bottom","left","right","width","height"],DM=(e,t)=>IM.every(n=>e[n]===t[n]),MM=({children:e})=>{const[t,n]=kM();return S.jsx(Jt.div,{animate:{height:n.height>0?n.height:"auto"},children:S.jsx("div",{ref:t,children:e})})},NM={type:"spring",bounce:.1,duration:.3},bb=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.5}),wb={middle:{x:"0%",opacity:1},enter:bb(1),exit:bb(-1)},xb={exit:{visibility:"hidden"}},FM=e=>{const t=vn(Zm(e));return Km({start:t,end:yo(t,41)})},Sb=(e,t)=>e.toLocaleDateString(t,{month:"long"}),LM=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=Zm(new Date(e).setMonth(r)),s=Sb(o,t);return S.jsx("option",{value:s,"data-index":r,children:s},s)}),nf={ArrowLeft:(e,t)=>t==="days"?kk(e,1):fg(e,1),ArrowRight:(e,t)=>t==="days"?yo(e,1):Ji(e,1),ArrowUp:(e,t)=>t==="days"?_k(e,1):Ak(e,1),ArrowDown:(e,t)=>t==="days"?Ym(e,1):qm(e,1)},Tb=(e,t=0)=>{const n=e.toISOString(),r=()=>{const o=document.querySelector(`button[data-date="${n}"]`);if(o)return o.focus({preventScroll:!1})};t===0&&r(),setTimeout(r,t)},Nr=e=>e.getFullYear().toString().padStart(4,"0"),Eb=({locale:e,disabledDate:t,markToday:n=!0,autoFocusToday:r=!0,date:o,onChange:s})=>{const i=o||new Date,[a,l]=ef({date:i,isAnimating:!1,year:Nr(i),direction:void 0,months:LM(i,e),week:Km({start:vn(i),end:$P(i)})},p=>({onChangeYear:m=>({year:m}),setToday:()=>({date:bo(new Date)}),onExitComplete:()=>(Tb(p.state().date,200),{isAnimating:!1}),date:m=>{const y=m(p.state().date);return{date:y,year:Nr(y)}},nextMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=Ji(m.date,1);return{date:y,isAnimating:!0,direction:1,year:Nr(y)}},previousMonth:()=>{const m=p.state();if(m.isAnimating)return m;const y=fg(m.date,1);return{date:y,isAnimating:!0,direction:-1,year:Nr(y)}},onSelectDate:m=>{const y=m.currentTarget.dataset.date||"",v=new Date(y);return{date:v,year:Nr(v)}},onChangeMonth:m=>{const y=m.target.value,w=Array.from(m.target.options).find(g=>g.value===y);if(w){const g=w.dataset.index||"",T=new Date(p.state().date);return T.setMonth(+g),{date:T,year:Nr(T)}}return p.state()},onKeyDown:m=>{const y=m.key;if(y in nf){(y==="ArrowUp"||y==="ArrowDown")&&m.preventDefault();const v=p.state().date,w=kn.keyof(nf,y)?nf[y](v,m.shiftKey?"month":"days"):null;if(w!==null)return Tb(w),{date:w,year:Nr(w)}}return p.state()}})),c=FM(a.date),u=a.date.toISOString(),f=Sb(a.date,e);b.useEffect(()=>s==null?void 0:s(a.date),[u]);const d=PM(p=>{l.date(m=>{const y=new Date(m);return y.setFullYear(+p),y})},700),h=p=>{const m=p.currentTarget.value;l.onChangeYear(m),d(m)};return S.jsx(XD,{transition:NM,children:S.jsxs("div",{className:"relative overflow-hidden",children:[S.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:S.jsx(MM,{children:S.jsx(Ea,{presenceAffectsLayout:!0,mode:"popLayout",initial:!1,custom:a.direction,onExitComplete:l.onExitComplete,children:S.jsxs(Jt.div,{initial:"enter",animate:"middle",exit:"exit",children:[S.jsxs("header",{className:"relative flex justify-between",children:[S.jsx(Jt.button,{onClick:l.previousMonth,variants:xb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",children:S.jsx(ux,{className:"h-4 w-4"})}),S.jsx(Jt.span,{variants:wb,custom:a.direction,className:"absolute z-normal isolate inset-0 flex items-center justify-center font-semibold",children:S.jsxs("span",{className:"w-fit flex items-center justify-center gap-0.5 py-1",children:[S.jsx("select",{style:{width:`${f.length}ch`},value:f,onChange:l.onChangeMonth,className:"appearance-none capitalize bg-transparent proportional-nums hover:text-primary cursor-pointer w-fit",children:a.months}),S.jsx(fp,{mask:"int",value:a.year,maxLength:4,placeholder:"YYYY",onChange:h,style:{width:`${a.year.length}ch`},className:"w-16 bg-transparent appearance-none hover:text-primary cursor-pointer"})]})}),S.jsx(Jt.button,{variants:xb,className:"z-calendar rounded-full p-1.5 hover:bg-primary-subtle",onClick:l.nextMonth,children:S.jsx(qd,{className:"h-4 w-4"})}),S.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%)"}})]}),S.jsx("div",{className:"mt-4 grid grid-cols-7 gap-y-4",children:a.week.map(p=>S.jsx("span",{className:"font-medium capitalize text-sm",children:p.toLocaleDateString(e,{weekday:"short"})},p.toString()))}),S.jsx(Jt.ul,{onKeyDown:l.onKeyDown,variants:wb,custom:a.direction,className:"mt-4 pb-2 grid grid-cols-7 gap-y-4",children:c.map(p=>{const m=p.toISOString(),y=m===u,v=Ok(p)&&n,w=(t==null?void 0:t(p))||!1,g=!Pk(p,a.date)||w;return S.jsx("li",{className:"w-full flex items-center justify-center",children:S.jsx("button",{type:"button","data-date":m,disabled:w,onClick:l.onSelectDate,"data-view":a.date.getMonth().toString(),className:`size-8 disabled:cursor-not-allowed rounded-full font-semibold flex items-center justify-center proportional-nums ${v?"text-primary":""} ${g?"text-disabled":""} ${y?"bg-primary text-primary-foreground":""}`,children:p.getDate()})},m)})})]},f)})})}),S.jsx("footer",{className:"text-center text-primary mt-2",children:S.jsx("button",{className:"hover:scale-105 transition-transform duration-300",type:"button",onClick:l.setToday,children:"Today"})})]})})},Mo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[fl(10),gd({fallbackAxisSideDirection:"end"}),md(),yd({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=vi({open:n,middleware:s,transform:!0,whileElementsMounted:ul,onOpenChange:(p,m)=>{var v;const y=m==null?void 0:m.relatedTarget;y&&y.dataset.floating==="true"&&!p||(r(p),(v=e.onChange)==null||v.call(e,p))}}),c=$d(l),u=yi(l),f=xi(l),{getReferenceProps:d,getFloatingProps:h}=bi([c,u,f]);return S.jsxs(b.Fragment,{children:[S.jsx("button",{ref:i.setReference,...d(),type:"button",children:e.trigger}),n&&S.jsx(gi,{id:`${t}-portal`,children:S.jsx(vl,{returnFocus:!0,visuallyHiddenDismiss:!0,restoreFocus:!0,context:l,modal:!1,children:S.jsxs("div",{className:"bg-floating-background relative min-w-96 isolate z-floating border shadow-2xl p-6 border-floating-border rounded-lg",ref:i.setFloating,style:a,"aria-labelledby":t,...h(),children:[S.jsx(Td,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),S.jsx("header",{className:"mb-2",children:S.jsx("h3",{className:"leading-snug font-medium text-2xl tracking-wide text-left",children:e.title})}),e.children]})})})]})},Cb=new Date(1970,11,31),rf={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Pb={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},VM={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")},$M=({date:e,locale:t,disabledDate:n,autoFocusToday:r,onChange:o,markToday:s,...i})=>{const a=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[l,c]=b.useState(e||void 0),[u,f]=b.useState(!1),d=a.formatToParts(Cb).flatMap(w=>kn.keyof(rf,w.type)?rf[w.type](w.value):[]),h=a.formatToParts(Cb).reduce((w,g)=>w+(kn.keyof(Pb,g.type)?Pb[g.type](g.value):""),""),[p,m]=b.useState(l?a.formatToParts(l).reduce((w,g)=>w+(kn.keyof(rf,g.type)?VM[g.type](l,g.value):""),""):""),y=w=>{const g=w.target.value;if(m(g),d.length===g.length&&d.every((x,E)=>{const C=g.charAt(E);return typeof x=="string"?C===x:x.test(C)})){const x=bo(Ek(g,h,new Date));c(x),o==null||o(x)}},v=w=>{c(w),o==null||o(w),m(OO(w,h))};return S.jsx(us,{...i,mask:d,value:p,onChange:y,className:"uppercase",formNoValidate:!u,placeholder:h,required:i.required??!0,error:u?void 0:i.error,name:i.name?`${i.name}-picker`:i.name,right:S.jsxs(b.Fragment,{children:[S.jsx("input",{defaultValue:l==null?void 0:l.toISOString(),hidden:!0,type:"date",name:i.name}),S.jsx(Mo,{trigger:S.jsx(cx,{}),onChange:f,open:u,children:S.jsx(Eb,{...i,locale:t,date:l,onChange:v,markToday:s,disabledDate:n,autoFocusToday:r})})]})})},RM=wc("inline-flex rounded-pill gap-1.5 text-main-foreground border-2 border-transparent items-center justify-center align-middle whitespace-nowrap",{variants:{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:{raw:"",main:"bg-primary-subtle text-primary-hover",warn:"bg-warn-subtle text-warn-hover",danger:"bg-danger-subtle text-danger-hover",secondary:"bg-secondary-subtle text-secondary-hover",success:"bg-success-subtle text-success-hover",info:"bg-info-subtle text-info-hover",loading:"animate-pulse bg-disabled duration-700 opacity-70",disabled:"bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"main",size:"default"}}),jM=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,size:s,...i},a){return S.jsxs(hs,{...i,ref:a,"data-theme":o,as:i.as??"span",className:$t(RM({size:s,theme:o}),t),children:[i.children,n]})}),Ob=({children:e,title:t,container:n="",header:r=null,className:o="",...s})=>S.jsxs(hs,{...s,as:"div",className:$t("rounded-card flex flex-col gap-4 bg-card-background py-4 pb-8 border-card-border border shadow",n),children:[t?S.jsx("header",{className:"w-full px-8 pb-4 mb-2 border-b border-card-border font-medium text-xl",children:t}):r,S.jsx("div",{className:`min-w-full px-8 ${o}`,children:e})]}),BM=e=>S.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[S.jsxs("header",{className:"p-6 items-start flex gap-4",children:[S.jsx("div",{className:$t("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:S.jsx("div",{children:S.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),S.jsxs("div",{className:"flex flex-col gap-1",children:[S.jsx("header",{children:S.jsx("h3",{className:"text-base leading-none",children:e.title})}),S.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?S.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),kb=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},_b=b.createContext(""),zM=e=>{const[t,n]=kb(e.active),r=Io(0),o=Io(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useEffect(()=>{const c=s.current;if(c===null)return;const u=p=>{if(!p)return;const m=p.getBoundingClientRect();o.set(m.width),r.set(p.offsetLeft)},f=()=>{const p=c.querySelector("li[data-active=true]");return void u(p)};window.addEventListener("resize",f);let d=c.querySelector("li[data-active=true]");const h=window.location.hash.replace(/^#/,"");if(e.active===""&&h!==""&&(d=c.querySelector(`li[data-id=${h}]`),n(h)),d===null){d=c.querySelector("li[data-id]");const p=d.getAttribute("data-id")||"";n(p)}return u(d),()=>window.removeEventListener("resize",f)},[]),b.useEffect(()=>{e.onChange&&e.onChange(t)},[e.onChange,t]);const a=b.Children.toArray(e.children),l=c=>{const u=c.currentTarget,f=u.getBoundingClientRect();o.set(f.width),r.set(u.offsetLeft),n(u.dataset.id||"")};return S.jsx(_b.Provider,{value:t,children:S.jsx(Ob,{container:"pt-0",header:S.jsxs("header",{ref:s,className:"border-b border-card-border relative mb-2",children:[S.jsx(Jt.div,{layout:!0,initial:!1,"aria-hidden":"true",style:{left:r,width:o},transition:{type:"tween",left:r,width:o},className:"w-28 h-0.5 bg-primary absolute bottom-0 duration-300 transition-all hidden md:block"}),S.jsx("nav",{children:S.jsx("ul",{className:"divide-x divide-card-border overflow-x-auto flex justify-between md:justify-start",children:a.map(c=>{const u=c.props;return S.jsx("li",{"data-id":u.id,"data-active":t===u.id,className:"data-[active=true]:text-primary w-full md:w-auto",children:S.jsx(i,{"data-id":u.id,onClick:l,"aria-current":"page",className:"px-10 py-4 block font-medium w-full whitespace-nowrap",href:e.useHash?`#${u.id}`:void 0,children:u.title})},`tab-header-${u.id}`)})})})]}),children:e.children})})},WM=()=>b.useContext(_b),HM=e=>{const t=WM();return S.jsx(b.Fragment,{children:e.id===t?e.children:null})},UM=({children:e,as:t,title:n,...r})=>{const[o,s]=b.useState(!1),i=b.useRef(null),a=t||"span",{refs:l,floatingStyles:c,context:u}=vi({open:o,onOpenChange:s,whileElementsMounted:ul,transform:!0,middleware:[fl(5),gd({fallbackAxisSideDirection:"start"}),md(),yd({element:i,padding:5})]}),f=Vw(u,{move:!0}),d=Jw(u),h=yi(u),p=xi(u,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:y}=bi([f,d,h,p]);return S.jsxs(b.Fragment,{children:[S.jsx(a,{ref:l.setReference,...m(r),children:n}),S.jsx(gi,{children:o&&S.jsxs(hs,{...y(),ref:l.setFloating,style:c,className:"bg-tooltip-background z-tooltip text-tooltip-foreground border border-tooltip-border p-3 rounded-lg",children:[S.jsx(Td,{ref:i,context:u,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};function GM(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function YM(...e){return t=>e.forEach(n=>GM(n,t))}var Ab=M.forwardRef((e,t)=>{const{children:n,...r}=e,o=M.Children.toArray(n),s=o.find(KM);if(s){const i=s.props.children,a=o.map(l=>l===s?M.Children.count(i)>1?M.Children.only(null):M.isValidElement(i)?i.props.children:null:l);return S.jsx(of,{...r,ref:t,children:M.isValidElement(i)?M.cloneElement(i,void 0,a):null})}return S.jsx(of,{...r,ref:t,children:n})});Ab.displayName="Slot";var of=M.forwardRef((e,t)=>{const{children:n,...r}=e;if(M.isValidElement(n)){const o=XM(n);return M.cloneElement(n,{...ZM(r,n.props),ref:t?YM(t,o):o})}return M.Children.count(n)>1?M.Children.only(null):null});of.displayName="SlotClone";var qM=({children:e})=>S.jsx(S.Fragment,{children:e});function KM(e){return M.isValidElement(e)&&e.type===qM}function ZM(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function XM(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)}const No="600ms",Ib=e=>({initial:{[e]:"-60%",opacity:.8,animationDuration:No},enter:{[e]:0,opacity:1,animationDuration:No},exit:{[e]:["-50%","-90%"],opacity:0,animationDuration:No}}),QM=Ib("left"),JM=Ib("right"),Db={drawer:e=>e==="left"?QM:JM,dialog:{initial:{opacity:0,scale:.95,animationDuration:No},enter:{opacity:1,scale:[1.05,1],animationDuration:No},exit:{opacity:0,scale:.97,animationDuration:No}}},eN=wc("isolate 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%] w-auto h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] container h-[inherit] rounded-lg py-8"},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"}}),tN={top:0,left:0,right:0,bottom:0},nN=e=>{const t=(n,r)=>{if(e.parent.current){const o=e.parent.current,s=e.value.get()||o.getBoundingClientRect().width,i=e.type==="right"?-r.delta.x:r.delta.x;e.value.set(Math.abs(s+i))}};return S.jsx(Jt.div,{drag:"x",dragElastic:0,dragMomentum:!1,onDrag:t,dragConstraints:tN,whileDrag:{cursor:"grabbing"},className:`absolute top-1/2 ${e.type==="left"?"right-5":"left-2"} rounded-lg cursor-grab h-10 w-2 bg-floating-border`})},rN=({type:e="dialog",resizer:t=!0,...n})=>{const r=e==="dialog",o=r?"none":n.position||"left",s=r?Db.dialog:Db.drawer(o),i=b.useId(),a=b.useId(),{refs:l,context:c}=vi({open:n.open,onOpenChange:n.onChange}),u=$d(c),f=xi(c),d=yi(c,{escapeKey:!0,referencePress:!0,outsidePress:!1}),{getReferenceProps:h,getFloatingProps:p}=bi([u,f,d]),m=n.trigger,y=Io(void 0);return S.jsxs(b.Fragment,{children:[n.trigger?S.jsx(b.Fragment,{children:n.asChild?S.jsx(Ab,{ref:l.setReference,...h(),children:m}):S.jsx("button",{ref:l.setReference,...h(),type:"button",children:m})}):null,S.jsx(gi,{children:S.jsx(Ea,{presenceAffectsLayout:!0,children:n.open&&S.jsx(Kw,{lockScroll:!0,className:`relative !overflow-clip h-[100dvh] z-floating bg-floating-overlay/70 ${e==="drawer"?"":"grid justify-center p-8"}`,children:S.jsx(vl,{modal:!0,closeOnFocusOut:!0,context:c,children:S.jsxs(Jt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:eN({position:o,type:e}),exit:"exit",initial:"initial",ref:l.setFloating,variants:s,style:{width:y},...p(),children:[!r&&t?S.jsx(nN,{value:y,parent:l.floating,type:o}):null,n.title||n.closable?S.jsxs("header",{className:"w-full relative",children:[n.title?S.jsx("h2",{className:"px-8 pb-4 border-b border-floating-border text-3xl font-medium leading-relaxed",children:n.title}):null,n.closable!==!1?S.jsx("nav",{className:"absolute -top-1 right-8",children:S.jsx("button",{type:"button",onClick:()=>{var v;return(v=n.onChange)==null?void 0:v.call(n,!1)},className:"p-1 transition-colors hover:text-danger focus:text-danger",children:S.jsx(vx,{})})}):null]}):null,S.jsx("div",{className:"flex-1 px-8 overflow-y-auto",children:n.children}),n.footer?S.jsx("footer",{className:"px-8 border-t border-floating-border pt-4 w-full",children:n.footer}):null]})})})})})]})};var oN=Object.defineProperty,Mb=Object.getOwnPropertySymbols,sN=Object.prototype.hasOwnProperty,iN=Object.prototype.propertyIsEnumerable,Nb=(e,t,n)=>t in e?oN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aN=(e,t)=>{for(var n in t||(t={}))sN.call(t,n)&&Nb(e,n,t[n]);if(Mb)for(var n of Mb(t))iN.call(t,n)&&Nb(e,n,t[n]);return e},sf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},lN=(e,t,n,r)=>Oa(sf,e,t,n,r),Fo=e=>typeof e=="object",dr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Fo(e)&&!Fo(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=>dr(e[r],t[r]))},cN=(e,t)=>(Fo(e)||Array.isArray(e))&&t?e[t]:e,uN=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Pa=e=>/[0-9.]+/.test(e),Fb=e=>["string","number"].includes(typeof e),Lb=e=>e==null||(e==null?void 0:e.length)===0||e==="",Vb={eq:dr,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:Lb,notEmpty:e=>!Lb(e),in:(e,t)=>sf(t,n=>dr(e,n)),notIn:(e,t)=>$b(t,n=>!dr(e,n))},fN=e=>{if(e in Vb)return Vb[e];throw new Error("Linq - Symbol not found")},Lo=(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},Oa=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=fN(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},dN=(e,t,n,r)=>Oa(Lo,e,t,n,r),$b=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},hN=(e,t,n,r)=>Oa($b,e,t,n,r),Rb=e=>{if(e===null)return null;const t=aN({},e);return Object.keys(t).forEach(n=>t[n]=Fo(e[n])?Rb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},jb=(e,t)=>{if(Fo(t)){for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(dr(t,r))return!0}return!1},pN=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},mN=e=>Lo(e,(t,n,r)=>Fo(t)?n===r.findIndex(o=>dr(o,t)):n===r.indexOf(t)),gN=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Bb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),s=n.get(o)||[];s.push(r),n.set(o,s)}),Object.fromEntries(n.entries())},yN=(e,t)=>Bb(e,n=>n[t]),zb=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const s=t(e[r],r,e);n.push(s)}return n},vN=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},bN=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const s=t.charCodeAt(0);for(;o<=s;o+=n)r.push(String.fromCharCode(o));return Pa(e)&&Pa(t)?r.map(i=>Number.parseInt(i)):r},af=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Pa(e)&&Pa(t)){const o=[],[s,i]=vN(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return bN(e,t,r)},wN=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?af(r,o,1):af(r,s,Number.parseInt(o,10))}return Fb(e)&&Fb(t)?af(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},lf=(e,t,n)=>{let r=t;const o=n.length;for(let s=0;s<o;s++){const i=n[s];r=e(r,i,s,n)}return r},Wb=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 s=t[n];t[n]=t[r],t[r]=s}return t},xN=(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)},SN=(e,t,n,r)=>Oa(xN,e,t,n,r),Hb=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(uN(t))},TN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.key,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return r!==0?r:a},0),EN=(e,t)=>e.sort(TN(t)),CN=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:Lo(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},PN=class jf{constructor(t=[]){this.array=t}static Range(...t){return wN(...t)}static New(t){return new jf(t)}Where(t,n,r){return this.array=dN(this.array,t,n,r),this}Some(t,n,r){return lN(this.array,t,n,r)}All(t,n,r){return hN(this.array,t,n,r)}Reverse(){return this.array=Wb(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=SN(this.array,t,n,r),this}Distinct(){return this.array=mN(this.array),this}First(t){return t===void 0?this.array[0]:gN(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?lf((n,r)=>n+r,0,this.array):lf((n,r)=>n+cN(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return yN(this.array,t)}GroupWith(t){return Bb(this.array,t)}Except(t){return Lo(this.array,n=>!jb(t,n))}Intersect(t){return Lo(this.array,n=>jb(t,n))}OrderBy(t,n){let r;return r=t?Hb(this.array,t):this.array.toSorted(),this.array=n==="desc"?Wb(r):r,this}Includes(t){return sf(this.array,n=>dr(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 lf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(zb(this.array,n=>[t,n]))}Zip(t,n){return zb(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:Lo(this.array,t).length}Get(t){return this.array[t]}Clone(){return new jf(Rb(this.array))}ToObject(t){return pN(this.array,t)}Sort(t){return Array.isArray(t)?EN(this.array,t):Hb(this.array,t)}Unique(t){return CN(this.array,t)}},Ub=PN;const Gb=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},ka=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),Yb=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),qb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Kb=(e,t)=>{const n=Yb(t,qb.basic,e)||Yb(t,qb.extend,e);return n===void 0||n===e?void 0:n},cf=()=>typeof window>"u";var uf={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(y,v)=>{try{Object.keys(y).forEach(v)}catch(w){window.console.log(w)}},n=y=>y==null,r=y=>{const v=typeof y;return v==="string"||v==="number"||v==="boolean"||n(y)},o=(y,v)=>{const w=v.getItem(y);try{return JSON.parse(w)}catch{return w??null}},s=y=>Object.keys(y).reduce((v,w)=>({...v,[w]:o(w,y)}),{}),i=y=>y instanceof Date?y:typeof y=="number"?new Date(new Date*1+y*864e5):y,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(y=>y.split("=")).reduce((y,v)=>(y[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),y),{}),c=new Set,u=()=>{const y=l();c.forEach(v=>v(y))},f=[{name:"expires",parse:y=>`expires=${i(y.expires??a)}`},{name:"maxAge",parse:y=>y.maxAge?`max-age=${i(y.expires??a)}`:""},{name:"path",parse:y=>`path=${y.path??"/"}`},{name:"sameSite",parse:y=>`samesite=${y.sameSite??"strict"}`},{name:"useSecure",parse:y=>`${y.useSecure??!0?"secure":""}`},{name:"domain",parse:y=>{const v=y.domain??"";return v===""?"":`domain=${y.multiDomain?".":""}${v}`}},{name:"partitioned",parse:y=>y.partitioned?"Partitioned":""}],d={json:l,listener:y=>(c.add(y),()=>c.delete(y)),clearListeners:()=>c.clear(),has:y=>document.cookie.split(";").some(v=>v.trim().startsWith(`${y}=`)),deleteAll:()=>{document.cookie.split(";").forEach(y=>{document.cookie=y.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:y=>{const v=d.json()[y];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:y=>{document.cookie=`${encodeURIComponent(y)}=;expires=${new Date().toUTCString()}`,u()},set:(y,v,w={})=>{const g=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=f.reduce((x,E)=>{const C=E.parse(w);return C===""?x:x.concat(C)},[`${encodeURIComponent(y)}=${g}`]).join(";");document.cookie=T,u()}},h=y=>{const v=new Set,w=g=>{y().removeItem(g);const T=s(y());v.forEach(x=>x(T))};return{delete:w,listener:g=>(v.add(g),()=>v.delete(g)),clearListeners:()=>v.clear(),json:(g=!1)=>g?s(y()):y(),has:g=>{const T=y().getItem(g);return!n(T)},deleteAll:()=>{t(y(),w),v.forEach(g=>g(y()))},get:g=>o(g,y()),set:(g,T)=>{y().setItem(g,JSON.stringify(T)),v.forEach(x=>x(y()))}}},p=h(()=>window.sessionStorage),m=h(()=>window.localStorage);e.Cookie=d,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=h})(uf);const Zb=e=>e.headerLabel??e.thead??e.id,ff=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Vo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Vo||{});const df=e=>e.type==="number"?e.valueAsNumber:e.value,ON=e=>{let t=[];return e({add:(o,s,i)=>t.push({...i,id:o,thead:s}),remove:o=>t=t.filter(s=>s.id!==o)}),t},kN={},_N=(e,t=kN)=>{const n=cf()?null:uf.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=ef({name:e,groups:t.groups||(n==null?void 0:n.groups)||[],sorters:t.sorters||(n==null?void 0:n.sorters)||[],filters:t.filters||(n==null?void 0:n.filters)||[],cols:t.cols||(n==null?void 0:n.cols)||[]},s=>{const i=a=>{const l=s.state(),c={...l,...a};return cf()||uf.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},Nt={contains:{value:"contains",label:"Contains",symbol:"includes"},is:{value:"is",label:"Is",symbol:"is"},isNot:{value:"isNot",label:"Is not",symbol:"!=="},notContains:{value:"notContains",label:"Does not contains",symbol:"notIncludes"},lessThan:{value:"lessThan",label:"Less Than",symbol:"<="},greaterThan:{value:"greaterThan",label:"Greater than",symbol:">="},startsWith:{value:"startsWith",label:"Starts with",symbol:"startsWith"},endsWith:{value:"endsWith",label:"Ends with",symbol:"endsWith"}},hf={[Vo.Text]:[Nt.is,Nt.isNot,Nt.contains,Nt.notContains,Nt.startsWith,Nt.endsWith],[Vo.Boolean]:[Nt.is,Nt.isNot],[Vo.Number]:[Nt.is,Nt.isNot,Nt.greaterThan,Nt.lessThan]},pf=(e,t={})=>{var i;const n=e.id,r=e.type??Vo.Text,o=(i=hf[r])==null?void 0:i[0].value,s=Nt[o];return{id:ka(),operation:s,label:Zb(e),name:n,type:r,value:"",...t}},AN=e=>{const t=()=>{const i=e.cols.at(0);e.set(a=>[...a,pf(i)])},n=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>{if(a!==u.id)return u;const f=e.cols.find(d=>l===d.id);return pf(f,{value:""})}))},r=i=>{const a=i.target.dataset.id||"",l=i.target.value;e.set(c=>c.map(u=>u.id===a?{...u,operation:Nt[l]}:u))},o=i=>{const a=i.currentTarget.dataset.id||"";e.set(l=>l.filter(c=>c.id!==a))},s=i=>{const a=i.target.dataset.id||"",l=df(i.target);e.set(c=>c.map(u=>u.id===a?{...u,value:l}:u))};return S.jsx(b.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Filters",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(Kd,{size:14}),"Filtros ",e.filters.length===0?"":` (${e.filters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(i=>{const a=hf[i.type];return S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{title:"Filter",options:e.options,placeholder:"Name...",value:i.name,"data-id":i.id,onChange:n}),S.jsx(xr,{title:"Filter type","data-id":i.id,onChange:r,value:i.operation.value,options:a,placeholder:"Operator..."}),S.jsx(us,{"data-id":i.id,onChange:s,placeholder:"Search...",title:"Value",type:i.type,value:i.value}),S.jsx("div",{className:"flex items-center justify-center mt-5",children:S.jsx("button",{"data-id":i.id,type:"button",onClick:o,children:S.jsx(eo,{className:"text-danger",size:16})})})]},`filter-select-${i.id}`)}),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(Tl,{size:14})," New filter"]})})]})})})},IN=({filter:e,onDelete:t,set:n})=>{const r=s=>{const i=s.target.value,a=s.target.dataset.id||"";n(l=>l.map(c=>c.id===a?{...c,operation:Nt[i]}:c))},o=s=>{const i=s.target.dataset.id||"",a=df(s.target);n(l=>l.map(c=>c.id===i?{...c,value:a}:c))};return S.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[S.jsx(xr,{onChange:r,options:hf[e.type],placeholder:"Operation...",title:"Filter type",value:e.operation.value}),S.jsx(us,{"data-id":e.id,onChange:o,placeholder:"Looking for...",title:"Value",type:e.type,value:e.value}),S.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:S.jsx(eo,{className:"text-danger",size:14})})]})},DN=({item:e,onPointerDown:t})=>{const n=Io(0);return S.jsxs(Ca.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[S.jsx("button",{type:"button",className:"cursor-grab",children:S.jsx(mx,{size:14})}),S.jsx("span",{children:e.groupName})]},e.groupId)},MN=e=>{var a;const t=ff(e.cols),n=gM(),[r,o]=b.useState(((a=e.groups[0])==null?void 0:a.thead)||""),s=l=>{var m;const c=l.target,u=c.value,f=c.options.selectedIndex,d=((m=c.options.item(f))==null?void 0:m.label)||"";o(d);const h=new Ub(e.rows).GroupBy(u),p=e.cols.find(y=>y.id===u);e.setGroups(ET(h).map((y,v)=>{const w=h[y];return{...p,groupId:ka(),groupKey:u,index:v,rows:w,groupName:y}}))},i=()=>e.setGroups([]);return S.jsx(b.Fragment,{children:S.jsxs(Mo,{arrow:!1,title:"Groups",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[S.jsx(gx,{size:14}),"Groups",e.groups.length>0?` - ${r}(${e.groups.length})`:""]}),children:[S.jsxs("div",{className:"flex flex-nowrap items-center",children:[S.jsx(xr,{value:r,title:"Tipo de agrupamento",onChange:s,options:t,placeholder:"Agrupar por..."}),S.jsx(ps,{className:"mt-4",onClick:i,theme:"raw","data-id":r,children:S.jsx(eo,{size:16,className:"text-danger"})})]}),e.groups.length>0?S.jsxs("section",{className:"my-4",children:[S.jsx("header",{children:S.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),S.jsx(tM,{children:S.jsx(Ca.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:n,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>S.jsx(DN,{item:l,onPointerDown:c=>{n.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},NN=e=>(t,n)=>e.reduce((r,o)=>{const s=o.type==="desc"?-1:1,i=o.value,a=t[i]>n[i]?s:t[i]<n[i]?-s:0;return console.log({acc:r,p:a,a:t,b:n,property:i}),r!==0?r:a},0),FN=(e,t)=>e.sort(NN(t)),mf={asc:{label:"Ascending",value:"asc"},desc:{label:"Descending",value:"desc"}},LN=[mf.asc,mf.desc],gf=(e,t="asc")=>({id:ka(),type:t,value:e.id,label:mf.asc.label}),VN=e=>{const t=()=>{const s=e.cols[0];s&&e.set(i=>[...i,gf(s)])},n=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,value:a}:c))},r=s=>i=>{const a=i.target.value;e.set(l=>l.map(c=>c.id===s?{...c,type:a}:c))},o=s=>{const i=s.currentTarget.dataset.id||"";e.set(a=>a.filter(l=>l.id!==i))};return S.jsx(b.Fragment,{children:S.jsx(Mo,{arrow:!1,title:"Order By",trigger:S.jsxs("span",{className:"flex items-center gap-1 proportional-nums text-foreground-description",children:[S.jsx(Yd,{size:14}),"Order by ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:S.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(s=>S.jsxs("li",{className:"flex flex-nowrap gap-3",children:[S.jsx(xr,{onChange:n(s.id),options:e.options,title:"Field",placeholder:"Selecione um campo...",value:s.value}),S.jsx(xr,{title:"Sort type",onChange:r(s.id),value:s.type,options:LN,placeholder:"Operação..."}),S.jsx("button",{className:"mt-4","data-id":s.id,onClick:o,children:S.jsx(eo,{className:"text-danger",size:14})})]},`sorter-select-${s.id}`)),S.jsx("li",{children:S.jsxs("button",{type:"button",onClick:t,className:"text-primary flex items-center gap-1",children:[S.jsx(Tl,{size:14})," Add sort"]})})]})})})},$N=e=>{const t=e.sorters.find(s=>s.id===e.col.id),[n,r]=b.useState(t?t.type:"undefined"),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");return b.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(a=>a.value!==e.col.id);const i=s.findIndex(a=>a.value===e.col.id);return i===-1?[...s,gf(e.col,n)]:(s[i]=gf(e.col,n),[...s])})},[n,e.col]),S.jsxs("button",{className:"isolate flex items-center",onClick:o,type:"button",children:[n==="asc"?S.jsx(Sl,{size:14}):null,n==="desc"?S.jsx(fx,{size:14}):null,n==="undefined"?S.jsx(Yd,{size:14}):null]})},RN=e=>S.jsx("header",{className:"min-w-full mb-1",children:S.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[S.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[S.jsx("span",{children:S.jsx(AN,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),S.jsx("span",{children:S.jsx(VN,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),S.jsx("span",{children:S.jsx(MN,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),S.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=>S.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[S.jsxs("span",{children:[S.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),S.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[S.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),S.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=df(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})}),jN={opacity:1},BN={opacity:.75,backgroundColor:"var(--table-border)"},zN={opacity:0,transition:{duration:.4,type:"spring"}},WN=e=>{var r;const t=e.filters.filter(o=>o.name===e.header.id),n=o=>{const s=o.currentTarget.dataset.id||"";return e.setFilters(i=>i.filter(a=>a.id!==s))};return S.jsx(Ca.Item,{...e.header.thProps,as:"th",exit:zN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,value:e.header,whileDrag:BN,animate:jN,className:`hidden font-medium text-secondary px-2 py-4 first:table-cell md:table-cell ${((r=e.header.thProps)==null?void 0:r.className)??""}`,children:S.jsx("span",{className:"flex items-center justify-between",children:S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(Mo,{title:`Filter by ${Zb(e.header)}`,arrow:!0,trigger:S.jsx(Kd,{size:14}),children:t.length===0===null?null:S.jsxs("ul",{className:"font-medium",children:[t.map(o=>S.jsx("li",{className:"my-1",children:S.jsx(IN,{onDelete:n,filter:o,set:e.setFilters})},`thead-filter-${o.id}`)),S.jsx("li",{children:S.jsxs("button",{onClick:()=>e.setFilters(o=>o.concat(pf(e.header))),className:"flex items-center",children:[S.jsx(Tl,{size:14})," Add"]})})]})}),S.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),S.jsx($N,{col:e.header,setSorters:e.setSorters,sorters:e.sorters})]})})})},HN=e=>S.jsx(Ca.Group,{as:"tr",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"bg-table-background border-none text-lg",children:S.jsx(Ea,{children:e.headers.map(t=>S.jsx(WN,{setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})});function UN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2,o=e-r,s=e+r;for(let a=o>2?o:2;a<=Math.min(t,s);a++)n.push(a);const i=t-2;return s+1!==i&&s+1<t&&n.push("_"),s<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const GN=b.forwardRef((e,t)=>S.jsx("tbody",{...e,className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:S.jsx(Ea,{children:e.children})})),YN=b.forwardRef((e,t)=>S.jsx("table",{...e,ref:t,className:`table min-w-full divide-y divide-table-border table-auto text-left ${e.className??""}`})),qN=b.forwardRef((e,t)=>S.jsx("thead",{...e,className:"bg-card-background shadow-xs group:sticky top-0",ref:t})),KN=b.forwardRef((e,t)=>S.jsx("tr",{...e,ref:t,className:`table-row ${e.className??""}`})),ZN=b.forwardRef((e,t)=>e.context.loadingMore?S.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:S.jsx("tr",{className:"bg-card-background",children:S.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:S.jsx("span",{className:"block w-full h-2 bg-foreground rounded opacity-60 animate-pulse"})})})}):null),XN={TableHead:qN,Table:YN,TableBody:GN,TableRow:KN,TableFoot:ZN},QN=[0,0,0,0,0,0,0,0,0,0],JN=(e,t,n)=>{const r=n.cols,o=n.loading;return S.jsx(b.Fragment,{children:r.map((s,i)=>{const a=`${i},${e}`,l=Kb(t,s.id),c=s.Element;return b.createElement("td",{...s.cellProps,"data-matrix":a,key:`accessor-${e}-${i}`,className:"px-2 h-14 border-none first:table-cell hidden md:table-cell"},o?S.jsx("div",{className:"animate-pulse h-2 bg-table-border rounded"}):c?S.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):S.jsx(b.Fragment,{children:kn.nil(l)?"":l}))})})},eF=()=>S.jsx(b.Fragment,{}),tF=e=>{const t=e.asLink||"button",n=b.useMemo(()=>UN(e.current,e.pages),[e.current,e.pages]),r=e.current<e.pages;return S.jsxs("footer",{className:"flex px-1 py-2 items-center justify-between flex-nowrap",children:[S.jsxs("p",{children:[e.current," to ",e.pages," of ",e.totalItems," items.",e.onChangeSize&&Array.isArray(e.sizes)?S.jsxs(b.Fragment,{children:[S.jsx("select",{className:"cursor-pointer",onChange:o=>{var s;(s=e.onChangeSize)==null||s.call(e,Number(o.target.value))},children:e.sizes.map(o=>S.jsx("option",{value:o,children:o}))})," per page"]}):null]}),S.jsx("nav",{children:S.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?S.jsx("li",{children:S.jsx(t,{href:"previous",className:"",children:"Previous"})}):null,n.map(o=>o===null?null:S.jsx(b.Fragment,{children:typeof o=="string"?S.jsx("li",{children:"..."}):S.jsx("li",{children:S.jsx(t,{href:o,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${o===e.current?"text-primary border-primary":"border-transparent"}`,children:o})},`pagination-${o}`)})),r?S.jsx("li",{children:S.jsx(t,{href:"next",className:"",children:"Next"})}):null]})})]})},Xb=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,setSorters:l,...c})=>{const u=b.useRef(null),[f,d]=b.useState(!1),h=Gb(n),p=Gb(c.loadingMore),m=b.useMemo(()=>{if(c.loading)return QN;if(r)return c.rows;const y=new Ub(c.rows);return e.length>0&&e.forEach(v=>v.value===""||Number.isNaN(v.value)?void 0:y.Where(v.name,v.operation.symbol,v.value)),i.length===0?y.Select():FN(y.Select(),i)},[c.rows,e,i,c.loading]);return b.useEffect(()=>{if(u.current===null)return()=>{};const y=u.current,v=new IntersectionObserver(w=>{var x;return w.forEach(E=>console.log(E.isIntersecting,E.target)),w[w.length-1].isIntersecting&&p.current?((x=h.current)==null||x.call(h),void d(!0)):d(!1)});return v.observe(y),()=>v.disconnect()},[]),S.jsxs("div",{className:"min-w-full",children:[S.jsxs("div",{className:"group border border-table-border rounded-lg px-1",children:[S.jsx(SP,{data:m,useWindowScroll:!0,components:XN,totalCount:m.length,itemContent:JN,context:{loading:c.loading,loadingMore:c.loadingMore,cols:a},fixedFooterContent:f?eF:null,fixedHeaderContent:()=>S.jsx(HN,{sorters:i,setSorters:l,filters:e,setFilters:s,headers:a,setCols:o})}),S.jsx("div",{"aria-hidden":"true",ref:u,className:"h-0.5 w-full"})]}),t!==null?S.jsx(tF,{...t}):null]})},nF=(e,t)=>typeof t=="function"?t(e):t,rF=e=>{const t=e.operations??!0,n=b.useMemo(()=>ff(e.cols),[e.cols]),[r,o]=ef({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const i=a=>l=>{const c=s.state();return{...c,[a]:nF(c[a],l)}};return{cols:i("cols"),filters:i("filters"),groups:i("groups"),sorters:i("sorters")}},{postMiddleware:[s=>{var i;return(i=e.set)==null||i.call(e,s),s}]});return S.jsxs("div",{className:"relative min-w-full",children:[t?S.jsx(RN,{setCols:o.cols,rows:e.rows,cols:r.cols,filters:r.filters,groups:r.groups,options:n,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):null,r.groups.length===0?S.jsx(Xb,{...e,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,groups:r.groups,index:0,optionCols:n,options:n,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters,pagination:e.pagination??null}):S.jsx("div",{className:"flex flex-wrap gap-4",children:r.groups.map((s,i)=>S.jsx(Jt.div,{className:"min-w-full",children:S.jsx(Xb,{...e,pagination:null,onScrollEnd:e.onScrollEnd,cols:r.cols,filters:r.filters,group:s,groups:r.groups,index:i,optionCols:n,options:n,rows:s.rows,setCols:o.cols,setFilters:o.filters,setGroups:o.groups,setSorters:o.sorters,sorters:r.sorters})},`group-${s.groupId}`))})]})};var oF=String.prototype.replace,sF=/%20/g,yf={RFC1738:"RFC1738",RFC3986:"RFC3986"},vf={default:yf.RFC3986,formatters:{RFC1738:function(e){return oF.call(e,sF,"+")},RFC3986:function(e){return String(e)}},RFC1738:yf.RFC1738,RFC3986:yf.RFC3986},iF=vf,bf=Object.prototype.hasOwnProperty,Fr=Array.isArray,Tn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),aF=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Fr(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},Qb=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},lF=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Fr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!bf.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Fr(t)&&!Fr(n)&&(o=Qb(t,r)),Fr(t)&&Fr(n)?(n.forEach(function(s,i){if(bf.call(t,i)){var a=t[i];a&&typeof a=="object"&&s&&typeof s=="object"?t[i]=e(a,s,r):t.push(s)}else t[i]=s}),t):Object.keys(n).reduce(function(s,i){var a=n[i];return bf.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},cF=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},uF=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},wf=1024,fF=function(t,n,r,o,s){if(t.length===0)return t;var i=t;if(typeof t=="symbol"?i=Symbol.prototype.toString.call(t):typeof t!="string"&&(i=String(t)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=wf){for(var c=i.length>=wf?i.slice(l,l+wf):i,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||s===iF.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=Tn[d];continue}if(d<2048){u[u.length]=Tn[192|d>>6]+Tn[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=Tn[224|d>>12]+Tn[128|d>>6&63]+Tn[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Tn[240|d>>18]+Tn[128|d>>12&63]+Tn[128|d>>6&63]+Tn[128|d&63]}a+=u.join("")}return a},dF=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var s=n[o],i=s.obj[s.prop],a=Object.keys(i),l=0;l<a.length;++l){var c=a[l],u=i[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:i,prop:c}),r.push(u))}return aF(n),t},hF=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},pF=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},mF=function(t,n){return[].concat(t,n)},gF=function(t,n){if(Fr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Jb={arrayToObject:Qb,assign:cF,combine:mF,compact:dF,decode:uF,encode:fF,isBuffer:pF,isRegExp:hF,maybeMap:gF,merge:lF},e0=rT,_a=Jb,Hs=vf,yF=Object.prototype.hasOwnProperty,t0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},En=Array.isArray,vF=Array.prototype.push,n0=function(e,t){vF.apply(e,En(t)?t:[t])},bF=Date.prototype.toISOString,r0=Hs.default,ht={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_a.encode,encodeValuesOnly:!1,format:r0,formatter:Hs.formatters[r0],indices:!1,serializeDate:function(t){return bF.call(t)},skipNulls:!1,strictNullHandling:!1},wF=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},xf={},xF=function e(t,n,r,o,s,i,a,l,c,u,f,d,h,p,m,y,v,w){for(var g=t,T=w,x=0,E=!1;(T=T.get(xf))!==void 0&&!E;){var C=T.get(t);if(x+=1,typeof C<"u"){if(C===x)throw new RangeError("Cyclic object value");E=!0}typeof T.get(xf)>"u"&&(x=0)}if(typeof u=="function"?g=u(n,g):g instanceof Date?g=h(g):r==="comma"&&En(g)&&(g=_a.maybeMap(g,function(P){return P instanceof Date?h(P):P})),g===null){if(i)return c&&!y?c(n,ht.encoder,v,"key",p):n;g=""}if(wF(g)||_a.isBuffer(g)){if(c){var O=y?n:c(n,ht.encoder,v,"key",p);return[m(O)+"="+m(c(g,ht.encoder,v,"value",p))]}return[m(n)+"="+m(String(g))]}var I=[];if(typeof g>"u")return I;var N;if(r==="comma"&&En(g))y&&c&&(g=_a.maybeMap(g,c)),N=[{value:g.length>0?g.join(",")||null:void 0}];else if(En(u))N=u;else{var L=Object.keys(g);N=f?L.sort(f):L}var _=l?n.replace(/\./g,"%2E"):n,j=o&&En(g)&&g.length===1?_+"[]":_;if(s&&En(g)&&g.length===0)return j+"[]";for(var D=0;D<N.length;++D){var k=N[D],F=typeof k=="object"&&typeof k.value<"u"?k.value:g[k];if(!(a&&F===null)){var $=d&&l?k.replace(/\./g,"%2E"):k,z=En(g)?typeof r=="function"?r(j,$):j:j+(d?"."+$:"["+$+"]");w.set(t,x);var q=e0();q.set(xf,w),n0(I,e(F,z,r,o,s,i,a,l,r==="comma"&&y&&En(g)?null:c,u,f,d,h,p,m,y,v,q))}}return I},SF=function(t){if(!t)return ht;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||ht.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Hs.default;if(typeof t.format<"u"){if(!yF.call(Hs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Hs.formatters[r],s=ht.filter;(typeof t.filter=="function"||En(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in t0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=ht.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:ht.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:ht.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ht.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ht.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?ht.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ht.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:ht.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:ht.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ht.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ht.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ht.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ht.strictNullHandling}},TF=function(e,t){var n=e,r=SF(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):En(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=t0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=e0(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||n0(i,xF(n[f],f,a,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=i.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),d.length>0?h+d:""},$o=Jb,Sf=Object.prototype.hasOwnProperty,EF=Array.isArray,ct={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:$o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},CF=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},o0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},PF="utf8=%26%2310003%3B",OF="utf8=%E2%9C%93",kF=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var s=n.parameterLimit===1/0?void 0:n.parameterLimit,i=o.split(n.delimiter,s),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<i.length;++l)i[l].indexOf("utf8=")===0&&(i[l]===OF?c="utf-8":i[l]===PF&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,h,p;d===-1?(h=n.decoder(u,ct.decoder,c,"key"),p=n.strictNullHandling?null:""):(h=n.decoder(u.slice(0,d),ct.decoder,c,"key"),p=$o.maybeMap(o0(u.slice(d+1),n),function(y){return n.decoder(y,ct.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=CF(p)),u.indexOf("[]=")>-1&&(p=EF(p)?[p]:p);var m=Sf.call(r,h);m&&n.duplicates==="combine"?r[h]=$o.combine(r[h],p):(!m||n.duplicates==="last")&&(r[h]=p)}return r},_F=function(e,t,n,r){for(var o=r?t:o0(t,n),s=e.length-1;s>=0;--s){var i,a=e[s];if(a==="[]"&&n.parseArrays)i=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?i={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[],i[u]=o):c!=="__proto__"&&(i[c]=o)}o=i}return o},AF=function(t,n,r,o){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&i.exec(s),c=l?s.slice(0,l.index):s,u=[];if(c){if(!r.plainObjects&&Sf.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(s))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Sf.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),_F(u,n,r,o)}},IF=function(t){if(!t)return ct;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?ct.charset:t.charset,r=typeof t.duplicates>"u"?ct.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:ct.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:ct.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ct.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ct.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ct.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ct.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ct.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:ct.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:ct.decoder,delimiter:typeof t.delimiter=="string"||$o.isRegExp(t.delimiter)?t.delimiter:ct.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ct.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ct.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ct.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ct.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ct.strictNullHandling}},DF=function(e,t){var n=IF(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?kF(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=AF(a,r[a],n,typeof e=="string");o=$o.merge(o,l,n)}return n.allowSparse===!0?o:$o.compact(o)},MF=TF,NF=DF,FF=vf,LF={formats:FF,parse:NF,stringify:MF},Pe;(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 s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Pe||(Pe={}));var s0;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(s0||(s0={}));const te=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Lr=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(e)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},G=Pe.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 en extends Error{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}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof en))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.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()}}en.create=e=>new en(e);const Us=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Pe.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${Pe.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Pe.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${Pe.joinValues(e.options)}, received '${e.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.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}"`:Pe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.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 G.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 G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,Pe.assertNever(e)}return{message:n}};let VF=Us;function Tf(){return VF}const Ef=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}};function J(e,t){const n=Tf(),r=Ef({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Us?void 0:Us].filter(o=>!!o)});e.common.issues.push(r)}class Ft{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 me;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 s=await o.key,i=await o.value;r.push({key:s,value:i})}return Ft.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return me;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const me=Object.freeze({status:"aborted"}),Gs=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),i0=e=>e.status==="aborted",a0=e=>e.status==="dirty",Aa=e=>e.status==="valid",Ia=e=>typeof Promise<"u"&&e instanceof Promise;function Da(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function l0(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!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 ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ae||(ae={}));var Ys,qs;class Cn{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 c0=(e,t)=>{if(Aa(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 en(e.common.issues);return this._error=n,this._error}}};function ye(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:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class xe{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)}get description(){return this._def.description}_getType(t){return Lr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:Lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ia(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:Lr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return c0(o,s)}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:Lr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Ia(o)?o:Promise.resolve(o));return c0(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:G.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new $n({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Rn.create(this,this._def)}nullable(){return Rr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ln.create(this,this._def)}promise(){return Xs.create(this,this._def)}or(t){return Fa.create([this,t],this._def)}and(t){return La.create(this,t,this._def)}transform(t){return new $n({...ye(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ba({...ye(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new h0({typeName:he.ZodBranded,type:this,...ye(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new za({...ye(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Wa.create(this,t)}readonly(){return Ha.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $F=/^c[^\s-]{8,}$/i,RF=/^[0-9a-z]+$/,jF=/^[0-9A-HJKMNP-TV-Z]{26}$/,BF=/^[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,zF=/^[a-z0-9_-]{21}$/i,WF=/^[-+]?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)?)??$/,HF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,UF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Cf;const GF=/^(?:(?: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])$/,YF=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,u0="((\\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])))",KF=new RegExp(`^${u0}$`);function f0(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 ZF(e){return new RegExp(`^${f0(e)}$`)}function XF(e){let t=`${u0}T${f0(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 QF(e,t){return!!((t==="v4"||!t)&&GF.test(e)||(t==="v6"||!t)&&YF.test(e))}class Fn extends xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.string,received:s.parsedType}),me}const r=new Ft;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?J(o,{code:G.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&J(o,{code:G.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")HF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"email",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Cf||(Cf=new RegExp(UF,"u")),Cf.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"emoji",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")BF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"uuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")zF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"nanoid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")$F.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")RF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"cuid2",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")jF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ulid",code:G.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),J(o,{validation:"url",code:G.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"regex",code:G.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?XF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?KF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?ZF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{code:G.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?WF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"duration",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?QF(t.data,s.version)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"ip",code:G.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?qF.test(t.data)||(o=this._getOrReturnCtx(t,o),J(o,{validation:"base64",code:G.invalid_string,message:s.message}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:G.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ae.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,...ae.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,...ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ae.errToObj(n)})}nonempty(t){return this.min(1,ae.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...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 isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}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}}Fn.create=e=>{var t;return new Fn({checks:[],typeName:he.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};function JF(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Vr extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.number,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="int"?Pe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?JF(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_finite,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Vr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Vr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.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"&&Pe.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)}}Vr.create=e=>new Vr({checks:[],typeName:he.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ro extends xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==te.bigint){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.bigint,received:s.parsedType}),me}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:G.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Pe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ae.toString(n))}setLimit(t,n,r,o){return new Ro({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Ro({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ae.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}}Ro.create=e=>{var t;return new Ro({checks:[],typeName:he.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ye(e)})};class Pf extends xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.boolean,received:r.parsedType}),me}return zt(t.data)}}Pf.create=e=>new Pf({typeName:he.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ye(e)});class Ks extends xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_type,expected:te.date,received:s.parsedType}),me}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return J(s,{code:G.invalid_date}),me}const r=new Ft;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),J(o,{code:G.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Pe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ks({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ae.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}}Ks.create=e=>new Ks({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:he.ZodDate,...ye(e)});class Of extends xe{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.symbol,received:r.parsedType}),me}return zt(t.data)}}Of.create=e=>new Of({typeName:he.ZodSymbol,...ye(e)});class Ma extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.undefined,received:r.parsedType}),me}return zt(t.data)}}Ma.create=e=>new Ma({typeName:he.ZodUndefined,...ye(e)});class Na extends xe{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.null,received:r.parsedType}),me}return zt(t.data)}}Na.create=e=>new Na({typeName:he.ZodNull,...ye(e)});class kf extends xe{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}kf.create=e=>new kf({typeName:he.ZodAny,...ye(e)});class jo extends xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}jo.create=e=>new jo({typeName:he.ZodUnknown,...ye(e)});class hr extends xe{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:G.invalid_type,expected:te.never,received:n.parsedType}),me}}hr.create=e=>new hr({typeName:he.ZodNever,...ye(e)});class _f extends xe{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.void,received:r.parsedType}),me}return zt(t.data)}}_f.create=e=>new _f({typeName:he.ZodVoid,...ye(e)});class ln extends xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==te.array)return J(n,{code:G.invalid_type,expected:te.array,received:n.parsedType}),me;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(J(n,{code:i?G.too_big:G.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?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&&(J(n,{code:G.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&&(J(n,{code:G.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((i,a)=>o.type._parseAsync(new Cn(n,i,n.path,a)))).then(i=>Ft.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Cn(n,i,n.path,a)));return Ft.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new ln({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new ln({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new ln({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ln.create=(e,t)=>new ln({type:e,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...ye(t)});function Bo(e){if(e instanceof nt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Rn.create(Bo(r))}return new nt({...e._def,shape:()=>t})}else return e instanceof ln?new ln({...e._def,type:Bo(e.element)}):e instanceof Rn?Rn.create(Bo(e.unwrap())):e instanceof Rr?Rr.create(Bo(e.unwrap())):e instanceof Vn?Vn.create(e.items.map(t=>Bo(t))):e}class nt extends xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Pe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==te.object){const c=this._getOrReturnCtx(t);return J(c,{code:G.invalid_type,expected:te.object,received:c.parsedType}),me}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof hr&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Cn(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof hr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(J(o,{code:G.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Cn(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>Ft.mergeObjectSync(r,c)):Ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new nt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ae.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(t){return new nt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new nt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:he.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new nt({...this._def,catchall:t})}pick(t){const n={};return Pe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}omit(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new nt({...this._def,shape:()=>n})}deepPartial(){return Bo(this)}partial(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new nt({...this._def,shape:()=>n})}required(t){const n={};return Pe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Rn;)s=s._def.innerType;n[r]=s}}),new nt({...this._def,shape:()=>n})}keyof(){return d0(Pe.objectKeys(this.shape))}}nt.create=(e,t)=>new nt({shape:()=>e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.strictCreate=(e,t)=>new nt({shape:()=>e,unknownKeys:"strict",catchall:hr.create(),typeName:he.ZodObject,...ye(t)}),nt.lazycreate=(e,t)=>new nt({shape:e,unknownKeys:"strip",catchall:hr.create(),typeName:he.ZodObject,...ye(t)});class Fa extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new en(a.ctx.common.issues));return J(n,{code:G.invalid_union,unionErrors:i}),me}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];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"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new en(l));return J(n,{code:G.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}Fa.create=(e,t)=>new Fa({options:e,typeName:he.ZodUnion,...ye(t)});const Ln=e=>e instanceof $a?Ln(e.schema):e instanceof $n?Ln(e.innerType()):e instanceof Ra?[e.value]:e instanceof $r?e.options:e instanceof ja?Pe.objectValues(e.enum):e instanceof Ba?Ln(e._def.innerType):e instanceof Ma?[void 0]:e instanceof Na?[null]:e instanceof Rn?[void 0,...Ln(e.unwrap())]:e instanceof Rr?[null,...Ln(e.unwrap())]:e instanceof h0||e instanceof Ha?Ln(e.unwrap()):e instanceof za?Ln(e._def.innerType):[];class Af extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.object)return J(n,{code:G.invalid_type,expected:te.object,received:n.parsedType}),me;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}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 s of n){const i=Ln(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Af({typeName:he.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ye(r)})}}function If(e,t){const n=Lr(e),r=Lr(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const o=Pe.objectKeys(t),s=Pe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=If(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=If(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class La extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(i0(s)||i0(i))return me;const a=If(s.value,i.value);return a.valid?((a0(s)||a0(i))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:G.invalid_intersection_types}),me)};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(([s,i])=>o(s,i)):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}))}}La.create=(e,t,n)=>new La({left:e,right:t,typeName:he.ZodIntersection,...ye(n)});class Vn extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return J(r,{code:G.invalid_type,expected:te.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return J(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Cn(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Ft.mergeArray(n,i)):Ft.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Vn({...this._def,rest:t})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:he.ZodTuple,rest:null,...ye(t)})};class Va extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.object)return J(r,{code:G.invalid_type,expected:te.object,received:r.parsedType}),me;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Cn(r,a,r.path,a)),value:i._parse(new Cn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ft.mergeObjectAsync(n,o):Ft.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xe?new Va({keyType:t,valueType:n,typeName:he.ZodRecord,...ye(r)}):new Va({keyType:Fn.create(),valueType:t,typeName:he.ZodRecord,...ye(n)})}}class Df extends xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return J(r,{code:G.invalid_type,expected:te.map,received:r.parsedType}),me;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Cn(r,a,r.path,[c,"key"])),value:s._parse(new Cn(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return me;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Df.create=(e,t,n)=>new Df({valueType:t,keyType:e,typeName:he.ZodMap,...ye(n)});class zo extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return J(r,{code:G.invalid_type,expected:te.set,received:r.parsedType}),me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(J(r,{code:G.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&&(J(r,{code:G.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return me;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Cn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new zo({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new zo({...this._def,maxSize:{value:t,message:ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zo.create=(e,t)=>new zo({valueType:e,minSize:null,maxSize:null,typeName:he.ZodSet,...ye(t)});class Zs extends xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.function)return J(n,{code:G.invalid_type,expected:te.function,received:n.parsedType}),me;function r(a,l){return Ef({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),Us].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function o(a,l){return Ef({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tf(),Us].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Xs){const a=this;return zt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(h=>{throw c.addIssue(o(f,h)),c})})}else{const a=this;return zt(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new en([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new en([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Zs({...this._def,args:Vn.create(t).rest(jo.create())})}returns(t){return new Zs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Zs({args:t||Vn.create([]).rest(jo.create()),returns:n||jo.create(),typeName:he.ZodFunction,...ye(r)})}}class $a extends xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$a.create=(e,t)=>new $a({getter:e,typeName:he.ZodLazy,...ye(t)});class Ra extends xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ra.create=(e,t)=>new Ra({value:e,typeName:he.ZodLiteral,...ye(t)});function d0(e,t){return new $r({values:e,typeName:he.ZodEnum,...ye(t)})}class $r extends xe{constructor(){super(...arguments),Ys.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Pe.joinValues(r),received:n.parsedType,code:G.invalid_type}),me}if(Da(this,Ys)||l0(this,Ys,new Set(this._def.values)),!Da(this,Ys).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:G.invalid_enum_value,options:r}),me}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 $r.create(t,{...this._def,...n})}exclude(t,n=this._def){return $r.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ys=new WeakMap,$r.create=d0;class ja extends xe{constructor(){super(...arguments),qs.set(this,void 0)}_parse(t){const n=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const o=Pe.objectValues(n);return J(r,{expected:Pe.joinValues(o),received:r.parsedType,code:G.invalid_type}),me}if(Da(this,qs)||l0(this,qs,new Set(Pe.getValidEnumValues(this._def.values))),!Da(this,qs).has(t.data)){const o=Pe.objectValues(n);return J(r,{received:r.data,code:G.invalid_enum_value,options:o}),me}return zt(t.data)}get enum(){return this._def.values}}qs=new WeakMap,ja.create=(e,t)=>new ja({values:e,typeName:he.ZodNativeEnum,...ye(t)});class Xs extends xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return J(n,{code:G.invalid_type,expected:te.promise,received:n.parsedType}),me;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return zt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xs.create=(e,t)=>new Xs({type:e,typeName:he.ZodPromise,...ye(t)});class $n extends xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{J(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?Gs(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?Gs(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?me:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Aa(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>Aa(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Pe.assertNever(o)}}$n.create=(e,t,n)=>new $n({schema:e,typeName:he.ZodEffects,effect:t,...ye(n)}),$n.createWithPreprocess=(e,t,n)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:he.ZodEffects,...ye(n)});class Rn extends xe{_parse(t){return this._getType(t)===te.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rn.create=(e,t)=>new Rn({innerType:e,typeName:he.ZodOptional,...ye(t)});class Rr extends xe{_parse(t){return this._getType(t)===te.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rr.create=(e,t)=>new Rr({innerType:e,typeName:he.ZodNullable,...ye(t)});class Ba extends xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ba.create=(e,t)=>new Ba({innerType:e,typeName:he.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ye(t)});class za extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ia(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new en(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}za.create=(e,t)=>new za({innerType:e,typeName:he.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ye(t)});class Mf extends xe{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return J(r,{code:G.invalid_type,expected:te.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Mf.create=e=>new Mf({typeName:he.ZodNaN,...ye(e)});class h0 extends xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Wa extends xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?me:s.status==="dirty"?(n.dirty(),Gs(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?me: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 Wa({in:t,out:n,typeName:he.ZodPipeline})}}class Ha extends xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Aa(o)&&(o.value=Object.freeze(o.value)),o);return Ia(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ha.create=(e,t)=>new Ha({innerType:e,typeName:he.ZodReadonly,...ye(t)}),nt.lazycreate;var he;(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"})(he||(he={})),Fn.create,Vr.create,Mf.create,Ro.create,Pf.create,Ks.create,Of.create,Ma.create,Na.create,kf.create,jo.create,hr.create,_f.create,ln.create,nt.create,nt.strictCreate,Fa.create,Af.create,La.create,Vn.create,Va.create,Df.create,zo.create,Zs.create,$a.create,Ra.create,$r.create,ja.create,Xs.create,$n.create,Rn.create,Rr.create,$n.createWithPreprocess,Wa.create;const eL={sort:(e,t)=>e.localeCompare(t),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},p0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return LF.parse(n.toString(),eL)},m0=e=>e.replace("[",".").replace("]","").split("."),Nf=(e,t)=>m0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof ln?o.element:o},t),Ua=e=>e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value,tL=e=>{const[t,n]=b.useState(null),r=b.useRef({}),o=(l,c)=>{const u=Nf(l,e);return{...c,name:l,id:l,error:t==null?void 0:t[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}},s=(l,c)=>{const u=Nf(l,e);return{...c,name:l,id:l,type:kn.instance(u,Vr)?"number":(c==null?void 0:c.type)??"text",error:t==null?void 0:t[l],ref:f=>{f!==null&&(r.current[l]={element:f,schema:u})}}};b.useEffect(()=>{const l=Object.values(r.current).map(u=>{const f=u.schema.safeParse(Ua(u.element)),d=p=>{const m=u.schema.safeParse(Ua(p.target)),y=u.element,v=y.name;if(m.success)return y.setCustomValidity(""),n(w=>{const{[v]:g,...T}=w||{};return T===null||kn.empty(T)?null:T});if(y.required){const w=m.error.issues[0].message;y.setCustomValidity(w),n(g=>({...g,[v]:w}))}},h=u.element.tagName==="INPUT"?"blur":"change";return u.element.addEventListener(h,d),{input:u,hasInitialError:u.element.required?!f.success:!1,unsubscribe:()=>u.element.removeEventListener(h,d)}});return l.some(u=>u.hasInitialError)&&n(u=>u===null?{}:u),()=>l.forEach(u=>u.unsubscribe())});const i=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget,f=Object.values(r.current).reduce((h,p)=>{const m=p.element,y=p.schema.safeParse(Ua(m));if(y.success)return h;const v=y.error.issues[0].message;return m.setAttribute("data-initialized","true"),{...h,[m.name]:v}},{}),d=kn.empty(f)?null:{};n(d),l==null||l({form:u,errors:d||{}})},[]),a=b.useCallback(l=>c=>{c.preventDefault();const u=c.currentTarget;let f=p0(u);Array.from(u.elements).forEach(d=>{if(d.tagName==="SELECT"){const h=d;f=Wh(f,h.name,h.value)}if(d.tagName==="INPUT"){const h=d;f=Wh(f,h.name,Ua(h))}}),l({form:u,json:f,event:c,reset:()=>Xp(u)})},[]);return{input:s,select:o,onSubmit:a,errors:t,onInvalid:i,disabled:t!==null}},nL={name:"dark",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{pill:"2rem",card:"0.75rem",full:"50%"},colors:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 9%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 20%, 80%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 21%, 27%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)"},danger:{DEFAULT:"hsla(358, 75%, 59%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 40%, 98%)"},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:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 7%, 27%)"},floating:{background:"hsla(0, 0%, 14%)",border:"hsla(240, 7%, 27%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"}}},rL={name:"light",spacing:{base:"1rem",lg:"1.5rem",sm:"0.75rem"},rounded:{full:"50%",pill:"2rem",card:"0.75rem"},colors:{foreground:"hsla(217, 15%, 32%)",background:"hsla(210, 34%, 96%)",accent:"hsla(199, 89%, 54%)",disabled:"hsla(240, 10%, 75%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 20%, 40%)",subtle:"hsla(210, 27%, 95%)",hover:"hsla(210, 21%, 27%)",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%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(210, 34%, 96%)"},input:{border:"hsla(218, 22%, 80%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},floating:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(0, 0%, 8%)",border:"hsla(0, 0%, 15%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"}}},oL={cssVariable:(e,t,n)=>`var(--${n})`,rgba:e=>`rgba(${e})`,rgb:e=>`rgb(${e})`,hsl:e=>`hsl(${e})`,hsla:e=>`hsla(${e})`,hex:e=>e,raw:e=>e,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Qs=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return o.concat(t(i,l,a))}return o.concat(Qs(i,t,n,a))},[]),g0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[s,i])=>{const a=r===""?`${n}${s}`:`${r}-${s}`;if(typeof i=="string"){const l=r===""?`${n}${s}`:s;return{...o,[l]:t(i,s,a)}}return{...o,[s]:g0(i,t,n,a)}},{}),y0={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Ff=(e,t)=>{const n=t.value||((o,s)=>s),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},sL={default:e=>Ff(e,{result:y0.default}),dark:e=>Ff(e,{result:y0.dark})},iL=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=Qs(e.colors,n),o=Qs(e.spacing,n),s=Qs(e.rounded,n);return Ff(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})};re.Autocomplete=c1,re.Button=ps,re.ButtonGroup=FE,re.Calendar=Eb,re.Card=Ob,re.Checkbox=Hm,re.ColType=Vo,re.DatePicker=$M,re.Dropdown=Mo,re.FileUpload=BE,re.Form=WE,re.Input=us,re.InputFeedback=Xh,re.InputField=Di,re.Modal=rN,re.Option=Qh,re.Polymorph=hs,re.Select=xr,re.Stats=BM,re.Switch=HE,re.Tab=HM,re.Table=rF,re.Tabs=zM,re.Tag=jM,re.Tooltip=UM,re.TransferList=CP,re.convertPath=m0,re.createColumns=ON,re.createDesignTokens=g0,re.createOptionCols=ff,re.createStyles=sL,re.createTheme=iL,re.css=$t,re.defaultDarkTheme=nL,re.defaultLightTheme=rL,re.dispatchInput=Ql,re.formReset=Xp,re.formToJson=p0,re.getSchemaShape=Nf,re.isReactComponent=o1,re.isReactFC=s1,re.isSsr=cf,re.mergeRefs=Xl,re.parsers=oL,re.path=Kb,re.reduceTokens=Qs,re.useForm=tL,re.usePrevious=Zd,re.useReactive=kb,re.useTablePreferences=_N,re.uuid=ka,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
171
171
|
//# sourceMappingURL=index.umd.js.map
|