@g4rcez/components 0.0.45 → 0.0.47

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.
Files changed (51) hide show
  1. package/dist/index.js +45 -45
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +7500 -10254
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/index.umd.js +45 -45
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/preset.tailwind.js +1 -1
  8. package/dist/src/components/core/button.js +2 -5
  9. package/dist/src/components/core/polymorph.js +2 -4
  10. package/dist/src/components/core/tag.js +2 -5
  11. package/dist/src/components/display/alert.js +3 -6
  12. package/dist/src/components/display/calendar.js +20 -26
  13. package/dist/src/components/display/card.js +1 -5
  14. package/dist/src/components/display/list.js +2 -2
  15. package/dist/src/components/display/notifications.js +3 -4
  16. package/dist/src/components/display/step.js +2 -2
  17. package/dist/src/components/display/timeline.js +2 -6
  18. package/dist/src/components/floating/dropdown.js +3 -4
  19. package/dist/src/components/floating/expand.js +1 -1
  20. package/dist/src/components/floating/menu.js +28 -29
  21. package/dist/src/components/floating/modal.js +4 -6
  22. package/dist/src/components/floating/tooltip.js +2 -4
  23. package/dist/src/components/form/autocomplete.d.ts.map +1 -1
  24. package/dist/src/components/form/autocomplete.js +54 -50
  25. package/dist/src/components/form/checkbox.js +1 -5
  26. package/dist/src/components/form/date-picker.js +5 -8
  27. package/dist/src/components/form/file-upload.js +5 -10
  28. package/dist/src/components/form/form.js +2 -3
  29. package/dist/src/components/form/input-field.js +2 -2
  30. package/dist/src/components/form/input.js +3 -6
  31. package/dist/src/components/form/radiobox.js +1 -5
  32. package/dist/src/components/form/select.js +4 -10
  33. package/dist/src/components/form/switch.js +6 -10
  34. package/dist/src/components/form/task-list.js +1 -1
  35. package/dist/src/components/form/transfer-list.js +2 -2
  36. package/dist/src/components/table/filter.js +7 -8
  37. package/dist/src/components/table/group.js +3 -5
  38. package/dist/src/components/table/index.js +27 -45
  39. package/dist/src/components/table/metadata.js +5 -1
  40. package/dist/src/components/table/pagination.js +3 -4
  41. package/dist/src/components/table/sort.js +2 -2
  42. package/dist/src/components/table/table-lib.js +13 -16
  43. package/dist/src/components/table/thead.js +2 -3
  44. package/dist/src/hooks/use-form.d.ts.map +1 -1
  45. package/dist/src/hooks/use-form.js +49 -22
  46. package/dist/src/hooks/use-translate-context.js +1 -1
  47. package/dist/src/lib/dom.d.ts +4 -1
  48. package/dist/src/lib/dom.d.ts.map +1 -1
  49. package/dist/src/lib/dom.js +3 -3
  50. package/dist/src/styles/design-tokens.js +5 -2
  51. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,145 +1,145 @@
1
- "use strict";var X0=Object.defineProperty;var Q0=(e,t,n)=>t in e?X0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var re=(e,t,n)=>Q0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),w=require("react/jsx-runtime"),og=require("react-dom");function sg(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 _=sg(b),ig=sg(og);function ag(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=ag(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function J0(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ag(e))&&(r&&(r+=" "),r+=t);return r}const af=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,lf=J0,Gs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return lf(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],d=s==null?void 0:s[c];if(u===null)return null;const h=af(u)||af(d);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:h,...f}=u;return Object.entries(f).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...s,...a}[m]):{...s,...a}[m]===v})?[...c,d,h]:c},[]);return lf(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};function lg(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=lg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ex(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=lg(e))&&(r&&(r+=" "),r+=t);return r}var cf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nx(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 rx=Error,ox=EvalError,sx=RangeError,ix=ReferenceError,cg=SyntaxError,Ys=TypeError,ax=URIError,lx=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},uf=typeof Symbol<"u"&&Symbol,cx=lx,ux=function(){return typeof uf!="function"||typeof Symbol!="function"||typeof uf("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:cx()},al={__proto__:null,foo:{}},dx=Object,fx=function(){return{__proto__:al}.foo===al.foo&&!(al instanceof dx)},hx="Function.prototype.bind called on incompatible ",px=Object.prototype.toString,mx=Math.max,gx="[object Function]",df=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},yx=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},bx=function(t){var n=this;if(typeof n!="function"||px.apply(n)!==gx)throw new TypeError(hx+n);for(var r=yx(arguments,1),o,s=function(){if(this instanceof o){var u=n.apply(this,df(r,arguments));return Object(u)===u?u:this}return n.apply(t,df(r,arguments))},i=mx(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},xx=bx,Ru=Function.prototype.bind||xx,wx=Function.prototype.call,Sx=Object.prototype.hasOwnProperty,Tx=Ru,Ex=Tx.call(wx,Sx),Se,Cx=rx,Px=ox,Rx=sx,kx=ix,uo=cg,oo=Ys,Ix=ax,ug=Function,ll=function(e){try{return ug('"use strict"; return ('+e+").constructor;")()}catch{}},Ir=Object.getOwnPropertyDescriptor;if(Ir)try{Ir({},"")}catch{Ir=null}var cl=function(){throw new oo},Ox=Ir?function(){try{return arguments.callee,cl}catch{try{return Ir(arguments,"callee").get}catch{return cl}}}():cl,Hr=ux(),Ax=fx(),bt=Object.getPrototypeOf||(Ax?function(e){return e.__proto__}:null),Zr={},_x=typeof Uint8Array>"u"||!bt?Se:bt(Uint8Array),Or={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Se:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Se:ArrayBuffer,"%ArrayIteratorPrototype%":Hr&&bt?bt([][Symbol.iterator]()):Se,"%AsyncFromSyncIteratorPrototype%":Se,"%AsyncFunction%":Zr,"%AsyncGenerator%":Zr,"%AsyncGeneratorFunction%":Zr,"%AsyncIteratorPrototype%":Zr,"%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%":Cx,"%eval%":eval,"%EvalError%":Px,"%Float32Array%":typeof Float32Array>"u"?Se:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Se:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Se:FinalizationRegistry,"%Function%":ug,"%GeneratorFunction%":Zr,"%Int8Array%":typeof Int8Array>"u"?Se:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Se:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Se:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Hr&&bt?bt(bt([][Symbol.iterator]())):Se,"%JSON%":typeof JSON=="object"?JSON:Se,"%Map%":typeof Map>"u"?Se:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Hr||!bt?Se:bt(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%":Rx,"%ReferenceError%":kx,"%Reflect%":typeof Reflect>"u"?Se:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Se:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Hr||!bt?Se:bt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Se:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Hr&&bt?bt(""[Symbol.iterator]()):Se,"%Symbol%":Hr?Symbol:Se,"%SyntaxError%":uo,"%ThrowTypeError%":Ox,"%TypedArray%":_x,"%TypeError%":oo,"%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%":Ix,"%WeakMap%":typeof WeakMap>"u"?Se:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Se:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Se:WeakSet};if(bt)try{null.error}catch(e){var Mx=bt(bt(e));Or["%Error.prototype%"]=Mx}var Dx=function e(t){var n;if(t==="%AsyncFunction%")n=ll("async function () {}");else if(t==="%GeneratorFunction%")n=ll("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=ll("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&bt&&(n=bt(o.prototype))}return Or[t]=n,n},ff={__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"]},qs=Ru,Li=Ex,jx=qs.call(Function.call,Array.prototype.concat),Nx=qs.call(Function.apply,Array.prototype.splice),hf=qs.call(Function.call,String.prototype.replace),Vi=qs.call(Function.call,String.prototype.slice),Fx=qs.call(Function.call,RegExp.prototype.exec),Lx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Vx=/\\(\\)?/g,$x=function(t){var n=Vi(t,0,1),r=Vi(t,-1);if(n==="%"&&r!=="%")throw new uo("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new uo("invalid intrinsic syntax, expected opening `%`");var o=[];return hf(t,Lx,function(s,i,a,l){o[o.length]=a?hf(l,Vx,"$1"):i||s}),o},Bx=function(t,n){var r=t,o;if(Li(ff,r)&&(o=ff[r],r="%"+o[0]+"%"),Li(Or,r)){var s=Or[r];if(s===Zr&&(s=Dx(r)),typeof s>"u"&&!n)throw new oo("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:s}}throw new uo("intrinsic "+t+" does not exist!")},Mo=function(t,n){if(typeof t!="string"||t.length===0)throw new oo("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new oo('"allowMissing" argument must be a boolean');if(Fx(/^%?[^%]*%?$/,t)===null)throw new uo("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=$x(t),o=r.length>0?r[0]:"",s=Bx("%"+o+"%",n),i=s.name,a=s.value,l=!1,c=s.alias;c&&(o=c[0],Nx(r,jx([0,1],c)));for(var u=1,d=!0;u<r.length;u+=1){var h=r[u],f=Vi(h,0,1),p=Vi(h,-1);if((f==='"'||f==="'"||f==="`"||p==='"'||p==="'"||p==="`")&&f!==p)throw new uo("property names with quotes must have matching quotes");if((h==="constructor"||!d)&&(l=!0),o+="."+h,i="%"+o+"%",Li(Or,i))a=Or[i];else if(a!=null){if(!(h in a)){if(!n)throw new oo("base intrinsic for "+t+" exists, but the property is not available.");return}if(Ir&&u+1>=r.length){var m=Ir(a,h);d=!!m,d&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else d=Li(a,h),a=a[h];d&&!l&&(Or[i]=a)}}return a},dg={exports:{}},ul,pf;function ku(){if(pf)return ul;pf=1;var e=Mo,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ul=t,ul}var Wx=Mo,Ri=Wx("%Object.getOwnPropertyDescriptor%",!0);if(Ri)try{Ri([],"length")}catch{Ri=null}var fg=Ri,mf=ku(),zx=cg,Ur=Ys,gf=fg,Hx=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ur("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ur("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ur("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ur("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ur("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ur("`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=!!gf&&gf(t,n);if(mf)mf(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 zx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},mc=ku(),hg=function(){return!!mc};hg.hasArrayLengthDefineBug=function(){if(!mc)return null;try{return mc([],"length",{value:1}).length!==1}catch{return!0}};var Ux=hg,Gx=Mo,yf=Hx,Yx=Ux(),vf=fg,bf=Ys,qx=Gx("%Math.floor%"),Kx=function(t,n){if(typeof t!="function")throw new bf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||qx(n)!==n)throw new bf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in t&&vf){var i=vf(t,"length");i&&!i.configurable&&(o=!1),i&&!i.writable&&(s=!1)}return(o||s||!r)&&(Yx?yf(t,"length",n,!0,!0):yf(t,"length",n)),t};(function(e){var t=Ru,n=Mo,r=Kx,o=Ys,s=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(i,s),l=ku(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var f=a(t,i,arguments);return r(f,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(dg);var Zx=dg.exports,pg=Mo,mg=Zx,Xx=mg(pg("String.prototype.indexOf")),Qx=function(t,n){var r=pg(t,!!n);return typeof r=="function"&&Xx(t,".prototype.")>-1?mg(r):r};const Jx={},ew=Object.freeze(Object.defineProperty({__proto__:null,default:Jx},Symbol.toStringTag,{value:"Module"})),tw=nx(ew);var Iu=typeof Map=="function"&&Map.prototype,dl=Object.getOwnPropertyDescriptor&&Iu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$i=Iu&&dl&&typeof dl.get=="function"?dl.get:null,xf=Iu&&Map.prototype.forEach,Ou=typeof Set=="function"&&Set.prototype,fl=Object.getOwnPropertyDescriptor&&Ou?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bi=Ou&&fl&&typeof fl.get=="function"?fl.get:null,wf=Ou&&Set.prototype.forEach,nw=typeof WeakMap=="function"&&WeakMap.prototype,hs=nw?WeakMap.prototype.has:null,rw=typeof WeakSet=="function"&&WeakSet.prototype,ps=rw?WeakSet.prototype.has:null,ow=typeof WeakRef=="function"&&WeakRef.prototype,Sf=ow?WeakRef.prototype.deref:null,sw=Boolean.prototype.valueOf,iw=Object.prototype.toString,aw=Function.prototype.toString,lw=String.prototype.match,Au=String.prototype.slice,qn=String.prototype.replace,cw=String.prototype.toUpperCase,Tf=String.prototype.toLowerCase,gg=RegExp.prototype.test,Ef=Array.prototype.concat,fn=Array.prototype.join,uw=Array.prototype.slice,Cf=Math.floor,gc=typeof BigInt=="function"?BigInt.prototype.valueOf:null,hl=Object.getOwnPropertySymbols,yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,fo=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Mt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===fo||!0)?Symbol.toStringTag:null,yg=Object.prototype.propertyIsEnumerable,Pf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Rf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||gg.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Cf(-e):Cf(e);if(r!==e){var o=String(r),s=Au.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 vc=tw,kf=vc.custom,If=bg(kf)?kf:null,dw=function e(t,n,r,o){var s=n||{};if(Un(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Un(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=Un(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(Un(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(Un(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 wg(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Rf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?Rf(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 bc(t)?"[Array]":"[Object]";var d=Iw(s,r);if(typeof o>"u")o=[];else if(xg(o,t)>=0)return"[Circular]";function h(F,R,A){if(R&&(o=uw.call(o),o.push(R)),A){var D={depth:s.depth};return Un(s,"quoteStyle")&&(D.quoteStyle=s.quoteStyle),e(F,D,r+1,o)}return e(F,s,r+1,o)}if(typeof t=="function"&&!Of(t)){var f=xw(t),p=ui(t,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+fn.call(p,", ")+" }":"")}if(bg(t)){var m=fo?qn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yc.call(t);return typeof t=="object"&&!fo?es(m):m}if(Pw(t)){for(var v="<"+Tf.call(String(t.nodeName)),g=t.attributes||[],x=0;x<g.length;x++)v+=" "+g[x].name+"="+vg(fw(g[x].value),"double",s);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+Tf.call(String(t.nodeName))+">",v}if(bc(t)){if(t.length===0)return"[]";var y=ui(t,h);return d&&!kw(y)?"["+xc(y,d)+"]":"[ "+fn.call(y,", ")+" ]"}if(pw(t)){var T=ui(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!yg.call(t,"cause")?"{ ["+String(t)+"] "+fn.call(Ef.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+fn.call(T,", ")+" }"}if(typeof t=="object"&&i){if(If&&typeof t[If]=="function"&&vc)return vc(t,{depth:u-r});if(i!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ww(t)){var S=[];return xf&&xf.call(t,function(F,R){S.push(h(R,t,!0)+" => "+h(F,t))}),Af("Map",$i.call(t),S,d)}if(Ew(t)){var E=[];return wf&&wf.call(t,function(F){E.push(h(F,t))}),Af("Set",Bi.call(t),E,d)}if(Sw(t))return pl("WeakMap");if(Cw(t))return pl("WeakSet");if(Tw(t))return pl("WeakRef");if(gw(t))return es(h(Number(t)));if(vw(t))return es(h(gc.call(t)));if(yw(t))return es(sw.call(t));if(mw(t))return es(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof cf<"u"&&t===cf)return"{ [object globalThis] }";if(!hw(t)&&!Of(t)){var k=ui(t,h),P=Pf?Pf(t)===Object.prototype:t instanceof Object||t.constructor===Object,I=t instanceof Object?"":"null prototype",C=!P&&Mt&&Object(t)===t&&Mt in t?Au.call(ir(t),8,-1):I?"Object":"",N=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=N+(C||I?"["+fn.call(Ef.call([],C||[],I||[]),": ")+"] ":"");return k.length===0?M+"{}":d?M+"{"+xc(k,d)+"}":M+"{ "+fn.call(k,", ")+" }"}return String(t)};function vg(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function fw(e){return qn.call(String(e),/"/g,"&quot;")}function bc(e){return ir(e)==="[object Array]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function hw(e){return ir(e)==="[object Date]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function Of(e){return ir(e)==="[object RegExp]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function pw(e){return ir(e)==="[object Error]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function mw(e){return ir(e)==="[object String]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function gw(e){return ir(e)==="[object Number]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function yw(e){return ir(e)==="[object Boolean]"&&(!Mt||!(typeof e=="object"&&Mt in e))}function bg(e){if(fo)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!yc)return!1;try{return yc.call(e),!0}catch{}return!1}function vw(e){if(!e||typeof e!="object"||!gc)return!1;try{return gc.call(e),!0}catch{}return!1}var bw=Object.prototype.hasOwnProperty||function(e){return e in this};function Un(e,t){return bw.call(e,t)}function ir(e){return iw.call(e)}function xw(e){if(e.name)return e.name;var t=lw.call(aw.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function xg(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 ww(e){if(!$i||!e||typeof e!="object")return!1;try{$i.call(e);try{Bi.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Sw(e){if(!hs||!e||typeof e!="object")return!1;try{hs.call(e,hs);try{ps.call(e,ps)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Tw(e){if(!Sf||!e||typeof e!="object")return!1;try{return Sf.call(e),!0}catch{}return!1}function Ew(e){if(!Bi||!e||typeof e!="object")return!1;try{Bi.call(e);try{$i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Cw(e){if(!ps||!e||typeof e!="object")return!1;try{ps.call(e,ps);try{hs.call(e,hs)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Pw(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function wg(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return wg(Au.call(e,0,t.maxStringLength),t)+r}var o=qn.call(qn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Rw);return vg(o,"single",t)}function Rw(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":"")+cw.call(t.toString(16))}function es(e){return"Object("+e+")"}function pl(e){return e+" { ? }"}function Af(e,t,n,r){var o=r?xc(n,r):fn.call(n,", ");return e+" ("+t+") {"+o+"}"}function kw(e){for(var t=0;t<e.length;t++)if(xg(e[t],`
2
- `)>=0)return!1;return!0}function Iw(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=fn.call(Array(e.indent+1)," ");else return null;return{base:n,prev:fn.call(Array(t+1),n)}}function xc(e,t){if(e.length===0)return"";var n=`
3
- `+t.prev+t.base;return n+fn.call(e,","+n)+`
4
- `+t.prev}function ui(e,t){var n=bc(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Un(e,o)?t(e[o],e):""}var s=typeof hl=="function"?hl(e):[],i;if(fo){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var l in e)Un(e,l)&&(n&&String(Number(l))===l&&l<e.length||fo&&i["$"+l]instanceof Symbol||(gg.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof hl=="function")for(var c=0;c<s.length;c++)yg.call(e,s[c])&&r.push("["+t(s[c])+"]: "+t(e[s[c]],e));return r}var Sg=Mo,Do=Qx,Ow=dw,Aw=Ys,di=Sg("%WeakMap%",!0),fi=Sg("%Map%",!0),_w=Do("WeakMap.prototype.get",!0),Mw=Do("WeakMap.prototype.set",!0),Dw=Do("WeakMap.prototype.has",!0),jw=Do("Map.prototype.get",!0),Nw=Do("Map.prototype.set",!0),Fw=Do("Map.prototype.has",!0),_u=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},Lw=function(e,t){var n=_u(e,t);return n&&n.value},Vw=function(e,t,n){var r=_u(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},$w=function(e,t){return!!_u(e,t)},Bw=function(){var t,n,r,o={assert:function(s){if(!o.has(s))throw new Aw("Side channel does not contain "+Ow(s))},get:function(s){if(di&&s&&(typeof s=="object"||typeof s=="function")){if(t)return _w(t,s)}else if(fi){if(n)return jw(n,s)}else if(r)return Lw(r,s)},has:function(s){if(di&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Dw(t,s)}else if(fi){if(n)return Fw(n,s)}else if(r)return $w(r,s);return!1},set:function(s,i){di&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new di),Mw(t,s,i)):fi?(n||(n=new fi),Nw(n,s,i)):(r||(r={key:{},next:null}),Vw(r,s,i))}};return o},_f=e=>Array.isArray(e),ml=e=>e===void 0,gl=e=>e===null,Ww=Function.bind.call(Function.call,Object.prototype.toString),zw=e=>!!e&&Ww(e)==="[object Error]"||e instanceof Error,Tg=(e,t)=>e instanceof t,Hw=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Uw=e=>Object.prototype.toString.call(e)==="[object Date]"&&Tg(e,Date),bn={array:_f,date:Uw,empty:e=>gl(e)||ml(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:Tg,isError:zw,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>gl(e)||ml(e),null:gl,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!_f(e)&&typeof e=="object",primitive:Hw,string:e=>typeof e=="string",undefined:ml},wc=(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]=wc(s?[]:{},o,n)}else e[r]=wc(e[r],o,n)}else e[r]=n;return e},Gw=e=>Object.keys(e),Yw=e=>e.replace("[",".").replace("]","").split("."),yl=(e,t,n)=>{const r=Array.isArray(t)?t:Yw(t),o=structuredClone(e);return wc(o,r,n),o};const Mu="-";function qw(e){const t=Zw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const a=i.split(Mu);return a[0]===""&&a.length!==1&&a.shift(),Eg(a,t)||Kw(i)}function s(i,a){const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Eg(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Eg(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Mu);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId}const Mf=/^\[(.+)\]$/;function Kw(e){if(Mf.test(e)){const t=Mf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Zw(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Qw(Object.entries(e.classGroups),n).forEach(([s,i])=>{Sc(i,r,s,t)}),r}function Sc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Df(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Xw(o)){Sc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Sc(i,Df(t,s),n,r)})})}function Df(e,t){let n=e;return t.split(Mu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Xw(e){return e.isThemeGetter}function Qw(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 Jw(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 Cg="!";function e1(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,d;for(let v=0;v<a.length;v++){let g=a[v];if(c===0){if(g===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),f=h.startsWith(Cg),p=f?h.substring(1):h,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:i})}:i}function t1(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 n1(e){return{cache:Jw(e.cacheSize),parseClassName:e1(e),...qw(e)}}const r1=/\s+/;function o1(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(r1).map(i=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(i);let d=!!u,h=r(d?c.substring(0,u):c);if(!h){if(!d)return{isTailwindClass:!1,originalClassName:i};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:i};d=!1}const f=t1(a).join(":");return{isTailwindClass:!0,modifierId:l?f+Cg:f,classGroupId:h,originalClassName:i,hasPostfixModifier:d}}).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(d=>s.add(a+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function s1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Pg(t))&&(r&&(r+=" "),r+=n);return r}function Pg(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pg(e[r]))&&(n&&(n+=" "),n+=t);return n}function i1(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return n=n1(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=o1(l,n);return o(l,u),u}return function(){return s(s1.apply(null,arguments))}}function Ye(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Rg=/^\[(?:([a-z-]+):)?(.+)\]$/i,a1=/^\d+\/\d+$/,l1=new Set(["px","full","screen"]),c1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,u1=/\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$/,d1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,f1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,h1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function On(e){return Pr(e)||l1.has(e)||a1.test(e)}function Bn(e){return jo(e,"length",w1)}function Pr(e){return!!e&&!Number.isNaN(Number(e))}function hi(e){return jo(e,"number",Pr)}function ts(e){return!!e&&Number.isInteger(Number(e))}function p1(e){return e.endsWith("%")&&Pr(e.slice(0,-1))}function ye(e){return Rg.test(e)}function Wn(e){return c1.test(e)}const m1=new Set(["length","size","percentage"]);function g1(e){return jo(e,m1,kg)}function y1(e){return jo(e,"position",kg)}const v1=new Set(["image","url"]);function b1(e){return jo(e,v1,T1)}function x1(e){return jo(e,"",S1)}function ns(){return!0}function jo(e,t,n){const r=Rg.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function w1(e){return u1.test(e)&&!d1.test(e)}function kg(){return!1}function S1(e){return f1.test(e)}function T1(e){return h1.test(e)}function E1(){const e=Ye("colors"),t=Ye("spacing"),n=Ye("blur"),r=Ye("brightness"),o=Ye("borderColor"),s=Ye("borderRadius"),i=Ye("borderSpacing"),a=Ye("borderWidth"),l=Ye("contrast"),c=Ye("grayscale"),u=Ye("hueRotate"),d=Ye("invert"),h=Ye("gap"),f=Ye("gradientColorStops"),p=Ye("gradientColorStopPositions"),m=Ye("inset"),v=Ye("margin"),g=Ye("opacity"),x=Ye("padding"),y=Ye("saturate"),T=Ye("scale"),S=Ye("sepia"),E=Ye("skew"),k=Ye("space"),P=Ye("translate"),I=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ye,t],M=()=>[ye,t],F=()=>["",On,Bn],R=()=>["auto",Pr,ye],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",ye],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Pr,hi],Z=()=>[Pr,ye];return{cacheSize:500,separator:":",theme:{colors:[ns],spacing:[On,Bn],blur:["none","",Wn,ye],brightness:V(),borderColor:[e],borderRadius:["none","","full",Wn,ye],borderSpacing:M(),borderWidth:F(),contrast:V(),grayscale:U(),hueRotate:Z(),invert:U(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[p1,Bn],inset:N(),margin:N(),opacity:V(),padding:M(),saturate:V(),scale:V(),sepia:U(),skew:Z(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[Wn]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:[...A(),ye]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],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",ts,ye]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ts,ye]}],"grid-cols":[{"grid-cols":[ns]}],"col-start-end":[{col:["auto",{span:["full",ts,ye]},ye]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[ns]}],"row-start-end":[{row:["auto",{span:[ts,ye]},ye]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[Wn]},Wn]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Wn,Bn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hi]}],"font-family":[{font:[ns]}],"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",ye]}],"line-clamp":[{"line-clamp":["none",Pr,hi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",On,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",On,Bn]}],"underline-offset":[{"underline-offset":["auto",On,ye]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],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",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),y1]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",g1]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},b1]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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":[g]}],"border-style":[{border:[...D(),"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":[g]}],"divide-style":[{divide:D()}],"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:["",...D()]}],"outline-offset":[{"outline-offset":[On,ye]}],"outline-w":[{outline:[On,Bn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[On,Bn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wn,x1]}],"shadow-color":[{shadow:[ns]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Wn,ye]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",ye]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ts,ye]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ye]}],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",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[On,Bn,hi]}],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 C1=i1(E1),Du=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},P1=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),R1=e=>bn.function(e),He=(...e)=>C1(ex(e)),Tc=(e,t)=>{const n=new Event("input",{bubbles:!0});return e==null||e.dispatchEvent(n),n},Oa=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},No=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),k1=Gs("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ho=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 w.jsxs(No,{...l,ref:c,type:s,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:He(k1({size:i,rounded:a,theme:o}),t),children:[n,l.children]})}),I1=Gs("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),O1=Gs("inline-flex rounded-pill gap-1.5 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:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),A1=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:s,size:i,...a},l){return w.jsxs(No,{...a,ref:l,"data-theme":s,as:a.as??"span",className:He(O1({size:i,theme:s}),t),children:[n?w.jsx("span",{className:I1({theme:n})}):null,r,a.children]})}),po=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Aa=b.createContext({}),_a=b.createContext(null),ju=typeof document<"u",Ma=ju?b.useLayoutEffect:b.useEffect,Ig=b.createContext({strict:!1}),Da=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_1="framerAppearId",Og="data-"+Da(_1),M1={skipAnimations:!1,useManualTiming:!1};function D1(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,d=!1)=>{const f=d&&r?t:n;return u&&s.add(c),f.has(c)||f.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 pi=["read","resolveKeyframes","update","preRender","render","postRender"],j1=40;function Ag(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=pi.reduce((g,x)=>(g[x]=D1(s),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=i,f=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,j1),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(f))},p=()=>{n=!0,r=!0,o.isProcessing||e(f)};return{schedule:pi.reduce((g,x)=>{const y=i[x];return g[x]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),g},{}),cancel:g=>{for(let x=0;x<pi.length;x++)i[pi[x]].cancel(g)},state:o,steps:i}}const{schedule:Nu,cancel:xF}=Ag(queueMicrotask,!1);function Qr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const _g=b.createContext({});let jf=!1;function N1(e,t,n,r,o){const{visualElement:s}=b.useContext(Aa),i=b.useContext(Ig),a=b.useContext(_a),l=b.useContext(po).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,d=b.useContext(_g);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&L1(c.current,n,o,d),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[Og]&&!window.HandoffComplete));return Ma(()=>{u&&(u.updateFeatures(),Nu.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,jf||(jf=!0,queueMicrotask(F1))))}),u}function F1(){window.HandoffComplete=!0}function L1(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:Mg(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&Qr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Mg(e){if(e)return e.options.allowProjection!==!1?e.projection:Mg(e.parent)}function V1(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):Qr(n)&&(n.current=r))},[t])}function ks(e){return typeof e=="string"||Array.isArray(e)}function Is(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Fu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lu=["initial",...Fu];function ja(e){return Is(e.animate)||Lu.some(t=>ks(e[t]))}function Dg(e){return!!(ja(e)||e.variants)}function $1(e,t){if(ja(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 B1(e){const{initial:t,animate:n}=$1(e,b.useContext(Aa));return b.useMemo(()=>({initial:t,animate:n}),[Nf(t),Nf(n)])}function Nf(e){return Array.isArray(e)?e.join(" "):e}const Ff={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"]},mo={};for(const e in Ff)mo[e]={isEnabled:t=>Ff[e].some(n=>!!t[n])};function W1(e){for(const t in e)mo[t]={...mo[t],...e[t]}}const Os=b.createContext({}),z1=Symbol.for("motionComponentSymbol"),Rt=e=>e;let Fo=Rt,qt=Rt;process.env.NODE_ENV!=="production"&&(Fo=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},qt=(e,t)=>{if(!e)throw new Error(t)});function H1({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&W1(e);function s(a,l){let c;const u={...b.useContext(po),...a,layoutId:U1(a)},{isStatic:d}=u,h=B1(a),f=r(a,d);if(!d&&ju){G1(u,e);const p=Y1(u);c=p.MeasureLayout,h.visualElement=N1(o,f,u,t,p.ProjectionNode)}return w.jsxs(Aa.Provider,{value:h,children:[c&&h.visualElement?w.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,V1(f,h.visualElement,l),f,d,h.visualElement)]})}const i=b.forwardRef(s);return i[z1]=o,i}function U1({layoutId:e}){const t=b.useContext(Os).id;return t&&e!==void 0?t+"-"+e:e}function G1(e,t){const n=b.useContext(Ig).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Fo(!1,r):qt(!1,r)}}function Y1(e){const{drag:t,layout:n}=mo;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 q1(e){function t(r,o={}){return H1(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 K1=["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 Vu(e){return typeof e!="string"||e.includes("-")?!1:!!(K1.indexOf(e)>-1||/[A-Z]/u.test(e))}const Wi={};function Z1(e){Object.assign(Wi,e)}const Ks=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ar=new Set(Ks);function jg(e,{layout:t,layoutId:n}){return ar.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Wi[e]||e==="opacity")}const vt=e=>!!(e&&e.getVelocity),X1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Q1=Ks.length;function J1(e,t,n){let r="";for(let o=0;o<Q1;o++){const s=Ks[o];if(e[s]!==void 0){const i=X1[s]||s;r+=`${i}(${e[s]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Ng=e=>t=>typeof t=="string"&&t.startsWith(e),Fg=Ng("--"),eS=Ng("var(--"),$u=e=>eS(e)?tS.test(e.split("/*")[0].trim()):!1,tS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,nS=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Jn=(e,t,n)=>n>t?t:n<e?e:n,Lo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ms={...Lo,transform:e=>Jn(0,1,e)},mi={...Lo,default:1},gs=e=>Math.round(e*1e5)/1e5,Bu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,rS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,oS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Zs(e){return typeof e=="string"}function sS(e){return e==null}const Xs=e=>({test:t=>Zs(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Hn=Xs("deg"),xn=Xs("%"),de=Xs("px"),iS=Xs("vh"),aS=Xs("vw"),Lf={...xn,parse:e=>xn.parse(e)/100,transform:e=>xn.transform(e*100)},Vf={...Lo,transform:Math.round},Lg={borderWidth:de,borderTopWidth:de,borderRightWidth:de,borderBottomWidth:de,borderLeftWidth:de,borderRadius:de,radius:de,borderTopLeftRadius:de,borderTopRightRadius:de,borderBottomRightRadius:de,borderBottomLeftRadius:de,width:de,maxWidth:de,height:de,maxHeight:de,size:de,top:de,right:de,bottom:de,left:de,padding:de,paddingTop:de,paddingRight:de,paddingBottom:de,paddingLeft:de,margin:de,marginTop:de,marginRight:de,marginBottom:de,marginLeft:de,rotate:Hn,rotateX:Hn,rotateY:Hn,rotateZ:Hn,scale:mi,scaleX:mi,scaleY:mi,scaleZ:mi,skew:Hn,skewX:Hn,skewY:Hn,distance:de,translateX:de,translateY:de,translateZ:de,x:de,y:de,z:de,perspective:de,transformPerspective:de,opacity:ms,originX:Lf,originY:Lf,originZ:de,zIndex:Vf,backgroundPositionX:de,backgroundPositionY:de,fillOpacity:ms,strokeOpacity:ms,numOctaves:Vf};function Wu(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 d=t[u];if(Fg(u)){o[u]=d;continue}const h=Lg[u],f=nS(d,h);if(ar.has(u)){if(a=!0,s[u]=f,!c)continue;d!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,i[u]=f):r[u]=f}if(t.transform||(a||n?r.transform=J1(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:d="50%",originZ:h=0}=i;r.transformOrigin=`${u} ${d} ${h}`}}const zu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vg(e,t,n){for(const r in t)!vt(t[r])&&!jg(r,n)&&(e[r]=t[r])}function lS({transformTemplate:e},t){return b.useMemo(()=>{const n=zu();return Wu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cS(e,t){const n=e.style||{},r={};return Vg(r,n,e),Object.assign(r,lS(e,t)),r}function uS(e,t){const n={},r=cS(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 dS=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 zi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||dS.has(e)}let $g=e=>!zi(e);function Bg(e){e&&($g=t=>t.startsWith("on")?!zi(t):e(t))}try{Bg(require("@emotion/is-prop-valid").default)}catch{}function fS(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||($g(o)||n===!0&&zi(o)||!t&&!zi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function $f(e,t,n){return typeof e=="string"?e:de.transform(t+n*e)}function hS(e,t,n){const r=$f(t,e.x,e.width),o=$f(n,e.y,e.height);return`${r} ${o}`}const pS={offset:"stroke-dashoffset",array:"stroke-dasharray"},mS={offset:"strokeDashoffset",array:"strokeDasharray"};function gS(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?pS:mS;e[s.offset]=de.transform(-r);const i=de.transform(t),a=de.transform(n);e[s.array]=`${i} ${a}`}function Hu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Wu(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f,dimensions:p}=e;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(o!==void 0||s!==void 0||f.transform)&&(f.transformOrigin=hS(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&gS(h,i,a,l,!1)}const Wg=()=>({...zu(),attrs:{}}),Uu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yS(e,t,n,r){const o=b.useMemo(()=>{const s=Wg();return Hu(s,t,Uu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Vg(s,e.style,e),o.style={...s,...o.style}}return o}function vS(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Vu(n)?yS:uS)(r,s,i,n),c=fS(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:d}=r,h=b.useMemo(()=>vt(d)?d.get():d,[d]);return b.createElement(n,{...u,children:h})}}function zg(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 Hg=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 Ug(e,t,n,r){zg(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Hg.has(o)?o:Da(o),t.attrs[o])}function Gu(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(vt(o[i])||t.style&&vt(t.style[i])||jg(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 Gg(e,t,n){const r=Gu(e,t,n);for(const o in e)if(vt(e[o])||vt(t[o])){const s=Ks.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function Bf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yu(e,t,n,r){if(typeof t=="function"){const[o,s]=Bf(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]=Bf(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Tn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ec=e=>Array.isArray(e),bS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),xS=e=>Ec(e)?e[e.length-1]||0:e;function ki(e){const t=vt(e)?e.get():e;return bS(t)?t.toValue():t}const Yg=new Set(["opacity","clipPath","filter","transform"]);function qg(e){if(ar.has(e))return"transform";if(Yg.has(e))return Da(e)}function Na(e,t){e.indexOf(t)===-1&&e.push(t)}function Qs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function wS([...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 SS({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,s,i,a){const l={latestValues:ES(o,s,i,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Kg=e=>(t,n)=>{const r=b.useContext(Aa),o=b.useContext(_a),s=()=>SS(e,t,r,o,n);return n?s():Tn(s)};function TS(e,t){const n=qg(t);n&&Na(e,n)}function Wf(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const s=Yu(e,r[o]);if(s){const{transitionEnd:i,transition:a,...l}=s;n(l,i)}}}function ES(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 v in c)i[v]=ki(c[v]);let{initial:u,animate:d}=e;const h=ja(e),f=Dg(e);t&&f&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||u===!1;const m=p?d:u;return m&&typeof m!="boolean"&&!Is(m)&&Wf(e,m,(v,g)=>{for(const x in v){let y=v[x];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(i[x]=y)}for(const x in g)i[x]=g[x]}),l&&(d&&u!==!1&&!Is(d)&&Wf(e,d,v=>{for(const g in v)TS(a,g)}),a.length&&(i.willChange=a.join(","))),i}const{schedule:Ae,cancel:En,state:Tt,steps:vl}=Ag(typeof requestAnimationFrame<"u"?requestAnimationFrame:Rt,!0),CS={useVisualState:Kg({scrapeMotionValuesFromProps:Gg,createRenderState:Wg,onMount:(e,t,{renderState:n,latestValues:r})=>{Ae.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Ae.render(()=>{Hu(n,r,Uu(t.tagName),e.transformTemplate),Ug(t,n)})}})},PS={useVisualState:Kg({applyWillChange:!0,scrapeMotionValuesFromProps:Gu,createRenderState:zu})};function RS(e,{forwardMotionProps:t=!1},n,r){return{...Vu(e)?CS:PS,preloadedFeatures:n,useRender:vS(t),createVisualElement:r,Component:e}}function _n(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Zg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Fa(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const kS=e=>t=>Zg(t)&&e(t,Fa(t));function Dn(e,t,n,r){return _n(e,t,kS(n),r)}const IS=(e,t)=>n=>t(e(n)),jn=(...e)=>e.reduce(IS);function Xg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const zf=Xg("dragHorizontal"),Hf=Xg("dragVertical");function Qg(e){let t=!1;if(e==="y")t=Hf();else if(e==="x")t=zf();else{const n=zf(),r=Hf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Jg(){const e=Qg(!0);return e?(e(),!1):!0}class lr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Uf(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(s,i)=>{if(s.pointerType==="touch"||Jg())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Ae.postRender(()=>l(s,i))};return Dn(e.current,n,o,{passive:!e.getProps()[r]})}class OS extends lr{mount(){this.unmount=jn(Uf(this.node,!0),Uf(this.node,!1))}unmount(){}}class AS 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=jn(_n(this.node.current,"focus",()=>this.onFocus()),_n(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ey=(e,t)=>t?e===t?!0:ey(e,t.parentElement):!1;function bl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Fa(n))}class _S extends lr{constructor(){super(...arguments),this.removeStartListeners=Rt,this.removeEndListeners=Rt,this.removeAccessibleListeners=Rt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Dn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps(),h=!d&&!ey(this.node.current,a.target)?u:c;h&&Ae.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),i=Dn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=jn(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()||bl("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Ae.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=_n(this.node.current,"keyup",i),bl("down",(a,l)=>{this.startPress(a,l)})},n=_n(this.node.current,"keydown",t),r=()=>{this.isPressing&&bl("cancel",(s,i)=>this.cancelPress(s,i))},o=_n(this.node.current,"blur",r);this.removeAccessibleListeners=jn(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&&Ae.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Jg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Ae.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Dn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=_n(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=jn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Cc=new WeakMap,xl=new WeakMap,MS=e=>{const t=Cc.get(e.target);t&&t(e)},DS=e=>{e.forEach(MS)};function jS({root:e,...t}){const n=e||document;xl.has(n)||xl.set(n,{});const r=xl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(DS,{root:e,...t})),r[o]}function NS(e,t,n){const r=jS(t);return Cc.set(e,n),r.observe(e),()=>{Cc.delete(e),r.unobserve(e)}}const FS={some:0,all:1};class LS 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:FS[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:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return NS(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(VS(t,n))&&this.startObserver()}unmount(){}}function VS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $S={inView:{Feature:LS},tap:{Feature:_S},focus:{Feature:AS},hover:{Feature:OS}};function ty(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 La(e,t,n){const r=e.getProps();return Yu(r,t,n!==void 0?n:r.custom,e)}const wn=e=>e*1e3,Sn=e=>e/1e3,BS={type:"spring",stiffness:500,damping:25,restSpeed:10},WS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zS={type:"keyframes",duration:.8},HS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},US=(e,{keyframes:t})=>t.length>2?zS:ar.has(e)?e.startsWith("scale")?WS(t[1]):BS:HS;function GS({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 qu(e,t){return e[t]||e.default||e}const YS=e=>e!==null;function Va(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(YS),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}let Ii;function qS(){Ii=void 0}const Zn={now:()=>(Ii===void 0&&Zn.set(Tt.isProcessing||M1.useManualTiming?Tt.timestamp:performance.now()),Ii),set:e=>{Ii=e,queueMicrotask(qS)}},ny=e=>/^0[^.\s]+$/u.test(e);function KS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ny(e):!0}const ry=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ZS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function XS(e){const t=ZS.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const QS=4;function oy(e,t,n=1){qt(n<=QS,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=XS(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return ry(i)?parseFloat(i):i}return $u(o)?oy(o,t,n+1):o}const JS=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Gf=e=>e===Lo||e===de,Yf=(e,t)=>parseFloat(e.split(", ")[t]),qf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Yf(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Yf(s[1],e):0}},eT=new Set(["x","y","z"]),tT=Ks.filter(e=>!eT.has(e));function nT(e){const t=[];return tT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const go={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:qf(4,13),y:qf(5,14)};go.translateX=go.x;go.translateY=go.y;const sy=e=>t=>t.test(e),rT={test:e=>e==="auto",parse:e=>e},iy=[Lo,de,xn,Hn,aS,iS,rT],Kf=e=>iy.find(sy(e)),Ar=new Set;let Pc=!1,Rc=!1;function ay(){if(Rc){const e=Array.from(Ar).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=nT(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)})}Rc=!1,Pc=!1,Ar.forEach(e=>e.complete()),Ar.clear()}function ly(){Ar.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rc=!0)})}function oT(){ly(),ay()}class Ku{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?(Ar.add(this),Pc||(Pc=!0,Ae.read(ly),Ae.resolveKeyframes(ay))):(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),Ar.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ar.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Zu=(e,t)=>n=>!!(Zs(n)&&oS.test(n)&&n.startsWith(e)||t&&!sS(n)&&Object.prototype.hasOwnProperty.call(n,t)),cy=(e,t,n)=>r=>{if(!Zs(r))return r;const[o,s,i,a]=r.match(Bu);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},sT=e=>Jn(0,255,e),wl={...Lo,transform:e=>Math.round(sT(e))},Rr={test:Zu("rgb","red"),parse:cy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wl.transform(e)+", "+wl.transform(t)+", "+wl.transform(n)+", "+gs(ms.transform(r))+")"};function iT(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 kc={test:Zu("#"),parse:iT,transform:Rr.transform},Jr={test:Zu("hsl","hue"),parse:cy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xn.transform(gs(t))+", "+xn.transform(gs(n))+", "+gs(ms.transform(r))+")"},It={test:e=>Rr.test(e)||kc.test(e)||Jr.test(e),parse:e=>Rr.test(e)?Rr.parse(e):Jr.test(e)?Jr.parse(e):kc.parse(e),transform:e=>Zs(e)?e:e.hasOwnProperty("red")?Rr.transform(e):Jr.transform(e)};function aT(e){var t,n;return isNaN(e)&&Zs(e)&&(((t=e.match(Bu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(rS))===null||n===void 0?void 0:n.length)||0)>0}const uy="number",dy="color",lT="var",cT="var(",Zf="${}",uT=/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 As(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(uT,l=>(It.test(l)?(r.color.push(s),o.push(dy),n.push(It.parse(l))):l.startsWith(cT)?(r.var.push(s),o.push(lT),n.push(l)):(r.number.push(s),o.push(uy),n.push(parseFloat(l))),++s,Zf)).split(Zf);return{values:n,split:a,indexes:r,types:o}}function fy(e){return As(e).values}function hy(e){const{split:t,types:n}=As(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===uy?s+=gs(o[i]):a===dy?s+=It.transform(o[i]):s+=o[i]}return s}}const dT=e=>typeof e=="number"?0:e;function fT(e){const t=fy(e);return hy(e)(t.map(dT))}const er={test:aT,parse:fy,createTransformer:hy,getAnimatableNone:fT},hT=new Set(["brightness","contrast","saturate","opacity"]);function pT(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bu)||[];if(!r)return e;const o=n.replace(r,"");let s=hT.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const mT=/\b([a-z-]*)\(.*?\)/gu,Ic={...er,getAnimatableNone:e=>{const t=e.match(mT);return t?t.map(pT).join(" "):e}},gT={...Lg,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:Ic,WebkitFilter:Ic},Xu=e=>gT[e];function py(e,t){let n=Xu(e);return n!==Ic&&(n=er),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yT=new Set(["auto","none","0"]);function vT(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!yT.has(s)&&As(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=py(n,o)}class my extends Ku{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(),$u(c))){const u=oy(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!JS.has(r)||t.length!==2)return;const[o,s]=t,i=Kf(o),a=Kf(s);if(i!==a)if(Gf(i)&&Gf(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++)KS(t[o])&&r.push(o);r.length&&vT(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=go[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]=go[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 Xf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(er.test(e)||e==="0")&&!e.startsWith("url("));function bT(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 xT(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=Xf(o,t),a=Xf(s,t);return Fo(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:bT(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&&oT(),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&&!xT(t,r,o,s))if(i)this.options.duration=0;else{l==null||l(Va(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 wT=5;function by(e,t,n){const r=Math.max(t-wT,0);return vy(n-e(r),t-r)}const Sl=.001,ST=.01,Qf=10,TT=.05,ET=1;function CT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s;Fo(e<=wn(Qf),"Spring duration must be 10 seconds or less");let i=1-t;i=Jn(TT,ET,i),e=Jn(ST,Qf,Sn(e)),i<1?(o=c=>{const u=c*i,d=u*e,h=u-n,f=Oc(c,i),p=Math.exp(-d);return Sl-h/f*p},s=c=>{const d=c*i*e,h=d*n+n,f=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Oc(Math.pow(c,2),i);return(-o(c)+Sl>0?-1:1)*((h-f)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Sl+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=RT(o,s,a);if(e=wn(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 PT=12;function RT(e,t,n){let r=n;for(let o=1;o<PT;o++)r=r-e(r)/t(r);return r}function Oc(e,t){return e*Math.sqrt(1-t*t)}const kT=["duration","bounce"],IT=["stiffness","damping","mass"];function Jf(e,t){return t.some(n=>e[n]!==void 0)}function OT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Jf(e,IT)&&Jf(e,kT)){const n=CT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Qu({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:d,isResolvedFromDuration:h}=OT({...r,velocity:-Sn(r.velocity||0)}),f=d||0,p=l/(2*Math.sqrt(a*c)),m=s-o,v=Sn(Math.sqrt(a/c)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(p<1){const y=Oc(v,p);x=T=>{const S=Math.exp(-p*v*T);return s-S*((f+p*v*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)x=y=>s-Math.exp(-v*y)*(m+(f+v*m)*y);else{const y=v*Math.sqrt(p*p-1);x=T=>{const S=Math.exp(-p*v*T),E=Math.min(y*T,300);return s-S*((f+p*v*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=x(y);if(h)i.done=y>=u;else{let S=f;y!==0&&(p<1?S=by(x,y,T):S=0);const E=Math.abs(S)<=n,k=Math.abs(s-T)<=t;i.done=E&&k}return i.value=i.done?s:T,i}}}function eh({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 d=e[0],h={done:!1,value:d},f=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);const x=P=>-m*Math.exp(-P/r),y=P=>g+x(P),T=P=>{const I=x(P),C=y(P);h.done=Math.abs(I)<=c,h.value=h.done?g:C};let S,E;const k=P=>{f(h.value)&&(S=P,E=Qu({keyframes:[h.value,p(h.value)],velocity:by(y,P,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:P=>{let I=!1;return!E&&S===void 0&&(I=!0,T(P),k(P)),S!==void 0&&P>=S?E.next(P-S):(!I&&T(P),h)}}}const xy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AT=1e-7,_T=12;function MT(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=xy(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>AT&&++a<_T);return i}function Js(e,t,n,r){if(e===t&&n===r)return Rt;const o=s=>MT(s,0,1,e,n);return s=>s===0||s===1?s:xy(o(s),t,r)}const DT=Js(.42,0,1,1),jT=Js(0,0,.58,1),wy=Js(.42,0,.58,1),Sy=e=>Array.isArray(e)&&typeof e[0]!="number",Ty=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ey=e=>t=>1-e(1-t),Ju=e=>1-Math.sin(Math.acos(e)),Cy=Ey(Ju),NT=Ty(Ju),Py=Js(.33,1.53,.69,.99),ed=Ey(Py),FT=Ty(ed),LT=e=>(e*=2)<1?.5*ed(e):.5*(2-Math.pow(2,-10*(e-1))),th={linear:Rt,easeIn:DT,easeInOut:wy,easeOut:jT,circIn:Ju,circInOut:NT,circOut:Cy,backIn:ed,backInOut:FT,backOut:Py,anticipate:LT},Ac=e=>{if(Array.isArray(e)){qt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Js(t,n,r,o)}else if(typeof e=="string")return qt(th[e]!==void 0,`Invalid easing type '${e}'`),th[e];return e},yo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ke=(e,t,n)=>e+(t-e)*n;function Tl(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 VT({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=Tl(l,a,e+1/3),s=Tl(l,a,e),i=Tl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Hi(e,t){return n=>n>0?t:e}const El=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},$T=[kc,Rr,Jr],BT=e=>$T.find(t=>t.test(e));function nh(e){const t=BT(e);if(Fo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Jr&&(n=VT(n)),n}const rh=(e,t)=>{const n=nh(e),r=nh(t);if(!n||!r)return Hi(e,t);const o={...n};return s=>(o.red=El(n.red,r.red,s),o.green=El(n.green,r.green,s),o.blue=El(n.blue,r.blue,s),o.alpha=Ke(n.alpha,r.alpha,s),Rr.transform(o))},_c=new Set(["none","hidden"]);function WT(e,t){return _c.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zT(e,t){return n=>Ke(e,t,n)}function td(e){return typeof e=="number"?zT:typeof e=="string"?$u(e)?Hi:It.test(e)?rh:GT:Array.isArray(e)?Ry:typeof e=="object"?It.test(e)?rh:HT:Hi}function Ry(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>td(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function HT(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=td(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function UT(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 GT=(e,t)=>{const n=er.createTransformer(t),r=As(e),o=As(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?_c.has(e)&&!o.values.length||_c.has(t)&&!r.values.length?WT(e,t):jn(Ry(UT(r,o),o.values),n):(Fo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Hi(e,t))};function ky(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):td(e)(e,t)}function YT(e,t,n){const r=[],o=n||ky,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]||Rt:t;a=jn(l,a)}r.push(a)}return r}function Iy(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(qt(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=YT(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 d=yo(e[u],e[u+1],c);return i[u](d)};return n?c=>l(Jn(e[0],e[s-1],c)):l}function Oy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=yo(0,t,r);e.push(Ke(n,1,o))}}function Ay(e){const t=[0];return Oy(t,e.length-1),t}function qT(e,t){return e.map(n=>n*t)}function KT(e,t){return e.map(()=>t||wy).splice(0,e.length-1)}function Ui({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sy(r)?r.map(Ac):Ac(r),s={done:!1,value:t[0]},i=qT(n&&n.length===t.length?n:Ay(t),e),a=Iy(i,t,{ease:Array.isArray(o)?o:KT(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Mc=2e4;function _y(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mc;)t+=n,r=e.next(t);return t>=Mc?1/0:t}const ZT=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ae.update(t,!0),stop:()=>En(t),now:()=>Tt.isProcessing?Tt.timestamp:Zn.now()}},XT={decay:eh,inertia:eh,tween:Ui,keyframes:Ui,spring:Qu},QT=e=>e/100;class nd extends yy{constructor({KeyframeResolver:t=Ku,...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=XT[n]||Ui;let l,c;a!==Ui&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&qt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=jn(QT,ky(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=_y(u));const{calculatedDuration:d}=u,h=d+o,f=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:m,onUpdate:v}=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 g=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=s;if(f){const P=Math.min(this.currentTime,u)/d;let I=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&I--,I=Math.min(I,f+1),!!(I%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/d)):p==="mirror"&&(T=i)),y=Jn(0,1,C)*d}const S=x?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&o!==void 0&&(S.value=Va(l,this.options,o)),v&&v(S.value),k&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Sn(t.calculatedDuration):0}get time(){return Sn(this.currentTime)}set time(t){t=wn(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=Sn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=ZT,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 My=e=>Array.isArray(e)&&typeof e[0]=="number";function Dy(e){return!!(!e||typeof e=="string"&&e in rd||My(e)||Array.isArray(e)&&e.every(Dy))}const as=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:as([0,.65,.55,1]),circOut:as([.55,0,1,.45]),backIn:as([.31,.01,.66,-.59]),backOut:as([.33,1.53,.69,.99])};function JT(e){return jy(e)||rd.easeOut}function jy(e){if(e)return My(e)?as(e):Array.isArray(e)?e.map(JT):rd[e]}function eE(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 tE=gy(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gi=10,nE=2e4;function rE(e){return e.type==="spring"||!Dy(e.ease)}function oE(e,t){const n=new nd({...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<nE;)r=n.sample(s),o.push(r.value),s+=Gi;return{times:void 0,keyframes:o,duration:s-Gi,ease:"linear"}}class oh extends yy{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(rE(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...p}=this.options,m=oE(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=eE(l.owner.current,c,t,{...this.options,duration:o,times:s,ease:i});return u.startTime=Zn.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(Va(t,this.options,n)),d&&d(),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 Sn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Sn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=wn(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 Rt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Rt}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:d,...h}=this.options,f=new nd({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),p=wn(this.time);c.setWithVelocity(f.sample(p-Gi).value,f.sample(p).value,Gi)}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 tE()&&r&&Yg.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}function sE(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return Ae.update(r,!0),()=>En(r)}const iE=gy(()=>window.ScrollTimeline!==void 0);class od{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(iE()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),sE(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 sd=(e,t,n,r={},o,s,i)=>a=>{const l=qu(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-wn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),i&&i()},onStop:i,name:e,motionValue:t,element:s?void 0:o};GS(l)||(d={...d,...US(e,d)}),d.duration&&(d.duration=wn(d.duration)),d.repeatDelay&&(d.repeatDelay=wn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!s&&t.get()!==void 0){const f=Va(d.keyframes,l);if(f!==void 0)return Ae.update(()=>{d.onUpdate(f),d.onComplete()}),new od([])}return!s&&oh.supports(d)?new oh(d):new nd(d)};class id{constructor(){this.subscriptions=[]}add(t){return Na(this.subscriptions,t),()=>Qs(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 sh=new Set;function ad(e,t,n){e||sh.has(t)||(console.warn(t),sh.add(t))}const ih=30,aE=e=>!isNaN(parseFloat(e)),ys={current:void 0};class Ny{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=Zn.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=Zn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ad(!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 id);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ae.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 ys.current&&ys.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Zn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ih)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ih);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 vo(e,t){return new Ny(e,t)}function lE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vo(n))}function cE(e,t){const n=La(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=xS(s[i]);lE(e,i,a)}}function Fy(e){return e.getProps()[Og]}class uE extends Ny{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=qg(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&&(Qs(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function dE(e){return!!(vt(e)&&e.add)}function Dc(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 uE("auto"),e.addValue("willChange",r)),dE(r))return r.add(t)}function fE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ld(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 d in l){const h=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),f=l[d];if(f===void 0||u&&fE(u,d))continue;const p={delay:n,elapsed:0,...qu(i||{},d)};let m=!1;if(window.HandoffAppearAnimations){const g=Fy(e);if(g){const x=window.HandoffAppearAnimations(g,d,h,Ae);x!==null&&(p.elapsed=x,m=!0)}}h.start(sd(d,h,f,e.shouldReduceMotion&&ar.has(d)?{type:!1}:p,e,m,Dc(e,d)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Ae.update(()=>{a&&cE(e,a)})}),c}function jc(e,t,n={}){var r;const o=La(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(ld(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return hE(e,t,u+c,d,h,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 hE(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(pE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jc(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function pE(e,t){return e.sortNodePosition(t)}function mE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>jc(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=jc(e,t,n);else{const o=typeof t=="function"?La(e,t,n.custom):t;r=Promise.all(ld(e,o,n))}return r.then(()=>{Ae.postRender(()=>{e.notify("AnimationComplete",t)})})}const gE=[...Fu].reverse(),yE=Fu.length;function vE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>mE(e,n,r)))}function bE(e){let t=vE(e),n=ah(),r=!0;const o=l=>(c,u)=>{var d;const h=La(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},d=[],h=new Set;let f={},p=1/0;for(let v=0;v<yE;v++){const g=gE[v],x=n[g],y=c[g]!==void 0?c[g]:u[g],T=ks(y),S=g===l?x.isActive:null;S===!1&&(p=v);let E=y===u[g]&&y!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...f},!x.isActive&&S===null||!y&&!x.prevProp||Is(y)||typeof y=="boolean")continue;let P=xE(x.prevProp,y)||g===l&&x.isActive&&!E&&T||v>p&&T,I=!1;const C=Array.isArray(y)?y:[y];let N=C.reduce(o(g),{});S===!1&&(N={});const{prevResolvedValues:M={}}=x,F={...M,...N},R=A=>{P=!0,h.has(A)&&(I=!0,h.delete(A)),x.needsAnimating[A]=!0;const D=e.getValue(A);D&&(D.liveStyle=!1)};for(const A in F){const D=N[A],L=M[A];if(f.hasOwnProperty(A))continue;let H=!1;Ec(D)&&Ec(L)?H=!ty(D,L):H=D!==L,H?D!=null?R(A):h.add(A):D!==void 0&&h.has(A)?R(A):x.protectedKeys[A]=!0}x.prevProp=y,x.prevResolvedValues=N,x.isActive&&(f={...f,...N}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||I)&&d.push(...C.map(A=>({animation:A,options:{type:g}})))}if(h.size){const v={};h.forEach(g=>{const x=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),v[g]=x??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):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(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ah(),r=!0}}}function xE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ty(t,e):!1}function gr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ah(){return{animate:gr(!0),whileInView:gr(),whileHover:gr(),whileTap:gr(),whileDrag:gr(),whileFocus:gr(),exit:gr()}}class wE extends lr{constructor(t){super(t),t.animationState||(t.animationState=bE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Is(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 SE=0;class TE extends lr{constructor(){super(...arguments),this.id=SE++}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 EE={animation:{Feature:wE},exit:{Feature:TE}},lh=(e,t)=>Math.abs(e-t);function CE(e,t){const n=lh(e.x,t.x),r=lh(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ly{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 d=Pl(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=CE(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:m}=Tt;this.history.push({...p,timestamp:m});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Cl(h,this.transformPagePoint),Ae.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Pl(d.type==="pointercancel"?this.lastMoveEventInfo:Cl(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,v),p&&p(d,v)},!Zg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Fa(t),a=Cl(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Tt;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Pl(a,this.history)),this.removeListeners=jn(Dn(this.contextWindow,"pointermove",this.handlePointerMove),Dn(this.contextWindow,"pointerup",this.handlePointerUp),Dn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),En(this.updatePoint)}}function Cl(e,t){return t?{point:t(e.point)}:e}function ch(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pl({point:e},t){return{point:e,delta:ch(e,Vy(t)),offset:ch(e,PE(t)),velocity:RE(t,.1)}}function PE(e){return e[0]}function Vy(e){return e[e.length-1]}function RE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>wn(t)));)n--;if(!r)return{x:0,y:0};const s=Sn(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 $y=1e-4,kE=1-$y,IE=1+$y,By=.01,OE=0-By,AE=0+By;function Kt(e){return e.max-e.min}function _E(e,t,n){return Math.abs(e-t)<=n}function uh(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=Kt(n)/Kt(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=kE&&e.scale<=IE||isNaN(e.scale))&&(e.scale=1),(e.translate>=OE&&e.translate<=AE||isNaN(e.translate))&&(e.translate=0)}function vs(e,t,n,r){uh(e.x,t.x,n.x,r?r.originX:void 0),uh(e.y,t.y,n.y,r?r.originY:void 0)}function dh(e,t,n){e.min=n.min+t.min,e.max=e.min+Kt(t)}function ME(e,t,n){dh(e.x,t.x,n.x),dh(e.y,t.y,n.y)}function fh(e,t,n){e.min=t.min-n.min,e.max=e.min+Kt(t)}function bs(e,t,n){fh(e.x,t.x,n.x),fh(e.y,t.y,n.y)}function DE(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function hh(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 jE(e,{top:t,left:n,bottom:r,right:o}){return{x:hh(e.x,n,o),y:hh(e.y,t,r)}}function ph(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 NE(e,t){return{x:ph(e.x,t.x),y:ph(e.y,t.y)}}function FE(e,t){let n=.5;const r=Kt(e),o=Kt(t);return o>r?n=yo(t.min,t.max-r,e.min):r>o&&(n=yo(e.min,e.max-o,t.min)),Jn(0,1,n)}function LE(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 Nc=.35;function VE(e=Nc){return e===!1?e=0:e===!0&&(e=Nc),{x:mh(e,"left","right"),y:mh(e,"top","bottom")}}function mh(e,t,n){return{min:gh(e,t),max:gh(e,n)}}function gh(e,t){return typeof e=="number"?e:e[t]||0}const yh=()=>({translate:0,scale:1,origin:0,originPoint:0}),eo=()=>({x:yh(),y:yh()}),vh=()=>({min:0,max:0}),ct=()=>({x:vh(),y:vh()});function Qt(e){return[e("x"),e("y")]}function Wy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $E({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BE(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 Rl(e){return e===void 0||e===1}function Fc({scale:e,scaleX:t,scaleY:n}){return!Rl(e)||!Rl(t)||!Rl(n)}function vr(e){return Fc(e)||zy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zy(e){return bh(e.x)||bh(e.y)}function bh(e){return e&&e!=="0%"}function Yi(e,t,n){const r=e-n,o=t*r;return n+o}function xh(e,t,n,r,o){return o!==void 0&&(e=Yi(e,o,r)),Yi(e,n,r)+t}function Lc(e,t=0,n=1,r,o){e.min=xh(e.min,t,n,r,o),e.max=xh(e.max,t,n,r,o)}function Hy(e,{x:t,y:n}){Lc(e.x,t.translate,t.scale,t.originPoint),Lc(e.y,n.translate,n.scale,n.originPoint)}const wh=.999999999999,Sh=1.0000000000001;function WE(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&&to(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Hy(e,i)),r&&vr(s.latestValues)&&to(e,s.latestValues))}t.x<Sh&&t.x>wh&&(t.x=1),t.y<Sh&&t.y>wh&&(t.y=1)}function Gn(e,t){e.min=e.min+t,e.max=e.max+t}function Th(e,t,n,r,o=.5){const s=Ke(e.min,e.max,o);Lc(e,t,n,s,r)}function to(e,t){Th(e.x,t.x,t.scaleX,t.scale,t.originX),Th(e.y,t.y,t.scaleY,t.scale,t.originY)}function Uy(e,t){return Wy(BE(e.getBoundingClientRect(),t))}function zE(e,t,n){const r=Uy(e,n),{scroll:o}=t;return o&&(Gn(r.x,o.offset.x),Gn(r.y,o.offset.y)),r}const Gy=({current:e})=>e?e.ownerDocument.defaultView:null,HE=new WeakMap;class UE{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=ct(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fa(u,"page").point)},s=(u,d)=>{var h;const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Qg(f),!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),Qt(g=>{let x=this.getAxisMotionValue(g).get()||0;if(xn.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[g];T&&(x=Kt(T)*(parseFloat(x)/100))}}this.originPoint[g]=x}),m&&Ae.postRender(()=>m(u,d)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=Dc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=d;if(f&&this.currentDirection===null){this.currentDirection=GE(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Qt(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ly(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Gy(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&&Ae.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||!gi(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=DE(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&&Qr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=jE(o.layoutBox,n):this.constraints=!1,this.elastic=VE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=LE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Qr(t))return!1;const r=t.current;qt(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=zE(r,o.root,this.visualElement.getTransformPagePoint());let i=NE(o.layout.layoutBox,s);if(n){const a=n($E(i));this.hasMutatedConstraints=!!a,a&&(i=Wy(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Qt(u=>{if(!gi(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const h=o?200:1e6,f=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(sd(t,r,0,n,this.visualElement,!1,Dc(this.visualElement,t)))}stopAnimation(){Qt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qt(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){Qt(n=>{const{drag:r}=this.getProps();if(!gi(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]-Ke(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Qr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=FE({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(),Qt(i=>{if(!gi(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(Ke(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;HE.set(this.visualElement,this);const t=this.visualElement.current,n=Dn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Qr(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()),Ae.read(r);const i=_n(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Qt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.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=Nc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function gi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class YE extends lr{constructor(t){super(t),this.removeGroupControls=Rt,this.removeListeners=Rt,this.controls=new UE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Rt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Eh=e=>(t,n)=>{e&&Ae.postRender(()=>e(t,n))};class qE extends lr{constructor(){super(...arguments),this.removePointerDownListener=Rt}onPointerDown(t){this.session=new Ly(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Eh(t),onStart:Eh(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Ae.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Dn(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 KE(){const e=b.useContext(_a);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 Oi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ch(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(de.test(e))e=parseFloat(e);else return e;const n=Ch(e,t.target.x),r=Ch(e,t.target.y);return`${n}% ${r}%`}},ZE={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=er.parse(e);if(o.length>5)return r;const s=er.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=Ke(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 XE extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Z1(QE),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()})),Oi.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()||Ae.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Nu.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 Yy(e){const[t,n]=KE(),r=b.useContext(Os);return w.jsx(XE,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(_g),isPresent:t,safeToRemove:n})}const QE={borderRadius:{...rs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rs,borderTopRightRadius:rs,borderBottomLeftRadius:rs,borderBottomRightRadius:rs,boxShadow:ZE},qy=["TopLeft","TopRight","BottomLeft","BottomRight"],JE=qy.length,Ph=e=>typeof e=="string"?parseFloat(e):e,Rh=e=>typeof e=="number"||de.test(e);function eC(e,t,n,r,o,s){o?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,tC(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,nC(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<JE;i++){const a=`border${qy[i]}Radius`;let l=kh(t,a),c=kh(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Rh(l)===Rh(c)?(e[a]=Math.max(Ke(Ph(l),Ph(c),r),0),(xn.test(c)||xn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function kh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tC=Ky(0,.5,Cy),nC=Ky(.5,.95,Rt);function Ky(e,t,n){return r=>r<e?0:r>t?1:n(yo(e,t,r))}function Ih(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){Ih(e.x,t.x),Ih(e.y,t.y)}function Oh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ah(e,t,n,r,o){return e-=t,e=Yi(e,1/n,r),o!==void 0&&(e=Yi(e,1/o,r)),e}function rC(e,t=0,n=1,r=.5,o,s=e,i=e){if(xn.test(t)&&(t=parseFloat(t),t=Ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=Ah(e.min,t,n,a,o),e.max=Ah(e.max,t,n,a,o)}function _h(e,t,[n,r,o],s,i){rC(e,t[n],t[r],t[o],t.scale,s,i)}const oC=["x","scaleX","originX"],sC=["y","scaleY","originY"];function Mh(e,t,n,r){_h(e.x,t,oC,n?n.x:void 0,r?r.x:void 0),_h(e.y,t,sC,n?n.y:void 0,r?r.y:void 0)}function Dh(e){return e.translate===0&&e.scale===1}function Zy(e){return Dh(e.x)&&Dh(e.y)}function iC(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 Xy(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 jh(e){return Kt(e.x)/Kt(e.y)}function Nh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class aC{constructor(){this.members=[]}add(t){Na(this.members,t),t.scheduleRender()}remove(t){if(Qs(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 lC(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:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),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 cC=(e,t)=>e.depth-t.depth;class uC{constructor(){this.children=[],this.isDirty=!1}add(t){Na(this.children,t),this.isDirty=!0}remove(t){Qs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cC),this.isDirty=!1,this.children.forEach(t)}}function dC(e,t){const n=Zn.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(En(r),e(s-t))};return Ae.read(r,!0),()=>En(r)}function Qy(e){return e instanceof SVGElement&&e.tagName!=="svg"}function cd(e,t,n){const r=vt(e)?e:vo(e);return r.start(sd("",r,t,n)),r.animation}const br={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kl=["","X","Y","Z"],fC={visibility:"hidden"},Fh=1e3;let hC=0;function Il(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Fy(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Jy(e.parent):!1:!1}function ev({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=hC++,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&&(br.totalNodes=br.resolvedTargetDeltas=br.recalculatedProjection=0),this.nodes.forEach(gC),this.nodes.forEach(wC),this.nodes.forEach(SC),this.nodes.forEach(yC),window.MotionDebug&&window.MotionDebug.record(br)},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 uC)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new id),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=Qy(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 d;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=dC(h,250),Oi.hasAnimatedSinceResize&&(Oi.hasAnimatedSinceResize=!1,this.nodes.forEach(Vh))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||RC,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),x=!this.targetLayout||!Xy(this.targetLayout,p)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...qu(m,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Vh(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,En(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(TC),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&&Jy(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 d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.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(Lh);return}this.isUpdating||this.nodes.forEach(bC),this.isUpdating=!1,this.nodes.forEach(xC),this.nodes.forEach(pC),this.nodes.forEach(mC),this.clearAllSnapshots();const a=Zn.now();Tt.delta=Jn(0,1e3/60,a-Tt.timestamp),Tt.timestamp=a,Tt.isProcessing=!0,vl.update.process(Tt),vl.preRender.process(Tt),vl.render.process(Tt),Tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vC),this.sharedNodes.forEach(EC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ae.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ae.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=ct(),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&&!Zy(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||vr(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)),kC(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:i}=this.options;if(!i)return ct();const a=i.measureViewportBox(),{scroll:l}=this.root;return l&&(Gn(a.x,l.offset.x),Gn(a.y,l.offset.y)),a}removeElementScroll(i){const a=ct();Xt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xt(a,i);const{scroll:h}=this.root;h&&(Gn(a.x,-h.offset.x),Gn(a.y,-h.offset.y))}Gn(a.x,u.offset.x),Gn(a.y,u.offset.y)}}return a}applyTransform(i,a=!1){const l=ct();Xt(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&&to(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),vr(u.latestValues)&&to(l,u.latestValues)}return vr(this.latestValues)&&to(l,this.latestValues),l}removeTransform(i){const a=ct();Xt(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!vr(c.latestValues))continue;Fc(c.latestValues)&&c.updateSnapshot();const u=ct(),d=c.measurePageBox();Xt(u,d),Mh(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return vr(this.latestValues)&&Mh(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!==Tt.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:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=Tt.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ct(),this.relativeTargetOrigin=ct(),bs(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ct(),this.targetWithTransforms=ct()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ME(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),Hy(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ct(),this.relativeTargetOrigin=ct(),bs(this.relativeTargetOrigin,this.target,f.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&br.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Fc(this.parent.latestValues)||zy(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===Tt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Xt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;WE(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=ct());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Oh(this.prevProjectionDelta.x,this.projectionDelta.x),Oh(this.prevProjectionDelta.y,this.projectionDelta.y)),vs(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Nh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&br.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=eo(),this.projectionDelta=eo(),this.projectionDeltaWithTransform=eo()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=eo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ct(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,v=this.getStack(),g=!v||v.members.length<=1,x=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(PC));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;$h(d.x,i.x,S),$h(d.y,i.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bs(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),CC(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&iC(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=ct()),Xt(y,this.relativeTarget)),m&&(this.animationValues=u,eC(u,c,this.latestValues,S,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},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&&(En(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ae.update(()=>{Oi.hasAnimatedSinceResize=!0,this.currentAnimation=cd(0,Fh,{...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(Fh),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&&tv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ct();const d=Kt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const h=Kt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}Xt(a,l),to(a,u),vs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new aC),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&&Il("z",i,c,this.animationValues);for(let u=0;u<kl.length;u++)Il(`rotate${kl[u]}`,i,c,this.animationValues),Il(`skew${kl[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 fC;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ki(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ki(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!vr(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=lC(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in Wi){if(h[m]===void 0)continue;const{correct:v,applyTo:g}=Wi[m],x=c.transform==="none"?h[m]:v(h[m],d);if(g){const y=g.length;for(let T=0;T<y;T++)c[g[T]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=d===this?ki(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(Lh),this.root.sharedNodes.clear()}}}function pC(e){e.updateLayout()}function mC(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"?Qt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],f=Kt(h);h.min=r[d].min,h.max=h.min+f}):tv(s,n.layoutBox,r)&&Qt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],f=Kt(r[d]);h.max=h.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const a=eo();vs(a,r,n.layoutBox);const l=eo();i?vs(l,e.applyTransform(o,!0),n.measuredBox):vs(l,r,n.layoutBox);const c=!Zy(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=ct();bs(p,n.layoutBox,h.layoutBox);const m=ct();bs(m,r,f.layoutBox),Xy(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}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 gC(e){window.MotionDebug&&br.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 yC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vC(e){e.clearSnapshot()}function Lh(e){e.clearMeasurements()}function bC(e){e.isLayoutDirty=!1}function xC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wC(e){e.resolveTargetDelta()}function SC(e){e.calcProjection()}function TC(e){e.resetSkewAndRotation()}function EC(e){e.removeLeadSnapshot()}function $h(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Bh(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function CC(e,t,n,r){Bh(e.x,t.x,n.x,r),Bh(e.y,t.y,n.y,r)}function PC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RC={duration:.45,ease:[.4,0,.1,1]},Wh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zh=Wh("applewebkit/")&&!Wh("chrome/")?Math.round:Rt;function Hh(e){e.min=zh(e.min),e.max=zh(e.max)}function kC(e){Hh(e.x),Hh(e.y)}function tv(e,t,n){return e==="position"||e==="preserve-aspect"&&!_E(jh(t),jh(n),.2)}const IC=ev({attachResizeListener:(e,t)=>_n(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ol={current:void 0},nv=ev({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ol.current){const e=new IC({});e.mount(window),e.setOptions({layoutScroll:!0}),Ol.current=e}return Ol.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),OC={pan:{Feature:qE},drag:{Feature:YE,ProjectionNode:nv,MeasureLayout:Yy}},Vc={current:null},rv={current:!1};function AC(){if(rv.current=!0,!!ju)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vc.current=e.matches;e.addListener(t),t()}else Vc.current=!1}function _C(e,t,n){for(const r in t){const o=t[r],s=n[r];if(vt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&ad(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(vt(s))e.addValue(r,vo(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,vo(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const _s=new WeakMap,MC=[...iy,It,er],DC=e=>MC.find(sy(e)),Uh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jC=Lu.length;class NC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,f,p,m)=>new this.KeyframeResolver(h,f,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=Ku,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,Ae.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=ja(n),this.isVariantNode=Dg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&vt(f)&&f.set(l[h],!1)}}mount(t){this.current=t,_s.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)),rv.current||AC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vc.current,process.env.NODE_ENV!=="production"&&ad(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(){_s.delete(this.current),this.projection&&this.projection.unmount(),En(this.notifyUpdate),En(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=ar.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Ae.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 mo){const n=mo[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):ct()}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<Uh.length;r++){const o=Uh[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=_C(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<jC;r++){const o=Lu[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=vo(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"&&(ry(o)||ny(o))?o=parseFloat(o):!DC(o)&&er.test(n)&&(o=py(t,n)),this.setBaseTarget(t,vt(o)?o.get():o)),vt(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=Yu(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&&!vt(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 id),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ov extends NC{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 FC(e){return window.getComputedStyle(e)}class sv extends ov{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=zg}readValueFromInstance(t,n){if(ar.has(n)){const r=Xu(n);return r&&r.default||0}else{const r=FC(t),o=(Fg(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Uy(t,n)}build(t,n,r){Wu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class iv extends ov{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ct}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ar.has(n)){const r=Xu(n);return r&&r.default||0}return n=Hg.has(n)?n:Da(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Gg(t,n,r)}build(t,n,r){Hu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Ug(t,n,r,o)}mount(t){this.isSVGTag=Uu(t.tagName),super.mount(t)}}const LC=(e,t)=>Vu(e)?new iv(t):new sv(t,{allowProjection:e!==b.Fragment}),VC={layout:{ProjectionNode:nv,MeasureLayout:Yy}},$C={...EE,...$S,...OC,...VC},Ct=q1((e,t)=>RS(e,t,$C,LC));function av(){const e=b.useRef(!1);return Ma(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function lv(){const e=av(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Ae.postRender(r),[r]),t]}class BC extends _.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 WC({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(po);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(`
1
+ "use strict";var Fb=Object.defineProperty;var jb=(e,t,n)=>t in e?Fb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>jb(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),w=require("react/jsx-runtime"),Gp=require("react-dom");function Up(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 D=Up(b),Yp=Up(Gp);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 Lb(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qp(e))&&(r&&(r+=" "),r+=t);return r}const Qu=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zu=Lb,ui=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zu(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const h=Qu(u)||Qu(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...d}=u;return Object.entries(d).every(p=>{let[m,v]=p;return Array.isArray(v)?v.includes({...i,...a}[m]):{...i,...a}[m]===v})?[...c,f,h]:c},[]);return Zu(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};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)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Kp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nb(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Kp(e))&&(r&&(r+=" "),r+=t);return r}var Ju=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vb(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 $b=Error,Bb=EvalError,Hb=RangeError,Wb=ReferenceError,Xp=SyntaxError,fi=TypeError,zb=URIError,Gb=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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},ef=typeof Symbol<"u"&&Symbol,Ub=Gb,Yb=function(){return typeof ef!="function"||typeof Symbol!="function"||typeof ef("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ub()},ua={__proto__:null,foo:{}},qb=Object,Kb=function(){return{__proto__:ua}.foo===ua.foo&&!(ua instanceof qb)},Xb="Function.prototype.bind called on incompatible ",Qb=Object.prototype.toString,Zb=Math.max,Jb="[object Function]",tf=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},e0=function(t,n){for(var r=[],o=n,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},t0=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},n0=function(t){var n=this;if(typeof n!="function"||Qb.apply(n)!==Jb)throw new TypeError(Xb+n);for(var r=e0(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,tf(r,arguments));return Object(u)===u?u:this}return n.apply(t,tf(r,arguments))},s=Zb(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(o=Function("binder","return function ("+t0(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o},r0=n0,bc=Function.prototype.bind||r0,o0=Function.prototype.call,i0=Object.prototype.hasOwnProperty,s0=bc,a0=s0.call(o0,i0),he,l0=$b,c0=Bb,u0=Hb,f0=Wb,Nr=Xp,Dr=fi,d0=zb,Qp=Function,fa=function(e){try{return Qp('"use strict"; return ('+e+").constructor;")()}catch{}},ar=Object.getOwnPropertyDescriptor;if(ar)try{ar({},"")}catch{ar=null}var da=function(){throw new Dr},h0=ar?function(){try{return arguments.callee,da}catch{try{return ar(arguments,"callee").get}catch{return da}}}():da,br=Yb(),p0=Kb(),ct=Object.getPrototypeOf||(p0?function(e){return e.__proto__}:null),Cr={},m0=typeof Uint8Array>"u"||!ct?he:ct(Uint8Array),lr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?he:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?he:ArrayBuffer,"%ArrayIteratorPrototype%":br&&ct?ct([][Symbol.iterator]()):he,"%AsyncFromSyncIteratorPrototype%":he,"%AsyncFunction%":Cr,"%AsyncGenerator%":Cr,"%AsyncGeneratorFunction%":Cr,"%AsyncIteratorPrototype%":Cr,"%Atomics%":typeof Atomics>"u"?he:Atomics,"%BigInt%":typeof BigInt>"u"?he:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?he:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?he:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?he:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l0,"%eval%":eval,"%EvalError%":c0,"%Float32Array%":typeof Float32Array>"u"?he:Float32Array,"%Float64Array%":typeof Float64Array>"u"?he:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?he:FinalizationRegistry,"%Function%":Qp,"%GeneratorFunction%":Cr,"%Int8Array%":typeof Int8Array>"u"?he:Int8Array,"%Int16Array%":typeof Int16Array>"u"?he:Int16Array,"%Int32Array%":typeof Int32Array>"u"?he:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":br&&ct?ct(ct([][Symbol.iterator]())):he,"%JSON%":typeof JSON=="object"?JSON:he,"%Map%":typeof Map>"u"?he:Map,"%MapIteratorPrototype%":typeof Map>"u"||!br||!ct?he:ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?he:Promise,"%Proxy%":typeof Proxy>"u"?he:Proxy,"%RangeError%":u0,"%ReferenceError%":f0,"%Reflect%":typeof Reflect>"u"?he:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?he:Set,"%SetIteratorPrototype%":typeof Set>"u"||!br||!ct?he:ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?he:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":br&&ct?ct(""[Symbol.iterator]()):he,"%Symbol%":br?Symbol:he,"%SyntaxError%":Nr,"%ThrowTypeError%":h0,"%TypedArray%":m0,"%TypeError%":Dr,"%Uint8Array%":typeof Uint8Array>"u"?he:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?he:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?he:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?he:Uint32Array,"%URIError%":d0,"%WeakMap%":typeof WeakMap>"u"?he:WeakMap,"%WeakRef%":typeof WeakRef>"u"?he:WeakRef,"%WeakSet%":typeof WeakSet>"u"?he:WeakSet};if(ct)try{null.error}catch(e){var g0=ct(ct(e));lr["%Error.prototype%"]=g0}var y0=function e(t){var n;if(t==="%AsyncFunction%")n=fa("async function () {}");else if(t==="%GeneratorFunction%")n=fa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=fa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ct&&(n=ct(o.prototype))}return lr[t]=n,n},nf={__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"]},di=bc,ns=a0,v0=di.call(Function.call,Array.prototype.concat),b0=di.call(Function.apply,Array.prototype.splice),rf=di.call(Function.call,String.prototype.replace),rs=di.call(Function.call,String.prototype.slice),x0=di.call(Function.call,RegExp.prototype.exec),w0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S0=/\\(\\)?/g,T0=function(t){var n=rs(t,0,1),r=rs(t,-1);if(n==="%"&&r!=="%")throw new Nr("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Nr("invalid intrinsic syntax, expected opening `%`");var o=[];return rf(t,w0,function(i,s,a,l){o[o.length]=a?rf(l,S0,"$1"):s||i}),o},E0=function(t,n){var r=t,o;if(ns(nf,r)&&(o=nf[r],r="%"+o[0]+"%"),ns(lr,r)){var i=lr[r];if(i===Cr&&(i=y0(r)),typeof i>"u"&&!n)throw new Dr("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Nr("intrinsic "+t+" does not exist!")},ro=function(t,n){if(typeof t!="string"||t.length===0)throw new Dr("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Dr('"allowMissing" argument must be a boolean');if(x0(/^%?[^%]*%?$/,t)===null)throw new Nr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=T0(t),o=r.length>0?r[0]:"",i=E0("%"+o+"%",n),s=i.name,a=i.value,l=!1,c=i.alias;c&&(o=c[0],b0(r,v0([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var h=r[u],d=rs(h,0,1),p=rs(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new Nr("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),o+="."+h,s="%"+o+"%",ns(lr,s))a=lr[s];else if(a!=null){if(!(h in a)){if(!n)throw new Dr("base intrinsic for "+t+" exists, but the property is not available.");return}if(ar&&u+1>=r.length){var m=ar(a,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[h]}else f=ns(a,h),a=a[h];f&&!l&&(lr[s]=a)}}return a},Zp={exports:{}},ha,of;function xc(){if(of)return ha;of=1;var e=ro,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return ha=t,ha}var C0=ro,Gi=C0("%Object.getOwnPropertyDescriptor%",!0);if(Gi)try{Gi([],"length")}catch{Gi=null}var Jp=Gi,sf=xc(),P0=Xp,xr=fi,af=Jp,R0=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new xr("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new xr("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!af&&af(t,n);if(sf)sf(t,n,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:r,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)t[n]=r;else throw new P0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},yl=xc(),em=function(){return!!yl};em.hasArrayLengthDefineBug=function(){if(!yl)return null;try{return yl([],"length",{value:1}).length!==1}catch{return!0}};var I0=em,A0=ro,lf=R0,O0=I0(),cf=Jp,uf=fi,k0=A0("%Math.floor%"),D0=function(t,n){if(typeof t!="function")throw new uf("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||k0(n)!==n)throw new uf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in t&&cf){var s=cf(t,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!r)&&(O0?lf(t,"length",n,!0,!0):lf(t,"length",n)),t};(function(e){var t=bc,n=ro,r=D0,o=fi,i=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(s,i),l=xc(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new o("a function is required");var d=a(t,s,arguments);return r(d,1+c(0,h.length-(arguments.length-1)),!0)};var u=function(){return a(t,i,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(Zp);var M0=Zp.exports,tm=ro,nm=M0,F0=nm(tm("String.prototype.indexOf")),j0=function(t,n){var r=tm(t,!!n);return typeof r=="function"&&F0(t,".prototype.")>-1?nm(r):r};const L0={},N0=Object.freeze(Object.defineProperty({__proto__:null,default:L0},Symbol.toStringTag,{value:"Module"})),_0=Vb(N0);var wc=typeof Map=="function"&&Map.prototype,pa=Object.getOwnPropertyDescriptor&&wc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,os=wc&&pa&&typeof pa.get=="function"?pa.get:null,ff=wc&&Map.prototype.forEach,Sc=typeof Set=="function"&&Set.prototype,ma=Object.getOwnPropertyDescriptor&&Sc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,is=Sc&&ma&&typeof ma.get=="function"?ma.get:null,df=Sc&&Set.prototype.forEach,V0=typeof WeakMap=="function"&&WeakMap.prototype,jo=V0?WeakMap.prototype.has:null,$0=typeof WeakSet=="function"&&WeakSet.prototype,Lo=$0?WeakSet.prototype.has:null,B0=typeof WeakRef=="function"&&WeakRef.prototype,hf=B0?WeakRef.prototype.deref:null,H0=Boolean.prototype.valueOf,W0=Object.prototype.toString,z0=Function.prototype.toString,G0=String.prototype.match,Tc=String.prototype.slice,In=String.prototype.replace,U0=String.prototype.toUpperCase,pf=String.prototype.toLowerCase,rm=RegExp.prototype.test,mf=Array.prototype.concat,Qt=Array.prototype.join,Y0=Array.prototype.slice,gf=Math.floor,vl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ga=Object.getOwnPropertySymbols,bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_r=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Tt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_r||!0)?Symbol.toStringTag:null,om=Object.prototype.propertyIsEnumerable,yf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function vf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||rm.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-gf(-e):gf(e);if(r!==e){var o=String(r),i=Tc.call(t,o.length+1);return In.call(o,n,"$&_")+"."+In.call(In.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return In.call(t,n,"$&_")}var xl=_0,bf=xl.custom,xf=sm(bf)?bf:null,q0=function e(t,n,r,o){var i=n||{};if(Cn(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Cn(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Cn(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Cn(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Cn(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 lm(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?vf(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?vf(t,c):c}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return wl(t)?"[Array]":"[Object]";var f=dx(i,r);if(typeof o>"u")o=[];else if(am(o,t)>=0)return"[Circular]";function h(N,R,k){if(R&&(o=Y0.call(o),o.push(R)),k){var F={depth:i.depth};return Cn(i,"quoteStyle")&&(F.quoteStyle=i.quoteStyle),e(N,F,r+1,o)}return e(N,i,r+1,o)}if(typeof t=="function"&&!wf(t)){var d=rx(t),p=Ii(t,h);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(p.length>0?" { "+Qt.call(p,", ")+" }":"")}if(sm(t)){var m=_r?In.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):bl.call(t);return typeof t=="object"&&!_r?Co(m):m}if(cx(t)){for(var v="<"+pf.call(String(t.nodeName)),g=t.attributes||[],x=0;x<g.length;x++)v+=" "+g[x].name+"="+im(K0(g[x].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+="</"+pf.call(String(t.nodeName))+">",v}if(wl(t)){if(t.length===0)return"[]";var y=Ii(t,h);return f&&!fx(y)?"["+Sl(y,f)+"]":"[ "+Qt.call(y,", ")+" ]"}if(Q0(t)){var T=Ii(t,h);return!("cause"in Error.prototype)&&"cause"in t&&!om.call(t,"cause")?"{ ["+String(t)+"] "+Qt.call(mf.call("[cause]: "+h(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Qt.call(T,", ")+" }"}if(typeof t=="object"&&s){if(xf&&typeof t[xf]=="function"&&xl)return xl(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(ox(t)){var S=[];return ff&&ff.call(t,function(N,R){S.push(h(R,t,!0)+" => "+h(N,t))}),Sf("Map",os.call(t),S,f)}if(ax(t)){var E=[];return df&&df.call(t,function(N){E.push(h(N,t))}),Sf("Set",is.call(t),E,f)}if(ix(t))return ya("WeakMap");if(lx(t))return ya("WeakSet");if(sx(t))return ya("WeakRef");if(J0(t))return Co(h(Number(t)));if(tx(t))return Co(h(vl.call(t)));if(ex(t))return Co(H0.call(t));if(Z0(t))return Co(h(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof Ju<"u"&&t===Ju)return"{ [object globalThis] }";if(!X0(t)&&!wf(t)){var I=Ii(t,h),P=yf?yf(t)===Object.prototype:t instanceof Object||t.constructor===Object,A=t instanceof Object?"":"null prototype",C=!P&&Tt&&Object(t)===t&&Tt in t?Tc.call(Vn(t),8,-1):A?"Object":"",L=P||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",M=L+(C||A?"["+Qt.call(mf.call([],C||[],A||[]),": ")+"] ":"");return I.length===0?M+"{}":f?M+"{"+Sl(I,f)+"}":M+"{ "+Qt.call(I,", ")+" }"}return String(t)};function im(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function K0(e){return In.call(String(e),/"/g,"&quot;")}function wl(e){return Vn(e)==="[object Array]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function X0(e){return Vn(e)==="[object Date]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function wf(e){return Vn(e)==="[object RegExp]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function Q0(e){return Vn(e)==="[object Error]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function Z0(e){return Vn(e)==="[object String]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function J0(e){return Vn(e)==="[object Number]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function ex(e){return Vn(e)==="[object Boolean]"&&(!Tt||!(typeof e=="object"&&Tt in e))}function sm(e){if(_r)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!bl)return!1;try{return bl.call(e),!0}catch{}return!1}function tx(e){if(!e||typeof e!="object"||!vl)return!1;try{return vl.call(e),!0}catch{}return!1}var nx=Object.prototype.hasOwnProperty||function(e){return e in this};function Cn(e,t){return nx.call(e,t)}function Vn(e){return W0.call(e)}function rx(e){if(e.name)return e.name;var t=G0.call(z0.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function am(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 ox(e){if(!os||!e||typeof e!="object")return!1;try{os.call(e);try{is.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ix(e){if(!jo||!e||typeof e!="object")return!1;try{jo.call(e,jo);try{Lo.call(e,Lo)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function sx(e){if(!hf||!e||typeof e!="object")return!1;try{return hf.call(e),!0}catch{}return!1}function ax(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e);try{os.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function lx(e){if(!Lo||!e||typeof e!="object")return!1;try{Lo.call(e,Lo);try{jo.call(e,jo)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function cx(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function lm(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return lm(Tc.call(e,0,t.maxStringLength),t)+r}var o=In.call(In.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ux);return im(o,"single",t)}function ux(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":"")+U0.call(t.toString(16))}function Co(e){return"Object("+e+")"}function ya(e){return e+" { ? }"}function Sf(e,t,n,r){var o=r?Sl(n,r):Qt.call(n,", ");return e+" ("+t+") {"+o+"}"}function fx(e){for(var t=0;t<e.length;t++)if(am(e[t],`
2
+ `)>=0)return!1;return!0}function dx(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Qt.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Qt.call(Array(t+1),n)}}function Sl(e,t){if(e.length===0)return"";var n=`
3
+ `+t.prev+t.base;return n+Qt.call(e,","+n)+`
4
+ `+t.prev}function Ii(e,t){var n=wl(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Cn(e,o)?t(e[o],e):""}var i=typeof ga=="function"?ga(e):[],s;if(_r){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)Cn(e,l)&&(n&&String(Number(l))===l&&l<e.length||_r&&s["$"+l]instanceof Symbol||(rm.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof ga=="function")for(var c=0;c<i.length;c++)om.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var cm=ro,oo=j0,hx=q0,px=fi,Ai=cm("%WeakMap%",!0),Oi=cm("%Map%",!0),mx=oo("WeakMap.prototype.get",!0),gx=oo("WeakMap.prototype.set",!0),yx=oo("WeakMap.prototype.has",!0),vx=oo("Map.prototype.get",!0),bx=oo("Map.prototype.set",!0),xx=oo("Map.prototype.has",!0),Ec=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},wx=function(e,t){var n=Ec(e,t);return n&&n.value},Sx=function(e,t,n){var r=Ec(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Tx=function(e,t){return!!Ec(e,t)},Ex=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new px("Side channel does not contain "+hx(i))},get:function(i){if(Ai&&i&&(typeof i=="object"||typeof i=="function")){if(t)return mx(t,i)}else if(Oi){if(n)return vx(n,i)}else if(r)return wx(r,i)},has:function(i){if(Ai&&i&&(typeof i=="object"||typeof i=="function")){if(t)return yx(t,i)}else if(Oi){if(n)return xx(n,i)}else if(r)return Tx(r,i);return!1},set:function(i,s){Ai&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Ai),gx(t,i,s)):Oi?(n||(n=new Oi),bx(n,i,s)):(r||(r={key:{},next:null}),Sx(r,i,s))}};return o},Tf=e=>Array.isArray(e),va=e=>e===void 0,ba=e=>e===null,Cx=Function.bind.call(Function.call,Object.prototype.toString),Px=e=>!!e&&Cx(e)==="[object Error]"||e instanceof Error,um=(e,t)=>e instanceof t,Rx=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Ix=e=>Object.prototype.toString.call(e)==="[object Date]"&&um(e,Date),gn={array:Tf,date:Ix,empty:e=>ba(e)||va(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:um,isError:Px,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ba(e)||va(e),null:ba,number:e=>typeof e=="number"||!Number.isNaN(e),object:e=>!Tf(e)&&typeof e=="object",primitive:Rx,string:e=>typeof e=="string",undefined:va},Tl=(e,t,n)=>{const[r,...o]=t;if(o.length>0){if(!e[r]){const i=`${+o[0]}`===o[0];e[r]=i?[]:{}}if(typeof e[r]!="object"){const i=`${+o[0]}`===o[0];e[r]=Tl(i?[]:{},o,n)}else e[r]=Tl(e[r],o,n)}else e[r]=n;return e},Ax=e=>Object.keys(e),Ox=e=>e.replace("[",".").replace("]","").split("."),xa=(e,t,n)=>{const r=Array.isArray(t)?t:Ox(t),o=structuredClone(e);return Tl(o,r,n),o};const Cc="-";function kx(e){const t=Mx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const a=s.split(Cc);return a[0]===""&&a.length!==1&&a.shift(),fm(a,t)||Dx(s)}function i(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function fm(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?fm(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Cc);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId}const Ef=/^\[(.+)\]$/;function Dx(e){if(Ef.test(e)){const t=Ef.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Mx(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jx(Object.entries(e.classGroups),n).forEach(([i,s])=>{El(s,r,i,t)}),r}function El(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Cf(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Fx(o)){El(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{El(s,Cf(t,i),n,r)})})}function Cf(e,t){let n=e;return t.split(Cc).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Fx(e){return e.isThemeGetter}function jx(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e}function Lx(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const dm="!";function Nx(e){const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length;function s(a){const l=[];let c=0,u=0,f;for(let v=0;v<a.length;v++){let g=a[v];if(c===0){if(g===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(g==="/"){f=v;continue}}g==="["?c++:g==="]"&&c--}const h=l.length===0?a:a.substring(u),d=h.startsWith(dm),p=d?h.substring(1):h,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}}return n?function(l){return n({className:l,parseClassName:s})}:s}function _x(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 Vx(e){return{cache:Lx(e.cacheSize),parseClassName:Nx(e),...kx(e)}}const $x=/\s+/;function Bx(e,t){const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split($x).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(s);let f=!!u,h=r(f?c.substring(0,u):c);if(!h){if(!f)return{isTailwindClass:!1,originalClassName:s};if(h=r(c),!h)return{isTailwindClass:!1,originalClassName:s};f=!1}const d=_x(a).join(":");return{isTailwindClass:!0,modifierId:l?d+dm:d,classGroupId:h,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=s,u=a+l;return i.has(u)?!1:(i.add(u),o(l,c).forEach(f=>i.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Hx(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=hm(t))&&(r&&(r+=" "),r+=n);return r}function hm(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=hm(e[r]))&&(n&&(n+=" "),n+=t);return n}function Wx(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,f)=>f(u),e());return n=Vx(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Bx(l,n);return o(l,u),u}return function(){return i(Hx.apply(null,arguments))}}function Ne(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const pm=/^\[(?:([a-z-]+):)?(.+)\]$/i,zx=/^\d+\/\d+$/,Gx=new Set(["px","full","screen"]),Ux=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yx=/\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$/,qx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Kx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function pn(e){return or(e)||Gx.has(e)||zx.test(e)}function wn(e){return io(e,"length",ow)}function or(e){return!!e&&!Number.isNaN(Number(e))}function ki(e){return io(e,"number",or)}function Po(e){return!!e&&Number.isInteger(Number(e))}function Qx(e){return e.endsWith("%")&&or(e.slice(0,-1))}function ue(e){return pm.test(e)}function Sn(e){return Ux.test(e)}const Zx=new Set(["length","size","percentage"]);function Jx(e){return io(e,Zx,mm)}function ew(e){return io(e,"position",mm)}const tw=new Set(["image","url"]);function nw(e){return io(e,tw,sw)}function rw(e){return io(e,"",iw)}function Ro(){return!0}function io(e,t,n){const r=pm.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function ow(e){return Yx.test(e)&&!qx.test(e)}function mm(){return!1}function iw(e){return Kx.test(e)}function sw(e){return Xx.test(e)}function aw(){const e=Ne("colors"),t=Ne("spacing"),n=Ne("blur"),r=Ne("brightness"),o=Ne("borderColor"),i=Ne("borderRadius"),s=Ne("borderSpacing"),a=Ne("borderWidth"),l=Ne("contrast"),c=Ne("grayscale"),u=Ne("hueRotate"),f=Ne("invert"),h=Ne("gap"),d=Ne("gradientColorStops"),p=Ne("gradientColorStopPositions"),m=Ne("inset"),v=Ne("margin"),g=Ne("opacity"),x=Ne("padding"),y=Ne("saturate"),T=Ne("scale"),S=Ne("sepia"),E=Ne("skew"),I=Ne("space"),P=Ne("translate"),A=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ue,t],M=()=>[ue,t],N=()=>["",pn,wn],R=()=>["auto",or,ue],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"],G=()=>["","0",ue],O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[or,ki],K=()=>[or,ue];return{cacheSize:500,separator:":",theme:{colors:[Ro],spacing:[pn,wn],blur:["none","",Sn,ue],brightness:$(),borderColor:[e],borderRadius:["none","","full",Sn,ue],borderSpacing:M(),borderWidth:N(),contrast:$(),grayscale:G(),hueRotate:K(),invert:G(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Qx,wn],inset:L(),margin:L(),opacity:$(),padding:M(),saturate:$(),scale:$(),sepia:G(),skew:K(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[Sn]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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(),ue]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],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",Po,ue]}],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",ue]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",Po,ue]}],"grid-cols":[{"grid-cols":[Ro]}],"col-start-end":[{col:["auto",{span:["full",Po,ue]},ue]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Ro]}],"row-start-end":[{row:["auto",{span:[Po,ue]},ue]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"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:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[I]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[I]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[Sn]},Sn]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Sn,wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ki]}],"font-family":[{font:[Ro]}],"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",ue]}],"line-clamp":[{"line-clamp":["none",or,ki]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",pn,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",pn,wn]}],"underline-offset":[{"underline-offset":["auto",pn,ue]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],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",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...k(),ew]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jx]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[g]}],"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":[g]}],"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":[pn,ue]}],"outline-w":[{outline:[pn,wn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[pn,wn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Sn,rw]}],"shadow-color":[{shadow:[Ro]}],opacity:[{opacity:[g]}],"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",Sn,ue]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[S]}],"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":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Po,ue]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ue]}],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",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pn,wn,ki]}],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 lw=Wx(aw),Pc=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},cw=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),uw=e=>gn.function(e),je=(...e)=>lw(Nb(e)),gm=(e,t)=>{const n=new Event("input",{bubbles:!0,composed:!0});return e==null||e.dispatchEvent(n),Object.assign({},n,{target:e,currentTarget:e})},Fs=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},so=b.forwardRef(function({as:t,...n},r){const o=t||"span";return w.jsx(o,{...n,ref:r})}),fw=ui("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring ease-normal",{variants:{size:{default:"h-10 px-4 py-2",big:"h-12 px-6 py-4",small:"h-8 px-4 py-2 text-sm",min:"h-7 px-3 py-1 text-sm",icon:"p-1"},rounded:{rough:"rounded-sm",default:"rounded-button",squared:"rounded-none",circle:"rounded-full aspect-square"},theme:{raw:"",danger:"bg-button-danger-bg text-button-danger-text",disabled:"bg-disabled duration-700 opacity-70",info:"bg-button-info-bg text-button-info-text",loading:"animate-pulse bg-disabled duration-700 opacity-70",main:"bg-primary text-primary-foreground",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",secondary:"bg-button-secondary-bg text-button-secondary-text",success:"bg-button-success-bg text-button-success-text",warn:"bg-button-warn-bg text-button-warn-text","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Vr=b.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return w.jsxs(so,{...l,ref:c,type:i,"data-theme":o,"data-loading":r,disabled:u,"aria-busy":u||r,as:l.as??"button",onClick:u?void 0:l.onClick,className:je(fw({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),dw=ui("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{warn:"bg-warn",info:"bg-info",main:"bg-primary",danger:"bg-danger",success:"bg-success",secondary:"bg-secondary"}}}),hw=ui("inline-flex rounded-pill gap-1.5 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:{primary:"bg-tag-primary-bg text-tag-primary-text",danger:"bg-tag-danger-bg text-tag-danger-text",info:"bg-tag-info-bg text-tag-info-text",success:"bg-tag-success-bg text-tag-success-text",secondary:"bg-tag-secondary-bg text-tag-secondary-text",warn:"bg-tag-warn-bg text-tag-warn-text",neutral:"bg-transparent border border-card-border",disabled:"bg-disabled duration-700 opacity-70",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},defaultVariants:{theme:"primary",size:"default"}}),pw=b.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return w.jsxs(so,{...a,ref:l,"data-theme":i,as:a.as??"span",className:je(hw({size:s,theme:i}),t),children:[n?w.jsx("span",{className:dw({theme:n})}):null,r,a.children]})}),$r=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),js=b.createContext({}),Ls=b.createContext(null),Rc=typeof document<"u",Ns=Rc?b.useLayoutEffect:b.useEffect,ym=b.createContext({strict:!1}),_s=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mw="framerAppearId",vm="data-"+_s(mw),gw={skipAnimations:!1,useManualTiming:!1};function yw(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}const l={schedule:(c,u=!1,f=!1)=>{const d=f&&r?t:n;return u&&i.add(c),d.has(c)||d.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(s=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 Di=["read","resolveKeyframes","update","preRender","render","postRender"],vw=40;function bm(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Di.reduce((g,x)=>(g[x]=yw(i),g),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=s,d=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,vw),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(d))},p=()=>{n=!0,r=!0,o.isProcessing||e(d)};return{schedule:Di.reduce((g,x)=>{const y=s[x];return g[x]=(T,S=!1,E=!1)=>(n||p(),y.schedule(T,S,E)),g},{}),cancel:g=>{for(let x=0;x<Di.length;x++)s[Di[x]].cancel(g)},state:o,steps:s}}const{schedule:Ic,cancel:Bj}=bm(queueMicrotask,!1);function Pr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const xm=b.createContext({});let Pf=!1;function bw(e,t,n,r,o){const{visualElement:i}=b.useContext(js),s=b.useContext(ym),a=b.useContext(Ls),l=b.useContext($r).reducedMotion,c=b.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=b.useContext(xm);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&ww(c.current,n,o,f),b.useInsertionEffect(()=>{u&&u.update(n,a)});const h=b.useRef(!!(n[vm]&&!window.HandoffComplete));return Ns(()=>{u&&(u.updateFeatures(),Ic.render(u.render),h.current&&u.animationState&&u.animationState.animateChanges())}),b.useEffect(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&(h.current=!1,Pf||(Pf=!0,queueMicrotask(xw))))}),u}function xw(){window.HandoffComplete=!0}function ww(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wm(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Pr(a),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function wm(e){if(e)return e.options.allowProjection!==!1?e.projection:wm(e.parent)}function Sw(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):Pr(n)&&(n.current=r))},[t])}function Ko(e){return typeof e=="string"||Array.isArray(e)}function Xo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ac=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oc=["initial",...Ac];function Vs(e){return Xo(e.animate)||Oc.some(t=>Ko(e[t]))}function Sm(e){return!!(Vs(e)||e.variants)}function Tw(e,t){if(Vs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ko(n)?n:void 0,animate:Ko(r)?r:void 0}}return e.inherit!==!1?t:{}}function Ew(e){const{initial:t,animate:n}=Tw(e,b.useContext(js));return b.useMemo(()=>({initial:t,animate:n}),[Rf(t),Rf(n)])}function Rf(e){return Array.isArray(e)?e.join(" "):e}const If={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"]},Br={};for(const e in If)Br[e]={isEnabled:t=>If[e].some(n=>!!t[n])};function Cw(e){for(const t in e)Br[t]={...Br[t],...e[t]}}const Qo=b.createContext({}),Pw=Symbol.for("motionComponentSymbol"),yt=e=>e;let ao=yt,Lt=yt;process.env.NODE_ENV!=="production"&&(ao=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Lt=(e,t)=>{if(!e)throw new Error(t)});function Rw({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&Cw(e);function i(a,l){let c;const u={...b.useContext($r),...a,layoutId:Iw(a)},{isStatic:f}=u,h=Ew(a),d=r(a,f);if(!f&&Rc){Aw(u,e);const p=Ow(u);c=p.MeasureLayout,h.visualElement=bw(o,d,u,t,p.ProjectionNode)}return w.jsxs(js.Provider,{value:h,children:[c&&h.visualElement?w.jsx(c,{visualElement:h.visualElement,...u}):null,n(o,a,Sw(d,h.visualElement,l),d,f,h.visualElement)]})}const s=b.forwardRef(i);return s[Pw]=o,s}function Iw({layoutId:e}){const t=b.useContext(Qo).id;return t&&e!==void 0?t+"-"+e:e}function Aw(e,t){const n=b.useContext(ym).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?ao(!1,r):Lt(!1,r)}}function Ow(e){const{drag:t,layout:n}=Br;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 kw(e){function t(r,o={}){return Rw(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 Dw=["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 kc(e){return typeof e!="string"||e.includes("-")?!1:!!(Dw.indexOf(e)>-1||/[A-Z]/u.test(e))}const ss={};function Mw(e){Object.assign(ss,e)}const hi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$n=new Set(hi);function Tm(e,{layout:t,layoutId:n}){return $n.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ss[e]||e==="opacity")}const lt=e=>!!(e&&e.getVelocity),Fw={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jw=hi.length;function Lw(e,t,n){let r="";for(let o=0;o<jw;o++){const i=hi[o];if(e[i]!==void 0){const s=Fw[i]||i;r+=`${s}(${e[i]}) `}}return r=r.trim(),n?r=n(e,t?"":r):t&&(r="none"),r}const Em=e=>t=>typeof t=="string"&&t.startsWith(e),Cm=Em("--"),Nw=Em("var(--"),Dc=e=>Nw(e)?_w.test(e.split("/*")[0].trim()):!1,_w=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Vw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Mn=(e,t,n)=>n>t?t:n<e?e:n,lo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},No={...lo,transform:e=>Mn(0,1,e)},Mi={...lo,default:1},_o=e=>Math.round(e*1e5)/1e5,Mc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,$w=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Bw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function pi(e){return typeof e=="string"}function Hw(e){return e==null}const mi=e=>({test:t=>pi(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),En=mi("deg"),on=mi("%"),ae=mi("px"),Ww=mi("vh"),zw=mi("vw"),Af={...on,parse:e=>on.parse(e)/100,transform:e=>on.transform(e*100)},Of={...lo,transform:Math.round},Pm={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,size:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,rotate:En,rotateX:En,rotateY:En,rotateZ:En,scale:Mi,scaleX:Mi,scaleY:Mi,scaleZ:Mi,skew:En,skewX:En,skewY:En,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:No,originX:Af,originY:Af,originZ:ae,zIndex:Of,backgroundPositionX:ae,backgroundPositionY:ae,fillOpacity:No,strokeOpacity:No,numOctaves:Of};function Fc(e,t,n){const{style:r,vars:o,transform:i,transformOrigin:s}=e;let a=!1,l=!1,c=!0;for(const u in t){const f=t[u];if(Cm(u)){o[u]=f;continue}const h=Pm[u],d=Vw(f,h);if($n.has(u)){if(a=!0,i[u]=d,!c)continue;f!==(h.default||0)&&(c=!1)}else u.startsWith("origin")?(l=!0,s[u]=d):r[u]=d}if(t.transform||(a||n?r.transform=Lw(e.transform,c,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:h=0}=s;r.transformOrigin=`${u} ${f} ${h}`}}const jc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Rm(e,t,n){for(const r in t)!lt(t[r])&&!Tm(r,n)&&(e[r]=t[r])}function Gw({transformTemplate:e},t){return b.useMemo(()=>{const n=jc();return Fc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Uw(e,t){const n=e.style||{},r={};return Rm(r,n,e),Object.assign(r,Gw(e,t)),r}function Yw(e,t){const n={},r=Uw(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 qw=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 as(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qw.has(e)}let Im=e=>!as(e);function Am(e){e&&(Im=t=>t.startsWith("on")?!as(t):e(t))}try{Am(require("@emotion/is-prop-valid").default)}catch{}function Kw(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Im(o)||n===!0&&as(o)||!t&&!as(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function kf(e,t,n){return typeof e=="string"?e:ae.transform(t+n*e)}function Xw(e,t,n){const r=kf(t,e.x,e.width),o=kf(n,e.y,e.height);return`${r} ${o}`}const Qw={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zw={offset:"strokeDashoffset",array:"strokeDasharray"};function Jw(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Qw:Zw;e[i.offset]=ae.transform(-r);const s=ae.transform(t),a=ae.transform(n);e[i.array]=`${s} ${a}`}function Lc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Fc(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:d,dimensions:p}=e;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(o!==void 0||i!==void 0||d.transform)&&(d.transformOrigin=Xw(p,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&Jw(h,s,a,l,!1)}const Om=()=>({...jc(),attrs:{}}),Nc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function e1(e,t,n,r){const o=b.useMemo(()=>{const i=Om();return Lc(i,t,Nc(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Rm(i,e.style,e),o.style={...i,...o.style}}return o}function t1(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(kc(n)?e1:Yw)(r,i,s,n),c=Kw(r,typeof n=="string",e),u=n!==b.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=b.useMemo(()=>lt(f)?f.get():f,[f]);return b.createElement(n,{...u,children:h})}}function km(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Dm=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 Mm(e,t,n,r){km(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Dm.has(o)?o:_s(o),t.attrs[o])}function _c(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(lt(o[s])||t.style&&lt(t.style[s])||Tm(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Fm(e,t,n){const r=_c(e,t,n);for(const o in e)if(lt(e[o])||lt(t[o])){const i=hi.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function Df(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Vc(e,t,n,r){if(typeof t=="function"){const[o,i]=Df(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Df(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ln(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Cl=e=>Array.isArray(e),n1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),r1=e=>Cl(e)?e[e.length-1]||0:e;function Ui(e){const t=lt(e)?e.get():e;return n1(t)?t.toValue():t}const jm=new Set(["opacity","clipPath","filter","transform"]);function Lm(e){if($n.has(e))return"transform";if(jm.has(e))return _s(e)}function $s(e,t){e.indexOf(t)===-1&&e.push(t)}function gi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function o1([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}function i1({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:a1(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=c=>r(o,c,l)),l}const Nm=e=>(t,n)=>{const r=b.useContext(js),o=b.useContext(Ls),i=()=>i1(e,t,r,o,n);return n?i():ln(i)};function s1(e,t){const n=Lm(t);n&&$s(e,n)}function Mf(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o<r.length;o++){const i=Vc(e,r[o]);if(i){const{transitionEnd:s,transition:a,...l}=i;n(l,s)}}}function a1(e,t,n,r,o){var i;const s={},a=[],l=r&&((i=e.style)===null||i===void 0?void 0:i.willChange)===void 0,c=o(e,{});for(const v in c)s[v]=Ui(c[v]);let{initial:u,animate:f}=e;const h=Vs(e),d=Sm(e);t&&d&&!h&&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"&&!Xo(m)&&Mf(e,m,(v,g)=>{for(const x in v){let y=v[x];if(Array.isArray(y)){const T=p?y.length-1:0;y=y[T]}y!==null&&(s[x]=y)}for(const x in g)s[x]=g[x]}),l&&(f&&u!==!1&&!Xo(f)&&Mf(e,f,v=>{for(const g in v)s1(a,g)}),a.length&&(s.willChange=a.join(","))),s}const{schedule:Se,cancel:cn,state:ht,steps:wa}=bm(typeof requestAnimationFrame<"u"?requestAnimationFrame:yt,!0),l1={useVisualState:Nm({scrapeMotionValuesFromProps:Fm,createRenderState:Om,onMount:(e,t,{renderState:n,latestValues:r})=>{Se.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Se.render(()=>{Lc(n,r,Nc(t.tagName),e.transformTemplate),Mm(t,n)})}})},c1={useVisualState:Nm({applyWillChange:!0,scrapeMotionValuesFromProps:_c,createRenderState:jc})};function u1(e,{forwardMotionProps:t=!1},n,r){return{...kc(e)?l1:c1,preloadedFeatures:n,useRender:t1(t),createVisualElement:r,Component:e}}function mn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _m=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Bs(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const f1=e=>t=>_m(t)&&e(t,Bs(t));function yn(e,t,n,r){return mn(e,t,f1(n),r)}const d1=(e,t)=>n=>t(e(n)),vn=(...e)=>e.reduce(d1);function Vm(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Ff=Vm("dragHorizontal"),jf=Vm("dragVertical");function $m(e){let t=!1;if(e==="y")t=jf();else if(e==="x")t=Ff();else{const n=Ff(),r=jf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Bm(){const e=$m(!0);return e?(e(),!1):!0}class Bn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Lf(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||Bm())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Se.postRender(()=>l(i,s))};return yn(e.current,n,o,{passive:!e.getProps()[r]})}class h1 extends Bn{mount(){this.unmount=vn(Lf(this.node,!0),Lf(this.node,!1))}unmount(){}}class p1 extends Bn{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=vn(mn(this.node.current,"focus",()=>this.onFocus()),mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Hm=(e,t)=>t?e===t?!0:Hm(e,t.parentElement):!1;function Sa(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Bs(n))}class m1 extends Bn{constructor(){super(...arguments),this.removeStartListeners=yt,this.removeEndListeners=yt,this.removeAccessibleListeners=yt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=yn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:f}=this.node.getProps(),h=!f&&!Hm(this.node.current,a.target)?u:c;h&&Se.update(()=>h(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=yn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=vn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Sa("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Se.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=mn(this.node.current,"keyup",s),Sa("down",(a,l)=>{this.startPress(a,l)})},n=mn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Sa("cancel",(i,s)=>this.cancelPress(i,s))},o=mn(this.node.current,"blur",r);this.removeAccessibleListeners=vn(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&&Se.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Bm()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Se.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=yn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=mn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=vn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pl=new WeakMap,Ta=new WeakMap,g1=e=>{const t=Pl.get(e.target);t&&t(e)},y1=e=>{e.forEach(g1)};function v1({root:e,...t}){const n=e||document;Ta.has(n)||Ta.set(n,{});const r=Ta.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(y1,{root:e,...t})),r[o]}function b1(e,t,n){const r=v1(t);return Pl.set(e,n),r.observe(e),()=>{Pl.delete(e),r.unobserve(e)}}const x1={some:0,all:1};class w1 extends Bn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:x1[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return b1(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(S1(t,n))&&this.startObserver()}unmount(){}}function S1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const T1={inView:{Feature:w1},tap:{Feature:m1},focus:{Feature:p1},hover:{Feature:h1}};function Wm(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 Hs(e,t,n){const r=e.getProps();return Vc(r,t,n!==void 0?n:r.custom,e)}const sn=e=>e*1e3,an=e=>e/1e3,E1={type:"spring",stiffness:500,damping:25,restSpeed:10},C1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),P1={type:"keyframes",duration:.8},R1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},I1=(e,{keyframes:t})=>t.length>2?P1:$n.has(e)?e.startsWith("scale")?C1(t[1]):E1:R1;function A1({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function $c(e,t){return e[t]||e.default||e}const O1=e=>e!==null;function Ws(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(O1),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}let Yi;function k1(){Yi=void 0}const On={now:()=>(Yi===void 0&&On.set(ht.isProcessing||gw.useManualTiming?ht.timestamp:performance.now()),Yi),set:e=>{Yi=e,queueMicrotask(k1)}},zm=e=>/^0[^.\s]+$/u.test(e);function D1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zm(e):!0}const Gm=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),M1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function F1(e){const t=M1.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const j1=4;function Um(e,t,n=1){Lt(n<=j1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=F1(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Gm(s)?parseFloat(s):s}return Dc(o)?Um(o,t,n+1):o}const L1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Nf=e=>e===lo||e===ae,_f=(e,t)=>parseFloat(e.split(", ")[t]),Vf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return _f(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?_f(i[1],e):0}},N1=new Set(["x","y","z"]),_1=hi.filter(e=>!N1.has(e));function V1(e){const t=[];return _1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Hr={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:Vf(4,13),y:Vf(5,14)};Hr.translateX=Hr.x;Hr.translateY=Hr.y;const Ym=e=>t=>t.test(e),$1={test:e=>e==="auto",parse:e=>e},qm=[lo,ae,on,En,zw,Ww,$1],$f=e=>qm.find(Ym(e)),cr=new Set;let Rl=!1,Il=!1;function Km(){if(Il){const e=Array.from(cr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=V1(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Il=!1,Rl=!1,cr.forEach(e=>e.complete()),cr.clear()}function Xm(){cr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Il=!0)})}function B1(){Xm(),Km()}class Bc{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(cr.add(this),Rl||(Rl=!0,Se.read(Xm),Se.resolveKeyframes(Km))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const s=o==null?void 0:o.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),cr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,cr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Hc=(e,t)=>n=>!!(pi(n)&&Bw.test(n)&&n.startsWith(e)||t&&!Hw(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qm=(e,t,n)=>r=>{if(!pi(r))return r;const[o,i,s,a]=r.match(Mc);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},H1=e=>Mn(0,255,e),Ea={...lo,transform:e=>Math.round(H1(e))},ir={test:Hc("rgb","red"),parse:Qm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ea.transform(e)+", "+Ea.transform(t)+", "+Ea.transform(n)+", "+_o(No.transform(r))+")"};function W1(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 Al={test:Hc("#"),parse:W1,transform:ir.transform},Rr={test:Hc("hsl","hue"),parse:Qm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+on.transform(_o(t))+", "+on.transform(_o(n))+", "+_o(No.transform(r))+")"},bt={test:e=>ir.test(e)||Al.test(e)||Rr.test(e),parse:e=>ir.test(e)?ir.parse(e):Rr.test(e)?Rr.parse(e):Al.parse(e),transform:e=>pi(e)?e:e.hasOwnProperty("red")?ir.transform(e):Rr.transform(e)};function z1(e){var t,n;return isNaN(e)&&pi(e)&&(((t=e.match(Mc))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($w))===null||n===void 0?void 0:n.length)||0)>0}const Zm="number",Jm="color",G1="var",U1="var(",Bf="${}",Y1=/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 Zo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Y1,l=>(bt.test(l)?(r.color.push(i),o.push(Jm),n.push(bt.parse(l))):l.startsWith(U1)?(r.var.push(i),o.push(G1),n.push(l)):(r.number.push(i),o.push(Zm),n.push(parseFloat(l))),++i,Bf)).split(Bf);return{values:n,split:a,indexes:r,types:o}}function eg(e){return Zo(e).values}function tg(e){const{split:t,types:n}=Zo(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Zm?i+=_o(o[s]):a===Jm?i+=bt.transform(o[s]):i+=o[s]}return i}}const q1=e=>typeof e=="number"?0:e;function K1(e){const t=eg(e);return tg(e)(t.map(q1))}const Fn={test:z1,parse:eg,createTransformer:tg,getAnimatableNone:K1},X1=new Set(["brightness","contrast","saturate","opacity"]);function Q1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Mc)||[];if(!r)return e;const o=n.replace(r,"");let i=X1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Z1=/\b([a-z-]*)\(.*?\)/gu,Ol={...Fn,getAnimatableNone:e=>{const t=e.match(Z1);return t?t.map(Q1).join(" "):e}},J1={...Pm,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Ol,WebkitFilter:Ol},Wc=e=>J1[e];function ng(e,t){let n=Wc(e);return n!==Ol&&(n=Fn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const eS=new Set(["auto","none","0"]);function tS(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!eS.has(i)&&Zo(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=ng(n,o)}class rg extends Bc{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(),Dc(c))){const u=Um(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!L1.has(r)||t.length!==2)return;const[o,i]=t,s=$f(o),a=$f(i);if(s!==a)if(Nf(s)&&Nf(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++)D1(t[o])&&r.push(o);r.length&&tS(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Hr[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 i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=Hr[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 og(e){let t;return()=>(t===void 0&&(t=e()),t)}const Hf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Fn.test(e)||e==="0")&&!e.startsWith("url("));function nS(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 rS(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Hf(o,t),a=Hf(i,t);return ao(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:nS(e)||n==="spring"&&r}class ig{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&B1(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!rS(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ws(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 sg(e,t){return t?e*(1e3/t):0}const oS=5;function ag(e,t,n){const r=Math.max(t-oS,0);return sg(n-e(r),t-r)}const Ca=.001,iS=.01,Wf=10,sS=.05,aS=1;function lS({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;ao(e<=sn(Wf),"Spring duration must be 10 seconds or less");let s=1-t;s=Mn(sS,aS,s),e=Mn(iS,Wf,an(e)),s<1?(o=c=>{const u=c*s,f=u*e,h=u-n,d=kl(c,s),p=Math.exp(-f);return Ca-h/d*p},i=c=>{const f=c*s*e,h=f*n+n,d=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-f),m=kl(Math.pow(c,2),s);return(-o(c)+Ca>0?-1:1)*((h-d)*p)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Ca+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=uS(o,i,a);if(e=sn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const cS=12;function uS(e,t,n){let r=n;for(let o=1;o<cS;o++)r=r-e(r)/t(r);return r}function kl(e,t){return e*Math.sqrt(1-t*t)}const fS=["duration","bounce"],dS=["stiffness","damping","mass"];function zf(e,t){return t.some(n=>e[n]!==void 0)}function hS(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!zf(e,dS)&&zf(e,fS)){const n=lS(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function zc({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:h}=hS({...r,velocity:-an(r.velocity||0)}),d=f||0,p=l/(2*Math.sqrt(a*c)),m=i-o,v=an(Math.sqrt(a/c)),g=Math.abs(m)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let x;if(p<1){const y=kl(v,p);x=T=>{const S=Math.exp(-p*v*T);return i-S*((d+p*v*m)/y*Math.sin(y*T)+m*Math.cos(y*T))}}else if(p===1)x=y=>i-Math.exp(-v*y)*(m+(d+v*m)*y);else{const y=v*Math.sqrt(p*p-1);x=T=>{const S=Math.exp(-p*v*T),E=Math.min(y*T,300);return i-S*((d+p*v*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=x(y);if(h)s.done=y>=u;else{let S=d;y!==0&&(p<1?S=ag(x,y,T):S=0);const E=Math.abs(S)<=n,I=Math.abs(i-T)<=t;s.done=E&&I}return s.value=s.done?i:T,s}}}function Gf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},d=P=>a!==void 0&&P<a||l!==void 0&&P>l,p=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let m=n*t;const v=f+m,g=s===void 0?v:s(v);g!==v&&(m=g-f);const x=P=>-m*Math.exp(-P/r),y=P=>g+x(P),T=P=>{const A=x(P),C=y(P);h.done=Math.abs(A)<=c,h.value=h.done?g:C};let S,E;const I=P=>{d(h.value)&&(S=P,E=zc({keyframes:[h.value,p(h.value)],velocity:ag(y,P,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return I(0),{calculatedDuration:null,next:P=>{let A=!1;return!E&&S===void 0&&(A=!0,T(P),I(P)),S!==void 0&&P>=S?E.next(P-S):(!A&&T(P),h)}}}const lg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pS=1e-7,mS=12;function gS(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=lg(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>pS&&++a<mS);return s}function yi(e,t,n,r){if(e===t&&n===r)return yt;const o=i=>gS(i,0,1,e,n);return i=>i===0||i===1?i:lg(o(i),t,r)}const yS=yi(.42,0,1,1),vS=yi(0,0,.58,1),cg=yi(.42,0,.58,1),ug=e=>Array.isArray(e)&&typeof e[0]!="number",fg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dg=e=>t=>1-e(1-t),Gc=e=>1-Math.sin(Math.acos(e)),hg=dg(Gc),bS=fg(Gc),pg=yi(.33,1.53,.69,.99),Uc=dg(pg),xS=fg(Uc),wS=e=>(e*=2)<1?.5*Uc(e):.5*(2-Math.pow(2,-10*(e-1))),Uf={linear:yt,easeIn:yS,easeInOut:cg,easeOut:vS,circIn:Gc,circInOut:bS,circOut:hg,backIn:Uc,backInOut:xS,backOut:pg,anticipate:wS},Dl=e=>{if(Array.isArray(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return yi(t,n,r,o)}else if(typeof e=="string")return Lt(Uf[e]!==void 0,`Invalid easing type '${e}'`),Uf[e];return e},Wr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ve=(e,t,n)=>e+(t-e)*n;function Pa(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 SS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Pa(l,a,e+1/3),i=Pa(l,a,e),s=Pa(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function ls(e,t){return n=>n>0?t:e}const Ra=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},TS=[Al,ir,Rr],ES=e=>TS.find(t=>t.test(e));function Yf(e){const t=ES(e);if(ao(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Rr&&(n=SS(n)),n}const qf=(e,t)=>{const n=Yf(e),r=Yf(t);if(!n||!r)return ls(e,t);const o={...n};return i=>(o.red=Ra(n.red,r.red,i),o.green=Ra(n.green,r.green,i),o.blue=Ra(n.blue,r.blue,i),o.alpha=Ve(n.alpha,r.alpha,i),ir.transform(o))},Ml=new Set(["none","hidden"]);function CS(e,t){return Ml.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function PS(e,t){return n=>Ve(e,t,n)}function Yc(e){return typeof e=="number"?PS:typeof e=="string"?Dc(e)?ls:bt.test(e)?qf:AS:Array.isArray(e)?mg:typeof e=="object"?bt.test(e)?qf:RS:ls}function mg(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Yc(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function RS(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Yc(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function IS(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,o[s]++}return r}const AS=(e,t)=>{const n=Fn.createTransformer(t),r=Zo(e),o=Zo(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?Ml.has(e)&&!o.values.length||Ml.has(t)&&!r.values.length?CS(e,t):vn(mg(IS(r,o),o.values),n):(ao(!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.`),ls(e,t))};function gg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):Yc(e)(e,t)}function OS(e,t,n){const r=[],o=n||gg,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||yt:t;a=vn(l,a)}r.push(a)}return r}function yg(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Lt(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=OS(t,r,o),a=s.length,l=c=>{let u=0;if(a>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const f=Wr(e[u],e[u+1],c);return s[u](f)};return n?c=>l(Mn(e[0],e[i-1],c)):l}function vg(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wr(0,t,r);e.push(Ve(n,1,o))}}function bg(e){const t=[0];return vg(t,e.length-1),t}function kS(e,t){return e.map(n=>n*t)}function DS(e,t){return e.map(()=>t||cg).splice(0,e.length-1)}function cs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=ug(r)?r.map(Dl):Dl(r),i={done:!1,value:t[0]},s=kS(n&&n.length===t.length?n:bg(t),e),a=yg(s,t,{ease:Array.isArray(o)?o:DS(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Fl=2e4;function xg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Fl;)t+=n,r=e.next(t);return t>=Fl?1/0:t}const MS=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Se.update(t,!0),stop:()=>cn(t),now:()=>ht.isProcessing?ht.timestamp:On.now()}},FS={decay:Gf,inertia:Gf,tween:cs,keyframes:cs,spring:zc},jS=e=>e/100;class qc extends ig{constructor({KeyframeResolver:t=Bc,...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:i}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&o&&o.owner?this.resolver=o.owner.resolveKeyframes(i,s,r,o):this.resolver=new t(i,s,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=FS[n]||cs;let l,c;a!==cs&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Lt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=vn(jS,gg(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=xg(u));const{calculatedDuration:f}=u,h=f+o,d=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:d}}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:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:v}=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 g=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=i;if(d){const P=Math.min(this.currentTime,u)/f;let A=Math.floor(P),C=P%1;!C&&P>=1&&(C=1),C===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(p==="reverse"?(C=1-C,m&&(C-=m/f)):p==="mirror"&&(T=s)),y=Mn(0,1,C)*f}const S=x?{done:!1,value:l[0]}:T.next(y);a&&(S.value=a(S.value));let{done:E}=S;!x&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return I&&o!==void 0&&(S.value=Ws(l,this.options,o)),v&&v(S.value),I&&this.finish(),S}get duration(){const{resolved:t}=this;return t?an(t.calculatedDuration):0}get time(){return an(this.currentTime)}set time(t){t=sn(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=an(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MS,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 wg=e=>Array.isArray(e)&&typeof e[0]=="number";function Sg(e){return!!(!e||typeof e=="string"&&e in Kc||wg(e)||Array.isArray(e)&&e.every(Sg))}const Do=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Kc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Do([0,.65,.55,1]),circOut:Do([.55,0,1,.45]),backIn:Do([.31,.01,.66,-.59]),backOut:Do([.33,1.53,.69,.99])};function LS(e){return Tg(e)||Kc.easeOut}function Tg(e){if(e)return wg(e)?Do(e):Array.isArray(e)?e.map(LS):Kc[e]}function NS(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Tg(a);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const _S=og(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),us=10,VS=2e4;function $S(e){return e.type==="spring"||!Sg(e.ease)}function BS(e,t){const n=new qc({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<VS;)r=n.sample(i),o.push(r.value),i+=us;return{times:void 0,keyframes:o,duration:i-us,ease:"linear"}}class Kf extends ig{constructor(t){super(t);const{name:n,motionValue:r,keyframes:o}=this.options;this.resolver=new rg(o,(i,s)=>this.onKeyframesResolved(i,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if($S(this.options)){const{onComplete:f,onUpdate:h,motionValue:d,...p}=this.options,m=BS(t,p);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const u=NS(l.owner.current,c,t,{...this.options,duration:o,times:i,ease:s});return u.startTime=On.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;l.set(Ws(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return an(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return an(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=sn(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 yt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return yt}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:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,...h}=this.options,d=new qc({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),p=sn(this.time);c.setWithVelocity(d.sample(p-us).value,d.sample(p).value,us)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return _S()&&r&&jm.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function HS(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Se.update(r,!0),()=>cn(r)}const WS=og(()=>window.ScrollTimeline!==void 0);class Xc{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(WS()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),HS(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 Qc=(e,t,n,r={},o,i,s)=>a=>{const l=$c(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-sn(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:d=>{t.set(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};A1(l)||(f={...f,...I1(e,f)}),f.duration&&(f.duration=sn(f.duration)),f.repeatDelay&&(f.repeatDelay=sn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const d=Ws(f.keyframes,l);if(d!==void 0)return Se.update(()=>{f.onUpdate(d),f.onComplete()}),new Xc([])}return!i&&Kf.supports(f)?new Kf(f):new qc(f)};class Zc{constructor(){this.subscriptions=[]}add(t){return $s(this.subscriptions,t),()=>gi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xf=new Set;function Jc(e,t,n){e||Xf.has(t)||(console.warn(t),Xf.add(t))}const Qf=30,zS=e=>!isNaN(parseFloat(e)),Vo={current:void 0};class Eg{constructor(t,n={}){this.version="11.3.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=On.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=On.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zS(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Jc(!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 Zc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Se.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 Vo.current&&Vo.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=On.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Qf);return sg(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 zr(e,t){return new Eg(e,t)}function GS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function US(e,t){const n=Hs(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=r1(i[s]);GS(e,s,a)}}function Cg(e){return e.getProps()[vm]}class YS extends Eg{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=Lm(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 i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(gi(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function qS(e){return!!(lt(e)&&e.add)}function jl(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 YS("auto"),e.addValue("willChange",r)),qS(r))return r.add(t)}function KS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function eu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),d=l[f];if(d===void 0||u&&KS(u,f))continue;const p={delay:n,elapsed:0,...$c(s||{},f)};let m=!1;if(window.HandoffAppearAnimations){const g=Cg(e);if(g){const x=window.HandoffAppearAnimations(g,f,h,Se);x!==null&&(p.elapsed=x,m=!0)}}h.start(Qc(f,h,d,e.shouldReduceMotion&&$n.has(f)?{type:!1}:p,e,m,jl(e,f)));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{Se.update(()=>{a&&US(e,a)})}),c}function Ll(e,t,n={}){var r;const o=Hs(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(eu(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return XS(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(n.delay)])}function XS(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(QS).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(Ll(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function QS(e,t){return e.sortNodePosition(t)}function ZS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Ll(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Ll(e,t,n);else{const o=typeof t=="function"?Hs(e,t,n.custom):t;r=Promise.all(eu(e,o,n))}return r.then(()=>{Se.postRender(()=>{e.notify("AnimationComplete",t)})})}const JS=[...Ac].reverse(),eT=Ac.length;function tT(e){return t=>Promise.all(t.map(({animation:n,options:r})=>ZS(e,n,r)))}function nT(e){let t=tT(e),n=Zf(),r=!0;const o=l=>(c,u)=>{var f;const h=Hs(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function i(l){t=l(e)}function s(l){const c=e.getProps(),u=e.getVariantContext(!0)||{},f=[],h=new Set;let d={},p=1/0;for(let v=0;v<eT;v++){const g=JS[v],x=n[g],y=c[g]!==void 0?c[g]:u[g],T=Ko(y),S=g===l?x.isActive:null;S===!1&&(p=v);let E=y===u[g]&&y!==c[g]&&T;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),x.protectedKeys={...d},!x.isActive&&S===null||!y&&!x.prevProp||Xo(y)||typeof y=="boolean")continue;let P=rT(x.prevProp,y)||g===l&&x.isActive&&!E&&T||v>p&&T,A=!1;const C=Array.isArray(y)?y:[y];let L=C.reduce(o(g),{});S===!1&&(L={});const{prevResolvedValues:M={}}=x,N={...M,...L},R=k=>{P=!0,h.has(k)&&(A=!0,h.delete(k)),x.needsAnimating[k]=!0;const F=e.getValue(k);F&&(F.liveStyle=!1)};for(const k in N){const F=L[k],_=M[k];if(d.hasOwnProperty(k))continue;let z=!1;Cl(F)&&Cl(_)?z=!Wm(F,_):z=F!==_,z?F!=null?R(k):h.add(k):F!==void 0&&h.has(k)?R(k):x.protectedKeys[k]=!0}x.prevProp=y,x.prevResolvedValues=L,x.isActive&&(d={...d,...L}),r&&e.blockInitialAnimation&&(P=!1),P&&(!E||A)&&f.push(...C.map(k=>({animation:k,options:{type:g}})))}if(h.size){const v={};h.forEach(g=>{const x=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),v[g]=x??null}),f.push({animation:v})}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(h=>{var d;return(d=h.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const f=s(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Zf(),r=!0}}}function rT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wm(t,e):!1}function Kn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zf(){return{animate:Kn(!0),whileInView:Kn(),whileHover:Kn(),whileTap:Kn(),whileDrag:Kn(),whileFocus:Kn(),exit:Kn()}}class oT extends Bn{constructor(t){super(t),t.animationState||(t.animationState=nT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xo(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 iT=0;class sT extends Bn{constructor(){super(...arguments),this.id=iT++}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 aT={animation:{Feature:oT},exit:{Feature:sT}},Jf=(e,t)=>Math.abs(e-t);function lT(e,t){const n=Jf(e.x,t.x),r=Jf(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pg{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Aa(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=lT(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:m}=ht;this.history.push({...p,timestamp:m});const{onStart:v,onMove:g}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ia(h,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Aa(f.type==="pointercancel"?this.lastMoveEventInfo:Ia(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!_m(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Bs(t),a=Ia(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=ht;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Aa(a,this.history)),this.removeListeners=vn(yn(this.contextWindow,"pointermove",this.handlePointerMove),yn(this.contextWindow,"pointerup",this.handlePointerUp),yn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),cn(this.updatePoint)}}function Ia(e,t){return t?{point:t(e.point)}:e}function ed(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Aa({point:e},t){return{point:e,delta:ed(e,Rg(t)),offset:ed(e,cT(t)),velocity:uT(t,.1)}}function cT(e){return e[0]}function Rg(e){return e[e.length-1]}function uT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Rg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>sn(t)));)n--;if(!r)return{x:0,y:0};const i=an(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Ig=1e-4,fT=1-Ig,dT=1+Ig,Ag=.01,hT=0-Ag,pT=0+Ag;function Nt(e){return e.max-e.min}function mT(e,t,n){return Math.abs(e-t)<=n}function td(e,t,n,r=.5){e.origin=r,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=Nt(n)/Nt(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fT&&e.scale<=dT||isNaN(e.scale))&&(e.scale=1),(e.translate>=hT&&e.translate<=pT||isNaN(e.translate))&&(e.translate=0)}function $o(e,t,n,r){td(e.x,t.x,n.x,r?r.originX:void 0),td(e.y,t.y,n.y,r?r.originY:void 0)}function nd(e,t,n){e.min=n.min+t.min,e.max=e.min+Nt(t)}function gT(e,t,n){nd(e.x,t.x,n.x),nd(e.y,t.y,n.y)}function rd(e,t,n){e.min=t.min-n.min,e.max=e.min+Nt(t)}function Bo(e,t,n){rd(e.x,t.x,n.x),rd(e.y,t.y,n.y)}function yT(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ve(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ve(n,e,r.max):Math.min(e,n)),e}function od(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 vT(e,{top:t,left:n,bottom:r,right:o}){return{x:od(e.x,n,o),y:od(e.y,t,r)}}function id(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 bT(e,t){return{x:id(e.x,t.x),y:id(e.y,t.y)}}function xT(e,t){let n=.5;const r=Nt(e),o=Nt(t);return o>r?n=Wr(t.min,t.max-r,e.min):r>o&&(n=Wr(e.min,e.max-o,t.min)),Mn(0,1,n)}function wT(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 Nl=.35;function ST(e=Nl){return e===!1?e=0:e===!0&&(e=Nl),{x:sd(e,"left","right"),y:sd(e,"top","bottom")}}function sd(e,t,n){return{min:ad(e,t),max:ad(e,n)}}function ad(e,t){return typeof e=="number"?e:e[t]||0}const ld=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ir=()=>({x:ld(),y:ld()}),cd=()=>({min:0,max:0}),Je=()=>({x:cd(),y:cd()});function $t(e){return[e("x"),e("y")]}function Og({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function TT({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ET(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 Oa(e){return e===void 0||e===1}function _l({scale:e,scaleX:t,scaleY:n}){return!Oa(e)||!Oa(t)||!Oa(n)}function Qn(e){return _l(e)||kg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kg(e){return ud(e.x)||ud(e.y)}function ud(e){return e&&e!=="0%"}function fs(e,t,n){const r=e-n,o=t*r;return n+o}function fd(e,t,n,r,o){return o!==void 0&&(e=fs(e,o,r)),fs(e,n,r)+t}function Vl(e,t=0,n=1,r,o){e.min=fd(e.min,t,n,r,o),e.max=fd(e.max,t,n,r,o)}function Dg(e,{x:t,y:n}){Vl(e.x,t.translate,t.scale,t.originPoint),Vl(e.y,n.translate,n.scale,n.originPoint)}const dd=.999999999999,hd=1.0000000000001;function CT(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ar(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Dg(e,s)),r&&Qn(i.latestValues)&&Ar(e,i.latestValues))}t.x<hd&&t.x>dd&&(t.x=1),t.y<hd&&t.y>dd&&(t.y=1)}function Pn(e,t){e.min=e.min+t,e.max=e.max+t}function pd(e,t,n,r,o=.5){const i=Ve(e.min,e.max,o);Vl(e,t,n,i,r)}function Ar(e,t){pd(e.x,t.x,t.scaleX,t.scale,t.originX),pd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Mg(e,t){return Og(ET(e.getBoundingClientRect(),t))}function PT(e,t,n){const r=Mg(e,n),{scroll:o}=t;return o&&(Pn(r.x,o.offset.x),Pn(r.y,o.offset.y)),r}const Fg=({current:e})=>e?e.ownerDocument.defaultView:null,RT=new WeakMap;class IT{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=Je(),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(Bs(u,"page").point)},i=(u,f)=>{var h;const{drag:d,dragPropagation:p,onDragStart:m}=this.getProps();if(d&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$m(d),!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),$t(g=>{let x=this.getAxisMotionValue(g).get()||0;if(on.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[g];T&&(x=Nt(T)*(parseFloat(x)/100))}}this.originPoint[g]=x}),m&&Se.postRender(()=>m(u,f)),(h=this.removeWillChange)===null||h===void 0||h.call(this),this.removeWillChange=jl(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(u,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=f;if(d&&this.currentDirection===null){this.currentDirection=AT(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&m(u,f)},a=(u,f)=>this.stop(u,f),l=()=>$t(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 Pg(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Fg(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:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&Se.postRender(()=>s(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||!Fi(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=yT(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Pr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=vT(o.layoutBox,n):this.constraints=!1,this.elastic=ST(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&$t(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=wT(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Pr(t))return!1;const r=t.current;Lt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=PT(r,o.root,this.visualElement.getTransformPagePoint());let s=bT(o.layout.layoutBox,i);if(n){const a=n(TT(s));this.hasMutatedConstraints=!!a,a&&(s=Og(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=$t(u=>{if(!Fi(u,n,this.currentDirection))return;let f=l&&l[u]||{};s&&(f={min:0,max:0});const h=o?200:1e6,d=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Qc(t,r,0,n,this.visualElement,!1,jl(this.visualElement,t)))}stopAnimation(){$t(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){$t(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){$t(n=>{const{drag:r}=this.getProps();if(!Fi(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ve(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Pr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};$t(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=xT({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),$t(s=>{if(!Fi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Ve(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;RT.set(this.visualElement,this);const t=this.visualElement.current,n=yn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Pr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Se.read(r);const s=mn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&($t(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Nl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Fi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function AT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OT extends Bn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new IT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const md=e=>(t,n)=>{e&&Se.postRender(()=>e(t,n))};class kT extends Bn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new Pg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:md(t),onStart:md(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&Se.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=yn(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 DT(){const e=b.useContext(Ls);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 qi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function gd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Io={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=gd(e,t.target.x),r=gd(e,t.target.y);return`${n}% ${r}%`}},MT={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Fn.parse(e);if(o.length>5)return r;const i=Fn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Ve(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};class FT extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;Mw(jT),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),qi.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Se.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ic.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 jg(e){const[t,n]=DT(),r=b.useContext(Qo);return w.jsx(FT,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(xm),isPresent:t,safeToRemove:n})}const jT={borderRadius:{...Io,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Io,borderTopRightRadius:Io,borderBottomLeftRadius:Io,borderBottomRightRadius:Io,boxShadow:MT},Lg=["TopLeft","TopRight","BottomLeft","BottomRight"],LT=Lg.length,yd=e=>typeof e=="string"?parseFloat(e):e,vd=e=>typeof e=="number"||ae.test(e);function NT(e,t,n,r,o,i){o?(e.opacity=Ve(0,n.opacity!==void 0?n.opacity:1,_T(r)),e.opacityExit=Ve(t.opacity!==void 0?t.opacity:1,0,VT(r))):i&&(e.opacity=Ve(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<LT;s++){const a=`border${Lg[s]}Radius`;let l=bd(t,a),c=bd(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||vd(l)===vd(c)?(e[a]=Math.max(Ve(yd(l),yd(c),r),0),(on.test(c)||on.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,r))}function bd(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _T=Ng(0,.5,hg),VT=Ng(.5,.95,yt);function Ng(e,t,n){return r=>r<e?0:r>t?1:n(Wr(e,t,r))}function xd(e,t){e.min=t.min,e.max=t.max}function Vt(e,t){xd(e.x,t.x),xd(e.y,t.y)}function wd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sd(e,t,n,r,o){return e-=t,e=fs(e,1/n,r),o!==void 0&&(e=fs(e,1/o,r)),e}function $T(e,t=0,n=1,r=.5,o,i=e,s=e){if(on.test(t)&&(t=parseFloat(t),t=Ve(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ve(i.min,i.max,r);e===i&&(a-=t),e.min=Sd(e.min,t,n,a,o),e.max=Sd(e.max,t,n,a,o)}function Td(e,t,[n,r,o],i,s){$T(e,t[n],t[r],t[o],t.scale,i,s)}const BT=["x","scaleX","originX"],HT=["y","scaleY","originY"];function Ed(e,t,n,r){Td(e.x,t,BT,n?n.x:void 0,r?r.x:void 0),Td(e.y,t,HT,n?n.y:void 0,r?r.y:void 0)}function Cd(e){return e.translate===0&&e.scale===1}function _g(e){return Cd(e.x)&&Cd(e.y)}function WT(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 Vg(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 Pd(e){return Nt(e.x)/Nt(e.y)}function Rd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class zT{constructor(){this.members=[]}add(t){$s(this.members,t),t.scheduleRender()}remove(t){if(gi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GT(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),d&&(r+=`skewX(${d}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 UT=(e,t)=>e.depth-t.depth;class YT{constructor(){this.children=[],this.isDirty=!1}add(t){$s(this.children,t),this.isDirty=!0}remove(t){gi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UT),this.isDirty=!1,this.children.forEach(t)}}function qT(e,t){const n=On.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(cn(r),e(i-t))};return Se.read(r,!0),()=>cn(r)}function $g(e){return e instanceof SVGElement&&e.tagName!=="svg"}function tu(e,t,n){const r=lt(e)?e:zr(e);return r.start(Qc("",r,t,n)),r.animation}const Zn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},ka=["","X","Y","Z"],KT={visibility:"hidden"},Id=1e3;let XT=0;function Da(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Bg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Cg(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?Bg(e.parent):!1:!1}function Hg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=XT++,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&&(Zn.totalNodes=Zn.resolvedTargetDeltas=Zn.recalculatedProjection=0),this.nodes.forEach(JT),this.nodes.forEach(oE),this.nodes.forEach(iE),this.nodes.forEach(eE),window.MotionDebug&&window.MotionDebug.record(Zn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 YT)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Zc),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=$g(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=qT(h,250),qi.hasAnimatedSinceResize&&(qi.hasAnimatedSinceResize=!1,this.nodes.forEach(Od))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||uE,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),x=!this.targetLayout||!Vg(this.targetLayout,p)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const T={...$c(m,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||Od(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,cn(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(sE),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Bg(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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ad);return}this.isUpdating||this.nodes.forEach(nE),this.isUpdating=!1,this.nodes.forEach(rE),this.nodes.forEach(QT),this.nodes.forEach(ZT),this.clearAllSnapshots();const a=On.now();ht.delta=Mn(0,1e3/60,a-ht.timestamp),ht.timestamp=a,ht.isProcessing=!0,wa.update.process(ht),wa.preRender.process(ht),wa.render.process(ht),ht.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tE),this.sharedNodes.forEach(aE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Se.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Se.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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Je(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!_g(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||Qn(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),fE(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Je();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(Pn(a.x,l.offset.x),Pn(a.y,l.offset.y)),a}removeElementScroll(s){const a=Je();Vt(a,s);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){Vt(a,s);const{scroll:h}=this.root;h&&(Pn(a.x,-h.offset.x),Pn(a.y,-h.offset.y))}Pn(a.x,u.offset.x),Pn(a.y,u.offset.y)}}return a}applyTransform(s,a=!1){const l=Je();Vt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ar(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Qn(u.latestValues)&&Ar(l,u.latestValues)}return Qn(this.latestValues)&&Ar(l,this.latestValues),l}removeTransform(s){const a=Je();Vt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Qn(c.latestValues))continue;_l(c.latestValues)&&c.updateSnapshot();const u=Je(),f=c.measurePageBox();Vt(u,f),Ed(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Qn(this.latestValues)&&Ed(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==ht.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=ht.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Bo(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vt(this.target,this.layout.layoutBox),Dg(this.target,this.targetDelta)):Vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Bo(this.relativeTargetOrigin,this.target,d.target),Vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}window.MotionDebug&&Zn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||_l(this.parent.latestValues)||kg(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 s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ht.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;Vt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;CT(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=Je());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(wd(this.prevProjectionDelta.x,this.projectionDelta.x),wd(this.prevProjectionDelta.y,this.projectionDelta.y)),$o(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==d||!Rd(this.projectionDelta.x,this.prevProjectionDelta.x)||!Rd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),window.MotionDebug&&Zn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ir(),this.projectionDelta=Ir(),this.projectionDeltaWithTransform=Ir()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Je(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,v=this.getStack(),g=!v||v.members.length<=1,x=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(cE));this.animationProgress=0;let y;this.mixTargetDelta=T=>{const S=T/1e3;kd(f.x,s.x,S),kd(f.y,s.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lE(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&WT(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Je()),Vt(y,this.relativeTarget)),m&&(this.animationValues=u,NT(u,c,this.latestValues,S,x,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(cn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{qi.hasAnimatedSinceResize=!0,this.currentAnimation=tu(0,Id,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Id),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Wg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Je();const f=Nt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const h=Nt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}Vt(a,l),Ar(a,u),$o(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new zT),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Da("z",s,c,this.animationValues);for(let u=0;u<ka.length;u++)Da(`rotate${ka[u]}`,s,c,this.animationValues),Da(`skew${ka[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return KT;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ui(s==null?void 0:s.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=Ui(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Qn(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=GT(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:d,y:p}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in ss){if(h[m]===void 0)continue;const{correct:v,applyTo:g}=ss[m],x=c.transform==="none"?h[m]:v(h[m],f);if(g){const y=g.length;for(let T=0;T<y;T++)c[g[T]]=x}else c[m]=x}return this.options.layoutId&&(c.pointerEvents=f===this?Ui(s==null?void 0:s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ad),this.root.sharedNodes.clear()}}}function QT(e){e.updateLayout()}function ZT(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?$t(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=Nt(h);h.min=r[f].min,h.max=h.min+d}):Wg(i,n.layoutBox,r)&&$t(f=>{const h=s?n.measuredBox[f]:n.layoutBox[f],d=Nt(r[f]);h.max=h.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+d)});const a=Ir();$o(a,r,n.layoutBox);const l=Ir();s?$o(l,e.applyTransform(o,!0),n.measuredBox):$o(l,r,n.layoutBox);const c=!_g(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=Je();Bo(p,n.layoutBox,h.layoutBox);const m=Je();Bo(m,r,d.layoutBox),Vg(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 JT(e){window.MotionDebug&&Zn.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 eE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tE(e){e.clearSnapshot()}function Ad(e){e.clearMeasurements()}function nE(e){e.isLayoutDirty=!1}function rE(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Od(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oE(e){e.resolveTargetDelta()}function iE(e){e.calcProjection()}function sE(e){e.resetSkewAndRotation()}function aE(e){e.removeLeadSnapshot()}function kd(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dd(e,t,n,r){e.min=Ve(t.min,n.min,r),e.max=Ve(t.max,n.max,r)}function lE(e,t,n,r){Dd(e.x,t.x,n.x,r),Dd(e.y,t.y,n.y,r)}function cE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uE={duration:.45,ease:[.4,0,.1,1]},Md=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fd=Md("applewebkit/")&&!Md("chrome/")?Math.round:yt;function jd(e){e.min=Fd(e.min),e.max=Fd(e.max)}function fE(e){jd(e.x),jd(e.y)}function Wg(e,t,n){return e==="position"||e==="preserve-aspect"&&!mT(Pd(t),Pd(n),.2)}const dE=Hg({attachResizeListener:(e,t)=>mn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},zg=Hg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ma.current){const e=new dE({});e.mount(window),e.setOptions({layoutScroll:!0}),Ma.current=e}return Ma.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hE={pan:{Feature:kT},drag:{Feature:OT,ProjectionNode:zg,MeasureLayout:jg}},$l={current:null},Gg={current:!1};function pE(){if(Gg.current=!0,!!Rc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$l.current=e.matches;e.addListener(t),t()}else $l.current=!1}function mE(e,t,n){for(const r in t){const o=t[r],i=n[r];if(lt(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Jc(o.version==="11.3.8",`Attempting to mix Framer Motion versions ${o.version} with 11.3.8 may not work as expected.`);else if(lt(i))e.addValue(r,zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,zr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Jo=new WeakMap,gE=[...qm,bt,Fn],yE=e=>gE.find(Ym(e)),Ld=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],vE=Oc.length;class bE{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.resolveKeyframes=(h,d,p,m)=>new this.KeyframeResolver(h,d,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=Bc,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,Se.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=!!i,this.isControllingVariants=Vs(n),this.isVariantNode=Sm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];l[h]!==void 0&&lt(d)&&d.set(l[h],!1)}}mount(t){this.current=t,Jo.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)),Gg.current||pE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$l.current,process.env.NODE_ENV!=="production"&&Jc(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(){Jo.delete(this.current),this.projection&&this.projection.unmount(),cn(this.notifyUpdate),cn(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=$n.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Se.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Br){const n=Br[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}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<Ld.length;r++){const o=Ld[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=mE(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<vE;r++){const o=Oc[r],i=this.props[o];(Ko(i)||i===!1)&&(n[o]=i)}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=zr(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"&&(Gm(o)||zm(o))?o=parseFloat(o):!yE(o)&&Fn.test(n)&&(o=ng(t,n)),this.setBaseTarget(t,lt(o)?o.get():o)),lt(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 s=Vc(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!lt(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Zc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ug extends bE{constructor(){super(...arguments),this.KeyframeResolver=rg}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 xE(e){return window.getComputedStyle(e)}class Yg extends Ug{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=km}readValueFromInstance(t,n){if($n.has(n)){const r=Wc(n);return r&&r.default||0}else{const r=xE(t),o=(Cm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Mg(t,n)}build(t,n,r){Fc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _c(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class qg extends Ug{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($n.has(n)){const r=Wc(n);return r&&r.default||0}return n=Dm.has(n)?n:_s(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Fm(t,n,r)}build(t,n,r){Lc(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Mm(t,n,r,o)}mount(t){this.isSVGTag=Nc(t.tagName),super.mount(t)}}const wE=(e,t)=>kc(e)?new qg(t):new Yg(t,{allowProjection:e!==b.Fragment}),SE={layout:{ProjectionNode:zg,MeasureLayout:jg}},TE={...aT,...T1,...hE,...SE},mt=kw((e,t)=>u1(e,t,TE,wE));function Kg(){const e=b.useRef(!1);return Ns(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Xg(){const e=Kg(),[t,n]=b.useState(0),r=b.useCallback(()=>{e.current&&n(t+1)},[t]);return[b.useCallback(()=>Se.postRender(r),[r]),t]}class EE extends D.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 CE({children:e,isPresent:t}){const n=b.useId(),r=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=b.useContext($r);return b.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:c}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return i&&(u.nonce=i),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
5
5
  [data-motion-pop-id="${n}"] {
6
6
  position: absolute !important;
7
- width: ${i}px !important;
7
+ width: ${s}px !important;
8
8
  height: ${a}px !important;
9
9
  top: ${l}px !important;
10
10
  left: ${c}px !important;
11
11
  }
12
- `),()=>{document.head.removeChild(u)}},[t]),w.jsx(BC,{isPresent:t,childRef:r,sizeRef:o,children:_.cloneElement(e,{ref:r})})}const Al=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Tn(zC),l=b.useId(),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),_.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=w.jsx(WC,{isPresent:n,children:e})),w.jsx(_a.Provider,{value:c,children:e})};function zC(){return new Map}function cv(e){return b.useEffect(()=>()=>e(),[])}const xr=e=>e.key||"";function HC(e,t){e.forEach(n=>{const r=xr(n);t.set(r,n)})}function UC(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const ei=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{qt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(Os).forceRender||lv()[0],l=av(),c=UC(e);let u=c;const d=b.useRef(new Map).current,h=b.useRef(u),f=b.useRef(new Map).current,p=b.useRef(!0);if(Ma(()=>{p.current=!1,HC(c,f),h.current=u}),cv(()=>{p.current=!0,f.clear(),d.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Al,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i,children:x},xr(x)))});u=[...u];const m=h.current.map(xr),v=c.map(xr),g=m.length;for(let x=0;x<g;x++){const y=m[x];v.indexOf(y)===-1&&!d.has(y)&&d.set(y,void 0)}return i==="wait"&&d.size&&(u=[]),d.forEach((x,y)=>{if(v.indexOf(y)!==-1)return;const T=f.get(y);if(!T)return;const S=m.indexOf(y);let E=x;if(!E){const k=()=>{d.delete(y);const P=Array.from(f.keys()).filter(I=>!v.includes(I));if(P.forEach(I=>f.delete(I)),h.current=c.filter(I=>{const C=xr(I);return C===y||P.includes(C)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(Al,{isPresent:!1,onExitComplete:k,custom:t,presenceAffectsLayout:s,mode:i,children:T},xr(T)),d.set(y,E)}u.splice(S,0,E)}),u=u.map(x=>{const y=x.key;return d.has(y)?x:w.jsx(Al,{isPresent:!0,presenceAffectsLayout:s,mode:i,children:x},xr(x))}),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.`),w.jsx(w.Fragment,{children:d.size?u:u.map(x=>b.cloneElement(x))})};function GC({children:e,isValidProp:t,...n}){t&&Bg(t),n={...b.useContext(po),...n},n.isStatic=Tn(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx(po.Provider,{value:r,children:e})}const YC=b.createContext(null),qC=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Gh(){const e=new Set,t=new WeakMap,n=()=>e.forEach(qC);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 uv=e=>e===!0,KC=e=>uv(e===!0)||e==="id",ZC=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(Os),o=b.useContext(YC),[s,i]=lv(),a=b.useRef(null),l=r.id||o;a.current===null&&(KC(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:uv(n)&&r.group||Gh()});const c=b.useMemo(()=>({...a.current,forceRender:s}),[i]);return w.jsx(Os.Provider,{value:c,children:e})},dv=b.createContext(null);function XC(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=Ke(l.min,l.max,.5);return s===1&&a.layout.max+n>c||s===-1&&a.layout.min+n<c?wS(e,o,o+s):e}function QC({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...s},i){const a=Tn(()=>Ct(t)),l=[],c=b.useRef(!1);qt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(d,h)=>{const f=l.findIndex(p=>d===p.value);f!==-1?l[f].layout=h[n]:l.push({value:d,layout:h[n]}),l.sort(tP)},updateOrder:(d,h,f)=>{if(c.current)return;const p=XC(l,d,h,f);l!==p&&(c.current=!0,r(p.map(eP).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),w.jsx(a,{...s,ref:i,ignoreStrict:!0,children:w.jsx(dv.Provider,{value:u,children:e})})}const JC=b.forwardRef(QC);function eP(e){return e.value}function tP(e,t){return e.layout.min-t.layout.min}function bo(e){const t=Tn(()=>vo(e)),{isStatic:n}=b.useContext(po);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const nP=e=>e&&typeof e=="object"&&e.mix,rP=e=>nP(e)?e.mix:void 0;function oP(...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=Iy(o,s,{mixer:rP(s[0]),...i});return t?a(r):a}function fv(e,t){const n=bo(t()),r=()=>n.set(t());return r(),Ma(()=>{const o=()=>Ae.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),En(r)}}),n}function sP(e){ys.current=[],e();const t=fv(ys.current,e);return ys.current=void 0,t}function iP(e,t,n,r){if(typeof e=="function")return sP(e);const o=typeof t=="function"?t:oP(t,n,r);return Array.isArray(e)?Yh(e,o):Yh([e],([s])=>o(s))}function Yh(e,t){const n=Tn(()=>[]);return fv(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function qh(e,t=0){return vt(e)?e:bo(t)}function aP({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:s=!0,...i},a){const l=Tn(()=>Ct(r)),c=b.useContext(dv),u={x:qh(t.x),y:qh(t.y)},d=iP([u.x,u.y],([m,v])=>m||v?1:"unset");qt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:f,updateOrder:p}=c;return w.jsx(l,{drag:h,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:s,onDrag:(m,v)=>{const{velocity:g}=v;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,v)},onLayoutMeasure:m=>f(n,m),ref:a,ignoreStrict:!0,children:e})}const lP=b.forwardRef(aP),$a={Group:JC,Item:lP};function hv(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(qt(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function cP(e){return typeof e=="object"&&!Array.isArray(e)}function uP(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Qy(e)?new iv(t):new sv(t);n.mount(e),_s.set(e,n)}function dP(e,t=100){const n=Qu({keyframes:[0,t],...e}),r=Math.min(_y(n),Mc);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:Sn(r)}}function Kh(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const fP=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function hP(e,t){return Sy(e)?e[fP(0,e.length,t)]:e}function pP(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Qs(e,o),r--)}}function mP(e,t,n,r,o,s){pP(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ke(o,s,r[i]),easing:hP(n,i)})}function gP(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const yP="easeInOut";function vP(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,s=new Map,i=new Map,a={},l=new Map;let c=0,u=0,d=0;for(let h=0;h<e.length;h++){const f=e[h];if(typeof f=="string"){l.set(f,u);continue}else if(!Array.isArray(f)){l.set(f.name,Kh(u,f.at,c,l));continue}let[p,m,v={}]=f;v.at!==void 0&&(u=Kh(u,v.at,c,l));let g=0;const x=(y,T,S,E=0,k=0)=>{const P=bP(y),{delay:I=0,times:C=Ay(P),type:N="keyframes",...M}=T;let{ease:F=t.ease||"easeOut",duration:R}=T;const A=typeof I=="function"?I(E,k):I,D=P.length;if(D<=2&&N==="spring"){let O=100;if(D===2&&SP(P)){const ne=P[1]-P[0];O=Math.abs(ne)}const V={...M};R!==void 0&&(V.duration=wn(R));const Z=dP(V,O);F=Z.ease,R=Z.duration}R??(R=o);const L=u+A,H=L+R;C.length===1&&C[0]===0&&(C[1]=1);const U=C.length-P.length;U>0&&Oy(C,U),P.length===1&&P.unshift(null),mP(S,P,F,C,L,H),g=Math.max(A+R,g),d=Math.max(H,d)};if(vt(p)){const y=Zh(p,i);x(m,v,Xh("default",y))}else{const y=hv(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,v=v;const E=y[S],k=Zh(E,i);for(const P in m)x(m[P],xP(v,P),Xh(P,k),S,T)}}c=u,u+=g}return i.forEach((h,f)=>{for(const p in h){const m=h[p];m.sort(gP);const v=[],g=[],x=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:k}=m[T];v.push(E),g.push(yo(0,d,S)),x.push(k||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),x.unshift(yP)),g[g.length-1]!==1&&(g.push(1),v.push(null)),s.has(f)||s.set(f,{keyframes:{},transition:{}});const y=s.get(f);y.keyframes[p]=v,y.transition[p]={...t,duration:d,ease:x,times:g,...n}}}),s}function Zh(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Xh(e,t){return t[e]||(t[e]=[]),t[e]}function bP(e){return Array.isArray(e)?e:[e]}function xP(e,t){return e[t]?{...e,...e[t]}:{...e}}const wP=e=>typeof e=="number",SP=e=>e.every(wP);function pv(e,t,n,r){const o=hv(e,r),s=o.length;qt(!!s,"No valid element provided.");const i=[];for(let a=0;a<s;a++){const l=o[a];_s.has(l)||uP(l);const c=_s.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,s)),i.push(...ld(c,{...t,transition:u},{}))}return new od(i)}const TP=e=>Array.isArray(e)&&Array.isArray(e[0]);function EP(e,t,n){const r=[];return vP(e,t,n).forEach(({keyframes:s,transition:i},a)=>{let l;vt(a)?l=cd(a,s.default,i.default):l=pv(a,s,i),r.push(l)}),new od(r)}const CP=e=>{function t(n,r,o){let s;return TP(n)?s=EP(n,r,e):cP(r)?s=pv(n,r,o,e):s=cd(n,r,o),e&&e.animations.push(s),s}return t};function PP(){const e=Tn(()=>({current:null,animations:[]})),t=Tn(()=>CP(e));return cv(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class RP{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 kP=()=>new RP;function IP(){return Tn(kP)}function OP(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function AP(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:OP(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=Ac(r)(l/c)*c}return t+l}}/**
12
+ `),()=>{document.head.removeChild(u)}},[t]),w.jsx(EE,{isPresent:t,childRef:r,sizeRef:o,children:D.cloneElement(e,{ref:r})})}const Fa=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=ln(PE),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))}),i?[Math.random()]:[n]);return b.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[n]),D.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.jsx(CE,{isPresent:n,children:e})),w.jsx(Ls.Provider,{value:c,children:e})};function PE(){return new Map}function Qg(e){return b.useEffect(()=>()=>e(),[])}const Jn=e=>e.key||"";function RE(e,t){e.forEach(n=>{const r=Jn(n);t.set(r,n)})}function IE(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const vi=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{Lt(!o,"Replace exitBeforeEnter with mode='wait'");const a=b.useContext(Qo).forceRender||Xg()[0],l=Kg(),c=IE(e);let u=c;const f=b.useRef(new Map).current,h=b.useRef(u),d=b.useRef(new Map).current,p=b.useRef(!0);if(Ns(()=>{p.current=!1,RE(c,d),h.current=u}),Qg(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return w.jsx(w.Fragment,{children:u.map(x=>w.jsx(Fa,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s,children:x},Jn(x)))});u=[...u];const m=h.current.map(Jn),v=c.map(Jn),g=m.length;for(let x=0;x<g;x++){const y=m[x];v.indexOf(y)===-1&&!f.has(y)&&f.set(y,void 0)}return s==="wait"&&f.size&&(u=[]),f.forEach((x,y)=>{if(v.indexOf(y)!==-1)return;const T=d.get(y);if(!T)return;const S=m.indexOf(y);let E=x;if(!E){const I=()=>{f.delete(y);const P=Array.from(d.keys()).filter(A=>!v.includes(A));if(P.forEach(A=>d.delete(A)),h.current=c.filter(A=>{const C=Jn(A);return C===y||P.includes(C)}),!f.size){if(l.current===!1)return;a(),r&&r()}};E=w.jsx(Fa,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:i,mode:s,children:T},Jn(T)),f.set(y,E)}u.splice(S,0,E)}),u=u.map(x=>{const y=x.key;return f.has(y)?x:w.jsx(Fa,{isPresent:!0,presenceAffectsLayout:i,mode:s,children:x},Jn(x))}),process.env.NODE_ENV!=="production"&&s==="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.`),w.jsx(w.Fragment,{children:f.size?u:u.map(x=>b.cloneElement(x))})};function AE({children:e,isValidProp:t,...n}){t&&Am(t),n={...b.useContext($r),...n},n.isStatic=ln(()=>n.isStatic);const r=b.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return w.jsx($r.Provider,{value:r,children:e})}const OE=b.createContext(null),kE=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Nd(){const e=new Set,t=new WeakMap,n=()=>e.forEach(kE);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 Zg=e=>e===!0,DE=e=>Zg(e===!0)||e==="id",ME=({children:e,id:t,inherit:n=!0})=>{const r=b.useContext(Qo),o=b.useContext(OE),[i,s]=Xg(),a=b.useRef(null),l=r.id||o;a.current===null&&(DE(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:Zg(n)&&r.group||Nd()});const c=b.useMemo(()=>({...a.current,forceRender:i}),[s]);return w.jsx(Qo.Provider,{value:c,children:e})},Jg=b.createContext(null);function FE(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=Ve(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?o1(e,o,o+i):e}function jE({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=ln(()=>mt(t)),l=[],c=b.useRef(!1);Lt(!!o,"Reorder.Group must be provided a values prop");const u={axis:n,registerItem:(f,h)=>{const d=l.findIndex(p=>f===p.value);d!==-1?l[d].layout=h[n]:l.push({value:f,layout:h[n]}),l.sort(_E)},updateOrder:(f,h,d)=>{if(c.current)return;const p=FE(l,f,h,d);l!==p&&(c.current=!0,r(p.map(NE).filter(m=>o.indexOf(m)!==-1)))}};return b.useEffect(()=>{c.current=!1}),w.jsx(a,{...i,ref:s,ignoreStrict:!0,children:w.jsx(Jg.Provider,{value:u,children:e})})}const LE=b.forwardRef(jE);function NE(e){return e.value}function _E(e,t){return e.layout.min-t.layout.min}function Gr(e){const t=ln(()=>zr(e)),{isStatic:n}=b.useContext($r);if(n){const[,r]=b.useState(e);b.useEffect(()=>t.on("change",r),[])}return t}const VE=e=>e&&typeof e=="object"&&e.mix,$E=e=>VE(e)?e.mix:void 0;function BE(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=yg(o,i,{mixer:$E(i[0]),...s});return t?a(r):a}function ey(e,t){const n=Gr(t()),r=()=>n.set(t());return r(),Ns(()=>{const o=()=>Se.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),cn(r)}}),n}function HE(e){Vo.current=[],e();const t=ey(Vo.current,e);return Vo.current=void 0,t}function WE(e,t,n,r){if(typeof e=="function")return HE(e);const o=typeof t=="function"?t:BE(t,n,r);return Array.isArray(e)?_d(e,o):_d([e],([i])=>o(i))}function _d(e,t){const n=ln(()=>[]);return ey(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Vd(e,t=0){return lt(e)?e:Gr(t)}function zE({children:e,style:t={},value:n,as:r="li",onDrag:o,layout:i=!0,...s},a){const l=ln(()=>mt(r)),c=b.useContext(Jg),u={x:Vd(t.x),y:Vd(t.y)},f=WE([u.x,u.y],([m,v])=>m||v?1:"unset");Lt(!!c,"Reorder.Item must be a child of Reorder.Group");const{axis:h,registerItem:d,updateOrder:p}=c;return w.jsx(l,{drag:h,...s,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:f},layout:i,onDrag:(m,v)=>{const{velocity:g}=v;g[h]&&p(n,u[h].get(),g[h]),o&&o(m,v)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:e})}const GE=b.forwardRef(zE),zs={Group:LE,Item:GE};function ty(e,t,n){var r;if(typeof e=="string"){let o=document;t&&(Lt(!!t.current,"Scope provided, but no element detected."),o=t.current),n?((r=n[e])!==null&&r!==void 0||(n[e]=o.querySelectorAll(e)),e=n[e]):e=o.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function UE(e){return typeof e=="object"&&!Array.isArray(e)}function YE(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=$g(e)?new qg(t):new Yg(t);n.mount(e),Jo.set(e,n)}function qE(e,t=100){const n=zc({keyframes:[0,t],...e}),r=Math.min(xg(n),Fl);return{type:"keyframes",ease:o=>n.next(r*o).value/t,duration:an(r)}}function $d(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}const KE=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function XE(e,t){return ug(e)?e[KE(0,e.length,t)]:e}function QE(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(gi(e,o),r--)}}function ZE(e,t,n,r,o,i){QE(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ve(o,i,r[s]),easing:XE(n,s)})}function JE(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eC="easeInOut";function tC(e,{defaultTransition:t={},...n}={},r){const o=t.duration||.3,i=new Map,s=new Map,a={},l=new Map;let c=0,u=0,f=0;for(let h=0;h<e.length;h++){const d=e[h];if(typeof d=="string"){l.set(d,u);continue}else if(!Array.isArray(d)){l.set(d.name,$d(u,d.at,c,l));continue}let[p,m,v={}]=d;v.at!==void 0&&(u=$d(u,v.at,c,l));let g=0;const x=(y,T,S,E=0,I=0)=>{const P=nC(y),{delay:A=0,times:C=bg(P),type:L="keyframes",...M}=T;let{ease:N=t.ease||"easeOut",duration:R}=T;const k=typeof A=="function"?A(E,I):A,F=P.length;if(F<=2&&L==="spring"){let O=100;if(F===2&&iC(P)){const ee=P[1]-P[0];O=Math.abs(ee)}const $={...M};R!==void 0&&($.duration=sn(R));const K=qE($,O);N=K.ease,R=K.duration}R??(R=o);const _=u+k,z=_+R;C.length===1&&C[0]===0&&(C[1]=1);const G=C.length-P.length;G>0&&vg(C,G),P.length===1&&P.unshift(null),ZE(S,P,N,C,_,z),g=Math.max(k+R,g),f=Math.max(z,f)};if(lt(p)){const y=Bd(p,s);x(m,v,Hd("default",y))}else{const y=ty(p,r,a),T=y.length;for(let S=0;S<T;S++){m=m,v=v;const E=y[S],I=Bd(E,s);for(const P in m)x(m[P],rC(v,P),Hd(P,I),S,T)}}c=u,u+=g}return s.forEach((h,d)=>{for(const p in h){const m=h[p];m.sort(JE);const v=[],g=[],x=[];for(let T=0;T<m.length;T++){const{at:S,value:E,easing:I}=m[T];v.push(E),g.push(Wr(0,f,S)),x.push(I||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),x.unshift(eC)),g[g.length-1]!==1&&(g.push(1),v.push(null)),i.has(d)||i.set(d,{keyframes:{},transition:{}});const y=i.get(d);y.keyframes[p]=v,y.transition[p]={...t,duration:f,ease:x,times:g,...n}}}),i}function Bd(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Hd(e,t){return t[e]||(t[e]=[]),t[e]}function nC(e){return Array.isArray(e)?e:[e]}function rC(e,t){return e[t]?{...e,...e[t]}:{...e}}const oC=e=>typeof e=="number",iC=e=>e.every(oC);function ny(e,t,n,r){const o=ty(e,r),i=o.length;Lt(!!i,"No valid element provided.");const s=[];for(let a=0;a<i;a++){const l=o[a];Jo.has(l)||YE(l);const c=Jo.get(l),u={...n};typeof u.delay=="function"&&(u.delay=u.delay(a,i)),s.push(...eu(c,{...t,transition:u},{}))}return new Xc(s)}const sC=e=>Array.isArray(e)&&Array.isArray(e[0]);function aC(e,t,n){const r=[];return tC(e,t,n).forEach(({keyframes:i,transition:s},a)=>{let l;lt(a)?l=tu(a,i.default,s.default):l=ny(a,i,s),r.push(l)}),new Xc(r)}const lC=e=>{function t(n,r,o){let i;return sC(n)?i=aC(n,r,e):UE(r)?i=ny(n,r,o,e):i=tu(n,r,o),e&&e.animations.push(i),i}return t};function cC(){const e=ln(()=>({current:null,animations:[]})),t=ln(()=>lC(e));return Qg(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}class uC{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 fC=()=>new uC;function dC(){return ln(fC)}function hC(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function pC(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:hC(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=Dl(r)(l/c)*c}return t+l}}/**
13
13
  * @license lucide-react v0.414.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
- */const _P=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mv=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
17
+ */const mC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ry=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
18
18
  * @license lucide-react v0.414.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
- */var MP={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"};/**
22
+ */var gC={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"};/**
23
23
  * @license lucide-react v0.414.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const DP=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,...MP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mv("lucide",o),...a},[...i.map(([c,u])=>b.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
27
+ */const yC=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>b.createElement("svg",{ref:l,...gC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ry("lucide",o),...a},[...s.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
28
28
  * @license lucide-react v0.414.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */const it=(e,t)=>{const n=b.forwardRef(({className:r,...o},s)=>b.createElement(DP,{ref:s,iconNode:t,className:mv(`lucide-${_P(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
32
+ */const Xe=(e,t)=>{const n=b.forwardRef(({className:r,...o},i)=>b.createElement(yC,{ref:i,iconNode:t,className:ry(`lucide-${mC(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
33
33
  * @license lucide-react v0.414.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const jP=it("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
37
+ */const vC=Xe("ArrowDown01",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
38
38
  * @license lucide-react v0.414.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const NP=it("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
42
+ */const bC=Xe("ArrowUp01",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);/**
43
43
  * @license lucide-react v0.414.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const gv=it("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
47
+ */const oy=Xe("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
48
48
  * @license lucide-react v0.414.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const FP=it("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"}]]);/**
52
+ */const xC=Xe("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"}]]);/**
53
53
  * @license lucide-react v0.414.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const LP=it("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
57
+ */const wC=Xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
58
58
  * @license lucide-react v0.414.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const yv=it("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
62
+ */const iy=Xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
63
63
  * @license lucide-react v0.414.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const VP=it("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
67
+ */const SC=Xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
68
68
  * @license lucide-react v0.414.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const ud=it("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
72
+ */const nu=Xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
73
73
  * @license lucide-react v0.414.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const vv=it("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"}]]);/**
77
+ */const sy=Xe("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"}]]);/**
78
78
  * @license lucide-react v0.414.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const $P=it("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"}]]);/**
82
+ */const TC=Xe("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"}]]);/**
83
83
  * @license lucide-react v0.414.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const BP=it("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"}]]);/**
87
+ */const EC=Xe("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"}]]);/**
88
88
  * @license lucide-react v0.414.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const WP=it("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"}]]);/**
92
+ */const CC=Xe("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"}]]);/**
93
93
  * @license lucide-react v0.414.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const bv=it("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
97
+ */const ay=Xe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
98
98
  * @license lucide-react v0.414.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const zP=it("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
102
+ */const PC=Xe("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
103
103
  * @license lucide-react v0.414.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const dd=it("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
107
+ */const ru=Xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
108
108
  * @license lucide-react v0.414.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const HP=it("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
112
+ */const RC=Xe("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
113
113
  * @license lucide-react v0.414.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const UP=it("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
117
+ */const IC=Xe("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
118
118
  * @license lucide-react v0.414.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const xo=it("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
122
+ */const Ur=Xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
123
123
  * @license lucide-react v0.414.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const GP=it("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
127
+ */const AC=Xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
128
128
  * @license lucide-react v0.414.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const YP=it("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
132
+ */const OC=Xe("Ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);/**
133
133
  * @license lucide-react v0.414.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const qP=it("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"}]]);/**
137
+ */const kC=Xe("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"}]]);/**
138
138
  * @license lucide-react v0.414.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const xv=it("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Qh={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},KP={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},wv=e=>w.jsx(Ct.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Qh.false,transition:KP,variants:Qh,children:e.children}),ZP=Gs("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),XP=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:s=!0,...i},a){return w.jsx("div",{"data-open":!!s,"aria-hidden":!s,className:"pointer-events-none w-full isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:w.jsx(wv,{"data-open":!!s,open:!!s,children:w.jsxs(No,{...i,className:He(ZP({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:i.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(vv,{size:20}):null,!r&&n==="info"?w.jsx(bv,{size:20}):null,!r&&n==="danger"?w.jsx(GP,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:i.title})]}),i.children,o!==void 0?w.jsx("button",{type:"button",onClick:()=>o(!1),className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(xv,{size:20})}):null]})})})});function _e(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 Vo(e,t){const n=_e(e);return isNaN(t)?qe(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ba(e,t){const n=_e(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 Sv=6048e5,QP=864e5,JP=6e4,eR=36e5,tR=1e3;let nR={};function Vr(){return nR}function Cn(e,t){var a,l,c,u;const n=Vr(),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=_e(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 wo(e){return Cn(e,{weekStartsOn:1})}function Tv(e){const t=_e(e),n=t.getFullYear(),r=qe(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=wo(r),s=qe(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=wo(s);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function So(e){const t=_e(e);return t.setHours(0,0,0,0),t}function qi(e){const t=_e(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 rR(e,t){const n=So(e),r=So(t),o=+n-qi(n),s=+r-qi(r);return Math.round((o-s)/QP)}function oR(e){const t=Tv(e),n=qe(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),wo(n)}function Ev(e,t){const n=t*7;return Vo(e,n)}function Cv(e,t){return Ba(e,t*12)}function sR(e){return qe(e,Date.now())}function iR(e,t){const n=So(e),r=So(t);return+n==+r}function aR(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Pv(e){if(!aR(e)&&typeof e!="number")return!1;const t=_e(e);return!isNaN(Number(t))}function Rv(e,t){const n=_e(e.start),r=_e(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(_e(i)),i.setDate(i.getDate()+a),i.setHours(0,0,0,0);return o?l.reverse():l}function kv(e){const t=_e(e);return t.setDate(1),t.setHours(0,0,0,0),t}function lR(e){const t=_e(e),n=qe(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cR(e,t){var a,l;const n=Vr(),r=n.weekStartsOn??((l=(a=n.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??0,o=_e(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 uR={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"}},dR=(e,t,n)=>{let r;const o=uR[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 _l(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const fR={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mR={date:_l({formats:fR,defaultWidth:"full"}),time:_l({formats:hR,defaultWidth:"full"}),dateTime:_l({formats:pR,defaultWidth:"full"})},gR={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yR=(e,t,n,r)=>gR[e];function os(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 vR={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xR={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"]},wR={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"]},SR={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"}},TR={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"}},ER=(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"},CR={ordinalNumber:ER,era:os({values:vR,defaultWidth:"wide"}),quarter:os({values:bR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:os({values:xR,defaultWidth:"wide"}),day:os({values:wR,defaultWidth:"wide"}),dayPeriod:os({values:SR,defaultWidth:"wide",formattingValues:TR,defaultFormattingWidth:"wide"})};function ss(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)?RR(a,d=>d.test(i)):PR(a,d=>d.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 PR(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function RR(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function kR(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 IR=/^(\d+)(th|st|nd|rd)?/i,OR=/\d+/i,AR={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},_R={any:[/^b/i,/^(a|c)/i]},MR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},DR={any:[/1/i,/2/i,/3/i,/4/i]},jR={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},NR={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]},FR={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},LR={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]},VR={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},$R={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}},BR={ordinalNumber:kR({matchPattern:IR,parsePattern:OR,valueCallback:e=>parseInt(e,10)}),era:ss({matchPatterns:AR,defaultMatchWidth:"wide",parsePatterns:_R,defaultParseWidth:"any"}),quarter:ss({matchPatterns:MR,defaultMatchWidth:"wide",parsePatterns:DR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ss({matchPatterns:jR,defaultMatchWidth:"wide",parsePatterns:NR,defaultParseWidth:"any"}),day:ss({matchPatterns:FR,defaultMatchWidth:"wide",parsePatterns:LR,defaultParseWidth:"any"}),dayPeriod:ss({matchPatterns:VR,defaultMatchWidth:"any",parsePatterns:$R,defaultParseWidth:"any"})},Iv={code:"en-US",formatDistance:dR,formatLong:mR,formatRelative:yR,localize:CR,match:BR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function WR(e){const t=_e(e);return rR(t,lR(t))+1}function Ov(e){const t=_e(e),n=+wo(t)-+oR(t);return Math.round(n/Sv)+1}function fd(e,t){var u,d,h,f;const n=_e(e),r=n.getFullYear(),o=Vr(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(h=o.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,i=qe(e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Cn(i,t),l=qe(e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Cn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function zR(e,t){var a,l,c,u;const n=Vr(),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=fd(e,t),s=qe(e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Cn(s,t)}function Av(e,t){const n=_e(e),r=+Cn(n,t)-+zR(n,t);return Math.round(r/Sv)+1}function Le(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const zn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Le(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Le(n+1,2)},d(e,t){return Le(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 Le(e.getHours()%12||12,t.length)},H(e,t){return Le(e.getHours(),t.length)},m(e,t){return Le(e.getMinutes(),t.length)},s(e,t){return Le(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Le(o,t.length)}},Gr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jh={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 zn.y(e,t)},Y:function(e,t,n,r){const o=fd(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return Le(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Le(s,t.length)},R:function(e,t){const n=Tv(e);return Le(n,t.length)},u:function(e,t){const n=e.getFullYear();return Le(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 Le(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 Le(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 zn.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 Le(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=Av(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Le(o,t.length)},I:function(e,t,n){const r=Ov(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Le(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):zn.d(e,t)},D:function(e,t,n){const r=WR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Le(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 Le(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 Le(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 Le(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=Gr.noon:r===0?o=Gr.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=Gr.evening:r>=12?o=Gr.afternoon:r>=4?o=Gr.morning:o=Gr.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 zn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):zn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Le(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):zn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):zn.s(e,t)},S:function(e,t){return zn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tp(r);case"XXXX":case"XX":return wr(r);case"XXXXX":case"XXX":default:return wr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tp(r);case"xxxx":case"xx":return wr(r);case"xxxxx":case"xxx":default:return wr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ep(r,":");case"OOOO":default:return"GMT"+wr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ep(r,":");case"zzzz":default:return"GMT"+wr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Le(r,t.length)},T:function(e,t,n){const r=e.getTime();return Le(r,t.length)}};function ep(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+Le(s,2)}function tp(e,t){return e%60===0?(e>0?"-":"+")+Le(Math.abs(e)/60,2):wr(e,t)}function wr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Le(Math.trunc(r/60),2),s=Le(r%60,2);return n+o+t+s}const np=(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"})}},_v=(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"})}},HR=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return np(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}}",np(r,t)).replace("{{time}}",_v(o,t))},$c={p:_v,P:HR},UR=/^D+$/,GR=/^Y+$/,YR=["D","DD","YY","YYYY"];function Mv(e){return UR.test(e)}function Dv(e){return GR.test(e)}function Bc(e,t,n){const r=qR(e,t,n);if(console.warn(r),YR.includes(e))throw new RangeError(r)}function qR(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 KR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ZR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,XR=/^'([^]*?)'?$/,QR=/''/g,JR=/[a-zA-Z]/;function ek(e,t,n){var u,d,h,f;const r=Vr(),o=r.locale??Iv,s=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,a=_e(e);if(!Pv(a))throw new RangeError("Invalid time value");let l=t.match(ZR).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=$c[m];return v(p,o.formatLong)}return p}).join("").match(KR).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:tk(p)};if(Jh[m])return{isToken:!0,value:p};if(m.match(JR))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;(Dv(m)||Mv(m))&&Bc(m,t,String(e));const v=Jh[m[0]];return v(a,m,o.localize,c)}).join("")}function tk(e){const t=e.match(XR);return t?t[1].replace(QR,"'"):e}function nk(){return Object.assign({},Vr())}function rk(e){let n=_e(e).getDay();return n===0&&(n=7),n}function ok(e,t){const n=_e(e),r=_e(t);return n.getTime()>r.getTime()}function sk(e,t){const n=_e(e),r=_e(t);return+n<+r}function ik(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 ak=10;class jv{constructor(){re(this,"subPriority",0)}validate(t,n){return!0}}class lk extends jv{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 ck extends jv{constructor(){super(...arguments);re(this,"priority",ak);re(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:qe(n,ik(n,Date))}}class Me{run(t,n,r,o){const s=this.parse(t,n,r,o);return s?{setter:new lk(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(t,n,r){return!0}}class uk extends Me{constructor(){super(...arguments);re(this,"priority",140);re(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 dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ft(e,t){return e&&{value:t(e.value),rest:e.rest}}function et(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function mn(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*eR+s*JP+i*tR),rest:t.slice(n[0].length)}}function Nv(e){return et(dt.anyDigitsSigned,e)}function st(e,t){switch(e){case 1:return et(dt.singleDigit,t);case 2:return et(dt.twoDigits,t);case 3:return et(dt.threeDigits,t);case 4:return et(dt.fourDigits,t);default:return et(new RegExp("^\\d{1,"+e+"}"),t)}}function Ki(e,t){switch(e){case 1:return et(dt.singleDigitSigned,t);case 2:return et(dt.twoDigitsSigned,t);case 3:return et(dt.threeDigitsSigned,t);case 4:return et(dt.fourDigitsSigned,t);default:return et(new RegExp("^-?\\d{1,"+e+"}"),t)}}function hd(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 Fv(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 Lv(e){return e%400===0||e%4===0&&e%100!==0}class dk extends Me{constructor(){super(...arguments);re(this,"priority",130);re(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 ft(st(4,n),s);case"yo":return ft(o.ordinalNumber(n,{unit:"year"}),s);default:return ft(st(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=Fv(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 fk extends Me{constructor(){super(...arguments);re(this,"priority",130);re(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 ft(st(4,n),s);case"Yo":return ft(o.ordinalNumber(n,{unit:"year"}),s);default:return ft(st(r.length,n),s)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,s){const i=fd(n,s);if(o.isTwoDigitYear){const l=Fv(o.year,i);return n.setFullYear(l,0,s.firstWeekContainsDate),n.setHours(0,0,0,0),Cn(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),Cn(n,s)}}class hk extends Me{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return Ki(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),wo(s)}}class pk extends Me{constructor(){super(...arguments);re(this,"priority",130);re(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return Ki(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class mk extends Me{constructor(){super(...arguments);re(this,"priority",120);re(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 st(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 gk extends Me{constructor(){super(...arguments);re(this,"priority",120);re(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 st(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 yk extends Me{constructor(){super(...arguments);re(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);re(this,"priority",110)}parse(n,r,o){const s=i=>i-1;switch(r){case"M":return ft(et(dt.month,n),s);case"MM":return ft(st(2,n),s);case"Mo":return ft(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 vk extends Me{constructor(){super(...arguments);re(this,"priority",110);re(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 ft(et(dt.month,n),s);case"LL":return ft(st(2,n),s);case"Lo":return ft(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 bk(e,t,n){const r=_e(e),o=Av(r,n)-t;return r.setDate(r.getDate()-o*7),r}class xk extends Me{constructor(){super(...arguments);re(this,"priority",100);re(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return et(dt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return st(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,s){return Cn(bk(n,o,s),s)}}function wk(e,t){const n=_e(e),r=Ov(n)-t;return n.setDate(n.getDate()-r*7),n}class Sk extends Me{constructor(){super(...arguments);re(this,"priority",100);re(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 et(dt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return st(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return wo(wk(n,o))}}const Tk=[31,28,31,30,31,30,31,31,30,31,30,31],Ek=[31,29,31,30,31,30,31,31,30,31,30,31];class Ck extends Me{constructor(){super(...arguments);re(this,"priority",90);re(this,"subPriority",1);re(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return et(dt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return st(r.length,n)}}validate(n,r){const o=n.getFullYear(),s=Lv(o),i=n.getMonth();return s?r>=1&&r<=Ek[i]:r>=1&&r<=Tk[i]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class Pk extends Me{constructor(){super(...arguments);re(this,"priority",90);re(this,"subpriority",1);re(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 et(dt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return st(r.length,n)}}validate(n,r){const o=n.getFullYear();return Lv(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 pd(e,t,n){var d,h,f,p;const r=Vr(),o=(n==null?void 0:n.weekStartsOn)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,s=_e(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 Vo(s,u)}class Rk extends Me{constructor(){super(...arguments);re(this,"priority",90);re(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=pd(n,o,s),n.setHours(0,0,0,0),n}}class kk extends Me{constructor(){super(...arguments);re(this,"priority",90);re(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 ft(st(r.length,n),i);case"eo":return ft(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=pd(n,o,s),n.setHours(0,0,0,0),n}}class Ik extends Me{constructor(){super(...arguments);re(this,"priority",90);re(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 ft(st(r.length,n),i);case"co":return ft(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=pd(n,o,s),n.setHours(0,0,0,0),n}}function Ok(e,t){const n=_e(e),r=rk(n),o=t-r;return Vo(n,o)}class Ak extends Me{constructor(){super(...arguments);re(this,"priority",90);re(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 st(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return ft(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 ft(o.day(n,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ft(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ft(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=Ok(n,o),n.setHours(0,0,0,0),n}}class _k extends Me{constructor(){super(...arguments);re(this,"priority",80);re(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(hd(o),0,0,0),n}}class Mk extends Me{constructor(){super(...arguments);re(this,"priority",80);re(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(hd(o),0,0,0),n}}class Dk extends Me{constructor(){super(...arguments);re(this,"priority",80);re(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(hd(o),0,0,0),n}}class jk extends Me{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return et(dt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return st(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 Nk extends Me{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return et(dt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return st(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class Fk extends Me{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return et(dt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return st(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 Lk extends Me{constructor(){super(...arguments);re(this,"priority",70);re(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return et(dt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return st(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 Vk extends Me{constructor(){super(...arguments);re(this,"priority",60);re(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return et(dt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return st(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class $k extends Me{constructor(){super(...arguments);re(this,"priority",50);re(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return et(dt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return st(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class Bk extends Me{constructor(){super(...arguments);re(this,"priority",30);re(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=s=>Math.trunc(s*Math.pow(10,-r.length+3));return ft(st(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class Wk extends Me{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return mn(pn.basicOptionalMinutes,n);case"XX":return mn(pn.basic,n);case"XXXX":return mn(pn.basicOptionalSeconds,n);case"XXXXX":return mn(pn.extendedOptionalSeconds,n);case"XXX":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-qi(n)-o)}}class zk extends Me{constructor(){super(...arguments);re(this,"priority",10);re(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return mn(pn.basicOptionalMinutes,n);case"xx":return mn(pn.basic,n);case"xxxx":return mn(pn.basicOptionalSeconds,n);case"xxxxx":return mn(pn.extendedOptionalSeconds,n);case"xxx":default:return mn(pn.extended,n)}}set(n,r,o){return r.timestampIsSet?n:qe(n,n.getTime()-qi(n)-o)}}class Hk extends Me{constructor(){super(...arguments);re(this,"priority",40);re(this,"incompatibleTokens","*")}parse(n){return Nv(n)}set(n,r,o){return[qe(n,o*1e3),{timestampIsSet:!0}]}}class Uk extends Me{constructor(){super(...arguments);re(this,"priority",20);re(this,"incompatibleTokens","*")}parse(n){return Nv(n)}set(n,r,o){return[qe(n,o),{timestampIsSet:!0}]}}const Gk={G:new uk,y:new dk,Y:new fk,R:new hk,u:new pk,Q:new mk,q:new gk,M:new yk,L:new vk,w:new xk,I:new Sk,d:new Ck,D:new Pk,E:new Rk,e:new kk,c:new Ik,i:new Ak,a:new _k,b:new Mk,B:new Dk,h:new jk,H:new Nk,K:new Fk,k:new Lk,m:new Vk,s:new $k,S:new Bk,X:new Wk,x:new zk,t:new Hk,T:new Uk},Yk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kk=/^'([^]*?)'?$/,Zk=/''/g,Xk=/\S/,Qk=/[a-zA-Z]/;function Jk(e,t,n,r){var m,v,g,x;const o=nk(),s=o.locale??Iv,i=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(g=o.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?_e(n):qe(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:a,locale:s},c=[new ck],u=t.match(qk).map(y=>{const T=y[0];if(T in $c){const S=$c[T];return S(y,s.formatLong)}return y}).join("").match(Yk),d=[];for(let y of u){Dv(y)&&Bc(y,t,e),Mv(y)&&Bc(y,t,e);const T=y[0],S=Gk[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=d.find(I=>E.includes(I.token)||I.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);d.push({token:T,fullToken:y});const k=S.run(e,y,s.match,l);if(!k)return qe(n,NaN);c.push(k.setter),e=k.rest}else{if(T.match(Qk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=eI(y)),e.indexOf(y)===0)e=e.slice(y.length);else return qe(n,NaN)}}if(e.length>0&&Xk.test(e))return qe(n,NaN);const h=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let f=_e(n);if(isNaN(f.getTime()))return qe(n,NaN);const p={};for(const y of h){if(!y.validate(f,l))return qe(n,NaN);const T=y.set(f,p,l);Array.isArray(T)?(f=T[0],Object.assign(p,T[1])):f=T}return qe(n,f)}function eI(e){return e.match(Kk)[1].replace(Zk,"'")}function tI(e,t){const n=_e(e),r=_e(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function nI(e){return iR(e,sR(e))}function rI(e,t){return Vo(e,-t)}function Vv(e,t){return Ba(e,-t)}function oI(e,t){return Ev(e,-t)}function sI(e,t){return Cv(e,-t)}var ht=function(){return ht=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},ht.apply(this,arguments)};function md(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 Wc(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}var Ms=function(e){return e.replace(new RegExp(" ","g")," ")},$v=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)},iI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Bv=function(e,t,n){var r=e.length-2,o=iI(e.substring(0,r)),s=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+s},Wv=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},Zi=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},aI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Ml=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},lI=function(e){return e==="money"||e==="currency"},cI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var s;return ht(ht({},r),(s={},s[o.type]=o.value,s))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},yi=function(e,t){var n=$v(Wv(e),t.fraction.length),r="".concat(t.currency).concat(Bv(n,t.group,t.decimal));return Ms(r)},uI=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=md(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var d=b.useMemo(function(){var p=cI(r,s,a);return p.currency=Ms("".concat(p.currency.trim()," ")),p.literal=Ms(p.literal.trim()),p},[r,s]),h=function(p){var m=yi(p.target.value,d),v=Zi(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=yi(p,d),v=Zi(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var g=new InputEvent("change",{});l==null||l(ht(ht({},g),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[d]);var f=c.defaultValue?yi(c.defaultValue,d):void 0;return b.createElement("input",ht({},c,{value:typeof c.value=="string"?yi(c.value,d):c.value,defaultValue:f,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),dI=1,fI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},hI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return ht(ht({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},vi=function(e,t){var n=$v(Wv(e),t.fraction.length),r="".concat(Bv(n,t.group,t.decimal)," ").concat(t.percentSign);return Ms(r)},pI=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=md(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Wc(b.useState(function(){var g,x;return(x=(g=i.value)===null||g===void 0?void 0:g.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,x=Number.parseFloat("".concat((g=i.value)!==null&&g!==void 0?g:"0")).toFixed(d.fraction.length);u(vi(x,d))},[i.value]);var d=b.useMemo(function(){var g=hI(r);return g.percentSign=Ms("".concat(g.percentSign)),g},[r]),h=c.length-d.percentSign.length-dI,f=function(g){var x,y=a.current;y&&(y.setSelectionRange(h,h),g&&((x=i.onFocus)===null||x===void 0||x.call(i,g)))},p=function(g){var x=g.currentTarget;if(x.selectionStart!==null){var y=x.selectionStart,T=x.selectionEnd,S=y!==T,E=h<y;!S&&E&&f()}s==null||s(g)},m=function(g){var x=vi(g.target.value,d),y=Zi(x);u(x),g.target.value=x,g.target.setAttribute("data-number",y.toString()),o==null||o(g)};b.useEffect(function(){if(a.current!==null){var g=a.current.value;if(g!==""){var x=vi(g,d),y=Zi(x);u(x),a.current.value=x,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(ht(ht({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return f()},[c]);var v=i.defaultValue?vi(i.defaultValue,d):void 0;return b.createElement("input",ht({},i,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:f,onKeyUp:p,ref:a,type:"text"}))}),ls={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},mI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var s=e[o],i=Xi[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,"\\")},xs=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return zc(o,n);var s=mI(o);return n?"^".concat(s,"$"):s},gI=function(e){return e.replace(ls.escape,"\\$&")},zc=function(e,t){var n=e.map(function(r){return typeof r=="string"?gI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},Xi={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]/}},yI=/\d/,rp="(dd) 9dddd-dddd",op="(dd) dddd-dddd",sp="ddd.ddd.ddd-dd",ip="dd.ddd.ddd/dddd-dd",Ai=function(e){return e.replace(/\D/g,"")},vI=["2",/[0-3]/,":",/[0-5]/,/\d/],bI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],Vt={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 Ai(e).length<=11?sp:ip},int:function(e){return e===void 0&&(e=""),yI.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=Ai(e);return t.length<11?op:rp},time:function(e){var t=Ai(e),n=t[0];return n==="2"?vI:bI}},$t=function(e,t,n){var r;return n===void 0&&(n={}),ht({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:xs(e,"",!0),infinity:n.infinity},n)},Dt={cellTelephone:$t(Vt.cellTelephone,"tel"),cellphone:$t(Vt.cellphone,"tel"),cep:$t(Vt.cep,"decimal"),cnpj:$t(Vt.cnpj,"decimal"),color:$t(Vt.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:$t(Vt.cpf,"decimal"),cpfCnpj:$t(Vt.cpfCnpj,"decimal",{transform:Ai}),creditCard:$t(Vt.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:$t(Vt.date,"decimal"),int:$t(Vt.int,"decimal",{pattern:"[0-9]+"}),isoDate:$t(Vt.isoDate,"decimal"),telephone:$t(Vt.telephone,"tel"),time:$t(Vt.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:$t(Vt.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=Xi);for(var i=n(e),a="",l=0,c=0;l<t.length&&c<i.length;){var u=t[l],d=u instanceof RegExp?u:r[u],h=i[c];if(d===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var f=d instanceof RegExp?{regex:d}:d;f.regex.test(h)&&(a+=(s=(o=f.parse)===null||o===void 0?void 0:o.call(f,h))!==null&&s!==void 0?s:h),c+=1,l+=1}return a}var lp=function(e){return e},xI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(xs(e,n,t));return r.test(n)};function wI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var SI=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,d=e.onChangeText,h=e.as,f=md(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=Ml(a),v=Ml(d),g=Ml(u),x=b.useRef(xI(u,s,f.value||f.defaultValue)),y=h??"input",T=Wc(b.useState(""),2),S=T[0],E=T[1],k=wI(S),P=b.useCallback(function(A,D){var L,H,U=(L=A??D)!==null&&L!==void 0?L:"";if(u===void 0)return U;var O=(H=U==null?void 0:U.toString())!==null&&H!==void 0?H:"";return ap(O,typeof u=="function"?u(O):u,i??lp,c??Xi)},[i,u,c]),I=Wc(b.useState(function(){return P(f.value,f.defaultValue)}),2),C=I[0],N=I[1],M=P(f.defaultValue,f.defaultValue),F=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var A=u(C);return Array.isArray(A)?zc(A,s):xs(u,C,s)}return typeof u=="string"?xs(u,C,s):zc(u,s)},[l,C,s,u]);b.useEffect(function(){if(f.value!==void 0){var A=P(f.value,f.defaultValue);N(A),p.current!==null&&(p.current.value=A)}},[f.value,u,i,f.defaultValue]);var R=function(A){var D,L,H,U,O,V=A.currentTarget,Z=A.target.value;if(g.current===void 0)return N(Z),(D=v.current)===null||D===void 0||D.call(v,Z),(L=m.current)===null||L===void 0||L.call(m,A),d==null?void 0:d(Z);var ne=new RegExp(xs(g.current,Z,s)),J=(H=V.selectionEnd)!==null&&H!==void 0?H:0,Y=function(W,ee,B){if(W.type!=="number")return W.setSelectionRange(ee,B)};if(r&&x.current&&Z.length>=C.length)return V.value=C,Y(V,J-1,J-1);var j=!1;Z.length<k.length&&(x.current=!1,j=!0),ne.test(Z)&&(x.current=!0);var $=J,z=Z[$-1],G=ap(Z,typeof g.current=="function"?g.current(Z):g.current,i??lp,c??Xi);for(V.value=G,N(G);$<G.length&&G.charAt($-1)!==z;)$+=1;j?Y(V,J,J):Y(V,$,$),A.target.value=G,E(G),(U=v.current)===null||U===void 0||U.call(v,G),(O=m.current)===null||O===void 0||O.call(m,A)};return b.createElement(y,ht({},f,{ref:p,pattern:F,onChange:R,defaultValue:cp(f.defaultValue)?M:void 0,value:cp(f.value)?P(f.value,f.value):f.value}))}),cp=function(e){return typeof e=="string"},zv=b.forwardRef(function(e,t){return lI(e.mask)?b.createElement(uI,ht({},e,{mask:void 0,ref:t})):fI(e.mask)?b.createElement(pI,ht({},e,{mask:void 0,ref:t})):b.createElement(SI,ht({},e,{ref:t}))}),Wt=function(e){return function(t){return b.createElement(zv,ht({},e,t))}};Wt(Dt.cellTelephone);Wt(Dt.cellphone);Wt(Dt.cep);Wt(Dt.cnpj);Wt(Dt.color);Wt(Dt.cpf);Wt(Dt.cpfCnpj);Wt(Dt.creditCard);Wt(Dt.date);Wt(Dt.int);Wt(Dt.isoDate);Wt(Dt.telephone);Wt(Dt.time);Wt(Dt.uuid);var Hv=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&aI(Dt,t.mask)?Dt[t.mask]:{mask:t.mask}},[t.mask]),o=ht(ht({},t),r);return b.createElement(zv,ht({},o,{ref:n}))}),Dl={},jl={exports:{}},Nl={};/**
142
+ */const ly=Xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wd={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},DC={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},cy=e=>w.jsx(mt.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,animate:e.open.toString(),"aria-hidden":!e.open,className:e.className,exit:Wd.false,transition:DC,variants:Wd,children:e.children}),MC=ui("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),FC=b.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){return w.jsx("div",{"data-open":!!i,"aria-hidden":!i,className:"pointer-events-none w-full isolate data-[open=true]:pointer-events-auto data-[open=true]:mb-4",children:w.jsx(cy,{"data-open":!!i,open:!!i,children:w.jsxs(so,{...s,className:je(MC({theme:n}),t),ref:a,"data-theme":n,role:"alert",as:s.as??"div",children:[w.jsxs("h4",{className:"mb-2 flex items-center gap-2",children:[!r&&n==="success"?w.jsx(sy,{size:20}):null,!r&&n==="info"?w.jsx(ay,{size:20}):null,!r&&n==="danger"?w.jsx(AC,{size:20}):null,r,w.jsx("span",{className:"tracking-3 text-balance text-lg font-semibold",children:s.title})]}),s.children,o!==void 0?w.jsx("button",{type:"button",onClick:()=>o(!1),className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:w.jsx(ly,{size:20})}):null]})})})});function Te(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 _e(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function co(e,t){const n=Te(e);return isNaN(t)?_e(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Gs(e,t){const n=Te(e);if(isNaN(t))return _e(e,NaN);if(!t)return n;const r=n.getDate(),o=_e(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const uy=6048e5,jC=864e5,LC=6e4,NC=36e5,_C=1e3;let VC={};function pr(){return VC}function un(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=Te(e),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Yr(e){return un(e,{weekStartsOn:1})}function fy(e){const t=Te(e),n=t.getFullYear(),r=_e(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Yr(r),i=_e(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=Yr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function qr(e){const t=Te(e);return t.setHours(0,0,0,0),t}function ds(e){const t=Te(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 $C(e,t){const n=qr(e),r=qr(t),o=+n-ds(n),i=+r-ds(r);return Math.round((o-i)/jC)}function BC(e){const t=fy(e),n=_e(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Yr(n)}function dy(e,t){const n=t*7;return co(e,n)}function hy(e,t){return Gs(e,t*12)}function HC(e){return _e(e,Date.now())}function WC(e,t){const n=qr(e),r=qr(t);return+n==+r}function zC(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function py(e){if(!zC(e)&&typeof e!="number")return!1;const t=Te(e);return!isNaN(Number(t))}function my(e,t){const n=Te(e.start),r=Te(e.end);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(Te(s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function gy(e){const t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function GC(e){const t=Te(e),n=_e(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function UC(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=Te(e),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const YC={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"}},qC=(e,t,n)=>{let r;const o=YC[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 ja(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const KC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},XC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},QC={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ZC={date:ja({formats:KC,defaultWidth:"full"}),time:ja({formats:XC,defaultWidth:"full"}),dateTime:ja({formats:QC,defaultWidth:"full"})},JC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eP=(e,t,n,r)=>JC[e];function Ao(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const tP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rP={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"]},oP={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"]},iP={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"}},sP={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"}},aP=(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"},lP={ordinalNumber:aP,era:Ao({values:tP,defaultWidth:"wide"}),quarter:Ao({values:nP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ao({values:rP,defaultWidth:"wide"}),day:Ao({values:oP,defaultWidth:"wide"}),dayPeriod:Ao({values:iP,defaultWidth:"wide",formattingValues:sP,defaultFormattingWidth:"wide"})};function Oo(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?uP(a,f=>f.test(s)):cP(a,f=>f.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function cP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function uP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fP(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const dP=/^(\d+)(th|st|nd|rd)?/i,hP=/\d+/i,pP={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},mP={any:[/^b/i,/^(a|c)/i]},gP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},yP={any:[/1/i,/2/i,/3/i,/4/i]},vP={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},bP={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]},xP={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},wP={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]},SP={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},TP={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}},EP={ordinalNumber:fP({matchPattern:dP,parsePattern:hP,valueCallback:e=>parseInt(e,10)}),era:Oo({matchPatterns:pP,defaultMatchWidth:"wide",parsePatterns:mP,defaultParseWidth:"any"}),quarter:Oo({matchPatterns:gP,defaultMatchWidth:"wide",parsePatterns:yP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Oo({matchPatterns:vP,defaultMatchWidth:"wide",parsePatterns:bP,defaultParseWidth:"any"}),day:Oo({matchPatterns:xP,defaultMatchWidth:"wide",parsePatterns:wP,defaultParseWidth:"any"}),dayPeriod:Oo({matchPatterns:SP,defaultMatchWidth:"any",parsePatterns:TP,defaultParseWidth:"any"})},yy={code:"en-US",formatDistance:qC,formatLong:ZC,formatRelative:eP,localize:lP,match:EP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function CP(e){const t=Te(e);return $C(t,GC(t))+1}function vy(e){const t=Te(e),n=+Yr(t)-+BC(t);return Math.round(n/uy)+1}function ou(e,t){var u,f,h,d;const n=Te(e),r=n.getFullYear(),o=pr(),i=(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??((d=(h=o.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,s=_e(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=un(s,t),l=_e(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=un(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function PP(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=ou(e,t),i=_e(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),un(i,t)}function by(e,t){const n=Te(e),r=+un(n,t)-+PP(n,t);return Math.round(r/uy)+1}function Ae(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Tn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ae(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(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 Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return Ae(o,t.length)}},wr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zd={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 Tn.y(e,t)},Y:function(e,t,n,r){const o=ou(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return Ae(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Ae(i,t.length)},R:function(e,t){const n=fy(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(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 Ae(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 Ae(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 Tn.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 Ae(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=by(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},I:function(e,t,n){const r=vy(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Tn.d(e,t)},D:function(e,t,n){const r=CP(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ae(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Ae(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Ae(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Ae(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=wr.noon:r===0?o=wr.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=wr.evening:r>=12?o=wr.afternoon:r>=4?o=wr.morning:o=wr.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 Tn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Tn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ae(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Tn.s(e,t)},S:function(e,t){return Tn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ud(r);case"XXXX":case"XX":return er(r);case"XXXXX":case"XXX":default:return er(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ud(r);case"xxxx":case"xx":return er(r);case"xxxxx":case"xxx":default:return er(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Gd(r,":");case"OOOO":default:return"GMT"+er(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Gd(r,":");case"zzzz":default:return"GMT"+er(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Ae(r,t.length)},T:function(e,t,n){const r=e.getTime();return Ae(r,t.length)}};function Gd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+Ae(i,2)}function Ud(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):er(e,t)}function er(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Ae(Math.trunc(r/60),2),i=Ae(r%60,2);return n+o+t+i}const Yd=(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"})}},xy=(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"})}},RP=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Yd(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Yd(r,t)).replace("{{time}}",xy(o,t))},Bl={p:xy,P:RP},IP=/^D+$/,AP=/^Y+$/,OP=["D","DD","YY","YYYY"];function wy(e){return IP.test(e)}function Sy(e){return AP.test(e)}function Hl(e,t,n){const r=kP(e,t,n);if(console.warn(r),OP.includes(e))throw new RangeError(r)}function kP(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 DP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,FP=/^'([^]*?)'?$/,jP=/''/g,LP=/[a-zA-Z]/;function NP(e,t,n){var u,f,h,d;const r=pr(),o=r.locale??yy,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=Te(e);if(!py(a))throw new RangeError("Invalid time value");let l=t.match(MP).map(p=>{const m=p[0];if(m==="p"||m==="P"){const v=Bl[m];return v(p,o.formatLong)}return p}).join("").match(DP).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:_P(p)};if(zd[m])return{isToken:!0,value:p};if(m.match(LP))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:i,weekStartsOn:s,locale:o};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(Sy(m)||wy(m))&&Hl(m,t,String(e));const v=zd[m[0]];return v(a,m,o.localize,c)}).join("")}function _P(e){const t=e.match(FP);return t?t[1].replace(jP,"'"):e}function VP(){return Object.assign({},pr())}function $P(e){let n=Te(e).getDay();return n===0&&(n=7),n}function BP(e,t){const n=Te(e),r=Te(t);return n.getTime()>r.getTime()}function HP(e,t){const n=Te(e),r=Te(t);return+n<+r}function WP(e,t){const n=t instanceof Date?_e(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 zP=10;class Ty{constructor(){te(this,"subPriority",0)}validate(t,n){return!0}}class GP extends Ty{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class UP extends Ty{constructor(){super(...arguments);te(this,"priority",zP);te(this,"subPriority",-1)}set(n,r){return r.timestampIsSet?n:_e(n,WP(n,Date))}}class Ee{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new GP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class YP extends Ee{constructor(){super(...arguments);te(this,"priority",140);te(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 tt={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}/},Jt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function ze(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function en(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*NC+i*LC+s*_C),rest:t.slice(n[0].length)}}function Ey(e){return ze(tt.anyDigitsSigned,e)}function Ke(e,t){switch(e){case 1:return ze(tt.singleDigit,t);case 2:return ze(tt.twoDigits,t);case 3:return ze(tt.threeDigits,t);case 4:return ze(tt.fourDigits,t);default:return ze(new RegExp("^\\d{1,"+e+"}"),t)}}function hs(e,t){switch(e){case 1:return ze(tt.singleDigitSigned,t);case 2:return ze(tt.twoDigitsSigned,t);case 3:return ze(tt.threeDigitsSigned,t);case 4:return ze(tt.fourDigitsSigned,t);default:return ze(new RegExp("^-?\\d{1,"+e+"}"),t)}}function iu(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 Cy(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function Py(e){return e%400===0||e%4===0&&e%100!==0}class qP extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return nt(Ke(4,n),i);case"yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(Ke(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o){const i=n.getFullYear();if(o.isTwoDigitYear){const a=Cy(o.year,i);return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}const s=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(s,0,1),n.setHours(0,0,0,0),n}}class KP extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,o){const i=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return nt(Ke(4,n),i);case"Yo":return nt(o.ordinalNumber(n,{unit:"year"}),i);default:return nt(Ke(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,o,i){const s=ou(n,i);if(o.isTwoDigitYear){const l=Cy(o.year,s);return n.setFullYear(l,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),un(n,i)}const a=!("era"in r)||r.era===1?o.year:1-o.year;return n.setFullYear(a,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),un(n,i)}}class XP extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return hs(r==="R"?4:r.length,n)}set(n,r,o){const i=_e(n,0);return i.setFullYear(o,0,4),i.setHours(0,0,0,0),Yr(i)}}class QP extends Ee{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return hs(r==="u"?4:r.length,n)}set(n,r,o){return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}}class ZP extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 Ke(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 JP extends Ee{constructor(){super(...arguments);te(this,"priority",120);te(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 Ke(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 eR extends Ee{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(n,r,o){const i=s=>s-1;switch(r){case"M":return nt(ze(tt.month,n),i);case"MM":return nt(Ke(2,n),i);case"Mo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})||o.month(n,{width:"abbreviated",context:"formatting"})||o.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}class tR extends Ee{constructor(){super(...arguments);te(this,"priority",110);te(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,o){const i=s=>s-1;switch(r){case"L":return nt(ze(tt.month,n),i);case"LL":return nt(Ke(2,n),i);case"Lo":return nt(o.ordinalNumber(n,{unit:"month"}),i);case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})||o.month(n,{width:"abbreviated",context:"standalone"})||o.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,o){return n.setMonth(o,1),n.setHours(0,0,0,0),n}}function nR(e,t,n){const r=Te(e),o=by(r,n)-t;return r.setDate(r.getDate()-o*7),r}class rR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,o){switch(r){case"w":return ze(tt.week,n);case"wo":return o.ordinalNumber(n,{unit:"week"});default:return Ke(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o,i){return un(nR(n,o,i),i)}}function oR(e,t){const n=Te(e),r=vy(n)-t;return n.setDate(n.getDate()-r*7),n}class iR extends Ee{constructor(){super(...arguments);te(this,"priority",100);te(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 ze(tt.week,n);case"Io":return o.ordinalNumber(n,{unit:"week"});default:return Ke(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,o){return Yr(oR(n,o))}}const sR=[31,28,31,30,31,30,31,31,30,31,30,31],aR=[31,29,31,30,31,30,31,31,30,31,30,31];class lR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"d":return ze(tt.date,n);case"do":return o.ordinalNumber(n,{unit:"date"});default:return Ke(r.length,n)}}validate(n,r){const o=n.getFullYear(),i=Py(o),s=n.getMonth();return i?r>=1&&r<=aR[s]:r>=1&&r<=sR[s]}set(n,r,o){return n.setDate(o),n.setHours(0,0,0,0),n}}class cR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 ze(tt.dayOfYear,n);case"Do":return o.ordinalNumber(n,{unit:"date"});default:return Ke(r.length,n)}}validate(n,r){const o=n.getFullYear();return Py(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 su(e,t,n){var f,h,d,p;const r=pr(),o=(n==null?void 0:n.weekStartsOn)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(d=r.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,i=Te(e),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return co(i,u)}class uR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=su(n,o,i),n.setHours(0,0,0,0),n}}class fR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return nt(Ke(r.length,n),s);case"eo":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"eee":return o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeeee":return o.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=su(n,o,i),n.setHours(0,0,0,0),n}}class dR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,o,i){const s=a=>{const l=Math.floor((a-1)/7)*7;return(a+i.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return nt(Ke(r.length,n),s);case"co":return nt(o.ordinalNumber(n,{unit:"day"}),s);case"ccc":return o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"ccccc":return o.day(n,{width:"narrow",context:"standalone"});case"cccccc":return o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(n,{width:"wide",context:"standalone"})||o.day(n,{width:"abbreviated",context:"standalone"})||o.day(n,{width:"short",context:"standalone"})||o.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,o,i){return n=su(n,o,i),n.setHours(0,0,0,0),n}}function hR(e,t){const n=Te(e),r=$P(n),o=t-r;return co(n,o)}class pR extends Ee{constructor(){super(...arguments);te(this,"priority",90);te(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,o){const i=s=>s===0?7:s;switch(r){case"i":case"ii":return Ke(r.length,n);case"io":return o.ordinalNumber(n,{unit:"day"});case"iii":return nt(o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return nt(o.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return nt(o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return nt(o.day(n,{width:"wide",context:"formatting"})||o.day(n,{width:"abbreviated",context:"formatting"})||o.day(n,{width:"short",context:"formatting"})||o.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,o){return n=hR(n,o),n.setHours(0,0,0,0),n}}class mR extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(iu(o),0,0,0),n}}class gR extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(iu(o),0,0,0),n}}class yR extends Ee{constructor(){super(...arguments);te(this,"priority",80);te(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(iu(o),0,0,0),n}}class vR extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,o){switch(r){case"h":return ze(tt.hour12h,n);case"ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ke(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,o){const i=n.getHours()>=12;return i&&o<12?n.setHours(o+12,0,0,0):!i&&o===12?n.setHours(0,0,0,0):n.setHours(o,0,0,0),n}}class bR extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,o){switch(r){case"H":return ze(tt.hour23h,n);case"Ho":return o.ordinalNumber(n,{unit:"hour"});default:return Ke(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,o){return n.setHours(o,0,0,0),n}}class xR extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,o){switch(r){case"K":return ze(tt.hour11h,n);case"Ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ke(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 wR extends Ee{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,o){switch(r){case"k":return ze(tt.hour24h,n);case"ko":return o.ordinalNumber(n,{unit:"hour"});default:return Ke(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,o){const i=o<=24?o%24:o;return n.setHours(i,0,0,0),n}}class SR extends Ee{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"m":return ze(tt.minute,n);case"mo":return o.ordinalNumber(n,{unit:"minute"});default:return Ke(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setMinutes(o,0,0),n}}class TR extends Ee{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(n,r,o){switch(r){case"s":return ze(tt.second,n);case"so":return o.ordinalNumber(n,{unit:"second"});default:return Ke(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,o){return n.setSeconds(o,0),n}}class ER extends Ee{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(n,r){const o=i=>Math.trunc(i*Math.pow(10,-r.length+3));return nt(Ke(r.length,n),o)}set(n,r,o){return n.setMilliseconds(o),n}}class CR extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return en(Jt.basicOptionalMinutes,n);case"XX":return en(Jt.basic,n);case"XXXX":return en(Jt.basicOptionalSeconds,n);case"XXXXX":return en(Jt.extendedOptionalSeconds,n);case"XXX":default:return en(Jt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-ds(n)-o)}}class PR extends Ee{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return en(Jt.basicOptionalMinutes,n);case"xx":return en(Jt.basic,n);case"xxxx":return en(Jt.basicOptionalSeconds,n);case"xxxxx":return en(Jt.extendedOptionalSeconds,n);case"xxx":default:return en(Jt.extended,n)}}set(n,r,o){return r.timestampIsSet?n:_e(n,n.getTime()-ds(n)-o)}}class RR extends Ee{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(n){return Ey(n)}set(n,r,o){return[_e(n,o*1e3),{timestampIsSet:!0}]}}class IR extends Ee{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(n){return Ey(n)}set(n,r,o){return[_e(n,o),{timestampIsSet:!0}]}}const AR={G:new YP,y:new qP,Y:new KP,R:new XP,u:new QP,Q:new ZP,q:new JP,M:new eR,L:new tR,w:new rR,I:new iR,d:new lR,D:new cR,E:new uR,e:new fR,c:new dR,i:new pR,a:new mR,b:new gR,B:new yR,h:new vR,H:new bR,K:new xR,k:new wR,m:new SR,s:new TR,S:new ER,X:new CR,x:new PR,t:new RR,T:new IR},OR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,DR=/^'([^]*?)'?$/,MR=/''/g,FR=/\S/,jR=/[a-zA-Z]/;function LR(e,t,n,r){var m,v,g,x;const o=VP(),i=o.locale??yy,s=o.firstWeekContainsDate??((v=(m=o.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,a=o.weekStartsOn??((x=(g=o.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0;if(t==="")return e===""?Te(n):_e(n,NaN);const l={firstWeekContainsDate:s,weekStartsOn:a,locale:i},c=[new UP],u=t.match(kR).map(y=>{const T=y[0];if(T in Bl){const S=Bl[T];return S(y,i.formatLong)}return y}).join("").match(OR),f=[];for(let y of u){Sy(y)&&Hl(y,t,e),wy(y)&&Hl(y,t,e);const T=y[0],S=AR[T];if(S){const{incompatibleTokens:E}=S;if(Array.isArray(E)){const P=f.find(A=>E.includes(A.token)||A.token===T);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${y}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);f.push({token:T,fullToken:y});const I=S.run(e,y,i.match,l);if(!I)return _e(n,NaN);c.push(I.setter),e=I.rest}else{if(T.match(jR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");if(y==="''"?y="'":T==="'"&&(y=NR(y)),e.indexOf(y)===0)e=e.slice(y.length);else return _e(n,NaN)}}if(e.length>0&&FR.test(e))return _e(n,NaN);const h=c.map(y=>y.priority).sort((y,T)=>T-y).filter((y,T,S)=>S.indexOf(y)===T).map(y=>c.filter(T=>T.priority===y).sort((T,S)=>S.subPriority-T.subPriority)).map(y=>y[0]);let d=Te(n);if(isNaN(d.getTime()))return _e(n,NaN);const p={};for(const y of h){if(!y.validate(d,l))return _e(n,NaN);const T=y.set(d,p,l);Array.isArray(T)?(d=T[0],Object.assign(p,T[1])):d=T}return _e(n,d)}function NR(e){return e.match(DR)[1].replace(MR,"'")}function _R(e,t){const n=Te(e),r=Te(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function VR(e){return WC(e,HC(e))}function $R(e,t){return co(e,-t)}function Ry(e,t){return Gs(e,-t)}function BR(e,t){return dy(e,-t)}function HR(e,t){return hy(e,-t)}var rt=function(){return rt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rt.apply(this,arguments)};function au(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 Wl(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}var ei=function(e){return e.replace(new RegExp(" ","g")," ")},Iy=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)},WR=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Ay=function(e,t,n){var r=e.length-2,o=WR(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Oy=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ps=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},zR=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},La=function(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t},GR=function(e){return e==="money"||e==="currency"},UR=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return rt(rt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ji=function(e,t){var n=Iy(Oy(e),t.fraction.length),r="".concat(t.currency).concat(Ay(n,t.group,t.decimal));return ei(r)},YR=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=au(e,["locale","currency","currencyDisplay","mask","onChange"]),u=b.useRef(null);b.useImperativeHandle(t,function(){return u.current});var f=b.useMemo(function(){var p=UR(r,i,a);return p.currency=ei("".concat(p.currency.trim()," ")),p.literal=ei(p.literal.trim()),p},[r,i]),h=function(p){var m=ji(p.target.value,f),v=ps(m);p.target.value=m,p.target.setAttribute("data-number",v.toString()),l==null||l(p),v!==0&&(u.current.selectionEnd=m.length)};b.useEffect(function(){if(u.current!==null){var p=u.current.value;if(p!==""){var m=ji(p,f),v=ps(m);u.current.value=m,u.current.setAttribute("data-number",v.toString());var g=new InputEvent("change",{});l==null||l(rt(rt({},g),{target:u.current,currentTarget:u.current})),v!==0&&(u.current.selectionEnd=m.length)}}},[f]);var d=c.defaultValue?ji(c.defaultValue,f):void 0;return b.createElement("input",rt({},c,{value:typeof c.value=="string"?ji(c.value,f):c.value,defaultValue:d,type:"text",ref:u,onChange:h,inputMode:"decimal"}))}),qR=1,KR=function(e){return e==="percentage"||e==="percent"||e==="percentual"},XR=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return rt(rt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},Li=function(e,t){var n=Iy(Oy(e),t.fraction.length),r="".concat(Ay(n,t.group,t.decimal)," ").concat(t.percentSign);return ei(r)},QR=b.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=au(e,["locale","mask","onChange","onKeyUp"]),a=b.useRef(null),l=Wl(b.useState(function(){var g,x;return(x=(g=s.value)===null||g===void 0?void 0:g.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];b.useImperativeHandle(t,function(){return a.current}),b.useEffect(function(){var g,x=Number.parseFloat("".concat((g=s.value)!==null&&g!==void 0?g:"0")).toFixed(f.fraction.length);u(Li(x,f))},[s.value]);var f=b.useMemo(function(){var g=XR(r);return g.percentSign=ei("".concat(g.percentSign)),g},[r]),h=c.length-f.percentSign.length-qR,d=function(g){var x,y=a.current;y&&(y.setSelectionRange(h,h),g&&((x=s.onFocus)===null||x===void 0||x.call(s,g)))},p=function(g){var x=g.currentTarget;if(x.selectionStart!==null){var y=x.selectionStart,T=x.selectionEnd,S=y!==T,E=h<y;!S&&E&&d()}i==null||i(g)},m=function(g){var x=Li(g.target.value,f),y=ps(x);u(x),g.target.value=x,g.target.setAttribute("data-number",y.toString()),o==null||o(g)};b.useEffect(function(){if(a.current!==null){var g=a.current.value;if(g!==""){var x=Li(g,f),y=ps(x);u(x),a.current.value=x,a.current.setAttribute("data-number",y.toString());var T=new InputEvent("change",{});o==null||o(rt(rt({},T),{target:a.current,currentTarget:a.current}))}}},[]),b.useEffect(function(){return d()},[c]);var v=s.defaultValue?Li(s.defaultValue,f):void 0;return b.createElement("input",rt({},s,{defaultValue:v,inputMode:"decimal",onChange:m,onFocus:d,onKeyUp:p,ref:a,type:"text"}))}),Mo={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},ZR=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=ms[i];s===void 0?r.push(i.replace(Mo.dots,"\\.").replace(Mo.openParenthesis,"\\(").replace(Mo.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Mo.leadingBars,"\\")},Ho=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return zl(o,n);var i=ZR(o);return n?"^".concat(i,"$"):i},JR=function(e){return e.replace(Mo.escape,"\\$&")},zl=function(e,t){var n=e.map(function(r){return typeof r=="string"?JR(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},ms={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]/}},eI=/\d/,qd="(dd) 9dddd-dddd",Kd="(dd) dddd-dddd",Xd="ddd.ddd.ddd-dd",Qd="dd.ddd.ddd/dddd-dd",Ki=function(e){return e.replace(/\D/g,"")},tI=["2",/[0-3]/,":",/[0-5]/,/\d/],nI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],It={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Xd,isoDate:"dddd-dd-dd",cnpj:Qd,telephone:Kd,cellphone:qd,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Ki(e).length<=11?Xd:Qd},int:function(e){return e===void 0&&(e=""),eI.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=Ki(e);return t.length<11?Kd:qd},time:function(e){var t=Ki(e),n=t[0];return n==="2"?tI:nI}},At=function(e,t,n){var r;return n===void 0&&(n={}),rt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ho(e,"",!0),infinity:n.infinity},n)},Et={cellTelephone:At(It.cellTelephone,"tel"),cellphone:At(It.cellphone,"tel"),cep:At(It.cep,"decimal"),cnpj:At(It.cnpj,"decimal"),color:At(It.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:At(It.cpf,"decimal"),cpfCnpj:At(It.cpfCnpj,"decimal",{transform:Ki}),creditCard:At(It.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:At(It.date,"decimal"),int:At(It.int,"decimal",{pattern:"[0-9]+"}),isoDate:At(It.isoDate,"decimal"),telephone:At(It.telephone,"tel"),time:At(It.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:At(It.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Zd(e,t,n,r){var o,i;r===void 0&&(r=ms);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],f=u instanceof RegExp?u:r[u],h=s[c];if(f===void 0){a+=u,h===u&&(c+=1),l+=1;continue}var d=f instanceof RegExp?{regex:f}:f;d.regex.test(h)&&(a+=(i=(o=d.parse)===null||o===void 0?void 0:o.call(d,h))!==null&&i!==void 0?i:h),c+=1,l+=1}return a}var Jd=function(e){return e},rI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ho(e,n,t));return r.test(n)};function oI(e){var t=b.useRef(e);return b.useEffect(function(){t.current=e},[e]),t.current}var iI=b.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,f=e.onChangeText,h=e.as,d=au(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),p=b.useRef(null);b.useImperativeHandle(t,function(){return p.current});var m=La(a),v=La(f),g=La(u),x=b.useRef(rI(u,i,d.value||d.defaultValue)),y=h??"input",T=Wl(b.useState(""),2),S=T[0],E=T[1],I=oI(S),P=b.useCallback(function(k,F){var _,z,G=(_=k??F)!==null&&_!==void 0?_:"";if(u===void 0)return G;var O=(z=G==null?void 0:G.toString())!==null&&z!==void 0?z:"";return Zd(O,typeof u=="function"?u(O):u,s??Jd,c??ms)},[s,u,c]),A=Wl(b.useState(function(){return P(d.value,d.defaultValue)}),2),C=A[0],L=A[1],M=P(d.defaultValue,d.defaultValue),N=b.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var k=u(C);return Array.isArray(k)?zl(k,i):Ho(u,C,i)}return typeof u=="string"?Ho(u,C,i):zl(u,i)},[l,C,i,u]);b.useEffect(function(){if(d.value!==void 0){var k=P(d.value,d.defaultValue);L(k),p.current!==null&&(p.current.value=k)}},[d.value,u,s,d.defaultValue]);var R=function(k){var F,_,z,G,O,$=k.currentTarget,K=k.target.value;if(g.current===void 0)return L(K),(F=v.current)===null||F===void 0||F.call(v,K),(_=m.current)===null||_===void 0||_.call(m,k),f==null?void 0:f(K);var ee=new RegExp(Ho(g.current,K,i)),Q=(z=$.selectionEnd)!==null&&z!==void 0?z:0,U=function(Y,J,H){if(Y.type!=="number")return Y.setSelectionRange(J,H)};if(r&&x.current&&K.length>=C.length)return $.value=C,U($,Q-1,Q-1);var j=!1;K.length<I.length&&(x.current=!1,j=!0),ee.test(K)&&(x.current=!0);var B=Q,W=K[B-1],V=Zd(K,typeof g.current=="function"?g.current(K):g.current,s??Jd,c??ms);for($.value=V,L(V);B<V.length&&V.charAt(B-1)!==W;)B+=1;j?U($,Q,Q):U($,B,B),k.target.value=V,E(V),(G=v.current)===null||G===void 0||G.call(v,V),(O=m.current)===null||O===void 0||O.call(m,k)};return b.createElement(y,rt({},d,{ref:p,pattern:N,onChange:R,defaultValue:eh(d.defaultValue)?M:void 0,value:eh(d.value)?P(d.value,d.value):d.value}))}),eh=function(e){return typeof e=="string"},ky=b.forwardRef(function(e,t){return GR(e.mask)?b.createElement(YR,rt({},e,{mask:void 0,ref:t})):KR(e.mask)?b.createElement(QR,rt({},e,{mask:void 0,ref:t})):b.createElement(iI,rt({},e,{ref:t}))}),Ot=function(e){return function(t){return b.createElement(ky,rt({},e,t))}};Ot(Et.cellTelephone);Ot(Et.cellphone);Ot(Et.cep);Ot(Et.cnpj);Ot(Et.color);Ot(Et.cpf);Ot(Et.cpfCnpj);Ot(Et.creditCard);Ot(Et.date);Ot(Et.int);Ot(Et.isoDate);Ot(Et.telephone);Ot(Et.time);Ot(Et.uuid);var Dy=b.forwardRef(function(t,n){var r=b.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&zR(Et,t.mask)?Et[t.mask]:{mask:t.mask}},[t.mask]),o=rt(rt({},t),r);return b.createElement(ky,rt({},o,{ref:n}))}),Na={},_a={exports:{}},Va={};/**
143
143
  * @license React
144
144
  * use-sync-external-store-shim.production.min.js
145
145
  *
@@ -147,7 +147,7 @@
147
147
  *
148
148
  * This source code is licensed under the MIT license found in the
149
149
  * LICENSE file in the root directory of this source tree.
150
- */var up;function TI(){if(up)return Nl;up=1;var e=b;function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(d,h){var f=h(),p=r({inst:{value:f,getSnapshot:h}}),m=p[0].inst,v=p[1];return s(function(){m.value=f,m.getSnapshot=h,l(m)&&v({inst:m})},[d,f,h]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),i(f),f}function l(d){var h=d.getSnapshot;d=d.value;try{var f=h();return!n(d,f)}catch{return!0}}function c(d,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Nl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Nl}var dp={};/**
150
+ */var th;function sI(){if(th)return Va;th=1;var e=b;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(f,h){var d=h(),p=r({inst:{value:d,getSnapshot:h}}),m=p[0].inst,v=p[1];return i(function(){m.value=d,m.getSnapshot=h,l(m)&&v({inst:m})},[f,d,h]),o(function(){return l(m)&&v({inst:m}),f(function(){l(m)&&v({inst:m})})},[f]),s(d),d}function l(f){var h=f.getSnapshot;f=f.value;try{var d=h();return!n(f,d)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Va.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Va}var nh={};/**
151
151
  * @license React
152
152
  * use-sync-external-store-shim.development.js
153
153
  *
@@ -155,7 +155,7 @@
155
155
  *
156
156
  * This source code is licensed under the MIT license found in the
157
157
  * LICENSE file in the root directory of this source tree.
158
- */var fp;function EI(){return fp||(fp=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(y){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",y,S)}}function r(y,T,S){{var E=t.ReactDebugCurrentFrame,k=E.getStackAddendum();k!==""&&(T+="%s",S=S.concat([k]));var P=S.map(function(I){return String(I)});P.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,P)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&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,d=!1;function h(y,T,S){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(!d){var k=T();s(E,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var P=i({inst:{value:E,getSnapshot:T}}),I=P[0].inst,C=P[1];return l(function(){I.value=E,I.getSnapshot=T,f(I)&&C({inst:I})},[y,E,T]),a(function(){f(I)&&C({inst:I});var N=function(){f(I)&&C({inst:I})};return y(N)},[y]),c(E),E}function f(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!s(S,E)}catch{return!0}}function p(y,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,g=v?p:h,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;dp.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),dp}var hp;function Uv(){return hp||(hp=1,process.env.NODE_ENV==="production"?jl.exports=TI():jl.exports=EI()),jl.exports}/**
158
+ */var rh;function aI(){return rh||(rh=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(y){{for(var T=arguments.length,S=new Array(T>1?T-1:0),E=1;E<T;E++)S[E-1]=arguments[E];r("error",y,S)}}function r(y,T,S){{var E=t.ReactDebugCurrentFrame,I=E.getStackAddendum();I!==""&&(T+="%s",S=S.concat([I]));var P=S.map(function(A){return String(A)});P.unshift("Warning: "+T),Function.prototype.apply.call(console[y],console,P)}}function o(y,T){return y===T&&(y!==0||1/y===1/T)||y!==y&&T!==T}var i=typeof Object.is=="function"?Object.is:o,s=e.useState,a=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function h(y,T,S){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 I=T();i(E,I)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var P=s({inst:{value:E,getSnapshot:T}}),A=P[0].inst,C=P[1];return l(function(){A.value=E,A.getSnapshot=T,d(A)&&C({inst:A})},[y,E,T]),a(function(){d(A)&&C({inst:A});var L=function(){d(A)&&C({inst:A})};return y(L)},[y]),c(E),E}function d(y){var T=y.getSnapshot,S=y.value;try{var E=T();return!i(S,E)}catch{return!0}}function p(y,T,S){return T()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v=!m,g=v?p:h,x=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g;nh.useSyncExternalStore=x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),nh}var oh;function My(){return oh||(oh=1,process.env.NODE_ENV==="production"?_a.exports=sI():_a.exports=aI()),_a.exports}/**
159
159
  * @license React
160
160
  * use-sync-external-store-shim/with-selector.production.min.js
161
161
  *
@@ -163,7 +163,7 @@
163
163
  *
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
- */var pp;function CI(){if(pp)return Dl;pp=1;var e=b,t=Uv();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 Dl.useSyncExternalStoreWithSelector=function(c,u,d,h,f){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 g(E){if(!x){if(x=!0,y=E,E=h(E),f!==void 0&&m.hasValue){var k=m.value;if(f(k,E))return T=k}return T=E}if(k=T,r(y,E))return k;var P=h(E);return f!==void 0&&f(k,P)?k:(y=E,T=P)}var x=!1,y,T,S=d===void 0?null:d;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,d,h,f]);var v=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Dl}var mp={};/**
166
+ */var ih;function lI(){if(ih)return Na;ih=1;var e=b,t=My();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Na.useSyncExternalStoreWithSelector=function(c,u,f,h,d){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(E){if(!x){if(x=!0,y=E,E=h(E),d!==void 0&&m.hasValue){var I=m.value;if(d(I,E))return T=I}return T=E}if(I=T,r(y,E))return I;var P=h(E);return d!==void 0&&d(I,P)?I:(y=E,T=P)}var x=!1,y,T,S=f===void 0?null:f;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,f,h,d]);var v=o(c,p[0],p[1]);return s(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},Na}var sh={};/**
167
167
  * @license React
168
168
  * use-sync-external-store-shim/with-selector.development.js
169
169
  *
@@ -171,31 +171,31 @@
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var gp;function PI(){return gp||(gp=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=Uv();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}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,d,h,f,p){var m=s(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=a(function(){var S=!1,E,k,P=function(M){if(!S){S=!0,E=M;var F=f(M);if(p!==void 0&&v.hasValue){var R=v.value;if(p(R,F))return k=R,R}return k=F,F}var A=E,D=k;if(r(A,M))return D;var L=f(M);return p!==void 0&&p(D,L)?D:(E=M,k=L,L)},I=h===void 0?null:h,C=function(){return P(d())},N=I===null?void 0:function(){return P(I())};return[C,N]},[d,h,f,p]),x=g[0],y=g[1],T=o(u,x,y);return i(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}mp.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),mp}process.env.NODE_ENV==="production"?CI():PI();const Yr=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},RI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},kI=e=>Object.entries(e),Gv=e=>e instanceof Promise,Yv=(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),II=(e,t,n,r,o,s)=>(...i)=>{const a=performance.now(),l=t(...i),c=(u,d)=>n(h=>Yv(u,h,s,d));return Gv(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))},OI=(e,t,n,r,o,s)=>(...i)=>{o.current={method:e,time:0,props:r()};const a=t(...i),l=c=>n(u=>Yv(c,u,s,o.current));return Gv(a)?a.then(c=>l(c)):l(a)},gd=(e,t,n)=>{const[r,o]=b.useState(()=>e),s=Yr(r),i=Yr((n==null?void 0:n.props)??{}),a=Yr(t),l=Yr((n==null?void 0:n.postMiddleware)??[]),c=Yr((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),d=RI(r),h=Yr(d),f=b.useRef(null);b.useEffect(()=>{if(f.current===null)return;const m=f.current;l.current.forEach(v=>{v(r,d,m)})},[r,l,d]);const[p]=b.useState(()=>{const m=()=>i.current,v=a.current({props:m,state:()=>s.current,initialState:u.current,previousState:()=>h.current});return kI(v).reduce((g,[x,y])=>({...g,[x]:n!=null&&n.debug?II(x,y,o,m,f,c.current):OI(x,y,o,m,f,c.current)}),{})});return[r,p,i.current]},AI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function _I(e,t){return b.useRef(AI(e,t)).current}const yd={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>)`},ws=(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(ws(i,t,n,a))},[]),qv=(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]:qv(i,t,n,a)}},{}),yp={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Hc=(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)},MI={default:e=>Hc(e,{result:yp.default}),dark:e=>Hc(e,{result:yp.dark})},DI=(e,t)=>{const n=(i,a,l)=>({key:`--${l}`,value:`${i}`}),r=ws(e.colors,n),o=ws(e.spacing,n),s=ws(e.rounded,n);return Hc(r.concat(o,s),{result:i=>`html${t?`.${t}`:""} {${i}}`,value:(i,a)=>a.replace("hsla(","").replace(")","")})},Kv={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},Zv={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},jI={name:"dark",rounded:Kv,spacing:Zv,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{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%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},NI={name:"light",rounded:Kv,spacing:Zv,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{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(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},FI=jI,LI=NI,vd={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},Xv=b.createContext({translations:vd,colorTokenParser:yd.hsla}),VI=e=>{const t=b.useMemo(()=>({translations:{...vd,...e.map},colorTokenParser:e.parser||yd.hsla}),[e.map]);return w.jsx(Xv.Provider,{value:t,children:e.children})},zt=()=>{const e=b.useContext(Xv);return e?e.translations:vd},Wa=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),vp=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),bp={basic:/[,[\]]+?/,extend:/[,[\].]+?/},bd=(e,t)=>{const n=vp(t,bp.basic,e)||vp(t,bp.extend,e);return n===void 0||n===e?void 0:n},Qi=()=>typeof window>"u",Uc=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Qv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,s=e.slice(o,o+t);s.length>0&&n.push(s)}return n},$I={type:"spring",bounce:.3,duration:.6},xp=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),wp={middle:{x:"0%",opacity:1},enter:xp(1),exit:xp(-1)},Sp={exit:{visibility:"hidden"}},BI=e=>{const t=Cn(kv(e));return Rv({start:t,end:Vo(t,41)})},Jv=(e,t)=>e.toLocaleDateString(t,{month:"long"}),WI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=kv(new Date(e).setMonth(r)),s=Jv(o,t);return w.jsx("option",{value:s,"data-index":r,children:s},s)}),Fl={ArrowLeft:(e,t)=>t==="days"?rI(e,1):Vv(e,1),ArrowRight:(e,t)=>t==="days"?Vo(e,1):Ba(e,1),ArrowUp:(e,t)=>t==="days"?oI(e,1):sI(e,1),ArrowDown:(e,t)=>t==="days"?Ev(e,1):Cv(e,1)},Tp=(e,t,n,r=0)=>{const o=n.toISOString(),s=()=>{var i;if(e!=null&&e.dataset.focustrap){const a=(i=t.current)==null?void 0:i.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&s(),setTimeout(s,r)},yr=e=>e.getFullYear().toString().padStart(4,"0"),zI=(e,t,n)=>e===void 0||n===void 0?!1:ok(t,e)&&sk(t,n),eb=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:s,onChangeYear:i,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const d=zt(),h=b.useRef(null),{date:f,range:p}=u,m=f||new Date,v=b.useRef(null),[g,x]=gd({date:m,isAnimating:!1,year:yr(m),months:WI(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:Rv({start:Cn(m),end:cR(m)})},P=>({onChangeYear:I=>({year:I}),setToday:()=>({date:So(new Date)}),onExitComplete:()=>(Tp(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:I=>{const C=I(P.state().date);return{date:C,year:yr(C)}},nextMonth:I=>{v.current=I.currentTarget;const C=P.state();if(C.isAnimating)return C;const N=Ba(C.date,1);return{date:N,isAnimating:!0,direction:1,year:yr(N)}},previousMonth:I=>{v.current=I.currentTarget;const C=P.state();if(C.isAnimating)return C;const N=Vv(C.date,1);return{date:N,isAnimating:!0,direction:-1,year:yr(N)}},onSelectDate:I=>{const C=P.state(),N=I.currentTarget.dataset.range==="true",M=I.currentTarget.dataset.date||"",F=new Date(M);return{date:F,year:yr(F),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:N?{from:C.selectMode==="from"?F:C.range.from,to:C.selectMode==="to"?F:C.range.to}:C.range}},onChangeMonth:I=>{const C=I.target.value,M=Array.from(I.target.options).find(R=>R.value===C),F=P.state();if(M){const R=M.dataset.index||"",A=new Date(P.state().date);return A.setMonth(+R),{...F,date:A,year:yr(A)}}return F},onKeyDown:I=>{const C=I.key,N=P.state();if(C in Fl){(C==="ArrowUp"||C==="ArrowDown")&&I.preventDefault();const M=P.state().date,F=bn.keyof(Fl,C)?Fl[C](M,I.shiftKey?"month":"days"):null;if(F!==null)return Tp(I.target,h,F),{...N,date:F,year:yr(F)}}return P.state()}}),{props:{onChangeMonth:s,onChangeYear:i},postMiddleware:[(P,I,C)=>{var M,F;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((F=(M=C.props).onChangeMonth)==null||F.call(M,P.date)),P},(P,I,C)=>{var M,F;return C.method==="onChangeYear"&&((F=(M=C.props).onChangeYear)==null||F.call(M,P.date)),P},(P,I,C)=>{const N=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&N&&t?(l==null||l(P.range),P):(N&&t&&(l==null||l(P.date)),P)}]}),y=Qv(BI(g.date),7),T=g.date.toISOString(),S=Jv(g.date,r);b.useEffect(()=>{t||l==null||l(g.date)},[T]);const E=_I(P=>{x.date(I=>{const C=new Date(I);return C.setFullYear(+P),C})},1200),k=P=>{const I=P.currentTarget.value;x.onChangeYear(I),i==null||i(new Date(I)),E(I)};return w.jsx(GC,{transition:$I,children:w.jsxs("div",{ref:h,className:He("relative overflow-hidden",c==null?void 0:c.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(ei,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:x.onExitComplete,children:w.jsxs(Ct.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(Ct.button,{layout:!0,"data-focustrap":"prev",variants:Sp,onClick:x.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(VP,{className:"h-4 w-4"})}),w.jsx(Ct.span,{layout:!0,variants:wp,custom:g.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${S.length}ch`},value:S,onChange:x.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),w.jsx(Hv,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:k,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(Ct.button,{layout:!0,"data-focustrap":"next",variants:Sp,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:x.nextMonth,children:w.jsx(ud,{className:"h-4 w-4"})}),w.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%)"}})]}),w.jsxs(Ct.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:g.week.map(P=>w.jsx("th",{className:He("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),w.jsx(Ct.tbody,{layout:!0,variants:wp,custom:g.direction,onKeyDown:x.onKeyDown,className:He(c==null?void 0:c.week),children:y.map((P,I)=>w.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var L,H,U,O;const N=C.toISOString(),M=a?N===((L=p==null?void 0:p.to)==null?void 0:L.toISOString())||N===((H=p==null?void 0:p.from)==null?void 0:H.toISOString()):N===(f==null?void 0:f.toISOString()),F=nI(C)&&o,R=(n==null?void 0:n(C))||!1,A=!tI(C,g.date)||R,D=a?zI(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return w.jsxs("td",{align:"center",className:He("relative",c==null?void 0:c.dayFrame),children:[w.jsxs("button",{type:"button","data-date":N,disabled:R,"data-range":a,onClick:x.onSelectDate,"data-view":g.date.getMonth().toString(),className:He(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${F?"text-primary":""} ${A?"text-disabled":""} ${M?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,D?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),M&&((U=g.range.from)==null?void 0:U.toISOString())===N?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarFromDate})}):null,M&&((O=g.range.to)==null?void 0:O.toISOString())===N?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:d.calendarToDate})}):null]}),e?w.jsx(e,{date:C}):null]},N)})},`week-${P.length}-${I}`))})]})]},S)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:x.setToday,children:"Today"})})]})})},tb=({children:e,title:t,as:n="div",container:r="",header:o=null,className:s="",...i})=>w.jsxs(No,{...i,as:n,className:He("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?w.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,w.jsx("div",{className:He("min-w-full px-8",s),children:e})]}),HI=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:He("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),nb=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},UI=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t},rb=b.createContext(""),GI=e=>{const[t,n]=nb(e.active),r=bo(0),o=bo(0),s=b.useRef(null),i=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=s.current;if(u===null)return;const d=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void d(m)};window.addEventListener("resize",h);let f=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(f=u.querySelector(`li[data-id="${p}"]`),n(p)),f===null){f=u.querySelector("li[data-id]");const m=f.getAttribute("data-id")||"";n(m)}return d(f),()=>window.removeEventListener("resize",h)},[]);const a=UI(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const d=u.currentTarget,h=d.getBoundingClientRect();o.set(h.width),r.set(d.offsetLeft),n(d.dataset.id||"")};return w.jsx(rb.Provider,{value:t,children:w.jsx(tb,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:s,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const d=u.props;return w.jsx("li",{"data-id":d.id,"data-active":t===d.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:w.jsx(i,{"data-id":d.id,onClick:c,"aria-current":"page",href:e.useHash?`#${d.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:d.title})},`tab-header-${d.id}`)})})})}),children:e.children})})},YI=()=>b.useContext(rb),qI=e=>{const t=YI();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})};function cr(e){return ob(e)?(e.nodeName||"").toLowerCase():"#document"}function Nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $n(e){var t;return(t=(ob(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ob(e){return e instanceof Node||e instanceof Nt(e).Node}function $e(e){return e instanceof Element||e instanceof Nt(e).Element}function ut(e){return e instanceof HTMLElement||e instanceof Nt(e).HTMLElement}function Gc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nt(e).ShadowRoot}function ti(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function KI(e){return["table","td","th"].includes(cr(e))}function za(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function xd(e){const t=wd(),n=$e(e)?Zt(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 ZI(e){let t=Fn(e);for(;ut(t)&&!tr(t);){if(xd(t))return t;if(za(t))return null;t=Fn(t)}return null}function wd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tr(e){return["html","body","#document"].includes(cr(e))}function Zt(e){return Nt(e).getComputedStyle(e)}function Ha(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fn(e){if(cr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gc(e)&&e.host||$n(e);return Gc(t)?t.host:t}function sb(e){const t=Fn(e);return tr(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&ti(t)?t:sb(t)}function Xn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sb(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Nt(o);if(s){const a=Yc(i);return t.concat(i,i.visualViewport||[],ti(o)?o:[],a&&n?Xn(a):[])}return t.concat(o,Xn(o,[],n))}function Yc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}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 nt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Sd(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ib(){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 ab(e){return e.mozInputSource===0&&e.isTrusted?!0:qc()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Td(e){return XI()?!1:!qc()&&e.width===0&&e.height===0||qc()&&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 Ed(){return/apple/i.test(navigator.vendor)}function qc(){const e=/android/i;return e.test(Sd())||e.test(ib())}function lb(){return Sd().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function XI(){return ib().includes("jsdom/")}function To(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function QI(e){return"nativeEvent"in e}function JI(e){return e.matches("html,body")}function xt(e){return(e==null?void 0:e.ownerDocument)||document}function Ll(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 gn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const eO="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Cd(e){return ut(e)&&e.matches(eO)}function Et(e){e.preventDefault(),e.stopPropagation()}function cb(e){return e?e.getAttribute("role")==="combobox"&&Cd(e):!1}const yn=Math.min,Ht=Math.max,Ji=Math.round,no=Math.floor,nr=e=>({x:e,y:e}),tO={left:"right",right:"left",bottom:"top",top:"bottom"},nO={start:"end",end:"start"};function Kc(e,t,n){return Ht(e,yn(t,n))}function $o(e,t){return typeof e=="function"?e(t):e}function rr(e){return e.split("-")[0]}function Bo(e){return e.split("-")[1]}function ub(e){return e==="x"?"y":"x"}function Pd(e){return e==="y"?"height":"width"}function Mr(e){return["top","bottom"].includes(rr(e))?"y":"x"}function Rd(e){return ub(Mr(e))}function rO(e,t,n){n===void 0&&(n=!1);const r=Bo(e),o=Rd(e),s=Pd(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=ea(i)),[i,ea(i)]}function oO(e){const t=ea(e);return[Zc(e),t,Zc(t)]}function Zc(e){return e.replace(/start|end/g,t=>nO[t])}function sO(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 iO(e,t,n,r){const o=Bo(e);let s=sO(rr(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Zc)))),s}function ea(e){return e.replace(/left|right|bottom|top/g,t=>tO[t])}function aO(e){return{top:0,right:0,bottom:0,left:0,...e}}function db(e){return typeof e!="number"?aO(e):{top:e,right:e,bottom:e,left:e}}function ta(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}}/*!
174
+ */var ah;function cI(){return ah||(ah=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=My();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,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,f,h,d,p){var m=i(null),v;m.current===null?(v={hasValue:!1,value:null},m.current=v):v=m.current;var g=a(function(){var S=!1,E,I,P=function(M){if(!S){S=!0,E=M;var N=d(M);if(p!==void 0&&v.hasValue){var R=v.value;if(p(R,N))return I=R,R}return I=N,N}var k=E,F=I;if(r(k,M))return F;var _=d(M);return p!==void 0&&p(F,_)?F:(E=M,I=_,_)},A=h===void 0?null:h,C=function(){return P(f())},L=A===null?void 0:function(){return P(A())};return[C,L]},[f,h,d,p]),x=g[0],y=g[1],T=o(u,x,y);return s(function(){v.hasValue=!0,v.value=T},[T]),l(T),T}sh.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),sh}process.env.NODE_ENV==="production"?lI():cI();const Sr=e=>{const t=b.useRef(e??{});return b.useEffect(()=>void(t.current=e),[e]),t},uI=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current},fI=e=>Object.entries(e),Fy=e=>e instanceof Promise,jy=(e,t,n,r)=>t===e?n.reduce((o,i)=>i(o,t,r),e):e.constructor.name===Object.name?n.reduce((o,i)=>i(o,t,r),{...t,...e}):n.reduce((o,i)=>i(o,t,r),e),dI=(e,t,n,r,o,i)=>(...s)=>{const a=performance.now(),l=t(...s),c=(u,f)=>n(h=>jy(u,h,i,f));return Fy(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))},hI=(e,t,n,r,o,i)=>(...s)=>{o.current={method:e,time:0,props:r()};const a=t(...s),l=c=>n(u=>jy(c,u,i,o.current));return Fy(a)?a.then(c=>l(c)):l(a)},lu=(e,t,n)=>{const[r,o]=b.useState(()=>e),i=Sr(r),s=Sr((n==null?void 0:n.props)??{}),a=Sr(t),l=Sr((n==null?void 0:n.postMiddleware)??[]),c=Sr((n==null?void 0:n.interceptor)??[]),u=b.useRef(e),f=uI(r),h=Sr(f),d=b.useRef(null);b.useEffect(()=>{if(d.current===null)return;const m=d.current;l.current.forEach(v=>{v(r,f,m)})},[r,l,f]);const[p]=b.useState(()=>{const m=()=>s.current,v=a.current({props:m,state:()=>i.current,initialState:u.current,previousState:()=>h.current});return fI(v).reduce((g,[x,y])=>({...g,[x]:n!=null&&n.debug?dI(x,y,o,m,d,c.current):hI(x,y,o,m,d,c.current)}),{})});return[r,p,s.current]},pI=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function mI(e,t){return b.useRef(pI(e,t)).current}const cu={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>)`},Wo=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(Wo(s,t,n,a))},[]),Ly=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:Ly(s,t,n,a)}},{}),lh={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},Gl=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},gI={default:e=>Gl(e,{result:lh.default}),dark:e=>Gl(e,{result:lh.dark})},yI=(e,t)=>{const n=(s,a,l)=>({key:`--${l}`,value:`${s}`}),r=Wo(e.colors,n),o=Wo(e.spacing,n),i=Wo(e.rounded,n);return Gl(r.concat(o,i),{result:s=>`html${t?`.${t}`:""} {${s}}`,value:(s,a)=>a.replace("hsla(","").replace(")","")})},Ny={button:"0.4rem",pill:"2rem",card:"0.75rem",full:"9999px"},_y={base:"1rem",lg:"1.5rem",sm:"0.75rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},vI={name:"dark",rounded:Ny,spacing:_y,shadow:{floating:"rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 5px 12px"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",disabled:"hsla(240, 4%, 33%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(161,62%,17%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)"},card:{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%, 19%)"},table:{background:"hsla(0, 0%, 15%)",border:"hsla(240, 4%, 33%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"}}}},bI={name:"light",rounded:Ny,spacing:_y,shadow:{floating:"rgba(50, 50, 50, 0.1) 0px 0px 0px 1px, rgba(50, 50, 50, 0.1) 0px 3px 6px, rgba(50, 50, 50, 0.1) 0px 2px 3px"},colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 34%, 96%)",disabled:"hsla(240, 10%, 78%)",primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 35%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)"},card:{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(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",border:"hsla(200, 1%, 80%)"},table:{background:"hsla(0, 0%, 100%)",border:"hsla(210, 25%, 88%)"},button:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},xI=vI,wI=bI,uu={inputCaretDown:"Click to see all options",datePickerCalendarButtonLabel:"Click to open a date picker",inputOptionalLabel:"Optional",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tableSortAsc:"Ascending",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",tableSortAddButton:"Add sort",tableSortDropdownTitle:"Order by",tableSortDesc:"Descending",tableFilterTypeContains:"Contains",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeNotContains:"Not contains",tableFilterTypeLessThan:"Less than",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeStartsWith:"Starts with",tableFilterTypeEndsWith:"Ends with",tableFilterNewFilter:"New filter",tableFilterColumnTitle:"Filter by",tableFilterColumnPlaceholder:"Filter by",tableFilterOperatorTitle:"Operation",tableFilterOperatorPlaceholder:"Equals to...",tableFilterValueTitle:"Value",tableFilterValuePlaceholder:"Something...",tableFilterLabel:"Filters",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tablePaginationPrevious:"Previous",tablePaginationNext:"Next",tablePaginationSelectLabel:"Select the size of page",tablePaginationFooter:e=>w.jsxs(b.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," per page."]}),calendarFromDate:"From",calendarToDate:"To"},Vy=b.createContext({translations:uu,colorTokenParser:cu.hsla}),SI=e=>{const t=b.useMemo(()=>({translations:{...uu,...e.map},colorTokenParser:e.parser||cu.hsla}),[e.map]);return w.jsx(Vy.Provider,{value:t,children:e.children})},kt=()=>{const e=b.useContext(Vy);return e?e.translations:uu},Us=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),ch=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),uh={basic:/[,[\]]+?/,extend:/[,[\].]+?/},fu=(e,t)=>{const n=ch(t,uh.basic,e)||ch(t,uh.extend,e);return n===void 0||n===e?void 0:n},gs=()=>typeof window>"u",Ul=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),$y=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},TI={type:"spring",bounce:.3,duration:.6},fh=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),dh={middle:{x:"0%",opacity:1},enter:fh(1),exit:fh(-1)},hh={exit:{visibility:"hidden"}},EI=e=>{const t=un(gy(e));return my({start:t,end:co(t,41)})},By=(e,t)=>e.toLocaleDateString(t,{month:"long"}),CI=(e,t)=>Array.from({length:12}).map((n,r)=>{const o=gy(new Date(e).setMonth(r)),i=By(o,t);return w.jsx("option",{value:i,"data-index":r,children:i},i)}),$a={ArrowLeft:(e,t)=>t==="days"?$R(e,1):Ry(e,1),ArrowRight:(e,t)=>t==="days"?co(e,1):Gs(e,1),ArrowUp:(e,t)=>t==="days"?BR(e,1):HR(e,1),ArrowDown:(e,t)=>t==="days"?dy(e,1):hy(e,1)},ph=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{var s;if(e!=null&&e.dataset.focustrap){const a=(s=t.current)==null?void 0:s.querySelector(`button[data-focustrap="${e==null?void 0:e.dataset.focustrap}"]`);return setTimeout(()=>a==null?void 0:a.focus({preventScroll:!1}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!1})}};r===0&&i(),setTimeout(i,r)},Xn=e=>e.getFullYear().toString().padStart(4,"0"),PI=(e,t,n)=>e===void 0||n===void 0?!1:BP(t,e)&&HP(t,n),Hy=({RenderOnDay:e,changeOnlyOnClick:t=!1,disabledDate:n,locale:r,markToday:o=!0,onChangeMonth:i,onChangeYear:s,rangeMode:a=!1,onChange:l,styles:c,...u})=>{const f=kt(),h=b.useRef(null),{date:d,range:p}=u,m=d||new Date,v=b.useRef(null),[g,x]=lu({date:m,isAnimating:!1,year:Xn(m),months:CI(m,r),direction:void 0,range:{from:p==null?void 0:p.from,to:p==null?void 0:p.to},selectMode:a?"from":void 0,week:my({start:un(m),end:UC(m)})},P=>({onChangeYear:A=>({year:A}),setToday:()=>({date:qr(new Date)}),onExitComplete:()=>(ph(v.current||null,h,P.state().date,200),v.current=null,{isAnimating:!1}),date:A=>{const C=A(P.state().date);return{date:C,year:Xn(C)}},nextMonth:A=>{v.current=A.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Gs(C.date,1);return{date:L,isAnimating:!0,direction:1,year:Xn(L)}},previousMonth:A=>{v.current=A.currentTarget;const C=P.state();if(C.isAnimating)return C;const L=Ry(C.date,1);return{date:L,isAnimating:!0,direction:-1,year:Xn(L)}},onSelectDate:A=>{const C=P.state(),L=A.currentTarget.dataset.range==="true",M=A.currentTarget.dataset.date||"",N=new Date(M);return{date:N,year:Xn(N),selectMode:C.selectMode===void 0?void 0:C.selectMode==="from"?"to":"from",range:L?{from:C.selectMode==="from"?N:C.range.from,to:C.selectMode==="to"?N:C.range.to}:C.range}},onChangeMonth:A=>{const C=A.target.value,M=Array.from(A.target.options).find(R=>R.value===C),N=P.state();if(M){const R=M.dataset.index||"",k=new Date(P.state().date);return k.setMonth(+R),{...N,date:k,year:Xn(k)}}return N},onKeyDown:A=>{const C=A.key,L=P.state();if(C in $a){(C==="ArrowUp"||C==="ArrowDown")&&A.preventDefault();const M=P.state().date,N=gn.keyof($a,C)?$a[C](M,A.shiftKey?"month":"days"):null;if(N!==null)return ph(A.target,h,N),{...L,date:N,year:Xn(N)}}return P.state()}}),{props:{onChangeMonth:i,onChangeYear:s},postMiddleware:[(P,A,C)=>{var M,N;return(C.method==="onChangeMonth"||C.method==="previousMonth"||C.method==="nextMonth")&&((N=(M=C.props).onChangeMonth)==null||N.call(M,P.date)),P},(P,A,C)=>{var M,N;return C.method==="onChangeYear"&&((N=(M=C.props).onChangeYear)==null||N.call(M,P.date)),P},(P,A,C)=>{const L=C.method==="onSelectDate"||C.method==="setToday"||C.method==="onKeyDown";return a&&L&&t?(l==null||l(P.range),P):(L&&t&&(l==null||l(P.date)),P)}]}),y=$y(EI(g.date),7),T=g.date.toISOString(),S=By(g.date,r);b.useEffect(()=>{t||l==null||l(g.date)},[T]);const E=mI(P=>{x.date(A=>{const C=new Date(A);return C.setFullYear(+P),C})},1200),I=P=>{const A=P.currentTarget.value;x.onChangeYear(A),s==null||s(new Date(A)),E(A)};return w.jsx(AE,{transition:TI,children:w.jsxs("div",{ref:h,className:je("relative overflow-hidden",c==null?void 0:c.calendar),children:[w.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:w.jsx(vi,{initial:!1,mode:"popLayout",custom:g.direction,onExitComplete:x.onExitComplete,children:w.jsxs(mt.div,{initial:"enter",animate:"middle",exit:"exit",children:[w.jsxs("header",{className:"relative flex justify-between",children:[w.jsx(mt.button,{layout:!0,"data-focustrap":"prev",variants:hh,onClick:x.previousMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary",children:w.jsx(SC,{className:"h-4 w-4"})}),w.jsx(mt.span,{layout:!0,variants:dh,custom:g.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:w.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[w.jsx("select",{style:{width:`${S.length}ch`},value:S,onChange:x.onChangeMonth,className:"w-fit cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:g.months}),w.jsx(Dy,{mask:"int",value:g.year,maxLength:4,placeholder:"YYYY",onChange:I,style:{width:`${g.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),w.jsx(mt.button,{layout:!0,"data-focustrap":"next",variants:hh,className:"z-calendar rounded-full p-1.5 hover:bg-primary",onClick:x.nextMonth,children:w.jsx(nu,{className:"h-4 w-4"})}),w.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%)"}})]}),w.jsxs(mt.table,{className:"mt-2 table min-w-full table-auto border-0",children:[w.jsx("thead",{children:w.jsx("tr",{children:g.week.map(P=>w.jsx("th",{className:je("py-2 text-sm font-medium capitalize",c==null?void 0:c.weekDay),children:P.toLocaleDateString(r,{weekday:"short"})},P.toString()))})}),w.jsx(mt.tbody,{layout:!0,variants:dh,custom:g.direction,onKeyDown:x.onKeyDown,className:je(c==null?void 0:c.week),children:y.map((P,A)=>w.jsx("tr",{className:c==null?void 0:c.week,children:P.map(C=>{var _,z,G,O;const L=C.toISOString(),M=a?L===((_=p==null?void 0:p.to)==null?void 0:_.toISOString())||L===((z=p==null?void 0:p.from)==null?void 0:z.toISOString()):L===(d==null?void 0:d.toISOString()),N=VR(C)&&o,R=(n==null?void 0:n(C))||!1,k=!_R(C,g.date)||R,F=a?PI(p==null?void 0:p.from,C,p==null?void 0:p.to):!1;return w.jsxs("td",{align:"center",className:je("relative",c==null?void 0:c.dayFrame),children:[w.jsxs("button",{type:"button","data-date":L,disabled:R,"data-range":a,onClick:x.onSelectDate,"data-view":g.date.getMonth().toString(),className:je(`flex size-10 items-center justify-center rounded-full font-semibold proportional-nums disabled:cursor-not-allowed ${N?"text-primary":""} ${k?"text-disabled":""} ${M?"bg-primary text-primary-foreground":""}`,c==null?void 0:c.day,F?"size-10 border border-dashed border-card-border":""),children:[C.getDate(),M&&((G=g.range.from)==null?void 0:G.toISOString())===L?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:f.calendarFromDate})}):null,M&&((O=g.range.to)==null?void 0:O.toISOString())===L?w.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:w.jsx("span",{className:"text-xs",children:f.calendarToDate})}):null]}),e?w.jsx(e,{date:C}):null]},L)})},`week-${P.length}-${A}`))})]})]},S)})}),w.jsx("footer",{className:"mt-2 text-center text-primary",children:w.jsx("button",{className:"duration-300 transition-transform hover:scale-105",type:"button",onClick:x.setToday,children:"Today"})})]})})},Wy=({children:e,title:t,as:n="div",container:r="",header:o=null,className:i="",...s})=>w.jsxs(so,{...s,as:n,className:je("flex flex-col gap-4 rounded-card border border-card-border bg-card-background py-4 pb-8 shadow",r),children:[t?w.jsx("header",{className:"mb-2 w-full border-b border-card-border px-8 pb-4 text-xl font-medium",children:t}):o,w.jsx("div",{className:je("min-w-full px-8",i),children:e})]}),RI=e=>w.jsxs("div",{className:"divide-y divide-card-border bg-card-background shadow border border-card-border rounded-card",children:[w.jsxs("header",{className:"p-6 items-start flex gap-4",children:[w.jsx("div",{className:je("size-10 p-8 rounded-card flex items-center justify-center aspect-square bg-primary",e.iconContainer),children:w.jsx("div",{children:w.jsx(e.Icon,{className:"size-10 aspect-square text-primary-foreground"})})}),w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx("header",{children:w.jsx("h3",{className:"text-base leading-none",children:e.title})}),w.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?w.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),zy=(e,t)=>{const[n,r]=b.useState(()=>t||e);return b.useEffect(()=>{r(e)},[e]),[n,r]},II=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e},[e]),t},Gy=b.createContext(""),AI=e=>{const[t,n]=zy(e.active),r=Gr(0),o=Gr(0),i=b.useRef(null),s=e.useHash?"a":"button";b.useLayoutEffect(()=>{const u=i.current;if(u===null)return;const f=m=>{if(!m)return;const v=m.getBoundingClientRect();o.set(v.width),r.set(m.offsetLeft)},h=()=>{const m=u.querySelector("li[data-active=true]");return void f(m)};window.addEventListener("resize",h);let d=u.querySelector("li[data-active=true]");const p=window.location.hash.replace(/^#/,"");if(e.active===""&&p!==""&&(d=u.querySelector(`li[data-id="${p}"]`),n(p)),d===null){d=u.querySelector("li[data-id]");const m=d.getAttribute("data-id")||"";n(m)}return f(d),()=>window.removeEventListener("resize",h)},[]);const a=II(e.onChange);b.useEffect(()=>{a.current&&a.current(t)},[a,t]);const l=b.Children.toArray(e.children),c=u=>{const f=u.currentTarget,h=f.getBoundingClientRect();o.set(h.width),r.set(f.offsetLeft),n(f.dataset.id||"")};return w.jsx(Gy.Provider,{value:t,children:w.jsx(Wy,{className:e.className,container:"pt-0 max-w-full w-full min-w-0",header:w.jsx("header",{ref:i,className:"relative mb-2 overflow-x-auto border-b border-card-border",children:w.jsx("nav",{className:"min-w-0",children:w.jsx("ul",{className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:l.map(u=>{const f=u.props;return w.jsx("li",{"data-id":f.id,"data-active":t===f.id,className:"w-full border-b-2 border-card-border data-[active=true]:border-primary data-[active=true]:font-bold data-[active=true]:text-primary",children:w.jsx(s,{"data-id":f.id,onClick:c,"aria-current":"page",href:e.useHash?`#${f.id}`:void 0,className:"block w-full whitespace-nowrap px-10 py-4",children:f.title})},`tab-header-${f.id}`)})})})}),children:e.children})})},OI=()=>b.useContext(Gy),kI=e=>{const t=OI();return w.jsx(b.Fragment,{children:e.id===t?e.children:null})};function Hn(e){return Uy(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xn(e){var t;return(t=(Uy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Uy(e){return e instanceof Node||e instanceof Pt(e).Node}function ke(e){return e instanceof Element||e instanceof Pt(e).Element}function et(e){return e instanceof HTMLElement||e instanceof Pt(e).HTMLElement}function Yl(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function bi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_t(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function DI(e){return["table","td","th"].includes(Hn(e))}function Ys(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function du(e){const t=hu(),n=ke(e)?_t(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 MI(e){let t=bn(e);for(;et(t)&&!jn(t);){if(du(t))return t;if(Ys(t))return null;t=bn(t)}return null}function hu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jn(e){return["html","body","#document"].includes(Hn(e))}function _t(e){return Pt(e).getComputedStyle(e)}function qs(e){return ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bn(e){if(Hn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yl(e)&&e.host||xn(e);return Yl(t)?t.host:t}function Yy(e){const t=bn(e);return jn(t)?e.ownerDocument?e.ownerDocument.body:e.body:et(t)&&bi(t)?t:Yy(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Yy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Pt(o);if(i){const a=ql(s);return t.concat(s,s.visualViewport||[],bi(o)?o:[],a&&n?kn(a):[])}return t.concat(o,kn(o,[],n))}function ql(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ht(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 Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Yl(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function qy(){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 Ky(e){return e.mozInputSource===0&&e.isTrusted?!0:Kl()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function mu(e){return FI()?!1:!Kl()&&e.width===0&&e.height===0||Kl()&&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 gu(){return/apple/i.test(navigator.vendor)}function Kl(){const e=/android/i;return e.test(pu())||e.test(qy())}function Xy(){return pu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function FI(){return qy().includes("jsdom/")}function Kr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jI(e){return"nativeEvent"in e}function LI(e){return e.matches("html,body")}function ut(e){return(e==null?void 0:e.ownerDocument)||document}function Ba(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 tn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const NI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function yu(e){return et(e)&&e.matches(NI)}function pt(e){e.preventDefault(),e.stopPropagation()}function Qy(e){return e?e.getAttribute("role")==="combobox"&&yu(e):!1}const nn=Math.min,Dt=Math.max,ys=Math.round,Or=Math.floor,Ln=e=>({x:e,y:e}),_I={left:"right",right:"left",bottom:"top",top:"bottom"},VI={start:"end",end:"start"};function Xl(e,t,n){return Dt(e,nn(t,n))}function uo(e,t){return typeof e=="function"?e(t):e}function Nn(e){return e.split("-")[0]}function fo(e){return e.split("-")[1]}function Zy(e){return e==="x"?"y":"x"}function vu(e){return e==="y"?"height":"width"}function fr(e){return["top","bottom"].includes(Nn(e))?"y":"x"}function bu(e){return Zy(fr(e))}function $I(e,t,n){n===void 0&&(n=!1);const r=fo(e),o=bu(e),i=vu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=vs(s)),[s,vs(s)]}function BI(e){const t=vs(e);return[Ql(e),t,Ql(t)]}function Ql(e){return e.replace(/start|end/g,t=>VI[t])}function HI(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function WI(e,t,n,r){const o=fo(e);let i=HI(Nn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Ql)))),i}function vs(e){return e.replace(/left|right|bottom|top/g,t=>_I[t])}function zI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jy(e){return typeof e!="number"?zI(e):{top:e,right:e,bottom:e,left:e}}function bs(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}}/*!
175
175
  * tabbable 6.2.0
176
176
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
177
- */var lO=["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])"],na=lO.join(","),fb=typeof Element>"u",Eo=fb?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ra=!fb&&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},oa=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},cO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},uO=function(t,n,r){if(oa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(na));return n&&Eo.call(t,na)&&o.unshift(t),o=o.filter(r),o},dO=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!oa(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=Eo.call(i,na);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),h=!oa(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&h){var f=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else s.unshift.apply(s,i.children)}}return o},hb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pb=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||cO(t))&&!hb(t)?0:t.tabIndex},fO=function(t,n){var r=pb(t);return r<0&&n&&!hb(t)?0:r},hO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},mb=function(t){return t.tagName==="INPUT"},pO=function(t){return mb(t)&&t.type==="hidden"},mO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},gO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},yO=function(t){if(!t.name)return!0;var n=t.form||ra(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=gO(o,t.form);return!s||s===t},vO=function(t){return mb(t)&&t.type==="radio"},bO=function(t){return vO(t)&&!yO(t)},xO=function(t){var n,r=t&&ra(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,d;r=ra(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},Ep=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},wO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Eo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Eo.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=ra(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ep(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(xO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ep(t);return!1},SO=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 Eo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},TO=function(t,n){return!(n.disabled||oa(n)||pO(n)||wO(n,t)||mO(n)||SO(n))},Xc=function(t,n){return!(bO(n)||pb(n)<0||!TO(t,n))},EO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},CO=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=fO(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(hO).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Ds=function(t,n){n=n||{};var r;return n.getShadowRoot?r=dO([t],n.includeContainer,{filter:Xc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:EO}):r=uO(t,n.includeContainer,Xc.bind(null,n)),CO(r)},PO=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Eo.call(t,na)===!1?!1:Xc(n,t)};function Cp(e,t,n){let{reference:r,floating:o}=e;const s=Mr(t),i=Rd(t),a=Pd(i),l=rr(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-o.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-o.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Bo(t)){case"start":f[i]-=h*(n&&c?-1:1);break;case"end":f[i]+=h*(n&&c?-1:1);break}return f}const RO=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:d}=Cp(c,r,l),h=r,f={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x,y,data:T,reset:S}=await g({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:t}});u=x??u,d=y??d,f={...f,[v]:{...f[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:d}=Cp(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}};async function kd(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:d="floating",altBoundary:h=!1,padding:f=0}=$o(t,e),p=db(f),v=a[h?d==="floating"?"reference":"floating":d],g=ta(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),T=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},S=ta(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(g.top-S.top+p.top)/T.y,bottom:(S.bottom-g.bottom+p.bottom)/T.y,left:(g.left-S.left+p.left)/T.x,right:(S.right-g.right+p.right)/T.x}}const kO=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}=$o(e,t)||{};if(c==null)return{};const d=db(u),h={x:n,y:r},f=Rd(o),p=Pd(f),m=await i.getDimensions(c),v=f==="y",g=v?"top":"left",x=v?"bottom":"right",y=v?"clientHeight":"clientWidth",T=s.reference[p]+s.reference[f]-h[f]-s.floating[p],S=h[f]-s.reference[f],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=E?E[y]:0;(!k||!await(i.isElement==null?void 0:i.isElement(E)))&&(k=a.floating[y]||s.floating[p]);const P=T/2-S/2,I=k/2-m[p]/2-1,C=yn(d[g],I),N=yn(d[x],I),M=C,F=k-m[p]-N,R=k/2-m[p]/2+P,A=Kc(M,R,F),D=!l.arrow&&Bo(o)!=null&&R!==A&&s.reference[p]/2-(R<M?C:N)-m[p]/2<0,L=D?R<M?R-M:R-F:0;return{[f]:h[f]+L,data:{[f]:A,centerOffset:R-A-L,...D&&{alignmentOffset:L}},reset:D}}}),IO=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:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=$o(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=rr(o),x=Mr(a),y=rr(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(y||!m?[ea(a)]:oO(a)),E=p!=="none";!h&&E&&S.push(...iO(a,m,p,T));const k=[a,...S],P=await kd(t,v),I=[];let C=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[g]),d){const R=rO(o,i,T);I.push(P[R[0]],P[R[1]])}if(C=[...C,{placement:o,overflows:I}],!I.every(R=>R<=0)){var N,M;const R=(((N=s.flip)==null?void 0:N.index)||0)+1,A=k[R];if(A)return{data:{index:R,overflows:C},reset:{placement:A}};let D=(M=C.filter(L=>L.overflows[0]<=0).sort((L,H)=>L.overflows[1]-H.overflows[1])[0])==null?void 0:M.placement;if(!D)switch(f){case"bestFit":{var F;const L=(F=C.filter(H=>{if(E){const U=Mr(H.placement);return U===x||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,O)=>U+O,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:F[0];L&&(D=L);break}case"initialPlacement":D=a;break}if(o!==D)return{reset:{placement:D}}}return{}}}};async function OO(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=rr(n),a=Bo(n),l=Mr(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=$o(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const AO=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 OO(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}}}}},_O=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:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=$o(e,t),c={x:n,y:r},u=await kd(t,l),d=Mr(rr(o)),h=ub(d);let f=c[h],p=c[d];if(s){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=f+u[v],y=f-u[g];f=Kc(x,f,y)}if(i){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=p+u[v],y=p-u[g];p=Kc(x,p,y)}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},MO=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}=$o(e,t),l=await kd(t,a),c=rr(n),u=Bo(n),d=Mr(n)==="y",{width:h,height:f}=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 v=f-l.top-l.bottom,g=h-l.left-l.right,x=yn(f-l[p],v),y=yn(h-l[m],g),T=!t.middlewareData.shift;let S=x,E=y;if(d?E=u||T?yn(y,g):g:S=u||T?yn(x,v):v,T&&!u){const P=Ht(l.left,0),I=Ht(l.right,0),C=Ht(l.top,0),N=Ht(l.bottom,0);d?E=h-2*(P!==0||I!==0?P+I:Ht(l.left,l.right)):S=f-2*(C!==0||N!==0?C+N:Ht(l.top,l.bottom))}await i({...t,availableWidth:E,availableHeight:S});const k=await o.getDimensions(s.floating);return h!==k.width||f!==k.height?{reset:{rects:!0}}:{}}}};function gb(e){const t=Zt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ji(n)!==s||Ji(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Id(e){return $e(e)?e:e.contextElement}function so(e){const t=Id(e);if(!ut(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=gb(t);let i=(s?Ji(n.width):n.width)/r,a=(s?Ji(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const DO=nr(0);function yb(e){const t=Nt(e);return!wd()||!t.visualViewport?DO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nt(e)?!1:t}function Dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Id(e);let i=nr(1);t&&(r?$e(r)&&(i=so(r)):i=so(e));const a=jO(s,n,r)?yb(s):nr(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=Nt(s),f=r&&$e(r)?Nt(r):r;let p=h,m=Yc(p);for(;m&&r&&f!==p;){const v=so(m),g=m.getBoundingClientRect(),x=Zt(m),y=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,T=g.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=y,c+=T,p=Nt(m),m=Yc(p)}}return ta({width:u,height:d,x:l,y:c})}function NO(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=$n(r),a=t?za(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=ut(r);if((d||!d&&!s)&&((cr(r)!=="body"||ti(i))&&(l=Ha(r)),ut(r))){const h=Dr(r);c=so(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function FO(e){return Array.from(e.getClientRects())}function vb(e){return Dr($n(e)).left+Ha(e).scrollLeft}function LO(e){const t=$n(e),n=Ha(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+vb(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 VO(e,t){const n=Nt(e),r=$n(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=wd();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function $O(e,t){const n=Dr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ut(e)?so(e):nr(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 Pp(e,t,n){let r;if(t==="viewport")r=VO(e,n);else if(t==="document")r=LO($n(e));else if($e(t))r=$O(t,n);else{const o=yb(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return ta(r)}function bb(e,t){const n=Fn(e);return n===t||!$e(n)||tr(n)?!1:Zt(n).position==="fixed"||bb(n,t)}function BO(e,t){const n=t.get(e);if(n)return n;let r=Xn(e,[],!1).filter(a=>$e(a)&&cr(a)!=="body"),o=null;const s=Zt(e).position==="fixed";let i=s?Fn(e):e;for(;$e(i)&&!tr(i);){const a=Zt(i),l=xd(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ti(i)&&!l&&bb(e,i))?r=r.filter(u=>u!==i):o=a,i=Fn(i)}return t.set(e,r),r}function WO(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?za(t)?[]:BO(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=Pp(t,u,o);return c.top=Ht(d.top,c.top),c.right=yn(d.right,c.right),c.bottom=yn(d.bottom,c.bottom),c.left=Ht(d.left,c.left),c},Pp(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zO(e){const{width:t,height:n}=gb(e);return{width:t,height:n}}function HO(e,t,n){const r=ut(t),o=$n(t),s=n==="fixed",i=Dr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=nr(0);if(r||!r&&!s)if((cr(t)!=="body"||ti(o))&&(a=Ha(t)),r){const d=Dr(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=vb(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 Vl(e){return Zt(e).position==="static"}function Rp(e,t){return!ut(e)||Zt(e).position==="fixed"?null:t?t(e):e.offsetParent}function xb(e,t){const n=Nt(e);if(za(e))return n;if(!ut(e)){let o=Fn(e);for(;o&&!tr(o);){if($e(o)&&!Vl(o))return o;o=Fn(o)}return n}let r=Rp(e,t);for(;r&&KI(r)&&Vl(r);)r=Rp(r,t);return r&&tr(r)&&Vl(r)&&!xd(r)?n:r||ZI(e)||n}const UO=async function(e){const t=this.getOffsetParent||xb,n=this.getDimensions,r=await n(e.floating);return{reference:HO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function GO(e){return Zt(e).direction==="rtl"}const YO={convertOffsetParentRelativeRectToViewportRelativeRect:NO,getDocumentElement:$n,getClippingRect:WO,getOffsetParent:xb,getElementRects:UO,getClientRects:FO,getDimensions:zO,getScale:so,isElement:$e,isRTL:GO};function qO(e,t){let n=null,r;const o=$n(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:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const f=no(u),p=no(o.clientWidth-(c+d)),m=no(o.clientHeight-(u+h)),v=no(c),x={rootMargin:-f+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Ht(0,yn(1,l))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!y)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return i(!0),s}function Ua(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=Id(e),u=o||s?[...c?Xn(c):[],...Xn(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const d=c&&a?qO(c,n):null;let h=-1,f=null;i&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let p,m=l?Dr(e):null;l&&v();function v(){const g=Dr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d==null||d(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const KO=AO,ZO=_O,XO=IO,QO=MO,kp=kO,JO=(e,t,n)=>{const r=new Map,o={platform:YO,...n},s={...o.platform,_c:r};return RO(e,t,{...o,platform:s})};var _i=typeof document<"u"?b.useLayoutEffect:b.useEffect;function sa(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(!sa(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)&&!sa(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function wb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ip(e,t){const n=wb(e);return Math.round(t*n)/n}function Op(e){const t=_.useRef(e);return _i(()=>{t.current=e}),t}function eA(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,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=_.useState(r);sa(h,r)||f(r);const[p,m]=_.useState(null),[v,g]=_.useState(null),x=_.useCallback(L=>{L!==E.current&&(E.current=L,m(L))},[]),y=_.useCallback(L=>{L!==k.current&&(k.current=L,g(L))},[]),T=s||p,S=i||v,E=_.useRef(null),k=_.useRef(null),P=_.useRef(u),I=l!=null,C=Op(l),N=Op(o),M=_.useCallback(()=>{if(!E.current||!k.current)return;const L={placement:t,strategy:n,middleware:h};N.current&&(L.platform=N.current),JO(E.current,k.current,L).then(H=>{const U={...H,isPositioned:!0};F.current&&!sa(P.current,U)&&(P.current=U,ig.flushSync(()=>{d(U)}))})},[h,t,n,N]);_i(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(L=>({...L,isPositioned:!1})))},[c]);const F=_.useRef(!1);_i(()=>(F.current=!0,()=>{F.current=!1}),[]),_i(()=>{if(T&&(E.current=T),S&&(k.current=S),T&&S){if(C.current)return C.current(T,S,M);M()}},[T,S,M,C,I]);const R=_.useMemo(()=>({reference:E,floating:k,setReference:x,setFloating:y}),[x,y]),A=_.useMemo(()=>({reference:T,floating:S}),[T,S]),D=_.useMemo(()=>{const L={position:n,left:0,top:0};if(!A.floating)return L;const H=Ip(A.floating,u.x),U=Ip(A.floating,u.y);return a?{...L,transform:"translate("+H+"px, "+U+"px)",...wb(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:U}},[n,a,A.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:M,refs:R,elements:A,floatingStyles:D}),[u,M,R,A,D])}const tA=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?kp({element:r.current,padding:o}).fn(n):{}:r?kp({element:r,padding:o}).fn(n):{}}}},Ga=(e,t)=>({...KO(e),options:[e,t]}),Od=(e,t)=>({...ZO(e),options:[e,t]}),Ad=(e,t)=>({...XO(e),options:[e,t]}),nA=(e,t)=>({...QO(e),options:[e,t]}),Sb=(e,t)=>({...tA(e),options:[e,t]});function Qc(e){return _.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const Tb={..._},rA=Tb.useInsertionEffect,oA=rA||(e=>e());function yt(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return oA(()=>{t.current=e}),_.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 _d="ArrowUp",ni="ArrowDown",Co="ArrowLeft",Wo="ArrowRight";function bi(e,t,n){return Math.floor(e/t)!==n}function Ss(e,t){return t<0||t>=e.current.length}function $l(e,t){return Ot(e,{disabledIndices:t})}function Ap(e,t){return Ot(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ot(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&&Mi(i,a,o));return a}function sA(e,t){let{event:n,orientation:r,loop:o,cols:s,disabledIndices:i,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,d=c;if(n.key===_d){if(u&&Et(n),c===-1)d=l;else if(d=Ot(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(c-s<a||d<0)){const h=c%s,f=l%s,p=l-(f-h);f===h?d=l:d=f>h?p:p-s}Ss(e,d)&&(d=c)}if(n.key===ni&&(u&&Et(n),c===-1?d=a:(d=Ot(e,{startingIndex:c,amount:s,disabledIndices:i}),o&&c+s>l&&(d=Ot(e,{startingIndex:c%s-s,amount:s,disabledIndices:i}))),Ss(e,d)&&(d=c)),r==="both"){const h=no(c/s);n.key===Wo&&(u&&Et(n),c%s!==s-1?(d=Ot(e,{startingIndex:c,disabledIndices:i}),o&&bi(d,s,h)&&(d=Ot(e,{startingIndex:c-c%s-1,disabledIndices:i}))):o&&(d=Ot(e,{startingIndex:c-c%s-1,disabledIndices:i})),bi(d,s,h)&&(d=c)),n.key===Co&&(u&&Et(n),c%s!==0?(d=Ot(e,{startingIndex:c,decrement:!0,disabledIndices:i}),o&&bi(d,s,h)&&(d=Ot(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i}))):o&&(d=Ot(e,{startingIndex:c+(s-c%s),decrement:!0,disabledIndices:i})),bi(d,s,h)&&(d=c));const f=no(l/s)===h;Ss(e,d)&&(o&&f?d=n.key===Co?l:Ot(e,{startingIndex:c-c%s-1,disabledIndices:i}):d=c)}return d}function iA(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 d=0;d<a;d++)for(let h=0;h<l;h++)u.push(o+d+h*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=i}),c=!0):o++}}),[...r]}function aA(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 lA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Mi(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 _p=0;function Yn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(_p);const s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():_p=requestAnimationFrame(s)}var ke=typeof document<"u"?b.useLayoutEffect:b.useEffect;function cA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function uA(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const Eb=_.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function dA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,s]=_.useState(()=>new Map),i=_.useCallback(l=>{s(c=>new Map(c).set(l,null))},[]),a=_.useCallback(l=>{s(c=>{const u=new Map(c);return u.delete(l),u})},[]);return ke(()=>{const l=new Map(o);Array.from(l.keys()).sort(cA).forEach((u,d)=>{l.set(u,d)}),uA(o,l)||s(l)},[o]),_.createElement(Eb.Provider,{value:_.useMemo(()=>({register:i,unregister:a,map:o,elementsRef:n,labelsRef:r}),[i,a,o,n,r])},t)}function Cb(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:s,labelsRef:i}=_.useContext(Eb),[a,l]=_.useState(null),c=_.useRef(null),u=_.useCallback(d=>{if(c.current=d,a!==null&&(s.current[a]=d,i)){var h;const f=t!==void 0;i.current[a]=f?t:(h=d==null?void 0:d.textContent)!=null?h:null}},[a,s,i,t]);return ke(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),ke(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),_.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Po(){return Po=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},Po.apply(this,arguments)}let Mp=!1,fA=0;const Dp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fA++;function hA(){const[e,t]=_.useState(()=>Mp?Dp():void 0);return ke(()=>{e==null&&t(Dp())},[]),_.useEffect(()=>{Mp=!0},[]),e}const pA=Tb.useId,zo=pA||hA;let js;process.env.NODE_ENV!=="production"&&(js=new Set);function Di(){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=js)!=null&&e.has(o))){var s;(s=js)==null||s.add(o),console.warn(o)}}function mA(){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=js)!=null&&e.has(o))){var s;(s=js)==null||s.add(o),console.error(o)}}const Pb=_.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:d,d:h,style:{transform:f,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Di("The `ref` prop is required for `FloatingArrow`."));const v=zo(),[g,x]=_.useState(!1);if(ke(()=>{if(!o)return;Zt(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=i/2*(l/-8+1),E=a/2*l/4,[k,P]=r.split("-"),I=!!h,C=k==="top"||k==="bottom",N=u&&P==="end"?"bottom":"top";let M=u&&P==="end"?"right":"left";u&&g&&(M=P==="end"?"left":"right");const F=(s==null?void 0:s.x)!=null?u||s.x:"",R=(s==null?void 0:s.y)!=null?u||s.y:"",A=h||"M0,0"+(" H"+i)+(" L"+(i-S)+","+(a-E))+(" Q"+i/2+","+a+" "+S+","+(a-E))+" Z",D={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[k];return _.createElement("svg",Po({},m,{"aria-hidden":!0,ref:n,width:I?i:i+y,height:i,viewBox:"0 0 "+i+" "+(a>i?a:i),style:{position:"absolute",pointerEvents:"none",[M]:F,[N]:R,[k]:C||I?"100%":"calc(100% - "+y/2+"px)",transform:""+D+(f??""),...p}}),y>0&&_.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:d,strokeWidth:y+(h?0:1),d:A}),_.createElement("path",{stroke:y&&!h?m.fill:"none",d:A}),_.createElement("clipPath",{id:v},_.createElement("rect",{x:-T,y:T*(I?-1:1),width:i+y,height:i})))});function Rb(){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 kb=_.createContext(null),Ib=_.createContext(null),ur=()=>{var e;return((e=_.useContext(kb))==null?void 0:e.id)||null},dr=()=>_.useContext(Ib);function gA(e){const t=zo(),n=dr(),o=ur();return ke(()=>{const s={id:t,parentId:o};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,o]),t}function yA(e){const{children:t,id:n}=e,r=ur();return _.createElement(kb.Provider,{value:_.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function vA(e){const{children:t}=e,n=_.useRef([]),r=_.useCallback(i=>{n.current=[...n.current,i]},[]),o=_.useCallback(i=>{n.current=n.current.filter(a=>a!==i)},[]),s=_.useState(()=>Rb())[0];return _.createElement(Ib.Provider,{value:_.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:s}),[r,o,s])},t)}function or(e){return"data-floating-ui-"+e}function Pt(e){const t=b.useRef(e);return ke(()=>{t.current=e}),t}const jp=or("safe-polygon");function Bl(e,t,n){return n&&!To(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Ob(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:d=0,move:h=!0}=t,f=dr(),p=ur(),m=Pt(c),v=Pt(l),g=Pt(n),x=_.useRef(),y=_.useRef(-1),T=_.useRef(),S=_.useRef(-1),E=_.useRef(!0),k=_.useRef(!1),P=_.useRef(()=>{}),I=_.useCallback(()=>{var A;const D=(A=o.current.openEvent)==null?void 0:A.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);_.useEffect(()=>{if(!a)return;function A(D){let{open:L}=D;L||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return s.on("openchange",A),()=>{s.off("openchange",A)}},[a,s]),_.useEffect(()=>{if(!a||!m.current||!n)return;function A(L){I()&&r(!1,L,"hover")}const D=xt(i.floating).documentElement;return D.addEventListener("mouseleave",A),()=>{D.removeEventListener("mouseleave",A)}},[i.floating,n,r,a,m,I]);const C=_.useCallback(function(A,D,L){D===void 0&&(D=!0),L===void 0&&(L="hover");const H=Bl(v.current,"close",x.current);H&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,A,L),H)):D&&(clearTimeout(y.current),r(!1,A,L))},[v,r]),N=yt(()=>{P.current(),T.current=void 0}),M=yt(()=>{if(k.current){const A=xt(i.floating).body;A.style.pointerEvents="",A.removeAttribute(jp),k.current=!1}});_.useEffect(()=>{if(!a)return;function A(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function D(O){if(clearTimeout(y.current),E.current=!1,u&&!To(x.current)||d>0&&!Bl(v.current,"open"))return;const V=Bl(v.current,"open",x.current);V?y.current=window.setTimeout(()=>{g.current||r(!0,O,"hover")},V):r(!0,O,"hover")}function L(O){if(A())return;P.current();const V=xt(i.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){M(),N(),C(O,!0,"safe-polygon")}});const ne=T.current;V.addEventListener("mousemove",ne),P.current=()=>{V.removeEventListener("mousemove",ne)};return}(x.current==="touch"?!nt(i.floating,O.relatedTarget):!0)&&C(O)}function H(O){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:O.clientX,y:O.clientY,onClose(){M(),N(),C(O)}})(O))}if($e(i.domReference)){var U;const O=i.domReference;return n&&O.addEventListener("mouseleave",H),(U=i.floating)==null||U.addEventListener("mouseleave",H),h&&O.addEventListener("mousemove",D,{once:!0}),O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",L),()=>{var V;n&&O.removeEventListener("mouseleave",H),(V=i.floating)==null||V.removeEventListener("mouseleave",H),h&&O.removeEventListener("mousemove",D),O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",L)}}},[i,a,e,u,d,h,C,N,M,r,n,g,f,v,m,o]),ke(()=>{var A;if(a&&n&&(A=m.current)!=null&&A.__options.blockPointerEvents&&I()){const L=xt(i.floating).body;L.setAttribute(jp,""),L.style.pointerEvents="none",k.current=!0;const H=i.floating;if($e(i.domReference)&&H){var D;const U=i.domReference,O=f==null||(D=f.nodesRef.current.find(V=>V.id===p))==null||(D=D.context)==null?void 0:D.elements.floating;return O&&(O.style.pointerEvents=""),U.style.pointerEvents="auto",H.style.pointerEvents="auto",()=>{U.style.pointerEvents="",H.style.pointerEvents=""}}}},[a,n,p,i,f,m,I]),ke(()=>{n||(x.current=void 0,N(),M())},[n,N,M]),_.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(S.current),M()},[a,i.domReference,N,M]);const F=_.useMemo(()=>{function A(D){x.current=D.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(D){const{nativeEvent:L}=D;function H(){!E.current&&!g.current&&r(!0,L,"hover")}u&&!To(x.current)||n||d===0||(clearTimeout(S.current),x.current==="touch"?H():S.current=window.setTimeout(H,d))}}},[u,r,n,g,d]),R=_.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(A){C(A.nativeEvent,!1)}}),[C]);return _.useMemo(()=>a?{reference:F,floating:R}:{},[a,F,R])}function bA(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 _r(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 xA(e,t){let n,r=-1;function o(s,i){i>r&&(n=s,r=i),_r(e,s).forEach(l=>{o(l.id,i+1)})}return o(t,0),e.find(s=>s.id===n)}let qr=new WeakMap,xi=new WeakSet,wi={},Wl=0;const wA=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ab=e=>e&&(e.host||Ab(e.parentNode)),SA=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ab(n);return e.contains(r)?r:null}).filter(n=>n!=null);function TA(e,t,n,r){const o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=SA(t,e),a=new Set,l=new Set(i),c=[];wi[o]||(wi[o]=new WeakMap);const u=wi[o];i.forEach(d),h(t),a.clear();function d(f){!f||a.has(f)||(a.add(f),f.parentNode&&d(f.parentNode))}function h(f){!f||l.has(f)||[].forEach.call(f.children,p=>{if(cr(p)!=="script")if(a.has(p))h(p);else{const m=s?p.getAttribute(s):null,v=m!==null&&m!=="false",g=(qr.get(p)||0)+1,x=(u.get(p)||0)+1;qr.set(p,g),u.set(p,x),c.push(p),g===1&&v&&xi.add(p),x===1&&p.setAttribute(o,""),!v&&s&&p.setAttribute(s,"true")}})}return Wl++,()=>{c.forEach(f=>{const p=(qr.get(f)||0)-1,m=(u.get(f)||0)-1;qr.set(f,p),u.set(f,m),p||(!xi.has(f)&&s&&f.removeAttribute(s),xi.delete(f)),m||f.removeAttribute(o)}),Wl--,Wl||(qr=new WeakMap,qr=new WeakMap,xi=new WeakSet,wi={})}}function Np(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=xt(e[0]).body;return TA(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ro=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _b(e,t){const n=Ds(e,Ro());t==="prev"&&n.reverse();const r=n.indexOf(tn(xt(e)));return n.slice(r+1)[0]}function Mb(){return _b(document.body,"next")}function Db(){return _b(document.body,"prev")}function Ts(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!nt(n,r)}function EA(e){Ds(e,Ro()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function CA(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 PA(e,t,n){const r=e.indexOf(t);function o(i){const a=or("focus-guard");let l=r+(i?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||nt(n,c));)i?l++:l--,c=e[l];return c}const s=o(!0);return s||o(!1)}const Md={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 RA;function Fp(e){e.key==="Tab"&&(e.target,clearTimeout(RA))}const ia=_.forwardRef(function(t,n){const[r,o]=_.useState();ke(()=>(Ed()&&o("button"),document.addEventListener("keydown",Fp),()=>{document.removeEventListener("keydown",Fp)}),[]);const s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[or("focus-guard")]:"",style:Md};return _.createElement("span",Po({},t,s))}),jb=_.createContext(null),Lp=or("portal");function kA(e){e===void 0&&(e={});const{id:t,root:n}=e,r=zo(),o=Nb(),[s,i]=_.useState(null),a=_.useRef(null);return ke(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),ke(()=>{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(Lp,""),l.appendChild(c),a.current=c,i(c)},[t,r]),ke(()=>{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(Lp,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Ho(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,s=kA({id:n,root:r}),[i,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),h=!!i&&!i.modal&&i.open&&o&&!!(r||s);return _.useEffect(()=>{if(!s||!o||i!=null&&i.modal)return;function f(p){s&&Ts(p)&&(p.type==="focusin"?CA:EA)(s)}return s.addEventListener("focusin",f,!0),s.addEventListener("focusout",f,!0),()=>{s.removeEventListener("focusin",f,!0),s.removeEventListener("focusout",f,!0)}},[s,o,i==null?void 0:i.modal]),_.createElement(jb.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s])},h&&s&&_.createElement(ia,{"data-type":"outside",ref:l,onFocus:f=>{if(Ts(f,s)){var p;(p=u.current)==null||p.focus()}else{const m=Db()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus()}}}),h&&s&&_.createElement("span",{"aria-owns":s.id,style:Md}),s&&ig.createPortal(t,s),h&&s&&_.createElement(ia,{"data-type":"outside",ref:c,onFocus:f=>{if(Ts(f,s)){var p;(p=d.current)==null||p.focus()}else{const m=Mb()||(i==null?void 0:i.refs.domReference.current);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,f.nativeEvent))}}}))}const Nb=()=>_.useContext(jb),Vp=20;let Sr=[];function zl(e){Sr=Sr.filter(n=>n.isConnected);let t=e;if(!(!t||cr(t)==="body")){if(!PO(t,Ro())){const n=Ds(t,Ro())[0];n&&(t=n)}Sr.push(t),Sr.length>Vp&&(Sr=Sr.slice(-Vp))}}function $p(){return Sr.slice().reverse().find(e=>e.isConnected)}const IA=_.forwardRef(function(t,n){return _.createElement("button",Po({},t,{type:"button",ref:n,tabIndex:-1,style:Md}))});function ri(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:d=!0}=e,{open:h,refs:f,nodeId:p,onOpenChange:m,events:v,dataRef:g,floatingId:x,elements:{domReference:y,floating:T}}=t,S=typeof i=="number"&&i<0,E=cb(y)&&S,k=wA()?s:!0,P=Pt(o),I=Pt(i),C=Pt(a),N=dr(),M=Nb(),F=_.useRef(null),R=_.useRef(null),A=_.useRef(!1),D=_.useRef(!1),L=_.useRef(-1),H=M!=null,U=T==null?void 0:T.firstElementChild,O=(U==null?void 0:U.id)===x?U:T,V=yt(function(Y){return Y===void 0&&(Y=O),Y?Ds(Y,Ro()):[]}),Z=yt(Y=>{const j=V(Y);return P.current.map($=>y&&$==="reference"?y:O&&$==="floating"?O:j).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function Y($){if($.key==="Tab"){nt(O,tn(xt(O)))&&V().length===0&&!E&&Et($);const z=Z(),G=gn($);P.current[0]==="reference"&&G===y&&(Et($),$.shiftKey?Yn(z[z.length-1]):Yn(z[1])),P.current[1]==="floating"&&G===O&&$.shiftKey&&(Et($),Yn(z[0]))}}const j=xt(O);return j.addEventListener("keydown",Y),()=>{j.removeEventListener("keydown",Y)}},[r,y,O,c,P,E,V,Z]),_.useEffect(()=>{if(r||!T)return;function Y(j){const $=gn(j),G=V().indexOf($);G!==-1&&(L.current=G)}return T.addEventListener("focusin",Y),()=>{T.removeEventListener("focusin",Y)}},[r,T,V]),_.useEffect(()=>{if(r||!d)return;function Y(){D.current=!0,setTimeout(()=>{D.current=!1})}function j($){const z=$.relatedTarget;queueMicrotask(()=>{const G=!(nt(y,z)||nt(T,z)||nt(z,T)||nt(M==null?void 0:M.portalNode,z)||z!=null&&z.hasAttribute(or("focus-guard"))||N&&(_r(N.nodesRef.current,p).find(W=>{var ee,B;return nt((ee=W.context)==null?void 0:ee.elements.floating,z)||nt((B=W.context)==null?void 0:B.elements.domReference,z)})||bA(N.nodesRef.current,p).find(W=>{var ee,B;return((ee=W.context)==null?void 0:ee.elements.floating)===z||((B=W.context)==null?void 0:B.elements.domReference)===z})));if(l&&G&&tn(xt(O))===xt(O).body){ut(O)&&(O==null||O.focus());const W=L.current,ee=V(),B=ee[W]||ee[ee.length-1]||O;ut(B)&&B.focus()}(E||!c)&&z&&G&&!D.current&&z!==$p()&&(A.current=!0,m(!1,$))})}if(T&&ut(y))return y.addEventListener("focusout",j),y.addEventListener("pointerdown",Y),T.addEventListener("focusout",j),()=>{y.removeEventListener("focusout",j),y.removeEventListener("pointerdown",Y),T.removeEventListener("focusout",j)}},[r,y,T,O,c,p,N,M,m,d,l,V,E]),_.useEffect(()=>{var Y;if(r)return;const j=Array.from((M==null||(Y=M.portalNode)==null?void 0:Y.querySelectorAll("["+or("portal")+"]"))||[]);if(T){const $=[T,...j,F.current,R.current,P.current.includes("reference")||E?y:null].filter(G=>G!=null),z=c||E?Np($,k,!k):Np($);return()=>{z()}}},[r,y,T,c,P,M,E,k]),ke(()=>{if(r||!ut(O))return;const Y=xt(O),j=tn(Y);queueMicrotask(()=>{const $=Z(O),z=I.current,G=(typeof z=="number"?$[z]:z.current)||O,W=nt(O,j);!S&&!W&&h&&Yn(G,{preventScroll:G===O})})},[r,h,O,S,Z,I]),ke(()=>{if(r||!O)return;let Y=!1;const j=xt(O),$=tn(j);let G=g.current.openEvent;const W=f.domReference.current;zl($);function ee(B){let{open:xe,reason:Ue,event:ze,nested:tt}=B;xe&&(G=ze),Ue==="escape-key"&&f.domReference.current&&zl(f.domReference.current),Ue==="hover"&&ze.type==="mouseleave"&&(A.current=!0),Ue==="outside-press"&&(tt?(A.current=!1,Y=!0):A.current=!(ab(ze)||Td(ze)))}return v.on("openchange",ee),()=>{v.off("openchange",ee);const B=tn(j),xe=nt(T,B)||N&&_r(N.nodesRef.current,p).some(ce=>{var Ee;return nt((Ee=ce.context)==null?void 0:Ee.elements.floating,B)});(xe||G&&["click","mousedown"].includes(G.type))&&f.domReference.current&&zl(f.domReference.current);const ze=W||$,tt=Ds(xt(ze).body,Ro());queueMicrotask(()=>{let ce=$p();!ce&&ut(ze)&&T&&(ce=PA(tt,ze,T)),C.current&&!A.current&&ut(ce)&&(!(ce!==B&&B!==j.body)||xe)&&ce.focus({preventScroll:Y})})}},[r,T,O,C,g,f,v,N,p]),ke(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:d,open:h,onOpenChange:m,refs:f}),()=>{M.setFocusManagerState(null)}},[r,M,c,h,m,f,d]),ke(()=>{if(r||!O||typeof MutationObserver!="function"||S)return;const Y=()=>{const $=O.getAttribute("tabindex"),z=V(),G=tn(xt(T)),W=z.indexOf(G);W!==-1&&(L.current=W),P.current.includes("floating")||G!==f.domReference.current&&z.length===0?$!=="0"&&O.setAttribute("tabindex","0"):$!=="-1"&&O.setAttribute("tabindex","-1")};Y();const j=new MutationObserver(Y);return j.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect()}},[r,T,O,f,P,V,S]);function ne(Y){return r||!u||!c?null:_.createElement(IA,{ref:Y==="start"?F:R,onClick:j=>m(!1,j.nativeEvent)},typeof u=="string"?u:"Dismiss")}const J=!r&&k&&(c?!E:!0)&&(H||c);return _.createElement(_.Fragment,null,J&&_.createElement(ia,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:Y=>{if(c){const $=Z();Yn(o[0]==="reference"?$[0]:$[$.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(A.current=!1,Ts(Y,M.portalNode)){const $=Mb()||y;$==null||$.focus()}else{var j;(j=M.beforeOutsideRef.current)==null||j.focus()}}}),!E&&ne("start"),n,ne("end"),J&&_.createElement(ia,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:Y=>{if(c)Yn(Z()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(d&&(A.current=!0),Ts(Y,M.portalNode)){const $=Db()||y;$==null||$.focus()}else{var j;(j=M.afterOutsideRef.current)==null||j.focus()}}}))}const Hl=new Set,OA=_.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,s=zo();return ke(()=>{if(!r)return;Hl.add(s);const i=/iP(hone|ad|od)|iOS/.test(Sd()),a=document.body.style,c=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",u=window.innerWidth-document.documentElement.clientWidth,d=a.left?parseFloat(a.left):window.scrollX,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),i){var f,p;const m=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(d-Math.floor(m))+"px",right:"0"})}return()=>{Hl.delete(s),Hl.size===0&&(Object.assign(a,{overflow:"",[c]:""}),i&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(d,h)))}},[s,r]),_.createElement("div",Po({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Bp(e){return ut(e.target)&&e.target.tagName==="BUTTON"}function Wp(e){return Cd(e)}function Ya(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,d=_.useRef(),h=_.useRef(!1),f=_.useMemo(()=>({onPointerDown(p){d.current=p.pointerType},onMouseDown(p){const m=d.current;p.button===0&&a!=="click"&&(To(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=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}To(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){d.current=void 0,!(p.defaultPrevented||!u||Bp(p))&&(p.key===" "&&!Wp(s)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Bp(p)||Wp(s)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,l]);return _.useMemo(()=>i?{reference:f}:{},[i,f])}function AA(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var s;const i=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((s=t.dataRef.current.openEvent)==null?void 0:s.type)||"")&&t.pointerType!=="touch";let u=i.width,d=i.height,h=i.x,f=i.y;return n==null&&t.x&&a&&(n=i.x-t.x),r==null&&t.y&&l&&(r=i.y-t.y),h-=n||0,f-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?i.width:0,d=t.axis==="x"?i.height:0,h=a&&t.x!=null?t.x:h,f=l&&t.y!=null?t.y:f):o&&!c&&(d=t.axis==="x"?i.height:d,u=t.axis==="y"?i.width:u),o=!0,{width:u,height:d,x:h,y:f,top:f,right:h+u,bottom:f+d,left:h}}}}function zp(e){return e!=null&&e.clientX!=null}function _A(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:s},refs:i}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=_.useRef(!1),h=_.useRef(null),[f,p]=_.useState(),[m,v]=_.useState([]),g=yt((E,k)=>{d.current||r.current.openEvent&&!zp(r.current.openEvent)||i.setPositionReference(AA(s,{x:E,y:k,axis:l,dataRef:r,pointerType:f}))}),x=yt(E=>{c!=null||u!=null||(n?h.current||v([]):g(E.clientX,E.clientY))}),y=To(f)?o:n,T=_.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Nt(o);function k(P){const I=gn(P);nt(o,I)?(E.removeEventListener("mousemove",k),h.current=null):g(P.clientX,P.clientY)}if(!r.current.openEvent||zp(r.current.openEvent)){E.addEventListener("mousemove",k);const P=()=>{E.removeEventListener("mousemove",k),h.current=null};return h.current=P,P}i.setPositionReference(s)},[y,a,c,u,o,r,i,s,g]);_.useEffect(()=>T(),[T,m]),_.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),_.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),ke(()=>{a&&(c!=null||u!=null)&&(d.current=!1,g(c,u))},[a,c,u,g]);const S=_.useMemo(()=>{function E(k){let{pointerType:P}=k;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:x,onMouseEnter:x}},[x]);return _.useMemo(()=>a?{reference:S}:{},[a,S])}const MA={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DA={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hp=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 Uo(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:d="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:p}=t,m=dr(),v=yt(typeof l=="function"?l:()=>!1),g=typeof l=="function"?v:l,x=_.useRef(!1),y=_.useRef(!1),{escapeKey:T,outsidePress:S}=Hp(f),{escapeKey:E,outsidePress:k}=Hp(p),P=yt(R=>{var A;if(!n||!i||!a||R.key!=="Escape")return;const D=(A=s.current.floatingContext)==null?void 0:A.nodeId,L=m?_r(m.nodesRef.current,D):[];if(!T&&(R.stopPropagation(),L.length>0)){let H=!0;if(L.forEach(U=>{var O;if((O=U.context)!=null&&O.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}r(!1,QI(R)?R.nativeEvent:R,"escape-key")}),I=yt(R=>{var A;const D=()=>{var L;P(R),(L=gn(R))==null||L.removeEventListener("keydown",D)};(A=gn(R))==null||A.addEventListener("keydown",D)}),C=yt(R=>{var A;const D=x.current;x.current=!1;const L=y.current;if(y.current=!1,c==="click"&&L||D||typeof g=="function"&&!g(R))return;const H=gn(R),U="["+or("inert")+"]",O=xt(o.floating).querySelectorAll(U);let V=$e(H)?H:null;for(;V&&!tr(V);){const Y=Fn(V);if(tr(Y)||!$e(Y))break;V=Y}if(O.length&&$e(H)&&!JI(H)&&!nt(H,o.floating)&&Array.from(O).every(Y=>!nt(V,Y)))return;if(ut(H)&&F){const Y=H.clientWidth>0&&H.scrollWidth>H.clientWidth,j=H.clientHeight>0&&H.scrollHeight>H.clientHeight;let $=j&&R.offsetX>H.clientWidth;if(j&&Zt(H).direction==="rtl"&&($=R.offsetX<=H.offsetWidth-H.clientWidth),$||Y&&R.offsetY>H.clientHeight)return}const Z=(A=s.current.floatingContext)==null?void 0:A.nodeId,ne=m&&_r(m.nodesRef.current,Z).some(Y=>{var j;return Ll(R,(j=Y.context)==null?void 0:j.elements.floating)});if(Ll(R,o.floating)||Ll(R,o.domReference)||ne)return;const J=m?_r(m.nodesRef.current,Z):[];if(J.length>0){let Y=!0;if(J.forEach(j=>{var $;if(($=j.context)!=null&&$.open&&!j.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,R,"outside-press")}),N=yt(R=>{var A;const D=()=>{var L;C(R),(L=gn(R))==null||L.removeEventListener(c,D)};(A=gn(R))==null||A.addEventListener(c,D)});_.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=T,s.current.__outsidePressBubbles=S;function R(L){r(!1,L,"ancestor-scroll")}const A=xt(o.floating);a&&A.addEventListener("keydown",E?I:P,E),g&&A.addEventListener(c,k?N:C,k);let D=[];return h&&($e(o.domReference)&&(D=Xn(o.domReference)),$e(o.floating)&&(D=D.concat(Xn(o.floating))),!$e(o.reference)&&o.reference&&o.reference.contextElement&&(D=D.concat(Xn(o.reference.contextElement)))),D=D.filter(L=>{var H;return L!==((H=A.defaultView)==null?void 0:H.visualViewport)}),D.forEach(L=>{L.addEventListener("scroll",R,{passive:!0})}),()=>{a&&A.removeEventListener("keydown",E?I:P,E),g&&A.removeEventListener(c,k?N:C,k),D.forEach(L=>{L.removeEventListener("scroll",R)})}},[s,o,a,g,c,n,r,h,i,T,S,P,E,I,C,k,N]),_.useEffect(()=>{x.current=!1},[g,c]);const M=_.useMemo(()=>({onKeyDown:P,[MA[d]]:R=>{u&&r(!1,R.nativeEvent,"reference-press")}}),[P,r,u,d]),F=_.useMemo(()=>({onKeyDown:P,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[DA[c]]:()=>{x.current=!0}}),[P,c]);return _.useMemo(()=>i?{reference:M,floating:F}:{},[i,M,F])}function jA(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=zo(),s=_.useRef({}),[i]=_.useState(()=>Rb()),a=ur()!=null;if(process.env.NODE_ENV!=="production"){const f=r.reference;f&&!$e(f)&&mA("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]=_.useState(r.reference),u=yt((f,p,m)=>{s.current.openEvent=f?p:void 0,i.emit("openchange",{open:f,event:p,reason:m,nested:a}),n==null||n(f,p,m)}),d=_.useMemo(()=>({setPositionReference:c}),[]),h=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:h,events:i,floatingId:o,refs:d}),[t,u,h,i,o,d])}function Go(e){e===void 0&&(e={});const{nodeId:t}=e,n=jA({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,i]=_.useState(null),[a,l]=_.useState(null),u=(o==null?void 0:o.reference)||s,d=_.useRef(null),h=dr();ke(()=>{u&&(d.current=u)},[u]);const f=eA({...e,elements:{...o,...a&&{reference:a}}}),p=_.useCallback(y=>{const T=$e(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),f.refs.setReference(T)},[f.refs]),m=_.useCallback(y=>{($e(y)||y===null)&&(d.current=y,i(y)),($e(f.refs.reference.current)||f.refs.reference.current===null||y!==null&&!$e(y))&&f.refs.setReference(y)},[f.refs]),v=_.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:d}),[f.refs,m,p]),g=_.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),x=_.useMemo(()=>({...f,...r,refs:v,elements:g,nodeId:t}),[f,v,g,t,r]);return ke(()=>{r.dataRef.current.floatingContext=x;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=x)}),_.useMemo(()=>({...f,context:x,refs:v,elements:g}),[f,v,g,x])}function NA(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=_.useRef(!1),u=_.useRef(),d=_.useRef(!0);_.useEffect(()=>{if(!a)return;const f=Nt(i.domReference);function p(){!n&&ut(i.domReference)&&i.domReference===tn(xt(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",p),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",p),f.removeEventListener("keydown",m,!0)}},[i.domReference,n,a]),_.useEffect(()=>{if(!a)return;function f(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),_.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=_.useMemo(()=>({onPointerDown(f){Td(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const p=gn(f.nativeEvent);if(l&&$e(p))try{if(Ed()&&lb())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!d.current&&!Cd(p))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const p=f.relatedTarget,m=f.nativeEvent,v=$e(p)&&p.hasAttribute(or("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const x=tn(i.domReference?i.domReference.ownerDocument:document);!p&&x===i.domReference||nt((g=s.current.floatingContext)==null?void 0:g.refs.floating.current,x)||nt(i.domReference,x)||v||r(!1,m,"focus")})}}),[s,i.domReference,r,l]);return _.useMemo(()=>a?{reference:h}:{},[a,h])}const Up="active",Gp="selected";function Ul(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Up]:i,[Gp]: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&&[Up,Gp].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var h,f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Yo(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=_.useCallback(a=>Ul(a,e,"reference"),t),s=_.useCallback(a=>Ul(a,e,"floating"),n),i=_.useCallback(a=>Ul(a,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}let Yp=!1;function qa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function qp(e,t){return qa(t,e===_d||e===ni,e===Co||e===Wo)}function Gl(e,t,n){return qa(t,e===ni,n?e===Co:e===Wo)||e==="Enter"||e===" "||e===""}function FA(e,t,n){return qa(t,n?e===Co:e===Wo,e===ni)}function Kp(e,t,n){return qa(t,n?e===Wo:e===Co,e===_d)}function Fb(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:d=!1,nested:h=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:x=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:k,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(d||Di("`useListNavigation` looping must be enabled to allow escaping."),p||Di("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&Di("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const I=ur(),C=dr(),N=yt(a),M=_.useRef(m),F=_.useRef(c??-1),R=_.useRef(null),A=_.useRef(!0),D=_.useRef(N),L=_.useRef(!!o.floating),H=_.useRef(n),U=_.useRef(!1),O=_.useRef(!1),V=Pt(x),Z=Pt(n),ne=Pt(S),J=Pt(o.floating),Y=Pt(c),[j,$]=_.useState(),[z,G]=_.useState(),W=yt(function(ce,Ee,le){le===void 0&&(le=!1);function Pe(Re){p?($(Re.id),C==null||C.events.emit("virtualfocus",Re),E&&(E.current=Re)):Yn(Re,{preventScroll:!0,sync:lb()&&Ed()?Yp||U.current:!1})}const at=ce.current[Ee.current];at&&Pe(at),requestAnimationFrame(()=>{const Re=ce.current[Ee.current]||at;if(!Re)return;at||Pe(Re);const pt=ne.current;pt&&B&&(le||!A.current)&&(Re.scrollIntoView==null||Re.scrollIntoView(typeof pt=="boolean"?{block:"nearest",inline:"nearest"}:pt))})});ke(()=>{document.createElement("div").focus({get preventScroll(){return Yp=!0,!1}})},[]),ke(()=>{l&&(n&&o.floating?M.current&&c!=null&&(O.current=!0,F.current=c,N(c)):L.current&&(F.current=-1,D.current(null)))},[l,n,o.floating,c,N]),ke(()=>{if(l&&n&&o.floating)if(i==null){if(U.current=!1,Y.current!=null)return;if(L.current&&(F.current=-1,W(s,F)),(!H.current||!L.current)&&M.current&&(R.current!=null||M.current===!0&&R.current==null)){let ce=0;const Ee=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(Ee),ce++):(F.current=R.current==null||Gl(R.current,y,f)||h?$l(s,V.current):Ap(s,V.current),R.current=null,N(F.current))};Ee()}}else Ss(s,i)||(F.current=i,W(s,F,O.current),O.current=!1)},[l,n,o.floating,i,Y,h,s,y,f,N,W,V]),ke(()=>{var ce;if(!l||o.floating||!C||p||!L.current)return;const Ee=C.nodesRef.current,le=(ce=Ee.find(Re=>Re.id===I))==null||(ce=ce.context)==null?void 0:ce.elements.floating,Pe=tn(xt(o.floating)),at=Ee.some(Re=>Re.context&&nt(Re.context.elements.floating,Pe));le&&!at&&A.current&&le.focus({preventScroll:!0})},[l,o.floating,C,I,p]),ke(()=>{if(!l||!C||!p||I)return;function ce(Ee){G(Ee.id),E&&(E.current=Ee)}return C.events.on("virtualfocus",ce),()=>{C.events.off("virtualfocus",ce)}},[l,C,p,I,E]),ke(()=>{D.current=N,L.current=!!o.floating}),ke(()=>{n||(R.current=null)},[n]),ke(()=>{H.current=n},[n]);const ee=i!=null,B=_.useMemo(()=>{function ce(le){if(!n)return;const Pe=s.current.indexOf(le);Pe!==-1&&N(Pe)}return{onFocus(le){let{currentTarget:Pe}=le;ce(Pe)},onClick:le=>{let{currentTarget:Pe}=le;return Pe.focus({preventScroll:!0})},...v&&{onMouseMove(le){let{currentTarget:Pe}=le;ce(Pe)},onPointerLeave(le){let{pointerType:Pe}=le;!A.current||Pe==="touch"||(F.current=-1,W(s,F),N(null),p||Yn(J.current,{preventScroll:!0}))}}}},[n,J,W,v,s,N,p]),xe=yt(ce=>{if(A.current=!1,U.current=!0,!Z.current&&ce.currentTarget===J.current)return;if(h&&Kp(ce.key,y,f)){Et(ce),r(!1,ce.nativeEvent,"list-navigation"),ut(o.domReference)&&!p&&o.domReference.focus();return}const Ee=F.current,le=$l(s,x),Pe=Ap(s,x);if(ce.key==="Home"&&(Et(ce),F.current=le,N(F.current)),ce.key==="End"&&(Et(ce),F.current=Pe,N(F.current)),T>1){const at=k||Array.from({length:s.current.length},()=>({width:1,height:1})),Re=iA(at,T,P),pt=Re.findIndex(ie=>ie!=null&&!Mi(s.current,ie,x)),Q=Re.reduce((ie,Oe,Ge)=>Oe!=null&&!Mi(s.current,Oe,x)?Ge:ie,-1);if(F.current=Re[sA({current:Re.map(ie=>ie!=null?s.current[ie]:null)},{event:ce,orientation:y,loop:d,cols:T,disabledIndices:lA([...x||s.current.map((ie,Oe)=>Mi(s.current,Oe)?Oe:void 0),void 0],Re),minIndex:pt,maxIndex:Q,prevIndex:aA(F.current>Pe?le:F.current,at,Re,T,ce.key===ni?"bl":ce.key===Wo?"tr":"tl"),stopEvent:!0})],N(F.current),y==="both")return}if(qp(ce.key,y)){if(Et(ce),n&&!p&&tn(ce.currentTarget.ownerDocument)===ce.currentTarget){F.current=Gl(ce.key,y,f)?le:Pe,N(F.current);return}Gl(ce.key,y,f)?d?F.current=Ee>=Pe?u&&Ee!==s.current.length?-1:le:Ot(s,{startingIndex:Ee,disabledIndices:x}):F.current=Math.min(Pe,Ot(s,{startingIndex:Ee,disabledIndices:x})):d?F.current=Ee<=le?u&&Ee!==-1?s.current.length:Pe:Ot(s,{startingIndex:Ee,decrement:!0,disabledIndices:x}):F.current=Math.max(le,Ot(s,{startingIndex:Ee,decrement:!0,disabledIndices:x})),Ss(s,F.current)?N(null):N(F.current)}}),Ue=_.useMemo(()=>p&&n&&ee&&{"aria-activedescendant":z||j},[p,n,ee,z,j]),ze=_.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!cb(o.domReference)&&Ue,onKeyDown:xe,onPointerMove(){A.current=!0}}),[Ue,xe,o.domReference,y]),tt=_.useMemo(()=>{function ce(le){m==="auto"&&ab(le.nativeEvent)&&(M.current=!0)}function Ee(le){M.current=m,m==="auto"&&Td(le.nativeEvent)&&(M.current=!0)}return{...Ue,onKeyDown(le){A.current=!1;const Pe=le.key.indexOf("Arrow")===0,at=FA(le.key,y,f),Re=Kp(le.key,y,f),pt=qp(le.key,y),Q=(h?at:pt)||le.key==="Enter"||le.key.trim()==="";if(p&&n){const St=C==null?void 0:C.nodesRef.current.find(jt=>jt.parentId==null),kt=C&&St?xA(C.nodesRef.current,St.id):null;if(Pe&&kt&&E){const jt=new KeyboardEvent("keydown",{key:le.key,bubbles:!0});if(at||Re){var ie,Oe;const mr=((ie=kt.context)==null?void 0:ie.elements.domReference)===le.currentTarget,Wr=Re&&!mr?(Oe=kt.context)==null?void 0:Oe.elements.domReference:at?s.current.find(zr=>(zr==null?void 0:zr.id)===j):null;Wr&&(Et(le),Wr.dispatchEvent(jt),G(void 0))}if(pt&&kt.context&&kt.context.open&&kt.parentId&&le.currentTarget!==kt.context.elements.domReference){var Ge;Et(le),(Ge=kt.context.elements.domReference)==null||Ge.dispatchEvent(jt);return}}return xe(le)}if(!(!n&&!g&&Pe)){if(Q&&(R.current=h&&pt?null:le.key),h){at&&(Et(le),n?(F.current=$l(s,V.current),N(F.current)):r(!0,le.nativeEvent,"list-navigation"));return}pt&&(c!=null&&(F.current=c),Et(le),!n&&g?r(!0,le.nativeEvent,"list-navigation"):xe(le),n&&N(F.current))}},onFocus(){n&&!p&&N(null)},onPointerDown:Ee,onMouseDown:ce,onClick:ce}},[j,Ue,xe,V,m,s,h,N,r,n,g,y,f,c,C,p,E]);return _.useMemo(()=>l?{reference:tt,floating:ze,item:B}:{},[l,tt,ze,B])}const LA=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=LA.get(i))!=null?n:i,l=zo(),u=ur()!=null,d=_.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]),h=_.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,i]),f=_.useCallback(p=>{let{active:m,selected:v}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...g,"aria-selected":m&&v};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,i]);return _.useMemo(()=>s?{reference:d,floating:h,item:f}:{},[s,d,h,f])}const Zp=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Kr(e,t){return typeof e=="function"?e(t):e}function VA(e,t){const[n,r]=_.useState(e);return e&&!n&&r(!0),_.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function $A(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]=_.useState("unmounted"),c=VA(n,i);return!c&&a==="close"&&l("unmounted"),ke(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function BA(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=_.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof i=="number",d=(u?i:i.open)||0,h=(u?i:i.close)||0,[f,p]=_.useState(()=>({...Kr(s,c),...Kr(n,c)})),{isMounted:m,status:v}=$A(e,{duration:i}),g=Pt(n),x=Pt(r),y=Pt(o),T=Pt(s);return ke(()=>{const S=Kr(g.current,c),E=Kr(y.current,c),k=Kr(T.current,c),P=Kr(x.current,c)||Object.keys(S).reduce((I,C)=>(I[C]="",I),{});if(v==="initial"&&p(I=>({transitionProperty:I.transitionProperty,...k,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(Zp).join(","),transitionDuration:d+"ms",...k,...P}),v==="close"){const I=E||S;p({transitionProperty:Object.keys(I).map(Zp).join(","),transitionDuration:h+"ms",...k,...I})}},[h,y,g,x,T,d,v,c]),{isMounted:m,styles:f}}function WA(e,t){var n;const{open:r,dataRef:o}=e,{listRef:s,activeIndex:i,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:h=[],selectedIndex:f=null}=t,p=_.useRef(),m=_.useRef(""),v=_.useRef((n=f??i)!=null?n:-1),g=_.useRef(null),x=yt(a),y=yt(l),T=Pt(u),S=Pt(h);ke(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),ke(()=>{if(r&&m.current===""){var C;v.current=(C=f??i)!=null?C:-1}},[r,f,i]);const E=yt(C=>{C?o.current.typing||(o.current.typing=C,y(C)):o.current.typing&&(o.current.typing=C,y(C))}),k=yt(C=>{function N(D,L,H){const U=T.current?T.current(L,H):L.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?D.indexOf(U):-1}const M=s.current;if(m.current.length>0&&m.current[0]!==" "&&(N(M,M,m.current)===-1?E(!1):C.key===" "&&Et(C)),M==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(Et(C),E(!0)),M.every(D=>{var L,H;return D?((L=D[0])==null?void 0:L.toLocaleLowerCase())!==((H=D[1])==null?void 0:H.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=g.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=g.current,E(!1)},d);const R=v.current,A=N(M,[...M.slice((R||0)+1),...M.slice(0,(R||0)+1)],m.current);A!==-1?(x(A),g.current=A):C.key!==" "&&(m.current="",E(!1))}),P=_.useMemo(()=>({onKeyDown:k}),[k]),I=_.useMemo(()=>({onKeyDown:k,onKeyUp(C){C.key===" "&&E(!1)}}),[k,E]);return _.useMemo(()=>c?{reference:P,floating:I}:{},[c,P,I])}function Xp(e,t){const[n,r]=e;let o=!1;const s=t.length;for(let i=0,a=s-1;i<s;a=i++){const[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function zA(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function HA(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,s=!1,i=null,a=null,l=performance.now();function c(d,h){const f=performance.now(),p=f-l;if(i===null||a===null||p===0)return i=d,a=h,l=f,null;const m=d-i,v=h-a,x=Math.sqrt(m*m+v*v)/p;return i=d,a=h,l=f,x}const u=d=>{let{x:h,y:f,placement:p,elements:m,onClose:v,nodeId:g,tree:x}=d;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||f==null)return;const{clientX:E,clientY:k}=T,P=[E,k],I=gn(T),C=T.type==="mouseleave",N=nt(m.floating,I),M=nt(m.domReference,I),F=m.domReference.getBoundingClientRect(),R=m.floating.getBoundingClientRect(),A=p.split("-")[0],D=h>R.right-R.width/2,L=f>R.bottom-R.height/2,H=zA(P,F),U=R.width>F.width,O=R.height>F.height,V=(U?F:R).left,Z=(U?F:R).right,ne=(O?F:R).top,J=(O?F:R).bottom;if(N&&(s=!0,!C))return;if(M&&(s=!1),M&&!C){s=!0;return}if(C&&$e(T.relatedTarget)&&nt(m.floating,T.relatedTarget)||x&&_r(x.nodesRef.current,g).some($=>{let{context:z}=$;return z==null?void 0:z.open}))return;if(A==="top"&&f>=F.bottom-1||A==="bottom"&&f<=F.top+1||A==="left"&&h>=F.right-1||A==="right"&&h<=F.left+1)return S();let Y=[];switch(A){case"top":Y=[[V,F.top+1],[V,R.bottom-1],[Z,R.bottom-1],[Z,F.top+1]];break;case"bottom":Y=[[V,R.top+1],[V,F.bottom-1],[Z,F.bottom-1],[Z,R.top+1]];break;case"left":Y=[[R.right-1,J],[R.right-1,ne],[F.left+1,ne],[F.left+1,J]];break;case"right":Y=[[F.right-1,J],[F.right-1,ne],[R.left+1,ne],[R.left+1,J]];break}function j($){let[z,G]=$;switch(A){case"top":{const W=[U?z+t/2:D?z+t*4:z-t*4,G+t+1],ee=[U?z-t/2:D?z+t*4:z-t*4,G+t+1],B=[[R.left,D||U?R.bottom-t:R.top],[R.right,D?U?R.bottom-t:R.top:R.bottom-t]];return[W,ee,...B]}case"bottom":{const W=[U?z+t/2:D?z+t*4:z-t*4,G-t],ee=[U?z-t/2:D?z+t*4:z-t*4,G-t],B=[[R.left,D||U?R.top+t:R.bottom],[R.right,D?U?R.top+t:R.bottom:R.top+t]];return[W,ee,...B]}case"left":{const W=[z+t+1,O?G+t/2:L?G+t*4:G-t*4],ee=[z+t+1,O?G-t/2:L?G+t*4:G-t*4];return[...[[L||O?R.right-t:R.left,R.top],[L?O?R.right-t:R.left:R.right-t,R.bottom]],W,ee]}case"right":{const W=[z-t,O?G+t/2:L?G+t*4:G-t*4],ee=[z-t,O?G-t/2:L?G+t*4:G-t*4],B=[[L||O?R.left+t:R.right,R.top],[L?O?R.left+t:R.right:R.left+t,R.bottom]];return[W,ee,...B]}}}if(!Xp([E,k],Y)){if(s&&!H)return S();if(!C&&r){const $=c(T.clientX,T.clientY);if($!==null&&$<.1)return S()}Xp([E,k],j([h,f]))?!s&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const Ko=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),s=b.useMemo(()=>[Ga(10),Ad({fallbackAxisSideDirection:"end"}),Od(),Sb({padding:5,element:o})],[e.arrow]),{refs:i,floatingStyles:a,context:l}=Go({open:n,middleware:s,transform:!0,whileElementsMounted:Ua,onOpenChange:(p,m)=>{var g;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),c=Ya(l),u=Uo(l),d=qo(l),{getReferenceProps:h,getFloatingProps:f}=Yo([c,u,d]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:i.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(Ho,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(ri,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:i.setFloating,style:a,"aria-labelledby":t,...f(),children:[w.jsx(Pb,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},UA=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[s,i]=b.useState(!1),{context:a,refs:l}=Go({transform:!0,open:s!==null,nodeId:n,onOpenChange:i,strategy:"absolute"}),c=Ya(a),u=qo(a),d=Uo(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:f}=Yo([c,u,d]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(ho,{...f(e),as:Ct.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>i(!0),children:w.jsx(Ct.span,{layoutId:o,children:e.trigger})}),w.jsx(ei,{children:s?w.jsx(Ho,{root:t,children:w.jsx(ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(Ct.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};function GA(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function YA(...e){return t=>e.forEach(n=>GA(n,t))}var Dd=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),s=o.find(KA);if(s){const i=s.props.children,a=o.map(l=>l===s?_.Children.count(i)>1?_.Children.only(null):_.isValidElement(i)?i.props.children:null:l);return w.jsx(Jc,{...r,ref:t,children:_.isValidElement(i)?_.cloneElement(i,void 0,a):null})}return w.jsx(Jc,{...r,ref:t,children:n})});Dd.displayName="Slot";var Jc=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const o=XA(n);return _.cloneElement(n,{...ZA(r,n.props),ref:t?YA(t,o):o})}return _.Children.count(n)>1?_.Children.only(null):null});Jc.displayName="SlotClone";var qA=({children:e})=>w.jsx(w.Fragment,{children:e});function KA(e){return _.isValidElement(e)&&e.type===qA}function ZA(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 XA(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 Lb=300,QA=500,Vb=(e="")=>He("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),eu=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Qp=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:s,...i},a)=>{const l=ur(),c=l!==null,[u,d]=b.useState(!1),[h,f]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef([]),g=b.useRef([]),x=b.useContext(eu),y=dr(),T=gA(),S=Cb(),{floatingStyles:E,refs:k,context:P}=Go({nodeId:T,open:u,transform:!0,onOpenChange:d,whileElementsMounted:Ua,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[Ga({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Ad(),Od()]}),I=qo(P,{role:"menu",enabled:!0}),C=Uo(P,{bubbles:!0}),N=Ob(P,{enabled:n,delay:{open:Lb},handleClose:HA({blockPointerEvents:!0})}),M=Ya(P,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),F=Fb(P,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:v,scrollItemIntoView:!0,onNavigate:m}),R=WA(P,{activeIndex:p,listRef:g,resetMs:QA,onMatch:u?m:void 0}),{getReferenceProps:A,getFloatingProps:D,getItemProps:L}=Yo([N,M,I,C,F,R]);b.useEffect(()=>{if(!y)return;const U=()=>d(!1),O=V=>{V.nodeId!==T&&V.parentId===l&&d(!1)};return y.events.on("click",U),y.events.on("menuopen",O),()=>{y.events.off("click",U),y.events.off("menuopen",O)}},[y,T,l]),b.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:T})},[y,u,T,l]);const H=r?i.className:He(Vb(i.className));return w.jsxs(yA,{id:T,children:[w.jsx(b.Fragment,{children:i.asChild?w.jsx(Dd,{children:s,ref:Qc([k.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...A(x.getItemProps({...i,onFocus(U){var O;(O=i.onFocus)==null||O.call(i,U),f(!1),x.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:Qc([k.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:H,...A(x.getItemProps({...i,onFocus(U){var O;(O=i.onFocus)==null||O.call(i,U),f(!1),x.setHasFocusInside(!0)}})),children:[s,c&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(ud,{size:14})]})]})}),w.jsx(eu.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:L,setHasFocusInside:f,isOpen:u},children:w.jsx(dA,{elementsRef:v,labelsRef:g,children:u&&w.jsx(Ho,{preserveTabOrder:!0,children:w.jsx(ri,{context:P,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:w.jsx(t,{...D(),ref:k.setFloating,style:{...i.style,...E},className:He("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),JA=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},s)=>{const i=b.useContext(eu),a=Cb({label:r?null:typeof e=="string"?e:t}),l=dr(),c=a.index===i.activeIndex;return w.jsxs("button",{...o,ref:Qc([a.ref,s]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Vb(o.className),...i.getItemProps({onClick(u){var d;(d=o.onClick)==null||d.call(o,u),l==null||l.events.emit("click")},onFocus(u){var d;(d=o.onFocus)==null||d.call(o,u),i.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),e_=b.forwardRef((e,t)=>ur()!==null?w.jsx(Qp,{...e,isParent:!1,ref:t}):w.jsx(vA,{children:w.jsx(Qp,{...e,isParent:!0,ref:t})})),t_=(e,t)=>Qi()?t:window.matchMedia(e).matches,n_=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),s=()=>r(t_(e,t));return s(),o.addListener?(o.addListener(s),()=>o.removeListener?o.removeListener(s):void 0):(o.addEventListener("change",s),()=>o.removeEventListener("change",s))},[e]),n},nn="600ms",r_={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:nn},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:nn},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:nn}},o_={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:nn},exit:{translateX:["0%","30%"],opacity:0,animationDuration:nn}},Yl={drawer:e=>e==="left"?r_:o_,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:nn,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:nn,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:nn,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:nn},enter:{opacity:1,scale:[1.05,1],animationDuration:nn},exit:{opacity:0,scale:.97,animationDuration:nn}}},s_=Gs("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),i_={top:0,left:0,right:0,bottom:-1},a_=e=>e*.62,l_=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,d=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+d))}const s=e.parent.current.getBoundingClientRect(),i=e.value.get()||s.height,a=Math.abs(i-r.delta.y),l=a_(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(Ct.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:i_,whileDrag:{cursor:"grabbing"},className:He("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},ql={drawer:"right",sheet:"none",dialog:"none"},c_=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...s})=>{const i=b.useId(),a=b.useId(),l=n_("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?s.position:ql[e]:r?ql[e]:ql.sheet,d=l||r?Yl[e]:Yl.sheet,h=typeof d=="function"?d(u):d,f=l||r?e:"sheet",{refs:p,context:m}=Go({open:s.open,onOpenChange:s.onChange}),v=Ya(m),g=qo(m),x=Uo(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=Yo([v,g,x]),S=s.trigger,E=bo(void 0),k=()=>s.onChange(!1);return w.jsxs(b.Fragment,{children:[s.trigger?w.jsx(b.Fragment,{children:s.asChild?w.jsx(Dd,{ref:p.setReference,...y({layoutId:s.layoutId}),children:S}):w.jsx(Ct.button,{ref:p.setReference,...y(),layoutId:s.layoutId,type:"button",children:S})}):null,w.jsx(Ho,{children:w.jsx(ei,{presenceAffectsLayout:!0,children:s.open?w.jsx(OA,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${f==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(ri,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(Ct.div,{animate:"enter","aria-describedby":a,"aria-labelledby":i,className:s_({position:u,type:f}),exit:"exit",layoutId:s.layoutId,initial:"initial",ref:p.setFloating,style:f==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[s.title?w.jsx("header",{className:"relative w-full",children:s.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:s.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:s.children}),s.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:s.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:k,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(xv,{})})}):null,c&&t?w.jsx(l_,{onChange:s.onChange,parent:p.floating,position:u,sheet:f==="sheet",value:E}):null]})})}):null})})]})},u_=e=>w.jsx(Ct.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),$b=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:s,...i})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:d,floatingStyles:h,context:f}=Go({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:Ua,middleware:[Ga(5),Ad({fallbackAxisSideDirection:"start"}),Od(),Sb({element:c,padding:5})]}),p=Ob(f,{move:!0,enabled:r,delay:{open:Lb}}),m=NA(f,{enabled:r}),v=Uo(f,{enabled:r}),g=qo(f,{role:"tooltip",enabled:r}),x=_A(f,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=Yo([p,m,v,g,x]);return w.jsxs(b.Fragment,{children:[w.jsx(u,{ref:d.setReference,...y(i),children:s}),w.jsx(Ho,{children:a&&w.jsxs(No,{...T(),ref:d.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(Pb,{ref:c,context:f,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class aa{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++)aa.getDescendantProperty(a[l],s,r);else s&&aa.getDescendantProperty(a,s,r)}else r.push(t);return r}}class ro{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=ro.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=aa.getDescendantProperty(o,this.keys[s]);let a=!1;for(let l=0;l<i.length;l++){const c=ro.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=ro.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 ro.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)}}const Bb=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:s})=>w.jsxs("div",{className:He("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[s,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx($b,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(bv,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?w.jsxs(b.Fragment,{children:[w.jsx(vv,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),w.jsx($P,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Ka=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:s,right:i,info:a,children:l,error:c,form:u,id:d,labelClassName:h="",name:f,title:p,placeholder:m,hideLeft:v,required:g})=>{const x=d??f,y=zt(),T=e??y.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!s,className:He("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!v&&!n?w.jsx(Bb,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?w.jsxs(b.Fragment,{children:[g?null:w.jsx("span",{className:"text-opacity-70",children:T}),n?w.jsx(b.Fragment,{children:n}):null]}):null}):null,w.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-error:border-danger ${h}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,i?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:i}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},Wb=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},s)=>{const i=r.Render??b.Fragment,a=r.label??r.value;return w.jsx("li",{...o,ref:s,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[w.jsx(i,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(LP,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),d_={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},f_={caseSensitive:!1,sort:!1},h_=[],p_=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:s,optionalText:i,container:a,hideLeft:l=!1,right:c,left:u,error:d,required:h=!1,...f},p)=>{const m=f.value??f.defaultValue??"",v=zt(),g=b.useRef(null),[x,y]=b.useState(!1),[T,S]=b.useState(""),[E,k]=b.useState(m),[P,I]=b.useState(m),[C,N]=b.useState(null),M=b.useRef(h_),F=t&&T!==""?[{value:T,label:T,"data-dynamic":"true"},...e]:e,R=new ro(F,["value","label"],f_).search(T),A=t?void 0:`^(${e.map(W=>`${Uc(W.value)}${W.label?"|"+Uc(W.label):""}`).join("|")})$`;b.useEffect(()=>{if(f.value){const W=e.find(ee=>ee.value===f.value);k((W==null?void 0:W.label)??f.value)}},[f.value]);const{x:D,y:L,strategy:H,refs:U,context:O}=Go({open:x,transform:!0,strategy:"absolute",onOpenChange:y,whileElementsMounted:Ua,middleware:[Ga(4),nA({elementContext:"reference",padding:10,apply(W){const B=W.elements.reference.parentElement,xe=B==null?void 0:B.getBoundingClientRect().width;Object.assign(W.elements.floating.style,{width:`${xe}px`,maxWidth:`${xe}px`,minWidth:"max-content",maxHeight:`${Math.min(480,W.availableHeight)}px`})}})]}),V=BA(O,d_),{getReferenceProps:Z,getFloatingProps:ne,getItemProps:J}=Yo([qo(O,{role:"listbox"}),Uo(O),Fb(O,{activeIndex:C,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:M,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:C,virtual:!0,onNavigate:W=>N(ee=>W??ee)})]);b.useEffect(()=>{const W=U.reference.current;if(W)return Oa(W)},[]);const Y=(W,ee)=>{var xe,Ue;k(W.value),(xe=U.reference.current)==null||xe.setAttribute("data-value",W.value),I(W.label??"");const B=Tc(g.current,W.value);B&&((Ue=f.onChange)==null||Ue.call(f,B)),y(!1),S(""),N(ee)},j=W=>{var B;const ee=W.target.value;return S(ee),!x&&ee===""?y(!0):(W.target.name=f.name||"",ee?y(!0):(B=f.onChange)==null?void 0:B.call(f,W))},$=()=>{y(!0),S("")},z=()=>{var W;S(""),k(""),(W=U.reference.current)==null||W.setAttribute("data-value",""),I(""),Tc(U.reference.current),y(!1)},G=f.id||f.name;return w.jsxs(Ka,{...f,container:a,error:d,feedback:n,form:f.form,hideLeft:l,id:f.name||f.id,interactive:o,labelClassName:r,left:u,name:f.name,optionalText:i,placeholder:f.placeholder,required:h,rightLabel:s,title:f.title,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(yv,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]}),E?w.jsx("button",{type:"button",onClick:z,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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:[w.jsx("input",{...Z({...f,onChange:j,onFocus:$,pattern:A,ref:U.setReference,name:`${G}-shadow`,id:`${G}-shadow`,onClick:W=>W.currentTarget.focus(),onKeyDown(W){if(W.key==="Escape")return W.currentTarget.blur(),y(!1);if(W.key==="Enter"){if(C!==null&&R[C])return W.preventDefault(),Y(R[C],C);if(R.length===1)return W.preventDefault(),Y(R[0],0)}}}),"data-value":E,"data-error":!!d,"data-name":G,"data-target":G,required:h,value:x?T:P||E,"aria-autocomplete":"list",autoComplete:"off",className:He("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",f.className)}),w.jsx("input",{id:G,name:G,type:"hidden","data-origin":G,ref:p,required:h,defaultValue:f.value||E||void 0}),w.jsx(Ho,{preserveTabOrder:!0,children:x?w.jsx(ri,{guards:!0,returnFocus:!1,context:O,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...ne({ref:U.setFloating,style:{position:H,left:(D??0)+16,top:L??0,...V.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:R.map((W,ee)=>b.createElement(Wb,{...J({onClick:()=>Y(W,ee),ref:B=>void(M.current[ee]=B),selected:C===ee,active:E===W.value}),key:`${W.value}-option`,option:W,selected:C===ee,active:E===W.value}))})}):null})]})}),zb=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:s,container:i,...a},l)=>w.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:He("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",i),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:He("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:He("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),oi=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:s,rightLabel:i,optionalText:a,container:l,hideLeft:c=!1,right:u,left:d,error:h,...f},p)=>{const m=f.id??f.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const g=v.current,x=Oa(v.current),y=T=>{const S=T;if(S.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const k=document.getElementById(E);if(k)return k.focus(),void S.preventDefault()}}};return g.addEventListener("keydown",y),()=>{x(),g.removeEventListener("keydown",y)}},[]),w.jsx(Ka,{info:n,container:l,error:h,feedback:t,hideLeft:c,left:d,optionalText:a,right:u,rightLabel:i,interactive:s,form:f.form,id:f.name||f.id,name:f.name,labelClassName:r,title:f.title,placeholder:f.placeholder,required:f.required,children:w.jsx(Hv,{...f,type:e,"data-next":o,ref:Du(p,v),id:m,name:m,className:He("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",f.className)})})}),Jp=new Date(1970,11,31),Kl={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},em={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},m_={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")},Zl=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},g_=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...s},i)=>{const a=b.useId(),l=zt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,d]=b.useState(e||void 0),[h,f]=b.useState(!1),p=Zl(c,Jp).flatMap(E=>bn.keyof(Kl,E.type)?Kl[E.type](E.value):[]),m=Zl(c,Jp).reduce((E,k)=>E+(bn.keyof(em,k.type)?em[k.type](k.value):""),""),[v,g]=b.useState(u?Zl(c,u).reduce((E,k)=>E+(bn.keyof(Kl,k.type)?m_[k.type](u,k.value):""),""):""),x=E=>{const k=E.target.value;if(g(k),p.length===k.length&&p.every((I,C)=>{const N=k.charAt(C);return typeof I=="string"?N===I:I.test(N)})){const I=So(Jk(k,m,new Date));return d(I),r==null?void 0:r(I)}return d(void 0),r==null?void 0:r(void 0)},y=E=>(d(E),r==null||r(E),g(E?ek(E,m):"")),T=Pv(u),S=T?u.toISOString():void 0;return w.jsx(oi,{...s,mask:p,value:v,"data-value":S,"data-target":s.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:x,required:s.required??!0,error:h?void 0:s.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":s.name,defaultValue:S,form:s.form,hidden:!0,id:s.name,name:s.name,ref:i,type:"date"}),w.jsx(Ko,{open:h,onChange:f,trigger:w.jsxs("span",{"aria-labelledby":a,children:[w.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),w.jsx(FP,{})]}),buttonProps:{"aria-describedby":a},children:w.jsx(eb,{...s,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:y,disabledDate:n,date:T?u:void 0})})]})})}),y_=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],v_=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],b_=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],x_=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],tm=(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 nm(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?x_:b_:t.binary?v_:y_,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=tm(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=tm(Number(e),t.locale,i),c=n[a];return s+l+r+c}var tu={exports:{}},Si={exports:{}},je={};/** @license React v16.13.1
177
+ */var GI=["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])"],xs=GI.join(","),ev=typeof Element>"u",Xr=ev?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ws=!ev&&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},Ss=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},UI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},YI=function(t,n,r){if(Ss(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(xs));return n&&Xr.call(t,xs)&&o.unshift(t),o=o.filter(r),o},qI=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ss(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Xr.call(s,xs);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!Ss(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&h){var d=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},tv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},nv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||UI(t))&&!tv(t)?0:t.tabIndex},KI=function(t,n){var r=nv(t);return r<0&&n&&!tv(t)?0:r},XI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},rv=function(t){return t.tagName==="INPUT"},QI=function(t){return rv(t)&&t.type==="hidden"},ZI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},JI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},eA=function(t){if(!t.name)return!0;var n=t.form||ws(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(s){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",s.message),!1}var i=JI(o,t.form);return!i||i===t},tA=function(t){return rv(t)&&t.type==="radio"},nA=function(t){return tA(t)&&!eA(t)},rA=function(t){var n,r=t&&ws(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=ws(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},mh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},oA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Xr.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Xr.call(s,"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=ws(t);if(l&&!l.shadowRoot&&o(l)===!0)return mh(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(rA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return mh(t);return!1},iA=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 Xr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},sA=function(t,n){return!(n.disabled||Ss(n)||QI(n)||oA(n,t)||ZI(n)||iA(n))},Zl=function(t,n){return!(nA(n)||nv(n)<0||!sA(t,n))},aA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},lA=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=KI(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(XI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},ti=function(t,n){n=n||{};var r;return n.getShadowRoot?r=qI([t],n.includeContainer,{filter:Zl.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:aA}):r=YI(t,n.includeContainer,Zl.bind(null,n)),lA(r)},cA=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Xr.call(t,xs)===!1?!1:Zl(n,t)};function gh(e,t,n){let{reference:r,floating:o}=e;const i=fr(t),s=bu(t),a=vu(s),l=Nn(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(fo(t)){case"start":d[s]-=h*(n&&c?-1:1);break;case"end":d[s]+=h*(n&&c?-1:1);break}return d}const uA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=gh(c,r,l),h=r,d={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:g}=a[m],{x,y,data:T,reset:S}=await g({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:s,elements:{reference:e,floating:t}});u=x??u,f=y??f,d={...d,[v]:{...d[v],...T}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:u,y:f}=gh(c,h,l)),m=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function xu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=uo(t,e),p=Jy(d),v=a[h?f==="floating"?"reference":"floating":f],g=bs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},S=bs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:y,strategy:l}):x);return{top:(g.top-S.top+p.top)/T.y,bottom:(S.bottom-g.bottom+p.bottom)/T.y,left:(g.left-S.left+p.left)/T.x,right:(S.right-g.right+p.right)/T.x}}const fA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=uo(e,t)||{};if(c==null)return{};const f=Jy(u),h={x:n,y:r},d=bu(o),p=vu(d),m=await s.getDimensions(c),v=d==="y",g=v?"top":"left",x=v?"bottom":"right",y=v?"clientHeight":"clientWidth",T=i.reference[p]+i.reference[d]-h[d]-i.floating[p],S=h[d]-i.reference[d],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let I=E?E[y]:0;(!I||!await(s.isElement==null?void 0:s.isElement(E)))&&(I=a.floating[y]||i.floating[p]);const P=T/2-S/2,A=I/2-m[p]/2-1,C=nn(f[g],A),L=nn(f[x],A),M=C,N=I-m[p]-L,R=I/2-m[p]/2+P,k=Xl(M,R,N),F=!l.arrow&&fo(o)!=null&&R!==k&&i.reference[p]/2-(R<M?C:L)-m[p]/2<0,_=F?R<M?R-M:R-N:0;return{[d]:h[d]+_,data:{[d]:k,centerOffset:R-k-_,...F&&{alignmentOffset:_}},reset:F}}}),dA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=uo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=Nn(o),x=fr(a),y=Nn(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(y||!m?[vs(a)]:BI(a)),E=p!=="none";!h&&E&&S.push(...WI(a,m,p,T));const I=[a,...S],P=await xu(t,v),A=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(P[g]),f){const R=$I(o,s,T);A.push(P[R[0]],P[R[1]])}if(C=[...C,{placement:o,overflows:A}],!A.every(R=>R<=0)){var L,M;const R=(((L=i.flip)==null?void 0:L.index)||0)+1,k=I[R];if(k)return{data:{index:R,overflows:C},reset:{placement:k}};let F=(M=C.filter(_=>_.overflows[0]<=0).sort((_,z)=>_.overflows[1]-z.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(d){case"bestFit":{var N;const _=(N=C.filter(z=>{if(E){const G=fr(z.placement);return G===x||G==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(G=>G>0).reduce((G,O)=>G+O,0)]).sort((z,G)=>z[1]-G[1])[0])==null?void 0:N[0];_&&(F=_);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};async function hA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Nn(n),a=fo(n),l=fr(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,f=uo(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(d=a==="end"?p*-1:p),l?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const pA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await hA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},mA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=uo(e,t),c={x:n,y:r},u=await xu(t,l),f=fr(Nn(o)),h=Zy(f);let d=c[h],p=c[f];if(i){const v=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=d+u[v],y=d-u[g];d=Xl(x,d,y)}if(s){const v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",x=p+u[v],y=p-u[g];p=Xl(x,p,y)}const m=a.fn({...t,[h]:d,[f]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},gA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=uo(e,t),l=await xu(t,a),c=Nn(n),u=fo(n),f=fr(n)==="y",{width:h,height:d}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=d-l.top-l.bottom,g=h-l.left-l.right,x=nn(d-l[p],v),y=nn(h-l[m],g),T=!t.middlewareData.shift;let S=x,E=y;if(f?E=u||T?nn(y,g):g:S=u||T?nn(x,v):v,T&&!u){const P=Dt(l.left,0),A=Dt(l.right,0),C=Dt(l.top,0),L=Dt(l.bottom,0);f?E=h-2*(P!==0||A!==0?P+A:Dt(l.left,l.right)):S=d-2*(C!==0||L!==0?C+L:Dt(l.top,l.bottom))}await s({...t,availableWidth:E,availableHeight:S});const I=await o.getDimensions(i.floating);return h!==I.width||d!==I.height?{reset:{rects:!0}}:{}}}};function ov(e){const t=_t(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ys(n)!==i||ys(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function wu(e){return ke(e)?e:e.contextElement}function Mr(e){const t=wu(e);if(!et(t))return Ln(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ov(t);let s=(i?ys(n.width):n.width)/r,a=(i?ys(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const yA=Ln(0);function iv(e){const t=Pt(e);return!hu()||!t.visualViewport?yA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function dr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=wu(e);let s=Ln(1);t&&(r?ke(r)&&(s=Mr(r)):s=Mr(e));const a=vA(i,n,r)?iv(i):Ln(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Pt(i),d=r&&ke(r)?Pt(r):r;let p=h,m=ql(p);for(;m&&r&&d!==p;){const v=Mr(m),g=m.getBoundingClientRect(),x=_t(m),y=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*v.x,T=g.top+(m.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=y,c+=T,p=Pt(m),m=ql(p)}}return bs({width:u,height:f,x:l,y:c})}function bA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=xn(r),a=t?Ys(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ln(1);const u=Ln(0),f=et(r);if((f||!f&&!i)&&((Hn(r)!=="body"||bi(s))&&(l=qs(r)),et(r))){const h=dr(r);c=Mr(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function xA(e){return Array.from(e.getClientRects())}function sv(e){return dr(xn(e)).left+qs(e).scrollLeft}function wA(e){const t=xn(e),n=qs(e),r=e.ownerDocument.body,o=Dt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Dt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+sv(e);const a=-n.scrollTop;return _t(r).direction==="rtl"&&(s+=Dt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function SA(e,t){const n=Pt(e),r=xn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=hu();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function TA(e,t){const n=dr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=et(e)?Mr(e):Ln(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function yh(e,t,n){let r;if(t==="viewport")r=SA(e,n);else if(t==="document")r=wA(xn(e));else if(ke(t))r=TA(t,n);else{const o=iv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return bs(r)}function av(e,t){const n=bn(e);return n===t||!ke(n)||jn(n)?!1:_t(n).position==="fixed"||av(n,t)}function EA(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(a=>ke(a)&&Hn(a)!=="body"),o=null;const i=_t(e).position==="fixed";let s=i?bn(e):e;for(;ke(s)&&!jn(s);){const a=_t(s),l=du(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bi(s)&&!l&&av(e,s))?r=r.filter(u=>u!==s):o=a,s=bn(s)}return t.set(e,r),r}function CA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ys(t)?[]:EA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const f=yh(t,u,o);return c.top=Dt(f.top,c.top),c.right=nn(f.right,c.right),c.bottom=nn(f.bottom,c.bottom),c.left=Dt(f.left,c.left),c},yh(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PA(e){const{width:t,height:n}=ov(e);return{width:t,height:n}}function RA(e,t,n){const r=et(t),o=xn(t),i=n==="fixed",s=dr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ln(0);if(r||!r&&!i)if((Hn(t)!=="body"||bi(o))&&(a=qs(t)),r){const f=dr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=sv(o));const c=s.left+a.scrollLeft-l.x,u=s.top+a.scrollTop-l.y;return{x:c,y:u,width:s.width,height:s.height}}function Ha(e){return _t(e).position==="static"}function vh(e,t){return!et(e)||_t(e).position==="fixed"?null:t?t(e):e.offsetParent}function lv(e,t){const n=Pt(e);if(Ys(e))return n;if(!et(e)){let o=bn(e);for(;o&&!jn(o);){if(ke(o)&&!Ha(o))return o;o=bn(o)}return n}let r=vh(e,t);for(;r&&DI(r)&&Ha(r);)r=vh(r,t);return r&&jn(r)&&Ha(r)&&!du(r)?n:r||MI(e)||n}const IA=async function(e){const t=this.getOffsetParent||lv,n=this.getDimensions,r=await n(e.floating);return{reference:RA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AA(e){return _t(e).direction==="rtl"}const OA={convertOffsetParentRelativeRectToViewportRelativeRect:bA,getDocumentElement:xn,getClippingRect:CA,getOffsetParent:lv,getElementRects:IA,getClientRects:xA,getDimensions:PA,getScale:Mr,isElement:ke,isRTL:AA};function kA(e,t){let n=null,r;const o=xn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const d=Or(u),p=Or(o.clientWidth-(c+f)),m=Or(o.clientHeight-(u+h)),v=Or(c),x={rootMargin:-d+"px "+-p+"px "+-m+"px "+-v+"px",threshold:Dt(0,nn(1,l))||1};let y=!0;function T(S){const E=S[0].intersectionRatio;if(E!==l){if(!y)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{n=new IntersectionObserver(T,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,x)}n.observe(e)}return s(!0),i}function Ks(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=wu(e),u=o||i?[...c?kn(c):[],...kn(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const f=c&&a?kA(c,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let p,m=l?dr(e):null;l&&v();function v(){const g=dr(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,p=requestAnimationFrame(v)}return n(),()=>{var g;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f==null||f(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const DA=pA,MA=mA,FA=dA,jA=gA,bh=fA,LA=(e,t,n)=>{const r=new Map,o={platform:OA,...n},i={...o.platform,_c:r};return uA(e,t,{...o,platform:i})};var Xi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Ts(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(!Ts(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ts(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function cv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xh(e,t){const n=cv(e);return Math.round(t*n)/n}function wh(e){const t=D.useRef(e);return Xi(()=>{t.current=e}),t}function NA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=D.useState(r);Ts(h,r)||d(r);const[p,m]=D.useState(null),[v,g]=D.useState(null),x=D.useCallback(_=>{_!==E.current&&(E.current=_,m(_))},[]),y=D.useCallback(_=>{_!==I.current&&(I.current=_,g(_))},[]),T=i||p,S=s||v,E=D.useRef(null),I=D.useRef(null),P=D.useRef(u),A=l!=null,C=wh(l),L=wh(o),M=D.useCallback(()=>{if(!E.current||!I.current)return;const _={placement:t,strategy:n,middleware:h};L.current&&(_.platform=L.current),LA(E.current,I.current,_).then(z=>{const G={...z,isPositioned:!0};N.current&&!Ts(P.current,G)&&(P.current=G,Yp.flushSync(()=>{f(G)}))})},[h,t,n,L]);Xi(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[c]);const N=D.useRef(!1);Xi(()=>(N.current=!0,()=>{N.current=!1}),[]),Xi(()=>{if(T&&(E.current=T),S&&(I.current=S),T&&S){if(C.current)return C.current(T,S,M);M()}},[T,S,M,C,A]);const R=D.useMemo(()=>({reference:E,floating:I,setReference:x,setFloating:y}),[x,y]),k=D.useMemo(()=>({reference:T,floating:S}),[T,S]),F=D.useMemo(()=>{const _={position:n,left:0,top:0};if(!k.floating)return _;const z=xh(k.floating,u.x),G=xh(k.floating,u.y);return a?{..._,transform:"translate("+z+"px, "+G+"px)",...cv(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:G}},[n,a,k.floating,u.x,u.y]);return D.useMemo(()=>({...u,update:M,refs:R,elements:k,floatingStyles:F}),[u,M,R,k,F])}const _A=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?bh({element:r.current,padding:o}).fn(n):{}:r?bh({element:r,padding:o}).fn(n):{}}}},Xs=(e,t)=>({...DA(e),options:[e,t]}),Su=(e,t)=>({...MA(e),options:[e,t]}),Tu=(e,t)=>({...FA(e),options:[e,t]}),VA=(e,t)=>({...jA(e),options:[e,t]}),uv=(e,t)=>({..._A(e),options:[e,t]});function Jl(e){return D.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const fv={...D},$A=fv.useInsertionEffect,BA=$A||(e=>e());function at(e){const t=D.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return BA(()=>{t.current=e}),D.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 Eu="ArrowUp",xi="ArrowDown",Qr="ArrowLeft",ho="ArrowRight";function Ni(e,t,n){return Math.floor(e/t)!==n}function zo(e,t){return t<0||t>=e.current.length}function Wa(e,t){return xt(e,{disabledIndices:t})}function Sh(e,t){return xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const s=e.current;let a=n;do a+=r?-i:i;while(a>=0&&a<=s.length-1&&Qi(s,a,o));return a}function HA(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:s,minIndex:a,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===Eu){if(u&&pt(n),c===-1)f=l;else if(f=xt(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(c-i<a||f<0)){const h=c%i,d=l%i,p=l-(d-h);d===h?f=l:f=d>h?p:p-i}zo(e,f)&&(f=c)}if(n.key===xi&&(u&&pt(n),c===-1?f=a:(f=xt(e,{startingIndex:c,amount:i,disabledIndices:s}),o&&c+i>l&&(f=xt(e,{startingIndex:c%i-i,amount:i,disabledIndices:s}))),zo(e,f)&&(f=c)),r==="both"){const h=Or(c/i);n.key===ho&&(u&&pt(n),c%i!==i-1?(f=xt(e,{startingIndex:c,disabledIndices:s}),o&&Ni(f,i,h)&&(f=xt(e,{startingIndex:c-c%i-1,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:c-c%i-1,disabledIndices:s})),Ni(f,i,h)&&(f=c)),n.key===Qr&&(u&&pt(n),c%i!==0?(f=xt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),o&&Ni(f,i,h)&&(f=xt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s}))):o&&(f=xt(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:s})),Ni(f,i,h)&&(f=c));const d=Or(l/i)===h;zo(e,f)&&(o&&d?f=n.key===Qr?l:xt(e,{startingIndex:c-c%i-1,disabledIndices:s}):f=c)}return f}function WA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let f=0;f<a;f++)for(let h=0;h<l;h++)u.push(o+f+h*t);o%t+a<=t&&u.every(f=>r[f]==null)?(u.forEach(f=>{r[f]=s}),c=!0):o++}}),[...r]}function zA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function GA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Qi(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 Th=0;function Rn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Th);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Th=requestAnimationFrame(i)}var be=typeof document<"u"?b.useLayoutEffect:b.useEffect;function UA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function YA(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const dv=D.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function qA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=D.useState(()=>new Map),s=D.useCallback(l=>{i(c=>new Map(c).set(l,null))},[]),a=D.useCallback(l=>{i(c=>{const u=new Map(c);return u.delete(l),u})},[]);return be(()=>{const l=new Map(o);Array.from(l.keys()).sort(UA).forEach((u,f)=>{l.set(u,f)}),YA(o,l)||i(l)},[o]),D.createElement(dv.Provider,{value:D.useMemo(()=>({register:s,unregister:a,map:o,elementsRef:n,labelsRef:r}),[s,a,o,n,r])},t)}function hv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=D.useContext(dv),[a,l]=D.useState(null),c=D.useRef(null),u=D.useCallback(f=>{if(c.current=f,a!==null&&(i.current[a]=f,s)){var h;const d=t!==void 0;s.current[a]=d?t:(h=f==null?void 0:f.textContent)!=null?h:null}},[a,i,s,t]);return be(()=>{const f=c.current;if(f)return n(f),()=>{r(f)}},[n,r]),be(()=>{const f=c.current?o.get(c.current):null;f!=null&&l(f)},[o]),D.useMemo(()=>({ref:u,index:a??-1}),[a,u])}function Zr(){return Zr=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},Zr.apply(this,arguments)}let Eh=!1,KA=0;const Ch=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+KA++;function XA(){const[e,t]=D.useState(()=>Eh?Ch():void 0);return be(()=>{e==null&&t(Ch())},[]),D.useEffect(()=>{Eh=!0},[]),e}const QA=fv.useId,po=QA||XA;let ni;process.env.NODE_ENV!=="production"&&(ni=new Set);function Zi(){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=ni)!=null&&e.has(o))){var i;(i=ni)==null||i.add(o),console.warn(o)}}function ZA(){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=ni)!=null&&e.has(o))){var i;(i=ni)==null||i.add(o),console.error(o)}}const pv=D.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i}},width:s=14,height:a=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:h,style:{transform:d,...p}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Zi("The `ref` prop is required for `FloatingArrow`."));const v=po(),[g,x]=D.useState(!1);if(be(()=>{if(!o)return;_t(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const y=c*2,T=y/2,S=s/2*(l/-8+1),E=a/2*l/4,[I,P]=r.split("-"),A=!!h,C=I==="top"||I==="bottom",L=u&&P==="end"?"bottom":"top";let M=u&&P==="end"?"right":"left";u&&g&&(M=P==="end"?"left":"right");const N=(i==null?void 0:i.x)!=null?u||i.x:"",R=(i==null?void 0:i.y)!=null?u||i.y:"",k=h||"M0,0"+(" H"+s)+(" L"+(s-S)+","+(a-E))+(" Q"+s/2+","+a+" "+S+","+(a-E))+" Z",F={top:A?"rotate(180deg)":"",left:A?"rotate(90deg)":"rotate(-90deg)",bottom:A?"":"rotate(180deg)",right:A?"rotate(-90deg)":"rotate(90deg)"}[I];return D.createElement("svg",Zr({},m,{"aria-hidden":!0,ref:n,width:A?s:s+y,height:s,viewBox:"0 0 "+s+" "+(a>s?a:s),style:{position:"absolute",pointerEvents:"none",[M]:N,[L]:R,[I]:C||A?"100%":"calc(100% - "+y/2+"px)",transform:""+F+(d??""),...p}}),y>0&&D.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:y+(h?0:1),d:k}),D.createElement("path",{stroke:y&&!h?m.fill:"none",d:k}),D.createElement("clipPath",{id:v},D.createElement("rect",{x:-T,y:T*(A?-1:1),width:s+y,height:s})))});function mv(){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 gv=D.createContext(null),yv=D.createContext(null),Wn=()=>{var e;return((e=D.useContext(gv))==null?void 0:e.id)||null},zn=()=>D.useContext(yv);function JA(e){const t=po(),n=zn(),o=Wn();return be(()=>{const i={id:t,parentId:o};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,o]),t}function eO(e){const{children:t,id:n}=e,r=Wn();return D.createElement(gv.Provider,{value:D.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function tO(e){const{children:t}=e,n=D.useRef([]),r=D.useCallback(s=>{n.current=[...n.current,s]},[]),o=D.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),i=D.useState(()=>mv())[0];return D.createElement(yv.Provider,{value:D.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i])},t)}function _n(e){return"data-floating-ui-"+e}function gt(e){const t=b.useRef(e);return be(()=>{t.current=e}),t}const Ph=_n("safe-polygon");function za(e,t,n){return n&&!Kr(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function vv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=zn(),p=Wn(),m=gt(c),v=gt(l),g=gt(n),x=D.useRef(),y=D.useRef(-1),T=D.useRef(),S=D.useRef(-1),E=D.useRef(!0),I=D.useRef(!1),P=D.useRef(()=>{}),A=D.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]);D.useEffect(()=>{if(!a)return;function k(F){let{open:_}=F;_||(clearTimeout(y.current),clearTimeout(S.current),E.current=!0)}return i.on("openchange",k),()=>{i.off("openchange",k)}},[a,i]),D.useEffect(()=>{if(!a||!m.current||!n)return;function k(_){A()&&r(!1,_,"hover")}const F=ut(s.floating).documentElement;return F.addEventListener("mouseleave",k),()=>{F.removeEventListener("mouseleave",k)}},[s.floating,n,r,a,m,A]);const C=D.useCallback(function(k,F,_){F===void 0&&(F=!0),_===void 0&&(_="hover");const z=za(v.current,"close",x.current);z&&!T.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>r(!1,k,_),z)):F&&(clearTimeout(y.current),r(!1,k,_))},[v,r]),L=at(()=>{P.current(),T.current=void 0}),M=at(()=>{if(I.current){const k=ut(s.floating).body;k.style.pointerEvents="",k.removeAttribute(Ph),I.current=!1}});D.useEffect(()=>{if(!a)return;function k(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function F(O){if(clearTimeout(y.current),E.current=!1,u&&!Kr(x.current)||f>0&&!za(v.current,"open"))return;const $=za(v.current,"open",x.current);$?y.current=window.setTimeout(()=>{g.current||r(!0,O,"hover")},$):r(!0,O,"hover")}function _(O){if(k())return;P.current();const $=ut(s.floating);if(clearTimeout(S.current),m.current&&o.current.floatingContext){n||clearTimeout(y.current),T.current=m.current({...o.current.floatingContext,tree:d,x:O.clientX,y:O.clientY,onClose(){M(),L(),C(O,!0,"safe-polygon")}});const ee=T.current;$.addEventListener("mousemove",ee),P.current=()=>{$.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Ye(s.floating,O.relatedTarget):!0)&&C(O)}function z(O){k()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:O.clientX,y:O.clientY,onClose(){M(),L(),C(O)}})(O))}if(ke(s.domReference)){var G;const O=s.domReference;return n&&O.addEventListener("mouseleave",z),(G=s.floating)==null||G.addEventListener("mouseleave",z),h&&O.addEventListener("mousemove",F,{once:!0}),O.addEventListener("mouseenter",F),O.addEventListener("mouseleave",_),()=>{var $;n&&O.removeEventListener("mouseleave",z),($=s.floating)==null||$.removeEventListener("mouseleave",z),h&&O.removeEventListener("mousemove",F),O.removeEventListener("mouseenter",F),O.removeEventListener("mouseleave",_)}}},[s,a,e,u,f,h,C,L,M,r,n,g,d,v,m,o]),be(()=>{var k;if(a&&n&&(k=m.current)!=null&&k.__options.blockPointerEvents&&A()){const _=ut(s.floating).body;_.setAttribute(Ph,""),_.style.pointerEvents="none",I.current=!0;const z=s.floating;if(ke(s.domReference)&&z){var F;const G=s.domReference,O=d==null||(F=d.nodesRef.current.find($=>$.id===p))==null||(F=F.context)==null?void 0:F.elements.floating;return O&&(O.style.pointerEvents=""),G.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{G.style.pointerEvents="",z.style.pointerEvents=""}}}},[a,n,p,s,d,m,A]),be(()=>{n||(x.current=void 0,L(),M())},[n,L,M]),D.useEffect(()=>()=>{L(),clearTimeout(y.current),clearTimeout(S.current),M()},[a,s.domReference,L,M]);const N=D.useMemo(()=>{function k(F){x.current=F.pointerType}return{onPointerDown:k,onPointerEnter:k,onMouseMove(F){const{nativeEvent:_}=F;function z(){!E.current&&!g.current&&r(!0,_,"hover")}u&&!Kr(x.current)||n||f===0||(clearTimeout(S.current),x.current==="touch"?z():S.current=window.setTimeout(z,f))}}},[u,r,n,g,f]),R=D.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(k){C(k.nativeEvent,!1)}}),[C]);return D.useMemo(()=>a?{reference:N,floating:R}:{},[a,N,R])}function nO(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function ur(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function rO(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),ur(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}let Tr=new WeakMap,_i=new WeakSet,Vi={},Ga=0;const oO=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,bv=e=>e&&(e.host||bv(e.parentNode)),iO=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=bv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function sO(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=iO(t,e),a=new Set,l=new Set(s),c=[];Vi[o]||(Vi[o]=new WeakMap);const u=Vi[o];s.forEach(f),h(t),a.clear();function f(d){!d||a.has(d)||(a.add(d),d.parentNode&&f(d.parentNode))}function h(d){!d||l.has(d)||[].forEach.call(d.children,p=>{if(Hn(p)!=="script")if(a.has(p))h(p);else{const m=i?p.getAttribute(i):null,v=m!==null&&m!=="false",g=(Tr.get(p)||0)+1,x=(u.get(p)||0)+1;Tr.set(p,g),u.set(p,x),c.push(p),g===1&&v&&_i.add(p),x===1&&p.setAttribute(o,""),!v&&i&&p.setAttribute(i,"true")}})}return Ga++,()=>{c.forEach(d=>{const p=(Tr.get(d)||0)-1,m=(u.get(d)||0)-1;Tr.set(d,p),u.set(d,m),p||(!_i.has(d)&&i&&d.removeAttribute(i),_i.delete(d)),m||d.removeAttribute(o)}),Ga--,Ga||(Tr=new WeakMap,Tr=new WeakMap,_i=new WeakSet,Vi={})}}function Rh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=ut(e[0]).body;return sO(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Jr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function xv(e,t){const n=ti(e,Jr());t==="prev"&&n.reverse();const r=n.indexOf(Ht(ut(e)));return n.slice(r+1)[0]}function wv(){return xv(document.body,"next")}function Sv(){return xv(document.body,"prev")}function Go(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function aO(e){ti(e,Jr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function lO(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 cO(e,t,n){const r=e.indexOf(t);function o(s){const a=_n("focus-guard");let l=r+(s?1:0),c=e[l];for(;c&&(!c.isConnected||c.hasAttribute(a)||Ye(n,c));)s?l++:l--,c=e[l];return c}const i=o(!0);return i||o(!1)}const Cu={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 uO;function Ih(e){e.key==="Tab"&&(e.target,clearTimeout(uO))}const Es=D.forwardRef(function(t,n){const[r,o]=D.useState();be(()=>(gu()&&o("button"),document.addEventListener("keydown",Ih),()=>{document.removeEventListener("keydown",Ih)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[_n("focus-guard")]:"",style:Cu};return D.createElement("span",Zr({},t,i))}),Tv=D.createContext(null),Ah=_n("portal");function fO(e){e===void 0&&(e={});const{id:t,root:n}=e,r=po(),o=Ev(),[i,s]=D.useState(null),a=D.useRef(null);return be(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),be(()=>{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(Ah,""),l.appendChild(c),a.current=c,s(c)},[t,r]),be(()=>{if(!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!ke(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(Ah,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function mo(e){const{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e,i=fO({id:n,root:r}),[s,a]=D.useState(null),l=D.useRef(null),c=D.useRef(null),u=D.useRef(null),f=D.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!!(r||i);return D.useEffect(()=>{if(!i||!o||s!=null&&s.modal)return;function d(p){i&&Go(p)&&(p.type==="focusin"?lO:aO)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,s==null?void 0:s.modal]),D.createElement(Tv.Provider,{value:D.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i])},h&&i&&D.createElement(Es,{"data-type":"outside",ref:l,onFocus:d=>{if(Go(d,i)){var p;(p=u.current)==null||p.focus()}else{const m=Sv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus()}}}),h&&i&&D.createElement("span",{"aria-owns":i.id,style:Cu}),i&&Yp.createPortal(t,i),h&&i&&D.createElement(Es,{"data-type":"outside",ref:c,onFocus:d=>{if(Go(d,i)){var p;(p=f.current)==null||p.focus()}else{const m=wv()||(s==null?void 0:s.refs.domReference.current);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,d.nativeEvent))}}}))}const Ev=()=>D.useContext(Tv),Oh=20;let tr=[];function Ua(e){tr=tr.filter(n=>n.isConnected);let t=e;if(!(!t||Hn(t)==="body")){if(!cA(t,Jr())){const n=ti(t,Jr())[0];n&&(t=n)}tr.push(t),tr.length>Oh&&(tr=tr.slice(-Oh))}}function kh(){return tr.slice().reverse().find(e=>e.isConnected)}const dO=D.forwardRef(function(t,n){return D.createElement("button",Zr({},t,{type:"button",ref:n,tabIndex:-1,style:Cu}))});function wi(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:h,refs:d,nodeId:p,onOpenChange:m,events:v,dataRef:g,floatingId:x,elements:{domReference:y,floating:T}}=t,S=typeof s=="number"&&s<0,E=Qy(y)&&S,I=oO()?i:!0,P=gt(o),A=gt(s),C=gt(a),L=zn(),M=Ev(),N=D.useRef(null),R=D.useRef(null),k=D.useRef(!1),F=D.useRef(!1),_=D.useRef(-1),z=M!=null,G=T==null?void 0:T.firstElementChild,O=(G==null?void 0:G.id)===x?G:T,$=at(function(U){return U===void 0&&(U=O),U?ti(U,Jr()):[]}),K=at(U=>{const j=$(U);return P.current.map(B=>y&&B==="reference"?y:O&&B==="floating"?O:j).filter(Boolean).flat()});D.useEffect(()=>{if(r||!c)return;function U(B){if(B.key==="Tab"){Ye(O,Ht(ut(O)))&&$().length===0&&!E&&pt(B);const W=K(),V=tn(B);P.current[0]==="reference"&&V===y&&(pt(B),B.shiftKey?Rn(W[W.length-1]):Rn(W[1])),P.current[1]==="floating"&&V===O&&B.shiftKey&&(pt(B),Rn(W[0]))}}const j=ut(O);return j.addEventListener("keydown",U),()=>{j.removeEventListener("keydown",U)}},[r,y,O,c,P,E,$,K]),D.useEffect(()=>{if(r||!T)return;function U(j){const B=tn(j),V=$().indexOf(B);V!==-1&&(_.current=V)}return T.addEventListener("focusin",U),()=>{T.removeEventListener("focusin",U)}},[r,T,$]),D.useEffect(()=>{if(r||!f)return;function U(){F.current=!0,setTimeout(()=>{F.current=!1})}function j(B){const W=B.relatedTarget;queueMicrotask(()=>{const V=!(Ye(y,W)||Ye(T,W)||Ye(W,T)||Ye(M==null?void 0:M.portalNode,W)||W!=null&&W.hasAttribute(_n("focus-guard"))||L&&(ur(L.nodesRef.current,p).find(Y=>{var J,H;return Ye((J=Y.context)==null?void 0:J.elements.floating,W)||Ye((H=Y.context)==null?void 0:H.elements.domReference,W)})||nO(L.nodesRef.current,p).find(Y=>{var J,H;return((J=Y.context)==null?void 0:J.elements.floating)===W||((H=Y.context)==null?void 0:H.elements.domReference)===W})));if(l&&V&&Ht(ut(O))===ut(O).body){et(O)&&(O==null||O.focus());const Y=_.current,J=$(),H=J[Y]||J[J.length-1]||O;et(H)&&H.focus()}(E||!c)&&W&&V&&!F.current&&W!==kh()&&(k.current=!0,m(!1,B))})}if(T&&et(y))return y.addEventListener("focusout",j),y.addEventListener("pointerdown",U),T.addEventListener("focusout",j),()=>{y.removeEventListener("focusout",j),y.removeEventListener("pointerdown",U),T.removeEventListener("focusout",j)}},[r,y,T,O,c,p,L,M,m,f,l,$,E]),D.useEffect(()=>{var U;if(r)return;const j=Array.from((M==null||(U=M.portalNode)==null?void 0:U.querySelectorAll("["+_n("portal")+"]"))||[]);if(T){const B=[T,...j,N.current,R.current,P.current.includes("reference")||E?y:null].filter(V=>V!=null),W=c||E?Rh(B,I,!I):Rh(B);return()=>{W()}}},[r,y,T,c,P,M,E,I]),be(()=>{if(r||!et(O))return;const U=ut(O),j=Ht(U);queueMicrotask(()=>{const B=K(O),W=A.current,V=(typeof W=="number"?B[W]:W.current)||O,Y=Ye(O,j);!S&&!Y&&h&&Rn(V,{preventScroll:V===O})})},[r,h,O,S,K,A]),be(()=>{if(r||!O)return;let U=!1;const j=ut(O),B=Ht(j);let V=g.current.openEvent;const Y=d.domReference.current;Ua(B);function J(H){let{open:we,reason:Ge,event:Fe,nested:Ue}=H;we&&(V=Fe),Ge==="escape-key"&&d.domReference.current&&Ua(d.domReference.current),Ge==="hover"&&Fe.type==="mouseleave"&&(k.current=!0),Ge==="outside-press"&&(Ue?(k.current=!1,U=!0):k.current=!(Ky(Fe)||mu(Fe)))}return v.on("openchange",J),()=>{v.off("openchange",J);const H=Ht(j),we=Ye(T,H)||L&&ur(L.nodesRef.current,p).some(ie=>{var me;return Ye((me=ie.context)==null?void 0:me.elements.floating,H)});(we||V&&["click","mousedown"].includes(V.type))&&d.domReference.current&&Ua(d.domReference.current);const Fe=Y||B,Ue=ti(ut(Fe).body,Jr());queueMicrotask(()=>{let ie=kh();!ie&&et(Fe)&&T&&(ie=cO(Ue,Fe,T)),C.current&&!k.current&&et(ie)&&(!(ie!==H&&H!==j.body)||we)&&ie.focus({preventScroll:U})})}},[r,T,O,C,g,d,v,L,p]),be(()=>{if(!r&&M)return M.setFocusManagerState({modal:c,closeOnFocusOut:f,open:h,onOpenChange:m,refs:d}),()=>{M.setFocusManagerState(null)}},[r,M,c,h,m,d,f]),be(()=>{if(r||!O||typeof MutationObserver!="function"||S)return;const U=()=>{const B=O.getAttribute("tabindex"),W=$(),V=Ht(ut(T)),Y=W.indexOf(V);Y!==-1&&(_.current=Y),P.current.includes("floating")||V!==d.domReference.current&&W.length===0?B!=="0"&&O.setAttribute("tabindex","0"):B!=="-1"&&O.setAttribute("tabindex","-1")};U();const j=new MutationObserver(U);return j.observe(O,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect()}},[r,T,O,d,P,$,S]);function ee(U){return r||!u||!c?null:D.createElement(dO,{ref:U==="start"?N:R,onClick:j=>m(!1,j.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!r&&I&&(c?!E:!0)&&(z||c);return D.createElement(D.Fragment,null,Q&&D.createElement(Es,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:U=>{if(c){const B=K();Rn(o[0]==="reference"?B[0]:B[B.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(k.current=!1,Go(U,M.portalNode)){const B=wv()||y;B==null||B.focus()}else{var j;(j=M.beforeOutsideRef.current)==null||j.focus()}}}),!E&&ee("start"),n,ee("end"),Q&&D.createElement(Es,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:U=>{if(c)Rn(K()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(f&&(k.current=!0),Go(U,M.portalNode)){const B=Sv()||y;B==null||B.focus()}else{var j;(j=M.afterOutsideRef.current)==null||j.focus()}}}))}const Ya=new Set,hO=D.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t,i=po();return be(()=>{if(!r)return;Ya.add(i);const s=/iP(hone|ad|od)|iOS/.test(pu()),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,h=a.top?parseFloat(a.top):window.scrollY;if(a.overflow="hidden",u&&(a[c]=u+"px"),s){var d,p;const m=((d=window.visualViewport)==null?void 0:d.offsetLeft)||0,v=((p=window.visualViewport)==null?void 0:p.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(h-Math.floor(v))+"px",left:-(f-Math.floor(m))+"px",right:"0"})}return()=>{Ya.delete(i),Ya.size===0&&(Object.assign(a,{overflow:"",[c]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(f,h)))}},[i,r]),D.createElement("div",Zr({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Dh(e){return et(e.target)&&e.target.tagName==="BUTTON"}function Mh(e){return yu(e)}function Qs(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=D.useRef(),h=D.useRef(!1),d=D.useMemo(()=>({onPointerDown(p){f.current=p.pointerType},onMouseDown(p){const m=f.current;p.button===0&&a!=="click"&&(Kr(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}Kr(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||Dh(p))&&(p.key===" "&&!Mh(i)&&(p.preventDefault(),h.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent,"click"))},onKeyUp(p){p.defaultPrevented||!u||Dh(p)||Mh(i)||p.key===" "&&h.current&&(h.current=!1,r(!(n&&l),p.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,l]);return D.useMemo(()=>s?{reference:d}:{},[s,d])}function pO(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,f=s.height,h=s.x,d=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),h-=n||0,d-=r||0,u=0,f=0,!o||c?(u=t.axis==="y"?s.width:0,f=t.axis==="x"?s.height:0,h=a&&t.x!=null?t.x:h,d=l&&t.y!=null?t.y:d):o&&!c&&(f=t.axis==="x"?s.height:f,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:f,x:h,y:d,top:d,right:h+u,bottom:d+f,left:h}}}}function Fh(e){return e!=null&&e.clientX!=null}function mO(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,f=D.useRef(!1),h=D.useRef(null),[d,p]=D.useState(),[m,v]=D.useState([]),g=at((E,I)=>{f.current||r.current.openEvent&&!Fh(r.current.openEvent)||s.setPositionReference(pO(i,{x:E,y:I,axis:l,dataRef:r,pointerType:d}))}),x=at(E=>{c!=null||u!=null||(n?h.current||v([]):g(E.clientX,E.clientY))}),y=Kr(d)?o:n,T=D.useCallback(()=>{if(!y||!a||c!=null||u!=null)return;const E=Pt(o);function I(P){const A=tn(P);Ye(o,A)?(E.removeEventListener("mousemove",I),h.current=null):g(P.clientX,P.clientY)}if(!r.current.openEvent||Fh(r.current.openEvent)){E.addEventListener("mousemove",I);const P=()=>{E.removeEventListener("mousemove",I),h.current=null};return h.current=P,P}s.setPositionReference(i)},[y,a,c,u,o,r,s,i,g]);D.useEffect(()=>T(),[T,m]),D.useEffect(()=>{a&&!o&&(f.current=!1)},[a,o]),D.useEffect(()=>{!a&&n&&(f.current=!0)},[a,n]),be(()=>{a&&(c!=null||u!=null)&&(f.current=!1,g(c,u))},[a,c,u,g]);const S=D.useMemo(()=>{function E(I){let{pointerType:P}=I;p(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:x,onMouseEnter:x}},[x]);return D.useMemo(()=>a?{reference:S}:{},[a,S])}const gO={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},yO={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jh=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 go(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:p}=t,m=zn(),v=at(typeof l=="function"?l:()=>!1),g=typeof l=="function"?v:l,x=D.useRef(!1),y=D.useRef(!1),{escapeKey:T,outsidePress:S}=jh(d),{escapeKey:E,outsidePress:I}=jh(p),P=at(R=>{var k;if(!n||!s||!a||R.key!=="Escape")return;const F=(k=i.current.floatingContext)==null?void 0:k.nodeId,_=m?ur(m.nodesRef.current,F):[];if(!T&&(R.stopPropagation(),_.length>0)){let z=!0;if(_.forEach(G=>{var O;if((O=G.context)!=null&&O.open&&!G.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,jI(R)?R.nativeEvent:R,"escape-key")}),A=at(R=>{var k;const F=()=>{var _;P(R),(_=tn(R))==null||_.removeEventListener("keydown",F)};(k=tn(R))==null||k.addEventListener("keydown",F)}),C=at(R=>{var k;const F=x.current;x.current=!1;const _=y.current;if(y.current=!1,c==="click"&&_||F||typeof g=="function"&&!g(R))return;const z=tn(R),G="["+_n("inert")+"]",O=ut(o.floating).querySelectorAll(G);let $=ke(z)?z:null;for(;$&&!jn($);){const U=bn($);if(jn(U)||!ke(U))break;$=U}if(O.length&&ke(z)&&!LI(z)&&!Ye(z,o.floating)&&Array.from(O).every(U=>!Ye($,U)))return;if(et(z)&&N){const U=z.clientWidth>0&&z.scrollWidth>z.clientWidth,j=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let B=j&&R.offsetX>z.clientWidth;if(j&&_t(z).direction==="rtl"&&(B=R.offsetX<=z.offsetWidth-z.clientWidth),B||U&&R.offsetY>z.clientHeight)return}const K=(k=i.current.floatingContext)==null?void 0:k.nodeId,ee=m&&ur(m.nodesRef.current,K).some(U=>{var j;return Ba(R,(j=U.context)==null?void 0:j.elements.floating)});if(Ba(R,o.floating)||Ba(R,o.domReference)||ee)return;const Q=m?ur(m.nodesRef.current,K):[];if(Q.length>0){let U=!0;if(Q.forEach(j=>{var B;if((B=j.context)!=null&&B.open&&!j.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,R,"outside-press")}),L=at(R=>{var k;const F=()=>{var _;C(R),(_=tn(R))==null||_.removeEventListener(c,F)};(k=tn(R))==null||k.addEventListener(c,F)});D.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=T,i.current.__outsidePressBubbles=S;function R(_){r(!1,_,"ancestor-scroll")}const k=ut(o.floating);a&&k.addEventListener("keydown",E?A:P,E),g&&k.addEventListener(c,I?L:C,I);let F=[];return h&&(ke(o.domReference)&&(F=kn(o.domReference)),ke(o.floating)&&(F=F.concat(kn(o.floating))),!ke(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(kn(o.reference.contextElement)))),F=F.filter(_=>{var z;return _!==((z=k.defaultView)==null?void 0:z.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",R,{passive:!0})}),()=>{a&&k.removeEventListener("keydown",E?A:P,E),g&&k.removeEventListener(c,I?L:C,I),F.forEach(_=>{_.removeEventListener("scroll",R)})}},[i,o,a,g,c,n,r,h,s,T,S,P,E,A,C,I,L]),D.useEffect(()=>{x.current=!1},[g,c]);const M=D.useMemo(()=>({onKeyDown:P,[gO[f]]:R=>{u&&r(!1,R.nativeEvent,"reference-press")}}),[P,r,u,f]),N=D.useMemo(()=>({onKeyDown:P,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[yO[c]]:()=>{x.current=!0}}),[P,c]);return D.useMemo(()=>s?{reference:M,floating:N}:{},[s,M,N])}function vO(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=po(),i=D.useRef({}),[s]=D.useState(()=>mv()),a=Wn()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!ke(d)&&ZA("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]=D.useState(r.reference),u=at((d,p,m)=>{i.current.openEvent=d?p:void 0,s.emit("openchange",{open:d,event:p,reason:m,nested:a}),n==null||n(d,p,m)}),f=D.useMemo(()=>({setPositionReference:c}),[]),h=D.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return D.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:s,floatingId:o,refs:f}),[t,u,h,s,o,f])}function yo(e){e===void 0&&(e={});const{nodeId:t}=e,n=vO({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=D.useState(null),[a,l]=D.useState(null),u=(o==null?void 0:o.reference)||i,f=D.useRef(null),h=zn();be(()=>{u&&(f.current=u)},[u]);const d=NA({...e,elements:{...o,...a&&{reference:a}}}),p=D.useCallback(y=>{const T=ke(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(T),d.refs.setReference(T)},[d.refs]),m=D.useCallback(y=>{(ke(y)||y===null)&&(f.current=y,s(y)),(ke(d.refs.reference.current)||d.refs.reference.current===null||y!==null&&!ke(y))&&d.refs.setReference(y)},[d.refs]),v=D.useMemo(()=>({...d.refs,setReference:m,setPositionReference:p,domReference:f}),[d.refs,m,p]),g=D.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),x=D.useMemo(()=>({...d,...r,refs:v,elements:g,nodeId:t}),[d,v,g,t,r]);return be(()=>{r.dataRef.current.floatingContext=x;const y=h==null?void 0:h.nodesRef.current.find(T=>T.id===t);y&&(y.context=x)}),D.useMemo(()=>({...d,context:x,refs:v,elements:g}),[d,v,g,x])}function bO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=D.useRef(!1),u=D.useRef(),f=D.useRef(!0);D.useEffect(()=>{if(!a)return;const d=Pt(s.domReference);function p(){!n&&et(s.domReference)&&s.domReference===Ht(ut(s.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",p),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",p),d.removeEventListener("keydown",m,!0)}},[s.domReference,n,a]),D.useEffect(()=>{if(!a)return;function d(p){let{reason:m}=p;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,a]),D.useEffect(()=>()=>{clearTimeout(u.current)},[]);const h=D.useMemo(()=>({onPointerDown(d){mu(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const p=tn(d.nativeEvent);if(l&&ke(p))try{if(gu()&&Xy())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!f.current&&!yu(p))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const p=d.relatedTarget,m=d.nativeEvent,v=ke(p)&&p.hasAttribute(_n("focus-guard"))&&p.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var g;const x=Ht(s.domReference?s.domReference.ownerDocument:document);!p&&x===s.domReference||Ye((g=i.current.floatingContext)==null?void 0:g.refs.floating.current,x)||Ye(s.domReference,x)||v||r(!1,m,"focus")})}}),[i,s.domReference,r,l]);return D.useMemo(()=>a?{reference:h}:{},[a,h])}const Lh="active",Nh="selected";function qa(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Lh]:s,[Nh]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Lh,Nh].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),s[c]=function(){for(var h,d=arguments.length,p=new Array(d),m=0;m<d;m++)p[m]=arguments[m];return(h=r.get(c))==null?void 0:h.map(v=>v(...p)).find(v=>v!==void 0)}}}else s[c]=u}),s),{})}}function vo(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=D.useCallback(a=>qa(a,e,"reference"),t),i=D.useCallback(a=>qa(a,e,"floating"),n),s=D.useCallback(a=>qa(a,e,"item"),r);return D.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}let _h=!1;function Zs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Vh(e,t){return Zs(t,e===Eu||e===xi,e===Qr||e===ho)}function Ka(e,t,n){return Zs(t,e===xi,n?e===Qr:e===ho)||e==="Enter"||e===" "||e===""}function xO(e,t,n){return Zs(t,n?e===Qr:e===ho,e===xi)}function $h(e,t,n){return Zs(t,n?e===ho:e===Qr,e===Eu)}function Cv(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:s,onNavigate:a=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:f=!1,nested:h=!1,rtl:d=!1,virtual:p=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:g=!0,disabledIndices:x=void 0,orientation:y="vertical",cols:T=1,scrollItemIntoView:S=!0,virtualItemRef:E,itemSizes:I,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(u&&(f||Zi("`useListNavigation` looping must be enabled to allow escaping."),p||Zi("`useListNavigation` must be virtual to allow escaping.")),y==="vertical"&&T>1&&Zi("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const A=Wn(),C=zn(),L=at(a),M=D.useRef(m),N=D.useRef(c??-1),R=D.useRef(null),k=D.useRef(!0),F=D.useRef(L),_=D.useRef(!!o.floating),z=D.useRef(n),G=D.useRef(!1),O=D.useRef(!1),$=gt(x),K=gt(n),ee=gt(S),Q=gt(o.floating),U=gt(c),[j,B]=D.useState(),[W,V]=D.useState(),Y=at(function(ie,me,oe){oe===void 0&&(oe=!1);function ye(ve){p?(B(ve.id),C==null||C.events.emit("virtualfocus",ve),E&&(E.current=ve)):Rn(ve,{preventScroll:!0,sync:Xy()&&gu()?_h||G.current:!1})}const Qe=ie.current[me.current];Qe&&ye(Qe),requestAnimationFrame(()=>{const ve=ie.current[me.current]||Qe;if(!ve)return;Qe||ye(ve);const ot=ee.current;ot&&H&&(oe||!k.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof ot=="boolean"?{block:"nearest",inline:"nearest"}:ot))})});be(()=>{document.createElement("div").focus({get preventScroll(){return _h=!0,!1}})},[]),be(()=>{l&&(n&&o.floating?M.current&&c!=null&&(O.current=!0,N.current=c,L(c)):_.current&&(N.current=-1,F.current(null)))},[l,n,o.floating,c,L]),be(()=>{if(l&&n&&o.floating)if(s==null){if(G.current=!1,U.current!=null)return;if(_.current&&(N.current=-1,Y(i,N)),(!z.current||!_.current)&&M.current&&(R.current!=null||M.current===!0&&R.current==null)){let ie=0;const me=()=>{i.current[0]==null?(ie<2&&(ie?requestAnimationFrame:queueMicrotask)(me),ie++):(N.current=R.current==null||Ka(R.current,y,d)||h?Wa(i,$.current):Sh(i,$.current),R.current=null,L(N.current))};me()}}else zo(i,s)||(N.current=s,Y(i,N,O.current),O.current=!1)},[l,n,o.floating,s,U,h,i,y,d,L,Y,$]),be(()=>{var ie;if(!l||o.floating||!C||p||!_.current)return;const me=C.nodesRef.current,oe=(ie=me.find(ve=>ve.id===A))==null||(ie=ie.context)==null?void 0:ie.elements.floating,ye=Ht(ut(o.floating)),Qe=me.some(ve=>ve.context&&Ye(ve.context.elements.floating,ye));oe&&!Qe&&k.current&&oe.focus({preventScroll:!0})},[l,o.floating,C,A,p]),be(()=>{if(!l||!C||!p||A)return;function ie(me){V(me.id),E&&(E.current=me)}return C.events.on("virtualfocus",ie),()=>{C.events.off("virtualfocus",ie)}},[l,C,p,A,E]),be(()=>{F.current=L,_.current=!!o.floating}),be(()=>{n||(R.current=null)},[n]),be(()=>{z.current=n},[n]);const J=s!=null,H=D.useMemo(()=>{function ie(oe){if(!n)return;const ye=i.current.indexOf(oe);ye!==-1&&L(ye)}return{onFocus(oe){let{currentTarget:ye}=oe;ie(ye)},onClick:oe=>{let{currentTarget:ye}=oe;return ye.focus({preventScroll:!0})},...v&&{onMouseMove(oe){let{currentTarget:ye}=oe;ie(ye)},onPointerLeave(oe){let{pointerType:ye}=oe;!k.current||ye==="touch"||(N.current=-1,Y(i,N),L(null),p||Rn(Q.current,{preventScroll:!0}))}}}},[n,Q,Y,v,i,L,p]),we=at(ie=>{if(k.current=!1,G.current=!0,!K.current&&ie.currentTarget===Q.current)return;if(h&&$h(ie.key,y,d)){pt(ie),r(!1,ie.nativeEvent,"list-navigation"),et(o.domReference)&&!p&&o.domReference.focus();return}const me=N.current,oe=Wa(i,x),ye=Sh(i,x);if(ie.key==="Home"&&(pt(ie),N.current=oe,L(N.current)),ie.key==="End"&&(pt(ie),N.current=ye,L(N.current)),T>1){const Qe=I||Array.from({length:i.current.length},()=>({width:1,height:1})),ve=WA(Qe,T,P),ot=ve.findIndex(re=>re!=null&&!Qi(i.current,re,x)),Z=ve.reduce((re,xe,Le)=>xe!=null&&!Qi(i.current,xe,x)?Le:re,-1);if(N.current=ve[HA({current:ve.map(re=>re!=null?i.current[re]:null)},{event:ie,orientation:y,loop:f,cols:T,disabledIndices:GA([...x||i.current.map((re,xe)=>Qi(i.current,xe)?xe:void 0),void 0],ve),minIndex:ot,maxIndex:Z,prevIndex:zA(N.current>ye?oe:N.current,Qe,ve,T,ie.key===xi?"bl":ie.key===ho?"tr":"tl"),stopEvent:!0})],L(N.current),y==="both")return}if(Vh(ie.key,y)){if(pt(ie),n&&!p&&Ht(ie.currentTarget.ownerDocument)===ie.currentTarget){N.current=Ka(ie.key,y,d)?oe:ye,L(N.current);return}Ka(ie.key,y,d)?f?N.current=me>=ye?u&&me!==i.current.length?-1:oe:xt(i,{startingIndex:me,disabledIndices:x}):N.current=Math.min(ye,xt(i,{startingIndex:me,disabledIndices:x})):f?N.current=me<=oe?u&&me!==-1?i.current.length:ye:xt(i,{startingIndex:me,decrement:!0,disabledIndices:x}):N.current=Math.max(oe,xt(i,{startingIndex:me,decrement:!0,disabledIndices:x})),zo(i,N.current)?L(null):L(N.current)}}),Ge=D.useMemo(()=>p&&n&&J&&{"aria-activedescendant":W||j},[p,n,J,W,j]),Fe=D.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...!Qy(o.domReference)&&Ge,onKeyDown:we,onPointerMove(){k.current=!0}}),[Ge,we,o.domReference,y]),Ue=D.useMemo(()=>{function ie(oe){m==="auto"&&Ky(oe.nativeEvent)&&(M.current=!0)}function me(oe){M.current=m,m==="auto"&&mu(oe.nativeEvent)&&(M.current=!0)}return{...Ge,onKeyDown(oe){k.current=!1;const ye=oe.key.indexOf("Arrow")===0,Qe=xO(oe.key,y,d),ve=$h(oe.key,y,d),ot=Vh(oe.key,y),Z=(h?Qe:ot)||oe.key==="Enter"||oe.key.trim()==="";if(p&&n){const dt=C==null?void 0:C.nodesRef.current.find(Ct=>Ct.parentId==null),vt=C&&dt?rO(C.nodesRef.current,dt.id):null;if(ye&&vt&&E){const Ct=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(Qe||ve){var re,xe;const qn=((re=vt.context)==null?void 0:re.elements.domReference)===oe.currentTarget,yr=ve&&!qn?(xe=vt.context)==null?void 0:xe.elements.domReference:Qe?i.current.find(vr=>(vr==null?void 0:vr.id)===j):null;yr&&(pt(oe),yr.dispatchEvent(Ct),V(void 0))}if(ot&&vt.context&&vt.context.open&&vt.parentId&&oe.currentTarget!==vt.context.elements.domReference){var Le;pt(oe),(Le=vt.context.elements.domReference)==null||Le.dispatchEvent(Ct);return}}return we(oe)}if(!(!n&&!g&&ye)){if(Z&&(R.current=h&&ot?null:oe.key),h){Qe&&(pt(oe),n?(N.current=Wa(i,$.current),L(N.current)):r(!0,oe.nativeEvent,"list-navigation"));return}ot&&(c!=null&&(N.current=c),pt(oe),!n&&g?r(!0,oe.nativeEvent,"list-navigation"):we(oe),n&&L(N.current))}},onFocus(){n&&!p&&L(null)},onPointerDown:me,onMouseDown:ie,onClick:ie}},[j,Ge,we,$,m,i,h,L,r,n,g,y,d,c,C,p,E]);return D.useMemo(()=>l?{reference:Ue,floating:Fe,item:H}:{},[l,Ue,Fe,H])}const wO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function bo(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=wO.get(s))!=null?n:s,l=po(),u=Wn()!=null,f=D.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="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"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,u,r,l,s]),h=D.useMemo(()=>{const p={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?p:{...p,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),d=D.useCallback(p=>{let{active:m,selected:v}=p;const g={role:"option",...m&&{id:o+"-option"}};switch(s){case"select":return{...g,"aria-selected":m&&v};case"combobox":return{...g,...m&&{"aria-selected":!0}}}return{}},[o,s]);return D.useMemo(()=>i?{reference:f,floating:h,item:d}:{},[i,f,h,d])}const Bh=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Er(e,t){return typeof e=="function"?e(t):e}function SO(e,t){const[n,r]=D.useState(e);return e&&!n&&r(!0),D.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function TO(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=D.useState("unmounted"),c=SO(n,s);return!c&&a==="close"&&l("unmounted"),be(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function EO(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=D.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",f=(u?s:s.open)||0,h=(u?s:s.close)||0,[d,p]=D.useState(()=>({...Er(i,c),...Er(n,c)})),{isMounted:m,status:v}=TO(e,{duration:s}),g=gt(n),x=gt(r),y=gt(o),T=gt(i);return be(()=>{const S=Er(g.current,c),E=Er(y.current,c),I=Er(T.current,c),P=Er(x.current,c)||Object.keys(S).reduce((A,C)=>(A[C]="",A),{});if(v==="initial"&&p(A=>({transitionProperty:A.transitionProperty,...I,...S})),v==="open"&&p({transitionProperty:Object.keys(P).map(Bh).join(","),transitionDuration:f+"ms",...I,...P}),v==="close"){const A=E||S;p({transitionProperty:Object.keys(A).map(Bh).join(","),transitionDuration:h+"ms",...I,...A})}},[h,y,g,x,T,f,v,c]),{isMounted:m,styles:d}}function CO(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:h=[],selectedIndex:d=null}=t,p=D.useRef(),m=D.useRef(""),v=D.useRef((n=d??s)!=null?n:-1),g=D.useRef(null),x=at(a),y=at(l),T=gt(u),S=gt(h);be(()=>{r&&(clearTimeout(p.current),g.current=null,m.current="")},[r]),be(()=>{if(r&&m.current===""){var C;v.current=(C=d??s)!=null?C:-1}},[r,d,s]);const E=at(C=>{C?o.current.typing||(o.current.typing=C,y(C)):o.current.typing&&(o.current.typing=C,y(C))}),I=at(C=>{function L(F,_,z){const G=T.current?T.current(_,z):_.find(O=>(O==null?void 0:O.toLocaleLowerCase().indexOf(z.toLocaleLowerCase()))===0);return G?F.indexOf(G):-1}const M=i.current;if(m.current.length>0&&m.current[0]!==" "&&(L(M,M,m.current)===-1?E(!1):C.key===" "&&pt(C)),M==null||S.current.includes(C.key)||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;r&&C.key!==" "&&(pt(C),E(!0)),M.every(F=>{var _,z;return F?((_=F[0])==null?void 0:_.toLocaleLowerCase())!==((z=F[1])==null?void 0:z.toLocaleLowerCase()):!0})&&m.current===C.key&&(m.current="",v.current=g.current),m.current+=C.key,clearTimeout(p.current),p.current=setTimeout(()=>{m.current="",v.current=g.current,E(!1)},f);const R=v.current,k=L(M,[...M.slice((R||0)+1),...M.slice(0,(R||0)+1)],m.current);k!==-1?(x(k),g.current=k):C.key!==" "&&(m.current="",E(!1))}),P=D.useMemo(()=>({onKeyDown:I}),[I]),A=D.useMemo(()=>({onKeyDown:I,onKeyUp(C){C.key===" "&&E(!1)}}),[I,E]);return D.useMemo(()=>c?{reference:P,floating:A}:{},[c,P,A])}function Hh(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,f]=t[a]||[0,0];c>=r!=f>=r&&n<=(u-l)*(r-c)/(f-c)+l&&(o=!o)}return o}function PO(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function RO(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();function c(f,h){const d=performance.now(),p=d-l;if(s===null||a===null||p===0)return s=f,a=h,l=d,null;const m=f-s,v=h-a,x=Math.sqrt(m*m+v*v)/p;return s=f,a=h,l=d,x}const u=f=>{let{x:h,y:d,placement:p,elements:m,onClose:v,nodeId:g,tree:x}=f;return function(T){function S(){clearTimeout(o),v()}if(clearTimeout(o),!m.domReference||!m.floating||p==null||h==null||d==null)return;const{clientX:E,clientY:I}=T,P=[E,I],A=tn(T),C=T.type==="mouseleave",L=Ye(m.floating,A),M=Ye(m.domReference,A),N=m.domReference.getBoundingClientRect(),R=m.floating.getBoundingClientRect(),k=p.split("-")[0],F=h>R.right-R.width/2,_=d>R.bottom-R.height/2,z=PO(P,N),G=R.width>N.width,O=R.height>N.height,$=(G?N:R).left,K=(G?N:R).right,ee=(O?N:R).top,Q=(O?N:R).bottom;if(L&&(i=!0,!C))return;if(M&&(i=!1),M&&!C){i=!0;return}if(C&&ke(T.relatedTarget)&&Ye(m.floating,T.relatedTarget)||x&&ur(x.nodesRef.current,g).some(B=>{let{context:W}=B;return W==null?void 0:W.open}))return;if(k==="top"&&d>=N.bottom-1||k==="bottom"&&d<=N.top+1||k==="left"&&h>=N.right-1||k==="right"&&h<=N.left+1)return S();let U=[];switch(k){case"top":U=[[$,N.top+1],[$,R.bottom-1],[K,R.bottom-1],[K,N.top+1]];break;case"bottom":U=[[$,R.top+1],[$,N.bottom-1],[K,N.bottom-1],[K,R.top+1]];break;case"left":U=[[R.right-1,Q],[R.right-1,ee],[N.left+1,ee],[N.left+1,Q]];break;case"right":U=[[N.right-1,Q],[N.right-1,ee],[R.left+1,ee],[R.left+1,Q]];break}function j(B){let[W,V]=B;switch(k){case"top":{const Y=[G?W+t/2:F?W+t*4:W-t*4,V+t+1],J=[G?W-t/2:F?W+t*4:W-t*4,V+t+1],H=[[R.left,F||G?R.bottom-t:R.top],[R.right,F?G?R.bottom-t:R.top:R.bottom-t]];return[Y,J,...H]}case"bottom":{const Y=[G?W+t/2:F?W+t*4:W-t*4,V-t],J=[G?W-t/2:F?W+t*4:W-t*4,V-t],H=[[R.left,F||G?R.top+t:R.bottom],[R.right,F?G?R.top+t:R.bottom:R.top+t]];return[Y,J,...H]}case"left":{const Y=[W+t+1,O?V+t/2:_?V+t*4:V-t*4],J=[W+t+1,O?V-t/2:_?V+t*4:V-t*4];return[...[[_||O?R.right-t:R.left,R.top],[_?O?R.right-t:R.left:R.right-t,R.bottom]],Y,J]}case"right":{const Y=[W-t,O?V+t/2:_?V+t*4:V-t*4],J=[W-t,O?V-t/2:_?V+t*4:V-t*4],H=[[_||O?R.left+t:R.right,R.top],[_?O?R.left+t:R.right:R.left+t,R.bottom]];return[Y,J,...H]}}}if(!Hh([E,I],U)){if(i&&!z)return S();if(!C&&r){const B=c(T.clientX,T.clientY);if(B!==null&&B<.1)return S()}Hh([E,I],j([h,d]))?!i&&r&&(o=window.setTimeout(S,40)):S()}}};return u.__options={blockPointerEvents:n},u}const xo=e=>{const t=b.useId(),[n,r]=b.useState(e.open),o=b.useRef(null),i=b.useMemo(()=>[Xs(10),Tu({fallbackAxisSideDirection:"end"}),Su(),uv({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=yo({open:n,middleware:i,transform:!0,whileElementsMounted:Ks,onOpenChange:(p,m)=>{var g;const v=m==null?void 0:m.relatedTarget;v&&v.dataset.floating==="true"&&!p||(r(p),(g=e.onChange)==null||g.call(e,p))}}),c=Qs(l),u=go(l),f=bo(l),{getReferenceProps:h,getFloatingProps:d}=vo([c,u,f]);return w.jsxs(b.Fragment,{children:[w.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&w.jsx(mo,{preserveTabOrder:!0,id:`${t}-portal`,children:w.jsx(wi,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:w.jsxs("div",{className:"relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-6 shadow-2xl",ref:s.setFloating,style:a,"aria-labelledby":t,...d(),children:[w.jsx(pv,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),w.jsx("header",{className:"mb-2",children:w.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})},IO=e=>{const t=b.useRef(null),n=b.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=b.useState(!1),{context:a,refs:l}=yo({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Qs(a),u=bo(a),f=go(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:h,getReferenceProps:d}=vo([c,u,f]);return w.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[w.jsx(Vr,{...d(e),as:mt.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:w.jsx(mt.span,{layoutId:o,children:e.trigger})}),w.jsx(vi,{children:i?w.jsx(mo,{root:t,children:w.jsx(wi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:w.jsx(mt.div,{...h(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})};function AO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function OO(...e){return t=>e.forEach(n=>AO(n,t))}var Pu=D.forwardRef((e,t)=>{const{children:n,...r}=e,o=D.Children.toArray(n),i=o.find(DO);if(i){const s=i.props.children,a=o.map(l=>l===i?D.Children.count(s)>1?D.Children.only(null):D.isValidElement(s)?s.props.children:null:l);return w.jsx(ec,{...r,ref:t,children:D.isValidElement(s)?D.cloneElement(s,void 0,a):null})}return w.jsx(ec,{...r,ref:t,children:n})});Pu.displayName="Slot";var ec=D.forwardRef((e,t)=>{const{children:n,...r}=e;if(D.isValidElement(n)){const o=FO(n);return D.cloneElement(n,{...MO(r,n.props),ref:t?OO(t,o):o})}return D.Children.count(n)>1?D.Children.only(null):null});ec.displayName="SlotClone";var kO=({children:e})=>w.jsx(w.Fragment,{children:e});function DO(e){return D.isValidElement(e)&&e.type===kO}function MO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FO(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 Pv=300,jO=500,Rv=(e="")=>je("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary data-[open]:bg-primary focus:bg-primary aria-expanded:opacity-80","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),tc=b.createContext({activeIndex:null,getItemProps:()=>({}),isOpen:!1,setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Wh=b.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,isParent:r,floatingClassName:o="",label:i,...s},a)=>{const l=Wn(),c=l!==null,[u,f]=b.useState(!1),[h,d]=b.useState(!1),[p,m]=b.useState(null),v=b.useRef([]),g=b.useRef([]),x=b.useContext(tc),y=zn(),T=JA(),S=hv(),{floatingStyles:E,refs:I,context:P}=yo({nodeId:T,open:u,transform:!0,onOpenChange:f,whileElementsMounted:Ks,placement:c?"right":"bottom-start",strategy:"absolute",middleware:[Xs({mainAxis:c?0:4,alignmentAxis:c?-4:0}),Tu(),Su()]}),A=bo(P,{role:"menu",enabled:!0}),C=go(P,{bubbles:!0}),L=vv(P,{enabled:n,delay:{open:Pv},handleClose:RO({blockPointerEvents:!0})}),M=Qs(P,{event:"mousedown",toggle:!c,ignoreMouse:c,keyboardHandlers:!0}),N=Cv(P,{loop:!0,activeIndex:p,virtual:!0,nested:c,allowEscape:!0,listRef:v,scrollItemIntoView:!0,onNavigate:m}),R=CO(P,{activeIndex:p,listRef:g,resetMs:jO,onMatch:u?m:void 0}),{getReferenceProps:k,getFloatingProps:F,getItemProps:_}=vo([L,M,A,C,N,R]);b.useEffect(()=>{if(!y)return;const G=()=>f(!1),O=$=>{$.nodeId!==T&&$.parentId===l&&f(!1)};return y.events.on("click",G),y.events.on("menuopen",O),()=>{y.events.off("click",G),y.events.off("menuopen",O)}},[y,T,l]),b.useEffect(()=>{u&&y&&y.events.emit("menuopen",{parentId:l,nodeId:T})},[y,u,T,l]);const z=r?s.className:je(Rv(s.className));return w.jsxs(eO,{id:T,children:[w.jsx(b.Fragment,{children:s.asChild?w.jsx(Pu,{children:i,ref:Jl([I.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:z,...k(x.getItemProps({...s,onFocus(G){var O;(O=s.onFocus)==null||O.call(s,G),d(!1),x.setHasFocusInside(!0)}}))}):w.jsxs("button",{type:"button",ref:Jl([I.setReference,S.ref,a]),tabIndex:c?x.activeIndex===S.index?0:-1:void 0,"data-open":u?"":void 0,"data-nested":c?"":void 0,role:c?"menuitem":void 0,"data-focus-inside":h?"":void 0,className:z,...k(x.getItemProps({...s,onFocus(G){var O;(O=s.onFocus)==null||O.call(s,G),d(!1),x.setHasFocusInside(!0)}})),children:[i,c&&w.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[w.jsx("span",{className:"sr-only",children:"Next menu"}),w.jsx(nu,{size:14})]})]})}),w.jsx(tc.Provider,{value:{activeIndex:p,setActiveIndex:m,getItemProps:_,setHasFocusInside:d,isOpen:u},children:w.jsx(qA,{elementsRef:v,labelsRef:g,children:u&&w.jsx(mo,{preserveTabOrder:!0,children:w.jsx(wi,{context:P,modal:!1,initialFocus:c?-1:0,returnFocus:!c,children:w.jsx(t,{...F(),ref:I.setFloating,style:{...s.style,...E},className:je("isolate z-tooltip flex flex-col items-start rounded-lg border border-floating-border bg-floating-background text-left shadow-xl outline-none",o),children:e})})})})})]})}),LO=b.forwardRef(({label:e,title:t,Right:n,disabled:r,...o},i)=>{const s=b.useContext(tc),a=hv({label:r?null:typeof e=="string"?e:t}),l=zn(),c=a.index===s.activeIndex;return w.jsxs("button",{...o,ref:Jl([a.ref,i]),"data-active":c,type:"button",role:"menuitem",disabled:r,tabIndex:c?0:-1,className:Rv(o.className),...s.getItemProps({onClick(u){var f;(f=o.onClick)==null||f.call(o,u),l==null||l.events.emit("click")},onFocus(u){var f;(f=o.onFocus)==null||f.call(o,u),s.setHasFocusInside(!0)}}),children:[e,n?w.jsx(n,{size:16}):null]})}),NO=b.forwardRef((e,t)=>Wn()!==null?w.jsx(Wh,{...e,isParent:!1,ref:t}):w.jsx(tO,{children:w.jsx(Wh,{...e,isParent:!0,ref:t})})),_O=(e,t)=>gs()?t:window.matchMedia(e).matches,VO=(e,t=!0)=>{const[n,r]=b.useState(t);return b.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(_O(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},Wt="600ms",$O={initial:{translateX:["-30%","0%"],opacity:.8,animationDuration:Wt},enter:{translateX:["-30%","0%"],opacity:1,animationDuration:Wt},exit:{translateX:["0%","-30%"],opacity:0,animationDuration:Wt}},BO={initial:{translateX:["30%","0%"],opacity:.8},enter:{translateX:"0%",opacity:1,animationDuration:Wt},exit:{translateX:["0%","30%"],opacity:0,animationDuration:Wt}},Xa={drawer:e=>e==="left"?$O:BO,sheet:{initial:{opacity:.5,translateY:"25%",animationDuration:Wt,originY:"bottom"},enter:{opacity:1,translateY:"0%",animationDuration:Wt,originY:"bottom"},exit:{opacity:.1,translateY:"50%",animationDuration:Wt,originY:"bottom"}},dialog:{initial:{opacity:0,scale:.95,animationDuration:Wt},enter:{opacity:1,scale:[1.05,1],animationDuration:Wt},exit:{opacity:0,scale:.97,animationDuration:Wt}}},HO=ui("isolate z-floating border border-card-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 h-[85vh] max-h-[85vh] max-h-[85svh] pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),WO={top:0,left:0,right:0,bottom:-1},zO=e=>e*.62,GO=e=>{const t=(n,r)=>{if(e.parent.current){if(!e.sheet){const c=e.parent.current,u=e.value.get()||c.getBoundingClientRect().width,f=e.position==="right"?-r.delta.x:r.delta.x;return e.value.set(Math.abs(u+f))}const i=e.parent.current.getBoundingClientRect(),s=e.value.get()||i.height,a=Math.abs(s-r.delta.y),l=zO(window.outerHeight);return a<l?(e.onChange(!1),setTimeout(()=>e.value.set(window.outerHeight),350)):e.value.set(a)}};return w.jsx(mt.div,{draggable:!0,dragMomentum:!0,dragListener:!0,dragPropagation:!0,onDrag:t,animate:!1,initial:!1,dragElastic:0,dragDirectionLock:!0,dragSnapToOrigin:!0,drag:e.sheet?"y":"x",dragConstraints:WO,whileDrag:{cursor:"grabbing"},className:je("absolute rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?w.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Qa={drawer:"right",sheet:"none",dialog:"none"},UO=({type:e="dialog",resizer:t=!0,overlayClickClose:n=!1,forceType:r=!1,closable:o=!0,...i})=>{const s=b.useId(),a=b.useId(),l=VO("(min-width: 64rem)"),c=e!=="dialog",u=l?e==="drawer"?i.position:Qa[e]:r?Qa[e]:Qa.sheet,f=l||r?Xa[e]:Xa.sheet,h=typeof f=="function"?f(u):f,d=l||r?e:"sheet",{refs:p,context:m}=yo({open:i.open,onOpenChange:i.onChange}),v=Qs(m),g=bo(m),x=go(m,{escapeKey:!0,referencePress:!0,outsidePress:n}),{getReferenceProps:y,getFloatingProps:T}=vo([v,g,x]),S=i.trigger,E=Gr(void 0),I=()=>i.onChange(!1);return w.jsxs(b.Fragment,{children:[i.trigger?w.jsx(b.Fragment,{children:i.asChild?w.jsx(Pu,{ref:p.setReference,...y({layoutId:i.layoutId}),children:S}):w.jsx(mt.button,{ref:p.setReference,...y(),layoutId:i.layoutId,type:"button",children:S})}):null,w.jsx(mo,{children:w.jsx(vi,{presenceAffectsLayout:!0,children:i.open?w.jsx(hO,{lockScroll:!0,className:`inset-0 isolate z-overlay h-[100dvh] !overflow-clip bg-floating-overlay/70 ${d==="drawer"?"":"grid items-end justify-center lg:items-center"}`,children:w.jsx(wi,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:m,children:w.jsxs(mt.div,{animate:"enter","aria-describedby":a,"aria-labelledby":s,className:HO({position:u,type:d}),exit:"exit",layoutId:i.layoutId,initial:"initial",ref:p.setFloating,style:d==="drawer"?{width:E}:{height:E},variants:h,...T(),children:[i.title?w.jsx("header",{className:"relative w-full",children:i.title?w.jsx("h2",{className:"border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:i.title}):null}):null,w.jsx("section",{className:"flex-1 overflow-y-auto px-8 py-1",children:i.children}),i.footer?w.jsx("footer",{className:"w-full border-t border-floating-border px-8 pt-4",children:i.footer}):null,o?w.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:w.jsx("button",{type:"button",onClick:I,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:w.jsx(ly,{})})}):null,c&&t?w.jsx(GO,{onChange:i.onChange,parent:p.floating,position:u,sheet:d==="sheet",value:E}):null]})})}):null})})]})},YO=e=>w.jsx(mt.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Iv=({children:e,followCursor:t=!1,placement:n,enabled:r,as:o,title:i,...s})=>{const[a,l]=b.useState(!1),c=b.useRef(null),u=o||"span",{refs:f,floatingStyles:h,context:d}=yo({open:a,placement:n,transform:!0,onOpenChange:l,whileElementsMounted:Ks,middleware:[Xs(5),Tu({fallbackAxisSideDirection:"start"}),Su(),uv({element:c,padding:5})]}),p=vv(d,{move:!0,enabled:r,delay:{open:Pv}}),m=bO(d,{enabled:r}),v=go(d,{enabled:r}),g=bo(d,{role:"tooltip",enabled:r}),x=mO(d,{enabled:!!r&&!!t}),{getReferenceProps:y,getFloatingProps:T}=vo([p,m,v,g,x]);return w.jsxs(b.Fragment,{children:[w.jsx(u,{ref:f.setReference,...y(s),children:i}),w.jsx(mo,{children:a&&w.jsxs(so,{...T(),ref:f.setFloating,style:h,className:"z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-lg",children:[w.jsx(pv,{ref:c,context:d,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),e]})})]})};class Cs{static getDescendantProperty(t,n,r=[]){let o,i,s,a,l,c;if(n){if(s=n.indexOf("."),s===-1?o=n:(o=n.slice(0,s),i=n.slice(s+1)),a=t[o],a!==null&&typeof a<"u")if(!i&&(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++)Cs.getDescendantProperty(a[l],i,r);else i&&Cs.getDescendantProperty(a,i,r)}else r.push(t);return r}}class kr{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 i=kr.isMatch(o,t,this.options.caseSensitive);i&&n.push({item:o,score:i})}else for(let i=0;i<this.keys.length;i++){const s=Cs.getDescendantProperty(o,this.keys[i]);let a=!1;for(let l=0;l<s.length;l++){const c=kr.isMatch(s[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=kr.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 kr.indexesOfFirstLetter(t,n).forEach((s,a)=>{let l=s+1;o[a]=[s];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(s=>s!==!1),o.length?o.sort((s,a)=>s.length===1?s[0]-a[0]:(s=s[s.length-1]-s[0],a=a[a.length-1]-a[0],s-a))[0]:!1}static indexesOfFirstLetter(t,n){const r=n[0];return t.split("").map((o,i)=>o!==r?!1:i).filter(o=>o!==!1)}}const Av=({reportStatus:e,hideLeft:t=!1,className:n,info:r,children:o,title:i})=>w.jsxs("div",{className:je("w-full justify-between",t&&o===null?"hidden":"flex",n),children:[t?null:w.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-error:text-danger",children:[i,e||r?w.jsxs("span",{className:"flex items-center justify-center gap-1",children:[r?w.jsx(Iv,{title:w.jsxs("span",{className:"cursor-help",children:[w.jsx("span",{className:"sr-only",children:r}),w.jsx(ay,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}),children:r}):null,e?w.jsxs(b.Fragment,{children:[w.jsx(sy,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),w.jsx(TC,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),o]}),Js=({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:f,labelClassName:h="",name:d,title:p,placeholder:m,hideLeft:v,required:g})=>{const x=f??d,y=kt(),T=e??y.inputOptionalLabel;return w.jsxs("fieldset",{form:u,"data-error":!!c,"data-interactive":!!i,className:je("group grid min-h-0 min-w-0 grid-cols-1 items-baseline",r),children:[w.jsxs("label",{form:u,htmlFor:x,className:"inline-flex cursor-text flex-row flex-wrap justify-between gap-1 text-sm transition-colors empty:hidden group-error:text-danger",children:[!v&&!n?w.jsx(Av,{info:a,hideLeft:v,reportStatus:!0,title:p,placeholder:m,children:T||n?w.jsxs(b.Fragment,{children:[g?null:w.jsx("span",{className:"text-opacity-70",children:T}),n?w.jsx(b.Fragment,{children:n}):null]}):null}):null,w.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-error:border-danger ${h}`,children:[t?w.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?w.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),w.jsx("p",{className:"mt-input-gap hidden flex-shrink-0 flex-grow-0 whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:inline-block group-error:inline-block group-error:text-danger",children:c}),w.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})},qO=e=>w.jsx(b.Fragment,{children:e.children}),Ov=b.forwardRef(({selected:e,active:t,onClick:n,option:r,...o},i)=>{const s=r.Render??qO,a=r.label??r.value;return w.jsx("li",{...o,ref:i,role:"option","aria-selected":t,className:"w-full border-b border-tooltip-border last:border-transparent",children:w.jsxs("button",{type:"button","data-value":r.value,onClick:n,"aria-selected":t,"aria-checked":t,"aria-current":t,className:`flex w-full cursor-pointer justify-between p-2 text-left ${t?"bg-primary text-primary-foreground":""} ${e?"bg-primary/70 text-primary-foreground":""}`,children:[w.jsx(s,{...o,label:r.label,value:r.value,children:a}),t?w.jsx("span",{children:w.jsx(wC,{"aria-hidden":!0,className:"text-current",absoluteStrokeWidth:!0,strokeWidth:2,size:22})}):null]})})}),KO={duration:300,initial:{transform:"scaleY(0)",opacity:.4},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},XO={caseSensitive:!1,sort:!1},QO=[],ZO=b.forwardRef(({options:e,dynamicOption:t=!1,feedback:n=null,labelClassName:r,interactive:o,rightLabel:i,optionalText:s,container:a,hideLeft:l=!1,right:c,left:u,error:f,required:h=!1,...d},p)=>{const m=d.value??d.defaultValue??"",v=kt(),[g,x]=b.useState(!1),[y,T]=b.useState(""),[S,E]=b.useState(m),[I,P]=b.useState(m),[A,C]=b.useState(null),L=b.useRef(QO),M=t&&y!==""?[{value:y,label:y,"data-dynamic":"true"},...e]:e,N=new kr(M,["value","label"],XO).search(y),R=t?void 0:`^(${e.map(V=>`${Ul(V.value)}${V.label?"|"+Ul(V.label):""}`).join("|")})$`;b.useEffect(()=>{if(d.value){const V=e.find(Y=>Y.value===d.value);E((V==null?void 0:V.label)??d.value)}},[d.value]);const{x:k,y:F,strategy:_,refs:z,context:G}=yo({open:g,transform:!0,strategy:"absolute",onOpenChange:x,whileElementsMounted:Ks,middleware:[Xs(4),VA({elementContext:"reference",padding:10,apply(V){const J=V.elements.reference.parentElement,H=J==null?void 0:J.getBoundingClientRect().width;Object.assign(V.elements.floating.style,{width:`${H}px`,maxWidth:`${H}px`,minWidth:"max-content",maxHeight:`${Math.min(480,V.availableHeight)}px`})}})]}),O=EO(G,KO),{getReferenceProps:$,getFloatingProps:K,getItemProps:ee}=vo([bo(G,{role:"listbox"}),go(G),Cv(G,{activeIndex:A,allowEscape:!0,cols:0,focusItemOnOpen:"auto",listRef:L,loop:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!0,selectedIndex:A,virtual:!0,onNavigate:V=>C(Y=>V??Y)})]);b.useEffect(()=>{const V=z.reference.current;if(V)return Fs(V)},[]);const Q=(V,Y)=>{E(V.value);const J=z.reference.current;if(!J)return;J==null||J.setAttribute("data-value",V.value),J.value=V.value;const H=new Event("change",{bubbles:!1,cancelable:!0});J.dispatchEvent(H),d.onChange&&d.onChange(H),P(V.label??""),x(!1),T(""),C(Y)},U=V=>{var J;const Y=V.target.value;return T(Y),!g&&Y===""?x(!0):(V.target.name=d.name||"",Y?x(!0):(J=d.onChange)==null?void 0:J.call(d,V))},j=()=>{x(!0),T("")},B=()=>{var V;T(""),E(""),(V=z.reference.current)==null||V.setAttribute("data-value",""),P(""),gm(z.reference.current),x(!1)},W=d.id||d.name;return w.jsxs(Js,{...d,container:a,error:f,feedback:n,form:d.form,hideLeft:l,id:d.name||d.id,interactive:o,labelClassName:r,left:u,name:d.name,optionalText:s,placeholder:d.placeholder,required:h,rightLabel:i,title:d.title,right:w.jsxs("span",{className:"flex items-center gap-0.5",children:[w.jsxs("button",{type:"button",className:"transition-colors link:text-primary",children:[w.jsx(iy,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]}),S?w.jsx("button",{type:"button",onClick:B,className:"transition-colors link:text-danger",children:w.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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:[w.jsx("input",{...$({...d,onChange:U,onFocus:j,pattern:R,ref:z.setReference,name:`${W}-shadow`,id:`${W}-shadow`,onClick:V=>V.currentTarget.focus(),onKeyDown(V){if(V.key==="Escape")return V.currentTarget.blur(),x(!1);if(V.key==="Enter"){if(A!==null&&N[A])return V.preventDefault(),Q(N[A],A);if(N.length===1)return V.preventDefault(),Q(N[0],0)}}}),"data-value":S,"data-error":!!f,"data-name":W,"data-target":W,required:h,value:g?y:I||S,"aria-autocomplete":"list",autoComplete:"off",className:je("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)}),w.jsx("input",{id:W,name:W,type:"hidden","data-origin":W,ref:p,required:h,defaultValue:d.value||S||void 0}),w.jsx(mo,{preserveTabOrder:!0,children:g?w.jsx(wi,{guards:!0,returnFocus:!1,context:G,initialFocus:-1,visuallyHiddenDismiss:!0,children:w.jsx("ul",{...K({ref:z.setFloating,style:{position:_,left:(k??0)+16,top:F??0,...O.styles}}),"data-floating":"true",className:"z-floating m-0 origin-[top_center] list-none overflow-auto overflow-y-auto rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground shadow-floating",children:N.map((V,Y)=>b.createElement(Ov,{...ee({onClick:()=>Q(V,Y),ref:J=>void(L.current[Y]=J),selected:A===Y,active:S===V.value}),key:`${V.value}-option`,option:V,selected:A===Y,active:S===V.value}))})}):null})]})}),kv=b.forwardRef(({children:e,asTask:t=!1,labelClassName:n,error:r,className:o="",size:i,container:s,...a},l)=>w.jsxs("label",{"data-task":t,"data-disabled":a.disabled,"aria-disabled":a.disabled,className:je("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[w.jsx("input",{...a,ref:l,type:"checkbox","data-task":t,className:je("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",o)}),e,w.jsx("span",{"data-name":"checkbox-label",className:je("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:r})]})),Si=b.forwardRef(({type:e="text",feedback:t=null,info:n,labelClassName:r,next:o,interactive:i,rightLabel:s,optionalText:a,container:l,hideLeft:c=!1,right:u,left:f,error:h,...d},p)=>{const m=d.id??d.name,v=b.useRef(null);return b.useEffect(()=>{if(v.current===null)return;const g=v.current,x=Fs(v.current),y=T=>{const S=T;if(S.key==="Enter"&&g.enterKeyHint==="next"){const E=g.getAttribute("data-next");if(E){const I=document.getElementById(E);if(I)return I.focus(),void S.preventDefault()}}};return g.addEventListener("keydown",y),()=>{x(),g.removeEventListener("keydown",y)}},[]),w.jsx(Js,{info:n,container:l,error:h,feedback:t,hideLeft:c,left:f,optionalText:a,right:u,rightLabel:s,interactive:i,form:d.form,id:d.name||d.id,name:d.name,labelClassName:r,title:d.title,placeholder:d.placeholder,required:d.required,children:w.jsx(Dy,{...d,type:e,"data-next":o,ref:Pc(p,v),id:m,name:m,className:je("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary",d.className)})})}),zh=new Date(1970,11,31),Za={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],literal:e=>e.split("")},Gh={year:()=>"yyyy",month:()=>"MM",day:()=>"dd",literal:e=>e},JO={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")},Ja=(e,t)=>{try{return e.formatToParts(t)}catch{return[]}},ek=b.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,...i},s)=>{const a=b.useId(),l=kt(),c=b.useMemo(()=>new Intl.DateTimeFormat(t),[t]),[u,f]=b.useState(e||void 0),[h,d]=b.useState(!1),p=Ja(c,zh).flatMap(E=>gn.keyof(Za,E.type)?Za[E.type](E.value):[]),m=Ja(c,zh).reduce((E,I)=>E+(gn.keyof(Gh,I.type)?Gh[I.type](I.value):""),""),[v,g]=b.useState(u?Ja(c,u).reduce((E,I)=>E+(gn.keyof(Za,I.type)?JO[I.type](u,I.value):""),""):""),x=E=>{const I=E.target.value;if(g(I),p.length===I.length&&p.every((A,C)=>{const L=I.charAt(C);return typeof A=="string"?L===A:A.test(L)})){const A=qr(LR(I,m,new Date));return f(A),r==null?void 0:r(A)}return f(void 0),r==null?void 0:r(void 0)},y=E=>(f(E),r==null||r(E),g(E?NP(E,m):"")),T=py(u),S=T?u.toISOString():void 0;return w.jsx(Si,{...i,mask:p,value:v,"data-value":S,"data-target":i.name,className:"uppercase",formNoValidate:!h,placeholder:m,onChange:x,required:i.required??!0,error:h?void 0:i.error,name:void 0,id:void 0,right:w.jsxs(b.Fragment,{children:[w.jsx("input",{"data-origin":i.name,defaultValue:S,form:i.form,hidden:!0,id:i.name,name:i.name,ref:s,type:"date"}),w.jsx(xo,{open:h,onChange:d,trigger:w.jsxs("span",{"aria-labelledby":a,children:[w.jsx("span",{id:a,className:"sr-only",children:l.datePickerCalendarButtonLabel}),w.jsx(xC,{})]}),buttonProps:{"aria-describedby":a},children:w.jsx(Hy,{...i,locale:t,changeOnlyOnClick:!0,markToday:o,onChange:y,disabledDate:n,date:T?u:void 0})})]})})}),tk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],nk=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],rk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ok=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Uh=(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 Yh(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?ok:rk:t.binary?nk:tk,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,i=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=Uh(e,t.locale,s);return i+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,s||(e=e.toPrecision(3));const l=Uh(Number(e),t.locale,s),c=n[a];return i+l+r+c}var nc={exports:{}},$i={exports:{}},Pe={};/** @license React v16.13.1
178
178
  * react-is.production.min.js
179
179
  *
180
180
  * Copyright (c) Facebook, Inc. and its affiliates.
181
181
  *
182
182
  * This source code is licensed under the MIT license found in the
183
183
  * LICENSE file in the root directory of this source tree.
184
- */var rm;function w_(){if(rm)return je;rm=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,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case s:case o:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case f:case i:return S;default:return E}}case n:return E}}}function T(S){return y(S)===c}return je.AsyncMode=l,je.ConcurrentMode=c,je.ContextConsumer=a,je.ContextProvider=i,je.Element=t,je.ForwardRef=u,je.Fragment=r,je.Lazy=p,je.Memo=f,je.Portal=n,je.Profiler=s,je.StrictMode=o,je.Suspense=d,je.isAsyncMode=function(S){return T(S)||y(S)===l},je.isConcurrentMode=T,je.isContextConsumer=function(S){return y(S)===a},je.isContextProvider=function(S){return y(S)===i},je.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},je.isForwardRef=function(S){return y(S)===u},je.isFragment=function(S){return y(S)===r},je.isLazy=function(S){return y(S)===p},je.isMemo=function(S){return y(S)===f},je.isPortal=function(S){return y(S)===n},je.isProfiler=function(S){return y(S)===s},je.isStrictMode=function(S){return y(S)===o},je.isSuspense=function(S){return y(S)===d},je.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===s||S===o||S===d||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===f||S.$$typeof===i||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===g||S.$$typeof===x||S.$$typeof===m)},je.typeOf=y,je}var Ne={};/** @license React v16.13.1
184
+ */var qh;function ik(){if(qh)return Pe;qh=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=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,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(S){if(typeof S=="object"&&S!==null){var E=S.$$typeof;switch(E){case t:switch(S=S.type,S){case l:case c:case r:case i:case o:case f:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case p:case d:case s:return S;default:return E}}case n:return E}}}function T(S){return y(S)===c}return Pe.AsyncMode=l,Pe.ConcurrentMode=c,Pe.ContextConsumer=a,Pe.ContextProvider=s,Pe.Element=t,Pe.ForwardRef=u,Pe.Fragment=r,Pe.Lazy=p,Pe.Memo=d,Pe.Portal=n,Pe.Profiler=i,Pe.StrictMode=o,Pe.Suspense=f,Pe.isAsyncMode=function(S){return T(S)||y(S)===l},Pe.isConcurrentMode=T,Pe.isContextConsumer=function(S){return y(S)===a},Pe.isContextProvider=function(S){return y(S)===s},Pe.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Pe.isForwardRef=function(S){return y(S)===u},Pe.isFragment=function(S){return y(S)===r},Pe.isLazy=function(S){return y(S)===p},Pe.isMemo=function(S){return y(S)===d},Pe.isPortal=function(S){return y(S)===n},Pe.isProfiler=function(S){return y(S)===i},Pe.isStrictMode=function(S){return y(S)===o},Pe.isSuspense=function(S){return y(S)===f},Pe.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===i||S===o||S===f||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===p||S.$$typeof===d||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===v||S.$$typeof===g||S.$$typeof===x||S.$$typeof===m)},Pe.typeOf=y,Pe}var Re={};/** @license React v16.13.1
185
185
  * react-is.development.js
186
186
  *
187
187
  * Copyright (c) Facebook, Inc. and its affiliates.
188
188
  *
189
189
  * This source code is licensed under the MIT license found in the
190
190
  * LICENSE file in the root directory of this source tree.
191
- */var om;function S_(){return om||(om=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,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===s||B===o||B===d||B===h||typeof B=="object"&&B!==null&&(B.$$typeof===p||B.$$typeof===f||B.$$typeof===i||B.$$typeof===a||B.$$typeof===u||B.$$typeof===v||B.$$typeof===g||B.$$typeof===x||B.$$typeof===m)}function T(B){if(typeof B=="object"&&B!==null){var xe=B.$$typeof;switch(xe){case t:var Ue=B.type;switch(Ue){case l:case c:case r:case s:case o:case d:return Ue;default:var ze=Ue&&Ue.$$typeof;switch(ze){case a:case u:case p:case f:case i:return ze;default:return xe}}case n:return xe}}}var S=l,E=c,k=a,P=i,I=t,C=u,N=r,M=p,F=f,R=n,A=s,D=o,L=d,H=!1;function U(B){return H||(H=!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.")),O(B)||T(B)===l}function O(B){return T(B)===c}function V(B){return T(B)===a}function Z(B){return T(B)===i}function ne(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return T(B)===u}function Y(B){return T(B)===r}function j(B){return T(B)===p}function $(B){return T(B)===f}function z(B){return T(B)===n}function G(B){return T(B)===s}function W(B){return T(B)===o}function ee(B){return T(B)===d}Ne.AsyncMode=S,Ne.ConcurrentMode=E,Ne.ContextConsumer=k,Ne.ContextProvider=P,Ne.Element=I,Ne.ForwardRef=C,Ne.Fragment=N,Ne.Lazy=M,Ne.Memo=F,Ne.Portal=R,Ne.Profiler=A,Ne.StrictMode=D,Ne.Suspense=L,Ne.isAsyncMode=U,Ne.isConcurrentMode=O,Ne.isContextConsumer=V,Ne.isContextProvider=Z,Ne.isElement=ne,Ne.isForwardRef=J,Ne.isFragment=Y,Ne.isLazy=j,Ne.isMemo=$,Ne.isPortal=z,Ne.isProfiler=G,Ne.isStrictMode=W,Ne.isSuspense=ee,Ne.isValidElementType=y,Ne.typeOf=T}()),Ne}var sm;function Hb(){return sm||(sm=1,process.env.NODE_ENV==="production"?Si.exports=w_():Si.exports=S_()),Si.exports}/*
191
+ */var Kh;function sk(){return Kh||(Kh=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=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,h=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function y(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===f||H===h||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===s||H.$$typeof===a||H.$$typeof===u||H.$$typeof===v||H.$$typeof===g||H.$$typeof===x||H.$$typeof===m)}function T(H){if(typeof H=="object"&&H!==null){var we=H.$$typeof;switch(we){case t:var Ge=H.type;switch(Ge){case l:case c:case r:case i:case o:case f:return Ge;default:var Fe=Ge&&Ge.$$typeof;switch(Fe){case a:case u:case p:case d:case s:return Fe;default:return we}}case n:return we}}}var S=l,E=c,I=a,P=s,A=t,C=u,L=r,M=p,N=d,R=n,k=i,F=o,_=f,z=!1;function G(H){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.")),O(H)||T(H)===l}function O(H){return T(H)===c}function $(H){return T(H)===a}function K(H){return T(H)===s}function ee(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function Q(H){return T(H)===u}function U(H){return T(H)===r}function j(H){return T(H)===p}function B(H){return T(H)===d}function W(H){return T(H)===n}function V(H){return T(H)===i}function Y(H){return T(H)===o}function J(H){return T(H)===f}Re.AsyncMode=S,Re.ConcurrentMode=E,Re.ContextConsumer=I,Re.ContextProvider=P,Re.Element=A,Re.ForwardRef=C,Re.Fragment=L,Re.Lazy=M,Re.Memo=N,Re.Portal=R,Re.Profiler=k,Re.StrictMode=F,Re.Suspense=_,Re.isAsyncMode=G,Re.isConcurrentMode=O,Re.isContextConsumer=$,Re.isContextProvider=K,Re.isElement=ee,Re.isForwardRef=Q,Re.isFragment=U,Re.isLazy=j,Re.isMemo=B,Re.isPortal=W,Re.isProfiler=V,Re.isStrictMode=Y,Re.isSuspense=J,Re.isValidElementType=y,Re.typeOf=T}()),Re}var Xh;function Dv(){return Xh||(Xh=1,process.env.NODE_ENV==="production"?$i.exports=ik():$i.exports=sk()),$i.exports}/*
192
192
  object-assign
193
193
  (c) Sindre Sorhus
194
194
  @license MIT
195
- */var Xl,im;function T_(){if(im)return Xl;im=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 Xl=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 d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},Xl}var Ql,am;function jd(){if(am)return Ql;am=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ql=e,Ql}var Jl,lm;function Ub(){return lm||(lm=1,Jl=Function.call.bind(Object.prototype.hasOwnProperty)),Jl}var ec,cm;function E_(){if(cm)return ec;cm=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=jd(),n={},r=Ub();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 d;try{if(typeof s[u]!="function"){var h=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 h.name="Invariant Violation",h}d=s[u](i,u,l,a,null,t)}catch(p){d=p}if(d&&!(d 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 d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var f=c?c():"";e("Failed "+a+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ec=o,ec}var tc,um;function C_(){if(um)return tc;um=1;var e=Hb(),t=T_(),n=jd(),r=Ub(),o=E_(),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 tc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(O){var V=O&&(c&&O[c]||O[u]);if(typeof V=="function")return V}var h="<<anonymous>>",f={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:x(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:P,oneOf:k,oneOfType:I,shape:M,exact:F};function p(O,V){return O===V?O!==0||1/O===1/V:O!==O&&V!==V}function m(O,V){this.message=O,this.data=V&&typeof V=="object"?V:{},this.stack=""}m.prototype=Error.prototype;function v(O){if(process.env.NODE_ENV!=="production")var V={},Z=0;function ne(Y,j,$,z,G,W,ee){if(z=z||h,W=W||$,ee!==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 xe=z+":"+$;!V[xe]&&Z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+z+"`. 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[xe]=!0,Z++)}}return j[$]==null?Y?j[$]===null?new m("The "+G+" `"+W+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new m("The "+G+" `"+W+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:O(j,$,z,G,W)}var J=ne.bind(null,!1);return J.isRequired=ne.bind(null,!0),J}function g(O){function V(Z,ne,J,Y,j,$){var z=Z[ne],G=D(z);if(G!==O){var W=L(z);return new m("Invalid "+Y+" `"+j+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return v(V)}function x(){return v(i)}function y(O){function V(Z,ne,J,Y,j){if(typeof O!="function")return new m("Property `"+j+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var $=Z[ne];if(!Array.isArray($)){var z=D($);return new m("Invalid "+Y+" `"+j+"` of type "+("`"+z+"` supplied to `"+J+"`, expected an array."))}for(var G=0;G<$.length;G++){var W=O($,G,J,Y,j+"["+G+"]",n);if(W instanceof Error)return W}return null}return v(V)}function T(){function O(V,Z,ne,J,Y){var j=V[Z];if(!a(j)){var $=D(j);return new m("Invalid "+J+" `"+Y+"` of type "+("`"+$+"` supplied to `"+ne+"`, expected a single ReactElement."))}return null}return v(O)}function S(){function O(V,Z,ne,J,Y){var j=V[Z];if(!e.isValidElementType(j)){var $=D(j);return new m("Invalid "+J+" `"+Y+"` of type "+("`"+$+"` supplied to `"+ne+"`, expected a single ReactElement type."))}return null}return v(O)}function E(O){function V(Z,ne,J,Y,j){if(!(Z[ne]instanceof O)){var $=O.name||h,z=U(Z[ne]);return new m("Invalid "+Y+" `"+j+"` of type "+("`"+z+"` supplied to `"+J+"`, expected ")+("instance of `"+$+"`."))}return null}return v(V)}function k(O){if(!Array.isArray(O))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(Z,ne,J,Y,j){for(var $=Z[ne],z=0;z<O.length;z++)if(p($,O[z]))return null;var G=JSON.stringify(O,function(ee,B){var xe=L(B);return xe==="symbol"?String(B):B});return new m("Invalid "+Y+" `"+j+"` of value `"+String($)+"` "+("supplied to `"+J+"`, expected one of "+G+"."))}return v(V)}function P(O){function V(Z,ne,J,Y,j){if(typeof O!="function")return new m("Property `"+j+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var $=Z[ne],z=D($);if(z!=="object")return new m("Invalid "+Y+" `"+j+"` of type "+("`"+z+"` supplied to `"+J+"`, expected an object."));for(var G in $)if(r($,G)){var W=O($,G,J,Y,j+"."+G,n);if(W instanceof Error)return W}return null}return v(V)}function I(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var V=0;V<O.length;V++){var Z=O[V];if(typeof Z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(Z)+" at index "+V+"."),i}function ne(J,Y,j,$,z){for(var G=[],W=0;W<O.length;W++){var ee=O[W],B=ee(J,Y,j,$,z,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&G.push(B.data.expectedType)}var xe=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new m("Invalid "+$+" `"+z+"` supplied to "+("`"+j+"`"+xe+"."))}return v(ne)}function C(){function O(V,Z,ne,J,Y){return R(V[Z])?null:new m("Invalid "+J+" `"+Y+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return v(O)}function N(O,V,Z,ne,J){return new m((O||"React class")+": "+V+" type `"+Z+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function M(O){function V(Z,ne,J,Y,j){var $=Z[ne],z=D($);if(z!=="object")return new m("Invalid "+Y+" `"+j+"` of type `"+z+"` "+("supplied to `"+J+"`, expected `object`."));for(var G in O){var W=O[G];if(typeof W!="function")return N(J,Y,j,G,L(W));var ee=W($,G,J,Y,j+"."+G,n);if(ee)return ee}return null}return v(V)}function F(O){function V(Z,ne,J,Y,j){var $=Z[ne],z=D($);if(z!=="object")return new m("Invalid "+Y+" `"+j+"` of type `"+z+"` "+("supplied to `"+J+"`, expected `object`."));var G=t({},Z[ne],O);for(var W in G){var ee=O[W];if(r(O,W)&&typeof ee!="function")return N(J,Y,j,W,L(ee));if(!ee)return new m("Invalid "+Y+" `"+j+"` key `"+W+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(Z[ne],null," ")+`
196
- Valid keys: `+JSON.stringify(Object.keys(O),null," "));var B=ee($,W,J,Y,j+"."+W,n);if(B)return B}return null}return v(V)}function R(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(R);if(O===null||a(O))return!0;var V=d(O);if(V){var Z=V.call(O),ne;if(V!==O.entries){for(;!(ne=Z.next()).done;)if(!R(ne.value))return!1}else for(;!(ne=Z.next()).done;){var J=ne.value;if(J&&!R(J[1]))return!1}}else return!1;return!0;default:return!1}}function A(O,V){return O==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function D(O){var V=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":A(V,O)?"symbol":V}function L(O){if(typeof O>"u"||O===null)return""+O;var V=D(O);if(V==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return V}function H(O){var V=L(O);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function U(O){return!O.constructor||!O.constructor.name?h:O.constructor.name}return f.checkPropTypes=o,f.resetWarningCache=o.resetWarningCache,f.PropTypes=f,f},tc}var nc,dm;function P_(){if(dm)return nc;dm=1;var e=jd();function t(){}function n(){}return n.resetWarningCache=t,nc=function(){function r(i,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var 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},nc}if(process.env.NODE_ENV!=="production"){var R_=Hb(),k_=!0;tu.exports=C_()(R_.isElement,k_)}else tu.exports=P_()();var I_=tu.exports;const Be=tx(I_);function Zo(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(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function Xo(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 fm(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 hm(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))}var O_=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 si(e,t){var n=A_(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 A_(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=O_.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var __=[".DS_Store","Thumbs.db"];function M_(e){return Zo(this,void 0,void 0,function(){return Xo(this,function(t){return la(e)&&D_(e.dataTransfer)?[2,L_(e.dataTransfer,e.type)]:j_(e)?[2,N_(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,F_(e)]:[2,[]]})})}function D_(e){return la(e)}function j_(e){return la(e)&&la(e.target)}function la(e){return typeof e=="object"&&e!==null}function N_(e){return nu(e.target.files).map(function(t){return si(t)})}function F_(e){return Zo(this,void 0,void 0,function(){var t;return Xo(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 si(r)})]}})})}function L_(e,t){return Zo(this,void 0,void 0,function(){var n,r;return Xo(this,function(o){switch(o.label){case 0:return e.items?(n=nu(e.items).filter(function(s){return s.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(V_))]):[3,2];case 1:return r=o.sent(),[2,pm(Gb(r))];case 2:return[2,pm(nu(e.files).map(function(s){return si(s)}))]}})})}function pm(e){return e.filter(function(t){return __.indexOf(t.name)===-1})}function nu(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function V_(e){if(typeof e.webkitGetAsEntry!="function")return mm(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Yb(t):mm(e)}function Gb(e){return e.reduce(function(t,n){return hm(hm([],fm(t),!1),fm(Array.isArray(n)?Gb(n):[n]),!1)},[])}function mm(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=si(t);return Promise.resolve(n)}function $_(e){return Zo(this,void 0,void 0,function(){return Xo(this,function(t){return[2,e.isDirectory?Yb(e):B_(e)]})})}function Yb(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function s(){var i=this;t.readEntries(function(a){return Zo(i,void 0,void 0,function(){var l,c,u;return Xo(this,function(d){switch(d.label){case 0:if(a.length)return[3,5];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=d.sent(),n(l),[3,4];case 3:return c=d.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(a.map($_)),o.push(u),s(),d.label=6;case 6:return[2]}})})},function(a){r(a)})}s()})}function B_(e){return Zo(this,void 0,void 0,function(){return Xo(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var s=si(o,e.fullPath);n(s)},function(o){r(o)})})]})})}var W_=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 gm(e){return U_(e)||H_(e)||Kb(e)||z_()}function z_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U_(e){if(Array.isArray(e))return ru(e)}function ym(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 vm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ym(Object(n),!0).forEach(function(r){qb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ym(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t){return q_(e)||Y_(e,t)||Kb(e,t)||G_()}function G_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kb(e,t){if(e){if(typeof e=="string")return ru(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 ru(e,t)}}function ru(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 Y_(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 q_(e){if(Array.isArray(e))return e}var K_="file-invalid-type",Z_="file-too-large",X_="file-too-small",Q_="too-many-files",J_=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:K_,message:"File type must be ".concat(n)}},bm=function(t){return{code:Z_,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},xm=function(t){return{code:X_,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},eM={code:Q_,message:"Too many files"};function Zb(e,t){var n=e.type==="application/x-moz-file"||W_(e,t);return[n,n?null:J_(t)]}function Xb(e,t,n){if(Tr(e.size))if(Tr(t)&&Tr(n)){if(e.size>n)return[!1,bm(n)];if(e.size<t)return[!1,xm(t)]}else{if(Tr(t)&&e.size<t)return[!1,xm(t)];if(Tr(n)&&e.size>n)return[!1,bm(n)]}return[!0,null]}function Tr(e){return e!=null}function tM(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=Zb(l,n),u=Ns(c,1),d=u[0],h=Xb(l,r,o),f=Ns(h,1),p=f[0],m=a?a(l):null;return d&&p&&!m})}function ca(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ti(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 wm(e){e.preventDefault()}function nM(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function rM(e){return e.indexOf("Edge/")!==-1}function oM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return nM(e)||rM(e)}function cn(){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!ca(r)&&a&&a.apply(void 0,[r].concat(s)),ca(r)})}}function sM(){return"showOpenFilePicker"in window}function iM(e){if(Tr(e)){var t=Object.entries(e).filter(function(n){var r=Ns(n,2),o=r[0],s=r[1],i=!0;return Qb(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(Jb))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var o=Ns(r,2),s=o[0],i=o[1];return vm(vm({},n),{},qb({},s,i))},{});return[{description:"Files",accept:t}]}return e}function aM(e){if(Tr(e))return Object.entries(e).reduce(function(t,n){var r=Ns(n,2),o=r[0],s=r[1];return[].concat(gm(t),[o],gm(s))},[]).filter(function(t){return Qb(t)||Jb(t)}).join(",")}function lM(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function cM(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Qb(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Jb(e){return/^.*\.[\w]+$/.test(e)}var uM=["children"],dM=["open"],fM=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],hM=["refKey","onChange","onClick"];function pM(e){return yM(e)||gM(e)||e0(e)||mM()}function mM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yM(e){if(Array.isArray(e))return ou(e)}function rc(e,t){return xM(e)||bM(e,t)||e0(e,t)||vM()}function vM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e0(e,t){if(e){if(typeof e=="string")return ou(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 ou(e,t)}}function ou(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 bM(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 xM(e){if(Array.isArray(e))return e}function Sm(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 Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sm(Object(n),!0).forEach(function(r){su(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function su(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){if(e==null)return{};var n=wM(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 wM(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 Nd=b.forwardRef(function(e,t){var n=e.children,r=ua(e,uM),o=n0(r),s=o.open,i=ua(o,dM);return b.useImperativeHandle(t,function(){return{open:s}},[s]),b.createElement(b.Fragment,null,n(Qe(Qe({},i),{},{open:s})))});Nd.displayName="Dropzone";var t0={disabled:!1,getFilesFromEvent:M_,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};Nd.defaultProps=t0;Nd.propTypes={children:Be.func,accept:Be.objectOf(Be.arrayOf(Be.string)),multiple:Be.bool,preventDropOnDocument:Be.bool,noClick:Be.bool,noKeyboard:Be.bool,noDrag:Be.bool,noDragEventsBubbling:Be.bool,minSize:Be.number,maxSize:Be.number,maxFiles:Be.number,disabled:Be.bool,getFilesFromEvent:Be.func,onFileDialogCancel:Be.func,onFileDialogOpen:Be.func,useFsAccessApi:Be.bool,autoFocus:Be.bool,onDragEnter:Be.func,onDragLeave:Be.func,onDragOver:Be.func,onDrop:Be.func,onDropAccepted:Be.func,onDropRejected:Be.func,onError:Be.func,validator:Be.func};var iu={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function n0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Qe(Qe({},t0),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,d=t.onDragOver,h=t.onDrop,f=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,k=t.noDragEventsBubbling,P=t.onError,I=t.validator,C=b.useMemo(function(){return aM(n)},[n]),N=b.useMemo(function(){return iM(n)},[n]),M=b.useMemo(function(){return typeof v=="function"?v:Tm},[v]),F=b.useMemo(function(){return typeof m=="function"?m:Tm},[m]),R=b.useRef(null),A=b.useRef(null),D=b.useReducer(SM,iu),L=rc(D,2),H=L[0],U=L[1],O=H.isFocused,V=H.isFileDialogActive,Z=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&sM()),ne=function(){!Z.current&&V&&setTimeout(function(){if(A.current){var ie=A.current.files;ie.length||(U({type:"closeDialog"}),F())}},300)};b.useEffect(function(){return window.addEventListener("focus",ne,!1),function(){window.removeEventListener("focus",ne,!1)}},[A,V,F,Z]);var J=b.useRef([]),Y=function(ie){R.current&&R.current.contains(ie.target)||(ie.preventDefault(),J.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",wm,!1),document.addEventListener("drop",Y,!1)),function(){y&&(document.removeEventListener("dragover",wm),document.removeEventListener("drop",Y))}},[R,y]),b.useEffect(function(){return!r&&x&&R.current&&R.current.focus(),function(){}},[R,x,r]);var j=b.useCallback(function(Q){P?P(Q):console.error(Q)},[P]),$=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Pe(Q),J.current=[].concat(pM(J.current),[Q.target]),Ti(Q)&&Promise.resolve(o(Q)).then(function(ie){if(!(ca(Q)&&!k)){var Oe=ie.length,Ge=Oe>0&&tM({files:ie,accept:C,minSize:i,maxSize:s,multiple:a,maxFiles:l,validator:I}),St=Oe>0&&!Ge;U({isDragAccept:Ge,isDragReject:St,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Q)}}).catch(function(ie){return j(ie)})},[o,c,j,k,C,i,s,a,l,I]),z=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Pe(Q);var ie=Ti(Q);if(ie&&Q.dataTransfer)try{Q.dataTransfer.dropEffect="copy"}catch{}return ie&&d&&d(Q),!1},[d,k]),G=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Pe(Q);var ie=J.current.filter(function(Ge){return R.current&&R.current.contains(Ge)}),Oe=ie.indexOf(Q.target);Oe!==-1&&ie.splice(Oe,1),J.current=ie,!(ie.length>0)&&(U({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ti(Q)&&u&&u(Q))},[R,u,k]),W=b.useCallback(function(Q,ie){var Oe=[],Ge=[];Q.forEach(function(St){var kt=Zb(St,C),jt=rc(kt,2),mr=jt[0],Wr=jt[1],zr=Xb(St,i,s),ci=rc(zr,2),rl=ci[0],ol=ci[1],sl=I?I(St):null;if(mr&&rl&&!sl)Oe.push(St);else{var il=[Wr,ol];sl&&(il=il.concat(sl)),Ge.push({file:St,errors:il.filter(function(Z0){return Z0})})}}),(!a&&Oe.length>1||a&&l>=1&&Oe.length>l)&&(Oe.forEach(function(St){Ge.push({file:St,errors:[eM]})}),Oe.splice(0)),U({acceptedFiles:Oe,fileRejections:Ge,type:"setFiles"}),h&&h(Oe,Ge,ie),Ge.length>0&&p&&p(Ge,ie),Oe.length>0&&f&&f(Oe,ie)},[U,a,C,i,s,l,h,f,p,I]),ee=b.useCallback(function(Q){Q.preventDefault(),Q.persist(),Pe(Q),J.current=[],Ti(Q)&&Promise.resolve(o(Q)).then(function(ie){ca(Q)&&!k||W(ie,Q)}).catch(function(ie){return j(ie)}),U({type:"reset"})},[o,W,j,k]),B=b.useCallback(function(){if(Z.current){U({type:"openDialog"}),M();var Q={multiple:a,types:N};window.showOpenFilePicker(Q).then(function(ie){return o(ie)}).then(function(ie){W(ie,null),U({type:"closeDialog"})}).catch(function(ie){lM(ie)?(F(ie),U({type:"closeDialog"})):cM(ie)?(Z.current=!1,A.current?(A.current.value=null,A.current.click()):j(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."))):j(ie)});return}A.current&&(U({type:"openDialog"}),M(),A.current.value=null,A.current.click())},[U,M,F,g,W,j,N,a]),xe=b.useCallback(function(Q){!R.current||!R.current.isEqualNode(Q.target)||(Q.key===" "||Q.key==="Enter"||Q.keyCode===32||Q.keyCode===13)&&(Q.preventDefault(),B())},[R,B]),Ue=b.useCallback(function(){U({type:"focus"})},[]),ze=b.useCallback(function(){U({type:"blur"})},[]),tt=b.useCallback(function(){T||(oM()?setTimeout(B,0):B())},[T,B]),ce=function(ie){return r?null:ie},Ee=function(ie){return S?null:ce(ie)},le=function(ie){return E?null:ce(ie)},Pe=function(ie){k&&ie.stopPropagation()},at=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=Q.refKey,Oe=ie===void 0?"ref":ie,Ge=Q.role,St=Q.onKeyDown,kt=Q.onFocus,jt=Q.onBlur,mr=Q.onClick,Wr=Q.onDragEnter,zr=Q.onDragOver,ci=Q.onDragLeave,rl=Q.onDrop,ol=ua(Q,fM);return Qe(Qe(su({onKeyDown:Ee(cn(St,xe)),onFocus:Ee(cn(kt,Ue)),onBlur:Ee(cn(jt,ze)),onClick:ce(cn(mr,tt)),onDragEnter:le(cn(Wr,$)),onDragOver:le(cn(zr,z)),onDragLeave:le(cn(ci,G)),onDrop:le(cn(rl,ee)),role:typeof Ge=="string"&&Ge!==""?Ge:"presentation"},Oe,R),!r&&!S?{tabIndex:0}:{}),ol)}},[R,xe,Ue,ze,tt,$,z,G,ee,S,E,r]),Re=b.useCallback(function(Q){Q.stopPropagation()},[]),pt=b.useMemo(function(){return function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ie=Q.refKey,Oe=ie===void 0?"ref":ie,Ge=Q.onChange,St=Q.onClick,kt=ua(Q,hM),jt=su({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:ce(cn(Ge,ee)),onClick:ce(cn(St,Re)),tabIndex:-1},Oe,A);return Qe(Qe({},jt),kt)}},[A,n,a,ee,r]);return Qe(Qe({},H),{},{isFocused:O&&!r,getRootProps:at,getInputProps:pt,rootRef:R,inputRef:A,open:ce(B)})}function SM(e,t){switch(t.type){case"focus":return Qe(Qe({},e),{},{isFocused:!0});case"blur":return Qe(Qe({},e),{},{isFocused:!1});case"openDialog":return Qe(Qe({},iu),{},{isFileDialogActive:!0});case"closeDialog":return Qe(Qe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Qe(Qe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Qe(Qe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Qe({},iu);default:return e}}function Tm(){}const TM={isImage:e=>e.type.includes("image")},EM=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(TM.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:nm(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:nm(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(ho,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(xo,{})})]}):w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[w.jsx(BP,{size:48}),w.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(ho,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(xo,{className:"text-danger"})})]})},CM=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(EM,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),PM=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(CM,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),RM=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(qP,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),kM=({idle:e=RM,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,s]=b.useState([]),i=d=>{n==null||n(d),s(d)},{getRootProps:a,getInputProps:l,isDragActive:c}=n0({onDrop:i});return w.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:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(PM,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},IM=["INPUT","SELECT"],au=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{IM.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},OM=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},AM=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:He("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),jr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:s,interactive:i,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:d,left:h,error:f,...p},m)=>{const v=zt(),g=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const T=g.current,S=Oa(g.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=g.current)==null?void 0:T.focus()};return w.jsx(Ka,{container:c,error:f,feedback:o,hideLeft:u,left:h,info:n,optionalText:l,rightLabel:a,interactive:i,form:p.form,id:p.name||p.id,name:p.name,labelClassName:s,title:p.title,placeholder:p.placeholder,required:e,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(yv,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Du(m,g),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:He("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.jsx("option",{...T,children:T.label??T.value},`${x}-select-option-${T.value}`))]})})}),lu=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},_M=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const s=b.useId(),[i,a]=b.useState(r.checked??!1),l=i,c=b.useRef(null),u=lu(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=f=>{f.target.checked=!f.target.checked,u.current&&u.current(f)};return c.current.addEventListener("change",h),()=>{var f;return(f=c.current)==null?void 0:f.removeEventListener("change",h)}}},[]);const d=()=>{var f,p;const h=!((f=c.current)!=null&&f.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:He("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||s,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:d,"aria-checked":l,"data-checked":l,"aria-labelledby":`${s}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),MM=e=>{const[t,n]=PP();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=s=>{const i=s.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(i);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:AP(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,ref:t})},Za=0,fr=1,Qo=2,r0=4;function Fs(e,t){return n=>e(t(n))}function DM(e,t){return t(e)}function o0(e,t){return n=>e(t,n)}function Em(e,t){return()=>e(t)}function Xa(e,t){return t(e),e}function Xe(...e){return e}function jM(e){e()}function Cm(e){return()=>e}function NM(...e){return()=>{e.map(jM)}}function Fd(e){return e!==void 0}function $r(){}function Ve(e,t){return e(fr,t)}function ve(e,t){e(Za,t)}function Ld(e){e(Qo)}function At(e){return e(r0)}function ue(e,t){return Ve(e,o0(t,Za))}function Pn(e,t){const n=e(fr,r=>{n(),t(r)});return n}function Ce(){const e=[];return(t,n)=>{switch(t){case Qo:e.splice(0,e.length);return;case fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case Za:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=Ce();return(r,o)=>{switch(r){case fr:o(t);break;case Za:t=o;break;case r0:return t}return n(r,o)}}function FM(e){let t,n;const r=()=>t&&t();return function(o,s){switch(o){case fr:return s?n===s?void 0:(r(),n=s,t=Ve(e,s),t):(r(),$r);case Qo:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Gt(e){return Xa(Ce(),t=>ue(e,t))}function _t(e,t){return Xa(X(t),n=>ue(e,n))}function LM(...e){return t=>e.reduceRight(DM,t)}function q(e,...t){const n=LM(...t);return(r,o)=>{switch(r){case fr:return Ve(e,n(o));case Qo:Ld(e);return}}}function s0(e,t){return e===t}function Ze(e=s0){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function he(e){return t=>n=>{e(n)&&t(n)}}function se(e){return t=>Fs(t,e)}function hn(e){return t=>()=>t(e)}function vn(e,t){return n=>r=>n(t=e(t,r))}function ko(e){return t=>n=>{e>0?e--:t(n)}}function Kn(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function Pm(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function be(...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);Ve(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 Rm(...e){return function(t,n){switch(t){case fr:return NM(...e.map(r=>Ve(r,n)));case Qo:return;default:throw new Error(`unrecognized action ${t}`)}}}function me(e,t=s0){return q(e,Ze(t))}function wt(...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);Ve(s,l=>{n[i]=l,r=r|a,r===o&&ve(t,n)})}),function(s,i){switch(s){case fr:return r===o&&i(n),Ve(t,i);case Qo:return Ld(t);default:throw new Error(`unrecognized action ${s}`)}}}function De(e,t=[],{singleton:n}={singleton:!0}){return{id:VM(),constructor:e,dependencies:t,singleton:n}}const VM=()=>Symbol();function $M(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 BM(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 Ei=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Vd(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(g,x){g.propsReady&&ve(g.propsReady,!1);for(const y of r){const T=g[t.required[y]];ve(T,x[y])}for(const y of o)if(y in x){const T=g[t.optional[y]];ve(T,x[y])}g.propsReady&&ve(g.propsReady,!0)}function c(g){return s.reduce((x,y)=>(x[y]=T=>{const S=g[t.methods[y]];ve(S,T)},x),{})}function u(g){return i.reduce((x,y)=>(x[y]=FM(g[t.events[y]]),x),{})}const d=b.forwardRef((g,x)=>{const{children:y,...T}=g,[S]=b.useState(()=>Xa($M(e),k=>l(k,T))),[E]=b.useState(Em(u,S));return Ei(()=>{for(const k of i)k in T&&Ve(E[k],T[k]);return()=>{Object.values(E).map(Ld)}},[T,E,S]),Ei(()=>{l(S,T)}),b.useImperativeHandle(x,Cm(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,BM([...r,...o,...i],T),y):y)}),h=g=>b.useCallback(o0(ve,b.useContext(a)[g]),[g]),f=g=>{const y=b.useContext(a)[g],T=b.useCallback(S=>Ve(y,S),[y]);return b.useSyncExternalStore(T,()=>At(y),()=>At(y))},p=g=>{const y=b.useContext(a)[g],[T,S]=b.useState(Em(At,y));return Ei(()=>Ve(y,E=>{E!==T&&S(Cm(E))}),[y,T]),T},m=b.version.startsWith("18")?f:p;return{Component:d,usePublisher:h,useEmitterValue:m,useEmitter:(g,x)=>{const T=b.useContext(a)[g];Ei(()=>Ve(T,x),[x,T])}}}const WM=typeof document<"u"?b.useLayoutEffect:b.useEffect,zM=WM;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 HM={0:"debug",1:"log",2:"warn",3:"error"},UM=()=>typeof globalThis>"u"?window:globalThis,hr=De(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var s;const i=(s=UM().VIRTUOSO_LOG_LEVEL)!=null?s:At(e);o>=i&&console[HM[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function $d(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 Rn(e,t=!0){return $d(e,t).callbackRef}function i0(e,t,n,r,o,s,i){const a=b.useCallback(l=>{const c=GM(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const d=u.lastElementChild.dataset.viewportType==="window",h=i?i.scrollTop:d?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,f=i?i.scrollHeight:d?document.documentElement.scrollHeight:u.scrollHeight,p=i?i.offsetHeight:d?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:f,viewportHeight:p}),s==null||s(YM("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,s,i,r]);return $d(a,n)}function GM(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 d=s[s.length-1];s.length===0||d.size!==u||d.endIndex!==l-1?s.push({startIndex:l,endIndex:l,size:u}):s[s.length-1].endIndex++}return s}function YM(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 an(e,t){return Math.round(e.getBoundingClientRect()[t])}function a0(e,t){return Math.abs(e-t)<1.01}function l0(e,t,n,r=$r,o){const s=b.useRef(null),i=b.useRef(null),a=b.useRef(null),l=b.useCallback(d=>{const h=d.target,f=h===window||h===document,p=f?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=f?document.documentElement.scrollHeight:h.scrollHeight,v=f?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};d.suppressFlushSync?g():og.flushSync(g),i.current!==null&&(p===i.current||p<=0||p===m-v)&&(i.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const d=o||s.current;return r(o||s.current),l({target:d,suppressFlushSync:!0}),d.addEventListener("scroll",l,{passive:!0}),()=>{r(null),d.removeEventListener("scroll",l)}},[s,l,n,r,o]);function c(d){const h=s.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const f=d.behavior==="smooth";let p,m,v;h===window?(m=Math.max(an(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=an(h,"height"),v=h.scrollTop);const g=m-p;if(d.top=Math.ceil(Math.max(Math.min(g,d.top),0)),a0(p,m)||d.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),f&&t(!0);return}f?(i.current=d.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,i.current=null,t(!0)},1e3)):i.current=null,h.scrollTo(d)}function u(d){s.current.scrollBy(d)}return{scrollerRef:s,scrollByCallback:u,scrollToCallback:c}}const Lt=De(()=>{const e=Ce(),t=Ce(),n=X(0),r=Ce(),o=X(0),s=Ce(),i=Ce(),a=X(0),l=X(0),c=X(0),u=X(0),d=Ce(),h=Ce(),f=X(!1);return ue(q(e,se(({scrollTop:p})=>p)),t),ue(q(e,se(({scrollHeight:p})=>p)),i),ue(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:s,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:i,smoothScrollTargetReached:r,scrollTo:d,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:f}},[],{singleton:!0}),Ls={lvl:0};function c0(e,t,n,r=Ls,o=Ls){return{k:e,v:t,lvl:n,l:r,r:o}}function We(e){return e===Ls}function io(){return Ls}function cu(e,t){if(We(e))return Ls;const{k:n,l:r,r:o}=e;if(t===n){if(We(r))return o;if(We(o))return r;{const[s,i]=u0(r);return ji(gt(e,{k:s,v:i,l:d0(r)}))}}else return t<n?ji(gt(e,{l:cu(r,t)})):ji(gt(e,{r:cu(o,t)}))}function Vs(e,t){if(!We(e))return t===e.k?e.v:t<e.k?Vs(e.l,t):Vs(e.r,t)}function ln(e,t,n="k"){if(We(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return ln(e.l,t,n)}function Ut(e,t,n){return We(e)?c0(t,n,1):t===e.k?gt(e,{k:t,v:n}):t<e.k?km(gt(e,{l:Ut(e.l,t,n)})):km(gt(e,{r:Ut(e.r,t,n)}))}function uu(e,t,n){if(We(e))return[];const{k:r,v:o,l:s,r:i}=e;let a=[];return r>t&&(a=a.concat(uu(s,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(uu(i,t,n))),a}function kr(e){return We(e)?[]:[...kr(e.l),{k:e.k,v:e.v},...kr(e.r)]}function u0(e){return We(e.r)?[e.k,e.v]:u0(e.r)}function d0(e){return We(e.r)?e.l:ji(gt(e,{r:d0(e.r)}))}function gt(e,t){return c0(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 We(e)||e.lvl>e.r.lvl}function km(e){return du(h0(e))}function ji(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 h0(gt(e,{lvl:r-1}));if(!We(t)&&!We(t.r))return gt(t.r,{l:gt(t,{r:t.r.l}),r:gt(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(oc(e))return du(gt(e,{lvl:r-1}));if(!We(n)&&!We(n.l)){const o=n.l,s=oc(o)?n.lvl-1:n.lvl;return gt(o,{l:gt(e,{r:o.l,lvl:r-1}),r:du(gt(n,{l:o.r,lvl:s})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function Qa(e,t,n){if(We(e))return[];const r=ln(e,t)[0];return qM(uu(e,r,n))}function f0(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 qM(e){return f0(e,({k:t,v:n})=>({index:t,value:n}))}function du(e){const{r:t,lvl:n}=e;return!We(t)&&!We(t.r)&&t.lvl===n&&t.r.lvl===n?gt(t,{l:gt(e,{r:t.l}),lvl:n+1}):e}function h0(e){const{l:t}=e;return!We(t)&&t.lvl===e.lvl?gt(t,{r:gt(e,{l:t.r})}):e}function da(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 p0(e,t,n){return e[da(e,t,n)]}function KM(e,t,n,r){const o=da(e,t,r),s=da(e,n,r,o);return e.slice(o,s+1)}const Bd=De(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function ZM(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 Im(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 XM(e,t){let n=We(e)?0:1/0;for(const r of t){const{size:o,startIndex:s,endIndex:i}=r;if(n=Math.min(n,s),We(e)){e=Ut(e,0,o);continue}const a=Qa(e,s-1,i+1);if(a.some(ZM(r)))continue;let l=!1,c=!1;for(const{start:u,end:d,value:h}of a)l?(i>=u||o===h)&&(e=cu(e,u)):(c=h!==o,l=!0),d>i&&i>=u&&h!==o&&(e=Ut(e,i+1,h));c&&(e=Ut(e,s,o))}return[e,n]}function QM(){return{offsetTree:[],sizeTree:io(),groupOffsetTree:io(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Wd({index:e},t){return t===e?0:t<e?-1:1}function JM({offset:e},t){return t===e?0:t<e?-1:1}function eD(e){return{index:e.index,value:e}}function tD(e,t,n,r=0){return r>0&&(t=Math.max(t,p0(e,r,Wd).offset)),f0(KM(e,t,n,JM),eD)}function fu(e,t,n,r){let o=e,s=0,i=0,a=0,l=0;if(t!==0){l=da(o,t-1,Wd),a=o[l].offset;const u=ln(n,t-1);s=u[0],i=u[1],o.length&&o[l].size===ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Qa(n,t,1/0)){const d=c-s,h=d*i+a+d*r;o.push({offset:h,size:u,index:c}),s=c,a=h,i=u}return{offsetTree:o,lastIndex:s,lastOffset:a,lastSize:i}}function nD(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&&We(s)&&t.length===2){const h=t[0].size,f=t[1].size;i=n.reduce((p,m)=>Ut(Ut(p,m,h),m+1,f),i)}else[i,a]=XM(i,t);if(i===s)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:d}=fu(e.offsetTree,a,i,o);return{sizeTree:i,offsetTree:l,lastIndex:c,lastOffset:d,lastSize:u,groupOffsetTree:n.reduce((h,f)=>Ut(h,f,$s(f,l,o)),io()),groupIndices:n}}function $s(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:s}=p0(t,e,Wd),i=e-o,a=s*i+(i-1)*n+r;return a>0?a+n:a}function rD(e){return typeof e.groupIndex<"u"}function m0(e,t,n){if(rD(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=g0(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function g0(e,t){if(!Ja(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ja(e){return!We(e.groupOffsetTree)}function oD(e){return kr(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 sD={offsetHeight:"height",offsetWidth:"width"},In=De(([{log:e},{recalcInProgress:t}])=>{const n=Ce(),r=Ce(),o=_t(r,0),s=Ce(),i=Ce(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),d=X((S,E)=>an(S,sD[E])),h=X(void 0),f=X(0),p=QM(),m=_t(q(n,be(l,e,f),vn(nD,p),Ze()),p),v=_t(q(l,Ze(),vn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),se(({prev:S})=>S)),[]);ue(q(l,he(S=>S.length>0),be(m,f),se(([S,E,k])=>{const P=S.reduce((I,C,N)=>Ut(I,C,$s(C,E.offsetTree,k)||N),io());return{...E,groupIndices:S,groupOffsetTree:P}})),m),ue(q(r,be(m),he(([S,{lastIndex:E}])=>S<E),se(([S,{lastIndex:E,lastSize:k}])=>[{startIndex:S,endIndex:E,size:k}])),n),ue(c,u);const g=_t(q(c,se(S=>S===void 0)),!0);ue(q(u,he(S=>S!==void 0&&We(At(m).sizeTree)),se(S=>[{startIndex:0,endIndex:0,size:S}])),n);const x=Gt(q(n,be(m),vn(({sizes:S},[E,k])=>({changed:k!==S,sizes:k}),{changed:!1,sizes:p}),se(S=>S.changed)));Ve(q(a,vn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),se(S=>S.diff)),S=>{const{groupIndices:E}=At(m);if(S>0)ve(t,!0),ve(s,S+Im(S,E));else if(S<0){const k=At(v);k.length>0&&(S-=Im(-S,k)),ve(i,S)}}),Ve(q(a,be(e)),([S,E])=>{S<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 y=Gt(s);ue(q(s,be(m),se(([S,E])=>{const k=E.groupIndices.length>0,P=[],I=E.lastSize;if(k){const C=Vs(E.sizeTree,0);let N=0,M=0;for(;N<S;){const A=E.groupIndices[M],D=E.groupIndices.length===M+1?1/0:E.groupIndices[M+1]-A-1;P.push({startIndex:A,endIndex:A,size:C}),P.push({startIndex:A+1,endIndex:A+1+D-1,size:I}),M++,N+=D+1}const F=kr(E.sizeTree);return N!==S&&F.shift(),F.reduce((A,{k:D,v:L})=>{let H=A.ranges;return A.prevSize!==0&&(H=[...A.ranges,{startIndex:A.prevIndex,endIndex:D+S-1,size:A.prevSize}]),{ranges:H,prevIndex:D+S,prevSize:L}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return kr(E.sizeTree).reduce((C,{k:N,v:M})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:N+S-1,size:C.prevSize}],prevIndex:N+S,prevSize:M}),{ranges:[],prevIndex:0,prevSize:I}).ranges})),n);const T=Gt(q(i,be(m,f),se(([S,{offsetTree:E},k])=>{const P=-S;return $s(P,E,k)})));return ue(q(i,be(m,f),se(([S,E,k])=>{if(E.groupIndices.length>0){if(We(E.sizeTree))return E;let I=io();const C=At(v);let N=0,M=0,F=0;for(;N<-S;){F=C[M];const A=C[M+1]-F-1;M++,N+=A+1}if(I=kr(E.sizeTree).reduce((A,{k:D,v:L})=>Ut(A,Math.max(0,D+S),L),I),N!==-S){const A=Vs(E.sizeTree,F);I=Ut(I,0,A);const D=ln(E.sizeTree,-S+1)[1];I=Ut(I,1,D)}return{...E,sizeTree:I,...fu(E.offsetTree,0,I,k)}}else{const I=kr(E.sizeTree).reduce((C,{k:N,v:M})=>Ut(C,Math.max(0,N+S),M),io());return{...E,sizeTree:I,...fu(E.offsetTree,0,I,k)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:s,shiftWith:i,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:f,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:g,itemSize:d}},Xe(hr,Bd),{singleton:!0}),iD=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function y0(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!iD)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const ii=De(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:s,scrollTo:i,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:d},{log:h}])=>{const f=Ce(),p=Ce(),m=X(0);let v=null,g=null,x=null;function y(){v&&(v(),v=null),x&&(x(),x=null),g&&(clearTimeout(g),g=null),ve(o,!1)}return ue(q(f,be(e,s,t,m,l,c,h),be(r,u,d),se(([[T,S,E,k,P,I,C,N],M,F,R])=>{const A=y0(T),{align:D,behavior:L,offset:H}=A,U=k-1,O=m0(A,S,U);let V=$s(O,S.offsetTree,M)+I;D==="end"?(V+=F+ln(S.sizeTree,O)[1]-E+R,O===U&&(V+=C)):D==="center"?V+=(F+ln(S.sizeTree,O)[1]-E+R)/2:V-=P,H&&(V+=H);const Z=ne=>{y(),ne?(N("retrying to scroll to",{location:T},Yt.DEBUG),ve(f,T)):(ve(p,!0),N("list did not change, scroll successful",{},Yt.DEBUG))};if(y(),L==="smooth"){let ne=!1;x=Ve(n,J=>{ne=ne||J}),v=Pn(a,()=>{Z(ne)})}else v=Pn(q(n,aD(150)),Z);return g=setTimeout(()=>{y()},1200),ve(o,!0),N("scrolling from index to",{index:O,top:V,behavior:L},Yt.DEBUG),{top:V,behavior:L}})),i),{scrollToIndex:f,scrollTargetReached:p,topListHeight:m}},Xe(In,Lt,hr),{singleton:!0});function aD(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const Bs="up",Es="down",lD="none",cD={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},uD=0,ai=De(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:s}])=>{const i=X(!1),a=X(!0),l=Ce(),c=Ce(),u=X(4),d=X(uD),h=_t(q(Rm(q(me(t),ko(1),hn(!0)),q(me(t),ko(1),hn(!1),Pm(100))),Ze()),!1),f=_t(q(Rm(q(s,hn(!0)),q(s,hn(!1),Pm(200))),Ze()),!1);ue(q(wt(me(t),me(d)),se(([x,y])=>x<=y),Ze()),a),ue(q(a,Kn(50)),c);const p=Gt(q(wt(e,me(n),me(r),me(o),me(u)),vn((x,[{scrollTop:y,scrollHeight:T},S,E,k,P])=>{const I=y+S-T>-P,C={viewportHeight:S,scrollTop:y,scrollHeight:T};if(I){let M,F;return y>x.state.scrollTop?(M="SCROLLED_DOWN",F=x.state.scrollTop-y):(M="SIZE_DECREASED",F=x.state.scrollTop-y||x.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:M,scrollTopDelta:F}}let N;return C.scrollHeight>x.state.scrollHeight?N="SIZE_INCREASED":S<x.state.viewportHeight?N="VIEWPORT_HEIGHT_DECREASING":y<x.state.scrollTop?N="SCROLLING_UPWARDS":N="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:N,state:C}},cD),Ze((x,y)=>x&&x.atBottom===y.atBottom))),m=_t(q(e,vn((x,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(a0(x.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return x.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:x.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),he(x=>x.changed),se(x=>x.jump)),0);ue(q(p,se(x=>x.atBottom)),i),ue(q(i,Kn(50)),l);const v=X(Es);ue(q(e,se(({scrollTop:x})=>x),Ze(),vn((x,y)=>At(f)?{direction:x.direction,prevScrollTop:y}:{direction:y<x.prevScrollTop?Bs:Es,prevScrollTop:y},{direction:Es,prevScrollTop:0}),se(x=>x.direction)),v),ue(q(e,Kn(50),hn(lD)),v);const g=X(0);return ue(q(h,he(x=>!x),hn(0)),g),ue(q(t,Kn(100),be(h),he(([x,y])=>!!y),vn(([x,y],[T])=>[y,T],[0,0]),se(([x,y])=>y-x)),g),{isScrolling:h,isAtTop:a,isAtBottom:i,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:d,scrollVelocity:g,lastJumpDueToItemResize:m}},Xe(Lt)),pr=De(([{log:e}])=>{const t=X(!1),n=Gt(q(t,he(r=>r),Ze()));return Ve(t,r=>{r&&At(e)("props updated",{},Yt.DEBUG)}),{propsReady:t,didMount:n}},Xe(hr),{singleton:!0});function zd(e,t){e==0?t():requestAnimationFrame(()=>zd(e-1,t))}function Hd(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const li=De(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:s},{didMount:i}])=>{const a=X(!0),l=X(0),c=X(!0);return ue(q(i,be(l),he(([u,d])=>!!d),hn(!1)),a),ue(q(i,be(l),he(([u,d])=>!!d),hn(!1)),c),Ve(q(wt(t,i),be(a,e,n,c),he(([[,u],d,{sizeTree:h},f,p])=>u&&(!We(h)||Fd(f))&&!d&&!p),be(l)),([,u])=>{Pn(s,()=>{ve(c,!0)}),zd(4,()=>{Pn(r,()=>{ve(a,!0)}),ve(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Xe(In,Lt,ii,pr),{singleton:!0});function Om(e){return e?e==="smooth"?"smooth":"auto":!1}const dD=(e,t)=>typeof e=="function"?Om(e(t)):t&&Om(e),fD=De(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:s},{propsReady:i,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),d=Ce();let h=null;function f(m){ve(o,{index:"LAST",align:"end",behavior:m})}Ve(q(wt(q(me(e),ko(1)),a),be(me(u),n,s,c),se(([[m,v],g,x,y,T])=>{let S=v&&y,E="auto";return S&&(E=dD(g,x||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),he(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=Pn(t,()=>{At(l)("following output to ",{totalCount:m},Yt.DEBUG),f(v),h=null})});function p(m){const v=Pn(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(At(l)("scrolling to bottom due to increased size",{},Yt.DEBUG),f("auto"))});setTimeout(v,100)}return Ve(q(wt(me(u),e,i),he(([m,,v])=>m&&v),vn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),he(({refreshed:m})=>m),be(u,e)),([,m])=>{At(s)&&p(m!==!1)}),Ve(d,()=>{p(At(u)!==!1)}),Ve(wt(me(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&f("auto")}),{followOutput:u,autoscrollToBottom:d}},Xe(In,ai,ii,li,pr,hr,Lt));function hD(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const v0=De(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const s=Ce(),i=Ce(),a=Gt(q(s,se(hD)));return ue(q(a,se(l=>l.totalCount)),e),ue(q(a,se(l=>l.groupIndices)),t),ue(q(wt(r,n,o),he(([l,c])=>Ja(c)),se(([l,c,u])=>ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),Ze(),se(l=>[l])),i),{groupCounts:s,topItemsIndexes:i}},Xe(In,Lt));function Ws(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function b0(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const fa="top",ha="bottom",Am="none";function _m(e,t,n){return typeof e=="number"?n===Bs&&t===fa||n===Es&&t===ha?e:0:n===Bs?t===fa?e.main:e.reverse:t===ha?e.main:e.reverse}function Mm(e,t){return typeof e=="number"?e:e[t]||0}const Ud=De(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const s=Ce(),i=X(0),a=X(0),l=X(0),c=_t(q(wt(me(e),me(t),me(r),me(s,Ws),me(l),me(i),me(o),me(n),me(a)),se(([u,d,h,[f,p],m,v,g,x,y])=>{const T=u-x,S=v+g,E=Math.max(h-T,0);let k=Am;const P=Mm(y,fa),I=Mm(y,ha);return f-=x,f+=h+g,p+=h+g,p-=x,f>u+S-P&&(k=Bs),p<u-E+d+I&&(k=Es),k!==Am?[Math.max(T-h-_m(m,fa,k)-P,0),T-E-g+d+_m(m,ha,k)+I]:null}),he(u=>u!=null),Ze(Ws)),[0,0]);return{listBoundary:s,overscan:l,topListHeight:i,increaseViewportBy:a,visibleRange:c}},Xe(Lt),{singleton:!0});function pD(e,t,n){if(Ja(t)){const r=g0(e,t);return[{index:ln(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 sc={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Dm(e,t,n){if(e.length===0)return[];if(!Ja(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=Qa(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 Ni(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 d=n-l,h=a+d*i+(d-1)*r,f=c,p=h-u;return{items:Dm(e,o,s),topItems:Dm(t,o,s),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:f,bottom:u,totalCount:n,firstItemIndex:s}}function x0(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=Hd(t,a),c=Array.from({length:a}).map((u,d)=>({index:d+l,size:0,offset:0,data:s[d+l]}));return Ni(c,[],a,o,n,r)}const Br=De(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},s,{visibleRange:i,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:d},h,{didMount:f},{recalcInProgress:p}])=>{const m=X([]),v=X(0),g=Ce();ue(s.topItemsIndexes,m);const x=_t(q(wt(f,p,me(i,Ws),me(t),me(e),me(u),c,me(m),me(r),me(o),n),he(([E,k,,P,,,,,,,I])=>{const C=I&&I.length!==P;return E&&!k&&!C}),se(([,,[E,k],P,I,C,N,M,F,R,A])=>{const D=I,{sizeTree:L,offsetTree:H}=D,U=At(v);if(P===0)return{...sc,totalCount:P};if(E===0&&k===0)return U===0?{...sc,totalCount:P}:x0(U,C,I,F,R,A||[]);if(We(L))return U>0?null:Ni(pD(Hd(C,P),D,A),[],P,R,D,F);const O=[];if(M.length>0){const Y=M[0],j=M[M.length-1];let $=0;for(const z of Qa(L,Y,j)){const G=z.value,W=Math.max(z.start,Y),ee=Math.min(z.end,j);for(let B=W;B<=ee;B++)O.push({index:B,size:G,offset:$,data:A&&A[B]}),$+=G}}if(!N)return Ni([],O,P,R,D,F);const V=M.length>0?M[M.length-1]+1:0,Z=tD(H,E,k,V);if(Z.length===0)return null;const ne=P-1,J=Xa([],Y=>{for(const j of Z){const $=j.value;let z=$.offset,G=j.start;const W=$.size;if($.offset<E){G+=Math.floor((E-$.offset+R)/(W+R));const B=G-j.start;z+=B*W+B*R}G<V&&(z+=(V-G)*W,G=V);const ee=Math.min(j.end,ne);for(let B=G;B<=ee&&!(z>=k);B++)Y.push({index:B,size:W,offset:z,data:A&&A[B]}),z+=W+R}});return Ni(J,O,P,R,D,F)}),he(E=>E!==null),Ze()),sc);ue(q(n,he(Fd),se(E=>E==null?void 0:E.length)),t),ue(q(x,se(E=>E.topListHeight)),d),ue(d,l),ue(q(x,se(E=>[E.top,E.bottom])),a),ue(q(x,se(E=>E.items)),g);const y=Gt(q(x,he(({items:E})=>E.length>0),be(t,n),he(([{items:E},k])=>E[E.length-1].originalIndex===k-1),se(([,E,k])=>[E-1,k]),Ze(Ws),se(([E])=>E))),T=Gt(q(x,Kn(200),he(({items:E,topItems:k})=>E.length>0&&E[0].originalIndex===k.length),se(({items:E})=>E[0].index),Ze())),S=Gt(q(x,he(({items:E})=>E.length>0),se(({items:E})=>{let k=0,P=E.length-1;for(;E[k].type==="group"&&k<P;)k++;for(;E[P].type==="group"&&P>k;)P--;return{startIndex:E[k].index,endIndex:E[P].index}}),Ze(b0)));return{listState:x,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:g,initialItemCount:v,...h}},Xe(In,v0,Ud,li,ii,ai,pr,Bd),{singleton:!0}),mD=De(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:s,listState:i},{didMount:a}])=>(ue(q(a,be(s),he(([,l])=>l!==0),be(o,e,t,r,n),se(([[,l],c,u,d,h,f=[]])=>x0(l,c,u,d,h,f))),i),{}),Xe(In,li,Br,pr),{singleton:!0}),w0=De(([{scrollVelocity:e}])=>{const t=X(!1),n=Ce(),r=X(!1);return ue(q(e,be(r,t,n),he(([o,s])=>!!s),se(([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}),Ze()),t),Ve(q(wt(t,e,n),be(r)),([[o,s,i],a])=>o&&a&&a.change&&a.change(s,i)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Xe(ai),{singleton:!0}),gD=De(([{topItemsIndexes:e}])=>{const t=X(0);return ue(q(t,he(n=>n>0),se(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Xe(Br)),S0=De(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const s=Ce(),i=_t(q(wt(e,r,t,n,o),se(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return ue(me(i),s),{totalListHeight:i,totalListHeightChanged:s}},Xe(Lt,Br),{singleton:!0});function T0(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const yD=T0(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),vD=De(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:s,scrollDirection:i,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:d,gap:h},{log:f},{recalcInProgress:p}])=>{const m=Gt(q(l,be(a),vn(([,g,x,y],[{items:T,totalCount:S,bottom:E,offsetBottom:k},P])=>{const I=E+k;let C=0;return x===S&&g.length>0&&T.length>0&&(T[0].originalIndex===0&&g[0].originalIndex===0||(C=I-y,C!==0&&(C+=P))),[C,T,S,I]},[0,[],0,0]),he(([g])=>g!==0),be(t,i,r,s,f,p),he(([,g,x,y,,,T])=>!T&&!y&&g!==0&&x===Bs),se(([[g],,,,,x])=>(x("Upward scrolling compensation",{amount:g},Yt.DEBUG),g))));function v(g){g>0?(ve(e,{top:-g,behavior:"auto"}),ve(n,0)):(ve(n,0),ve(e,{top:-g,behavior:"auto"}))}return Ve(q(m,be(n,o)),([g,x,y])=>{y&&yD()?ve(n,x-g):v(-g)}),Ve(q(wt(_t(o,!1),n,p),he(([g,x,y])=>!g&&!y&&x!==0),se(([g,x])=>x),Kn(1)),v),ue(q(u,se(g=>({top:-g}))),e),Ve(q(c,be(d,h),se(([g,{lastSize:x,groupIndices:y,sizeTree:T},S])=>{function E(k){return k*(x+S)}if(y.length===0)return E(g);{let k=0;const P=Vs(T,0);let I=0,C=0;for(;I<g;){I++,k+=P;let N=y.length===C+1?1/0:y[C+1]-y[C]-1;I+N>g&&(k-=P,N=g-I+1),I+=N,k+=E(N),C++}return k}})),g=>{ve(n,g),requestAnimationFrame(()=>{ve(e,{top:g}),requestAnimationFrame(()=>{ve(n,0),ve(p,!1)})})}),{deviation:n}},Xe(Lt,ai,Br,In,hr,Bd)),bD=De(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return Ve(q(e,be(r),he(([,o])=>o!==0),se(([,o])=>({top:o}))),o=>{Pn(q(n,ko(1),he(s=>s.items.length>1)),()=>{requestAnimationFrame(()=>{ve(t,o)})})}),{initialScrollTop:r}},Xe(pr,Lt,Br),{singleton:!0}),xD=De(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=_t(q(wt(n,e,t),he(([o])=>o),se(([,o,s])=>Math.max(0,o-s)),Kn(0),Ze()),0);return{alignToBottom:n,paddingTopAddition:r}},Xe(Lt,S0),{singleton:!0}),Gd=De(([{scrollTo:e,scrollContainerState:t}])=>{const n=Ce(),r=Ce(),o=Ce(),s=X(!1),i=X(void 0);return ue(q(wt(n,r),se(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),ue(q(e,be(r),se(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:s,customScrollParent:i,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Xe(Lt)),wD=({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,SD=De(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:s,fixedHeaderHeight:i,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=Ce();return ue(q(u,be(e,o,t,s,i,a,r),be(n),se(([[d,h,f,p,m,v,g,x],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:k=wD,...P}=d,I=m0(d,h,p-1),C=$s(I,h.offsetTree,y)+m+v,N=C+ln(h.sizeTree,I)[1],M=x+v,F=x+f-g,R=k({itemTop:C,itemBottom:N,viewportTop:M,viewportBottom:F,locationParams:{behavior:S,align:E,...P}});return R?T&&Pn(q(l,he(A=>A===!1),ko(At(l)?1:2)),T):T&&T(),R}),he(d=>d!==null)),c),{scrollIntoView:u}},Xe(In,Lt,ii,Br,hr),{singleton:!0}),TD=De(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:s},{useWindowScroll:i,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ce(),u=X(void 0),d=X(null),h=X(null);return ue(a,d),ue(l,h),Ve(q(c,be(e,n,i,d,h,r)),([f,p,m,v,g,x,y])=>{const T=oD(p.sizeTree);v&&g!==null&&x!==null&&(m=g.scrollTop-x.offsetTop),m-=y,f({ranges:T,scrollTop:m})}),ue(q(u,he(Fd),se(ED)),o),ue(q(s,be(u),he(([,f])=>f!==void 0),Ze(),se(([,f])=>f.ranges)),t),{getState:c,restoreStateFrom:u}},Xe(In,Lt,li,pr,Gd));function ED(e){return{offset:e.scrollTop,index:0,align:"start"}}const CD=De(([e,t,n,r,o,s,i,a,l,c])=>({...e,...t,...n,...r,...o,...s,...i,...a,...l,...c}),Xe(Ud,mD,pr,w0,S0,bD,xD,Gd,SD,hr)),E0=De(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:s,data:i,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:d},{initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p},m,v,g,{listState:x,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:k},{groupCounts:P},I])=>(ue(T.rangeChanged,I.scrollSeekRangeChanged),ue(q(I.windowViewportRect,se(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:i,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:f,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:k,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:c,listState:x,scrollToIndex:S,trackItemSizes:o,itemSize:s,groupIndices:l,...T,...I,...m,sizes:d,...v}),Xe(In,li,Lt,TD,fD,Br,ii,vD,gD,v0,CD)),ic="-webkit-sticky",jm="sticky",C0=T0(()=>{if(typeof document>"u")return jm;const e=document.createElement("div");return e.style.position=ic,e.style.position===ic?ic:jm});function Yd(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,d;if(t){const h=t.getBoundingClientRect(),f=l.top-h.top;u=h.height-Math.max(0,f),d=f+t.scrollTop}else u=window.innerHeight-Math.max(0,l.top),d=l.top+window.pageYOffset;n.current={offsetTop:d,visibleHeight:u,visibleWidth:c},e(n.current)},[e,t]),{callbackRef:o,ref:s}=$d(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 el=b.createContext(void 0),P0=b.createContext(void 0);function qd(e){return e}const PD=De(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X(qd),s=X("div"),i=X($r),a=(l,c=null)=>_t(q(r,se(u=>u[l]),Ze()),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")}}),RD=De(([e,t])=>({...e,...t}),Xe(E0,PD)),kD=({height:e})=>b.createElement("div",{style:{height:e}}),ID={position:C0(),zIndex:1,overflowAnchor:"none"},OD={overflowAnchor:"none"},Nm=b.memo(function({showTopList:t=!1}){const n=Te("listState"),r=Jt("sizeRanges"),o=Te("useWindowScroll"),s=Te("customScrollParent"),i=Jt("windowScrollContainerState"),a=Jt("scrollContainerState"),l=s||o?i:a,c=Te("itemContent"),u=Te("context"),d=Te("groupContent"),h=Te("trackItemSizes"),f=Te("itemSize"),p=Te("log"),m=Jt("gap"),{callbackRef:v}=i0(r,f,h,t?$r:l,p,m,s),[g,x]=b.useState(0);Xd("deviation",R=>{g!==R&&x(R)});const y=Te("EmptyPlaceholder"),T=Te("ScrollSeekPlaceholder")||kD,S=Te("ListComponent"),E=Te("ItemComponent"),k=Te("GroupComponent"),P=Te("computeItemKey"),I=Te("isSeeking"),C=Te("groupIndices").length>0,N=Te("alignToBottom"),M=Te("initialItemFinalLocationReached"),F=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:N?"auto":0,...M?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,ot(y,u)):b.createElement(S,{...ot(S,u),ref:v,style:F,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(R=>{const A=R.originalIndex,D=P(A+n.firstItemIndex,R.data,u);return I?b.createElement(T,{...ot(T,u),key:D,index:R.index,height:R.size,type:R.type||"item",...R.type==="group"?{}:{groupIndex:R.groupIndex}}):R.type==="group"?b.createElement(k,{...ot(k,u),key:D,"data-index":A,"data-known-size":R.size,"data-item-index":R.index,style:ID},d(R.index,u)):b.createElement(E,{...ot(E,u),...R0(E,R.data),key:D,"data-index":A,"data-known-size":R.size,"data-item-index":R.index,"data-item-group-index":R.groupIndex,style:OD},C?c(R.index,R.groupIndex,R.data,u):c(R.index,R.data,u))}))}),AD={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Jo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),_D={width:"100%",position:C0(),top:0,zIndex:1};function ot(e,t){if(typeof e!="string")return{context:t}}function R0(e,t){return{item:typeof e=="string"?void 0:t}}const MD=b.memo(function(){const t=Te("HeaderComponent"),n=Jt("headerHeight"),r=Te("headerFooterTag"),o=Rn(b.useMemo(()=>i=>n(an(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,s))):null}),DD=b.memo(function(){const t=Te("FooterComponent"),n=Jt("footerHeight"),r=Te("headerFooterTag"),o=Rn(b.useMemo(()=>i=>n(an(i,"height")),[n])),s=Te("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,s))):null});function Kd({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"),d=n("scrollerRef"),h=n("context"),{scrollerRef:f,scrollByCallback:p,scrollToCallback:m}=l0(l,u,c,d);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:f,style:{...AD,...s},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...ot(c,h)},i)})}function Zd({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"),d=n("totalListHeight"),h=n("deviation"),f=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:g}=l0(l,u,c,$r,f);return zM(()=>(m.current=f||window,()=>{m.current=null}),[m,f]),t("windowScrollTo",g),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...s,...d!==0?{height:d+h}:{}},"data-virtuoso-scroller":!0,...a,...ot(c,p)},i)})}const jD=({children:e})=>{const t=b.useContext(el),n=Jt("viewportHeight"),r=Jt("fixedItemHeight"),o=Te("alignToBottom"),s=Rn(b.useMemo(()=>Fs(n,i=>an(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Jo(o),ref:s,"data-viewport-type":"element"},e)},ND=({children:e})=>{const t=b.useContext(el),n=Jt("windowViewportRect"),r=Jt("fixedItemHeight"),o=Te("customScrollParent"),s=Yd(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:Jo(i),"data-viewport-type":"window"},e)},FD=({children:e})=>{const t=Te("TopItemListComponent")||"div",n=Te("headerHeight"),r={..._D,marginTop:`${n}px`},o=Te("context");return b.createElement(t,{style:r,...ot(t,o)},e)},LD=b.memo(function(t){const n=Te("useWindowScroll"),r=Te("topItemsIndexes").length>0,o=Te("customScrollParent"),s=o||n?BD:$D,i=o||n?ND:jD;return b.createElement(s,{...t},r&&b.createElement(FD,null,b.createElement(Nm,{showTopList:!0})),b.createElement(i,null,b.createElement(MD,null),b.createElement(Nm,null),b.createElement(DD,null)))}),{Component:VD,usePublisher:Jt,useEmitterValue:Te,useEmitter:Xd}=Vd(RD,{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"}},LD),$D=Kd({usePublisher:Jt,useEmitterValue:Te,useEmitter:Xd}),BD=Zd({usePublisher:Jt,useEmitterValue:Te,useEmitter:Xd}),WD=VD,Fm={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},zD={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Lm,ceil:Vm,floor:pa,min:ac,max:Cs}=Math;function HD(e){return{...zD,items:e}}function $m(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 UD(e,t){return e&&e.column===t.column&&e.row===t.row}function Ci(e,t){return e&&e.width===t.width&&e.height===t.height}const GD=De(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:s,scrollTo:i,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},d,h,{propsReady:f,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:x,windowScrollTo:y},T])=>{const S=X(0),E=X(0),k=X(Fm),P=X({height:0,width:0}),I=X({height:0,width:0}),C=Ce(),N=Ce(),M=X(0),F=X(null),R=X({row:0,column:0}),A=Ce(),D=Ce(),L=X(!1),H=X(0),U=X(!0),O=X(!1);Ve(q(p,be(H),he(([j,$])=>!!$)),()=>{ve(U,!1),ve(E,0)}),Ve(q(wt(p,U,I,P,H,O),he(([j,$,z,G,,W])=>j&&!$&&z.height!==0&&G.height!==0&&!W)),([,,,,j])=>{ve(O,!0),zd(1,()=>{ve(C,j)}),Pn(q(r),()=>{ve(n,[0,0]),ve(U,!0)})}),ue(q(D,he(j=>j!=null&&j.scrollTop>0),hn(0)),E),Ve(q(p,be(D),he(([,j])=>j!=null)),([,j])=>{j&&(ve(P,j.viewport),ve(I,j==null?void 0:j.item),ve(R,j.gap),j.scrollTop>0&&(ve(L,!0),Pn(q(r,ko(1)),$=>{ve(L,!1)}),ve(i,{top:j.scrollTop})))}),ue(q(P,se(({height:j})=>j)),o),ue(q(wt(me(P,Ci),me(I,Ci),me(R,(j,$)=>j&&j.column===$.column&&j.row===$.row),me(r)),se(([j,$,z,G])=>({viewport:j,item:$,gap:z,scrollTop:G}))),A),ue(q(wt(me(S),t,me(R,UD),me(I,Ci),me(P,Ci),me(F),me(E),me(L),me(U),me(H)),he(([,,,,,,,j])=>!j),se(([j,[$,z],G,W,ee,B,xe,,Ue,ze])=>{const{row:tt,column:ce}=G,{height:Ee,width:le}=W,{width:Pe}=ee;if(xe===0&&(j===0||Pe===0))return Fm;if(le===0){const jt=Hd(ze,j),mr=jt===0?Math.max(xe-1,0):jt;return HD($m(jt,mr,B))}const at=k0(Pe,le,ce);let Re,pt;Ue?$===0&&z===0&&xe>0?(Re=0,pt=xe-1):(Re=at*pa(($+tt)/(Ee+tt)),pt=at*Vm((z+tt)/(Ee+tt))-1,pt=ac(j-1,Cs(pt,at-1)),Re=ac(pt,Cs(0,Re))):(Re=0,pt=-1);const Q=$m(Re,pt,B),{top:ie,bottom:Oe}=Bm(ee,G,W,Q),Ge=Vm(j/at),kt=Ge*Ee+(Ge-1)*tt-Oe;return{items:Q,offsetTop:ie,offsetBottom:kt,top:ie,bottom:Oe,itemHeight:Ee,itemWidth:le}})),k),ue(q(F,he(j=>j!==null),se(j=>j.length)),S),ue(q(wt(P,I,k,R),he(([j,$,{items:z}])=>z.length>0&&$.height!==0&&j.height!==0),se(([j,$,{items:z},G])=>{const{top:W,bottom:ee}=Bm(j,G,$,z);return[W,ee]}),Ze(Ws)),n);const V=X(!1);ue(q(r,be(V),se(([j,$])=>$||j!==0)),V);const Z=Gt(q(me(k),he(({items:j})=>j.length>0),be(S,V),he(([{items:j},$,z])=>z&&j[j.length-1].index===$-1),se(([,j])=>j-1),Ze())),ne=Gt(q(me(k),he(({items:j})=>j.length>0&&j[0].index===0),hn(0),Ze())),J=Gt(q(me(k),be(L),he(([{items:j},$])=>j.length>0&&!$),se(([{items:j}])=>({startIndex:j[0].index,endIndex:j[j.length-1].index})),Ze(b0),Kn(0)));ue(J,h.scrollSeekRangeChanged),ue(q(C,be(P,I,S,R),se(([j,$,z,G,W])=>{const ee=y0(j),{align:B,behavior:xe,offset:Ue}=ee;let ze=ee.index;ze==="LAST"&&(ze=G-1),ze=Cs(0,ze,ac(G-1,ze));let tt=hu($,W,z,ze);return B==="end"?tt=Lm(tt-$.height+z.height):B==="center"&&(tt=Lm(tt-$.height/2+z.height/2)),Ue&&(tt+=Ue),{top:tt,behavior:xe}})),i);const Y=_t(q(k,se(j=>j.offsetBottom+j.bottom)),0);return ue(q(m,se(j=>({width:j.visibleWidth,height:j.visibleHeight}))),P),{data:F,totalCount:S,viewportDimensions:P,itemDimensions:I,scrollTop:r,scrollHeight:N,overscan:e,scrollBy:s,scrollTo:i,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:x,deviation:M,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:R,restoreStateFrom:D,...h,initialTopMostItemIndex:H,gridState:k,totalListHeight:Y,...d,startReached:ne,endReached:Z,rangeChanged:J,stateChanged:A,propsReady:f,stateRestoreInProgress:L,...T}},Xe(Ud,Lt,ai,w0,pr,Gd,hr));function Bm(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const s=hu(e,t,n,r[0].index),i=hu(e,t,n,r[r.length-1].index)+o;return{top:s,bottom:i}}function hu(e,t,n,r){const o=k0(e.width,n.width,t.column),s=pa(r/o),i=s*n.height+Cs(0,s-1)*t.row;return i>0?i+t.row:i}function k0(e,t,n){return Cs(1,pa((e+n)/(pa(t)+n)))}const YD=De(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),s=X(qd),i=X("div"),a=X($r),l=(c,u=null)=>_t(q(t,se(d=>d[c]),Ze()),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")}}),qD=De(([e,t])=>({...e,...t}),Xe(GD,YD)),KD=b.memo(function(){const t=Je("gridState"),n=Je("listClassName"),r=Je("itemClassName"),o=Je("itemContent"),s=Je("computeItemKey"),i=Je("isSeeking"),a=rn("scrollHeight"),l=Je("ItemComponent"),c=Je("ListComponent"),u=Je("ScrollSeekPlaceholder"),d=Je("context"),h=rn("itemDimensions"),f=rn("gap"),p=Je("log"),m=Je("stateRestoreInProgress"),v=Rn(b.useMemo(()=>g=>{const x=g.parentElement.parentElement.scrollHeight;a(x);const y=g.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}f({row:Wm("row-gap",getComputedStyle(g).rowGap,p),column:Wm("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,f,p]));return m?null:b.createElement(c,{ref:v,className:n,...ot(c,d),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const x=s(g.index,g.data,d);return i?b.createElement(u,{key:x,...ot(u,d),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...ot(l,d),className:r,"data-index":g.index,key:x},o(g.index,g.data,d))}))}),ZD=b.memo(function(){const t=Je("HeaderComponent"),n=rn("headerHeight"),r=Je("headerFooterTag"),o=Rn(b.useMemo(()=>i=>n(an(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,s))):null}),XD=b.memo(function(){const t=Je("FooterComponent"),n=rn("footerHeight"),r=Je("headerFooterTag"),o=Rn(b.useMemo(()=>i=>n(an(i,"height")),[n])),s=Je("context");return t?b.createElement(r,{ref:o},b.createElement(t,ot(t,s))):null}),QD=({children:e})=>{const t=b.useContext(P0),n=rn("itemDimensions"),r=rn("viewportDimensions"),o=Rn(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:Jo(!1),ref:o},e)},JD=({children:e})=>{const t=b.useContext(P0),n=rn("windowViewportRect"),r=rn("itemDimensions"),o=Je("customScrollParent"),s=Yd(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:Jo(!1)},e)},ej=b.memo(function({...t}){const n=Je("useWindowScroll"),r=Je("customScrollParent"),o=r||n?nj:tj,s=r||n?JD:QD;return b.createElement(o,{...t},b.createElement(s,null,b.createElement(ZD,null),b.createElement(KD,null),b.createElement(XD,null)))}),{Component:SF,usePublisher:rn,useEmitterValue:Je,useEmitter:I0}=Vd(qD,{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"}},ej),tj=Kd({usePublisher:rn,useEmitterValue:Je,useEmitter:I0}),nj=Zd({usePublisher:rn,useEmitterValue:Je,useEmitter:I0});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 rj=De(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),s=X(qd),i=X($r),a=(l,c=null)=>_t(q(o,se(u=>u[l]),Ze()),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")}}),oj=De(([e,t])=>({...e,...t}),Xe(E0,rj)),sj=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),ij=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),aj={overflowAnchor:"none"},lj=b.memo(function(){const t=Fe("listState"),n=on("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),s=on("windowScrollContainerState"),i=on("scrollContainerState"),a=o||r?s:i,l=Fe("itemContent"),c=Fe("trackItemSizes"),u=Fe("itemSize"),d=Fe("log"),{callbackRef:h,ref:f}=i0(n,u,c,a,d,void 0,o),[p,m]=b.useState(0);Qd("deviation",D=>{p!==D&&(f.current.style.marginTop=`${D}px`,m(D))});const v=Fe("EmptyPlaceholder"),g=Fe("ScrollSeekPlaceholder")||sj,x=Fe("FillerRow")||ij,y=Fe("TableBodyComponent"),T=Fe("TableRowComponent"),S=Fe("computeItemKey"),E=Fe("isSeeking"),k=Fe("paddingTopAddition"),P=Fe("firstItemIndex"),I=Fe("statefulTotalCount"),C=Fe("context");if(I===0&&v)return b.createElement(v,ot(v,C));const N=t.offsetTop+k+p,M=t.offsetBottom,F=N>0?b.createElement(x,{height:N,key:"padding-top",context:C}):null,R=M>0?b.createElement(x,{height:M,key:"padding-bottom",context:C}):null,A=t.items.map(D=>{const L=D.originalIndex,H=S(L+P,D.data,C);return E?b.createElement(g,{...ot(g,C),key:H,index:D.index,height:D.size,type:D.type||"item"}):b.createElement(T,{...ot(T,C),...R0(T,D.data),key:H,"data-index":L,"data-known-size":D.size,"data-item-index":D.index,style:aj},l(D.index,D.data,C))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...ot(y,C)},[F,...A,R])}),cj=({children:e})=>{const t=b.useContext(el),n=on("viewportHeight"),r=on("fixedItemHeight"),o=Rn(b.useMemo(()=>Fs(n,s=>an(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Jo(!1),ref:o,"data-viewport-type":"element"},e)},uj=({children:e})=>{const t=b.useContext(el),n=on("windowViewportRect"),r=on("fixedItemHeight"),o=Fe("customScrollParent"),s=Yd(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:Jo(!1),"data-viewport-type":"window"},e)},dj=b.memo(function(t){const n=Fe("useWindowScroll"),r=Fe("customScrollParent"),o=on("fixedHeaderHeight"),s=on("fixedFooterHeight"),i=Fe("fixedHeaderContent"),a=Fe("fixedFooterContent"),l=Fe("context"),c=Rn(b.useMemo(()=>Fs(o,x=>an(x,"height")),[o])),u=Rn(b.useMemo(()=>Fs(s,x=>an(x,"height")),[s])),d=r||n?pj:hj,h=r||n?uj:cj,f=Fe("TableComponent"),p=Fe("TableHeadComponent"),m=Fe("TableFooterComponent"),v=i?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...ot(p,l)},i()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...ot(m,l)},a()):null;return b.createElement(d,{...t},b.createElement(h,null,b.createElement(f,{style:{borderSpacing:0,overflowAnchor:"none"},...ot(f,l)},[v,b.createElement(lj,{key:"TableBody"}),g])))}),{Component:fj,usePublisher:on,useEmitterValue:Fe,useEmitter:Qd}=Vd(oj,{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"}},dj),hj=Kd({usePublisher:on,useEmitterValue:Fe,useEmitter:Qd}),pj=Zd({usePublisher:on,useEmitterValue:Fe,useEmitter:Qd}),mj=fj,gj=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const s=()=>{n(o.clientHeight)};return o.addEventListener("resize",s),s(),()=>{o.removeEventListener("resize",s)}},[]),t},yj={Item:b.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},vj=e=>{const t=b.useRef(null),n=gj(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.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:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(oi,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(WD,{height:n,useWindowScroll:!0,data:e.source,components:yj,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(zb,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(ho,{children:w.jsx(ud,{})})}),w.jsx("div",{})]})};var bj=Object.defineProperty,zm=Object.getOwnPropertySymbols,xj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,Hm=(e,t,n)=>t in e?bj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sj=(e,t)=>{for(var n in t||(t={}))xj.call(t,n)&&Hm(e,n,t[n]);if(zm)for(var n of zm(t))wj.call(t,n)&&Hm(e,n,t[n]);return e},Jd=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},Tj=(e,t,n,r)=>tl(Jd,e,t,n,r),Io=e=>typeof e=="object",Qn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!Io(e)&&!Io(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=>Qn(e[r],t[r]))},Ej=(e,t)=>(Io(e)||Array.isArray(e))&&t?e[t]:e,Cj=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,ma=e=>/[0-9.]+/.test(e),Um=e=>["string","number"].includes(typeof e),Gm=e=>e==null||(e==null?void 0:e.length)===0||e==="",Ym={eq:Qn,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:Gm,notEmpty:e=>!Gm(e),in:(e,t)=>Jd(t,n=>Qn(e,n)),notIn:(e,t)=>O0(t,n=>!Qn(e,n))},Pj=e=>{if(e in Ym)return Ym[e];throw new Error("Linq - Symbol not found")},ao=(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},tl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const s=Pj(r);return n&&r&&o!==void 0?e(t,i=>s(i[n],o)):e(t,i=>s(i,o))},Rj=(e,t,n,r)=>tl(ao,e,t,n,r),O0=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},kj=(e,t,n,r)=>tl(O0,e,t,n,r),A0=e=>{if(e===null)return null;const t=Sj({},e);return Object.keys(t).forEach(n=>t[n]=Io(e[n])?A0(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},qm=(e,t)=>{if(Io(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Qn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Qn(t,r))return!0}return!1},Ij=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},Oj=e=>ao(e,(t,n,r)=>Io(t)?n===r.findIndex(o=>Qn(o,t)):n===r.indexOf(t)),Aj=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},_0=(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())},_j=(e,t)=>_0(e,n=>n[t]),Km=(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},Mj=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},Dj=(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 ma(e)&&ma(t)?r.map(i=>Number.parseInt(i)):r},lc=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&ma(e)&&ma(t)){const o=[],[s,i]=Mj(e,t);for(let a=s;a<=i;a+=r)o.push(a);return o}return Dj(e,t,r)},jj=(e,t,n=1)=>{if(t===void 0){const[r,o,s]=e.split("..");return s===void 0?lc(r,o,1):lc(r,s,Number.parseInt(o,10))}return Um(e)&&Um(t)?lc(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},cc=(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},Zm=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},Nj=(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)},Fj=(e,t,n,r)=>tl(Nj,e,t,n,r),Xm=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(Cj(t))},M0=(e=>(e.Asc="asc",e.Desc="desc",e))(M0||{}),Lj=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),Vj=(e,t)=>e.sort(Lj(t)),$j=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ao(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},Bj=class pu{constructor(t=[]){this.array=t}static Range(...t){return jj(...t)}static New(t){return new pu(t)}Where(t,n,r){return this.array=Rj(this.array,t,n,r),this}Some(t,n,r){return Tj(this.array,t,n,r)}All(t,n,r){return kj(this.array,t,n,r)}Reverse(){return this.array=Zm(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=Fj(this.array,t,n,r),this}Distinct(){return this.array=Oj(this.array),this}First(t){return t===void 0?this.array[0]:Aj(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?cc((n,r)=>n+r,0,this.array):cc((n,r)=>n+Ej(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return _j(this.array,t)}GroupWith(t){return _0(this.array,t)}Except(t){return ao(this.array,n=>!qm(t,n))}Intersect(t){return ao(this.array,n=>qm(t,n))}OrderBy(t,n){let r;return r=t?Xm(this.array,t):this.array.toSorted(),this.array=n==="desc"?Zm(r):r,this}Includes(t){return Jd(this.array,n=>Qn(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 cc(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(Km(this.array,n=>[t,n]))}Zip(t,n){return Km(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ao(this.array,t).length}Get(t){return this.array[t]}Clone(){return new pu(A0(this.array))}ToObject(t){return Ij(this.array,t)}Sort(t){return Array.isArray(t)?Vj(this.array,t):Xm(this.array,t)}Unique(t){return $j(this.array,t)}},D0=Bj,mu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,g)=>{try{Object.keys(v).forEach(g)}catch(x){window.console.log(x)}},n=v=>v==null,r=v=>{const g=typeof v;return g==="string"||g==="number"||g==="boolean"||n(v)},o=(v,g)=>{const x=g.getItem(v);try{return JSON.parse(x)}catch{return x??null}},s=v=>Object.keys(v).reduce((g,x)=>({...g,[x]:o(x,v)}),{}),i=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,g)=>(v[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(g=>g(v))},d=[{name:"expires",parse:v=>`expires=${i(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${i(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const g=v.domain??"";return g===""?"":`domain=${v.multiDomain?".":""}${g}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(g=>g.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const g=h.json()[v];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,g,x={})=>{const y=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=d.reduce((S,E)=>{const k=E.parse(x);return k===""?S:S.concat(k)},[`${encodeURIComponent(v)}=${y}`]).join(";");document.cookie=T,u()}},f=v=>{const g=new Set,x=y=>{v().removeItem(y);const T=s(v());g.forEach(S=>S(T))};return{delete:x,listener:y=>(g.add(y),()=>g.delete(y)),clearListeners:()=>g.clear(),json:(y=!1)=>y?s(v()):v(),has:y=>{const T=v().getItem(y);return!n(T)},deleteAll:()=>{t(v(),x),g.forEach(y=>y(v()))},get:y=>o(y,v()),set:(y,T)=>{v().setItem(y,JSON.stringify(T)),g.forEach(S=>S(v()))}}},p=f(()=>window.sessionStorage),m=f(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=f})(mu);const ef=e=>e.headerLabel??e.thead??e.id,tf=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var lo=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(lo||{});const nf=e=>e.type==="number"?e.valueAsNumber:e.value,Wj=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},zj={},Hj=(e,t=zj)=>{const n=Qi()?null:mu.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=gd({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 Qi()||mu.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>i(a)}});return{...r,...o,name:e}},gu=(e,t,n,r={})=>{var l;const o=e.id,s=e.type??lo.Text,i=(l=t[s])==null?void 0:l[0].value,a=n[i];return{id:Wa(),operation:a,label:ef(e),name:o,type:s,value:"",...r}},rf=()=>{const e=zt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[lo.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[lo.Boolean]:[t.is,t.isNot],[lo.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},Uj=e=>{const t=zt(),{operationOptions:n,operations:r}=rf(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,gu(c,n,r)])},s=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>{if(u!==f.id)return f;const p=e.cols.find(m=>d===m.id);return gu(p,n,r,{value:""})}))},i=c=>{const u=c.target.dataset.id||"",d=c.target.value;e.set(h=>h.map(f=>f.id===u?{...f,operation:r[d]}:f))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(d=>d.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",d=nf(c.target);e.set(h=>h.map(f=>f.id===u?{...f,value:d}:f))};return w.jsx(b.Fragment,{children:w.jsx(Ko,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(zP,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(jr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:s}),w.jsx(jr,{"data-id":c.id,onChange:i,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(oi,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:w.jsx(xo,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(dd,{size:14})," ",t.tableFilterNewFilter]})})]})})})},Gj=({filter:e,onDelete:t,set:n})=>{const r=zt(),{operationOptions:o,operations:s}=rf(),i=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(d=>d.map(h=>h.id===u?{...h,operation:s[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=nf(l.target);n(d=>d.map(h=>h.id===c?{...h,value:u}:h))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(jr,{"data-id":e.id,onChange:i,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(oi,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(xo,{className:"text-danger",size:14})})]})},Yj=({item:e,onPointerDown:t})=>{const n=bo(0);return w.jsxs($a.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(WP,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},qj=e=>{var l;const t=zt(),n=tf(e.cols),r=IP(),[o,s]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),i=c=>{var v;const u=c.target,d=u.value,h=u.options.selectedIndex,f=((v=u.options.item(h))==null?void 0:v.label)||"";s(f);const p=new D0(e.rows).GroupBy(d),m=e.cols.find(g=>g.id===d);e.setGroups(Gw(p).map((g,x)=>{const y=p[g];return{...m,groupId:Wa(),groupKey:d,index:x,rows:y,groupName:g}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(Ko,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(YP,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(jr,{value:o,title:"Tipo de agrupamento",onChange:i,options:n,placeholder:"Agrupar por..."}),w.jsx(ho,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(xo,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(ZC,{children:w.jsx($a.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>w.jsx(Yj,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},Kj=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 r!==0?r:a},0),Zj=(e,t)=>e.toSorted(Kj(t)),j0=(e,t,n)=>({id:Wa(),type:n,value:e.id,label:t}),Xj=e=>{const t=zt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,j0(l,n.asc.label,n.asc.value)])},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,value:u}:h))},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return w.jsx(b.Fragment,{children:w.jsx(Ko,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(gv,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(jr,{options:e.options,value:l.value,onChange:s(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(jr,{onChange:i(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(xo,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(dd,{size:14})," ",t.tableSortAddButton]})})]})})})},Qj=e=>{const t=zt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=j0(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const s=`${e.col.id}-sorter-id`,i=ef(e.col);return w.jsxs("button",{"aria-labelledby":s,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:s,className:"sr-only",children:[t.tableSortDropdownTitle," ",i]}),n==="asc"?w.jsx(NP,{size:14}):null,n==="desc"?w.jsx(jP,{size:14}):null,n==="undefined"?w.jsx(gv,{size:14}):null]})},Jj=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx(Uj,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(Xj,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(qj,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.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=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.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=nf(n.target);e.setFilters(o=>o.map(s=>t.id===s.id?{...s,value:r}:s))}})]})]},`filter-table-${t.id}`))})]})});function eN(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const 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 tN=e=>{const t=b.useId(),n=zt(),r=e.asLink||"button",o=b.useMemo(()=>eN(e.current,e.pages),[e.current,e.pages]),s=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(b.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(i.target.value))},children:e.sizes.map(i=>w.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(i=>i===null?null:w.jsx(b.Fragment,{children:typeof i=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:i,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${i===e.current?"text-primary border-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),s?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},nN={opacity:1},rN={opacity:.75,backgroundColor:"var(--table-border)"},oN={opacity:0,transition:{duration:.4,type:"spring"}},sN=e=>{var d;const t=zt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?HP:UP,{operationOptions:s,operations:i}=rf(),a=h=>{const f=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==f))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===M0.Asc?"ascending":"descending":"none",u=ef(e.header);return w.jsx($a.Item,{...e.header.thProps,as:"th",layout:!0,exit:oN,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:rN,"aria-sort":c,"aria-busy":e.loading,animate:nN,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((d=e.header.thProps)==null?void 0:d.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx(Ko,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:w.jsxs("span",{className:"font-medium text-lg",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(h=>w.jsx("li",{className:"my-1",children:w.jsx(Gj,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(gu(e.header,s,i))),type:"button",className:"flex items-center gap-1 text-primary",children:[w.jsx(dd,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?w.jsx(Qj,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},iN=e=>w.jsx($a.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:w.jsx(ei,{children:e.headers.map(t=>w.jsx(sN,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),N0=b.createContext({}),aN=()=>b.useContext(N0),lN=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(ei,{children:e.children})})),cN=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),uN=b.forwardRef(({context:e,...t},n)=>{var s;const r=aN(),o={...t==null?void 0:t.style,sticky:bn.number(r.sticky)?`${r.sticky}px`:(s=t==null?void 0:t.style)==null?void 0:s.sticky};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),dN=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),fN=b.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),hN={TableHead:uN,Table:cN,TableBody:lN,TableRow:dN,TableFoot:fN},pN=[0,0,0,0,0,0,0,0,0,0],mN=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((s,i)=>{var d;const a=`${i},${e}`,l=bd(t,s.id),c=s.Element,u=((d=s.cellProps)==null?void 0:d.className)||"";return b.createElement("td",{...s.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${i}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?w.jsx(c,{row:t,matrix:a,col:s,rowIndex:e,value:l}):w.jsx(b.Fragment,{children:bn.nil(l)?"":l}))})})},gN=()=>w.jsx(b.Fragment,{}),Qm=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:s,sorters:i,cols:a,border:l=!1,setSorters:c,...u})=>{const d=b.useRef(null),[h,f]=b.useState(!1),p=lu(n),m=lu(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return pN;if(r)return u.rows;const g=new D0(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:g.Where(x.name,x.operation.symbol,x.value)),i.length===0?g.Select():Zj(g.Select(),i)},[u.rows,e,i,u.loading]);return b.useEffect(()=>{if(d.current===null)return()=>{};const g=d.current,x=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void f(!0)):f(!1)});return x.observe(g),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[w.jsx(mj,{data:v,useWindowScroll:!0,components:hN,totalCount:v.length,itemContent:mN,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?gN:null,fixedHeaderContent:()=>w.jsx(iN,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:s,setSorters:c,sorters:i})}),w.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"})]}),t!==null?w.jsx(tN,{...t}):null]})},yN=(e,t)=>typeof t=="function"?t(e):t,Pi=(e,t,n)=>e===t||n==null?void 0:n(t),vN=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>tf(e.cols),[e.cols]),[o,s]=gd({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},i=>{const a=l=>c=>{const u=i.state();return{...u,[l]:yN(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(i,a)=>{var l;return console.log("->",i,a),(l=e.set)==null||l.call(e,i),Pi((a==null?void 0:a.filters)??[],i.filters??[],e.setFilters),Pi((a==null?void 0:a.sorters)??[],i.sorters??[],e.setSorters),Pi((a==null?void 0:a.groups)??[],i.groups??[],e.setGroups),Pi((a==null?void 0:a.cols)??[],i.cols??[],e.setCols),i}]});return w.jsx(N0.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full",children:[n?w.jsx(Jj,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters}):null,o.groups.length===0?w.jsx(Qm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((i,a)=>w.jsx(Ct.div,{className:"min-w-full",children:w.jsx(Qm,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:i,groups:o.groups,index:a,optionCols:r,options:r,rows:i.rows,setCols:s.cols,setFilters:s.filters,setGroups:s.groups,setSorters:s.sorters,sorters:o.sorters})},`group-${i.groupId}`))})]})})};var bN=String.prototype.replace,xN=/%20/g,uc={RFC1738:"RFC1738",RFC3986:"RFC3986"},of={default:uc.RFC3986,formatters:{RFC1738:function(e){return bN.call(e,xN,"+")},RFC3986:function(e){return String(e)}},RFC1738:uc.RFC1738,RFC3986:uc.RFC3986},wN=of,dc=Object.prototype.hasOwnProperty,Er=Array.isArray,un=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),SN=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Er(r)){for(var o=[],s=0;s<r.length;++s)typeof r[s]<"u"&&o.push(r[s]);n.obj[n.prop]=o}}},F0=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},TN=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Er(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!dc.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 Er(t)&&!Er(n)&&(o=F0(t,r)),Er(t)&&Er(n)?(n.forEach(function(s,i){if(dc.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 dc.call(s,i)?s[i]=e(s[i],a,r):s[i]=a,s},o)},EN=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},CN=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}},fc=1024,PN=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(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var a="",l=0;l<i.length;l+=fc){for(var c=i.length>=fc?i.slice(l,l+fc):i,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||s===wN.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=un[h];continue}if(h<2048){u[u.length]=un[192|h>>6]+un[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=un[224|h>>12]+un[128|h>>6&63]+un[128|h&63];continue}d+=1,h=65536+((h&1023)<<10|c.charCodeAt(d)&1023),u[u.length]=un[240|h>>18]+un[128|h>>12&63]+un[128|h>>6&63]+un[128|h&63]}a+=u.join("")}return a},RN=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 SN(n),t},kN=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},IN=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ON=function(t,n){return[].concat(t,n)},AN=function(t,n){if(Er(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},L0={arrayToObject:F0,assign:EN,combine:ON,compact:RN,decode:CN,encode:PN,isBuffer:IN,isRegExp:kN,maybeMap:AN,merge:TN},V0=Bw,Fi=L0,Ps=of,_N=Object.prototype.hasOwnProperty,$0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},dn=Array.isArray,MN=Array.prototype.push,B0=function(e,t){MN.apply(e,dn(t)?t:[t])},DN=Date.prototype.toISOString,Jm=Ps.default,mt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Fi.encode,encodeValuesOnly:!1,format:Jm,formatter:Ps.formatters[Jm],indices:!1,serializeDate:function(t){return DN.call(t)},skipNulls:!1,strictNullHandling:!1},jN=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},hc={},NN=function e(t,n,r,o,s,i,a,l,c,u,d,h,f,p,m,v,g,x){for(var y=t,T=x,S=0,E=!1;(T=T.get(hc))!==void 0&&!E;){var k=T.get(t);if(S+=1,typeof k<"u"){if(k===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(hc)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=f(y):r==="comma"&&dn(y)&&(y=Fi.maybeMap(y,function(O){return O instanceof Date?f(O):O})),y===null){if(i)return c&&!v?c(n,mt.encoder,g,"key",p):n;y=""}if(jN(y)||Fi.isBuffer(y)){if(c){var P=v?n:c(n,mt.encoder,g,"key",p);return[m(P)+"="+m(c(y,mt.encoder,g,"value",p))]}return[m(n)+"="+m(String(y))]}var I=[];if(typeof y>"u")return I;var C;if(r==="comma"&&dn(y))v&&c&&(y=Fi.maybeMap(y,c)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(dn(u))C=u;else{var N=Object.keys(y);C=d?N.sort(d):N}var M=l?n.replace(/\./g,"%2E"):n,F=o&&dn(y)&&y.length===1?M+"[]":M;if(s&&dn(y)&&y.length===0)return F+"[]";for(var R=0;R<C.length;++R){var A=C[R],D=typeof A=="object"&&typeof A.value<"u"?A.value:y[A];if(!(a&&D===null)){var L=h&&l?A.replace(/\./g,"%2E"):A,H=dn(y)?typeof r=="function"?r(F,L):F:F+(h?"."+L:"["+L+"]");x.set(t,S);var U=V0();U.set(hc,x),B0(I,e(D,H,r,o,s,i,a,l,r==="comma"&&v&&dn(y)?null:c,u,d,h,f,p,m,v,g,U))}}return I},FN=function(t){if(!t)return mt;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||mt.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=Ps.default;if(typeof t.format<"u"){if(!_N.call(Ps.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Ps.formatters[r],s=mt.filter;(typeof t.filter=="function"||dn(t.filter))&&(s=t.filter);var i;if(t.arrayFormat in $0?i=t.arrayFormat:"indices"in t?i=t.indices?"indices":"repeat":i=mt.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:mt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:mt.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:mt.allowEmptyArrays,arrayFormat:i,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:mt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?mt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:mt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:mt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:mt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:mt.encodeValuesOnly,filter:s,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:mt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:mt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:mt.strictNullHandling}},LN=function(e,t){var n=e,r=FN(t),o,s;typeof r.filter=="function"?(s=r.filter,n=s("",n)):dn(r.filter)&&(s=r.filter,o=s);var i=[];if(typeof n!="object"||n===null)return"";var a=$0[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=V0(),u=0;u<o.length;++u){var d=o[u];r.skipNulls&&n[d]===null||B0(i,NN(n[d],d,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 h=i.join(r.delimiter),f=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),h.length>0?f+h:""},Oo=L0,yu=Object.prototype.hasOwnProperty,VN=Array.isArray,lt={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Oo.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},$N=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},W0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},BN="utf8=%26%2310003%3B",WN="utf8=%E2%9C%93",zN=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]===WN?c="utf-8":i[l]===BN&&(c="iso-8859-1"),a=l,l=i.length);for(l=0;l<i.length;++l)if(l!==a){var u=i[l],d=u.indexOf("]="),h=d===-1?u.indexOf("="):d+1,f,p;h===-1?(f=n.decoder(u,lt.decoder,c,"key"),p=n.strictNullHandling?null:""):(f=n.decoder(u.slice(0,h),lt.decoder,c,"key"),p=Oo.maybeMap(W0(u.slice(h+1),n),function(v){return n.decoder(v,lt.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=$N(p)),u.indexOf("[]=")>-1&&(p=VN(p)?[p]:p);var m=yu.call(r,f);m&&n.duplicates==="combine"?r[f]=Oo.combine(r[f],p):(!m||n.duplicates==="last")&&(r[f]=p)}return r},HN=function(e,t,n,r){for(var o=r?t:W0(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},UN=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&&yu.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var d=0;r.depth>0&&(l=a.exec(s))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&yu.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+s.slice(l.index)+"]"),HN(u,n,r,o)}},GN=function(t){if(!t)return lt;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"?lt.charset:t.charset,r=typeof t.duplicates>"u"?lt.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:lt.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:lt.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:lt.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:lt.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:lt.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:lt.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:lt.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:lt.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:lt.decoder,delimiter:typeof t.delimiter=="string"||Oo.isRegExp(t.delimiter)?t.delimiter:lt.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:lt.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:lt.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:lt.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:lt.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:lt.strictNullHandling}},YN=function(e,t){var n=GN(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?zN(e,n):e,o=n.plainObjects?Object.create(null):{},s=Object.keys(r),i=0;i<s.length;++i){var a=s[i],l=UN(a,r[a],n,typeof e=="string");o=Oo.merge(o,l,n)}return n.allowSparse===!0?o:Oo.compact(o)},qN=LN,KN=YN,ZN=of,XN={formats:ZN,parse:KN,stringify:qN},Ie;(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})(Ie||(Ie={}));var eg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(eg||(eg={}));const oe=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cr=e=>{switch(typeof e){case"undefined":return oe.undefined;case"string":return oe.string;case"number":return isNaN(e)?oe.nan:oe.number;case"boolean":return oe.boolean;case"function":return oe.function;case"bigint":return oe.bigint;case"symbol":return oe.symbol;case"object":return Array.isArray(e)?oe.array:e===null?oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?oe.promise:typeof Map<"u"&&e instanceof Map?oe.map:typeof Set<"u"&&e instanceof Set?oe.set:typeof Date<"u"&&e instanceof Date?oe.date:oe.object;default:return oe.unknown}},K=Ie.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,Ie.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 zs=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.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}"`:Ie.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.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 K.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 K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ie.assertNever(e)}return{message:n}};let QN=zs;function vu(){return QN}const bu=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 te(e,t){const n=vu(),r=bu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===zs?void 0:zs].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 pe;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const 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 pe;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 pe=Object.freeze({status:"aborted"}),cs=e=>({status:"dirty",value:e}),Bt=e=>({status:"valid",value:e}),tg=e=>e.status==="aborted",ng=e=>e.status==="dirty",ga=e=>e.status==="valid",ya=e=>typeof Promise<"u"&&e instanceof Promise;function va(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 z0(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}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 us,ds;class kn{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 rg=(e,t)=>{if(ga(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 ge(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 we{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 Cr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:Cr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ya(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:Cr(t)},s=this._parseSync({data:t,path:o.path,parent:o});return rg(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:Cr(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(ya(o)?o:Promise.resolve(o));return rg(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:K.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 Vn({schema:this,typeName:fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Nn.create(this,this._def)}nullable(){return Lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sn.create(this,this._def)}promise(){return Us.create(this,this._def)}or(t){return wa.create([this,t],this._def)}and(t){return Sa.create(this,t,this._def)}transform(t){return new Vn({...ge(this._def),schema:this,typeName:fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ra({...ge(this._def),innerType:this,defaultValue:n,typeName:fe.ZodDefault})}brand(){return new Y0({typeName:fe.ZodBranded,type:this,...ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ka({...ge(this._def),innerType:this,catchValue:n,typeName:fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return nl.create(this,t)}readonly(){return Ia.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const JN=/^c[^\s-]{8,}$/i,eF=/^[0-9a-z]+$/,tF=/^[0-9A-HJKMNP-TV-Z]{26}$/,nF=/^[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,rF=/^[a-z0-9_-]{21}$/i,oF=/^[-+]?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)?)??$/,sF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,iF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let pc;const aF=/^(?:(?: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])$/,lF=/^(([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})))$/,cF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H0="((\\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])))",uF=new RegExp(`^${H0}$`);function U0(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 dF(e){return new RegExp(`^${U0(e)}$`)}function fF(e){let t=`${H0}T${U0(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 hF(e,t){return!!((t==="v4"||!t)&&aF.test(e)||(t==="v6"||!t)&&lF.test(e))}class Mn extends we{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==oe.string){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:oe.string,received:s.parsedType}),pe}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),te(o,{code:K.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),te(o,{code:K.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?te(o,{code:K.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&te(o,{code:K.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")sF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"email",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")pc||(pc=new RegExp(iF,"u")),pc.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"emoji",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")nF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"uuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")rF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"nanoid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")JN.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")eF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"cuid2",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")tF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ulid",code:K.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),te(o,{validation:"url",code:K.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),te(o,{validation:"regex",code:K.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),te(o,{code:K.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),te(o,{code:K.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?fF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?uF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?dF(s).test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{code:K.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?oF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"duration",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?hF(t.data,s.version)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"ip",code:K.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?cF.test(t.data)||(o=this._getOrReturnCtx(t,o),te(o,{validation:"base64",code:K.invalid_string,message:s.message}),r.dirty()):Ie.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:K.invalid_string,...ae.errToObj(r)})}_addCheck(t){return new Mn({...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 Mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mn({...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}}Mn.create=e=>{var t;return new Mn({checks:[],typeName:fe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ge(e)})};function pF(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 Nr extends we{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)!==oe.number){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:oe.number,received:s.parsedType}),pe}let r;const o=new Ft;for(const s of this._def.checks)s.kind==="int"?Ie.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.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),te(r,{code:K.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),te(r,{code:K.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?pF(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:K.not_finite,message:s.message}),o.dirty()):Ie.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 Nr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Nr({...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"&&Ie.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)}}Nr.create=e=>new Nr({checks:[],typeName:fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ge(e)});class Ao extends we{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)!==oe.bigint){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:oe.bigint,received:s.parsedType}),pe}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),te(r,{code:K.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),te(r,{code:K.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),te(r,{code:K.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Ie.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 Ao({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ae.toString(o)}]})}_addCheck(t){return new Ao({...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}}Ao.create=e=>{var t;return new Ao({checks:[],typeName:fe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ge(e)})};class xu extends we{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==oe.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.boolean,received:r.parsedType}),pe}return Bt(t.data)}}xu.create=e=>new xu({typeName:fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ge(e)});class Hs extends we{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==oe.date){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_type,expected:oe.date,received:s.parsedType}),pe}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return te(s,{code:K.invalid_date}),pe}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),te(o,{code:K.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),te(o,{code:K.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Ie.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hs({...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}}Hs.create=e=>new Hs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:fe.ZodDate,...ge(e)});class wu extends we{_parse(t){if(this._getType(t)!==oe.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.symbol,received:r.parsedType}),pe}return Bt(t.data)}}wu.create=e=>new wu({typeName:fe.ZodSymbol,...ge(e)});class ba extends we{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.undefined,received:r.parsedType}),pe}return Bt(t.data)}}ba.create=e=>new ba({typeName:fe.ZodUndefined,...ge(e)});class xa extends we{_parse(t){if(this._getType(t)!==oe.null){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.null,received:r.parsedType}),pe}return Bt(t.data)}}xa.create=e=>new xa({typeName:fe.ZodNull,...ge(e)});class Su extends we{constructor(){super(...arguments),this._any=!0}_parse(t){return Bt(t.data)}}Su.create=e=>new Su({typeName:fe.ZodAny,...ge(e)});class co extends we{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Bt(t.data)}}co.create=e=>new co({typeName:fe.ZodUnknown,...ge(e)});class sr extends we{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:K.invalid_type,expected:oe.never,received:n.parsedType}),pe}}sr.create=e=>new sr({typeName:fe.ZodNever,...ge(e)});class Tu extends we{_parse(t){if(this._getType(t)!==oe.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.void,received:r.parsedType}),pe}return Bt(t.data)}}Tu.create=e=>new Tu({typeName:fe.ZodVoid,...ge(e)});class sn extends we{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==oe.array)return te(n,{code:K.invalid_type,expected:oe.array,received:n.parsedType}),pe;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(te(n,{code:i?K.too_big:K.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&&(te(n,{code:K.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&&(te(n,{code:K.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 kn(n,i,n.path,a)))).then(i=>Ft.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new kn(n,i,n.path,a)));return Ft.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new sn({...this._def,minLength:{value:t,message:ae.toString(n)}})}max(t,n){return new sn({...this._def,maxLength:{value:t,message:ae.toString(n)}})}length(t,n){return new sn({...this._def,exactLength:{value:t,message:ae.toString(n)}})}nonempty(t){return this.min(1,t)}}sn.create=(e,t)=>new sn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:fe.ZodArray,...ge(t)});function Xr(e){if(e instanceof rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Nn.create(Xr(r))}return new rt({...e._def,shape:()=>t})}else return e instanceof sn?new sn({...e._def,type:Xr(e.element)}):e instanceof Nn?Nn.create(Xr(e.unwrap())):e instanceof Lr?Lr.create(Xr(e.unwrap())):e instanceof Ln?Ln.create(e.items.map(t=>Xr(t))):e}class rt extends we{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=Ie.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==oe.object){const c=this._getOrReturnCtx(t);return te(c,{code:K.invalid_type,expected:oe.object,received:c.parsedType}),pe}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof sr&&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],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new kn(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof sr){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&&(te(o,{code:K.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 d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new kn(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,h=await u.value;c.push({key:d,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>Ft.mergeObjectSync(r,c)):Ft.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ae.errToObj,new rt({...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 rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rt({...this._def,catchall:t})}pick(t){const n={};return Ie.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}omit(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}deepPartial(){return Xr(this)}partial(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new rt({...this._def,shape:()=>n})}required(t){const n={};return Ie.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Nn;)s=s._def.innerType;n[r]=s}}),new rt({...this._def,shape:()=>n})}keyof(){return G0(Ie.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:fe.ZodObject,...ge(t)});rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:fe.ZodObject,...ge(t)});rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:fe.ZodObject,...ge(t)});class wa extends we{_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 te(n,{code:K.invalid_union,unionErrors:i}),pe}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 te(n,{code:K.invalid_union,unionErrors:a}),pe}}get options(){return this._def.options}}wa.create=(e,t)=>new wa({options:e,typeName:fe.ZodUnion,...ge(t)});const An=e=>e instanceof Ea?An(e.schema):e instanceof Vn?An(e.innerType()):e instanceof Ca?[e.value]:e instanceof Fr?e.options:e instanceof Pa?Ie.objectValues(e.enum):e instanceof Ra?An(e._def.innerType):e instanceof ba?[void 0]:e instanceof xa?[null]:e instanceof Nn?[void 0,...An(e.unwrap())]:e instanceof Lr?[null,...An(e.unwrap())]:e instanceof Y0||e instanceof Ia?An(e.unwrap()):e instanceof ka?An(e._def.innerType):[];class sf extends we{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.object)return te(n,{code:K.invalid_type,expected:oe.object,received:n.parsedType}),pe;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}):(te(n,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=An(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 sf({typeName:fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...ge(r)})}}function Eu(e,t){const n=Cr(e),r=Cr(t);if(e===t)return{valid:!0,data:e};if(n===oe.object&&r===oe.object){const o=Ie.objectKeys(t),s=Ie.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Eu(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===oe.array&&r===oe.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=Eu(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===oe.date&&r===oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Sa extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(tg(s)||tg(i))return pe;const a=Eu(s.value,i.value);return a.valid?((ng(s)||ng(i))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:K.invalid_intersection_types}),pe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([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}))}}Sa.create=(e,t,n)=>new Sa({left:e,right:t,typeName:fe.ZodIntersection,...ge(n)});class Ln extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.array)return te(r,{code:K.invalid_type,expected:oe.array,received:r.parsedType}),pe;if(r.data.length<this._def.items.length)return te(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:K.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 kn(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 Ln({...this._def,rest:t})}}Ln.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ln({items:e,typeName:fe.ZodTuple,rest:null,...ge(t)})};class Ta extends we{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!==oe.object)return te(r,{code:K.invalid_type,expected:oe.object,received:r.parsedType}),pe;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new kn(r,a,r.path,a)),value:i._parse(new kn(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 we?new Ta({keyType:t,valueType:n,typeName:fe.ZodRecord,...ge(r)}):new Ta({keyType:Mn.create(),valueType:t,typeName:fe.ZodRecord,...ge(n)})}}class Cu extends we{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!==oe.map)return te(r,{code:K.invalid_type,expected:oe.map,received:r.parsedType}),pe;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new kn(r,a,r.path,[c,"key"])),value:s._parse(new kn(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 pe;(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 pe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Cu.create=(e,t,n)=>new Cu({valueType:t,keyType:e,typeName:fe.ZodMap,...ge(n)});class _o extends we{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==oe.set)return te(r,{code:K.invalid_type,expected:oe.set,received:r.parsedType}),pe;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(te(r,{code:K.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&&(te(r,{code:K.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 pe;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 kn(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new _o({...this._def,minSize:{value:t,message:ae.toString(n)}})}max(t,n){return new _o({...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)}}_o.create=(e,t)=>new _o({valueType:e,minSize:null,maxSize:null,typeName:fe.ZodSet,...ge(t)});class Rs extends we{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.function)return te(n,{code:K.invalid_type,expected:oe.function,received:n.parsedType}),pe;function r(a,l){return bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vu(),zs].filter(c=>!!c),issueData:{code:K.invalid_arguments,argumentsError:l}})}function o(a,l){return bu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vu(),zs].filter(c=>!!c),issueData:{code:K.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof Us){const a=this;return Bt(async function(...l){const c=new en([]),u=await a._def.args.parseAsync(l,s).catch(f=>{throw c.addIssue(r(l,f)),c}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(f=>{throw c.addIssue(o(d,f)),c})})}else{const a=this;return Bt(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),d=a._def.returns.safeParse(u,s);if(!d.success)throw new en([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Rs({...this._def,args:Ln.create(t).rest(co.create())})}returns(t){return new Rs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Rs({args:t||Ln.create([]).rest(co.create()),returns:n||co.create(),typeName:fe.ZodFunction,...ge(r)})}}class Ea extends we{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})}}Ea.create=(e,t)=>new Ea({getter:e,typeName:fe.ZodLazy,...ge(t)});class Ca extends we{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ca.create=(e,t)=>new Ca({value:e,typeName:fe.ZodLiteral,...ge(t)});function G0(e,t){return new Fr({values:e,typeName:fe.ZodEnum,...ge(t)})}class Fr extends we{constructor(){super(...arguments),us.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:Ie.joinValues(r),received:n.parsedType,code:K.invalid_type}),pe}if(va(this,us)||z0(this,us,new Set(this._def.values)),!va(this,us).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:K.invalid_enum_value,options:r}),pe}return Bt(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 Fr.create(t,{...this._def,...n})}exclude(t,n=this._def){return Fr.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}us=new WeakMap;Fr.create=G0;class Pa extends we{constructor(){super(...arguments),ds.set(this,void 0)}_parse(t){const n=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==oe.string&&r.parsedType!==oe.number){const o=Ie.objectValues(n);return te(r,{expected:Ie.joinValues(o),received:r.parsedType,code:K.invalid_type}),pe}if(va(this,ds)||z0(this,ds,new Set(Ie.getValidEnumValues(this._def.values))),!va(this,ds).has(t.data)){const o=Ie.objectValues(n);return te(r,{received:r.data,code:K.invalid_enum_value,options:o}),pe}return Bt(t.data)}get enum(){return this._def.values}}ds=new WeakMap;Pa.create=(e,t)=>new Pa({values:e,typeName:fe.ZodNativeEnum,...ge(t)});class Us extends we{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==oe.promise&&n.common.async===!1)return te(n,{code:K.invalid_type,expected:oe.promise,received:n.parsedType}),pe;const r=n.parsedType===oe.promise?n.data:Promise.resolve(n.data);return Bt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Us.create=(e,t)=>new Us({type:e,typeName:fe.ZodPromise,...ge(t)});class Vn extends we{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===fe.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=>{te(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 pe;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?pe:l.status==="dirty"||n.value==="dirty"?cs(l.value):l});{if(n.value==="aborted")return pe;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?pe:a.status==="dirty"||n.value==="dirty"?cs(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"?pe:(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"?pe:(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(!ga(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=>ga(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);Ie.assertNever(o)}}Vn.create=(e,t,n)=>new Vn({schema:e,typeName:fe.ZodEffects,effect:t,...ge(n)});Vn.createWithPreprocess=(e,t,n)=>new Vn({schema:t,effect:{type:"preprocess",transform:e},typeName:fe.ZodEffects,...ge(n)});class Nn extends we{_parse(t){return this._getType(t)===oe.undefined?Bt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Nn.create=(e,t)=>new Nn({innerType:e,typeName:fe.ZodOptional,...ge(t)});class Lr extends we{_parse(t){return this._getType(t)===oe.null?Bt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lr.create=(e,t)=>new Lr({innerType:e,typeName:fe.ZodNullable,...ge(t)});class Ra extends we{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ra.create=(e,t)=>new Ra({innerType:e,typeName:fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ge(t)});class ka extends we{_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 ya(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}}ka.create=(e,t)=>new ka({innerType:e,typeName:fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ge(t)});class Pu extends we{_parse(t){if(this._getType(t)!==oe.nan){const r=this._getOrReturnCtx(t);return te(r,{code:K.invalid_type,expected:oe.nan,received:r.parsedType}),pe}return{status:"valid",value:t.data}}}Pu.create=e=>new Pu({typeName:fe.ZodNaN,...ge(e)});class Y0 extends we{_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 nl extends we{_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"?pe:s.status==="dirty"?(n.dirty(),cs(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"?pe:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new nl({in:t,out:n,typeName:fe.ZodPipeline})}}class Ia extends we{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ga(o)&&(o.value=Object.freeze(o.value)),o);return ya(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Ia.create=(e,t)=>new Ia({innerType:e,typeName:fe.ZodReadonly,...ge(t)});rt.lazycreate;var fe;(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"})(fe||(fe={}));Mn.create;Nr.create;Pu.create;Ao.create;xu.create;Hs.create;wu.create;ba.create;xa.create;Su.create;co.create;sr.create;Tu.create;sn.create;rt.create;rt.strictCreate;wa.create;sf.create;Sa.create;Ln.create;Ta.create;Cu.create;_o.create;Rs.create;Ea.create;Ca.create;Fr.create;Pa.create;Us.create;Vn.create;Nn.create;Lr.create;Vn.createWithPreprocess;nl.create;const mF=(e,t)=>e.localeCompare(t),gF={sort:mF,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},q0=e=>{const t=new FormData(e),n=new URLSearchParams(t);return XN.parse(n.toString(),gF)},K0=e=>e.replace("[",".").replace("]","").split("."),fs=(e,t)=>K0(e).reduce((n,r)=>{var s;if(r==="")return n;const o=((s=n.shape)==null?void 0:s[r])||n;return o instanceof sn?o.element:o},t),is=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),yF=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[s,i]=b.useState({}),a=(p,m)=>{const v=fs(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},l=(p,m)=>{const v=fs(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},c=(p,m)=>{const v=fs(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},u=(p,m)=>{const v=fs(p,e);return{...m,name:p,id:p,required:!v.isOptional(),form:t,type:bn.instance(v,Nr)?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}};b.useEffect(()=>{const p=Object.values(o.current).map(v=>{const g=v.element.dataset.origin?document.querySelector(`[data-target="${v.element.name}"]`):v.element,x=v.schema.safeParse(is(g)),y=S=>{var I;const E=g.dataset.target||g.name;if(!E)return;const k=is(S.target)||(S.relatedTarget?is(S.relatedTarget):""),P=v.schema.safeParse(k);if(P.success)return g.setCustomValidity(""),i(C=>yl(C,E,P.data)),r(C=>{const{[E]:N,...M}=C||{};return M===null||bn.empty(M)?null:M});if(g.required){const C=((I=P.error.issues[0])==null?void 0:I.message)||"";g.setCustomValidity(C),r(N=>({...N,[E]:C}))}},T=g.getAttribute("data-trigger")||"blur";return g.addEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y),{input:v,hasInitialError:g.required?!x.success:!1,unsubscribe:()=>{g.removeEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y)}}});return p.some(v=>v.hasInitialError)&&r(v=>v===null?{}:v),()=>p.forEach(v=>v.unsubscribe())});const d=b.useCallback(p=>m=>{const v=m.currentTarget,g=Object.values(o.current).reduce((y,T)=>{var I;const S=T.element,E=T.schema.safeParse(is(S));if(S.dataset.ignore==="ignore"||E.success)return y;const k=(I=E.error.issues[0])==null?void 0:I.message;S.setAttribute("data-initialized","true");const P=S.dataset.name||S.name||"";return{...y,[P]:k}},{}),x=bn.empty(g)?null:g;r(x),p==null||p({form:v,errors:x||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const v=m.currentTarget;let g=q0(v);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(v.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;g=yl(g,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;g=yl(g,S.name,is(S))}});const y=e.safeParse(s);return y.success?p({form:v,json:g,data:y.data,event:m,reset:()=>au(v),success:!0,errors:[]}):p({form:v,json:g,event:m,data:g,success:!1,reset:()=>au(v),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:s,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:d,disabled:n!==null,name:t,get:p=>bd(s,p)||""}},vF=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=XP;exports.Autocomplete=p_;exports.Button=ho;exports.Calendar=eb;exports.Card=tb;exports.Checkbox=zb;exports.ColType=lo;exports.Collapse=wv;exports.ComponentsProvider=VI;exports.DatePicker=g_;exports.Dropdown=Ko;exports.Expand=UA;exports.FileUpload=kM;exports.Form=OM;exports.Input=oi;exports.InputFeedback=Bb;exports.InputField=Ka;exports.Menu=e_;exports.MenuItem=JA;exports.Modal=c_;exports.Option=Wb;exports.Polymorph=No;exports.Radiobox=AM;exports.Select=jr;exports.Stats=HI;exports.Switch=_M;exports.Tab=qI;exports.Table=vN;exports.Tabs=GI;exports.Tag=A1;exports.TaskList=MM;exports.Toolbar=u_;exports.Tooltip=$b;exports.TransferList=vj;exports.convertPath=K0;exports.createColumns=Wj;exports.createDesignTokens=qv;exports.createOptionCols=tf;exports.createStyles=MI;exports.createTheme=DI;exports.css=He;exports.defaultDarkTheme=FI;exports.defaultLightTheme=LI;exports.dispatchInput=Tc;exports.formReset=au;exports.formToJson=q0;exports.getSchemaShape=fs;exports.initializeInputDataset=Oa;exports.isReactComponent=P1;exports.isReactFC=R1;exports.isSsr=Qi;exports.mergeRefs=Du;exports.parsers=yd;exports.path=bd;exports.reduceTokens=ws;exports.safeRegex=Uc;exports.splitInto=Qv;exports.useForm=yF;exports.usePrevious=vF;exports.useReactive=nb;exports.useTablePreferences=Hj;exports.useTranslations=zt;exports.uuid=Wa;
195
+ */var el,Qh;function ak(){if(Qh)return el;Qh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[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 el=o()?Object.assign:function(i,s){for(var a,l=r(i),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 h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},el}var tl,Zh;function Ru(){if(Zh)return tl;Zh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tl=e,tl}var nl,Jh;function Mv(){return Jh||(Jh=1,nl=Function.call.bind(Object.prototype.hasOwnProperty)),nl}var rl,ep;function lk(){if(ep)return rl;ep=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ru(),n={},r=Mv();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](s,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 d=c?c():"";e("Failed "+a+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},rl=o,rl}var ol,tp;function ck(){if(tp)return ol;tp=1;var e=Dv(),t=ak(),n=Ru(),r=Mv(),o=lk(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return ol=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(O){var $=O&&(c&&O[c]||O[u]);if(typeof $=="function")return $}var h="<<anonymous>>",d={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:x(),arrayOf:y,element:T(),elementType:S(),instanceOf:E,node:C(),objectOf:P,oneOf:I,oneOfType:A,shape:M,exact:N};function p(O,$){return O===$?O!==0||1/O===1/$:O!==O&&$!==$}function m(O,$){this.message=O,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function v(O){if(process.env.NODE_ENV!=="production")var $={},K=0;function ee(U,j,B,W,V,Y,J){if(W=W||h,Y=Y||B,J!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=W+":"+B;!$[we]&&K<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Y+"` 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."),$[we]=!0,K++)}}return j[B]==null?U?j[B]===null?new m("The "+V+" `"+Y+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new m("The "+V+" `"+Y+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:O(j,B,W,V,Y)}var Q=ee.bind(null,!1);return Q.isRequired=ee.bind(null,!0),Q}function g(O){function $(K,ee,Q,U,j,B){var W=K[ee],V=F(W);if(V!==O){var Y=_(W);return new m("Invalid "+U+" `"+j+"` of type "+("`"+Y+"` supplied to `"+Q+"`, expected ")+("`"+O+"`."),{expectedType:O})}return null}return v($)}function x(){return v(s)}function y(O){function $(K,ee,Q,U,j){if(typeof O!="function")return new m("Property `"+j+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var B=K[ee];if(!Array.isArray(B)){var W=F(B);return new m("Invalid "+U+" `"+j+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var V=0;V<B.length;V++){var Y=O(B,V,Q,U,j+"["+V+"]",n);if(Y instanceof Error)return Y}return null}return v($)}function T(){function O($,K,ee,Q,U){var j=$[K];if(!a(j)){var B=F(j);return new m("Invalid "+Q+" `"+U+"` of type "+("`"+B+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return v(O)}function S(){function O($,K,ee,Q,U){var j=$[K];if(!e.isValidElementType(j)){var B=F(j);return new m("Invalid "+Q+" `"+U+"` of type "+("`"+B+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return v(O)}function E(O){function $(K,ee,Q,U,j){if(!(K[ee]instanceof O)){var B=O.name||h,W=G(K[ee]);return new m("Invalid "+U+" `"+j+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+B+"`."))}return null}return v($)}function I(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function $(K,ee,Q,U,j){for(var B=K[ee],W=0;W<O.length;W++)if(p(B,O[W]))return null;var V=JSON.stringify(O,function(J,H){var we=_(H);return we==="symbol"?String(H):H});return new m("Invalid "+U+" `"+j+"` of value `"+String(B)+"` "+("supplied to `"+Q+"`, expected one of "+V+"."))}return v($)}function P(O){function $(K,ee,Q,U,j){if(typeof O!="function")return new m("Property `"+j+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var B=K[ee],W=F(B);if(W!=="object")return new m("Invalid "+U+" `"+j+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var V in B)if(r(B,V)){var Y=O(B,V,Q,U,j+"."+V,n);if(Y instanceof Error)return Y}return null}return v($)}function A(O){if(!Array.isArray(O))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var $=0;$<O.length;$++){var K=O[$];if(typeof K!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+z(K)+" at index "+$+"."),s}function ee(Q,U,j,B,W){for(var V=[],Y=0;Y<O.length;Y++){var J=O[Y],H=J(Q,U,j,B,W,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&V.push(H.data.expectedType)}var we=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new m("Invalid "+B+" `"+W+"` supplied to "+("`"+j+"`"+we+"."))}return v(ee)}function C(){function O($,K,ee,Q,U){return R($[K])?null:new m("Invalid "+Q+" `"+U+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return v(O)}function L(O,$,K,ee,Q){return new m((O||"React class")+": "+$+" type `"+K+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function M(O){function $(K,ee,Q,U,j){var B=K[ee],W=F(B);if(W!=="object")return new m("Invalid "+U+" `"+j+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var V in O){var Y=O[V];if(typeof Y!="function")return L(Q,U,j,V,_(Y));var J=Y(B,V,Q,U,j+"."+V,n);if(J)return J}return null}return v($)}function N(O){function $(K,ee,Q,U,j){var B=K[ee],W=F(B);if(W!=="object")return new m("Invalid "+U+" `"+j+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var V=t({},K[ee],O);for(var Y in V){var J=O[Y];if(r(O,Y)&&typeof J!="function")return L(Q,U,j,Y,_(J));if(!J)return new m("Invalid "+U+" `"+j+"` key `"+Y+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(K[ee],null," ")+`
196
+ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var H=J(B,Y,Q,U,j+"."+Y,n);if(H)return H}return null}return v($)}function R(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(R);if(O===null||a(O))return!0;var $=f(O);if($){var K=$.call(O),ee;if($!==O.entries){for(;!(ee=K.next()).done;)if(!R(ee.value))return!1}else for(;!(ee=K.next()).done;){var Q=ee.value;if(Q&&!R(Q[1]))return!1}}else return!1;return!0;default:return!1}}function k(O,$){return O==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function F(O){var $=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":k($,O)?"symbol":$}function _(O){if(typeof O>"u"||O===null)return""+O;var $=F(O);if($==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return $}function z(O){var $=_(O);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function G(O){return!O.constructor||!O.constructor.name?h:O.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},ol}var il,np;function uk(){if(np)return il;np=1;var e=Ru();function t(){}function n(){}return n.resetWarningCache=t,il=function(){function r(s,a,l,c,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},il}if(process.env.NODE_ENV!=="production"){var fk=Dv(),dk=!0;nc.exports=ck()(fk.isElement,dk)}else nc.exports=uk()();var hk=nc.exports;const De=_b(hk);function wo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(f){s(f)}}function l(u){try{c(r.throw(u))}catch(f){s(f)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function So(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=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(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function rp(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function op(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var pk=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 Ti(e,t){var n=mk(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 mk(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=pk.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var gk=[".DS_Store","Thumbs.db"];function yk(e){return wo(this,void 0,void 0,function(){return So(this,function(t){return Ps(e)&&vk(e.dataTransfer)?[2,Sk(e.dataTransfer,e.type)]:bk(e)?[2,xk(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,wk(e)]:[2,[]]})})}function vk(e){return Ps(e)}function bk(e){return Ps(e)&&Ps(e.target)}function Ps(e){return typeof e=="object"&&e!==null}function xk(e){return rc(e.target.files).map(function(t){return Ti(t)})}function wk(e){return wo(this,void 0,void 0,function(){var t;return So(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 Ti(r)})]}})})}function Sk(e,t){return wo(this,void 0,void 0,function(){var n,r;return So(this,function(o){switch(o.label){case 0:return e.items?(n=rc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Tk))]):[3,2];case 1:return r=o.sent(),[2,ip(Fv(r))];case 2:return[2,ip(rc(e.files).map(function(i){return Ti(i)}))]}})})}function ip(e){return e.filter(function(t){return gk.indexOf(t.name)===-1})}function rc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Tk(e){if(typeof e.webkitGetAsEntry!="function")return sp(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?jv(t):sp(e)}function Fv(e){return e.reduce(function(t,n){return op(op([],rp(t),!1),rp(Array.isArray(n)?Fv(n):[n]),!1)},[])}function sp(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ti(t);return Promise.resolve(n)}function Ek(e){return wo(this,void 0,void 0,function(){return So(this,function(t){return[2,e.isDirectory?jv(e):Ck(e)]})})}function jv(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var s=this;t.readEntries(function(a){return wo(s,void 0,void 0,function(){var l,c,u;return So(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(Ek)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(a){r(a)})}i()})}function Ck(e){return wo(this,void 0,void 0,function(){return So(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Ti(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var Pk=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0};function ap(e){return Ak(e)||Ik(e)||Nv(e)||Rk()}function Rk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ik(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ak(e){if(Array.isArray(e))return oc(e)}function lp(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 cp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(n),!0).forEach(function(r){Lv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lv(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){return Dk(e)||kk(e,t)||Nv(e,t)||Ok()}function Ok(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nv(e,t){if(e){if(typeof e=="string")return oc(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 oc(e,t)}}function oc(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 kk(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Dk(e){if(Array.isArray(e))return e}var Mk="file-invalid-type",Fk="file-too-large",jk="file-too-small",Lk="too-many-files",Nk=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:Mk,message:"File type must be ".concat(n)}},up=function(t){return{code:Fk,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},fp=function(t){return{code:jk,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},_k={code:Lk,message:"Too many files"};function _v(e,t){var n=e.type==="application/x-moz-file"||Pk(e,t);return[n,n?null:Nk(t)]}function Vv(e,t,n){if(nr(e.size))if(nr(t)&&nr(n)){if(e.size>n)return[!1,up(n)];if(e.size<t)return[!1,fp(t)]}else{if(nr(t)&&e.size<t)return[!1,fp(t)];if(nr(n)&&e.size>n)return[!1,up(n)]}return[!0,null]}function nr(e){return e!=null}function Vk(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=_v(l,n),u=ri(c,1),f=u[0],h=Vv(l,r,o),d=ri(h,1),p=d[0],m=a?a(l):null;return f&&p&&!m})}function Rs(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Bi(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 dp(e){e.preventDefault()}function $k(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Bk(e){return e.indexOf("Edge/")!==-1}function Hk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return $k(e)||Bk(e)}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Rs(r)&&a&&a.apply(void 0,[r].concat(i)),Rs(r)})}}function Wk(){return"showOpenFilePicker"in window}function zk(e){if(nr(e)){var t=Object.entries(e).filter(function(n){var r=ri(n,2),o=r[0],i=r[1],s=!0;return $v(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.')),s=!1),(!Array.isArray(i)||!i.every(Bv))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=ri(r,2),i=o[0],s=o[1];return cp(cp({},n),{},Lv({},i,s))},{});return[{description:"Files",accept:t}]}return e}function Gk(e){if(nr(e))return Object.entries(e).reduce(function(t,n){var r=ri(n,2),o=r[0],i=r[1];return[].concat(ap(t),[o],ap(i))},[]).filter(function(t){return $v(t)||Bv(t)}).join(",")}function Uk(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Yk(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function $v(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Bv(e){return/^.*\.[\w]+$/.test(e)}var qk=["children"],Kk=["open"],Xk=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Qk=["refKey","onChange","onClick"];function Zk(e){return tD(e)||eD(e)||Hv(e)||Jk()}function Jk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tD(e){if(Array.isArray(e))return ic(e)}function sl(e,t){return oD(e)||rD(e,t)||Hv(e,t)||nD()}function nD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
200
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hv(e,t){if(e){if(typeof e=="string")return ic(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 ic(e,t)}}function ic(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 rD(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function oD(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 He(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){sc(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 sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Is(e,t){if(e==null)return{};var n=iD(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iD(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Iu=b.forwardRef(function(e,t){var n=e.children,r=Is(e,qk),o=zv(r),i=o.open,s=Is(o,Kk);return b.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(b.Fragment,null,n(He(He({},s),{},{open:i})))});Iu.displayName="Dropzone";var Wv={disabled:!1,getFilesFromEvent:yk,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};Iu.defaultProps=Wv;Iu.propTypes={children:De.func,accept:De.objectOf(De.arrayOf(De.string)),multiple:De.bool,preventDropOnDocument:De.bool,noClick:De.bool,noKeyboard:De.bool,noDrag:De.bool,noDragEventsBubbling:De.bool,minSize:De.number,maxSize:De.number,maxFiles:De.number,disabled:De.bool,getFilesFromEvent:De.func,onFileDialogCancel:De.func,onFileDialogOpen:De.func,useFsAccessApi:De.bool,autoFocus:De.bool,onDragEnter:De.func,onDragLeave:De.func,onDragOver:De.func,onDrop:De.func,onDropAccepted:De.func,onDropRejected:De.func,onError:De.func,validator:De.func};var ac={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function zv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=He(He({},Wv),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,h=t.onDrop,d=t.onDropAccepted,p=t.onDropRejected,m=t.onFileDialogCancel,v=t.onFileDialogOpen,g=t.useFsAccessApi,x=t.autoFocus,y=t.preventDropOnDocument,T=t.noClick,S=t.noKeyboard,E=t.noDrag,I=t.noDragEventsBubbling,P=t.onError,A=t.validator,C=b.useMemo(function(){return Gk(n)},[n]),L=b.useMemo(function(){return zk(n)},[n]),M=b.useMemo(function(){return typeof v=="function"?v:pp},[v]),N=b.useMemo(function(){return typeof m=="function"?m:pp},[m]),R=b.useRef(null),k=b.useRef(null),F=b.useReducer(sD,ac),_=sl(F,2),z=_[0],G=_[1],O=z.isFocused,$=z.isFileDialogActive,K=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&Wk()),ee=function(){!K.current&&$&&setTimeout(function(){if(k.current){var re=k.current.files;re.length||(G({type:"closeDialog"}),N())}},300)};b.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[k,$,N,K]);var Q=b.useRef([]),U=function(re){R.current&&R.current.contains(re.target)||(re.preventDefault(),Q.current=[])};b.useEffect(function(){return y&&(document.addEventListener("dragover",dp,!1),document.addEventListener("drop",U,!1)),function(){y&&(document.removeEventListener("dragover",dp),document.removeEventListener("drop",U))}},[R,y]),b.useEffect(function(){return!r&&x&&R.current&&R.current.focus(),function(){}},[R,x,r]);var j=b.useCallback(function(Z){P?P(Z):console.error(Z)},[P]),B=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),Q.current=[].concat(Zk(Q.current),[Z.target]),Bi(Z)&&Promise.resolve(o(Z)).then(function(re){if(!(Rs(Z)&&!I)){var xe=re.length,Le=xe>0&&Vk({files:re,accept:C,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),dt=xe>0&&!Le;G({isDragAccept:Le,isDragReject:dt,isDragActive:!0,type:"setDraggedFiles"}),c&&c(Z)}}).catch(function(re){return j(re)})},[o,c,j,I,C,s,i,a,l,A]),W=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=Bi(Z);if(re&&Z.dataTransfer)try{Z.dataTransfer.dropEffect="copy"}catch{}return re&&f&&f(Z),!1},[f,I]),V=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z);var re=Q.current.filter(function(Le){return R.current&&R.current.contains(Le)}),xe=re.indexOf(Z.target);xe!==-1&&re.splice(xe,1),Q.current=re,!(re.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Bi(Z)&&u&&u(Z))},[R,u,I]),Y=b.useCallback(function(Z,re){var xe=[],Le=[];Z.forEach(function(dt){var vt=_v(dt,C),Ct=sl(vt,2),qn=Ct[0],yr=Ct[1],vr=Vv(dt,s,i),Ri=sl(vr,2),sa=Ri[0],aa=Ri[1],la=A?A(dt):null;if(qn&&sa&&!la)xe.push(dt);else{var ca=[yr,aa];la&&(ca=ca.concat(la)),Le.push({file:dt,errors:ca.filter(function(Mb){return Mb})})}}),(!a&&xe.length>1||a&&l>=1&&xe.length>l)&&(xe.forEach(function(dt){Le.push({file:dt,errors:[_k]})}),xe.splice(0)),G({acceptedFiles:xe,fileRejections:Le,type:"setFiles"}),h&&h(xe,Le,re),Le.length>0&&p&&p(Le,re),xe.length>0&&d&&d(xe,re)},[G,a,C,s,i,l,h,d,p,A]),J=b.useCallback(function(Z){Z.preventDefault(),Z.persist(),ye(Z),Q.current=[],Bi(Z)&&Promise.resolve(o(Z)).then(function(re){Rs(Z)&&!I||Y(re,Z)}).catch(function(re){return j(re)}),G({type:"reset"})},[o,Y,j,I]),H=b.useCallback(function(){if(K.current){G({type:"openDialog"}),M();var Z={multiple:a,types:L};window.showOpenFilePicker(Z).then(function(re){return o(re)}).then(function(re){Y(re,null),G({type:"closeDialog"})}).catch(function(re){Uk(re)?(N(re),G({type:"closeDialog"})):Yk(re)?(K.current=!1,k.current?(k.current.value=null,k.current.click()):j(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."))):j(re)});return}k.current&&(G({type:"openDialog"}),M(),k.current.value=null,k.current.click())},[G,M,N,g,Y,j,L,a]),we=b.useCallback(function(Z){!R.current||!R.current.isEqualNode(Z.target)||(Z.key===" "||Z.key==="Enter"||Z.keyCode===32||Z.keyCode===13)&&(Z.preventDefault(),H())},[R,H]),Ge=b.useCallback(function(){G({type:"focus"})},[]),Fe=b.useCallback(function(){G({type:"blur"})},[]),Ue=b.useCallback(function(){T||(Hk()?setTimeout(H,0):H())},[T,H]),ie=function(re){return r?null:re},me=function(re){return S?null:ie(re)},oe=function(re){return E?null:ie(re)},ye=function(re){I&&re.stopPropagation()},Qe=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Le=Z.role,dt=Z.onKeyDown,vt=Z.onFocus,Ct=Z.onBlur,qn=Z.onClick,yr=Z.onDragEnter,vr=Z.onDragOver,Ri=Z.onDragLeave,sa=Z.onDrop,aa=Is(Z,Xk);return He(He(sc({onKeyDown:me(qt(dt,we)),onFocus:me(qt(vt,Ge)),onBlur:me(qt(Ct,Fe)),onClick:ie(qt(qn,Ue)),onDragEnter:oe(qt(yr,B)),onDragOver:oe(qt(vr,W)),onDragLeave:oe(qt(Ri,V)),onDrop:oe(qt(sa,J)),role:typeof Le=="string"&&Le!==""?Le:"presentation"},xe,R),!r&&!S?{tabIndex:0}:{}),aa)}},[R,we,Ge,Fe,Ue,B,W,V,J,S,E,r]),ve=b.useCallback(function(Z){Z.stopPropagation()},[]),ot=b.useMemo(function(){return function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=Z.refKey,xe=re===void 0?"ref":re,Le=Z.onChange,dt=Z.onClick,vt=Is(Z,Qk),Ct=sc({accept:C,multiple:a,type:"file",style:{display:"none"},onChange:ie(qt(Le,J)),onClick:ie(qt(dt,ve)),tabIndex:-1},xe,k);return He(He({},Ct),vt)}},[k,n,a,J,r]);return He(He({},z),{},{isFocused:O&&!r,getRootProps:Qe,getInputProps:ot,rootRef:R,inputRef:k,open:ie(H)})}function sD(e,t){switch(t.type){case"focus":return He(He({},e),{},{isFocused:!0});case"blur":return He(He({},e),{},{isFocused:!1});case"openDialog":return He(He({},ac),{},{isFileDialogActive:!0});case"closeDialog":return He(He({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return He(He({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return He(He({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return He({},ac);default:return e}}function pp(){}const aD={isImage:e=>e.type.includes("image")},lD=e=>{const[t,n]=b.useState({url:"",type:"",size:""});return b.useEffect(()=>{if(aD.isImage(e.file)){const r=URL.createObjectURL(e.file);return n({url:r,type:"img",size:Yh(e.file.size)}),()=>{URL.revokeObjectURL(r)}}n({url:"",type:e.file.type,size:Yh(e.file.size)})},[e.file]),t.type==="img"?w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-jade-200 items-center",children:[w.jsx("img",{src:t.url,className:"size-jade-500 rounded-jade-xsmall",alt:`Miniatura do arquivo ${e.file.name}`}),w.jsxs("div",{className:"flex flex-col",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Vr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Ur,{})})]}):w.jsxs("div",{className:"flex flex-row gap-jade-200 items-center justify-between w-full",children:[w.jsxs("header",{className:"flex flex-row gap-4 items-center",children:[w.jsx(EC,{size:48}),w.jsxs("div",{className:"flex flex-col text-left justify-start items-start",children:[w.jsx("span",{children:e.file.name}),w.jsx("span",{children:t.size})]})]}),w.jsx(Vr,{className:"isolate",type:"button",theme:"raw",onClick:r=>{var o;r.stopPropagation(),(o=e.onDeleteFile)==null||o.call(e,e.file)},children:w.jsx(Ur,{className:"text-danger"})})]})},cD=e=>w.jsx("ul",{className:"w-full space-y-jade-200",children:e.files.map(t=>w.jsx(lD,{onDeleteFile:e.onDeleteFile,file:t},t.name))}),uD=e=>e.isDragActive?w.jsx("p",{children:"Solte os arquivos selecionados"}):e.files.length>0?w.jsx(cD,{onDeleteFile:e.onDeleteFile,files:e.files}):w.jsx(b.Fragment,{children:e.idle}),fD=w.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center",children:[w.jsx(kC,{size:64}),w.jsxs("p",{children:["You can drag your files or"," ",w.jsx("button",{className:"text-primary underline",type:"button",children:"drag to here"})]})]}),dD=({idle:e=fD,onDeleteFile:t,onDrop:n,...r})=>{var u;const[o,i]=b.useState([]),s=f=>{n==null||n(f),i(f)},{getRootProps:a,getInputProps:l,isDragActive:c}=zv({onDrop:s});return w.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:[w.jsx("input",{...l(r),name:r.name,id:r.name}),w.jsx(uD,{onDeleteFile:t,isDragActive:c,idle:e,files:r.files??o})]})},hD=["INPUT","SELECT"],lc=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{hD.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})},pD=e=>{const t=n=>{var r;n.persist(),n.preventDefault(),(r=e.onSubmit)==null||r.call(e,n)};return w.jsx("form",{...e,onSubmit:t})},mD=({children:e,className:t="",size:n,...r})=>w.jsxs("label",{"data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group font-normal flex items-center gap-2 data-[disabled=true]:cursor-not-allowed",children:[w.jsx("input",{...r,type:"radio",className:je("form-radio rounded-full h-4 w-4 app border-card-border text-primary focus:ring-primary appearance-none inline-block bg-origin-border group-aria-disabled:cursor-not-allowed disabled:opacity-70",t),...r}),e]}),hr=b.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,optionalText:l,container:c,hideLeft:u=!1,right:f,left:h,error:d,...p},m)=>{const v=kt(),g=b.useRef(null),x=p.id??p.name;b.useImperativeHandle(m,()=>g.current),b.useEffect(()=>{if(g.current===null)return;const T=g.current,S=Fs(g.current),E=()=>T.setAttribute("data-selected","true");return T.addEventListener("change",E),()=>{S(),T.removeEventListener("change",E)}},[]);const y=()=>{var T;return(T=g.current)==null?void 0:T.focus()};return w.jsx(Js,{container:c,error:d,feedback:o,hideLeft:u,left:h,info:n,optionalText:l,rightLabel:a,interactive:s,form:p.form,id:p.name||p.id,name:p.name,labelClassName:i,title:p.title,placeholder:p.placeholder,required:e,right:w.jsx("label",{htmlFor:x,children:w.jsxs("button",{onClick:y,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[w.jsx(iy,{size:20}),w.jsx("span",{className:"sr-only",children:v.inputCaretDown})]})}),children:w.jsxs("select",{...p,id:x,name:x,value:p.value,required:e,ref:Pc(m,g),"data-selected":!!p.value||!1,defaultValue:p.value?void 0:"",className:je("input select group h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",p.className),children:[w.jsx("option",{value:"",disabled:!0,hidden:!0,children:p.placeholder}),t.map(T=>w.jsx("option",{...T,children:T.label??T.value},`${x}-select-option-${T.value}`))]})})}),cc=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},gD=b.forwardRef(({children:e,container:t,error:n,...r},o)=>{const i=b.useId(),[s,a]=b.useState(r.checked??!1),l=s,c=b.useRef(null),u=cc(r.onChange);b.useImperativeHandle(o,()=>c.current),b.useEffect(()=>{if(c.current!==null&&u.current){const h=d=>{d.target.checked=!d.target.checked,u.current&&u.current(d)};return c.current.addEventListener("change",h),()=>{var d;return(d=c.current)==null?void 0:d.removeEventListener("change",h)}}},[]);const f=()=>{var d,p;const h=!((d=c.current)!=null&&d.checked);a(h),(p=r==null?void 0:r.onCheck)==null||p.call(r,h),c.current!==null&&(c.current.checked=h,c.current.dispatchEvent(new Event("change",{bubbles:!0})))};return w.jsxs("fieldset",{className:je("flex flex-wrap items-center",t),children:[w.jsx("input",{...r,checked:l,"data-checked":l,"data-trigger":"change",hidden:!0,id:r.id||i,onChange:h=>a(h.target.checked),ref:c,type:"checkbox"}),w.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":l,"data-checked":l,"aria-labelledby":`${i}-label`,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:w.jsx("span",{"aria-hidden":"true","data-checked":l,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),w.jsx("label",{htmlFor:r.id||i,className:"ml-3 inline-block text-sm",id:`${i}-label`,children:w.jsx("span",{className:"font-medium text-foreground",children:e})}),w.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:n})]})}),yD=e=>{const[t,n]=cC();return b.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input")),l=a.every(u=>u.checked&&u.getAttribute("data-task")==="true"),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,10,-10,0]},{duration:.5,delay:pC(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),w.jsx("fieldset",{...e,ref:t})},ea=0,Gn=1,To=2,Gv=4;function oi(e,t){return n=>e(t(n))}function vD(e,t){return t(e)}function Uv(e,t){return n=>e(t,n)}function mp(e,t){return()=>e(t)}function ta(e,t){return t(e),e}function Be(...e){return e}function bD(e){e()}function gp(e){return()=>e}function xD(...e){return()=>{e.map(bD)}}function Au(e){return e!==void 0}function mr(){}function Oe(e,t){return e(Gn,t)}function fe(e,t){e(ea,t)}function Ou(e){e(To)}function wt(e){return e(Gv)}function se(e,t){return Oe(e,Uv(t,ea))}function fn(e,t){const n=e(Gn,r=>{n(),t(r)});return n}function ge(){const e=[];return(t,n)=>{switch(t){case To:e.splice(0,e.length);return;case Gn:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)};case ea:e.slice().forEach(r=>{r(n)});return;default:throw new Error(`unrecognized action ${t}`)}}}function X(e){let t=e;const n=ge();return(r,o)=>{switch(r){case Gn:o(t);break;case ea:t=o;break;case Gv:return t}return n(r,o)}}function wD(e){let t,n;const r=()=>t&&t();return function(o,i){switch(o){case Gn:return i?n===i?void 0:(r(),n=i,t=Oe(e,i),t):(r(),mr);case To:r(),n=null;return;default:throw new Error(`unrecognized action ${o}`)}}}function Ft(e){return ta(ge(),t=>se(e,t))}function St(e,t){return ta(X(t),n=>se(e,n))}function SD(...e){return t=>e.reduceRight(vD,t)}function q(e,...t){const n=SD(...t);return(r,o)=>{switch(r){case Gn:return Oe(e,n(o));case To:Ou(e);return}}}function Yv(e,t){return e===t}function $e(e=Yv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function le(e){return t=>n=>{e(n)&&t(n)}}function ne(e){return t=>oi(t,e)}function Zt(e){return t=>()=>t(e)}function rn(e,t){return n=>r=>n(t=e(t,r))}function eo(e){return t=>n=>{e>0?e--:t(n)}}function An(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function yp(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function de(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);Oe(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>i([s].concat(t));n===o?a():r=a}}function vp(...e){return function(t,n){switch(t){case Gn:return xD(...e.map(r=>Oe(r,n)));case To:return;default:throw new Error(`unrecognized action ${t}`)}}}function ce(e,t=Yv){return q(e,$e(t))}function ft(...e){const t=ge(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);Oe(i,l=>{n[s]=l,r=r|a,r===o&&fe(t,n)})}),function(i,s){switch(i){case Gn:return r===o&&s(n),Oe(t,s);case To:return Ou(t);default:throw new Error(`unrecognized action ${i}`)}}}function Ce(e,t=[],{singleton:n}={singleton:!0}){return{id:TD(),constructor:e,dependencies:t,singleton:n}}const TD=()=>Symbol();function ED(e){const t=new Map,n=({id:r,constructor:o,dependencies:i,singleton:s})=>{if(s&&t.has(r))return t.get(r);const a=o(i.map(l=>n(l)));return s&&t.set(r,a),a};return n(e)}function CD(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n}const Hi=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ku(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=b.createContext({});function l(g,x){g.propsReady&&fe(g.propsReady,!1);for(const y of r){const T=g[t.required[y]];fe(T,x[y])}for(const y of o)if(y in x){const T=g[t.optional[y]];fe(T,x[y])}g.propsReady&&fe(g.propsReady,!0)}function c(g){return i.reduce((x,y)=>(x[y]=T=>{const S=g[t.methods[y]];fe(S,T)},x),{})}function u(g){return s.reduce((x,y)=>(x[y]=wD(g[t.events[y]]),x),{})}const f=b.forwardRef((g,x)=>{const{children:y,...T}=g,[S]=b.useState(()=>ta(ED(e),I=>l(I,T))),[E]=b.useState(mp(u,S));return Hi(()=>{for(const I of s)I in T&&Oe(E[I],T[I]);return()=>{Object.values(E).map(Ou)}},[T,E,S]),Hi(()=>{l(S,T)}),b.useImperativeHandle(x,gp(c(S))),b.createElement(a.Provider,{value:S},n?b.createElement(n,CD([...r,...o,...s],T),y):y)}),h=g=>b.useCallback(Uv(fe,b.useContext(a)[g]),[g]),d=g=>{const y=b.useContext(a)[g],T=b.useCallback(S=>Oe(y,S),[y]);return b.useSyncExternalStore(T,()=>wt(y),()=>wt(y))},p=g=>{const y=b.useContext(a)[g],[T,S]=b.useState(mp(wt,y));return Hi(()=>Oe(y,E=>{E!==T&&S(gp(E))}),[y,T]),T},m=b.version.startsWith("18")?d:p;return{Component:f,usePublisher:h,useEmitterValue:m,useEmitter:(g,x)=>{const T=b.useContext(a)[g];Hi(()=>Oe(T,x),[x,T])}}}const PD=typeof document<"u"?b.useLayoutEffect:b.useEffect,RD=PD;var jt=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(jt||{});const ID={0:"debug",1:"log",2:"warn",3:"error"},AD=()=>typeof globalThis>"u"?window:globalThis,Un=Ce(()=>{const e=X(3);return{log:X((n,r,o=1)=>{var i;const s=(i=AD().VIRTUOSO_LOG_LEVEL)!=null?i:wt(e);o>=s&&console[ID[o]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",n,r)}),logLevel:e}},[],{singleton:!0});function Du(e,t=!0){const n=b.useRef(null);let r=o=>{};if(typeof ResizeObserver<"u"){const o=b.useMemo(()=>new ResizeObserver(i=>{requestAnimationFrame(()=>{const s=i[0].target;s.offsetParent!==null&&e(s)})}),[e]);r=i=>{i&&t?(o.observe(i),n.current=i):(n.current&&o.unobserve(n.current),n.current=null)}}return{ref:n,callbackRef:r}}function dn(e,t=!0){return Du(e,t).callbackRef}function qv(e,t,n,r,o,i,s){const a=b.useCallback(l=>{const c=OD(l.children,t,"offsetHeight",o);let u=l.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;const f=u.lastElementChild.dataset.viewportType==="window",h=s?s.scrollTop:f?window.pageYOffset||document.documentElement.scrollTop:u.scrollTop,d=s?s.scrollHeight:f?document.documentElement.scrollHeight:u.scrollHeight,p=s?s.offsetHeight:f?window.innerHeight:u.offsetHeight;r({scrollTop:Math.max(h,0),scrollHeight:d,viewportHeight:p}),i==null||i(kD("row-gap",getComputedStyle(l).rowGap,o)),c!==null&&e(c)},[e,t,o,i,s,r]);return Du(a,n)}function OD(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);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},jt.ERROR),u===c)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({startIndex:l,endIndex:l,size:u}):i[i.length-1].endIndex++}return i}function kD(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,jt.WARN),t==="normal"?0:parseInt(t??"0",10)}function Ut(e,t){return Math.round(e.getBoundingClientRect()[t])}function Kv(e,t){return Math.abs(e-t)<1.01}function Xv(e,t,n,r=mr,o){const i=b.useRef(null),s=b.useRef(null),a=b.useRef(null),l=b.useCallback(f=>{const h=f.target,d=h===window||h===document,p=d?window.pageYOffset||document.documentElement.scrollTop:h.scrollTop,m=d?document.documentElement.scrollHeight:h.scrollHeight,v=d?window.innerHeight:h.offsetHeight,g=()=>{e({scrollTop:Math.max(p,0),scrollHeight:m,viewportHeight:v})};f.suppressFlushSync?g():Gp.flushSync(g),s.current!==null&&(p===s.current||p<=0||p===m-v)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t]);b.useEffect(()=>{const f=o||i.current;return r(o||i.current),l({target:f,suppressFlushSync:!0}),f.addEventListener("scroll",l,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",l)}},[i,l,n,r,o]);function c(f){const h=i.current;if(!h||"offsetHeight"in h&&h.offsetHeight===0)return;const d=f.behavior==="smooth";let p,m,v;h===window?(m=Math.max(Ut(document.documentElement,"height"),document.documentElement.scrollHeight),p=window.innerHeight,v=document.documentElement.scrollTop):(m=h.scrollHeight,p=Ut(h,"height"),v=h.scrollTop);const g=m-p;if(f.top=Math.ceil(Math.max(Math.min(g,f.top),0)),Kv(p,m)||f.top===v){e({scrollTop:v,scrollHeight:m,viewportHeight:p}),d&&t(!0);return}d?(s.current=f.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,h.scrollTo(f)}function u(f){i.current.scrollBy(f)}return{scrollerRef:i,scrollByCallback:u,scrollToCallback:c}}const Rt=Ce(()=>{const e=ge(),t=ge(),n=X(0),r=ge(),o=X(0),i=ge(),s=ge(),a=X(0),l=X(0),c=X(0),u=X(0),f=ge(),h=ge(),d=X(!1);return se(q(e,ne(({scrollTop:p})=>p)),t),se(q(e,ne(({scrollHeight:p})=>p)),s),se(t,o),{scrollContainerState:e,scrollTop:t,viewportHeight:i,headerHeight:a,fixedHeaderHeight:l,fixedFooterHeight:c,footerHeight:u,scrollHeight:s,smoothScrollTargetReached:r,scrollTo:f,scrollBy:h,statefulScrollTop:o,deviation:n,scrollingInProgress:d}},[],{singleton:!0}),ii={lvl:0};function Qv(e,t,n,r=ii,o=ii){return{k:e,v:t,lvl:n,l:r,r:o}}function Me(e){return e===ii}function Fr(){return ii}function uc(e,t){if(Me(e))return ii;const{k:n,l:r,r:o}=e;if(t===n){if(Me(r))return o;if(Me(o))return r;{const[i,s]=Zv(r);return Ji(st(e,{k:i,v:s,l:Jv(r)}))}}else return t<n?Ji(st(e,{l:uc(r,t)})):Ji(st(e,{r:uc(o,t)}))}function si(e,t){if(!Me(e))return t===e.k?e.v:t<e.k?si(e.l,t):si(e.r,t)}function Yt(e,t,n="k"){if(Me(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Yt(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Yt(e.l,t,n)}function Mt(e,t,n){return Me(e)?Qv(t,n,1):t===e.k?st(e,{k:t,v:n}):t<e.k?bp(st(e,{l:Mt(e.l,t,n)})):bp(st(e,{r:Mt(e.r,t,n)}))}function fc(e,t,n){if(Me(e))return[];const{k:r,v:o,l:i,r:s}=e;let a=[];return r>t&&(a=a.concat(fc(i,t,n))),r>=t&&r<=n&&a.push({k:r,v:o}),r<=n&&(a=a.concat(fc(s,t,n))),a}function sr(e){return Me(e)?[]:[...sr(e.l),{k:e.k,v:e.v},...sr(e.r)]}function Zv(e){return Me(e.r)?[e.k,e.v]:Zv(e.r)}function Jv(e){return Me(e.r)?e.l:Ji(st(e,{r:Jv(e.r)}))}function st(e,t){return Qv(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 al(e){return Me(e)||e.lvl>e.r.lvl}function bp(e){return dc(tb(e))}function Ji(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(al(t))return tb(st(e,{lvl:r-1}));if(!Me(t)&&!Me(t.r))return st(t.r,{l:st(t,{r:t.r.l}),r:st(e,{l:t.r.r,lvl:r-1}),lvl:r});throw new Error("Unexpected empty nodes")}else{if(al(e))return dc(st(e,{lvl:r-1}));if(!Me(n)&&!Me(n.l)){const o=n.l,i=al(o)?n.lvl-1:n.lvl;return st(o,{l:st(e,{r:o.l,lvl:r-1}),r:dc(st(n,{l:o.r,lvl:i})),lvl:o.lvl+1})}else throw new Error("Unexpected empty nodes")}}function na(e,t,n){if(Me(e))return[];const r=Yt(e,t)[0];return DD(fc(e,r,n))}function eb(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({start:r,end:a-1,value:o}),r=a,o=l}return i.push({start:r,end:1/0,value:o}),i}function DD(e){return eb(e,({k:t,v:n})=>({index:t,value:n}))}function dc(e){const{r:t,lvl:n}=e;return!Me(t)&&!Me(t.r)&&t.lvl===n&&t.r.lvl===n?st(t,{l:st(e,{r:t.l}),lvl:n+1}):e}function tb(e){const{l:t}=e;return!Me(t)&&t.lvl===e.lvl?st(t,{r:st(e,{l:t.r})}):e}function As(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function nb(e,t,n){return e[As(e,t,n)]}function MD(e,t,n,r){const o=As(e,t,r),i=As(e,n,r,o);return e.slice(o,i+1)}const Mu=Ce(()=>({recalcInProgress:X(!1)}),[],{singleton:!0});function FD(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 xp(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 jD(e,t){let n=Me(e)?0:1/0;for(const r of t){const{size:o,startIndex:i,endIndex:s}=r;if(n=Math.min(n,i),Me(e)){e=Mt(e,0,o);continue}const a=na(e,i-1,s+1);if(a.some(FD(r)))continue;let l=!1,c=!1;for(const{start:u,end:f,value:h}of a)l?(s>=u||o===h)&&(e=uc(e,u)):(c=h!==o,l=!0),f>s&&s>=u&&h!==o&&(e=Mt(e,s+1,h));c&&(e=Mt(e,i,o))}return[e,n]}function LD(){return{offsetTree:[],sizeTree:Fr(),groupOffsetTree:Fr(),lastIndex:0,lastOffset:0,lastSize:0,groupIndices:[]}}function Fu({index:e},t){return t===e?0:t<e?-1:1}function ND({offset:e},t){return t===e?0:t<e?-1:1}function _D(e){return{index:e.index,value:e}}function VD(e,t,n,r=0){return r>0&&(t=Math.max(t,nb(e,r,Fu).offset)),eb(MD(e,t,n,ND),_D)}function hc(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=As(o,t-1,Fu),a=o[l].offset;const u=Yt(n,t-1);i=u[0],s=u[1],o.length&&o[l].size===Yt(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of na(n,t,1/0)){const f=c-i,h=f*s+a+f*r;o.push({offset:h,size:u,index:c}),i=c,a=h,s=u}return{offsetTree:o,lastIndex:i,lastOffset:a,lastSize:s}}function $D(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,jt.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&Me(i)&&t.length===2){const h=t[0].size,d=t[1].size;s=n.reduce((p,m)=>Mt(Mt(p,m,h),m+1,d),s)}else[s,a]=jD(s,t);if(s===i)return e;const{offsetTree:l,lastIndex:c,lastSize:u,lastOffset:f}=hc(e.offsetTree,a,s,o);return{sizeTree:s,offsetTree:l,lastIndex:c,lastOffset:f,lastSize:u,groupOffsetTree:n.reduce((h,d)=>Mt(h,d,ai(d,l,o)),Fr()),groupIndices:n}}function ai(e,t,n){if(t.length===0)return 0;const{offset:r,index:o,size:i}=nb(t,e,Fu),s=e-o,a=i*s+(s-1)*n+r;return a>0?a+n:a}function BD(e){return typeof e.groupIndex<"u"}function rb(e,t,n){if(BD(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=ob(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function ob(e,t){if(!ra(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ra(e){return!Me(e.groupOffsetTree)}function HD(e){return sr(e).map(({k:t,v:n},r,o)=>{const i=o[r+1],s=i?i.k-1:1/0;return{startIndex:t,endIndex:s,size:n}})}const WD={offsetHeight:"height",offsetWidth:"width"},hn=Ce(([{log:e},{recalcInProgress:t}])=>{const n=ge(),r=ge(),o=St(r,0),i=ge(),s=ge(),a=X(0),l=X([]),c=X(void 0),u=X(void 0),f=X((S,E)=>Ut(S,WD[E])),h=X(void 0),d=X(0),p=LD(),m=St(q(n,de(l,e,d),rn($D,p),$e()),p),v=St(q(l,$e(),rn((S,E)=>({prev:S.current,current:E}),{prev:[],current:[]}),ne(({prev:S})=>S)),[]);se(q(l,le(S=>S.length>0),de(m,d),ne(([S,E,I])=>{const P=S.reduce((A,C,L)=>Mt(A,C,ai(C,E.offsetTree,I)||L),Fr());return{...E,groupIndices:S,groupOffsetTree:P}})),m),se(q(r,de(m),le(([S,{lastIndex:E}])=>S<E),ne(([S,{lastIndex:E,lastSize:I}])=>[{startIndex:S,endIndex:E,size:I}])),n),se(c,u);const g=St(q(c,ne(S=>S===void 0)),!0);se(q(u,le(S=>S!==void 0&&Me(wt(m).sizeTree)),ne(S=>[{startIndex:0,endIndex:0,size:S}])),n);const x=Ft(q(n,de(m),rn(({sizes:S},[E,I])=>({changed:I!==S,sizes:I}),{changed:!1,sizes:p}),ne(S=>S.changed)));Oe(q(a,rn((S,E)=>({diff:S.prev-E,prev:E}),{diff:0,prev:0}),ne(S=>S.diff)),S=>{const{groupIndices:E}=wt(m);if(S>0)fe(t,!0),fe(i,S+xp(S,E));else if(S<0){const I=wt(v);I.length>0&&(S-=xp(-S,I)),fe(s,S)}}),Oe(q(a,de(e)),([S,E])=>{S<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},jt.ERROR)});const y=Ft(i);se(q(i,de(m),ne(([S,E])=>{const I=E.groupIndices.length>0,P=[],A=E.lastSize;if(I){const C=si(E.sizeTree,0);let L=0,M=0;for(;L<S;){const k=E.groupIndices[M],F=E.groupIndices.length===M+1?1/0:E.groupIndices[M+1]-k-1;P.push({startIndex:k,endIndex:k,size:C}),P.push({startIndex:k+1,endIndex:k+1+F-1,size:A}),M++,L+=F+1}const N=sr(E.sizeTree);return L!==S&&N.shift(),N.reduce((k,{k:F,v:_})=>{let z=k.ranges;return k.prevSize!==0&&(z=[...k.ranges,{startIndex:k.prevIndex,endIndex:F+S-1,size:k.prevSize}]),{ranges:z,prevIndex:F+S,prevSize:_}},{ranges:P,prevIndex:S,prevSize:0}).ranges}return sr(E.sizeTree).reduce((C,{k:L,v:M})=>({ranges:[...C.ranges,{startIndex:C.prevIndex,endIndex:L+S-1,size:C.prevSize}],prevIndex:L+S,prevSize:M}),{ranges:[],prevIndex:0,prevSize:A}).ranges})),n);const T=Ft(q(s,de(m,d),ne(([S,{offsetTree:E},I])=>{const P=-S;return ai(P,E,I)})));return se(q(s,de(m,d),ne(([S,E,I])=>{if(E.groupIndices.length>0){if(Me(E.sizeTree))return E;let A=Fr();const C=wt(v);let L=0,M=0,N=0;for(;L<-S;){N=C[M];const k=C[M+1]-N-1;M++,L+=k+1}if(A=sr(E.sizeTree).reduce((k,{k:F,v:_})=>Mt(k,Math.max(0,F+S),_),A),L!==-S){const k=si(E.sizeTree,N);A=Mt(A,0,k);const F=Yt(E.sizeTree,-S+1)[1];A=Mt(A,1,F)}return{...E,sizeTree:A,...hc(E.offsetTree,0,A,I)}}else{const A=sr(E.sizeTree).reduce((C,{k:L,v:M})=>Mt(C,Math.max(0,L+S),M),Fr());return{...E,sizeTree:A,...hc(E.offsetTree,0,A,I)}}})),m),{data:h,totalCount:r,sizeRanges:n,groupIndices:l,defaultItemSize:u,fixedItemSize:c,unshiftWith:i,shiftWith:s,shiftWithOffset:T,beforeUnshiftWith:y,firstItemIndex:a,gap:d,sizes:m,listRefresh:x,statefulTotalCount:o,trackItemSizes:g,itemSize:f}},Be(Un,Mu),{singleton:!0}),zD=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function ib(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!zD)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Ei=Ce(([{sizes:e,totalCount:t,listRefresh:n,gap:r},{scrollingInProgress:o,viewportHeight:i,scrollTo:s,smoothScrollTargetReached:a,headerHeight:l,footerHeight:c,fixedHeaderHeight:u,fixedFooterHeight:f},{log:h}])=>{const d=ge(),p=ge(),m=X(0);let v=null,g=null,x=null;function y(){v&&(v(),v=null),x&&(x(),x=null),g&&(clearTimeout(g),g=null),fe(o,!1)}return se(q(d,de(e,i,t,m,l,c,h),de(r,u,f),ne(([[T,S,E,I,P,A,C,L],M,N,R])=>{const k=ib(T),{align:F,behavior:_,offset:z}=k,G=I-1,O=rb(k,S,G);let $=ai(O,S.offsetTree,M)+A;F==="end"?($+=N+Yt(S.sizeTree,O)[1]-E+R,O===G&&($+=C)):F==="center"?$+=(N+Yt(S.sizeTree,O)[1]-E+R)/2:$-=P,z&&($+=z);const K=ee=>{y(),ee?(L("retrying to scroll to",{location:T},jt.DEBUG),fe(d,T)):(fe(p,!0),L("list did not change, scroll successful",{},jt.DEBUG))};if(y(),_==="smooth"){let ee=!1;x=Oe(n,Q=>{ee=ee||Q}),v=fn(a,()=>{K(ee)})}else v=fn(q(n,GD(150)),K);return g=setTimeout(()=>{y()},1200),fe(o,!0),L("scrolling from index to",{index:O,top:$,behavior:_},jt.DEBUG),{top:$,behavior:_}})),s),{scrollToIndex:d,scrollTargetReached:p,topListHeight:m}},Be(hn,Rt,Un),{singleton:!0});function GD(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}const li="up",Uo="down",UD="none",YD={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollTop:0,viewportHeight:0,scrollHeight:0}},qD=0,Ci=Ce(([{scrollContainerState:e,scrollTop:t,viewportHeight:n,headerHeight:r,footerHeight:o,scrollBy:i}])=>{const s=X(!1),a=X(!0),l=ge(),c=ge(),u=X(4),f=X(qD),h=St(q(vp(q(ce(t),eo(1),Zt(!0)),q(ce(t),eo(1),Zt(!1),yp(100))),$e()),!1),d=St(q(vp(q(i,Zt(!0)),q(i,Zt(!1),yp(200))),$e()),!1);se(q(ft(ce(t),ce(f)),ne(([x,y])=>x<=y),$e()),a),se(q(a,An(50)),c);const p=Ft(q(ft(e,ce(n),ce(r),ce(o),ce(u)),rn((x,[{scrollTop:y,scrollHeight:T},S,E,I,P])=>{const A=y+S-T>-P,C={viewportHeight:S,scrollTop:y,scrollHeight:T};if(A){let M,N;return y>x.state.scrollTop?(M="SCROLLED_DOWN",N=x.state.scrollTop-y):(M="SIZE_DECREASED",N=x.state.scrollTop-y||x.scrollTopDelta),{atBottom:!0,state:C,atBottomBecause:M,scrollTopDelta:N}}let L;return C.scrollHeight>x.state.scrollHeight?L="SIZE_INCREASED":S<x.state.viewportHeight?L="VIEWPORT_HEIGHT_DECREASING":y<x.state.scrollTop?L="SCROLLING_UPWARDS":L="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:L,state:C}},YD),$e((x,y)=>x&&x.atBottom===y.atBottom))),m=St(q(e,rn((x,{scrollTop:y,scrollHeight:T,viewportHeight:S})=>{if(Kv(x.scrollHeight,T))return{scrollTop:y,scrollHeight:T,jump:0,changed:!1};{const E=T-(y+S)<1;return x.scrollTop!==y&&E?{scrollHeight:T,scrollTop:y,jump:x.scrollTop-y,changed:!0}:{scrollHeight:T,scrollTop:y,jump:0,changed:!0}}},{scrollHeight:0,jump:0,scrollTop:0,changed:!1}),le(x=>x.changed),ne(x=>x.jump)),0);se(q(p,ne(x=>x.atBottom)),s),se(q(s,An(50)),l);const v=X(Uo);se(q(e,ne(({scrollTop:x})=>x),$e(),rn((x,y)=>wt(d)?{direction:x.direction,prevScrollTop:y}:{direction:y<x.prevScrollTop?li:Uo,prevScrollTop:y},{direction:Uo,prevScrollTop:0}),ne(x=>x.direction)),v),se(q(e,An(50),Zt(UD)),v);const g=X(0);return se(q(h,le(x=>!x),Zt(0)),g),se(q(t,An(100),de(h),le(([x,y])=>!!y),rn(([x,y],[T])=>[y,T],[0,0]),ne(([x,y])=>y-x)),g),{isScrolling:h,isAtTop:a,isAtBottom:s,atBottomState:p,atTopStateChange:c,atBottomStateChange:l,scrollDirection:v,atBottomThreshold:u,atTopThreshold:f,scrollVelocity:g,lastJumpDueToItemResize:m}},Be(Rt)),Yn=Ce(([{log:e}])=>{const t=X(!1),n=Ft(q(t,le(r=>r),$e()));return Oe(t,r=>{r&&wt(e)("props updated",{},jt.DEBUG)}),{propsReady:t,didMount:n}},Be(Un),{singleton:!0});function ju(e,t){e==0?t():requestAnimationFrame(()=>ju(e-1,t))}function Lu(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const Pi=Ce(([{sizes:e,listRefresh:t,defaultItemSize:n},{scrollTop:r},{scrollToIndex:o,scrollTargetReached:i},{didMount:s}])=>{const a=X(!0),l=X(0),c=X(!0);return se(q(s,de(l),le(([u,f])=>!!f),Zt(!1)),a),se(q(s,de(l),le(([u,f])=>!!f),Zt(!1)),c),Oe(q(ft(t,s),de(a,e,n,c),le(([[,u],f,{sizeTree:h},d,p])=>u&&(!Me(h)||Au(d))&&!f&&!p),de(l)),([,u])=>{fn(i,()=>{fe(c,!0)}),ju(4,()=>{fn(r,()=>{fe(a,!0)}),fe(o,u)})}),{scrolledToInitialItem:a,initialTopMostItemIndex:l,initialItemFinalLocationReached:c}},Be(hn,Rt,Ei,Yn),{singleton:!0});function wp(e){return e?e==="smooth"?"smooth":"auto":!1}const KD=(e,t)=>typeof e=="function"?wp(e(t)):t&&wp(e),XD=Ce(([{totalCount:e,listRefresh:t},{isAtBottom:n,atBottomState:r},{scrollToIndex:o},{scrolledToInitialItem:i},{propsReady:s,didMount:a},{log:l},{scrollingInProgress:c}])=>{const u=X(!1),f=ge();let h=null;function d(m){fe(o,{index:"LAST",align:"end",behavior:m})}Oe(q(ft(q(ce(e),eo(1)),a),de(ce(u),n,i,c),ne(([[m,v],g,x,y,T])=>{let S=v&&y,E="auto";return S&&(E=KD(g,x||T),S=S&&!!E),{totalCount:m,shouldFollow:S,followOutputBehavior:E}}),le(({shouldFollow:m})=>m)),({totalCount:m,followOutputBehavior:v})=>{h&&(h(),h=null),h=fn(t,()=>{wt(l)("following output to ",{totalCount:m},jt.DEBUG),d(v),h=null})});function p(m){const v=fn(r,g=>{m&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(wt(l)("scrolling to bottom due to increased size",{},jt.DEBUG),d("auto"))});setTimeout(v,100)}return Oe(q(ft(ce(u),e,s),le(([m,,v])=>m&&v),rn(({value:m},[,v])=>({refreshed:m===v,value:v}),{refreshed:!1,value:0}),le(({refreshed:m})=>m),de(u,e)),([,m])=>{wt(i)&&p(m!==!1)}),Oe(f,()=>{p(wt(u)!==!1)}),Oe(ft(ce(u),r),([m,v])=>{m&&!v.atBottom&&v.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&d("auto")}),{followOutput:u,autoscrollToBottom:f}},Be(hn,Ci,Ei,Pi,Yn,Un,Rt));function QD(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{totalCount:0,groupIndices:[]})}const sb=Ce(([{totalCount:e,groupIndices:t,sizes:n},{scrollTop:r,headerHeight:o}])=>{const i=ge(),s=ge(),a=Ft(q(i,ne(QD)));return se(q(a,ne(l=>l.totalCount)),e),se(q(a,ne(l=>l.groupIndices)),t),se(q(ft(r,n,o),le(([l,c])=>ra(c)),ne(([l,c,u])=>Yt(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),$e(),ne(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},Be(hn,Rt));function ci(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}function ab(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}const Os="top",ks="bottom",Sp="none";function Tp(e,t,n){return typeof e=="number"?n===li&&t===Os||n===Uo&&t===ks?e:0:n===li?t===Os?e.main:e.reverse:t===ks?e.main:e.reverse}function Ep(e,t){return typeof e=="number"?e:e[t]||0}const Nu=Ce(([{scrollTop:e,viewportHeight:t,deviation:n,headerHeight:r,fixedHeaderHeight:o}])=>{const i=ge(),s=X(0),a=X(0),l=X(0),c=St(q(ft(ce(e),ce(t),ce(r),ce(i,ci),ce(l),ce(s),ce(o),ce(n),ce(a)),ne(([u,f,h,[d,p],m,v,g,x,y])=>{const T=u-x,S=v+g,E=Math.max(h-T,0);let I=Sp;const P=Ep(y,Os),A=Ep(y,ks);return d-=x,d+=h+g,p+=h+g,p-=x,d>u+S-P&&(I=li),p<u-E+f+A&&(I=Uo),I!==Sp?[Math.max(T-h-Tp(m,Os,I)-P,0),T-E-g+f+Tp(m,ks,I)+A]:null}),le(u=>u!=null),$e(ci)),[0,0]);return{listBoundary:i,overscan:l,topListHeight:s,increaseViewportBy:a,visibleRange:c}},Be(Rt),{singleton:!0});function ZD(e,t,n){if(ra(t)){const r=ob(e,t);return[{index:Yt(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 ll={items:[],topItems:[],offsetTop:0,offsetBottom:0,top:0,bottom:0,topListHeight:0,totalCount:0,firstItemIndex:0};function Cp(e,t,n){if(e.length===0)return[];if(!ra(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=na(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.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},i.push({...u,size:c.size,offset:c.offset,originalIndex:c.index,data:c.data})}return i}function es(e,t,n,r,o,i){const{lastSize:s,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,h=a+f*s+(f-1)*r,d=c,p=h-u;return{items:Cp(e,o,i),topItems:Cp(t,o,i),topListHeight:t.reduce((m,v)=>v.size+m,0),offsetTop:c,offsetBottom:p,top:d,bottom:u,totalCount:n,firstItemIndex:i}}function lb(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Lu(t,a),c=Array.from({length:a}).map((u,f)=>({index:f+l,size:0,offset:0,data:i[f+l]}));return es(c,[],a,o,n,r)}const gr=Ce(([{sizes:e,totalCount:t,data:n,firstItemIndex:r,gap:o},i,{visibleRange:s,listBoundary:a,topListHeight:l},{scrolledToInitialItem:c,initialTopMostItemIndex:u},{topListHeight:f},h,{didMount:d},{recalcInProgress:p}])=>{const m=X([]),v=X(0),g=ge();se(i.topItemsIndexes,m);const x=St(q(ft(d,p,ce(s,ci),ce(t),ce(e),ce(u),c,ce(m),ce(r),ce(o),n),le(([E,I,,P,,,,,,,A])=>{const C=A&&A.length!==P;return E&&!I&&!C}),ne(([,,[E,I],P,A,C,L,M,N,R,k])=>{const F=A,{sizeTree:_,offsetTree:z}=F,G=wt(v);if(P===0)return{...ll,totalCount:P};if(E===0&&I===0)return G===0?{...ll,totalCount:P}:lb(G,C,A,N,R,k||[]);if(Me(_))return G>0?null:es(ZD(Lu(C,P),F,k),[],P,R,F,N);const O=[];if(M.length>0){const U=M[0],j=M[M.length-1];let B=0;for(const W of na(_,U,j)){const V=W.value,Y=Math.max(W.start,U),J=Math.min(W.end,j);for(let H=Y;H<=J;H++)O.push({index:H,size:V,offset:B,data:k&&k[H]}),B+=V}}if(!L)return es([],O,P,R,F,N);const $=M.length>0?M[M.length-1]+1:0,K=VD(z,E,I,$);if(K.length===0)return null;const ee=P-1,Q=ta([],U=>{for(const j of K){const B=j.value;let W=B.offset,V=j.start;const Y=B.size;if(B.offset<E){V+=Math.floor((E-B.offset+R)/(Y+R));const H=V-j.start;W+=H*Y+H*R}V<$&&(W+=($-V)*Y,V=$);const J=Math.min(j.end,ee);for(let H=V;H<=J&&!(W>=I);H++)U.push({index:H,size:Y,offset:W,data:k&&k[H]}),W+=Y+R}});return es(Q,O,P,R,F,N)}),le(E=>E!==null),$e()),ll);se(q(n,le(Au),ne(E=>E==null?void 0:E.length)),t),se(q(x,ne(E=>E.topListHeight)),f),se(f,l),se(q(x,ne(E=>[E.top,E.bottom])),a),se(q(x,ne(E=>E.items)),g);const y=Ft(q(x,le(({items:E})=>E.length>0),de(t,n),le(([{items:E},I])=>E[E.length-1].originalIndex===I-1),ne(([,E,I])=>[E-1,I]),$e(ci),ne(([E])=>E))),T=Ft(q(x,An(200),le(({items:E,topItems:I})=>E.length>0&&E[0].originalIndex===I.length),ne(({items:E})=>E[0].index),$e())),S=Ft(q(x,le(({items:E})=>E.length>0),ne(({items:E})=>{let I=0,P=E.length-1;for(;E[I].type==="group"&&I<P;)I++;for(;E[P].type==="group"&&P>I;)P--;return{startIndex:E[I].index,endIndex:E[P].index}}),$e(ab)));return{listState:x,topItemsIndexes:m,endReached:y,startReached:T,rangeChanged:S,itemsRendered:g,initialItemCount:v,...h}},Be(hn,sb,Nu,Pi,Ei,Ci,Yn,Mu),{singleton:!0}),JD=Ce(([{sizes:e,firstItemIndex:t,data:n,gap:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(se(q(a,de(i),le(([,l])=>l!==0),de(o,e,t,r,n),ne(([[,l],c,u,f,h,d=[]])=>lb(l,c,u,f,h,d))),s),{}),Be(hn,Pi,gr,Yn),{singleton:!0}),cb=Ce(([{scrollVelocity:e}])=>{const t=X(!1),n=ge(),r=X(!1);return se(q(e,de(r,t,n),le(([o,i])=>!!i),ne(([o,i,s,a])=>{const{exit:l,enter:c}=i;if(s){if(l(o,a))return!1}else if(c(o,a))return!0;return s}),$e()),t),Oe(q(ft(t,e,n),de(r)),([[o,i,s],a])=>o&&a&&a.change&&a.change(i,s)),{isSeeking:t,scrollSeekConfiguration:r,scrollVelocity:e,scrollSeekRangeChanged:n}},Be(Ci),{singleton:!0}),eM=Ce(([{topItemsIndexes:e}])=>{const t=X(0);return se(q(t,le(n=>n>0),ne(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},Be(gr)),ub=Ce(([{footerHeight:e,headerHeight:t,fixedHeaderHeight:n,fixedFooterHeight:r},{listState:o}])=>{const i=ge(),s=St(q(ft(e,r,t,n,o),ne(([a,l,c,u,f])=>a+l+c+u+f.offsetBottom+f.bottom)),0);return se(ce(s),i),{totalListHeight:s,totalListHeightChanged:i}},Be(Rt,gr),{singleton:!0});function fb(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const tM=fb(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),nM=Ce(([{scrollBy:e,scrollTop:t,deviation:n,scrollingInProgress:r},{isScrolling:o,isAtBottom:i,scrollDirection:s,lastJumpDueToItemResize:a},{listState:l},{beforeUnshiftWith:c,shiftWithOffset:u,sizes:f,gap:h},{log:d},{recalcInProgress:p}])=>{const m=Ft(q(l,de(a),rn(([,g,x,y],[{items:T,totalCount:S,bottom:E,offsetBottom:I},P])=>{const A=E+I;let C=0;return x===S&&g.length>0&&T.length>0&&(T[0].originalIndex===0&&g[0].originalIndex===0||(C=A-y,C!==0&&(C+=P))),[C,T,S,A]},[0,[],0,0]),le(([g])=>g!==0),de(t,s,r,i,d,p),le(([,g,x,y,,,T])=>!T&&!y&&g!==0&&x===li),ne(([[g],,,,,x])=>(x("Upward scrolling compensation",{amount:g},jt.DEBUG),g))));function v(g){g>0?(fe(e,{top:-g,behavior:"auto"}),fe(n,0)):(fe(n,0),fe(e,{top:-g,behavior:"auto"}))}return Oe(q(m,de(n,o)),([g,x,y])=>{y&&tM()?fe(n,x-g):v(-g)}),Oe(q(ft(St(o,!1),n,p),le(([g,x,y])=>!g&&!y&&x!==0),ne(([g,x])=>x),An(1)),v),se(q(u,ne(g=>({top:-g}))),e),Oe(q(c,de(f,h),ne(([g,{lastSize:x,groupIndices:y,sizeTree:T},S])=>{function E(I){return I*(x+S)}if(y.length===0)return E(g);{let I=0;const P=si(T,0);let A=0,C=0;for(;A<g;){A++,I+=P;let L=y.length===C+1?1/0:y[C+1]-y[C]-1;A+L>g&&(I-=P,L=g-A+1),A+=L,I+=E(L),C++}return I}})),g=>{fe(n,g),requestAnimationFrame(()=>{fe(e,{top:g}),requestAnimationFrame(()=>{fe(n,0),fe(p,!1)})})}),{deviation:n}},Be(Rt,Ci,gr,hn,Un,Mu)),rM=Ce(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=X(0);return Oe(q(e,de(r),le(([,o])=>o!==0),ne(([,o])=>({top:o}))),o=>{fn(q(n,eo(1),le(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{fe(t,o)})})}),{initialScrollTop:r}},Be(Yn,Rt,gr),{singleton:!0}),oM=Ce(([{viewportHeight:e},{totalListHeight:t}])=>{const n=X(!1),r=St(q(ft(n,e,t),le(([o])=>o),ne(([,o,i])=>Math.max(0,o-i)),An(0),$e()),0);return{alignToBottom:n,paddingTopAddition:r}},Be(Rt,ub),{singleton:!0}),_u=Ce(([{scrollTo:e,scrollContainerState:t}])=>{const n=ge(),r=ge(),o=ge(),i=X(!1),s=X(void 0);return se(q(ft(n,r),ne(([{viewportHeight:a,scrollTop:l,scrollHeight:c},{offsetTop:u}])=>({scrollTop:Math.max(0,l-u),scrollHeight:c,viewportHeight:a}))),t),se(q(e,de(r),ne(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{useWindowScroll:i,customScrollParent:s,windowScrollContainerState:n,windowViewportRect:r,windowScrollTo:o}},Be(Rt)),iM=({itemTop:e,itemBottom:t,viewportTop:n,viewportBottom:r,locationParams:{behavior:o,align:i,...s}})=>e<n?{...s,behavior:o,align:i??"start"}:t>r?{...s,behavior:o,align:i??"end"}:null,sM=Ce(([{sizes:e,totalCount:t,gap:n},{scrollTop:r,viewportHeight:o,headerHeight:i,fixedHeaderHeight:s,fixedFooterHeight:a,scrollingInProgress:l},{scrollToIndex:c}])=>{const u=ge();return se(q(u,de(e,o,t,i,s,a,r),de(n),ne(([[f,h,d,p,m,v,g,x],y])=>{const{done:T,behavior:S,align:E,calculateViewLocation:I=iM,...P}=f,A=rb(f,h,p-1),C=ai(A,h.offsetTree,y)+m+v,L=C+Yt(h.sizeTree,A)[1],M=x+v,N=x+d-g,R=I({itemTop:C,itemBottom:L,viewportTop:M,viewportBottom:N,locationParams:{behavior:S,align:E,...P}});return R?T&&fn(q(l,le(k=>k===!1),eo(wt(l)?1:2)),T):T&&T(),R}),le(f=>f!==null)),c),{scrollIntoView:u}},Be(hn,Rt,Ei,gr,Un),{singleton:!0}),aM=Ce(([{sizes:e,sizeRanges:t},{scrollTop:n,headerHeight:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=ge(),u=X(void 0),f=X(null),h=X(null);return se(a,f),se(l,h),Oe(q(c,de(e,n,s,f,h,r)),([d,p,m,v,g,x,y])=>{const T=HD(p.sizeTree);v&&g!==null&&x!==null&&(m=g.scrollTop-x.offsetTop),m-=y,d({ranges:T,scrollTop:m})}),se(q(u,le(Au),ne(lM)),o),se(q(i,de(u),le(([,d])=>d!==void 0),$e(),ne(([,d])=>d.ranges)),t),{getState:c,restoreStateFrom:u}},Be(hn,Rt,Pi,Yn,_u));function lM(e){return{offset:e.scrollTop,index:0,align:"start"}}const cM=Ce(([e,t,n,r,o,i,s,a,l,c])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c}),Be(Nu,JD,Yn,cb,ub,rM,oM,_u,sM,Un)),db=Ce(([{totalCount:e,sizeRanges:t,fixedItemSize:n,defaultItemSize:r,trackItemSizes:o,itemSize:i,data:s,firstItemIndex:a,groupIndices:l,statefulTotalCount:c,gap:u,sizes:f},{initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p},m,v,g,{listState:x,topItemsIndexes:y,...T},{scrollToIndex:S},E,{topItemCount:I},{groupCounts:P},A])=>(se(T.rangeChanged,A.scrollSeekRangeChanged),se(q(A.windowViewportRect,ne(C=>C.visibleHeight)),m.viewportHeight),{totalCount:e,data:s,firstItemIndex:a,sizeRanges:t,initialTopMostItemIndex:h,scrolledToInitialItem:d,initialItemFinalLocationReached:p,topItemsIndexes:y,topItemCount:I,groupCounts:P,fixedItemHeight:n,defaultItemHeight:r,gap:u,...g,statefulTotalCount:c,listState:x,scrollToIndex:S,trackItemSizes:o,itemSize:i,groupIndices:l,...T,...A,...m,sizes:f,...v}),Be(hn,Pi,Rt,aM,XD,gr,Ei,nM,eM,sb,cM)),cl="-webkit-sticky",Pp="sticky",hb=fb(()=>{if(typeof document>"u")return Pp;const e=document.createElement("div");return e.style.position=cl,e.style.position===cl?cl:Pp});function Vu(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 h=t.getBoundingClientRect(),d=l.top-h.top;u=h.height-Math.max(0,d),f=d+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:i}=Du(r),s=b.useCallback(()=>{r(i.current)},[r,i]);return b.useEffect(()=>{if(t){t.addEventListener("scroll",s);const a=new ResizeObserver(()=>{requestAnimationFrame(s)});return a.observe(t),()=>{t.removeEventListener("scroll",s),a.unobserve(t)}}else return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[s,t]),o}const oa=b.createContext(void 0),pb=b.createContext(void 0);function $u(e){return e}const uM=Ce(()=>{const e=X(l=>`Item ${l}`),t=X(null),n=X(l=>`Group ${l}`),r=X({}),o=X($u),i=X("div"),s=X(mr),a=(l,c=null)=>St(q(r,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,groupContent:n,components:r,computeItemKey:o,headerFooterTag:i,scrollerRef:s,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")}}),fM=Ce(([e,t])=>({...e,...t}),Be(db,uM)),dM=({height:e})=>b.createElement("div",{style:{height:e}}),hM={position:hb(),zIndex:1,overflowAnchor:"none"},pM={overflowAnchor:"none"},Rp=b.memo(function({showTopList:t=!1}){const n=pe("listState"),r=Bt("sizeRanges"),o=pe("useWindowScroll"),i=pe("customScrollParent"),s=Bt("windowScrollContainerState"),a=Bt("scrollContainerState"),l=i||o?s:a,c=pe("itemContent"),u=pe("context"),f=pe("groupContent"),h=pe("trackItemSizes"),d=pe("itemSize"),p=pe("log"),m=Bt("gap"),{callbackRef:v}=qv(r,d,h,t?mr:l,p,m,i),[g,x]=b.useState(0);Wu("deviation",R=>{g!==R&&x(R)});const y=pe("EmptyPlaceholder"),T=pe("ScrollSeekPlaceholder")||dM,S=pe("ListComponent"),E=pe("ItemComponent"),I=pe("GroupComponent"),P=pe("computeItemKey"),A=pe("isSeeking"),C=pe("groupIndices").length>0,L=pe("alignToBottom"),M=pe("initialItemFinalLocationReached"),N=t?{}:{boxSizing:"border-box",paddingTop:n.offsetTop,paddingBottom:n.offsetBottom,marginTop:g!==0?g:L?"auto":0,...M?{}:{visibility:"hidden"}};return!t&&n.totalCount===0&&y?b.createElement(y,qe(y,u)):b.createElement(S,{...qe(S,u),ref:v,style:N,"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list"},(t?n.topItems:n.items).map(R=>{const k=R.originalIndex,F=P(k+n.firstItemIndex,R.data,u);return A?b.createElement(T,{...qe(T,u),key:F,index:R.index,height:R.size,type:R.type||"item",...R.type==="group"?{}:{groupIndex:R.groupIndex}}):R.type==="group"?b.createElement(I,{...qe(I,u),key:F,"data-index":k,"data-known-size":R.size,"data-item-index":R.index,style:hM},f(R.index,u)):b.createElement(E,{...qe(E,u),...mb(E,R.data),key:F,"data-index":k,"data-known-size":R.size,"data-item-index":R.index,"data-item-group-index":R.groupIndex,style:pM},C?c(R.index,R.groupIndex,R.data,u):c(R.index,R.data,u))}))}),mM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Eo=e=>({width:"100%",height:"100%",position:"absolute",top:0,...e?{display:"flex",flexDirection:"column"}:{}}),gM={width:"100%",position:hb(),top:0,zIndex:1};function qe(e,t){if(typeof e!="string")return{context:t}}function mb(e,t){return{item:typeof e=="string"?void 0:t}}const yM=b.memo(function(){const t=pe("HeaderComponent"),n=Bt("headerHeight"),r=pe("headerFooterTag"),o=dn(b.useMemo(()=>s=>n(Ut(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,qe(t,i))):null}),vM=b.memo(function(){const t=pe("FooterComponent"),n=Bt("footerHeight"),r=pe("headerFooterTag"),o=dn(b.useMemo(()=>s=>n(Ut(s,"height")),[n])),i=pe("context");return t?b.createElement(r,{ref:o},b.createElement(t,qe(t,i))):null});function Bu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("scrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("scrollerRef"),h=n("context"),{scrollerRef:d,scrollByCallback:p,scrollToCallback:m}=Xv(l,u,c,f);return t("scrollTo",m),t("scrollBy",p),b.createElement(c,{ref:d,style:{...mM,...i},"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,tabIndex:0,...a,...qe(c,h)},s)})}function Hu({usePublisher:e,useEmitter:t,useEmitterValue:n}){return b.memo(function({style:i,children:s,...a}){const l=e("windowScrollContainerState"),c=n("ScrollerComponent"),u=e("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),d=n("customScrollParent"),p=n("context"),{scrollerRef:m,scrollByCallback:v,scrollToCallback:g}=Xv(l,u,c,mr,d);return RD(()=>(m.current=d||window,()=>{m.current=null}),[m,d]),t("windowScrollTo",g),t("scrollBy",v),b.createElement(c,{style:{position:"relative",...i,...f!==0?{height:f+h}:{}},"data-virtuoso-scroller":!0,...a,...qe(c,p)},s)})}const bM=({children:e})=>{const t=b.useContext(oa),n=Bt("viewportHeight"),r=Bt("fixedItemHeight"),o=pe("alignToBottom"),i=dn(b.useMemo(()=>oi(n,s=>Ut(s,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Eo(o),ref:i,"data-viewport-type":"element"},e)},xM=({children:e})=>{const t=b.useContext(oa),n=Bt("windowViewportRect"),r=Bt("fixedItemHeight"),o=pe("customScrollParent"),i=Vu(n,o),s=pe("alignToBottom");return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Eo(s),"data-viewport-type":"window"},e)},wM=({children:e})=>{const t=pe("TopItemListComponent")||"div",n=pe("headerHeight"),r={...gM,marginTop:`${n}px`},o=pe("context");return b.createElement(t,{style:r,...qe(t,o)},e)},SM=b.memo(function(t){const n=pe("useWindowScroll"),r=pe("topItemsIndexes").length>0,o=pe("customScrollParent"),i=o||n?CM:EM,s=o||n?xM:bM;return b.createElement(i,{...t},r&&b.createElement(wM,null,b.createElement(Rp,{showTopList:!0})),b.createElement(s,null,b.createElement(yM,null),b.createElement(Rp,null),b.createElement(vM,null)))}),{Component:TM,usePublisher:Bt,useEmitterValue:pe,useEmitter:Wu}=ku(fM,{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"}},SM),EM=Bu({usePublisher:Bt,useEmitterValue:pe,useEmitter:Wu}),CM=Hu({usePublisher:Bt,useEmitterValue:pe,useEmitter:Wu}),PM=TM,Ip={items:[],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},RM={items:[{index:0}],offsetBottom:0,offsetTop:0,top:0,bottom:0,itemHeight:0,itemWidth:0},{round:Ap,ceil:Op,floor:Ds,min:ul,max:Yo}=Math;function IM(e){return{...RM,items:e}}function kp(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>{const i=n===null?null:n[o+e];return{index:o+e,data:i}})}function AM(e,t){return e&&e.column===t.column&&e.row===t.row}function Wi(e,t){return e&&e.width===t.width&&e.height===t.height}const OM=Ce(([{overscan:e,visibleRange:t,listBoundary:n},{scrollTop:r,viewportHeight:o,scrollBy:i,scrollTo:s,smoothScrollTargetReached:a,scrollContainerState:l,footerHeight:c,headerHeight:u},f,h,{propsReady:d,didMount:p},{windowViewportRect:m,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:x,windowScrollTo:y},T])=>{const S=X(0),E=X(0),I=X(Ip),P=X({height:0,width:0}),A=X({height:0,width:0}),C=ge(),L=ge(),M=X(0),N=X(null),R=X({row:0,column:0}),k=ge(),F=ge(),_=X(!1),z=X(0),G=X(!0),O=X(!1);Oe(q(p,de(z),le(([j,B])=>!!B)),()=>{fe(G,!1),fe(E,0)}),Oe(q(ft(p,G,A,P,z,O),le(([j,B,W,V,,Y])=>j&&!B&&W.height!==0&&V.height!==0&&!Y)),([,,,,j])=>{fe(O,!0),ju(1,()=>{fe(C,j)}),fn(q(r),()=>{fe(n,[0,0]),fe(G,!0)})}),se(q(F,le(j=>j!=null&&j.scrollTop>0),Zt(0)),E),Oe(q(p,de(F),le(([,j])=>j!=null)),([,j])=>{j&&(fe(P,j.viewport),fe(A,j==null?void 0:j.item),fe(R,j.gap),j.scrollTop>0&&(fe(_,!0),fn(q(r,eo(1)),B=>{fe(_,!1)}),fe(s,{top:j.scrollTop})))}),se(q(P,ne(({height:j})=>j)),o),se(q(ft(ce(P,Wi),ce(A,Wi),ce(R,(j,B)=>j&&j.column===B.column&&j.row===B.row),ce(r)),ne(([j,B,W,V])=>({viewport:j,item:B,gap:W,scrollTop:V}))),k),se(q(ft(ce(S),t,ce(R,AM),ce(A,Wi),ce(P,Wi),ce(N),ce(E),ce(_),ce(G),ce(z)),le(([,,,,,,,j])=>!j),ne(([j,[B,W],V,Y,J,H,we,,Ge,Fe])=>{const{row:Ue,column:ie}=V,{height:me,width:oe}=Y,{width:ye}=J;if(we===0&&(j===0||ye===0))return Ip;if(oe===0){const Ct=Lu(Fe,j),qn=Ct===0?Math.max(we-1,0):Ct;return IM(kp(Ct,qn,H))}const Qe=gb(ye,oe,ie);let ve,ot;Ge?B===0&&W===0&&we>0?(ve=0,ot=we-1):(ve=Qe*Ds((B+Ue)/(me+Ue)),ot=Qe*Op((W+Ue)/(me+Ue))-1,ot=ul(j-1,Yo(ot,Qe-1)),ve=ul(ot,Yo(0,ve))):(ve=0,ot=-1);const Z=kp(ve,ot,H),{top:re,bottom:xe}=Dp(J,V,Y,Z),Le=Op(j/Qe),vt=Le*me+(Le-1)*Ue-xe;return{items:Z,offsetTop:re,offsetBottom:vt,top:re,bottom:xe,itemHeight:me,itemWidth:oe}})),I),se(q(N,le(j=>j!==null),ne(j=>j.length)),S),se(q(ft(P,A,I,R),le(([j,B,{items:W}])=>W.length>0&&B.height!==0&&j.height!==0),ne(([j,B,{items:W},V])=>{const{top:Y,bottom:J}=Dp(j,V,B,W);return[Y,J]}),$e(ci)),n);const $=X(!1);se(q(r,de($),ne(([j,B])=>B||j!==0)),$);const K=Ft(q(ce(I),le(({items:j})=>j.length>0),de(S,$),le(([{items:j},B,W])=>W&&j[j.length-1].index===B-1),ne(([,j])=>j-1),$e())),ee=Ft(q(ce(I),le(({items:j})=>j.length>0&&j[0].index===0),Zt(0),$e())),Q=Ft(q(ce(I),de(_),le(([{items:j},B])=>j.length>0&&!B),ne(([{items:j}])=>({startIndex:j[0].index,endIndex:j[j.length-1].index})),$e(ab),An(0)));se(Q,h.scrollSeekRangeChanged),se(q(C,de(P,A,S,R),ne(([j,B,W,V,Y])=>{const J=ib(j),{align:H,behavior:we,offset:Ge}=J;let Fe=J.index;Fe==="LAST"&&(Fe=V-1),Fe=Yo(0,Fe,ul(V-1,Fe));let Ue=pc(B,Y,W,Fe);return H==="end"?Ue=Ap(Ue-B.height+W.height):H==="center"&&(Ue=Ap(Ue-B.height/2+W.height/2)),Ge&&(Ue+=Ge),{top:Ue,behavior:we}})),s);const U=St(q(I,ne(j=>j.offsetBottom+j.bottom)),0);return se(q(m,ne(j=>({width:j.visibleWidth,height:j.visibleHeight}))),P),{data:N,totalCount:S,viewportDimensions:P,itemDimensions:A,scrollTop:r,scrollHeight:L,overscan:e,scrollBy:i,scrollTo:s,scrollToIndex:C,smoothScrollTargetReached:a,windowViewportRect:m,windowScrollTo:y,useWindowScroll:v,customScrollParent:g,windowScrollContainerState:x,deviation:M,scrollContainerState:l,footerHeight:c,headerHeight:u,initialItemCount:E,gap:R,restoreStateFrom:F,...h,initialTopMostItemIndex:z,gridState:I,totalListHeight:U,...f,startReached:ee,endReached:K,rangeChanged:Q,stateChanged:k,propsReady:d,stateRestoreInProgress:_,...T}},Be(Nu,Rt,Ci,cb,Yn,_u,Un));function Dp(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{top:0,bottom:0};const i=pc(e,t,n,r[0].index),s=pc(e,t,n,r[r.length-1].index)+o;return{top:i,bottom:s}}function pc(e,t,n,r){const o=gb(e.width,n.width,t.column),i=Ds(r/o),s=i*n.height+Yo(0,i-1)*t.row;return s>0?s+t.row:s}function gb(e,t,n){return Yo(1,Ds((e+n)/(Ds(t)+n)))}const kM=Ce(()=>{const e=X(c=>`Item ${c}`),t=X({}),n=X(null),r=X("virtuoso-grid-item"),o=X("virtuoso-grid-list"),i=X($u),s=X("div"),a=X(mr),l=(c,u=null)=>St(q(t,ne(f=>f[c]),$e()),u);return{context:n,itemContent:e,components:t,computeItemKey:i,itemClassName:r,listClassName:o,headerFooterTag:s,scrollerRef:a,FooterComponent:l("Footer"),HeaderComponent:l("Header"),ListComponent:l("List","div"),ItemComponent:l("Item","div"),ScrollerComponent:l("Scroller","div"),ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),DM=Ce(([e,t])=>({...e,...t}),Be(OM,kM)),MM=b.memo(function(){const t=We("gridState"),n=We("listClassName"),r=We("itemClassName"),o=We("itemContent"),i=We("computeItemKey"),s=We("isSeeking"),a=zt("scrollHeight"),l=We("ItemComponent"),c=We("ListComponent"),u=We("ScrollSeekPlaceholder"),f=We("context"),h=zt("itemDimensions"),d=zt("gap"),p=We("log"),m=We("stateRestoreInProgress"),v=dn(b.useMemo(()=>g=>{const x=g.parentElement.parentElement.scrollHeight;a(x);const y=g.firstChild;if(y){const{width:T,height:S}=y.getBoundingClientRect();h({width:T,height:S})}d({row:Mp("row-gap",getComputedStyle(g).rowGap,p),column:Mp("column-gap",getComputedStyle(g).columnGap,p)})},[a,h,d,p]));return m?null:b.createElement(c,{ref:v,className:n,...qe(c,f),style:{paddingTop:t.offsetTop,paddingBottom:t.offsetBottom},"data-testid":"virtuoso-item-list"},t.items.map(g=>{const x=i(g.index,g.data,f);return s?b.createElement(u,{key:x,...qe(u,f),index:g.index,height:t.itemHeight,width:t.itemWidth}):b.createElement(l,{...qe(l,f),className:r,"data-index":g.index,key:x},o(g.index,g.data,f))}))}),FM=b.memo(function(){const t=We("HeaderComponent"),n=zt("headerHeight"),r=We("headerFooterTag"),o=dn(b.useMemo(()=>s=>n(Ut(s,"height")),[n])),i=We("context");return t?b.createElement(r,{ref:o},b.createElement(t,qe(t,i))):null}),jM=b.memo(function(){const t=We("FooterComponent"),n=zt("footerHeight"),r=We("headerFooterTag"),o=dn(b.useMemo(()=>s=>n(Ut(s,"height")),[n])),i=We("context");return t?b.createElement(r,{ref:o},b.createElement(t,qe(t,i))):null}),LM=({children:e})=>{const t=b.useContext(pb),n=zt("itemDimensions"),r=zt("viewportDimensions"),o=dn(b.useMemo(()=>i=>{r(i.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:Eo(!1),ref:o},e)},NM=({children:e})=>{const t=b.useContext(pb),n=zt("windowViewportRect"),r=zt("itemDimensions"),o=We("customScrollParent"),i=Vu(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:i,style:Eo(!1)},e)},_M=b.memo(function({...t}){const n=We("useWindowScroll"),r=We("customScrollParent"),o=r||n?$M:VM,i=r||n?NM:LM;return b.createElement(o,{...t},b.createElement(i,null,b.createElement(FM,null),b.createElement(MM,null),b.createElement(jM,null)))}),{Component:Wj,usePublisher:zt,useEmitterValue:We,useEmitter:yb}=ku(DM,{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"}},_M),VM=Bu({usePublisher:zt,useEmitterValue:We,useEmitter:yb}),$M=Hu({usePublisher:zt,useEmitterValue:We,useEmitter:yb});function Mp(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,jt.WARN),t==="normal"?0:parseInt(t??"0",10)}const BM=Ce(()=>{const e=X(l=>b.createElement("td",null,"Item $",l)),t=X(null),n=X(null),r=X(null),o=X({}),i=X($u),s=X(mr),a=(l,c=null)=>St(q(o,ne(u=>u[l]),$e()),c);return{context:t,itemContent:e,fixedHeaderContent:n,fixedFooterContent:r,components:o,computeItemKey:i,scrollerRef:s,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")}}),HM=Ce(([e,t])=>({...e,...t}),Be(db,BM)),WM=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e}})),zM=({height:e})=>b.createElement("tr",null,b.createElement("td",{style:{height:e,padding:0,border:0}})),GM={overflowAnchor:"none"},UM=b.memo(function(){const t=Ie("listState"),n=Gt("sizeRanges"),r=Ie("useWindowScroll"),o=Ie("customScrollParent"),i=Gt("windowScrollContainerState"),s=Gt("scrollContainerState"),a=o||r?i:s,l=Ie("itemContent"),c=Ie("trackItemSizes"),u=Ie("itemSize"),f=Ie("log"),{callbackRef:h,ref:d}=qv(n,u,c,a,f,void 0,o),[p,m]=b.useState(0);zu("deviation",F=>{p!==F&&(d.current.style.marginTop=`${F}px`,m(F))});const v=Ie("EmptyPlaceholder"),g=Ie("ScrollSeekPlaceholder")||WM,x=Ie("FillerRow")||zM,y=Ie("TableBodyComponent"),T=Ie("TableRowComponent"),S=Ie("computeItemKey"),E=Ie("isSeeking"),I=Ie("paddingTopAddition"),P=Ie("firstItemIndex"),A=Ie("statefulTotalCount"),C=Ie("context");if(A===0&&v)return b.createElement(v,qe(v,C));const L=t.offsetTop+I+p,M=t.offsetBottom,N=L>0?b.createElement(x,{height:L,key:"padding-top",context:C}):null,R=M>0?b.createElement(x,{height:M,key:"padding-bottom",context:C}):null,k=t.items.map(F=>{const _=F.originalIndex,z=S(_+P,F.data,C);return E?b.createElement(g,{...qe(g,C),key:z,index:F.index,height:F.size,type:F.type||"item"}):b.createElement(T,{...qe(T,C),...mb(T,F.data),key:z,"data-index":_,"data-known-size":F.size,"data-item-index":F.index,style:GM},l(F.index,F.data,C))});return b.createElement(y,{ref:h,"data-testid":"virtuoso-item-list",...qe(y,C)},[N,...k,R])}),YM=({children:e})=>{const t=b.useContext(oa),n=Gt("viewportHeight"),r=Gt("fixedItemHeight"),o=dn(b.useMemo(()=>oi(n,i=>Ut(i,"height")),[n]));return b.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),b.createElement("div",{style:Eo(!1),ref:o,"data-viewport-type":"element"},e)},qM=({children:e})=>{const t=b.useContext(oa),n=Gt("windowViewportRect"),r=Gt("fixedItemHeight"),o=Ie("customScrollParent"),i=Vu(n,o);return b.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),b.createElement("div",{ref:i,style:Eo(!1),"data-viewport-type":"window"},e)},KM=b.memo(function(t){const n=Ie("useWindowScroll"),r=Ie("customScrollParent"),o=Gt("fixedHeaderHeight"),i=Gt("fixedFooterHeight"),s=Ie("fixedHeaderContent"),a=Ie("fixedFooterContent"),l=Ie("context"),c=dn(b.useMemo(()=>oi(o,x=>Ut(x,"height")),[o])),u=dn(b.useMemo(()=>oi(i,x=>Ut(x,"height")),[i])),f=r||n?ZM:QM,h=r||n?qM:YM,d=Ie("TableComponent"),p=Ie("TableHeadComponent"),m=Ie("TableFooterComponent"),v=s?b.createElement(p,{key:"TableHead",style:{zIndex:2,position:"sticky",top:0},ref:c,...qe(p,l)},s()):null,g=a?b.createElement(m,{key:"TableFoot",style:{zIndex:1,position:"sticky",bottom:0},ref:u,...qe(m,l)},a()):null;return b.createElement(f,{...t},b.createElement(h,null,b.createElement(d,{style:{borderSpacing:0,overflowAnchor:"none"},...qe(d,l)},[v,b.createElement(UM,{key:"TableBody"}),g])))}),{Component:XM,usePublisher:Gt,useEmitterValue:Ie,useEmitter:zu}=ku(HM,{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"}},KM),QM=Bu({usePublisher:Gt,useEmitterValue:Ie,useEmitter:zu}),ZM=Hu({usePublisher:Gt,useEmitterValue:Ie,useEmitter:zu}),JM=XM,eF=e=>{const[t,n]=b.useState(0);return b.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},tF={Item:b.forwardRef(function(t,n){return w.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:b.forwardRef(function(t,n){return w.jsx("ul",{...t,ref:n,className:"space-y-3"})})},nF=e=>{const t=b.useRef(null),n=eF(t);return w.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[w.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:[w.jsx("header",{className:"border-b border-card-border pb-2"}),w.jsxs("div",{className:"px-8 space-y-2",children:[w.jsx(Si,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),w.jsx(PM,{height:n,useWindowScroll:!0,data:e.source,components:tF,itemContent:(r,o)=>w.jsx(b.Fragment,{children:w.jsx(kv,{children:w.jsx(e.Item,{data:o})})})})]})]}),w.jsx("div",{children:w.jsx(Vr,{children:w.jsx(nu,{})})}),w.jsx("div",{})]})};var rF=Object.defineProperty,Fp=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,iF=Object.prototype.propertyIsEnumerable,jp=(e,t,n)=>t in e?rF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sF=(e,t)=>{for(var n in t||(t={}))oF.call(t,n)&&jp(e,n,t[n]);if(Fp)for(var n of Fp(t))iF.call(t,n)&&jp(e,n,t[n]);return e},Gu=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},aF=(e,t,n,r)=>ia(Gu,e,t,n,r),to=e=>typeof e=="object",Dn=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!to(e)&&!to(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=>Dn(e[r],t[r]))},lF=(e,t)=>(to(e)||Array.isArray(e))&&t?e[t]:e,cF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ms=e=>/[0-9.]+/.test(e),Lp=e=>["string","number"].includes(typeof e),Np=e=>e==null||(e==null?void 0:e.length)===0||e==="",_p={eq:Dn,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:Np,notEmpty:e=>!Np(e),in:(e,t)=>Gu(t,n=>Dn(e,n)),notIn:(e,t)=>vb(t,n=>!Dn(e,n))},uF=e=>{if(e in _p)return _p[e];throw new Error("Linq - Symbol not found")},jr=(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},ia=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=uF(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},fF=(e,t,n,r)=>ia(jr,e,t,n,r),vb=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},dF=(e,t,n,r)=>ia(vb,e,t,n,r),bb=e=>{if(e===null)return null;const t=sF({},e);return Object.keys(t).forEach(n=>t[n]=to(e[n])?bb(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Vp=(e,t)=>{if(to(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Dn(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Dn(t,r))return!0}return!1},hF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},pF=e=>jr(e,(t,n,r)=>to(t)?n===r.findIndex(o=>Dn(o,t)):n===r.indexOf(t)),mF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},xb=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},gF=(e,t)=>xb(e,n=>n[t]),$p=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},yF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},vF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ms(e)&&Ms(t)?r.map(s=>Number.parseInt(s)):r},fl=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ms(e)&&Ms(t)){const o=[],[i,s]=yF(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return vF(e,t,r)},bF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?fl(r,o,1):fl(r,i,Number.parseInt(o,10))}return Lp(e)&&Lp(t)?fl(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},dl=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},Bp=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},xF=(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)},wF=(e,t,n,r)=>ia(xF,e,t,n,r),Hp=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(cF(t))},wb=(e=>(e.Asc="asc",e.Desc="desc",e))(wb||{}),SF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),TF=(e,t)=>e.sort(SF(t)),EF=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:jr(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},CF=class mc{constructor(t=[]){this.array=t}static Range(...t){return bF(...t)}static New(t){return new mc(t)}Where(t,n,r){return this.array=fF(this.array,t,n,r),this}Some(t,n,r){return aF(this.array,t,n,r)}All(t,n,r){return dF(this.array,t,n,r)}Reverse(){return this.array=Bp(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=wF(this.array,t,n,r),this}Distinct(){return this.array=pF(this.array),this}First(t){return t===void 0?this.array[0]:mF(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?dl((n,r)=>n+r,0,this.array):dl((n,r)=>n+lF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return gF(this.array,t)}GroupWith(t){return xb(this.array,t)}Except(t){return jr(this.array,n=>!Vp(t,n))}Intersect(t){return jr(this.array,n=>Vp(t,n))}OrderBy(t,n){let r;return r=t?Hp(this.array,t):this.array.toSorted(),this.array=n==="desc"?Bp(r):r,this}Includes(t){return Gu(this.array,n=>Dn(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 dl(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map($p(this.array,n=>[t,n]))}Zip(t,n){return $p(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:jr(this.array,t).length}Get(t){return this.array[t]}Clone(){return new mc(bb(this.array))}ToObject(t){return hF(this.array,t)}Sort(t){return Array.isArray(t)?TF(this.array,t):Hp(this.array,t)}Unique(t){return EF(this.array,t)}},Sb=CF,gc={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(v,g)=>{try{Object.keys(v).forEach(g)}catch(x){window.console.log(x)}},n=v=>v==null,r=v=>{const g=typeof v;return g==="string"||g==="number"||g==="boolean"||n(v)},o=(v,g)=>{const x=g.getItem(v);try{return JSON.parse(x)}catch{return x??null}},i=v=>Object.keys(v).reduce((g,x)=>({...g,[x]:o(x,v)}),{}),s=v=>v instanceof Date?v:typeof v=="number"?new Date(new Date*1+v*864e5):v,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(v=>v.split("=")).reduce((v,g)=>(v[decodeURIComponent(g[0].trim())]=decodeURIComponent(g[1].trim()),v),{}),c=new Set,u=()=>{const v=l();c.forEach(g=>g(v))},f=[{name:"expires",parse:v=>`expires=${s(v.expires??a)}`},{name:"maxAge",parse:v=>v.maxAge?`max-age=${s(v.expires??a)}`:""},{name:"path",parse:v=>`path=${v.path??"/"}`},{name:"sameSite",parse:v=>`samesite=${v.sameSite??"strict"}`},{name:"useSecure",parse:v=>`${v.useSecure??!0?"secure":""}`},{name:"domain",parse:v=>{const g=v.domain??"";return g===""?"":`domain=${v.multiDomain?".":""}${g}`}},{name:"partitioned",parse:v=>v.partitioned?"Partitioned":""}],h={json:l,listener:v=>(c.add(v),()=>c.delete(v)),clearListeners:()=>c.clear(),has:v=>document.cookie.split(";").some(g=>g.trim().startsWith(`${v}=`)),deleteAll:()=>{document.cookie.split(";").forEach(v=>{document.cookie=v.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:v=>{const g=h.json()[v];if(n(g))return null;try{return JSON.parse(decodeURIComponent(g))}catch{return g}},delete:v=>{document.cookie=`${encodeURIComponent(v)}=;expires=${new Date().toUTCString()}`,u()},set:(v,g,x={})=>{const y=r(g)?g:encodeURIComponent(JSON.stringify(g)),T=f.reduce((S,E)=>{const I=E.parse(x);return I===""?S:S.concat(I)},[`${encodeURIComponent(v)}=${y}`]).join(";");document.cookie=T,u()}},d=v=>{const g=new Set,x=y=>{v().removeItem(y);const T=i(v());g.forEach(S=>S(T))};return{delete:x,listener:y=>(g.add(y),()=>g.delete(y)),clearListeners:()=>g.clear(),json:(y=!1)=>y?i(v()):v(),has:y=>{const T=v().getItem(y);return!n(T)},deleteAll:()=>{t(v(),x),g.forEach(y=>y(v()))},get:y=>o(y,v()),set:(y,T)=>{v().setItem(y,JSON.stringify(T)),g.forEach(S=>S(v()))}}},p=d(()=>window.sessionStorage),m=d(()=>window.localStorage);e.Cookie=h,e.LocalStorage=m,e.SessionStorage=p,e.createStorage=d})(gc);const Uu=e=>e.headerLabel??e.thead??e.id,Yu=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Lr=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Lr||{});const qu=e=>e.type==="number"?e.valueAsNumber:e.value,PF=e=>{let t=[];return e({add:(o,i,s)=>t.push({...s,id:o,thead:i}),remove:o=>t=t.filter(i=>i.id!==o)}),t},RF={},IF=(e,t=RF)=>{const n=gs()?null:gc.LocalStorage.get(`@unamed/table-${e}`)||null,[r,o]=lu({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)||[]},i=>{const s=a=>{const l=i.state(),c={...l,...a};return gs()||gc.LocalStorage.set(`@unamed/table-${l.name}`,c),c};return{set:a=>s(a)}});return{...r,...o,name:e}},yc=(e,t,n,r={})=>{var l;const o=e.id,i=e.type??Lr.Text,s=(l=t[i])==null?void 0:l[0].value,a=n[s];return{id:Us(),operation:a,label:Uu(e),name:o,type:i,value:"",...r}},Ku=()=>{const e=kt(),t=b.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{operationOptions:b.useMemo(()=>({[Lr.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Lr.Boolean]:[t.is,t.isNot],[Lr.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[e]),operations:t}},AF=e=>{const t=kt(),{operationOptions:n,operations:r}=Ku(),o=()=>{const c=e.cols.at(0);e.set(u=>[...u,yc(c,n,r)])},i=c=>{const u=c.target.dataset.id||"",f=c.target.value;e.set(h=>h.map(d=>{if(u!==d.id)return d;const p=e.cols.find(m=>f===m.id);return yc(p,n,r,{value:""})}))},s=c=>{const u=c.target.dataset.id||"",f=c.target.value;e.set(h=>h.map(d=>d.id===u?{...d,operation:r[f]}:d))},a=c=>{const u=c.currentTarget.dataset.id||"";e.set(f=>f.filter(h=>h.id!==u))},l=c=>{const u=c.target.dataset.id||"",f=qu(c.target);e.set(h=>h.map(d=>d.id===u?{...d,value:f}:d))};return w.jsx(b.Fragment,{children:w.jsx(xo,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(PC,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(c=>{const u=n[c.type];return w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(hr,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:c.name,"data-id":c.id,onChange:i}),w.jsx(hr,{"data-id":c.id,onChange:s,value:c.operation.value,options:u,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),w.jsx(Si,{"data-id":c.id,onChange:l,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder,type:c.type,value:c.value,optionalText:""}),w.jsx("div",{className:"flex items-center justify-center mt-5",children:w.jsx("button",{"data-id":c.id,type:"button",onClick:a,children:w.jsx(Ur,{className:"text-danger",size:16})})})]},`filter-select-${c.id}`)}),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(ru,{size:14})," ",t.tableFilterNewFilter]})})]})})})},OF=({filter:e,onDelete:t,set:n})=>{const r=kt(),{operationOptions:o,operations:i}=Ku(),s=l=>{const c=l.target.value,u=l.target.dataset.id||"";n(f=>f.map(h=>h.id===u?{...h,operation:i[c]}:h))},a=l=>{const c=l.target.dataset.id||"",u=qu(l.target);n(f=>f.map(h=>h.id===c?{...h,value:u}:h))};return w.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[w.jsx(hr,{"data-id":e.id,onChange:s,options:o[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder,value:e.operation.value}),w.jsx(Si,{"data-id":e.id,onChange:a,type:e.type,value:e.value,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),w.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:w.jsx(Ur,{className:"text-danger",size:14})})]})},kF=({item:e,onPointerDown:t})=>{const n=Gr(0);return w.jsxs(zs.Item,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[w.jsx("button",{type:"button",className:"cursor-grab",children:w.jsx(CC,{size:14})}),w.jsx("span",{children:e.groupName})]},e.groupId)},DF=e=>{var l;const t=kt(),n=Yu(e.cols),r=dC(),[o,i]=b.useState(((l=e.groups[0])==null?void 0:l.thead)||""),s=c=>{var v;const u=c.target,f=u.value,h=u.options.selectedIndex,d=((v=u.options.item(h))==null?void 0:v.label)||"";i(d);const p=new Sb(e.rows).GroupBy(f),m=e.cols.find(g=>g.id===f);e.setGroups(Ax(p).map((g,x)=>{const y=p[g];return{...m,groupId:Us(),groupKey:f,index:x,rows:y,groupName:g}}))},a=()=>e.setGroups([]);return w.jsx(b.Fragment,{children:w.jsxs(xo,{arrow:!1,title:t.tableGroupLabel,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(OC,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[w.jsxs("div",{className:"flex flex-nowrap items-center",children:[w.jsx(hr,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),w.jsx(Vr,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:w.jsx(Ur,{size:16,className:"text-danger"})})]}),e.groups.length>0?w.jsxs("section",{className:"my-4",children:[w.jsx("header",{children:w.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),w.jsx(ME,{children:w.jsx(zs.Group,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(c=>w.jsx(kF,{item:c,onPointerDown:u=>{r.start(u),e.setGroups([...e.groups])}},c.groupId))})})]}):null]})})},MF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),FF=(e,t)=>e.toSorted(MF(t)),Tb=(e,t,n)=>({id:Us(),type:n,value:e.id,label:t}),jF=e=>{const t=kt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,Tb(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,value:u}:h))},s=l=>c=>{const u=c.target.value;e.set(f=>f.map(h=>h.id===l?{...h,type:u}:h))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(f=>f.id!==c))};return w.jsx(b.Fragment,{children:w.jsx(xo,{title:t.tableSortDropdownTitle,trigger:w.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[w.jsx(oy,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:w.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>w.jsxs("li",{className:"flex flex-nowrap gap-3",children:[w.jsx(hr,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),w.jsx(hr,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),w.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:w.jsx(Ur,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),w.jsx("li",{children:w.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[w.jsx(ru,{size:14})," ",t.tableSortAddButton]})})]})})})},LF=e=>{const t=kt(),[n,r]=b.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");b.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=Tb(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Uu(e.col);return w.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[w.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?w.jsx(bC,{size:14}):null,n==="desc"?w.jsx(vC,{size:14}):null,n==="undefined"?w.jsx(oy,{size:14}):null]})},NF=e=>w.jsx("header",{className:"min-w-full mb-1",children:w.jsxs("div",{className:"flex flex-wrap min-w-full items-center justify-between gap-x-4 gap-y-1",children:[w.jsxs("div",{className:"flex w-fit items-centeend gap-4 whitespace-nowrap py-2",children:[w.jsx("span",{children:w.jsx(AF,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),w.jsx("span",{children:w.jsx(jF,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),w.jsx("span",{children:w.jsx(DF,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),w.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=>w.jsxs("li",{className:"flex gap-1 items-center rounded-xl border border-card-border px-4 py-0.5",children:[w.jsxs("span",{children:[w.jsx("span",{className:"size-3 mr-2 aspect-square bg-primary inline-block rounded-full","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),w.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[w.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),w.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=qu(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})});function _F(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");let r=2;const o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const VF=e=>{const t=b.useId(),n=kt(),r=e.asLink||"button",o=b.useMemo(()=>_F(e.current,e.pages),[e.current,e.pages]),i=e.current<e.pages;return w.jsxs("footer",{className:"flex px-1 py-4 items-center justify-center gap-4 lg:justify-between flex-wrap lg:flex-nowrap",children:[w.jsx("p",{children:w.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?w.jsxs(b.Fragment,{children:[w.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),w.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:s=>{var a;(a=e.onChangeSize)==null||a.call(e,Number(s.target.value))},children:e.sizes.map(s=>w.jsx("option",{value:s,children:s},`pagination-opt-${s}`))})," "]}):null})}),w.jsx("nav",{children:w.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?w.jsx("li",{children:w.jsx(r,{href:"previous",className:"",children:n.tablePaginationPrevious})}):null,o.map(s=>s===null?null:w.jsx(b.Fragment,{children:typeof s=="string"?w.jsx("li",{children:"..."}):w.jsx("li",{children:w.jsx(r,{href:s,className:`cursor-pointer px-3 py-1 transition-colors border-b-2 hover:text-primary-subtle hover:border-primary-subtle proportional-nums ${s===e.current?"text-primary border-primary":"border-transparent"}`,children:s})})},`pagination-${s}`)),i?w.jsx("li",{children:w.jsx(r,{href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},$F={opacity:1},BF={opacity:.75,backgroundColor:"var(--table-border)"},HF={opacity:0,transition:{duration:.4,type:"spring"}},WF=e=>{var f;const t=kt(),n=e.filters.filter(h=>h.name===e.header.id),o=n.length>0?RC:IC,{operationOptions:i,operations:s}=Ku(),a=h=>{const d=h.currentTarget.dataset.id||"";return e.setFilters(p=>p.filter(m=>m.id!==d))},l=e.sorters.find(h=>e.header.id===h.value),c=l!=null&&l.type?l.type===wb.Asc?"ascending":"descending":"none",u=Uu(e.header);return w.jsx(zs.Item,{...e.header.thProps,as:"th",layout:!0,exit:HF,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader",value:e.header,whileDrag:BF,"aria-sort":c,"aria-busy":e.loading,animate:$F,className:`hidden px-2 py-4 font-medium first:table-cell md:table-cell ${((f=e.header.thProps)==null?void 0:f.className)??""}`,children:w.jsx("span",{className:"flex items-center justify-between",children:w.jsxs("span",{className:"flex items-center gap-1",children:[w.jsx(xo,{arrow:!0,trigger:w.jsxs("span",{children:[w.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[t.tableFilterDropdownTitleUnique," ",u]}),e.inlineFilter?w.jsx(o,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14}):null]}),title:w.jsxs("span",{className:"font-medium text-lg",children:[t.tableFilterDropdownTitleUnique," ",w.jsx("span",{className:"text-primary",children:u})]}),children:n.length===0===null?null:w.jsxs("ul",{className:"font-medium",children:[n.map(h=>w.jsx("li",{className:"my-1",children:w.jsx(OF,{onDelete:a,filter:h,set:e.setFilters})},`thead-filter-${h.id}`)),w.jsx("li",{children:w.jsxs("button",{onClick:()=>e.setFilters(h=>h.concat(yc(e.header,i,s))),type:"button",className:"flex items-center gap-1 text-primary",children:[w.jsx(ru,{size:14})," ",t.tableFilterNewFilter]})})]})}),w.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter?w.jsx(LF,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})})})},zF=e=>w.jsx(zs.Group,{as:"tr",role:"row",axis:"x",drag:!0,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,values:e.headers,onReorder:e.setCols,className:"border-none bg-table-background text-lg",children:w.jsx(vi,{children:e.headers.map(t=>w.jsx(WF,{inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,loading:e.loading,setFilters:e.setFilters,filters:e.filters,setSorters:e.setSorters,sorters:e.sorters,header:t},`header-child-item-${t.id}`))})}),Eb=b.createContext({}),GF=()=>b.useContext(Eb),UF=b.forwardRef((e,t)=>w.jsx("tbody",{...e,role:"rowgroup",className:`divide-y divide-table-border ${e.className??""}`,ref:t,children:w.jsx(vi,{children:e.children})})),YF=b.forwardRef((e,t)=>w.jsx("table",{...e,ref:t,role:"table",className:`table min-w-full table-auto divide-y divide-table-border text-left ${e.className??""}`})),qF=b.forwardRef(({context:e,...t},n)=>{var i;const r=GF(),o={...t==null?void 0:t.style,sticky:gn.number(r.sticky)?`${r.sticky}px`:(i=t==null?void 0:t.style)==null?void 0:i.sticky};return w.jsx("thead",{...t,style:o,role:"rowgroup",className:"shadow-xs group:sticky top-0 bg-card-background",ref:n})}),KF=b.forwardRef(({context:e,item:t,...n},r)=>w.jsx("tr",{...n,role:"row",ref:r,className:`table-row ${(n==null?void 0:n.className)??""}`})),XF=b.forwardRef((e,t)=>e.context.loadingMore?w.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:w.jsx("tr",{role:"row",className:"bg-card-background",children:w.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:w.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),QF={TableHead:qF,Table:YF,TableBody:UF,TableRow:KF,TableFoot:XF},ZF=[0,0,0,0,0,0,0,0,0,0],JF=(e,t,n)=>{const r=n.cols,o=n.loading;return w.jsx(b.Fragment,{children:r.map((i,s)=>{var f;const a=`${s},${e}`,l=fu(t,i.id),c=i.Element,u=((f=i.cellProps)==null?void 0:f.className)||"";return b.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`hidden h-14 border-none px-2 first:table-cell md:table-cell ${u}`},o?w.jsx("div",{className:"h-2 w-10/12 animate-pulse rounded bg-table-border"}):c?w.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l}):w.jsx(b.Fragment,{children:gn.nil(l)?"":l}))})})},ej=()=>w.jsx(b.Fragment,{}),Wp=({filters:e,pagination:t=null,onScrollEnd:n,useControl:r=!1,setCols:o,setFilters:i,sorters:s,cols:a,border:l=!1,setSorters:c,...u})=>{const f=b.useRef(null),[h,d]=b.useState(!1),p=cc(n),m=cc(u.loadingMore),v=b.useMemo(()=>{if(u.loading)return ZF;if(r)return u.rows;const g=new Sb(u.rows);return e.length>0&&e.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:g.Where(x.name,x.operation.symbol,x.value)),s.length===0?g.Select():FF(g.Select(),s)},[u.rows,e,s,u.loading]);return b.useEffect(()=>{if(f.current===null)return()=>{};const g=f.current,x=new IntersectionObserver(y=>{var E;return y[y.length-1].isIntersecting&&m.current?((E=p.current)==null||E.call(p),void d(!0)):d(!1)});return x.observe(g),()=>x.disconnect()},[]),w.jsxs("div",{className:"min-w-full",children:[w.jsxs("div",{className:`group rounded-lg px-1 ${l?"border border-table-border":""}`,children:[w.jsx(JM,{data:v,useWindowScroll:!0,components:QF,totalCount:v.length,itemContent:JF,context:{loading:u.loading,loadingMore:u.loadingMore,cols:a},fixedFooterContent:h?ej:null,fixedHeaderContent:()=>w.jsx(zF,{filters:e,headers:a,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter,loading:!!u.loading,setCols:o,setFilters:i,setSorters:c,sorters:s})}),w.jsx("div",{"aria-hidden":"true",ref:f,className:"h-0.5 w-full"})]}),t!==null?w.jsx(VF,{...t}):null]})},tj=(e,t)=>typeof t=="function"?t(e):t,zi=(e,t,n)=>e===t||n==null?void 0:n(t),nj=e=>{const t=b.useMemo(()=>({sticky:e.sticky}),[e.sticky]),n=e.operations??!0,r=b.useMemo(()=>Yu(e.cols),[e.cols]),[o,i]=lu({cols:e.cols,filters:e.filters??[],groups:e.groups??[],sorters:e.sorters??[]},s=>{const a=l=>c=>{const u=s.state();return{...u,[l]:tj(u[l],c)}};return{cols:a("cols"),filters:a("filters"),groups:a("groups"),sorters:a("sorters")}},{postMiddleware:[(s,a)=>{var l;return console.log("->",s,a),(l=e.set)==null||l.call(e,s),zi((a==null?void 0:a.filters)??[],s.filters??[],e.setFilters),zi((a==null?void 0:a.sorters)??[],s.sorters??[],e.setSorters),zi((a==null?void 0:a.groups)??[],s.groups??[],e.setGroups),zi((a==null?void 0:a.cols)??[],s.cols??[],e.setCols),s}]});return w.jsx(Eb.Provider,{value:t,children:w.jsxs("div",{className:"relative min-w-full",children:[n?w.jsx(NF,{cols:o.cols,filters:o.filters,groups:o.groups,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,options:r,pagination:e.pagination??null,rows:e.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters}):null,o.groups.length===0?w.jsx(Wp,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,groups:o.groups,index:0,optionCols:r,options:r,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters,pagination:e.pagination??null}):w.jsx("div",{className:"flex flex-wrap gap-4",children:o.groups.map((s,a)=>w.jsx(mt.div,{className:"min-w-full",children:w.jsx(Wp,{...e,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0,pagination:null,onScrollEnd:e.onScrollEnd,cols:o.cols,filters:o.filters,group:s,groups:o.groups,index:a,optionCols:r,options:r,rows:s.rows,setCols:i.cols,setFilters:i.filters,setGroups:i.groups,setSorters:i.sorters,sorters:o.sorters})},`group-${s.groupId}`))})]})})};var rj=String.prototype.replace,oj=/%20/g,hl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Xu={default:hl.RFC3986,formatters:{RFC1738:function(e){return rj.call(e,oj,"+")},RFC3986:function(e){return String(e)}},RFC1738:hl.RFC1738,RFC3986:hl.RFC3986},ij=Xu,pl=Object.prototype.hasOwnProperty,rr=Array.isArray,Kt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),sj=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(rr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Cb=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},aj=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(rr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!pl.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 rr(t)&&!rr(n)&&(o=Cb(t,r)),rr(t)&&rr(n)?(n.forEach(function(i,s){if(pl.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return pl.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},lj=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},cj=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}},ml=1024,uj=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;l+=ml){for(var c=s.length>=ml?s.slice(l,l+ml):s,u=[],f=0;f<c.length;++f){var h=c.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===ij.RFC1738&&(h===40||h===41)){u[u.length]=c.charAt(f);continue}if(h<128){u[u.length]=Kt[h];continue}if(h<2048){u[u.length]=Kt[192|h>>6]+Kt[128|h&63];continue}if(h<55296||h>=57344){u[u.length]=Kt[224|h>>12]+Kt[128|h>>6&63]+Kt[128|h&63];continue}f+=1,h=65536+((h&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=Kt[240|h>>18]+Kt[128|h>>12&63]+Kt[128|h>>6&63]+Kt[128|h&63]}a+=u.join("")}return a},fj=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var c=a[l],u=s[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:c}),r.push(u))}return sj(n),t},dj=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},hj=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},pj=function(t,n){return[].concat(t,n)},mj=function(t,n){if(rr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Pb={arrayToObject:Cb,assign:lj,combine:pj,compact:fj,decode:cj,encode:uj,isBuffer:hj,isRegExp:dj,maybeMap:mj,merge:aj},Rb=Ex,ts=Pb,qo=Xu,gj=Object.prototype.hasOwnProperty,Ib={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Xt=Array.isArray,yj=Array.prototype.push,Ab=function(e,t){yj.apply(e,Xt(t)?t:[t])},vj=Date.prototype.toISOString,zp=qo.default,it={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:ts.encode,encodeValuesOnly:!1,format:zp,formatter:qo.formatters[zp],indices:!1,serializeDate:function(t){return vj.call(t)},skipNulls:!1,strictNullHandling:!1},bj=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},gl={},xj=function e(t,n,r,o,i,s,a,l,c,u,f,h,d,p,m,v,g,x){for(var y=t,T=x,S=0,E=!1;(T=T.get(gl))!==void 0&&!E;){var I=T.get(t);if(S+=1,typeof I<"u"){if(I===S)throw new RangeError("Cyclic object value");E=!0}typeof T.get(gl)>"u"&&(S=0)}if(typeof u=="function"?y=u(n,y):y instanceof Date?y=d(y):r==="comma"&&Xt(y)&&(y=ts.maybeMap(y,function(O){return O instanceof Date?d(O):O})),y===null){if(s)return c&&!v?c(n,it.encoder,g,"key",p):n;y=""}if(bj(y)||ts.isBuffer(y)){if(c){var P=v?n:c(n,it.encoder,g,"key",p);return[m(P)+"="+m(c(y,it.encoder,g,"value",p))]}return[m(n)+"="+m(String(y))]}var A=[];if(typeof y>"u")return A;var C;if(r==="comma"&&Xt(y))v&&c&&(y=ts.maybeMap(y,c)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(Xt(u))C=u;else{var L=Object.keys(y);C=f?L.sort(f):L}var M=l?n.replace(/\./g,"%2E"):n,N=o&&Xt(y)&&y.length===1?M+"[]":M;if(i&&Xt(y)&&y.length===0)return N+"[]";for(var R=0;R<C.length;++R){var k=C[R],F=typeof k=="object"&&typeof k.value<"u"?k.value:y[k];if(!(a&&F===null)){var _=h&&l?k.replace(/\./g,"%2E"):k,z=Xt(y)?typeof r=="function"?r(N,_):N:N+(h?"."+_:"["+_+"]");x.set(t,S);var G=Rb();G.set(gl,x),Ab(A,e(F,z,r,o,i,s,a,l,r==="comma"&&v&&Xt(y)?null:c,u,f,h,d,p,m,v,g,G))}}return A},wj=function(t){if(!t)return it;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||it.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=qo.default;if(typeof t.format<"u"){if(!gj.call(qo.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=qo.formatters[r],i=it.filter;(typeof t.filter=="function"||Xt(t.filter))&&(i=t.filter);var s;if(t.arrayFormat in Ib?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=it.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:it.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:it.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:it.allowEmptyArrays,arrayFormat:s,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:it.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?it.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:it.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:it.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:it.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:it.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:it.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:it.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:it.strictNullHandling}},Sj=function(e,t){var n=e,r=wj(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):Xt(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a=Ib[r.arrayFormat],l=a==="comma"&&r.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=Rb(),u=0;u<o.length;++u){var f=o[u];r.skipNulls&&n[f]===null||Ab(s,xj(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 h=s.join(r.delimiter),d=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),h.length>0?d+h:""},no=Pb,vc=Object.prototype.hasOwnProperty,Tj=Array.isArray,Ze={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:no.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Ej=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Ob=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Cj="utf8=%26%2310003%3B",Pj="utf8=%E2%9C%93",Rj=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Pj?c="utf-8":s[l]===Cj&&(c="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],f=u.indexOf("]="),h=f===-1?u.indexOf("="):f+1,d,p;h===-1?(d=n.decoder(u,Ze.decoder,c,"key"),p=n.strictNullHandling?null:""):(d=n.decoder(u.slice(0,h),Ze.decoder,c,"key"),p=no.maybeMap(Ob(u.slice(h+1),n),function(v){return n.decoder(v,Ze.decoder,c,"value")})),p&&n.interpretNumericEntities&&c==="iso-8859-1"&&(p=Ej(p)),u.indexOf("[]=")>-1&&(p=Tj(p)?[p]:p);var m=vc.call(r,d);m&&n.duplicates==="combine"?r[d]=no.combine(r[d],p):(!m||n.duplicates==="last")&&(r[d]=p)}return r},Ij=function(e,t,n,r){for(var o=r?t:Ob(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=n.allowEmptyArrays&&(o===""||n.strictNullHandling&&o===null)?[]:[].concat(o);else{s=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===""?s={0:o}:!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[],s[u]=o):c!=="__proto__"&&(s[c]=o)}o=s}return o},Aj=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!r.plainObjects&&vc.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=a.exec(i))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&vc.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),Ij(u,n,r,o)}},Oj=function(t){if(!t)return Ze;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"?Ze.charset:t.charset,r=typeof t.duplicates>"u"?Ze.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:Ze.allowDots:!!t.allowDots;return{allowDots:o,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ze.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ze.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ze.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ze.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ze.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Ze.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Ze.decoder,delimiter:typeof t.delimiter=="string"||no.isRegExp(t.delimiter)?t.delimiter:Ze.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ze.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ze.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ze.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ze.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},kj=function(e,t){var n=Oj(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Rj(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=Aj(a,r[a],n,typeof e=="string");o=no.merge(o,l,n)}return n.allowSparse===!0?o:no.compact(o)},Dj=Sj,Mj=kj,Fj=Xu,jj={formats:Fj,parse:Mj,stringify:Dj};const Lj=(e,t)=>e.localeCompare(t),Nj={sort:Lj,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},kb=e=>{const t=new FormData(e),n=new URLSearchParams(t);return jj.parse(n.toString(),Nj)},Db=e=>e.replace("[",".").replace("]","").split("."),Fo=(e,t)=>Db(e).reduce((n,r)=>{var i;if(r==="")return n;const o=((i=n.shape)==null?void 0:i[r])||n;return o._def.typeName==="ZodArray"?o.element:o},t),ko=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),_j=(e,t)=>{const[n,r]=b.useState(null),o=b.useRef({}),[i,s]=b.useState({}),a=(p,m)=>{const v=Fo(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},l=(p,m)=>{const v=Fo(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},c=(p,m)=>{const v=Fo(p,e);return{...m,name:p,id:p,form:t,required:!v.isOptional(),error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}},u=(p,m)=>{const v=Fo(p,e);return{...m,name:p,id:p,required:!v.isOptional(),form:t,type:v._def.typeName==="ZodNumber"?"number":(m==null?void 0:m.type)??"text",error:n==null?void 0:n[p],ref:g=>{g!==null&&(o.current[p]={element:g,schema:v})}}};b.useEffect(()=>{const p=Object.values(o.current).map(v=>{const g=v.element.dataset.origin?document.querySelector(`[data-target="${v.element.name}"]`):v.element,x=v.schema.safeParse(ko(g)),y=S=>{var A;const E=g.dataset.target||g.name;if(!E)return;const I=ko(S.target)||(S.relatedTarget?ko(S.relatedTarget):""),P=v.schema.safeParse(I);if(P.success)return g.setCustomValidity(""),s(C=>xa(C,E,P.data)),r(C=>{const{[E]:L,...M}=C||{};return M===null||gn.empty(M)?null:M});if(g.required){const C=((A=P.error.issues[0])==null?void 0:A.message)||"";g.setCustomValidity(C),r(L=>({...L,[E]:C}))}},T=g.getAttribute("data-trigger")||"blur";return g.addEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y),{input:v,hasInitialError:g.required?!x.success:!1,unsubscribe:()=>{g.removeEventListener(T,y),g.tagName==="SELECT"&&g.addEventListener("change",y)}}});return p.some(v=>v.hasInitialError)&&r(v=>v===null?{}:v),()=>p.forEach(v=>v.unsubscribe())});const f=b.useCallback(p=>m=>{const v=m.currentTarget,g=Object.values(o.current).reduce((y,T)=>{var A;const S=T.element,E=T.schema.safeParse(ko(S));if(S.dataset.ignore==="ignore"||E.success)return y;const I=(A=E.error.issues[0])==null?void 0:A.message;S.setAttribute("data-initialized","true");const P=S.dataset.name||S.name||"";return{...y,[P]:I}},{}),x=gn.empty(g)?null:g;r(x),p==null||p({form:v,errors:x||{}})},[]),h=b.useCallback(p=>m=>{m.preventDefault();const v=m.currentTarget;let g=kb(v);(t?Array.from(document.querySelectorAll(`[form="${t}"]`)):Array.from(v.elements)).forEach(T=>{if(T.tagName==="SELECT"){const S=T;g=xa(g,S.name,S.value)}if(T.tagName==="INPUT"){const S=T;g=xa(g,S.name,ko(S))}});const y=e.safeParse(i);return y.success?p({form:v,json:g,data:y.data,event:m,reset:()=>lc(v),success:!0,errors:[]}):p({form:v,json:g,event:m,data:g,success:!1,reset:()=>lc(v),errors:y.error.issues.map(T=>({message:T.message,path:T.path.map(S=>String(S))}))})},[t]);return{state:i,input:u,datepicker:a,checkbox:c,select:l,onSubmit:h,errors:n,onInvalid:f,disabled:n!==null,name:t,get:p=>fu(i,p)||""}},Vj=e=>{const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current};exports.Alert=FC;exports.Autocomplete=ZO;exports.Button=Vr;exports.Calendar=Hy;exports.Card=Wy;exports.Checkbox=kv;exports.ColType=Lr;exports.Collapse=cy;exports.ComponentsProvider=SI;exports.DatePicker=ek;exports.Dropdown=xo;exports.Expand=IO;exports.FileUpload=dD;exports.Form=pD;exports.Input=Si;exports.InputFeedback=Av;exports.InputField=Js;exports.Menu=NO;exports.MenuItem=LO;exports.Modal=UO;exports.Option=Ov;exports.Polymorph=so;exports.Radiobox=mD;exports.Select=hr;exports.Stats=RI;exports.Switch=gD;exports.Tab=kI;exports.Table=nj;exports.Tabs=AI;exports.Tag=pw;exports.TaskList=yD;exports.Toolbar=YO;exports.Tooltip=Iv;exports.TransferList=nF;exports.convertPath=Db;exports.createColumns=PF;exports.createDesignTokens=Ly;exports.createOptionCols=Yu;exports.createStyles=gI;exports.createTheme=yI;exports.css=je;exports.defaultDarkTheme=xI;exports.defaultLightTheme=wI;exports.dispatchInput=gm;exports.formReset=lc;exports.formToJson=kb;exports.getSchemaShape=Fo;exports.initializeInputDataset=Fs;exports.isReactComponent=cw;exports.isReactFC=uw;exports.isSsr=gs;exports.mergeRefs=Pc;exports.parsers=cu;exports.path=fu;exports.reduceTokens=Wo;exports.safeRegex=Ul;exports.splitInto=$y;exports.useForm=_j;exports.usePrevious=Vj;exports.useReactive=zy;exports.useTablePreferences=IF;exports.useTranslations=kt;exports.uuid=Us;
201
201
  //# sourceMappingURL=index.js.map