dawn-ui-react 1.0.0-alpha.35 → 1.0.0-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dawn-ui-react.js +1373 -1370
- package/dist/dawn-ui-react.umd.cjs +4 -4
- package/package.json +1 -1
|
@@ -48,13 +48,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
48
48
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wpe(e,t){if(e){if(typeof e==`string`)return _T(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_T(e,t):void 0}}function _T(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tpe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Epe(e){if(Array.isArray(e))return e}function vT(e){if(Array.isArray(e)&&e.length===2){var t=gT(e,2),n=t[0],r=t[1];if(YS(n)&&YS(r))return!0}return!1}function yT(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function bT(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var n=gT(e,2),r=n[0],i=n[1],a,o;if(YS(r))a=r;else if(typeof r==`function`)return;if(YS(i))o=i;else if(typeof i==`function`)return;var s=[a,o];if(vT(s))return s}}function Dpe(e,t,n){if(!(!n&&t==null)){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(vT(r))return yT(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var i=gT(e,2),a=i[0],o=i[1],s,c;if(a===`auto`)t!=null&&(s=Math.min(...t));else if(by(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[0]))}catch{}else if(typeof a==`string`&&eC.test(a)){var l=eC.exec(a);if(l==null||l[1]==null||t==null)s=void 0;else{var u=+l[1];s=t[0]-u}}else s=t?.[0];if(o===`auto`)t!=null&&(c=Math.max(...t));else if(by(o))c=o;else if(typeof o==`function`)try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o==`string`&&tC.test(o)){var d=tC.exec(o);if(d==null||d[1]==null||t==null)c=void 0;else{var f=+d[1];c=t[1]+f}}else c=t?.[1];var p=[s,c];if(vT(p))return t==null?p:yT(p,t,n)}}}var xT=_(m(((e,t)=>{(function(e){"use strict";var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0){if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i)}if((i=e[r=`LN10`])!==void 0){if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i)}return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function ST(e){return e===0?1:Math.floor(new xT.default(e).abs().log(10).toNumber())+1}function CT(e,t,n){for(var r=new xT.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}function wT(e,t){return jpe(e)||Ape(e,t)||kpe(e,t)||Ope()}function Ope(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kpe(e,t){if(e){if(typeof e==`string`)return TT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TT(e,t):void 0}}function TT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ape(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function jpe(e){if(Array.isArray(e))return e}var ET=e=>{var t=wT(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]},DT=(e,t,n)=>{if(e.lte(0))return new xT.default(0);var r=ST(e.toNumber()),i=new xT.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new xT.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new xT.default(s.toNumber()):new xT.default(Math.ceil(s.toNumber()))},OT=(e,t,n)=>{if(e.lte(0))return new xT.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new xT.default(i).abs().log(10).toNumber()),o=new xT.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new xT.default(10).pow(l))}var u=r[c]??1,d=new xT.default(u).mul(o);return t?d:new xT.default(Math.ceil(d.toNumber()))},Mpe=(e,t,n)=>{var r=new xT.default(1),i=new xT.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new xT.default(10).pow(ST(e)-1),i=new xT.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new xT.default(Math.floor(e)))}else e===0?i=new xT.default(Math.floor((t-1)/2)):n||(i=new xT.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new xT.default(c-o).mul(r)).toNumber());return s},kT=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:DT;if(!Number.isFinite((t-e)/(n-1)))return{step:new xT.default(0),tickMin:new xT.default(0),tickMax:new xT.default(0)};var o=a(new xT.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new xT.default(0):(s=new xT.default(e).add(t).div(2),s=s.sub(new xT.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new xT.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?kT(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new xT.default(c).mul(o)),tickMax:s.add(new xT.default(l).mul(o))})},AT=function(e){var t=wT(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Math.max(i,2),c=wT(ET([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return Mpe(l,i,a);var f=kT(l,u,s,a,0,o===`snap125`?OT:DT),p=f.step,m=f.tickMin,h=f.tickMax,g=CT(m,h.add(new xT.default(.1).mul(p)),p);return n>r?g.reverse():g},jT=function(e,t){var n=wT(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=wT(ET([r,i]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var u=o===`snap125`?OT:DT,d=Math.max(t,2),f=u(new xT.default(l).sub(c).div(d-1),a,0),p=[...CT(new xT.default(c),new xT.default(l),f),l];if(a===!1){p=p.map(e=>Math.round(e));var m=p.length-1;m>0&&p[m]===p[m-1]&&(p=p.slice(0,m))}return r>i?p.reverse():p},Npe=e=>e.rootProps.barCategoryGap,MT=e=>e.rootProps.stackOffset,NT=e=>e.rootProps.reverseStackOrder,PT=e=>e.options.chartName,Ppe=e=>e.rootProps.syncId,Fpe=e=>e.rootProps.syncMethod,Ipe=e=>e.options.eventEmitter,FT={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},IT={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:FT.axis},LT={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:FT.axis},RT=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function zT(e,t,n){if(n!==`auto`)return n;if(e!=null)return $S(e,t)?`category`:`number`}function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?BT(Object(n),!0).forEach(function(t){Lpe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lpe(e,t,n){return(t=Rpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rpe(e){var t=zpe(e,`string`);return typeof t==`symbol`?t:t+``}function zpe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var HT={allowDataOverflow:IT.allowDataOverflow,allowDecimals:IT.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:IT.angleAxisId,includeHidden:!1,name:void 0,reversed:IT.reversed,scale:IT.scale,tick:IT.tick,tickCount:void 0,ticks:void 0,type:IT.type,unit:void 0,niceTicks:`auto`},UT={allowDataOverflow:LT.allowDataOverflow,allowDecimals:LT.allowDecimals,allowDuplicatedCategory:LT.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:LT.radiusAxisId,includeHidden:LT.includeHidden,name:void 0,reversed:LT.reversed,scale:LT.scale,tick:LT.tick,tickCount:LT.tickCount,ticks:void 0,type:LT.type,unit:void 0,niceTicks:`auto`},WT=Z([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},MC],(e,t)=>{if(e!=null)return e;var n=zT(t,`angleAxis`,HT.type)??`category`;return VT(VT({},HT),{},{type:n})}),GT=Z([(e,t)=>e.polarAxis.radiusAxis[t],MC],(e,t)=>{if(e!=null)return e;var n=zT(t,`radiusAxis`,UT.type)??`category`;return VT(VT({},UT),{},{type:n})}),KT=e=>e.polarOptions,qT=Z([rC,iC,vC],spe),JT=Z([KT,qT],(e,t)=>{if(e!=null)return Cy(e.innerRadius,t,0)}),YT=Z([KT,qT],(e,t)=>{if(e!=null)return Cy(e.outerRadius,t,t*.8)}),XT=Z([KT],e=>e==null?[0,0]:[e.startAngle,e.endAngle]);Z([WT,XT],RT);var ZT=Z([qT,JT,YT],(e,t,n)=>{if(e!=null&&t!=null&&n!=null)return[t,n]});Z([GT,ZT],RT),Z([AC,KT,JT,YT,rC,iC],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var o=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:Cy(o,i,i/2),cy:Cy(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}});var QT=(e,t)=>t,$T=(e,t,n)=>n;function eE(e){return e?.id}function tE(e,t,n){var r=t.chartData,i=r===void 0?[]:r,a=n.allowDuplicatedCategory,o=n.dataKey,s=new Map;return e.forEach(e=>{var t=e.data??i;if(t!=null&&t.length!==0){var n=eE(e);t.forEach((t,r)=>{var i=o==null||a?r:String(QS(t,o,null)),c=QS(t,e.dataKey,0),l=s.has(i)?s.get(i):{};Object.assign(l,{[n]:c}),s.set(i,l)})}}),Array.from(s.values())}function nE(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var rE=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function iE(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Bpe(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var aE=e=>{var t=AC(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},oE=e=>e.tooltip.settings.axisId;function sE(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i}}return r}}}}}var Vpe=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!vT(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];YS(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function cE(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hpe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lE(e){let t,n,r;e.length===2?(t=e===cE||e===Hpe?e:Upe,n=e,r=e):(t=cE,n=(t,n)=>cE(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function Upe(){return 0}function uE(e){return e===null?NaN:+e}function*Wpe(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var dE=lE(cE),fE=dE.right;dE.left,lE(uE).center;var pE=class extends Map{constructor(e,t=qpe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(mE(this,e))}has(e){return super.has(mE(this,e))}set(e,t){return super.set(Gpe(this,e),t)}delete(e){return super.delete(Kpe(this,e))}};function mE({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Gpe({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Kpe({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qpe(e){return typeof e==`object`&&e?e.valueOf():e}function Jpe(e=cE){if(e===cE)return hE;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function hE(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var Ype=Math.sqrt(50),Xpe=Math.sqrt(10),Zpe=Math.sqrt(2);function gE(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Ype?10:a>=Xpe?5:a>=Zpe?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?gE(e,t,n*2):[s,c,l]}function _E(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?gE(t,e,n):gE(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function vE(e,t,n){return t=+t,e=+e,n=+n,gE(e,t,n)[2]}function yE(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?vE(t,e,n):vE(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function bE(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function xE(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function SE(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?hE:Jpe(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));SE(e,t,u,d,i)}let a=e[t],o=n,s=r;for(CE(e,n,t),i(e[r],a)>0&&CE(e,n,r);o<s;){for(CE(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?CE(e,n,s):(++s,CE(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function CE(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Qpe(e,t,n){if(e=Float64Array.from(Wpe(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return xE(e);if(t>=1)return bE(e);var r,i=(r-1)*t,a=Math.floor(i),o=bE(SE(e,a).subarray(0,a+1));return o+(xE(e.subarray(a+1))-o)*(i-a)}}function $pe(e,t,n=uE){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function eme(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function wE(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function TE(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var EE=Symbol(`implicit`);function DE(){var e=new pE,t=[],n=[],r=EE;function i(i){let a=e.get(i);if(a===void 0){if(r!==EE)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new pE;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return DE(t,n).unknown(r)},wE.apply(i,arguments),i}function OE(){var e=DE().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=eme(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return OE(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},wE.apply(d(),arguments)}function kE(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return kE(t())},e}function tme(){return kE(OE.apply(null,arguments).paddingInner(1))}function AE(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jE(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ME(){}var NE=.7,PE=1/NE,FE=`\\s*([+-]?\\d+)\\s*`,IE=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,LE=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,RE=/^#([0-9a-f]{3,8})$/,zE=RegExp(`^rgb\\(${FE},${FE},${FE}\\)$`),BE=RegExp(`^rgb\\(${LE},${LE},${LE}\\)$`),VE=RegExp(`^rgba\\(${FE},${FE},${FE},${IE}\\)$`),HE=RegExp(`^rgba\\(${LE},${LE},${LE},${IE}\\)$`),UE=RegExp(`^hsl\\(${IE},${LE},${LE}\\)$`),WE=RegExp(`^hsla\\(${IE},${LE},${LE},${IE}\\)$`),GE={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};AE(ME,XE,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KE,formatHex:KE,formatHex8:qE,formatHsl:JE,formatRgb:YE,toString:YE});function KE(){return this.rgb().formatHex()}function qE(){return this.rgb().formatHex8()}function JE(){return lD(this).formatHsl()}function YE(){return this.rgb().formatRgb()}function XE(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=RE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ZE(t):n===3?new tD(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?QE(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?QE(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zE.exec(e))?new tD(t[1],t[2],t[3],1):(t=BE.exec(e))?new tD(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VE.exec(e))?QE(t[1],t[2],t[3],t[4]):(t=HE.exec(e))?QE(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UE.exec(e))?cD(t[1],t[2]/100,t[3]/100,1):(t=WE.exec(e))?cD(t[1],t[2]/100,t[3]/100,t[4]):GE.hasOwnProperty(e)?ZE(GE[e]):e===`transparent`?new tD(NaN,NaN,NaN,0):null}function ZE(e){return new tD(e>>16&255,e>>8&255,e&255,1)}function QE(e,t,n,r){return r<=0&&(e=t=n=NaN),new tD(e,t,n,r)}function $E(e){return e instanceof ME||(e=XE(e)),e?(e=e.rgb(),new tD(e.r,e.g,e.b,e.opacity)):new tD}function eD(e,t,n,r){return arguments.length===1?$E(e):new tD(e,t,n,r??1)}function tD(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}AE(tD,eD,jE(ME,{brighter(e){return e=e==null?PE:PE**+e,new tD(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?NE:NE**+e,new tD(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tD(oD(this.r),oD(this.g),oD(this.b),aD(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nD,formatHex:nD,formatHex8:rD,formatRgb:iD,toString:iD}));function nD(){return`#${sD(this.r)}${sD(this.g)}${sD(this.b)}`}function rD(){return`#${sD(this.r)}${sD(this.g)}${sD(this.b)}${sD((isNaN(this.opacity)?1:this.opacity)*255)}`}function iD(){let e=aD(this.opacity);return`${e===1?`rgb(`:`rgba(`}${oD(this.r)}, ${oD(this.g)}, ${oD(this.b)}${e===1?`)`:`, ${e})`}`}function aD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oD(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sD(e){return e=oD(e),(e<16?`0`:``)+e.toString(16)}function cD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dD(e,t,n,r)}function lD(e){if(e instanceof dD)return new dD(e.h,e.s,e.l,e.opacity);if(e instanceof ME||(e=XE(e)),!e)return new dD;if(e instanceof dD)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new dD(o,s,c,e.opacity)}function uD(e,t,n,r){return arguments.length===1?lD(e):new dD(e,t,n,r??1)}function dD(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}AE(dD,uD,jE(ME,{brighter(e){return e=e==null?PE:PE**+e,new dD(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?NE:NE**+e,new dD(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new tD(mD(e>=240?e-240:e+120,i,r),mD(e,i,r),mD(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dD(fD(this.h),pD(this.s),pD(this.l),aD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=aD(this.opacity);return`${e===1?`hsl(`:`hsla(`}${fD(this.h)}, ${pD(this.s)*100}%, ${pD(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function fD(e){return e=(e||0)%360,e<0?e+360:e}function pD(e){return Math.max(0,Math.min(1,e||0))}function mD(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var hD=e=>()=>e;function gD(e,t){return function(n){return e+n*t}}function _D(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function vD(e){return(e=+e)==1?yD:function(t,n){return n-t?_D(t,n,e):hD(isNaN(t)?n:t)}}function yD(e,t){var n=t-e;return n?gD(e,n):hD(isNaN(e)?t:e)}var bD=(function e(t){var n=vD(t);function r(e,t){var r=n((e=eD(e)).r,(t=eD(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=yD(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function xD(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function SD(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CD(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=MD(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function wD(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function TD(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ED(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=MD(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var DD=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OD=new RegExp(DD.source,`g`);function kD(e){return function(){return e}}function AD(e){return function(t){return e(t)+``}}function jD(e,t){var n=DD.lastIndex=OD.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=DD.exec(e))&&(i=OD.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:TD(r,i)})),n=OD.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?AD(c[0].x):kD(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function MD(e,t){var n=typeof t,r;return t==null||n===`boolean`?hD(t):(n===`number`?TD:n===`string`?(r=XE(t))?(t=r,bD):jD:t instanceof XE?bD:t instanceof Date?wD:SD(t)?xD:Array.isArray(t)?CD:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?ED:TD)(e,t)}function ND(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PD(e,t){t===void 0&&(t=e,e=MD);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function FD(e){return function(){return e}}function ID(e){return+e}var LD=[0,1];function RD(e){return e}function zD(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:FD(isNaN(t)?NaN:.5)}function BD(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function VD(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=zD(i,r),a=n(o,a)):(r=zD(r,i),a=n(a,o)),function(e){return a(r(e))}}function HD(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=zD(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=fE(e,t,1,r)-1;return a[n](i[n](t))}}function UD(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function WD(){var e=LD,t=LD,n=MD,r,i,a,o=RD,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==RD&&(o=BD(e[0],e[n-1])),s=n>2?HD:VD,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),TD))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,ID),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=ND,u()},d.clamp=function(e){return arguments.length?(o=e?!0:RD,u()):o!==RD},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function GD(){return WD()(RD,RD)}function KD(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function qD(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function JD(e){return e=qD(Math.abs(e)),e?e[1]:NaN}function YD(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function XD(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var ZD=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function QD(e){if(!(t=ZD.exec(e)))throw Error(`invalid format: `+e);var t;return new $D({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}QD.prototype=$D.prototype;function $D(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}$D.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function eO(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var tO;function nO(e,t){var n=qD(e,t);if(!n)return tO=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(tO=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+qD(e,Math.max(0,t+a-1))[0]}function rO(e,t){var n=qD(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var iO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:KD,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>rO(e*100,t),r:rO,s:nO,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function aO(e){return e}var oO=Array.prototype.map,sO=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function cO(e){var t=e.grouping===void 0||e.thousands===void 0?aO:YD(oO.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?aO:XD(oO.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=QD(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):iO[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=iO[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=eO(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&tO!==void 0?sO[8+tO/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(JD(t)/3)))*3,r=10**-n,i=l((e=QD(e),e.type=`f`,e),{suffix:sO[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var lO,uO,dO;fO({thousands:`,`,grouping:[3],currency:[`$`,``]});function fO(e){return lO=cO(e),uO=lO.format,dO=lO.formatPrefix,lO}function pO(e){return Math.max(0,-JD(Math.abs(e)))}function mO(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(JD(t)/3)))*3-JD(Math.abs(e)))}function hO(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,JD(t)-JD(e))+1}function gO(e,t,n,r){var i=yE(e,t,n),a;switch(r=QD(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=mO(i,o))&&(r.precision=a),dO(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=hO(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=pO(i))&&(r.precision=a-(r.type===`%`)*2)}return uO(r)}function _O(e){var t=e.domain;return e.ticks=function(e){var n=t();return _E(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return gO(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=vE(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function vO(){var e=GD();return e.copy=function(){return UD(e,vO())},wE.apply(e,arguments),_O(e)}function yO(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,ID),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return yO(e).unknown(t)},e=arguments.length?Array.from(e,ID):[0,1],_O(n)}function bO(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function xO(e){return Math.log(e)}function SO(e){return Math.exp(e)}function CO(e){return-Math.log(-e)}function wO(e){return-Math.exp(-e)}function TO(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function EO(e){return e===10?TO:e===Math.E?Math.exp:t=>e**+t}function DO(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function OO(e){return(t,n)=>-e(-t,n)}function kO(e){let t=e(xO,SO),n=t.domain,r=10,i,a;function o(){return i=DO(r),a=EO(r),n()[0]<0?(i=OO(i),a=OO(a),e(CO,wO)):e(xO,SO),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=_E(o,s,p))}else m=_E(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=QD(n)).precision==null&&(n.trim=!0),n=uO(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(bO(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function AO(){let e=kO(WD()).domain([1,10]);return e.copy=()=>UD(e,AO()).base(e.base()),wE.apply(e,arguments),e}function jO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function MO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function NO(e){var t=1,n=e(jO(t),MO(t));return n.constant=function(n){return arguments.length?e(jO(t=+n),MO(t)):t},_O(n)}function PO(){var e=NO(WD());return e.copy=function(){return UD(e,PO()).constant(e.constant())},wE.apply(e,arguments)}function FO(e){return function(t){return t<0?-((-t)**+e):t**+e}}function IO(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function LO(e){return e<0?-e*e:e*e}function RO(e){var t=e(RD,RD),n=1;function r(){return n===1?e(RD,RD):n===.5?e(IO,LO):e(FO(n),FO(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},_O(t)}function zO(){var e=RO(WD());return e.copy=function(){return UD(e,zO()).exponent(e.exponent())},wE.apply(e,arguments),e}function BO(){return zO.apply(null,arguments).exponent(.5)}function VO(e){return Math.sign(e)*e*e}function HO(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function UO(){var e=GD(),t=[0,1],n=!1,r;function i(t){var i=HO(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(VO(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,ID)).map(VO)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return UO(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wE.apply(i,arguments),_O(i)}function WO(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=$pe(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[fE(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(cE),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return WO().domain(e).range(t).unknown(r)},wE.apply(a,arguments)}function GO(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[fE(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return GO().domain([e,t]).range(i).unknown(a)},wE.apply(_O(o),arguments)}function KO(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[fE(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return KO().domain(e).range(t).unknown(n)},wE.apply(i,arguments)}var qO=new Date,JO=new Date;function YO(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>YO(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(qO.setTime(+t),JO.setTime(+r),e(qO),e(JO),Math.floor(n(qO,JO))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var XO=YO(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);XO.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?YO(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):XO),XO.range;var ZO=1e3,QO=ZO*60,$O=QO*60,ek=$O*24,tk=ek*7,nk=ek*30,rk=ek*365,ik=YO(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ZO)},(e,t)=>(t-e)/ZO,e=>e.getUTCSeconds());ik.range;var ak=YO(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZO)},(e,t)=>{e.setTime(+e+t*QO)},(e,t)=>(t-e)/QO,e=>e.getMinutes());ak.range;var ok=YO(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*QO)},(e,t)=>(t-e)/QO,e=>e.getUTCMinutes());ok.range;var sk=YO(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZO-e.getMinutes()*QO)},(e,t)=>{e.setTime(+e+t*$O)},(e,t)=>(t-e)/$O,e=>e.getHours());sk.range;var ck=YO(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*$O)},(e,t)=>(t-e)/$O,e=>e.getUTCHours());ck.range;var lk=YO(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*QO)/ek,e=>e.getDate()-1);lk.range;var uk=YO(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ek,e=>e.getUTCDate()-1);uk.range;var dk=YO(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ek,e=>Math.floor(e/ek));dk.range;function fk(e){return YO(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*QO)/tk)}var pk=fk(0),mk=fk(1),nme=fk(2),rme=fk(3),hk=fk(4),ime=fk(5),ame=fk(6);pk.range,mk.range,nme.range,rme.range,hk.range,ime.range,ame.range;function gk(e){return YO(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/tk)}var _k=gk(0),vk=gk(1),ome=gk(2),sme=gk(3),yk=gk(4),cme=gk(5),lme=gk(6);_k.range,vk.range,ome.range,sme.range,yk.range,cme.range,lme.range;var bk=YO(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bk.range;var xk=YO(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xk.range;var Sk=YO(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Sk.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:YO(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Sk.range;var Ck=YO(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ck.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:YO(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ck.range;function wk(e,t,n,r,i,a){let o=[[ik,1,ZO],[ik,5,5*ZO],[ik,15,15*ZO],[ik,30,30*ZO],[a,1,QO],[a,5,5*QO],[a,15,15*QO],[a,30,30*QO],[i,1,$O],[i,3,3*$O],[i,6,6*$O],[i,12,12*$O],[r,1,ek],[r,2,2*ek],[n,1,tk],[t,1,nk],[t,3,3*nk],[e,1,rk]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=lE(([,,e])=>e).right(o,i);if(a===o.length)return e.every(yE(t/rk,n/rk,r));if(a===0)return XO.every(Math.max(yE(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[ume,dme]=wk(Ck,xk,_k,dk,ck,ok),[fme,pme]=wk(Sk,bk,pk,lk,sk,ak);function Tk(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ek(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Dk(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function mme(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=jk(i),u=Mk(i),d=jk(a),f=Mk(a),p=jk(o),m=Mk(o),h=jk(s),g=Mk(s),_=jk(c),v=Mk(c),y={a:N,A:P,b:F,B:I,c:null,d:Lk,e:Lk,f:Lme,g:qme,G:Yme,H:Pme,I:Fme,j:Ime,L:Rk,m:Rme,M:zme,p:L,q:R,Q:Wk,s:Gk,S:Bme,u:Vme,U:Hme,V:Ume,w:Wme,W:Gme,x:null,X:null,y:Kme,Y:Jme,Z:Xme,"%":Uk},b={a:z,A:B,b:V,B:H,c:null,d:Bk,e:Bk,f:ehe,g:uhe,G:fhe,H:Zme,I:Qme,j:$me,L:Vk,m:the,M:nhe,p:U,q:W,Q:Wk,s:Gk,S:rhe,u:ihe,U:ahe,V:ohe,w:she,W:che,x:null,X:null,y:lhe,Y:dhe,Z:phe,"%":Uk},x={a:E,A:D,b:O,B:k,c:A,d:Fk,e:Fk,f:Ame,g:Pk,G:Nk,H:Ik,I:Ik,j:Eme,L:kme,m:Tme,M:Dme,p:T,q:wme,Q:Mme,s:Nme,S:Ome,u:yme,U:bme,V:xme,w:vme,W:Sme,x:j,X:M,y:Pk,Y:Nk,Z:Cme,"%":jme};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=Ok[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=Dk(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=Ek(Dk(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?vk.ceil(a):vk(a),a=uk.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Tk(Dk(r.y,0,1)),o=a.getDay(),a=o>4||o===0?mk.ceil(a):mk(a),a=lk.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?Ek(Dk(r.y,0,1)).getUTCDay():Tk(Dk(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Ek(r)):Tk(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in Ok?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function U(e){return i[+(e.getUTCHours()>=12)]}function W(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var Ok={"-":``,_:` `,0:`0`},kk=/^\s*\d+/,hme=/^%/,gme=/[\\^$*+?|[\]().{}]/g;function Ak(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function _me(e){return e.replace(gme,`\\$&`)}function jk(e){return RegExp(`^(?:`+e.map(_me).join(`|`)+`)`,`i`)}function Mk(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function vme(e,t,n){var r=kk.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yme(e,t,n){var r=kk.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bme(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xme(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Sme(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nk(e,t,n){var r=kk.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Pk(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Cme(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function wme(e,t,n){var r=kk.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Tme(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fk(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Eme(e,t,n){var r=kk.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ik(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Dme(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ome(e,t,n){var r=kk.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function kme(e,t,n){var r=kk.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ame(e,t,n){var r=kk.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jme(e,t,n){var r=hme.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Mme(e,t,n){var r=kk.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Nme(e,t,n){var r=kk.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Lk(e,t){return Ak(e.getDate(),t,2)}function Pme(e,t){return Ak(e.getHours(),t,2)}function Fme(e,t){return Ak(e.getHours()%12||12,t,2)}function Ime(e,t){return Ak(1+lk.count(Sk(e),e),t,3)}function Rk(e,t){return Ak(e.getMilliseconds(),t,3)}function Lme(e,t){return Rk(e,t)+`000`}function Rme(e,t){return Ak(e.getMonth()+1,t,2)}function zme(e,t){return Ak(e.getMinutes(),t,2)}function Bme(e,t){return Ak(e.getSeconds(),t,2)}function Vme(e){var t=e.getDay();return t===0?7:t}function Hme(e,t){return Ak(pk.count(Sk(e)-1,e),t,2)}function zk(e){var t=e.getDay();return t>=4||t===0?hk(e):hk.ceil(e)}function Ume(e,t){return e=zk(e),Ak(hk.count(Sk(e),e)+(Sk(e).getDay()===4),t,2)}function Wme(e){return e.getDay()}function Gme(e,t){return Ak(mk.count(Sk(e)-1,e),t,2)}function Kme(e,t){return Ak(e.getFullYear()%100,t,2)}function qme(e,t){return e=zk(e),Ak(e.getFullYear()%100,t,2)}function Jme(e,t){return Ak(e.getFullYear()%1e4,t,4)}function Yme(e,t){var n=e.getDay();return e=n>=4||n===0?hk(e):hk.ceil(e),Ak(e.getFullYear()%1e4,t,4)}function Xme(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Ak(t/60|0,`0`,2)+Ak(t%60,`0`,2)}function Bk(e,t){return Ak(e.getUTCDate(),t,2)}function Zme(e,t){return Ak(e.getUTCHours(),t,2)}function Qme(e,t){return Ak(e.getUTCHours()%12||12,t,2)}function $me(e,t){return Ak(1+uk.count(Ck(e),e),t,3)}function Vk(e,t){return Ak(e.getUTCMilliseconds(),t,3)}function ehe(e,t){return Vk(e,t)+`000`}function the(e,t){return Ak(e.getUTCMonth()+1,t,2)}function nhe(e,t){return Ak(e.getUTCMinutes(),t,2)}function rhe(e,t){return Ak(e.getUTCSeconds(),t,2)}function ihe(e){var t=e.getUTCDay();return t===0?7:t}function ahe(e,t){return Ak(_k.count(Ck(e)-1,e),t,2)}function Hk(e){var t=e.getUTCDay();return t>=4||t===0?yk(e):yk.ceil(e)}function ohe(e,t){return e=Hk(e),Ak(yk.count(Ck(e),e)+(Ck(e).getUTCDay()===4),t,2)}function she(e){return e.getUTCDay()}function che(e,t){return Ak(vk.count(Ck(e)-1,e),t,2)}function lhe(e,t){return Ak(e.getUTCFullYear()%100,t,2)}function uhe(e,t){return e=Hk(e),Ak(e.getUTCFullYear()%100,t,2)}function dhe(e,t){return Ak(e.getUTCFullYear()%1e4,t,4)}function fhe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?yk(e):yk.ceil(e),Ak(e.getUTCFullYear()%1e4,t,4)}function phe(){return`+0000`}function Uk(){return`%`}function Wk(e){return+e}function Gk(e){return Math.floor(e/1e3)}var Kk,qk,Jk;mhe({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function mhe(e){return Kk=mme(e),qk=Kk.format,Kk.parse,Jk=Kk.utcFormat,Kk.utcParse,Kk}function hhe(e){return new Date(e)}function ghe(e){return e instanceof Date?+e:+new Date(+e)}function Yk(e,t,n,r,i,a,o,s,c,l){var u=GD(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,ghe)):f().map(hhe)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(bO(n,e)):u},u.copy=function(){return UD(u,Yk(e,t,n,r,i,a,o,s,c,l))},u}function _he(){return wE.apply(Yk(fme,pme,Sk,bk,pk,lk,sk,ak,ik,qk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function vhe(){return wE.apply(Yk(ume,dme,Ck,xk,_k,uk,ck,ok,ik,Jk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Xk(){var e=0,t=1,n,r,i,a,o=RD,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(MD),l.rangeRound=u(ND),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function Zk(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Qk(){var e=_O(Xk()(RD));return e.copy=function(){return Zk(e,Qk())},TE.apply(e,arguments)}function $k(){var e=kO(Xk()).domain([1,10]);return e.copy=function(){return Zk(e,$k()).base(e.base())},TE.apply(e,arguments)}function eA(){var e=NO(Xk());return e.copy=function(){return Zk(e,eA()).constant(e.constant())},TE.apply(e,arguments)}function tA(){var e=RO(Xk());return e.copy=function(){return Zk(e,tA()).exponent(e.exponent())},TE.apply(e,arguments)}function yhe(){return tA.apply(null,arguments).exponent(.5)}function nA(){var e=[],t=RD;function n(n){if(n!=null&&!isNaN(n=+n))return t((fE(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(cE),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Qpe(e,r/t))},n.copy=function(){return nA(t).domain(e)},TE.apply(n,arguments)}function rA(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=RD,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=PD(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(MD),p.rangeRound=m(ND),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function iA(){var e=_O(rA()(RD));return e.copy=function(){return Zk(e,iA())},TE.apply(e,arguments)}function aA(){var e=kO(rA()).domain([.1,1,10]);return e.copy=function(){return Zk(e,aA()).base(e.base())},TE.apply(e,arguments)}function oA(){var e=NO(rA());return e.copy=function(){return Zk(e,oA()).constant(e.constant())},TE.apply(e,arguments)}function sA(){var e=RO(rA());return e.copy=function(){return Zk(e,sA()).exponent(e.exponent())},TE.apply(e,arguments)}function bhe(){return sA.apply(null,arguments).exponent(.5)}var cA=h({scaleBand:()=>OE,scaleDiverging:()=>iA,scaleDivergingLog:()=>aA,scaleDivergingPow:()=>sA,scaleDivergingSqrt:()=>bhe,scaleDivergingSymlog:()=>oA,scaleIdentity:()=>yO,scaleImplicit:()=>EE,scaleLinear:()=>vO,scaleLog:()=>AO,scaleOrdinal:()=>DE,scalePoint:()=>tme,scalePow:()=>zO,scaleQuantile:()=>WO,scaleQuantize:()=>GO,scaleRadial:()=>UO,scaleSequential:()=>Qk,scaleSequentialLog:()=>$k,scaleSequentialPow:()=>tA,scaleSequentialQuantile:()=>nA,scaleSequentialSqrt:()=>yhe,scaleSequentialSymlog:()=>eA,scaleSqrt:()=>BO,scaleSymlog:()=>PO,scaleThreshold:()=>KO,scaleTime:()=>_he,scaleUtc:()=>vhe,tickFormat:()=>gO});function xhe(e){var t=cA;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${Dy(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function lA(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=xhe(e);if(r!=null)return r.domain(t).range(n),r}}function uA(e,t,n,r){if(n!=null&&r!=null)return typeof e.scale==`function`?lA(e.scale,n,r):lA(t,n,r)}function She(e){return`scale${Dy(e)}`}function Che(e){return She(e)in cA}var dA=(e,t,n)=>{if(e!=null){var r=e.scale,i=e.type;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return Che(r)?r:`point`}};function whe(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function fA(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=whe(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function The(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):fA(e,void 0)}function pA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pA(Object(n),!0).forEach(function(t){Ehe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ehe(e,t,n){return(t=Dhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dhe(e){var t=Ohe(e,`string`);return typeof t==`symbol`?t:t+``}function Ohe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function hA(e,t){return Mhe(e)||jhe(e,t)||Ahe(e,t)||khe()}function khe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
50
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ahe(e,t){if(e){if(typeof e==`string`)return gA(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gA(e,t):void 0}}function gA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jhe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Mhe(e){if(Array.isArray(e))return e}var _A=[0,`auto`],Nhe={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},Phe=(e,t)=>e.cartesianAxis.xAxis[t],vA=(e,t)=>Phe(e,t)??Nhe,Fhe={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:_A,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},Ihe=(e,t)=>e.cartesianAxis.yAxis[t],yA=(e,t)=>Ihe(e,t)??Fhe,Lhe={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},bA=(e,t)=>e.cartesianAxis.zAxis[t]??Lhe,xA=(e,t,n)=>{switch(t){case`xAxis`:return vA(e,n);case`yAxis`:return yA(e,n);case`zAxis`:return bA(e,n);case`angleAxis`:return WT(e,n);case`radiusAxis`:return GT(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},Rhe=(e,t,n)=>{switch(t){case`xAxis`:return vA(e,n);case`yAxis`:return yA(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},SA=(e,t,n)=>{switch(t){case`xAxis`:return vA(e,n);case`yAxis`:return yA(e,n);case`angleAxis`:return WT(e,n);case`radiusAxis`:return GT(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},CA=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function wA(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var zhe=e=>e.graphicalItems.cartesianItems,Bhe=Z([QT,$T],wA),TA=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0||!e.hide),EA=Z([zhe,xA,Bhe],TA,{memoizeOptions:{resultEqualityCheck:iE}}),DA=Z([EA],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(nE)),OA=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),Vhe=Z([EA],OA),kA=e=>e.map(e=>e.data).filter(Boolean).flat(1),Hhe=Z([EA],e=>e.some(e=>!e.data)),AA=Z([EA],kA,{memoizeOptions:{resultEqualityCheck:iE}}),jA=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,i=t.dataStartIndex,a=t.dataEndIndex;return e.length>0?e:r.slice(i,a+1)},MA=Z([AA,hT],jA),Uhe=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:QS(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:QS(e,t.dataKey)})),NA=(e,t,n,r,i,a)=>{var o=r.chartData,s=o===void 0?[]:o,c=r.dataStartIndex,l=r.dataEndIndex,u=Uhe(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...s.slice(c,l+1).map(e=>({value:QS(e,t.dataKey)})).filter(e=>e.value!=null),...u]:u},PA=Z([MA,xA,EA,hT,Hhe,AA],NA);function FA(e){if(xy(e)||e instanceof Date){var t=Number(e);if(YS(t))return t}}function IA(e){if(Array.isArray(e)){var t=[FA(e[0]),FA(e[1])];return vT(t)?t:void 0}var n=FA(e);if(n!=null)return[n,n]}function LA(e){return e.map(FA).filter(Oy)}function Whe(e,t){var n=FA(e),r=FA(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var Ghe=Z([PA],e=>e?.map(e=>e.value).sort(Whe));function RA(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function Khe(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!vy(t))r=t;else if(Array.isArray(t)){var i=LA(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:LA(n.flatMap(t=>{var n=QS(e,t.dataKey),i,a;if(Array.isArray(n)){var o=hA(n,2);i=o[0],a=o[1]}else i=a=n;if(!(!YS(i)||!YS(a)))return[r-i,r+a]}))}var zA=e=>SA(e,aE(e),oE(e)),BA=Z([zA],e=>e?.dataKey),qhe=Z([DA,hT,zA],tE),VA=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=hA(t,2),a=i[0],o=i[1],s=r?[...o].reverse():o;return[a,{stackedData:mde(e,s.map(eE),n),graphicalItems:s}]}))},Jhe=Z([qhe,DA,MT,NT],VA),HA=(e,t,n,r)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(r==null&&n!==`zAxis`)return _de(e,i,a)},Yhe=Z([xA],e=>e.allowDataOverflow),UA=e=>{if(e==null||!(`domain`in e))return _A;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=LA(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??_A},WA=Z([xA],UA),GA=Z([WA,Yhe],bT),Xhe=Z([Jhe,pT,QT,GA],HA,{memoizeOptions:{resultEqualityCheck:rE}}),KA=e=>e.errorBars,Zhe=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>RA(n,e)),qA=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(r.length!==0){var i=r.flat();return[Math.min(...i),Math.max(...i)]}},JA=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>RA(i,e));n.forEach(n=>{var r=QS(n,t.dataKey??e.dataKey),i=Khe(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=IA(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=IA(QS(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),YS(o)&&YS(s))return[o,s]},Qhe=Z([MA,xA,Vhe,KA,QT,xpe],JA,{memoizeOptions:{resultEqualityCheck:rE}});function $he(e){var t=e.value;if(xy(t)||t instanceof Date)return t}var ege=(e,t,n)=>{var r=e.map($he).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&wy(r))?fT(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},YA=e=>e.referenceElements.dots,XA=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),tge=Z([YA,QT,$T],XA),ZA=e=>e.referenceElements.areas,nge=Z([ZA,QT,$T],XA),QA=e=>e.referenceElements.lines,rge=Z([QA,QT,$T],XA),$A=(e,t)=>{if(e!=null){var n=LA(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},ige=Z(tge,QT,$A),ej=(e,t)=>{if(e!=null){var n=LA(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},age=Z([nge,QT],ej);function oge(e){if(e.x!=null)return LA([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:LA(t)}function sge(e){if(e.y!=null)return LA([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:LA(t)}var tj=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?oge(e):sge(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},cge=Z(ige,Z([rge,QT],tj),age,(e,t,n)=>qA(e,n,t)),nj=(e,t,n,r,i,a,o,s,c)=>{if(n!=null)return n;var l=o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?qA(r,a,i):qA(a,i),u=Dpe(t,l,e.allowDataOverflow);return u==null&&e.allowDataOverflow&&l==null&&c!=null?c:u},lge=Z([xA,WA,GA,Xhe,Qhe,cge,AC,QT,Z([xA],e=>{if(!(e==null||e.type!==`number`||!(`ticks`in e)||e.ticks==null)){var t=LA(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:rE}})],nj,{memoizeOptions:{resultEqualityCheck:rE}}),uge=[0,1],rj=(e,t,n,r,i,a,o)=>{if(e!=null&&n!=null&&n.length!==0||o!==void 0){var s=e.dataKey,c=e.type,l=$S(t,a);return l&&s==null?fT(0,n?.length??0):c===`category`?ege(r,e,l):i===`expand`&&!l?uge:o}},ij=Z([xA,AC,MA,PA,MT,QT,lge],rj),aj=Z([xA,CA,PT],dA),oj=(e,t,n)=>{var r=t.niceTicks;if(r!==`none`){var i=UA(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&vT(e)){if(a)return AT(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return jT(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&vT(e))return AT(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&vT(e))return jT(e,t.tickCount,t.allowDecimals,`adaptive`)}}},sj=Z([ij,SA,aj],oj),cj=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&vT(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},dge=Z([xA,ij,sj,QT],cj),lj=Z(Z(PA,xA,(e,t)=>{if(!(!t||t.type!==`number`)){var n=1/0,r=Array.from(LA(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(c!=null&&l!=null){var u=l-c;n=Math.min(n,u)}}return n/o}}),AC,Npe,vC,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!YS(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=Cy(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),fge=(e,t,n)=>{var r=vA(e,t);return r==null||typeof r.padding!=`string`?0:lj(e,`xAxis`,t,n,r.padding)},pge=(e,t,n)=>{var r=yA(e,t);return r==null||typeof r.padding!=`string`?0:lj(e,`yAxis`,t,n,r.padding)},mge=Z(vA,fge,(e,t)=>{if(e==null)return{left:0,right:0};var n=e.padding;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),hge=Z(yA,pge,(e,t)=>{if(e==null)return{top:0,bottom:0};var n=e.padding;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),gge=Z([vC,mge,CC,SC,(e,t,n)=>n],(e,t,n,r,i)=>{var a=r.padding;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),_ge=Z([vC,AC,hge,CC,SC,(e,t,n)=>n],(e,t,n,r,i,a)=>{var o=i.padding;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),uj=(e,t,n,r)=>{switch(t){case`xAxis`:return gge(e,n,r);case`yAxis`:return _ge(e,n,r);case`zAxis`:return bA(e,n)?.range;case`angleAxis`:return XT(e);case`radiusAxis`:return ZT(e,n);default:return}},dj=Z([xA,uj],RT),fj=Z([xA,aj,Z([aj,dge],Vpe),dj],uA),pj=(e,t,n,r)=>{if(n!=null&&n.dataKey!=null){var i=n.type,a=n.scale;if($S(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},mj=Z([AC,PA,SA,QT],pj),hj=Z([fj],sE);Z([fj],The),Z([fj,Ghe],fA),Z([EA,KA,QT],Zhe);function gj(e,t){return e.id<t.id?-1:+(e.id>t.id)}var _j=(e,t)=>t,vj=(e,t,n)=>n,vge=Z(oC,_j,vj,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(gj)),yge=Z(sC,_j,vj,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(gj)),yj=(e,t)=>{var n=typeof t.height==`number`?t.height:30;return{width:e.width,height:n}},bge=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height});Z(vC,vA,yj);var xge=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},Sge=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},Cge=Z(iC,vC,vge,_j,vj,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=yj(t,n);o??=xge(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),wge=Z(rC,vC,yge,_j,vj,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=bge(t,n);o??=Sge(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a});Z([vC,vA,(e,t)=>{var n=vA(e,t);if(n!=null)return Cge(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Z([vC,yA,(e,t)=>{var n=yA(e,t);if(n!=null)return wge(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Z(vC,yA,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}));var bj=(e,t,n,r)=>{if(n!=null){var i=n.allowDuplicatedCategory,a=n.type,o=n.dataKey,s=$S(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&wy(l))return c}},xj=Z([AC,PA,xA,QT],bj);Z([AC,Rhe,aj,hj,xj,mj,uj,sj,QT],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=$S(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),Z([AC,SA,aj,hj,sj,uj,xj,mj,QT],(e,t,n,r,i,a,o,s,c)=>{if(t!=null&&r!=null){var l=$S(e,c),u=t.type,d=t.ticks,f=t.tickCount,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?_y(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return YS(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(Oy):l&&s?s.map((e,t)=>{var n=r.map(e);return YS(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Oy):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return YS(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Oy):r.domain().map((e,t)=>{var n=r.map(e);return YS(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(Oy)}}),Z([AC,SA,hj,uj,xj,mj,QT],(e,t,n,r,i,a,o)=>{if(t!=null&&n!=null&&r!=null&&r[0]!==r[1]){var s=$S(e,o),c=t.tickCount,l=0;return l=o===`angleAxis`&&r?.length>=2?_y(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return YS(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(Oy):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return YS(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(Oy):n.domain().map((e,t)=>{var r=n.map(e);return YS(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(Oy)}}),Z(xA,hj,(e,t)=>{if(e!=null&&t!=null)return mA(mA({},e),{},{scale:t})}),Z((e,t,n)=>bA(e,n),Z([Z([xA,aj,ij,dj],uA)],sE),(e,t)=>{if(e!=null&&t!=null)return mA(mA({},e),{},{scale:t})}),Z([AC,oC,sC],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}}),Z([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(!(!e||e.length===0))return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var Sj=e=>e.options.defaultTooltipEventType,Cj=e=>e.options.validateTooltipEventTypes;function wj(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}function Tge(e,t){return wj(t,Sj(e),Cj(e))}function Ege(e){return ix(t=>Tge(t,e))}var Tj=(e,t)=>{var n,r=Number(t);if(!(vy(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},Dge=e=>e.tooltip.settings,Ej={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Dj=BS({name:`tooltip`,initialState:{itemInteraction:{click:Ej,hover:Ej},axisInteraction:{click:Ej,hover:Ej},keyboardInteraction:Ej,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(PS(t.payload))},prepare:RS()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=jS(e).tooltipItemPayloads.indexOf(PS(r));a>-1&&(e.tooltipItemPayloads[a]=PS(i))},prepare:RS()},removeTooltipEntrySettings:{reducer(e,t){var n=jS(e).tooltipItemPayloads.indexOf(PS(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:RS()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),Oj=Dj.actions;Oj.addTooltipEntrySettings,Oj.replaceTooltipEntrySettings,Oj.removeTooltipEntrySettings;var Oge=Oj.setTooltipSettingsState;Oj.setActiveMouseOverItemIndex,Oj.mouseLeaveItem,Oj.mouseLeaveChart,Oj.setActiveClickItemIndex,Oj.setMouseOverAxisIndex,Oj.setMouseClickAxisIndex;var kge=Oj.setSyncInteraction;Oj.setKeyboardInteraction,Dj.reducer;function kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Aj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kj(Object(n),!0).forEach(function(t){Age(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Age(e,t,n){return(t=jge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jge(e){var t=Mge(e,`string`);return typeof t==`symbol`?t:t+``}function Mge(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nge(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function Pge(e){return e.index!=null}var jj=(e,t,n,r)=>{if(t==null)return Ej;var i=Nge(e,t,n);if(i==null)return Ej;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(Pge(i)){if(a)return Aj(Aj({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Aj(Aj({},Ej),{},{coordinate:i.coordinate})};function Fge(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Ige(e,t){var n=Fge(e),r=t[0],i=t[1];return n!==void 0&&n>=Math.min(r,i)&&n<=Math.max(r,i)}function Lge(e,t,n){if(n==null||t==null)return!0;var r=QS(e,t);return r==null||!vT(n)||Ige(r,n)}var Mj=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!YS(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||Lge(l,n,r)?String(c):null},Nj=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},Pj=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},Fj=e=>e.options.tooltipPayloadSearcher,Ij=e=>e.tooltip;function Lj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lj(Object(n),!0).forEach(function(t){Rge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rge(e,t,n){return(t=zge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zge(e){var t=Bge(e,`string`);return typeof t==`symbol`?t:t+``}function Bge(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Vge(e){if(typeof e==`string`||typeof e==`number`)return e}function Hge(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function Uge(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function zj(e){if(typeof e==`string`)return e}function Wge(e){if(!(typeof e!=`object`||!e))return{name:`name`in e?Vge(e.name):void 0,unit:`unit`in e?Hge(e.unit):void 0,dataKey:`dataKey`in e?Uge(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?zj(e.color):void 0,fill:`fill`in e?zj(e.fill):void 0}}function Gge(e,t){return e??t}var Bj=(e,t,n,r,i,a,o)=>{if(t!=null&&a!=null){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d=n.dataDefinedOnItem,f=n.settings,p=Gge(d,s),m=Array.isArray(p)?JS(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_;return r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?(_=lce(m,r,i),_??=a(m,t,c,g)):_=a(m,t,c,g),Array.isArray(_)?_.forEach(t=>{var n=Wge(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=Rj(Rj({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(nC({tooltipEntrySettings:o,dataKey:i,payload:a,value:QS(a,i),name:r==null?void 0:String(r)}))}):e.push(nC({tooltipEntrySettings:f,dataKey:h,payload:_,value:QS(_,h),name:QS(_,g)??f?.name})),e},[])}},Vj=Z([zA,CA,PT],dA),Hj=Z([Z([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),zA,Z([aE,oE],wA)],TA,{memoizeOptions:{resultEqualityCheck:iE}}),Kge=Z([Hj],e=>e.filter(nE)),Uj=Z([Hj],kA,{memoizeOptions:{resultEqualityCheck:iE}}),qge=Z([Hj],e=>e.some(e=>!e.data)),Wj=Z([Uj,pT],jA),Jge=Z([Kge,pT,zA],tE),Gj=Z([Wj,zA,Hj,pT,qge,Uj],NA),Kj=Z([zA],UA),qj=Z([Kj,Z([zA],e=>e.allowDataOverflow)],bT),Yge=Z([Z([Jge,Z([Hj],e=>e.filter(nE)),MT,NT],VA),pT,aE,qj],HA),Xge=Z([Wj,zA,Z([Hj],OA),KA,aE,Spe],JA,{memoizeOptions:{resultEqualityCheck:rE}}),Zge=Z([Z([YA,aE,oE],XA),aE],$A),Qge=Z([Z([ZA,aE,oE],XA),aE],ej),Jj=Z([zA,AC,Wj,Gj,MT,aE,Z([zA,Kj,qj,Yge,Xge,Z([Zge,Z([Z([QA,aE,oE],XA),aE],tj),Qge],qA),AC,aE],nj)],rj),$ge=Z([zA,Jj,Z([Jj,zA,Vj],oj),aE],cj),Yj=e=>uj(e,aE(e),oE(e),!1),Xj=Z([Z([zA,Vj,$ge,Z([zA,Yj],RT)],uA)],sE),Zj=Z([AC,zA,Vj,Xj,Yj,Z([AC,Gj,zA,aE],bj),Z([AC,Gj,zA,aE],pj),aE],(e,t,n,r,i,a,o,s)=>{if(t){var c=t.type,l=$S(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?_y(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return YS(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(Oy):r.domain().map((e,t)=>{var n=r.map(e);return YS(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(Oy)}}}),Qj=Z([Sj,Cj,Dge],(e,t,n)=>wj(n.shared,e,t)),$j=e=>e.tooltip.settings.trigger,eM=e=>e.tooltip.settings.defaultIndex,tM=Z([Ij,Qj,$j,eM],jj),nM=Z([tM,Wj,BA,Jj],Mj),e_e=Z([Zj,nM],Tj);Z([tM],e=>{if(e)return e.dataKey});var t_e=Z([tM],e=>{if(e)return e.graphicalItemId}),rM=Z([Ij,Qj,$j,eM],Pj);Z([tM,Z([rC,iC,AC,vC,Zj,eM,rM],Nj)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Z([tM],e=>e?.active??!1),Z([Z([rM,nM,pT,BA,e_e,Fj,Qj],Bj)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});function iM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iM(Object(n),!0).forEach(function(t){n_e(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n_e(e,t,n){return(t=r_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r_e(e){var t=i_e(e,`string`);return typeof t==`symbol`?t:t+``}function i_e(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var a_e=()=>ix(zA),o_e=()=>{var e=a_e(),t=ix(Zj),n=ix(Xj);return vde(!e||!n?void 0:aM(aM({},e),{},{scale:n}),t)},s_e=()=>ix(PT),oM=(e,t)=>t,sM=(e,t,n)=>n,cM=(e,t,n,r)=>r;Z(Zj,e=>_x(e,e=>e.coordinate));var lM=Z([Ij,oM,sM,cM],jj),uM=Z([lM,Wj,BA,Jj],Mj),c_e=(e,t,n)=>{if(t!=null){var r=Ij(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},dM=Z([Ij,oM,sM,cM],Pj),l_e=Z([lM,Z([rC,iC,AC,vC,Zj,cM,dM],Nj)],(e,t)=>e.coordinate??t),fM=Z([Zj,uM],Tj),u_e=Z([dM,uM,pT,BA,fM,Fj,oM],Bj),d_e=Z([lM,uM],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),f_e=Z(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}});Z(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(FT));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:Bpe}});function pM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pM(Object(n),!0).forEach(function(t){p_e(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p_e(e,t,n){return(t=m_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m_e(e){var t=h_e(e,`string`);return typeof t==`symbol`?t:t+``}function h_e(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g_e={zIndexMap:Object.values(FT).reduce((e,t)=>mM(mM({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},__e=new Set(Object.values(FT));function v_e(e){return __e.has(e)}var hM=BS({name:`zIndex`,initialState:g_e,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:RS()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!v_e(n)&&delete e.zIndexMap[n])},prepare:RS()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,a=n.isPanorama;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=PS(i):e.zIndexMap[r].element=PS(i):e.zIndexMap[r]={consumers:0,element:a?void 0:PS(i),panoramaElement:a?PS(i):void 0}},prepare:RS()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:RS()}}}),gM=hM.actions,y_e=gM.registerZIndexPortal,_M=gM.unregisterZIndexPortal;gM.registerZIndexPortalElement,gM.unregisterZIndexPortalElement,hM.reducer;function b_e(e){var n=e.zIndex,i=e.children,a=NC()&&n!==void 0&&n!==0,o=xC(),s=(0,t.useRef)(void 0),c=(0,t.useRef)(new Set),l=nx(),u=ix(e=>f_e(e,n,o));if((0,t.useLayoutEffect)(()=>{if(!a){var e=c.current;e.forEach(e=>{l(_M({zIndex:e}))}),e.clear(),s.current=void 0;return}if(c.current.has(n)||(l(y_e({zIndex:n})),c.current.add(n)),u){s.current=u;var t=c.current;t.forEach(e=>{e!==n&&(l(_M({zIndex:e})),t.delete(e))})}},[l,n,a,u]),(0,t.useLayoutEffect)(()=>{var e=c.current;return()=>{e.forEach(e=>{l(_M({zIndex:e}))}),e.clear()}},[l]),!a)return i;var d=u??s.current;return d?(0,r.createPortal)(i,d):null}function vM(){return vM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vM.apply(null,arguments)}function yM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yM(Object(n),!0).forEach(function(t){x_e(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function x_e(e,t,n){return(t=S_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S_e(e){var t=C_e(e,`string`);return typeof t==`symbol`?t:t+``}function C_e(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function w_e(e){var n=e.cursor,r=e.cursorComp,i=e.cursorProps;return(0,t.isValidElement)(n)?(0,t.cloneElement)(n,i):(0,t.createElement)(r,i)}function T_e(e){var n=e.coordinate,r=e.payload,i=e.index,a=e.offset,o=e.tooltipAxisBandSize,s=e.layout,c=e.cursor,l=e.tooltipEventType,u=e.chartName,d=n,f=r,p=i;if(!c||!d||u!==`ScatterChart`&&l!==`axis`)return null;var m,h,g;if(u===`ScatterChart`)m=d,h=pfe,g=FT.cursorLine;else if(u===`BarChart`)m=mfe(s,d,a,o),h=ope,g=FT.cursorRectangle;else if(s===`radial`&&Ob(d)){var _=oT(d),v=_.cx,y=_.cy,b=_.radius;m={cx:v,cy:y,startAngle:_.startAngle,endAngle:_.endAngle,innerRadius:b,outerRadius:b},h=vpe,g=FT.cursorLine}else m={points:ype(s,d,a)},h=ife,g=FT.cursorLine;var x=typeof c==`object`&&`className`in c?c.className:void 0,S=bM(bM(bM(bM({stroke:`#ccc`,pointerEvents:`none`},a),m),$se(c)),{},{payload:f,payloadIndex:p,className:Gn(`recharts-tooltip-cursor`,x)});return t.createElement(b_e,{zIndex:e.zIndex??g},t.createElement(w_e,{cursor:c,cursorComp:h,cursorProps:S}))}function E_e(e){var n=o_e(),r=EC(),i=jC(),a=s_e();return n==null||r==null||i==null||a==null?null:t.createElement(T_e,vM({},e,{offset:r,layout:i,tooltipAxisBandSize:n,chartName:a}))}var D_e=(0,t.createContext)(null),O_e=()=>(0,t.useContext)(D_e),k_e=_(m(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,A_e=new k_e,j_e=`recharts.syncEvent.tooltip`;function M_e(e){return e.tooltip.syncInteraction}function N_e(e,n,r,i,a,o){var s=ix(t=>c_e(t,e,n)),c=ix(t_e),l=ix(Ipe),u=ix(Ppe),d=ix(Fpe),f=ix(M_e)?.sourceViewBox!=null,p=wC();(0,t.useEffect)(()=>{if(!f&&u!=null&&l!=null){var e=kge({active:o,coordinate:r,dataKey:s,index:a,label:typeof i==`number`?String(i):i,sourceViewBox:p,graphicalItemId:c});A_e.emit(j_e,u,e,l)}},[f,r,s,c,a,i,l,u,d,o,p])}function xM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xM(Object(n),!0).forEach(function(t){P_e(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P_e(e,t,n){return(t=F_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_e(e){var t=I_e(e,`string`);return typeof t==`symbol`?t:t+``}function I_e(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function L_e(e,t){return V_e(e)||B_e(e,t)||z_e(e,t)||R_e()}function R_e(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z_e(e,t){if(e){if(typeof e==`string`)return CM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CM(e,t):void 0}}function CM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B_e(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function V_e(e){if(Array.isArray(e))return e}function H_e(e){return e.dataKey}function U_e(e,n){return t.isValidElement(e)?t.cloneElement(e,n):typeof e==`function`?t.createElement(e,n):t.createElement(jde,n)}var wM=[],W_e={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function G_e(e){var n=Ab(e,W_e),i=n.active,a=n.allowEscapeViewBox,o=n.animationDuration,s=n.animationEasing,c=n.content,l=n.filterNull,u=n.isAnimationActive,d=n.offset,f=n.payloadUniqBy,p=n.position,m=n.reverseDirection,h=n.useTranslate3d,g=n.wrapperStyle,_=n.cursor,v=n.shared,y=n.trigger,b=n.defaultIndex,x=n.portal,S=n.axisId,C=nx(),w=typeof b==`number`?String(b):b;(0,t.useEffect)(()=>{C(Oge({shared:v,trigger:y,axisId:S,active:i,defaultIndex:w}))},[C,v,y,S,i,w]);var T=wC(),E=Qde(),D=Ege(v),O=ix(e=>d_e(e,D,y,w))??{},k=O.activeIndex,A=O.isActive,j=ix(e=>u_e(e,D,y,w)),M=ix(e=>fM(e,D,y,w)),N=ix(e=>l_e(e,D,y,w)),P=j,F=O_e(),I=i??A??!1,L=L_e(Cx([P,I]),2),R=L[0],z=L[1],B=D===`axis`?M:void 0;N_e(D,y,N,B,k,I);var V=x??F;if(V==null||T==null||D==null)return null;var H=P??wM;I||(H=wM),l&&H.length&&(H=ex(H.filter(e=>e.value!=null&&(e.hide!==!0||n.includeHidden)),f,H_e));var U=H.length>0,W=SM(SM({},n),{},{payload:H,label:B,active:I,activeIndex:k,coordinate:N,accessibilityLayer:E}),G=t.createElement(Zde,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:u,active:I,coordinate:N,hasPayload:U,offset:d,position:p,reverseDirection:m,useTranslate3d:h,viewBox:T,wrapperStyle:g,lastBoundingBox:R,innerRef:z,hasPortalFromProps:!!x},U_e(c,W));return t.createElement(t.Fragment,null,(0,r.createPortal)(G,V),I&&t.createElement(E_e,{cursor:_,tooltipEventType:D,coordinate:N,payload:H,index:k}))}var K_e=({content:e,...t})=>(0,n.jsx)(G_e,{content:e,...t}),TM=v.default.createContext(null),q_e=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(TM.Provider,{value:i,children:(0,n.jsx)(`div`,{className:Y(`min-w-[125px] space-y-2xs rounded-lg bg-surface-2 px-xs py-2xs`,e),ref:r,...i,children:t})}),EM=()=>{let e=v.default.useContext(TM);if(!e)throw Error(`useChartTooltipContent must be used within a ChartTooltipContentProvider`);return e},J_e=({className:e,children:t,ref:r,...i})=>{let{label:a}=EM();return(0,n.jsxs)(`p`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:[t,a]})},DM=v.default.createContext(null),Y_e=({className:e,children:t,ref:r,...i})=>{let{payload:a}=EM();return(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs`,e),ref:r,...i,children:a?.map((e,r)=>(0,n.jsx)(DM.Provider,{value:e,children:(0,n.jsx)(`div`,{className:`flex items-center justify-between gap-2xs`,children:t})},`payload-${r}`))})},OM=()=>{let e=v.default.useContext(DM);if(!e)throw Error(`useChartTooltipPayload must be used within a ChartTooltipPayloadProvider`);return e},X_e=({children:e,...t})=>(0,n.jsx)(pw,{...t,children:e}),kM=({className:e,children:t,ref:r,...i})=>{let{icon:a,color:o}=PM();return(0,n.jsxs)(`div`,{style:{color:o},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,a&&(0,n.jsx)(a,{})]})},AM=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=PM();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})},jM=({className:e,children:t,ref:r,...i})=>{let{label:a}=PM();return(0,n.jsxs)(`p`,{className:Y(`style-text-default--1 capitalize`,e),ref:r,...i,children:[t,a]})},MM=(e,t,n)=>{if(!(typeof t!=`object`||!t)){if(n in e)return e[n];if(`name`in t&&typeof t.name==`string`&&t.name in e)return e[t.name]}},NM=v.default.createContext(null),Z_e=({payload:e,verticalAlign:t=`bottom`,className:r,children:i,ref:a,...o})=>{let{config:s}=ny();return(0,n.jsx)(`div`,{className:Y(`flex items-center justify-center gap-lg`,t===`top`?`mb-md`:`mt-md`,r),ref:a,...o,children:e?.map((e,t)=>{let r=typeof e.dataKey==`string`?e.dataKey:`value`,a=MM(s,e,r);return(0,n.jsx)(NM.Provider,{value:{color:a?.color,icon:a?.icon,label:a?.label},children:(0,n.jsxs)(`div`,{className:`flex items-center gap-2xs`,children:[a?.icon?(0,n.jsx)(kM,{}):(0,n.jsx)(AM,{}),(0,n.jsx)(jM,{}),i]})},`payload-${t}`)})})},PM=()=>{let e=v.default.useContext(NM);if(!e)throw Error(`useChartLegendPayload must be used within a ChartLegendPayloadProvider`);return e},Q_e=({gradients:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(`defs`,{className:Y(``,t),ref:i,...a,children:[e.map(e=>(0,n.jsxs)(`linearGradient`,{id:e.id,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,n.jsx)(`stop`,{offset:`5%`,stopColor:e.stopColor,stopOpacity:.8}),(0,n.jsx)(`stop`,{offset:`95%`,stopColor:e.stopColor,stopOpacity:.1})]},e.id)),r]}),$_e=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=OM();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})},eve=({className:e,children:t,ref:r,...i})=>{let{name:a}=OM();return(0,n.jsxs)(`p`,{className:Y(`grow text-left style-text-default--1 text-on-surface-variant capitalize`,e),ref:r,...i,children:[t,a]})},tve=({className:e,children:t,ref:r,...i})=>{let{config:a}=ny(),o=OM(),s=MM(a,o,typeof o.dataKey==`string`?o.dataKey:`value`)?.icon;return(0,n.jsxs)(`div`,{style:{color:o.color},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,s&&(0,n.jsx)(s,{})]})},nve=({className:e,children:t,ref:r,...i})=>{let{value:a}=OM();return(0,n.jsxs)(`p`,{className:Y(`mx-auto style-text-default--1`,e),ref:r,...i,children:[t,a]})},FM=({className:e,...t})=>(0,n.jsx)(Yd,{className:Y(`flex`,e),...t,render:(e,t)=>t.indeterminate?(0,n.jsx)(_i,{weight:`bold`,...e,className:`text-accent-default`}):(0,n.jsx)($r,{weight:`bold`,...e})}),rve=Jn(`group flex size-sm items-center justify-center rounded-sm shadow-2xs outline-2 outline-transparent transition-colors not-indeterminate:text-accent-on-default indeterminate:text-accent-default hover:cursor-pointer hover:outline-accent-border disabled:cursor-not-allowed disabled:hover:cursor-not-allowed data-checked:bg-accent-default [&_svg]:size-xs [&:not([data-checked])]:hover:outline-border-strong`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low shadow-none inset-shadow-2xs data-checked:inset-shadow-none`}},defaultVariants:{variant:`elevated`}}),IM=({variant:e,className:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`flex items-center gap-xs`,children:(0,n.jsx)(Jd,{className:Y(rve({variant:e,className:t})),ref:r,...i,children:(0,n.jsx)(FM,{})})}),ive=({className:e,children:t,ref:r,...i})=>{let a=v.default.useId();return(0,n.jsx)(Zd,{"aria-labelledby":a,className:Y(`flex flex-col items-start gap-2xs`,e),ref:r,...i,children:t})},LM=v.default.createContext(void 0),ave=({items:e,defaultValue:t,className:r,children:i,ref:a,...o})=>{let[s,c]=v.default.useState(t);return(0,n.jsx)(LM.Provider,{value:{currentValue:s,setCurrentValue:c,items:e},children:(0,n.jsx)(`div`,{className:Y(`flex flex-col rounded-xl border border-border bg-surface`,r),ref:a,...o,children:i})})},RM=()=>{let e=v.default.useContext(LM);if(!e)throw Error(`useCodeBlock must be used within a CodeBlock`);return e},ove=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`absolute top-3xs right-3xs flex items-center gap-3xs`,e),ref:r,...i,children:t}),sve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM(),[o,s]=v.default.useState(!1);return(0,n.jsxs)(Yv,{onClick:async()=>{try{await navigator.clipboard.writeText(a.content),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to copy text: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)($r,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(ni,{weight:`bold`,className:`animate-in zoom-in`})]})},cve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM(),[o,s]=v.default.useState(!1);return(0,n.jsxs)(Yv,{onClick:async()=>{try{let e=new Blob([a.content]),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${a.name}`,n.click(),URL.revokeObjectURL(t),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to download file: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)($r,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(ii,{weight:`bold`,className:`animate-in zoom-in`})]})},lve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex min-h-2xl items-center justify-between border-b border-border p-2xs`,e),ref:r,...i,children:t}),uve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM();return(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-center gap-2xs px-xs style-text-strong-0 text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:[t,a?.icon,a.name]})},zM=({children:e,...t})=>(0,n.jsx)(voe,{...t,children:e}),BM=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(p_,{className:Y(`group/item grid min-h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-lg px-2xs py-3xs transition-colors outline-none select-none group-data-[side=none]:pr-xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default [&_svg]:size-sm`,e),ref:r,...i,children:[(0,n.jsx)(g_,{className:`flex flex-col`,children:t}),(0,n.jsx)(m_,{className:`place-self-end self-center`,children:(0,n.jsx)($r,{weight:`bold`})})]}),VM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(u_,{className:Y(`relative max-h-(--available-height) scroll-py-md space-y-3xs overflow-y-auto`,e),ref:r,...i,children:t}),HM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Xg,{className:Y(`flex text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t}),UM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Zg,{children:(0,n.jsx)(n_,{className:Y(`z-99 outline-none select-none`,e),ref:r,...i,children:(0,n.jsxs)(r_,{className:`group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0`,children:[(0,n.jsx)(y_,{className:`top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-top-full`,children:(0,n.jsx)(Zr,{className:`size-sm`,weight:`fill`})}),t,(0,n.jsx)(v_,{className:`right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-bottom-full`,children:(0,n.jsx)(Kr,{className:`size-sm`,weight:`fill`})})]})})}),dve=Jn(`flex items-center justify-between outline outline-transparent transition-all hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-disabled:cursor-not-allowed [&_[data-value]]:min-w-0 [&_[data-value]]:flex-1`,{variants:{variant:{primary:`bg-surface shadow-2xs hover:outline-border-strong`,secondary:`bg-neutral-container hover:outline-border-strong`,ghost:`bg-transparent hover:bg-neutral-container`},size:{small:`h-lg gap-md rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&_svg]:size-xs`,medium:`h-xl gap-lg rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&_svg]:size-sm`,large:`h-2xl gap-xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&_svg]:size-md`}},defaultVariants:{variant:`primary`,size:`medium`}}),WM=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(Jg,{className:Y(dve({variant:e,size:t,className:r})),ref:a,...o,children:i}),GM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Yg,{"data-value":!0,className:Y(`flex h-lg min-w-0 flex-1 items-center gap-2xs overflow-hidden text-left text-ellipsis whitespace-nowrap data-placeholder:opacity-70`,e),ref:r,...i,children:t}),KM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(x_,{className:Y(`block space-y-3xs border-border-strong not-last:border-b not-last:pb-xs`,e),ref:r,...i,children:t}),fve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(S_,{className:Y(`sticky top-[0px] z-1 cursor-default bg-surface-2 px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t}),pve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-prose--1 text-on-surface-variant transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:r,...i,children:t}),qM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`flex items-center gap-2xs style-text-default-0 text-on-surface transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:r,...i,children:t}),mve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,setCurrentValue:o,items:s}=RM();return(0,n.jsxs)(zM,{value:a.id,onValueChange:e=>{let t=s.find(t=>t.id===e);t&&o(t)},children:[(0,n.jsxs)(WM,{className:Y(``,e),ref:r,...i,variant:`ghost`,children:[(0,n.jsx)(GM,{children:e=>s.find(t=>t.id===e)?.label}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{children:(0,n.jsxs)(VM,{children:[t,(0,n.jsx)(KM,{children:s.map(({label:e,id:t})=>(0,n.jsx)(BM,{value:t,children:e},t))})]})})]})},hve=Jn(``,{variants:{variant:{default:`space-y-xs [&_[role=presentation]]:top-1/2 [&_[role=tablist]]:bg-surface-low`,ghost:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-full [&_[role=presentation]]:border [&_[role=tablist]]:rounded-full`,underline:`space-y-xs [&_[role=tablist]]:border-border`},size:{small:``,medium:``,large:``},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},fill:{true:`[&_[role=tab]]:grow [&_[role=tablist]]:w-full`,false:`[&_[role=tablist]]:w-fit`}},compoundVariants:[{variant:`default`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`default`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`default`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`default`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`default`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`default`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`default`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`ghost`,tone:`brand`,class:`[&_[role=presentation]]:border-brand-border [&_[role=presentation]]:bg-brand-container [&_[role=tab]]:data-active:text-brand-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`ghost`,tone:`accent`,class:`[&_[role=presentation]]:border-accent-border [&_[role=presentation]]:bg-accent-container [&_[role=tab]]:data-active:text-accent-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`ghost`,tone:`neutral`,class:`[&_[role=presentation]]:border-neutral-border [&_[role=presentation]]:bg-neutral-container [&_[role=tab]]:data-active:text-neutral-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`ghost`,tone:`error`,class:`[&_[role=presentation]]:border-error-border [&_[role=presentation]]:bg-error-container [&_[role=tab]]:data-active:text-error-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`ghost`,tone:`info`,class:`[&_[role=presentation]]:border-info-border [&_[role=presentation]]:bg-info-container [&_[role=tab]]:data-active:text-info-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`ghost`,tone:`success`,class:`[&_[role=presentation]]:border-success-border [&_[role=presentation]]:bg-success-container [&_[role=tab]]:data-active:text-success-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`ghost`,tone:`warning`,class:`[&_[role=presentation]]:border-warning-border [&_[role=presentation]]:bg-warning-container [&_[role=tab]]:data-active:text-warning-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`underline`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`underline`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`underline`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`underline`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`underline`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`underline`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`underline`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{size:`small`,variant:`default`,class:`[&_[role=presentation]]:rounded-lg [&_[role=tab]]:rounded-lg [&_[role=tablist]]:rounded-lg`},{size:`small`,variant:`default`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`default`,class:`[&_[role=presentation]]:rounded-xl [&_[role=tab]]:h-xl [&_[role=tab]]:rounded-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-xl [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`default`,class:`[&_[role=presentation]]:rounded-2xl [&_[role=tab]]:h-2xl [&_[role=tab]]:rounded-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:rounded-2xl [&_[role=tablist]]:p-xs`},{size:`small`,variant:`ghost`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`ghost`,class:`[&_[role=tab]]:h-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`ghost`,class:`[&_[role=tab]]:h-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:p-xs`},{size:`small`,variant:`underline`,class:`[&_[role=tab]]:px-lg [&_[role=tab]]:pb-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:h-lg [&_[role=tablist]]:gap-md [&_[role=tablist]]:border-b-2 **:[[role=presentation]]:bottom-[-3px] **:[[role=presentation]]:h-[2px]`},{size:`medium`,variant:`underline`,class:`[&_[role=tab]]:px-xl [&_[role=tab]]:pb-xs [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-lg [&_[role=tablist]]:border-b-3 **:[[role=presentation]]:bottom-[-4px] **:[[role=presentation]]:h-[3px]`},{size:`large`,variant:`underline`,class:`[&_[role=tab]]:px-2xl [&_[role=tab]]:pb-2xs [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:h-2xl [&_[role=tablist]]:gap-xl [&_[role=tablist]]:border-b-4 **:[[role=presentation]]:bottom-[-5px] **:[[role=presentation]]:h-[4px]`}],defaultVariants:{variant:`default`,size:`medium`,tone:`brand`,fill:!0}}),JM=({size:e,tone:t,variant:r,fill:i,className:a,ref:o,...s})=>(0,n.jsx)(Y_,{className:Y(hve({size:e,tone:t,variant:r,fill:i}),a),ref:o,...s}),YM=({className:e,...t})=>(0,n.jsx)(tv,{className:Y(`absolute left-[0px] z-[-1] h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 transition-all duration-300`,e),...t}),XM=({className:e,...t})=>(0,n.jsx)(rv,{className:Y(`relative z-0 flex`,e),...t}),gve=({className:e,...t})=>(0,n.jsx)(nv,{className:Y(`relative flex grow flex-col items-center justify-start gap-md`,e),...t}),ZM=({className:e,...t})=>(0,n.jsx)(ev,{className:Y(`inline-flex items-center justify-center gap-xs text-center break-keep whitespace-nowrap text-on-surface transition-colors duration-300 outline-none select-none hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline`,e),...t}),_ve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,items:o,setCurrentValue:s}=RM();return(0,n.jsxs)(JM,{value:a.id,onValueChange:e=>{let t=o.find(t=>t.id===e);t&&s(t)},className:Y(``,e),variant:`ghost`,ref:r,...i,children:[(0,n.jsxs)(XM,{children:[o.map(({id:e,label:t})=>(0,n.jsx)(ZM,{value:e,children:t},e)),(0,n.jsx)(YM,{})]}),t]})},vve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM();return(0,n.jsxs)(`div`,{className:Y(`relative overflow-auto rounded-lg px-md py-sm`,e),ref:r,...i,children:[t,(0,n.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.content}})]})},QM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(nf,{className:Y(`ml-md flex h-(--collapsible-panel-height) flex-col justify-end gap-3xs overflow-hidden border-l border-border pl-sm transition-all duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden="until-found"])]:hidden`,e),ref:r,...i,children:t}),$M=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ef,{render:a=>(0,n.jsxs)(Yv,{...a,tone:`neutral`,variant:`elevated`,className:Y(`group/trigger`,e),ref:r,...i,children:[t,(0,n.jsx)(Xr,{weight:`bold`,className:`ml-auto transition-all ease-out group-data-panel-open/trigger:rotate-90`})]})}),eN=({className:e,children:t,ref:r,...i})=>(0,n.jsx)($d,{className:Y(`flex min-h-xl w-full flex-col justify-center gap-xs`,e),ref:r,...i,children:t}),yve=Jn(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-sm [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-lg [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-md [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`}},defaultVariants:{size:`medium`}}),tN=({size:e,trackStyle:t,className:r,children:i,ref:a,...o})=>{let s=t.some(e=>e.includes(`rgba`)||e.includes(`hsla`)||e.includes(`/`));return(0,n.jsx)(A_,{className:Y(yve({size:e}),r),"data-slot":`slider-root`,thumbAlignment:`edge`,ref:a,role:`slider`,...o,children:(0,n.jsx)(I_,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,n.jsxs)(L_,{"data-slot":`slider-track`,className:Y(`relative size-full rounded-full`),style:{backgroundImage:s?[`linear-gradient(to right, ${t.join(`, `)})`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`].join(`, `):`linear-gradient(to right, ${t.join(`, `)})`,backgroundSize:s?`100% 100%, 10px 10px, 10px 10px`:`auto`,backgroundPosition:s?`0 0, 0 0, 5px 5px`:`auto`,backgroundColor:`#ffffff`},children:[i,(0,n.jsx)(V_,{"data-slot":`slider-indicator`,className:`rounded-full`}),(0,n.jsx)(B_,{"data-slot":`slider-thumb`,className:Y(`absolute aspect-square rounded-full border-white shadow-xs transition-[width,height,opacity] data-dragging:cursor-grabbing hover:[&:not([data-dragging])]:cursor-pointer`),render:(e,r)=>(0,n.jsx)(`div`,{...e,style:{...e.style,backgroundColor:t[r.values[0]]}})})]})})})},{min:bve,max:xve}=Math,nN=(e,t=0,n=1)=>bve(xve(t,e),n),rN=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=nN(e[t],0,255)):t===3&&(e[t]=nN(e[t],0,1));return e},iN={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])iN[`[object ${e}]`]=e.toLowerCase();function aN(e){return iN[Object.prototype.toString.call(e)]||`object`}var oN=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):aN(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),sN=e=>{if(e.length<2)return null;let t=e.length-1;return aN(e[t])==`string`?e[t].toLowerCase():null},{PI:cN,min:lN,max:uN}=Math,dN=e=>Math.round(e*100)/100,fN=e=>Math.round(e*100)/100,pN=cN*2,mN=cN/3,Sve=cN/180,Cve=180/cN;function hN(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var gN={format:{},autodetect:[]},_N=class{constructor(...e){let t=this;if(aN(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=sN(e),r=!1;if(!n){r=!0,gN.sorted||=(gN.autodetect=gN.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of gN.autodetect)if(n=t.test(...e),n)break}if(gN.format[n])t._rgb=rN(gN.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return aN(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},wve=`3.2.0`,vN=(...e)=>new _N(...e);vN.version=wve;var yN={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,laserlemon:`#ffff54`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrod:`#fafad2`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,maroon2:`#7f0000`,maroon3:`#b03060`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,purple2:`#7f007f`,purple3:`#a020f0`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},Tve=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Eve=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,bN=e=>{if(e.match(Tve)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(Eve)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:xN}=Math,SN=(...e)=>{let[t,n,r,i]=oN(e,`rgba`),a=sN(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=xN(t),n=xN(n),r=xN(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+xN(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};_N.prototype.name=function(){let e=SN(this._rgb,`rgb`);for(let t of Object.keys(yN))if(yN[t]===e)return t.toLowerCase();return e},gN.format.named=e=>{if(e=e.toLowerCase(),yN[e])return bN(yN[e]);throw Error(`unknown color name: `+e)},gN.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&yN[e.toLowerCase()])return`named`}}),_N.prototype.alpha=function(e,t=!1){return e!==void 0&&aN(e)===`number`?t?(this._rgb[3]=e,this):new _N([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},_N.prototype.clipped=function(){return this._rgb._clipped||!1};var CN={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Dve=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function wN(e){let t=Dve.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);CN.labWhitePoint=e,CN.Xn=t[0],CN.Zn=t[1]}function TN(){return CN.labWhitePoint}var EN=(...e)=>{e=oN(e,`lab`);let[t,n,r]=e,[i,a,o]=Ove(t,n,r),[s,c,l]=ON(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Ove=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=CN,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},DN=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},ON=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=CN,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=DN(y*a.m00+b*a.m10+x*a.m20),C=DN(y*a.m01+b*a.m11+x*a.m21),w=DN(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},kN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=jN(t,n,r),[c,l,u]=kve(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function kve(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=CN,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function AN(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var jN=(e,t,n)=>{e=AN(e/255),t=AN(t/255),n=AN(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=CN,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};_N.prototype.lab=function(){return kN(this._rgb)},Object.assign(vN,{lab:(...e)=>new _N(...e,`lab`),getLabWhitePoint:TN,setLabWhitePoint:wN}),gN.format.lab=EN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`lab`),aN(e)===`array`&&e.length===3)return`lab`}}),_N.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=CN.Kn*e,new _N(n,`lab`).alpha(t.alpha(),!0)},_N.prototype.brighten=function(e=1){return this.darken(-e)},_N.prototype.darker=_N.prototype.darken,_N.prototype.brighter=_N.prototype.brighten,_N.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};var{pow:Ave}=Math,jve=1e-7,Mve=20;_N.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&aN(e)===`number`){if(e===0)return new _N([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new _N([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=Mve,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<jve||!r--?o:s>e?i(n,o):i(o,a)};return new _N([...(n>e?i(new _N([0,0,0]),this):i(this,new _N([255,255,255]))).rgb(),this._rgb[3]])}return Nve(...this._rgb.slice(0,3))};var Nve=(e,t,n)=>(e=MN(e),t=MN(t),n=MN(n),.2126*e+.7152*t+.0722*n),MN=e=>(e/=255,e<=.03928?e/12.92:Ave((e+.055)/1.055,2.4)),NN={},PN=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!NN[i]&&!r.length&&(i=Object.keys(NN)[0]),!NN[i])throw Error(`interpolation mode ${i} is not defined`);return aN(e)!==`object`&&(e=new _N(e)),aN(t)!==`object`&&(t=new _N(t)),NN[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};_N.prototype.mix=_N.prototype.interpolate=function(e,t=.5,...n){return PN(this,e,t,...n)},_N.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new _N([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:Pve,cos:Fve}=Math,FN=(...e)=>{let[t,n,r]=oN(e,`lch`);return isNaN(r)&&(r=0),r*=Sve,[t,Fve(r)*n,Pve(r)*n]},IN=(...e)=>{e=oN(e,`lch`);let[t,n,r]=e,[i,a,o]=FN(t,n,r),[s,c,l]=EN(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Ive=(...e)=>IN(...hN(oN(e,`hcl`))),{sqrt:Lve,atan2:Rve,round:zve}=Math,LN=(...e)=>{let[t,n,r]=oN(e,`lab`),i=Lve(n*n+r*r),a=(Rve(r,n)*Cve+360)%360;return zve(i*1e4)===0&&(a=NaN),[t,i,a]},RN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=kN(t,n,r),[c,l,u]=LN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};_N.prototype.lch=function(){return RN(this._rgb)},_N.prototype.hcl=function(){return hN(RN(this._rgb))},Object.assign(vN,{lch:(...e)=>new _N(...e,`lch`),hcl:(...e)=>new _N(...e,`hcl`)}),gN.format.lch=IN,gN.format.hcl=Ive,[`lch`,`hcl`].forEach(e=>gN.autodetect.push({p:2,test:(...t)=>{if(t=oN(t,e),aN(t)===`array`&&t.length===3)return e}})),_N.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=CN.Kn*e,n[1]<0&&(n[1]=0),new _N(n,`lch`).alpha(t.alpha(),!0)},_N.prototype.desaturate=function(e=1){return this.saturate(-e)},_N.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(aN(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(aN(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new _N(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},_N.prototype.tint=function(e=.5,...t){return PN(this,`white`,e,...t)},_N.prototype.shade=function(e=.5,...t){return PN(this,`black`,e,...t)},NN.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:zN,pow:BN}=Math;NN.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new _N(zN(BN(r,2)*(1-n)+BN(o,2)*n),zN(BN(i,2)*(1-n)+BN(s,2)*n),zN(BN(a,2)*(1-n)+BN(c,2)*n),`rgb`)},NN.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var VN=(e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new _N([m,f,p],r):new _N([p,f,m],r)},HN=(e,t,n)=>VN(e,t,n,`lch`);NN.lch=HN,NN.hcl=HN;var Bve=e=>{if(aN(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},Vve=(...e)=>{let[t,n,r]=oN(e,`rgb`);return(t<<16)+(n<<8)+r};_N.prototype.num=function(){return Vve(this._rgb)},Object.assign(vN,{num:(...e)=>new _N(...e,`num`)}),gN.format.num=Bve,gN.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&aN(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),NN.num=(e,t,n)=>{let r=e.num();return new _N(r+n*(t.num()-r),`num`)};var{floor:Hve}=Math,Uve=(...e)=>{e=oN(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Hve(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},Wve=(...e)=>{let[t,n,r]=oN(e,`rgb`),i=lN(t,n,r),a=uN(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};_N.prototype.hcg=function(){return Wve(this._rgb)},vN.hcg=(...e)=>new _N(...e,`hcg`),gN.format.hcg=Uve,gN.autodetect.push({p:1,test:(...e)=>{if(e=oN(e,`hcg`),aN(e)===`array`&&e.length===3)return`hcg`}}),NN.hcg=(e,t,n)=>VN(e,t,n,`hcg`);var{cos:UN}=Math,Gve=(...e)=>{e=oN(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*UN(pN*t)/UN(mN-pN*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*UN(pN*t)/UN(mN-pN*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*UN(pN*t)/UN(mN-pN*t))/3,i=1-(a+o)),i=nN(r*i*3),a=nN(r*a*3),o=nN(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:Kve,sqrt:qve,acos:Jve}=Math,Yve=(...e)=>{let[t,n,r]=oN(e,`rgb`);t/=255,n/=255,r/=255;let i,a=Kve(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=qve((t-n)*(t-n)+(t-r)*(n-r)),i=Jve(i),r>n&&(i=pN-i),i/=pN),[i*360,s,o]};_N.prototype.hsi=function(){return Yve(this._rgb)},vN.hsi=(...e)=>new _N(...e,`hsi`),gN.format.hsi=Gve,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsi`),aN(e)===`array`&&e.length===3)return`hsi`}}),NN.hsi=(e,t,n)=>VN(e,t,n,`hsi`);var WN=(...e)=>{e=oN(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},GN=(...e)=>{e=oN(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=lN(t,n,r),a=uN(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};_N.prototype.hsl=function(){return GN(this._rgb)},vN.hsl=(...e)=>new _N(...e,`hsl`),gN.format.hsl=WN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsl`),aN(e)===`array`&&e.length===3)return`hsl`}}),NN.hsl=(e,t,n)=>VN(e,t,n,`hsl`);var{floor:Xve}=Math,Zve=(...e)=>{e=oN(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Xve(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:Qve,max:$ve}=Math,eye=(...e)=>{e=oN(e,`rgb`);let[t,n,r]=e,i=Qve(t,n,r),a=$ve(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};_N.prototype.hsv=function(){return eye(this._rgb)},vN.hsv=(...e)=>new _N(...e,`hsv`),gN.format.hsv=Zve,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsv`),aN(e)===`array`&&e.length===3)return`hsv`}}),NN.hsv=(e,t,n)=>VN(e,t,n,`hsv`);function KN(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}var qN=(...e)=>{e=oN(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=tye([t,n,r]),[c,l,u]=ON(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function tye(e){return KN([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],KN([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var JN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`);return[...nye(jN(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function nye(e){return KN([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],KN([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}_N.prototype.oklab=function(){return JN(this._rgb)},Object.assign(vN,{oklab:(...e)=>new _N(...e,`oklab`)}),gN.format.oklab=qN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`oklab`),aN(e)===`array`&&e.length===3)return`oklab`}}),NN.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},NN.oklch=(e,t,n)=>VN(e,t,n,`oklch`);var{pow:YN,sqrt:XN,PI:ZN,cos:QN,sin:$N,atan2:rye}=Math,iye=(e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new _N(e)),t===`lrgb`)return aye(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*ZN;c+=QN(t)*n[0],l+=$N(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*ZN;c+=QN(t)*n[r+1],l+=$N(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=rye(l/s[e],c/s[e])/ZN*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new _N(o,t).alpha(u>.99999?1:u,!0)},aye=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=YN(s[0],2)*o,r[1]+=YN(s[1],2)*o,r[2]+=YN(s[2],2)*o,r[3]+=s[3]*o}return r[0]=XN(r[0]),r[1]=XN(r[1]),r[2]=XN(r[2]),r[3]>.9999999&&(r[3]=1),new _N(rN(r))},{pow:oye}=Math;function eP(e){let t=`rgb`,n=vN(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&aN(e)===`string`&&vN.brewer&&vN.brewer[e.toLowerCase()]&&(e=vN.brewer[e.toLowerCase()]),aN(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=vN(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=oye(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=nN(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(aN(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=vN.interpolate(l[e],l[e+1],a,t);break}}else aN(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=vN(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(aN(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=vN.analyze(i);c=e===0?[t.min,t.max]:vN.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(aN(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=sye(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return vN[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=vN(e),C)},C}function sye(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}var cye=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},lye=function(e){let t,n,r,i;if(e=e.map(e=>new _N(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=cye(i),t=function(e){let t=1-e;return new _N([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},uye=e=>{let t=lye(e);return t.scale=()=>eP(t),t},{round:tP}=Math;_N.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(tP)},_N.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:tP(t):t)},Object.assign(vN,{rgb:(...e)=>new _N(...e,`rgb`)}),gN.format.rgb=(...e)=>{let t=oN(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},gN.autodetect.push({p:3,test:(...e)=>{if(e=oN(e,`rgba`),aN(e)===`array`&&(e.length===3||e.length===4&&aN(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var nP=(e,t,n)=>{if(!nP[n])throw Error(`unknown blend mode `+n);return nP[n](e,t)},rP=e=>(t,n)=>{let r=vN(n).rgb(),i=vN(t).rgb();return vN.rgb(e(r,i))},iP=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r};nP.normal=rP(iP(e=>e)),nP.multiply=rP(iP((e,t)=>e*t/255)),nP.screen=rP(iP((e,t)=>255*(1-(1-e/255)*(1-t/255)))),nP.overlay=rP(iP((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),nP.darken=rP(iP((e,t)=>e>t?t:e)),nP.lighten=rP(iP((e,t)=>e>t?e:t)),nP.dodge=rP(iP((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),nP.burn=rP(iP((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:dye,sin:fye,cos:pye}=Math;function mye(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;aN(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=pN*((e+120)/360+t*s),l=dye(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=pye(c),f=fye(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return vN(rN([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,aN(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(aN(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>vN.scale(s),s.hue(n),s}var hye=`0123456789abcdef`,{floor:gye,random:_ye}=Math,vye=(e=_ye)=>{let t=`#`;for(let n=0;n<6;n++)t+=hye.charAt(gye(e()*16));return new _N(t,`hex`)},{log:aP,pow:yye,floor:bye,abs:xye}=Math;function oP(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return aN(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&aN(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>sP(n,e,t),n}function sP(e,t=`equal`,n=7){aN(e)==`array`&&(e=oP(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*aP(r),t=Math.LOG10E*aP(i);o.push(r);for(let r=1;r<n;r++)o.push(yye(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=bye(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=xye(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var Sye=(e,t)=>{e=new _N(e),t=new _N(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},cP=.027,Cye=5e-4,wye=.1,lP=1.14,uP=.022,dP=1.414,Tye=(e,t)=>{e=new _N(e),t=new _N(t),e.alpha()<1&&(e=PN(t,e,e.alpha(),`rgb`));let n=fP(...e.rgb()),r=fP(...t.rgb()),i=n>=uP?n:n+(uP-n)**+dP,a=r>=uP?r:r+(uP-r)**+dP,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<Cye?0:i<a?o*lP:s*lP;return(Math.abs(c)<wye?0:c>0?c-cP:c+cP)*100};function fP(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:pP,pow:mP,min:Eye,max:Dye,atan2:hP,abs:gP,cos:_P,sin:vP,exp:Oye,PI:yP}=Math;function kye(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*yP)},o=function(e){return 2*yP*e/360};e=new _N(e),t=new _N(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(pP(mP(c,2)+mP(l,2))+pP(mP(d,2)+mP(f,2)))/2,h=.5*(1-pP(mP(m,7)/(mP(m,7)+mP(25,7)))),g=c*(1+h),_=d*(1+h),v=pP(mP(g,2)+mP(l,2)),y=pP(mP(_,2)+mP(f,2)),b=(v+y)/2,x=a(hP(l,g)),S=a(hP(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=gP(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*_P(o(T-30))+.24*_P(o(2*T))+.32*_P(o(3*T+6))-.2*_P(o(4*T-63)),D=w-C;D=gP(D)<=180?D:w<=C?D+360:D-360,D=2*pP(v*y)*vP(o(D)/2);let O=u-s,k=y-v,A=1+.015*mP(p-50,2)/pP(20+mP(p-50,2)),j=1+.045*b,M=1+.015*b*E,N=30*Oye(-mP((T-275)/25,2)),P=-(2*pP(mP(b,7)/(mP(b,7)+mP(25,7))))*vP(2*o(N));return Dye(0,Eye(100,pP(mP(O/(n*A),2)+mP(k/(r*j),2)+mP(D/(i*M),2)+P*(k/(r*j))*(D/(i*M)))))}function Aye(e,t,n=`lab`){e=new _N(e),t=new _N(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var jye=(...e)=>{try{return new _N(...e),!0}catch{return!1}},Mye={cool(){return eP([vN.hsl(180,1,.9),vN.hsl(250,.7,.4)])},hot(){return eP([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},bP={OrRd:[`#fff7ec`,`#fee8c8`,`#fdd49e`,`#fdbb84`,`#fc8d59`,`#ef6548`,`#d7301f`,`#b30000`,`#7f0000`],PuBu:[`#fff7fb`,`#ece7f2`,`#d0d1e6`,`#a6bddb`,`#74a9cf`,`#3690c0`,`#0570b0`,`#045a8d`,`#023858`],BuPu:[`#f7fcfd`,`#e0ecf4`,`#bfd3e6`,`#9ebcda`,`#8c96c6`,`#8c6bb1`,`#88419d`,`#810f7c`,`#4d004b`],Oranges:[`#fff5eb`,`#fee6ce`,`#fdd0a2`,`#fdae6b`,`#fd8d3c`,`#f16913`,`#d94801`,`#a63603`,`#7f2704`],BuGn:[`#f7fcfd`,`#e5f5f9`,`#ccece6`,`#99d8c9`,`#66c2a4`,`#41ae76`,`#238b45`,`#006d2c`,`#00441b`],YlOrBr:[`#ffffe5`,`#fff7bc`,`#fee391`,`#fec44f`,`#fe9929`,`#ec7014`,`#cc4c02`,`#993404`,`#662506`],YlGn:[`#ffffe5`,`#f7fcb9`,`#d9f0a3`,`#addd8e`,`#78c679`,`#41ab5d`,`#238443`,`#006837`,`#004529`],Reds:[`#fff5f0`,`#fee0d2`,`#fcbba1`,`#fc9272`,`#fb6a4a`,`#ef3b2c`,`#cb181d`,`#a50f15`,`#67000d`],RdPu:[`#fff7f3`,`#fde0dd`,`#fcc5c0`,`#fa9fb5`,`#f768a1`,`#dd3497`,`#ae017e`,`#7a0177`,`#49006a`],Greens:[`#f7fcf5`,`#e5f5e0`,`#c7e9c0`,`#a1d99b`,`#74c476`,`#41ab5d`,`#238b45`,`#006d2c`,`#00441b`],YlGnBu:[`#ffffd9`,`#edf8b1`,`#c7e9b4`,`#7fcdbb`,`#41b6c4`,`#1d91c0`,`#225ea8`,`#253494`,`#081d58`],Purples:[`#fcfbfd`,`#efedf5`,`#dadaeb`,`#bcbddc`,`#9e9ac8`,`#807dba`,`#6a51a3`,`#54278f`,`#3f007d`],GnBu:[`#f7fcf0`,`#e0f3db`,`#ccebc5`,`#a8ddb5`,`#7bccc4`,`#4eb3d3`,`#2b8cbe`,`#0868ac`,`#084081`],Greys:[`#ffffff`,`#f0f0f0`,`#d9d9d9`,`#bdbdbd`,`#969696`,`#737373`,`#525252`,`#252525`,`#000000`],YlOrRd:[`#ffffcc`,`#ffeda0`,`#fed976`,`#feb24c`,`#fd8d3c`,`#fc4e2a`,`#e31a1c`,`#bd0026`,`#800026`],PuRd:[`#f7f4f9`,`#e7e1ef`,`#d4b9da`,`#c994c7`,`#df65b0`,`#e7298a`,`#ce1256`,`#980043`,`#67001f`],Blues:[`#f7fbff`,`#deebf7`,`#c6dbef`,`#9ecae1`,`#6baed6`,`#4292c6`,`#2171b5`,`#08519c`,`#08306b`],PuBuGn:[`#fff7fb`,`#ece2f0`,`#d0d1e6`,`#a6bddb`,`#67a9cf`,`#3690c0`,`#02818a`,`#016c59`,`#014636`],Viridis:[`#440154`,`#482777`,`#3f4a8a`,`#31678e`,`#26838f`,`#1f9d8a`,`#6cce5a`,`#b6de2b`,`#fee825`],Spectral:[`#9e0142`,`#d53e4f`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#e6f598`,`#abdda4`,`#66c2a5`,`#3288bd`,`#5e4fa2`],RdYlGn:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#d9ef8b`,`#a6d96a`,`#66bd63`,`#1a9850`,`#006837`],RdBu:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#f7f7f7`,`#d1e5f0`,`#92c5de`,`#4393c3`,`#2166ac`,`#053061`],PiYG:[`#8e0152`,`#c51b7d`,`#de77ae`,`#f1b6da`,`#fde0ef`,`#f7f7f7`,`#e6f5d0`,`#b8e186`,`#7fbc41`,`#4d9221`,`#276419`],PRGn:[`#40004b`,`#762a83`,`#9970ab`,`#c2a5cf`,`#e7d4e8`,`#f7f7f7`,`#d9f0d3`,`#a6dba0`,`#5aae61`,`#1b7837`,`#00441b`],RdYlBu:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee090`,`#ffffbf`,`#e0f3f8`,`#abd9e9`,`#74add1`,`#4575b4`,`#313695`],BrBG:[`#543005`,`#8c510a`,`#bf812d`,`#dfc27d`,`#f6e8c3`,`#f5f5f5`,`#c7eae5`,`#80cdc1`,`#35978f`,`#01665e`,`#003c30`],RdGy:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#ffffff`,`#e0e0e0`,`#bababa`,`#878787`,`#4d4d4d`,`#1a1a1a`],PuOr:[`#7f3b08`,`#b35806`,`#e08214`,`#fdb863`,`#fee0b6`,`#f7f7f7`,`#d8daeb`,`#b2abd2`,`#8073ac`,`#542788`,`#2d004b`],Set2:[`#66c2a5`,`#fc8d62`,`#8da0cb`,`#e78ac3`,`#a6d854`,`#ffd92f`,`#e5c494`,`#b3b3b3`],Accent:[`#7fc97f`,`#beaed4`,`#fdc086`,`#ffff99`,`#386cb0`,`#f0027f`,`#bf5b17`,`#666666`],Set1:[`#e41a1c`,`#377eb8`,`#4daf4a`,`#984ea3`,`#ff7f00`,`#ffff33`,`#a65628`,`#f781bf`,`#999999`],Set3:[`#8dd3c7`,`#ffffb3`,`#bebada`,`#fb8072`,`#80b1d3`,`#fdb462`,`#b3de69`,`#fccde5`,`#d9d9d9`,`#bc80bd`,`#ccebc5`,`#ffed6f`],Dark2:[`#1b9e77`,`#d95f02`,`#7570b3`,`#e7298a`,`#66a61e`,`#e6ab02`,`#a6761d`,`#666666`],Paired:[`#a6cee3`,`#1f78b4`,`#b2df8a`,`#33a02c`,`#fb9a99`,`#e31a1c`,`#fdbf6f`,`#ff7f00`,`#cab2d6`,`#6a3d9a`,`#ffff99`,`#b15928`],Pastel2:[`#b3e2cd`,`#fdcdac`,`#cbd5e8`,`#f4cae4`,`#e6f5c9`,`#fff2ae`,`#f1e2cc`,`#cccccc`],Pastel1:[`#fbb4ae`,`#b3cde3`,`#ccebc5`,`#decbe4`,`#fed9a6`,`#ffffcc`,`#e5d8bd`,`#fddaec`,`#f2f2f2`]},xP=Object.keys(bP),SP=new Map(xP.map(e=>[e.toLowerCase(),e])),Nye=typeof Proxy==`function`?new Proxy(bP,{get(e,t){let n=t.toLowerCase();if(SP.has(n))return e[SP.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(xP)}}):bP,Pye=(...e)=>{e=oN(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:CP}=Math,Fye=(...e)=>{let[t,n,r]=oN(e,`rgb`);t/=255,n/=255,r/=255;let i=1-CP(t,CP(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};_N.prototype.cmyk=function(){return Fye(this._rgb)},Object.assign(vN,{cmyk:(...e)=>new _N(...e,`cmyk`)}),gN.format.cmyk=Pye,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`cmyk`),aN(e)===`array`&&e.length===4)return`cmyk`}});var Iye=(...e)=>{let t=oN(e,`hsla`),n=sN(e)||`lsa`;return t[0]=dN(t[0]||0)+`deg`,t[1]=dN(t[1]*100)+`%`,t[2]=dN(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},Lye=(...e)=>{let t=oN(e,`lab`),n=sN(e)||`lab`;return t[0]=dN(t[0])+`%`,t[1]=dN(t[1]),t[2]=dN(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},Rye=(...e)=>{let t=oN(e,`lch`),n=sN(e)||`lab`;return t[0]=dN(t[0])+`%`,t[1]=dN(t[1]),t[2]=isNaN(t[2])?`none`:dN(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},zye=(...e)=>{let t=oN(e,`lab`);return t[0]=dN(t[0]*100)+`%`,t[1]=fN(t[1]),t[2]=fN(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},wP=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=JN(t,n,r),[c,l,u]=LN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Bye=(...e)=>{let t=oN(e,`lch`);return t[0]=dN(t[0]*100)+`%`,t[1]=fN(t[1]),t[2]=isNaN(t[2])?`none`:dN(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:TP}=Math,Vye=(...e)=>{let t=oN(e,`rgba`),n=sN(e)||`rgb`;if(n.substr(0,3)===`hsl`)return Iye(GN(t),n);if(n.substr(0,3)===`lab`){let e=TN();wN(`d50`);let r=Lye(kN(t),n);return wN(e),r}if(n.substr(0,3)===`lch`){let e=TN();wN(`d50`);let r=Rye(RN(t),n);return wN(e),r}return n.substr(0,5)===`oklab`?zye(JN(t)):n.substr(0,5)===`oklch`?Bye(wP(t)):(t[0]=TP(t[0]),t[1]=TP(t[1]),t[2]=TP(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},EP=(...e)=>{e=oN(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=FN(t,n,r),[c,l,u]=qN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},DP=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,OP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,kP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,AP=`\\s*`,jP=`\\s+`,MP=`\\s*,\\s*`,NP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,PP=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,FP=RegExp(`^rgba?\\(`+AP+[DP,DP,DP].join(jP)+PP+`\\)$`),IP=RegExp(`^rgb\\(`+AP+[DP,DP,DP].join(MP)+AP+`\\)$`),LP=RegExp(`^rgba\\(`+AP+[DP,DP,DP,OP].join(MP)+AP+`\\)$`),RP=RegExp(`^hsla?\\(`+AP+[NP,kP,kP].join(jP)+PP+`\\)$`),zP=RegExp(`^hsl?\\(`+AP+[NP,kP,kP].join(MP)+AP+`\\)$`),BP=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,VP=RegExp(`^lab\\(`+AP+[OP,OP,OP].join(jP)+PP+`\\)$`),HP=RegExp(`^lch\\(`+AP+[OP,OP,NP].join(jP)+PP+`\\)$`),UP=RegExp(`^oklab\\(`+AP+[OP,OP,OP].join(jP)+PP+`\\)$`),WP=RegExp(`^oklch\\(`+AP+[OP,OP,NP].join(jP)+PP+`\\)$`),{round:GP}=Math,KP=e=>e.map((e,t)=>t<=2?nN(GP(e),0,255):e),qP=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),JP=(e,t)=>e===`none`?t:e,YP=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(gN.format.named)try{return gN.format.named(e)}catch{}if((t=e.match(FP))||(t=e.match(IP))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+qP(JP(e[t],0),0,255);e=KP(e);let n=t[4]===void 0?1:+qP(t[4],0,1);return e[3]=n,e}if(t=e.match(LP)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+qP(e[t],0,255);return e}if((t=e.match(RP))||(t=e.match(zP))){let e=t.slice(1,4);e[0]=+JP(e[0].replace(`deg`,``),0),e[1]=qP(JP(e[1],0),0,100)*.01,e[2]=qP(JP(e[2],0),0,100)*.01;let n=KP(WN(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}if(t=e.match(BP)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=WN(e);for(let e=0;e<3;e++)n[e]=GP(n[e]);return n[3]=+t[4],n}if(t=e.match(VP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,100),e[1]=qP(JP(e[1],0),-125,125,!0),e[2]=qP(JP(e[2],0),-125,125,!0);let n=TN();wN(`d50`);let r=KP(EN(e));return wN(n),r[3]=t[4]===void 0?1:+qP(t[4],0,1),r}if(t=e.match(HP)){let e=t.slice(1,4);e[0]=qP(e[0],0,100),e[1]=qP(JP(e[1],0),0,150,!1),e[2]=+JP(e[2].replace(`deg`,``),0);let n=TN();wN(`d50`);let r=KP(IN(e));return wN(n),r[3]=t[4]===void 0?1:+qP(t[4],0,1),r}if(t=e.match(UP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,1),e[1]=qP(JP(e[1],0),-.4,.4,!0),e[2]=qP(JP(e[2],0),-.4,.4,!0);let n=KP(qN(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}if(t=e.match(WP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,1),e[1]=qP(JP(e[1],0),0,.4,!1),e[2]=+JP(e[2].replace(`deg`,``),0);let n=KP(EP(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}};YP.test=e=>FP.test(e)||RP.test(e)||VP.test(e)||HP.test(e)||UP.test(e)||WP.test(e)||IP.test(e)||LP.test(e)||zP.test(e)||BP.test(e)||e===`transparent`,_N.prototype.css=function(e){return Vye(this._rgb,e)},vN.css=(...e)=>new _N(...e,`css`),gN.format.css=YP,gN.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&YP.test(e))return`css`}}),gN.format.gl=(...e)=>{let t=oN(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},vN.gl=(...e)=>new _N(...e,`gl`),_N.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},_N.prototype.hex=function(e){return SN(this._rgb,e)},vN.hex=(...e)=>new _N(...e,`hex`),gN.format.hex=bN,gN.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:XP}=Math,ZP=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*XP(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*XP(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*XP(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*XP(r),i=255),[n,r,i,1]},{round:Hye}=Math,Uye=(...e)=>{let t=oN(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=ZP(o);e[2]/e[0]>=r/n?a=o:i=o}return Hye(o)};_N.prototype.temp=_N.prototype.kelvin=_N.prototype.temperature=function(){return Uye(this._rgb)};var QP=(...e)=>new _N(...e,`temp`);Object.assign(vN,{temp:QP,kelvin:QP,temperature:QP}),gN.format.temp=gN.format.kelvin=gN.format.temperature=ZP,_N.prototype.oklch=function(){return wP(this._rgb)},Object.assign(vN,{oklch:(...e)=>new _N(...e,`oklch`)}),gN.format.oklch=EP,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`oklch`),aN(e)===`array`&&e.length===3)return`oklch`}}),Object.assign(vN,{analyze:oP,average:iye,bezier:uye,blend:nP,brewer:Nye,Color:_N,colors:yN,contrast:Sye,contrastAPCA:Tye,cubehelix:mye,deltaE:kye,distance:Aye,input:gN,interpolate:PN,limits:sP,mix:PN,random:vye,scale:eP,scales:Mye,valid:jye});var $P=vN,Wye=Jn(`flex flex-col space-y-sm`,{variants:{variant:{elevated:`rounded-xl bg-surface p-md shadow-2xs`,outline:`rounded-xl border border-border p-md`,ghost:``}},defaultVariants:{variant:`elevated`}}),Gye=Jn(`overflow-hidden border border-border hover:cursor-pointer focus:outline-2 focus:outline-offset-2`,{variants:{size:{small:`size-sm rounded-md`,medium:`size-md rounded-lg`,large:`size-lg rounded-xl`}},defaultVariants:{size:`medium`}}),eF=[{label:`RGB`,value:`rgb`,getValue:e=>e.rgb(),parseValue:e=>{let t=e.split(`,`).map(e=>parseInt(e.trim(),10));if(t.length===3&&t.every(e=>!isNaN(e)))return $P.rgb(t[0],t[1],t[2])}},{label:`CSS`,value:`css`,getValue:e=>e.css(),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HEX`,value:`hex`,getValue:e=>e.hex(`rgb`),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HSL`,value:`hsl`,getValue:e=>e.hsl(),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HSV`,value:`hsv`,getValue:e=>e.hsv(),parseValue:e=>{try{return $P(e)}catch{return}}}],tF=v.default.createContext(null),nF=(e,t)=>{try{return $P(typeof e==`string`?e.trim():e)}catch{return t}},Kye=(e,t)=>{switch(t.type){case`set_color`:{let[n,r,i]=t.color.hsv();return{...e,hue:n==null||Number.isNaN(n)?e.hue:n,saturation:i===0||r==null||Number.isNaN(r)?e.saturation:r,value:i,alpha:t.color.alpha()}}case`set_hue`:return{...e,hue:t.hue};case`set_saturation`:return{...e,saturation:t.saturation};case`set_value`:return{...e,value:t.value};case`set_saturation_value`:return{...e,saturation:t.saturation,value:t.value};case`set_alpha`:return{...e,alpha:t.alpha};case`set_lightness`:return{...e,value:t.lightness};case`set_value_type`:return{...e,valueType:t.valueType};case`set_palette`:return{...e,palette:t.palette};case`add_palette_color`:return{...e,palette:[...e.palette,t.color]};default:return e}},qye=({variant:e,color:t,defaultColor:r,palette:i,defaultPalette:a,onPaletteChange:o,paletteLimit:s,defaultValueType:c,onValueChange:l,className:u,children:d,ref:f,...p})=>{let[m,h]=v.default.useReducer(Kye,{controlledValue:t,defaultColor:r,defaultPalette:a},({controlledValue:e,defaultColor:t,defaultPalette:n})=>{let r=nF(e??t??`#ffffff`,$P(`#ffffff`)),[a,o,s]=r.hsv();return{hue:a==null||Number.isNaN(a)?0:a,saturation:o==null||Number.isNaN(o)?0:o,value:s,alpha:r.alpha(),valueType:eF.find(e=>e.value===c)??eF[0],palette:(i??n??[]).map(e=>$P(e))}}),{hue:g,saturation:_,value:y,alpha:b,valueType:x,palette:S}=m,C=v.default.useMemo(()=>$P.hsv(g,_,y).alpha(b),[g,_,y,b]),w=g,T=_,E=y,D=b,O=v.default.useRef(void 0);v.default.useEffect(()=>{if(t===void 0)return;let e=nF(t,C),n=e.hex(`rgba`);n!==O.current&&(O.current=n,n!==C.hex(`rgba`)&&h({type:`set_color`,color:e}))},[t,C]);let k=v.default.useRef(void 0);v.default.useEffect(()=>{if(i===void 0)return;let e=i.map(e=>$P(e)),t=e.map(e=>e.hex(`rgba`)).join(`|`);t!==k.current&&(k.current=t,h({type:`set_palette`,palette:e}))},[i]);let A=v.default.useCallback(e=>{h({type:`set_color`,color:e}),l?.(e)},[l]),j=v.default.useCallback(e=>{h({type:`set_hue`,hue:e}),l?.($P.hsv(e,T,E).alpha(D))},[D,T,E,l]),M=v.default.useCallback(e=>{h({type:`set_saturation`,saturation:e}),l?.($P.hsv(w,e,E).alpha(D))},[D,w,E,l]),N=v.default.useCallback(e=>{h({type:`set_value`,value:e}),l?.($P.hsv(w,T,e).alpha(D))},[D,w,T,l]),P=v.default.useCallback((e,t)=>{h({type:`set_saturation_value`,saturation:e,value:t}),l?.($P.hsv(w,e,t).alpha(D))},[D,w,l]),F=v.default.useCallback(e=>A(C.alpha(e)),[C,A]),I=v.default.useCallback(e=>A(C.set(`hsl.l`,e)),[C,A]),L=v.default.useCallback(e=>h({type:`set_value_type`,valueType:e}),[]),R=v.default.useCallback(e=>{k.current=e.map(e=>e.hex(`rgba`)).join(`|`),h({type:`set_palette`,palette:e}),o?.(e.map(e=>e.hex()))},[o]),z=v.default.useCallback(e=>{if(s&&S.length>=s)return;let t=[...S,e];k.current=t.map(e=>e.hex(`rgba`)).join(`|`),h({type:`add_palette_color`,color:e}),o?.(t.map(e=>e.hex()))},[S,s,o]);return(0,n.jsx)(tF.Provider,{value:{color:C,setColor:A,hue:w,saturation:T,value:E,alpha:D,setHue:j,setSaturation:M,setValue:N,setSaturationValue:P,setAlpha:F,setLightness:I,valueType:x,setValueType:L,palette:S,setPalette:R,addPaletteColor:z,paletteLimit:s},children:(0,n.jsx)(`div`,{className:Y(Wye({variant:e}),u),ref:f,...p,children:d})})},rF=()=>{let e=v.default.useContext(tF);if(!e)throw Error(`useColorPicker must be used within a ColorPicker`);return e},Jye=({className:e,ref:t,...r})=>{let{color:i,hue:a,saturation:o,value:s,setSaturationValue:c}=rF(),l=$P.hsv(a,1,1).hex(),u=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(Math.max((e.clientX-t.left)/t.width,0),1),r=Math.min(Math.max(1-(e.clientY-t.top)/t.height,0),1);c(n,r)},d=e=>{e.currentTarget.setPointerCapture(e.pointerId),u(e)};return(0,n.jsx)(`div`,{...r,ref:t,className:Y(`relative aspect-square grow touch-none rounded-lg active:cursor-grabbing`,e),style:{background:`
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z_e(e,t){if(e){if(typeof e==`string`)return CM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CM(e,t):void 0}}function CM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B_e(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function V_e(e){if(Array.isArray(e))return e}function H_e(e){return e.dataKey}function U_e(e,n){return t.isValidElement(e)?t.cloneElement(e,n):typeof e==`function`?t.createElement(e,n):t.createElement(jde,n)}var wM=[],W_e={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function G_e(e){var n=Ab(e,W_e),i=n.active,a=n.allowEscapeViewBox,o=n.animationDuration,s=n.animationEasing,c=n.content,l=n.filterNull,u=n.isAnimationActive,d=n.offset,f=n.payloadUniqBy,p=n.position,m=n.reverseDirection,h=n.useTranslate3d,g=n.wrapperStyle,_=n.cursor,v=n.shared,y=n.trigger,b=n.defaultIndex,x=n.portal,S=n.axisId,C=nx(),w=typeof b==`number`?String(b):b;(0,t.useEffect)(()=>{C(Oge({shared:v,trigger:y,axisId:S,active:i,defaultIndex:w}))},[C,v,y,S,i,w]);var T=wC(),E=Qde(),D=Ege(v),O=ix(e=>d_e(e,D,y,w))??{},k=O.activeIndex,A=O.isActive,j=ix(e=>u_e(e,D,y,w)),M=ix(e=>fM(e,D,y,w)),N=ix(e=>l_e(e,D,y,w)),P=j,F=O_e(),I=i??A??!1,L=L_e(Cx([P,I]),2),R=L[0],z=L[1],B=D===`axis`?M:void 0;N_e(D,y,N,B,k,I);var V=x??F;if(V==null||T==null||D==null)return null;var H=P??wM;I||(H=wM),l&&H.length&&(H=ex(H.filter(e=>e.value!=null&&(e.hide!==!0||n.includeHidden)),f,H_e));var U=H.length>0,W=SM(SM({},n),{},{payload:H,label:B,active:I,activeIndex:k,coordinate:N,accessibilityLayer:E}),G=t.createElement(Zde,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:u,active:I,coordinate:N,hasPayload:U,offset:d,position:p,reverseDirection:m,useTranslate3d:h,viewBox:T,wrapperStyle:g,lastBoundingBox:R,innerRef:z,hasPortalFromProps:!!x},U_e(c,W));return t.createElement(t.Fragment,null,(0,r.createPortal)(G,V),I&&t.createElement(E_e,{cursor:_,tooltipEventType:D,coordinate:N,payload:H,index:k}))}var K_e=({content:e,...t})=>(0,n.jsx)(G_e,{content:e,...t}),TM=v.default.createContext(null),q_e=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(TM.Provider,{value:i,children:(0,n.jsx)(`div`,{className:Y(`min-w-[125px] space-y-2xs rounded-lg bg-surface-2 px-xs py-2xs`,e),ref:r,...i,children:t})}),EM=()=>{let e=v.default.useContext(TM);if(!e)throw Error(`useChartTooltipContent must be used within a ChartTooltipContentProvider`);return e},J_e=({className:e,children:t,ref:r,...i})=>{let{label:a}=EM();return(0,n.jsxs)(`p`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:[t,a]})},DM=v.default.createContext(null),Y_e=({className:e,children:t,ref:r,...i})=>{let{payload:a}=EM();return(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs`,e),ref:r,...i,children:a?.map((e,r)=>(0,n.jsx)(DM.Provider,{value:e,children:(0,n.jsx)(`div`,{className:`flex items-center justify-between gap-2xs`,children:t})},`payload-${r}`))})},OM=()=>{let e=v.default.useContext(DM);if(!e)throw Error(`useChartTooltipPayload must be used within a ChartTooltipPayloadProvider`);return e},X_e=({children:e,...t})=>(0,n.jsx)(pw,{...t,children:e}),kM=({className:e,children:t,ref:r,...i})=>{let{icon:a,color:o}=PM();return(0,n.jsxs)(`div`,{style:{color:o},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,a&&(0,n.jsx)(a,{})]})},AM=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=PM();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})},jM=({className:e,children:t,ref:r,...i})=>{let{label:a}=PM();return(0,n.jsxs)(`p`,{className:Y(`style-text-default--1 capitalize`,e),ref:r,...i,children:[t,a]})},MM=(e,t,n)=>{if(!(typeof t!=`object`||!t)){if(n in e)return e[n];if(`name`in t&&typeof t.name==`string`&&t.name in e)return e[t.name]}},NM=v.default.createContext(null),Z_e=({payload:e,verticalAlign:t=`bottom`,className:r,children:i,ref:a,...o})=>{let{config:s}=ny();return(0,n.jsx)(`div`,{className:Y(`flex items-center justify-center gap-lg`,t===`top`?`mb-md`:`mt-md`,r),ref:a,...o,children:e?.map((e,t)=>{let r=typeof e.dataKey==`string`?e.dataKey:`value`,a=MM(s,e,r);return(0,n.jsx)(NM.Provider,{value:{color:a?.color,icon:a?.icon,label:a?.label},children:(0,n.jsxs)(`div`,{className:`flex items-center gap-2xs`,children:[a?.icon?(0,n.jsx)(kM,{}):(0,n.jsx)(AM,{}),(0,n.jsx)(jM,{}),i]})},`payload-${t}`)})})},PM=()=>{let e=v.default.useContext(NM);if(!e)throw Error(`useChartLegendPayload must be used within a ChartLegendPayloadProvider`);return e},Q_e=({gradients:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(`defs`,{className:Y(``,t),ref:i,...a,children:[e.map(e=>(0,n.jsxs)(`linearGradient`,{id:e.id,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,n.jsx)(`stop`,{offset:`5%`,stopColor:e.stopColor,stopOpacity:.8}),(0,n.jsx)(`stop`,{offset:`95%`,stopColor:e.stopColor,stopOpacity:.1})]},e.id)),r]}),$_e=({shape:e=`circle`,className:t,children:r,ref:i,...a})=>{let{color:o}=OM();return(0,n.jsx)(`div`,{style:{backgroundColor:o,...e===`circle`&&{borderRadius:`50%`},...e===`diamond`&&{transform:`rotate(45deg)`},...e===`triangle`&&{clipPath:`polygon(50% 0%, 0% 100%, 100% 100%)`},...e===`wye`&&{clipPath:`polygon(50% 0%, 61.8% 35.4%, 98.5% 35.4%, 69.1% 57.1%, 80.9% 92.5%, 50% 70.7%, 19.1% 92.5%, 30.9% 57.1%, 1.5% 35.4%, 38.2% 35.4%)`},...e===`line`&&{maxHeight:`100%`,width:`3px`,borderRadius:`1.5px`}},className:Y(`size-xs`,t),ref:i,...a,children:r})},eve=({className:e,children:t,ref:r,...i})=>{let{name:a}=OM();return(0,n.jsxs)(`p`,{className:Y(`grow text-left style-text-default--1 text-on-surface-variant capitalize`,e),ref:r,...i,children:[t,a]})},tve=({className:e,children:t,ref:r,...i})=>{let{config:a}=ny(),o=OM(),s=MM(a,o,typeof o.dataKey==`string`?o.dataKey:`value`)?.icon;return(0,n.jsxs)(`div`,{style:{color:o.color},className:Y(`shrink-0 [&>svg]:size-xs`,e),ref:r,...i,children:[t,s&&(0,n.jsx)(s,{})]})},nve=({className:e,children:t,ref:r,...i})=>{let{value:a}=OM();return(0,n.jsxs)(`p`,{className:Y(`mx-auto style-text-default--1`,e),ref:r,...i,children:[t,a]})},FM=({className:e,...t})=>(0,n.jsx)(Yd,{className:Y(`flex`,e),...t,render:(e,t)=>t.indeterminate?(0,n.jsx)(_i,{weight:`bold`,...e,className:`text-accent-default`}):(0,n.jsx)($r,{weight:`bold`,...e})}),rve=Jn(`group flex size-sm items-center justify-center rounded-sm shadow-2xs outline-2 outline-transparent transition-colors not-indeterminate:text-accent-on-default indeterminate:text-accent-default hover:cursor-pointer hover:outline-accent-border disabled:cursor-not-allowed disabled:hover:cursor-not-allowed data-checked:bg-accent-default [&_svg]:size-xs [&:not([data-checked])]:hover:outline-border-strong`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low shadow-none inset-shadow-2xs data-checked:inset-shadow-none`}},defaultVariants:{variant:`elevated`}}),IM=({variant:e,className:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:`flex items-center gap-xs`,children:(0,n.jsx)(Jd,{className:Y(rve({variant:e,className:t})),ref:r,...i,children:(0,n.jsx)(FM,{})})}),ive=({className:e,children:t,ref:r,...i})=>{let a=v.default.useId();return(0,n.jsx)(Zd,{"aria-labelledby":a,className:Y(`flex flex-col items-start gap-2xs`,e),ref:r,...i,children:t})},LM=v.default.createContext(void 0),ave=({items:e,defaultValue:t,className:r,children:i,ref:a,...o})=>{let[s,c]=v.default.useState(t);return(0,n.jsx)(LM.Provider,{value:{currentValue:s,setCurrentValue:c,items:e},children:(0,n.jsx)(`div`,{className:Y(`flex flex-col rounded-xl border border-border bg-surface`,r),ref:a,...o,children:i})})},RM=()=>{let e=v.default.useContext(LM);if(!e)throw Error(`useCodeBlock must be used within a CodeBlock`);return e},ove=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`absolute top-3xs right-3xs flex items-center gap-3xs`,e),ref:r,...i,children:t}),sve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM(),[o,s]=v.default.useState(!1);return(0,n.jsxs)(Yv,{onClick:async()=>{try{await navigator.clipboard.writeText(a.content),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to copy text: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)($r,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(ni,{weight:`bold`,className:`animate-in zoom-in`})]})},cve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM(),[o,s]=v.default.useState(!1);return(0,n.jsxs)(Yv,{onClick:async()=>{try{let e=new Blob([a.content]),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${a.name}`,n.click(),URL.revokeObjectURL(t),s(!0),setTimeout(()=>s(!1),2e3)}catch(e){console.error(`Failed to download file: `,e)}},size:`iconMedium`,variant:`ghost`,tone:`neutral`,className:Y(``,e),ref:r,...i,children:[t,o?(0,n.jsx)($r,{weight:`bold`,className:`animate-in zoom-in`}):(0,n.jsx)(ii,{weight:`bold`,className:`animate-in zoom-in`})]})},lve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex min-h-2xl items-center justify-between border-b border-border p-2xs`,e),ref:r,...i,children:t}),uve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM();return(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-center gap-2xs px-xs style-text-strong-0 text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:[t,a?.icon,a.name]})},zM=({children:e,...t})=>(0,n.jsx)(voe,{...t,children:e}),BM=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(p_,{className:Y(`group/item grid min-h-lg cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-lg px-2xs py-3xs transition-colors outline-none select-none group-data-[side=none]:pr-xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default [&_svg]:size-sm`,e),ref:r,...i,children:[(0,n.jsx)(g_,{className:`flex flex-col`,children:t}),(0,n.jsx)(m_,{className:`place-self-end self-center`,children:(0,n.jsx)($r,{weight:`bold`})})]}),VM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(u_,{className:Y(`relative max-h-(--available-height) scroll-py-md space-y-3xs overflow-y-auto`,e),ref:r,...i,children:t}),HM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Xg,{className:Y(`flex text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t}),UM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Zg,{children:(0,n.jsx)(n_,{className:Y(`z-9999 outline-none select-none`,e),ref:r,...i,children:(0,n.jsxs)(r_,{className:`group min-w-(--anchor-width) origin-(--transform-origin) rounded-xl bg-surface-2 bg-clip-padding p-2xs shadow-md transition-[transform,scale,opacity] data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0 data-[side=none]:data-ending-style:scale-90 data-[side=none]:data-ending-style:opacity-0 data-[side=none]:data-starting-style:scale-90 data-[side=none]:data-starting-style:opacity-0`,children:[(0,n.jsx)(y_,{className:`top-0 right-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-top-full`,children:(0,n.jsx)(Zr,{className:`size-sm`,weight:`fill`})}),t,(0,n.jsx)(v_,{className:`right-0 bottom-0 z-[1px] flex h-md w-full cursor-default items-center justify-center rounded-xl bg-surface-2 before:absolute before:left-0 before:size-full before:content-[''] data-[side=none]:before:-bottom-full`,children:(0,n.jsx)(Kr,{className:`size-sm`,weight:`fill`})})]})})}),dve=Jn(`flex items-center justify-between outline outline-transparent transition-all hover:cursor-pointer aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:outline-error-border data-disabled:cursor-not-allowed [&_[data-value]]:min-w-0 [&_[data-value]]:flex-1`,{variants:{variant:{primary:`bg-surface shadow-2xs hover:outline-border-strong`,secondary:`bg-neutral-container hover:outline-border-strong`,ghost:`bg-transparent hover:bg-neutral-container`},size:{small:`h-lg gap-md rounded-lg px-xs style-text-default--1 [&_[data-value]]:gap-3xs [&_svg]:size-xs`,medium:`h-xl gap-lg rounded-xl px-sm style-text-default-0 [&_[data-value]]:gap-2xs [&_svg]:size-sm`,large:`h-2xl gap-xl rounded-2xl px-md style-text-default-1 [&_[data-value]]:gap-xs [&_svg]:size-md`}},defaultVariants:{variant:`primary`,size:`medium`}}),WM=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(Jg,{className:Y(dve({variant:e,size:t,className:r})),ref:a,...o,children:i}),GM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Yg,{"data-value":!0,className:Y(`flex h-lg min-w-0 flex-1 items-center gap-2xs overflow-hidden text-left text-ellipsis whitespace-nowrap data-placeholder:opacity-70`,e),ref:r,...i,children:t}),KM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(x_,{className:Y(`block space-y-3xs border-border-strong not-last:border-b not-last:pb-xs`,e),ref:r,...i,children:t}),fve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(S_,{className:Y(`sticky top-[0px] z-1 cursor-default bg-surface-2 px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t}),pve=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-prose--1 text-on-surface-variant transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:r,...i,children:t}),qM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`flex items-center gap-2xs style-text-default-0 text-on-surface transition-colors group-data-highlighted/item:text-neutral-on-container group-data-selected/item:text-neutral-on-default`,e),ref:r,...i,children:t}),mve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,setCurrentValue:o,items:s}=RM();return(0,n.jsxs)(zM,{value:a.id,onValueChange:e=>{let t=s.find(t=>t.id===e);t&&o(t)},children:[(0,n.jsxs)(WM,{className:Y(``,e),ref:r,...i,variant:`ghost`,children:[(0,n.jsx)(GM,{children:e=>s.find(t=>t.id===e)?.label}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{children:(0,n.jsxs)(VM,{children:[t,(0,n.jsx)(KM,{children:s.map(({label:e,id:t})=>(0,n.jsx)(BM,{value:t,children:e},t))})]})})]})},hve=Jn(``,{variants:{variant:{default:`space-y-xs [&_[role=presentation]]:top-1/2 [&_[role=tablist]]:bg-surface-low`,ghost:`space-y-2xs [&_[role=presentation]]:top-1/2 [&_[role=presentation]]:rounded-full [&_[role=presentation]]:border [&_[role=tablist]]:rounded-full`,underline:`space-y-xs [&_[role=tablist]]:border-border`},size:{small:``,medium:``,large:``},tone:{brand:``,accent:``,neutral:``,error:``,info:``,success:``,warning:``},fill:{true:`[&_[role=tab]]:grow [&_[role=tablist]]:w-full`,false:`[&_[role=tablist]]:w-fit`}},compoundVariants:[{variant:`default`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`default`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`default`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`default`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`default`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`default`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`default`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-on-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`ghost`,tone:`brand`,class:`[&_[role=presentation]]:border-brand-border [&_[role=presentation]]:bg-brand-container [&_[role=tab]]:data-active:text-brand-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`ghost`,tone:`accent`,class:`[&_[role=presentation]]:border-accent-border [&_[role=presentation]]:bg-accent-container [&_[role=tab]]:data-active:text-accent-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`ghost`,tone:`neutral`,class:`[&_[role=presentation]]:border-neutral-border [&_[role=presentation]]:bg-neutral-container [&_[role=tab]]:data-active:text-neutral-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`ghost`,tone:`error`,class:`[&_[role=presentation]]:border-error-border [&_[role=presentation]]:bg-error-container [&_[role=tab]]:data-active:text-error-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`ghost`,tone:`info`,class:`[&_[role=presentation]]:border-info-border [&_[role=presentation]]:bg-info-container [&_[role=tab]]:data-active:text-info-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`ghost`,tone:`success`,class:`[&_[role=presentation]]:border-success-border [&_[role=presentation]]:bg-success-container [&_[role=tab]]:data-active:text-success-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`ghost`,tone:`warning`,class:`[&_[role=presentation]]:border-warning-border [&_[role=presentation]]:bg-warning-container [&_[role=tab]]:data-active:text-warning-on-container [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{variant:`underline`,tone:`brand`,class:`[&_[role=presentation]]:bg-brand-default [&_[role=tab]]:data-active:text-brand-default [&_[role=tab]]:hover:[&:not([data-active])]:text-brand-default`},{variant:`underline`,tone:`accent`,class:`[&_[role=presentation]]:bg-accent-default [&_[role=tab]]:data-active:text-accent-default [&_[role=tab]]:hover:[&:not([data-active])]:text-accent-default`},{variant:`underline`,tone:`neutral`,class:`[&_[role=presentation]]:bg-neutral-default [&_[role=tab]]:data-active:text-neutral-default [&_[role=tab]]:hover:[&:not([data-active])]:text-neutral-default`},{variant:`underline`,tone:`error`,class:`[&_[role=presentation]]:bg-error-default [&_[role=tab]]:data-active:text-error-default [&_[role=tab]]:hover:[&:not([data-active])]:text-error-default`},{variant:`underline`,tone:`info`,class:`[&_[role=presentation]]:bg-info-default [&_[role=tab]]:data-active:text-info-default [&_[role=tab]]:hover:[&:not([data-active])]:text-info-default`},{variant:`underline`,tone:`success`,class:`[&_[role=presentation]]:bg-success-default [&_[role=tab]]:data-active:text-success-default [&_[role=tab]]:hover:[&:not([data-active])]:text-success-default`},{variant:`underline`,tone:`warning`,class:`[&_[role=presentation]]:bg-warning-default [&_[role=tab]]:data-active:text-warning-default [&_[role=tab]]:hover:[&:not([data-active])]:text-warning-default`},{size:`small`,variant:`default`,class:`[&_[role=presentation]]:rounded-lg [&_[role=tab]]:rounded-lg [&_[role=tablist]]:rounded-lg`},{size:`small`,variant:`default`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`default`,class:`[&_[role=presentation]]:rounded-xl [&_[role=tab]]:h-xl [&_[role=tab]]:rounded-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:rounded-xl [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`default`,class:`[&_[role=presentation]]:rounded-2xl [&_[role=tab]]:h-2xl [&_[role=tab]]:rounded-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:rounded-2xl [&_[role=tablist]]:p-xs`},{size:`small`,variant:`ghost`,class:`[&_[role=tab]]:h-lg [&_[role=tab]]:px-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:gap-2xs [&_[role=tablist]]:p-3xs`},{size:`medium`,variant:`ghost`,class:`[&_[role=tab]]:h-xl [&_[role=tab]]:px-md [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:gap-xs [&_[role=tablist]]:p-2xs`},{size:`large`,variant:`ghost`,class:`[&_[role=tab]]:h-2xl [&_[role=tab]]:px-lg [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:gap-sm [&_[role=tablist]]:p-xs`},{size:`small`,variant:`underline`,class:`[&_[role=tab]]:px-lg [&_[role=tab]]:pb-sm [&_[role=tab]]:style-text-default--1 [&_[role=tablist]]:h-lg [&_[role=tablist]]:gap-md [&_[role=tablist]]:border-b-2 **:[[role=presentation]]:bottom-[-3px] **:[[role=presentation]]:h-[2px]`},{size:`medium`,variant:`underline`,class:`[&_[role=tab]]:px-xl [&_[role=tab]]:pb-xs [&_[role=tab]]:style-text-default-0 [&_[role=tablist]]:h-xl [&_[role=tablist]]:gap-lg [&_[role=tablist]]:border-b-3 **:[[role=presentation]]:bottom-[-4px] **:[[role=presentation]]:h-[3px]`},{size:`large`,variant:`underline`,class:`[&_[role=tab]]:px-2xl [&_[role=tab]]:pb-2xs [&_[role=tab]]:style-text-default-1 [&_[role=tablist]]:h-2xl [&_[role=tablist]]:gap-xl [&_[role=tablist]]:border-b-4 **:[[role=presentation]]:bottom-[-5px] **:[[role=presentation]]:h-[4px]`}],defaultVariants:{variant:`default`,size:`medium`,tone:`brand`,fill:!0}}),JM=({size:e,tone:t,variant:r,fill:i,className:a,ref:o,...s})=>(0,n.jsx)(Y_,{className:Y(hve({size:e,tone:t,variant:r,fill:i}),a),ref:o,...s}),YM=({className:e,...t})=>(0,n.jsx)(tv,{className:Y(`absolute left-[0px] z-[-1] h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) -translate-y-1/2 transition-all duration-300`,e),...t}),XM=({className:e,...t})=>(0,n.jsx)(rv,{className:Y(`relative z-0 flex`,e),...t}),gve=({className:e,...t})=>(0,n.jsx)(nv,{className:Y(`relative flex grow flex-col items-center justify-start gap-md`,e),...t}),ZM=({className:e,...t})=>(0,n.jsx)(ev,{className:Y(`inline-flex items-center justify-center gap-xs text-center break-keep whitespace-nowrap text-on-surface transition-colors duration-300 outline-none select-none hover:cursor-pointer focus-visible:relative focus-visible:before:absolute focus-visible:before:outline`,e),...t}),_ve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a,items:o,setCurrentValue:s}=RM();return(0,n.jsxs)(JM,{value:a.id,onValueChange:e=>{let t=o.find(t=>t.id===e);t&&s(t)},className:Y(``,e),variant:`ghost`,ref:r,...i,children:[(0,n.jsxs)(XM,{children:[o.map(({id:e,label:t})=>(0,n.jsx)(ZM,{value:e,children:t},e)),(0,n.jsx)(YM,{})]}),t]})},vve=({className:e,children:t,ref:r,...i})=>{let{currentValue:a}=RM();return(0,n.jsxs)(`div`,{className:Y(`relative overflow-auto rounded-lg px-md py-sm`,e),ref:r,...i,children:[t,(0,n.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.content}})]})},QM=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(nf,{className:Y(`ml-md flex h-(--collapsible-panel-height) flex-col justify-end gap-3xs overflow-hidden border-l border-border pl-sm transition-all duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden="until-found"])]:hidden`,e),ref:r,...i,children:t}),$M=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ef,{render:a=>(0,n.jsxs)(Yv,{...a,tone:`neutral`,variant:`elevated`,className:Y(`group/trigger`,e),ref:r,...i,children:[t,(0,n.jsx)(Xr,{weight:`bold`,className:`ml-auto transition-all ease-out group-data-panel-open/trigger:rotate-90`})]})}),eN=({className:e,children:t,ref:r,...i})=>(0,n.jsx)($d,{className:Y(`flex min-h-xl w-full flex-col justify-center gap-xs`,e),ref:r,...i,children:t}),yve=Jn(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-sm [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-lg [&_[data-slot='slider-thumb']]:border-4 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-md [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`}},defaultVariants:{size:`medium`}}),tN=({size:e,trackStyle:t,className:r,children:i,ref:a,...o})=>{let s=t.some(e=>e.includes(`rgba`)||e.includes(`hsla`)||e.includes(`/`));return(0,n.jsx)(A_,{className:Y(yve({size:e}),r),"data-slot":`slider-root`,thumbAlignment:`edge`,ref:a,role:`slider`,...o,children:(0,n.jsx)(I_,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,n.jsxs)(L_,{"data-slot":`slider-track`,className:Y(`relative size-full rounded-full`),style:{backgroundImage:s?[`linear-gradient(to right, ${t.join(`, `)})`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`,`linear-gradient(45deg, #d4d4d8 25%, transparent 25%, transparent 75%, #d4d4d8 75%, #d4d4d8)`].join(`, `):`linear-gradient(to right, ${t.join(`, `)})`,backgroundSize:s?`100% 100%, 10px 10px, 10px 10px`:`auto`,backgroundPosition:s?`0 0, 0 0, 5px 5px`:`auto`,backgroundColor:`#ffffff`},children:[i,(0,n.jsx)(V_,{"data-slot":`slider-indicator`,className:`rounded-full`}),(0,n.jsx)(B_,{"data-slot":`slider-thumb`,className:Y(`absolute aspect-square rounded-full border-white shadow-xs transition-[width,height,opacity] data-dragging:cursor-grabbing hover:[&:not([data-dragging])]:cursor-pointer`),render:(e,r)=>(0,n.jsx)(`div`,{...e,style:{...e.style,backgroundColor:t[r.values[0]]}})})]})})})},{min:bve,max:xve}=Math,nN=(e,t=0,n=1)=>bve(xve(t,e),n),rN=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=nN(e[t],0,255)):t===3&&(e[t]=nN(e[t],0,1));return e},iN={};for(let e of[`Boolean`,`Number`,`String`,`Function`,`Array`,`Date`,`RegExp`,`Undefined`,`Null`])iN[`[object ${e}]`]=e.toLowerCase();function aN(e){return iN[Object.prototype.toString.call(e)]||`object`}var oN=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):aN(e[0])==`object`&&t?t.split(``).filter(t=>e[0][t]!==void 0).map(t=>e[0][t]):e[0].slice(0),sN=e=>{if(e.length<2)return null;let t=e.length-1;return aN(e[t])==`string`?e[t].toLowerCase():null},{PI:cN,min:lN,max:uN}=Math,dN=e=>Math.round(e*100)/100,fN=e=>Math.round(e*100)/100,pN=cN*2,mN=cN/3,Sve=cN/180,Cve=180/cN;function hN(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}var gN={format:{},autodetect:[]},_N=class{constructor(...e){let t=this;if(aN(e[0])===`object`&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=sN(e),r=!1;if(!n){r=!0,gN.sorted||=(gN.autodetect=gN.autodetect.sort((e,t)=>t.p-e.p),!0);for(let t of gN.autodetect)if(n=t.test(...e),n)break}if(gN.format[n])t._rgb=rN(gN.format[n].apply(null,r?e:e.slice(0,-1)));else throw Error(`unknown format: `+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return aN(this.hex)==`function`?this.hex():`[${this._rgb.join(`,`)}]`}},wve=`3.2.0`,vN=(...e)=>new _N(...e);vN.version=wve;var yN={aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyan:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,laserlemon:`#ffff54`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrod:`#fafad2`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,maroon2:`#7f0000`,maroon3:`#b03060`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,purple2:`#7f007f`,purple3:`#a020f0`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,steelblue:`#4682b4`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,tomato:`#ff6347`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},Tve=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Eve=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,bN=e=>{if(e.match(Tve)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return[t>>16,t>>8&255,t&255,1]}if(e.match(Eve)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(``),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);let t=parseInt(e,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((t&255)/255*100)/100]}throw Error(`unknown hex color: ${e}`)},{round:xN}=Math,SN=(...e)=>{let[t,n,r,i]=oN(e,`rgba`),a=sN(e)||`auto`;i===void 0&&(i=1),a===`auto`&&(a=i<1?`rgba`:`rgb`),t=xN(t),n=xN(n),r=xN(r);let o=`000000`+(t<<16|n<<8|r).toString(16);o=o.substr(o.length-6);let s=`0`+xN(i*255).toString(16);switch(s=s.substr(s.length-2),a.toLowerCase()){case`rgba`:return`#${o}${s}`;case`argb`:return`#${s}${o}`;default:return`#${o}`}};_N.prototype.name=function(){let e=SN(this._rgb,`rgb`);for(let t of Object.keys(yN))if(yN[t]===e)return t.toLowerCase();return e},gN.format.named=e=>{if(e=e.toLowerCase(),yN[e])return bN(yN[e]);throw Error(`unknown color name: `+e)},gN.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&yN[e.toLowerCase()])return`named`}}),_N.prototype.alpha=function(e,t=!1){return e!==void 0&&aN(e)===`number`?t?(this._rgb[3]=e,this):new _N([this._rgb[0],this._rgb[1],this._rgb[2],e],`rgb`):this._rgb[3]},_N.prototype.clipped=function(){return this._rgb._clipped||!1};var CN={Kn:18,labWhitePoint:`d65`,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Dve=new Map([[`a`,[1.0985,.35585]],[`b`,[1.0985,.35585]],[`c`,[.98074,1.18232]],[`d50`,[.96422,.82521]],[`d55`,[.95682,.92149]],[`d65`,[.95047,1.08883]],[`e`,[1,1,1]],[`f2`,[.99186,.67393]],[`f7`,[.95041,1.08747]],[`f11`,[1.00962,.6435]],[`icc`,[.96422,.82521]]]);function wN(e){let t=Dve.get(String(e).toLowerCase());if(!t)throw Error(`unknown Lab illuminant `+e);CN.labWhitePoint=e,CN.Xn=t[0],CN.Zn=t[1]}function TN(){return CN.labWhitePoint}var EN=(...e)=>{e=oN(e,`lab`);let[t,n,r]=e,[i,a,o]=Ove(t,n,r),[s,c,l]=ON(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Ove=(e,t,n)=>{let{kE:r,kK:i,kKE:a,Xn:o,Yn:s,Zn:c}=CN,l=(e+16)/116,u=.002*t+l,d=l-.005*n,f=u*u*u,p=d*d*d,m=f>r?f:(116*u-16)/i,h=e>a?((e+16)/116)**3:e/i,g=p>r?p:(116*d-16)/i;return[m*o,h*s,g*c]},DN=e=>{let t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*t},ON=(e,t,n)=>{let{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:a,RefWhiteRGB:o,Xn:s,Yn:c,Zn:l}=CN,u=s*r.m00+c*r.m10+l*r.m20,d=s*r.m01+c*r.m11+l*r.m21,f=s*r.m02+c*r.m12+l*r.m22,p=o.X*r.m00+o.Y*r.m10+o.Z*r.m20,m=o.X*r.m01+o.Y*r.m11+o.Z*r.m21,h=o.X*r.m02+o.Y*r.m12+o.Z*r.m22,g=(e*r.m00+t*r.m10+n*r.m20)*(p/u),_=(e*r.m01+t*r.m11+n*r.m21)*(m/d),v=(e*r.m02+t*r.m12+n*r.m22)*(h/f),y=g*i.m00+_*i.m10+v*i.m20,b=g*i.m01+_*i.m11+v*i.m21,x=g*i.m02+_*i.m12+v*i.m22,S=DN(y*a.m00+b*a.m10+x*a.m20),C=DN(y*a.m01+b*a.m11+x*a.m21),w=DN(y*a.m02+b*a.m12+x*a.m22);return[S*255,C*255,w*255]},kN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=jN(t,n,r),[c,l,u]=kve(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function kve(e,t,n){let{Xn:r,Yn:i,Zn:a,kE:o,kK:s}=CN,c=e/r,l=t/i,u=n/a,d=c>o?c**(1/3):(s*c+16)/116,f=l>o?l**(1/3):(s*l+16)/116,p=u>o?u**(1/3):(s*u+16)/116;return[116*f-16,500*(d-f),200*(f-p)]}function AN(e){let t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:((e+.055)/1.055)**2.4)*t}var jN=(e,t,n)=>{e=AN(e/255),t=AN(t/255),n=AN(n/255);let{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:a,Xn:o,Yn:s,Zn:c,As:l,Bs:u,Cs:d}=CN,f=e*r.m00+t*r.m10+n*r.m20,p=e*r.m01+t*r.m11+n*r.m21,m=e*r.m02+t*r.m12+n*r.m22,h=o*i.m00+s*i.m10+c*i.m20,g=o*i.m01+s*i.m11+c*i.m21,_=o*i.m02+s*i.m12+c*i.m22,v=f*i.m00+p*i.m10+m*i.m20,y=f*i.m01+p*i.m11+m*i.m21,b=f*i.m02+p*i.m12+m*i.m22;return v*=h/l,y*=g/u,b*=_/d,f=v*a.m00+y*a.m10+b*a.m20,p=v*a.m01+y*a.m11+b*a.m21,m=v*a.m02+y*a.m12+b*a.m22,[f,p,m]};_N.prototype.lab=function(){return kN(this._rgb)},Object.assign(vN,{lab:(...e)=>new _N(...e,`lab`),getLabWhitePoint:TN,setLabWhitePoint:wN}),gN.format.lab=EN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`lab`),aN(e)===`array`&&e.length===3)return`lab`}}),_N.prototype.darken=function(e=1){let t=this,n=t.lab();return n[0]-=CN.Kn*e,new _N(n,`lab`).alpha(t.alpha(),!0)},_N.prototype.brighten=function(e=1){return this.darken(-e)},_N.prototype.darker=_N.prototype.darken,_N.prototype.brighter=_N.prototype.brighten,_N.prototype.get=function(e){let[t,n]=e.split(`.`),r=this[t]();if(n){let e=t.indexOf(n)-(t.substr(0,2)===`ok`?2:0);if(e>-1)return r[e];throw Error(`unknown channel ${n} in mode ${t}`)}return r};var{pow:Ave}=Math,jve=1e-7,Mve=20;_N.prototype.luminance=function(e,t=`rgb`){if(e!==void 0&&aN(e)===`number`){if(e===0)return new _N([0,0,0,this._rgb[3]],`rgb`);if(e===1)return new _N([255,255,255,this._rgb[3]],`rgb`);let n=this.luminance(),r=Mve,i=(n,a)=>{let o=n.interpolate(a,.5,t),s=o.luminance();return Math.abs(e-s)<jve||!r--?o:s>e?i(n,o):i(o,a)};return new _N([...(n>e?i(new _N([0,0,0]),this):i(this,new _N([255,255,255]))).rgb(),this._rgb[3]])}return Nve(...this._rgb.slice(0,3))};var Nve=(e,t,n)=>(e=MN(e),t=MN(t),n=MN(n),.2126*e+.7152*t+.0722*n),MN=e=>(e/=255,e<=.03928?e/12.92:Ave((e+.055)/1.055,2.4)),NN={},PN=(e,t,n=.5,...r)=>{let i=r[0]||`lrgb`;if(!NN[i]&&!r.length&&(i=Object.keys(NN)[0]),!NN[i])throw Error(`interpolation mode ${i} is not defined`);return aN(e)!==`object`&&(e=new _N(e)),aN(t)!==`object`&&(t=new _N(t)),NN[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};_N.prototype.mix=_N.prototype.interpolate=function(e,t=.5,...n){return PN(this,e,t,...n)},_N.prototype.premultiply=function(e=!1){let t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new _N([t[0]*n,t[1]*n,t[2]*n,n],`rgb`)};var{sin:Pve,cos:Fve}=Math,FN=(...e)=>{let[t,n,r]=oN(e,`lch`);return isNaN(r)&&(r=0),r*=Sve,[t,Fve(r)*n,Pve(r)*n]},IN=(...e)=>{e=oN(e,`lch`);let[t,n,r]=e,[i,a,o]=FN(t,n,r),[s,c,l]=EN(i,a,o);return[s,c,l,e.length>3?e[3]:1]},Ive=(...e)=>IN(...hN(oN(e,`hcl`))),{sqrt:Lve,atan2:Rve,round:zve}=Math,LN=(...e)=>{let[t,n,r]=oN(e,`lab`),i=Lve(n*n+r*r),a=(Rve(r,n)*Cve+360)%360;return zve(i*1e4)===0&&(a=NaN),[t,i,a]},RN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=kN(t,n,r),[c,l,u]=LN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};_N.prototype.lch=function(){return RN(this._rgb)},_N.prototype.hcl=function(){return hN(RN(this._rgb))},Object.assign(vN,{lch:(...e)=>new _N(...e,`lch`),hcl:(...e)=>new _N(...e,`hcl`)}),gN.format.lch=IN,gN.format.hcl=Ive,[`lch`,`hcl`].forEach(e=>gN.autodetect.push({p:2,test:(...t)=>{if(t=oN(t,e),aN(t)===`array`&&t.length===3)return e}})),_N.prototype.saturate=function(e=1){let t=this,n=t.lch();return n[1]+=CN.Kn*e,n[1]<0&&(n[1]=0),new _N(n,`lch`).alpha(t.alpha(),!0)},_N.prototype.desaturate=function(e=1){return this.saturate(-e)},_N.prototype.set=function(e,t,n=!1){let[r,i]=e.split(`.`),a=this[r]();if(i){let e=r.indexOf(i)-(r.substr(0,2)===`ok`?2:0);if(e>-1){if(aN(t)==`string`)switch(t.charAt(0)){case`+`:a[e]+=+t;break;case`-`:a[e]+=+t;break;case`*`:a[e]*=+t.substr(1);break;case`/`:a[e]/=+t.substr(1);break;default:a[e]=+t}else if(aN(t)===`number`)a[e]=t;else throw Error(`unsupported value for Color.set`);let i=new _N(a,r);return n?(this._rgb=i._rgb,this):i}throw Error(`unknown channel ${i} in mode ${r}`)}return a},_N.prototype.tint=function(e=.5,...t){return PN(this,`white`,e,...t)},_N.prototype.shade=function(e=.5,...t){return PN(this,`black`,e,...t)},NN.rgb=(e,t,n)=>{let r=e._rgb,i=t._rgb;return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`rgb`)};var{sqrt:zN,pow:BN}=Math;NN.lrgb=(e,t,n)=>{let[r,i,a]=e._rgb,[o,s,c]=t._rgb;return new _N(zN(BN(r,2)*(1-n)+BN(o,2)*n),zN(BN(i,2)*(1-n)+BN(s,2)*n),zN(BN(a,2)*(1-n)+BN(c,2)*n),`rgb`)},NN.lab=(e,t,n)=>{let r=e.lab(),i=t.lab();return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`lab`)};var VN=(e,t,n,r)=>{let i,a;r===`hsl`?(i=e.hsl(),a=t.hsl()):r===`hsv`?(i=e.hsv(),a=t.hsv()):r===`hcg`?(i=e.hcg(),a=t.hcg()):r===`hsi`?(i=e.hsi(),a=t.hsi()):r===`lch`||r===`hcl`?(r=`hcl`,i=e.hcl(),a=t.hcl()):r===`oklch`&&(i=e.oklch().reverse(),a=t.oklch().reverse());let o,s,c,l,u,d;(r.substr(0,1)===`h`||r===`oklch`)&&([o,c,u]=i,[s,l,d]=a);let f,p,m,h;return!isNaN(o)&&!isNaN(s)?(h=s>o&&s-o>180?s-(o+360):s<o&&o-s>180?s+360-o:s-o,p=o+n*h):isNaN(o)?isNaN(s)?p=NaN:(p=s,(u==1||u==0)&&r!=`hsv`&&(f=l)):(p=o,(d==1||d==0)&&r!=`hsv`&&(f=c)),f===void 0&&(f=c+n*(l-c)),m=u+n*(d-u),r===`oklch`?new _N([m,f,p],r):new _N([p,f,m],r)},HN=(e,t,n)=>VN(e,t,n,`lch`);NN.lch=HN,NN.hcl=HN;var Bve=e=>{if(aN(e)==`number`&&e>=0&&e<=16777215)return[e>>16,e>>8&255,e&255,1];throw Error(`unknown num color: `+e)},Vve=(...e)=>{let[t,n,r]=oN(e,`rgb`);return(t<<16)+(n<<8)+r};_N.prototype.num=function(){return Vve(this._rgb)},Object.assign(vN,{num:(...e)=>new _N(...e,`num`)}),gN.format.num=Bve,gN.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&aN(e[0])===`number`&&e[0]>=0&&e[0]<=16777215)return`num`}}),NN.num=(e,t,n)=>{let r=e.num();return new _N(r+n*(t.num()-r),`num`)};var{floor:Hve}=Math,Uve=(...e)=>{e=oN(e,`hcg`);let[t,n,r]=e,i,a,o;r*=255;let s=n*255;if(n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Hve(t),c=t-e,l=r*(1-n),u=l+s*(1-c),d=l+s*c,f=l+s;switch(e){case 0:[i,a,o]=[f,d,l];break;case 1:[i,a,o]=[u,f,l];break;case 2:[i,a,o]=[l,f,d];break;case 3:[i,a,o]=[l,u,f];break;case 4:[i,a,o]=[d,l,f];break;case 5:[i,a,o]=[f,l,u]}}return[i,a,o,e.length>3?e[3]:1]},Wve=(...e)=>{let[t,n,r]=oN(e,`rgb`),i=lN(t,n,r),a=uN(t,n,r),o=a-i,s=o*100/255,c=i/(255-o)*100,l;return o===0?l=NaN:(t===a&&(l=(n-r)/o),n===a&&(l=2+(r-t)/o),r===a&&(l=4+(t-n)/o),l*=60,l<0&&(l+=360)),[l,s,c]};_N.prototype.hcg=function(){return Wve(this._rgb)},vN.hcg=(...e)=>new _N(...e,`hcg`),gN.format.hcg=Uve,gN.autodetect.push({p:1,test:(...e)=>{if(e=oN(e,`hcg`),aN(e)===`array`&&e.length===3)return`hcg`}}),NN.hcg=(e,t,n)=>VN(e,t,n,`hcg`);var{cos:UN}=Math,Gve=(...e)=>{e=oN(e,`hsi`);let[t,n,r]=e,i,a,o;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(o=(1-n)/3,i=(1+n*UN(pN*t)/UN(mN-pN*t))/3,a=1-(o+i)):t<2/3?(t-=1/3,i=(1-n)/3,a=(1+n*UN(pN*t)/UN(mN-pN*t))/3,o=1-(i+a)):(t-=2/3,a=(1-n)/3,o=(1+n*UN(pN*t)/UN(mN-pN*t))/3,i=1-(a+o)),i=nN(r*i*3),a=nN(r*a*3),o=nN(r*o*3),[i*255,a*255,o*255,e.length>3?e[3]:1]},{min:Kve,sqrt:qve,acos:Jve}=Math,Yve=(...e)=>{let[t,n,r]=oN(e,`rgb`);t/=255,n/=255,r/=255;let i,a=Kve(t,n,r),o=(t+n+r)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(t-n+(t-r))/2,i/=qve((t-n)*(t-n)+(t-r)*(n-r)),i=Jve(i),r>n&&(i=pN-i),i/=pN),[i*360,s,o]};_N.prototype.hsi=function(){return Yve(this._rgb)},vN.hsi=(...e)=>new _N(...e,`hsi`),gN.format.hsi=Gve,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsi`),aN(e)===`array`&&e.length===3)return`hsi`}}),NN.hsi=(e,t,n)=>VN(e,t,n,`hsi`);var WN=(...e)=>{e=oN(e,`hsl`);let[t,n,r]=e,i,a,o;if(n===0)i=a=o=r*255;else{let e=[0,0,0],s=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,l=2*r-c,u=t/360;e[0]=u+1/3,e[1]=u,e[2]=u-1/3;for(let t=0;t<3;t++)e[t]<0&&(e[t]+=1),e[t]>1&&--e[t],6*e[t]<1?s[t]=l+(c-l)*6*e[t]:2*e[t]<1?s[t]=c:3*e[t]<2?s[t]=l+(c-l)*(2/3-e[t])*6:s[t]=l;[i,a,o]=[s[0]*255,s[1]*255,s[2]*255]}return e.length>3?[i,a,o,e[3]]:[i,a,o,1]},GN=(...e)=>{e=oN(e,`rgba`);let[t,n,r]=e;t/=255,n/=255,r/=255;let i=lN(t,n,r),a=uN(t,n,r),o=(a+i)/2,s,c;return a===i?(s=0,c=NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),t==a?c=(n-r)/(a-i):n==a?c=2+(r-t)/(a-i):r==a&&(c=4+(t-n)/(a-i)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,s,o,e[3]]:[c,s,o]};_N.prototype.hsl=function(){return GN(this._rgb)},vN.hsl=(...e)=>new _N(...e,`hsl`),gN.format.hsl=WN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsl`),aN(e)===`array`&&e.length===3)return`hsl`}}),NN.hsl=(e,t,n)=>VN(e,t,n,`hsl`);var{floor:Xve}=Math,Zve=(...e)=>{e=oN(e,`hsv`);let[t,n,r]=e,i,a,o;if(r*=255,n===0)i=a=o=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let e=Xve(t),s=t-e,c=r*(1-n),l=r*(1-n*s),u=r*(1-n*(1-s));switch(e){case 0:[i,a,o]=[r,u,c];break;case 1:[i,a,o]=[l,r,c];break;case 2:[i,a,o]=[c,r,u];break;case 3:[i,a,o]=[c,l,r];break;case 4:[i,a,o]=[u,c,r];break;case 5:[i,a,o]=[r,c,l]}}return[i,a,o,e.length>3?e[3]:1]},{min:Qve,max:$ve}=Math,eye=(...e)=>{e=oN(e,`rgb`);let[t,n,r]=e,i=Qve(t,n,r),a=$ve(t,n,r),o=a-i,s,c,l;return l=a/255,a===0?(s=NaN,c=0):(c=o/a,t===a&&(s=(n-r)/o),n===a&&(s=2+(r-t)/o),r===a&&(s=4+(t-n)/o),s*=60,s<0&&(s+=360)),[s,c,l]};_N.prototype.hsv=function(){return eye(this._rgb)},vN.hsv=(...e)=>new _N(...e,`hsv`),gN.format.hsv=Zve,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`hsv`),aN(e)===`array`&&e.length===3)return`hsv`}}),NN.hsv=(e,t,n)=>VN(e,t,n,`hsv`);function KN(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(e=>[e]));let r=t[0].length,i=t[0].map((e,n)=>t.map(e=>e[n])),a=e.map(e=>i.map(t=>Array.isArray(e)?e.reduce((e,n,r)=>e+n*(t[r]||0),0):t.reduce((t,n)=>t+n*e,0)));return n===1&&(a=a[0]),r===1?a.map(e=>e[0]):a}var qN=(...e)=>{e=oN(e,`lab`);let[t,n,r,...i]=e,[a,o,s]=tye([t,n,r]),[c,l,u]=ON(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function tye(e){return KN([[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],KN([[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],e).map(e=>e**3))}var JN=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`);return[...nye(jN(t,n,r)),...i.length>0&&i[0]<1?[i[0]]:[]]};function nye(e){return KN([[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],KN([[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e).map(e=>Math.cbrt(e)))}_N.prototype.oklab=function(){return JN(this._rgb)},Object.assign(vN,{oklab:(...e)=>new _N(...e,`oklab`)}),gN.format.oklab=qN,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`oklab`),aN(e)===`array`&&e.length===3)return`oklab`}}),NN.oklab=(e,t,n)=>{let r=e.oklab(),i=t.oklab();return new _N(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),`oklab`)},NN.oklch=(e,t,n)=>VN(e,t,n,`oklch`);var{pow:YN,sqrt:XN,PI:ZN,cos:QN,sin:$N,atan2:rye}=Math,iye=(e,t=`lrgb`,n=null)=>{let r=e.length;n||=Array.from(Array(r)).map(()=>1);let i=r/n.reduce(function(e,t){return e+t});if(n.forEach((e,t)=>{n[t]*=i}),e=e.map(e=>new _N(e)),t===`lrgb`)return aye(e,n);let a=e.shift(),o=a.get(t),s=[],c=0,l=0;for(let e=0;e<o.length;e++)if(o[e]=(o[e]||0)*n[0],s.push(isNaN(o[e])?0:n[0]),t.charAt(e)===`h`&&!isNaN(o[e])){let t=o[e]/180*ZN;c+=QN(t)*n[0],l+=$N(t)*n[0]}let u=a.alpha()*n[0];e.forEach((e,r)=>{let i=e.get(t);u+=e.alpha()*n[r+1];for(let e=0;e<o.length;e++)if(!isNaN(i[e])){if(s[e]+=n[r+1],t.charAt(e)===`h`){let t=i[e]/180*ZN;c+=QN(t)*n[r+1],l+=$N(t)*n[r+1]}else o[e]+=i[e]*n[r+1]}});for(let e=0;e<o.length;e++)if(t.charAt(e)===`h`){let t=rye(l/s[e],c/s[e])/ZN*180;for(;t<0;)t+=360;for(;t>=360;)t-=360;o[e]=t}else o[e]=o[e]/s[e];return u/=r,new _N(o,t).alpha(u>.99999?1:u,!0)},aye=(e,t)=>{let n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){let a=e[i],o=t[i]/n,s=a._rgb;r[0]+=YN(s[0],2)*o,r[1]+=YN(s[1],2)*o,r[2]+=YN(s[2],2)*o,r[3]+=s[3]*o}return r[0]=XN(r[0]),r[1]=XN(r[1]),r[2]=XN(r[2]),r[3]>.9999999&&(r[3]=1),new _N(rN(r))},{pow:oye}=Math;function eP(e){let t=`rgb`,n=vN(`#ccc`),r=0,i=[0,1],a=[0,1],o=[],s=[0,0],c=!1,l=[],u=!1,d=0,f=1,p=!1,m={},h=!0,g=1,_=function(e){if(e||=[`#fff`,`#000`],e&&aN(e)===`string`&&vN.brewer&&vN.brewer[e.toLowerCase()]&&(e=vN.brewer[e.toLowerCase()]),aN(e)===`array`){e.length===1&&(e=[e[0],e[0]]),e=e.slice(0);for(let t=0;t<e.length;t++)e[t]=vN(e[t]);o.length=0;for(let t=0;t<e.length;t++)o.push(t/(e.length-1))}return S(),l=e},v=function(e){if(c!=null){let t=c.length-1,n=0;for(;n<t&&e>=c[n];)n++;return n-1}return 0},y=e=>e,b=e=>e,x=function(e,r){let i,a;if(r??=!1,isNaN(e)||e===null)return n;a=r?e:c&&c.length>2?v(e)/(c.length-2):f===d?1:(e-d)/(f-d),a=b(a),r||(a=y(a)),g!==1&&(a=oye(a,g)),a=s[0]+a*(1-s[0]-s[1]),a=nN(a,0,1);let u=Math.floor(a*1e4);if(h&&m[u])i=m[u];else{if(aN(l)===`array`)for(let e=0;e<o.length;e++){let n=o[e];if(a<=n){i=l[e];break}if(a>=n&&e===o.length-1){i=l[e];break}if(a>n&&a<o[e+1]){a=(a-n)/(o[e+1]-n),i=vN.interpolate(l[e],l[e+1],a,t);break}}else aN(l)===`function`&&(i=l(a));h&&(m[u]=i)}return i};var S=()=>m={};_(e);let C=function(e){let t=vN(x(e));return u&&t[u]?t[u]():t};return C.classes=function(e){if(e!=null){if(aN(e)===`array`)c=e,i=[e[0],e[e.length-1]];else{let t=vN.analyze(i);c=e===0?[t.min,t.max]:vN.limits(t,`e`,e)}return C}return c},C.domain=function(e){if(!arguments.length)return a;a=e.slice(0),d=e[0],f=e[e.length-1],o=[];let t=l.length;if(e.length===t&&d!==f)for(let t of Array.from(e))o.push((t-d)/(f-d));else{for(let e=0;e<t;e++)o.push(e/(t-1));if(e.length>2){let t=e.map((t,n)=>n/(e.length-1)),n=e.map(e=>(e-d)/(f-d));n.every((e,n)=>t[n]===e)||(b=e=>{if(e<=0||e>=1)return e;let r=0;for(;e>=n[r+1];)r++;let i=(e-n[r])/(n[r+1]-n[r]);return t[r]+i*(t[r+1]-t[r])})}}return i=[d,f],C},C.mode=function(e){return arguments.length?(t=e,S(),C):t},C.range=function(e,t){return _(e,t),C},C.out=function(e){return u=e,C},C.spread=function(e){return arguments.length?(r=e,C):r},C.correctLightness=function(e){return e??=!0,p=e,S(),y=p?function(e){let t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],r=t>n,i=x(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;for(;Math.abs(o)>.01&&l-->0;)(function(){return r&&(o*=-1),o<0?(s=e,e+=(c-e)*.5):(c=e,e+=(s-e)*.5),i=x(e,!0).lab()[0],o=i-a})();return e}:e=>e,C},C.padding=function(e){return e==null?s:(aN(e)===`number`&&(e=[e,e]),s=e,C)},C.colors=function(t,n){arguments.length<2&&(n=`hex`);let r=[];if(arguments.length===0)r=l.slice(0);else if(t===1)r=[C(.5)];else if(t>1){let e=i[0],n=i[1]-e;r=sye(0,t,!1).map(r=>C(e+r/(t-1)*n))}else{e=[];let t=[];if(c&&c.length>2)for(let e=1,n=c.length,r=1<=n;r?e<n:e>n;r?e++:e--)t.push((c[e-1]+c[e])*.5);else t=i;r=t.map(e=>C(e))}return vN[n]&&(r=r.map(e=>e[n]())),r},C.cache=function(e){return e==null?h:(h=e,C)},C.gamma=function(e){return e==null?g:(g=e,C)},C.nodata=function(e){return e==null?n:(n=vN(e),C)},C}function sye(e,t,n){let r=[],i=e<t,a=n?i?t+1:t-1:t;for(let t=e;i?t<a:t>a;i?t++:t--)r.push(t);return r}var cye=function(e){let t=[1,1];for(let n=1;n<e;n++){let e=[1];for(let n=1;n<=t.length;n++)e[n]=(t[n]||0)+t[n-1];t=e}return t},lye=function(e){let t,n,r,i;if(e=e.map(e=>new _N(e)),e.length===2)[n,r]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>n[t]+e*(r[t]-n[t])),`lab`)};else if(e.length===3)[n,r,i]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>(1-e)*(1-e)*n[t]+2*(1-e)*e*r[t]+e*e*i[t]),`lab`)};else if(e.length===4){let a;[n,r,i,a]=e.map(e=>e.lab()),t=function(e){return new _N([0,1,2].map(t=>(1-e)*(1-e)*(1-e)*n[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*i[t]+e*e*e*a[t]),`lab`)}}else if(e.length>=5){let n,r,i;n=e.map(e=>e.lab()),i=e.length-1,r=cye(i),t=function(e){let t=1-e;return new _N([0,1,2].map(a=>n.reduce((n,o,s)=>n+r[s]*t**(i-s)*e**s*o[a],0)),`lab`)}}else throw RangeError(`No point in running bezier with only one color.`);return t},uye=e=>{let t=lye(e);return t.scale=()=>eP(t),t},{round:tP}=Math;_N.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(tP)},_N.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:tP(t):t)},Object.assign(vN,{rgb:(...e)=>new _N(...e,`rgb`)}),gN.format.rgb=(...e)=>{let t=oN(e,`rgba`);return t[3]===void 0&&(t[3]=1),t},gN.autodetect.push({p:3,test:(...e)=>{if(e=oN(e,`rgba`),aN(e)===`array`&&(e.length===3||e.length===4&&aN(e[3])==`number`&&e[3]>=0&&e[3]<=1))return`rgb`}});var nP=(e,t,n)=>{if(!nP[n])throw Error(`unknown blend mode `+n);return nP[n](e,t)},rP=e=>(t,n)=>{let r=vN(n).rgb(),i=vN(t).rgb();return vN.rgb(e(r,i))},iP=e=>(t,n)=>{let r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r};nP.normal=rP(iP(e=>e)),nP.multiply=rP(iP((e,t)=>e*t/255)),nP.screen=rP(iP((e,t)=>255*(1-(1-e/255)*(1-t/255)))),nP.overlay=rP(iP((e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)))),nP.darken=rP(iP((e,t)=>e>t?t:e)),nP.lighten=rP(iP((e,t)=>e>t?e:t)),nP.dodge=rP(iP((e,t)=>e===255?255:(e=t/255*255/(1-e/255),e>255?255:e))),nP.burn=rP(iP((e,t)=>255*(1-(1-t/255)/(e/255))));var{pow:dye,sin:fye,cos:pye}=Math;function mye(e=300,t=-1.5,n=1,r=1,i=[0,1]){let a=0,o;aN(i)===`array`?o=i[1]-i[0]:(o=0,i=[i,i]);let s=function(s){let c=pN*((e+120)/360+t*s),l=dye(i[0]+o*s,r),u=(a===0?n:n[0]+s*a)*l*(1-l)/2,d=pye(c),f=fye(c),p=l+u*(-.14861*d+1.78277*f),m=l+u*(-.29227*d-.90649*f),h=l+1.97294*d*u;return vN(rN([p*255,m*255,h*255,1]))};return s.start=function(t){return t==null?e:(e=t,s)},s.rotations=function(e){return e==null?t:(t=e,s)},s.gamma=function(e){return e==null?r:(r=e,s)},s.hue=function(e){return e==null?n:(n=e,aN(n)===`array`?(a=n[1]-n[0],a===0&&(n=n[1])):a=0,s)},s.lightness=function(e){return e==null?i:(aN(e)===`array`?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=()=>vN.scale(s),s.hue(n),s}var hye=`0123456789abcdef`,{floor:gye,random:_ye}=Math,vye=(e=_ye)=>{let t=`#`;for(let n=0;n<6;n++)t+=hye.charAt(gye(e()*16));return new _N(t,`hex`)},{log:aP,pow:yye,floor:bye,abs:xye}=Math;function oP(e,t=null){let n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return aN(e)===`object`&&(e=Object.values(e)),e.forEach(e=>{t&&aN(e)===`object`&&(e=e[t]),e!=null&&!isNaN(e)&&(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(e,t)=>sP(n,e,t),n}function sP(e,t=`equal`,n=7){aN(e)==`array`&&(e=oP(e));let{min:r,max:i}=e,a=e.values.sort((e,t)=>e-t);if(n===1)return[r,i];let o=[];if(t.substr(0,1)===`c`&&(o.push(r),o.push(i)),t.substr(0,1)===`e`){o.push(r);for(let e=1;e<n;e++)o.push(r+e/n*(i-r));o.push(i)}else if(t.substr(0,1)===`l`){if(r<=0)throw Error(`Logarithmic scales are only possible for values > 0`);let e=Math.LOG10E*aP(r),t=Math.LOG10E*aP(i);o.push(r);for(let r=1;r<n;r++)o.push(yye(10,e+r/n*(t-e)));o.push(i)}else if(t.substr(0,1)===`q`){o.push(r);for(let e=1;e<n;e++){let t=(a.length-1)*e/n,r=bye(t);if(r===t)o.push(a[r]);else{let e=t-r;o.push(a[r]*(1-e)+a[r+1]*e)}}o.push(i)}else if(t.substr(0,1)===`k`){let e,t=a.length,s=Array(t),c=Array(n),l=!0,u=0,d=null;d=[],d.push(r);for(let e=1;e<n;e++)d.push(r+e/n*(i-r));for(d.push(i);l;){for(let e=0;e<n;e++)c[e]=0;for(let e=0;e<t;e++){let t=a[e],r=Number.MAX_VALUE,i;for(let a=0;a<n;a++){let n=xye(d[a]-t);n<r&&(r=n,i=a),c[i]++,s[e]=i}}let r=Array(n);for(let e=0;e<n;e++)r[e]=null;for(let n=0;n<t;n++)e=s[n],r[e]===null?r[e]=a[n]:r[e]+=a[n];for(let e=0;e<n;e++)r[e]*=1/c[e];l=!1;for(let e=0;e<n;e++)if(r[e]!==d[e]){l=!0;break}d=r,u++,u>200&&(l=!1)}let f={};for(let e=0;e<n;e++)f[e]=[];for(let n=0;n<t;n++)e=s[n],f[e].push(a[n]);let p=[];for(let e=0;e<n;e++)p.push(f[e][0]),p.push(f[e][f[e].length-1]);p=p.sort((e,t)=>e-t),o.push(p[0]);for(let e=1;e<p.length;e+=2){let t=p[e];!isNaN(t)&&o.indexOf(t)===-1&&o.push(t)}}return o}var Sye=(e,t)=>{e=new _N(e),t=new _N(t);let n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},cP=.027,Cye=5e-4,wye=.1,lP=1.14,uP=.022,dP=1.414,Tye=(e,t)=>{e=new _N(e),t=new _N(t),e.alpha()<1&&(e=PN(t,e,e.alpha(),`rgb`));let n=fP(...e.rgb()),r=fP(...t.rgb()),i=n>=uP?n:n+(uP-n)**+dP,a=r>=uP?r:r+(uP-r)**+dP,o=a**.56-i**.57,s=a**.65-i**.62,c=Math.abs(a-i)<Cye?0:i<a?o*lP:s*lP;return(Math.abs(c)<wye?0:c>0?c-cP:c+cP)*100};function fP(e,t,n){return .2126729*(e/255)**2.4+.7151522*(t/255)**2.4+.072175*(n/255)**2.4}var{sqrt:pP,pow:mP,min:Eye,max:Dye,atan2:hP,abs:gP,cos:_P,sin:vP,exp:Oye,PI:yP}=Math;function kye(e,t,n=1,r=1,i=1){var a=function(e){return 360*e/(2*yP)},o=function(e){return 2*yP*e/360};e=new _N(e),t=new _N(t);let[s,c,l]=Array.from(e.lab()),[u,d,f]=Array.from(t.lab()),p=(s+u)/2,m=(pP(mP(c,2)+mP(l,2))+pP(mP(d,2)+mP(f,2)))/2,h=.5*(1-pP(mP(m,7)/(mP(m,7)+mP(25,7)))),g=c*(1+h),_=d*(1+h),v=pP(mP(g,2)+mP(l,2)),y=pP(mP(_,2)+mP(f,2)),b=(v+y)/2,x=a(hP(l,g)),S=a(hP(f,_)),C=x>=0?x:x+360,w=S>=0?S:S+360,T=gP(C-w)>180?(C+w+360)/2:(C+w)/2,E=1-.17*_P(o(T-30))+.24*_P(o(2*T))+.32*_P(o(3*T+6))-.2*_P(o(4*T-63)),D=w-C;D=gP(D)<=180?D:w<=C?D+360:D-360,D=2*pP(v*y)*vP(o(D)/2);let O=u-s,k=y-v,A=1+.015*mP(p-50,2)/pP(20+mP(p-50,2)),j=1+.045*b,M=1+.015*b*E,N=30*Oye(-mP((T-275)/25,2)),P=-(2*pP(mP(b,7)/(mP(b,7)+mP(25,7))))*vP(2*o(N));return Dye(0,Eye(100,pP(mP(O/(n*A),2)+mP(k/(r*j),2)+mP(D/(i*M),2)+P*(k/(r*j))*(D/(i*M)))))}function Aye(e,t,n=`lab`){e=new _N(e),t=new _N(t);let r=e.get(n),i=t.get(n),a=0;for(let e in r){let t=(r[e]||0)-(i[e]||0);a+=t*t}return Math.sqrt(a)}var jye=(...e)=>{try{return new _N(...e),!0}catch{return!1}},Mye={cool(){return eP([vN.hsl(180,1,.9),vN.hsl(250,.7,.4)])},hot(){return eP([`#000`,`#f00`,`#ff0`,`#fff`],[0,.25,.75,1]).mode(`rgb`)}},bP={OrRd:[`#fff7ec`,`#fee8c8`,`#fdd49e`,`#fdbb84`,`#fc8d59`,`#ef6548`,`#d7301f`,`#b30000`,`#7f0000`],PuBu:[`#fff7fb`,`#ece7f2`,`#d0d1e6`,`#a6bddb`,`#74a9cf`,`#3690c0`,`#0570b0`,`#045a8d`,`#023858`],BuPu:[`#f7fcfd`,`#e0ecf4`,`#bfd3e6`,`#9ebcda`,`#8c96c6`,`#8c6bb1`,`#88419d`,`#810f7c`,`#4d004b`],Oranges:[`#fff5eb`,`#fee6ce`,`#fdd0a2`,`#fdae6b`,`#fd8d3c`,`#f16913`,`#d94801`,`#a63603`,`#7f2704`],BuGn:[`#f7fcfd`,`#e5f5f9`,`#ccece6`,`#99d8c9`,`#66c2a4`,`#41ae76`,`#238b45`,`#006d2c`,`#00441b`],YlOrBr:[`#ffffe5`,`#fff7bc`,`#fee391`,`#fec44f`,`#fe9929`,`#ec7014`,`#cc4c02`,`#993404`,`#662506`],YlGn:[`#ffffe5`,`#f7fcb9`,`#d9f0a3`,`#addd8e`,`#78c679`,`#41ab5d`,`#238443`,`#006837`,`#004529`],Reds:[`#fff5f0`,`#fee0d2`,`#fcbba1`,`#fc9272`,`#fb6a4a`,`#ef3b2c`,`#cb181d`,`#a50f15`,`#67000d`],RdPu:[`#fff7f3`,`#fde0dd`,`#fcc5c0`,`#fa9fb5`,`#f768a1`,`#dd3497`,`#ae017e`,`#7a0177`,`#49006a`],Greens:[`#f7fcf5`,`#e5f5e0`,`#c7e9c0`,`#a1d99b`,`#74c476`,`#41ab5d`,`#238b45`,`#006d2c`,`#00441b`],YlGnBu:[`#ffffd9`,`#edf8b1`,`#c7e9b4`,`#7fcdbb`,`#41b6c4`,`#1d91c0`,`#225ea8`,`#253494`,`#081d58`],Purples:[`#fcfbfd`,`#efedf5`,`#dadaeb`,`#bcbddc`,`#9e9ac8`,`#807dba`,`#6a51a3`,`#54278f`,`#3f007d`],GnBu:[`#f7fcf0`,`#e0f3db`,`#ccebc5`,`#a8ddb5`,`#7bccc4`,`#4eb3d3`,`#2b8cbe`,`#0868ac`,`#084081`],Greys:[`#ffffff`,`#f0f0f0`,`#d9d9d9`,`#bdbdbd`,`#969696`,`#737373`,`#525252`,`#252525`,`#000000`],YlOrRd:[`#ffffcc`,`#ffeda0`,`#fed976`,`#feb24c`,`#fd8d3c`,`#fc4e2a`,`#e31a1c`,`#bd0026`,`#800026`],PuRd:[`#f7f4f9`,`#e7e1ef`,`#d4b9da`,`#c994c7`,`#df65b0`,`#e7298a`,`#ce1256`,`#980043`,`#67001f`],Blues:[`#f7fbff`,`#deebf7`,`#c6dbef`,`#9ecae1`,`#6baed6`,`#4292c6`,`#2171b5`,`#08519c`,`#08306b`],PuBuGn:[`#fff7fb`,`#ece2f0`,`#d0d1e6`,`#a6bddb`,`#67a9cf`,`#3690c0`,`#02818a`,`#016c59`,`#014636`],Viridis:[`#440154`,`#482777`,`#3f4a8a`,`#31678e`,`#26838f`,`#1f9d8a`,`#6cce5a`,`#b6de2b`,`#fee825`],Spectral:[`#9e0142`,`#d53e4f`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#e6f598`,`#abdda4`,`#66c2a5`,`#3288bd`,`#5e4fa2`],RdYlGn:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee08b`,`#ffffbf`,`#d9ef8b`,`#a6d96a`,`#66bd63`,`#1a9850`,`#006837`],RdBu:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#f7f7f7`,`#d1e5f0`,`#92c5de`,`#4393c3`,`#2166ac`,`#053061`],PiYG:[`#8e0152`,`#c51b7d`,`#de77ae`,`#f1b6da`,`#fde0ef`,`#f7f7f7`,`#e6f5d0`,`#b8e186`,`#7fbc41`,`#4d9221`,`#276419`],PRGn:[`#40004b`,`#762a83`,`#9970ab`,`#c2a5cf`,`#e7d4e8`,`#f7f7f7`,`#d9f0d3`,`#a6dba0`,`#5aae61`,`#1b7837`,`#00441b`],RdYlBu:[`#a50026`,`#d73027`,`#f46d43`,`#fdae61`,`#fee090`,`#ffffbf`,`#e0f3f8`,`#abd9e9`,`#74add1`,`#4575b4`,`#313695`],BrBG:[`#543005`,`#8c510a`,`#bf812d`,`#dfc27d`,`#f6e8c3`,`#f5f5f5`,`#c7eae5`,`#80cdc1`,`#35978f`,`#01665e`,`#003c30`],RdGy:[`#67001f`,`#b2182b`,`#d6604d`,`#f4a582`,`#fddbc7`,`#ffffff`,`#e0e0e0`,`#bababa`,`#878787`,`#4d4d4d`,`#1a1a1a`],PuOr:[`#7f3b08`,`#b35806`,`#e08214`,`#fdb863`,`#fee0b6`,`#f7f7f7`,`#d8daeb`,`#b2abd2`,`#8073ac`,`#542788`,`#2d004b`],Set2:[`#66c2a5`,`#fc8d62`,`#8da0cb`,`#e78ac3`,`#a6d854`,`#ffd92f`,`#e5c494`,`#b3b3b3`],Accent:[`#7fc97f`,`#beaed4`,`#fdc086`,`#ffff99`,`#386cb0`,`#f0027f`,`#bf5b17`,`#666666`],Set1:[`#e41a1c`,`#377eb8`,`#4daf4a`,`#984ea3`,`#ff7f00`,`#ffff33`,`#a65628`,`#f781bf`,`#999999`],Set3:[`#8dd3c7`,`#ffffb3`,`#bebada`,`#fb8072`,`#80b1d3`,`#fdb462`,`#b3de69`,`#fccde5`,`#d9d9d9`,`#bc80bd`,`#ccebc5`,`#ffed6f`],Dark2:[`#1b9e77`,`#d95f02`,`#7570b3`,`#e7298a`,`#66a61e`,`#e6ab02`,`#a6761d`,`#666666`],Paired:[`#a6cee3`,`#1f78b4`,`#b2df8a`,`#33a02c`,`#fb9a99`,`#e31a1c`,`#fdbf6f`,`#ff7f00`,`#cab2d6`,`#6a3d9a`,`#ffff99`,`#b15928`],Pastel2:[`#b3e2cd`,`#fdcdac`,`#cbd5e8`,`#f4cae4`,`#e6f5c9`,`#fff2ae`,`#f1e2cc`,`#cccccc`],Pastel1:[`#fbb4ae`,`#b3cde3`,`#ccebc5`,`#decbe4`,`#fed9a6`,`#ffffcc`,`#e5d8bd`,`#fddaec`,`#f2f2f2`]},xP=Object.keys(bP),SP=new Map(xP.map(e=>[e.toLowerCase(),e])),Nye=typeof Proxy==`function`?new Proxy(bP,{get(e,t){let n=t.toLowerCase();if(SP.has(n))return e[SP.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(xP)}}):bP,Pye=(...e)=>{e=oN(e,`cmyk`);let[t,n,r,i]=e,a=e.length>4?e[4]:1;return i===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),a]},{max:CP}=Math,Fye=(...e)=>{let[t,n,r]=oN(e,`rgb`);t/=255,n/=255,r/=255;let i=1-CP(t,CP(n,r)),a=i<1?1/(1-i):0;return[(1-t-i)*a,(1-n-i)*a,(1-r-i)*a,i]};_N.prototype.cmyk=function(){return Fye(this._rgb)},Object.assign(vN,{cmyk:(...e)=>new _N(...e,`cmyk`)}),gN.format.cmyk=Pye,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`cmyk`),aN(e)===`array`&&e.length===4)return`cmyk`}});var Iye=(...e)=>{let t=oN(e,`hsla`),n=sN(e)||`lsa`;return t[0]=dN(t[0]||0)+`deg`,t[1]=dN(t[1]*100)+`%`,t[2]=dN(t[2]*100)+`%`,n===`hsla`||t.length>3&&t[3]<1?(t[3]=`/ `+(t.length>3?t[3]:1),n=`hsla`):t.length=3,`${n.substr(0,3)}(${t.join(` `)})`},Lye=(...e)=>{let t=oN(e,`lab`),n=sN(e)||`lab`;return t[0]=dN(t[0])+`%`,t[1]=dN(t[1]),t[2]=dN(t[2]),n===`laba`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(` `)})`},Rye=(...e)=>{let t=oN(e,`lch`),n=sN(e)||`lab`;return t[0]=dN(t[0])+`%`,t[1]=dN(t[1]),t[2]=isNaN(t[2])?`none`:dN(t[2])+`deg`,n===`lcha`||t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(` `)})`},zye=(...e)=>{let t=oN(e,`lab`);return t[0]=dN(t[0]*100)+`%`,t[1]=fN(t[1]),t[2]=fN(t[2]),t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(` `)})`},wP=(...e)=>{let[t,n,r,...i]=oN(e,`rgb`),[a,o,s]=JN(t,n,r),[c,l,u]=LN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Bye=(...e)=>{let t=oN(e,`lch`);return t[0]=dN(t[0]*100)+`%`,t[1]=fN(t[1]),t[2]=isNaN(t[2])?`none`:dN(t[2])+`deg`,t.length>3&&t[3]<1?t[3]=`/ `+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(` `)})`},{round:TP}=Math,Vye=(...e)=>{let t=oN(e,`rgba`),n=sN(e)||`rgb`;if(n.substr(0,3)===`hsl`)return Iye(GN(t),n);if(n.substr(0,3)===`lab`){let e=TN();wN(`d50`);let r=Lye(kN(t),n);return wN(e),r}if(n.substr(0,3)===`lch`){let e=TN();wN(`d50`);let r=Rye(RN(t),n);return wN(e),r}return n.substr(0,5)===`oklab`?zye(JN(t)):n.substr(0,5)===`oklch`?Bye(wP(t)):(t[0]=TP(t[0]),t[1]=TP(t[1]),t[2]=TP(t[2]),(n===`rgba`||t.length>3&&t[3]<1)&&(t[3]=`/ `+(t.length>3?t[3]:1),n=`rgba`),`${n.substr(0,3)}(${t.slice(0,n===`rgb`?3:4).join(` `)})`)},EP=(...e)=>{e=oN(e,`lch`);let[t,n,r,...i]=e,[a,o,s]=FN(t,n,r),[c,l,u]=qN(a,o,s);return[c,l,u,...i.length>0&&i[0]<1?[i[0]]:[]]},DP=`((?:-?\\d+)|(?:-?\\d+(?:\\.\\d+)?)%|none)`,OP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%?)|none)`,kP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)%)|none)`,AP=`\\s*`,jP=`\\s+`,MP=`\\s*,\\s*`,NP=`((?:-?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:deg)?)|none)`,PP=`\\s*(?:\\/\\s*((?:[01]|[01]?\\.\\d+)|\\d+(?:\\.\\d+)?%))?`,FP=RegExp(`^rgba?\\(`+AP+[DP,DP,DP].join(jP)+PP+`\\)$`),IP=RegExp(`^rgb\\(`+AP+[DP,DP,DP].join(MP)+AP+`\\)$`),LP=RegExp(`^rgba\\(`+AP+[DP,DP,DP,OP].join(MP)+AP+`\\)$`),RP=RegExp(`^hsla?\\(`+AP+[NP,kP,kP].join(jP)+PP+`\\)$`),zP=RegExp(`^hsl?\\(`+AP+[NP,kP,kP].join(MP)+AP+`\\)$`),BP=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,VP=RegExp(`^lab\\(`+AP+[OP,OP,OP].join(jP)+PP+`\\)$`),HP=RegExp(`^lch\\(`+AP+[OP,OP,NP].join(jP)+PP+`\\)$`),UP=RegExp(`^oklab\\(`+AP+[OP,OP,OP].join(jP)+PP+`\\)$`),WP=RegExp(`^oklch\\(`+AP+[OP,OP,NP].join(jP)+PP+`\\)$`),{round:GP}=Math,KP=e=>e.map((e,t)=>t<=2?nN(GP(e),0,255):e),qP=(e,t=0,n=100,r=!1)=>(typeof e==`string`&&e.endsWith(`%`)&&(e=parseFloat(e.substring(0,e.length-1))/100,e=r?t+(e+1)*.5*(n-t):t+e*(n-t)),+e),JP=(e,t)=>e===`none`?t:e,YP=e=>{if(e=e.toLowerCase().trim(),e===`transparent`)return[0,0,0,0];let t;if(gN.format.named)try{return gN.format.named(e)}catch{}if((t=e.match(FP))||(t=e.match(IP))){let e=t.slice(1,4);for(let t=0;t<3;t++)e[t]=+qP(JP(e[t],0),0,255);e=KP(e);let n=t[4]===void 0?1:+qP(t[4],0,1);return e[3]=n,e}if(t=e.match(LP)){let e=t.slice(1,5);for(let t=0;t<4;t++)e[t]=+qP(e[t],0,255);return e}if((t=e.match(RP))||(t=e.match(zP))){let e=t.slice(1,4);e[0]=+JP(e[0].replace(`deg`,``),0),e[1]=qP(JP(e[1],0),0,100)*.01,e[2]=qP(JP(e[2],0),0,100)*.01;let n=KP(WN(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}if(t=e.match(BP)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let n=WN(e);for(let e=0;e<3;e++)n[e]=GP(n[e]);return n[3]=+t[4],n}if(t=e.match(VP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,100),e[1]=qP(JP(e[1],0),-125,125,!0),e[2]=qP(JP(e[2],0),-125,125,!0);let n=TN();wN(`d50`);let r=KP(EN(e));return wN(n),r[3]=t[4]===void 0?1:+qP(t[4],0,1),r}if(t=e.match(HP)){let e=t.slice(1,4);e[0]=qP(e[0],0,100),e[1]=qP(JP(e[1],0),0,150,!1),e[2]=+JP(e[2].replace(`deg`,``),0);let n=TN();wN(`d50`);let r=KP(IN(e));return wN(n),r[3]=t[4]===void 0?1:+qP(t[4],0,1),r}if(t=e.match(UP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,1),e[1]=qP(JP(e[1],0),-.4,.4,!0),e[2]=qP(JP(e[2],0),-.4,.4,!0);let n=KP(qN(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}if(t=e.match(WP)){let e=t.slice(1,4);e[0]=qP(JP(e[0],0),0,1),e[1]=qP(JP(e[1],0),0,.4,!1),e[2]=+JP(e[2].replace(`deg`,``),0);let n=KP(EP(e));return n[3]=t[4]===void 0?1:+qP(t[4],0,1),n}};YP.test=e=>FP.test(e)||RP.test(e)||VP.test(e)||HP.test(e)||UP.test(e)||WP.test(e)||IP.test(e)||LP.test(e)||zP.test(e)||BP.test(e)||e===`transparent`,_N.prototype.css=function(e){return Vye(this._rgb,e)},vN.css=(...e)=>new _N(...e,`css`),gN.format.css=YP,gN.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&YP.test(e))return`css`}}),gN.format.gl=(...e)=>{let t=oN(e,`rgba`);return t[0]*=255,t[1]*=255,t[2]*=255,t},vN.gl=(...e)=>new _N(...e,`gl`),_N.prototype.gl=function(){let e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},_N.prototype.hex=function(e){return SN(this._rgb,e)},vN.hex=(...e)=>new _N(...e,`hex`),gN.format.hex=bN,gN.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&aN(e)===`string`&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return`hex`}});var{log:XP}=Math,ZP=e=>{let t=e/100,n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*XP(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*XP(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*XP(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*XP(r),i=255),[n,r,i,1]},{round:Hye}=Math,Uye=(...e)=>{let t=oN(e,`rgb`),n=t[0],r=t[2],i=1e3,a=4e4,o;for(;a-i>.4;){o=(a+i)*.5;let e=ZP(o);e[2]/e[0]>=r/n?a=o:i=o}return Hye(o)};_N.prototype.temp=_N.prototype.kelvin=_N.prototype.temperature=function(){return Uye(this._rgb)};var QP=(...e)=>new _N(...e,`temp`);Object.assign(vN,{temp:QP,kelvin:QP,temperature:QP}),gN.format.temp=gN.format.kelvin=gN.format.temperature=ZP,_N.prototype.oklch=function(){return wP(this._rgb)},Object.assign(vN,{oklch:(...e)=>new _N(...e,`oklch`)}),gN.format.oklch=EP,gN.autodetect.push({p:2,test:(...e)=>{if(e=oN(e,`oklch`),aN(e)===`array`&&e.length===3)return`oklch`}}),Object.assign(vN,{analyze:oP,average:iye,bezier:uye,blend:nP,brewer:Nye,Color:_N,colors:yN,contrast:Sye,contrastAPCA:Tye,cubehelix:mye,deltaE:kye,distance:Aye,input:gN,interpolate:PN,limits:sP,mix:PN,random:vye,scale:eP,scales:Mye,valid:jye});var $P=vN,Wye=Jn(`flex flex-col space-y-sm`,{variants:{variant:{elevated:`rounded-xl bg-surface p-md shadow-2xs`,outline:`rounded-xl border border-border p-md`,ghost:``}},defaultVariants:{variant:`elevated`}}),Gye=Jn(`overflow-hidden border border-border hover:cursor-pointer focus:outline-2 focus:outline-offset-2`,{variants:{size:{small:`size-sm rounded-md`,medium:`size-md rounded-lg`,large:`size-lg rounded-xl`}},defaultVariants:{size:`medium`}}),eF=[{label:`RGB`,value:`rgb`,getValue:e=>e.rgb(),parseValue:e=>{let t=e.split(`,`).map(e=>parseInt(e.trim(),10));if(t.length===3&&t.every(e=>!isNaN(e)))return $P.rgb(t[0],t[1],t[2])}},{label:`CSS`,value:`css`,getValue:e=>e.css(),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HEX`,value:`hex`,getValue:e=>e.hex(`rgb`),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HSL`,value:`hsl`,getValue:e=>e.hsl(),parseValue:e=>{try{return $P(e)}catch{return}}},{label:`HSV`,value:`hsv`,getValue:e=>e.hsv(),parseValue:e=>{try{return $P(e)}catch{return}}}],tF=v.default.createContext(null),nF=(e,t)=>{try{return $P(typeof e==`string`?e.trim():e)}catch{return t}},Kye=(e,t)=>{switch(t.type){case`set_color`:{let[n,r,i]=t.color.hsv();return{...e,hue:n==null||Number.isNaN(n)?e.hue:n,saturation:i===0||r==null||Number.isNaN(r)?e.saturation:r,value:i,alpha:t.color.alpha()}}case`set_hue`:return{...e,hue:t.hue};case`set_saturation`:return{...e,saturation:t.saturation};case`set_value`:return{...e,value:t.value};case`set_saturation_value`:return{...e,saturation:t.saturation,value:t.value};case`set_alpha`:return{...e,alpha:t.alpha};case`set_lightness`:return{...e,value:t.lightness};case`set_value_type`:return{...e,valueType:t.valueType};case`set_palette`:return{...e,palette:t.palette};case`add_palette_color`:return{...e,palette:[...e.palette,t.color]};default:return e}},qye=({variant:e,color:t,defaultColor:r,palette:i,defaultPalette:a,onPaletteChange:o,paletteLimit:s,defaultValueType:c,onValueChange:l,className:u,children:d,ref:f,...p})=>{let[m,h]=v.default.useReducer(Kye,{controlledValue:t,defaultColor:r,defaultPalette:a},({controlledValue:e,defaultColor:t,defaultPalette:n})=>{let r=nF(e??t??`#ffffff`,$P(`#ffffff`)),[a,o,s]=r.hsv();return{hue:a==null||Number.isNaN(a)?0:a,saturation:o==null||Number.isNaN(o)?0:o,value:s,alpha:r.alpha(),valueType:eF.find(e=>e.value===c)??eF[0],palette:(i??n??[]).map(e=>$P(e))}}),{hue:g,saturation:_,value:y,alpha:b,valueType:x,palette:S}=m,C=v.default.useMemo(()=>$P.hsv(g,_,y).alpha(b),[g,_,y,b]),w=g,T=_,E=y,D=b,O=v.default.useRef(void 0);v.default.useEffect(()=>{if(t===void 0)return;let e=nF(t,C),n=e.hex(`rgba`);n!==O.current&&(O.current=n,n!==C.hex(`rgba`)&&h({type:`set_color`,color:e}))},[t,C]);let k=v.default.useRef(void 0);v.default.useEffect(()=>{if(i===void 0)return;let e=i.map(e=>$P(e)),t=e.map(e=>e.hex(`rgba`)).join(`|`);t!==k.current&&(k.current=t,h({type:`set_palette`,palette:e}))},[i]);let A=v.default.useCallback(e=>{h({type:`set_color`,color:e}),l?.(e)},[l]),j=v.default.useCallback(e=>{h({type:`set_hue`,hue:e}),l?.($P.hsv(e,T,E).alpha(D))},[D,T,E,l]),M=v.default.useCallback(e=>{h({type:`set_saturation`,saturation:e}),l?.($P.hsv(w,e,E).alpha(D))},[D,w,E,l]),N=v.default.useCallback(e=>{h({type:`set_value`,value:e}),l?.($P.hsv(w,T,e).alpha(D))},[D,w,T,l]),P=v.default.useCallback((e,t)=>{h({type:`set_saturation_value`,saturation:e,value:t}),l?.($P.hsv(w,e,t).alpha(D))},[D,w,l]),F=v.default.useCallback(e=>A(C.alpha(e)),[C,A]),I=v.default.useCallback(e=>A(C.set(`hsl.l`,e)),[C,A]),L=v.default.useCallback(e=>h({type:`set_value_type`,valueType:e}),[]),R=v.default.useCallback(e=>{k.current=e.map(e=>e.hex(`rgba`)).join(`|`),h({type:`set_palette`,palette:e}),o?.(e.map(e=>e.hex()))},[o]),z=v.default.useCallback(e=>{if(s&&S.length>=s)return;let t=[...S,e];k.current=t.map(e=>e.hex(`rgba`)).join(`|`),h({type:`add_palette_color`,color:e}),o?.(t.map(e=>e.hex()))},[S,s,o]);return(0,n.jsx)(tF.Provider,{value:{color:C,setColor:A,hue:w,saturation:T,value:E,alpha:D,setHue:j,setSaturation:M,setValue:N,setSaturationValue:P,setAlpha:F,setLightness:I,valueType:x,setValueType:L,palette:S,setPalette:R,addPaletteColor:z,paletteLimit:s},children:(0,n.jsx)(`div`,{className:Y(Wye({variant:e}),u),ref:f,...p,children:d})})},rF=()=>{let e=v.default.useContext(tF);if(!e)throw Error(`useColorPicker must be used within a ColorPicker`);return e},Jye=({className:e,ref:t,...r})=>{let{color:i,hue:a,saturation:o,value:s,setSaturationValue:c}=rF(),l=$P.hsv(a,1,1).hex(),u=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(Math.max((e.clientX-t.left)/t.width,0),1),r=Math.min(Math.max(1-(e.clientY-t.top)/t.height,0),1);c(n,r)},d=e=>{e.currentTarget.setPointerCapture(e.pointerId),u(e)};return(0,n.jsx)(`div`,{...r,ref:t,className:Y(`relative aspect-square grow touch-none rounded-lg active:cursor-grabbing`,e),style:{background:`
|
|
52
52
|
linear-gradient(to top, black, transparent),
|
|
53
53
|
linear-gradient(to right, white, ${l})
|
|
54
|
-
`,...r.style},onPointerDown:d,onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&u(e)},children:(0,n.jsx)(`div`,{className:`pointer-events-none absolute size-md -translate-x-1/2 -translate-y-1/2 rounded-full border-3 border-white`,style:{left:`${o*100}%`,top:`${(1-s)*100}%`,backgroundColor:i.hex()}})})},Yye=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-sm`,e),ref:r,...i,children:t}),Xye=()=>Array.from({length:361},(e,t)=>$P.hsl(t,1,.5).hex()),Zye=e=>Array.from({length:101},(t,n)=>$P(e).alpha(n/100).css()),Qye=e=>Array.from({length:101},(t,n)=>$P(e).set(`hsl.l`,n/100).css()),$ye=({className:e,ref:t,...r})=>{let{hue:i,setHue:a}=rF(),o=e=>{a(Array.isArray(e)?e[0]:e)};return(0,n.jsx)(tN,{...r,min:0,max:360,value:i,onValueChange:o,trackStyle:Xye(),className:Y(``,e),ref:t})},iF=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`div`,{className:Y(Zv({variant:e,size:t}),r),ref:a,...o,children:i}),ebe=Jn(`inline-flex items-center gap-2xs text-on-surface-variant not-first:pl-2xs group-aria-invalid:text-error-on-container`,{variants:{size:{small:`style-text-default--1 [&>svg]:size-xs`,medium:`style-text-default-0 [&>svg]:size-sm`,large:`style-text-default-1 [&>svg]:size-md`}},defaultVariants:{size:`medium`}}),aF=({size:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(ebe({size:e}),t),ref:i,...a,children:r}),oF=({size:e=`medium`,className:t,ref:r,...i})=>{let a=(0,v.useRef)(null),[o,s]=(0,v.useState)(i.defaultValue||i.value||`#000000`);if(i.type===`color`){let c=i.value!==void 0,l=(c?i.value:o)||`#000000`,{onChange:u,defaultValue:d,value:f,...p}=i;return(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative flex size-full items-center justify-start hover:cursor-pointer`,t),disabled:i.disabled,onClick:()=>a.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`absolute top-1/2 left-0 aspect-square h-7/12 -translate-y-1/2`,e===`small`&&`rounded-md`,e===`medium`&&`rounded-lg`,e===`large`&&`rounded-xl`),style:{backgroundColor:l}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:c?void 0:l,onChange:e=>{c||s(e.currentTarget.value),u?.(e)},ref:e=>{if(a.current=e,typeof r==`function`){r(e);return}r&&typeof r==`object`&&(r.current=e)},type:`color`,value:c?l:void 0,...p}),(0,n.jsx)(`p`,{className:Y(`text-left`,e===`small`&&`pr-xs pl-lg style-text-default--1`,e===`medium`&&`pl-[calc(var(--dawn-spacing-lg)+6px)] style-text-default-0`,e===`large`&&`pl-2xl style-text-default-1`),children:l})]})}return(0,n.jsx)(gm,{className:Y(`w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,t),ref:r,...i})},tbe=Jn(`relative shrink-0 rounded-full`,{variants:{orientation:{horizontal:`w-full`,vertical:`h-full`},style:{rounded:`rounded-full`,square:`rounded-none`},variant:{default:`bg-neutral-border`,strong:`bg-neutral-border-strong`},weight:{thick:`[&_[data-label]]:style-text-prose-0`,medium:`[&_[data-label]]:style-text-prose--1`,thin:`[&_[data-label]]:style-text-prose--2`,thinnest:`[&_[data-label]]:style-text-prose--2`}},defaultVariants:{orientation:`horizontal`,style:`rounded`,variant:`default`,weight:`thinnest`},compoundVariants:[{orientation:`horizontal`,weight:`thick`,className:`h-[8px]`},{orientation:`horizontal`,weight:`medium`,className:`h-[4px]`},{orientation:`horizontal`,weight:`thin`,className:`h-[2px]`},{orientation:`horizontal`,weight:`thinnest`,className:`h-px`},{orientation:`vertical`,weight:`thick`,className:`w-[8px]`},{orientation:`vertical`,weight:`medium`,className:`w-[4px]`},{orientation:`vertical`,weight:`thin`,className:`w-[2px]`},{orientation:`vertical`,weight:`thinnest`,className:`w-px`}]}),sF=({orientation:e,weight:t,style:r,variant:i,children:a,className:o,labelClassName:s,ref:c,...l})=>(0,n.jsx)(ip,{className:Y(`relative`,tbe({orientation:e,weight:t,style:r,variant:i}),o),orientation:e,ref:c,...l,children:(0,n.jsx)(`span`,{"data-label":!0,className:Y(`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-surface-background px-2xs whitespace-nowrap text-on-surface-variant`,s),children:a})}),nbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(sF,{className:Y(`h-2/4`,e),ref:r,...i,children:t}),cF=({children:e,...t})=>(0,n.jsx)(toe,{...t,children:e}),rbe=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(hg,{className:Y(`style-text-prose--1`,e),ref:t,...i,children:r}),lF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(sg,{children:(0,n.jsx)(ug,{className:Y(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`),ref:t,sideOffset:8,...i,children:(0,n.jsxs)(fg,{className:`relative z-99 h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) overflow-hidden rounded-2xl bg-surface-3 text-on-surface shadow-md transition-[width,height,opacity,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:scale-90 data-ending-style:opacity-0 data-instant:transition-none data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(pg,{className:`flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`}),(0,n.jsx)(gg,{className:Y(`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-full overflow-clip p-[1rem] transition-[width,height] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] **:data-current:w-[calc(var(--popup-width)-2rem)] **:data-current:translate-x-0 **:data-current:opacity-100 **:data-current:transition-[translate,opacity] **:data-current:duration-[350ms,175ms] **:data-current:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-previous:w-[calc(var(--popup-width)-2rem)] **:data-previous:translate-x-0 **:data-previous:opacity-100 **:data-previous:transition-[translate,opacity] **:data-previous:duration-[350ms,175ms] **:data-previous:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-[activation-direction~='left']:data-previous:data-ending-style:translate-x-1/2 **:data-[activation-direction~='left']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='left']:data-current:data-starting-style:-translate-x-1/2 **:data-[activation-direction~='left']:data-current:data-starting-style:opacity-0 **:data-[activation-direction~='right']:data-previous:data-ending-style:-translate-x-1/2 **:data-[activation-direction~='right']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='right']:data-current:data-starting-style:translate-x-1/2 **:data-[activation-direction~='right']:data-current:data-starting-style:opacity-0`,e),children:r})]})})}),uF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(mg,{className:Y(`flex items-center gap-2xs style-text-strong-0 [&>svg]:size-sm`,e),ref:t,...i,children:r}),dF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(ag,{className:Y(`px-xs`,e),ref:t,...i,render:r}),fF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs pb-xs`,e),ref:r,...i,children:t}),pF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:t}),ibe=({variant:e,tone:t,className:r,children:i,ref:a,...o})=>e===`ghost`&&t===`neutral`?(0,n.jsx)(Yv,{variant:e,tone:t,className:Y(`hover:bg-neutral-container-high!`,r),ref:a,...o,children:i}):(0,n.jsx)(Yv,{variant:e,tone:t,className:Y(``,r),ref:a,...o,children:i}),abe=soe(),obe=({showPopover:e=!1,showTransparencyField:t=!0,className:r,children:i,ref:a,...o})=>{let{color:s,setColor:c,valueType:l}=rF(),[u,d]=v.default.useState(l.getValue(s)),[f,p]=v.default.useState(Math.round(s.alpha()*100).toString()),[m,h]=v.default.useState(s),[g,_]=v.default.useState(l);(s!==m||l!==g)&&(h(s),_(l),d(l.getValue(s)),p(Math.round(s.alpha()*100).toString()));let y=e=>{d(e)},b=e=>{p(e)},x=()=>{let e=l.parseValue(u);e&&c(e)},S=()=>{let e=parseFloat(f);Number.isNaN(e)||c(s.alpha(e/100))};return(0,n.jsxs)(iF,{variant:`secondary`,className:Y(``,r),ref:a,...o,children:[e?(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{children:(0,n.jsx)(aF,{style:{backgroundColor:s.hex()},className:`aspect-square h-1/2 rounded-lg hover:cursor-pointer`})}),(0,n.jsx)(lF,{children:(0,n.jsx)(pF,{className:`flex w-[300px] flex-col gap-sm`,children:i})})]}):(0,n.jsx)(aF,{style:{backgroundColor:s.hex()},className:`aspect-square size-md rounded-lg`}),(0,n.jsx)(oF,{onBlur:x,onValueChange:y,value:u,className:`uppercase`}),t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(sF,{orientation:`vertical`,className:`h-md`}),(0,n.jsx)(aF,{children:(0,n.jsx)(vi,{weight:`bold`})}),(0,n.jsx)(oF,{type:`number`,min:0,max:100,value:f,onValueChange:b,onBlur:S,className:`w-xl`})]})]})},sbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),cbe=({className:e,children:t,ref:r,...i})=>{let{palette:a,paletteLimit:o}=rF(),s=o&&a.length>=o;return o?(0,n.jsxs)(`span`,{className:Y(`style-text-prose--2`,s?`text-error-default`:`text-on-surface-variant`,e),ref:r,...i,children:[t,a.length,` / `,o]}):null},lbe=({className:e,children:t,ref:r,...i})=>{let{palette:a}=rF(),o=Array.isArray(t)?t:[t];return(0,n.jsx)(`ul`,{className:Y(`flex flex-wrap items-center justify-start gap-2xs`,e),ref:r,...i,children:o.map((e,t)=>(0,n.jsx)(v.Fragment,{children:typeof e==`function`?a.map((t,n)=>e({color:t,index:n})):e},t))})},ube=({size:e,color:t,className:r,children:i,ref:a,...o})=>{let{setColor:s}=rF();return(0,n.jsxs)(`button`,{onClick:()=>{s(t)},className:Y(Gye({size:e}),r),ref:a,style:{color:t.css()},...o,children:[i,(0,n.jsx)(`div`,{className:`size-full`,style:{backgroundColor:t.css()}})]})},dbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-xs`,e),ref:r,...i,children:t}),fbe=({className:e,ref:t,...r})=>{let{color:i,setColor:a}=rF(),o=i.alpha(),s=e=>{let t=Array.isArray(e)?e[0]:e;a(i.alpha(t/100))};return(0,n.jsx)(tN,{...r,min:0,max:100,value:o*100,onValueChange:s,trackStyle:Zye(i.hex()),className:Y(``,e),ref:t})},pbe=({className:e,children:t,ref:r,...i})=>{let{valueType:a,setValueType:o}=rF();return(0,n.jsxs)(zM,{value:a.value,onValueChange:e=>{o(eF.find(t=>t.value===e)??eF[0])},children:[(0,n.jsxs)(WM,{variant:`secondary`,className:Y(``,e),ref:r,...i,children:[t,(0,n.jsx)(GM,{children:e=>eF.find(t=>t.value===e)?.label??e}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{sideOffset:8,children:(0,n.jsx)(VM,{children:eF.map(({label:e,value:t})=>(0,n.jsx)(BM,{value:t,children:e},e))})})]})},mbe=({className:e,ref:t,...r})=>{let{color:i,setColor:a}=rF(),o=i.get(`hsl.l`),s=Number.isNaN(o)?0:o,c=e=>{let t=Array.isArray(e)?e[0]:e;a(i.set(`hsl.l`,t/100))};return(0,n.jsx)(tN,{...r,min:0,max:100,value:s*100,onValueChange:c,trackStyle:Qye(i.hex()),className:Y(``,e),ref:t})},hbe=({children:e,...t})=>(0,n.jsx)(rie,{...t,children:e}),gbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(lf,{className:Y(`inline-flex h-lg items-center justify-center gap-xs rounded-lg bg-neutral-container pr-3xs pl-xs style-text-default-0 text-neutral-on-container`,e),ref:r,...i,children:[t,(0,n.jsx)(uf,{"aria-label":`Remove`,render:e=>(0,n.jsx)(Yv,{onClick:e.onClick,variant:`ghost`,tone:`error`,size:`iconExtraSmall`,children:(0,n.jsx)(Di,{className:`size-sm`,weight:`bold`})})})]}),_be=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(sf,{"data-chips":!0,className:Y(`group flex size-full flex-wrap items-center gap-2xs empty:hidden`,e),ref:r,...i,children:t}),vbe=({children:e,...t})=>(0,n.jsx)(Qu,{...t,children:e}),ybe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Pd,{className:Y(`max-h-[min(23rem,var(--available-height))] scroll-py-[0.5rem] overflow-y-auto overscroll-contain p-xs empty:m-[0px] empty:p-[0px]`,e),ref:r,...i,children:t}),bbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Td,{className:Y(`block pb-3xs`,e),ref:r,...i,children:t}),xbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ed,{className:Y(`sticky top-[0px] z-1 my-[0px] mr-[0px] -ml-2xs bg-surface-2 px-sm pt-2xs pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t}),Sbe=({inline:e=!1,variant:t,className:r,children:i,ref:a,...o})=>{let s=v.default.useId();return e?(0,n.jsx)(`div`,{className:`h-(--input-container-height) py-2xs pr-2xs`,children:(0,n.jsx)(Uu,{className:Y(`h-xl w-full rounded-lg bg-surface-low px-sm outline-border transition-all not-active:outline-1 focus-within:outline-2 hover:outline-2 focus:caret-brand-default focus:outline-brand-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,`placeholder:opacity-60`,`disabled:cursor-not-allowed`,`text-ellipsis`,r),id:s,ref:a,...o})}):(0,n.jsxs)(iF,{variant:t,className:Y(`flex flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden`,r),children:[i,(0,n.jsx)(sF,{weight:`thinnest`}),(0,n.jsxs)(Gu,{className:`relative flex w-full items-center justify-between [&>input]:pr-[2rem] has-[.combobox-clear]:[&>input]:pr-[calc(0.5rem+1.5rem*2)]`,children:[(0,n.jsx)(Uu,{className:Y(`w-full text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,r),id:s,ref:a,...o}),(0,n.jsxs)(aF,{children:[(0,n.jsx)(Ju,{"aria-label":`Clear selection`,keepMounted:!0,render:e=>(0,n.jsx)(Yv,{onClick:e.onClick,size:`iconExtraSmall`,variant:`ghost`,tone:`error`,children:(0,n.jsx)(Di,{weight:`bold`})})}),(0,n.jsx)(Iu,{"aria-label":`Open popup`,render:(e,t)=>(0,n.jsx)(Yv,{onClick:e.onClick,size:`iconExtraSmall`,variant:t.open?`fill`:`ghost`,tone:`brand`,children:(0,n.jsx)(Kr,{weight:`bold`})})})]})]})]})},mF=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(jd,{className:Y(`mr-2xs grid cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md px-2xs py-3xs style-text-default-0 select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg first-of-type:mt-2xs last-of-type:mb-2xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(af,{className:`col-start-2 place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Cbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)($u,{className:Y(`max-h-[min(calc(23rem-var(--input-container-height,0rem)),calc(var(--available-height)-var(--input-container-height,0rem)))] scroll-py-[0.5rem] space-y-3xs overflow-y-auto overscroll-contain data-empty:p-[0px]`,e),ref:r,...i,children:t}),wbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(od,{children:(0,n.jsx)(Sd,{className:Y(``,e),ref:r,sideOffset:20,...i,children:(0,n.jsx)(Cd,{className:`max-h-[23rem] w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-xl bg-surface-2 pl-2xs shadow-md transition-[transform,scale,opacity] duration-100 [--input-container-height:4rem] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0`,children:t})})}),Tbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(rd,{className:Y(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t}),Ebe=({placeholder:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(Iu,{className:Y(`inline-flex h-xl items-center justify-between gap-xl rounded-xl bg-surface pr-sm pl-md style-text-default-0 outline-2 outline-transparent transition-all hover:cursor-pointer hover:outline-border data-popup-open:outline-brand-border`,t),ref:i,...a,children:[(0,n.jsx)(rf,{placeholder:(0,n.jsx)(`span`,{className:`opacity-70`,children:e})}),(0,n.jsx)(Ku,{children:(0,n.jsx)(Qr,{})}),r]}),Dbe=({children:e,...t})=>(0,n.jsx)(rf,{...t,children:e});function Obe(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function hF(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=process.env.NODE_ENV!==`production`&&!!n.key&&!!n.debug?.call(n),s=0;o&&(s=Date.now());let c=e();if(!(c.length!==r.length||c.some((e,t)=>r[t]!==e)))return i;r=c;let l=0;if(o&&(l=Date.now()),i=t(...c),o){let e=Math.round((Date.now()-s)*100)/100,t=Math.round((Date.now()-l)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
54
|
+
`,...r.style},onPointerDown:d,onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&u(e)},children:(0,n.jsx)(`div`,{className:`pointer-events-none absolute size-md -translate-x-1/2 -translate-y-1/2 rounded-full border-3 border-white`,style:{left:`${o*100}%`,top:`${(1-s)*100}%`,backgroundColor:i.hex()}})})},Yye=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-sm`,e),ref:r,...i,children:t}),Xye=()=>Array.from({length:361},(e,t)=>$P.hsl(t,1,.5).hex()),Zye=e=>Array.from({length:101},(t,n)=>$P(e).alpha(n/100).css()),Qye=e=>Array.from({length:101},(t,n)=>$P(e).set(`hsl.l`,n/100).css()),$ye=({className:e,ref:t,...r})=>{let{hue:i,setHue:a}=rF(),o=e=>{a(Array.isArray(e)?e[0]:e)};return(0,n.jsx)(tN,{...r,min:0,max:360,value:i,onValueChange:o,trackStyle:Xye(),className:Y(``,e),ref:t})},iF=({variant:e,size:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`div`,{className:Y(Zv({variant:e,size:t}),r),ref:a,...o,children:i}),ebe=Jn(`inline-flex items-center gap-2xs text-on-surface-variant not-first:pl-2xs group-aria-invalid:text-error-on-container`,{variants:{size:{small:`style-text-default--1 [&>svg]:size-xs`,medium:`style-text-default-0 [&>svg]:size-sm`,large:`style-text-default-1 [&>svg]:size-md`}},defaultVariants:{size:`medium`}}),aF=({size:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(ebe({size:e}),t),ref:i,...a,children:r}),oF=({size:e=`medium`,className:t,ref:r,...i})=>{let a=(0,v.useRef)(null),[o,s]=(0,v.useState)(i.defaultValue||i.value||`#000000`);if(i.type===`color`){let c=i.value!==void 0,l=(c?i.value:o)||`#000000`,{onChange:u,defaultValue:d,value:f,...p}=i;return(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative flex size-full items-center justify-start hover:cursor-pointer`,t),disabled:i.disabled,onClick:()=>a.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`absolute top-1/2 left-0 aspect-square h-7/12 -translate-y-1/2`,e===`small`&&`rounded-md`,e===`medium`&&`rounded-lg`,e===`large`&&`rounded-xl`),style:{backgroundColor:l}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:c?void 0:l,onChange:e=>{c||s(e.currentTarget.value),u?.(e)},ref:e=>{if(a.current=e,typeof r==`function`){r(e);return}r&&typeof r==`object`&&(r.current=e)},type:`color`,value:c?l:void 0,...p}),(0,n.jsx)(`p`,{className:Y(`text-left`,e===`small`&&`pr-xs pl-lg style-text-default--1`,e===`medium`&&`pl-[calc(var(--dawn-spacing-lg)+6px)] style-text-default-0`,e===`large`&&`pl-2xl style-text-default-1`),children:l})]})}return(0,n.jsx)(gm,{className:Y(`w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,t),ref:r,...i})},tbe=Jn(`relative shrink-0 rounded-full`,{variants:{orientation:{horizontal:`w-full`,vertical:`h-full`},style:{rounded:`rounded-full`,square:`rounded-none`},variant:{default:`bg-neutral-border`,strong:`bg-neutral-border-strong`},weight:{thick:`[&_[data-label]]:style-text-prose-0`,medium:`[&_[data-label]]:style-text-prose--1`,thin:`[&_[data-label]]:style-text-prose--2`,thinnest:`[&_[data-label]]:style-text-prose--2`}},defaultVariants:{orientation:`horizontal`,style:`rounded`,variant:`default`,weight:`thinnest`},compoundVariants:[{orientation:`horizontal`,weight:`thick`,className:`h-[8px]`},{orientation:`horizontal`,weight:`medium`,className:`h-[4px]`},{orientation:`horizontal`,weight:`thin`,className:`h-[2px]`},{orientation:`horizontal`,weight:`thinnest`,className:`h-px`},{orientation:`vertical`,weight:`thick`,className:`w-[8px]`},{orientation:`vertical`,weight:`medium`,className:`w-[4px]`},{orientation:`vertical`,weight:`thin`,className:`w-[2px]`},{orientation:`vertical`,weight:`thinnest`,className:`w-px`}]}),sF=({orientation:e,weight:t,style:r,variant:i,children:a,className:o,labelClassName:s,ref:c,...l})=>(0,n.jsx)(ip,{className:Y(`relative`,tbe({orientation:e,weight:t,style:r,variant:i}),o),orientation:e,ref:c,...l,children:(0,n.jsx)(`span`,{"data-label":!0,className:Y(`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-surface-background px-2xs whitespace-nowrap text-on-surface-variant`,s),children:a})}),nbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(sF,{className:Y(`h-2/4`,e),ref:r,...i,children:t}),cF=({children:e,...t})=>(0,n.jsx)(toe,{...t,children:e}),rbe=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(hg,{className:Y(`style-text-prose--1`,e),ref:t,...i,children:r}),lF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(sg,{children:(0,n.jsx)(ug,{className:Y(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`),ref:t,sideOffset:8,...i,children:(0,n.jsxs)(fg,{className:`relative z-99 h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) overflow-hidden rounded-2xl bg-surface-3 text-on-surface shadow-md transition-[width,height,opacity,scale] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-ending-style:scale-90 data-ending-style:opacity-0 data-instant:transition-none data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(pg,{className:`flex transition-[left] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`}),(0,n.jsx)(gg,{className:Y(`relative h-(--popup-height,auto) w-(--popup-width,auto) max-w-full overflow-clip p-[1rem] transition-[width,height] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] **:data-current:w-[calc(var(--popup-width)-2rem)] **:data-current:translate-x-0 **:data-current:opacity-100 **:data-current:transition-[translate,opacity] **:data-current:duration-[350ms,175ms] **:data-current:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-previous:w-[calc(var(--popup-width)-2rem)] **:data-previous:translate-x-0 **:data-previous:opacity-100 **:data-previous:transition-[translate,opacity] **:data-previous:duration-[350ms,175ms] **:data-previous:ease-[cubic-bezier(0.22,1,0.36,1)] **:data-[activation-direction~='left']:data-previous:data-ending-style:translate-x-1/2 **:data-[activation-direction~='left']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='left']:data-current:data-starting-style:-translate-x-1/2 **:data-[activation-direction~='left']:data-current:data-starting-style:opacity-0 **:data-[activation-direction~='right']:data-previous:data-ending-style:-translate-x-1/2 **:data-[activation-direction~='right']:data-previous:data-ending-style:opacity-0 **:data-[activation-direction~='right']:data-current:data-starting-style:translate-x-1/2 **:data-[activation-direction~='right']:data-current:data-starting-style:opacity-0`,e),children:r})]})})}),uF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(mg,{className:Y(`flex items-center gap-2xs style-text-strong-0 [&>svg]:size-sm`,e),ref:t,...i,children:r}),dF=({className:e,ref:t,children:r,...i})=>(0,n.jsx)(ag,{className:Y(`px-xs`,e),ref:t,...i,render:r}),fF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-3xs pb-xs`,e),ref:r,...i,children:t}),pF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:t}),ibe=({variant:e,tone:t,className:r,children:i,ref:a,...o})=>e===`ghost`&&t===`neutral`?(0,n.jsx)(Yv,{variant:e,tone:t,className:Y(`hover:bg-neutral-container-high!`,r),ref:a,...o,children:i}):(0,n.jsx)(Yv,{variant:e,tone:t,className:Y(``,r),ref:a,...o,children:i}),abe=soe(),obe=({showPopover:e=!1,showTransparencyField:t=!0,className:r,children:i,ref:a,...o})=>{let{color:s,setColor:c,valueType:l}=rF(),[u,d]=v.default.useState(l.getValue(s)),[f,p]=v.default.useState(Math.round(s.alpha()*100).toString()),[m,h]=v.default.useState(s),[g,_]=v.default.useState(l);(s!==m||l!==g)&&(h(s),_(l),d(l.getValue(s)),p(Math.round(s.alpha()*100).toString()));let y=e=>{d(e)},b=e=>{p(e)},x=()=>{let e=l.parseValue(u);e&&c(e)},S=()=>{let e=parseFloat(f);Number.isNaN(e)||c(s.alpha(e/100))};return(0,n.jsxs)(iF,{variant:`secondary`,className:Y(``,r),ref:a,...o,children:[e?(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{nativeButton:!1,children:(0,n.jsx)(aF,{style:{backgroundColor:s.hex()},className:`aspect-square h-1/2 rounded-lg hover:cursor-pointer`})}),(0,n.jsx)(lF,{children:(0,n.jsx)(pF,{className:`flex w-[300px] flex-col gap-sm`,children:i})})]}):(0,n.jsx)(aF,{style:{backgroundColor:s.hex()},className:`aspect-square size-md rounded-lg`}),(0,n.jsx)(oF,{onBlur:x,onValueChange:y,value:u,className:`uppercase`}),t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(sF,{orientation:`vertical`,className:`h-md`}),(0,n.jsx)(aF,{children:(0,n.jsx)(vi,{weight:`bold`})}),(0,n.jsx)(oF,{type:`number`,min:0,max:100,value:f,onValueChange:b,onBlur:S,className:`w-xl`})]})]})},sbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),cbe=({className:e,children:t,ref:r,...i})=>{let{palette:a,paletteLimit:o}=rF(),s=o&&a.length>=o;return o?(0,n.jsxs)(`span`,{className:Y(`style-text-prose--2`,s?`text-error-default`:`text-on-surface-variant`,e),ref:r,...i,children:[t,a.length,` / `,o]}):null},lbe=({className:e,children:t,ref:r,...i})=>{let{palette:a}=rF(),o=Array.isArray(t)?t:[t];return(0,n.jsx)(`ul`,{className:Y(`flex flex-wrap items-center justify-start gap-2xs`,e),ref:r,...i,children:o.map((e,t)=>(0,n.jsx)(v.Fragment,{children:typeof e==`function`?a.map((t,n)=>e({color:t,index:n})):e},t))})},ube=({size:e,color:t,className:r,children:i,ref:a,...o})=>{let{setColor:s}=rF();return(0,n.jsxs)(`button`,{onClick:()=>{s(t)},className:Y(Gye({size:e}),r),ref:a,style:{color:t.css()},...o,children:[i,(0,n.jsx)(`div`,{className:`size-full`,style:{backgroundColor:t.css()}})]})},dbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-xs`,e),ref:r,...i,children:t}),fbe=({className:e,ref:t,...r})=>{let{color:i,setColor:a}=rF(),o=i.alpha(),s=e=>{let t=Array.isArray(e)?e[0]:e;a(i.alpha(t/100))};return(0,n.jsx)(tN,{...r,min:0,max:100,value:o*100,onValueChange:s,trackStyle:Zye(i.hex()),className:Y(``,e),ref:t})},pbe=({className:e,children:t,ref:r,...i})=>{let{valueType:a,setValueType:o}=rF();return(0,n.jsxs)(zM,{value:a.value,onValueChange:e=>{o(eF.find(t=>t.value===e)??eF[0])},children:[(0,n.jsxs)(WM,{variant:`secondary`,className:Y(``,e),ref:r,...i,children:[t,(0,n.jsx)(GM,{children:e=>eF.find(t=>t.value===e)?.label??e}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{sideOffset:8,children:(0,n.jsx)(VM,{children:eF.map(({label:e,value:t})=>(0,n.jsx)(BM,{value:t,children:e},e))})})]})},mbe=({className:e,ref:t,...r})=>{let{color:i,setColor:a}=rF(),o=i.get(`hsl.l`),s=Number.isNaN(o)?0:o,c=e=>{let t=Array.isArray(e)?e[0]:e;a(i.set(`hsl.l`,t/100))};return(0,n.jsx)(tN,{...r,min:0,max:100,value:s*100,onValueChange:c,trackStyle:Qye(i.hex()),className:Y(``,e),ref:t})},hbe=({children:e,...t})=>(0,n.jsx)(rie,{...t,children:e}),gbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(lf,{className:Y(`inline-flex h-lg items-center justify-center gap-xs rounded-lg bg-neutral-container pr-3xs pl-xs style-text-default-0 text-neutral-on-container`,e),ref:r,...i,children:[t,(0,n.jsx)(uf,{"aria-label":`Remove`,render:e=>(0,n.jsx)(Yv,{onClick:e.onClick,variant:`ghost`,tone:`error`,size:`iconExtraSmall`,children:(0,n.jsx)(Di,{className:`size-sm`,weight:`bold`})})})]}),_be=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(sf,{"data-chips":!0,className:Y(`group flex size-full flex-wrap items-center gap-2xs empty:hidden`,e),ref:r,...i,children:t}),vbe=({children:e,...t})=>(0,n.jsx)(Qu,{...t,children:e}),ybe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Pd,{className:Y(`max-h-[min(23rem,var(--available-height))] scroll-py-[0.5rem] overflow-y-auto overscroll-contain p-xs empty:m-[0px] empty:p-[0px]`,e),ref:r,...i,children:t}),bbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Td,{className:Y(`block pb-3xs`,e),ref:r,...i,children:t}),xbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ed,{className:Y(`sticky top-[0px] z-1 my-[0px] mr-[0px] -ml-2xs bg-surface-2 px-sm pt-2xs pb-3xs style-text-strong--2 text-on-surface-variant`,e),ref:r,...i,children:t}),Sbe=({inline:e=!1,variant:t,className:r,children:i,ref:a,...o})=>{let s=v.default.useId();return e?(0,n.jsx)(`div`,{className:`h-(--input-container-height) py-2xs pr-2xs`,children:(0,n.jsx)(Uu,{className:Y(`h-xl w-full rounded-lg bg-surface-low px-sm outline-border transition-all not-active:outline-1 focus-within:outline-2 hover:outline-2 focus:caret-brand-default focus:outline-brand-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,`placeholder:opacity-60`,`disabled:cursor-not-allowed`,`text-ellipsis`,r),id:s,ref:a,...o})}):(0,n.jsxs)(iF,{variant:t,className:Y(`flex flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden`,r),children:[i,(0,n.jsx)(sF,{weight:`thinnest`}),(0,n.jsxs)(Gu,{className:`relative flex w-full items-center justify-between [&>input]:pr-[2rem] has-[.combobox-clear]:[&>input]:pr-[calc(0.5rem+1.5rem*2)]`,children:[(0,n.jsx)(Uu,{className:Y(`w-full text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed`,r),id:s,ref:a,...o}),(0,n.jsxs)(aF,{children:[(0,n.jsx)(Ju,{"aria-label":`Clear selection`,keepMounted:!0,render:e=>(0,n.jsx)(Yv,{onClick:e.onClick,size:`iconExtraSmall`,variant:`ghost`,tone:`error`,children:(0,n.jsx)(Di,{weight:`bold`})})}),(0,n.jsx)(Iu,{"aria-label":`Open popup`,render:(e,t)=>(0,n.jsx)(Yv,{onClick:e.onClick,size:`iconExtraSmall`,variant:t.open?`fill`:`ghost`,tone:`brand`,children:(0,n.jsx)(Kr,{weight:`bold`})})})]})]})]})},mF=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(jd,{className:Y(`mr-2xs grid cursor-default grid-cols-[1fr_0.75rem] items-center gap-xs rounded-md px-2xs py-3xs style-text-default-0 select-none group-data-[side=none]:pr-xs group-data-[side=none]:leading-lg first-of-type:mt-2xs last-of-type:mb-2xs hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:bg-neutral-container-high data-highlighted:text-neutral-on-container data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-sm data-selected:bg-neutral-default data-selected:text-neutral-on-default pointer-coarse:py-xs`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(af,{className:`col-start-2 place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Cbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)($u,{className:Y(`max-h-[min(calc(23rem-var(--input-container-height,0rem)),calc(var(--available-height)-var(--input-container-height,0rem)))] scroll-py-[0.5rem] space-y-3xs overflow-y-auto overscroll-contain data-empty:p-[0px]`,e),ref:r,...i,children:t}),wbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(od,{children:(0,n.jsx)(Sd,{className:Y(``,e),ref:r,sideOffset:20,...i,children:(0,n.jsx)(Cd,{className:`max-h-[23rem] w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-xl bg-surface-2 pl-2xs shadow-md transition-[transform,scale,opacity] duration-100 [--input-container-height:4rem] data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0`,children:t})})}),Tbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(rd,{className:Y(`flex items-center gap-2xs p-xs style-text-prose--1 text-on-surface-variant empty:hidden`,e),ref:r,...i,children:t}),Ebe=({placeholder:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(Iu,{className:Y(`inline-flex h-xl items-center justify-between gap-xl rounded-xl bg-surface pr-sm pl-md style-text-default-0 outline-2 outline-transparent transition-all hover:cursor-pointer hover:outline-border data-popup-open:outline-brand-border`,t),ref:i,...a,children:[(0,n.jsx)(rf,{placeholder:(0,n.jsx)(`span`,{className:`opacity-70`,children:e})}),(0,n.jsx)(Ku,{children:(0,n.jsx)(Qr,{})}),r]}),Dbe=({children:e,...t})=>(0,n.jsx)(rf,{...t,children:e});function Obe(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function hF(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=process.env.NODE_ENV!==`production`&&!!n.key&&!!n.debug?.call(n),s=0;o&&(s=Date.now());let c=e();if(!(c.length!==r.length||c.some((e,t)=>r[t]!==e)))return i;r=c;let l=0;if(o&&(l=Date.now()),i=t(...c),o){let e=Math.round((Date.now()-s)*100)/100,t=Math.round((Date.now()-l)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
55
55
|
font-size: .6rem;
|
|
56
56
|
font-weight: bold;
|
|
57
|
-
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function gF(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var kbe=(e,t)=>Math.abs(e-t)<1.01,Abe=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},_F,vF=()=>{if(_F!==void 0)return _F;if(typeof navigator>`u`)return _F=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return _F=!0;let e=navigator.maxTouchPoints;return _F=navigator.platform===`MacIntel`&&e!==void 0&&e>0},yF=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},jbe=e=>e,Mbe=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Nbe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(yF(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(yF(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},bF={passive:!0},Pbe=typeof window>`u`||`onscrollend`in window,Fbe=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Pbe,o=0,s=a?null:Abe(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,bF),a&&r.addEventListener(`scrollend`,u,bF),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Ibe=(e,t)=>Fbe(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),Lbe=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Rbe=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},zbe=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:jbe,rangeExtractor:Mbe,onChange:()=>{},measureElement:Lbe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=Math.max(0,e.start+t);n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=hF(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!==`production`&&`maybeNotify`,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!vF()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,bF),e.addEventListener(`touchend`,n,bF),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(vF()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=hF(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=hF(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=Obe(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!==`production`&&`getMeasurements`,debug:()=>this.options.debug}),this.calculateRange=hF(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Vbe(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:process.env.NODE_ENV!==`production`&&`calculateRange`,debug:()=>this.options.debug}),this.getVirtualIndexes=hF(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:process.env.NODE_ENV!==`production`&&`getVirtualIndexes`,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f)}},this.getVirtualItems=hF(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:process.env.NODE_ENV!==`production`&&`getVirtualItems`,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return gF(t[xF(0,t.length-1,r?e=>n[e*2]:e=>gF(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e!==0&&(process.env.NODE_ENV!==`production`&&this.options.debug&&console.info(`correction`,e),vF()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&kbe(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},xF=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Bbe(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Vbe(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Bbe(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=xF(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var SF=typeof document<`u`?v.useLayoutEffect:v.useEffect;function Hbe({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...i}){let a=v.useReducer(e=>e+1,0)[1],o=v.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=n;let s=e=>{let t=o.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=e=>{let t=o.current;if(!t.enabled||!t.container)return;s(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,a=e.options.scrollMargin,c=e.getVirtualItems();for(let o of c){let s=o.start-a,c=e.elementsCache.get(o.key);c&&t.lastPositions.get(c)!==s&&(t.lastPositions.set(c,s),r?c.style.transform=n?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:c.style[i]=`${s}px`)}},l={...i,onChange:(t,n)=>{var s;let l=o.current,u=!0;if(l.enabled){c(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n?(0,r.flushSync)(a):a()),(s=i.onChange)==null||s.call(i,t,n)}},[u]=v.useState(()=>{let e=new zbe(l);return Object.assign(e,{containerRef:t=>{let n=o.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return u.setOptions(l),SF(()=>u._didMount(),[]),SF(()=>(s(u),u._willUpdate())),SF(()=>{c(u)}),u}function Ube(e){return Hbe({observeElementRect:Nbe,observeElementOffset:Ibe,scrollToFn:Rbe,...e})}var Wbe=Kre,Gbe=({open:e,virtualizerRef:t,estimateSize:r=32,overscan:i=20,className:a,children:o,...s})=>{let c=Wbe(),l=v.default.useRef(null),u=Ube({enabled:e,count:c.length,getScrollElement:()=>l.current,estimateSize:()=>r,overscan:i,paddingStart:8,paddingEnd:8,scrollPaddingStart:8,scrollPaddingEnd:8});v.default.useEffect(()=>{t&&(t.current=u)},[u,t]);let d=v.default.useCallback(e=>{l.current=e,e&&u.measure()},[u]),f=u.getTotalSize();return c.length?(0,n.jsx)(`div`,{role:`presentation`,ref:d,style:{"--total-size":`${f}px`},className:Y(`h-[min(22.5rem,var(--total-size))] max-h-(--available-height) scroll-py-3xs overflow-auto overscroll-contain`,a),...s,children:(0,n.jsx)(`div`,{role:`presentation`,className:`relative w-full`,style:{height:f},children:u.getVirtualItems().map(e=>{let t=c[e.index];return t?(0,n.jsx)(mF,{index:e.index,"data-index":e.index,ref:u.measureElement,value:t,"aria-setsize":c.length,"aria-posinset":e.index+1,className:`first-of-type:mt-0!`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:typeof o==`function`?o(t):o},e.key):null})})}):null},Kbe=({children:e,...t})=>(0,n.jsx)(Oie,{...t,children:e}),qbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Sf,{className:Y(`grid cursor-default grid-cols-[1fr_2rem] items-center rounded-md px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(Cf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Jbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Tf,{className:Y(``,e),ref:r,...i,children:t}),Ybe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ef,{className:Y(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t}),Xbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ff,{className:Y(`mx-3xs`,e),ref:r,...i,children:t}),Zbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Lf,{className:Y(`grid cursor-default grid-cols-[1fr_2rem] items-center rounded-md px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1 flex min-w-3xl items-center gap-2xs [&>svg]:size-sm`,children:t}),(0,n.jsx)(Rf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Qbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto inline-flex items-center gap-3xs`,e),ref:r,...i,children:t}),$be=Jn(`flex cursor-default items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),exe=Jn(`grid cursor-default grid-cols-[1fr_2rem] items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md data-popup-open:relative data-popup-open:z-0 data-popup-open:before:absolute data-popup-open:before:inset-x-3xs data-popup-open:before:inset-y-[0px] data-popup-open:before:z-[-1] data-popup-open:before:rounded-sm`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-[highlighted]:data-[popup-open]:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-[highlighted]:data-[popup-open]:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-[highlighted]:data-[popup-open]:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-[highlighted]:data-[popup-open]:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-[highlighted]:data-[popup-open]:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-[highlighted]:data-[popup-open]:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-[highlighted]:data-[popup-open]:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),txe=({className:e,tone:t,children:r,ref:i,...a})=>(0,n.jsx)(Df,{className:Y($be({tone:t}),e),ref:i,...a,children:(0,n.jsx)(`div`,{className:`flex w-full items-center gap-2xs [&>svg]:size-sm`,children:r})}),nxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mf,{children:(0,n.jsx)(Nf,{children:(0,n.jsx)(Af,{className:Y(`w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] space-y-3xs rounded-xl bg-surface-2 p-3xs py-2xs shadow-md transition-[transform,scale,opacity] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})})}),rxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ip,{className:Y(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:r,...i,children:t}),ixe=({children:e,...t})=>(0,n.jsx)(Wf,{...t,children:e}),axe=({className:e,children:t,ref:r,tone:i,...a})=>(0,n.jsxs)(op,{className:Y(exe({tone:i}),e),ref:r,...a,children:[(0,n.jsx)(`span`,{className:`col-start-1 flex min-w-3xl items-center gap-2xs pr-2xl`,children:t}),(0,n.jsx)(Xr,{className:`col-start-2 size-xs place-self-end self-center`,weight:`bold`}),` `]}),oxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(cp,{className:Y(`flex min-w-0 flex-1`,e),ref:r,...i,children:t}),sxe=({children:e,...t})=>(0,n.jsx)(dp,{...t,children:e}),cxe=({className:e,ref:t,...r})=>(0,n.jsx)(el,{className:Y(`absolute top-2xs right-2xs`,e),ref:t,...r,render:(0,n.jsx)(Yv,{"aria-label":`Close`,variant:`ghost`,size:`iconSmall`,tone:`error`,children:(0,n.jsx)(Di,{weight:`bold`})})}),lxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex h-full flex-col gap-2xs`,e),ref:r,...i,children:t}),uxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(tl,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t}),dxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-end gap-2xs`,e),ref:r,...i,children:t}),fxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col`,e),ref:r,...i,children:t}),pxe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(xl,{children:[(0,n.jsx)($c,{className:`fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`,style:{backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`}}),(0,n.jsx)(vl,{className:Y(`fixed top-1/2 left-1/2 z-999 flex max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 flex-col gap-sm overflow-hidden rounded-3xl bg-surface-2 p-md shadow-lg transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})]}),mxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Sl,{className:Y(`flex items-center gap-2xs style-text-strong-1 [&>svg]:size-md`,e),ref:r,...i,children:t}),hxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(El,{className:Y(``,e),ref:r,...i,render:t}),gxe=Aie,_xe=({children:e,...t})=>(0,n.jsx)(Wie,{...t,children:e}),vxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(jie,{className:Y(`shrink-0`,e),ref:r,...i,render:t}),yxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(gp,{className:Y(`mx-auto w-full max-w-[32rem] space-y-3xs`,e),ref:r,...i,children:t}),bxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mie,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t}),xxe=({children:e,...t})=>(0,n.jsxs)(Bie,{...t,children:[(0,n.jsx)(bp,{}),(0,n.jsx)(yp,{className:`size-full`,children:e})]}),Sxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(tae,{className:Y(``,e),ref:r,...i,render:t}),Cxe=`fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]`,wxe=Y(`fixed inset-0 flex`,`items-end justify-center`,`has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center`,`has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end`,`has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start`),Txe=Y(`touch-auto overflow-y-auto overscroll-contain bg-surface-background p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none`,`mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]`,`data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]`,`data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]`,`data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]`),Exe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(zie,{children:[(0,n.jsx)(mp,{className:Cxe}),(0,n.jsx)(Jp,{className:wxe,children:(0,n.jsx)(Ap,{className:Y(Txe,e),ref:r,...i,children:t})})]}),Dxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eae,{className:Y(`style-text-strong-1`,e),ref:r,...i,children:t}),Oxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-start justify-between pb-sm`,e),ref:r,...i,children:t}),CF=e=>{if(e<1e3)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1e3,r=0;for(;n>=1e3&&r<t.length-1;)n/=1e3,r+=1;return`${n.toFixed(n%1==0?0:1)}${t[r]}`},wF=e=>`${e.name}-${e.size}-${e.lastModified}`,kxe=(e,t)=>{if(t.length===0)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>{let t=e.toLowerCase();return t.startsWith(`.`)?n.endsWith(t):t.endsWith(`/*`)?r.startsWith(`${t.slice(0,-1)}`):r===t})},TF=v.default.createContext(null),Axe=({maxFiles:e,maxFileSize:t,maxFilesErrorLabel:r=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:i=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,fileTypeErrorLabel:a=e=>`"${e}" is not an accepted file type.`,onUpload:o,ref:s,className:c,children:l,onChange:u,onConfirm:d,...f})=>{let p=v.default.useRef(null),m=v.default.useRef([]),[h,g]=v.default.useState(!1),[_,y]=v.default.useState([]),[b,x]=v.default.useState(null),[S,C]=v.default.useState({});v.default.useEffect(()=>{m.current=_},[_]);let w=v.default.useMemo(()=>typeof f.accept==`string`?f.accept.split(`,`).map(e=>e.trim()).filter(Boolean):[],[f.accept]),T=v.default.useCallback(e=>{if(!p.current)return;let t=new DataTransfer;e.forEach(e=>t.items.add(e)),p.current.files=t.files},[]),E=v.default.useCallback(e=>f.multiple?[...m.current,...e].filter((e,t,n)=>n.findIndex(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)===t):e.slice(0,1),[f.multiple]),D=v.default.useCallback(e=>{let t=wF(e);y(t=>{let n=t.filter(t=>t!==e);return m.current=n,T(n),n}),C(e=>{let n={...e};return delete n[t],n}),x(null)},[T]),O=v.default.useCallback(e=>{e.forEach(e=>{let t=wF(e);if(!o){C(e=>({...e,[t]:100}));return}C(e=>({...e,[t]:0})),o(e,e=>{C(n=>({...n,[t]:Math.max(0,Math.min(100,e))}))})})},[o]),k=v.default.useCallback(n=>{let o=n.filter(e=>!kxe(e,w));if(o.length>0)return{acceptedFiles:null,error:a(o[0].name)};let s=t===void 0?[]:n.filter(e=>e.size>t),c=t===void 0?n:n.filter(e=>e.size<=t);return e!==void 0&&c.length>e?{acceptedFiles:null,error:r(e)}:{acceptedFiles:c,error:s.length>0&&t!==void 0?i(s[0].name,CF(t)):null}},[w,a,e,t,r,i]);return(0,n.jsx)(TF.Provider,{value:{acceptedFileTypes:w,fileError:b,fileProgress:S,files:_,handleDragLeave:()=>{g(!1)},handleDragOver:e=>{e.preventDefault(),g(!0)},handleDrop:e=>{e.preventDefault();let t=Array.from(e.dataTransfer.files),n=m.current,r=E(t),{acceptedFiles:i,error:a}=k(r);if(!i){x(a),g(!1);return}x(a);let o=new Set(n.map(wF)),s=i.filter(e=>!o.has(wF(e)));m.current=i,y(i),T(i),O(s),p.current&&u?.({target:p.current,currentTarget:p.current}),g(!1)},handleFiles:e=>{let t=e.target.files?Array.from(e.target.files):[],n=m.current,r=E(t),{acceptedFiles:i,error:a}=k(r);if(!i){x(a),T(n);return}x(a);let o=new Set(n.map(wF)),s=i.filter(e=>!o.has(wF(e)));m.current=i,y(i),T(i),O(s),p.current&&u?.({target:p.current,currentTarget:p.current})},inputRef:p,isHovering:h,maxFileSize:t===void 0?void 0:CF(t),maxFiles:e,onConfirm:d,onUpload:o,props:f,removeFile:D,setFiles:y},children:(0,n.jsx)(`div`,{className:Y(`space-y-md`,c),ref:s,children:l})})},EF=()=>{let e=v.default.useContext(TF);if(!e)throw Error(`useDropzone must be used within a DropzoneProvider`);return e},jxe=({className:e,children:t,...r})=>{let{fileError:i,handleDragLeave:a,handleDragOver:o,handleDrop:s,handleFiles:c,inputRef:l,isHovering:u,props:d}=EF(),f=d.disabled??!1,p=()=>{f||l.current?.click()};return(0,n.jsxs)(`div`,{"aria-disabled":f,"aria-invalid":i?!0:void 0,"aria-label":`File upload dropzone`,onClick:p,onDragLeave:a,onDragOver:o,onDrop:s,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p())},role:`button`,tabIndex:f?-1:0,className:Y(`flex size-full items-center justify-center rounded-xl border-2 border-brand-border bg-surface py-2xl transition-all outline-none focus-visible:outline-2 focus-visible:outline-brand-border-strong`,!f&&`cursor-pointer`,u&&`ring-8 ring-brand-border-strong/20`,i&&`border-error-border`,f&&`cursor-not-allowed opacity-50`,e),...r,children:[(0,n.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-lg`,children:t}),(0,n.jsx)(`input`,{...d,hidden:!0,onChange:c,onClick:e=>{e.currentTarget.value=``},ref:l,type:`file`})]})},Mxe=({className:e,children:t,ref:r,...i})=>{let{fileError:a}=EF();return!a&&!t?null:(0,n.jsxs)(`p`,{className:Y(`flex items-center gap-2xs style-text-strong--1 text-error-default`,e),ref:r,role:`alert`,...i,children:[(0,n.jsx)(Ei,{weight:`bold`}),t??a]})},Nxe=Jn(``,{variants:{orientation:{horizontal:`flex items-center justify-between gap-xs [&_[data-track]]:w-full [&_button]:shrink-0`,vertical:`flex flex-col space-y-3xs`},size:{small:`[&_[data-track]]:h-3xs`,medium:`[&_[data-track]]:h-2xs`,large:`[&_[data-track]]:h-xs`},tone:{brand:`[&_[data-indicator]]:bg-brand-default`,accent:`[&_[data-indicator]]:bg-accent-default`,neutral:`[&_[data-indicator]]:bg-neutral-default`,error:`[&_[data-indicator]]:bg-error-default`,info:`[&_[data-indicator]]:bg-info-default`,success:`[&_[data-indicator]]:bg-success-default`,warning:`[&_[data-indicator]]:bg-warning-default`}},defaultVariants:{orientation:`vertical`,size:`medium`,tone:`brand`}}),DF=({orientation:e,size:t,tone:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(Om,{className:Y(Nxe({orientation:e,size:t,tone:r,className:i})),ref:o,...s,children:a}),Pxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t}),OF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Am,{"data-indicator":!0,className:Y(`rounded-full transition-[width] duration-300 ease-in-out`,e),ref:r,...i,children:t}),Fxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mm,{className:Y(`flex items-center gap-2xs style-text-strong--1 text-on-surface [&>svg]:size-xs`,e),ref:r,...i,children:t}),kF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(km,{className:Y(`w-full self-center rounded-full bg-surface-low inset-shadow-2xs`,e),"data-track":!0,ref:r,...i,children:t}),AF=({className:e,ref:t,...r})=>(0,n.jsx)(jm,{className:Y(`ml-auto text-right style-text-prose--2 text-on-surface-variant`,e),ref:t,...r}),jF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t}),Ixe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`text-left style-text-prose--2 whitespace-nowrap text-on-surface-variant`,e),ref:r,...i,children:t}),Lxe=({className:e,children:t,ref:r,...i})=>{let{files:a,fileProgress:o,removeFile:s,onUpload:c}=EF();return(0,n.jsxs)(`ul`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:[a.map((e,t)=>{let r=o[wF(e)]??0,i=r>=0&&r<100,a=r>=100;return(0,n.jsxs)(`li`,{className:Y(`flex items-center justify-between gap-lg rounded-xl border bg-surface px-md py-sm`,i&&`border-border`,a&&`border-border`),children:[i&&(0,n.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-brand-container p-xs`,children:(0,n.jsx)(si,{className:`size-md text-brand-on-container`})}),a&&(0,n.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-success-container p-xs`,children:(0,n.jsx)($r,{className:`size-md text-success-on-container`})}),(0,n.jsxs)(`div`,{className:`flex w-full flex-col justify-between gap-3xs`,children:[(0,n.jsx)(`span`,{className:`style-text-default-0`,children:e.name}),c?(0,n.jsxs)(DF,{orientation:`vertical`,tone:r>=100?`success`:`brand`,value:r,children:[(0,n.jsx)(kF,{children:(0,n.jsx)(OF,{})}),(0,n.jsxs)(jF,{children:[(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:CF(e.size)}),(0,n.jsx)(AF,{})]})]}):(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:CF(e.size)})]}),(0,n.jsx)(Yv,{variant:`ghost`,tone:`error`,onClick:()=>s(e),children:(0,n.jsx)(Ci,{weight:`bold`})})]},t)}),t]})},Rxe=({className:e,children:t,ref:r,...i})=>{let{maxFileSize:a}=EF();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a]})},zxe=({className:e,children:t,ref:r,...i})=>{let{acceptedFileTypes:a}=EF();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[a.join(`, `),t]})},Bxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),Vxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`rounded-full bg-brand-container p-sm [&>svg]:size-lg [&>svg]:text-brand-on-container`,e),ref:r,...i,children:t}),Hxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`text-on-surface-variant`,e),ref:r,...i,children:t}),Uxe=({className:e,children:t,ref:r,...i})=>{let{inputRef:a}=EF();return(0,n.jsx)(Yv,{variant:`link`,onClick:e=>{e.stopPropagation(),a.current?.click()},className:Y(``,e),ref:r,...i,children:t})},Wxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col items-center justify-center gap-2xs`,e),ref:r,...i,children:t}),Gxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),Kxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-sm`,e),ref:r,...i,children:t}),qxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),Jxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center gap-xs`,e),ref:r,...i,children:t}),Yxe=({className:e,children:t,ref:r,...i})=>{let{files:a,onConfirm:o}=EF();return(0,n.jsx)(Yv,{disabled:a.length===0,onClick:()=>{o&&o(a)},className:Y(`w-full`,e),ref:r,...i,children:t})},Xxe=({className:e,children:t,ref:r,...i})=>{let{files:a,setFiles:o}=EF();return(0,n.jsx)(Yv,{disabled:a.length===0,onClick:()=>o([]),tone:`error`,variant:`outline`,className:Y(`w-full`,e),ref:r,...i,children:t})},MF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-2xs`,e),ref:r,...i,children:t}),NF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`p`,{className:Y(`style-text-prose--1 text-on-surface-variant`,e),ref:r,...i,children:t});function Zxe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function PF(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var FF=[],IF=0,{link:LF,unlink:Qxe,propagate:$xe,checkDirty:RF,shallowPropagate:zF}=Zxe({update(e){return e._update()},notify(e){FF[VF++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,GF(e))}}),BF=0,VF=0,HF,UF=0;function WF(e){try{++UF,e()}finally{--UF||KF()}}function GF(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Qxe(n,e)}function KF(){if(!(UF>0)){for(;BF<VF;){let e=FF[BF];FF[BF++]=void 0,e.notify()}BF=0,VF=0}}function qF(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return HF!==void 0&&LF(i,HF,IF),i._snapshot},subscribe(e){let t=PF(e),n={current:!1},r=eSe(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=HF,o=t?.compare??Object.is;if(n)HF=i,++IF,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{HF=a,n&&(i.flags&=-5),GF(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&RF(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&zF(e)}}else e&32&&(i.flags=e&-33);return HF!==void 0&&LF(i,HF,IF),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&($xe(e),zF(e),KF())}},i}function eSe(e){let t=()=>{let t=HF;HF=n,++IF,n.depsTail=void 0,n.flags=6;try{return e()}finally{HF=t,n.flags&=-5,GF(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&RF(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,GF(this)}};return t(),n}var JF=class{constructor(e,t){this.atom=qF(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(PF(e))}},tSe=class{constructor(e){this.atom=qF(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(PF(e))}};function YF(e,t){return typeof e==`function`?new tSe(e):t?new JF(e,t):new JF(e)}function XF(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=ZF(e);if(n.length!==ZF(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function ZF(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var nSe=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function rSe(e,t){return new nSe(e,t).maybeExecute}var iSe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},QF=new class extends iSe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function $F(e,t){return typeof e==`function`?e(t):e}function eI(e,t){return oI(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function tI(e,t,n){let r=oI(t);function i(e){if(!r.length)return $F(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function aSe(e,t){let n=oI(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var nI=46,rI=91,iI=93,aI=48,oSe=57;function oI(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===rI),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===nI||s===rI||s===iI){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==aI),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==iI&&(a!==-1||s!==iI)&&(a!==s||s!==nI&&s!==rI)&&n.push(``);r=o+1,i=!0}else(s<aI||s>oSe)&&(i=!1);a=s}return n.length||n.push(``),n}function sI(e,t){return e.length===0?t:t.length===0?e:t.startsWith(`[`)||t.startsWith(`.`)?e+t:`${e}.${t}`}function sSe(e){return!(Array.isArray(e)&&e.length===0)}function cI(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function lI(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var uI=e=>!!e&&typeof e==`object`&&`fields`in e;function dI(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!dI(e[i],t[i]))return!1;return!0}var fI=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},pI=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function mI(e,t){return e==null?t:{...e,...t}}for(var hI=256,gI=[],_I;hI--;)gI[hI]=(hI+256).toString(16).substring(1);function vI(){let e=0,t,n=``;if(!_I||hI+16>256){for(_I=Array(256),e=256;e--;)_I[e]=256*Math.random()|0;e=0,hI=0}for(;e<16;e++)t=_I[hI+e],n+=e===6?gI[t&15|64]:e===8?gI[t&63|128]:gI[t],e&1&&e>1&&e<11&&(n+=`-`);return hI++,n}var yI=rSe(e=>QF.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function bI(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=bI(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,bI(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(bI(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=bI(e[n]));return t}function xI(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var SI=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function CI(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var wI=(e,t)=>{let n=CI(e,t);return{form:n,fields:n}},TI={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:wI(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:wI(r.issues,e)}},EI=e=>!!e&&`~standard`in e,DI={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function OI(e){function t(t){let n=e.getFieldMeta(t)??DI;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>DI;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function kI(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var AI=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{yI(this)}),t=QF.on(`request-form-state`,e=>{e.payload.id===this._formId&&QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=QF.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=QF.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),QF.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!dI(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!dI(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(WF(()=>{this.baseStore.setState(()=>kI(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=OI(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=tI(t,e.instance.name,e.instance.options.defaultValue))}),kI({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return WF(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return WF(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=cI(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||SI}),r=!1,i={};return WF(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=jI(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=MI(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??DI,r=a?.[e],{newErrorValue:s,newSource:c}=fI({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=DI)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=MI(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=MI(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=lI(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||SI});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=MI(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=jI(r);s&&(i=i?{...i,...s}:s);let c=MI(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??DI,r=i?.[e],{newErrorValue:a,newSource:o}=fI({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=DI)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),WF(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}WF(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),WF(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>eI(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:$F(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=DI,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;WF(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:tI(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=aSe(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),OI(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],mI(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),OI(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),mI(r,{dontValidate:!0})),OI(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),mI(n,{dontValidate:!0})),OI(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return tI(tI(e,`${t}`,i),`${n}`,r)},mI(r,{dontValidate:!0})),OI(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},mI(r,{dontValidate:!0})),OI(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],mI(t,{dontValidate:!0})),OI(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=eI(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:DI},values:i===void 0?t.values:tI(t.values,e,i)}})},this.setErrorMap=e=>{WF(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(uI(t)){let{formError:e,fieldErrors:r}=jI(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>TI.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>TI.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??vI(),this._devtoolsSubmissionOverride=!1;let t=kI({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!uI(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=YF(t);let n;this.fieldMetaDerived=YF(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=eI(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!sSe(u),f=!o.isDirty,p=dI(l,this.getFieldInfo(a)?.instance?.options.defaultValue??eI(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=YF(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!xI(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&xI(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=YF(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&uI(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&dI(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return EI(e.validate)?TI[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function jI(e){return e?uI(e)?{formError:jI(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function MI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var NI=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...DI,isTouched:e.fieldMetaBase[this.name]?.isTouched??DI.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??DI.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??DI.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(dI(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,mI(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,mI(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,mI(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,mI(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=cI(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||SI}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=cI(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;WF(()=>{let e=(e,n)=>{let r=FI(n.cause),a=n.validate?PI(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=pI({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=FI(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=lI(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||SI}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=lI(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));WF(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=FI(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=PI(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=pI({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),WF(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[FI(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[FI(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>TI.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>TI.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)xI(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=YF(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...DI,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!dI(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return EI(e.validate)?TI[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function PI(e){if(e)return e}function FI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function II(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function LI(e){return{...DI,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var RI=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??II({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(dI(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...DI,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??II({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;BI(t)&&(n=t.group,r=t.fields);let i=zI(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:II({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,mI(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof NI&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&xI(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=fI({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=DI)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=cI(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||SI}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=cI(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;WF(()=>{let t=(t,r)=>{let i=HI(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&BI(s)&&(c=s.group,l=s.fields);let u=zI(c),d=n[i],{newErrorValue:f,newSource:p}=pI({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=HI(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=lI(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||SI}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=lI(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=HI(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&BI(o)&&(l=o.group,u=o.fields);let d=zI(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=pI({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return WF(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[HI(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),WF(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}WF(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),WF(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=YF(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??LI(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!dI(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(EI(e.validate)){let t=TI[e.type](e.value,e.validate);return e.type===`validate`?VI(t):t.then(VI)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function zI(e){if(e)return e}function BI(e){return!!e&&typeof e==`object`&&`fields`in e}function VI(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function HI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var UI=class e{constructor(t){if(this.getFormFieldName=e=>{if(typeof this.fieldsMap==`string`)return sI(this.fieldsMap,e);let t=oI(e)[0];if(typeof t!=`string`)return``;let n=e.slice(t.length),r=this.fieldsMap[t];return sI(r,n)},this.getFormFieldOptions=e=>{let t={...e},n=t.validators;if(t.name=this.getFormFieldName(e.name),n&&(n.onChangeListenTo||n.onBlurListenTo)){let e={...n},r=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=r(n.onChangeListenTo),e.onBlurListenTo=r(n.onBlurListenTo),t.validators=e}return t},this.mount=()=>()=>{},this.validateArrayFieldsStartingFrom=async(e,t,n)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,n),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,n)=>this.form.setFieldValue(this.getFormFieldName(e),t,n),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,n)=>this.form.pushFieldValue(this.getFormFieldName(e),t,n),this.insertFieldValue=async(e,t,n,r)=>this.form.insertFieldValue(this.getFormFieldName(e),t,n,r),this.replaceFieldValue=async(e,t,n,r)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,n,r),this.removeFieldValue=async(e,t,n)=>this.form.removeFieldValue(this.getFormFieldName(e),t,n),this.swapFieldValues=(e,t,n,r)=>this.form.swapFieldValues(this.getFormFieldName(e),t,n,r),this.moveFieldValues=(e,t,n,r)=>this.form.moveFieldValues(this.getFormFieldName(e),t,n,r),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),t.form instanceof e){let e=t.form;if(this.form=e.form,typeof t.fields==`string`)this.fieldsMap=e.getFormFieldName(t.fields);else{let n={...t.fields};for(let t in n)n[t]=e.getFormFieldName(n[t]);this.fieldsMap=n}}else this.form=t.form,this.fieldsMap=t.fields;this.store=YF(()=>{let e=this.form.store.get(),t;if(typeof this.fieldsMap==`string`)t=eI(e.values,this.fieldsMap);else{t={};let n=this.fieldsMap;for(let r in n)t[r]=eI(e.values,n[r])}return{values:t}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}};function WI(e,t){if(!t)return;let n=Object.assign({},e,{state:bI(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return WF(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}function GI(e,t){return e===t}function KI(e,t=e=>e,n){let r=n?.compare??GI,i=(0,v.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,v.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(i,o,o,t,r)}var qI=typeof window<`u`?v.useLayoutEffect:v.useEffect;function JI(e){let[t,n]=(0,v.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,v.useState)(()=>new NI({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new NI({...e}),i(a),n({form:e.form,name:e.name}));let o=KI(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=KI(a.store,e=>e.meta.isTouched),c=KI(a.store,e=>e.meta.isBlurred),l=KI(a.store,e=>e.meta.isDirty),u=KI(a.store,e=>e.meta.errorMap),d=KI(a.store,e=>e.meta.errorSourceMap),f=KI(a.store,e=>e.meta.isValidating),p=(0,v.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return qI(a.mount,[a]),qI(()=>{a.update(e)}),p}var YI=(({children:e,...t})=>{let r=JI(t),i=(0,v.useMemo)(()=>$F(e,r),[e,r]);return(0,n.jsx)(n.Fragment,{children:i})});function XI(){return(0,v.useState)(()=>vI())[0]}var ZI=v,QI=v.version.split(`.`)[0]===`17`?XI:ZI.useId;function $I(e){let[t,n]=(0,v.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,v.useState)(()=>new RI({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new RI({...e})),n({form:e.form,name:e.name}));let a=KI(r.store,e=>e.value),o=KI(r.store,e=>e.meta.isTouched),s=KI(r.store,e=>e.meta.isBlurred),c=KI(r.store,e=>e.meta.isDirty),l=KI(r.store,e=>e.meta.errorMap),u=KI(r.store,e=>e.meta.errorSourceMap),d=KI(r.store,e=>e.meta.isValidating),f=KI(r.store,e=>e.meta.isSubmitting),p=KI(r.store,e=>e.meta.isSubmitted),m=KI(r.store,e=>e.meta.submissionAttempts),h=KI(r.store,e=>e.meta.isSubmitSuccessful),g=KI(r.store,e=>e.meta.canSubmit),_=KI(r.store,e=>e.meta.isValid),y=KI(r.store,e=>e.meta.isFieldsValid),b=KI(r.store,e=>e.meta.isFieldsValidating),x=KI(r.store,e=>e.meta.isGroupValid),S=(0,v.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:y,isFieldsValidating:b,isGroupValid:x}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,y,b,x]);return qI(r.mount,[r]),qI(()=>{r.update(e)}),S}var eL=(({children:e,...t})=>{let r=$I(t),i=(0,v.useMemo)(()=>$F(e,r),[e,r]);return(0,n.jsx)(n.Fragment,{children:i})});function tL({form:e,selector:t=e=>e,children:r}){let i=KI(e.store,t);return(0,n.jsx)(n.Fragment,{children:$F(r,i)})}function nL(e){let t=QI(),[r,i]=(0,v.useState)(e?.formId),[a,o]=(0,v.useState)(()=>new AI({...e,formId:e?.formId??t}));if(r!==e?.formId){let n=e?.formId??t;o(new AI({...e,formId:n})),i(n)}let s=(0,v.useMemo)(()=>{let e={...a,handleSubmit:((...e)=>a._handleSubmit(...e)),get formId(){return a._formId},get state(){return a.store.state}};return e.Field=function(e){return(0,n.jsx)(YI,{...e,form:a})},e.FormGroup=function(e){return(0,n.jsx)(eL,{...e,form:a})},e.Subscribe=function(e){return(0,n.jsx)(tL,{form:a,selector:e.selector,children:e.children})},e},[a]);qI(a.mount,[]),qI(()=>{a.update(e)});let c=(0,v.useRef)(!1);return qI(()=>{c.current&&e?.transform&&WI(a,e.transform)},[a,e?.transform]),qI(()=>{c.current=!0}),s}function rL({lens:e,selector:t=e=>e,children:r}){let i=KI(e.store,t);return(0,n.jsx)(n.Fragment,{children:$F(r,i)})}function iL(e){let[t]=(0,v.useState)(()=>{let r=new UI(e),i=e.form instanceof UI?e.form.form:e.form,a=r;return a.AppForm=function(e){return(0,n.jsx)(i.AppForm,{...e})},a.AppField=function(e){return(0,n.jsx)(i.AppField,{...t.getFormFieldOptions(e)})},a.Field=function(e){return(0,n.jsx)(i.Field,{...t.getFormFieldOptions(e)})},a.Subscribe=function(e){return(0,n.jsx)(rL,{lens:t,selector:e.selector,children:e.children})},Object.assign(a,{...e.formComponents})});return qI(t.mount,[t]),t}var aL=(0,v.createContext)(null),oL=(0,v.createContext)(null);function sL(){let e=(0,v.useContext)(oL);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e}function cL(){function e(){let e=(0,v.useContext)(aL);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e}return{fieldContext:aL,useFieldContext:e,useFormContext:sL,formContext:oL}}function lL({fieldComponents:e,fieldContext:t,formContext:r,formComponents:i}){function a(a){let o=nL(a),s=(0,v.useMemo)(()=>({children:e})=>(0,n.jsx)(r.Provider,{value:o,children:e}),[o]),c=(0,v.useMemo)(()=>(({children:r,...i})=>(0,n.jsx)(o.Field,{...i,children:i=>(0,n.jsx)(t.Provider,{value:i,children:r(Object.assign(i,e))})})),[o]);return(0,v.useMemo)(()=>Object.assign(o,{AppField:c,AppForm:s,...i}),[o,c,s])}function o({render:e,props:t}){return function(n){return e({...t,...n})}}function s({render:e,props:t,defaultValues:n}){return function(r){let a=iL((0,v.useMemo)(()=>({form:r.form,fields:r.fields,defaultValues:n,formComponents:i}),[r.form,r.fields]));return e({...t,...r,group:a})}}function c(e){return sL()}function l(n){return lL({fieldContext:t,formContext:r,fieldComponents:{...e,...n.fieldComponents},formComponents:{...i,...n.formComponents}})}return{useAppForm:a,withForm:o,withFieldGroup:s,useTypedAppFormContext:c,extendForm:l}}var{fieldContext:uL,useFieldContext:dL,formContext:fL,useFormContext:pL}=cL(),mL=({className:e,children:t,ref:r,...i})=>{let a=dL().state.meta.errors;if((!a||a.length===0)&&!t)return null;let o=[],s=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(s):e&&typeof e==`object`&&(`issues`in e&&Array.isArray(e.issues)?e.issues.forEach(e=>{typeof e?.message==`string`&&o.push(e.message)}):`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(s))};return a?.forEach(s),o.length===0&&!t?null:(0,n.jsxs)(`ul`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:[o.map((e,t)=>(0,n.jsx)(`li`,{className:`flex items-center gap-2xs style-text-strong--1 text-error-default`,children:e},`${e}-${t}`)),t]})},hL=({fileUploadButtonIcon:e=(0,n.jsx)(wi,{weight:`bold`}),fileUploadButtonLabel:t,maxFiles:r,maxFileSize:i,clearFilesLabel:a=`Remove files`,filesSelectedLabel:o=e=>`${e} files selected`,maxFilesErrorLabel:s=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:c=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,compact:l,variant:u,size:d,className:f,ref:p,...m})=>{let h=(0,v.useRef)(null),[g,_]=(0,v.useState)(m.defaultValue||m.value||`#000000`),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(null);if(m.type===`color`){let e=m.value!==void 0,t=(e?m.value:g)||`#000000`,{onChange:r,defaultValue:i,value:a,...o}=m,s=t=>{e||_(t.currentTarget.value),r?.(t)},c=e=>{if(h.current=e,typeof p==`function`){p(e);return}p&&typeof p==`object`&&(p.current=e)};return l?(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative outline-2 outline-transparent transition-colors focus-within:outline-border hover:cursor-pointer`,d===`small`&&`size-lg -outline-offset-2`,d===`medium`&&`size-xl -outline-offset-4`,d===`large`&&`size-2xl -outline-offset-6`,f),disabled:m.disabled,onClick:()=>h.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`size-full`,d===`small`&&`rounded-lg`,d===`medium`&&`rounded-xl`,d===`large`&&`rounded-2xl`),style:{backgroundColor:t}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute`,defaultValue:e?void 0:t,onChange:s,ref:c,type:`color`,value:e?t:void 0,...o})]}):(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative flex hover:cursor-pointer`,Zv({variant:u,size:d}),f),disabled:m.disabled,onClick:()=>h.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`absolute top-1/2 left-xs aspect-square h-7/12 -translate-y-1/2`,d===`small`&&`rounded-md`,d===`medium`&&`rounded-lg`,d===`large`&&`rounded-xl`),style:{backgroundColor:t}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:e?void 0:t,onChange:s,ref:c,type:`color`,value:e?t:void 0,...o}),(0,n.jsx)(`p`,{className:Y(`text-left`,d===`small`&&`pr-2xs pl-lg style-text-default--1`,d===`medium`&&`pl-lg style-text-default-0`,d===`large`&&`pl-xl style-text-default-1`),children:t})]})}if(m.type===`file`){let{onChange:l,...u}=m,d=()=>{h.current&&(h.current.value=``),b([]),S(null)},f=e=>{let t=e.currentTarget,n=t.files?Array.from(t.files):[];if(r!==void 0&&n.length>r){b([]),S(s(r)),t.value=``;return}let a=i===void 0?void 0:n.find(e=>e.size>i);if(a&&i!==void 0){b([]),S(c(a.name,Ese(i))),t.value=``;return}S(null),b(n),l?.(e)};return(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-lg`,children:[(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsxs)(Yv,{variant:`soft`,tone:`neutral`,onClick:()=>h.current?.click(),children:[e,t]}),(0,n.jsx)(gm,{ref:h,...u,hidden:!0,onChange:f}),(0,n.jsx)(`p`,{className:`style-text-default-0`,children:x?(0,n.jsx)(`span`,{className:`style-text-prose-0 text-error-default`,children:x}):y.length===0?(0,n.jsx)(`span`,{className:`style-text-prose-0 text-on-surface-variant`,children:m?.placeholder}):y.length===1?y[0].name:o(y.length)})]}),(0,n.jsx)(Yv,{"aria-label":a,size:`iconMedium`,variant:`ghost`,tone:`error`,onClick:d,children:(0,n.jsx)(Di,{weight:`bold`})})]})}return(0,n.jsx)(gm,{className:Y(Zv({variant:u,size:d}),f),ref:p,...m})},gL=({className:e,children:t,ref:r,...i})=>{let a=dL(),o=a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid;return(0,n.jsx)(hL,{"aria-invalid":o,className:Y(``,e),id:a.name,name:a.name,onChange:e=>a.handleChange(e.target.value),ref:r,value:a.state.value,...i,children:t})},_L=Jn(`whitespace-nowrap`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`},variant:{primary:`text-on-surface`,secondary:`text-on-surface-variant`}},defaultVariants:{size:`medium`,variant:`primary`}}),vL=({size:e,variant:t,showRequired:r=!1,className:i,children:a,ref:o,...s})=>{let c=dL(),l=c.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase()),u=c.state.meta.errors.length>0;return(0,n.jsxs)(`div`,{className:Y(_L({size:e,variant:t}),i,u&&`text-error-default`),ref:o,...s,children:[a||l,r&&(0,n.jsx)(`span`,{className:`ml-3xs text-error-default`,children:`*`})]})},yL=({children:e,...t})=>(0,n.jsx)(Jv,{children:(0,n.jsx)(Rv,{...t,children:e})}),bL=({side:e=`top`,alignOffset:t=0,sideOffset:r=5,className:i,children:a,...o})=>(0,n.jsx)(Wv,{children:(0,n.jsx)(Kv,{side:e,alignOffset:t,sideOffset:r,children:(0,n.jsx)(qv,{className:Y(`z-50 w-fit origin-(--transform-origin) animate-in rounded-md bg-surface-2 px-xs py-3xs text-sm text-balance shadow-md fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,i),...o,children:a})})}),xL=({children:e,...t})=>(0,n.jsx)(Hv,{...t,render:e}),SL=({className:e,children:t,ref:r,...i})=>{let[a,o]=v.default.useState(!1),[s,c]=v.default.useState(!1);return v.default.useEffect(()=>{if(!s)return;let e=()=>c(!1);return window.addEventListener(`pointerup`,e),()=>window.removeEventListener(`pointerup`,e)},[s]),(0,n.jsxs)(yL,{open:a||s,trackCursorAxis:`x`,children:[(0,n.jsx)(xL,{delay:0,children:(0,n.jsx)(B_,{"data-slot":`slider-thumb`,className:Y(`absolute aspect-square rounded-full bg-surface transition-[width,height,opacity] outline-none data-dragging:cursor-grabbing data-dragging:shadow-sm hover:[&:not([data-dragging])]:cursor-pointer`,e),onPointerDown:()=>c(!0),onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),ref:r,...i,children:t})}),(0,n.jsx)(bL,{sideOffset:10,children:(0,n.jsx)(j_,{})})]})},CL=Jn(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-xs [&_[data-slot='slider-thumb']]:border [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-3xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-2 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-2xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-3 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`},tone:{brand:`[&_[data-slot='slider-thumb']]:border-brand-default [&_[data-slot=slider-indicator]]:bg-brand-default [&_[data-slot=slider-track]]:bg-brand-container-high`,accent:`[&_[data-slot='slider-thumb']]:border-accent-default [&_[data-slot=slider-indicator]]:bg-accent-default [&_[data-slot=slider-track]]:bg-accent-container-high`,neutral:`[&_[data-slot='slider-thumb']]:border-neutral-default [&_[data-slot=slider-indicator]]:bg-neutral-default [&_[data-slot=slider-track]]:bg-neutral-container-high`,error:`[&_[data-slot='slider-thumb']]:border-error-default [&_[data-slot=slider-indicator]]:bg-error-default [&_[data-slot=slider-track]]:bg-error-container-high`,info:`[&_[data-slot='slider-thumb']]:border-info-default [&_[data-slot=slider-indicator]]:bg-info-default [&_[data-slot=slider-track]]:bg-info-container-high`,success:`[&_[data-slot='slider-thumb']]:border-success-default [&_[data-slot=slider-indicator]]:bg-success-default [&_[data-slot=slider-track]]:bg-success-container-high`,warning:`[&_[data-slot='slider-thumb']]:border-warning-default [&_[data-slot=slider-indicator]]:bg-warning-default [&_[data-slot=slider-track]]:bg-warning-container-high`}},defaultVariants:{size:`medium`,tone:`brand`}}),wL=({size:e,tone:t,defaultValue:r,description:i,label:a,leadingIcon:o,max:s=100,min:c=0,showMax:l=!1,showMin:u=!1,trailingIcon:d,showThumbOnHover:f=!0,value:p,className:m,ref:h,...g})=>{let _=Array.isArray(p)?p:Array.isArray(r)?r:[c,s];return(0,n.jsxs)(`div`,{className:Y(CL({size:e,tone:t}),m),children:[a&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:a}),(0,n.jsxs)(A_,{"aria-label":a,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":Array.isArray(p)?p[0]:p??r??c,className:Y(`flex items-center gap-sm`,m),defaultValue:r,"data-slot":`slider-root`,max:s,min:c,ref:h,role:`slider`,value:p,...g,children:[o&&(0,n.jsx)(o,{className:`size-sm shrink-0`,weight:`fill`}),u&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:c}),(0,n.jsx)(I_,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,n.jsxs)(L_,{"data-slot":`slider-track`,className:Y(`relative size-full rounded-full`,!f&&`**:data-[slot='slider-thumb']:opacity-0 hover:**:data-[slot='slider-thumb']:opacity-100 active:**:data-[slot='slider-thumb']:opacity-100 data-dragging:**:data-[slot='slider-thumb']:opacity-100`),children:[(0,n.jsx)(V_,{"data-slot":`slider-indicator`,className:`rounded-full`}),Array.from({length:_.length},(e,t)=>(0,n.jsx)(SL,{index:t},t))]})}),l&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:s}),d&&(0,n.jsx)(d,{className:`size-sm shrink-0`,weight:`fill`})]}),i&&(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:i})]})},TL=({className:e,ref:t,...r})=>{let i=dL();return(0,n.jsx)(wL,{className:Y(``,e),onValueChange:e=>i.setValue(e),ref:t,value:i.state.value,...r})},EL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(zM,{value:r.state.value,onValueChange:e=>r.setValue(e),...t,children:e})},DL=Jn(`relative flex resize flex-col overflow-hidden rounded-xl outline outline-transparent transition-[outline] hover:not-focus-within:outline-border-strong data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`}},defaultVariants:{variant:`primary`}}),OL=({variant:e,className:t,ref:r,...i})=>{let a=i.value!==void 0,[o,s]=v.default.useState(String(i.defaultValue??``)),c=a?String(i.value??``):o,l=i.maxLength,u=typeof l==`number`,d=u&&c.length>=l,f=e=>{a||s(e.target.value),i.onChange?.(e)};return(0,n.jsxs)(`div`,{className:Y(DL({variant:e,className:t}),d?`outline-error-border-strong`:`focus-within:outline-brand-border-strong`),"data-disabled":i.disabled?!0:void 0,children:[(0,n.jsx)(`textarea`,{className:`grow resize-none px-sm py-xs style-text-prose-0 outline-none focus-within:caret-brand-border-strong`,ref:r,...i,onChange:f,value:c}),u&&(0,n.jsxs)(`span`,{className:Y(`w-full px-xs py-2xs text-right style-text-default--1 text-on-surface-variant`,d&&`text-error-default`),children:[c.length,` / `,l]})]})},kL=({className:e,ref:t,...r})=>{let i=dL(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,n.jsx)(OL,{"aria-invalid":a,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})},AL=Jn(`flex items-center gap-2xs select-none hover:cursor-pointer`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),jL=({className:e,children:t,ref:r,size:i,...a})=>(0,n.jsx)(`label`,{className:AL({className:e,size:i}),"data-slot":`label`,htmlFor:a.htmlFor,ref:r,...a,children:t}),ML=({...e})=>{let t=dL();return(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(IM,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e}),e.label&&(0,n.jsx)(jL,{htmlFor:t.name,children:e.label})]})},NL=Jn(`group flex size-sm shrink-0 items-center justify-center rounded-full outline outline-transparent transition-all hover:outline-border-strong data-checked:bg-brand-default data-checked:outline-brand-border-strong data-disabled:opacity-50`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low inset-shadow-2xs`}},defaultVariants:{variant:`elevated`}}),PL=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(jL,{htmlFor:a.id,children:[(0,n.jsx)(xg,{className:Y(NL({variant:e,className:t})),ref:i,...a,children:(0,n.jsx)(Sg,{"data-indicator":!0,className:`size-2xs origin-center scale-0 rounded-full bg-surface shadow-2xs transition-transform duration-200 ease-out data-checked:scale-100`})}),r]}),FL=({className:e,children:t,ref:r,...i})=>{let a=v.useId();return(0,n.jsx)(Cg,{"aria-labelledby":a,className:Y(`flex flex-col items-start gap-2xs data-disabled:opacity-50`,e),ref:r,...i,children:t})},IL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(PL,{...t,onChange:e=>r.handleChange(e.target.value),value:r.state.value,children:e})},LL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(FL,{name:r.name,onChange:e=>{let t=e.target;t.type===`radio`&&r.handleChange(t.value)},value:r.state.value,...t,children:e})},RL=({label:e,className:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(W_,{"aria-label":e??void 0,className:Y(`group relative flex h-md w-xl items-center rounded-full bg-surface-low inset-shadow-2xs outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer hover:not-disabled:outline-accent-border-strong disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent-default data-disabled:pointer-events-none data-disabled:opacity-50`,t),ref:r,...i,children:(0,n.jsx)(G_,{className:`aspect-square size-xs translate-x-2xs rounded-full shadow-2xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-sm data-checked:translate-x-md data-checked:bg-accent-on-default data-unchecked:bg-accent-default`})}),e&&(0,n.jsx)(jL,{htmlFor:i.id,children:e})]}),zL=({...e})=>{let t=dL();return(0,n.jsx)(RL,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e})},BL=(0,v.createContext)(void 0),VL=Jn(`flex items-center justify-center text-on-surface-variant transition-all hover:cursor-pointer disabled:opacity-70`,{variants:{size:{iconSmall:`size-md rounded-md [&>svg]:size-xs`,iconMedium:`size-lg rounded-lg [&>svg]:size-sm`,iconLarge:`size-xl rounded-xl [&>svg]:size-md`,small:`h-md gap-3xs rounded-md px-2xs style-text-default--2 [&>svg]:size-xs`,medium:`h-lg gap-2xs rounded-lg px-xs style-text-default--1 [&>svg]:size-sm`,large:`h-xl gap-xs rounded-xl px-sm style-text-default-0 [&>svg]:size-md`},tone:{brand:`hover:not-disabled:bg-brand-container hover:not-disabled:text-brand-on-container data-pressed:text-brand-default`,accent:`hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default`,neutral:`hover:not-disabled:bg-surface-low hover:not-disabled:text-neutral-on-container data-pressed:text-neutral-default`,error:`hover:not-disabled:bg-error-container hover:not-disabled:text-error-on-container data-pressed:text-error-default`,info:`hover:not-disabled:bg-info-container hover:not-disabled:text-info-on-container data-pressed:text-info-default`,success:`hover:not-disabled:bg-success-container hover:not-disabled:text-success-on-container data-pressed:text-success-default`,warning:`hover:not-disabled:bg-warning-container hover:not-disabled:text-warning-on-container data-pressed:text-warning-default`}},defaultVariants:{size:`medium`,tone:`brand`}}),HL=({size:e,tone:t,className:r,children:i,ref:a,...o})=>{let s=(0,v.useContext)(BL),c=e??s?.size??`medium`;return(0,n.jsx)(Nv,{ref:a,...o,render:(e,a)=>(0,n.jsx)(`button`,{...e,className:Y(VL({size:c,tone:t,className:r})),type:`button`,children:typeof i==`function`?i(a):i})})},UL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(HL,{id:r.name,name:r.name,onChange:e=>r.handleChange(!r.state.value),pressed:r.state.value,...t,children:e})},WL=({className:e,children:t,ref:r,...i})=>{let a=dL(),o=a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid;return(0,n.jsx)(iF,{"aria-invalid":o,className:Y(``,e),id:a.name,ref:r,...i,children:t})},GL=({className:e,ref:t,...r})=>{let i=dL(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,n.jsx)(oF,{"aria-invalid":a,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})},KL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full flex-col gap-2xs`,e),ref:r,...i,children:t}),qL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-sm`,e),ref:r,...i,children:t}),JL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`form`,{className:Y(`flex flex-col gap-sm`,e),ref:r,...i,children:t}),YL=(e,t)=>{if(e!=null){if(typeof e==`string`){e.trim()&&t.add(e);return}if(Array.isArray(e)){e.forEach(e=>YL(e,t));return}if(typeof e==`object`){let n=e.message;if(typeof n==`string`){t.add(n);return}Object.values(e).forEach(e=>YL(e,t))}}},XL=({className:e,children:t,ref:r,...i})=>{let a=pL();return(0,n.jsx)(a.Subscribe,{selector:e=>[e.errors],children:([a])=>{let o=new Set;return YL(a,o),o.size===0?null:(0,n.jsxs)(ki,{className:Y(``,e),ref:r,tone:`error`,...i,children:[(0,n.jsx)(Oi,{weight:`duotone`}),(0,n.jsxs)(ji,{children:[t,(0,n.jsx)(Ai,{children:(0,n.jsx)(`ul`,{children:[...o].map(e=>(0,n.jsx)(`li`,{children:e},e))})})]})]})}})},ZL=({orientation:e=`horizontal`,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex gap-2xs`,t,e===`horizontal`?`flex-row`:`flex-col`),ref:i,...a,children:r}),QL=({className:e,children:t,ref:r,...i})=>{let a=pL(),o=()=>{a.reset()};return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(Yv,{className:Y(`w-full`,e),disabled:!a.values,onClick:o,ref:r,type:`reset`,...i,children:t})})},$L=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),eR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),tR=Jn(``,{variants:{size:{small:`style-text-strong-0`,medium:`style-text-strong-1`,large:`style-text-strong-2`}},defaultVariants:{size:`medium`}}),nR=({size:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`span`,{className:Y(tR({size:e,className:t})),ref:i,...a,children:r}),rR=({className:e,children:t,ref:r,...i})=>{let a=pL();return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(Yv,{className:Y(`w-full`,e),disabled:a.isSubmitting||!a.canSubmit,ref:r,type:`submit`,...i,children:a.isSubmitting?(0,n.jsx)(ti,{className:`animate-spin`,weight:`bold`}):t})})},{useAppForm:iR,withFieldGroup:aR,withForm:oR,useTypedAppFormContext:sR}=lL({fieldContext:uL,fieldComponents:{FieldCheckbox:ML,FieldDescription:NF,FieldErrors:mL,FieldRow:qL,FieldInput:gL,FieldInputGroup:WL,FieldInputGroupInput:GL,FieldLabel:vL,FieldRadio:IL,FieldRadioGroup:LL,FieldSelect:EL,FieldSet:KL,FieldSlider:TL,FieldSwitch:zL,FieldTextArea:kL,FieldToggle:UL},formContext:fL,formComponents:{FormErrors:XL,FormFooter:ZL,FormReset:QL,FormSet:$L,FormSetHeading:nR,FormSetContent:eR,FormSubmit:rR}}),cR=({children:e,className:t,ref:r,...i})=>(0,n.jsx)(Zh,{className:Y(`group flex items-center gap-2xs has-disabled:opacity-30`,t),ref:r,...i,children:e}),lR=({className:e,...t})=>(0,n.jsx)(Qh,{className:Y(`relative h-lg w-md rounded-md bg-surface text-center style-text-default-0 shadow-2xs outline outline-transparent transition-colors hover:outline-border-strong focus:outline-brand-border-strong`,e),...t}),uR=({className:e,ref:t,...r})=>(0,n.jsx)(ip,{className:Y(`flex items-center justify-center text-on-surface-variant`,e),ref:t,...r,children:(0,n.jsx)(_i,{weight:`bold`})}),dR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex h-md items-center justify-center rounded-md bg-neutral-container-high px-2xs align-middle style-text-default--1 whitespace-nowrap text-neutral-on-container select-none [&:has(svg)]:size-md [&:has(svg)]:p-0 [&>svg]:size-sm`,e),ref:r,...i,children:t});function fR(e){return pR(e)||typeof e==`function`||mR(e)}function pR(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function mR(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function hR(e,t){return e==null?null:fR(e)?v.default.createElement(e,t):e}function gR(e){if(`cell`in e&&e.cell){let t=e.cell,n=t.column.columnDef,r=t,i=n;return r.getIsAggregated?.()?hR(i.aggregatedCell??n.cell,t.getContext()):r.getIsPlaceholder?.()?null:hR(n.cell,t.getContext())}return`header`in e&&e.header?hR(e.header.column.columnDef.header,e.header.getContext()):`footer`in e&&e.footer?hR(e.footer.column.columnDef.footer,e.footer.getContext()):null}function _R(e){let t=KI(e.source,e.selector,{compare:XF});return typeof e.children==`function`?e.children(t):e.children}function vR(e){let t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),`set`in e&&(t.setState=e.set.bind(e)),t}function yR(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error(`Feature not supported in current reactivity implementation`)},unmount:()=>{throw Error(`Feature not supported in current reactivity implementation`)},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i=n?.compare??Object.is,a=!1,o,s=()=>{let t=e();return(!a||!i(o,t))&&(o=t,a=!0),o},c=t(()=>(r.get(),s()),{compare:i});return{get:s,subscribe:c.subscribe.bind(c)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}function bR(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:e=>{r=e,n=!0},subscribe:i=>e.subscribe(e=>{(!n||!t(r,e))&&i(e)})}}function xR(){return yR({createAtom:qF,batch:WF})}function SR(e,t){return typeof e==`function`?e(t):e}function CR(e){if(Array.isArray(e))return e.map(CR);if(e&&typeof e==`object`){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=t===null?TR():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:CR(e[i]),writable:!0})}return n}return e}function wR(e,t){let n=Object.keys(t),r=e;for(let e=0;e<n.length;e++){let i=n[e];!i.startsWith(`_memo_`)&&i!==`_cellsCache`&&(r[i]=t[i])}return e}function TR(){return Object.create(null)}function ER(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function DR(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>SR(n,e))}}function OR(e){if(typeof e!=`object`||!e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function kR(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var AR=3;function jR(e,t){return MR(e,t,AR)}function MR(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!OR(e)||!OR(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;let r=kR(e),i=kR(t);if(r.length!==i.length)return!1;let a=e,o=t;for(let e=0;e<r.length;e++){let i=r[e];if(!Object.prototype.propertyIsEnumerable.call(t,i)||!MR(a[i],o[i],n-1))return!1}return!0}function NR(e,t,n,r=jR){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(e=>{let t=SR(n,e);return r(e,t)?e:t})}function PR(e){return e instanceof Function}function FR(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i.length&&r(i)})};return r(e),n}var IR=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return c=>{i?.();let l=t?.(c),u=!l||l.length!==o?.length;if(!u&&l){for(let e=0;e<l.length;e++)if(l[e]!==o[e]){u=!0;break}}return n?.(u),u?(o=l,a?.(),s=e(...l??[]),r?.(s),s):s}};function LR(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}var RR=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};function zR({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){let o,s,c=0,l;if(process.env.NODE_ENV===`development`){let{debugAll:n}=i.options,{parentName:r}=BR(t,`.`),a=i.options[`debug${(r==`table`?r:r+`s`).replace(r,r.charAt(0).toUpperCase()+r.slice(1))}`],o=e?i.options[`debug${e.charAt(0).toUpperCase()+e.slice(1)}`]:!1;l=n||a||o}function u(r,o){let s=c===0?`(1st run)`:o?`(rerun #`+c+`)`:`(cache)`;c++,console.groupCollapsed(`%c⏱ ${RR(`${r.toFixed(1)} ms`,12)} %c${s}%c ${t}%c ${n?`(${t.split(`.`)[0]}Id: ${n})`:``}`,`font-size: .6rem; font-weight: bold; ${o?`color: hsl(
|
|
57
|
+
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function gF(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var kbe=(e,t)=>Math.abs(e-t)<1.01,Abe=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},_F,vF=()=>{if(_F!==void 0)return _F;if(typeof navigator>`u`)return _F=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return _F=!0;let e=navigator.maxTouchPoints;return _F=navigator.platform===`MacIntel`&&e!==void 0&&e>0},yF=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},jbe=e=>e,Mbe=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Nbe=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(yF(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(yF(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},bF={passive:!0},Pbe=typeof window>`u`||`onscrollend`in window,Fbe=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Pbe,o=0,s=a?null:Abe(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,bF),a&&r.addEventListener(`scrollend`,u,bF),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},Ibe=(e,t)=>Fbe(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),Lbe=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},Rbe=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},zbe=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:jbe,rangeExtractor:Mbe,onChange:()=>{},measureElement:Lbe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=Math.max(0,e.start+t);n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=hF(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!==`production`&&`maybeNotify`,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!vF()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,bF),e.addEventListener(`touchend`,n,bF),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(vF()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=hF(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=hF(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=Obe(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!==`production`&&`getMeasurements`,debug:()=>this.options.debug}),this.calculateRange=hF(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=Vbe(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:process.env.NODE_ENV!==`production`&&`calculateRange`,debug:()=>this.options.debug}),this.getVirtualIndexes=hF(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:process.env.NODE_ENV!==`production`&&`getVirtualIndexes`,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f)}},this.getVirtualItems=hF(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:process.env.NODE_ENV!==`production`&&`getVirtualItems`,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return gF(t[xF(0,t.length-1,r?e=>n[e*2]:e=>gF(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e!==0&&(process.env.NODE_ENV!==`production`&&this.options.debug&&console.info(`correction`,e),vF()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&kbe(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},xF=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Bbe(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function Vbe(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=Bbe(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=xF(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var SF=typeof document<`u`?v.useLayoutEffect:v.useEffect;function Hbe({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...i}){let a=v.useReducer(e=>e+1,0)[1],o=v.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=n;let s=e=>{let t=o.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},c=e=>{let t=o.current;if(!t.enabled||!t.container)return;s(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,a=e.options.scrollMargin,c=e.getVirtualItems();for(let o of c){let s=o.start-a,c=e.elementsCache.get(o.key);c&&t.lastPositions.get(c)!==s&&(t.lastPositions.set(c,s),r?c.style.transform=n?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:c.style[i]=`${s}px`)}},l={...i,onChange:(t,n)=>{var s;let l=o.current,u=!0;if(l.enabled){c(t);let e=t.range,n=l.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,u&&(l.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n?(0,r.flushSync)(a):a()),(s=i.onChange)==null||s.call(i,t,n)}},[u]=v.useState(()=>{let e=new zbe(l);return Object.assign(e,{containerRef:t=>{let n=o.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return u.setOptions(l),SF(()=>u._didMount(),[]),SF(()=>(s(u),u._willUpdate())),SF(()=>{c(u)}),u}function Ube(e){return Hbe({observeElementRect:Nbe,observeElementOffset:Ibe,scrollToFn:Rbe,...e})}var Wbe=Kre,Gbe=({open:e,virtualizerRef:t,estimateSize:r=32,overscan:i=20,className:a,children:o,...s})=>{let c=Wbe(),l=v.default.useRef(null),u=Ube({enabled:e,count:c.length,getScrollElement:()=>l.current,estimateSize:()=>r,overscan:i,paddingStart:8,paddingEnd:8,scrollPaddingStart:8,scrollPaddingEnd:8});v.default.useEffect(()=>{t&&(t.current=u)},[u,t]);let d=v.default.useCallback(e=>{l.current=e,e&&u.measure()},[u]),f=u.getTotalSize();return c.length?(0,n.jsx)(`div`,{role:`presentation`,ref:d,style:{"--total-size":`${f}px`},className:Y(`h-[min(22.5rem,var(--total-size))] max-h-(--available-height) scroll-py-3xs overflow-auto overscroll-contain`,a),...s,children:(0,n.jsx)(`div`,{role:`presentation`,className:`relative w-full`,style:{height:f},children:u.getVirtualItems().map(e=>{let t=c[e.index];return t?(0,n.jsx)(mF,{index:e.index,"data-index":e.index,ref:u.measureElement,value:t,"aria-setsize":c.length,"aria-posinset":e.index+1,className:`first-of-type:mt-0!`,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:typeof o==`function`?o(t):o},e.key):null})})}):null},Kbe=({children:e,...t})=>(0,n.jsx)(Oie,{...t,children:e}),qbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Sf,{className:Y(`grid cursor-default grid-cols-[1fr_2rem] items-center rounded-md px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1`,children:t}),(0,n.jsx)(Cf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Jbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Tf,{className:Y(``,e),ref:r,...i,children:t}),Ybe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ef,{className:Y(`cursor-default px-2xs py-3xs style-text-default--2 text-on-surface-variant select-none`,e),ref:r,...i,children:t}),Xbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Ff,{className:Y(`mx-3xs`,e),ref:r,...i,children:t}),Zbe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(Lf,{className:Y(`grid cursor-default grid-cols-[1fr_2rem] items-center rounded-md px-2xs py-3xs style-text-default-0 outline-none select-none before:absolute before:inset-[0px] before:z-[-1] before:rounded-md before:content-[""] hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,e),ref:r,...i,children:[(0,n.jsx)(`span`,{className:`col-start-1 flex min-w-3xl items-center gap-2xs [&>svg]:size-sm`,children:t}),(0,n.jsx)(Rf,{className:`col-start-2 flex items-center justify-center place-self-end self-center`,children:(0,n.jsx)($r,{className:`size-sm`,weight:`bold`})})]}),Qbe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto inline-flex items-center gap-3xs`,e),ref:r,...i,children:t}),$be=Jn(`flex cursor-default items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),exe=Jn(`grid cursor-default grid-cols-[1fr_2rem] items-center px-sm py-3xs style-text-default-0 outline-none select-none before:outline before:outline-transparent hover:cursor-pointer data-highlighted:relative data-highlighted:z-0 data-highlighted:before:absolute data-highlighted:before:inset-x-3xs data-highlighted:before:inset-y-[0px] data-highlighted:before:z-[-1] data-highlighted:before:rounded-md data-popup-open:relative data-popup-open:z-0 data-popup-open:before:absolute data-popup-open:before:inset-x-3xs data-popup-open:before:inset-y-[0px] data-popup-open:before:z-[-1] data-popup-open:before:rounded-sm`,{variants:{tone:{brand:`text-brand-default data-highlighted:text-brand-on-container data-highlighted:before:bg-brand-container data-popup-open:text-brand-on-container data-popup-open:before:bg-brand-container data-[highlighted]:data-[popup-open]:before:bg-brand-container`,accent:`text-accent-default data-highlighted:text-accent-on-container data-highlighted:before:bg-accent-container data-popup-open:text-accent-on-container data-popup-open:before:bg-accent-container data-[highlighted]:data-[popup-open]:before:bg-accent-container`,neutral:`text-on-surface data-highlighted:text-neutral-on-container data-highlighted:before:bg-neutral-container-high data-popup-open:text-neutral-on-container data-popup-open:before:bg-neutral-container-high data-[highlighted]:data-[popup-open]:before:bg-neutral-container-high`,error:`text-error-default data-highlighted:text-error-on-container data-highlighted:before:bg-error-container data-popup-open:text-error-on-container data-popup-open:before:bg-error-container data-[highlighted]:data-[popup-open]:before:bg-error-container`,info:`text-info-default data-highlighted:text-info-on-container data-highlighted:before:bg-info-container data-popup-open:text-info-on-container data-popup-open:before:bg-info-container data-[highlighted]:data-[popup-open]:before:bg-info-container`,success:`text-success-default data-highlighted:text-success-on-container data-highlighted:before:bg-success-container data-popup-open:text-success-on-container data-popup-open:before:bg-success-container data-[highlighted]:data-[popup-open]:before:bg-success-container`,warning:`text-warning-default data-highlighted:text-warning-on-container data-highlighted:before:bg-warning-container data-popup-open:text-warning-on-container data-popup-open:before:bg-warning-container data-[highlighted]:data-[popup-open]:before:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),txe=({className:e,tone:t,children:r,ref:i,...a})=>(0,n.jsx)(Df,{className:Y($be({tone:t}),e),ref:i,...a,children:(0,n.jsx)(`div`,{className:`flex w-full items-center gap-2xs [&>svg]:size-sm`,children:r})}),nxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mf,{children:(0,n.jsx)(Nf,{children:(0,n.jsx)(Af,{className:Y(`w-[calc(100%+var(--spacing-xl))] origin-(--transform-origin) translate-x-[-calc(var(--spacing-xl)/2)] space-y-3xs rounded-xl bg-surface-2 p-3xs py-2xs shadow-md transition-[transform,scale,opacity] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})})}),rxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(ip,{className:Y(`mx-2xs my-3xs h-px bg-border-strong`,e),ref:r,...i,children:t}),ixe=({children:e,...t})=>(0,n.jsx)(Wf,{...t,children:e}),axe=({className:e,children:t,ref:r,tone:i,...a})=>(0,n.jsxs)(op,{className:Y(exe({tone:i}),e),ref:r,...a,children:[(0,n.jsx)(`span`,{className:`col-start-1 flex min-w-3xl items-center gap-2xs pr-2xl`,children:t}),(0,n.jsx)(Xr,{className:`col-start-2 size-xs place-self-end self-center`,weight:`bold`}),` `]}),oxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(cp,{className:Y(`flex min-w-0 flex-1`,e),ref:r,...i,children:t}),sxe=({children:e,...t})=>(0,n.jsx)(dp,{...t,children:e}),cxe=({className:e,ref:t,...r})=>(0,n.jsx)(el,{className:Y(`absolute top-2xs right-2xs`,e),ref:t,...r,render:(0,n.jsx)(Yv,{"aria-label":`Close`,variant:`ghost`,size:`iconSmall`,tone:`error`,children:(0,n.jsx)(Di,{weight:`bold`})})}),lxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex h-full flex-col gap-2xs`,e),ref:r,...i,children:t}),uxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(tl,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t}),dxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-end gap-2xs`,e),ref:r,...i,children:t}),fxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col`,e),ref:r,...i,children:t}),pxe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(xl,{children:[(0,n.jsx)($c,{className:`fixed inset-[0px] z-998 min-h-dvh transition-all duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute`,style:{backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`}}),(0,n.jsx)(vl,{className:Y(`fixed top-1/2 left-1/2 z-999 flex max-w-[calc(100vw-3rem)] min-w-1/6 -translate-1/2 flex-col gap-sm overflow-hidden rounded-3xl bg-surface-2 p-md shadow-lg transition-all duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0`,e),ref:r,...i,children:t})]}),mxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Sl,{className:Y(`flex items-center gap-2xs style-text-strong-1 [&>svg]:size-md`,e),ref:r,...i,children:t}),hxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(El,{className:Y(``,e),ref:r,...i,render:t}),gxe=Aie,_xe=({children:e,...t})=>(0,n.jsx)(Wie,{...t,children:e}),vxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(jie,{className:Y(`shrink-0`,e),ref:r,...i,render:t}),yxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(gp,{className:Y(`mx-auto w-full max-w-[32rem] space-y-3xs`,e),ref:r,...i,children:t}),bxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mie,{className:Y(`style-text-prose-0 text-on-surface-variant`,e),ref:r,...i,children:t}),xxe=({children:e,...t})=>(0,n.jsxs)(Bie,{...t,children:[(0,n.jsx)(bp,{}),(0,n.jsx)(yp,{className:`size-full`,children:e})]}),Sxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(tae,{className:Y(``,e),ref:r,...i,render:t}),Cxe=`fixed inset-0 min-h-dvh bg-scrim opacity-[calc(var(--backdrop-opacity)*(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] [--backdrop-opacity:0.2] [--bleed:3rem] data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-starting-style:opacity-0 data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute dark:[--backdrop-opacity:0.7]`,wxe=Y(`fixed inset-0 flex`,`items-end justify-center`,`has-[[data-swipe-direction=up]]:items-start has-[[data-swipe-direction=up]]:justify-center`,`has-[[data-swipe-direction=right]]:items-center has-[[data-swipe-direction=right]]:justify-end`,`has-[[data-swipe-direction=left]]:items-center has-[[data-swipe-direction=left]]:justify-start`),Txe=Y(`touch-auto overflow-y-auto overscroll-contain bg-surface-background p-md outline outline-border-strong transition-transform duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*0.4s)] data-swiping:select-none`,`mb-[-3rem] max-h-[calc(80vh+3rem)] w-full transform-[translateY(var(--drawer-swipe-movement-y))] rounded-t-2xl pb-[calc(1.5rem+env(safe-area-inset-bottom,0)+3rem)] shadow-[0_-8px_24px_var(--color-shadow)] data-ending-style:transform-[translateY(calc(100%-3rem+2px))] data-starting-style:transform-[translateY(calc(100%-3rem+2px))]`,`data-[swipe-direction=up]:mt-[-3rem] data-[swipe-direction=up]:mb-0 data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-2xl data-[swipe-direction=up]:pt-[calc(1.5rem+env(safe-area-inset-top,0)+3rem)] data-[swipe-direction=up]:pb-md data-[swipe-direction=up]:shadow-[0_8px_24px_var(--color-shadow)] data-[swipe-direction=up]:data-ending-style:transform-[translateY(calc(-100%+3rem-2px))] data-[swipe-direction=up]:data-starting-style:transform-[translateY(calc(-100%+3rem-2px))]`,`data-[swipe-direction=right]:mr-[-3rem] data-[swipe-direction=right]:mb-0 data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-dvh data-[swipe-direction=right]:w-[23rem] data-[swipe-direction=right]:max-w-[calc(100vw-3rem)] data-[swipe-direction=right]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl data-[swipe-direction=right]:pr-[4.5rem] data-[swipe-direction=right]:pb-md data-[swipe-direction=right]:shadow-[-8px_0_24px_var(--color-shadow)] data-[swipe-direction=right]:data-ending-style:transform-[translateX(calc(100%-3rem+2px))] data-[swipe-direction=right]:data-starting-style:transform-[translateX(calc(100%-3rem+2px))]`,`data-[swipe-direction=left]:mb-0 data-[swipe-direction=left]:ml-[-3rem] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-dvh data-[swipe-direction=left]:w-[23rem] data-[swipe-direction=left]:max-w-[calc(100vw-3rem)] data-[swipe-direction=left]:transform-[translateX(var(--drawer-swipe-movement-x))] data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl data-[swipe-direction=left]:pb-md data-[swipe-direction=left]:pl-[4.5rem] data-[swipe-direction=left]:shadow-[8px_0_24px_var(--color-shadow)] data-[swipe-direction=left]:data-ending-style:transform-[translateX(calc(-100%+3rem-2px))] data-[swipe-direction=left]:data-starting-style:transform-[translateX(calc(-100%+3rem-2px))]`),Exe=({className:e,children:t,ref:r,...i})=>(0,n.jsxs)(zie,{children:[(0,n.jsx)(mp,{className:Cxe}),(0,n.jsx)(Jp,{className:wxe,children:(0,n.jsx)(Ap,{className:Y(Txe,e),ref:r,...i,children:t})})]}),Dxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(eae,{className:Y(`style-text-strong-1`,e),ref:r,...i,children:t}),Oxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-start justify-between pb-sm`,e),ref:r,...i,children:t}),CF=e=>{if(e<1e3)return`${e} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e/1e3,r=0;for(;n>=1e3&&r<t.length-1;)n/=1e3,r+=1;return`${n.toFixed(n%1==0?0:1)}${t[r]}`},wF=e=>`${e.name}-${e.size}-${e.lastModified}`,kxe=(e,t)=>{if(t.length===0)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>{let t=e.toLowerCase();return t.startsWith(`.`)?n.endsWith(t):t.endsWith(`/*`)?r.startsWith(`${t.slice(0,-1)}`):r===t})},TF=v.default.createContext(null),Axe=({maxFiles:e,maxFileSize:t,maxFilesErrorLabel:r=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:i=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,fileTypeErrorLabel:a=e=>`"${e}" is not an accepted file type.`,onUpload:o,ref:s,className:c,children:l,onChange:u,onConfirm:d,...f})=>{let p=v.default.useRef(null),m=v.default.useRef([]),[h,g]=v.default.useState(!1),[_,y]=v.default.useState([]),[b,x]=v.default.useState(null),[S,C]=v.default.useState({});v.default.useEffect(()=>{m.current=_},[_]);let w=v.default.useMemo(()=>typeof f.accept==`string`?f.accept.split(`,`).map(e=>e.trim()).filter(Boolean):[],[f.accept]),T=v.default.useCallback(e=>{if(!p.current)return;let t=new DataTransfer;e.forEach(e=>t.items.add(e)),p.current.files=t.files},[]),E=v.default.useCallback(e=>f.multiple?[...m.current,...e].filter((e,t,n)=>n.findIndex(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)===t):e.slice(0,1),[f.multiple]),D=v.default.useCallback(e=>{let t=wF(e);y(t=>{let n=t.filter(t=>t!==e);return m.current=n,T(n),n}),C(e=>{let n={...e};return delete n[t],n}),x(null)},[T]),O=v.default.useCallback(e=>{e.forEach(e=>{let t=wF(e);if(!o){C(e=>({...e,[t]:100}));return}C(e=>({...e,[t]:0})),o(e,e=>{C(n=>({...n,[t]:Math.max(0,Math.min(100,e))}))})})},[o]),k=v.default.useCallback(n=>{let o=n.filter(e=>!kxe(e,w));if(o.length>0)return{acceptedFiles:null,error:a(o[0].name)};let s=t===void 0?[]:n.filter(e=>e.size>t),c=t===void 0?n:n.filter(e=>e.size<=t);return e!==void 0&&c.length>e?{acceptedFiles:null,error:r(e)}:{acceptedFiles:c,error:s.length>0&&t!==void 0?i(s[0].name,CF(t)):null}},[w,a,e,t,r,i]);return(0,n.jsx)(TF.Provider,{value:{acceptedFileTypes:w,fileError:b,fileProgress:S,files:_,handleDragLeave:()=>{g(!1)},handleDragOver:e=>{e.preventDefault(),g(!0)},handleDrop:e=>{e.preventDefault();let t=Array.from(e.dataTransfer.files),n=m.current,r=E(t),{acceptedFiles:i,error:a}=k(r);if(!i){x(a),g(!1);return}x(a);let o=new Set(n.map(wF)),s=i.filter(e=>!o.has(wF(e)));m.current=i,y(i),T(i),O(s),p.current&&u?.({target:p.current,currentTarget:p.current}),g(!1)},handleFiles:e=>{let t=e.target.files?Array.from(e.target.files):[],n=m.current,r=E(t),{acceptedFiles:i,error:a}=k(r);if(!i){x(a),T(n);return}x(a);let o=new Set(n.map(wF)),s=i.filter(e=>!o.has(wF(e)));m.current=i,y(i),T(i),O(s),p.current&&u?.({target:p.current,currentTarget:p.current})},inputRef:p,isHovering:h,maxFileSize:t===void 0?void 0:CF(t),maxFiles:e,onConfirm:d,onUpload:o,props:f,removeFile:D,setFiles:y},children:(0,n.jsx)(`div`,{className:Y(`space-y-md`,c),ref:s,children:l})})},EF=()=>{let e=v.default.useContext(TF);if(!e)throw Error(`useDropzone must be used within a DropzoneProvider`);return e},jxe=({className:e,children:t,...r})=>{let{fileError:i,handleDragLeave:a,handleDragOver:o,handleDrop:s,handleFiles:c,inputRef:l,isHovering:u,props:d}=EF(),f=d.disabled??!1,p=()=>{f||l.current?.click()};return(0,n.jsxs)(`div`,{"aria-disabled":f,"aria-invalid":i?!0:void 0,"aria-label":`File upload dropzone`,onClick:p,onDragLeave:a,onDragOver:o,onDrop:s,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p())},role:`button`,tabIndex:f?-1:0,className:Y(`flex size-full items-center justify-center rounded-xl border-2 border-brand-border bg-surface py-2xl transition-all outline-none focus-visible:outline-2 focus-visible:outline-brand-border-strong`,!f&&`cursor-pointer`,u&&`ring-8 ring-brand-border-strong/20`,i&&`border-error-border`,f&&`cursor-not-allowed opacity-50`,e),...r,children:[(0,n.jsx)(`div`,{className:`flex flex-col items-center justify-center gap-lg`,children:t}),(0,n.jsx)(`input`,{...d,hidden:!0,onChange:c,onClick:e=>{e.currentTarget.value=``},ref:l,type:`file`})]})},Mxe=({className:e,children:t,ref:r,...i})=>{let{fileError:a}=EF();return!a&&!t?null:(0,n.jsxs)(`p`,{className:Y(`flex items-center gap-2xs style-text-strong--1 text-error-default`,e),ref:r,role:`alert`,...i,children:[(0,n.jsx)(Ei,{weight:`bold`}),t??a]})},Nxe=Jn(``,{variants:{orientation:{horizontal:`flex items-center justify-between gap-xs [&_[data-track]]:w-full [&_button]:shrink-0`,vertical:`flex flex-col space-y-3xs`},size:{small:`[&_[data-track]]:h-3xs`,medium:`[&_[data-track]]:h-2xs`,large:`[&_[data-track]]:h-xs`},tone:{brand:`[&_[data-indicator]]:bg-brand-default`,accent:`[&_[data-indicator]]:bg-accent-default`,neutral:`[&_[data-indicator]]:bg-neutral-default`,error:`[&_[data-indicator]]:bg-error-default`,info:`[&_[data-indicator]]:bg-info-default`,success:`[&_[data-indicator]]:bg-success-default`,warning:`[&_[data-indicator]]:bg-warning-default`}},defaultVariants:{orientation:`vertical`,size:`medium`,tone:`brand`}}),DF=({orientation:e,size:t,tone:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(Om,{className:Y(Nxe({orientation:e,size:t,tone:r,className:i})),ref:o,...s,children:a}),Pxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t}),OF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Am,{"data-indicator":!0,className:Y(`rounded-full transition-[width] duration-300 ease-in-out`,e),ref:r,...i,children:t}),Fxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Mm,{className:Y(`flex items-center gap-2xs style-text-strong--1 text-on-surface [&>svg]:size-xs`,e),ref:r,...i,children:t}),kF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(km,{className:Y(`w-full self-center rounded-full bg-surface-low inset-shadow-2xs`,e),"data-track":!0,ref:r,...i,children:t}),AF=({className:e,ref:t,...r})=>(0,n.jsx)(jm,{className:Y(`ml-auto text-right style-text-prose--2 text-on-surface-variant`,e),ref:t,...r}),jF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between`,e),ref:r,...i,children:t}),Ixe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`text-left style-text-prose--2 whitespace-nowrap text-on-surface-variant`,e),ref:r,...i,children:t}),Lxe=({className:e,children:t,ref:r,...i})=>{let{files:a,fileProgress:o,removeFile:s,onUpload:c}=EF();return(0,n.jsxs)(`ul`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:[a.map((e,t)=>{let r=o[wF(e)]??0,i=r>=0&&r<100,a=r>=100;return(0,n.jsxs)(`li`,{className:Y(`flex items-center justify-between gap-lg rounded-xl border bg-surface px-md py-sm`,i&&`border-border`,a&&`border-border`),children:[i&&(0,n.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-brand-container p-xs`,children:(0,n.jsx)(si,{className:`size-md text-brand-on-container`})}),a&&(0,n.jsx)(`div`,{className:`flex items-center justify-center rounded-full bg-success-container p-xs`,children:(0,n.jsx)($r,{className:`size-md text-success-on-container`})}),(0,n.jsxs)(`div`,{className:`flex w-full flex-col justify-between gap-3xs`,children:[(0,n.jsx)(`span`,{className:`style-text-default-0`,children:e.name}),c?(0,n.jsxs)(DF,{orientation:`vertical`,tone:r>=100?`success`:`brand`,value:r,children:[(0,n.jsx)(kF,{children:(0,n.jsx)(OF,{})}),(0,n.jsxs)(jF,{children:[(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:CF(e.size)}),(0,n.jsx)(AF,{})]})]}):(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:CF(e.size)})]}),(0,n.jsx)(Yv,{variant:`ghost`,tone:`error`,onClick:()=>s(e),children:(0,n.jsx)(Ci,{weight:`bold`})})]},t)}),t]})},Rxe=({className:e,children:t,ref:r,...i})=>{let{maxFileSize:a}=EF();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a]})},zxe=({className:e,children:t,ref:r,...i})=>{let{acceptedFileTypes:a}=EF();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[a.join(`, `),t]})},Bxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),Vxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`rounded-full bg-brand-container p-sm [&>svg]:size-lg [&>svg]:text-brand-on-container`,e),ref:r,...i,children:t}),Hxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`text-on-surface-variant`,e),ref:r,...i,children:t}),Uxe=({className:e,children:t,ref:r,...i})=>{let{inputRef:a}=EF();return(0,n.jsx)(Yv,{variant:`link`,onClick:e=>{e.stopPropagation(),a.current?.click()},className:Y(``,e),ref:r,...i,children:t})},Wxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col items-center justify-center gap-2xs`,e),ref:r,...i,children:t}),Gxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),Kxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-sm`,e),ref:r,...i,children:t}),qxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default-0`,e),ref:r,...i,children:t}),Jxe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center gap-xs`,e),ref:r,...i,children:t}),Yxe=({className:e,children:t,ref:r,...i})=>{let{files:a,onConfirm:o}=EF();return(0,n.jsx)(Yv,{disabled:a.length===0,onClick:()=>{o&&o(a)},className:Y(`w-full`,e),ref:r,...i,children:t})},Xxe=({className:e,children:t,ref:r,...i})=>{let{files:a,setFiles:o}=EF();return(0,n.jsx)(Yv,{disabled:a.length===0,onClick:()=>o([]),tone:`error`,variant:`outline`,className:Y(`w-full`,e),ref:r,...i,children:t})},MF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-2xs`,e),ref:r,...i,children:t}),NF=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`p`,{className:Y(`style-text-prose--1 text-on-surface-variant`,e),ref:r,...i,children:t});function Zxe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function PF(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var FF=[],IF=0,{link:LF,unlink:Qxe,propagate:$xe,checkDirty:RF,shallowPropagate:zF}=Zxe({update(e){return e._update()},notify(e){FF[VF++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,GF(e))}}),BF=0,VF=0,HF,UF=0;function WF(e){try{++UF,e()}finally{--UF||KF()}}function GF(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Qxe(n,e)}function KF(){if(!(UF>0)){for(;BF<VF;){let e=FF[BF];FF[BF++]=void 0,e.notify()}BF=0,VF=0}}function qF(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return HF!==void 0&&LF(i,HF,IF),i._snapshot},subscribe(e){let t=PF(e),n={current:!1},r=eSe(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=HF,o=t?.compare??Object.is;if(n)HF=i,++IF,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{HF=a,n&&(i.flags&=-5),GF(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&RF(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&zF(e)}}else e&32&&(i.flags=e&-33);return HF!==void 0&&LF(i,HF,IF),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&($xe(e),zF(e),KF())}},i}function eSe(e){let t=()=>{let t=HF;HF=n,++IF,n.depsTail=void 0,n.flags=6;try{return e()}finally{HF=t,n.flags&=-5,GF(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&RF(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,GF(this)}};return t(),n}var JF=class{constructor(e,t){this.atom=qF(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(PF(e))}},tSe=class{constructor(e){this.atom=qF(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(PF(e))}};function YF(e,t){return typeof e==`function`?new tSe(e):t?new JF(e,t):new JF(e)}function XF(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=ZF(e);if(n.length!==ZF(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function ZF(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var nSe=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function rSe(e,t){return new nSe(e,t).maybeExecute}var iSe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},QF=new class extends iSe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function $F(e,t){return typeof e==`function`?e(t):e}function eI(e,t){return oI(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function tI(e,t,n){let r=oI(t);function i(e){if(!r.length)return $F(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function aSe(e,t){let n=oI(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var nI=46,rI=91,iI=93,aI=48,oSe=57;function oI(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===rI),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===nI||s===rI||s===iI){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==aI),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==iI&&(a!==-1||s!==iI)&&(a!==s||s!==nI&&s!==rI)&&n.push(``);r=o+1,i=!0}else(s<aI||s>oSe)&&(i=!1);a=s}return n.length||n.push(``),n}function sI(e,t){return e.length===0?t:t.length===0?e:t.startsWith(`[`)||t.startsWith(`.`)?e+t:`${e}.${t}`}function sSe(e){return!(Array.isArray(e)&&e.length===0)}function cI(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function lI(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var uI=e=>!!e&&typeof e==`object`&&`fields`in e;function dI(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!dI(e[i],t[i]))return!1;return!0}var fI=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},pI=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function mI(e,t){return e==null?t:{...e,...t}}for(var hI=256,gI=[],_I;hI--;)gI[hI]=(hI+256).toString(16).substring(1);function vI(){let e=0,t,n=``;if(!_I||hI+16>256){for(_I=Array(256),e=256;e--;)_I[e]=256*Math.random()|0;e=0,hI=0}for(;e<16;e++)t=_I[hI+e],n+=e===6?gI[t&15|64]:e===8?gI[t&63|128]:gI[t],e&1&&e>1&&e<11&&(n+=`-`);return hI++,n}var yI=rSe(e=>QF.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function bI(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=bI(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,bI(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(bI(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=bI(e[n]));return t}function xI(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var SI=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function CI(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var wI=(e,t)=>{let n=CI(e,t);return{form:n,fields:n}},TI={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:wI(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:wI(r.issues,e)}},EI=e=>!!e&&`~standard`in e,DI={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function OI(e){function t(t){let n=e.getFieldMeta(t)??DI;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>DI;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function kI(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var AI=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{yI(this)}),t=QF.on(`request-form-state`,e=>{e.payload.id===this._formId&&QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=QF.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=QF.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),QF.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!dI(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!dI(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(WF(()=>{this.baseStore.setState(()=>kI(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=OI(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}QF.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=tI(t,e.instance.name,e.instance.options.defaultValue))}),kI({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return WF(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return WF(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=cI(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||SI}),r=!1,i={};return WF(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=jI(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=MI(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??DI,r=a?.[e],{newErrorValue:s,newSource:c}=fI({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=DI)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=MI(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=MI(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=lI(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||SI});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=MI(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=jI(r);s&&(i=i?{...i,...s}:s);let c=MI(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??DI,r=i?.[e],{newErrorValue:a,newSource:o}=fI({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=DI)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),WF(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}WF(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),WF(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),QF.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>eI(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:$F(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=DI,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;WF(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:tI(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=aSe(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),OI(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],mI(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),OI(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),mI(r,{dontValidate:!0})),OI(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),mI(n,{dontValidate:!0})),OI(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return tI(tI(e,`${t}`,i),`${n}`,r)},mI(r,{dontValidate:!0})),OI(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},mI(r,{dontValidate:!0})),OI(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],mI(t,{dontValidate:!0})),OI(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=eI(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:DI},values:i===void 0?t.values:tI(t.values,e,i)}})},this.setErrorMap=e=>{WF(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(uI(t)){let{formError:e,fieldErrors:r}=jI(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>TI.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>TI.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??vI(),this._devtoolsSubmissionOverride=!1;let t=kI({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!uI(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=YF(t);let n;this.fieldMetaDerived=YF(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=eI(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!sSe(u),f=!o.isDirty,p=dI(l,this.getFieldInfo(a)?.instance?.options.defaultValue??eI(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=YF(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!xI(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&xI(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=YF(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&uI(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&dI(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return EI(e.validate)?TI[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function jI(e){return e?uI(e)?{formError:jI(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function MI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var NI=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...DI,isTouched:e.fieldMetaBase[this.name]?.isTouched??DI.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??DI.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??DI.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(dI(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,mI(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,mI(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,mI(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,mI(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,mI(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=cI(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||SI}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=cI(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;WF(()=>{let e=(e,n)=>{let r=FI(n.cause),a=n.validate?PI(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=pI({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=FI(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=lI(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||SI}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=lI(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));WF(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=FI(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=PI(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=pI({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),WF(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[FI(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[FI(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>TI.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>TI.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)xI(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=YF(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...DI,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!dI(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return EI(e.validate)?TI[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function PI(e){if(e)return e}function FI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function II(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function LI(e){return{...DI,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var RI=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??II({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(dI(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...DI,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??II({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;BI(t)&&(n=t.group,r=t.fields);let i=zI(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:II({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,mI(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof NI&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&xI(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=fI({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=DI)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=cI(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||SI}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=cI(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;WF(()=>{let t=(t,r)=>{let i=HI(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&BI(s)&&(c=s.group,l=s.fields);let u=zI(c),d=n[i],{newErrorValue:f,newSource:p}=pI({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=HI(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=lI(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||SI}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=lI(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||SI});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=HI(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&BI(o)&&(l=o.group,u=o.fields);let d=zI(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=pI({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return WF(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[HI(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>xI(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),WF(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}WF(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),WF(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=YF(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??LI(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!dI(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(EI(e.validate)){let t=TI[e.type](e.value,e.validate);return e.type===`validate`?VI(t):t.then(VI)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function zI(e){if(e)return e}function BI(e){return!!e&&typeof e==`object`&&`fields`in e}function VI(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function HI(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var UI=class e{constructor(t){if(this.getFormFieldName=e=>{if(typeof this.fieldsMap==`string`)return sI(this.fieldsMap,e);let t=oI(e)[0];if(typeof t!=`string`)return``;let n=e.slice(t.length),r=this.fieldsMap[t];return sI(r,n)},this.getFormFieldOptions=e=>{let t={...e},n=t.validators;if(t.name=this.getFormFieldName(e.name),n&&(n.onChangeListenTo||n.onBlurListenTo)){let e={...n},r=e=>{if(e)return e.map(e=>this.getFormFieldName(e))};e.onChangeListenTo=r(n.onChangeListenTo),e.onBlurListenTo=r(n.onBlurListenTo),t.validators=e}return t},this.mount=()=>()=>{},this.validateArrayFieldsStartingFrom=async(e,t,n)=>this.form.validateArrayFieldsStartingFrom(this.getFormFieldName(e),t,n),this.validateField=(e,t)=>this.form.validateField(this.getFormFieldName(e),t),this.getFieldValue=e=>this.form.getFieldValue(this.getFormFieldName(e)),this.getFieldMeta=e=>this.form.getFieldMeta(this.getFormFieldName(e)),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(this.getFormFieldName(e),t),this.setFieldValue=(e,t,n)=>this.form.setFieldValue(this.getFormFieldName(e),t,n),this.deleteField=e=>this.form.deleteField(this.getFormFieldName(e)),this.pushFieldValue=(e,t,n)=>this.form.pushFieldValue(this.getFormFieldName(e),t,n),this.insertFieldValue=async(e,t,n,r)=>this.form.insertFieldValue(this.getFormFieldName(e),t,n,r),this.replaceFieldValue=async(e,t,n,r)=>this.form.replaceFieldValue(this.getFormFieldName(e),t,n,r),this.removeFieldValue=async(e,t,n)=>this.form.removeFieldValue(this.getFormFieldName(e),t,n),this.swapFieldValues=(e,t,n,r)=>this.form.swapFieldValues(this.getFormFieldName(e),t,n,r),this.moveFieldValues=(e,t,n,r)=>this.form.moveFieldValues(this.getFormFieldName(e),t,n,r),this.clearFieldValues=(e,t)=>this.form.clearFieldValues(this.getFormFieldName(e),t),this.resetField=e=>this.form.resetField(this.getFormFieldName(e)),this.validateAllFields=e=>this.form.validateAllFields(e),t.form instanceof e){let e=t.form;if(this.form=e.form,typeof t.fields==`string`)this.fieldsMap=e.getFormFieldName(t.fields);else{let n={...t.fields};for(let t in n)n[t]=e.getFormFieldName(n[t]);this.fieldsMap=n}}else this.form=t.form,this.fieldsMap=t.fields;this.store=YF(()=>{let e=this.form.store.get(),t;if(typeof this.fieldsMap==`string`)t=eI(e.values,this.fieldsMap);else{t={};let n=this.fieldsMap;for(let r in n)t[r]=eI(e.values,n[r])}return{values:t}})}get state(){return this.store.state}async handleSubmit(e){return this.form.handleSubmit(e)}};function WI(e,t){if(!t)return;let n=Object.assign({},e,{state:bI(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return WF(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}function GI(e,t){return e===t}function KI(e,t=e=>e,n){let r=n?.compare??GI,i=(0,v.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,v.useCallback)(()=>e.get(),[e]);return(0,a.useSyncExternalStoreWithSelector)(i,o,o,t,r)}var qI=typeof window<`u`?v.useLayoutEffect:v.useEffect;function JI(e){let[t,n]=(0,v.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,v.useState)(()=>new NI({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new NI({...e}),i(a),n({form:e.form,name:e.name}));let o=KI(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=KI(a.store,e=>e.meta.isTouched),c=KI(a.store,e=>e.meta.isBlurred),l=KI(a.store,e=>e.meta.isDirty),u=KI(a.store,e=>e.meta.errorMap),d=KI(a.store,e=>e.meta.errorSourceMap),f=KI(a.store,e=>e.meta.isValidating),p=(0,v.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return qI(a.mount,[a]),qI(()=>{a.update(e)}),p}var YI=(({children:e,...t})=>{let r=JI(t),i=(0,v.useMemo)(()=>$F(e,r),[e,r]);return(0,n.jsx)(n.Fragment,{children:i})});function XI(){return(0,v.useState)(()=>vI())[0]}var ZI=v,QI=v.version.split(`.`)[0]===`17`?XI:ZI.useId;function $I(e){let[t,n]=(0,v.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,v.useState)(()=>new RI({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new RI({...e})),n({form:e.form,name:e.name}));let a=KI(r.store,e=>e.value),o=KI(r.store,e=>e.meta.isTouched),s=KI(r.store,e=>e.meta.isBlurred),c=KI(r.store,e=>e.meta.isDirty),l=KI(r.store,e=>e.meta.errorMap),u=KI(r.store,e=>e.meta.errorSourceMap),d=KI(r.store,e=>e.meta.isValidating),f=KI(r.store,e=>e.meta.isSubmitting),p=KI(r.store,e=>e.meta.isSubmitted),m=KI(r.store,e=>e.meta.submissionAttempts),h=KI(r.store,e=>e.meta.isSubmitSuccessful),g=KI(r.store,e=>e.meta.canSubmit),_=KI(r.store,e=>e.meta.isValid),y=KI(r.store,e=>e.meta.isFieldsValid),b=KI(r.store,e=>e.meta.isFieldsValidating),x=KI(r.store,e=>e.meta.isGroupValid),S=(0,v.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:y,isFieldsValidating:b,isGroupValid:x}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,y,b,x]);return qI(r.mount,[r]),qI(()=>{r.update(e)}),S}var eL=(({children:e,...t})=>{let r=$I(t),i=(0,v.useMemo)(()=>$F(e,r),[e,r]);return(0,n.jsx)(n.Fragment,{children:i})});function tL({form:e,selector:t=e=>e,children:r}){let i=KI(e.store,t);return(0,n.jsx)(n.Fragment,{children:$F(r,i)})}function nL(e){let t=QI(),[r,i]=(0,v.useState)(e?.formId),[a,o]=(0,v.useState)(()=>new AI({...e,formId:e?.formId??t}));if(r!==e?.formId){let n=e?.formId??t;o(new AI({...e,formId:n})),i(n)}let s=(0,v.useMemo)(()=>{let e={...a,handleSubmit:((...e)=>a._handleSubmit(...e)),get formId(){return a._formId},get state(){return a.store.state}};return e.Field=function(e){return(0,n.jsx)(YI,{...e,form:a})},e.FormGroup=function(e){return(0,n.jsx)(eL,{...e,form:a})},e.Subscribe=function(e){return(0,n.jsx)(tL,{form:a,selector:e.selector,children:e.children})},e},[a]);qI(a.mount,[]),qI(()=>{a.update(e)});let c=(0,v.useRef)(!1);return qI(()=>{c.current&&e?.transform&&WI(a,e.transform)},[a,e?.transform]),qI(()=>{c.current=!0}),s}function rL({lens:e,selector:t=e=>e,children:r}){let i=KI(e.store,t);return(0,n.jsx)(n.Fragment,{children:$F(r,i)})}function iL(e){let[t]=(0,v.useState)(()=>{let r=new UI(e),i=e.form instanceof UI?e.form.form:e.form,a=r;return a.AppForm=function(e){return(0,n.jsx)(i.AppForm,{...e})},a.AppField=function(e){return(0,n.jsx)(i.AppField,{...t.getFormFieldOptions(e)})},a.Field=function(e){return(0,n.jsx)(i.Field,{...t.getFormFieldOptions(e)})},a.Subscribe=function(e){return(0,n.jsx)(rL,{lens:t,selector:e.selector,children:e.children})},Object.assign(a,{...e.formComponents})});return qI(t.mount,[t]),t}var aL=(0,v.createContext)(null),oL=(0,v.createContext)(null);function sL(){let e=(0,v.useContext)(oL);if(!e)throw Error("`formContext` only works when within a `formComponent` passed to `createFormHook`");return e}function cL(){function e(){let e=(0,v.useContext)(aL);if(!e)throw Error("`fieldContext` only works when within a `fieldComponent` passed to `createFormHook`");return e}return{fieldContext:aL,useFieldContext:e,useFormContext:sL,formContext:oL}}function lL({fieldComponents:e,fieldContext:t,formContext:r,formComponents:i}){function a(a){let o=nL(a),s=(0,v.useMemo)(()=>({children:e})=>(0,n.jsx)(r.Provider,{value:o,children:e}),[o]),c=(0,v.useMemo)(()=>(({children:r,...i})=>(0,n.jsx)(o.Field,{...i,children:i=>(0,n.jsx)(t.Provider,{value:i,children:r(Object.assign(i,e))})})),[o]);return(0,v.useMemo)(()=>Object.assign(o,{AppField:c,AppForm:s,...i}),[o,c,s])}function o({render:e,props:t}){return function(n){return e({...t,...n})}}function s({render:e,props:t,defaultValues:n}){return function(r){let a=iL((0,v.useMemo)(()=>({form:r.form,fields:r.fields,defaultValues:n,formComponents:i}),[r.form,r.fields]));return e({...t,...r,group:a})}}function c(e){return sL()}function l(n){return lL({fieldContext:t,formContext:r,fieldComponents:{...e,...n.fieldComponents},formComponents:{...i,...n.formComponents}})}return{useAppForm:a,withForm:o,withFieldGroup:s,useTypedAppFormContext:c,extendForm:l}}var{fieldContext:uL,useFieldContext:dL,formContext:fL,useFormContext:pL}=cL(),mL=({className:e,children:t,ref:r,...i})=>{let a=dL().state.meta.errors;if((!a||a.length===0)&&!t)return null;let o=[],s=e=>{typeof e==`string`?o.push(e):Array.isArray(e)?e.forEach(s):e&&typeof e==`object`&&(`issues`in e&&Array.isArray(e.issues)?e.issues.forEach(e=>{typeof e?.message==`string`&&o.push(e.message)}):`message`in e&&typeof e.message==`string`?o.push(e.message):Object.values(e).forEach(s))};return a?.forEach(s),o.length===0&&!t?null:(0,n.jsxs)(`ul`,{className:Y(`space-y-3xs`,e),ref:r,...i,children:[o.map((e,t)=>(0,n.jsx)(`li`,{className:`flex items-center gap-2xs style-text-strong--1 text-error-default`,children:e},`${e}-${t}`)),t]})},hL=({fileUploadButtonIcon:e=(0,n.jsx)(wi,{weight:`bold`}),fileUploadButtonLabel:t,maxFiles:r,maxFileSize:i,clearFilesLabel:a=`Remove files`,filesSelectedLabel:o=e=>`${e} files selected`,maxFilesErrorLabel:s=e=>`You can select up to ${e} file${e===1?``:`s`}.`,maxFileSizeErrorLabel:c=(e,t)=>`"${e}" exceeds the maximum size of ${t}.`,compact:l,variant:u,size:d,className:f,ref:p,...m})=>{let h=(0,v.useRef)(null),[g,_]=(0,v.useState)(m.defaultValue||m.value||`#000000`),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(null);if(m.type===`color`){let e=m.value!==void 0,t=(e?m.value:g)||`#000000`,{onChange:r,defaultValue:i,value:a,...o}=m,s=t=>{e||_(t.currentTarget.value),r?.(t)},c=e=>{if(h.current=e,typeof p==`function`){p(e);return}p&&typeof p==`object`&&(p.current=e)};return l?(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative outline-2 outline-transparent transition-colors focus-within:outline-border hover:cursor-pointer`,d===`small`&&`size-lg -outline-offset-2`,d===`medium`&&`size-xl -outline-offset-4`,d===`large`&&`size-2xl -outline-offset-6`,f),disabled:m.disabled,onClick:()=>h.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`size-full`,d===`small`&&`rounded-lg`,d===`medium`&&`rounded-xl`,d===`large`&&`rounded-2xl`),style:{backgroundColor:t}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute`,defaultValue:e?void 0:t,onChange:s,ref:c,type:`color`,value:e?t:void 0,...o})]}):(0,n.jsxs)(`button`,{"aria-label":`Open color picker`,className:Y(`relative flex hover:cursor-pointer`,Zv({variant:u,size:d}),f),disabled:m.disabled,onClick:()=>h.current?.click(),type:`button`,children:[(0,n.jsx)(`div`,{className:Y(`absolute top-1/2 left-xs aspect-square h-7/12 -translate-y-1/2`,d===`small`&&`rounded-md`,d===`medium`&&`rounded-lg`,d===`large`&&`rounded-xl`),style:{backgroundColor:t}}),(0,n.jsx)(gm,{className:`peer pointer-events-none invisible absolute top-lg`,defaultValue:e?void 0:t,onChange:s,ref:c,type:`color`,value:e?t:void 0,...o}),(0,n.jsx)(`p`,{className:Y(`text-left`,d===`small`&&`pr-2xs pl-lg style-text-default--1`,d===`medium`&&`pl-lg style-text-default-0`,d===`large`&&`pl-xl style-text-default-1`),children:t})]})}if(m.type===`file`){let{onChange:l,...u}=m,d=()=>{h.current&&(h.current.value=``),b([]),S(null)},f=e=>{let t=e.currentTarget,n=t.files?Array.from(t.files):[];if(r!==void 0&&n.length>r){b([]),S(s(r)),t.value=``;return}let a=i===void 0?void 0:n.find(e=>e.size>i);if(a&&i!==void 0){b([]),S(c(a.name,Ese(i))),t.value=``;return}S(null),b(n),l?.(e)};return(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-lg`,children:[(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsxs)(Yv,{variant:`soft`,tone:`neutral`,onClick:()=>h.current?.click(),children:[e,t]}),(0,n.jsx)(gm,{ref:h,...u,hidden:!0,onChange:f}),(0,n.jsx)(`p`,{className:`style-text-default-0`,children:x?(0,n.jsx)(`span`,{className:`style-text-prose-0 text-error-default`,children:x}):y.length===0?(0,n.jsx)(`span`,{className:`style-text-prose-0 text-on-surface-variant`,children:m?.placeholder}):y.length===1?y[0].name:o(y.length)})]}),(0,n.jsx)(Yv,{"aria-label":a,size:`iconMedium`,variant:`ghost`,tone:`error`,onClick:d,children:(0,n.jsx)(Di,{weight:`bold`})})]})}return(0,n.jsx)(gm,{className:Y(Zv({variant:u,size:d}),f),ref:p,...m})},gL=({className:e,children:t,ref:r,...i})=>{let a=dL(),o=a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid;return(0,n.jsx)(hL,{"aria-invalid":o,className:Y(``,e),id:a.name,name:a.name,onChange:e=>a.handleChange(e.target.value),ref:r,value:a.state.value,...i,children:t})},_L=Jn(`whitespace-nowrap`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`},variant:{primary:`text-on-surface`,secondary:`text-on-surface-variant`}},defaultVariants:{size:`medium`,variant:`primary`}}),vL=({size:e,variant:t,showRequired:r=!1,className:i,children:a,ref:o,...s})=>{let c=dL(),l=c.name.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase()),u=c.state.meta.errors.length>0;return(0,n.jsxs)(`div`,{className:Y(_L({size:e,variant:t}),i,u&&`text-error-default`),ref:o,...s,children:[a||l,r&&(0,n.jsx)(`span`,{className:`ml-3xs text-error-default`,children:`*`})]})},yL=({children:e,...t})=>(0,n.jsx)(Jv,{children:(0,n.jsx)(Rv,{...t,children:e})}),bL=({side:e=`top`,alignOffset:t=0,sideOffset:r=5,className:i,children:a,...o})=>(0,n.jsx)(Wv,{children:(0,n.jsx)(Kv,{side:e,alignOffset:t,sideOffset:r,children:(0,n.jsx)(qv,{className:Y(`z-50 w-fit origin-(--transform-origin) animate-in rounded-md bg-surface-2 px-xs py-3xs text-sm text-balance shadow-md fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,i),...o,children:a})})}),xL=({children:e,...t})=>(0,n.jsx)(Hv,{...t,render:e}),SL=({className:e,children:t,ref:r,...i})=>{let[a,o]=v.default.useState(!1),[s,c]=v.default.useState(!1);return v.default.useEffect(()=>{if(!s)return;let e=()=>c(!1);return window.addEventListener(`pointerup`,e),()=>window.removeEventListener(`pointerup`,e)},[s]),(0,n.jsxs)(yL,{open:a||s,trackCursorAxis:`x`,children:[(0,n.jsx)(xL,{delay:0,children:(0,n.jsx)(B_,{"data-slot":`slider-thumb`,className:Y(`absolute aspect-square rounded-full bg-surface transition-[width,height,opacity] outline-none data-dragging:cursor-grabbing data-dragging:shadow-sm hover:[&:not([data-dragging])]:cursor-pointer`,e),onPointerDown:()=>c(!0),onPointerEnter:()=>o(!0),onPointerLeave:()=>o(!1),ref:r,...i,children:t})}),(0,n.jsx)(bL,{sideOffset:10,children:(0,n.jsx)(j_,{})})]})},CL=Jn(`flex flex-col gap-xs`,{variants:{size:{small:`[&_[data-slot='slider-thumb']]:size-xs [&_[data-slot='slider-thumb']]:border [&_[data-slot='slider-thumb'][data-dragging]]:size-sm [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-3xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-3xs`,medium:`[&_[data-slot='slider-thumb']]:size-sm [&_[data-slot='slider-thumb']]:border-2 [&_[data-slot='slider-thumb'][data-dragging]]:size-md [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-2xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-2xs`,large:`[&_[data-slot='slider-thumb']]:size-md [&_[data-slot='slider-thumb']]:border-3 [&_[data-slot='slider-thumb'][data-dragging]]:size-lg [&_[data-slot='slider-track'][data-orientation='horizontal']]:h-xs [&_[data-slot='slider-track'][data-orientation='vertical']]:w-xs`},tone:{brand:`[&_[data-slot='slider-thumb']]:border-brand-default [&_[data-slot=slider-indicator]]:bg-brand-default [&_[data-slot=slider-track]]:bg-brand-container-high`,accent:`[&_[data-slot='slider-thumb']]:border-accent-default [&_[data-slot=slider-indicator]]:bg-accent-default [&_[data-slot=slider-track]]:bg-accent-container-high`,neutral:`[&_[data-slot='slider-thumb']]:border-neutral-default [&_[data-slot=slider-indicator]]:bg-neutral-default [&_[data-slot=slider-track]]:bg-neutral-container-high`,error:`[&_[data-slot='slider-thumb']]:border-error-default [&_[data-slot=slider-indicator]]:bg-error-default [&_[data-slot=slider-track]]:bg-error-container-high`,info:`[&_[data-slot='slider-thumb']]:border-info-default [&_[data-slot=slider-indicator]]:bg-info-default [&_[data-slot=slider-track]]:bg-info-container-high`,success:`[&_[data-slot='slider-thumb']]:border-success-default [&_[data-slot=slider-indicator]]:bg-success-default [&_[data-slot=slider-track]]:bg-success-container-high`,warning:`[&_[data-slot='slider-thumb']]:border-warning-default [&_[data-slot=slider-indicator]]:bg-warning-default [&_[data-slot=slider-track]]:bg-warning-container-high`}},defaultVariants:{size:`medium`,tone:`brand`}}),wL=({size:e,tone:t,defaultValue:r,description:i,label:a,leadingIcon:o,max:s=100,min:c=0,showMax:l=!1,showMin:u=!1,trailingIcon:d,showThumbOnHover:f=!0,value:p,className:m,ref:h,...g})=>{let _=Array.isArray(p)?p:Array.isArray(r)?r:[c,s];return(0,n.jsxs)(`div`,{className:Y(CL({size:e,tone:t}),m),children:[a&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:a}),(0,n.jsxs)(A_,{"aria-label":a,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":Array.isArray(p)?p[0]:p??r??c,className:Y(`flex items-center gap-sm`,m),defaultValue:r,"data-slot":`slider-root`,max:s,min:c,ref:h,role:`slider`,value:p,...g,children:[o&&(0,n.jsx)(o,{className:`size-sm shrink-0`,weight:`fill`}),u&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:c}),(0,n.jsx)(I_,{className:`shrink-0 hover:cursor-pointer data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full`,children:(0,n.jsxs)(L_,{"data-slot":`slider-track`,className:Y(`relative size-full rounded-full`,!f&&`**:data-[slot='slider-thumb']:opacity-0 hover:**:data-[slot='slider-thumb']:opacity-100 active:**:data-[slot='slider-thumb']:opacity-100 data-dragging:**:data-[slot='slider-thumb']:opacity-100`),children:[(0,n.jsx)(V_,{"data-slot":`slider-indicator`,className:`rounded-full`}),Array.from({length:_.length},(e,t)=>(0,n.jsx)(SL,{index:t},t))]})}),l&&(0,n.jsx)(`span`,{className:`style-text-default-0`,children:s}),d&&(0,n.jsx)(d,{className:`size-sm shrink-0`,weight:`fill`})]}),i&&(0,n.jsx)(`span`,{className:`style-text-prose--1 text-on-surface-variant`,children:i})]})},TL=({className:e,ref:t,...r})=>{let i=dL();return(0,n.jsx)(wL,{className:Y(``,e),onValueChange:e=>i.setValue(e),ref:t,value:i.state.value,...r})},EL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(zM,{value:r.state.value,onValueChange:e=>r.setValue(e),...t,children:e})},DL=Jn(`relative flex resize flex-col overflow-hidden rounded-xl outline outline-transparent transition-[outline] hover:not-focus-within:outline-border-strong data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50`,{variants:{variant:{primary:`bg-surface shadow-2xs`,secondary:`bg-neutral-container`}},defaultVariants:{variant:`primary`}}),OL=({variant:e,className:t,ref:r,...i})=>{let a=i.value!==void 0,[o,s]=v.default.useState(String(i.defaultValue??``)),c=a?String(i.value??``):o,l=i.maxLength,u=typeof l==`number`,d=u&&c.length>=l,f=e=>{a||s(e.target.value),i.onChange?.(e)};return(0,n.jsxs)(`div`,{className:Y(DL({variant:e,className:t}),d?`outline-error-border-strong`:`focus-within:outline-brand-border-strong`),"data-disabled":i.disabled?!0:void 0,children:[(0,n.jsx)(`textarea`,{className:`grow resize-none px-sm py-xs style-text-prose-0 outline-none focus-within:caret-brand-border-strong`,ref:r,...i,onChange:f,value:c}),u&&(0,n.jsxs)(`span`,{className:Y(`w-full px-xs py-2xs text-right style-text-default--1 text-on-surface-variant`,d&&`text-error-default`),children:[c.length,` / `,l]})]})},kL=({className:e,ref:t,...r})=>{let i=dL(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,n.jsx)(OL,{"aria-invalid":a,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})},AL=Jn(`flex items-center gap-2xs select-none hover:cursor-pointer`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),jL=({className:e,children:t,ref:r,size:i,...a})=>(0,n.jsx)(`label`,{className:AL({className:e,size:i}),"data-slot":`label`,htmlFor:a.htmlFor,ref:r,...a,children:t}),ML=({...e})=>{let t=dL();return(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(IM,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e}),e.label&&(0,n.jsx)(jL,{htmlFor:t.name,children:e.label})]})},NL=Jn(`group flex size-sm shrink-0 items-center justify-center rounded-full outline outline-transparent transition-all hover:outline-border-strong data-checked:bg-brand-default data-checked:outline-brand-border-strong data-disabled:opacity-50`,{variants:{variant:{elevated:`bg-surface shadow-2xs`,inSurface:`bg-surface-low inset-shadow-2xs`}},defaultVariants:{variant:`elevated`}}),PL=({variant:e,className:t,children:r,ref:i,...a})=>(0,n.jsxs)(jL,{htmlFor:a.id,children:[(0,n.jsx)(xg,{className:Y(NL({variant:e,className:t})),ref:i,...a,children:(0,n.jsx)(Sg,{"data-indicator":!0,className:`size-2xs origin-center scale-0 rounded-full bg-surface shadow-2xs transition-transform duration-200 ease-out data-checked:scale-100`})}),r]}),FL=({className:e,children:t,ref:r,...i})=>{let a=v.useId();return(0,n.jsx)(Cg,{"aria-labelledby":a,className:Y(`flex flex-col items-start gap-2xs data-disabled:opacity-50`,e),ref:r,...i,children:t})},IL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(PL,{...t,onChange:e=>r.handleChange(e.target.value),value:r.state.value,children:e})},LL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(FL,{name:r.name,onChange:e=>{let t=e.target;t.type===`radio`&&r.handleChange(t.value)},value:r.state.value,...t,children:e})},RL=({label:e,className:t,ref:r,...i})=>(0,n.jsxs)(`div`,{className:`flex items-center gap-xs`,children:[(0,n.jsx)(W_,{"aria-label":e??void 0,className:Y(`group relative flex h-md w-xl items-center rounded-full bg-surface-low inset-shadow-2xs outline-2 outline-transparent transition-colors ease-[cubic-bezier(0.26,0.75,0.38,0.45)] before:absolute before:rounded-full hover:cursor-pointer hover:not-disabled:outline-accent-border-strong disabled:pointer-events-none disabled:opacity-50 data-checked:bg-accent-default data-disabled:pointer-events-none data-disabled:opacity-50`,t),ref:r,...i,children:(0,n.jsx)(G_,{className:`aspect-square size-xs translate-x-2xs rounded-full shadow-2xs transition-transform duration-500 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)] data-checked:size-sm data-checked:translate-x-md data-checked:bg-accent-on-default data-unchecked:bg-accent-default`})}),e&&(0,n.jsx)(jL,{htmlFor:i.id,children:e})]}),zL=({...e})=>{let t=dL();return(0,n.jsx)(RL,{checked:t.state.value,id:t.name,name:t.name,onCheckedChange:e=>t.handleChange(e===!0),...e})},BL=(0,v.createContext)(void 0),VL=Jn(`flex items-center justify-center text-on-surface-variant transition-all hover:cursor-pointer disabled:opacity-70`,{variants:{size:{iconSmall:`size-md rounded-md [&>svg]:size-xs`,iconMedium:`size-lg rounded-lg [&>svg]:size-sm`,iconLarge:`size-xl rounded-xl [&>svg]:size-md`,small:`h-md gap-3xs rounded-md px-2xs style-text-default--2 [&>svg]:size-xs`,medium:`h-lg gap-2xs rounded-lg px-xs style-text-default--1 [&>svg]:size-sm`,large:`h-xl gap-xs rounded-xl px-sm style-text-default-0 [&>svg]:size-md`},tone:{brand:`hover:not-disabled:bg-brand-container hover:not-disabled:text-brand-on-container data-pressed:text-brand-default`,accent:`hover:not-disabled:bg-accent-container hover:not-disabled:text-accent-on-container data-pressed:text-accent-default`,neutral:`hover:not-disabled:bg-surface-low hover:not-disabled:text-neutral-on-container data-pressed:text-neutral-default`,error:`hover:not-disabled:bg-error-container hover:not-disabled:text-error-on-container data-pressed:text-error-default`,info:`hover:not-disabled:bg-info-container hover:not-disabled:text-info-on-container data-pressed:text-info-default`,success:`hover:not-disabled:bg-success-container hover:not-disabled:text-success-on-container data-pressed:text-success-default`,warning:`hover:not-disabled:bg-warning-container hover:not-disabled:text-warning-on-container data-pressed:text-warning-default`}},defaultVariants:{size:`medium`,tone:`brand`}}),HL=({size:e,tone:t,className:r,children:i,ref:a,...o})=>{let s=(0,v.useContext)(BL),c=e??s?.size??`medium`;return(0,n.jsx)(Nv,{ref:a,...o,render:(e,a)=>(0,n.jsx)(`button`,{...e,className:Y(VL({size:c,tone:t,className:r})),type:`button`,children:typeof i==`function`?i(a):i})})},UL=({children:e,...t})=>{let r=dL();return(0,n.jsx)(HL,{id:r.name,name:r.name,onChange:e=>r.handleChange(!r.state.value),pressed:r.state.value,...t,children:e})},WL=({className:e,children:t,ref:r,...i})=>{let a=dL(),o=a.state.meta.isTouched&&a.state.meta.errors.length>0&&!a.state.meta.isValid;return(0,n.jsx)(iF,{"aria-invalid":o,className:Y(``,e),id:a.name,ref:r,...i,children:t})},GL=({className:e,ref:t,...r})=>{let i=dL(),a=i.state.meta.isTouched&&i.state.meta.errors.length>0&&!i.state.meta.isValid;return(0,n.jsx)(oF,{"aria-invalid":a,className:Y(``,e),id:i.name,name:i.name,onChange:e=>i.handleChange(e.target.value),ref:t,value:i.state.value,...r})},KL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full flex-col gap-2xs`,e),ref:r,...i,children:t}),qL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex items-center justify-between gap-sm`,e),ref:r,...i,children:t}),JL=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`form`,{className:Y(`flex flex-col gap-sm`,e),ref:r,...i,children:t}),YL=(e,t)=>{if(e!=null){if(typeof e==`string`){e.trim()&&t.add(e);return}if(Array.isArray(e)){e.forEach(e=>YL(e,t));return}if(typeof e==`object`){let n=e.message;if(typeof n==`string`){t.add(n);return}Object.values(e).forEach(e=>YL(e,t))}}},XL=({className:e,children:t,ref:r,...i})=>{let a=pL();return(0,n.jsx)(a.Subscribe,{selector:e=>[e.errors,e.fieldMeta],children:([a,o])=>{let s=new Set;return YL(a,s),Object.values(o).forEach(e=>YL(e.errors,s)),s.size===0?null:(0,n.jsxs)(ki,{className:Y(``,e),ref:r,tone:`error`,...i,children:[(0,n.jsx)(Oi,{weight:`duotone`}),(0,n.jsxs)(ji,{children:[t,(0,n.jsx)(Ai,{children:(0,n.jsx)(`ul`,{children:[...s].map(e=>(0,n.jsx)(`li`,{children:e},e))})})]})]})}})},ZL=({orientation:e=`horizontal`,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex gap-2xs`,t,e===`horizontal`?`flex-row`:`flex-col`),ref:i,...a,children:r}),QL=({className:e,children:t,ref:r,...i})=>{let a=pL(),o=()=>{a.reset()};return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(Yv,{className:Y(`w-full`,e),disabled:!a.values,onClick:o,ref:r,type:`reset`,...i,children:t})})},$L=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),eR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),tR=Jn(``,{variants:{size:{small:`style-text-strong-0`,medium:`style-text-strong-1`,large:`style-text-strong-2`}},defaultVariants:{size:`medium`}}),nR=({size:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`span`,{className:Y(tR({size:e,className:t})),ref:i,...a,children:r}),rR=({className:e,children:t,ref:r,...i})=>{let a=pL();return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:a=>(0,n.jsx)(Yv,{className:Y(`w-full`,e),disabled:a.isSubmitting||!a.canSubmit,ref:r,type:`submit`,...i,children:a.isSubmitting?(0,n.jsx)(ti,{className:`animate-spin`,weight:`bold`}):t})})},{useAppForm:iR,withFieldGroup:aR,withForm:oR,useTypedAppFormContext:sR}=lL({fieldContext:uL,fieldComponents:{FieldCheckbox:ML,FieldDescription:NF,FieldErrors:mL,FieldRow:qL,FieldInput:gL,FieldInputGroup:WL,FieldInputGroupInput:GL,FieldLabel:vL,FieldRadio:IL,FieldRadioGroup:LL,FieldSelect:EL,FieldSet:KL,FieldSlider:TL,FieldSwitch:zL,FieldTextArea:kL,FieldToggle:UL},formContext:fL,formComponents:{FormErrors:XL,FormFooter:ZL,FormReset:QL,FormSet:$L,FormSetHeading:nR,FormSetContent:eR,FormSubmit:rR}}),cR=({children:e,className:t,ref:r,...i})=>(0,n.jsx)(Zh,{className:Y(`group flex items-center gap-2xs has-disabled:opacity-30`,t),ref:r,...i,children:e}),lR=({className:e,...t})=>(0,n.jsx)(Qh,{className:Y(`relative h-lg w-md rounded-md bg-surface text-center style-text-default-0 shadow-2xs outline outline-transparent transition-colors hover:outline-border-strong focus:outline-brand-border-strong`,e),...t}),uR=({className:e,ref:t,...r})=>(0,n.jsx)(ip,{className:Y(`flex items-center justify-center text-on-surface-variant`,e),ref:t,...r,children:(0,n.jsx)(_i,{weight:`bold`})}),dR=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex h-md items-center justify-center rounded-md bg-neutral-container-high px-2xs align-middle style-text-default--1 whitespace-nowrap text-neutral-on-container select-none [&:has(svg)]:size-md [&:has(svg)]:p-0 [&>svg]:size-sm`,e),ref:r,...i,children:t});function fR(e){return pR(e)||typeof e==`function`||mR(e)}function pR(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function mR(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function hR(e,t){return e==null?null:fR(e)?v.default.createElement(e,t):e}function gR(e){if(`cell`in e&&e.cell){let t=e.cell,n=t.column.columnDef,r=t,i=n;return r.getIsAggregated?.()?hR(i.aggregatedCell??n.cell,t.getContext()):r.getIsPlaceholder?.()?null:hR(n.cell,t.getContext())}return`header`in e&&e.header?hR(e.header.column.columnDef.header,e.header.getContext()):`footer`in e&&e.footer?hR(e.footer.column.columnDef.footer,e.footer.getContext()):null}function _R(e){let t=KI(e.source,e.selector,{compare:XF});return typeof e.children==`function`?e.children(t):e.children}function vR(e){let t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),`set`in e&&(t.setState=e.set.bind(e)),t}function yR(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error(`Feature not supported in current reactivity implementation`)},unmount:()=>{throw Error(`Feature not supported in current reactivity implementation`)},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i=n?.compare??Object.is,a=!1,o,s=()=>{let t=e();return(!a||!i(o,t))&&(o=t,a=!0),o},c=t(()=>(r.get(),s()),{compare:i});return{get:s,subscribe:c.subscribe.bind(c)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}function bR(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:e=>{r=e,n=!0},subscribe:i=>e.subscribe(e=>{(!n||!t(r,e))&&i(e)})}}function xR(){return yR({createAtom:qF,batch:WF})}function SR(e,t){return typeof e==`function`?e(t):e}function CR(e){if(Array.isArray(e))return e.map(CR);if(e&&typeof e==`object`){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=t===null?TR():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:CR(e[i]),writable:!0})}return n}return e}function wR(e,t){let n=Object.keys(t),r=e;for(let e=0;e<n.length;e++){let i=n[e];!i.startsWith(`_memo_`)&&i!==`_cellsCache`&&(r[i]=t[i])}return e}function TR(){return Object.create(null)}function ER(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function DR(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>SR(n,e))}}function OR(e){if(typeof e!=`object`||!e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function kR(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var AR=3;function jR(e,t){return MR(e,t,AR)}function MR(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!OR(e)||!OR(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;let r=kR(e),i=kR(t);if(r.length!==i.length)return!1;let a=e,o=t;for(let e=0;e<r.length;e++){let i=r[e];if(!Object.prototype.propertyIsEnumerable.call(t,i)||!MR(a[i],o[i],n-1))return!1}return!0}function NR(e,t,n,r=jR){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(e=>{let t=SR(n,e);return r(e,t)?e:t})}function PR(e){return e instanceof Function}function FR(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i.length&&r(i)})};return r(e),n}var IR=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return c=>{i?.();let l=t?.(c),u=!l||l.length!==o?.length;if(!u&&l){for(let e=0;e<l.length;e++)if(l[e]!==o[e]){u=!0;break}}return n?.(u),u?(o=l,a?.(),s=e(...l??[]),r?.(s),s):s}};function LR(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}var RR=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};function zR({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){let o,s,c=0,l;if(process.env.NODE_ENV===`development`){let{debugAll:n}=i.options,{parentName:r}=BR(t,`.`),a=i.options[`debug${(r==`table`?r:r+`s`).replace(r,r.charAt(0).toUpperCase()+r.slice(1))}`],o=e?i.options[`debug${e.charAt(0).toUpperCase()+e.slice(1)}`]:!1;l=n||a||o}function u(r,o){let s=c===0?`(1st run)`:o?`(rerun #`+c+`)`:`(cache)`;c++,console.groupCollapsed(`%c⏱ ${RR(`${r.toFixed(1)} ms`,12)} %c${s}%c ${t}%c ${n?`(${t.split(`.`)[0]}Id: ${n})`:``}`,`font-size: .6rem; font-weight: bold; ${o?`color: hsl(
|
|
58
58
|
${Math.max(0,Math.min(120-Math.log10(r)*60,120))}deg 100% 31%);`:``} `,`color: ${c<2?`#FF00FF`:`#FF1493`}`,`color: #666`,`color: #87CEEB`),console.info({feature:e,state:i.store.state,deps:a.memoDeps?.toString()}),console.trace(),console.groupEnd()}let d=()=>{if(!r)return;let{schedule:e,untrack:t}=i._reactivity;e(()=>t(()=>r()))},f=process.env.NODE_ENV===`development`?{onBeforeCompare:()=>{},onAfterCompare:e=>{},onBeforeUpdate:()=>{l&&(o=performance.now())},onAfterUpdate:()=>{l&&(s=performance.now(),u(Math.round((s-o)*100)/100,!0)),d()}}:{onAfterUpdate:()=>{d()}};return IR({...a,...f})}function BR(e,t=`_`){let[n,r]=e.split(t);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function VR(e,t,n){for(let[r,{fn:i,memoDeps:a}]of Object.entries(n)){let{fnKey:n,fnName:o}=BR(r);t[n]=a?zR({memoDeps:a,fn:i,fnName:o,table:t,feature:e}):i}}function HR(e,t,n,r){for(let[i,{fn:a,memoDeps:o}]of Object.entries(r)){let{fnKey:r,fnName:s}=BR(i);if(o){let i=`_memo_${r}`;t[r]=function(...t){if(!this[i]){let t=this;this[i]=zR({memoDeps:e=>o(t,e),fn:(...e)=>a(t,...e),fnName:s,objectId:t.id,table:n,feature:e})}return this[i](...t)}}else t[r]=function(...e){return a(this,...e)}}}function UR(e,t,n,...r){return e[t]?.(...r)??n(e,...r)}function WR(e){return e.row.getValue(e.column.id)}function GR(e){return e.getValue()??e.table.options.renderFallbackValue}function KR(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}var qR={assignCellPrototype:(e,t)=>{HR(`coreCellsFeature`,e,t,{cell_getValue:{fn:e=>WR(e)},cell_renderValue:{fn:e=>GR(e)},cell_getContext:{fn:e=>KR(e),memoDeps:e=>[e]}})}};function JR(e){if(!e._headerPrototype){e._headerPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function YR(e,t,n){let r=JR(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];let a=e._headerInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function XR(){return{start:[],end:[]}}function ZR(e){let t=e.getAllColumns(),n=e.getAllLeafColumnsById(),{start:r}=e.atoms.columnPinning?.get()??XR(),i=[];for(let e=0;e<r.length;e++){let t=n[r[e]];t&&UR(t,`getIsVisible`,lz)&&i.push(t)}return Oz(t,i,e,`start`)}function QR(e){let t=e.getAllColumns(),n=e.getAllLeafColumnsById(),{end:r}=e.atoms.columnPinning?.get()??XR(),i=[];for(let e=0;e<r.length;e++){let t=n[r[e]];t&&UR(t,`getIsVisible`,lz)&&i.push(t)}return Oz(t,i,e,`end`)}function $R(e){let t=e.getAllColumns(),n=UR(e,`getVisibleLeafColumns`,hz),{start:r,end:i}=e.atoms.columnPinning?.get()??XR();if(r.length||i.length){let e=[...r,...i];n=n.filter(t=>!e.includes(t.id))}return Oz(t,n,e,`center`)}function ez(e){let{start:t}=e.atoms.columnPinning?.get()??XR(),n=e.getAllLeafColumnsById(),r=[];for(let e=0;e<t.length;e++){let i=n[t[e]];i&&r.push(i)}return r}function tz(e){let{end:t}=e.atoms.columnPinning?.get()??XR(),n=e.getAllLeafColumnsById(),r=[];for(let e=0;e<t.length;e++){let i=n[t[e]];i&&r.push(i)}return r}function nz(e){let{start:t,end:n}=e.atoms.columnPinning?.get()??XR();if(!t.length&&!n.length)return e.getAllLeafColumns();let r=[...t,...n];return e.getAllLeafColumns().filter(e=>!r.includes(e.id))}function rz(e){return UR(e,`getStartLeafColumns`,ez).filter(e=>UR(e,`getIsVisible`,lz))}function iz(e){return UR(e,`getEndLeafColumns`,tz).filter(e=>UR(e,`getIsVisible`,lz))}function az(e){return UR(e,`getCenterLeafColumns`,nz).filter(e=>UR(e,`getIsVisible`,lz))}function oz(e,t){return t?t===`start`?UR(e,`getStartVisibleLeafColumns`,rz):t===`end`?UR(e,`getEndVisibleLeafColumns`,iz):UR(e,`getCenterVisibleLeafColumns`,az):UR(e,`getVisibleLeafColumns`,hz)}function sz(){return TR()}function cz(e,t){uz(e)&&gz(e.table,n=>{let r=Object.assign(TR(),n),i=t??!UR(e,`getIsVisible`,lz),a=e.getLeafColumns();for(let e=0;e<a.length;e++){let t=a[e];uz(t)&&(r[t.id]=i)}return r})}function lz(e){let t=e.table.atoms.columnVisibility?.get();if(!t)return!0;let n=e.columns;return n.length?n.some(e=>UR(e,`getIsVisible`,lz)):(ER(t,e.id)?t[e.id]:void 0)??!0}function uz(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function dz(e){return t=>{cz(e,t.target.checked)}}function fz(e){let t=e.getAllCells(),n=[];for(let e=0;e<t.length;e++){let r=t[e];UR(r.column,`getIsVisible`,lz)&&n.push(r)}let{start:r,end:i}=e.table.atoms.columnPinning?.get()??XR();if(!r.length&&!i.length)return n;let a=UR(e,`getVisibleCellsByColumnId`,pz),o=[];for(let e=0;e<r.length;e++){let t=a[r[e]];t&&o.push(t)}let s=[];for(let e=0;e<i.length;e++){let t=a[i[e]];t&&s.push(t)}let c=[];for(let e=0;e<n.length;e++){let t=n[e],a=t.column.id;!r.includes(a)&&!i.includes(a)&&c.push(t)}return[...o,...c,...s]}function pz(e){let t=TR(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];UR(r.column,`getIsVisible`,lz)&&(t[r.column.id]=r)}return t}function mz(e){return e.getAllFlatColumns().filter(e=>UR(e,`getIsVisible`,lz))}function hz(e){return e.getAllLeafColumns().filter(e=>UR(e,`getIsVisible`,lz))}function gz(e,t){NR(e,`columnVisibility`,t)}function _z(e,t){gz(e,t?TR():Object.assign(TR(),CR(e.initialState.columnVisibility??{})))}function vz(e,t){t??=!yz(e);let n=TR(),r=e.getAllLeafColumns();for(let e=0;e<r.length;e++){let i=r[e];n[i.id]=t||!uz(i)}gz(e,n)}function yz(e){return!e.getAllLeafColumns().some(e=>!UR(e,`getIsVisible`,lz))}function bz(e){return e.getAllLeafColumns().some(e=>UR(e,`getIsVisible`,lz))}function xz(e){return t=>{vz(e,t.target.checked)}}function Sz(e,t=1){let n=t;for(let r=0;r<e.length;r++){let i=e[r];UR(i,`getIsVisible`,lz)&&i.columns.length&&(n=Math.max(n,Sz(i.columns,t+1)))}return n}function Cz(e,t){return e?`${e}_${t}`:String(t)}function wz(e,t,n,r){let i=e??``;return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function Tz(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function Ez(e,t,n,r,i,a){let o={depth:t,id:Cz(r,t),headers:[]},s=[];for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i],c=s[s.length-1],l=a.column.depth===o.depth,u,d=!1;if(l&&a.column.parent?u=a.column.parent:(u=a.column,d=!0),c&&c.column===u)c.subHeaders.push(a);else{let e=YR(n,u,{id:wz(r,t,u.id,a.id),isPlaceholder:d,placeholderId:d?String(Tz(s,u)):void 0,depth:t,index:s.length});e.subHeaders.push(a),s.push(e)}o.headers.push(a),a.headerGroup=o}for(let e=0;e<a.length;e++)a[e](o);i.push(o),t>0&&Ez(s,t-1,n,r,i,a)}function Dz(e){for(let t=0;t<e.length;t++){let n=e[t];if(!UR(n.column,`getIsVisible`,lz))continue;let r=0;if(n.subHeaders.length){Dz(n.subHeaders);for(let e=0;e<n.subHeaders.length;e++){let t=n.subHeaders[e];UR(t.column,`getIsVisible`,lz)&&(r+=t.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let e=1,t=n.subHeaders[0];for(;t;)t.rowSpan=0,e++,t=t.subHeaders.length===1&&t.subHeaders[0].column===n.column?t.subHeaders[0]:void 0;n.rowSpan=e}else n.rowSpan=1}}function Oz(e,t,n,r){let i=Sz(e),a=[],o=n._headerGroupInstanceInitFns,s=Array(t.length);for(let e=0;e<t.length;e++)e in t&&(s[e]=YR(n,t[e],{depth:i,index:e}));return Ez(s,i-1,n,r,a,o),a.reverse(),Dz(a[0]?.headers??[]),a}function kz(e){if(!e._columnPrototype){e._columnPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function Az(e,t,n,r){let i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??o?.replaceAll(`.`,`_`)??(typeof i.header==`string`?i.header:void 0),c;if(i.accessorFn)c=i.accessorFn;else if(a!==void 0){if(typeof a==`string`&&a.includes(`.`)){let e=a.split(`.`);c=t=>{let n=t;for(let t=0;t<e.length;t++){let r=e[t];n=n?.[r],process.env.NODE_ENV===`development`&&n===void 0&&console.warn(`"${r}" in deeply nested key "${a}" returned undefined.`)}return n}}else c=e=>e[i.accessorKey]}if(!s)throw process.env.NODE_ENV===`development`?Error(i.accessorFn?`coreColumnsFeature require an id when using an accessorFn`:`coreColumnsFeature require an id when using a non-string header`):Error();let l=kz(e),u=Object.create(l);u.accessorFn=c,u.columnDef=i,u.columns=[],u.depth=n,u.id=`${String(s)}`,u.parent=r;let d=e._columnInstanceInitFns;for(let e=0;e<d.length;e++)d[e](u);return u}function jz(e){let t=e.atoms.columnOrder?.get();return n=>{let r=[];if(!t?.length)r=n;else{let e=new Map;for(let t=0;t<n.length;t++){let r=n[t];e.set(r.id,r)}for(let n=0;n<t.length;n++){let i=t[n],a=e.get(i);a&&(r.push(a),e.delete(i))}for(let t=0;t<n.length;t++){let i=n[t];e.has(i.id)&&r.push(i)}}return Mz(e,r)}}function Mz(e,t){let n=e.atoms.grouping?.get()??[],{groupedColumnMode:r}=e.options;if(!n.length||!r)return t;let i=t.filter(e=>!n.includes(e.id));if(r===`remove`)return i;let a=new Map;for(let e=0;e<t.length;e++){let n=t[e];a.set(n.id,n)}let o=[];for(let e=0;e<n.length;e++){let t=a.get(n[e]);t&&o.push(t)}return[...o,...i]}function Nz(e){return[e,...e.columns.flatMap(e=>e.getFlatColumns())]}function Pz(e){if(e.columns.length){let t=e.columns.flatMap(e=>e.getLeafColumns());return UR(e.table,`getOrderColumns`,jz)(t)}return[e]}function Fz(e){return{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>e.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function Iz(e,t,n,r=0){let i=Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;let o=t[a],s=Az(e,o,r,n),c=o;s.columns=c.columns?Iz(e,c.columns,s,r+1):[],i[a]=s}return i}function Lz(e){return Iz(e,e.options.columns)}function Rz(e){return e.getAllColumns().flatMap(e=>e.getFlatColumns())}function zz(e){let t=TR(),n=e.getAllFlatColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function Bz(e){let t=e.getAllColumns().flatMap(e=>e.getLeafColumns());return UR(e,`getOrderColumns`,jz)(t)}function Vz(e){let t=TR(),n=e.getAllLeafColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function Hz(e,t){let n=e.getAllFlatColumnsById()[t];return process.env.NODE_ENV===`development`&&!n&&console.warn(`[Table] Column with id '${t}' does not exist.`),n}var Uz={assignColumnPrototype:(e,t)=>{HR(`coreColumnsFeature`,e,t,{column_getFlatColumns:{fn:e=>Nz(e),memoDeps:e=>[e.table.options.columns]},column_getLeafColumns:{fn:e=>Pz(e),memoDeps:e=>[e.table.atoms.columnOrder?.get(),e.table.atoms.grouping?.get(),e.table.options.columns,e.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{VR(`coreColumnsFeature`,e,{table_getDefaultColumnDef:{fn:()=>Fz(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>Lz(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>Rz(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>zz(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>Bz(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>Vz(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>Hz(e,t)}})}};function Wz(e,t){for(let n=0;n<e.subHeaders.length;n++)Wz(e.subHeaders[n],t);t.push(e)}function Gz(e){let t=[];return Wz(e,t),t}function Kz(e){return{column:e.column,header:e,table:e.column.table}}function qz(e){let{start:t,end:n}=e.atoms.columnPinning?.get()??XR(),r=e.getAllColumns(),i=UR(e,`getVisibleLeafColumns`,hz);if(!t.length&&!n.length)return Oz(r,i,e);let a=e.getAllLeafColumnsById(),o=[];for(let e=0;e<t.length;e++){let n=a[t[e]];n&&UR(n,`getIsVisible`,lz)&&o.push(n)}let s=[];for(let e=0;e<n.length;e++){let t=a[n[e]];t&&UR(t,`getIsVisible`,lz)&&s.push(t)}let c=i.filter(e=>!t.includes(e.id)&&!n.includes(e.id));return Oz(r,[...o,...c,...s],e)}function Jz(e){return[...e.getHeaderGroups()].reverse()}function Yz(e){let t=e.getHeaderGroups(),n=[];for(let e=0;e<t.length;e++){let r=t[e].headers;for(let e=0;e<r.length;e++)n.push(r[e])}return n}function Xz(e){let t=e.getHeaderGroups()[0]?.headers??[],n=[];for(let e=0;e<t.length;e++){let r=t[e].getLeafHeaders();for(let e=0;e<r.length;e++)n.push(r[e])}return n}var Zz={assignHeaderPrototype:(e,t)=>{HR(`coreHeadersFeature`,e,t,{header_getLeafHeaders:{fn:e=>Gz(e),memoDeps:e=>[e.column.table.options.columns]},header_getContext:{fn:e=>Kz(e),memoDeps:e=>[e.column.table.options.columns]}})},constructTableAPIs:e=>{VR(`coreHeadersFeature`,e,{table_getHeaderGroups:{fn:()=>qz(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>Jz(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>Yz(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>Xz(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function Qz(e){if(!e._rowPrototype){e._rowPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}var $z=(e,t,n,r,i,a,o)=>{let s=Qz(e),c=Object.create(s);c._displayIndexCache=-1,c._uniqueValuesCache=TR(),c._valuesCache=TR(),c.depth=i,c.id=t,c.index=r,c.original=n,c.parentId=o,c.subRows=a??[];let l=e._rowInstanceInitFns;for(let e=0;e<l.length;e++)l[e](c);return c},eB=/([0-9]+)/gm;function tB(e){let t=Object.assign((e,n,r)=>{let i=e.getValue(r),a=n.getValue(r),o=t.resolveDataValue;return o&&(i=o(i),a=o(a)),t.sort(i,a,e,n,r)},e);return t}var nB=tB({resolveDataValue:e=>cB(e).toLowerCase(),sort:(e,t)=>lB(e,t)});tB({resolveDataValue:e=>cB(e),sort:(e,t)=>lB(e,t)});var rB=tB({resolveDataValue:e=>cB(e).toLowerCase(),sort:(e,t)=>oB(e,t)});tB({resolveDataValue:e=>cB(e),sort:(e,t)=>oB(e,t)});var iB=tB({resolveDataValue:e=>sB(e),sort:(e,t)=>e>t?1:e<t?-1:0}),aB=tB({sort:(e,t)=>oB(e,t)});function oB(e,t){return e===t?0:e>t?1:-1}function sB(e){return e instanceof Date?e.getTime():e}function cB(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function lB(e,t){let n=0,r=0,i=e.length,a=t.length;for(;n<i&&r<a;){let i=uB(e.charCodeAt(n)),a=uB(t.charCodeAt(r)),o=dB(e,n,i),s=dB(t,r,a);if(!i&&!a){let i=fB(e,n,o,t,r,s);if(i)return i;n=o,r=s;continue}if(i!==a)return i?1:-1;let c=pB(e,n,o,t,r,s);if(c)return c;n=o,r=s}return hB(e,n)-hB(t,r)}function uB(e){return e>=48&&e<=57}function dB(e,t,n){let r=t+1;for(;r<e.length&&uB(e.charCodeAt(r))===n;)r++;return r}function fB(e,t,n,r,i,a){let o=n-t,s=a-i,c=o<s?o:s;for(let n=0;n<c;n++){let a=e.charCodeAt(t+n),o=r.charCodeAt(i+n);if(a>o)return 1;if(o>a)return-1}return o>s?1:s>o?-1:0}function pB(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;let c=n-o,l=a-s;if(c===0&&l===0)return 0;if(c<=15&&l<=15){let t=mB(e,o,n),i=mB(r,s,a);return t>i?1:i>t?-1:0}let u=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return u>d?1:d>u?-1:0}function mB(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function hB(e,t){let n=0,r=t;for(;r<e.length;)n++,r=dB(e,r,uB(e.charCodeAt(r)));return n}function gB(){return[]}function _B(e,t){NR(e,`cellSelection`,t?gB():CR(e.initialState.cellSelection)??gB())}function vB(e){e.atoms.cellSelection&&(e.options.autoResetAll??e.options.autoResetCellSelection??!0)&&e._reactivity.schedule(()=>_B(e))}function yB(){return TR()}function bB(e){e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>CB(e))}function xB(e,t){e.options.onExpandedChange?.(t)}function SB(e,t){let n=e.atoms.expanded?.get()??{};if(t??!DB(e)){if(n===!0||!wB(e))return;xB(e,!0)}else{if(n!==!0&&!Object.keys(n).length)return;xB(e,TR())}}function CB(e,t){let n=e.initialState.expanded;NR(e,`expanded`,t?TR():n===!0||Object.assign(TR(),CR(n??{})))}function wB(e){return e.getPrePaginatedRowModel().flatRows.some(e=>MB(e))}function TB(e){return t=>{SB(e)}}function EB(e){let t=e.atoms.expanded?.get()??{};return t===!0||Object.values(t).some(Boolean)}function DB(e){let t=e.atoms.expanded?.get()??{};if(t===!0)return!0;if(!Object.keys(t).length)return!1;let n=e.getRowModel().flatRows.filter(e=>MB(e));return!(!n.length||n.some(e=>!AB(e)))}function OB(e){let t=0,n=e.atoms.expanded?.get();return(n===!0?Object.values(e.getRowModel().rowsById).filter(e=>MB(e)).map(e=>e.id):Object.keys(n??{})).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t}function kB(e,t){let n=e.table.atoms.expanded?.get()??{},r=n===!0||jB(n,e.id),i=t??!r;i!==r&&(i&&!MB(e)||xB(e.table,t=>{let n=t===!0||jB(t,e.id),r=TR();if(t===!0?Object.values(e.table.getRowModel().rowsById).forEach(e=>{MB(e)&&(r[e.id]=!0)}):r=Object.assign(TR(),t),!n&&i)return r[e.id]=!0,r;if(n&&!i){let t=TR(),n=Object.keys(r);for(let i=0;i<n.length;i++){let a=n[i];a!==e.id&&r[a]&&(t[a]=!0)}return t}return t}))}function AB(e){let t=e.table.atoms.expanded?.get()??{};return!!(e.table.options.getIsRowExpanded?.(e)??(t===!0||jB(t,e.id)))}function jB(e,t){return!!(e&&e!==!0&&ER(e,t)&&e[t])}function MB(e){return e.table.options.getRowCanExpand?.(e)??((e.table.options.enableExpanding??!0)&&!!e.subRows.length)}function NB(e){let t=!0,n=e;for(;t&&n.parentId;)n=e.table.getRow(n.parentId,!0),t=AB(n);return t}function PB(e){let t=MB(e);return()=>{t&&kB(e)}}var FB=0,IB=10;function LB(){return{pageIndex:FB,pageSize:IB}}function RB(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??FB)===FB)return;HB(e,!0)}}function zB(e,t){NR(e,`pagination`,t)}function BB(e,t){zB(e,t?LB():CR(e.initialState.pagination??LB()))}function VB(e,t){zB(e,n=>{let r=SR(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function HB(e,t){VB(e,t?FB:e.initialState.pagination?.pageIndex??FB)}function UB(e,t){WB(e,t?IB:e.initialState.pagination?.pageSize??IB)}function WB(e,t){zB(e,e=>{let n=Math.max(1,SR(t,e.pageSize)),r=e.pageSize===1/0?0:e.pageSize*e.pageIndex,i=n===1/0?0:Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})}function GB(e){let t=$B(e),n=[];return t&&t>0&&(n=[...Array(t)].fill(null).map((e,t)=>t)),n}function KB(e){return(e.atoms.pagination?.get()?.pageIndex??0)>0}function qB(e){let t=e.atoms.pagination?.get()?.pageIndex??FB,n=$B(e);return n===-1||n!==0&&t<n-1}function JB(e){let t=e.atoms.pagination?.get()?.pageIndex??FB,n=$B(e);return Number.isFinite(n)&&n>0&&t<n-1}function YB(e){return VB(e,e=>e-1)}function XB(e){return VB(e,e=>e+1)}function ZB(e){return VB(e,0)}function QB(e){let t=$B(e);if(!(!Number.isFinite(t)||t<=0))return VB(e,t-1)}function $B(e){let t=e.options.pageCount;if(t!=null)return t;let n=eV(e),r=e.atoms.pagination?.get()?.pageSize??IB;return r===1/0&&Number.isFinite(n)&&n>0?1:Math.ceil(n/r)}function eV(e){return e.options.rowCount??e.getPrePaginatedRowModel().rows.length}function tV(){return[]}function nV(e,t){NR(e,`sorting`,t)}function rV(e,t){nV(e,t?[]:CR(e.initialState.sorting??[]))}function iV(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&rV(e)}function aV(e){let t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10),r,i=!1;for(let t=0;t<n.length;t++){let a=n[t].getValue(e.id);if(Object.prototype.toString.call(a)===`[object Date]`){r=`datetime`;break}if(typeof a==`string`&&(i=!0,a.split(eB).length>1)){r=`alphanumeric`;break}}if(!r&&i&&(r=`text`),r){let n=t?.[r];if(n||(process.env.NODE_ENV===`development`&&console.warn(`sortFn '${r}' (auto) for column '${e.id}' is not registered`),r===`alphanumeric`&&(n=t?.text)),n)return n}return aB}function oV(e){let t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){let r=t[n].getValue(e.id);if(r!=null)return typeof r==`string`?`asc`:`desc`}return`desc`}function sV(e){let t=e.table._rowModelFns.sortFns;if(PR(e.columnDef.sortFn))return e.columnDef.sortFn;if(e.columnDef.sortFn===`auto`)return aV(e);let n=t?.[e.columnDef.sortFn];return process.env.NODE_ENV===`development`&&!n&&console.warn(`sortFn '${String(e.columnDef.sortFn)}' for column '${e.id}' is not registered`),n??aB}function cV(e,t,n){let r=uV(e,n&&fV(e)),i=t!==void 0;nV(e.table,a=>{let o=a.findIndex(t=>t.id===e.id),s=o===-1?void 0:a[o],c=[],l,u=i?t:r===`desc`,d=!!(a.length&&fV(e)&&n);return l=d?s?`toggle`:`add`:s?`toggle`:`replace`,l===`toggle`&&(i||r||(l=`remove`)),l===`add`?(c=[...a,{id:e.id,desc:u}],c.splice(0,c.length-(e.table.options.maxMultiSortColCount??2**53-1))):c=l===`toggle`?d?a.map(t=>t.id===e.id?{...t,desc:u}:t):[{id:e.id,desc:u}]:l===`remove`?d?a.filter(t=>t.id!==e.id):[]:[{id:e.id,desc:u}],c})}function lV(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??oV(e)===`desc`?`desc`:`asc`}function uV(e,t){let n=lV(e),r=pV(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r===`desc`?`asc`:`desc`:n}function dV(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function fV(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function pV(e){let t=e.table.atoms.sorting?.get()?.find(t=>t.id===e.id);return t?t.desc?`desc`:`asc`:!1}function mV(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function hV(e){nV(e.table,t=>t.length?t.filter(t=>t.id!==e.id):[])}function gV(e){let t=dV(e);return n=>{t&&cV(e,void 0,fV(e)?e.table.options.isMultiSortEvent?.(n):!1)}}function _V(){return e=>zR({feature:`coreRowModelsFeature`,table:e,fnName:`table.getCoreRowModel`,memoDeps:()=>[e.options.data],fn:()=>yV(e,e.options.data),onAfterUpdate:LR(()=>{bB(e),RB(e),iV(e),vB(e)})})}function vV(e,t,n,r=0,i){let a=[];for(let o=0;o<n.length;o++){let s=n[o],c=$z(e,e.getRowId(s,o,i),s,o,r,void 0,i?.id);t.flatRows.push(c),t.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(s,o),c.originalSubRows?.length&&(c.subRows=vV(e,t,c.originalSubRows,r+1,c)))}return a}function yV(e,t){let n={rows:[],flatRows:[],rowsById:TR()};return n.rows=vV(e,n,t),n}function bV(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??_V()(e)),e._rowModels.coreRowModel()}function xV(e){return e.getCoreRowModel()}function SV(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function CV(e){return e.getFilteredRowModel()}function wV(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function TV(e){return e.getGroupedRowModel()}function EV(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function DV(e){return e.getSortedRowModel()}function OV(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function kV(e){return e.getExpandedRowModel()}function AV(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function jV(e){return e.getPaginatedRowModel()}var MV={constructTableAPIs:e=>{VR(`coreRowModelsFeature`,e,{table_getCoreRowModel:{fn:()=>bV(e)},table_getPreFilteredRowModel:{fn:()=>xV(e)},table_getFilteredRowModel:{fn:()=>SV(e)},table_getPreGroupedRowModel:{fn:()=>CV(e)},table_getGroupedRowModel:{fn:()=>wV(e)},table_getPreSortedRowModel:{fn:()=>TV(e)},table_getSortedRowModel:{fn:()=>EV(e)},table_getPreExpandedRowModel:{fn:()=>DV(e)},table_getExpandedRowModel:{fn:()=>OV(e)},table_getPrePaginatedRowModel:{fn:()=>kV(e)},table_getPaginatedRowModel:{fn:()=>AV(e)},table_getRowModel:{fn:()=>jV(e)}})}};function NV(e){if(!e._cellPrototype){e._cellPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function PV(e,t,n){let r=NV(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;let a=n._cellInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function FV(e){let t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function IV(e){let t=e.getPrePaginatedRowModel().rows;if(e.options.paginateExpandedRows===!1){let e=[],n=t=>{t._displayIndexCache=e.length,e.push(t),t.subRows.length&&t.getIsExpanded?.()&&t.subRows.forEach(n)};return t.forEach(n),e}for(let e=0;e<t.length;e++)t[e]._displayIndexCache=e;return t}function LV(e,t){if(ER(e._valuesCache,t))return e._valuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function RV(e,t){if(ER(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function zV(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function BV(e){return FR(e.subRows,e=>e.subRows)}function VV(e){let t=e.getCoreRowModel().flatRows,n=0;for(let e=0;e<t.length;e++)n=Math.max(n,t[e].depth);return n}function HV(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function UV(e){let t=[],n=e;for(;;){let e=n.getParentRow();if(!e)break;t.push(e),n=e}return t.reverse()}function WV(e){let t=e.table.getAllLeafColumns(),n=e._cellsCache;n||=e._cellsCache=new WeakMap;let r=Array(t.length);for(let i=0;i<t.length;i++){let a=t[i],o=n.get(a);o||(o=PV(a,e,e.table),n.set(a,o)),r[i]=o}return r}function GV(e){let t=TR(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];t[r.column.id]=r}return t}function KV(e,t,n,r){return t.options.getRowId?.(e,n,r)??(r?`${r.id}.${n}`:String(n))}function qV(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw process.env.NODE_ENV===`development`?Error(`getRow could not find row with ID: ${t}`):Error();return r}var JV={assignRowPrototype:(e,t)=>{HR(`coreRowsFeature`,e,t,{row_getDisplayIndex:{fn:e=>FV(e)},row_getAllCellsByColumnId:{fn:e=>GV(e),memoDeps:e=>[e.getAllCells()]},row_getAllCells:{fn:e=>WV(e),memoDeps:e=>[e.table.getAllLeafColumns()]},row_getLeafRows:{fn:e=>BV(e),memoDeps:e=>[e.subRows]},row_getParentRow:{fn:e=>HV(e)},row_getParentRows:{fn:e=>UV(e)},row_getUniqueValues:{fn:(e,t)=>RV(e,t)},row_getValue:{fn:(e,t)=>LV(e,t)},row_renderValue:{fn:(e,t)=>zV(e,t)}})},constructTableAPIs:e=>{VR(`coreRowsFeature`,e,{table_getRowsInDisplayOrder:{fn:()=>IV(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,n,r)=>KV(t,e,n,r)},table_getRow:{fn:(t,n)=>qV(e,t,n)},table_getMaxSubRowDepth:{fn:()=>VV(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function YV(e,t,n=(e,t)=>e===t){let r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(let t in r){let i=e.baseAtoms[t];if(!i)continue;let a=r[t],o=a===void 0?e.initialState[t]:a;n(e._reactivity.untrack(()=>i.get()),o)||i.set(()=>o)}})}function XV(e,t,n=(e,t)=>e===t){e._reactivity.batch(()=>{YV(e,t,n),e._reactivity.commit?.()})}function cSe(e){let t=CR(e.initialState);e._reactivity.batch(()=>{let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];e.baseAtoms[i].set(t[i])}});let n=Object.values(e._features);for(let t=0;t<n.length;t++)n[t].resetTableInstanceData?.(e)}function lSe(e,t){let{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};let a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function ZV(e,t,n){let r=lSe(e,SR(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,n?.syncExternalState!==!1&&XV(e,r.state??null)}var uSe={coreCellsFeature:qR,coreColumnsFeature:Uz,coreHeadersFeature:Zz,coreRowModelsFeature:MV,coreRowsFeature:JV,coreTablesFeature:{constructTableAPIs:e=>{VR(`coreTablesFeature`,e,{table_reset:{fn:()=>cSe(e)},table_setOptions:{fn:t=>ZV(e,t)}})}}};function dSe(){return{accessor:(e,t)=>typeof e==`function`?{...t,accessorFn:e}:{...t,accessorKey:e},columns:e=>e,display:e=>e,group:e=>e}}function QV(){return{}}function $V(e){return e}function fSe(e,t={}){return Object.values(e).forEach(e=>{t=e.getInitialState?.(t)??t}),CR(t)}function pSe(e){let t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:c,filterFns:l,filterMeta:u,filteredRowModel:d,groupedRowModel:f,paginatedRowModel:p,sortFns:m,sortedRowModel:h,tableMeta:g,..._}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...uSe,..._},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:l,sortFns:m},_rowModels:{},atoms:{},baseAtoms:{}},y=Object.values(v._features),b={...y.reduce((e,t)=>Object.assign(e,t.getDefaultTableOptions?.(v)),{}),...e};if(t.wrapExternalAtoms&&b.atoms)for(let[e,n]of Object.entries(b.atoms)){let r=n,i=t.createWritableAtom(r.get(),{debugName:`externalAtom/${e}`});b.atoms[e]=i;let a=!1,o=r.subscribe(e=>{a||i.set(e)}),s=i.subscribe(e=>{a=!0,r.set(e),a=!1});t.addSubscription(o),t.addSubscription(s)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(b,{debugName:`table/optionsStore`}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(e){v.optionsStore.set(()=>e)}})):v.options=b,v.initialState=fSe(v._features,v.options.initialState);let x=Object.keys(v.initialState);for(let e=0;e<x.length;e++){let n=x[e];v.baseAtoms[n]=t.createWritableAtom(v.initialState[n],{debugName:`table/baseAtoms/${n}`}),v.atoms[n]=t.createReadonlyAtom(()=>{let e=v.options,t=e.atoms?.[n],r=t?t.get():v.baseAtoms[n].get();if(t)return r;let i=e.state;if(i&&ER(i,n)){let e=i[n];return e===void 0?v.initialState[n]:e}return r},{debugName:`table/atoms/${n}`})}YV(v),v.store=vR(t.createReadonlyAtom(()=>{let e={};for(let t=0;t<x.length;t++){let n=x[t];e[n]=v.atoms[n].get()}return e},{compare:XF,debugName:`table/store`}));for(let e=0;e<y.length;e++){let t=y[e];t.initTableInstanceData?.(v),t.initCellInstanceData&&v._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)),t.initColumnInstanceData&&v._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)),t.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)),t.initHeaderInstanceData&&v._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)),t.initRowInstanceData&&v._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)),t.constructTableAPIs?.(v)}if(process.env.NODE_ENV===`development`&&(e.debugAll||e.debugTable)){let e=Object.keys(v._features),t=Object.entries({coreRowModel:i,filteredRowModel:d,groupedRowModel:f,sortedRowModel:h,expandedRowModel:a,paginatedRowModel:p,facetedRowModel:s,facetedMinMaxValues:o,facetedUniqueValues:c}).filter(([,e])=>e).map(([e])=>e),n=Object.keys(v.initialState);console.log(`Constructing Table Instance
|
|
59
59
|
|
|
60
60
|
Features: ${e.join(`
|
|
@@ -194,7 +194,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
194
194
|
|
|
195
195
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=aQ,s=!HZ.jitless,c=s&&oQ.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?f0([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function h0(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!wQ(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>OQ(e,r,UZ())))}),t)}var g0=Q(`$ZodUnion`,(e,t)=>{v1.init(e,t),$Z(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),$Z(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),$Z(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),$Z(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>XZ(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>h0(t,r,e,i)):h0(o,r,e,i)}});function _0(e,t,n,r){let i=e.filter(e=>e.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>OQ(e,r,UZ())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1}),t)}var v0=Q(`$ZodXor`,(e,t)=>{g0.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>_0(t,r,e,i)):_0(o,r,e,i)}}),y0=Q(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,g0.init(e,t);let n=e._zod.parse;$Z(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=JZ(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!aQ(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),b0=Q(`$ZodIntersection`,(e,t)=>{v1.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>S0(e,t,n)):S0(e,i,a)}});function x0(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(sQ(e)&&sQ(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=x0(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=x0(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function S0(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),wQ(e))return e;let o=x0(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var C0=Q(`$ZodTuple`,(e,t)=>{v1.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=w0(n,`optin`),c=w0(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>T0(t,r,e))):T0(a,r,e)}}return o.length?Promise.all(o).then(()=>E0(l,r,n,a,c)):E0(l,r,n,a,c)}});function w0(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function T0(e,t,n){e.issues.length&&t.issues.push(...EQ(n,e.issues)),t.value[n]=e.value}function E0(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...EQ(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var D0=Q(`$ZodRecord`,(e,t)=>{v1.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!sQ(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>OQ(e,r,UZ())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...EQ(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...EQ(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&L$.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>OQ(e,r,UZ())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...EQ(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...EQ(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),O0=Q(`$ZodMap`,(e,t)=>{v1.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{k0(t,a,n,o,i,e,r)})):k0(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function k0(e,t,n,r,i,a,o){e.issues.length&&(lQ.has(typeof r)?n.issues.push(...EQ(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>OQ(e,o,UZ()))})),t.issues.length&&(lQ.has(typeof r)?n.issues.push(...EQ(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>OQ(e,o,UZ()))})),n.value.set(e.value,t.value)}var A0=Q(`$ZodSet`,(e,t)=>{v1.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>j0(e,n))):j0(i,n)}return a.length?Promise.all(a).then(()=>n):n}});function j0(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var M0=Q(`$ZodEnum`,(e,t)=>{v1.init(e,t);let n=GZ(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>lQ.has(typeof e)).map(e=>typeof e==`string`?dQ(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),N0=Q(`$ZodLiteral`,(e,t)=>{if(v1.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?dQ(e):e?dQ(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),P0=Q(`$ZodFile`,(e,t)=>{v1.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),F0=Q(`$ZodTransform`,(e,t)=>{v1.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new VZ(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new BZ;return n.value=i,n.fallback=!0,n}});function I0(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var L0=Q(`$ZodOptional`,(e,t)=>{v1.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,$Z(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$Z(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${XZ(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>I0(e,r)):I0(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),R0=Q(`$ZodExactOptional`,(e,t)=>{L0.init(e,t),$Z(e._zod,`values`,()=>t.innerType._zod.values),$Z(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),z0=Q(`$ZodNullable`,(e,t)=>{v1.init(e,t),$Z(e._zod,`optin`,()=>t.innerType._zod.optin),$Z(e._zod,`optout`,()=>t.innerType._zod.optout),$Z(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${XZ(e.source)}|null)$`):void 0}),$Z(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),B0=Q(`$ZodDefault`,(e,t)=>{v1.init(e,t),e._zod.optin=`optional`,$Z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>V0(e,t)):V0(r,t)}});function V0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var H0=Q(`$ZodPrefault`,(e,t)=>{v1.init(e,t),e._zod.optin=`optional`,$Z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),U0=Q(`$ZodNonOptional`,(e,t)=>{v1.init(e,t),$Z(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>W0(t,e)):W0(i,e)}});function W0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var G0=Q(`$ZodSuccess`,(e,t)=>{v1.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new VZ(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),K0=Q(`$ZodCatch`,(e,t)=>{v1.init(e,t),e._zod.optin=`optional`,$Z(e._zod,`optout`,()=>t.innerType._zod.optout),$Z(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>OQ(e,n,UZ()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>OQ(e,n,UZ()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),q0=Q(`$ZodNaN`,(e,t)=>{v1.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),J0=Q(`$ZodPipe`,(e,t)=>{v1.init(e,t),$Z(e._zod,`values`,()=>t.in._zod.values),$Z(e._zod,`optin`,()=>t.in._zod.optin),$Z(e._zod,`optout`,()=>t.out._zod.optout),$Z(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Y0(e,t.in,n)):Y0(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Y0(e,t.out,n)):Y0(r,t.out,n)}});function Y0(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var X0=Q(`$ZodCodec`,(e,t)=>{v1.init(e,t),$Z(e._zod,`values`,()=>t.in._zod.values),$Z(e._zod,`optin`,()=>t.in._zod.optin),$Z(e._zod,`optout`,()=>t.out._zod.optout),$Z(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Z0(e,t,n)):Z0(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Z0(e,t,n)):Z0(r,t,n)}}});function Z0(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Q0(e,r,t.out,n)):Q0(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Q0(e,r,t.in,n)):Q0(e,r,t.in,n)}}function Q0(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var $0=Q(`$ZodPreprocess`,(e,t)=>{J0.init(e,t)}),e2=Q(`$ZodReadonly`,(e,t)=>{v1.init(e,t),$Z(e._zod,`propValues`,()=>t.innerType._zod.propValues),$Z(e._zod,`values`,()=>t.innerType._zod.values),$Z(e._zod,`optin`,()=>t.innerType?._zod?.optin),$Z(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t2):t2(r)}});function t2(e){return e.value=Object.freeze(e.value),e}var n2=Q(`$ZodTemplateLiteral`,(e,t)=>{v1.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||uQ.has(typeof e))n.push(dQ(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),r2=Q(`$ZodFunction`,(e,t)=>(v1.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?WQ(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?WQ(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await KQ(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await KQ(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new C0({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),i2=Q(`$ZodPromise`,(e,t)=>{v1.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),a2=Q(`$ZodLazy`,(e,t)=>{v1.init(e,t),$Z(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),$Z(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),$Z(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),$Z(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),$Z(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),o2=Q(`$ZodCustom`,(e,t)=>{K$.init(e,t),v1.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>s2(t,n,r,e));s2(i,n,r,e)}});function s2(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(MQ(e))}}var gDe=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${pQ(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${KZ(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}};function _De(){return{localeError:gDe()}}var vDe=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${pQ(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}};function yDe(){return{localeError:vDe()}}function c2(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}var bDe=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${pQ(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=c2(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=c2(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}};function xDe(){return{localeError:bDe()}}var SDe=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${pQ(e.values[0])}`:`Невалидна опция: очаквано едно от ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}};function CDe(){return{localeError:SDe()}}var wDe=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${pQ(e.values[0])}`:`Opció invàlida: s'esperava una de ${KZ(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}};function TDe(){return{localeError:wDe()}}var EDe=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${pQ(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}};function DDe(){return{localeError:EDe()}}var ODe=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${pQ(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}};function kDe(){return{localeError:ODe()}}var ADe=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${pQ(e.values[0])}`:`Ungültige Option: erwartet eine von ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}};function jDe(){return{localeError:ADe()}}var MDe=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${pQ(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}};function NDe(){return{localeError:MDe()}}var PDe=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${pQ(e.values[0])}`:`Invalid option: expected one of ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function l2(){return{localeError:PDe()}}var FDe=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${pQ(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}};function IDe(){return{localeError:FDe()}}var LDe=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${pQ(e.values[0])}`:`Opción inválida: se esperaba una de ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}};function RDe(){return{localeError:LDe()}}var zDe=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${i} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${pQ(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${KZ(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}};function BDe(){return{localeError:zDe()}}var VDe=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${pQ(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}};function HDe(){return{localeError:VDe()}}var UDe=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`enregistrement`,map:`carte`,set:`ensemble`,file:`fichier`,nonoptional:`non-optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${pQ(e.values[0])} attendu`:`Option invalide : une valeur parmi ${KZ(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function WDe(){return{localeError:UDe()}}var GDe=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${pQ(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}};function KDe(){return{localeError:GDe()}}var qDe=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},jwt:{label:`JWT`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=jQ(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${pQ(t.values[0])}`;let e=t.values.map(e=>pQ(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${KZ(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}};function JDe(){return{localeError:qDe()}}var YDe=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${pQ(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}};function XDe(){return{localeError:YDe()}}var ZDe=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${pQ(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}};function QDe(){return{localeError:ZDe()}}function u2(e,t,n){return Math.abs(e)===1?t:n}function d2(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}var $De=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${pQ(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=u2(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${d2(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${d2(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=u2(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${d2(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${d2(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${d2(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${d2(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}};function eOe(){return{localeError:$De()}}var tOe=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${pQ(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}};function nOe(){return{localeError:tOe()}}var rOe=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${pQ(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}};function iOe(){return{localeError:rOe()}}var aOe=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${pQ(e.values[0])}`:`Opzione non valida: atteso uno tra ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}};function oOe(){return{localeError:aOe()}}var sOe=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${pQ(e.values[0])}が期待されました`:`無効な選択: ${KZ(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${KZ(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}};function cOe(){return{localeError:sOe()}}var lOe=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${pQ(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${KZ(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}};function uOe(){return{localeError:lOe()}}var dOe=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${pQ(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${KZ(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}};function f2(){return{localeError:dOe()}}function fOe(){return f2()}var pOe=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${pQ(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${KZ(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}};function mOe(){return{localeError:pOe()}}var p2=e=>e.charAt(0).toUpperCase()+e.slice(1);function m2(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}var hOe=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${pQ(e.values[0])}`:`Privalo būti vienas iš ${KZ(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,m2(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${p2(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${p2(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,m2(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${p2(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${p2(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:return`${p2(r[e.origin]??e.origin??e.origin??`reikšmė`)} turi klaidingą įvestį`;default:return`Klaidinga įvestis`}}};function gOe(){return{localeError:hOe()}}var _Oe=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${pQ(e.values[0])}`:`Грешана опција: се очекува една ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}};function vOe(){return{localeError:_Oe()}}var yOe=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${pQ(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}};function bOe(){return{localeError:yOe()}}var xOe=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${pQ(e.values[0])}`:`Ongeldige optie: verwacht één van ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}};function SOe(){return{localeError:xOe()}}var COe=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${pQ(e.values[0])}`:`Ugyldig valg: forventet en av ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}};function wOe(){return{localeError:COe()}}var TOe=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${pQ(e.values[0])}`:`Fâsit tercih: mûteberler ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}};function EOe(){return{localeError:TOe()}}var DOe=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${pQ(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${KZ(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}};function OOe(){return{localeError:DOe()}}var kOe=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${pQ(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}};function AOe(){return{localeError:kOe()}}var jOe=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n={regex:`padrão`,email:`endereço de e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`duração ISO`,ipv4:`endereço IPv4`,ipv6:`endereço IPv6`,cidrv4:`faixa de IPv4`,cidrv6:`faixa de IPv6`,base64:`texto codificado em base64`,base64url:`URL codificada em base64`,json_string:`texto JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,number:`número`,null:`nulo`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}`:`Tipo inválido: esperado ${t}, recebido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${pQ(e.values[0])}`:`Opção inválida: esperada uma das ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}};function MOe(){return{localeError:jOe()}}var NOe=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${pQ(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}};function POe(){return{localeError:NOe()}}function h2(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}var FOe=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${pQ(e.values[0])}`:`Неверный вариант: ожидалось одно из ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=h2(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=h2(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}};function IOe(){return{localeError:FOe()}}var LOe=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${pQ(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}};function ROe(){return{localeError:LOe()}}var zOe=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-intervall`,ipv6:`IPv6-intervall`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${pQ(e.values[0])}`:`Ogiltigt val: förväntade en av ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}};function BOe(){return{localeError:zOe()}}var VOe=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${pQ(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${KZ(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}};function HOe(){return{localeError:VOe()}}var UOe=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${pQ(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}};function WOe(){return{localeError:UOe()}}var GOe=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${pQ(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}};function KOe(){return{localeError:GOe()}}var qOe=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${pQ(e.values[0])}`:`Неправильна опція: очікується одне з ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}};function g2(){return{localeError:qOe()}}function JOe(){return g2()}var YOe=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${pQ(e.values[0])} متوقع تھا`:`غلط آپشن: ${KZ(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${KZ(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}};function XOe(){return{localeError:YOe()}}var ZOe=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${pQ(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}};function QOe(){return{localeError:ZOe()}}var $Oe=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${pQ(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}};function eke(){return{localeError:$Oe()}}var tke=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${pQ(e.values[0])}`:`无效选项:期望以下之一 ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${KZ(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}};function nke(){return{localeError:tke()}}var rke=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${pQ(e.values[0])}`:`無效的選項:預期為以下其中之一 ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${KZ(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}};function ike(){return{localeError:rke()}}var ake=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=jQ(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${pQ(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${KZ(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${KZ(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}};function oke(){return{localeError:ake()}}var _2=h({ar:()=>_De,az:()=>yDe,be:()=>xDe,bg:()=>CDe,ca:()=>TDe,cs:()=>DDe,da:()=>kDe,de:()=>jDe,el:()=>NDe,en:()=>l2,eo:()=>IDe,es:()=>RDe,fa:()=>BDe,fi:()=>HDe,fr:()=>WDe,frCA:()=>KDe,he:()=>JDe,hr:()=>XDe,hu:()=>QDe,hy:()=>eOe,id:()=>nOe,is:()=>iOe,it:()=>oOe,ja:()=>cOe,ka:()=>uOe,kh:()=>fOe,km:()=>f2,ko:()=>mOe,lt:()=>gOe,mk:()=>vOe,ms:()=>bOe,nl:()=>SOe,no:()=>wOe,ota:()=>EOe,pl:()=>AOe,ps:()=>OOe,pt:()=>MOe,ro:()=>POe,ru:()=>IOe,sl:()=>ROe,sv:()=>BOe,ta:()=>HOe,th:()=>WOe,tr:()=>KOe,ua:()=>JOe,uk:()=>g2,ur:()=>XOe,uz:()=>QOe,vi:()=>eke,yo:()=>oke,zhCN:()=>nke,zhTW:()=>ike}),v2,y2=Symbol(`ZodOutput`),b2=Symbol(`ZodInput`),x2=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function S2(){return new x2}(v2=globalThis).__zod_globalRegistry??(v2.__zod_globalRegistry=S2());var C2=globalThis.__zod_globalRegistry;function w2(e,t){return new e({type:`string`,...$(t)})}function T2(e,t){return new e({type:`string`,coerce:!0,...$(t)})}function E2(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...$(t)})}function D2(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...$(t)})}function O2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...$(t)})}function k2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...$(t)})}function A2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...$(t)})}function j2(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...$(t)})}function M2(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...$(t)})}function N2(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...$(t)})}function P2(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...$(t)})}function F2(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...$(t)})}function I2(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...$(t)})}function L2(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...$(t)})}function R2(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...$(t)})}function z2(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...$(t)})}function B2(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...$(t)})}function V2(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...$(t)})}function H2(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...$(t)})}function U2(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...$(t)})}function W2(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...$(t)})}function G2(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...$(t)})}function K2(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...$(t)})}function q2(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...$(t)})}function J2(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...$(t)})}var Y2={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function X2(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...$(t)})}function Z2(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...$(t)})}function Q2(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...$(t)})}function $2(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...$(t)})}function e4(e,t){return new e({type:`number`,checks:[],...$(t)})}function t4(e,t){return new e({type:`number`,coerce:!0,checks:[],...$(t)})}function n4(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...$(t)})}function r4(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...$(t)})}function i4(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...$(t)})}function a4(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...$(t)})}function o4(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...$(t)})}function s4(e,t){return new e({type:`boolean`,...$(t)})}function c4(e,t){return new e({type:`boolean`,coerce:!0,...$(t)})}function l4(e,t){return new e({type:`bigint`,...$(t)})}function u4(e,t){return new e({type:`bigint`,coerce:!0,...$(t)})}function d4(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...$(t)})}function f4(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...$(t)})}function p4(e,t){return new e({type:`symbol`,...$(t)})}function m4(e,t){return new e({type:`undefined`,...$(t)})}function h4(e,t){return new e({type:`null`,...$(t)})}function g4(e){return new e({type:`any`})}function _4(e){return new e({type:`unknown`})}function v4(e,t){return new e({type:`never`,...$(t)})}function y4(e,t){return new e({type:`void`,...$(t)})}function b4(e,t){return new e({type:`date`,...$(t)})}function x4(e,t){return new e({type:`date`,coerce:!0,...$(t)})}function S4(e,t){return new e({type:`nan`,...$(t)})}function C4(e,t){return new J$({check:`less_than`,...$(t),value:e,inclusive:!1})}function w4(e,t){return new J$({check:`less_than`,...$(t),value:e,inclusive:!0})}function T4(e,t){return new Y$({check:`greater_than`,...$(t),value:e,inclusive:!1})}function E4(e,t){return new Y$({check:`greater_than`,...$(t),value:e,inclusive:!0})}function D4(e){return T4(0,e)}function O4(e){return C4(0,e)}function k4(e){return w4(0,e)}function A4(e){return E4(0,e)}function j4(e,t){return new X$({check:`multiple_of`,...$(t),value:e})}function M4(e,t){return new $$({check:`max_size`,...$(t),maximum:e})}function N4(e,t){return new e1({check:`min_size`,...$(t),minimum:e})}function P4(e,t){return new t1({check:`size_equals`,...$(t),size:e})}function F4(e,t){return new n1({check:`max_length`,...$(t),maximum:e})}function I4(e,t){return new r1({check:`min_length`,...$(t),minimum:e})}function L4(e,t){return new i1({check:`length_equals`,...$(t),length:e})}function R4(e,t){return new o1({check:`string_format`,format:`regex`,...$(t),pattern:e})}function z4(e){return new s1({check:`string_format`,format:`lowercase`,...$(e)})}function B4(e){return new c1({check:`string_format`,format:`uppercase`,...$(e)})}function V4(e,t){return new l1({check:`string_format`,format:`includes`,...$(t),includes:e})}function H4(e,t){return new u1({check:`string_format`,format:`starts_with`,...$(t),prefix:e})}function U4(e,t){return new d1({check:`string_format`,format:`ends_with`,...$(t),suffix:e})}function W4(e,t,n){return new p1({check:`property`,property:e,schema:t,...$(n)})}function G4(e,t){return new m1({check:`mime_type`,mime:e,...$(t)})}function K4(e){return new h1({check:`overwrite`,tx:e})}function q4(e){return K4(t=>t.normalize(e))}function J4(){return K4(e=>e.trim())}function Y4(){return K4(e=>e.toLowerCase())}function X4(){return K4(e=>e.toUpperCase())}function Z4(){return K4(e=>rQ(e))}function Q4(e,t,n){return new e({type:`array`,element:t,...$(n)})}function ske(e,t,n){return new e({type:`union`,options:t,...$(n)})}function cke(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...$(n)})}function lke(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...$(r)})}function uke(e,t,n){return new e({type:`intersection`,left:t,right:n})}function dke(e,t,n,r){let i=n instanceof v1;return new e({type:`tuple`,items:t,rest:i?n:null,...$(i?r:n)})}function fke(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...$(r)})}function pke(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...$(r)})}function mke(e,t,n){return new e({type:`set`,valueType:t,...$(n)})}function hke(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...$(n)})}function gke(e,t,n){return new e({type:`enum`,entries:t,...$(n)})}function _ke(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...$(n)})}function $4(e,t){return new e({type:`file`,...$(t)})}function vke(e,t){return new e({type:`transform`,transform:t})}function yke(e,t){return new e({type:`optional`,innerType:t})}function bke(e,t){return new e({type:`nullable`,innerType:t})}function xke(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():cQ(n)}})}function Ske(e,t,n){return new e({type:`nonoptional`,innerType:t,...$(n)})}function Cke(e,t){return new e({type:`success`,innerType:t})}function wke(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function Tke(e,t,n){return new e({type:`pipe`,in:t,out:n})}function Eke(e,t){return new e({type:`readonly`,innerType:t})}function Dke(e,t,n){return new e({type:`template_literal`,parts:t,...$(n)})}function Oke(e,t){return new e({type:`lazy`,getter:t})}function kke(e,t){return new e({type:`promise`,innerType:t})}function e3(e,t,n){let r=$(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function t3(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...$(n)})}function n3(e,t){let n=r3(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(MQ(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(MQ(r))}},e(t.value,t)),t);return n}function r3(e,t){let n=new K$({check:`custom`,...$(t)});return n._zod.check=e,n}function i3(e){let t=new K$({check:`describe`});return t._zod.onattach=[t=>{let n=C2.get(t)??{};C2.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function a3(e){let t=new K$({check:`meta`});return t._zod.onattach=[t=>{let n=C2.get(t)??{};C2.add(t,{...n,...e})}],t._zod.check=()=>{},t}function o3(e,t){let n=$(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??X0,c=e.Boolean??Z1,l=new s({type:`pipe`,in:new(e.String??y1)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function s3(e,t,n,r={}){let i=$(r),a={...$(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}function c3(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??C2,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function l3(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,l3(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&f3(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function u3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
196
196
|
|
|
197
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function d3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:m3(t,`input`,e.processors),output:m3(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function f3(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return f3(r.element,n);if(r.type===`set`)return f3(r.valueType,n);if(r.type===`lazy`)return f3(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return f3(r.innerType,n);if(r.type===`intersection`)return f3(r.left,n)||f3(r.right,n);if(r.type===`record`||r.type===`map`)return f3(r.keyType,n)||f3(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:f3(r.in,n)||f3(r.out,n);if(r.type===`object`){for(let e in r.shape)if(f3(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(f3(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(f3(e,n))return!0;return!!(r.rest&&f3(r.rest,n))}return!1}var p3=(e,t={})=>n=>{let r=c3({...n,processors:t});return l3(e,r),u3(r,e),d3(r,e)},m3=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=c3({...i??{},target:a,io:t,processors:n});return l3(e,o),u3(o,e),d3(o,e)},Ake={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},h3=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ake[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},g3=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},_3=(e,t,n,r)=>{n.type=`boolean`},v3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},y3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},b3=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},x3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},S3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},C3=(e,t,n,r)=>{n.not={}},jke=(e,t,n,r)=>{},Mke=(e,t,n,r)=>{},w3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},T3=(e,t,n,r)=>{let i=e._zod.def,a=GZ(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},E3=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},D3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},O3=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},k3=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},A3=(e,t,n,r)=>{n.type=`boolean`},j3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},M3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},N3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},P3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},F3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},I3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=l3(a.element,t,{...r,path:[...r.path,`items`]})},L3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=l3(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=l3(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},R3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>l3(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},z3=(e,t,n,r)=>{let i=e._zod.def,a=l3(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=l3(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},B3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>l3(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?l3(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},V3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=l3(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=l3(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=l3(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},H3=(e,t,n,r)=>{let i=e._zod.def,a=l3(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},U3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},W3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},G3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},K3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},q3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;l3(o,t,r);let s=t.seen.get(e);s.ref=o},J3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Y3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},X3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Z3=(e,t,n,r)=>{let i=e._zod.innerType;l3(i,t,r);let a=t.seen.get(e);a.ref=i},Q3={string:h3,number:g3,boolean:_3,bigint:v3,symbol:y3,null:b3,undefined:x3,void:S3,never:C3,any:jke,unknown:Mke,date:w3,enum:T3,literal:E3,nan:D3,template_literal:O3,file:k3,success:A3,custom:j3,function:M3,transform:N3,map:P3,set:F3,array:I3,object:L3,union:R3,intersection:z3,tuple:B3,record:V3,nullable:H3,nonoptional:U3,default:W3,prefault:G3,catch:K3,pipe:q3,readonly:J3,promise:Y3,optional:X3,lazy:Z3};function $3(e,t){if(`_idmap`in e){let n=e,r=c3({...t,processors:Q3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;l3(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;u3(r,n),a[t]=d3(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=c3({...t,processors:Q3});return l3(e,n),u3(n,e),d3(n,e)}var Nke=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=c3({processors:Q3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return l3(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),u3(this.ctx,e);let{"~standard":n,...r}=d3(this.ctx,e);return r}},Pke=h({}),Fke=h({$ZodAny:()=>r0,$ZodArray:()=>l0,$ZodAsyncError:()=>BZ,$ZodBase64:()=>H1,$ZodBase64URL:()=>W1,$ZodBigInt:()=>Q1,$ZodBigIntFormat:()=>$1,$ZodBoolean:()=>Z1,$ZodCIDRv4:()=>z1,$ZodCIDRv6:()=>B1,$ZodCUID:()=>D1,$ZodCUID2:()=>O1,$ZodCatch:()=>K0,$ZodCheck:()=>K$,$ZodCheckBigIntFormat:()=>Q$,$ZodCheckEndsWith:()=>d1,$ZodCheckGreaterThan:()=>Y$,$ZodCheckIncludes:()=>l1,$ZodCheckLengthEquals:()=>i1,$ZodCheckLessThan:()=>J$,$ZodCheckLowerCase:()=>s1,$ZodCheckMaxLength:()=>n1,$ZodCheckMaxSize:()=>$$,$ZodCheckMimeType:()=>m1,$ZodCheckMinLength:()=>r1,$ZodCheckMinSize:()=>e1,$ZodCheckMultipleOf:()=>X$,$ZodCheckNumberFormat:()=>Z$,$ZodCheckOverwrite:()=>h1,$ZodCheckProperty:()=>p1,$ZodCheckRegex:()=>o1,$ZodCheckSizeEquals:()=>t1,$ZodCheckStartsWith:()=>u1,$ZodCheckStringFormat:()=>a1,$ZodCheckUpperCase:()=>c1,$ZodCodec:()=>X0,$ZodCustom:()=>o2,$ZodCustomStringFormat:()=>J1,$ZodDate:()=>s0,$ZodDefault:()=>B0,$ZodDiscriminatedUnion:()=>y0,$ZodE164:()=>G1,$ZodEmail:()=>C1,$ZodEmoji:()=>T1,$ZodEncodeError:()=>VZ,$ZodEnum:()=>M0,$ZodError:()=>IQ,$ZodExactOptional:()=>R0,$ZodFile:()=>P0,$ZodFunction:()=>r2,$ZodGUID:()=>x1,$ZodIPv4:()=>I1,$ZodIPv6:()=>L1,$ZodISODate:()=>N1,$ZodISODateTime:()=>M1,$ZodISODuration:()=>F1,$ZodISOTime:()=>P1,$ZodIntersection:()=>b0,$ZodJWT:()=>q1,$ZodKSUID:()=>j1,$ZodLazy:()=>a2,$ZodLiteral:()=>N0,$ZodMAC:()=>R1,$ZodMap:()=>O0,$ZodNaN:()=>q0,$ZodNanoID:()=>E1,$ZodNever:()=>a0,$ZodNonOptional:()=>U0,$ZodNull:()=>n0,$ZodNullable:()=>z0,$ZodNumber:()=>Y1,$ZodNumberFormat:()=>X1,$ZodObject:()=>p0,$ZodObjectJIT:()=>m0,$ZodOptional:()=>L0,$ZodPipe:()=>J0,$ZodPrefault:()=>H0,$ZodPreprocess:()=>$0,$ZodPromise:()=>i2,$ZodReadonly:()=>e2,$ZodRealError:()=>LQ,$ZodRecord:()=>D0,$ZodRegistry:()=>x2,$ZodSet:()=>A0,$ZodString:()=>y1,$ZodStringFormat:()=>b1,$ZodSuccess:()=>G0,$ZodSymbol:()=>e0,$ZodTemplateLiteral:()=>n2,$ZodTransform:()=>F0,$ZodTuple:()=>C0,$ZodType:()=>v1,$ZodULID:()=>k1,$ZodURL:()=>w1,$ZodUUID:()=>S1,$ZodUndefined:()=>t0,$ZodUnion:()=>g0,$ZodUnknown:()=>i0,$ZodVoid:()=>o0,$ZodXID:()=>A1,$ZodXor:()=>v0,$brand:()=>zZ,$constructor:()=>Q,$input:()=>b2,$output:()=>y2,Doc:()=>g1,JSONSchema:()=>Pke,JSONSchemaGenerator:()=>Nke,NEVER:()=>RZ,TimePrecision:()=>Y2,_any:()=>g4,_array:()=>Q4,_base64:()=>G2,_base64url:()=>K2,_bigint:()=>l4,_boolean:()=>s4,_catch:()=>wke,_check:()=>r3,_cidrv4:()=>U2,_cidrv6:()=>W2,_coercedBigint:()=>u4,_coercedBoolean:()=>c4,_coercedDate:()=>x4,_coercedNumber:()=>t4,_coercedString:()=>T2,_cuid:()=>F2,_cuid2:()=>I2,_custom:()=>e3,_date:()=>b4,_decode:()=>QQ,_decodeAsync:()=>e$,_default:()=>xke,_discriminatedUnion:()=>lke,_e164:()=>q2,_email:()=>E2,_emoji:()=>N2,_encode:()=>ZQ,_encodeAsync:()=>$Q,_endsWith:()=>U4,_enum:()=>hke,_file:()=>$4,_float32:()=>r4,_float64:()=>i4,_gt:()=>T4,_gte:()=>E4,_guid:()=>D2,_includes:()=>V4,_int:()=>n4,_int32:()=>a4,_int64:()=>d4,_intersection:()=>uke,_ipv4:()=>B2,_ipv6:()=>V2,_isoDate:()=>Z2,_isoDateTime:()=>X2,_isoDuration:()=>$2,_isoTime:()=>Q2,_jwt:()=>J2,_ksuid:()=>z2,_lazy:()=>Oke,_length:()=>L4,_literal:()=>_ke,_lowercase:()=>z4,_lt:()=>C4,_lte:()=>w4,_mac:()=>H2,_map:()=>pke,_max:()=>w4,_maxLength:()=>F4,_maxSize:()=>M4,_mime:()=>G4,_min:()=>E4,_minLength:()=>I4,_minSize:()=>N4,_multipleOf:()=>j4,_nan:()=>S4,_nanoid:()=>P2,_nativeEnum:()=>gke,_negative:()=>O4,_never:()=>v4,_nonnegative:()=>A4,_nonoptional:()=>Ske,_nonpositive:()=>k4,_normalize:()=>q4,_null:()=>h4,_nullable:()=>bke,_number:()=>e4,_optional:()=>yke,_overwrite:()=>K4,_parse:()=>UQ,_parseAsync:()=>GQ,_pipe:()=>Tke,_positive:()=>D4,_promise:()=>kke,_property:()=>W4,_readonly:()=>Eke,_record:()=>fke,_refine:()=>t3,_regex:()=>R4,_safeDecode:()=>n$,_safeDecodeAsync:()=>i$,_safeEncode:()=>t$,_safeEncodeAsync:()=>r$,_safeParse:()=>qQ,_safeParseAsync:()=>YQ,_set:()=>mke,_size:()=>P4,_slugify:()=>Z4,_startsWith:()=>H4,_string:()=>w2,_stringFormat:()=>s3,_stringbool:()=>o3,_success:()=>Cke,_superRefine:()=>n3,_symbol:()=>p4,_templateLiteral:()=>Dke,_toLowerCase:()=>Y4,_toUpperCase:()=>X4,_transform:()=>vke,_trim:()=>J4,_tuple:()=>dke,_uint32:()=>o4,_uint64:()=>f4,_ulid:()=>L2,_undefined:()=>m4,_union:()=>ske,_unknown:()=>_4,_uppercase:()=>B4,_url:()=>M2,_uuid:()=>O2,_uuidv4:()=>k2,_uuidv6:()=>A2,_uuidv7:()=>j2,_void:()=>y4,_xid:()=>R2,_xor:()=>cke,clone:()=>fQ,config:()=>UZ,createStandardJSONSchemaMethod:()=>m3,createToJSONSchemaMethod:()=>p3,decode:()=>zEe,decodeAsync:()=>VEe,describe:()=>i3,encode:()=>REe,encodeAsync:()=>BEe,extractDefs:()=>u3,finalize:()=>d3,flattenError:()=>RQ,formatError:()=>zQ,globalConfig:()=>HZ,globalRegistry:()=>C2,initializeContext:()=>c3,isValidBase64:()=>V1,isValidBase64URL:()=>U1,isValidJWT:()=>K1,locales:()=>_2,meta:()=>a3,parse:()=>WQ,parseAsync:()=>KQ,prettifyError:()=>HQ,process:()=>l3,regexes:()=>a$,registry:()=>S2,safeDecode:()=>UEe,safeDecodeAsync:()=>GEe,safeEncode:()=>HEe,safeEncodeAsync:()=>WEe,safeParse:()=>JQ,safeParseAsync:()=>XQ,toDotPath:()=>VQ,toJSONSchema:()=>$3,treeifyError:()=>BQ,util:()=>WZ,version:()=>_1}),Ike=h({endsWith:()=>U4,gt:()=>T4,gte:()=>E4,includes:()=>V4,length:()=>L4,lowercase:()=>z4,lt:()=>C4,lte:()=>w4,maxLength:()=>F4,maxSize:()=>M4,mime:()=>G4,minLength:()=>I4,minSize:()=>N4,multipleOf:()=>j4,negative:()=>O4,nonnegative:()=>A4,nonpositive:()=>k4,normalize:()=>q4,overwrite:()=>K4,positive:()=>D4,property:()=>W4,regex:()=>R4,size:()=>P4,slugify:()=>Z4,startsWith:()=>H4,toLowerCase:()=>Y4,toUpperCase:()=>X4,trim:()=>J4,uppercase:()=>B4}),e6=h({ZodISODate:()=>r6,ZodISODateTime:()=>t6,ZodISODuration:()=>s6,ZodISOTime:()=>a6,date:()=>i6,datetime:()=>n6,duration:()=>c6,time:()=>o6}),t6=Q(`ZodISODateTime`,(e,t)=>{M1.init(e,t),k6.init(e,t)});function n6(e){return X2(t6,e)}var r6=Q(`ZodISODate`,(e,t)=>{N1.init(e,t),k6.init(e,t)});function i6(e){return Z2(r6,e)}var a6=Q(`ZodISOTime`,(e,t)=>{P1.init(e,t),k6.init(e,t)});function o6(e){return Q2(a6,e)}var s6=Q(`ZodISODuration`,(e,t)=>{F1.init(e,t),k6.init(e,t)});function c6(e){return $2(s6,e)}var l6=(e,t)=>{IQ.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>zQ(e,t)},flatten:{value:t=>RQ(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,qZ,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,qZ,2)}},isEmpty:{get(){return e.issues.length===0}}})},Lke=Q(`ZodError`,l6),u6=Q(`ZodError`,l6,{Parent:Error}),d6=UQ(u6),f6=GQ(u6),p6=qQ(u6),m6=YQ(u6),h6=ZQ(u6),g6=QQ(u6),_6=$Q(u6),v6=e$(u6),y6=t$(u6),b6=n$(u6),x6=r$(u6),S6=i$(u6),Rke=h({ZodAny:()=>K8,ZodArray:()=>n5,ZodBase64:()=>f8,ZodBase64URL:()=>m8,ZodBigInt:()=>F8,ZodBigIntFormat:()=>L8,ZodBoolean:()=>N8,ZodCIDRv4:()=>c8,ZodCIDRv6:()=>u8,ZodCUID:()=>K6,ZodCUID2:()=>J6,ZodCatch:()=>Z5,ZodCodec:()=>r7,ZodCustom:()=>_7,ZodCustomStringFormat:()=>b8,ZodDate:()=>e5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>p5,ZodE164:()=>g8,ZodEmail:()=>A6,ZodEmoji:()=>H6,ZodEnum:()=>D5,ZodExactOptional:()=>R5,ZodFile:()=>M5,ZodFunction:()=>h7,ZodGUID:()=>M6,ZodIPv4:()=>n8,ZodIPv6:()=>o8,ZodIntersection:()=>h5,ZodJWT:()=>v8,ZodKSUID:()=>e8,ZodLazy:()=>d7,ZodLiteral:()=>A5,ZodMAC:()=>i8,ZodMap:()=>C5,ZodNaN:()=>$5,ZodNanoID:()=>W6,ZodNever:()=>X8,ZodNonOptional:()=>q5,ZodNull:()=>W8,ZodNullable:()=>B5,ZodNumber:()=>T8,ZodNumberFormat:()=>D8,ZodObject:()=>a5,ZodOptional:()=>I5,ZodPipe:()=>t7,ZodPrefault:()=>G5,ZodPreprocess:()=>o7,ZodPromise:()=>p7,ZodReadonly:()=>s7,ZodRecord:()=>y5,ZodSet:()=>T5,ZodString:()=>D6,ZodStringFormat:()=>k6,ZodSuccess:()=>Y5,ZodSymbol:()=>B8,ZodTemplateLiteral:()=>l7,ZodTransform:()=>P5,ZodTuple:()=>_5,ZodType:()=>T6,ZodULID:()=>X6,ZodURL:()=>z6,ZodUUID:()=>P6,ZodUndefined:()=>H8,ZodUnion:()=>l5,ZodUnknown:()=>J8,ZodVoid:()=>Q8,ZodXID:()=>Q6,ZodXor:()=>d5,_ZodString:()=>E6,_default:()=>W5,_function:()=>g7,any:()=>q8,array:()=>r5,base64:()=>p8,base64url:()=>h8,bigint:()=>I8,boolean:()=>P8,catch:()=>Q5,check:()=>v7,cidrv4:()=>l8,cidrv6:()=>d8,codec:()=>i7,cuid:()=>q6,cuid2:()=>Y6,custom:()=>y7,date:()=>t5,describe:()=>S7,discriminatedUnion:()=>m5,e164:()=>_8,email:()=>j6,emoji:()=>U6,enum:()=>O5,exactOptional:()=>z5,file:()=>N5,float32:()=>k8,float64:()=>A8,function:()=>g7,guid:()=>N6,hash:()=>w8,hex:()=>C8,hostname:()=>S8,httpUrl:()=>V6,instanceof:()=>w7,int:()=>O8,int32:()=>j8,int64:()=>R8,intersection:()=>g5,invertCodec:()=>a7,ipv4:()=>r8,ipv6:()=>s8,json:()=>E7,jwt:()=>y8,keyof:()=>i5,ksuid:()=>t8,lazy:()=>f7,literal:()=>j5,looseObject:()=>c5,looseRecord:()=>S5,mac:()=>a8,map:()=>w5,meta:()=>C7,nan:()=>e7,nanoid:()=>G6,nativeEnum:()=>k5,never:()=>Z8,nonoptional:()=>J5,null:()=>G8,nullable:()=>V5,nullish:()=>H5,number:()=>E8,object:()=>o5,optional:()=>L5,partialRecord:()=>x5,pipe:()=>n7,prefault:()=>K5,preprocess:()=>D7,promise:()=>m7,readonly:()=>c7,record:()=>b5,refine:()=>b7,set:()=>E5,strictObject:()=>s5,string:()=>O6,stringFormat:()=>x8,stringbool:()=>T7,success:()=>X5,superRefine:()=>x7,symbol:()=>V8,templateLiteral:()=>u7,transform:()=>F5,tuple:()=>v5,uint32:()=>M8,uint64:()=>z8,ulid:()=>Z6,undefined:()=>U8,union:()=>u5,unknown:()=>Y8,url:()=>B6,uuid:()=>F6,uuidv4:()=>I6,uuidv6:()=>L6,uuidv7:()=>R6,void:()=>$8,xid:()=>$6,xor:()=>f5}),C6=new WeakMap;function w6(e,t,n){let r=Object.getPrototypeOf(e),i=C6.get(r);if(i||(i=new Set,C6.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var T6=Q(`ZodType`,(e,t)=>(v1.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:m3(e,`input`),output:m3(e,`output`)}}),e.toJSONSchema=p3(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>d6(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>p6(e,t,n),e.parseAsync=async(t,n)=>f6(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>m6(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>h6(e,t,n),e.decode=(t,n)=>g6(e,t,n),e.encodeAsync=async(t,n)=>_6(e,t,n),e.decodeAsync=async(t,n)=>v6(e,t,n),e.safeEncode=(t,n)=>y6(e,t,n),e.safeDecode=(t,n)=>b6(e,t,n),e.safeEncodeAsync=async(t,n)=>x6(e,t,n),e.safeDecodeAsync=async(t,n)=>S6(e,t,n),w6(e,`ZodType`,{check(...e){let t=this.def;return this.clone(tQ(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return fQ(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(b7(e,t))},superRefine(e,t){return this.check(x7(e,t))},overwrite(e){return this.check(K4(e))},optional(){return L5(this)},exactOptional(){return z5(this)},nullable(){return V5(this)},nullish(){return L5(V5(this))},nonoptional(e){return J5(this,e)},array(){return r5(this)},or(e){return u5([this,e])},and(e){return g5(this,e)},transform(e){return n7(this,F5(e))},default(e){return W5(this,e)},prefault(e){return K5(this,e)},catch(e){return Q5(this,e)},pipe(e){return n7(this,e)},readonly(){return c7(this)},describe(e){let t=this.clone();return C2.add(t,{description:e}),t},meta(...e){if(e.length===0)return C2.get(this);let t=this.clone();return C2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return C2.get(e)?.description},configurable:!0}),e)),E6=Q(`_ZodString`,(e,t)=>{y1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,w6(e,`_ZodString`,{regex(...e){return this.check(R4(...e))},includes(...e){return this.check(V4(...e))},startsWith(...e){return this.check(H4(...e))},endsWith(...e){return this.check(U4(...e))},min(...e){return this.check(I4(...e))},max(...e){return this.check(F4(...e))},length(...e){return this.check(L4(...e))},nonempty(...e){return this.check(I4(1,...e))},lowercase(e){return this.check(z4(e))},uppercase(e){return this.check(B4(e))},trim(){return this.check(J4())},normalize(...e){return this.check(q4(...e))},toLowerCase(){return this.check(Y4())},toUpperCase(){return this.check(X4())},slugify(){return this.check(Z4())}})}),D6=Q(`ZodString`,(e,t)=>{y1.init(e,t),E6.init(e,t),e.email=t=>e.check(E2(A6,t)),e.url=t=>e.check(M2(z6,t)),e.jwt=t=>e.check(J2(v8,t)),e.emoji=t=>e.check(N2(H6,t)),e.guid=t=>e.check(D2(M6,t)),e.uuid=t=>e.check(O2(P6,t)),e.uuidv4=t=>e.check(k2(P6,t)),e.uuidv6=t=>e.check(A2(P6,t)),e.uuidv7=t=>e.check(j2(P6,t)),e.nanoid=t=>e.check(P2(W6,t)),e.guid=t=>e.check(D2(M6,t)),e.cuid=t=>e.check(F2(K6,t)),e.cuid2=t=>e.check(I2(J6,t)),e.ulid=t=>e.check(L2(X6,t)),e.base64=t=>e.check(G2(f8,t)),e.base64url=t=>e.check(K2(m8,t)),e.xid=t=>e.check(R2(Q6,t)),e.ksuid=t=>e.check(z2(e8,t)),e.ipv4=t=>e.check(B2(n8,t)),e.ipv6=t=>e.check(V2(o8,t)),e.cidrv4=t=>e.check(U2(c8,t)),e.cidrv6=t=>e.check(W2(u8,t)),e.e164=t=>e.check(q2(g8,t)),e.datetime=t=>e.check(n6(t)),e.date=t=>e.check(i6(t)),e.time=t=>e.check(o6(t)),e.duration=t=>e.check(c6(t))});function O6(e){return w2(D6,e)}var k6=Q(`ZodStringFormat`,(e,t)=>{b1.init(e,t),E6.init(e,t)}),A6=Q(`ZodEmail`,(e,t)=>{C1.init(e,t),k6.init(e,t)});function j6(e){return E2(A6,e)}var M6=Q(`ZodGUID`,(e,t)=>{x1.init(e,t),k6.init(e,t)});function N6(e){return D2(M6,e)}var P6=Q(`ZodUUID`,(e,t)=>{S1.init(e,t),k6.init(e,t)});function F6(e){return O2(P6,e)}function I6(e){return k2(P6,e)}function L6(e){return A2(P6,e)}function R6(e){return j2(P6,e)}var z6=Q(`ZodURL`,(e,t)=>{w1.init(e,t),k6.init(e,t)});function B6(e){return M2(z6,e)}function V6(e){return M2(z6,{protocol:D$,hostname:E$,...$(e)})}var H6=Q(`ZodEmoji`,(e,t)=>{T1.init(e,t),k6.init(e,t)});function U6(e){return N2(H6,e)}var W6=Q(`ZodNanoID`,(e,t)=>{E1.init(e,t),k6.init(e,t)});function G6(e){return P2(W6,e)}var K6=Q(`ZodCUID`,(e,t)=>{D1.init(e,t),k6.init(e,t)});function q6(e){return F2(K6,e)}var J6=Q(`ZodCUID2`,(e,t)=>{O1.init(e,t),k6.init(e,t)});function Y6(e){return I2(J6,e)}var X6=Q(`ZodULID`,(e,t)=>{k1.init(e,t),k6.init(e,t)});function Z6(e){return L2(X6,e)}var Q6=Q(`ZodXID`,(e,t)=>{A1.init(e,t),k6.init(e,t)});function $6(e){return R2(Q6,e)}var e8=Q(`ZodKSUID`,(e,t)=>{j1.init(e,t),k6.init(e,t)});function t8(e){return z2(e8,e)}var n8=Q(`ZodIPv4`,(e,t)=>{I1.init(e,t),k6.init(e,t)});function r8(e){return B2(n8,e)}var i8=Q(`ZodMAC`,(e,t)=>{R1.init(e,t),k6.init(e,t)});function a8(e){return H2(i8,e)}var o8=Q(`ZodIPv6`,(e,t)=>{L1.init(e,t),k6.init(e,t)});function s8(e){return V2(o8,e)}var c8=Q(`ZodCIDRv4`,(e,t)=>{z1.init(e,t),k6.init(e,t)});function l8(e){return U2(c8,e)}var u8=Q(`ZodCIDRv6`,(e,t)=>{B1.init(e,t),k6.init(e,t)});function d8(e){return W2(u8,e)}var f8=Q(`ZodBase64`,(e,t)=>{H1.init(e,t),k6.init(e,t)});function p8(e){return G2(f8,e)}var m8=Q(`ZodBase64URL`,(e,t)=>{W1.init(e,t),k6.init(e,t)});function h8(e){return K2(m8,e)}var g8=Q(`ZodE164`,(e,t)=>{G1.init(e,t),k6.init(e,t)});function _8(e){return q2(g8,e)}var v8=Q(`ZodJWT`,(e,t)=>{q1.init(e,t),k6.init(e,t)});function y8(e){return J2(v8,e)}var b8=Q(`ZodCustomStringFormat`,(e,t)=>{J1.init(e,t),k6.init(e,t)});function x8(e,t,n={}){return s3(b8,e,t,n)}function S8(e){return s3(b8,`hostname`,T$,e)}function C8(e){return s3(b8,`hex`,U$,e)}function w8(e,t){let n=`${e}_${t?.enc??`hex`}`,r=a$[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return s3(b8,n,r,t)}var T8=Q(`ZodNumber`,(e,t)=>{Y1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),w6(e,`ZodNumber`,{gt(e,t){return this.check(T4(e,t))},gte(e,t){return this.check(E4(e,t))},min(e,t){return this.check(E4(e,t))},lt(e,t){return this.check(C4(e,t))},lte(e,t){return this.check(w4(e,t))},max(e,t){return this.check(w4(e,t))},int(e){return this.check(O8(e))},safe(e){return this.check(O8(e))},positive(e){return this.check(T4(0,e))},nonnegative(e){return this.check(E4(0,e))},negative(e){return this.check(C4(0,e))},nonpositive(e){return this.check(w4(0,e))},multipleOf(e,t){return this.check(j4(e,t))},step(e,t){return this.check(j4(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function E8(e){return e4(T8,e)}var D8=Q(`ZodNumberFormat`,(e,t)=>{X1.init(e,t),T8.init(e,t)});function O8(e){return n4(D8,e)}function k8(e){return r4(D8,e)}function A8(e){return i4(D8,e)}function j8(e){return a4(D8,e)}function M8(e){return o4(D8,e)}var N8=Q(`ZodBoolean`,(e,t)=>{Z1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_3(e,t,n,r)});function P8(e){return s4(N8,e)}var F8=Q(`ZodBigInt`,(e,t)=>{Q1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v3(e,t,n,r),e.gte=(t,n)=>e.check(E4(t,n)),e.min=(t,n)=>e.check(E4(t,n)),e.gt=(t,n)=>e.check(T4(t,n)),e.gte=(t,n)=>e.check(E4(t,n)),e.min=(t,n)=>e.check(E4(t,n)),e.lt=(t,n)=>e.check(C4(t,n)),e.lte=(t,n)=>e.check(w4(t,n)),e.max=(t,n)=>e.check(w4(t,n)),e.positive=t=>e.check(T4(BigInt(0),t)),e.negative=t=>e.check(C4(BigInt(0),t)),e.nonpositive=t=>e.check(w4(BigInt(0),t)),e.nonnegative=t=>e.check(E4(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(j4(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function I8(e){return l4(F8,e)}var L8=Q(`ZodBigIntFormat`,(e,t)=>{$1.init(e,t),F8.init(e,t)});function R8(e){return d4(L8,e)}function z8(e){return f4(L8,e)}var B8=Q(`ZodSymbol`,(e,t)=>{e0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y3(e,t,n,r)});function V8(e){return p4(B8,e)}var H8=Q(`ZodUndefined`,(e,t)=>{t0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x3(e,t,n,r)});function U8(e){return m4(H8,e)}var W8=Q(`ZodNull`,(e,t)=>{n0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b3(e,t,n,r)});function G8(e){return h4(W8,e)}var K8=Q(`ZodAny`,(e,t)=>{r0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function q8(){return g4(K8)}var J8=Q(`ZodUnknown`,(e,t)=>{i0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Y8(){return _4(J8)}var X8=Q(`ZodNever`,(e,t)=>{a0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C3(e,t,n,r)});function Z8(e){return v4(X8,e)}var Q8=Q(`ZodVoid`,(e,t)=>{o0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S3(e,t,n,r)});function $8(e){return y4(Q8,e)}var e5=Q(`ZodDate`,(e,t)=>{s0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w3(e,t,n,r),e.min=(t,n)=>e.check(E4(t,n)),e.max=(t,n)=>e.check(w4(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function t5(e){return b4(e5,e)}var n5=Q(`ZodArray`,(e,t)=>{l0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I3(e,t,n,r),e.element=t.element,w6(e,`ZodArray`,{min(e,t){return this.check(I4(e,t))},nonempty(e){return this.check(I4(1,e))},max(e,t){return this.check(F4(e,t))},length(e,t){return this.check(L4(e,t))},unwrap(){return this.element}})});function r5(e,t){return Q4(n5,e,t)}function i5(e){let t=e._zod.def.shape;return O5(Object.keys(t))}var a5=Q(`ZodObject`,(e,t)=>{m0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L3(e,t,n,r),$Z(e,`shape`,()=>t.shape),w6(e,`ZodObject`,{keyof(){return O5(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Y8()})},loose(){return this.clone({...this._zod.def,catchall:Y8()})},strict(){return this.clone({...this._zod.def,catchall:Z8()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return yQ(this,e)},safeExtend(e){return bQ(this,e)},merge(e){return xQ(this,e)},pick(e){return _Q(this,e)},omit(e){return vQ(this,e)},partial(...e){return SQ(I5,this,e[0])},required(...e){return CQ(q5,this,e[0])}})});function o5(e,t){return new a5({type:`object`,shape:e??{},...$(t)})}function s5(e,t){return new a5({type:`object`,shape:e,catchall:Z8(),...$(t)})}function c5(e,t){return new a5({type:`object`,shape:e,catchall:Y8(),...$(t)})}var l5=Q(`ZodUnion`,(e,t)=>{g0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R3(e,t,n,r),e.options=t.options});function u5(e,t){return new l5({type:`union`,options:e,...$(t)})}var d5=Q(`ZodXor`,(e,t)=>{l5.init(e,t),v0.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R3(e,t,n,r),e.options=t.options});function f5(e,t){return new d5({type:`union`,options:e,inclusive:!1,...$(t)})}var p5=Q(`ZodDiscriminatedUnion`,(e,t)=>{l5.init(e,t),y0.init(e,t)});function m5(e,t,n){return new p5({type:`union`,options:t,discriminator:e,...$(n)})}var h5=Q(`ZodIntersection`,(e,t)=>{b0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z3(e,t,n,r)});function g5(e,t){return new h5({type:`intersection`,left:e,right:t})}var _5=Q(`ZodTuple`,(e,t)=>{C0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B3(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function v5(e,t,n){let r=t instanceof v1;return new _5({type:`tuple`,items:e,rest:r?t:null,...$(r?n:t)})}var y5=Q(`ZodRecord`,(e,t)=>{D0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function b5(e,t,n){return!t||!t._zod?new y5({type:`record`,keyType:O6(),valueType:e,...$(t)}):new y5({type:`record`,keyType:e,valueType:t,...$(n)})}function x5(e,t,n){let r=fQ(e);return r._zod.values=void 0,new y5({type:`record`,keyType:r,valueType:t,...$(n)})}function S5(e,t,n){return new y5({type:`record`,keyType:e,valueType:t,mode:`loose`,...$(n)})}var C5=Q(`ZodMap`,(e,t)=>{O0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(N4(...t)),e.nonempty=t=>e.check(N4(1,t)),e.max=(...t)=>e.check(M4(...t)),e.size=(...t)=>e.check(P4(...t))});function w5(e,t,n){return new C5({type:`map`,keyType:e,valueType:t,...$(n)})}var T5=Q(`ZodSet`,(e,t)=>{A0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F3(e,t,n,r),e.min=(...t)=>e.check(N4(...t)),e.nonempty=t=>e.check(N4(1,t)),e.max=(...t)=>e.check(M4(...t)),e.size=(...t)=>e.check(P4(...t))});function E5(e,t){return new T5({type:`set`,valueType:e,...$(t)})}var D5=Q(`ZodEnum`,(e,t)=>{M0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T3(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new D5({...t,checks:[],...$(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new D5({...t,checks:[],...$(r),entries:i})}});function O5(e,t){return new D5({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...$(t)})}function k5(e,t){return new D5({type:`enum`,entries:e,...$(t)})}var A5=Q(`ZodLiteral`,(e,t)=>{N0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E3(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function j5(e,t){return new A5({type:`literal`,values:Array.isArray(e)?e:[e],...$(t)})}var M5=Q(`ZodFile`,(e,t)=>{P0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k3(e,t,n,r),e.min=(t,n)=>e.check(N4(t,n)),e.max=(t,n)=>e.check(M4(t,n)),e.mime=(t,n)=>e.check(G4(Array.isArray(t)?t:[t],n))});function N5(e){return $4(M5,e)}var P5=Q(`ZodTransform`,(e,t)=>{F0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new VZ(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(MQ(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(MQ(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function F5(e){return new P5({type:`transform`,transform:e})}var I5=Q(`ZodOptional`,(e,t)=>{L0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function L5(e){return new I5({type:`optional`,innerType:e})}var R5=Q(`ZodExactOptional`,(e,t)=>{R0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z5(e){return new R5({type:`optional`,innerType:e})}var B5=Q(`ZodNullable`,(e,t)=>{z0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function V5(e){return new B5({type:`nullable`,innerType:e})}function H5(e){return L5(V5(e))}var U5=Q(`ZodDefault`,(e,t)=>{B0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function W5(e,t){return new U5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():cQ(t)}})}var G5=Q(`ZodPrefault`,(e,t)=>{H0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function K5(e,t){return new G5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():cQ(t)}})}var q5=Q(`ZodNonOptional`,(e,t)=>{U0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function J5(e,t){return new q5({type:`nonoptional`,innerType:e,...$(t)})}var Y5=Q(`ZodSuccess`,(e,t)=>{G0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function X5(e){return new Y5({type:`success`,innerType:e})}var Z5=Q(`ZodCatch`,(e,t)=>{K0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Q5(e,t){return new Z5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var $5=Q(`ZodNaN`,(e,t)=>{q0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D3(e,t,n,r)});function e7(e){return S4($5,e)}var t7=Q(`ZodPipe`,(e,t)=>{J0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q3(e,t,n,r),e.in=t.in,e.out=t.out});function n7(e,t){return new t7({type:`pipe`,in:e,out:t})}var r7=Q(`ZodCodec`,(e,t)=>{t7.init(e,t),X0.init(e,t)});function i7(e,t,n){return new r7({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function a7(e){let t=e._zod.def;return new r7({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var o7=Q(`ZodPreprocess`,(e,t)=>{t7.init(e,t),$0.init(e,t)}),s7=Q(`ZodReadonly`,(e,t)=>{e2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function c7(e){return new s7({type:`readonly`,innerType:e})}var l7=Q(`ZodTemplateLiteral`,(e,t)=>{n2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O3(e,t,n,r)});function u7(e,t){return new l7({type:`template_literal`,parts:e,...$(t)})}var d7=Q(`ZodLazy`,(e,t)=>{a2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function f7(e){return new d7({type:`lazy`,getter:e})}var p7=Q(`ZodPromise`,(e,t)=>{i2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function m7(e){return new p7({type:`promise`,innerType:e})}var h7=Q(`ZodFunction`,(e,t)=>{r2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M3(e,t,n,r)});function g7(e){return new h7({type:`function`,input:Array.isArray(e?.input)?v5(e?.input):e?.input??r5(Y8()),output:e?.output??Y8()})}var _7=Q(`ZodCustom`,(e,t)=>{o2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j3(e,t,n,r)});function v7(e){let t=new K$({check:`custom`});return t._zod.check=e,t}function y7(e,t){return e3(_7,e??(()=>!0),t)}function b7(e,t={}){return t3(_7,e,t)}function x7(e,t){return n3(e,t)}var S7=i3,C7=a3;function w7(e,t={}){let n=new _7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...$(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var T7=(...e)=>o3({Codec:r7,Boolean:N8,String:D6},...e);function E7(e){let t=f7(()=>u5([O6(e),E8(),P8(),G8(),r5(t),b5(O6(),t)]));return t}function D7(e,t){return new o7({type:`pipe`,in:F5(e),out:t})}var zke={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function Bke(e){UZ({customError:e})}function Vke(){return UZ().customError}var O7;O7||={};var k7={...Rke,...Ike,iso:e6},Hke=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Uke(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Wke(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function A7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return k7.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return k7.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=j7(Wke(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return k7.null();if(n.length===0)return k7.never();if(n.length===1)return k7.literal(n[0]);if(n.every(e=>typeof e==`string`))return k7.enum(n);let r=n.map(e=>k7.literal(e));return r.length<2?r[0]:k7.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return k7.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>A7({...e,type:n},t));return r.length===0?k7.never():r.length===1?r[0]:k7.union(r)}if(!n)return k7.any();let r;switch(n){case`string`:{let t=k7.string();if(e.format){let n=e.format;n===`email`?t=t.check(k7.email()):n===`uri`||n===`uri-reference`?t=t.check(k7.url()):n===`uuid`||n===`guid`?t=t.check(k7.uuid()):n===`date-time`?t=t.check(k7.iso.datetime()):n===`date`?t=t.check(k7.iso.date()):n===`time`?t=t.check(k7.iso.time()):n===`duration`?t=t.check(k7.iso.duration()):n===`ipv4`?t=t.check(k7.ipv4()):n===`ipv6`?t=t.check(k7.ipv6()):n===`mac`?t=t.check(k7.mac()):n===`cidr`?t=t.check(k7.cidrv4()):n===`cidr-v6`?t=t.check(k7.cidrv6()):n===`base64`?t=t.check(k7.base64()):n===`base64url`?t=t.check(k7.base64url()):n===`e164`?t=t.check(k7.e164()):n===`jwt`?t=t.check(k7.jwt()):n===`emoji`?t=t.check(k7.emoji()):n===`nanoid`?t=t.check(k7.nanoid()):n===`cuid`?t=t.check(k7.cuid()):n===`cuid2`?t=t.check(k7.cuid2()):n===`ulid`?t=t.check(k7.ulid()):n===`xid`?t=t.check(k7.xid()):n===`ksuid`&&(t=t.check(k7.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?k7.number().int():k7.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=k7.boolean();break;case`null`:r=k7.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=j7(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=j7(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?j7(e.additionalProperties,t):k7.any();if(Object.keys(n).length===0){r=k7.record(i,a);break}let o=k7.object(n).passthrough(),s=k7.looseRecord(i,a);r=k7.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=j7(i[e],t),r=k7.string().regex(new RegExp(e));o.push(k7.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(k7.object(n).passthrough()),s.push(...o),s.length===0)r=k7.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=k7.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=k7.intersection(e,s[t]);r=e}break}let o=k7.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(j7(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>j7(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?j7(i,t):void 0;r=o?k7.tuple(a).rest(o):k7.tuple(a),typeof e.minItems==`number`&&(r=r.check(k7.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(k7.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>j7(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?j7(e.additionalItems,t):void 0;r=a?k7.tuple(n).rest(a):k7.tuple(n),typeof e.minItems==`number`&&(r=r.check(k7.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(k7.maxLength(e.maxItems)))}else if(i!==void 0){let n=j7(i,t),a=k7.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=k7.array(k7.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function j7(e,t){if(typeof e==`boolean`)return e?k7.any():k7.never();let n=A7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>j7(e,t)),a=k7.union(i);n=r?k7.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>j7(e,t)),a=k7.xor(i);n=r?k7.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:k7.any();else{let i=r?n:j7(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=k7.intersection(i,j7(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=k7.nullable(n)),e.readOnly===!0&&(n=k7.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Hke.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function Gke(e,t){if(typeof e==`boolean`)return e?k7.any():k7.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Uke(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??C2};return j7(n,r)}var Kke=h({bigint:()=>Xke,boolean:()=>Yke,date:()=>Zke,number:()=>Jke,string:()=>qke});function qke(e){return T2(D6,e)}function Jke(e){return t4(T8,e)}function Yke(e){return c4(N8,e)}function Xke(e){return u4(F8,e)}function Zke(e){return x4(e5,e)}var Qke=h({$brand:()=>zZ,$input:()=>b2,$output:()=>y2,NEVER:()=>RZ,TimePrecision:()=>Y2,ZodAny:()=>K8,ZodArray:()=>n5,ZodBase64:()=>f8,ZodBase64URL:()=>m8,ZodBigInt:()=>F8,ZodBigIntFormat:()=>L8,ZodBoolean:()=>N8,ZodCIDRv4:()=>c8,ZodCIDRv6:()=>u8,ZodCUID:()=>K6,ZodCUID2:()=>J6,ZodCatch:()=>Z5,ZodCodec:()=>r7,ZodCustom:()=>_7,ZodCustomStringFormat:()=>b8,ZodDate:()=>e5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>p5,ZodE164:()=>g8,ZodEmail:()=>A6,ZodEmoji:()=>H6,ZodEnum:()=>D5,ZodError:()=>Lke,ZodExactOptional:()=>R5,ZodFile:()=>M5,ZodFirstPartyTypeKind:()=>O7,ZodFunction:()=>h7,ZodGUID:()=>M6,ZodIPv4:()=>n8,ZodIPv6:()=>o8,ZodISODate:()=>r6,ZodISODateTime:()=>t6,ZodISODuration:()=>s6,ZodISOTime:()=>a6,ZodIntersection:()=>h5,ZodIssueCode:()=>zke,ZodJWT:()=>v8,ZodKSUID:()=>e8,ZodLazy:()=>d7,ZodLiteral:()=>A5,ZodMAC:()=>i8,ZodMap:()=>C5,ZodNaN:()=>$5,ZodNanoID:()=>W6,ZodNever:()=>X8,ZodNonOptional:()=>q5,ZodNull:()=>W8,ZodNullable:()=>B5,ZodNumber:()=>T8,ZodNumberFormat:()=>D8,ZodObject:()=>a5,ZodOptional:()=>I5,ZodPipe:()=>t7,ZodPrefault:()=>G5,ZodPreprocess:()=>o7,ZodPromise:()=>p7,ZodReadonly:()=>s7,ZodRealError:()=>u6,ZodRecord:()=>y5,ZodSet:()=>T5,ZodString:()=>D6,ZodStringFormat:()=>k6,ZodSuccess:()=>Y5,ZodSymbol:()=>B8,ZodTemplateLiteral:()=>l7,ZodTransform:()=>P5,ZodTuple:()=>_5,ZodType:()=>T6,ZodULID:()=>X6,ZodURL:()=>z6,ZodUUID:()=>P6,ZodUndefined:()=>H8,ZodUnion:()=>l5,ZodUnknown:()=>J8,ZodVoid:()=>Q8,ZodXID:()=>Q6,ZodXor:()=>d5,_ZodString:()=>E6,_default:()=>W5,_function:()=>g7,any:()=>q8,array:()=>r5,base64:()=>p8,base64url:()=>h8,bigint:()=>I8,boolean:()=>P8,catch:()=>Q5,check:()=>v7,cidrv4:()=>l8,cidrv6:()=>d8,clone:()=>fQ,codec:()=>i7,coerce:()=>Kke,config:()=>UZ,core:()=>Fke,cuid:()=>q6,cuid2:()=>Y6,custom:()=>y7,date:()=>t5,decode:()=>g6,decodeAsync:()=>v6,describe:()=>S7,discriminatedUnion:()=>m5,e164:()=>_8,email:()=>j6,emoji:()=>U6,encode:()=>h6,encodeAsync:()=>_6,endsWith:()=>U4,enum:()=>O5,exactOptional:()=>z5,file:()=>N5,flattenError:()=>RQ,float32:()=>k8,float64:()=>A8,formatError:()=>zQ,fromJSONSchema:()=>Gke,function:()=>g7,getErrorMap:()=>Vke,globalRegistry:()=>C2,gt:()=>T4,gte:()=>E4,guid:()=>N6,hash:()=>w8,hex:()=>C8,hostname:()=>S8,httpUrl:()=>V6,includes:()=>V4,instanceof:()=>w7,int:()=>O8,int32:()=>j8,int64:()=>R8,intersection:()=>g5,invertCodec:()=>a7,ipv4:()=>r8,ipv6:()=>s8,iso:()=>e6,json:()=>E7,jwt:()=>y8,keyof:()=>i5,ksuid:()=>t8,lazy:()=>f7,length:()=>L4,literal:()=>j5,locales:()=>_2,looseObject:()=>c5,looseRecord:()=>S5,lowercase:()=>z4,lt:()=>C4,lte:()=>w4,mac:()=>a8,map:()=>w5,maxLength:()=>F4,maxSize:()=>M4,meta:()=>C7,mime:()=>G4,minLength:()=>I4,minSize:()=>N4,multipleOf:()=>j4,nan:()=>e7,nanoid:()=>G6,nativeEnum:()=>k5,negative:()=>O4,never:()=>Z8,nonnegative:()=>A4,nonoptional:()=>J5,nonpositive:()=>k4,normalize:()=>q4,null:()=>G8,nullable:()=>V5,nullish:()=>H5,number:()=>E8,object:()=>o5,optional:()=>L5,overwrite:()=>K4,parse:()=>d6,parseAsync:()=>f6,partialRecord:()=>x5,pipe:()=>n7,positive:()=>D4,prefault:()=>K5,preprocess:()=>D7,prettifyError:()=>HQ,promise:()=>m7,property:()=>W4,readonly:()=>c7,record:()=>b5,refine:()=>b7,regex:()=>R4,regexes:()=>a$,registry:()=>S2,safeDecode:()=>b6,safeDecodeAsync:()=>S6,safeEncode:()=>y6,safeEncodeAsync:()=>x6,safeParse:()=>p6,safeParseAsync:()=>m6,set:()=>E5,setErrorMap:()=>Bke,size:()=>P4,slugify:()=>Z4,startsWith:()=>H4,strictObject:()=>s5,string:()=>O6,stringFormat:()=>x8,stringbool:()=>T7,success:()=>X5,superRefine:()=>x7,symbol:()=>V8,templateLiteral:()=>u7,toJSONSchema:()=>$3,toLowerCase:()=>Y4,toUpperCase:()=>X4,transform:()=>F5,treeifyError:()=>BQ,trim:()=>J4,tuple:()=>v5,uint32:()=>M8,uint64:()=>z8,ulid:()=>Z6,undefined:()=>U8,union:()=>u5,unknown:()=>Y8,uppercase:()=>B4,url:()=>B6,util:()=>WZ,uuid:()=>F6,uuidv4:()=>I6,uuidv6:()=>L6,uuidv7:()=>R6,void:()=>$8,xid:()=>$6,xor:()=>f5});UZ(l2());var M7=Qke,N7=[`equals`,`notEquals`,`contains`,`notContains`,`startsWith`,`endsWith`],P7=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],F7=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],I7={equals:`Is`,notEquals:`Is not`,contains:`Contains`,notContains:`Does not contain`,startsWith:`Starts with`,endsWith:`Ends with`,greaterThan:`Is greater than`,lessThan:`Is less than`,between:`Is between`},$ke=M7.object({filterOperator:M7.enum(F7),filterValueFrom:M7.union([M7.literal(``),M7.iso.date()]),filterValueTo:M7.union([M7.literal(``),M7.iso.date()])}),eAe=M7.object({filterOperator:M7.enum(N7),filterValue:M7.string()}),tAe=M7.object({filterOperator:M7.enum(P7),filterValueFrom:M7.string(),filterValueTo:M7.string()}),L7=({className:e,children:t,ref:r,tone:i,...a})=>{let o=D9().getValue(),s=typeof i==`function`?i(o):i;return(0,n.jsxs)(ey,{variant:`soft`,className:Y(``,e),ref:r,tone:s,...a,children:[t,o]})},R7=({showDivider:e=!0,className:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:()=>(0,n.jsx)(`tbody`,{className:Y(e&&`divide-y divide-border`,`overflow-y-auto`,t),ref:r,...i,children:a.getRowModel().rows.map(e=>(0,n.jsx)(`tr`,{style:{backgroundColor:e.getIsSelected()?`var(--color-neutral-container-high)`:`transparent`},children:e.getVisibleCells().map(e=>(0,n.jsx)(a.AppCell,{cell:e,children:e=>(0,n.jsx)(`td`,{style:{width:e.column.getSize()},className:Y(`h-xl px-xs first:rounded-l-xl last:rounded-r-xl`,t),children:(0,n.jsx)(a.FlexRender,{cell:e})})},e.id))},e.id))})})},z7=({className:e,children:t,ref:r,...i})=>{let a=D9(),o=E9(),s=a.row;return(0,n.jsx)(o.Subscribe,{selector:e=>e.rowSelection,children:()=>(0,n.jsx)(IM,{checked:s.getIsSelected()||s.getCanSelectSubRows()&&s.getIsAllSubRowsSelected(),disabled:!s.getCanSelect(),indeterminate:s.getIsSomeSelected(),onCheckedChange:e=>s.toggleSelected(e),className:Y(``,e),ref:r,...i,children:t})})},B7=({className:e,children:t,ref:r,...i})=>{let a=E9(),o=e=>{a.getColumn(e)?.toggleVisibility()};return(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{children:a.getAllColumns().flatMap(e=>e.getCanHide()?(0,n.jsx)(OZ,{checked:e.getIsVisible(),onCheckedChange:()=>o(e.id),children:e.columnDef.header||e.id},e.id):null)})]})},V7=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),nAe=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue().toLocaleDateString()]})},H7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`equals`,filterValueFrom:l?.date[0]??``,filterValueTo:l?.date[1]??``},validators:{onSubmit:$ke},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,date:[t.filterValueFrom,t.filterValueTo]})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset()},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetHeading,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(MF,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldRadioGroup,{children:F7.map(t=>(0,n.jsxs)(e.FieldSet,{children:[(0,n.jsx)(PL,{value:t,variant:`inSurface`,children:s?.[t]??I7[t]}),e.state.value===t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.AppField,{name:`filterValueFrom`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})}),t===`between`&&(0,n.jsx)(u.AppField,{name:`filterValueTo`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})})]})]},t))})]})})})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},U7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue();return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:Array.isArray(s.date)&&s.date[1]!==``?s.date.join(` - `):s.date})]})}),(0,n.jsx)(lF,{children:(0,n.jsxs)(fF,{children:[(0,n.jsx)(uF,{children:e.columnDef.header||e.id}),(0,n.jsxs)(pF,{children:[r,(0,n.jsx)(H7,{column:e})]})]})})]},e.id)},W7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`equals`,filterValueFrom:l?.number[0]??``,filterValueTo:l?.number[1]??``},validators:{onSubmit:tAe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,number:[t.filterValueFrom,t.filterValueTo]})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset({filterOperator:`equals`,filterValueFrom:``,filterValueTo:``})},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldRadioGroup,{children:P7.map(r=>(0,n.jsxs)(t.FieldSet,{children:[(0,n.jsx)(PL,{value:r,variant:`inSurface`,children:s?.[r]??I7[r]}),t.state.value===r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.AppField,{name:`filterValueFrom`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,type:`number`,variant:`secondary`})]})}),r===`between`&&(0,n.jsx)(u.AppField,{name:`filterValueTo`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} maximum filter value`,type:`number`,variant:`secondary`})]})})]})]},r))})]})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},G7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue(),c=s.operator===`between`?s.number.filter(Boolean).join(` - `):s.number[0];return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:c}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:e.columnDef.header||e.id})}),(0,n.jsx)(pF,{children:(0,n.jsx)(W7,{column:e})})]})]})},K7=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,q7=e=>Array.isArray(e)&&e.every(K7),J7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=e.getFilterValue(),c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},[l,u]=(0,v.useState)(q7(s)?s:[]),d=Array.from(e.getFacetedUniqueValues().keys()).filter(K7).sort((e,t)=>String(e).localeCompare(String(t)));return(0,n.jsxs)(JL,{className:Y(``,t),onReset:()=>{e.setFilterValue(void 0),u([])},onSubmit:t=>{t.preventDefault(),t.stopPropagation(),l.length>0&&e.setFilterValue(l)},ref:i,...a,children:[r,(0,n.jsxs)(zM,{multiple:!0,value:l,onValueChange:e=>{q7(e)&&u(e)},children:[(0,n.jsxs)(WM,{"aria-label":`${e.id} filter value`,variant:`secondary`,children:[(0,n.jsx)(GM,{placeholder:`Select values`,children:e=>q7(e)?e.map(String).join(`, `):`Select values`}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{alignItemWithTrigger:!1,sideOffset:8,children:(0,n.jsx)(VM,{children:d.map(e=>(0,n.jsx)(BM,{value:e,children:(0,n.jsx)(qM,{children:String(e)})},`${typeof e}:${String(e)}`))})})]}),(0,n.jsxs)(ZL,{children:[(0,n.jsx)(Yv,{className:`w-full`,tone:`neutral`,type:`reset`,variant:`outline`,children:c.reset}),(0,n.jsx)(Yv,{className:`w-full`,disabled:l.length===0,type:`submit`,children:c.apply})]})]})},Y7=({column:e,className:t,children:r,ref:i,...a})=>{let o=e.getFilterValue(),s=e.columnDef.header||e.id;return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:s}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o.map(String).join(`, `)}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:s})}),(0,n.jsx)(pF,{children:(0,n.jsx)(J7,{column:e})})]})]})},X7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`contains`,filterValue:l?.value??``},validators:{onSubmit:eAe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,value:t.filterValue})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset({filterOperator:`contains`,filterValue:``})},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldRadioGroup,{children:N7.map(r=>(0,n.jsxs)(t.FieldSet,{children:[(0,n.jsx)(PL,{value:r,variant:`inSurface`,children:s?.[r]??I7[r]}),t.state.value===r&&(0,n.jsx)(u.AppField,{name:`filterValue`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,variant:`secondary`})]})})]},r))})]})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},Z7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue();return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:s.value}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:e.columnDef.header||e.id})}),(0,n.jsx)(pF,{children:(0,n.jsx)(X7,{column:e})})]})]})},Q7=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e.columnFilters,children:()=>a.getAllColumns().some(e=>e.getIsFiltered())?(0,n.jsxs)(`ul`,{className:Y(`flex flex-wrap items-center gap-xs`,e),ref:r,...i,children:[t,a.getAllColumns().map(e=>{if(!e.getIsFiltered())return null;switch(e.columnDef.meta?.filterVariant){case`date`:return(0,n.jsx)(U7,{column:e},e.id);case`number`:return(0,n.jsx)(G7,{column:e},e.id);case`select`:return(0,n.jsx)(Y7,{column:e},e.id);case`string`:return(0,n.jsx)(Z7,{column:e},e.id);default:return null}})]}):null})},$7=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(DZ,{modal:!1,children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{align:`end`,className:``,children:a.getAllColumns().filter(e=>e.getCanFilter()).map(t=>{let{filterVariant:r}=t.columnDef.meta??{};return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{nativeButton:!1,children:(0,n.jsx)(kZ,{closeOnClick:!1,children:t.columnDef.header||t.id})}),(0,n.jsxs)(lF,{side:`inline-end`,align:`start`,className:Y(``,e),onKeyDownCapture:e=>e.stopPropagation(),children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:t.columnDef.header||t.id})}),(0,n.jsx)(pF,{children:(()=>{switch(r){case`date`:return(0,n.jsx)(H7,{column:t});case`number`:return(0,n.jsx)(W7,{column:t});case`select`:return(0,n.jsx)(J7,{column:t});case`string`:return(0,n.jsx)(X7,{column:t});default:return null}})()})]})]},t.id)})})]})},e9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.setPageIndex(0)},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Jr,{weight:`bold`})]})},t9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(`tfoot`,{className:Y(``,e),ref:r,...i,children:[t,a.getFooterGroups().map(e=>(0,n.jsx)(`tr`,{children:e.headers.map(e=>(0,n.jsx)(a.AppFooter,{header:e,children:e=>(0,n.jsx)(`td`,{style:{width:e.getSize()},colSpan:e.colSpan,children:(0,n.jsx)(a.FlexRender,{footer:e})})},e.id))},e.id))]})},n9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(`thead`,{className:Y(`bg-neutral-container`),ref:r,...i,children:[t,a.getHeaderGroups().map(t=>(0,n.jsx)(`tr`,{children:t.headers.map(t=>(0,n.jsx)(a.AppHeader,{header:t,selector:e=>e.sorting,children:t=>(0,n.jsx)(`th`,{style:{width:t.getSize()},className:Y(`container p-xs text-left style-text-default-0 text-neutral-on-container-muted transition-colors first:rounded-l-xl last:rounded-r-xl`,t.column.getCanSort()&&`hover:cursor-pointer hover:bg-neutral-container-high hover:*:text-neutral-on-container`,t.isPlaceholder&&`cursor-default`,e),colSpan:t.colSpan,onClick:t.column.getToggleSortingHandler(),children:t.isPlaceholder?null:(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-between gap-2xs whitespace-nowrap [&_svg]:size-sm`,t.column.getCanSort()&&`select-none hover:cursor-pointer`),children:[(0,n.jsx)(`div`,{className:`flex items-center gap-2xs`,children:(0,n.jsx)(a.FlexRender,{header:t})}),{asc:(0,n.jsx)(Si,{weight:`bold`}),desc:(0,n.jsx)(xi,{weight:`bold`})}[t.column.getIsSorted()]??(t.column.getCanSort()?(0,n.jsx)(fi,{weight:`bold`}):null)]})},t.id)},t.id))},t.id))]})},r9=({className:e,ref:t,...r})=>{let i=D9();return(0,n.jsx)(`img`,{src:i.getValue(),className:Y(`my-xs size-xl`,e),ref:t,...r})},i9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.setPageIndex(a.getPageCount()-1)},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Yr,{weight:`bold`})]})},a9=({sticky:e=!1,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-between gap-md`,e&&`sticky bottom-0 z-10 bg-inherit`,t),ref:i,...a,children:r}),o9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.nextPage()},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Xr,{weight:`bold`})]})},s9=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue().toLocaleString()]})},c9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex items-center justify-center gap-3xs`,e),ref:r,...i,children:t}),l9=({min:e=3,max:t=1,className:r,children:i,ref:a,...o})=>{let s=E9(),c=e=>{s.setPageIndex(e)};return(0,n.jsx)(s.Subscribe,{selector:e=>e.pagination,children:l=>{let u=s.getPageCount(),d=e=>e===l.pageIndex;return(0,n.jsxs)(`div`,{className:Y(`flex items-center gap-3xs`,r),ref:a,...o,children:[i,Array.from({length:e}).map((e,t)=>t<u?(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:d(t)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>c(t),children:t+1},t):null),u>e+t&&(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{children:(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:`ghost`,className:`shrink-0`,children:(0,n.jsx)(ri,{weight:`bold`})})}),(0,n.jsx)(AZ,{align:`center`,children:(0,n.jsx)(jZ,{value:l.pageIndex,onValueChange:c,className:`max-h-[200px] overflow-y-auto`,children:Array.from({length:u-e-t}).map((t,r)=>{let i=e+r;return(0,n.jsx)(MZ,{value:i,closeOnClick:!0,children:i+1},i)})})})]}),Array.from({length:t}).map((r,i)=>{let a=u-t+i;return a<e?null:(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:d(a)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>c(a),children:a+1},i)})]})}})},u9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.previousPage()},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(qr,{weight:`bold`})]})},d9=({className:e,children:t,ref:r,...i})=>{let a=E9(),o=e=>{a.setGlobalFilter(String(e.target.value))};return(0,n.jsx)(a.Subscribe,{selector:e=>e.globalFilter,children:a=>(0,n.jsxs)(iF,{children:[(0,n.jsx)(aF,{children:(0,n.jsx)(gi,{weight:`bold`})}),(0,n.jsx)(oF,{className:Y(``,e),onChange:o,ref:r,value:a??``,...i,children:t})]})})},f9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e.rowSelection,children:()=>{let o=a.getIsAllRowsSelected();return(0,n.jsx)(IM,{checked:o,indeterminate:!o&&a.getIsSomeRowsSelected(),onCheckedChange:e=>a.toggleAllRowsSelected(e),className:Y(``,e),ref:r,...i,children:t})}})},p9=({className:e,children:t,ref:r,...i})=>{let a=R9(),o=a.options.meta?.translations?.buttonLabels??{},s=o.ascending??`Ascending`,c=o.descending??`Descending`,l=(e,t)=>{let n=a.getColumn(e);if(n?.getIsSorted()===t){n?.clearSorting();return}n?.toggleSorting(t===`desc`,n.getCanMultiSort())};return(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{align:`end`,children:(0,n.jsx)(a.Subscribe,{selector:e=>e.sorting,children:()=>a.getAllColumns().filter(e=>e.getCanSort()).map(e=>(0,n.jsxs)(NZ,{children:[(0,n.jsx)(PZ,{children:e.columnDef.header||e.id}),(0,n.jsxs)(AZ,{children:[(0,n.jsxs)(OZ,{checked:e.getIsSorted()===`asc`,onClick:()=>l(e.id,`asc`),children:[(0,n.jsx)(Si,{weight:`bold`}),s]}),(0,n.jsxs)(OZ,{checked:e.getIsSorted()===`desc`,onClick:()=>l(e.id,`desc`),children:[(0,n.jsx)(xi,{weight:`bold`}),c]})]})]},e.id))})})]})},m9=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=e.getIsSorted(),c=o.options.meta?.translations?.buttonLabels??{},l=c.ascending??`Ascending`,u=c.descending??`Descending`;return s?(0,n.jsx)(p9,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[s===`asc`?(0,n.jsx)(Si,{}):(0,n.jsx)(xi,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:s===`asc`?l:u}),r]})}):null},h9=({className:e,children:t,ref:r,...i})=>{let a=E9();return a.getAllColumns().some(e=>e.getIsSorted())?(0,n.jsx)(a.Subscribe,{selector:e=>e.sorting,children:()=>(0,n.jsxs)(`ul`,{className:Y(`flex flex-wrap items-center gap-xs`,e),ref:r,...i,children:[t,a.getAllColumns().map(e=>e.getIsSorted()?(0,n.jsx)(m9,{column:e},e.id):null)]})}):null},g9=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue()]})},_9=({sticky:e=!1,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex items-center gap-3xs`,e&&`sticky top-0 z-10`,t),ref:i,...a,children:r}),v9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`table`,{className:Y(`size-full`,e),ref:r,...i,children:t}),y9=xH({filter:(e,t)=>t.includes(e),autoRemove:e=>!e?.length}),b9=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())},x9=xH({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return r!==null&&i!==null&&e>=r&&e<=i;default:return!0}},resolveFilterValue:e=>({operator:e.operator,from:b9(e.date[0]),to:b9(e.date[1])}),resolveDataValue:e=>{if(e instanceof Date)return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());if(typeof e==`number`){let t=new Date(e);return Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}if(typeof e==`string`){let t=new Date(e);return Number.isNaN(t.getTime())?0:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}return 0},autoRemove:e=>!e||!e.date[0]&&!e.date[1]}),S9=xH({filter:(e,t)=>{let{operator:n,value:r}=t,i=e.toLocaleLowerCase(),a=r.toLocaleLowerCase();switch(n){case`equals`:return i===a;case`notEquals`:return i!==a;case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`startsWith`:return i.startsWith(a);case`endsWith`:return i.endsWith(a);default:return!0}},resolveDataValue:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):``,autoRemove:e=>!e||e.value===``}),C9=e=>{if(e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?t:null},w9=xH({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return(r===null||e>=r)&&(i===null||e<=i);default:return!0}},resolveFilterValue:e=>{let t=C9(e.number[0]),n=C9(e.number[1]);return t!==null&&n!==null&&t>n?{operator:e.operator,from:n,to:t}:{operator:e.operator,from:t,to:n}},resolveDataValue:e=>Number(e),autoRemove:e=>!e||e.number[0]===``&&e.number[1]===``}),T9=$V({columnFacetingFeature:rH,columnFilteringFeature:lH,columnSizingFeature:yH,columnVisibilityFeature:bH,globalFilteringFeature:XH,rowPaginationFeature:ZH,rowSelectionFeature:vU,rowSortingFeature:yU,filteredRowModel:wU(),facetedRowModel:SU(),facetedUniqueValues:CU(),paginatedRowModel:EU(),sortedRowModel:DU(),columnMeta:QV(),tableMeta:QV(),filterFns:{includesString:TH,includesStringSensitive:wH,startsWith:OH,endsWith:kH,equalsString:EH,equalsStringSensitive:DH,equals:SH,weakEquals:CH,empty:AH,notEmpty:jH,arrIncludes:LH,arrIncludesAll:RH,arrIncludesSome:zH,arrHas:IH,inNumberRange:PH,inDateRange:FH,between:MH,betweenInclusive:NH,date:x9,string:S9,number:w9,select:y9},sortFns:{alphanumeric:nB,text:rB,datetime:iB,basic:aB}}),{createAppColumnHelper:rAe,useAppTable:iAe,useTableContext:E9,useCellContext:D9,useHeaderContext:aAe}=OU({features:T9,getRowId:(e,t,n)=>e.id??(n?`${n.id}.${t}`:String(t)),tableComponents:{TableBody:R7,TableColumnToggle:B7,TableContainer:V7,TableFirstPage:e9,TableFilterMenu:$7,TableFilterList:Q7,TableFooter:t9,TableHeader:n9,TableLastPage:i9,TableNav:a9,TableNextPage:o9,TablePagination:c9,TablePaging:l9,TablePreviousPage:u9,TableSearch:d9,TableSortMenu:p9,TableSortList:h9,TableToolbar:_9,TableViewport:v9},cellComponents:{TableCheckboxCell:z7,TableDateCell:nAe,TableImageCell:r9,TableNumberCell:s9,TableBadgeCell:L7,TableTextCell:g9},headerComponents:{TableSelectHeader:f9}}),oAe=({children:e})=>{let t=E9(),n=t.state.pagination.pageIndex,r=t.state.pagination.pageSize,i=t.getFilteredRowModel().rows.length,a=i===0?0:n*r+1;return e(a,i===0?0:Math.min(a+r-1,i),i)},sAe=Jn(`min-w-0 grow truncate px-2xs`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),O9=({size:e,className:t,children:r,ref:i,...a})=>{let o=D9();return(0,n.jsxs)(`span`,{className:Y(sAe({size:e,className:t})),ref:i,...a,children:[r,o.getValue()]})},k9=({className:e,children:t,dndDisabled:r,...i})=>{let a=z9(),{draggingNodeId:o}=vZ(),s=a.row,c=s.getCanExpand(),{ref:l,isDragging:u}=YTe({id:s.id,data:{isFolder:c,nodeId:s.id},disabled:r}),{ref:d,isDropTarget:f}=hZ({id:`folder:${s.id}`,data:{folderId:s.id,nodeId:s.id,isFolder:c},disabled:r||!c}),p=v.default.useCallback(e=>{l(e),d(e)},[l,d]),m=e=>{if(c){s.toggleExpanded();return}s.getCanSelect()&&(e.shiftKey||a.table.resetRowSelection(),s.getToggleSelectedHandler()({target:{checked:!0},shiftKey:e.shiftKey}))},h=v.default.useMemo(()=>{if(!o)return!1;let e=s.getParentRow();for(;e;){if(e.id===o)return!0;e=e.getParentRow()}return!1},[o,s]);return(0,n.jsxs)(`button`,{type:`button`,onClick:m,className:Y(`flex h-lg min-w-0 grow items-center justify-start gap-2xs truncate rounded-lg px-2xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0`,c&&f&&`bg-success-container text-success-on-container ring ring-success-border`,s.getIsSelected()?`bg-neutral-default text-neutral-on-default`:`hover:bg-neutral-container hover:text-neutral-on-container`,(u||h)&&`opacity-60`,e),ref:p,...i,children:[t,a.getValue()]})},A9=(e,t)=>{for(let n of e){if(n.id===t)return n;if(n.children?.length){let e=A9(n.children,t);if(e)return e}}return null},j9=(e,t)=>{let n=null;return{nextNodes:e.flatMap(e=>{if(e.id===t)return n=e,[];if(!e.children?.length)return[e];let r=j9(e.children,t);return r.removedNode?(n=r.removedNode,[{...e,children:r.nextNodes}]):[e]}),removedNode:n}},M9=(e,t,n)=>e.map(e=>e.id===t?{...e,children:[...e.children??[],n]}:e.children?.length?{...e,children:M9(e.children,t,n)}:e),cAe=(e,t,n)=>{if(t===n)return e;let r=A9(e,t),i=A9(e,n);if(!r||!i?.children||A9(r.children??[],n))return e;let{nextNodes:a,removedNode:o}=j9(e,t);return o?M9(a,n,o):e},lAe=(e,t)=>{let{nextNodes:n,removedNode:r}=j9(e,t);return r?[...n,r]:e},N9={getInitialState:e=>({rowVisibility:{},...e}),getDefaultTableOptions:e=>({enableRowVisibility:!0,onRowVisibilityChange:DR(`rowVisibility`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowVisibility?.get()?.[e.id]??t.options.getRowVisible?.(e)??!0,r=e=>{t.options.onRowVisibilityChange?.(t=>SR(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));VR(`rowVisibilityFeature`,e,{table_setRowVisibility:{fn:e=>r(e)},table_resetRowVisibility:{fn:()=>r(t.initialState.rowVisibility??{})},table_getIsAllRowsVisible:{fn:()=>i()},table_toggleAllRowsVisible:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;HR(`rowVisibilityFeature`,e,t,{row_getIsVisible:{fn:e=>n.atoms.rowVisibility?.get()?.[e.id]??n.options.getRowVisible?.(e)??!0},row_toggleVisibility:{fn:(e,t)=>{n.options.onRowVisibilityChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!0)}))}}})}},P9={getInitialState:e=>({rowLocked:{},...e}),getDefaultTableOptions:e=>({enableRowLocked:!0,onRowLockedChange:DR(`rowLocked`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowLocked?.get()?.[e.id]??t.options.getRowLocked?.(e)??!1,r=e=>{t.options.onRowLockedChange?.(t=>SR(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));VR(`rowLockedFeature`,e,{table_setRowLocked:{fn:e=>r(e)},table_resetRowLocked:{fn:()=>r(t.initialState.rowLocked??{})},table_getIsAllRowsLocked:{fn:()=>i()},table_toggleAllRowsLocked:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;HR(`rowLockedFeature`,e,t,{row_getIsLocked:{fn:e=>n.atoms.rowLocked?.get()?.[e.id]??n.options.getRowLocked?.(e)??!1},row_toggleLocked:{fn:(e,t)=>{n.options.onRowLockedChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!1)}))}}})}},F9=({className:e,children:t,ref:r,...i})=>{let a=R9(),o=a.getCoreRowModel().flatRows,s=e=>{let t=!e;for(let e of o)e.toggleVisibility(t)};return(0,n.jsx)(a.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let a=o.some(e=>e.getIsVisible());return(0,n.jsxs)(Yv,{size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>s(a),className:Y(``,e),ref:r,...i,children:[t,a?(0,n.jsx)(ai,{weight:`bold`}):(0,n.jsx)(oi,{weight:`bold`})]})}})},I9=({className:e,children:t,ref:r,...i})=>{let a=z9(),o=R9(),s=a.row,c=s.getLeafRows(),l=c.length>0?c:[s],u=e=>{let t=!e;for(let e of l)e.toggleVisibility(t)};return(0,n.jsx)(o.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let a=l.some(e=>e.getIsVisible());return(0,n.jsxs)(Yv,{size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>u(a),className:Y(``,e),ref:r,...i,children:[t,a?(0,n.jsx)(ai,{}):(0,n.jsx)(oi,{})]})}})},L9=$V({columnFacetingFeature:rH,columnFilteringFeature:lH,columnSizingFeature:yH,columnVisibilityFeature:bH,globalFilteringFeature:XH,rowExpandingFeature:PSe,rowLockedFeature:P9,rowPaginationFeature:ZH,rowSelectionFeature:vU,rowSortingFeature:yU,rowVisibilityFeature:N9,expandedRowModel:QSe(),filteredRowModel:wU(),facetedRowModel:SU(),facetedUniqueValues:CU(),paginatedRowModel:EU(),sortedRowModel:DU(),columnMeta:QV(),tableMeta:QV(),filterFns:{includesString:TH,includesStringSensitive:wH,startsWith:OH,endsWith:kH,equalsString:EH,equalsStringSensitive:DH,equals:SH,weakEquals:CH,empty:AH,notEmpty:jH,arrIncludes:LH,arrIncludesAll:RH,arrIncludesSome:zH,arrHas:IH,inNumberRange:PH,inDateRange:FH,between:MH,betweenInclusive:NH},sortFns:{alphanumeric:nB,text:rB,datetime:iB,basic:aB}}),{createAppColumnHelper:uAe,useAppTable:dAe,useTableContext:R9,useCellContext:z9,useHeaderContext:fAe}=OU({features:L9,tableComponents:{LayerTree:_Z,LayerTreeBody:bZ,LayerTreeExpandAll:xZ,LayerTreeFooter:SZ,LayerTreeLockedAll:wZ,LayerTreeRow:yZ,LayerTreeSearch:EZ,LayerTreeSort:IZ,LayerTreeVisibilityAll:F9},cellComponents:{LayerTreeIconCell:CZ,LayerTreeLockedCell:TZ,LayerTreeTextCell:O9,LayerTreeTriggerCell:k9,LayerTreeVisibilityCell:I9},headerComponents:{}}),pAe=Jn(`flex h-fit items-center justify-between`,{variants:{size:{small:`gap-2xs p-xs [&_span]:style-text-default--2 [&_svg]:size-sm`,medium:`gap-xs p-sm [&_span]:style-text-default--1 [&_svg]:size-md`,large:`gap-sm p-md [&_span]:style-text-default-0 [&_svg]:size-lg`},itemOrientation:{horizontal:`[&_[data-nav-bar-item]]:flex-row`,vertical:`[&_[data-nav-bar-item]]:flex-col`},variant:{outline:`w-full border border-border bg-surface-background`,floating:`absolute bottom-md w-fit max-w-15/16 overflow-x-auto bg-surface shadow-2xs`}},compoundVariants:[{size:`small`,variant:`floating`,className:`rounded-xl`},{size:`medium`,variant:`floating`,className:`rounded-2xl`},{size:`large`,variant:`floating`,className:`rounded-3xl`},{size:`small`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-xl`},{size:`medium`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-2xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-2xl`},{size:`large`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-3xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-3xl`},{size:`small`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-lg [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-lg [&_[data-nav-bar-item]]:px-xs`},{size:`medium`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-xl [&_[data-nav-bar-item]]:px-sm`},{size:`large`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-2xl [&_[data-nav-bar-item]]:gap-xs [&_[data-nav-bar-item]]:rounded-2xl [&_[data-nav-bar-item]]:px-md`}],defaultVariants:{itemOrientation:`vertical`,size:`medium`,variant:`outline`}}),mAe=Jn(`flex aspect-square items-center justify-center transition-all disabled:pointer-events-none disabled:opacity-50 data-[active=false]:hover:cursor-pointer data-[active=false]:active:scale-95 [&>svg]:shrink-0`,{variants:{tone:{brand:`text-brand-default hover:bg-brand-container hover:text-brand-on-container data-[active=true]:bg-brand-container data-[active=true]:text-brand-on-container`,accent:`text-accent-default hover:bg-accent-container hover:text-accent-on-container data-[active=true]:bg-accent-container data-[active=true]:text-accent-on-container`,neutral:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container data-[active=true]:bg-neutral-container data-[active=true]:text-neutral-on-container`,error:`text-error-default hover:bg-error-container hover:text-error-on-container data-[active=true]:bg-error-container data-[active=true]:text-error-on-container`,info:`text-info-default hover:bg-info-container hover:text-info-on-container data-[active=true]:bg-info-container data-[active=true]:text-info-on-container`,success:`text-success-default hover:bg-success-container hover:text-success-on-container data-[active=true]:bg-success-container data-[active=true]:text-success-on-container`,warning:`text-warning-default hover:bg-warning-container hover:text-warning-on-container data-[active=true]:bg-warning-container data-[active=true]:text-warning-on-container`}},defaultVariants:{tone:`neutral`}}),hAe=({itemOrientation:e,size:t,variant:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(`div`,{className:Y(pAe({itemOrientation:e,size:t,variant:r}),i),ref:o,...s,children:a}),gAe=({isActive:e=!1,tone:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`button`,{"data-active":e,"data-nav-bar-item":!0,className:Y(mAe({tone:t}),r),ref:a,...o,children:i}),_Ae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(``,e),ref:r,...i,children:t}),vAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(``,e),ref:r,...i,children:t}),yAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Hm,{className:Y(`min-w-max`,e),ref:r,...i,children:t}),bAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qm,{className:Y(`h-full w-[calc(100vw-40px)] rounded-xl bg-surface p-2xs transition-[opacity,transform,translate] duration-(--duration) ease-(--easing) data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] min-[500px]:w-max min-[500px]:max-w-[400px]`,e),ref:r,...i,children:t}),xAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(_h,{className:Y(`transition-transform duration-200 ease-[ease] data-popup-open:rotate-180`,e),ref:r,...i,children:t}),SAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Xm,{className:Y(``,e),ref:r,...i,children:t}),CAe=Jn(`rounded-lg px-sm py-xs transition-colors hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-on-container hover:bg-brand-container`,accent:`text-accent-on-container hover:bg-accent-container`,neutral:`text-neutral-on-container hover:bg-neutral-container`,error:`text-error-on-container hover:bg-error-container`,info:`text-info-on-container hover:bg-info-container`,success:`text-success-on-container hover:bg-success-container`,warning:`text-warning-on-container hover:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),wAe=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(CAe({tone:e,className:t})),ref:i,...a,children:r}),TAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(qm,{className:Y(`relative flex gap-px`,e),ref:r,...i,children:t}),EAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(oh,{children:(0,n.jsx)(dh,{sideOffset:10,collisionPadding:{top:5,bottom:5,left:20,right:20},collisionAvoidance:{side:`none`},className:Y(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute data-instant:transition-none data-[side=bottom]:before:inset-x-0 data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:h-2xs data-[side=left]:before:inset-y-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:w-2xs data-[side=right]:before:inset-y-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2xs data-[side=top]:before:inset-x-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:h-2xs`,e),ref:r,style:{"--duration":`0.35s`,"--easing":`cubic-bezier(0.22, 1, 0.36, 1)`},...i,children:(0,n.jsxs)(hh,{className:`relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-xl shadow-md transition-[opacity,transform,width,height,scale] duration-(--duration) ease-(--easing) outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-ending-style:ease-[ease] data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(gh,{className:`relative block overflow-clip transition-[left,right] duration-(--duration) ease-(--easing) before:absolute before:bottom-0 before:left-1/2 before:block before:size-[calc(6px*sqrt(2))] before:-translate-x-1/2 before:translate-y-1/2 before:rotate-45 before:border before:content-[''] data-[side=bottom]:top-[-6px] data-[side=left]:right-[-9px] data-[side=left]:rotate-90 data-[side=right]:left-[-9px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-6px] data-[side=top]:rotate-180`}),(0,n.jsx)(mh,{className:`relative size-full overflow-hidden`}),t]})})}),DAe=Jn(`flex items-center justify-center rounded-full bg-transparent no-underline transition-colors select-none hover:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-1`,{variants:{size:{small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`},tone:{brand:`text-brand-default data-popup-open:bg-brand-container data-popup-open:text-brand-on-container`,accent:`text-accent-default data-popup-open:bg-accent-container data-popup-open:text-accent-on-container`,neutral:`text-neutral-default data-popup-open:bg-neutral-container data-popup-open:text-neutral-on-container`,error:`text-error-default data-popup-open:bg-error-container data-popup-open:text-error-on-container`,info:`text-info-default data-popup-open:bg-info-container data-popup-open:text-info-on-container`,success:`text-success-default data-popup-open:bg-success-container data-popup-open:text-success-on-container`,warning:`text-warning-default data-popup-open:bg-warning-container data-popup-open:text-warning-on-container`}},defaultVariants:{size:`medium`,tone:`neutral`}}),OAe=({size:e,tone:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(th,{className:Y(DAe({size:e,tone:t}),r),ref:a,...o,children:i}),kAe=Jn(`flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role="group"]]:outline [&_[role="group"]]:outline-transparent [&_[role="group"]]:transition-all aria-invalid:[&_[role="group"]]:bg-error-container aria-invalid:[&_[role="group"]]:outline-error-border aria-invalid:[&_[role="group"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role="group"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role="group"]]:cursor-not-allowed data-[invalid]:[&_[role="group"]]:bg-error-container data-[invalid]:[&_[role="group"]]:outline-error-border data-[invalid]:[&_[role="group"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role="group"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong`,{variants:{size:{small:`[&_[role="group"]]:h-lg [&_[role="group"]]:rounded-lg [&_input]:style-text-default--1`,medium:`[&_[role="group"]]:h-xl [&_[role="group"]]:rounded-xl [&_input]:style-text-default-0`,large:`[&_[role="group"]]:h-2xl [&_[role="group"]]:rounded-2xl [&_input]:style-text-default-1`},variant:{primary:`[&_[role="group"]]:bg-surface [&_[role="group"]]:shadow-2xs`,secondary:`[&_[role="group"]]:bg-neutral-container`,ghost:``}},defaultVariants:{size:`medium`,variant:`primary`}}),AAe=({size:e,variant:t,children:r,label:i,disableInput:a=!1,className:o,ref:s,...c})=>{let l=v.default.useId(),{min:u,max:d,value:f,defaultValue:p,onValueChange:m,"aria-invalid":h,...g}=c,[_,y]=v.default.useState(()=>typeof p==`number`?p:null),b=typeof f==`number`||f===null?f:_,x=!!(h||typeof b==`number`&&(typeof u==`number`&&b<u||typeof d==`number`&&b>d)),S=(...e)=>{let[t]=e;typeof f!=`number`&&f!==null&&y(t),m?.(...e)},C=()=>{switch(e){case`small`:return`iconSmall`;case`medium`:return`iconMedium`;case`large`:return`iconLarge`;default:return`iconMedium`}};return(0,n.jsxs)(Nh,{className:Y(kAe({size:e,variant:t,className:o})),ref:s,"aria-invalid":x,"data-invalid":x?``:void 0,defaultValue:p,id:l,max:d,min:u,onValueChange:S,value:f,...g,children:[(0,n.jsxs)(Hh,{className:`cursor-ew-resize`,children:[(0,n.jsx)(`label`,{className:`cursor-ew-resize style-text-default--1`,htmlFor:l,children:i}),(0,n.jsx)(Uh,{children:(0,n.jsx)(jAe,{})})]}),(0,n.jsxs)(Ph,{className:`relative flex w-full items-center gap-3xs`,children:[(0,n.jsx)(zh,{render:e=>(0,n.jsx)(Yv,{...e,tone:`error`,variant:`ghost`,size:C(),className:`shrink-0 rounded-r-none`,children:(0,n.jsx)(_i,{weight:`bold`})})}),(0,n.jsx)(Bh,{disabled:a,className:Y(`w-full text-center focus:outline-none`,r&&`text-right`)}),r&&(0,n.jsx)(`div`,{className:Y(`w-full text-left text-on-surface-variant`,e===`small`&&`style-text-default--1`,e===`medium`&&`style-text-default-0`,e===`large`&&`style-text-default-1`),children:r}),(0,n.jsx)(Rh,{render:e=>(0,n.jsx)(Yv,{...e,tone:`success`,variant:`ghost`,size:C(),className:`shrink-0 rounded-l-none`,children:(0,n.jsx)(yi,{weight:`bold`})})})]})]})};function jAe(e){return(0,n.jsxs)(`svg`,{fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`title`,{children:`Resize cursor`}),(0,n.jsx)(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})]})}var MAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center gap-sm rounded-full`,e),ref:r,...i,children:t}),NAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`flex items-center gap-xs style-text-default-0 [&>svg]:size-md`,e),ref:r,...i,children:t}),PAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default--2 text-on-surface-variant`,e),ref:r,...i,children:t}),FAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t}),IAe=({compact:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col items-start justify-start gap-3xs`,e&&`hidden`,t),ref:i,...a,children:r}),LAe=({currentIndex:e,className:t,children:r,ref:i,...a})=>{let o=`progress-${(0,v.useId)().replace(/:/g,``)}`,s=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
|
|
197
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function d3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:m3(t,`input`,e.processors),output:m3(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function f3(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return f3(r.element,n);if(r.type===`set`)return f3(r.valueType,n);if(r.type===`lazy`)return f3(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return f3(r.innerType,n);if(r.type===`intersection`)return f3(r.left,n)||f3(r.right,n);if(r.type===`record`||r.type===`map`)return f3(r.keyType,n)||f3(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:f3(r.in,n)||f3(r.out,n);if(r.type===`object`){for(let e in r.shape)if(f3(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(f3(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(f3(e,n))return!0;return!!(r.rest&&f3(r.rest,n))}return!1}var p3=(e,t={})=>n=>{let r=c3({...n,processors:t});return l3(e,r),u3(r,e),d3(r,e)},m3=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=c3({...i??{},target:a,io:t,processors:n});return l3(e,o),u3(o,e),d3(o,e)},Ake={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},h3=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ake[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},g3=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},_3=(e,t,n,r)=>{n.type=`boolean`},v3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},y3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},b3=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},x3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},S3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},C3=(e,t,n,r)=>{n.not={}},jke=(e,t,n,r)=>{},Mke=(e,t,n,r)=>{},w3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},T3=(e,t,n,r)=>{let i=e._zod.def,a=GZ(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},E3=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},D3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},O3=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},k3=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},A3=(e,t,n,r)=>{n.type=`boolean`},j3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},M3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},N3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},P3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},F3=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},I3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=l3(a.element,t,{...r,path:[...r.path,`items`]})},L3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=l3(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=l3(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},R3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>l3(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},z3=(e,t,n,r)=>{let i=e._zod.def,a=l3(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=l3(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},B3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>l3(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?l3(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},V3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=l3(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=l3(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=l3(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},H3=(e,t,n,r)=>{let i=e._zod.def,a=l3(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},U3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},W3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},G3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},K3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},q3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;l3(o,t,r);let s=t.seen.get(e);s.ref=o},J3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Y3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},X3=(e,t,n,r)=>{let i=e._zod.def;l3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Z3=(e,t,n,r)=>{let i=e._zod.innerType;l3(i,t,r);let a=t.seen.get(e);a.ref=i},Q3={string:h3,number:g3,boolean:_3,bigint:v3,symbol:y3,null:b3,undefined:x3,void:S3,never:C3,any:jke,unknown:Mke,date:w3,enum:T3,literal:E3,nan:D3,template_literal:O3,file:k3,success:A3,custom:j3,function:M3,transform:N3,map:P3,set:F3,array:I3,object:L3,union:R3,intersection:z3,tuple:B3,record:V3,nullable:H3,nonoptional:U3,default:W3,prefault:G3,catch:K3,pipe:q3,readonly:J3,promise:Y3,optional:X3,lazy:Z3};function $3(e,t){if(`_idmap`in e){let n=e,r=c3({...t,processors:Q3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;l3(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;u3(r,n),a[t]=d3(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=c3({...t,processors:Q3});return l3(e,n),u3(n,e),d3(n,e)}var Nke=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=c3({processors:Q3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return l3(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),u3(this.ctx,e);let{"~standard":n,...r}=d3(this.ctx,e);return r}},Pke=h({}),Fke=h({$ZodAny:()=>r0,$ZodArray:()=>l0,$ZodAsyncError:()=>BZ,$ZodBase64:()=>H1,$ZodBase64URL:()=>W1,$ZodBigInt:()=>Q1,$ZodBigIntFormat:()=>$1,$ZodBoolean:()=>Z1,$ZodCIDRv4:()=>z1,$ZodCIDRv6:()=>B1,$ZodCUID:()=>D1,$ZodCUID2:()=>O1,$ZodCatch:()=>K0,$ZodCheck:()=>K$,$ZodCheckBigIntFormat:()=>Q$,$ZodCheckEndsWith:()=>d1,$ZodCheckGreaterThan:()=>Y$,$ZodCheckIncludes:()=>l1,$ZodCheckLengthEquals:()=>i1,$ZodCheckLessThan:()=>J$,$ZodCheckLowerCase:()=>s1,$ZodCheckMaxLength:()=>n1,$ZodCheckMaxSize:()=>$$,$ZodCheckMimeType:()=>m1,$ZodCheckMinLength:()=>r1,$ZodCheckMinSize:()=>e1,$ZodCheckMultipleOf:()=>X$,$ZodCheckNumberFormat:()=>Z$,$ZodCheckOverwrite:()=>h1,$ZodCheckProperty:()=>p1,$ZodCheckRegex:()=>o1,$ZodCheckSizeEquals:()=>t1,$ZodCheckStartsWith:()=>u1,$ZodCheckStringFormat:()=>a1,$ZodCheckUpperCase:()=>c1,$ZodCodec:()=>X0,$ZodCustom:()=>o2,$ZodCustomStringFormat:()=>J1,$ZodDate:()=>s0,$ZodDefault:()=>B0,$ZodDiscriminatedUnion:()=>y0,$ZodE164:()=>G1,$ZodEmail:()=>C1,$ZodEmoji:()=>T1,$ZodEncodeError:()=>VZ,$ZodEnum:()=>M0,$ZodError:()=>IQ,$ZodExactOptional:()=>R0,$ZodFile:()=>P0,$ZodFunction:()=>r2,$ZodGUID:()=>x1,$ZodIPv4:()=>I1,$ZodIPv6:()=>L1,$ZodISODate:()=>N1,$ZodISODateTime:()=>M1,$ZodISODuration:()=>F1,$ZodISOTime:()=>P1,$ZodIntersection:()=>b0,$ZodJWT:()=>q1,$ZodKSUID:()=>j1,$ZodLazy:()=>a2,$ZodLiteral:()=>N0,$ZodMAC:()=>R1,$ZodMap:()=>O0,$ZodNaN:()=>q0,$ZodNanoID:()=>E1,$ZodNever:()=>a0,$ZodNonOptional:()=>U0,$ZodNull:()=>n0,$ZodNullable:()=>z0,$ZodNumber:()=>Y1,$ZodNumberFormat:()=>X1,$ZodObject:()=>p0,$ZodObjectJIT:()=>m0,$ZodOptional:()=>L0,$ZodPipe:()=>J0,$ZodPrefault:()=>H0,$ZodPreprocess:()=>$0,$ZodPromise:()=>i2,$ZodReadonly:()=>e2,$ZodRealError:()=>LQ,$ZodRecord:()=>D0,$ZodRegistry:()=>x2,$ZodSet:()=>A0,$ZodString:()=>y1,$ZodStringFormat:()=>b1,$ZodSuccess:()=>G0,$ZodSymbol:()=>e0,$ZodTemplateLiteral:()=>n2,$ZodTransform:()=>F0,$ZodTuple:()=>C0,$ZodType:()=>v1,$ZodULID:()=>k1,$ZodURL:()=>w1,$ZodUUID:()=>S1,$ZodUndefined:()=>t0,$ZodUnion:()=>g0,$ZodUnknown:()=>i0,$ZodVoid:()=>o0,$ZodXID:()=>A1,$ZodXor:()=>v0,$brand:()=>zZ,$constructor:()=>Q,$input:()=>b2,$output:()=>y2,Doc:()=>g1,JSONSchema:()=>Pke,JSONSchemaGenerator:()=>Nke,NEVER:()=>RZ,TimePrecision:()=>Y2,_any:()=>g4,_array:()=>Q4,_base64:()=>G2,_base64url:()=>K2,_bigint:()=>l4,_boolean:()=>s4,_catch:()=>wke,_check:()=>r3,_cidrv4:()=>U2,_cidrv6:()=>W2,_coercedBigint:()=>u4,_coercedBoolean:()=>c4,_coercedDate:()=>x4,_coercedNumber:()=>t4,_coercedString:()=>T2,_cuid:()=>F2,_cuid2:()=>I2,_custom:()=>e3,_date:()=>b4,_decode:()=>QQ,_decodeAsync:()=>e$,_default:()=>xke,_discriminatedUnion:()=>lke,_e164:()=>q2,_email:()=>E2,_emoji:()=>N2,_encode:()=>ZQ,_encodeAsync:()=>$Q,_endsWith:()=>U4,_enum:()=>hke,_file:()=>$4,_float32:()=>r4,_float64:()=>i4,_gt:()=>T4,_gte:()=>E4,_guid:()=>D2,_includes:()=>V4,_int:()=>n4,_int32:()=>a4,_int64:()=>d4,_intersection:()=>uke,_ipv4:()=>B2,_ipv6:()=>V2,_isoDate:()=>Z2,_isoDateTime:()=>X2,_isoDuration:()=>$2,_isoTime:()=>Q2,_jwt:()=>J2,_ksuid:()=>z2,_lazy:()=>Oke,_length:()=>L4,_literal:()=>_ke,_lowercase:()=>z4,_lt:()=>C4,_lte:()=>w4,_mac:()=>H2,_map:()=>pke,_max:()=>w4,_maxLength:()=>F4,_maxSize:()=>M4,_mime:()=>G4,_min:()=>E4,_minLength:()=>I4,_minSize:()=>N4,_multipleOf:()=>j4,_nan:()=>S4,_nanoid:()=>P2,_nativeEnum:()=>gke,_negative:()=>O4,_never:()=>v4,_nonnegative:()=>A4,_nonoptional:()=>Ske,_nonpositive:()=>k4,_normalize:()=>q4,_null:()=>h4,_nullable:()=>bke,_number:()=>e4,_optional:()=>yke,_overwrite:()=>K4,_parse:()=>UQ,_parseAsync:()=>GQ,_pipe:()=>Tke,_positive:()=>D4,_promise:()=>kke,_property:()=>W4,_readonly:()=>Eke,_record:()=>fke,_refine:()=>t3,_regex:()=>R4,_safeDecode:()=>n$,_safeDecodeAsync:()=>i$,_safeEncode:()=>t$,_safeEncodeAsync:()=>r$,_safeParse:()=>qQ,_safeParseAsync:()=>YQ,_set:()=>mke,_size:()=>P4,_slugify:()=>Z4,_startsWith:()=>H4,_string:()=>w2,_stringFormat:()=>s3,_stringbool:()=>o3,_success:()=>Cke,_superRefine:()=>n3,_symbol:()=>p4,_templateLiteral:()=>Dke,_toLowerCase:()=>Y4,_toUpperCase:()=>X4,_transform:()=>vke,_trim:()=>J4,_tuple:()=>dke,_uint32:()=>o4,_uint64:()=>f4,_ulid:()=>L2,_undefined:()=>m4,_union:()=>ske,_unknown:()=>_4,_uppercase:()=>B4,_url:()=>M2,_uuid:()=>O2,_uuidv4:()=>k2,_uuidv6:()=>A2,_uuidv7:()=>j2,_void:()=>y4,_xid:()=>R2,_xor:()=>cke,clone:()=>fQ,config:()=>UZ,createStandardJSONSchemaMethod:()=>m3,createToJSONSchemaMethod:()=>p3,decode:()=>zEe,decodeAsync:()=>VEe,describe:()=>i3,encode:()=>REe,encodeAsync:()=>BEe,extractDefs:()=>u3,finalize:()=>d3,flattenError:()=>RQ,formatError:()=>zQ,globalConfig:()=>HZ,globalRegistry:()=>C2,initializeContext:()=>c3,isValidBase64:()=>V1,isValidBase64URL:()=>U1,isValidJWT:()=>K1,locales:()=>_2,meta:()=>a3,parse:()=>WQ,parseAsync:()=>KQ,prettifyError:()=>HQ,process:()=>l3,regexes:()=>a$,registry:()=>S2,safeDecode:()=>UEe,safeDecodeAsync:()=>GEe,safeEncode:()=>HEe,safeEncodeAsync:()=>WEe,safeParse:()=>JQ,safeParseAsync:()=>XQ,toDotPath:()=>VQ,toJSONSchema:()=>$3,treeifyError:()=>BQ,util:()=>WZ,version:()=>_1}),Ike=h({endsWith:()=>U4,gt:()=>T4,gte:()=>E4,includes:()=>V4,length:()=>L4,lowercase:()=>z4,lt:()=>C4,lte:()=>w4,maxLength:()=>F4,maxSize:()=>M4,mime:()=>G4,minLength:()=>I4,minSize:()=>N4,multipleOf:()=>j4,negative:()=>O4,nonnegative:()=>A4,nonpositive:()=>k4,normalize:()=>q4,overwrite:()=>K4,positive:()=>D4,property:()=>W4,regex:()=>R4,size:()=>P4,slugify:()=>Z4,startsWith:()=>H4,toLowerCase:()=>Y4,toUpperCase:()=>X4,trim:()=>J4,uppercase:()=>B4}),e6=h({ZodISODate:()=>r6,ZodISODateTime:()=>t6,ZodISODuration:()=>s6,ZodISOTime:()=>a6,date:()=>i6,datetime:()=>n6,duration:()=>c6,time:()=>o6}),t6=Q(`ZodISODateTime`,(e,t)=>{M1.init(e,t),k6.init(e,t)});function n6(e){return X2(t6,e)}var r6=Q(`ZodISODate`,(e,t)=>{N1.init(e,t),k6.init(e,t)});function i6(e){return Z2(r6,e)}var a6=Q(`ZodISOTime`,(e,t)=>{P1.init(e,t),k6.init(e,t)});function o6(e){return Q2(a6,e)}var s6=Q(`ZodISODuration`,(e,t)=>{F1.init(e,t),k6.init(e,t)});function c6(e){return $2(s6,e)}var l6=(e,t)=>{IQ.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>zQ(e,t)},flatten:{value:t=>RQ(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,qZ,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,qZ,2)}},isEmpty:{get(){return e.issues.length===0}}})},Lke=Q(`ZodError`,l6),u6=Q(`ZodError`,l6,{Parent:Error}),d6=UQ(u6),f6=GQ(u6),p6=qQ(u6),m6=YQ(u6),h6=ZQ(u6),g6=QQ(u6),_6=$Q(u6),v6=e$(u6),y6=t$(u6),b6=n$(u6),x6=r$(u6),S6=i$(u6),Rke=h({ZodAny:()=>K8,ZodArray:()=>n5,ZodBase64:()=>f8,ZodBase64URL:()=>m8,ZodBigInt:()=>F8,ZodBigIntFormat:()=>L8,ZodBoolean:()=>N8,ZodCIDRv4:()=>c8,ZodCIDRv6:()=>u8,ZodCUID:()=>K6,ZodCUID2:()=>J6,ZodCatch:()=>Z5,ZodCodec:()=>r7,ZodCustom:()=>_7,ZodCustomStringFormat:()=>b8,ZodDate:()=>e5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>p5,ZodE164:()=>g8,ZodEmail:()=>A6,ZodEmoji:()=>H6,ZodEnum:()=>D5,ZodExactOptional:()=>R5,ZodFile:()=>M5,ZodFunction:()=>h7,ZodGUID:()=>M6,ZodIPv4:()=>n8,ZodIPv6:()=>o8,ZodIntersection:()=>h5,ZodJWT:()=>v8,ZodKSUID:()=>e8,ZodLazy:()=>d7,ZodLiteral:()=>A5,ZodMAC:()=>i8,ZodMap:()=>C5,ZodNaN:()=>$5,ZodNanoID:()=>W6,ZodNever:()=>X8,ZodNonOptional:()=>q5,ZodNull:()=>W8,ZodNullable:()=>B5,ZodNumber:()=>T8,ZodNumberFormat:()=>D8,ZodObject:()=>a5,ZodOptional:()=>I5,ZodPipe:()=>t7,ZodPrefault:()=>G5,ZodPreprocess:()=>o7,ZodPromise:()=>p7,ZodReadonly:()=>s7,ZodRecord:()=>y5,ZodSet:()=>T5,ZodString:()=>D6,ZodStringFormat:()=>k6,ZodSuccess:()=>Y5,ZodSymbol:()=>B8,ZodTemplateLiteral:()=>l7,ZodTransform:()=>P5,ZodTuple:()=>_5,ZodType:()=>T6,ZodULID:()=>X6,ZodURL:()=>z6,ZodUUID:()=>P6,ZodUndefined:()=>H8,ZodUnion:()=>l5,ZodUnknown:()=>J8,ZodVoid:()=>Q8,ZodXID:()=>Q6,ZodXor:()=>d5,_ZodString:()=>E6,_default:()=>W5,_function:()=>g7,any:()=>q8,array:()=>r5,base64:()=>p8,base64url:()=>h8,bigint:()=>I8,boolean:()=>P8,catch:()=>Q5,check:()=>v7,cidrv4:()=>l8,cidrv6:()=>d8,codec:()=>i7,cuid:()=>q6,cuid2:()=>Y6,custom:()=>y7,date:()=>t5,describe:()=>S7,discriminatedUnion:()=>m5,e164:()=>_8,email:()=>j6,emoji:()=>U6,enum:()=>O5,exactOptional:()=>z5,file:()=>N5,float32:()=>k8,float64:()=>A8,function:()=>g7,guid:()=>N6,hash:()=>w8,hex:()=>C8,hostname:()=>S8,httpUrl:()=>V6,instanceof:()=>w7,int:()=>O8,int32:()=>j8,int64:()=>R8,intersection:()=>g5,invertCodec:()=>a7,ipv4:()=>r8,ipv6:()=>s8,json:()=>E7,jwt:()=>y8,keyof:()=>i5,ksuid:()=>t8,lazy:()=>f7,literal:()=>j5,looseObject:()=>c5,looseRecord:()=>S5,mac:()=>a8,map:()=>w5,meta:()=>C7,nan:()=>e7,nanoid:()=>G6,nativeEnum:()=>k5,never:()=>Z8,nonoptional:()=>J5,null:()=>G8,nullable:()=>V5,nullish:()=>H5,number:()=>E8,object:()=>o5,optional:()=>L5,partialRecord:()=>x5,pipe:()=>n7,prefault:()=>K5,preprocess:()=>D7,promise:()=>m7,readonly:()=>c7,record:()=>b5,refine:()=>b7,set:()=>E5,strictObject:()=>s5,string:()=>O6,stringFormat:()=>x8,stringbool:()=>T7,success:()=>X5,superRefine:()=>x7,symbol:()=>V8,templateLiteral:()=>u7,transform:()=>F5,tuple:()=>v5,uint32:()=>M8,uint64:()=>z8,ulid:()=>Z6,undefined:()=>U8,union:()=>u5,unknown:()=>Y8,url:()=>B6,uuid:()=>F6,uuidv4:()=>I6,uuidv6:()=>L6,uuidv7:()=>R6,void:()=>$8,xid:()=>$6,xor:()=>f5}),C6=new WeakMap;function w6(e,t,n){let r=Object.getPrototypeOf(e),i=C6.get(r);if(i||(i=new Set,C6.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var T6=Q(`ZodType`,(e,t)=>(v1.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:m3(e,`input`),output:m3(e,`output`)}}),e.toJSONSchema=p3(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>d6(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>p6(e,t,n),e.parseAsync=async(t,n)=>f6(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>m6(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>h6(e,t,n),e.decode=(t,n)=>g6(e,t,n),e.encodeAsync=async(t,n)=>_6(e,t,n),e.decodeAsync=async(t,n)=>v6(e,t,n),e.safeEncode=(t,n)=>y6(e,t,n),e.safeDecode=(t,n)=>b6(e,t,n),e.safeEncodeAsync=async(t,n)=>x6(e,t,n),e.safeDecodeAsync=async(t,n)=>S6(e,t,n),w6(e,`ZodType`,{check(...e){let t=this.def;return this.clone(tQ(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return fQ(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(b7(e,t))},superRefine(e,t){return this.check(x7(e,t))},overwrite(e){return this.check(K4(e))},optional(){return L5(this)},exactOptional(){return z5(this)},nullable(){return V5(this)},nullish(){return L5(V5(this))},nonoptional(e){return J5(this,e)},array(){return r5(this)},or(e){return u5([this,e])},and(e){return g5(this,e)},transform(e){return n7(this,F5(e))},default(e){return W5(this,e)},prefault(e){return K5(this,e)},catch(e){return Q5(this,e)},pipe(e){return n7(this,e)},readonly(){return c7(this)},describe(e){let t=this.clone();return C2.add(t,{description:e}),t},meta(...e){if(e.length===0)return C2.get(this);let t=this.clone();return C2.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return C2.get(e)?.description},configurable:!0}),e)),E6=Q(`_ZodString`,(e,t)=>{y1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,w6(e,`_ZodString`,{regex(...e){return this.check(R4(...e))},includes(...e){return this.check(V4(...e))},startsWith(...e){return this.check(H4(...e))},endsWith(...e){return this.check(U4(...e))},min(...e){return this.check(I4(...e))},max(...e){return this.check(F4(...e))},length(...e){return this.check(L4(...e))},nonempty(...e){return this.check(I4(1,...e))},lowercase(e){return this.check(z4(e))},uppercase(e){return this.check(B4(e))},trim(){return this.check(J4())},normalize(...e){return this.check(q4(...e))},toLowerCase(){return this.check(Y4())},toUpperCase(){return this.check(X4())},slugify(){return this.check(Z4())}})}),D6=Q(`ZodString`,(e,t)=>{y1.init(e,t),E6.init(e,t),e.email=t=>e.check(E2(A6,t)),e.url=t=>e.check(M2(z6,t)),e.jwt=t=>e.check(J2(v8,t)),e.emoji=t=>e.check(N2(H6,t)),e.guid=t=>e.check(D2(M6,t)),e.uuid=t=>e.check(O2(P6,t)),e.uuidv4=t=>e.check(k2(P6,t)),e.uuidv6=t=>e.check(A2(P6,t)),e.uuidv7=t=>e.check(j2(P6,t)),e.nanoid=t=>e.check(P2(W6,t)),e.guid=t=>e.check(D2(M6,t)),e.cuid=t=>e.check(F2(K6,t)),e.cuid2=t=>e.check(I2(J6,t)),e.ulid=t=>e.check(L2(X6,t)),e.base64=t=>e.check(G2(f8,t)),e.base64url=t=>e.check(K2(m8,t)),e.xid=t=>e.check(R2(Q6,t)),e.ksuid=t=>e.check(z2(e8,t)),e.ipv4=t=>e.check(B2(n8,t)),e.ipv6=t=>e.check(V2(o8,t)),e.cidrv4=t=>e.check(U2(c8,t)),e.cidrv6=t=>e.check(W2(u8,t)),e.e164=t=>e.check(q2(g8,t)),e.datetime=t=>e.check(n6(t)),e.date=t=>e.check(i6(t)),e.time=t=>e.check(o6(t)),e.duration=t=>e.check(c6(t))});function O6(e){return w2(D6,e)}var k6=Q(`ZodStringFormat`,(e,t)=>{b1.init(e,t),E6.init(e,t)}),A6=Q(`ZodEmail`,(e,t)=>{C1.init(e,t),k6.init(e,t)});function j6(e){return E2(A6,e)}var M6=Q(`ZodGUID`,(e,t)=>{x1.init(e,t),k6.init(e,t)});function N6(e){return D2(M6,e)}var P6=Q(`ZodUUID`,(e,t)=>{S1.init(e,t),k6.init(e,t)});function F6(e){return O2(P6,e)}function I6(e){return k2(P6,e)}function L6(e){return A2(P6,e)}function R6(e){return j2(P6,e)}var z6=Q(`ZodURL`,(e,t)=>{w1.init(e,t),k6.init(e,t)});function B6(e){return M2(z6,e)}function V6(e){return M2(z6,{protocol:D$,hostname:E$,...$(e)})}var H6=Q(`ZodEmoji`,(e,t)=>{T1.init(e,t),k6.init(e,t)});function U6(e){return N2(H6,e)}var W6=Q(`ZodNanoID`,(e,t)=>{E1.init(e,t),k6.init(e,t)});function G6(e){return P2(W6,e)}var K6=Q(`ZodCUID`,(e,t)=>{D1.init(e,t),k6.init(e,t)});function q6(e){return F2(K6,e)}var J6=Q(`ZodCUID2`,(e,t)=>{O1.init(e,t),k6.init(e,t)});function Y6(e){return I2(J6,e)}var X6=Q(`ZodULID`,(e,t)=>{k1.init(e,t),k6.init(e,t)});function Z6(e){return L2(X6,e)}var Q6=Q(`ZodXID`,(e,t)=>{A1.init(e,t),k6.init(e,t)});function $6(e){return R2(Q6,e)}var e8=Q(`ZodKSUID`,(e,t)=>{j1.init(e,t),k6.init(e,t)});function t8(e){return z2(e8,e)}var n8=Q(`ZodIPv4`,(e,t)=>{I1.init(e,t),k6.init(e,t)});function r8(e){return B2(n8,e)}var i8=Q(`ZodMAC`,(e,t)=>{R1.init(e,t),k6.init(e,t)});function a8(e){return H2(i8,e)}var o8=Q(`ZodIPv6`,(e,t)=>{L1.init(e,t),k6.init(e,t)});function s8(e){return V2(o8,e)}var c8=Q(`ZodCIDRv4`,(e,t)=>{z1.init(e,t),k6.init(e,t)});function l8(e){return U2(c8,e)}var u8=Q(`ZodCIDRv6`,(e,t)=>{B1.init(e,t),k6.init(e,t)});function d8(e){return W2(u8,e)}var f8=Q(`ZodBase64`,(e,t)=>{H1.init(e,t),k6.init(e,t)});function p8(e){return G2(f8,e)}var m8=Q(`ZodBase64URL`,(e,t)=>{W1.init(e,t),k6.init(e,t)});function h8(e){return K2(m8,e)}var g8=Q(`ZodE164`,(e,t)=>{G1.init(e,t),k6.init(e,t)});function _8(e){return q2(g8,e)}var v8=Q(`ZodJWT`,(e,t)=>{q1.init(e,t),k6.init(e,t)});function y8(e){return J2(v8,e)}var b8=Q(`ZodCustomStringFormat`,(e,t)=>{J1.init(e,t),k6.init(e,t)});function x8(e,t,n={}){return s3(b8,e,t,n)}function S8(e){return s3(b8,`hostname`,T$,e)}function C8(e){return s3(b8,`hex`,U$,e)}function w8(e,t){let n=`${e}_${t?.enc??`hex`}`,r=a$[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return s3(b8,n,r,t)}var T8=Q(`ZodNumber`,(e,t)=>{Y1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),w6(e,`ZodNumber`,{gt(e,t){return this.check(T4(e,t))},gte(e,t){return this.check(E4(e,t))},min(e,t){return this.check(E4(e,t))},lt(e,t){return this.check(C4(e,t))},lte(e,t){return this.check(w4(e,t))},max(e,t){return this.check(w4(e,t))},int(e){return this.check(O8(e))},safe(e){return this.check(O8(e))},positive(e){return this.check(T4(0,e))},nonnegative(e){return this.check(E4(0,e))},negative(e){return this.check(C4(0,e))},nonpositive(e){return this.check(w4(0,e))},multipleOf(e,t){return this.check(j4(e,t))},step(e,t){return this.check(j4(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function E8(e){return e4(T8,e)}var D8=Q(`ZodNumberFormat`,(e,t)=>{X1.init(e,t),T8.init(e,t)});function O8(e){return n4(D8,e)}function k8(e){return r4(D8,e)}function A8(e){return i4(D8,e)}function j8(e){return a4(D8,e)}function M8(e){return o4(D8,e)}var N8=Q(`ZodBoolean`,(e,t)=>{Z1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_3(e,t,n,r)});function P8(e){return s4(N8,e)}var F8=Q(`ZodBigInt`,(e,t)=>{Q1.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v3(e,t,n,r),e.gte=(t,n)=>e.check(E4(t,n)),e.min=(t,n)=>e.check(E4(t,n)),e.gt=(t,n)=>e.check(T4(t,n)),e.gte=(t,n)=>e.check(E4(t,n)),e.min=(t,n)=>e.check(E4(t,n)),e.lt=(t,n)=>e.check(C4(t,n)),e.lte=(t,n)=>e.check(w4(t,n)),e.max=(t,n)=>e.check(w4(t,n)),e.positive=t=>e.check(T4(BigInt(0),t)),e.negative=t=>e.check(C4(BigInt(0),t)),e.nonpositive=t=>e.check(w4(BigInt(0),t)),e.nonnegative=t=>e.check(E4(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(j4(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function I8(e){return l4(F8,e)}var L8=Q(`ZodBigIntFormat`,(e,t)=>{$1.init(e,t),F8.init(e,t)});function R8(e){return d4(L8,e)}function z8(e){return f4(L8,e)}var B8=Q(`ZodSymbol`,(e,t)=>{e0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y3(e,t,n,r)});function V8(e){return p4(B8,e)}var H8=Q(`ZodUndefined`,(e,t)=>{t0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x3(e,t,n,r)});function U8(e){return m4(H8,e)}var W8=Q(`ZodNull`,(e,t)=>{n0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b3(e,t,n,r)});function G8(e){return h4(W8,e)}var K8=Q(`ZodAny`,(e,t)=>{r0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function q8(){return g4(K8)}var J8=Q(`ZodUnknown`,(e,t)=>{i0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Y8(){return _4(J8)}var X8=Q(`ZodNever`,(e,t)=>{a0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C3(e,t,n,r)});function Z8(e){return v4(X8,e)}var Q8=Q(`ZodVoid`,(e,t)=>{o0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S3(e,t,n,r)});function $8(e){return y4(Q8,e)}var e5=Q(`ZodDate`,(e,t)=>{s0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w3(e,t,n,r),e.min=(t,n)=>e.check(E4(t,n)),e.max=(t,n)=>e.check(w4(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function t5(e){return b4(e5,e)}var n5=Q(`ZodArray`,(e,t)=>{l0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I3(e,t,n,r),e.element=t.element,w6(e,`ZodArray`,{min(e,t){return this.check(I4(e,t))},nonempty(e){return this.check(I4(1,e))},max(e,t){return this.check(F4(e,t))},length(e,t){return this.check(L4(e,t))},unwrap(){return this.element}})});function r5(e,t){return Q4(n5,e,t)}function i5(e){let t=e._zod.def.shape;return O5(Object.keys(t))}var a5=Q(`ZodObject`,(e,t)=>{m0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L3(e,t,n,r),$Z(e,`shape`,()=>t.shape),w6(e,`ZodObject`,{keyof(){return O5(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Y8()})},loose(){return this.clone({...this._zod.def,catchall:Y8()})},strict(){return this.clone({...this._zod.def,catchall:Z8()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return yQ(this,e)},safeExtend(e){return bQ(this,e)},merge(e){return xQ(this,e)},pick(e){return _Q(this,e)},omit(e){return vQ(this,e)},partial(...e){return SQ(I5,this,e[0])},required(...e){return CQ(q5,this,e[0])}})});function o5(e,t){return new a5({type:`object`,shape:e??{},...$(t)})}function s5(e,t){return new a5({type:`object`,shape:e,catchall:Z8(),...$(t)})}function c5(e,t){return new a5({type:`object`,shape:e,catchall:Y8(),...$(t)})}var l5=Q(`ZodUnion`,(e,t)=>{g0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R3(e,t,n,r),e.options=t.options});function u5(e,t){return new l5({type:`union`,options:e,...$(t)})}var d5=Q(`ZodXor`,(e,t)=>{l5.init(e,t),v0.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R3(e,t,n,r),e.options=t.options});function f5(e,t){return new d5({type:`union`,options:e,inclusive:!1,...$(t)})}var p5=Q(`ZodDiscriminatedUnion`,(e,t)=>{l5.init(e,t),y0.init(e,t)});function m5(e,t,n){return new p5({type:`union`,options:t,discriminator:e,...$(n)})}var h5=Q(`ZodIntersection`,(e,t)=>{b0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z3(e,t,n,r)});function g5(e,t){return new h5({type:`intersection`,left:e,right:t})}var _5=Q(`ZodTuple`,(e,t)=>{C0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B3(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function v5(e,t,n){let r=t instanceof v1;return new _5({type:`tuple`,items:e,rest:r?t:null,...$(r?n:t)})}var y5=Q(`ZodRecord`,(e,t)=>{D0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function b5(e,t,n){return!t||!t._zod?new y5({type:`record`,keyType:O6(),valueType:e,...$(t)}):new y5({type:`record`,keyType:e,valueType:t,...$(n)})}function x5(e,t,n){let r=fQ(e);return r._zod.values=void 0,new y5({type:`record`,keyType:r,valueType:t,...$(n)})}function S5(e,t,n){return new y5({type:`record`,keyType:e,valueType:t,mode:`loose`,...$(n)})}var C5=Q(`ZodMap`,(e,t)=>{O0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(N4(...t)),e.nonempty=t=>e.check(N4(1,t)),e.max=(...t)=>e.check(M4(...t)),e.size=(...t)=>e.check(P4(...t))});function w5(e,t,n){return new C5({type:`map`,keyType:e,valueType:t,...$(n)})}var T5=Q(`ZodSet`,(e,t)=>{A0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F3(e,t,n,r),e.min=(...t)=>e.check(N4(...t)),e.nonempty=t=>e.check(N4(1,t)),e.max=(...t)=>e.check(M4(...t)),e.size=(...t)=>e.check(P4(...t))});function E5(e,t){return new T5({type:`set`,valueType:e,...$(t)})}var D5=Q(`ZodEnum`,(e,t)=>{M0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T3(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new D5({...t,checks:[],...$(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new D5({...t,checks:[],...$(r),entries:i})}});function O5(e,t){return new D5({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...$(t)})}function k5(e,t){return new D5({type:`enum`,entries:e,...$(t)})}var A5=Q(`ZodLiteral`,(e,t)=>{N0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>E3(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function j5(e,t){return new A5({type:`literal`,values:Array.isArray(e)?e:[e],...$(t)})}var M5=Q(`ZodFile`,(e,t)=>{P0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k3(e,t,n,r),e.min=(t,n)=>e.check(N4(t,n)),e.max=(t,n)=>e.check(M4(t,n)),e.mime=(t,n)=>e.check(G4(Array.isArray(t)?t:[t],n))});function N5(e){return $4(M5,e)}var P5=Q(`ZodTransform`,(e,t)=>{F0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new VZ(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(MQ(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(MQ(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function F5(e){return new P5({type:`transform`,transform:e})}var I5=Q(`ZodOptional`,(e,t)=>{L0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function L5(e){return new I5({type:`optional`,innerType:e})}var R5=Q(`ZodExactOptional`,(e,t)=>{R0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z5(e){return new R5({type:`optional`,innerType:e})}var B5=Q(`ZodNullable`,(e,t)=>{z0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function V5(e){return new B5({type:`nullable`,innerType:e})}function H5(e){return L5(V5(e))}var U5=Q(`ZodDefault`,(e,t)=>{B0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function W5(e,t){return new U5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():cQ(t)}})}var G5=Q(`ZodPrefault`,(e,t)=>{H0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function K5(e,t){return new G5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():cQ(t)}})}var q5=Q(`ZodNonOptional`,(e,t)=>{U0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function J5(e,t){return new q5({type:`nonoptional`,innerType:e,...$(t)})}var Y5=Q(`ZodSuccess`,(e,t)=>{G0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function X5(e){return new Y5({type:`success`,innerType:e})}var Z5=Q(`ZodCatch`,(e,t)=>{K0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Q5(e,t){return new Z5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var $5=Q(`ZodNaN`,(e,t)=>{q0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>D3(e,t,n,r)});function e7(e){return S4($5,e)}var t7=Q(`ZodPipe`,(e,t)=>{J0.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q3(e,t,n,r),e.in=t.in,e.out=t.out});function n7(e,t){return new t7({type:`pipe`,in:e,out:t})}var r7=Q(`ZodCodec`,(e,t)=>{t7.init(e,t),X0.init(e,t)});function i7(e,t,n){return new r7({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function a7(e){let t=e._zod.def;return new r7({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var o7=Q(`ZodPreprocess`,(e,t)=>{t7.init(e,t),$0.init(e,t)}),s7=Q(`ZodReadonly`,(e,t)=>{e2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function c7(e){return new s7({type:`readonly`,innerType:e})}var l7=Q(`ZodTemplateLiteral`,(e,t)=>{n2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>O3(e,t,n,r)});function u7(e,t){return new l7({type:`template_literal`,parts:e,...$(t)})}var d7=Q(`ZodLazy`,(e,t)=>{a2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function f7(e){return new d7({type:`lazy`,getter:e})}var p7=Q(`ZodPromise`,(e,t)=>{i2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function m7(e){return new p7({type:`promise`,innerType:e})}var h7=Q(`ZodFunction`,(e,t)=>{r2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M3(e,t,n,r)});function g7(e){return new h7({type:`function`,input:Array.isArray(e?.input)?v5(e?.input):e?.input??r5(Y8()),output:e?.output??Y8()})}var _7=Q(`ZodCustom`,(e,t)=>{o2.init(e,t),T6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j3(e,t,n,r)});function v7(e){let t=new K$({check:`custom`});return t._zod.check=e,t}function y7(e,t){return e3(_7,e??(()=>!0),t)}function b7(e,t={}){return t3(_7,e,t)}function x7(e,t){return n3(e,t)}var S7=i3,C7=a3;function w7(e,t={}){let n=new _7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...$(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var T7=(...e)=>o3({Codec:r7,Boolean:N8,String:D6},...e);function E7(e){let t=f7(()=>u5([O6(e),E8(),P8(),G8(),r5(t),b5(O6(),t)]));return t}function D7(e,t){return new o7({type:`pipe`,in:F5(e),out:t})}var zke={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function Bke(e){UZ({customError:e})}function Vke(){return UZ().customError}var O7;O7||={};var k7={...Rke,...Ike,iso:e6},Hke=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function Uke(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Wke(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function A7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return k7.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return k7.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=j7(Wke(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return k7.null();if(n.length===0)return k7.never();if(n.length===1)return k7.literal(n[0]);if(n.every(e=>typeof e==`string`))return k7.enum(n);let r=n.map(e=>k7.literal(e));return r.length<2?r[0]:k7.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return k7.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>A7({...e,type:n},t));return r.length===0?k7.never():r.length===1?r[0]:k7.union(r)}if(!n)return k7.any();let r;switch(n){case`string`:{let t=k7.string();if(e.format){let n=e.format;n===`email`?t=t.check(k7.email()):n===`uri`||n===`uri-reference`?t=t.check(k7.url()):n===`uuid`||n===`guid`?t=t.check(k7.uuid()):n===`date-time`?t=t.check(k7.iso.datetime()):n===`date`?t=t.check(k7.iso.date()):n===`time`?t=t.check(k7.iso.time()):n===`duration`?t=t.check(k7.iso.duration()):n===`ipv4`?t=t.check(k7.ipv4()):n===`ipv6`?t=t.check(k7.ipv6()):n===`mac`?t=t.check(k7.mac()):n===`cidr`?t=t.check(k7.cidrv4()):n===`cidr-v6`?t=t.check(k7.cidrv6()):n===`base64`?t=t.check(k7.base64()):n===`base64url`?t=t.check(k7.base64url()):n===`e164`?t=t.check(k7.e164()):n===`jwt`?t=t.check(k7.jwt()):n===`emoji`?t=t.check(k7.emoji()):n===`nanoid`?t=t.check(k7.nanoid()):n===`cuid`?t=t.check(k7.cuid()):n===`cuid2`?t=t.check(k7.cuid2()):n===`ulid`?t=t.check(k7.ulid()):n===`xid`?t=t.check(k7.xid()):n===`ksuid`&&(t=t.check(k7.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?k7.number().int():k7.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=k7.boolean();break;case`null`:r=k7.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=j7(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=j7(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?j7(e.additionalProperties,t):k7.any();if(Object.keys(n).length===0){r=k7.record(i,a);break}let o=k7.object(n).passthrough(),s=k7.looseRecord(i,a);r=k7.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=j7(i[e],t),r=k7.string().regex(new RegExp(e));o.push(k7.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(k7.object(n).passthrough()),s.push(...o),s.length===0)r=k7.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=k7.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=k7.intersection(e,s[t]);r=e}break}let o=k7.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(j7(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>j7(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?j7(i,t):void 0;r=o?k7.tuple(a).rest(o):k7.tuple(a),typeof e.minItems==`number`&&(r=r.check(k7.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(k7.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>j7(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?j7(e.additionalItems,t):void 0;r=a?k7.tuple(n).rest(a):k7.tuple(n),typeof e.minItems==`number`&&(r=r.check(k7.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(k7.maxLength(e.maxItems)))}else if(i!==void 0){let n=j7(i,t),a=k7.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=k7.array(k7.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function j7(e,t){if(typeof e==`boolean`)return e?k7.any():k7.never();let n=A7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>j7(e,t)),a=k7.union(i);n=r?k7.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>j7(e,t)),a=k7.xor(i);n=r?k7.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:k7.any();else{let i=r?n:j7(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=k7.intersection(i,j7(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=k7.nullable(n)),e.readOnly===!0&&(n=k7.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Hke.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function Gke(e,t){if(typeof e==`boolean`)return e?k7.any():k7.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Uke(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??C2};return j7(n,r)}var Kke=h({bigint:()=>Xke,boolean:()=>Yke,date:()=>Zke,number:()=>Jke,string:()=>qke});function qke(e){return T2(D6,e)}function Jke(e){return t4(T8,e)}function Yke(e){return c4(N8,e)}function Xke(e){return u4(F8,e)}function Zke(e){return x4(e5,e)}var Qke=h({$brand:()=>zZ,$input:()=>b2,$output:()=>y2,NEVER:()=>RZ,TimePrecision:()=>Y2,ZodAny:()=>K8,ZodArray:()=>n5,ZodBase64:()=>f8,ZodBase64URL:()=>m8,ZodBigInt:()=>F8,ZodBigIntFormat:()=>L8,ZodBoolean:()=>N8,ZodCIDRv4:()=>c8,ZodCIDRv6:()=>u8,ZodCUID:()=>K6,ZodCUID2:()=>J6,ZodCatch:()=>Z5,ZodCodec:()=>r7,ZodCustom:()=>_7,ZodCustomStringFormat:()=>b8,ZodDate:()=>e5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>p5,ZodE164:()=>g8,ZodEmail:()=>A6,ZodEmoji:()=>H6,ZodEnum:()=>D5,ZodError:()=>Lke,ZodExactOptional:()=>R5,ZodFile:()=>M5,ZodFirstPartyTypeKind:()=>O7,ZodFunction:()=>h7,ZodGUID:()=>M6,ZodIPv4:()=>n8,ZodIPv6:()=>o8,ZodISODate:()=>r6,ZodISODateTime:()=>t6,ZodISODuration:()=>s6,ZodISOTime:()=>a6,ZodIntersection:()=>h5,ZodIssueCode:()=>zke,ZodJWT:()=>v8,ZodKSUID:()=>e8,ZodLazy:()=>d7,ZodLiteral:()=>A5,ZodMAC:()=>i8,ZodMap:()=>C5,ZodNaN:()=>$5,ZodNanoID:()=>W6,ZodNever:()=>X8,ZodNonOptional:()=>q5,ZodNull:()=>W8,ZodNullable:()=>B5,ZodNumber:()=>T8,ZodNumberFormat:()=>D8,ZodObject:()=>a5,ZodOptional:()=>I5,ZodPipe:()=>t7,ZodPrefault:()=>G5,ZodPreprocess:()=>o7,ZodPromise:()=>p7,ZodReadonly:()=>s7,ZodRealError:()=>u6,ZodRecord:()=>y5,ZodSet:()=>T5,ZodString:()=>D6,ZodStringFormat:()=>k6,ZodSuccess:()=>Y5,ZodSymbol:()=>B8,ZodTemplateLiteral:()=>l7,ZodTransform:()=>P5,ZodTuple:()=>_5,ZodType:()=>T6,ZodULID:()=>X6,ZodURL:()=>z6,ZodUUID:()=>P6,ZodUndefined:()=>H8,ZodUnion:()=>l5,ZodUnknown:()=>J8,ZodVoid:()=>Q8,ZodXID:()=>Q6,ZodXor:()=>d5,_ZodString:()=>E6,_default:()=>W5,_function:()=>g7,any:()=>q8,array:()=>r5,base64:()=>p8,base64url:()=>h8,bigint:()=>I8,boolean:()=>P8,catch:()=>Q5,check:()=>v7,cidrv4:()=>l8,cidrv6:()=>d8,clone:()=>fQ,codec:()=>i7,coerce:()=>Kke,config:()=>UZ,core:()=>Fke,cuid:()=>q6,cuid2:()=>Y6,custom:()=>y7,date:()=>t5,decode:()=>g6,decodeAsync:()=>v6,describe:()=>S7,discriminatedUnion:()=>m5,e164:()=>_8,email:()=>j6,emoji:()=>U6,encode:()=>h6,encodeAsync:()=>_6,endsWith:()=>U4,enum:()=>O5,exactOptional:()=>z5,file:()=>N5,flattenError:()=>RQ,float32:()=>k8,float64:()=>A8,formatError:()=>zQ,fromJSONSchema:()=>Gke,function:()=>g7,getErrorMap:()=>Vke,globalRegistry:()=>C2,gt:()=>T4,gte:()=>E4,guid:()=>N6,hash:()=>w8,hex:()=>C8,hostname:()=>S8,httpUrl:()=>V6,includes:()=>V4,instanceof:()=>w7,int:()=>O8,int32:()=>j8,int64:()=>R8,intersection:()=>g5,invertCodec:()=>a7,ipv4:()=>r8,ipv6:()=>s8,iso:()=>e6,json:()=>E7,jwt:()=>y8,keyof:()=>i5,ksuid:()=>t8,lazy:()=>f7,length:()=>L4,literal:()=>j5,locales:()=>_2,looseObject:()=>c5,looseRecord:()=>S5,lowercase:()=>z4,lt:()=>C4,lte:()=>w4,mac:()=>a8,map:()=>w5,maxLength:()=>F4,maxSize:()=>M4,meta:()=>C7,mime:()=>G4,minLength:()=>I4,minSize:()=>N4,multipleOf:()=>j4,nan:()=>e7,nanoid:()=>G6,nativeEnum:()=>k5,negative:()=>O4,never:()=>Z8,nonnegative:()=>A4,nonoptional:()=>J5,nonpositive:()=>k4,normalize:()=>q4,null:()=>G8,nullable:()=>V5,nullish:()=>H5,number:()=>E8,object:()=>o5,optional:()=>L5,overwrite:()=>K4,parse:()=>d6,parseAsync:()=>f6,partialRecord:()=>x5,pipe:()=>n7,positive:()=>D4,prefault:()=>K5,preprocess:()=>D7,prettifyError:()=>HQ,promise:()=>m7,property:()=>W4,readonly:()=>c7,record:()=>b5,refine:()=>b7,regex:()=>R4,regexes:()=>a$,registry:()=>S2,safeDecode:()=>b6,safeDecodeAsync:()=>S6,safeEncode:()=>y6,safeEncodeAsync:()=>x6,safeParse:()=>p6,safeParseAsync:()=>m6,set:()=>E5,setErrorMap:()=>Bke,size:()=>P4,slugify:()=>Z4,startsWith:()=>H4,strictObject:()=>s5,string:()=>O6,stringFormat:()=>x8,stringbool:()=>T7,success:()=>X5,superRefine:()=>x7,symbol:()=>V8,templateLiteral:()=>u7,toJSONSchema:()=>$3,toLowerCase:()=>Y4,toUpperCase:()=>X4,transform:()=>F5,treeifyError:()=>BQ,trim:()=>J4,tuple:()=>v5,uint32:()=>M8,uint64:()=>z8,ulid:()=>Z6,undefined:()=>U8,union:()=>u5,unknown:()=>Y8,uppercase:()=>B4,url:()=>B6,util:()=>WZ,uuid:()=>F6,uuidv4:()=>I6,uuidv6:()=>L6,uuidv7:()=>R6,void:()=>$8,xid:()=>$6,xor:()=>f5});UZ(l2());var M7=Qke,N7=[`equals`,`notEquals`,`contains`,`notContains`,`startsWith`,`endsWith`],P7=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],F7=[`equals`,`notEquals`,`greaterThan`,`lessThan`,`between`],I7={equals:`Is`,notEquals:`Is not`,contains:`Contains`,notContains:`Does not contain`,startsWith:`Starts with`,endsWith:`Ends with`,greaterThan:`Is greater than`,lessThan:`Is less than`,between:`Is between`},$ke=M7.object({filterOperator:M7.enum(F7),filterValueFrom:M7.union([M7.literal(``),M7.iso.date()]),filterValueTo:M7.union([M7.literal(``),M7.iso.date()])}),eAe=M7.object({filterOperator:M7.enum(N7),filterValue:M7.string()}),tAe=M7.object({filterOperator:M7.enum(P7),filterValueFrom:M7.string(),filterValueTo:M7.string()}),L7=({className:e,children:t,ref:r,tone:i,...a})=>{let o=D9().getValue(),s=typeof i==`function`?i(o):i;return(0,n.jsxs)(ey,{variant:`soft`,className:Y(``,e),ref:r,tone:s,...a,children:[t,o]})},R7=({showDivider:e=!0,className:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e,children:()=>(0,n.jsx)(`tbody`,{className:Y(e&&`divide-y divide-border`,`overflow-y-auto`,t),ref:r,...i,children:a.getRowModel().rows.map(e=>(0,n.jsx)(`tr`,{style:{backgroundColor:e.getIsSelected()?`var(--color-neutral-container-high)`:`transparent`},children:e.getVisibleCells().map(e=>(0,n.jsx)(a.AppCell,{cell:e,children:e=>(0,n.jsx)(`td`,{style:{width:e.column.getSize()},className:Y(`h-xl px-xs first:rounded-l-xl last:rounded-r-xl`,t),children:(0,n.jsx)(a.FlexRender,{cell:e})})},e.id))},e.id))})})},z7=({className:e,children:t,ref:r,...i})=>{let a=D9(),o=E9(),s=a.row;return(0,n.jsx)(o.Subscribe,{selector:e=>e.rowSelection,children:()=>(0,n.jsx)(IM,{checked:s.getIsSelected()||s.getCanSelectSubRows()&&s.getIsAllSubRowsSelected(),disabled:!s.getCanSelect(),indeterminate:s.getIsSomeSelected(),onCheckedChange:e=>s.toggleSelected(e),className:Y(``,e),ref:r,...i,children:t})})},B7=({className:e,children:t,ref:r,...i})=>{let a=E9(),o=e=>{a.getColumn(e)?.toggleVisibility()};return(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{children:a.getAllColumns().flatMap(e=>e.getCanHide()?(0,n.jsx)(OZ,{checked:e.getIsVisible(),onCheckedChange:()=>o(e.id),children:e.columnDef.header||e.id},e.id):null)})]})},V7=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col gap-xs`,e),ref:r,...i,children:t}),nAe=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue().toLocaleDateString()]})},H7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`equals`,filterValueFrom:l?.date[0]??``,filterValueTo:l?.date[1]??``},validators:{onSubmit:$ke},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,date:[t.filterValueFrom,t.filterValueTo]})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset()},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetHeading,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(MF,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldRadioGroup,{children:F7.map(t=>(0,n.jsxs)(e.FieldSet,{children:[(0,n.jsx)(PL,{value:t,variant:`inSurface`,children:s?.[t]??I7[t]}),e.state.value===t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.AppField,{name:`filterValueFrom`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})}),t===`between`&&(0,n.jsx)(u.AppField,{name:`filterValueTo`,children:e=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(e.FieldErrors,{}),(0,n.jsx)(e.FieldInput,{type:`date`,variant:`secondary`})]})})]})]},t))})]})})})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},U7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue();return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:Array.isArray(s.date)&&s.date[1]!==``?s.date.join(` - `):s.date})]})}),(0,n.jsx)(lF,{children:(0,n.jsxs)(fF,{children:[(0,n.jsx)(uF,{children:e.columnDef.header||e.id}),(0,n.jsxs)(pF,{children:[r,(0,n.jsx)(H7,{column:e})]})]})})]},e.id)},W7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`equals`,filterValueFrom:l?.number[0]??``,filterValueTo:l?.number[1]??``},validators:{onSubmit:tAe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,number:[t.filterValueFrom,t.filterValueTo]})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset({filterOperator:`equals`,filterValueFrom:``,filterValueTo:``})},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldRadioGroup,{children:P7.map(r=>(0,n.jsxs)(t.FieldSet,{children:[(0,n.jsx)(PL,{value:r,variant:`inSurface`,children:s?.[r]??I7[r]}),t.state.value===r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.AppField,{name:`filterValueFrom`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,type:`number`,variant:`secondary`})]})}),r===`between`&&(0,n.jsx)(u.AppField,{name:`filterValueTo`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} maximum filter value`,type:`number`,variant:`secondary`})]})})]})]},r))})]})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},G7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue(),c=s.operator===`between`?s.number.filter(Boolean).join(` - `):s.number[0];return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:c}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:e.columnDef.header||e.id})}),(0,n.jsx)(pF,{children:(0,n.jsx)(W7,{column:e})})]})]})},K7=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,q7=e=>Array.isArray(e)&&e.every(K7),J7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=e.getFilterValue(),c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},[l,u]=(0,v.useState)(q7(s)?s:[]),d=Array.from(e.getFacetedUniqueValues().keys()).filter(K7).sort((e,t)=>String(e).localeCompare(String(t)));return(0,n.jsxs)(JL,{className:Y(``,t),onReset:()=>{e.setFilterValue(void 0),u([])},onSubmit:t=>{t.preventDefault(),t.stopPropagation(),l.length>0&&e.setFilterValue(l)},ref:i,...a,children:[r,(0,n.jsxs)(zM,{multiple:!0,value:l,onValueChange:e=>{q7(e)&&u(e)},children:[(0,n.jsxs)(WM,{"aria-label":`${e.id} filter value`,variant:`secondary`,children:[(0,n.jsx)(GM,{placeholder:`Select values`,children:e=>q7(e)?e.map(String).join(`, `):`Select values`}),(0,n.jsx)(HM,{children:(0,n.jsx)(Qr,{weight:`bold`})})]}),(0,n.jsx)(UM,{alignItemWithTrigger:!1,sideOffset:8,children:(0,n.jsx)(VM,{children:d.map(e=>(0,n.jsx)(BM,{value:e,children:(0,n.jsx)(qM,{children:String(e)})},`${typeof e}:${String(e)}`))})})]}),(0,n.jsxs)(ZL,{children:[(0,n.jsx)(Yv,{className:`w-full`,tone:`neutral`,type:`reset`,variant:`outline`,children:c.reset}),(0,n.jsx)(Yv,{className:`w-full`,disabled:l.length===0,type:`submit`,children:c.apply})]})]})},Y7=({column:e,className:t,children:r,ref:i,...a})=>{let o=e.getFilterValue(),s=e.columnDef.header||e.id;return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:s}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o.map(String).join(`, `)}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:s})}),(0,n.jsx)(pF,{children:(0,n.jsx)(J7,{column:e})})]})]})},X7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=o.options.meta?.translations?.filterOperatorLabels,c=o.options.meta?.translations?.buttonLabels??{reset:`Reset`,apply:`Apply`},l=e.getFilterValue(),u=iR({defaultValues:{filterOperator:l?.operator??`contains`,filterValue:l?.value??``},validators:{onSubmit:eAe},onSubmit:({value:t})=>{e.setFilterValue({operator:t.filterOperator,value:t.filterValue})}});return(0,n.jsx)(JL,{onSubmit:async e=>{e.preventDefault(),e.stopPropagation(),await u.handleSubmit()},onReset:()=>{e.setFilterValue(void 0),u.reset({filterOperator:`contains`,filterValue:``})},className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(u.AppForm,{children:[r,(0,n.jsx)(u.FormErrors,{}),(0,n.jsx)(u.FormSet,{children:(0,n.jsx)(u.FormSetContent,{children:(0,n.jsx)(u.AppField,{name:`filterOperator`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldRadioGroup,{children:N7.map(r=>(0,n.jsxs)(t.FieldSet,{children:[(0,n.jsx)(PL,{value:r,variant:`inSurface`,children:s?.[r]??I7[r]}),t.state.value===r&&(0,n.jsx)(u.AppField,{name:`filterValue`,children:t=>(0,n.jsxs)(MF,{children:[(0,n.jsx)(t.FieldErrors,{}),(0,n.jsx)(t.FieldInput,{"aria-label":`${e.id} filter value`,variant:`secondary`})]})})]},r))})]})})})}),(0,n.jsxs)(u.FormFooter,{children:[(0,n.jsx)(u.FormReset,{children:c.reset}),(0,n.jsx)(u.FormSubmit,{children:c.apply})]})]})})},Z7=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9().options.meta?.translations?.filterOperatorLabels,s=e.getFilterValue();return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[(0,n.jsx)(di,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:o?.[s.operator]??I7[s.operator]}),(0,n.jsx)(`span`,{children:s.value}),r]})}),(0,n.jsxs)(lF,{children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:e.columnDef.header||e.id})}),(0,n.jsx)(pF,{children:(0,n.jsx)(X7,{column:e})})]})]})},Q7=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e.columnFilters,children:()=>a.getAllColumns().some(e=>e.getIsFiltered())?(0,n.jsxs)(`ul`,{className:Y(`flex flex-wrap items-center gap-xs`,e),ref:r,...i,children:[t,a.getAllColumns().map(e=>{if(!e.getIsFiltered())return null;switch(e.columnDef.meta?.filterVariant){case`date`:return(0,n.jsx)(U7,{column:e},e.id);case`number`:return(0,n.jsx)(G7,{column:e},e.id);case`select`:return(0,n.jsx)(Y7,{column:e},e.id);case`string`:return(0,n.jsx)(Z7,{column:e},e.id);default:return null}})]}):null})},$7=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(DZ,{modal:!1,children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{align:`end`,className:``,children:a.getAllColumns().filter(e=>e.getCanFilter()).map(t=>{let{filterVariant:r}=t.columnDef.meta??{};return(0,n.jsxs)(cF,{children:[(0,n.jsx)(dF,{nativeButton:!1,children:(0,n.jsx)(kZ,{closeOnClick:!1,children:t.columnDef.header||t.id})}),(0,n.jsxs)(lF,{side:`inline-end`,align:`start`,className:Y(``,e),onKeyDownCapture:e=>e.stopPropagation(),children:[(0,n.jsx)(fF,{children:(0,n.jsx)(uF,{children:t.columnDef.header||t.id})}),(0,n.jsx)(pF,{children:(()=>{switch(r){case`date`:return(0,n.jsx)(H7,{column:t});case`number`:return(0,n.jsx)(W7,{column:t});case`select`:return(0,n.jsx)(J7,{column:t});case`string`:return(0,n.jsx)(X7,{column:t});default:return null}})()})]})]},t.id)})})]})},e9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.setPageIndex(0)},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Jr,{weight:`bold`})]})},t9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(`tfoot`,{className:Y(``,e),ref:r,...i,children:[t,a.getFooterGroups().map(e=>(0,n.jsx)(`tr`,{children:e.headers.map(e=>(0,n.jsx)(a.AppFooter,{header:e,children:e=>(0,n.jsx)(`td`,{style:{width:e.getSize()},colSpan:e.colSpan,children:(0,n.jsx)(a.FlexRender,{footer:e})})},e.id))},e.id))]})},n9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(`thead`,{className:Y(`bg-neutral-container`),ref:r,...i,children:[t,a.getHeaderGroups().map(t=>(0,n.jsx)(`tr`,{children:t.headers.map(t=>(0,n.jsx)(a.AppHeader,{header:t,selector:e=>e.sorting,children:t=>(0,n.jsx)(`th`,{style:{width:t.getSize()},className:Y(`container p-xs text-left style-text-default-0 text-neutral-on-container-muted transition-colors first:rounded-l-xl last:rounded-r-xl`,t.column.getCanSort()&&`hover:cursor-pointer hover:bg-neutral-container-high hover:*:text-neutral-on-container`,t.isPlaceholder&&`cursor-default`,e),colSpan:t.colSpan,onClick:t.column.getToggleSortingHandler(),children:t.isPlaceholder?null:(0,n.jsxs)(`div`,{className:Y(`flex items-center justify-between gap-2xs whitespace-nowrap [&_svg]:size-sm`,t.column.getCanSort()&&`select-none hover:cursor-pointer`),children:[(0,n.jsx)(`div`,{className:`flex items-center gap-2xs`,children:(0,n.jsx)(a.FlexRender,{header:t})}),{asc:(0,n.jsx)(Si,{weight:`bold`}),desc:(0,n.jsx)(xi,{weight:`bold`})}[t.column.getIsSorted()]??(t.column.getCanSort()?(0,n.jsx)(fi,{weight:`bold`}):null)]})},t.id)},t.id))},t.id))]})},r9=({className:e,ref:t,...r})=>{let i=D9();return(0,n.jsx)(`img`,{src:i.getValue(),className:Y(`my-xs size-xl`,e),ref:t,...r})},i9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.setPageIndex(a.getPageCount()-1)},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Yr,{weight:`bold`})]})},a9=({sticky:e=!1,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center justify-between gap-md`,e&&`sticky bottom-0 z-10 bg-inherit`,t),ref:i,...a,children:r}),o9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanNextPage(),onClick:()=>{a.nextPage()},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(Xr,{weight:`bold`})]})},s9=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue().toLocaleString()]})},c9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`inline-flex items-center justify-center gap-3xs`,e),ref:r,...i,children:t}),l9=({min:e=3,max:t=1,className:r,children:i,ref:a,...o})=>{let s=E9(),c=e=>{s.setPageIndex(e)};return(0,n.jsx)(s.Subscribe,{selector:e=>e.pagination,children:l=>{let u=s.getPageCount(),d=e=>e===l.pageIndex;return(0,n.jsxs)(`div`,{className:Y(`flex items-center gap-3xs`,r),ref:a,...o,children:[i,Array.from({length:e}).map((e,t)=>t<u?(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:d(t)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>c(t),children:t+1},t):null),u>e+t&&(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{children:(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:`ghost`,className:`shrink-0`,children:(0,n.jsx)(ri,{weight:`bold`})})}),(0,n.jsx)(AZ,{align:`center`,children:(0,n.jsx)(jZ,{value:l.pageIndex,onValueChange:c,className:`max-h-[200px] overflow-y-auto`,children:Array.from({length:u-e-t}).map((t,r)=>{let i=e+r;return(0,n.jsx)(MZ,{value:i,closeOnClick:!0,children:i+1},i)})})})]}),Array.from({length:t}).map((r,i)=>{let a=u-t+i;return a<e?null:(0,n.jsx)(Yv,{tone:`neutral`,size:`iconMedium`,variant:d(a)?`fill`:`ghost`,className:`shrink-0`,onClick:()=>c(a),children:a+1},i)})]})}})},u9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsxs)(Yv,{className:Y(`shrink-0`,e),disabled:!a.getCanPreviousPage(),onClick:()=>{a.previousPage()},ref:r,variant:`ghost`,tone:`neutral`,...i,children:[t,(0,n.jsx)(qr,{weight:`bold`})]})},d9=({className:e,children:t,ref:r,...i})=>{let a=E9(),o=e=>{a.setGlobalFilter(String(e.target.value))};return(0,n.jsx)(a.Subscribe,{selector:e=>e.globalFilter,children:a=>(0,n.jsxs)(iF,{children:[(0,n.jsx)(aF,{children:(0,n.jsx)(gi,{weight:`bold`})}),(0,n.jsx)(oF,{className:Y(``,e),onChange:o,ref:r,value:a??``,...i,children:t})]})})},f9=({className:e,children:t,ref:r,...i})=>{let a=E9();return(0,n.jsx)(a.Subscribe,{selector:e=>e.rowSelection,children:()=>{let o=a.getIsAllRowsSelected();return(0,n.jsx)(IM,{checked:o,indeterminate:!o&&a.getIsSomeRowsSelected(),onCheckedChange:e=>a.toggleAllRowsSelected(e),className:Y(``,e),ref:r,...i,children:t})}})},p9=({className:e,children:t,ref:r,...i})=>{let a=R9(),o=a.options.meta?.translations?.buttonLabels??{},s=o.ascending??`Ascending`,c=o.descending??`Descending`,l=(e,t)=>{let n=a.getColumn(e);if(n?.getIsSorted()===t){n?.clearSorting();return}n?.toggleSorting(t===`desc`,n.getCanMultiSort())};return(0,n.jsxs)(DZ,{children:[(0,n.jsx)(FZ,{className:Y(`shrink-0`,e),ref:r,...i,children:t}),(0,n.jsx)(AZ,{align:`end`,children:(0,n.jsx)(a.Subscribe,{selector:e=>e.sorting,children:()=>a.getAllColumns().filter(e=>e.getCanSort()).map(e=>(0,n.jsxs)(NZ,{children:[(0,n.jsx)(PZ,{children:e.columnDef.header||e.id}),(0,n.jsxs)(AZ,{children:[(0,n.jsxs)(OZ,{checked:e.getIsSorted()===`asc`,onClick:()=>l(e.id,`asc`),children:[(0,n.jsx)(Si,{weight:`bold`}),s]}),(0,n.jsxs)(OZ,{checked:e.getIsSorted()===`desc`,onClick:()=>l(e.id,`desc`),children:[(0,n.jsx)(xi,{weight:`bold`}),c]})]})]},e.id))})})]})},m9=({column:e,className:t,children:r,ref:i,...a})=>{let o=E9(),s=e.getIsSorted(),c=o.options.meta?.translations?.buttonLabels??{},l=c.ascending??`Ascending`,u=c.descending??`Descending`;return s?(0,n.jsx)(p9,{className:Y(``,t),ref:i,...a,children:(0,n.jsxs)(Yv,{tone:`neutral`,size:`extraSmall`,variant:`soft`,children:[s===`asc`?(0,n.jsx)(Si,{}):(0,n.jsx)(xi,{}),(0,n.jsx)(`span`,{children:e.columnDef.header||e.id}),(0,n.jsx)(`span`,{className:`font-light lowercase`,children:s===`asc`?l:u}),r]})}):null},h9=({className:e,children:t,ref:r,...i})=>{let a=E9();return a.getAllColumns().some(e=>e.getIsSorted())?(0,n.jsx)(a.Subscribe,{selector:e=>e.sorting,children:()=>(0,n.jsxs)(`ul`,{className:Y(`flex flex-wrap items-center gap-xs`,e),ref:r,...i,children:[t,a.getAllColumns().map(e=>e.getIsSorted()?(0,n.jsx)(m9,{column:e},e.id):null)]})}):null},g9=({className:e,children:t,ref:r,...i})=>{let a=D9();return(0,n.jsxs)(`span`,{className:Y(``,e),ref:r,...i,children:[t,a.getValue()]})},_9=({sticky:e=!1,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex items-center gap-3xs`,e&&`sticky top-0 z-10`,t),ref:i,...a,children:r}),v9=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`table`,{className:Y(`size-full`,e),ref:r,...i,children:t}),y9=xH({filter:(e,t)=>t.includes(e),autoRemove:e=>!e?.length}),b9=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())},x9=xH({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return r!==null&&i!==null&&e>=r&&e<=i;default:return!0}},resolveFilterValue:e=>({operator:e.operator,from:b9(e.date[0]),to:b9(e.date[1])}),resolveDataValue:e=>{if(e instanceof Date)return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate());if(typeof e==`number`){let t=new Date(e);return Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}if(typeof e==`string`){let t=new Date(e);return Number.isNaN(t.getTime())?0:Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())}return 0},autoRemove:e=>!e||!e.date[0]&&!e.date[1]}),S9=xH({filter:(e,t)=>{let{operator:n,value:r}=t,i=e.toLocaleLowerCase(),a=r.toLocaleLowerCase();switch(n){case`equals`:return i===a;case`notEquals`:return i!==a;case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`startsWith`:return i.startsWith(a);case`endsWith`:return i.endsWith(a);default:return!0}},resolveDataValue:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):``,autoRemove:e=>!e||e.value===``}),C9=e=>{if(e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?t:null},w9=xH({filter:(e,t)=>{let{operator:n,from:r,to:i}=t;switch(n){case`equals`:return r!==null&&e===r;case`notEquals`:return r!==null&&e!==r;case`greaterThan`:return r!==null&&e>r;case`lessThan`:return r!==null&&e<r;case`between`:return(r===null||e>=r)&&(i===null||e<=i);default:return!0}},resolveFilterValue:e=>{let t=C9(e.number[0]),n=C9(e.number[1]);return t!==null&&n!==null&&t>n?{operator:e.operator,from:n,to:t}:{operator:e.operator,from:t,to:n}},resolveDataValue:e=>Number(e),autoRemove:e=>!e||e.number[0]===``&&e.number[1]===``}),T9=$V({columnFacetingFeature:rH,columnFilteringFeature:lH,columnSizingFeature:yH,columnVisibilityFeature:bH,globalFilteringFeature:XH,rowPaginationFeature:ZH,rowSelectionFeature:vU,rowSortingFeature:yU,filteredRowModel:wU(),facetedRowModel:SU(),facetedUniqueValues:CU(),paginatedRowModel:EU(),sortedRowModel:DU(),columnMeta:QV(),tableMeta:QV(),filterFns:{includesString:TH,includesStringSensitive:wH,startsWith:OH,endsWith:kH,equalsString:EH,equalsStringSensitive:DH,equals:SH,weakEquals:CH,empty:AH,notEmpty:jH,arrIncludes:LH,arrIncludesAll:RH,arrIncludesSome:zH,arrHas:IH,inNumberRange:PH,inDateRange:FH,between:MH,betweenInclusive:NH,date:x9,string:S9,number:w9,select:y9},sortFns:{alphanumeric:nB,text:rB,datetime:iB,basic:aB}}),{createAppColumnHelper:rAe,useAppTable:iAe,useTableContext:E9,useCellContext:D9,useHeaderContext:aAe}=OU({features:T9,getRowId:(e,t,n)=>e.id??(n?`${n.id}.${t}`:String(t)),tableComponents:{TableBody:R7,TableColumnToggle:B7,TableContainer:V7,TableFirstPage:e9,TableFilterMenu:$7,TableFilterList:Q7,TableFooter:t9,TableHeader:n9,TableLastPage:i9,TableNav:a9,TableNextPage:o9,TablePagination:c9,TablePaging:l9,TablePreviousPage:u9,TableSearch:d9,TableSortMenu:p9,TableSortList:h9,TableToolbar:_9,TableViewport:v9},cellComponents:{TableCheckboxCell:z7,TableDateCell:nAe,TableImageCell:r9,TableNumberCell:s9,TableBadgeCell:L7,TableTextCell:g9},headerComponents:{TableSelectHeader:f9}}),oAe=({children:e})=>{let t=E9(),n=t.state.pagination.pageIndex,r=t.state.pagination.pageSize,i=t.getFilteredRowModel().rows.length,a=i===0?0:n*r+1;return e(a,i===0?0:Math.min(a+r-1,i),i)},sAe=Jn(`min-w-0 grow truncate px-2xs`,{variants:{size:{small:`style-text-default--1`,medium:`style-text-default-0`,large:`style-text-default-1`}},defaultVariants:{size:`medium`}}),O9=({size:e,className:t,children:r,ref:i,...a})=>{let o=D9();return(0,n.jsxs)(`span`,{className:Y(sAe({size:e,className:t})),ref:i,...a,children:[r,o.getValue()]})},k9=({className:e,children:t,dndDisabled:r,...i})=>{let a=z9(),{draggingNodeId:o}=vZ(),s=a.row,c=s.getCanExpand(),{ref:l,isDragging:u}=YTe({id:s.id,data:{isFolder:c,nodeId:s.id},disabled:r}),{ref:d,isDropTarget:f}=hZ({id:`folder:${s.id}`,data:{folderId:s.id,nodeId:s.id,isFolder:c},disabled:r||!c}),p=v.default.useCallback(e=>{l(e),d(e)},[l,d]),m=e=>{if(c){s.toggleExpanded();return}s.getCanSelect()&&(e.shiftKey||a.table.resetRowSelection(),s.getToggleSelectedHandler()({target:{checked:!0},shiftKey:e.shiftKey}))},h=v.default.useMemo(()=>{if(!o)return!1;let e=s.getParentRow();for(;e;){if(e.id===o)return!0;e=e.getParentRow()}return!1},[o,s]);return(0,n.jsxs)(`button`,{type:`button`,onClick:m,className:Y(`flex h-lg min-w-0 grow items-center justify-start gap-2xs truncate rounded-lg px-2xs style-text-default-0 transition-all hover:cursor-pointer [&>svg]:size-sm [&>svg]:shrink-0`,c&&f&&`bg-success-container text-success-on-container ring ring-success-border`,s.getIsSelected()?`bg-neutral-default text-neutral-on-default`:`hover:bg-neutral-container hover:text-neutral-on-container`,(u||h)&&`opacity-60`,e),ref:p,...i,children:[t,a.getValue()]})},A9=(e,t)=>{for(let n of e){if(n.id===t)return n;if(n.children?.length){let e=A9(n.children,t);if(e)return e}}return null},j9=(e,t)=>{let n=null;return{nextNodes:e.flatMap(e=>{if(e.id===t)return n=e,[];if(!e.children?.length)return[e];let r=j9(e.children,t);return r.removedNode?(n=r.removedNode,[{...e,children:r.nextNodes}]):[e]}),removedNode:n}},M9=(e,t,n)=>e.map(e=>e.id===t?{...e,children:[...e.children??[],n]}:e.children?.length?{...e,children:M9(e.children,t,n)}:e),cAe=(e,t,n)=>{if(t===n)return e;let r=A9(e,t),i=A9(e,n);if(!r||!i?.children||A9(r.children??[],n))return e;let{nextNodes:a,removedNode:o}=j9(e,t);return o?M9(a,n,o):e},lAe=(e,t)=>{let{nextNodes:n,removedNode:r}=j9(e,t);return r?[...n,r]:e},N9={getInitialState:e=>({rowVisibility:{},...e}),getDefaultTableOptions:e=>({enableRowVisibility:!0,onRowVisibilityChange:DR(`rowVisibility`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowVisibility?.get()?.[e.id]??t.options.getRowVisible?.(e)??!0,r=e=>{t.options.onRowVisibilityChange?.(t=>SR(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));VR(`rowVisibilityFeature`,e,{table_setRowVisibility:{fn:e=>r(e)},table_resetRowVisibility:{fn:()=>r(t.initialState.rowVisibility??{})},table_getIsAllRowsVisible:{fn:()=>i()},table_toggleAllRowsVisible:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;HR(`rowVisibilityFeature`,e,t,{row_getIsVisible:{fn:e=>n.atoms.rowVisibility?.get()?.[e.id]??n.options.getRowVisible?.(e)??!0},row_toggleVisibility:{fn:(e,t)=>{n.options.onRowVisibilityChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!0)}))}}})}},P9={getInitialState:e=>({rowLocked:{},...e}),getDefaultTableOptions:e=>({enableRowLocked:!0,onRowLockedChange:DR(`rowLocked`,e)}),constructTableAPIs:e=>{let t=e,n=e=>t.atoms.rowLocked?.get()?.[e.id]??t.options.getRowLocked?.(e)??!1,r=e=>{t.options.onRowLockedChange?.(t=>SR(e,t))},i=()=>t.getRowModel().flatRows.every(e=>n(e));VR(`rowLockedFeature`,e,{table_setRowLocked:{fn:e=>r(e)},table_resetRowLocked:{fn:()=>r(t.initialState.rowLocked??{})},table_getIsAllRowsLocked:{fn:()=>i()},table_toggleAllRowsLocked:{fn:e=>{let n=e??!i();r(()=>{let e={};for(let r of t.getRowModel().flatRows)e[r.id]=n;return e})}}})},assignRowPrototype:(e,t)=>{let n=t;HR(`rowLockedFeature`,e,t,{row_getIsLocked:{fn:e=>n.atoms.rowLocked?.get()?.[e.id]??n.options.getRowLocked?.(e)??!1},row_toggleLocked:{fn:(e,t)=>{n.options.onRowLockedChange?.(n=>({...n,[e.id]:t??!(n[e.id]??!1)}))}}})}},F9=({className:e,children:t,ref:r,...i})=>{let a=R9(),o=a.getCoreRowModel().flatRows,s=e=>{let t=!e;for(let e of o)e.toggleVisibility(t)};return(0,n.jsx)(a.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let a=o.some(e=>e.getIsVisible());return(0,n.jsxs)(Yv,{size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>s(a),className:Y(``,e),ref:r,...i,children:[t,a?(0,n.jsx)(ai,{weight:`bold`}):(0,n.jsx)(oi,{weight:`bold`})]})}})},I9=({className:e,children:t,ref:r,...i})=>{let a=z9(),o=R9(),s=a.row,c=s.getLeafRows(),l=c.length>0?c:[s],u=e=>{let t=!e;for(let e of l)e.toggleVisibility(t)};return(0,n.jsx)(o.Subscribe,{selector:e=>e.rowVisibility,children:()=>{let a=l.some(e=>e.getIsVisible());return(0,n.jsxs)(Yv,{size:`iconSmall`,tone:`neutral`,variant:`ghost`,onClick:()=>u(a),className:Y(``,e),ref:r,...i,children:[t,a?(0,n.jsx)(ai,{}):(0,n.jsx)(oi,{})]})}})},L9=$V({columnFacetingFeature:rH,columnFilteringFeature:lH,columnSizingFeature:yH,columnVisibilityFeature:bH,globalFilteringFeature:XH,rowExpandingFeature:PSe,rowLockedFeature:P9,rowPaginationFeature:ZH,rowSelectionFeature:vU,rowSortingFeature:yU,rowVisibilityFeature:N9,expandedRowModel:QSe(),filteredRowModel:wU(),facetedRowModel:SU(),facetedUniqueValues:CU(),paginatedRowModel:EU(),sortedRowModel:DU(),columnMeta:QV(),tableMeta:QV(),filterFns:{includesString:TH,includesStringSensitive:wH,startsWith:OH,endsWith:kH,equalsString:EH,equalsStringSensitive:DH,equals:SH,weakEquals:CH,empty:AH,notEmpty:jH,arrIncludes:LH,arrIncludesAll:RH,arrIncludesSome:zH,arrHas:IH,inNumberRange:PH,inDateRange:FH,between:MH,betweenInclusive:NH},sortFns:{alphanumeric:nB,text:rB,datetime:iB,basic:aB}}),{createAppColumnHelper:uAe,useAppTable:dAe,useTableContext:R9,useCellContext:z9,useHeaderContext:fAe}=OU({features:L9,tableComponents:{LayerTree:_Z,LayerTreeBody:bZ,LayerTreeExpandAll:xZ,LayerTreeFooter:SZ,LayerTreeLockedAll:wZ,LayerTreeRow:yZ,LayerTreeSearch:EZ,LayerTreeSort:IZ,LayerTreeVisibilityAll:F9},cellComponents:{LayerTreeIconCell:CZ,LayerTreeLockedCell:TZ,LayerTreeTextCell:O9,LayerTreeTriggerCell:k9,LayerTreeVisibilityCell:I9},headerComponents:{}}),pAe=Jn(`flex h-fit items-center justify-between`,{variants:{size:{small:`gap-2xs p-xs [&_span]:style-text-default--2 [&_svg]:size-sm`,medium:`gap-xs p-sm [&_span]:style-text-default--1 [&_svg]:size-md`,large:`gap-sm p-md [&_span]:style-text-default-0 [&_svg]:size-lg`},itemOrientation:{horizontal:`[&_[data-nav-bar-item]]:flex-row`,vertical:`[&_[data-nav-bar-item]]:flex-col`},variant:{outline:`w-full border border-border bg-surface-background`,floating:`absolute bottom-md w-fit max-w-15/16 overflow-x-auto bg-surface shadow-2xs`}},compoundVariants:[{size:`small`,variant:`floating`,className:`rounded-xl`},{size:`medium`,variant:`floating`,className:`rounded-2xl`},{size:`large`,variant:`floating`,className:`rounded-3xl`},{size:`small`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-xl`},{size:`medium`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-2xl [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-2xl`},{size:`large`,itemOrientation:`vertical`,className:`[&_[data-nav-bar-item]]:size-3xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-3xl`},{size:`small`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-lg [&_[data-nav-bar-item]]:gap-3xs [&_[data-nav-bar-item]]:rounded-lg [&_[data-nav-bar-item]]:px-xs`},{size:`medium`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-xl [&_[data-nav-bar-item]]:gap-2xs [&_[data-nav-bar-item]]:rounded-xl [&_[data-nav-bar-item]]:px-sm`},{size:`large`,itemOrientation:`horizontal`,className:`[&_[data-nav-bar-item]]:h-2xl [&_[data-nav-bar-item]]:gap-xs [&_[data-nav-bar-item]]:rounded-2xl [&_[data-nav-bar-item]]:px-md`}],defaultVariants:{itemOrientation:`vertical`,size:`medium`,variant:`outline`}}),mAe=Jn(`flex aspect-square items-center justify-center transition-all disabled:pointer-events-none disabled:opacity-50 data-[active=false]:hover:cursor-pointer data-[active=false]:active:scale-95 [&>svg]:shrink-0`,{variants:{tone:{brand:`text-brand-default hover:bg-brand-container hover:text-brand-on-container data-[active=true]:bg-brand-container data-[active=true]:text-brand-on-container`,accent:`text-accent-default hover:bg-accent-container hover:text-accent-on-container data-[active=true]:bg-accent-container data-[active=true]:text-accent-on-container`,neutral:`text-neutral-default hover:bg-neutral-container hover:text-neutral-on-container data-[active=true]:bg-neutral-container data-[active=true]:text-neutral-on-container`,error:`text-error-default hover:bg-error-container hover:text-error-on-container data-[active=true]:bg-error-container data-[active=true]:text-error-on-container`,info:`text-info-default hover:bg-info-container hover:text-info-on-container data-[active=true]:bg-info-container data-[active=true]:text-info-on-container`,success:`text-success-default hover:bg-success-container hover:text-success-on-container data-[active=true]:bg-success-container data-[active=true]:text-success-on-container`,warning:`text-warning-default hover:bg-warning-container hover:text-warning-on-container data-[active=true]:bg-warning-container data-[active=true]:text-warning-on-container`}},defaultVariants:{tone:`neutral`}}),hAe=({itemOrientation:e,size:t,variant:r,className:i,children:a,ref:o,...s})=>(0,n.jsx)(`div`,{className:Y(pAe({itemOrientation:e,size:t,variant:r}),i),ref:o,...s,children:a}),gAe=({isActive:e=!1,tone:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(`button`,{"data-active":e,"data-nav-bar-item":!0,className:Y(mAe({tone:t}),r),ref:a,...o,children:i}),_Ae=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(``,e),ref:r,...i,children:t}),vAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(``,e),ref:r,...i,children:t}),yAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Hm,{className:Y(`min-w-max`,e),ref:r,...i,children:t}),bAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Qm,{className:Y(`h-full w-[calc(100vw-40px)] rounded-xl bg-surface p-2xs transition-[opacity,transform,translate] duration-(--duration) ease-(--easing) data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] min-[500px]:w-max min-[500px]:max-w-[400px]`,e),ref:r,...i,children:t}),xAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(_h,{className:Y(`transition-transform duration-200 ease-[ease] data-popup-open:rotate-180`,e),ref:r,...i,children:t}),SAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(Xm,{className:Y(``,e),ref:r,...i,children:t}),CAe=Jn(`rounded-lg px-sm py-xs transition-colors hover:cursor-pointer`,{variants:{tone:{brand:`text-brand-on-container hover:bg-brand-container`,accent:`text-accent-on-container hover:bg-accent-container`,neutral:`text-neutral-on-container hover:bg-neutral-container`,error:`text-error-on-container hover:bg-error-container`,info:`text-info-on-container hover:bg-info-container`,success:`text-success-on-container hover:bg-success-container`,warning:`text-warning-on-container hover:bg-warning-container`}},defaultVariants:{tone:`neutral`}}),wAe=({tone:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(CAe({tone:e,className:t})),ref:i,...a,children:r}),TAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(qm,{className:Y(`relative flex gap-px`,e),ref:r,...i,children:t}),EAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(oh,{children:(0,n.jsx)(dh,{sideOffset:10,collisionPadding:{top:5,bottom:5,left:20,right:20},collisionAvoidance:{side:`none`},className:Y(`h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-(--duration) ease-(--easing) before:absolute data-instant:transition-none data-[side=bottom]:before:inset-x-0 data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:h-2xs data-[side=left]:before:inset-y-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:w-2xs data-[side=right]:before:inset-y-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2xs data-[side=top]:before:inset-x-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:h-2xs`,e),ref:r,style:{"--duration":`0.35s`,"--easing":`cubic-bezier(0.22, 1, 0.36, 1)`},...i,children:(0,n.jsxs)(hh,{className:`relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-xl shadow-md transition-[opacity,transform,width,height,scale] duration-(--duration) ease-(--easing) outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-ending-style:ease-[ease] data-starting-style:scale-90 data-starting-style:opacity-0`,children:[(0,n.jsx)(gh,{className:`relative block overflow-clip transition-[left,right] duration-(--duration) ease-(--easing) before:absolute before:bottom-0 before:left-1/2 before:block before:size-[calc(6px*sqrt(2))] before:-translate-x-1/2 before:translate-y-1/2 before:rotate-45 before:border before:content-[''] data-[side=bottom]:top-[-6px] data-[side=left]:right-[-9px] data-[side=left]:rotate-90 data-[side=right]:left-[-9px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-6px] data-[side=top]:rotate-180`}),(0,n.jsx)(mh,{className:`relative size-full overflow-hidden`}),t]})})}),DAe=Jn(`flex items-center justify-center rounded-full bg-transparent no-underline transition-colors select-none hover:cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-1`,{variants:{size:{small:`h-lg gap-3xs px-xs style-text-default--1 [&>svg]:size-xs`,medium:`h-xl gap-2xs px-sm style-text-default-0 [&>svg]:size-sm`,large:`h-2xl gap-xs px-md style-text-default-2 [&>svg]:size-md`},tone:{brand:`text-brand-default data-popup-open:bg-brand-container data-popup-open:text-brand-on-container`,accent:`text-accent-default data-popup-open:bg-accent-container data-popup-open:text-accent-on-container`,neutral:`text-neutral-default data-popup-open:bg-neutral-container data-popup-open:text-neutral-on-container`,error:`text-error-default data-popup-open:bg-error-container data-popup-open:text-error-on-container`,info:`text-info-default data-popup-open:bg-info-container data-popup-open:text-info-on-container`,success:`text-success-default data-popup-open:bg-success-container data-popup-open:text-success-on-container`,warning:`text-warning-default data-popup-open:bg-warning-container data-popup-open:text-warning-on-container`}},defaultVariants:{size:`medium`,tone:`neutral`}}),OAe=({size:e,tone:t,className:r,children:i,ref:a,...o})=>(0,n.jsx)(th,{className:Y(DAe({size:e,tone:t}),r),ref:a,...o,children:i}),kAe=Jn(`flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role="group"]]:rounded-full [&_[role="group"]]:outline [&_[role="group"]]:outline-transparent [&_[role="group"]]:transition-all aria-invalid:[&_[role="group"]]:bg-error-container aria-invalid:[&_[role="group"]]:outline-error-border aria-invalid:[&_[role="group"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role="group"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role="group"]]:cursor-not-allowed data-[invalid]:[&_[role="group"]]:bg-error-container data-[invalid]:[&_[role="group"]]:outline-error-border data-[invalid]:[&_[role="group"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role="group"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong`,{variants:{size:{small:`[&_[role="group"]]:h-lg [&_input]:style-text-default--1`,medium:`[&_[role="group"]]:h-xl [&_input]:style-text-default-0`,large:`[&_[role="group"]]:h-2xl [&_input]:style-text-default-1`},variant:{primary:`[&_[role="group"]]:bg-surface [&_[role="group"]]:shadow-2xs`,secondary:`[&_[role="group"]]:bg-neutral-container`,ghost:``}},defaultVariants:{size:`medium`,variant:`primary`}}),AAe=({size:e,variant:t,children:r,label:i,disableInput:a=!1,className:o,ref:s,...c})=>{let l=v.default.useId(),{min:u,max:d,value:f,defaultValue:p,onValueChange:m,"aria-invalid":h,...g}=c,[_,y]=v.default.useState(()=>typeof p==`number`?p:null),b=typeof f==`number`||f===null?f:_,x=!!(h||typeof b==`number`&&(typeof u==`number`&&b<u||typeof d==`number`&&b>d)),S=(...e)=>{let[t]=e;typeof f!=`number`&&f!==null&&y(t),m?.(...e)},C=()=>{switch(e){case`small`:return`iconSmall`;case`medium`:return`iconMedium`;case`large`:return`iconLarge`;default:return`iconMedium`}};return(0,n.jsxs)(Nh,{className:Y(kAe({size:e,variant:t,className:o})),ref:s,"aria-invalid":x,"data-invalid":x?``:void 0,defaultValue:p,id:l,max:d,min:u,onValueChange:S,value:f,...g,children:[i&&(0,n.jsxs)(Hh,{className:`cursor-ew-resize`,children:[(0,n.jsx)(`label`,{className:`cursor-ew-resize style-text-default--1`,htmlFor:l,children:i}),(0,n.jsx)(Uh,{children:(0,n.jsx)(jAe,{})})]}),(0,n.jsxs)(Ph,{className:`relative flex w-full items-center gap-3xs`,children:[(0,n.jsx)(zh,{render:e=>(0,n.jsx)(Yv,{...e,tone:`error`,variant:`ghost`,size:C(),className:`shrink-0 rounded-r-none`,children:(0,n.jsx)(_i,{weight:`bold`})})}),(0,n.jsx)(Bh,{disabled:a,className:Y(`w-full text-center focus:outline-none`,r&&`text-right`)}),r&&(0,n.jsx)(`div`,{className:Y(`w-full text-left text-on-surface-variant`,e===`small`&&`style-text-default--1`,e===`medium`&&`style-text-default-0`,e===`large`&&`style-text-default-1`),children:r}),(0,n.jsx)(Rh,{render:e=>(0,n.jsx)(Yv,{...e,tone:`success`,variant:`ghost`,size:C(),className:`shrink-0 rounded-l-none`,children:(0,n.jsx)(yi,{weight:`bold`})})})]})]})};function jAe(e){return(0,n.jsxs)(`svg`,{fill:`black`,height:`14`,stroke:`white`,viewBox:`0 0 24 14`,width:`26`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`title`,{children:`Resize cursor`}),(0,n.jsx)(`path`,{d:`M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z`})]})}var MAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`flex w-full items-center gap-sm rounded-full`,e),ref:r,...i,children:t}),NAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`flex items-center gap-xs style-text-default-0 [&>svg]:size-md`,e),ref:r,...i,children:t}),PAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`span`,{className:Y(`style-text-default--2 text-on-surface-variant`,e),ref:r,...i,children:t}),FAe=({className:e,children:t,ref:r,...i})=>(0,n.jsx)(`div`,{className:Y(`ml-auto text-on-surface-variant [&>svg]:size-sm`,e),ref:r,...i,children:t}),IAe=({compact:e,className:t,children:r,ref:i,...a})=>(0,n.jsx)(`div`,{className:Y(`flex flex-col items-start justify-start gap-3xs`,e&&`hidden`,t),ref:i,...a,children:r}),LAe=({currentIndex:e,className:t,children:r,ref:i,...a})=>{let o=`progress-${(0,v.useId)().replace(/:/g,``)}`,s=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`style`,{children:`
|
|
198
198
|
.${o} > :nth-child(${s}) [data-slot='progress-indicator'] {
|
|
199
199
|
background-color: var(--color-accent-container);
|
|
200
200
|
border: 1px solid var(--color-accent-border-strong);
|