@espresso-lab/mantine-data-table 1.0.8 → 1.0.10
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/Hooks/useApi.d.ts +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.es.js +18 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -114,7 +114,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
114
114
|
`}return Ke%2&&De>0?ct.substring(0,ct.length-Ke-1)+Array(Ke+1).join("▀"):ct.substring(0,ct.length-1)}(q);U-=1,q=q===void 0?2*U:q;var W,J,se,Te,u=O.getModuleCount()*U+2*q,c=q,_=u-q,$=Array(U+1).join("██"),j=Array(U+1).join(" "),te="",xe="";for(W=0;W<u;W+=1){for(se=Math.floor((W-c)/U),xe="",J=0;J<u;J+=1)Te=1,c<=J&&J<_&&c<=W&&W<_&&O.isDark(se,Math.floor((J-c)/U))&&(Te=0),xe+=Te?$:j;for(se=0;se<U;se+=1)te+=xe+`
|
|
115
115
|
`}return te.substring(0,te.length-1)},O.renderTo2dContext=function(U,q){q=q||2;for(var W=O.getModuleCount(),J=0;J<W;J++)for(var se=0;se<W;se++)U.fillStyle=O.isDark(J,se)?"black":"white",U.fillRect(J*q,se*q,q,q)},O};R.stringToBytes=(R.stringToBytesFuncs={default:function(B){for(var k=[],T=0;T<B.length;T+=1){var m=B.charCodeAt(T);k.push(255&m)}return k}}).default,R.createStringToBytes=function(B,k){var T=function(){for(var f=Ce(B),w=function(){var fe=f.read();if(fe==-1)throw"eof";return fe},p=0,g={};;){var O=f.read();if(O==-1)break;var Y=w(),Q=w()<<8|w();g[String.fromCharCode(O<<8|Y)]=Q,p+=1}if(p!=k)throw p+" != "+k;return g}(),m=63;return function(f){for(var w=[],p=0;p<f.length;p+=1){var g=f.charCodeAt(p);if(g<128)w.push(g);else{var O=T[f.charAt(p)];typeof O=="number"?(255&O)==O?w.push(O):(w.push(O>>>8),w.push(255&O)):w.push(m)}}return w}};var I,L,D,E,N,ee={L:1,M:0,Q:3,H:2},ne=(I=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],L=1335,D=7973,N=function(B){for(var k=0;B!=0;)k+=1,B>>>=1;return k},(E={}).getBCHTypeInfo=function(B){for(var k=B<<10;N(k)-N(L)>=0;)k^=L<<N(k)-N(L);return 21522^(B<<10|k)},E.getBCHTypeNumber=function(B){for(var k=B<<12;N(k)-N(D)>=0;)k^=D<<N(k)-N(D);return B<<12|k},E.getPatternPosition=function(B){return I[B-1]},E.getMaskFunction=function(B){switch(B){case 0:return function(k,T){return(k+T)%2==0};case 1:return function(k,T){return k%2==0};case 2:return function(k,T){return T%3==0};case 3:return function(k,T){return(k+T)%3==0};case 4:return function(k,T){return(Math.floor(k/2)+Math.floor(T/3))%2==0};case 5:return function(k,T){return k*T%2+k*T%3==0};case 6:return function(k,T){return(k*T%2+k*T%3)%2==0};case 7:return function(k,T){return(k*T%3+(k+T)%2)%2==0};default:throw"bad maskPattern:"+B}},E.getErrorCorrectPolynomial=function(B){for(var k=le([1],0),T=0;T<B;T+=1)k=k.multiply(le([1,K.gexp(T)],0));return k},E.getLengthInBits=function(B,k){if(1<=k&&k<10)switch(B){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+B}else if(k<27)switch(B){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+B}else{if(!(k<41))throw"type:"+k;switch(B){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+B}}},E.getLostPoint=function(B){for(var k=B.getModuleCount(),T=0,m=0;m<k;m+=1)for(var f=0;f<k;f+=1){for(var w=0,p=B.isDark(m,f),g=-1;g<=1;g+=1)if(!(m+g<0||k<=m+g))for(var O=-1;O<=1;O+=1)f+O<0||k<=f+O||g==0&&O==0||p==B.isDark(m+g,f+O)&&(w+=1);w>5&&(T+=3+w-5)}for(m=0;m<k-1;m+=1)for(f=0;f<k-1;f+=1){var Y=0;B.isDark(m,f)&&(Y+=1),B.isDark(m+1,f)&&(Y+=1),B.isDark(m,f+1)&&(Y+=1),B.isDark(m+1,f+1)&&(Y+=1),Y!=0&&Y!=4||(T+=3)}for(m=0;m<k;m+=1)for(f=0;f<k-6;f+=1)B.isDark(m,f)&&!B.isDark(m,f+1)&&B.isDark(m,f+2)&&B.isDark(m,f+3)&&B.isDark(m,f+4)&&!B.isDark(m,f+5)&&B.isDark(m,f+6)&&(T+=40);for(f=0;f<k;f+=1)for(m=0;m<k-6;m+=1)B.isDark(m,f)&&!B.isDark(m+1,f)&&B.isDark(m+2,f)&&B.isDark(m+3,f)&&B.isDark(m+4,f)&&!B.isDark(m+5,f)&&B.isDark(m+6,f)&&(T+=40);var Q=0;for(f=0;f<k;f+=1)for(m=0;m<k;m+=1)B.isDark(m,f)&&(Q+=1);return T+Math.abs(100*Q/k/k-50)/5*10},E),K=function(){for(var B=new Array(256),k=new Array(256),T=0;T<8;T+=1)B[T]=1<<T;for(T=8;T<256;T+=1)B[T]=B[T-4]^B[T-5]^B[T-6]^B[T-8];for(T=0;T<255;T+=1)k[B[T]]=T;return{glog:function(m){if(m<1)throw"glog("+m+")";return k[m]},gexp:function(m){for(;m<0;)m+=255;for(;m>=256;)m-=255;return B[m]}}}();function le(B,k){if(B.length===void 0)throw B.length+"/"+k;var T=function(){for(var f=0;f<B.length&&B[f]==0;)f+=1;for(var w=new Array(B.length-f+k),p=0;p<B.length-f;p+=1)w[p]=B[p+f];return w}(),m={getAt:function(f){return T[f]},getLength:function(){return T.length},multiply:function(f){for(var w=new Array(m.getLength()+f.getLength()-1),p=0;p<m.getLength();p+=1)for(var g=0;g<f.getLength();g+=1)w[p+g]^=K.gexp(K.glog(m.getAt(p))+K.glog(f.getAt(g)));return le(w,0)},mod:function(f){if(m.getLength()-f.getLength()<0)return m;for(var w=K.glog(m.getAt(0))-K.glog(f.getAt(0)),p=new Array(m.getLength()),g=0;g<m.getLength();g+=1)p[g]=m.getAt(g);for(g=0;g<f.getLength();g+=1)p[g]^=K.gexp(K.glog(f.getAt(g))+w);return le(p,0).mod(f)}};return m}var G=function(){var B=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],k=function(m,f){var w={};return w.totalCount=m,w.dataCount=f,w},T={getRSBlocks:function(m,f){var w=function(we,X){switch(X){case ee.L:return B[4*(we-1)+0];case ee.M:return B[4*(we-1)+1];case ee.Q:return B[4*(we-1)+2];case ee.H:return B[4*(we-1)+3];default:return}}(m,f);if(w===void 0)throw"bad rs block @ typeNumber:"+m+"/errorCorrectionLevel:"+f;for(var p=w.length/3,g=[],O=0;O<p;O+=1)for(var Y=w[3*O+0],Q=w[3*O+1],fe=w[3*O+2],de=0;de<Y;de+=1)g.push(k(Q,fe));return g}};return T}(),ue=function(){var B=[],k=0,T={getBuffer:function(){return B},getAt:function(m){var f=Math.floor(m/8);return(B[f]>>>7-m%8&1)==1},put:function(m,f){for(var w=0;w<f;w+=1)T.putBit((m>>>f-w-1&1)==1)},getLengthInBits:function(){return k},putBit:function(m){var f=Math.floor(k/8);B.length<=f&&B.push(0),m&&(B[f]|=128>>>k%8),k+=1}};return T},V=function(B){var k=B,T={getMode:function(){return 1},getLength:function(w){return k.length},write:function(w){for(var p=k,g=0;g+2<p.length;)w.put(m(p.substring(g,g+3)),10),g+=3;g<p.length&&(p.length-g==1?w.put(m(p.substring(g,g+1)),4):p.length-g==2&&w.put(m(p.substring(g,g+2)),7))}},m=function(w){for(var p=0,g=0;g<w.length;g+=1)p=10*p+f(w.charAt(g));return p},f=function(w){if("0"<=w&&w<="9")return w.charCodeAt(0)-48;throw"illegal char :"+w};return T},ae=function(B){var k=B,T={getMode:function(){return 2},getLength:function(f){return k.length},write:function(f){for(var w=k,p=0;p+1<w.length;)f.put(45*m(w.charAt(p))+m(w.charAt(p+1)),11),p+=2;p<w.length&&f.put(m(w.charAt(p)),6)}},m=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;if("A"<=f&&f<="Z")return f.charCodeAt(0)-65+10;switch(f){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+f}};return T},oe=function(B){var k=R.stringToBytes(B);return{getMode:function(){return 4},getLength:function(T){return k.length},write:function(T){for(var m=0;m<k.length;m+=1)T.put(k[m],8)}}},pe=function(B){var k=R.stringToBytesFuncs.SJIS;if(!k)throw"sjis not supported.";(function(){var f=k("友");if(f.length!=2||(f[0]<<8|f[1])!=38726)throw"sjis not supported."})();var T=k(B),m={getMode:function(){return 8},getLength:function(f){return~~(T.length/2)},write:function(f){for(var w=T,p=0;p+1<w.length;){var g=(255&w[p])<<8|255&w[p+1];if(33088<=g&&g<=40956)g-=33088;else{if(!(57408<=g&&g<=60351))throw"illegal char at "+(p+1)+"/"+g;g-=49472}g=192*(g>>>8&255)+(255&g),f.put(g,13),p+=2}if(p<w.length)throw"illegal char at "+(p+1)}};return m},re=function(){var B=[],k={writeByte:function(T){B.push(255&T)},writeShort:function(T){k.writeByte(T),k.writeByte(T>>>8)},writeBytes:function(T,m,f){m=m||0,f=f||T.length;for(var w=0;w<f;w+=1)k.writeByte(T[w+m])},writeString:function(T){for(var m=0;m<T.length;m+=1)k.writeByte(T.charCodeAt(m))},toByteArray:function(){return B},toString:function(){var T="";T+="[";for(var m=0;m<B.length;m+=1)m>0&&(T+=","),T+=B[m];return T+"]"}};return k},Ce=function(B){var k=B,T=0,m=0,f=0,w={read:function(){for(;f<8;){if(T>=k.length){if(f==0)return-1;throw"unexpected end of file./"+f}var g=k.charAt(T);if(T+=1,g=="=")return f=0,-1;g.match(/^\s$/)||(m=m<<6|p(g.charCodeAt(0)),f+=6)}var O=m>>>f-8&255;return f-=8,O}},p=function(g){if(65<=g&&g<=90)return g-65;if(97<=g&&g<=122)return g-97+26;if(48<=g&&g<=57)return g-48+52;if(g==43)return 62;if(g==47)return 63;throw"c:"+g};return w},Oe=function(B,k,T){for(var m=function(Q,fe){var de=Q,we=fe,X=new Array(Q*fe),ce={setPixel:function(U,q,W){X[q*de+U]=W},write:function(U){U.writeString("GIF87a"),U.writeShort(de),U.writeShort(we),U.writeByte(128),U.writeByte(0),U.writeByte(0),U.writeByte(0),U.writeByte(0),U.writeByte(0),U.writeByte(255),U.writeByte(255),U.writeByte(255),U.writeString(","),U.writeShort(0),U.writeShort(0),U.writeShort(de),U.writeShort(we),U.writeByte(0);var q=Ae(2);U.writeByte(2);for(var W=0;q.length-W>255;)U.writeByte(255),U.writeBytes(q,W,255),W+=255;U.writeByte(q.length-W),U.writeBytes(q,W,q.length-W),U.writeByte(0),U.writeString(";")}},Ae=function(U){for(var q=1<<U,W=1+(1<<U),J=U+1,se=be(),Te=0;Te<q;Te+=1)se.add(String.fromCharCode(Te));se.add(String.fromCharCode(q)),se.add(String.fromCharCode(W));var u,c,_,$=re(),j=(u=$,c=0,_=0,{write:function(Re,Se){if(Re>>>Se)throw"length over";for(;c+Se>=8;)u.writeByte(255&(Re<<c|_)),Se-=8-c,Re>>>=8-c,_=0,c=0;_|=Re<<c,c+=Se},flush:function(){c>0&&u.writeByte(_)}});j.write(q,J);var te=0,xe=String.fromCharCode(X[te]);for(te+=1;te<X.length;){var De=String.fromCharCode(X[te]);te+=1,se.contains(xe+De)?xe+=De:(j.write(se.indexOf(xe),J),se.size()<4095&&(se.size()==1<<J&&(J+=1),se.add(xe+De)),xe=De)}return j.write(se.indexOf(xe),J),j.write(W,J),j.flush(),$.toByteArray()},be=function(){var U={},q=0,W={add:function(J){if(W.contains(J))throw"dup key:"+J;U[J]=q,q+=1},size:function(){return q},indexOf:function(J){return U[J]},contains:function(J){return U[J]!==void 0}};return W};return ce}(B,k),f=0;f<k;f+=1)for(var w=0;w<B;w+=1)m.setPixel(w,f,T(w,f));var p=re();m.write(p);for(var g=function(){var Q=0,fe=0,de=0,we="",X={},ce=function(be){we+=String.fromCharCode(Ae(63&be))},Ae=function(be){if(!(be<0)){if(be<26)return 65+be;if(be<52)return be-26+97;if(be<62)return be-52+48;if(be==62)return 43;if(be==63)return 47}throw"n:"+be};return X.writeByte=function(be){for(Q=Q<<8|255&be,fe+=8,de+=1;fe>=6;)ce(Q>>>fe-6),fe-=6},X.flush=function(){if(fe>0&&(ce(Q<<6-fe),Q=0,fe=0),de%3!=0)for(var be=3-de%3,U=0;U<be;U+=1)we+="="},X.toString=function(){return we},X}(),O=p.toByteArray(),Y=0;Y<O.length;Y+=1)g.writeByte(O[Y]);return g.flush(),"data:image/gif;base64,"+g};return R}();A.stringToBytesFuncs["UTF-8"]=function(R){return function(I){for(var L=[],D=0;D<I.length;D++){var E=I.charCodeAt(D);E<128?L.push(E):E<2048?L.push(192|E>>6,128|63&E):E<55296||E>=57344?L.push(224|E>>12,128|E>>6&63,128|63&E):(D++,E=65536+((1023&E)<<10|1023&I.charCodeAt(D)),L.push(240|E>>18,128|E>>12&63,128|E>>6&63,128|63&E))}return L}(R)},(C=typeof(b=function(){return A})=="function"?b.apply(d,[]):b)===void 0||(h.exports=C)}},s={};function l(h){var d=s[h];if(d!==void 0)return d.exports;var b=s[h]={exports:{}};return r[h](b,b.exports,l),b.exports}l.n=h=>{var d=h&&h.__esModule?()=>h.default:()=>h;return l.d(d,{a:d}),d},l.d=(h,d)=>{for(var b in d)l.o(d,b)&&!l.o(h,b)&&Object.defineProperty(h,b,{enumerable:!0,get:d[b]})},l.o=(h,d)=>Object.prototype.hasOwnProperty.call(h,d);var v={};return(()=>{l.d(v,{default:()=>k});const h=T=>!!T&&typeof T=="object"&&!Array.isArray(T);function d(T,...m){if(!m.length)return T;const f=m.shift();return f!==void 0&&h(T)&&h(f)?(T=Object.assign({},T),Object.keys(f).forEach(w=>{const p=T[w],g=f[w];Array.isArray(p)&&Array.isArray(g)?T[w]=g:h(p)&&h(g)?T[w]=d(Object.assign({},p),g):T[w]=g}),d(T,...m)):T}function b(T,m){const f=document.createElement("a");f.download=m,f.href=T,document.body.appendChild(f),f.click(),document.body.removeChild(f)}const C={L:.07,M:.15,Q:.25,H:.3};class A{constructor({svg:m,type:f,window:w}){this._svg=m,this._type=f,this._window=w}draw(m,f,w,p){let g;switch(this._type){case"dots":g=this._drawDot;break;case"classy":g=this._drawClassy;break;case"classy-rounded":g=this._drawClassyRounded;break;case"rounded":g=this._drawRounded;break;case"extra-rounded":g=this._drawExtraRounded;break;default:g=this._drawSquare}g.call(this,{x:m,y:f,size:w,getNeighbor:p})}_rotateFigure({x:m,y:f,size:w,rotation:p=0,draw:g}){var O;const Y=m+w/2,Q=f+w/2;g(),(O=this._element)===null||O===void 0||O.setAttribute("transform",`rotate(${180*p/Math.PI},${Y},${Q})`)}_basicDot(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+f/2)),this._element.setAttribute("cy",String(p+f/2)),this._element.setAttribute("r",String(f/2))}}))}_basicSquare(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(p)),this._element.setAttribute("width",String(f)),this._element.setAttribute("height",String(f))}}))}_basicSideRounded(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${p}v ${f}h `+f/2+`a ${f/2} ${f/2}, 0, 0, 0, 0 ${-f}`)}}))}_basicCornerRounded(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${p}v ${f}h ${f}v `+-f/2+`a ${f/2} ${f/2}, 0, 0, 0, ${-f/2} ${-f/2}`)}}))}_basicCornerExtraRounded(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${p}v ${f}h ${f}a ${f} ${f}, 0, 0, 0, ${-f} ${-f}`)}}))}_basicCornersRounded(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${w} ${p}v `+f/2+`a ${f/2} ${f/2}, 0, 0, 0, ${f/2} ${f/2}h `+f/2+"v "+-f/2+`a ${f/2} ${f/2}, 0, 0, 0, ${-f/2} ${-f/2}`)}}))}_drawDot({x:m,y:f,size:w}){this._basicDot({x:m,y:f,size:w,rotation:0})}_drawSquare({x:m,y:f,size:w}){this._basicSquare({x:m,y:f,size:w,rotation:0})}_drawRounded({x:m,y:f,size:w,getNeighbor:p}){const g=p?+p(-1,0):0,O=p?+p(1,0):0,Y=p?+p(0,-1):0,Q=p?+p(0,1):0,fe=g+O+Y+Q;if(fe!==0)if(fe>2||g&&O||Y&&Q)this._basicSquare({x:m,y:f,size:w,rotation:0});else{if(fe===2){let de=0;return g&&Y?de=Math.PI/2:Y&&O?de=Math.PI:O&&Q&&(de=-Math.PI/2),void this._basicCornerRounded({x:m,y:f,size:w,rotation:de})}if(fe===1){let de=0;return Y?de=Math.PI/2:O?de=Math.PI:Q&&(de=-Math.PI/2),void this._basicSideRounded({x:m,y:f,size:w,rotation:de})}}else this._basicDot({x:m,y:f,size:w,rotation:0})}_drawExtraRounded({x:m,y:f,size:w,getNeighbor:p}){const g=p?+p(-1,0):0,O=p?+p(1,0):0,Y=p?+p(0,-1):0,Q=p?+p(0,1):0,fe=g+O+Y+Q;if(fe!==0)if(fe>2||g&&O||Y&&Q)this._basicSquare({x:m,y:f,size:w,rotation:0});else{if(fe===2){let de=0;return g&&Y?de=Math.PI/2:Y&&O?de=Math.PI:O&&Q&&(de=-Math.PI/2),void this._basicCornerExtraRounded({x:m,y:f,size:w,rotation:de})}if(fe===1){let de=0;return Y?de=Math.PI/2:O?de=Math.PI:Q&&(de=-Math.PI/2),void this._basicSideRounded({x:m,y:f,size:w,rotation:de})}}else this._basicDot({x:m,y:f,size:w,rotation:0})}_drawClassy({x:m,y:f,size:w,getNeighbor:p}){const g=p?+p(-1,0):0,O=p?+p(1,0):0,Y=p?+p(0,-1):0,Q=p?+p(0,1):0;g+O+Y+Q!==0?g||Y?O||Q?this._basicSquare({x:m,y:f,size:w,rotation:0}):this._basicCornerRounded({x:m,y:f,size:w,rotation:Math.PI/2}):this._basicCornerRounded({x:m,y:f,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:m,y:f,size:w,rotation:Math.PI/2})}_drawClassyRounded({x:m,y:f,size:w,getNeighbor:p}){const g=p?+p(-1,0):0,O=p?+p(1,0):0,Y=p?+p(0,-1):0,Q=p?+p(0,1):0;g+O+Y+Q!==0?g||Y?O||Q?this._basicSquare({x:m,y:f,size:w,rotation:0}):this._basicCornerExtraRounded({x:m,y:f,size:w,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:m,y:f,size:w,rotation:-Math.PI/2}):this._basicCornersRounded({x:m,y:f,size:w,rotation:Math.PI/2})}}const R={dot:"dot",square:"square",extraRounded:"extra-rounded"},I=Object.values(R);class L{constructor({svg:m,type:f,window:w}){this._svg=m,this._type=f,this._window=w}draw(m,f,w,p){let g;switch(this._type){case R.square:g=this._drawSquare;break;case R.extraRounded:g=this._drawExtraRounded;break;default:g=this._drawDot}g.call(this,{x:m,y:f,size:w,rotation:p})}_rotateFigure({x:m,y:f,size:w,rotation:p=0,draw:g}){var O;const Y=m+w/2,Q=f+w/2;g(),(O=this._element)===null||O===void 0||O.setAttribute("transform",`rotate(${180*p/Math.PI},${Y},${Q})`)}_basicDot(m){const{size:f,x:w,y:p}=m,g=f/7;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w+f/2} ${p}a ${f/2} ${f/2} 0 1 0 0.1 0zm 0 ${g}a ${f/2-g} ${f/2-g} 0 1 1 -0.1 0Z`)}}))}_basicSquare(m){const{size:f,x:w,y:p}=m,g=f/7;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${p}v ${f}h ${f}v `+-f+`zM ${w+g} ${p+g}h `+(f-2*g)+"v "+(f-2*g)+"h "+(2*g-f)+"z")}}))}_basicExtraRounded(m){const{size:f,x:w,y:p}=m,g=f/7;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${w} ${p+2.5*g}v `+2*g+`a ${2.5*g} ${2.5*g}, 0, 0, 0, ${2.5*g} ${2.5*g}h `+2*g+`a ${2.5*g} ${2.5*g}, 0, 0, 0, ${2.5*g} ${2.5*-g}v `+-2*g+`a ${2.5*g} ${2.5*g}, 0, 0, 0, ${2.5*-g} ${2.5*-g}h `+-2*g+`a ${2.5*g} ${2.5*g}, 0, 0, 0, ${2.5*-g} ${2.5*g}M ${w+2.5*g} ${p+g}h `+2*g+`a ${1.5*g} ${1.5*g}, 0, 0, 1, ${1.5*g} ${1.5*g}v `+2*g+`a ${1.5*g} ${1.5*g}, 0, 0, 1, ${1.5*-g} ${1.5*g}h `+-2*g+`a ${1.5*g} ${1.5*g}, 0, 0, 1, ${1.5*-g} ${1.5*-g}v `+-2*g+`a ${1.5*g} ${1.5*g}, 0, 0, 1, ${1.5*g} ${1.5*-g}`)}}))}_drawDot({x:m,y:f,size:w,rotation:p}){this._basicDot({x:m,y:f,size:w,rotation:p})}_drawSquare({x:m,y:f,size:w,rotation:p}){this._basicSquare({x:m,y:f,size:w,rotation:p})}_drawExtraRounded({x:m,y:f,size:w,rotation:p}){this._basicExtraRounded({x:m,y:f,size:w,rotation:p})}}const D={dot:"dot",square:"square"},E=Object.values(D);class N{constructor({svg:m,type:f,window:w}){this._svg=m,this._type=f,this._window=w}draw(m,f,w,p){let g;g=this._type===D.square?this._drawSquare:this._drawDot,g.call(this,{x:m,y:f,size:w,rotation:p})}_rotateFigure({x:m,y:f,size:w,rotation:p=0,draw:g}){var O;const Y=m+w/2,Q=f+w/2;g(),(O=this._element)===null||O===void 0||O.setAttribute("transform",`rotate(${180*p/Math.PI},${Y},${Q})`)}_basicDot(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(w+f/2)),this._element.setAttribute("cy",String(p+f/2)),this._element.setAttribute("r",String(f/2))}}))}_basicSquare(m){const{size:f,x:w,y:p}=m;this._rotateFigure(Object.assign(Object.assign({},m),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(w)),this._element.setAttribute("y",String(p)),this._element.setAttribute("width",String(f)),this._element.setAttribute("height",String(f))}}))}_drawDot({x:m,y:f,size:w,rotation:p}){this._basicDot({x:m,y:f,size:w,rotation:p})}_drawSquare({x:m,y:f,size:w,rotation:p}){this._basicSquare({x:m,y:f,size:w,rotation:p})}}const ee="circle",ne=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],K=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class le{constructor(m,f){this._roundSize=w=>this._options.dotsOptions.roundSize?Math.floor(w):w,this._window=f,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(m.width)),this._element.setAttribute("height",String(m.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),m.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${m.width} ${m.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=m.image,this._instanceId=le.instanceCount++,this._options=m}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(m){const f=m.getModuleCount(),w=Math.min(this._options.width,this._options.height)-2*this._options.margin,p=this._options.shape===ee?w/Math.sqrt(2):w,g=this._roundSize(p/f);let O={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=m,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:Y,qrOptions:Q}=this._options,fe=Y.imageSize*C[Q.errorCorrectionLevel],de=Math.floor(fe*f*f);O=function({originalHeight:we,originalWidth:X,maxHiddenDots:ce,maxHiddenAxisDots:Ae,dotSize:be}){const U={x:0,y:0},q={x:0,y:0};if(we<=0||X<=0||ce<=0||be<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const W=we/X;return U.x=Math.floor(Math.sqrt(ce/W)),U.x<=0&&(U.x=1),Ae&&Ae<U.x&&(U.x=Ae),U.x%2==0&&U.x--,q.x=U.x*be,U.y=1+2*Math.ceil((U.x*W-1)/2),q.y=Math.round(q.x*W),(U.y*U.x>ce||Ae&&Ae<U.y)&&(Ae&&Ae<U.y?(U.y=Ae,U.y%2==0&&U.x--):U.y-=2,q.y=U.y*be,U.x=1+2*Math.ceil((U.y/W-1)/2),q.x=Math.round(q.y/W)),{height:q.y,width:q.x,hideYDots:U.y,hideXDots:U.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:de,maxHiddenAxisDots:f-14,dotSize:g})}this.drawBackground(),this.drawDots((Y,Q)=>{var fe,de,we,X,ce,Ae;return!(this._options.imageOptions.hideBackgroundDots&&Y>=(f-O.hideYDots)/2&&Y<(f+O.hideYDots)/2&&Q>=(f-O.hideXDots)/2&&Q<(f+O.hideXDots)/2||!((fe=ne[Y])===null||fe===void 0)&&fe[Q]||!((de=ne[Y-f+7])===null||de===void 0)&&de[Q]||!((we=ne[Y])===null||we===void 0)&&we[Q-f+7]||!((X=K[Y])===null||X===void 0)&&X[Q]||!((ce=K[Y-f+7])===null||ce===void 0)&&ce[Q]||!((Ae=K[Y])===null||Ae===void 0)&&Ae[Q-f+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:O.width,height:O.height,count:f,dotSize:g})}drawBackground(){var m,f,w;const p=this._element,g=this._options;if(p){const O=(m=g.backgroundOptions)===null||m===void 0?void 0:m.gradient,Y=(f=g.backgroundOptions)===null||f===void 0?void 0:f.color;let Q=g.height,fe=g.width;if(O||Y){const de=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((w=g.backgroundOptions)===null||w===void 0)&&w.round&&(Q=fe=Math.min(g.width,g.height),de.setAttribute("rx",String(Q/2*g.backgroundOptions.round))),de.setAttribute("x",String(this._roundSize((g.width-fe)/2))),de.setAttribute("y",String(this._roundSize((g.height-Q)/2))),de.setAttribute("width",String(fe)),de.setAttribute("height",String(Q)),this._backgroundClipPath.appendChild(de),this._createColor({options:O,color:Y,additionalRotation:0,x:0,y:0,height:g.height,width:g.width,name:`background-color-${this._instanceId}`})}}}drawDots(m){var f,w;if(!this._qr)throw"QR code is not defined";const p=this._options,g=this._qr.getModuleCount();if(g>p.width||g>p.height)throw"The canvas is too small.";const O=Math.min(p.width,p.height)-2*p.margin,Y=p.shape===ee?O/Math.sqrt(2):O,Q=this._roundSize(Y/g),fe=this._roundSize((p.width-g*Q)/2),de=this._roundSize((p.height-g*Q)/2),we=new A({svg:this._element,type:p.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(f=p.dotsOptions)===null||f===void 0?void 0:f.gradient,color:p.dotsOptions.color,additionalRotation:0,x:0,y:0,height:p.height,width:p.width,name:`dot-color-${this._instanceId}`});for(let X=0;X<g;X++)for(let ce=0;ce<g;ce++)m&&!m(X,ce)||!((w=this._qr)===null||w===void 0)&&w.isDark(X,ce)&&(we.draw(fe+ce*Q,de+X*Q,Q,(Ae,be)=>!(ce+Ae<0||X+be<0||ce+Ae>=g||X+be>=g)&&!(m&&!m(X+be,ce+Ae))&&!!this._qr&&this._qr.isDark(X+be,ce+Ae)),we._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(we._element));if(p.shape===ee){const X=this._roundSize((O/Q-g)/2),ce=g+2*X,Ae=fe-X*Q,be=de-X*Q,U=[],q=this._roundSize(ce/2);for(let W=0;W<ce;W++){U[W]=[];for(let J=0;J<ce;J++)W>=X-1&&W<=ce-X&&J>=X-1&&J<=ce-X||Math.sqrt((W-q)*(W-q)+(J-q)*(J-q))>q?U[W][J]=0:U[W][J]=this._qr.isDark(J-2*X<0?J:J>=g?J-2*X:J-X,W-2*X<0?W:W>=g?W-2*X:W-X)?1:0}for(let W=0;W<ce;W++)for(let J=0;J<ce;J++)U[W][J]&&(we.draw(Ae+J*Q,be+W*Q,Q,(se,Te)=>{var u;return!!(!((u=U[W+Te])===null||u===void 0)&&u[J+se])}),we._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(we._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const m=this._element,f=this._options;if(!m)throw"Element code is not defined";const w=this._qr.getModuleCount(),p=Math.min(f.width,f.height)-2*f.margin,g=f.shape===ee?p/Math.sqrt(2):p,O=this._roundSize(g/w),Y=7*O,Q=3*O,fe=this._roundSize((f.width-w*O)/2),de=this._roundSize((f.height-w*O)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([we,X,ce])=>{var Ae,be,U,q,W,J,se,Te,u,c,_,$,j,te;const xe=fe+we*O*(w-7),De=de+X*O*(w-7);let Re=this._dotsClipPath,Se=this._dotsClipPath;if((!((Ae=f.cornersSquareOptions)===null||Ae===void 0)&&Ae.gradient||!((be=f.cornersSquareOptions)===null||be===void 0)&&be.color)&&(Re=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Re.setAttribute("id",`clip-path-corners-square-color-${we}-${X}-${this._instanceId}`),this._defs.appendChild(Re),this._cornersSquareClipPath=this._cornersDotClipPath=Se=Re,this._createColor({options:(U=f.cornersSquareOptions)===null||U===void 0?void 0:U.gradient,color:(q=f.cornersSquareOptions)===null||q===void 0?void 0:q.color,additionalRotation:ce,x:xe,y:De,height:Y,width:Y,name:`corners-square-color-${we}-${X}-${this._instanceId}`})),((W=f.cornersSquareOptions)===null||W===void 0?void 0:W.type)&&I.includes(f.cornersSquareOptions.type)){const ke=new L({svg:this._element,type:f.cornersSquareOptions.type,window:this._window});ke.draw(xe,De,Y,ce),ke._element&&Re&&Re.appendChild(ke._element)}else{const ke=new A({svg:this._element,type:((J=f.cornersSquareOptions)===null||J===void 0?void 0:J.type)||f.dotsOptions.type,window:this._window});for(let $e=0;$e<ne.length;$e++)for(let Le=0;Le<ne[$e].length;Le++)!((se=ne[$e])===null||se===void 0)&&se[Le]&&(ke.draw(xe+Le*O,De+$e*O,O,(Ke,Ge)=>{var ot;return!!(!((ot=ne[$e+Ge])===null||ot===void 0)&&ot[Le+Ke])}),ke._element&&Re&&Re.appendChild(ke._element))}if((!((Te=f.cornersDotOptions)===null||Te===void 0)&&Te.gradient||!((u=f.cornersDotOptions)===null||u===void 0)&&u.color)&&(Se=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Se.setAttribute("id",`clip-path-corners-dot-color-${we}-${X}-${this._instanceId}`),this._defs.appendChild(Se),this._cornersDotClipPath=Se,this._createColor({options:(c=f.cornersDotOptions)===null||c===void 0?void 0:c.gradient,color:(_=f.cornersDotOptions)===null||_===void 0?void 0:_.color,additionalRotation:ce,x:xe+2*O,y:De+2*O,height:Q,width:Q,name:`corners-dot-color-${we}-${X}-${this._instanceId}`})),(($=f.cornersDotOptions)===null||$===void 0?void 0:$.type)&&E.includes(f.cornersDotOptions.type)){const ke=new N({svg:this._element,type:f.cornersDotOptions.type,window:this._window});ke.draw(xe+2*O,De+2*O,Q,ce),ke._element&&Se&&Se.appendChild(ke._element)}else{const ke=new A({svg:this._element,type:((j=f.cornersDotOptions)===null||j===void 0?void 0:j.type)||f.dotsOptions.type,window:this._window});for(let $e=0;$e<K.length;$e++)for(let Le=0;Le<K[$e].length;Le++)!((te=K[$e])===null||te===void 0)&&te[Le]&&(ke.draw(xe+Le*O,De+$e*O,O,(Ke,Ge)=>{var ot;return!!(!((ot=K[$e+Ge])===null||ot===void 0)&&ot[Le+Ke])}),ke._element&&Se&&Se.appendChild(ke._element))}})}loadImage(){return new Promise((m,f)=>{var w;const p=this._options;if(!p.image)return f("Image is not defined");if(!((w=p.nodeCanvas)===null||w===void 0)&&w.loadImage)p.nodeCanvas.loadImage(p.image).then(g=>{var O,Y;if(this._image=g,this._options.imageOptions.saveAsBlob){const Q=(O=p.nodeCanvas)===null||O===void 0?void 0:O.createCanvas(this._image.width,this._image.height);(Y=Q==null?void 0:Q.getContext("2d"))===null||Y===void 0||Y.drawImage(g,0,0),this._imageUri=Q==null?void 0:Q.toDataURL()}m()}).catch(f);else{const g=new this._window.Image;typeof p.imageOptions.crossOrigin=="string"&&(g.crossOrigin=p.imageOptions.crossOrigin),this._image=g,g.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await async function(O,Y){return new Promise(Q=>{const fe=new Y.XMLHttpRequest;fe.onload=function(){const de=new Y.FileReader;de.onloadend=function(){Q(de.result)},de.readAsDataURL(fe.response)},fe.open("GET",O),fe.responseType="blob",fe.send()})}(p.image||"",this._window)),m()},g.src=p.image}})}async drawImage({width:m,height:f,count:w,dotSize:p}){const g=this._options,O=this._roundSize((g.width-w*p)/2),Y=this._roundSize((g.height-w*p)/2),Q=O+this._roundSize(g.imageOptions.margin+(w*p-m)/2),fe=Y+this._roundSize(g.imageOptions.margin+(w*p-f)/2),de=m-2*g.imageOptions.margin,we=f-2*g.imageOptions.margin,X=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");X.setAttribute("href",this._imageUri||""),X.setAttribute("x",String(Q)),X.setAttribute("y",String(fe)),X.setAttribute("width",`${de}px`),X.setAttribute("height",`${we}px`),this._element.appendChild(X)}_createColor({options:m,color:f,additionalRotation:w,x:p,y:g,height:O,width:Y,name:Q}){const fe=Y>O?Y:O,de=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(de.setAttribute("x",String(p)),de.setAttribute("y",String(g)),de.setAttribute("height",String(O)),de.setAttribute("width",String(Y)),de.setAttribute("clip-path",`url('#clip-path-${Q}')`),m){let we;if(m.type==="radial")we=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),we.setAttribute("id",Q),we.setAttribute("gradientUnits","userSpaceOnUse"),we.setAttribute("fx",String(p+Y/2)),we.setAttribute("fy",String(g+O/2)),we.setAttribute("cx",String(p+Y/2)),we.setAttribute("cy",String(g+O/2)),we.setAttribute("r",String(fe/2));else{const X=((m.rotation||0)+w)%(2*Math.PI),ce=(X+2*Math.PI)%(2*Math.PI);let Ae=p+Y/2,be=g+O/2,U=p+Y/2,q=g+O/2;ce>=0&&ce<=.25*Math.PI||ce>1.75*Math.PI&&ce<=2*Math.PI?(Ae-=Y/2,be-=O/2*Math.tan(X),U+=Y/2,q+=O/2*Math.tan(X)):ce>.25*Math.PI&&ce<=.75*Math.PI?(be-=O/2,Ae-=Y/2/Math.tan(X),q+=O/2,U+=Y/2/Math.tan(X)):ce>.75*Math.PI&&ce<=1.25*Math.PI?(Ae+=Y/2,be+=O/2*Math.tan(X),U-=Y/2,q-=O/2*Math.tan(X)):ce>1.25*Math.PI&&ce<=1.75*Math.PI&&(be+=O/2,Ae+=Y/2/Math.tan(X),q-=O/2,U-=Y/2/Math.tan(X)),we=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),we.setAttribute("id",Q),we.setAttribute("gradientUnits","userSpaceOnUse"),we.setAttribute("x1",String(Math.round(Ae))),we.setAttribute("y1",String(Math.round(be))),we.setAttribute("x2",String(Math.round(U))),we.setAttribute("y2",String(Math.round(q)))}m.colorStops.forEach(({offset:X,color:ce})=>{const Ae=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");Ae.setAttribute("offset",100*X+"%"),Ae.setAttribute("stop-color",ce),we.appendChild(Ae)}),de.setAttribute("fill",`url('#${Q}')`),this._defs.appendChild(we)}else f&&de.setAttribute("fill",f);this._element.appendChild(de)}}le.instanceCount=0;const G=le,ue="canvas",V={};for(let T=0;T<=40;T++)V[T]=T;const ae={type:ue,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:V[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function oe(T){const m=Object.assign({},T);if(!m.colorStops||!m.colorStops.length)throw"Field 'colorStops' is required in gradient";return m.rotation?m.rotation=Number(m.rotation):m.rotation=0,m.colorStops=m.colorStops.map(f=>Object.assign(Object.assign({},f),{offset:Number(f.offset)})),m}function pe(T){const m=Object.assign({},T);return m.width=Number(m.width),m.height=Number(m.height),m.margin=Number(m.margin),m.imageOptions=Object.assign(Object.assign({},m.imageOptions),{hideBackgroundDots:!!m.imageOptions.hideBackgroundDots,imageSize:Number(m.imageOptions.imageSize),margin:Number(m.imageOptions.margin)}),m.margin>Math.min(m.width,m.height)&&(m.margin=Math.min(m.width,m.height)),m.dotsOptions=Object.assign({},m.dotsOptions),m.dotsOptions.gradient&&(m.dotsOptions.gradient=oe(m.dotsOptions.gradient)),m.cornersSquareOptions&&(m.cornersSquareOptions=Object.assign({},m.cornersSquareOptions),m.cornersSquareOptions.gradient&&(m.cornersSquareOptions.gradient=oe(m.cornersSquareOptions.gradient))),m.cornersDotOptions&&(m.cornersDotOptions=Object.assign({},m.cornersDotOptions),m.cornersDotOptions.gradient&&(m.cornersDotOptions.gradient=oe(m.cornersDotOptions.gradient))),m.backgroundOptions&&(m.backgroundOptions=Object.assign({},m.backgroundOptions),m.backgroundOptions.gradient&&(m.backgroundOptions.gradient=oe(m.backgroundOptions.gradient))),m}var re=l(873),Ce=l.n(re);function Oe(T){if(!T)throw new Error("Extension must be defined");T[0]==="."&&(T=T.substring(1));const m={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[T.toLowerCase()];if(!m)throw new Error(`Extension "${T}" is not supported`);return m}class B{constructor(m){m!=null&&m.jsdom?this._window=new m.jsdom("",{resources:"usable"}).window:this._window=window,this._options=m?pe(d(ae,m)):ae,this.update()}static _clearContainer(m){m&&(m.innerHTML="")}_setupSvg(){if(!this._qr)return;const m=new G(this._options,this._window);this._svg=m.getElement(),this._svgDrawingPromise=m.drawQR(this._qr).then(()=>{var f;this._svg&&((f=this._extension)===null||f===void 0||f.call(this,m.getElement(),this._options))})}_setupCanvas(){var m,f;this._qr&&(!((m=this._options.nodeCanvas)===null||m===void 0)&&m.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(f=this._svgDrawingPromise)===null||f===void 0?void 0:f.then(()=>{var w;if(!this._svg)return;const p=this._svg,g=new this._window.XMLSerializer().serializeToString(p),O=btoa(g),Y=`data:${Oe("svg")};base64,${O}`;if(!((w=this._options.nodeCanvas)===null||w===void 0)&&w.loadImage)return this._options.nodeCanvas.loadImage(Y).then(Q=>{var fe,de;Q.width=this._options.width,Q.height=this._options.height,(de=(fe=this._nodeCanvas)===null||fe===void 0?void 0:fe.getContext("2d"))===null||de===void 0||de.drawImage(Q,0,0)});{const Q=new this._window.Image;return new Promise(fe=>{Q.onload=()=>{var de,we;(we=(de=this._domCanvas)===null||de===void 0?void 0:de.getContext("2d"))===null||we===void 0||we.drawImage(Q,0,0),fe()},Q.src=Y})}}))}async _getElement(m="png"){if(!this._qr)throw"QR code is empty";return m.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(m){B._clearContainer(this._container),this._options=m?pe(d(this._options,m)):this._options,this._options.data&&(this._qr=Ce()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(f){switch(!0){case/^[0-9]*$/.test(f):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(f):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===ue?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(m){if(m){if(typeof m.appendChild!="function")throw"Container should be a single DOM node";this._options.type===ue?this._domCanvas&&m.appendChild(this._domCanvas):this._svg&&m.appendChild(this._svg),this._container=m}}applyExtension(m){if(!m)throw"Extension function should be defined.";this._extension=m,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(m="png"){if(!this._qr)throw"QR code is empty";const f=await this._getElement(m),w=Oe(m);if(!f)return null;if(m.toLowerCase()==="svg"){const p=`<?xml version="1.0" standalone="no"?>\r
|
|
116
116
|
${new this._window.XMLSerializer().serializeToString(f)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(p):new Blob([p],{type:w})}return new Promise(p=>{const g=f;if("toBuffer"in g)if(w==="image/png")p(g.toBuffer(w));else if(w==="image/jpeg")p(g.toBuffer(w));else{if(w!=="application/pdf")throw Error("Unsupported extension");p(g.toBuffer(w))}else"toBlob"in g&&g.toBlob(p,w,1)})}async download(m){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let f="png",w="qr";typeof m=="string"?(f=m,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof m=="object"&&m!==null&&(m.name&&(w=m.name),m.extension&&(f=m.extension));const p=await this._getElement(f);if(p)if(f.toLowerCase()==="svg"){let g=new XMLSerializer().serializeToString(p);g=`<?xml version="1.0" standalone="no"?>\r
|
|
117
|
-
`+g,b(`data:${Oe(f)};charset=utf-8,${encodeURIComponent(g)}`,`${w}.svg`)}else b(p.toDataURL(Oe(f)),`${w}.${f}`)}}const k=B})(),v.default})())}(Sa)),Sa.exports}Pg();function $g(){const i=localStorage.getItem("a360.assumed-org");return i?{"X-Assume-Org":i}:{}}async function Er(){return{"Content-Type":"application/json",Authorization:`Bearer ${await Cg()??""}`,...$g()}}async function cc(i){return fetch(i,{method:"GET",headers:await Er()}).then(async n=>{if(n.status>=400)throw await n.text();return n}).then(n=>n.json()).then(n=>n)}async function fc(i,n){return fetch(`${i}/${n}`,{method:"GET",headers:await Er()}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.json()).then(r=>r)}async function hc(i,n){await fetch(`${i}/${n}`,{method:"DELETE",headers:await Er()}).then(async r=>{if(r.status>=400)throw await r.text();return r})}async function dc(i,n){return fetch(i,{method:"POST",headers:await Er(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}async function Ng(i,n,r){return fetch(n,{method:i,headers:await Er(),body:r?JSON.stringify(r):void 0}).then(async s=>{if(s.status>=400)throw await s.text();return s}).then(s=>{if(s.status!=204)return s.json()}).then(s=>s)}async function pc(i,n){return fetch(`${i}/${n.id}`,{method:"PUT",headers:await Er(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}function gc(i,n,r){const s=bn.c(11);let l;if(s[0]!==r||s[1]!==n){const d=n.map(Bg);let b;s[3]!==r?(b=r.toString(),s[3]=r,s[4]=b):b=s[4],l=[...d,String(b)],s[0]=r,s[1]=n,s[2]=l}else l=s[2];let v;s[5]!==i||s[6]!==r?(v=()=>fc(i,r),s[5]=i,s[6]=r,s[7]=v):v=s[7];let h;return s[8]!==l||s[9]!==v?(h={queryKey:l,queryFn:v},s[8]=l,s[9]=v,s[10]=h):h=s[10],Al(h)}function Bg(i){return i.toString()}function vc(i,n,r){const s=bn.c(8),l=r===void 0?!0:r;let v;s[0]!==n?(v=[...n.map(jg)],s[0]=n,s[1]=v):v=s[1];let h;s[2]!==i?(h=()=>cc(i),s[2]=i,s[3]=h):h=s[3];let d;return s[4]!==l||s[5]!==v||s[6]!==h?(d={queryKey:v,queryFn:h,enabled:l},s[4]=l,s[5]=v,s[6]=h,s[7]=d):d=s[7],Al(d)}function jg(i){return i.toString()}function mc(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(zg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>dc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Ug)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Ug(i){return i.toString()}function zg(i){return i.toString()}function Ca(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(Wg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>pc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Fg)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Fg(i){return i.toString()}function Wg(i){return i.toString()}function yc(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(qg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>hc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Yg)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Yg(i){return i.toString()}function qg(i){return i.toString()}var Po={exports:{}},Hg=Po.exports,wc;function Gg(){return wc||(wc=1,function(i,n){(function(r,s){i.exports=s()})(Hg,function(){var r=1e3,s=6e4,l=36e5,v="millisecond",h="second",d="minute",b="hour",C="day",A="week",R="month",I="quarter",L="year",D="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ee=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ne={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var k=["th","st","nd","rd"],T=B%100;return"["+B+(k[(T-20)%10]||k[T]||k[0])+"]"}},K=function(B,k,T){var m=String(B);return!m||m.length>=k?B:""+Array(k+1-m.length).join(T)+B},le={s:K,z:function(B){var k=-B.utcOffset(),T=Math.abs(k),m=Math.floor(T/60),f=T%60;return(k<=0?"+":"-")+K(m,2,"0")+":"+K(f,2,"0")},m:function B(k,T){if(k.date()<T.date())return-B(T,k);var m=12*(T.year()-k.year())+(T.month()-k.month()),f=k.clone().add(m,R),w=T-f<0,p=k.clone().add(m+(w?-1:1),R);return+(-(m+(T-f)/(w?f-p:p-f))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:R,y:L,w:A,d:C,D,h:b,m:d,s:h,ms:v,Q:I}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},G="en",ue={};ue[G]=ne;var V="$isDayjsObject",ae=function(B){return B instanceof Ce||!(!B||!B[V])},oe=function B(k,T,m){var f;if(!k)return G;if(typeof k=="string"){var w=k.toLowerCase();ue[w]&&(f=w),T&&(ue[w]=T,f=w);var p=k.split("-");if(!f&&p.length>1)return B(p[0])}else{var g=k.name;ue[g]=k,f=g}return!m&&f&&(G=f),f||!m&&G},pe=function(B,k){if(ae(B))return B.clone();var T=typeof k=="object"?k:{};return T.date=B,T.args=arguments,new Ce(T)},re=le;re.l=oe,re.i=ae,re.w=function(B,k){return pe(B,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var Ce=function(){function B(T){this.$L=oe(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[V]=!0}var k=B.prototype;return k.parse=function(T){this.$d=function(m){var f=m.date,w=m.utc;if(f===null)return new Date(NaN);if(re.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var p=f.match(N);if(p){var g=p[2]-1||0,O=(p[7]||"0").substring(0,3);return w?new Date(Date.UTC(p[1],g,p[3]||1,p[4]||0,p[5]||0,p[6]||0,O)):new Date(p[1],g,p[3]||1,p[4]||0,p[5]||0,p[6]||0,O)}}return new Date(f)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return re},k.isValid=function(){return this.$d.toString()!==E},k.isSame=function(T,m){var f=pe(T);return this.startOf(m)<=f&&f<=this.endOf(m)},k.isAfter=function(T,m){return pe(T)<this.startOf(m)},k.isBefore=function(T,m){return this.endOf(m)<pe(T)},k.$g=function(T,m,f){return re.u(T)?this[m]:this.set(f,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,m){var f=this,w=!!re.u(m)||m,p=re.p(T),g=function(ce,Ae){var be=re.w(f.$u?Date.UTC(f.$y,Ae,ce):new Date(f.$y,Ae,ce),f);return w?be:be.endOf(C)},O=function(ce,Ae){return re.w(f.toDate()[ce].apply(f.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(Ae)),f)},Y=this.$W,Q=this.$M,fe=this.$D,de="set"+(this.$u?"UTC":"");switch(p){case L:return w?g(1,0):g(31,11);case R:return w?g(1,Q):g(0,Q+1);case A:var we=this.$locale().weekStart||0,X=(Y<we?Y+7:Y)-we;return g(w?fe-X:fe+(6-X),Q);case C:case D:return O(de+"Hours",0);case b:return O(de+"Minutes",1);case d:return O(de+"Seconds",2);case h:return O(de+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,m){var f,w=re.p(T),p="set"+(this.$u?"UTC":""),g=(f={},f[C]=p+"Date",f[D]=p+"Date",f[R]=p+"Month",f[L]=p+"FullYear",f[b]=p+"Hours",f[d]=p+"Minutes",f[h]=p+"Seconds",f[v]=p+"Milliseconds",f)[w],O=w===C?this.$D+(m-this.$W):m;if(w===R||w===L){var Y=this.clone().set(D,1);Y.$d[g](O),Y.init(),this.$d=Y.set(D,Math.min(this.$D,Y.daysInMonth())).$d}else g&&this.$d[g](O);return this.init(),this},k.set=function(T,m){return this.clone().$set(T,m)},k.get=function(T){return this[re.p(T)]()},k.add=function(T,m){var f,w=this;T=Number(T);var p=re.p(m),g=function(Q){var fe=pe(w);return re.w(fe.date(fe.date()+Math.round(Q*T)),w)};if(p===R)return this.set(R,this.$M+T);if(p===L)return this.set(L,this.$y+T);if(p===C)return g(1);if(p===A)return g(7);var O=(f={},f[d]=s,f[b]=l,f[h]=r,f)[p]||1,Y=this.$d.getTime()+T*O;return re.w(Y,this)},k.subtract=function(T,m){return this.add(-1*T,m)},k.format=function(T){var m=this,f=this.$locale();if(!this.isValid())return f.invalidDate||E;var w=T||"YYYY-MM-DDTHH:mm:ssZ",p=re.z(this),g=this.$H,O=this.$m,Y=this.$M,Q=f.weekdays,fe=f.months,de=f.meridiem,we=function(Ae,be,U,q){return Ae&&(Ae[be]||Ae(m,w))||U[be].slice(0,q)},X=function(Ae){return re.s(g%12||12,Ae,"0")},ce=de||function(Ae,be,U){var q=Ae<12?"AM":"PM";return U?q.toLowerCase():q};return w.replace(ee,function(Ae,be){return be||function(U){switch(U){case"YY":return String(m.$y).slice(-2);case"YYYY":return re.s(m.$y,4,"0");case"M":return Y+1;case"MM":return re.s(Y+1,2,"0");case"MMM":return we(f.monthsShort,Y,fe,3);case"MMMM":return we(fe,Y);case"D":return m.$D;case"DD":return re.s(m.$D,2,"0");case"d":return String(m.$W);case"dd":return we(f.weekdaysMin,m.$W,Q,2);case"ddd":return we(f.weekdaysShort,m.$W,Q,3);case"dddd":return Q[m.$W];case"H":return String(g);case"HH":return re.s(g,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ce(g,O,!0);case"A":return ce(g,O,!1);case"m":return String(O);case"mm":return re.s(O,2,"0");case"s":return String(m.$s);case"ss":return re.s(m.$s,2,"0");case"SSS":return re.s(m.$ms,3,"0");case"Z":return p}return null}(Ae)||p.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,m,f){var w,p=this,g=re.p(m),O=pe(T),Y=(O.utcOffset()-this.utcOffset())*s,Q=this-O,fe=function(){return re.m(p,O)};switch(g){case L:w=fe()/12;break;case R:w=fe();break;case I:w=fe()/3;break;case A:w=(Q-Y)/6048e5;break;case C:w=(Q-Y)/864e5;break;case b:w=Q/l;break;case d:w=Q/s;break;case h:w=Q/r;break;default:w=Q}return f?w:re.a(w)},k.daysInMonth=function(){return this.endOf(R).$D},k.$locale=function(){return ue[this.$L]},k.locale=function(T,m){if(!T)return this.$L;var f=this.clone(),w=oe(T,m,!0);return w&&(f.$L=w),f},k.clone=function(){return re.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},B}(),Oe=Ce.prototype;return pe.prototype=Oe,[["$ms",v],["$s",h],["$m",d],["$H",b],["$W",C],["$M",R],["$y",L],["$D",D]].forEach(function(B){Oe[B[1]]=function(k){return this.$g(k,B[0],B[1])}}),pe.extend=function(B,k){return B.$i||(B(k,Ce,pe),B.$i=!0),pe},pe.locale=oe,pe.isDayjs=ae,pe.unix=function(B){return pe(1e3*B)},pe.en=ue[G],pe.Ls=ue,pe.p={},pe})}(Po)),Po.exports}var Vg=Gg();const Ie=bo(Vg);function Zg({direction:i,levelIndex:n,rowIndex:r,cellIndex:s,size:l}){switch(i){case"up":return n===0&&r===0?null:r===0?{levelIndex:n-1,rowIndex:s<=l[n-1][l[n-1].length-1]-1?l[n-1].length-1:l[n-1].length-2,cellIndex:s}:{levelIndex:n,rowIndex:r-1,cellIndex:s};case"down":return r===l[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:s}:r===l[n].length-2&&s>=l[n][l[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:s}:{levelIndex:n,rowIndex:r+1,cellIndex:s};case"left":return n===0&&r===0&&s===0?null:r===0&&s===0?{levelIndex:n-1,rowIndex:l[n-1].length-1,cellIndex:l[n-1][l[n-1].length-1]-1}:s===0?{levelIndex:n,rowIndex:r-1,cellIndex:l[n][r-1]-1}:{levelIndex:n,rowIndex:r,cellIndex:s-1};case"right":return r===l[n].length-1&&s===l[n][r]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:s===l[n][r]-1?{levelIndex:n,rowIndex:r+1,cellIndex:0}:{levelIndex:n,rowIndex:r,cellIndex:s+1};default:return{levelIndex:n,rowIndex:r,cellIndex:s}}}function _c({controlsRef:i,direction:n,levelIndex:r,rowIndex:s,cellIndex:l,size:v}){var b,C,A;const h=Zg({direction:n,size:v,rowIndex:s,cellIndex:l,levelIndex:r});if(!h)return;const d=(A=(C=(b=i.current)==null?void 0:b[h.levelIndex])==null?void 0:C[h.rowIndex])==null?void 0:A[h.cellIndex];d&&(d.disabled||d.getAttribute("data-hidden")||d.getAttribute("data-outside")?_c({controlsRef:i,direction:n,levelIndex:h.levelIndex,cellIndex:h.cellIndex,rowIndex:h.rowIndex,size:v}):d.focus())}function Kg(i){switch(i){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Qg(i){var n;return(n=i.current)==null?void 0:n.map(r=>r.map(s=>s.length))}function Aa({controlsRef:i,levelIndex:n,rowIndex:r,cellIndex:s,event:l}){const v=Kg(l.key);if(v){l.preventDefault();const h=Qg(i);_c({controlsRef:i,direction:v,levelIndex:n,rowIndex:r,cellIndex:s,size:h})}}function Jg(i,n){if(!i||!n)return n;const r=i.getHours(),s=i.getMinutes(),l=i.getSeconds(),v=i.getMilliseconds(),h=new Date(n);return h.setHours(r),h.setMinutes(s),h.setSeconds(l),h.setMilliseconds(v),h}var $o={exports:{}},Xg=$o.exports,bc;function e1(){return bc||(bc=1,function(i,n){(function(r,s){i.exports=s()})(Xg,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},s={};return function(l,v,h){var d,b=function(I,L,D){D===void 0&&(D={});var E=new Date(I),N=function(ee,ne){ne===void 0&&(ne={});var K=ne.timeZoneName||"short",le=ee+"|"+K,G=s[le];return G||(G=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:ee,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:K}),s[le]=G),G}(L,D);return N.formatToParts(E)},C=function(I,L){for(var D=b(I,L),E=[],N=0;N<D.length;N+=1){var ee=D[N],ne=ee.type,K=ee.value,le=r[ne];le>=0&&(E[le]=parseInt(K,10))}var G=E[3],ue=G===24?0:G,V=E[0]+"-"+E[1]+"-"+E[2]+" "+ue+":"+E[4]+":"+E[5]+":000",ae=+I;return(h.utc(V).valueOf()-(ae-=ae%1e3))/6e4},A=v.prototype;A.tz=function(I,L){I===void 0&&(I=d);var D,E=this.utcOffset(),N=this.toDate(),ee=N.toLocaleString("en-US",{timeZone:I}),ne=Math.round((N-new Date(ee))/1e3/60),K=15*-Math.round(N.getTimezoneOffset()/15)-ne;if(!Number(K))D=this.utcOffset(0,L);else if(D=h(ee,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(K,!0),L){var le=D.utcOffset();D=D.add(E-le,"minute")}return D.$x.$timezone=I,D},A.offsetName=function(I){var L=this.$x.$timezone||h.tz.guess(),D=b(this.valueOf(),L,{timeZoneName:I}).find(function(E){return E.type.toLowerCase()==="timezonename"});return D&&D.value};var R=A.startOf;A.startOf=function(I,L){if(!this.$x||!this.$x.$timezone)return R.call(this,I,L);var D=h(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return R.call(D,I,L).tz(this.$x.$timezone,!0)},h.tz=function(I,L,D){var E=D&&L,N=D||L||d,ee=C(+h(),N);if(typeof I!="string")return h(I).tz(N);var ne=function(ue,V,ae){var oe=ue-60*V*1e3,pe=C(oe,ae);if(V===pe)return[oe,V];var re=C(oe-=60*(pe-V)*1e3,ae);return pe===re?[oe,pe]:[ue-60*Math.min(pe,re)*1e3,Math.max(pe,re)]}(h.utc(I,E).valueOf(),ee,N),K=ne[0],le=ne[1],G=h(K).utcOffset(le);return G.$x.$timezone=N,G},h.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},h.tz.setDefault=function(I){d=I}}})}($o)),$o.exports}var t1=e1();const n1=bo(t1);var No={exports:{}},r1=No.exports,xc;function i1(){return xc||(xc=1,function(i,n){(function(r,s){i.exports=s()})(r1,function(){var r="minute",s=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(v,h,d){var b=h.prototype;d.utc=function(E){var N={date:E,utc:!0,args:arguments};return new h(N)},b.utc=function(E){var N=d(this.toDate(),{locale:this.$L,utc:!0});return E?N.add(this.utcOffset(),r):N},b.local=function(){return d(this.toDate(),{locale:this.$L,utc:!1})};var C=b.parse;b.parse=function(E){E.utc&&(this.$u=!0),this.$utils().u(E.$offset)||(this.$offset=E.$offset),C.call(this,E)};var A=b.init;b.init=function(){if(this.$u){var E=this.$d;this.$y=E.getUTCFullYear(),this.$M=E.getUTCMonth(),this.$D=E.getUTCDate(),this.$W=E.getUTCDay(),this.$H=E.getUTCHours(),this.$m=E.getUTCMinutes(),this.$s=E.getUTCSeconds(),this.$ms=E.getUTCMilliseconds()}else A.call(this)};var R=b.utcOffset;b.utcOffset=function(E,N){var ee=this.$utils().u;if(ee(E))return this.$u?0:ee(this.$offset)?R.call(this):this.$offset;if(typeof E=="string"&&(E=function(G){G===void 0&&(G="");var ue=G.match(s);if(!ue)return null;var V=(""+ue[0]).match(l)||["-",0,0],ae=V[0],oe=60*+V[1]+ +V[2];return oe===0?0:ae==="+"?oe:-oe}(E),E===null))return this;var ne=Math.abs(E)<=16?60*E:E,K=this;if(N)return K.$offset=ne,K.$u=E===0,K;if(E!==0){var le=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(K=this.local().add(ne+le,r)).$offset=ne,K.$x.$localOffset=le}else K=this.utc();return K};var I=b.format;b.format=function(E){var N=E||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return I.call(this,N)},b.valueOf=function(){var E=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*E},b.isUTC=function(){return!!this.$u},b.toISOString=function(){return this.toDate().toISOString()},b.toString=function(){return this.toDate().toUTCString()};var L=b.toDate;b.toDate=function(E){return E==="s"&&this.$offset?d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():L.call(this)};var D=b.diff;b.diff=function(E,N,ee){if(E&&this.$u===E.$u)return D.call(this,E,N,ee);var ne=this.local(),K=d(E).local();return D.call(ne,K,N,ee)}}})}(No)),No.exports}var o1=i1();const s1=bo(o1);Ie.extend(s1),Ie.extend(n1);function a1(i,n){return n?Ie(i).tz(n).utcOffset()+i.getTimezoneOffset():0}const Sc=(i,n,r)=>{if(!i)return null;if(!n)return i;let s=a1(i,n);return r==="remove"&&(s*=-1),Ie(i).add(s,"minutes").toDate()};function Mr(i,n,r,s){return s||!n?n:Array.isArray(n)?n.map(l=>Sc(l,r,i)):Sc(n,r,i)}const u1={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},l1=ye.createContext(u1);function an(){const i=ye.useContext(l1),n=ye.useCallback(h=>h||i.locale,[i.locale]),r=ye.useCallback(h=>h||i.timezone||void 0,[i.timezone]),s=ye.useCallback(h=>typeof h=="number"?h:i.firstDayOfWeek,[i.firstDayOfWeek]),l=ye.useCallback(h=>Array.isArray(h)?h:i.weekendDays,[i.weekendDays]),v=ye.useCallback(h=>typeof h=="string"?h:i.labelSeparator,[i.labelSeparator]);return{...i,getLocale:n,getTimezone:r,getFirstDayOfWeek:s,getWeekendDays:l,getLabelSeparator:v}}function c1(i,n){const r=an(),s=l=>Mr("remove",l,r.getTimezone()).toISOString();if(n==="range"&&Array.isArray(i)){const[l,v]=i;return l?v?`${s(l)} – ${s(v)}`:`${s(l)} –`:""}return n==="multiple"&&Array.isArray(i)?i.map(l=>l&&s(l)).filter(Boolean).join(", "):!Array.isArray(i)&&i?s(i):""}function Cc({value:i,type:n,name:r,form:s}){return M.jsx("input",{type:"hidden",value:c1(i,n),name:r,form:s})}Cc.displayName="@mantine/dates/HiddenDatesInput";function Ac(i){var n,r,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var l=i.length;for(n=0;n<l;n++)i[n]&&(r=Ac(i[n]))&&(s&&(s+=" "),s+=r)}else for(r in i)i[r]&&(s&&(s+=" "),s+=r);return s}function mt(){for(var i,n,r=0,s="",l=arguments.length;r<l;r++)(i=arguments[r])&&(n=Ac(i))&&(s&&(s+=" "),s+=n);return s}var Oc={day:"m_396ce5cb"};const f1={},h1=F.createVarsResolver((i,{size:n})=>({day:{"--day-size":F.getSize(n,"day-size")}})),Oa=F.factory((i,n)=>{const r=F.useProps("Day",f1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,date:C,disabled:A,__staticSelector:R,weekend:I,outside:L,selected:D,renderDay:E,inRange:N,firstInRange:ee,lastInRange:ne,hidden:K,static:le,highlightToday:G,...ue}=r,V=F.useStyles({name:R||"Day",classes:Oc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:h1,rootSelector:"day"}),ae=an();return M.jsx(F.UnstyledButton,{...V("day",{style:K?{display:"none"}:void 0}),component:le?"div":"button",ref:n,disabled:A,"data-today":Ie(C).isSame(Mr("add",new Date,ae.getTimezone()),"day")||void 0,"data-hidden":K||void 0,"data-highlight-today":G||void 0,"data-disabled":A||void 0,"data-weekend":!A&&!L&&I||void 0,"data-outside":!A&&L||void 0,"data-selected":!A&&D||void 0,"data-in-range":N&&!A||void 0,"data-first-in-range":ee&&!A||void 0,"data-last-in-range":ne&&!A||void 0,"data-static":le||void 0,unstyled:d,...ue,children:(E==null?void 0:E(C))||Ie(C).date()})});Oa.classes=Oc,Oa.displayName="@mantine/dates/Day";function d1({locale:i,format:n="dd",firstDayOfWeek:r=1}){const s=Ie().day(r),l=[];for(let v=0;v<7;v+=1)typeof n=="string"?l.push(Ie(s).add(v,"days").locale(i).format(n)):l.push(n(Ie(s).add(v,"days").toDate()));return l}var Tc={weekday:"m_18a3eca"};const p1={},g1=F.createVarsResolver((i,{size:n})=>({weekdaysRow:{"--wr-fz":F.getFontSize(n),"--wr-spacing":F.getSpacing(n)}})),Ta=F.factory((i,n)=>{const r=F.useProps("WeekdaysRow",p1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,locale:C,firstDayOfWeek:A,weekdayFormat:R,cellComponent:I="th",__staticSelector:L,withWeekNumbers:D,...E}=r,N=F.useStyles({name:L||"WeekdaysRow",classes:Tc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:g1,rootSelector:"weekdaysRow"}),ee=an(),ne=d1({locale:ee.getLocale(C),format:R,firstDayOfWeek:ee.getFirstDayOfWeek(A)}).map((K,le)=>M.jsx(I,{...N("weekday"),children:K},le));return M.jsxs(F.Box,{component:"tr",ref:n,...N("weekdaysRow"),...E,children:[D&&M.jsx(I,{...N("weekday"),children:"#"}),ne]})});Ta.classes=Tc,Ta.displayName="@mantine/dates/WeekdaysRow";function v1(i,n=1){let r=Ie(i);const s=n===0?6:n-1;for(;r.day()!==s;)r=r.add(1,"day");return r.toDate()}function m1(i,n=1){let r=Ie(i);for(;r.day()!==n;)r=r.subtract(1,"day");return r.toDate()}function y1({month:i,firstDayOfWeek:n=1,consistentWeeks:r}){const s=Ie(i).subtract(Ie(i).date()-1,"day"),l=Ie(s).startOf("day"),v=l.toDate(),h=l.add(+l.daysInMonth()-1,"day").toDate(),d=v1(h,n),b=m1(v,n),C=[];for(;b<=d;){const A=[];for(let R=0;R<7;R+=1)A.push(new Date(b)),b.setDate(b.getDate()+1);C.push(A)}if(r&&C.length<6){const A=C[C.length-1],R=A[A.length-1],I=new Date(R);for(I.setDate(I.getDate()+1);C.length<6;){const L=[];for(let D=0;D<7;D+=1)L.push(new Date(I)),I.setDate(I.getDate()+1);C.push(L)}}return C}function Dc(i,n){return n instanceof Date?Ie(i).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function Ec(i,n){return n instanceof Date?Ie(i).isBefore(Ie(n).add(1,"day"),"day"):!0}function w1(i,n,r,s,l,v,h){const d=i.flat().filter(A=>{var R;return Ec(A,r)&&Dc(A,n)&&!(l!=null&&l(A))&&!((R=s==null?void 0:s(A))!=null&&R.disabled)&&(!v||Ie(A).isSame(Ie(h),"month"))}),b=d.find(A=>{var R;return(R=s==null?void 0:s(A))==null?void 0:R.selected});if(b)return b;const C=d.find(A=>Ie().isSame(A,"date"));return C||d[0]}var Bo={exports:{}},_1=Bo.exports,Mc;function b1(){return Mc||(Mc=1,function(i,n){(function(r,s){i.exports=s()})(_1,function(){var r="day";return function(s,l,v){var h=function(C){return C.add(4-C.isoWeekday(),r)},d=l.prototype;d.isoWeekYear=function(){return h(this).year()},d.isoWeek=function(C){if(!this.$utils().u(C))return this.add(7*(C-this.isoWeek()),r);var A,R,I,L,D=h(this),E=(A=this.isoWeekYear(),R=this.$u,I=(R?v.utc:v)().year(A).startOf("year"),L=4-I.isoWeekday(),I.isoWeekday()>4&&(L+=7),I.add(L,r));return D.diff(E,"week")+1},d.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var b=d.startOf;d.startOf=function(C,A){var R=this.$utils(),I=!!R.u(A)||A;return R.p(C)==="isoweek"?I?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):b.bind(this)(C,A)}}})}(Bo)),Bo.exports}var x1=b1();const S1=bo(x1);Ie.extend(S1);function C1(i){const n=i.find(r=>Ie(r).day()===1);return Ie(n).isoWeek()}var Rc={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const A1={withCellSpacing:!0},O1=F.createVarsResolver((i,{size:n})=>({weekNumber:{"--wn-fz":F.getFontSize(n),"--wn-size":F.getSize(n,"wn-size")}})),jo=F.factory((i,n)=>{const r=F.useProps("Month",A1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,locale:A,firstDayOfWeek:R,weekdayFormat:I,month:L,weekendDays:D,getDayProps:E,excludeDate:N,minDate:ee,maxDate:ne,renderDay:K,hideOutsideDates:le,hideWeekdays:G,getDayAriaLabel:ue,static:V,__getDayRef:ae,__onDayKeyDown:oe,__onDayClick:pe,__onDayMouseEnter:re,__preventFocus:Ce,__stopPropagation:Oe,withCellSpacing:B,size:k,highlightToday:T,withWeekNumbers:m,...f}=r,w=F.useStyles({name:C||"Month",classes:Rc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:O1,rootSelector:"month"}),p=an(),g=y1({month:L,firstDayOfWeek:p.getFirstDayOfWeek(R),consistentWeeks:p.consistentWeeks}),O=w1(g,ee,ne,E,N,le,L),{resolvedClassNames:Y,resolvedStyles:Q}=F.useResolvedStylesApi({classNames:s,styles:h,props:r}),fe=g.map((de,we)=>{const X=de.map((ce,Ae)=>{const be=!Ie(ce).isSame(Ie(L),"month"),U=(ue==null?void 0:ue(ce))||Ie(ce).locale(A||p.locale).format("D MMMM YYYY"),q=E==null?void 0:E(ce),W=Ie(ce).isSame(O,"date");return M.jsx("td",{...w("monthCell"),"data-with-spacing":B||void 0,children:M.jsx(Oa,{__staticSelector:C||"Month",classNames:Y,styles:Q,unstyled:d,"data-mantine-stop-propagation":Oe||void 0,highlightToday:T,renderDay:K,date:ce,size:k,weekend:p.getWeekendDays(D).includes(ce.getDay()),outside:be,hidden:le?be:!1,"aria-label":U,static:V,disabled:(N==null?void 0:N(ce))||!Ec(ce,ne)||!Dc(ce,ee),ref:J=>ae==null?void 0:ae(we,Ae,J),...q,onKeyDown:J=>{var se;(se=q==null?void 0:q.onKeyDown)==null||se.call(q,J),oe==null||oe(J,{rowIndex:we,cellIndex:Ae,date:ce})},onMouseEnter:J=>{var se;(se=q==null?void 0:q.onMouseEnter)==null||se.call(q,J),re==null||re(J,ce)},onClick:J=>{var se;(se=q==null?void 0:q.onClick)==null||se.call(q,J),pe==null||pe(J,ce)},onMouseDown:J=>{var se;(se=q==null?void 0:q.onMouseDown)==null||se.call(q,J),Ce&&J.preventDefault()},tabIndex:Ce||!W?-1:0})},ce.toString())});return M.jsxs("tr",{...w("monthRow"),children:[m&&M.jsx("td",{...w("weekNumber"),children:C1(de)}),X]},we)});return M.jsxs(F.Box,{component:"table",...w("month"),size:k,ref:n,...f,children:[!G&&M.jsx("thead",{...w("monthThead"),children:M.jsx(Ta,{__staticSelector:C||"Month",locale:A,firstDayOfWeek:R,weekdayFormat:I,size:k,classNames:Y,styles:Q,unstyled:d,withWeekNumbers:m})}),M.jsx("tbody",{...w("monthTbody"),children:fe})]})});jo.classes=Rc,jo.displayName="@mantine/dates/Month";var Lc={pickerControl:"m_dc6a3c71"};const T1={},D1=F.createVarsResolver((i,{size:n})=>({pickerControl:{"--dpc-fz":F.getFontSize(n),"--dpc-size":F.getSize(n,"dpc-size")}})),Uo=F.factory((i,n)=>{const r=F.useProps("PickerControl",T1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,firstInRange:C,lastInRange:A,inRange:R,__staticSelector:I,selected:L,disabled:D,...E}=r,N=F.useStyles({name:I||"PickerControl",classes:Lc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:D1,rootSelector:"pickerControl"});return M.jsx(F.UnstyledButton,{...N("pickerControl"),ref:n,unstyled:d,"data-picker-control":!0,"data-selected":L&&!D||void 0,"data-disabled":D||void 0,"data-in-range":R&&!D&&!L||void 0,"data-first-in-range":C&&!D||void 0,"data-last-in-range":A&&!D||void 0,disabled:D,...E})});Uo.classes=Lc,Uo.displayName="@mantine/dates/PickerControl";function Ic(i,n,r){return!n&&!r?!1:!!(n&&Ie(i).isBefore(n,"year")||r&&Ie(i).isAfter(r,"year"))}function E1(i,n,r,s){const l=i.flat().filter(d=>{var b;return!Ic(d,n,r)&&!((b=s==null?void 0:s(d))!=null&&b.disabled)}),v=l.find(d=>{var b;return(b=s==null?void 0:s(d))==null?void 0:b.selected});if(v)return v;const h=l.find(d=>Ie().isSame(d,"year"));return h||l[0]}function kc(i){const n=i.getFullYear(),r=n-n%10;let s=0;const l=[[],[],[],[]];for(let v=0;v<4;v+=1){const h=v===3?1:3;for(let d=0;d<h;d+=1)l[v].push(new Date(r+s,0)),s+=1}return l}var Pc={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const M1={yearsListFormat:"YYYY",withCellSpacing:!0},zo=F.factory((i,n)=>{const r=F.useProps("YearsList",M1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,decade:C,yearsListFormat:A,locale:R,minDate:I,maxDate:L,getYearControlProps:D,__staticSelector:E,__getControlRef:N,__onControlKeyDown:ee,__onControlClick:ne,__onControlMouseEnter:K,__preventFocus:le,__stopPropagation:G,withCellSpacing:ue,size:V,...ae}=r,oe=F.useStyles({name:E||"YearsList",classes:Pc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"yearsList"}),pe=an(),re=kc(C),Ce=E1(re,I,L,D),Oe=re.map((B,k)=>{const T=B.map((m,f)=>{const w=D==null?void 0:D(m),p=Ie(m).isSame(Ce,"year");return M.jsx("td",{...oe("yearsListCell"),"data-with-spacing":ue||void 0,children:M.jsx(Uo,{...oe("yearsListControl"),size:V,unstyled:d,"data-mantine-stop-propagation":G||void 0,disabled:Ic(m,I,L),ref:g=>N==null?void 0:N(k,f,g),...w,onKeyDown:g=>{var O;(O=w==null?void 0:w.onKeyDown)==null||O.call(w,g),ee==null||ee(g,{rowIndex:k,cellIndex:f,date:m})},onClick:g=>{var O;(O=w==null?void 0:w.onClick)==null||O.call(w,g),ne==null||ne(g,m)},onMouseEnter:g=>{var O;(O=w==null?void 0:w.onMouseEnter)==null||O.call(w,g),K==null||K(g,m)},onMouseDown:g=>{var O;(O=w==null?void 0:w.onMouseDown)==null||O.call(w,g),le&&g.preventDefault()},tabIndex:le||!p?-1:0,children:Ie(m).locale(pe.getLocale(R)).format(A)})},f)});return M.jsx("tr",{...oe("yearsListRow"),children:T},k)});return M.jsx(F.Box,{component:"table",ref:n,size:V,...oe("yearsList"),...ae,children:M.jsx("tbody",{children:Oe})})});zo.classes=Pc,zo.displayName="@mantine/dates/YearsList";function $c(i,n,r){return!n&&!r?!1:!!(n&&Ie(i).isBefore(n,"month")||r&&Ie(i).isAfter(r,"month"))}function R1(i,n,r,s){const l=i.flat().filter(d=>{var b;return!$c(d,n,r)&&!((b=s==null?void 0:s(d))!=null&&b.disabled)}),v=l.find(d=>{var b;return(b=s==null?void 0:s(d))==null?void 0:b.selected});if(v)return v;const h=l.find(d=>Ie().isSame(d,"month"));return h||l[0]}function L1(i){const n=Ie(i).startOf("year").toDate(),r=[[],[],[],[]];let s=0;for(let l=0;l<4;l+=1)for(let v=0;v<3;v+=1)r[l].push(Ie(n).add(s,"months").toDate()),s+=1;return r}var Nc={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const I1={monthsListFormat:"MMM",withCellSpacing:!0},Fo=F.factory((i,n)=>{const r=F.useProps("MonthsList",I1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,year:A,monthsListFormat:R,locale:I,minDate:L,maxDate:D,getMonthControlProps:E,__getControlRef:N,__onControlKeyDown:ee,__onControlClick:ne,__onControlMouseEnter:K,__preventFocus:le,__stopPropagation:G,withCellSpacing:ue,size:V,...ae}=r,oe=F.useStyles({name:C||"MonthsList",classes:Nc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"monthsList"}),pe=an(),re=L1(A),Ce=R1(re,L,D,E),Oe=re.map((B,k)=>{const T=B.map((m,f)=>{const w=E==null?void 0:E(m),p=Ie(m).isSame(Ce,"month");return M.jsx("td",{...oe("monthsListCell"),"data-with-spacing":ue||void 0,children:M.jsx(Uo,{...oe("monthsListControl"),size:V,unstyled:d,__staticSelector:C||"MonthsList","data-mantine-stop-propagation":G||void 0,disabled:$c(m,L,D),ref:g=>N==null?void 0:N(k,f,g),...w,onKeyDown:g=>{var O;(O=w==null?void 0:w.onKeyDown)==null||O.call(w,g),ee==null||ee(g,{rowIndex:k,cellIndex:f,date:m})},onClick:g=>{var O;(O=w==null?void 0:w.onClick)==null||O.call(w,g),ne==null||ne(g,m)},onMouseEnter:g=>{var O;(O=w==null?void 0:w.onMouseEnter)==null||O.call(w,g),K==null||K(g,m)},onMouseDown:g=>{var O;(O=w==null?void 0:w.onMouseDown)==null||O.call(w,g),le&&g.preventDefault()},tabIndex:le||!p?-1:0,children:Ie(m).locale(pe.getLocale(I)).format(R)})},f)});return M.jsx("tr",{...oe("monthsListRow"),children:T},k)});return M.jsx(F.Box,{component:"table",ref:n,size:V,...oe("monthsList"),...ae,children:M.jsx("tbody",{children:Oe})})});Fo.classes=Nc,Fo.displayName="@mantine/dates/MonthsList";var Bc={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const k1={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},P1=F.createVarsResolver((i,{size:n})=>({calendarHeader:{"--dch-control-size":F.getSize(n,"dch-control-size"),"--dch-fz":F.getFontSize(n)}})),ir=F.factory((i,n)=>{const r=F.useProps("CalendarHeader",k1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,nextIcon:C,previousIcon:A,nextLabel:R,previousLabel:I,onNext:L,onPrevious:D,onLevelClick:E,label:N,nextDisabled:ee,previousDisabled:ne,hasNextLevel:K,levelControlAriaLabel:le,withNext:G,withPrevious:ue,__staticSelector:V,__preventFocus:ae,__stopPropagation:oe,...pe}=r,re=F.useStyles({name:V||"CalendarHeader",classes:Bc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:P1,rootSelector:"calendarHeader"}),Ce=ae?Oe=>Oe.preventDefault():void 0;return M.jsxs(F.Box,{...re("calendarHeader"),ref:n,...pe,children:[ue&&M.jsx(F.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"previous","aria-label":I,onClick:D,unstyled:d,onMouseDown:Ce,disabled:ne,"data-disabled":ne||void 0,tabIndex:ae||ne?-1:0,"data-mantine-stop-propagation":oe||void 0,children:A||M.jsx(F.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),M.jsx(F.UnstyledButton,{component:K?"button":"div",...re("calendarHeaderLevel"),onClick:K?E:void 0,unstyled:d,onMouseDown:K?Ce:void 0,disabled:!K,"data-static":!K||void 0,"aria-label":le,tabIndex:ae||!K?-1:0,"data-mantine-stop-propagation":oe||void 0,children:N}),G&&M.jsx(F.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"next","aria-label":R,onClick:L,unstyled:d,onMouseDown:Ce,disabled:ee,"data-disabled":ee||void 0,tabIndex:ae||ee?-1:0,"data-mantine-stop-propagation":oe||void 0,children:C||M.jsx(F.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});ir.classes=Bc,ir.displayName="@mantine/dates/CalendarHeader";function $1(i){const n=kc(i);return[n[0][0],n[3][0]]}const N1={decadeLabelFormat:"YYYY"},Wo=F.factory((i,n)=>{const r=F.useProps("DecadeLevel",N1,i),{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,withCellSpacing:L,__preventFocus:D,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,nextDisabled:G,previousDisabled:ue,levelControlAriaLabel:V,withNext:ae,withPrevious:oe,decadeLabelFormat:pe,classNames:re,styles:Ce,unstyled:Oe,__staticSelector:B,__stopPropagation:k,size:T,...m}=r,f=an(),[w,p]=$1(s),g={__staticSelector:B||"DecadeLevel",classNames:re,styles:Ce,unstyled:Oe,size:T},O=typeof G=="boolean"?G:h?!Ie(p).endOf("year").isBefore(h):!1,Y=typeof ue=="boolean"?ue:v?!Ie(w).startOf("year").isAfter(v):!1,Q=(fe,de)=>Ie(fe).locale(l||f.locale).format(de);return M.jsxs(F.Box,{"data-decade-level":!0,size:T,ref:n,...m,children:[M.jsx(ir,{label:typeof pe=="function"?pe(w,p):`${Q(w,pe)} – ${Q(p,pe)}`,__preventFocus:D,__stopPropagation:k,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,nextDisabled:O,previousDisabled:Y,hasNextLevel:!1,levelControlAriaLabel:V,withNext:ae,withPrevious:oe,...g}),M.jsx(zo,{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,__preventFocus:D,__stopPropagation:k,withCellSpacing:L,...g})]})});Wo.classes={...zo.classes,...ir.classes},Wo.displayName="@mantine/dates/DecadeLevel";const B1={yearLabelFormat:"YYYY"},Yo=F.factory((i,n)=>{const r=F.useProps("YearLevel",B1,i),{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,withCellSpacing:L,__preventFocus:D,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,onLevelClick:G,nextDisabled:ue,previousDisabled:V,hasNextLevel:ae,levelControlAriaLabel:oe,withNext:pe,withPrevious:re,yearLabelFormat:Ce,__staticSelector:Oe,__stopPropagation:B,size:k,classNames:T,styles:m,unstyled:f,...w}=r,p=an(),g={__staticSelector:Oe||"YearLevel",classNames:T,styles:m,unstyled:f,size:k},O=typeof ue=="boolean"?ue:h?!Ie(s).endOf("year").isBefore(h):!1,Y=typeof V=="boolean"?V:v?!Ie(s).startOf("year").isAfter(v):!1;return M.jsxs(F.Box,{"data-year-level":!0,size:k,ref:n,...w,children:[M.jsx(ir,{label:typeof Ce=="function"?Ce(s):Ie(s).locale(l||p.locale).format(Ce),__preventFocus:D,__stopPropagation:B,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,onLevelClick:G,nextDisabled:O,previousDisabled:Y,hasNextLevel:ae,levelControlAriaLabel:oe,withNext:pe,withPrevious:re,...g}),M.jsx(Fo,{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,__preventFocus:D,__stopPropagation:B,withCellSpacing:L,...g})]})});Yo.classes={...ir.classes,...Fo.classes},Yo.displayName="@mantine/dates/YearLevel";const j1={monthLabelFormat:"MMMM YYYY"},qo=F.factory((i,n)=>{const r=F.useProps("MonthLevel",j1,i),{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__getDayRef:N,__onDayKeyDown:ee,__onDayClick:ne,__onDayMouseEnter:K,withCellSpacing:le,highlightToday:G,withWeekNumbers:ue,__preventFocus:V,__stopPropagation:ae,nextIcon:oe,previousIcon:pe,nextLabel:re,previousLabel:Ce,onNext:Oe,onPrevious:B,onLevelClick:k,nextDisabled:T,previousDisabled:m,hasNextLevel:f,levelControlAriaLabel:w,withNext:p,withPrevious:g,monthLabelFormat:O,classNames:Y,styles:Q,unstyled:fe,__staticSelector:de,size:we,static:X,...ce}=r,Ae=an(),be={__staticSelector:de||"MonthLevel",classNames:Y,styles:Q,unstyled:fe,size:we},U=typeof T=="boolean"?T:R?!Ie(s).endOf("month").isBefore(R):!1,q=typeof m=="boolean"?m:A?!Ie(s).startOf("month").isAfter(A):!1;return M.jsxs(F.Box,{"data-month-level":!0,size:we,ref:n,...ce,children:[M.jsx(ir,{label:typeof O=="function"?O(s):Ie(s).locale(l||Ae.locale).format(O),__preventFocus:V,__stopPropagation:ae,nextIcon:oe,previousIcon:pe,nextLabel:re,previousLabel:Ce,onNext:Oe,onPrevious:B,onLevelClick:k,nextDisabled:U,previousDisabled:q,hasNextLevel:f,levelControlAriaLabel:w,withNext:p,withPrevious:g,...be}),M.jsx(jo,{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__getDayRef:N,__onDayKeyDown:ee,__onDayClick:ne,__onDayMouseEnter:K,__preventFocus:V,__stopPropagation:ae,static:X,withCellSpacing:le,highlightToday:G,withWeekNumbers:ue,...be})]})});qo.classes={...jo.classes,...ir.classes},qo.displayName="@mantine/dates/MonthLevel";var jc={levelsGroup:"m_30b26e33"};const U1={},or=F.factory((i,n)=>{const r=F.useProps("LevelsGroup",U1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,...A}=r,R=F.useStyles({name:C||"LevelsGroup",classes:jc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"levelsGroup"});return M.jsx(F.Box,{ref:n,...R("levelsGroup"),...A})});or.classes=jc,or.displayName="@mantine/dates/LevelsGroup";const z1={numberOfColumns:1},Ho=F.factory((i,n)=>{const r=F.useProps("DecadeLevelGroup",z1,i),{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__onControlClick:C,__onControlMouseEnter:A,withCellSpacing:R,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,nextDisabled:K,previousDisabled:le,classNames:G,styles:ue,unstyled:V,__staticSelector:ae,__stopPropagation:oe,numberOfColumns:pe,levelControlAriaLabel:re,decadeLabelFormat:Ce,size:Oe,vars:B,...k}=r,T=ye.useRef([]),m=Array(pe).fill(0).map((f,w)=>{const p=Ie(s).add(w*10,"years").toDate();return M.jsx(Wo,{size:Oe,yearsListFormat:d,decade:p,withNext:w===pe-1,withPrevious:w===0,decadeLabelFormat:Ce,__onControlClick:C,__onControlMouseEnter:A,__onControlKeyDown:(g,O)=>Aa({levelIndex:w,rowIndex:O.rowIndex,cellIndex:O.cellIndex,event:g,controlsRef:T}),__getControlRef:(g,O,Y)=>{Array.isArray(T.current[w])||(T.current[w]=[]),Array.isArray(T.current[w][g])||(T.current[w][g]=[]),T.current[w][g][O]=Y},levelControlAriaLabel:typeof re=="function"?re(p):re,locale:l,minDate:v,maxDate:h,__preventFocus:I,__stopPropagation:oe,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,nextDisabled:K,previousDisabled:le,getYearControlProps:b,__staticSelector:ae||"DecadeLevelGroup",classNames:G,styles:ue,unstyled:V,withCellSpacing:R},w)});return M.jsx(or,{classNames:G,styles:ue,__staticSelector:ae||"DecadeLevelGroup",ref:n,size:Oe,unstyled:V,...k,children:m})});Ho.classes={...or.classes,...Wo.classes},Ho.displayName="@mantine/dates/DecadeLevelGroup";const F1={numberOfColumns:1},Go=F.factory((i,n)=>{const r=F.useProps("YearLevelGroup",F1,i),{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__onControlClick:C,__onControlMouseEnter:A,withCellSpacing:R,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,onLevelClick:K,nextDisabled:le,previousDisabled:G,hasNextLevel:ue,classNames:V,styles:ae,unstyled:oe,__staticSelector:pe,__stopPropagation:re,numberOfColumns:Ce,levelControlAriaLabel:Oe,yearLabelFormat:B,size:k,vars:T,...m}=r,f=ye.useRef([]),w=Array(Ce).fill(0).map((p,g)=>{const O=Ie(s).add(g,"years").toDate();return M.jsx(Yo,{size:k,monthsListFormat:d,year:O,withNext:g===Ce-1,withPrevious:g===0,yearLabelFormat:B,__stopPropagation:re,__onControlClick:C,__onControlMouseEnter:A,__onControlKeyDown:(Y,Q)=>Aa({levelIndex:g,rowIndex:Q.rowIndex,cellIndex:Q.cellIndex,event:Y,controlsRef:f}),__getControlRef:(Y,Q,fe)=>{Array.isArray(f.current[g])||(f.current[g]=[]),Array.isArray(f.current[g][Y])||(f.current[g][Y]=[]),f.current[g][Y][Q]=fe},levelControlAriaLabel:typeof Oe=="function"?Oe(O):Oe,locale:l,minDate:v,maxDate:h,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,onLevelClick:K,nextDisabled:le,previousDisabled:G,hasNextLevel:ue,getMonthControlProps:b,classNames:V,styles:ae,unstyled:oe,__staticSelector:pe||"YearLevelGroup",withCellSpacing:R},g)});return M.jsx(or,{classNames:V,styles:ae,__staticSelector:pe||"YearLevelGroup",ref:n,size:k,unstyled:oe,...m,children:w})});Go.classes={...Yo.classes,...or.classes},Go.displayName="@mantine/dates/YearLevelGroup";const W1={numberOfColumns:1},Vo=F.factory((i,n)=>{const r=F.useProps("MonthLevelGroup",W1,i),{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__onDayClick:N,__onDayMouseEnter:ee,withCellSpacing:ne,highlightToday:K,withWeekNumbers:le,__preventFocus:G,nextIcon:ue,previousIcon:V,nextLabel:ae,previousLabel:oe,onNext:pe,onPrevious:re,onLevelClick:Ce,nextDisabled:Oe,previousDisabled:B,hasNextLevel:k,classNames:T,styles:m,unstyled:f,numberOfColumns:w,levelControlAriaLabel:p,monthLabelFormat:g,__staticSelector:O,__stopPropagation:Y,size:Q,static:fe,vars:de,...we}=r,X=ye.useRef([]),ce=Array(w).fill(0).map((Ae,be)=>{const U=Ie(s).add(be,"months").toDate();return M.jsx(qo,{month:U,withNext:be===w-1,withPrevious:be===0,monthLabelFormat:g,__stopPropagation:Y,__onDayClick:N,__onDayMouseEnter:ee,__onDayKeyDown:(q,W)=>Aa({levelIndex:be,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:q,controlsRef:X}),__getDayRef:(q,W,J)=>{Array.isArray(X.current[be])||(X.current[be]=[]),Array.isArray(X.current[be][q])||(X.current[be][q]=[]),X.current[be][q][W]=J},levelControlAriaLabel:typeof p=="function"?p(U):p,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__preventFocus:G,nextIcon:ue,previousIcon:V,nextLabel:ae,previousLabel:oe,onNext:pe,onPrevious:re,onLevelClick:Ce,nextDisabled:Oe,previousDisabled:B,hasNextLevel:k,classNames:T,styles:m,unstyled:f,__staticSelector:O||"MonthLevelGroup",size:Q,static:fe,withCellSpacing:ne,highlightToday:K,withWeekNumbers:le},be)});return M.jsx(or,{classNames:T,styles:m,__staticSelector:O||"MonthLevelGroup",ref:n,size:Q,...we,children:ce})});Vo.classes={...or.classes,...qo.classes},Vo.displayName="@mantine/dates/MonthLevelGroup";const Uc=i=>i==="range"?[null,null]:i==="multiple"?[]:null;function Da({type:i,value:n,defaultValue:r,onChange:s,applyTimezone:l=!0}){const v=ye.useRef(i),h=an(),[d,b,C]=Ot.useUncontrolled({value:Mr("add",n,h.getTimezone(),!l),defaultValue:Mr("add",r,h.getTimezone(),!l),finalValue:Uc(i),onChange:R=>{s==null||s(Mr("remove",R,h.getTimezone(),!l))}});let A=d;if(v.current!==i){if(v.current=i,n===void 0)A=r!==void 0?r:Uc(i),b(A);else if(process.env.NODE_ENV==="development")switch(i){case"default":n!==null&&typeof n!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":n instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(n instanceof Array)||n.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[A,b,C]}function Ea(i,n){return i?i==="month"?0:i==="year"?1:2:n||0}function Y1(i){return i===0?"month":i===1?"year":"decade"}function Fi(i,n,r){return Y1(Ot.clamp(Ea(i,0),Ea(n,0),Ea(r,2)))}const q1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Zo=F.factory((i,n)=>{const r=F.useProps("Calendar",q1,i),{vars:s,maxLevel:l,minLevel:v,defaultLevel:h,level:d,onLevelChange:b,date:C,defaultDate:A,onDateChange:R,numberOfColumns:I,columnsToScroll:L,ariaLabels:D,nextLabel:E,previousLabel:N,onYearSelect:ee,onMonthSelect:ne,onYearMouseEnter:K,onMonthMouseEnter:le,__updateDateOnYearSelect:G,__updateDateOnMonthSelect:ue,firstDayOfWeek:V,weekdayFormat:ae,weekendDays:oe,getDayProps:pe,excludeDate:re,renderDay:Ce,hideOutsideDates:Oe,hideWeekdays:B,getDayAriaLabel:k,monthLabelFormat:T,nextIcon:m,previousIcon:f,__onDayClick:w,__onDayMouseEnter:p,withCellSpacing:g,highlightToday:O,withWeekNumbers:Y,monthsListFormat:Q,getMonthControlProps:fe,yearLabelFormat:de,yearsListFormat:we,getYearControlProps:X,decadeLabelFormat:ce,classNames:Ae,styles:be,unstyled:U,minDate:q,maxDate:W,locale:J,__staticSelector:se,size:Te,__preventFocus:u,__stopPropagation:c,onNextDecade:_,onPreviousDecade:$,onNextYear:j,onPreviousYear:te,onNextMonth:xe,onPreviousMonth:De,static:Re,__timezoneApplied:Se,...ke}=r,{resolvedClassNames:$e,resolvedStyles:Le}=F.useResolvedStylesApi({classNames:Ae,styles:be,props:r}),[Ke,Ge]=Ot.useUncontrolled({value:d?Fi(d,v,l):void 0,defaultValue:h?Fi(h,v,l):void 0,finalValue:Fi(void 0,v,l),onChange:b}),[ot,gt]=Da({type:"default",value:C,defaultValue:A,onChange:R,applyTimezone:!Se}),yt={__staticSelector:se||"Calendar",styles:Le,classNames:$e,unstyled:U,size:Te},ct=an(),Et=L||I||1,Rn=new Date,un=q&&q>Rn?q:Rn,St=ot||Mr("add",un,ct.getTimezone()),Sn=()=>{const st=Ie(St).add(Et,"month").toDate();xe==null||xe(st),gt(st)},Ln=()=>{const st=Ie(St).subtract(Et,"month").toDate();De==null||De(st),gt(st)},In=()=>{const st=Ie(St).add(Et,"year").toDate();j==null||j(st),gt(st)},ln=()=>{const st=Ie(St).subtract(Et,"year").toDate();te==null||te(st),gt(st)},cn=()=>{const st=Ie(St).add(10*Et,"year").toDate();_==null||_(st),gt(st)},fn=()=>{const st=Ie(St).subtract(10*Et,"year").toDate();$==null||$(st),gt(st)};return M.jsxs(F.Box,{ref:n,size:Te,"data-calendar":!0,...ke,children:[Ke==="month"&&M.jsx(Vo,{month:St,minDate:q,maxDate:W,firstDayOfWeek:V,weekdayFormat:ae,weekendDays:oe,getDayProps:pe,excludeDate:re,renderDay:Ce,hideOutsideDates:Oe,hideWeekdays:B,getDayAriaLabel:k,onNext:Sn,onPrevious:Ln,hasNextLevel:l!=="month",onLevelClick:()=>Ge("year"),numberOfColumns:I,locale:J,levelControlAriaLabel:D==null?void 0:D.monthLevelControl,nextLabel:(D==null?void 0:D.nextMonth)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousMonth)??N,previousIcon:f,monthLabelFormat:T,__onDayClick:w,__onDayMouseEnter:p,__preventFocus:u,__stopPropagation:c,static:Re,withCellSpacing:g,highlightToday:O,withWeekNumbers:Y,...yt}),Ke==="year"&&M.jsx(Go,{year:St,numberOfColumns:I,minDate:q,maxDate:W,monthsListFormat:Q,getMonthControlProps:fe,locale:J,onNext:In,onPrevious:ln,hasNextLevel:l!=="month"&&l!=="year",onLevelClick:()=>Ge("decade"),levelControlAriaLabel:D==null?void 0:D.yearLevelControl,nextLabel:(D==null?void 0:D.nextYear)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousYear)??N,previousIcon:f,yearLabelFormat:de,__onControlMouseEnter:le,__onControlClick:(st,rt)=>{ue&>(rt),Ge(Fi("month",v,l)),ne==null||ne(rt)},__preventFocus:u,__stopPropagation:c,withCellSpacing:g,...yt}),Ke==="decade"&&M.jsx(Ho,{decade:St,minDate:q,maxDate:W,yearsListFormat:we,getYearControlProps:X,locale:J,onNext:cn,onPrevious:fn,numberOfColumns:I,nextLabel:(D==null?void 0:D.nextDecade)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousDecade)??N,previousIcon:f,decadeLabelFormat:ce,__onControlMouseEnter:K,__onControlClick:(st,rt)=>{G&>(rt),Ge(Fi("year",v,l)),ee==null||ee(rt)},__preventFocus:u,__stopPropagation:c,withCellSpacing:g,...yt})]})});Zo.classes={...Ho.classes,...Go.classes,...Vo.classes},Zo.displayName="@mantine/dates/Calendar";function H1(i){const{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:v,nextIcon:h,previousIcon:d,date:b,defaultDate:C,onDateChange:A,numberOfColumns:R,columnsToScroll:I,ariaLabels:L,nextLabel:D,previousLabel:E,onYearSelect:N,onMonthSelect:ee,onYearMouseEnter:ne,onMonthMouseEnter:K,onNextMonth:le,onPreviousMonth:G,onNextYear:ue,onPreviousYear:V,onNextDecade:ae,onPreviousDecade:oe,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ce,__updateDateOnMonthSelect:Oe,withWeekNumbers:B,firstDayOfWeek:k,weekdayFormat:T,weekendDays:m,getDayProps:f,excludeDate:w,renderDay:p,hideOutsideDates:g,hideWeekdays:O,getDayAriaLabel:Y,monthLabelFormat:Q,monthsListFormat:fe,getMonthControlProps:de,yearLabelFormat:we,yearsListFormat:X,getYearControlProps:ce,decadeLabelFormat:Ae,allowSingleDateInRange:be,allowDeselect:U,minDate:q,maxDate:W,locale:J,...se}=i;return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:v,nextIcon:h,previousIcon:d,date:b,defaultDate:C,onDateChange:A,numberOfColumns:R,columnsToScroll:I,ariaLabels:L,nextLabel:D,previousLabel:E,onYearSelect:N,onMonthSelect:ee,onYearMouseEnter:ne,onMonthMouseEnter:K,onNextMonth:le,onPreviousMonth:G,onNextYear:ue,onPreviousYear:V,onNextDecade:ae,onPreviousDecade:oe,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ce,__updateDateOnMonthSelect:Oe,withWeekNumbers:B,firstDayOfWeek:k,weekdayFormat:T,weekendDays:m,getDayProps:f,excludeDate:w,renderDay:p,hideOutsideDates:g,hideWeekdays:O,getDayAriaLabel:Y,monthLabelFormat:Q,monthsListFormat:fe,getMonthControlProps:de,yearLabelFormat:we,yearsListFormat:X,getYearControlProps:ce,decadeLabelFormat:Ae,allowSingleDateInRange:be,allowDeselect:U,minDate:q,maxDate:W,locale:J},others:se}}function G1(i,n){if(i===null)return null;const r=Mr("add",new Date(i),n);return Number.isNaN(r.getTime())||!i?null:r}function V1({date:i,maxDate:n,minDate:r}){return!(i==null||Number.isNaN(i.getTime())||n&&Ie(i).isAfter(n,"date")||r&&Ie(i).isBefore(r,"date"))}const Z1={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},Ko=F.factory((i,n)=>{const r=F.useInputProps("DateInput",Z1,i),{inputProps:s,wrapperProps:l,value:v,defaultValue:h,onChange:d,clearable:b,clearButtonProps:C,popoverProps:A,getDayProps:R,locale:I,valueFormat:L,dateParser:D,minDate:E,maxDate:N,fixOnBlur:ee,onFocus:ne,onBlur:K,onClick:le,readOnly:G,name:ue,form:V,rightSection:ae,unstyled:oe,classNames:pe,styles:re,allowDeselect:Ce,preserveTime:Oe,date:B,defaultDate:k,onDateChange:T,...m}=r,f=ye.useRef(null),w=ye.useRef(null),[p,g]=ye.useState(!1),{calendarProps:O,others:Y}=H1(m),Q=an(),de=D||(j=>{const te=Ie(j,L,Q.getLocale(I)).toDate();return Number.isNaN(te.getTime())?G1(j,Q.getTimezone()):te}),we=Ce!==void 0?Ce:b,X=j=>j?Ie(j).locale(Q.getLocale(I)).format(L):"",[ce,Ae,be]=Da({type:"default",value:v,defaultValue:h,onChange:d}),[U,q]=Da({type:"default",value:B,defaultValue:h||k,onChange:T});ye.useEffect(()=>{be&&v!==null&&q(v)},[be,v]);const[W,J]=ye.useState(X(ce));ye.useEffect(()=>{J(X(ce))},[Q.getLocale(I)]);const se=j=>{const te=j.currentTarget.value;if(J(te),g(!0),te.trim()===""&&b)Ae(null);else{const xe=de(te);V1({date:xe,minDate:E,maxDate:N})&&(Ae(xe),q(xe))}},Te=j=>{K==null||K(j),g(!1),ee&&J(X(ce))},u=j=>{ne==null||ne(j),g(!0)},c=j=>{le==null||le(j),g(!0)},_=j=>({...R==null?void 0:R(j),selected:Ie(ce).isSame(j,"day"),onClick:te=>{var Re,Se;(Se=R==null?void 0:(Re=R(j)).onClick)==null||Se.call(Re,te);const xe=Oe?Jg(ce,j):j,De=b&&we&&Ie(ce).isSame(j,"day")?null:xe;Ae(De),!be&&J(X(De)),g(!1)}}),$=ae||(b&&ce&&!G?M.jsx(F.CloseButton,{variant:"transparent",onMouseDown:j=>j.preventDefault(),tabIndex:-1,onClick:()=>{Ae(null),!be&&J(""),g(!1)},unstyled:oe,size:s.size||"sm",...C}):null);return Ot.useDidUpdate(()=>{ce!==void 0&&!p&&J(X(ce))},[ce]),Ot.useClickOutside(()=>g(!1),void 0,[f.current,w.current]),M.jsxs(M.Fragment,{children:[M.jsx(F.Input.Wrapper,{...l,__staticSelector:"DateInput",ref:f,children:M.jsxs(F.Popover,{opened:p,trapFocus:!1,position:"bottom-start",disabled:G,withRoles:!1,unstyled:oe,...A,children:[M.jsx(F.Popover.Target,{children:M.jsx(F.Input,{"data-dates-input":!0,"data-read-only":G||void 0,autoComplete:"off",ref:n,value:W,onChange:se,onBlur:Te,onFocus:u,onClick:c,readOnly:G,rightSection:$,...s,...Y,__staticSelector:"DateInput"})}),M.jsx(F.Popover.Dropdown,{onMouseDown:j=>j.preventDefault(),"data-dates-dropdown":!0,ref:w,children:M.jsx(Zo,{__staticSelector:"DateInput",__timezoneApplied:!0,...O,classNames:pe,styles:re,unstyled:oe,__preventFocus:!0,minDate:E,maxDate:N,locale:I,getDayProps:_,size:s.size,date:U,onDateChange:q})})]})}),M.jsx(Cc,{name:ue,form:V,value:ce,type:"default"})]})});Ko.classes={...F.Input.classes,...Zo.classes},Ko.displayName="@mantine/dates/DateInput";function K1(i){const n=bn.c(46),{fields:r,onClose:s,queryKey:l,apiPath:v,steps:h,onCreated:d}=i,[b,C]=ye.useState(0),[A,R]=ye.useState(!1),[I,L]=ye.useState(),{mutateAsync:D,isError:E,error:N,isPending:ee}=mc(v,l),{mutateAsync:ne,isPending:K}=Ca(v,l),le=ee||K;let G;n[0]!==r?(G=new Set(r.filter(n0).map(t0)),n[0]=r,n[1]=G):G=n[1];let ue;n[2]!==G?(ue=[...G],n[2]=G,n[3]=ue):ue=n[3];const V=ue;let ae;n[4]!==r?(ae=r.reduce(e0,{}),n[4]=r,n[5]=ae):ae=n[5];let oe;n[6]!==r?(oe=r.filter(X1).reduce(Q1,{}),n[6]=r,n[7]=oe):oe=n[7];let pe;n[8]!==ae||n[9]!==oe?(pe={mode:"uncontrolled",initialValues:ae,validate:oe},n[8]=ae,n[9]=oe,n[10]=pe):pe=n[10];const re=Ti.useForm(pe);let Ce;n[11]!==re?(Ce=function(g){return M.jsxs(ye.Fragment,{children:[(g.type===void 0||g.type=="text")&&M.jsx(F.TextInput,{label:g.column.title,placeholder:g.placeholder??"",...re.getInputProps(g.id),type:g.id.includes("email")?"email":void 0},re.key(g.id)),g.type==="number"&&M.jsx(F.NumberInput,{decimalSeparator:",",label:g.column.title,placeholder:g.placeholder??"",...re.getInputProps(g.id)},re.key(g.id)),g.type==="date"&&M.jsx(Ko,{label:g.column.title,placeholder:g.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...re.getInputProps(g.id)},re.key(g.id)),g.type==="boolean"&&M.jsx(F.Checkbox,{mt:"md",label:g.column.title,...re.getInputProps(g.id,{type:"checkbox"})},re.key(g.id)),g.type==="custom"&&g.render&&g.render(re.getValues(),re.getInputProps(g.id).onChange,R,re.setValues)]},g.id)},n[11]=re,n[12]=Ce):Ce=n[12];const Oe=Ce;let B;n[13]!==(N==null?void 0:N.message)||n[14]!==(N==null?void 0:N.name)||n[15]!==E?(B=E&&M.jsx(F.Alert,{variant:"outline",color:"red",title:(N==null?void 0:N.name)??"Fehler aufgetreten",mb:"lg",children:(N==null?void 0:N.message)??"Fehler aufgetreten"}),n[13]=N==null?void 0:N.message,n[14]=N==null?void 0:N.name,n[15]=E,n[16]=B):B=n[16];let k;n[17]!==b||n[18]!==D||n[19]!==re||n[20]!==E||n[21]!==s||n[22]!==d||n[23]!==I||n[24]!==V.length||n[25]!==ne?(k=re.onSubmit(async p=>{if(I)await ne({...p,id:I});else{const g=await D(p);L(g.id),d==null||d(g.id)}V.length&&b<V.length-1?E||C(b+1):E||(re.setInitialValues(p),re.reset(),s())}),n[17]=b,n[18]=D,n[19]=re,n[20]=E,n[21]=s,n[22]=d,n[23]=I,n[24]=V.length,n[25]=ne,n[26]=k):k=n[26];let T;n[27]!==b||n[28]!==r||n[29]!==Oe||n[30]!==h||n[31]!==V?(T=V.length?M.jsx(F.Stepper,{active:b,size:"sm",children:V.map(p=>M.jsx(F.Stepper.Step,{...h&&h[p-1]?{label:h[p-1].label}:{},children:r.filter(g=>g.step===p).map(g=>Oe(g))},p))}):r.map(p=>Oe(p)),n[27]=b,n[28]=r,n[29]=Oe,n[30]=h,n[31]=V,n[32]=T):T=n[32];let m;n[33]!==b||n[34]!==A||n[35]!==le||n[36]!==s||n[37]!==V.length?(m=!A&&M.jsxs(F.Group,{mt:"md",justify:"end",children:[M.jsx(F.Button,{onClick:()=>V.length?b===0?s():C(b-1):s(),variant:"outline",children:V.length?b===0?"Abbrechen":"Zurück":"Abbrechen"}),M.jsx(F.Button,{type:"submit",loading:le,children:V.length?b===V.length-1?"Speichern":"Weiter":"Speichern"})]}),n[33]=b,n[34]=A,n[35]=le,n[36]=s,n[37]=V.length,n[38]=m):m=n[38];let f;n[39]!==m||n[40]!==k||n[41]!==T?(f=M.jsxs("form",{onSubmit:k,children:[T,m]}),n[39]=m,n[40]=k,n[41]=T,n[42]=f):f=n[42];let w;return n[43]!==f||n[44]!==B?(w=M.jsxs(M.Fragment,{children:[B,f]}),n[43]=f,n[44]=B,n[45]=w):w=n[45],w}function Q1(i,n){return i[n.id]=J1,i}function J1(i){return i?null:"Pflichtfeld"}function X1(i){return i.required}function e0(i,n){return i[n.id]=n.type==="boolean"?!1:n.defaultValue??"",i}function t0(i){return i.step}function n0(i){return typeof i.step=="number"}var[r0,Ma]=F.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),zc=i=>{let{children:n,columnsOrder:r,setColumnsOrder:s,columnsToggle:l,setColumnsToggle:v,resetColumnsOrder:h,resetColumnsToggle:d,setColumnWidth:b,resetColumnsWidth:C}=i,[A,R]=ye.useState(""),[I,L]=ye.useState("");return M.jsx(r0,{value:{sourceColumn:A,setSourceColumn:R,targetColumn:I,setTargetColumn:L,columnsToggle:l,setColumnsToggle:v,swapColumns:()=>{if(!r||!s||!A||!I)return;let D=r.indexOf(A),E=r.indexOf(I);if(D!==-1&&E!==-1){let N=r.splice(D,1)[0];r.splice(E,0,N),s([...r])}},resetColumnsOrder:h,resetColumnsToggle:d,setColumnWidth:b,resetColumnsWidth:C},children:n})};function i0(){return M.jsx("tr",{className:"mantine-datatable-empty-row",children:M.jsx("td",{})})}function o0(){return M.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),M.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),M.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),M.jsx("path",{d:"M3 3l18 18"})]})}function s0({icon:i,text:n,pt:r,pb:s,active:l,children:v}){return M.jsx(F.Center,{pt:r,pb:s,className:"mantine-datatable-empty-state","data-active":l||void 0,children:v||M.jsxs(M.Fragment,{children:[i||M.jsx("div",{className:"mantine-datatable-empty-state-icon",children:M.jsx(o0,{})}),M.jsx(F.Text,{component:"div",size:"sm",c:"dimmed",children:n})]})})}var a0=({key:i,columns:n=[],getInitialValueInEffect:r=!0})=>{function s(G,ue){let V=[];return G.forEach(ae=>{ue.find(oe=>oe.accessor===ae)&&V.push(ae)}),ue.forEach(ae=>{V.includes(ae.accessor)||V.push(ae.accessor)}),V}function l(G,ue){let V=[];return G.forEach(ae=>{ue.find(oe=>oe.accessor===ae.accessor)&&V.push(ae)}),ue.forEach(ae=>{V.find(oe=>oe.accessor===ae.accessor)||V.push({accessor:ae.accessor,defaultToggle:ae.defaultToggle||!0,toggleable:ae.toggleable,toggled:ae.defaultToggle===void 0?!0:ae.defaultToggle})}),V}function v(G,ue){let V=[];return G.forEach(ae=>{let oe=Object.keys(ae)[0];ue.find(pe=>pe.accessor===oe)&&V.push(ae)}),ue.forEach(ae=>{let oe=ae.accessor;if(!V.find(pe=>Object.keys(pe)[0]===oe)){let pe={};pe[oe]="",V.push(pe)}}),V}function h(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-order`:"",defaultValue:i?C:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=s(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[ae,V]}function d(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-toggle`:"",defaultValue:i?R:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=l(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[l(G,n),V]}function b(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-width`:"",defaultValue:i?A:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=v(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[v(G,n),V]}let C=n&&n.map(G=>G.accessor)||[],A=n&&n.map(G=>({[G.accessor]:G.width??"initial"}))||[],R=n&&n.map(G=>({accessor:G.accessor,defaultToggle:G.defaultToggle||!0,toggleable:G.toggleable,toggled:G.defaultToggle===void 0?!0:G.defaultToggle})),[I,L]=h(),[D,E]=d(),[N,ee]=b(),ne=()=>L(C),K=()=>{E(R)},le=()=>ee(A);return{effectiveColumns:ye.useMemo(()=>I?I.map(G=>n.find(ue=>ue.accessor===G)).map(G=>{var ue;return{...G,hidden:(G==null?void 0:G.hidden)||!((ue=D.find(V=>V.accessor===(G==null?void 0:G.accessor)))!=null&&ue.toggled)}}).map(G=>{var ue;return{...G,width:(ue=N.find(V=>V[G==null?void 0:G.accessor]))==null?void 0:ue[G==null?void 0:G.accessor]}}):n,[n,I,D,N]),setColumnsOrder:L,columnsOrder:I,resetColumnsOrder:ne,columnsToggle:D,setColumnsToggle:E,resetColumnsToggle:K,columnsWidth:N,setColumnsWidth:ee,setColumnWidth:(G,ue)=>{let V=N.map(ae=>ae[G]?{[G]:ue}:ae);ee(V)},resetColumnsWidth:le}};function Jr(){var s;let[i]=Ot.useResizeObserver(),{width:n,height:r}=((s=i.current)==null?void 0:s.getBoundingClientRect())||{width:0,height:0};return{ref:i,width:n,height:r}}var u0=typeof window<"u"?ye.useLayoutEffect:ye.useEffect;function l0(i){let[n,r]=ye.useState(null),s=(i==null?void 0:i.join(":"))||"";return ye.useEffect(()=>{r(null)},[s]),{lastSelectionChangeIndex:n,setLastSelectionChangeIndex:r}}function c0(i,n){let r=()=>{n(i.map(l=>l.matches))},s=i.map(l=>{try{return l.addEventListener("change",r),()=>l.removeEventListener("change",r)}catch{return l.addListener(r),()=>l.removeListener(r)}});return()=>{s.forEach(l=>l())}}function f0(i,n){return n||(typeof window<"u"&&"matchMedia"in window?i.map(r=>window.matchMedia(r).matches):i.map(()=>!1))}function h0(i,n,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[s,l]=ye.useState(r?n:f0(i,n)),v=ye.useRef(null);return ye.useEffect(()=>{if("matchMedia"in window)return v.current=i.map(h=>window.matchMedia(h)),l(v.current.map(h=>h.matches)),c0(v.current,h=>{l(h)})},[i]),s}function d0(i){let n=F.useMantineTheme(),r=ye.useMemo(()=>i.map(l=>(typeof l=="function"?l(n):l)??""),[i,n]),s=ye.useMemo(()=>i.map(()=>!0),[i]);return h0(r,s)}function Qo(i){let n=F.useMantineTheme(),r=typeof i=="function"?i(n):i;return Ot.useMediaQuery(r||"",!0)}function Ra(i){let n=i.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function p0(i,n,r){return i.filter(s=>!n.map(r).includes(r(s)))}function La(i,n){return i.filter((r,s,l)=>s===l.findIndex(v=>n(r)===n(v)))}function Fc(i,n){return n?n.match(/([^[.\]])+/g).reduce((r,s)=>r&&r[s],i):void 0}function Bt(i,n){return typeof n=="string"?Fc(i,n):n(i)}function g0({rowExpansion:i,records:n,idAccessor:r}){let s=[];if(i&&n){let{trigger:d,allowMultiple:b,initiallyExpanded:C}=i;n&&d==="always"?s=n.map(A=>Bt(A,r)):C&&(s=n.filter((A,R)=>C({record:A,index:R})).map(A=>Bt(A,r)),b||(s=[s[0]]))}let l,v,h=ye.useState(s);if(i){let{expandable:d,trigger:b,allowMultiple:C,collapseProps:A,content:R}=i;i.expanded?{recordIds:l,onRecordIdsChange:v}=i.expanded:[l,v]=h;let I=L=>v==null?void 0:v(l.filter(D=>D!==Bt(L,r)));return{expandOnClick:b!=="always"&&b!=="never",isRowExpanded:L=>b==="always"?!0:l.includes(Bt(L,r)),isExpandable:({record:L,index:D})=>d?d({record:L,index:D}):!0,expandRow:L=>{let D=Bt(L,r);v==null||v(C?[...l,D]:[D])},collapseRow:I,collapseProps:A,content:({record:L,index:D})=>()=>R({record:L,index:D,collapse:()=>I(L)})}}}function v0(i,n){let[r,s]=ye.useState(i),[l,v]=ye.useState(i),h=Ot.useTimeout(()=>s(!0),0),d=Ot.useTimeout(()=>v(!1),n||200);return ye.useEffect(()=>{i?(d.clear(),v(!0),h.start()):(h.clear(),s(!1),d.start())},[h,d,i]),{expanded:r,visible:l}}var Ia="mantine-datatable-nowrap",ka="mantine-datatable-ellipsis",Xr="mantine-datatable-pointer-cursor",Wc="mantine-datatable-context-menu-cursor",m0="mantine-datatable-text-selection-disabled",Jo="mantine-datatable-text-align-left",Xo="mantine-datatable-text-align-center",es="mantine-datatable-text-align-right";function y0({className:i,style:n,visibleMediaQuery:r,title:s,noWrap:l,ellipsis:v,textAlign:h,width:d}){return Qo(r)?M.jsx(F.TableTh,{className:mt({[Ia]:l||v,[ka]:v,[Jo]:h==="left",[Xo]:h==="center",[es]:h==="right"},i),style:[{width:d,minWidth:d,maxWidth:d},n],children:s}):null}function w0({shadowVisible:i}){return M.jsx(F.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":i||void 0})}var _0=ye.forwardRef(function({className:i,style:n,columns:r,defaultColumnProps:s,selectionVisible:l,selectorCellShadowVisible:v,scrollDiff:h},d){let b=h<0;return M.jsx(F.TableTfoot,{ref:d,className:mt("mantine-datatable-footer",i),style:[{position:b?"relative":"sticky",bottom:F.rem(b?h:0)},n],children:M.jsxs(F.TableTr,{children:[l&&M.jsx(w0,{shadowVisible:v}),r.map(({hidden:C,...A})=>{if(C)return null;let{accessor:R,visibleMediaQuery:I,textAlign:L,width:D,footer:E,footerClassName:N,footerStyle:ee,noWrap:ne,ellipsis:K}={...s,...A};return M.jsx(y0,{className:N,style:ee,visibleMediaQuery:I,textAlign:L,width:D,title:E,noWrap:ne,ellipsis:K},R)})]})})});function b0({group:{id:i,columns:n,title:r,textAlign:s,className:l,style:v}}){let h=ye.useMemo(()=>n.map(({visibleMediaQuery:C})=>C),[n]),d=d0(h),b=ye.useMemo(()=>n.filter(({hidden:C},A)=>!C&&(d==null?void 0:d[A])).length,[n,d]);return b>0?M.jsx(F.TableTh,{colSpan:b,className:mt("mantine-datatable-column-group-header-cell",{[Jo]:s==="left",[Xo]:s==="center",[es]:s==="right"},l),style:v,children:r??Ra(i)}):null}function x0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function S0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function C0({children:i,isActive:n,filterPopoverProps:r}){let[s,{close:l,toggle:v}]=Ot.useDisclosure(!1),h=n?S0:x0,d=Ot.useClickOutside(l);return M.jsxs(F.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[M.jsx(F.PopoverTarget,{children:M.jsx(F.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":n||void 0,size:"sm",variant:"default",onClick:b=>{b.preventDefault(),v()},onKeyDown:b=>b.stopPropagation(),children:M.jsx(h,{})})}),M.jsx(F.PopoverDropdown,{ref:d,onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),children:typeof i=="function"?i({close:l}):i})]})}var A0=i=>{let{accessor:n,columnRef:r}=i,s=ye.useRef(null),[l,v]=ye.useState(0),{setColumnWidth:h}=Ma(),d=A=>{A.preventDefault(),A.stopPropagation(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),document.body.style.cursor="col-resize"},b=A=>{if(!r.current)return;let R=A.clientX-r.current.getBoundingClientRect().right,I=`${r.current.getBoundingClientRect().width+R}px`;r.current.style.width=I,h(n,r.current.style.width),v(-R)},C=()=>{r.current&&(document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),document.body.style.cursor="initial",h(n,r.current.style.width),v(0))};return M.jsx("div",{ref:s,onClick:A=>A.stopPropagation(),onMouseDown:d,onDoubleClick:()=>{r.current&&(r.current.style.maxWidth="initial",r.current.style.minWidth="initial",r.current.style.width="initial",h(n,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:F.rem(l)}})};function O0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M12 5l0 14"}),M.jsx("path",{d:"M16 9l-4 -4"}),M.jsx("path",{d:"M8 9l4 -4"})]})}function T0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M8 7l4 -4l4 4"}),M.jsx("path",{d:"M8 17l4 4l4 -4"}),M.jsx("path",{d:"M12 3l0 18"})]})}function D0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function E0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M18 6l-12 12"}),M.jsx("path",{d:"M6 6l12 12"})]})}function M0({className:i,style:n,accessor:r,visibleMediaQuery:s,title:l,sortable:v,draggable:h,toggleable:d,resizable:b,sortIcons:C,textAlign:A,width:R,sortStatus:I,onSortStatusChange:L,filter:D,filterPopoverProps:E,filtering:N,sortKey:ee}){let{setSourceColumn:ne,setTargetColumn:K,swapColumns:le,setColumnsToggle:G}=Ma(),[ue,V]=ye.useState(!1),ae=ye.useRef(null);if(!Qo(s))return null;let oe=l??Ra(r),pe=typeof oe=="string"?oe:void 0,re=v&&L?f=>{f!=null&&f.defaultPrevented||L({sortKey:ee,columnAccessor:r,direction:(I==null?void 0:I.columnAccessor)===r?I.direction==="asc"?"desc":"asc":(I==null?void 0:I.direction)??"asc"})}:void 0,Ce=f=>{f.stopPropagation(),ne(r),V(!1)},Oe=f=>{f.preventDefault(),K(r),V(!0)},B=()=>{K(r),V(!1),le()},k=()=>{V(!0)},T=()=>{V(!1)},m=f=>{f.stopPropagation(),G(w=>w.map(p=>p.accessor===r?{...p,toggled:!1}:p))};return M.jsxs(F.TableTh,{className:mt({"mantine-datatable-header-cell-sortable":v,"mantine-datatable-header-cell-toggleable":d,"mantine-datatable-header-cell-resizable":b},i),style:[{width:R,...b?{minWidth:"1px"}:{minWidth:R,maxWidth:R}},n],role:v?"button":void 0,tabIndex:v?0:void 0,onClick:re,onKeyDown:f=>f.key==="Enter"&&(re==null?void 0:re()),ref:ae,children:[M.jsxs(F.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[M.jsxs(F.Flex,{align:"center",w:"100%",className:mt({"mantine-datatable-header-cell-draggable":h,"mantine-datatable-header-cell-drag-over":ue}),draggable:h,onDragStart:h?Ce:void 0,onDragEnter:h?k:void 0,onDragOver:h?Oe:void 0,onDrop:h?B:void 0,onDragLeave:h?T:void 0,children:[h?M.jsx(F.Center,{role:"img","aria-label":"Drag column",children:M.jsx(F.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:f=>{f.stopPropagation()},children:M.jsx(D0,{})})}):null,M.jsx(F.Box,{className:mt("mantine-datatable-header-cell-sortable-text",{[Jo]:A==="left",[Xo]:A==="center",[es]:A==="right"},Ia,ka),title:pe,children:oe})]}),d?M.jsx(F.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:M.jsx(F.ActionIcon,{size:"xs",variant:"light",onClick:m,children:M.jsx(E0,{})})}):null,v||(I==null?void 0:I.columnAccessor)===r?M.jsx(M.Fragment,{children:(I==null?void 0:I.columnAccessor)===r?M.jsx(F.Center,{className:mt("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":I.direction==="desc"}),role:"img","aria-label":`Sorted ${I.direction==="desc"?"descending":"ascending"}`,children:(C==null?void 0:C.sorted)||M.jsx(O0,{})}):M.jsx(F.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:(C==null?void 0:C.unsorted)||M.jsx(T0,{})})}):null,D?M.jsx(C0,{filterPopoverProps:E,isActive:!!N,children:D}):null]}),b?M.jsx(A0,{accessor:r,columnRef:ae}):null]})}var R0=ye.forwardRef(function({className:i,style:n,trigger:r,shadowVisible:s,checked:l,indeterminate:v,checkboxProps:h,onChange:d,rowSpan:b},C){let A=!h.disabled;return M.jsx(F.TableTh,{ref:C,className:mt("mantine-datatable-header-selector-cell",{[Xr]:r==="cell"&&A},i),style:n,rowSpan:b,"data-shadow-visible":s||void 0,onClick:r==="cell"&&A?d:void 0,children:M.jsx(F.Checkbox,{classNames:A?{input:Xr}:void 0,checked:l,indeterminate:v,onChange:d,...h,disabled:!(d||h.onChange)||h.disabled})})}),L0=ye.forwardRef(function({selectionColumnHeaderRef:i,className:n,style:r,sortStatus:s,sortIcons:l,onSortStatusChange:v,columns:h,defaultColumnProps:d,groups:b,selectionTrigger:C,selectionVisible:A,selectionChecked:R,selectionIndeterminate:I,onSelectionChange:L,selectionCheckboxProps:D,selectorCellShadowVisible:E,selectionColumnClassName:N,selectionColumnStyle:ee},ne){let K=A?M.jsx(R0,{ref:i,className:N,style:ee,trigger:C,shadowVisible:E,checked:R,indeterminate:I,checkboxProps:D,onChange:L,rowSpan:b?2:void 0}):null,{columnsToggle:le,setColumnsToggle:G}=Ma(),[ue,V]=ye.useState(!1),ae=h.some(re=>re.toggleable),oe=ae?Object.fromEntries(h.map(({accessor:re,title:Ce})=>[re,Ce??Ra(String(re))])):void 0,pe=M.jsxs(F.TableThead,{className:mt("mantine-datatable-header",n),style:r,ref:ne,onContextMenu:ae?re=>{re.preventDefault(),V(Ce=>!Ce)}:void 0,children:[b&&M.jsxs(F.TableTr,{children:[K,b.map(re=>M.jsx(b0,{group:re},re.id))]}),M.jsxs(F.TableTr,{children:[!b&&K,h.map(({hidden:re,...Ce},Oe)=>{if(re)return null;let{accessor:B,visibleMediaQuery:k,textAlign:T,width:m,title:f,sortable:w,draggable:p,toggleable:g,resizable:O,titleClassName:Y,titleStyle:Q,filter:fe,filterPopoverProps:de,filtering:we,sortKey:X}={...d,...Ce};return M.jsx(M0,{accessor:B,className:Y,style:Q,visibleMediaQuery:k,textAlign:T,width:m,title:f,sortable:w,draggable:p,toggleable:g,resizable:O&&Oe<h.length-1,sortStatus:s,sortIcons:l,sortKey:X,onSortStatusChange:v,filter:fe,filterPopoverProps:de,filtering:we},B)})]})]});return ae?M.jsxs(F.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:ue,onChange:V,children:[M.jsx(F.PopoverTarget,{children:pe}),M.jsx(F.PopoverDropdown,{children:M.jsx(F.Stack,{children:le.filter(re=>re.toggleable).map(re=>M.jsx(F.Group,{children:M.jsx(F.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:oe[re.accessor],checked:re.toggled,onChange:Ce=>{G(le.map(Oe=>Oe.accessor===re.accessor?{...Oe,toggled:Ce.currentTarget.checked}:Oe))}})},re.accessor))})})]}):pe});function I0({pt:i,pb:n,fetching:r,customContent:s,backgroundBlur:l,size:v,type:h,color:d}){return M.jsx(F.Center,{pt:i,pb:n,className:mt("mantine-datatable-loader",{"mantine-datatable-loader-fetching":r}),style:[{backdropFilter:l?`blur(${l}px)`:void 0}],children:r&&(s||M.jsx(F.Loader,{size:v,type:h,color:d}))})}function xt(i,n,r){return i?F.parseThemeColor({color:typeof i=="object"?i[r]:i,theme:n}).value:void 0}function k0({theme:i,c:n,backgroundColor:r,borderColor:s,rowBorderColor:l,stripedColor:v,highlightOnHoverColor:h}){return{"--mantine-datatable-color-light":xt(n,i,"light"),"--mantine-datatable-color-dark":xt(n,i,"dark"),"--mantine-datatable-background-color-light":xt(r,i,"light"),"--mantine-datatable-background-color-dark":xt(r,i,"dark"),"--mantine-datatable-border-color-light":xt(s,i,"light"),"--mantine-datatable-border-color-dark":xt(s,i,"dark"),"--mantine-datatable-row-border-color-light":xt(l,i,"light"),"--mantine-datatable-row-border-color-dark":xt(l,i,"dark"),"--mantine-datatable-striped-color-light":xt(v,i,"light"),"--mantine-datatable-striped-color-dark":xt(v,i,"dark"),"--mantine-datatable-highlight-on-hover-color-light":xt(h,i,"light"),"--mantine-datatable-highlight-on-hover-color-dark":xt(h,i,"dark")}}function Yc({theme:i,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":xt(n,i,"light"),"--mantine-datatable-pagination-active-text-color-dark":xt(n,i,"dark"),"--mantine-datatable-pagination-active-background-color-light":xt(r,i,"light"),"--mantine-datatable-pagination-active-background-color-dark":xt(r,i,"dark")}}function P0({theme:i,color:n,backgroundColor:r}){return{"--mantine-datatable-row-color-light":xt(n,i,"light"),"--mantine-datatable-row-color-dark":xt(n,i,"dark"),"--mantine-datatable-row-background-color-light":xt(r,i,"light"),"--mantine-datatable-row-background-color-dark":xt(r,i,"dark")}}function $0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M8 9l4 -4l4 4"}),M.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var qc={xs:F.rem(22),sm:F.rem(26),md:F.rem(32),lg:F.rem(38),xl:F.rem(44)};function N0({size:i,label:n,values:r,value:s,activeTextColor:l,activeBackgroundColor:v,onChange:h}){return M.jsxs(F.Group,{gap:"xs",children:[M.jsx(F.Text,{component:"div",size:i,children:n}),M.jsxs(F.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[M.jsx(F.MenuTarget,{children:M.jsx(F.Button,{size:i,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:M.jsx($0,{}),style:[{fontWeight:"normal"},d=>({height:qc[i],paddingLeft:d.spacing[i],paddingRight:d.spacing[i]})],children:s})}),M.jsx(F.MenuDropdown,{children:r.map(d=>{let b=d===s;return M.jsx(F.MenuItem,{className:mt({"mantine-datatable-page-size-selector-active":b}),style:[{height:qc[i]},b&&(l||v)?C=>Yc({theme:C,paginationActiveTextColor:l,paginationActiveBackgroundColor:v}):void 0],disabled:b,onClick:()=>h(d),children:M.jsx(F.Text,{component:"div",size:i,children:d})},d)})})]})]})}var B0=ye.forwardRef(function({className:i,style:n,fetching:r,page:s,onPageChange:l,paginationWithEdges:v,paginationWithControls:h,paginationActiveTextColor:d,paginationActiveBackgroundColor:b,paginationSize:C,loadingText:A,noRecordsText:R,paginationText:I,totalRecords:L,recordsPerPage:D,onRecordsPerPageChange:E,recordsPerPageLabel:N,recordsPerPageOptions:ee,recordsLength:ne,horizontalSpacing:K,paginationWrapBreakpoint:le,getPaginationControlProps:G},ue){let V;if(L){let oe=(s-1)*D+1,pe=oe+(ne||0)-1;V=I({from:oe,to:pe,totalRecords:L})}else V=r?A:R;let ae=Qo(({breakpoints:oe})=>`(min-width: ${typeof le=="number"?`${F.rem(le)}rem`:oe[le]||le})`);return M.jsxs(F.Box,{ref:ue,px:K??"xs",py:"xs",className:mt("mantine-datatable-pagination",i),style:[{flexDirection:ae?"row":"column"},n],children:[M.jsx(F.Text,{component:"div",className:"mantine-datatable-pagination-text",size:C,children:V}),ee&&M.jsx(N0,{activeTextColor:d,activeBackgroundColor:b,size:C,label:N,values:ee,value:D,onChange:E}),M.jsx(F.Pagination,{classNames:{root:mt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!ne}),control:"mantine-datatable-pagination-pages-control"},style:d||b?oe=>Yc({theme:oe,paginationActiveTextColor:d,paginationActiveBackgroundColor:b}):void 0,withEdges:v,withControls:h,value:s,onChange:l,size:C,total:Math.ceil(L/D),getControlProps:G})]})});function j0({className:i,style:n,visibleMediaQuery:r,record:s,index:l,onClick:v,onDoubleClick:h,onContextMenu:d,noWrap:b,ellipsis:C,textAlign:A,width:R,accessor:I,render:L,defaultRender:D,customCellAttributes:E}){return Qo(r)?M.jsx(F.TableTd,{className:mt({[Ia]:b||C,[ka]:C,[Xr]:v||h,[Wc]:d,[Jo]:A==="left",[Xo]:A==="center",[es]:A==="right"},i),style:[{width:R,minWidth:R,maxWidth:R},n],onClick:v,onDoubleClick:h,onContextMenu:d,...E==null?void 0:E(s,l),children:L?L(s,l):D?D(s,l,I):Fc(s,I)}):null}function U0({open:i,colSpan:n,content:r,collapseProps:s}){let{expanded:l,visible:v}=v0(i,s==null?void 0:s.transitionDuration);return v?M.jsxs(M.Fragment,{children:[M.jsx(F.TableTr,{}),M.jsx(F.TableTr,{children:M.jsx(F.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:n,children:M.jsx(F.Collapse,{in:l,...s,children:M.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function z0({className:i,style:n,record:r,index:s,trigger:l,onChange:v,withRightShadow:h,checkboxProps:d,getCheckboxProps:b,...C}){let A={...d,...b(r,s)},R=!C.disabled&&!A.disabled,I=L=>{L.stopPropagation(),l==="cell"&&R&&(v==null||v(L))};return M.jsx(F.TableTd,{className:mt("mantine-datatable-row-selector-cell",{[Xr]:l==="cell"&&R},i),style:n,"data-shadow-visible":h||void 0,onClick:I,children:M.jsx(F.Checkbox,{classNames:R?{input:Xr}:void 0,onChange:v,...C,...A})})}function F0({record:i,index:n,columns:r,defaultColumnProps:s,defaultColumnRender:l,selectionTrigger:v,selectionVisible:h,selectionChecked:d,onSelectionChange:b,isRecordSelectable:C,selectionCheckboxProps:A,getSelectionCheckboxProps:R,onClick:I,onDoubleClick:L,onContextMenu:D,onCellClick:E,onCellDoubleClick:N,onCellContextMenu:ee,expansion:ne,customAttributes:K,color:le,backgroundColor:G,className:ue,style:V,selectorCellShadowVisible:ae,selectionColumnClassName:oe,selectionColumnStyle:pe,rowFactory:re}){let Ce=M.jsxs(M.Fragment,{children:[h&&M.jsx(z0,{className:oe,style:pe,record:i,index:n,trigger:v,withRightShadow:ae,checked:d,disabled:!b||(C?!C(i,n):!1),onChange:b,checkboxProps:A,getCheckboxProps:R}),r.map(({hidden:k,hiddenContent:T,...m},f)=>{if(k||T)return null;let{accessor:w,visibleMediaQuery:p,textAlign:g,noWrap:O,ellipsis:Y,width:Q,render:fe,cellsClassName:de,cellsStyle:we,customCellAttributes:X}={...s,...m};return M.jsx(j0,{className:typeof de=="function"?de(i,n):de,style:we==null?void 0:we(i,n),visibleMediaQuery:p,record:i,index:n,onClick:E?ce=>E({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,onDoubleClick:N?ce=>N({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,onContextMenu:ee?ce=>ee({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,accessor:w,textAlign:g,noWrap:O,ellipsis:Y,width:Q,render:fe,defaultRender:l,customCellAttributes:X},w)})]}),Oe=ne&&M.jsx(U0,{colSpan:r.filter(({hidden:k})=>!k).length+(h?1:0),open:ne.isRowExpanded(i),content:ne.content({record:i,index:n}),collapseProps:ne.collapseProps}),B=W0({record:i,index:n,selectionChecked:d,onClick:I,onDoubleClick:L,onContextMenu:D,expansion:ne,customAttributes:K,color:le,backgroundColor:G,className:ue,style:V});return re?re({record:i,index:n,rowProps:B,children:Ce,expandedElement:Oe}):M.jsxs(M.Fragment,{children:[M.jsx(F.TableTr,{...B,children:Ce}),Oe]})}function W0({record:i,index:n,selectionChecked:r,onClick:s,onDoubleClick:l,onContextMenu:v,expansion:h,customAttributes:d,color:b,backgroundColor:C,className:A,style:R}){return{className:mt("mantine-datatable-row",{[Xr]:s||l||(h==null?void 0:h.isExpandable({record:i,index:n}))&&(h==null?void 0:h.expandOnClick)},{[Wc]:v},typeof A=="function"?A(i,n):A),"data-selected":r||void 0,onClick:I=>{if(h){let{isExpandable:L,isRowExpanded:D,expandOnClick:E,expandRow:N,collapseRow:ee}=h;L({record:i,index:n})&&E&&(D(i)?ee(i):N(i))}s==null||s({event:I,record:i,index:n})},onDoubleClick:l?I=>l({event:I,record:i,index:n}):void 0,onContextMenu:v?I=>v({event:I,record:i,index:n}):void 0,style:[b||C?I=>{let L=b==null?void 0:b(i,n),D=C==null?void 0:C(i,n);return P0({theme:I,color:L,backgroundColor:D})}:void 0,R==null?void 0:R(i,n)],...(d==null?void 0:d(i,n))??{}}}function Y0({topShadowVisible:i,leftShadowVisible:n,leftShadowBehind:r,rightShadowVisible:s,rightShadowBehind:l,bottomShadowVisible:v,headerHeight:h,footerHeight:d,onScrollPositionChange:b,children:C,viewportRef:A,scrollAreaProps:R}){return M.jsxs(F.ScrollArea,{...R,viewportRef:A,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:b,children:[C,M.jsx(F.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":i}),style:{top:h?F.rem(h):0}}),M.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":r})}),M.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":s,"mantine-datatable-scroll-area-shadow-behind":l})}),M.jsx(F.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":v}),style:{bottom:d?F.rem(d+1):0}})]})}function q0({withTableBorder:i,borderRadius:n,textSelectionDisabled:r,height:s="100%",minHeight:l,maxHeight:v,shadow:h,verticalAlign:d="center",fetching:b,columns:C,storeColumnsKey:A,groups:R,pinFirstColumn:I,pinLastColumn:L,defaultColumnProps:D,defaultColumnRender:E,idAccessor:N="id",records:ee,selectionTrigger:ne="checkbox",selectedRecords:K,onSelectedRecordsChange:le,selectionColumnClassName:G,selectionColumnStyle:ue,isRecordSelectable:V,selectionCheckboxProps:ae,allRecordsSelectionCheckboxProps:oe={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:pe=(qt,zn)=>({"aria-label":`Select record ${zn+1}`}),sortStatus:re,sortIcons:Ce,onSortStatusChange:Oe,horizontalSpacing:B,page:k,onPageChange:T,totalRecords:m,recordsPerPage:f,onRecordsPerPageChange:w,recordsPerPageOptions:p,recordsPerPageLabel:g="Records per page",paginationWithEdges:O,paginationWithControls:Y,paginationActiveTextColor:Q,paginationActiveBackgroundColor:fe,paginationSize:de="sm",paginationText:we=({from:qt,to:zn,totalRecords:Fn})=>`${qt} - ${zn} / ${Fn}`,paginationWrapBreakpoint:X="sm",getPaginationControlProps:ce=qt=>qt==="previous"?{"aria-label":"Previous page"}:qt==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Ae,customLoader:be,loaderSize:U,loaderType:q,loaderColor:W,loadingText:J="...",emptyState:se,noRecordsText:Te="No records",noRecordsIcon:u,highlightOnHover:c,striped:_,noHeader:$,onRowClick:j,onRowDoubleClick:te,onRowContextMenu:xe,onCellClick:De,onCellDoubleClick:Re,onCellContextMenu:Se,onScroll:ke,onScrollToTop:$e,onScrollToBottom:Le,onScrollToLeft:Ke,onScrollToRight:Ge,c:ot,backgroundColor:gt,borderColor:yt,rowBorderColor:ct,stripedColor:Et,highlightOnHoverColor:Rn,rowColor:un,rowBackgroundColor:St,rowExpansion:Sn,rowClassName:Ln,rowStyle:In,customRowAttributes:ln,scrollViewportRef:cn,scrollAreaProps:fn,tableRef:st,bodyRef:rt,m:Mt,my:ai,mx:kn,mt:ui,mb:hr,ml:li,mr:ci,className:Pa,classNames:Rt,style:$a,styles:Lt,rowFactory:Na,tableWrapper:Hi,...Gi}){let{ref:qt,width:zn,height:Fn}=Jr(),Pr=ye.useMemo(()=>(R==null?void 0:R.flatMap(Ze=>Ze.columns))??C,[C,R]),ns=a0({key:A,columns:Pr}),{ref:Ba,height:dr}=Jr(),{ref:ja,width:pr,height:$r}=Jr(),{ref:Ua,height:za}=Jr(),{ref:rs,height:Vi}=Jr(),{ref:is,width:Fa}=Jr(),Wa=Ot.useMergedRef(ja,st),Ya=Ot.useMergedRef(qt,cn),[Zi,Ki]=ye.useState(!0),[fi,Qi]=ye.useState(!0),[Wn,os]=ye.useState(!0),[Nr,Br]=ye.useState(!0),ss=g0({rowExpansion:Sn,records:ee,idAccessor:N}),Ji=ye.useCallback(()=>{var vr,mr;let Ze=((vr=qt.current)==null?void 0:vr.scrollTop)??0,Kt=((mr=qt.current)==null?void 0:mr.scrollLeft)??0;if(b||$r<=Fn)Ki(!0),Qi(!0);else{let hn=Ze===0,Qt=$r-Ze-Fn<1;Ki(hn),Qi(Qt),hn&&hn!==Zi&&($e==null||$e()),Qt&&Qt!==fi&&(Le==null||Le())}if(b||pr===zn)os(!0),Br(!0);else{let hn=Kt===0,Qt=pr-Kt-zn<1;os(hn),Br(Qt),hn&&hn!==Wn&&(Ke==null||Ke()),Qt&&Qt!==Nr&&(Ge==null||Ge())}},[b,Le,Ke,Ge,$e,Fn,qt,zn,fi,Wn,Nr,Zi,$r,pr]);u0(Ji,[Ji]);let Xi=Ot.useDebouncedCallback(Ji,50),as=ye.useCallback(Ze=>{ke==null||ke(Ze),Xi()},[Xi,ke]),eo=ye.useCallback(Ze=>{var Kt;(Kt=qt.current)==null||Kt.scrollTo({top:0,left:0}),T(Ze)},[T,qt]),hi=ee==null?void 0:ee.length,to=ee==null?void 0:ee.map(Ze=>Bt(Ze,N)),Pn=!!K,Cn=K==null?void 0:K.map(Ze=>Bt(Ze,N)),Yn=to!==void 0&&Cn!==void 0&&Cn.length>0,gr=V?ee==null?void 0:ee.filter(V):ee,jr=gr==null?void 0:gr.map(Ze=>Bt(Ze,N)),di=Yn&&jr.every(Ze=>Cn.includes(Ze)),us=Yn&&jr.some(Ze=>Cn.includes(Ze)),ls=ye.useCallback(()=>{K&&le&&le(di?K.filter(Ze=>!jr.includes(Bt(Ze,N))):La([...K,...gr],Ze=>Bt(Ze,N)))},[di,N,le,jr,gr,K]),{lastSelectionChangeIndex:Ur,setLastSelectionChangeIndex:cs}=l0(to),no=Pn&&!Wn&&!I,qa={m:Mt,my:ai,mx:kn,mt:ui,mb:hr,ml:li,mr:ci},Ha=ye.useCallback(({children:Ze})=>Hi?Hi({children:Ze}):Ze,[Hi]);return M.jsx(zc,{...ns,children:M.jsxs(F.Box,{...qa,className:mt("mantine-datatable",{"mantine-datatable-with-border":i},Pa,Rt==null?void 0:Rt.root),style:[Ze=>({...k0({theme:Ze,c:ot,backgroundColor:gt,borderColor:yt,rowBorderColor:ct,stripedColor:Et,highlightOnHoverColor:Rn}),borderRadius:Ze.radius[n]||n,boxShadow:Ze.shadows[h]||h,height:s,minHeight:l,maxHeight:v}),$a,Lt==null?void 0:Lt.root,{position:"relative"}],children:[M.jsx(Y0,{viewportRef:Ya,topShadowVisible:!Zi,leftShadowVisible:!Wn,leftShadowBehind:Pn||!!I,rightShadowVisible:!Nr,rightShadowBehind:L,bottomShadowVisible:!fi,headerHeight:dr,footerHeight:za,onScrollPositionChange:as,scrollAreaProps:fn,children:M.jsx(Ha,{children:M.jsxs(F.Table,{ref:Wa,horizontalSpacing:B,className:mt("mantine-datatable-table",{[m0]:r,"mantine-datatable-vertical-align-top":d==="top","mantine-datatable-vertical-align-bottom":d==="bottom","mantine-datatable-last-row-border-bottom-visible":Gi.withRowBorders&&$r<Fn,"mantine-datatable-pin-last-column":L,"mantine-datatable-pin-last-column-scrolled":!Nr&&L,"mantine-datatable-selection-column-visible":Pn,"mantine-datatable-pin-first-column":I,"mantine-datatable-pin-first-column-scrolled":!Wn&&I},Rt==null?void 0:Rt.table),style:{...Lt==null?void 0:Lt.table,"--mantine-datatable-selection-column-width":`${Fa}px`},"data-striped":hi&&_||void 0,"data-highlight-on-hover":c||void 0,...Gi,children:[$?null:M.jsx(zc,{...ns,children:M.jsx(L0,{ref:Ba,selectionColumnHeaderRef:is,className:Rt==null?void 0:Rt.header,style:Lt==null?void 0:Lt.header,columns:Pr,defaultColumnProps:D,groups:R,sortStatus:re,sortIcons:Ce,onSortStatusChange:Oe,selectionTrigger:ne,selectionVisible:Pn,selectionChecked:di,selectionIndeterminate:us&&!di,onSelectionChange:ls,selectionCheckboxProps:{...ae,...oe},selectorCellShadowVisible:no,selectionColumnClassName:G,selectionColumnStyle:ue})}),M.jsx("tbody",{ref:rt,children:hi?ee.map((Ze,Kt)=>{let vr=Bt(Ze,N),mr=(Cn==null?void 0:Cn.includes(vr))||!1,hn;return le&&K&&(hn=Qt=>{if(Qt.nativeEvent.shiftKey&&Ur!==null){let yr=ee.filter(Kt>Ur?(qn,Hn)=>Hn>=Ur&&Hn<=Kt&&(V?V(qn,Hn):!0):(qn,Hn)=>Hn>=Kt&&Hn<=Ur&&(V?V(qn,Hn):!0));le(mr?p0(K,yr,qn=>Bt(qn,N)):La([...K,...yr],qn=>Bt(qn,N)))}else le(mr?K.filter(yr=>Bt(yr,N)!==vr):La([...K,Ze],yr=>Bt(yr,N)));cs(Kt)}),M.jsx(F0,{record:Ze,index:Kt,columns:Pr,defaultColumnProps:D,defaultColumnRender:E,selectionTrigger:ne,selectionVisible:Pn,selectionChecked:mr,onSelectionChange:hn,isRecordSelectable:V,selectionCheckboxProps:ae,getSelectionCheckboxProps:pe,onClick:j,onDoubleClick:te,onCellClick:De,onCellDoubleClick:Re,onContextMenu:xe,onCellContextMenu:Se,expansion:ss,color:un,backgroundColor:St,className:Ln,style:In,customAttributes:ln,selectorCellShadowVisible:no,selectionColumnClassName:G,selectionColumnStyle:ue,idAccessor:N,rowFactory:Na},vr)}):M.jsx(i0,{})}),Pr.some(({footer:Ze})=>Ze)&&M.jsx(_0,{ref:Ua,className:Rt==null?void 0:Rt.footer,style:Lt==null?void 0:Lt.footer,columns:Pr,defaultColumnProps:D,selectionVisible:Pn,selectorCellShadowVisible:no,scrollDiff:$r-Fn})]})})}),k&&M.jsx(B0,{ref:rs,className:Rt==null?void 0:Rt.pagination,style:Lt==null?void 0:Lt.pagination,horizontalSpacing:B,fetching:b,page:k,onPageChange:eo,totalRecords:m,recordsPerPage:f,onRecordsPerPageChange:w,recordsPerPageOptions:p,recordsPerPageLabel:g,paginationWithEdges:O,paginationWithControls:Y,paginationActiveTextColor:Q,paginationActiveBackgroundColor:fe,paginationSize:de,paginationText:we,paginationWrapBreakpoint:X,getPaginationControlProps:ce,noRecordsText:Te,loadingText:J,recordsLength:hi}),M.jsx(I0,{pt:dr,pb:Vi,fetching:b,backgroundBlur:Ae,customContent:be,size:U,type:q,color:W}),M.jsx(s0,{pt:dr,pb:Vi,icon:u,text:Te,active:!b&&!hi,children:se})]})})}var H0=ye.forwardRef(function({children:i,isDragging:n,...r},s){let l=ye.useRef(null),v=Ot.useMergedRef(l,s);return ye.useEffect(()=>{if(!l.current||!n)return;let h=l.current.parentElement.parentElement.children[0].children[0];for(let d=0;d<h.children.length;d++){let b=h.children[d].getBoundingClientRect(),C=l.current.children[d];C.style.height=b.height+"px",C.style.width=b.width+"px",C.style.minWidth=b.width+"px",C.style.maxWidth=b.width+"px"}},[n,i]),M.jsx(F.TableTr,{"data-is-dragging":n,ref:v,...r,children:i})});H0.displayName="DataTableDraggableRow";var Wi={exports:{}};/**
|
|
117
|
+
`+g,b(`data:${Oe(f)};charset=utf-8,${encodeURIComponent(g)}`,`${w}.svg`)}else b(p.toDataURL(Oe(f)),`${w}.${f}`)}}const k=B})(),v.default})())}(Sa)),Sa.exports}Pg();function $g(){const i=localStorage.getItem("a360.assumed-org");return i?{"X-Assume-Org":i}:{}}async function Er(){return{"Content-Type":"application/json",Authorization:`Bearer ${await Cg()??""}`,...$g()}}async function cc(i){return fetch(i,{method:"GET",headers:await Er()}).then(async n=>{if(n.status>=400)throw await n.text();return n}).then(n=>n.json()).then(n=>n)}async function fc(i,n){return fetch(`${i}/${n}`,{method:"GET",headers:await Er()}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.json()).then(r=>r)}async function hc(i,n){await fetch(`${i}/${n}`,{method:"DELETE",headers:await Er()}).then(async r=>{if(r.status>=400)throw await r.text();return r})}async function dc(i,n){return fetch(i,{method:"POST",headers:await Er(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}async function Ng(i,n,r){return fetch(n,{method:i,headers:await Er(),body:r?JSON.stringify(r):void 0}).then(async s=>{if(s.status>=400)throw await s.text();return s}).then(s=>{if(s.status!=204)return s.json()}).then(s=>s)}async function pc(i,n){return fetch(`${i}/${n.id}`,{method:"PUT",headers:await Er(),body:JSON.stringify(n)}).then(async r=>{if(r.status>=400)throw await r.text();return r}).then(r=>r.status==204?n:r.json()).then(r=>r)}function gc(i,n,r){const s=bn.c(12);let l;if(s[0]!==r||s[1]!==n){let b;s[3]!==r?(b=r==null?void 0:r.toString(),s[3]=r,s[4]=b):b=s[4],l=[...n.map(Bg),String(b)],s[0]=r,s[1]=n,s[2]=l}else l=s[2];let v;s[5]!==i||s[6]!==r?(v=()=>fc(i,r),s[5]=i,s[6]=r,s[7]=v):v=s[7];const h=!!r;let d;return s[8]!==l||s[9]!==v||s[10]!==h?(d={queryKey:l,queryFn:v,enabled:h},s[8]=l,s[9]=v,s[10]=h,s[11]=d):d=s[11],Al(d)}function Bg(i){return i.toString()}function vc(i,n){const r=bn.c(7);let s;r[0]!==n?(s=[...n.map(jg)],r[0]=n,r[1]=s):s=r[1];let l;r[2]!==i?(l=()=>cc(i),r[2]=i,r[3]=l):l=r[3];let v;return r[4]!==s||r[5]!==l?(v={queryKey:s,queryFn:l},r[4]=s,r[5]=l,r[6]=v):v=r[6],Al(v)}function jg(i){return i.toString()}function mc(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(zg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>dc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Ug)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Ug(i){return i.toString()}function zg(i){return i.toString()}function Ca(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(Wg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>pc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Fg)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Fg(i){return i.toString()}function Wg(i){return i.toString()}function yc(i,n){const r=bn.c(9),s=Li();let l;r[0]!==n?(l=[...n.map(qg)],r[0]=n,r[1]=l):l=r[1];let v;r[2]!==i?(v=d=>hc(i,d),r[2]=i,r[3]=v):v=r[3];let h;return r[4]!==s||r[5]!==n||r[6]!==l||r[7]!==v?(h={mutationKey:l,mutationFn:v,onSettled(){s.invalidateQueries({queryKey:[...n.map(Yg)]})}},r[4]=s,r[5]=n,r[6]=l,r[7]=v,r[8]=h):h=r[8],ia(h)}function Yg(i){return i.toString()}function qg(i){return i.toString()}var Po={exports:{}},Hg=Po.exports,wc;function Gg(){return wc||(wc=1,function(i,n){(function(r,s){i.exports=s()})(Hg,function(){var r=1e3,s=6e4,l=36e5,v="millisecond",h="second",d="minute",b="hour",C="day",A="week",R="month",I="quarter",L="year",D="date",E="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ee=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ne={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var k=["th","st","nd","rd"],T=B%100;return"["+B+(k[(T-20)%10]||k[T]||k[0])+"]"}},K=function(B,k,T){var m=String(B);return!m||m.length>=k?B:""+Array(k+1-m.length).join(T)+B},le={s:K,z:function(B){var k=-B.utcOffset(),T=Math.abs(k),m=Math.floor(T/60),f=T%60;return(k<=0?"+":"-")+K(m,2,"0")+":"+K(f,2,"0")},m:function B(k,T){if(k.date()<T.date())return-B(T,k);var m=12*(T.year()-k.year())+(T.month()-k.month()),f=k.clone().add(m,R),w=T-f<0,p=k.clone().add(m+(w?-1:1),R);return+(-(m+(T-f)/(w?f-p:p-f))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:R,y:L,w:A,d:C,D,h:b,m:d,s:h,ms:v,Q:I}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},G="en",ue={};ue[G]=ne;var V="$isDayjsObject",ae=function(B){return B instanceof Ce||!(!B||!B[V])},oe=function B(k,T,m){var f;if(!k)return G;if(typeof k=="string"){var w=k.toLowerCase();ue[w]&&(f=w),T&&(ue[w]=T,f=w);var p=k.split("-");if(!f&&p.length>1)return B(p[0])}else{var g=k.name;ue[g]=k,f=g}return!m&&f&&(G=f),f||!m&&G},pe=function(B,k){if(ae(B))return B.clone();var T=typeof k=="object"?k:{};return T.date=B,T.args=arguments,new Ce(T)},re=le;re.l=oe,re.i=ae,re.w=function(B,k){return pe(B,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var Ce=function(){function B(T){this.$L=oe(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[V]=!0}var k=B.prototype;return k.parse=function(T){this.$d=function(m){var f=m.date,w=m.utc;if(f===null)return new Date(NaN);if(re.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var p=f.match(N);if(p){var g=p[2]-1||0,O=(p[7]||"0").substring(0,3);return w?new Date(Date.UTC(p[1],g,p[3]||1,p[4]||0,p[5]||0,p[6]||0,O)):new Date(p[1],g,p[3]||1,p[4]||0,p[5]||0,p[6]||0,O)}}return new Date(f)}(T),this.init()},k.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},k.$utils=function(){return re},k.isValid=function(){return this.$d.toString()!==E},k.isSame=function(T,m){var f=pe(T);return this.startOf(m)<=f&&f<=this.endOf(m)},k.isAfter=function(T,m){return pe(T)<this.startOf(m)},k.isBefore=function(T,m){return this.endOf(m)<pe(T)},k.$g=function(T,m,f){return re.u(T)?this[m]:this.set(f,T)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(T,m){var f=this,w=!!re.u(m)||m,p=re.p(T),g=function(ce,Ae){var be=re.w(f.$u?Date.UTC(f.$y,Ae,ce):new Date(f.$y,Ae,ce),f);return w?be:be.endOf(C)},O=function(ce,Ae){return re.w(f.toDate()[ce].apply(f.toDate("s"),(w?[0,0,0,0]:[23,59,59,999]).slice(Ae)),f)},Y=this.$W,Q=this.$M,fe=this.$D,de="set"+(this.$u?"UTC":"");switch(p){case L:return w?g(1,0):g(31,11);case R:return w?g(1,Q):g(0,Q+1);case A:var we=this.$locale().weekStart||0,X=(Y<we?Y+7:Y)-we;return g(w?fe-X:fe+(6-X),Q);case C:case D:return O(de+"Hours",0);case b:return O(de+"Minutes",1);case d:return O(de+"Seconds",2);case h:return O(de+"Milliseconds",3);default:return this.clone()}},k.endOf=function(T){return this.startOf(T,!1)},k.$set=function(T,m){var f,w=re.p(T),p="set"+(this.$u?"UTC":""),g=(f={},f[C]=p+"Date",f[D]=p+"Date",f[R]=p+"Month",f[L]=p+"FullYear",f[b]=p+"Hours",f[d]=p+"Minutes",f[h]=p+"Seconds",f[v]=p+"Milliseconds",f)[w],O=w===C?this.$D+(m-this.$W):m;if(w===R||w===L){var Y=this.clone().set(D,1);Y.$d[g](O),Y.init(),this.$d=Y.set(D,Math.min(this.$D,Y.daysInMonth())).$d}else g&&this.$d[g](O);return this.init(),this},k.set=function(T,m){return this.clone().$set(T,m)},k.get=function(T){return this[re.p(T)]()},k.add=function(T,m){var f,w=this;T=Number(T);var p=re.p(m),g=function(Q){var fe=pe(w);return re.w(fe.date(fe.date()+Math.round(Q*T)),w)};if(p===R)return this.set(R,this.$M+T);if(p===L)return this.set(L,this.$y+T);if(p===C)return g(1);if(p===A)return g(7);var O=(f={},f[d]=s,f[b]=l,f[h]=r,f)[p]||1,Y=this.$d.getTime()+T*O;return re.w(Y,this)},k.subtract=function(T,m){return this.add(-1*T,m)},k.format=function(T){var m=this,f=this.$locale();if(!this.isValid())return f.invalidDate||E;var w=T||"YYYY-MM-DDTHH:mm:ssZ",p=re.z(this),g=this.$H,O=this.$m,Y=this.$M,Q=f.weekdays,fe=f.months,de=f.meridiem,we=function(Ae,be,U,q){return Ae&&(Ae[be]||Ae(m,w))||U[be].slice(0,q)},X=function(Ae){return re.s(g%12||12,Ae,"0")},ce=de||function(Ae,be,U){var q=Ae<12?"AM":"PM";return U?q.toLowerCase():q};return w.replace(ee,function(Ae,be){return be||function(U){switch(U){case"YY":return String(m.$y).slice(-2);case"YYYY":return re.s(m.$y,4,"0");case"M":return Y+1;case"MM":return re.s(Y+1,2,"0");case"MMM":return we(f.monthsShort,Y,fe,3);case"MMMM":return we(fe,Y);case"D":return m.$D;case"DD":return re.s(m.$D,2,"0");case"d":return String(m.$W);case"dd":return we(f.weekdaysMin,m.$W,Q,2);case"ddd":return we(f.weekdaysShort,m.$W,Q,3);case"dddd":return Q[m.$W];case"H":return String(g);case"HH":return re.s(g,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ce(g,O,!0);case"A":return ce(g,O,!1);case"m":return String(O);case"mm":return re.s(O,2,"0");case"s":return String(m.$s);case"ss":return re.s(m.$s,2,"0");case"SSS":return re.s(m.$ms,3,"0");case"Z":return p}return null}(Ae)||p.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(T,m,f){var w,p=this,g=re.p(m),O=pe(T),Y=(O.utcOffset()-this.utcOffset())*s,Q=this-O,fe=function(){return re.m(p,O)};switch(g){case L:w=fe()/12;break;case R:w=fe();break;case I:w=fe()/3;break;case A:w=(Q-Y)/6048e5;break;case C:w=(Q-Y)/864e5;break;case b:w=Q/l;break;case d:w=Q/s;break;case h:w=Q/r;break;default:w=Q}return f?w:re.a(w)},k.daysInMonth=function(){return this.endOf(R).$D},k.$locale=function(){return ue[this.$L]},k.locale=function(T,m){if(!T)return this.$L;var f=this.clone(),w=oe(T,m,!0);return w&&(f.$L=w),f},k.clone=function(){return re.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},B}(),Oe=Ce.prototype;return pe.prototype=Oe,[["$ms",v],["$s",h],["$m",d],["$H",b],["$W",C],["$M",R],["$y",L],["$D",D]].forEach(function(B){Oe[B[1]]=function(k){return this.$g(k,B[0],B[1])}}),pe.extend=function(B,k){return B.$i||(B(k,Ce,pe),B.$i=!0),pe},pe.locale=oe,pe.isDayjs=ae,pe.unix=function(B){return pe(1e3*B)},pe.en=ue[G],pe.Ls=ue,pe.p={},pe})}(Po)),Po.exports}var Vg=Gg();const Ie=bo(Vg);function Zg({direction:i,levelIndex:n,rowIndex:r,cellIndex:s,size:l}){switch(i){case"up":return n===0&&r===0?null:r===0?{levelIndex:n-1,rowIndex:s<=l[n-1][l[n-1].length-1]-1?l[n-1].length-1:l[n-1].length-2,cellIndex:s}:{levelIndex:n,rowIndex:r-1,cellIndex:s};case"down":return r===l[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:s}:r===l[n].length-2&&s>=l[n][l[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:s}:{levelIndex:n,rowIndex:r+1,cellIndex:s};case"left":return n===0&&r===0&&s===0?null:r===0&&s===0?{levelIndex:n-1,rowIndex:l[n-1].length-1,cellIndex:l[n-1][l[n-1].length-1]-1}:s===0?{levelIndex:n,rowIndex:r-1,cellIndex:l[n][r-1]-1}:{levelIndex:n,rowIndex:r,cellIndex:s-1};case"right":return r===l[n].length-1&&s===l[n][r]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:s===l[n][r]-1?{levelIndex:n,rowIndex:r+1,cellIndex:0}:{levelIndex:n,rowIndex:r,cellIndex:s+1};default:return{levelIndex:n,rowIndex:r,cellIndex:s}}}function _c({controlsRef:i,direction:n,levelIndex:r,rowIndex:s,cellIndex:l,size:v}){var b,C,A;const h=Zg({direction:n,size:v,rowIndex:s,cellIndex:l,levelIndex:r});if(!h)return;const d=(A=(C=(b=i.current)==null?void 0:b[h.levelIndex])==null?void 0:C[h.rowIndex])==null?void 0:A[h.cellIndex];d&&(d.disabled||d.getAttribute("data-hidden")||d.getAttribute("data-outside")?_c({controlsRef:i,direction:n,levelIndex:h.levelIndex,cellIndex:h.cellIndex,rowIndex:h.rowIndex,size:v}):d.focus())}function Kg(i){switch(i){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Qg(i){var n;return(n=i.current)==null?void 0:n.map(r=>r.map(s=>s.length))}function Aa({controlsRef:i,levelIndex:n,rowIndex:r,cellIndex:s,event:l}){const v=Kg(l.key);if(v){l.preventDefault();const h=Qg(i);_c({controlsRef:i,direction:v,levelIndex:n,rowIndex:r,cellIndex:s,size:h})}}function Jg(i,n){if(!i||!n)return n;const r=i.getHours(),s=i.getMinutes(),l=i.getSeconds(),v=i.getMilliseconds(),h=new Date(n);return h.setHours(r),h.setMinutes(s),h.setSeconds(l),h.setMilliseconds(v),h}var $o={exports:{}},Xg=$o.exports,bc;function e1(){return bc||(bc=1,function(i,n){(function(r,s){i.exports=s()})(Xg,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},s={};return function(l,v,h){var d,b=function(I,L,D){D===void 0&&(D={});var E=new Date(I),N=function(ee,ne){ne===void 0&&(ne={});var K=ne.timeZoneName||"short",le=ee+"|"+K,G=s[le];return G||(G=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:ee,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:K}),s[le]=G),G}(L,D);return N.formatToParts(E)},C=function(I,L){for(var D=b(I,L),E=[],N=0;N<D.length;N+=1){var ee=D[N],ne=ee.type,K=ee.value,le=r[ne];le>=0&&(E[le]=parseInt(K,10))}var G=E[3],ue=G===24?0:G,V=E[0]+"-"+E[1]+"-"+E[2]+" "+ue+":"+E[4]+":"+E[5]+":000",ae=+I;return(h.utc(V).valueOf()-(ae-=ae%1e3))/6e4},A=v.prototype;A.tz=function(I,L){I===void 0&&(I=d);var D,E=this.utcOffset(),N=this.toDate(),ee=N.toLocaleString("en-US",{timeZone:I}),ne=Math.round((N-new Date(ee))/1e3/60),K=15*-Math.round(N.getTimezoneOffset()/15)-ne;if(!Number(K))D=this.utcOffset(0,L);else if(D=h(ee,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(K,!0),L){var le=D.utcOffset();D=D.add(E-le,"minute")}return D.$x.$timezone=I,D},A.offsetName=function(I){var L=this.$x.$timezone||h.tz.guess(),D=b(this.valueOf(),L,{timeZoneName:I}).find(function(E){return E.type.toLowerCase()==="timezonename"});return D&&D.value};var R=A.startOf;A.startOf=function(I,L){if(!this.$x||!this.$x.$timezone)return R.call(this,I,L);var D=h(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return R.call(D,I,L).tz(this.$x.$timezone,!0)},h.tz=function(I,L,D){var E=D&&L,N=D||L||d,ee=C(+h(),N);if(typeof I!="string")return h(I).tz(N);var ne=function(ue,V,ae){var oe=ue-60*V*1e3,pe=C(oe,ae);if(V===pe)return[oe,V];var re=C(oe-=60*(pe-V)*1e3,ae);return pe===re?[oe,pe]:[ue-60*Math.min(pe,re)*1e3,Math.max(pe,re)]}(h.utc(I,E).valueOf(),ee,N),K=ne[0],le=ne[1],G=h(K).utcOffset(le);return G.$x.$timezone=N,G},h.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},h.tz.setDefault=function(I){d=I}}})}($o)),$o.exports}var t1=e1();const n1=bo(t1);var No={exports:{}},r1=No.exports,xc;function i1(){return xc||(xc=1,function(i,n){(function(r,s){i.exports=s()})(r1,function(){var r="minute",s=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(v,h,d){var b=h.prototype;d.utc=function(E){var N={date:E,utc:!0,args:arguments};return new h(N)},b.utc=function(E){var N=d(this.toDate(),{locale:this.$L,utc:!0});return E?N.add(this.utcOffset(),r):N},b.local=function(){return d(this.toDate(),{locale:this.$L,utc:!1})};var C=b.parse;b.parse=function(E){E.utc&&(this.$u=!0),this.$utils().u(E.$offset)||(this.$offset=E.$offset),C.call(this,E)};var A=b.init;b.init=function(){if(this.$u){var E=this.$d;this.$y=E.getUTCFullYear(),this.$M=E.getUTCMonth(),this.$D=E.getUTCDate(),this.$W=E.getUTCDay(),this.$H=E.getUTCHours(),this.$m=E.getUTCMinutes(),this.$s=E.getUTCSeconds(),this.$ms=E.getUTCMilliseconds()}else A.call(this)};var R=b.utcOffset;b.utcOffset=function(E,N){var ee=this.$utils().u;if(ee(E))return this.$u?0:ee(this.$offset)?R.call(this):this.$offset;if(typeof E=="string"&&(E=function(G){G===void 0&&(G="");var ue=G.match(s);if(!ue)return null;var V=(""+ue[0]).match(l)||["-",0,0],ae=V[0],oe=60*+V[1]+ +V[2];return oe===0?0:ae==="+"?oe:-oe}(E),E===null))return this;var ne=Math.abs(E)<=16?60*E:E,K=this;if(N)return K.$offset=ne,K.$u=E===0,K;if(E!==0){var le=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(K=this.local().add(ne+le,r)).$offset=ne,K.$x.$localOffset=le}else K=this.utc();return K};var I=b.format;b.format=function(E){var N=E||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return I.call(this,N)},b.valueOf=function(){var E=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*E},b.isUTC=function(){return!!this.$u},b.toISOString=function(){return this.toDate().toISOString()},b.toString=function(){return this.toDate().toUTCString()};var L=b.toDate;b.toDate=function(E){return E==="s"&&this.$offset?d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():L.call(this)};var D=b.diff;b.diff=function(E,N,ee){if(E&&this.$u===E.$u)return D.call(this,E,N,ee);var ne=this.local(),K=d(E).local();return D.call(ne,K,N,ee)}}})}(No)),No.exports}var o1=i1();const s1=bo(o1);Ie.extend(s1),Ie.extend(n1);function a1(i,n){return n?Ie(i).tz(n).utcOffset()+i.getTimezoneOffset():0}const Sc=(i,n,r)=>{if(!i)return null;if(!n)return i;let s=a1(i,n);return r==="remove"&&(s*=-1),Ie(i).add(s,"minutes").toDate()};function Mr(i,n,r,s){return s||!n?n:Array.isArray(n)?n.map(l=>Sc(l,r,i)):Sc(n,r,i)}const u1={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},l1=ye.createContext(u1);function an(){const i=ye.useContext(l1),n=ye.useCallback(h=>h||i.locale,[i.locale]),r=ye.useCallback(h=>h||i.timezone||void 0,[i.timezone]),s=ye.useCallback(h=>typeof h=="number"?h:i.firstDayOfWeek,[i.firstDayOfWeek]),l=ye.useCallback(h=>Array.isArray(h)?h:i.weekendDays,[i.weekendDays]),v=ye.useCallback(h=>typeof h=="string"?h:i.labelSeparator,[i.labelSeparator]);return{...i,getLocale:n,getTimezone:r,getFirstDayOfWeek:s,getWeekendDays:l,getLabelSeparator:v}}function c1(i,n){const r=an(),s=l=>Mr("remove",l,r.getTimezone()).toISOString();if(n==="range"&&Array.isArray(i)){const[l,v]=i;return l?v?`${s(l)} – ${s(v)}`:`${s(l)} –`:""}return n==="multiple"&&Array.isArray(i)?i.map(l=>l&&s(l)).filter(Boolean).join(", "):!Array.isArray(i)&&i?s(i):""}function Cc({value:i,type:n,name:r,form:s}){return M.jsx("input",{type:"hidden",value:c1(i,n),name:r,form:s})}Cc.displayName="@mantine/dates/HiddenDatesInput";function Ac(i){var n,r,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var l=i.length;for(n=0;n<l;n++)i[n]&&(r=Ac(i[n]))&&(s&&(s+=" "),s+=r)}else for(r in i)i[r]&&(s&&(s+=" "),s+=r);return s}function mt(){for(var i,n,r=0,s="",l=arguments.length;r<l;r++)(i=arguments[r])&&(n=Ac(i))&&(s&&(s+=" "),s+=n);return s}var Oc={day:"m_396ce5cb"};const f1={},h1=F.createVarsResolver((i,{size:n})=>({day:{"--day-size":F.getSize(n,"day-size")}})),Oa=F.factory((i,n)=>{const r=F.useProps("Day",f1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,date:C,disabled:A,__staticSelector:R,weekend:I,outside:L,selected:D,renderDay:E,inRange:N,firstInRange:ee,lastInRange:ne,hidden:K,static:le,highlightToday:G,...ue}=r,V=F.useStyles({name:R||"Day",classes:Oc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:h1,rootSelector:"day"}),ae=an();return M.jsx(F.UnstyledButton,{...V("day",{style:K?{display:"none"}:void 0}),component:le?"div":"button",ref:n,disabled:A,"data-today":Ie(C).isSame(Mr("add",new Date,ae.getTimezone()),"day")||void 0,"data-hidden":K||void 0,"data-highlight-today":G||void 0,"data-disabled":A||void 0,"data-weekend":!A&&!L&&I||void 0,"data-outside":!A&&L||void 0,"data-selected":!A&&D||void 0,"data-in-range":N&&!A||void 0,"data-first-in-range":ee&&!A||void 0,"data-last-in-range":ne&&!A||void 0,"data-static":le||void 0,unstyled:d,...ue,children:(E==null?void 0:E(C))||Ie(C).date()})});Oa.classes=Oc,Oa.displayName="@mantine/dates/Day";function d1({locale:i,format:n="dd",firstDayOfWeek:r=1}){const s=Ie().day(r),l=[];for(let v=0;v<7;v+=1)typeof n=="string"?l.push(Ie(s).add(v,"days").locale(i).format(n)):l.push(n(Ie(s).add(v,"days").toDate()));return l}var Tc={weekday:"m_18a3eca"};const p1={},g1=F.createVarsResolver((i,{size:n})=>({weekdaysRow:{"--wr-fz":F.getFontSize(n),"--wr-spacing":F.getSpacing(n)}})),Ta=F.factory((i,n)=>{const r=F.useProps("WeekdaysRow",p1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,locale:C,firstDayOfWeek:A,weekdayFormat:R,cellComponent:I="th",__staticSelector:L,withWeekNumbers:D,...E}=r,N=F.useStyles({name:L||"WeekdaysRow",classes:Tc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:g1,rootSelector:"weekdaysRow"}),ee=an(),ne=d1({locale:ee.getLocale(C),format:R,firstDayOfWeek:ee.getFirstDayOfWeek(A)}).map((K,le)=>M.jsx(I,{...N("weekday"),children:K},le));return M.jsxs(F.Box,{component:"tr",ref:n,...N("weekdaysRow"),...E,children:[D&&M.jsx(I,{...N("weekday"),children:"#"}),ne]})});Ta.classes=Tc,Ta.displayName="@mantine/dates/WeekdaysRow";function v1(i,n=1){let r=Ie(i);const s=n===0?6:n-1;for(;r.day()!==s;)r=r.add(1,"day");return r.toDate()}function m1(i,n=1){let r=Ie(i);for(;r.day()!==n;)r=r.subtract(1,"day");return r.toDate()}function y1({month:i,firstDayOfWeek:n=1,consistentWeeks:r}){const s=Ie(i).subtract(Ie(i).date()-1,"day"),l=Ie(s).startOf("day"),v=l.toDate(),h=l.add(+l.daysInMonth()-1,"day").toDate(),d=v1(h,n),b=m1(v,n),C=[];for(;b<=d;){const A=[];for(let R=0;R<7;R+=1)A.push(new Date(b)),b.setDate(b.getDate()+1);C.push(A)}if(r&&C.length<6){const A=C[C.length-1],R=A[A.length-1],I=new Date(R);for(I.setDate(I.getDate()+1);C.length<6;){const L=[];for(let D=0;D<7;D+=1)L.push(new Date(I)),I.setDate(I.getDate()+1);C.push(L)}}return C}function Dc(i,n){return n instanceof Date?Ie(i).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function Ec(i,n){return n instanceof Date?Ie(i).isBefore(Ie(n).add(1,"day"),"day"):!0}function w1(i,n,r,s,l,v,h){const d=i.flat().filter(A=>{var R;return Ec(A,r)&&Dc(A,n)&&!(l!=null&&l(A))&&!((R=s==null?void 0:s(A))!=null&&R.disabled)&&(!v||Ie(A).isSame(Ie(h),"month"))}),b=d.find(A=>{var R;return(R=s==null?void 0:s(A))==null?void 0:R.selected});if(b)return b;const C=d.find(A=>Ie().isSame(A,"date"));return C||d[0]}var Bo={exports:{}},_1=Bo.exports,Mc;function b1(){return Mc||(Mc=1,function(i,n){(function(r,s){i.exports=s()})(_1,function(){var r="day";return function(s,l,v){var h=function(C){return C.add(4-C.isoWeekday(),r)},d=l.prototype;d.isoWeekYear=function(){return h(this).year()},d.isoWeek=function(C){if(!this.$utils().u(C))return this.add(7*(C-this.isoWeek()),r);var A,R,I,L,D=h(this),E=(A=this.isoWeekYear(),R=this.$u,I=(R?v.utc:v)().year(A).startOf("year"),L=4-I.isoWeekday(),I.isoWeekday()>4&&(L+=7),I.add(L,r));return D.diff(E,"week")+1},d.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var b=d.startOf;d.startOf=function(C,A){var R=this.$utils(),I=!!R.u(A)||A;return R.p(C)==="isoweek"?I?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):b.bind(this)(C,A)}}})}(Bo)),Bo.exports}var x1=b1();const S1=bo(x1);Ie.extend(S1);function C1(i){const n=i.find(r=>Ie(r).day()===1);return Ie(n).isoWeek()}var Rc={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const A1={withCellSpacing:!0},O1=F.createVarsResolver((i,{size:n})=>({weekNumber:{"--wn-fz":F.getFontSize(n),"--wn-size":F.getSize(n,"wn-size")}})),jo=F.factory((i,n)=>{const r=F.useProps("Month",A1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,locale:A,firstDayOfWeek:R,weekdayFormat:I,month:L,weekendDays:D,getDayProps:E,excludeDate:N,minDate:ee,maxDate:ne,renderDay:K,hideOutsideDates:le,hideWeekdays:G,getDayAriaLabel:ue,static:V,__getDayRef:ae,__onDayKeyDown:oe,__onDayClick:pe,__onDayMouseEnter:re,__preventFocus:Ce,__stopPropagation:Oe,withCellSpacing:B,size:k,highlightToday:T,withWeekNumbers:m,...f}=r,w=F.useStyles({name:C||"Month",classes:Rc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:O1,rootSelector:"month"}),p=an(),g=y1({month:L,firstDayOfWeek:p.getFirstDayOfWeek(R),consistentWeeks:p.consistentWeeks}),O=w1(g,ee,ne,E,N,le,L),{resolvedClassNames:Y,resolvedStyles:Q}=F.useResolvedStylesApi({classNames:s,styles:h,props:r}),fe=g.map((de,we)=>{const X=de.map((ce,Ae)=>{const be=!Ie(ce).isSame(Ie(L),"month"),U=(ue==null?void 0:ue(ce))||Ie(ce).locale(A||p.locale).format("D MMMM YYYY"),q=E==null?void 0:E(ce),W=Ie(ce).isSame(O,"date");return M.jsx("td",{...w("monthCell"),"data-with-spacing":B||void 0,children:M.jsx(Oa,{__staticSelector:C||"Month",classNames:Y,styles:Q,unstyled:d,"data-mantine-stop-propagation":Oe||void 0,highlightToday:T,renderDay:K,date:ce,size:k,weekend:p.getWeekendDays(D).includes(ce.getDay()),outside:be,hidden:le?be:!1,"aria-label":U,static:V,disabled:(N==null?void 0:N(ce))||!Ec(ce,ne)||!Dc(ce,ee),ref:J=>ae==null?void 0:ae(we,Ae,J),...q,onKeyDown:J=>{var se;(se=q==null?void 0:q.onKeyDown)==null||se.call(q,J),oe==null||oe(J,{rowIndex:we,cellIndex:Ae,date:ce})},onMouseEnter:J=>{var se;(se=q==null?void 0:q.onMouseEnter)==null||se.call(q,J),re==null||re(J,ce)},onClick:J=>{var se;(se=q==null?void 0:q.onClick)==null||se.call(q,J),pe==null||pe(J,ce)},onMouseDown:J=>{var se;(se=q==null?void 0:q.onMouseDown)==null||se.call(q,J),Ce&&J.preventDefault()},tabIndex:Ce||!W?-1:0})},ce.toString())});return M.jsxs("tr",{...w("monthRow"),children:[m&&M.jsx("td",{...w("weekNumber"),children:C1(de)}),X]},we)});return M.jsxs(F.Box,{component:"table",...w("month"),size:k,ref:n,...f,children:[!G&&M.jsx("thead",{...w("monthThead"),children:M.jsx(Ta,{__staticSelector:C||"Month",locale:A,firstDayOfWeek:R,weekdayFormat:I,size:k,classNames:Y,styles:Q,unstyled:d,withWeekNumbers:m})}),M.jsx("tbody",{...w("monthTbody"),children:fe})]})});jo.classes=Rc,jo.displayName="@mantine/dates/Month";var Lc={pickerControl:"m_dc6a3c71"};const T1={},D1=F.createVarsResolver((i,{size:n})=>({pickerControl:{"--dpc-fz":F.getFontSize(n),"--dpc-size":F.getSize(n,"dpc-size")}})),Uo=F.factory((i,n)=>{const r=F.useProps("PickerControl",T1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,firstInRange:C,lastInRange:A,inRange:R,__staticSelector:I,selected:L,disabled:D,...E}=r,N=F.useStyles({name:I||"PickerControl",classes:Lc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:D1,rootSelector:"pickerControl"});return M.jsx(F.UnstyledButton,{...N("pickerControl"),ref:n,unstyled:d,"data-picker-control":!0,"data-selected":L&&!D||void 0,"data-disabled":D||void 0,"data-in-range":R&&!D&&!L||void 0,"data-first-in-range":C&&!D||void 0,"data-last-in-range":A&&!D||void 0,disabled:D,...E})});Uo.classes=Lc,Uo.displayName="@mantine/dates/PickerControl";function Ic(i,n,r){return!n&&!r?!1:!!(n&&Ie(i).isBefore(n,"year")||r&&Ie(i).isAfter(r,"year"))}function E1(i,n,r,s){const l=i.flat().filter(d=>{var b;return!Ic(d,n,r)&&!((b=s==null?void 0:s(d))!=null&&b.disabled)}),v=l.find(d=>{var b;return(b=s==null?void 0:s(d))==null?void 0:b.selected});if(v)return v;const h=l.find(d=>Ie().isSame(d,"year"));return h||l[0]}function kc(i){const n=i.getFullYear(),r=n-n%10;let s=0;const l=[[],[],[],[]];for(let v=0;v<4;v+=1){const h=v===3?1:3;for(let d=0;d<h;d+=1)l[v].push(new Date(r+s,0)),s+=1}return l}var Pc={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const M1={yearsListFormat:"YYYY",withCellSpacing:!0},zo=F.factory((i,n)=>{const r=F.useProps("YearsList",M1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,decade:C,yearsListFormat:A,locale:R,minDate:I,maxDate:L,getYearControlProps:D,__staticSelector:E,__getControlRef:N,__onControlKeyDown:ee,__onControlClick:ne,__onControlMouseEnter:K,__preventFocus:le,__stopPropagation:G,withCellSpacing:ue,size:V,...ae}=r,oe=F.useStyles({name:E||"YearsList",classes:Pc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"yearsList"}),pe=an(),re=kc(C),Ce=E1(re,I,L,D),Oe=re.map((B,k)=>{const T=B.map((m,f)=>{const w=D==null?void 0:D(m),p=Ie(m).isSame(Ce,"year");return M.jsx("td",{...oe("yearsListCell"),"data-with-spacing":ue||void 0,children:M.jsx(Uo,{...oe("yearsListControl"),size:V,unstyled:d,"data-mantine-stop-propagation":G||void 0,disabled:Ic(m,I,L),ref:g=>N==null?void 0:N(k,f,g),...w,onKeyDown:g=>{var O;(O=w==null?void 0:w.onKeyDown)==null||O.call(w,g),ee==null||ee(g,{rowIndex:k,cellIndex:f,date:m})},onClick:g=>{var O;(O=w==null?void 0:w.onClick)==null||O.call(w,g),ne==null||ne(g,m)},onMouseEnter:g=>{var O;(O=w==null?void 0:w.onMouseEnter)==null||O.call(w,g),K==null||K(g,m)},onMouseDown:g=>{var O;(O=w==null?void 0:w.onMouseDown)==null||O.call(w,g),le&&g.preventDefault()},tabIndex:le||!p?-1:0,children:Ie(m).locale(pe.getLocale(R)).format(A)})},f)});return M.jsx("tr",{...oe("yearsListRow"),children:T},k)});return M.jsx(F.Box,{component:"table",ref:n,size:V,...oe("yearsList"),...ae,children:M.jsx("tbody",{children:Oe})})});zo.classes=Pc,zo.displayName="@mantine/dates/YearsList";function $c(i,n,r){return!n&&!r?!1:!!(n&&Ie(i).isBefore(n,"month")||r&&Ie(i).isAfter(r,"month"))}function R1(i,n,r,s){const l=i.flat().filter(d=>{var b;return!$c(d,n,r)&&!((b=s==null?void 0:s(d))!=null&&b.disabled)}),v=l.find(d=>{var b;return(b=s==null?void 0:s(d))==null?void 0:b.selected});if(v)return v;const h=l.find(d=>Ie().isSame(d,"month"));return h||l[0]}function L1(i){const n=Ie(i).startOf("year").toDate(),r=[[],[],[],[]];let s=0;for(let l=0;l<4;l+=1)for(let v=0;v<3;v+=1)r[l].push(Ie(n).add(s,"months").toDate()),s+=1;return r}var Nc={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const I1={monthsListFormat:"MMM",withCellSpacing:!0},Fo=F.factory((i,n)=>{const r=F.useProps("MonthsList",I1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,year:A,monthsListFormat:R,locale:I,minDate:L,maxDate:D,getMonthControlProps:E,__getControlRef:N,__onControlKeyDown:ee,__onControlClick:ne,__onControlMouseEnter:K,__preventFocus:le,__stopPropagation:G,withCellSpacing:ue,size:V,...ae}=r,oe=F.useStyles({name:C||"MonthsList",classes:Nc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"monthsList"}),pe=an(),re=L1(A),Ce=R1(re,L,D,E),Oe=re.map((B,k)=>{const T=B.map((m,f)=>{const w=E==null?void 0:E(m),p=Ie(m).isSame(Ce,"month");return M.jsx("td",{...oe("monthsListCell"),"data-with-spacing":ue||void 0,children:M.jsx(Uo,{...oe("monthsListControl"),size:V,unstyled:d,__staticSelector:C||"MonthsList","data-mantine-stop-propagation":G||void 0,disabled:$c(m,L,D),ref:g=>N==null?void 0:N(k,f,g),...w,onKeyDown:g=>{var O;(O=w==null?void 0:w.onKeyDown)==null||O.call(w,g),ee==null||ee(g,{rowIndex:k,cellIndex:f,date:m})},onClick:g=>{var O;(O=w==null?void 0:w.onClick)==null||O.call(w,g),ne==null||ne(g,m)},onMouseEnter:g=>{var O;(O=w==null?void 0:w.onMouseEnter)==null||O.call(w,g),K==null||K(g,m)},onMouseDown:g=>{var O;(O=w==null?void 0:w.onMouseDown)==null||O.call(w,g),le&&g.preventDefault()},tabIndex:le||!p?-1:0,children:Ie(m).locale(pe.getLocale(I)).format(R)})},f)});return M.jsx("tr",{...oe("monthsListRow"),children:T},k)});return M.jsx(F.Box,{component:"table",ref:n,size:V,...oe("monthsList"),...ae,children:M.jsx("tbody",{children:Oe})})});Fo.classes=Nc,Fo.displayName="@mantine/dates/MonthsList";var Bc={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const k1={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},P1=F.createVarsResolver((i,{size:n})=>({calendarHeader:{"--dch-control-size":F.getSize(n,"dch-control-size"),"--dch-fz":F.getFontSize(n)}})),ir=F.factory((i,n)=>{const r=F.useProps("CalendarHeader",k1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,nextIcon:C,previousIcon:A,nextLabel:R,previousLabel:I,onNext:L,onPrevious:D,onLevelClick:E,label:N,nextDisabled:ee,previousDisabled:ne,hasNextLevel:K,levelControlAriaLabel:le,withNext:G,withPrevious:ue,__staticSelector:V,__preventFocus:ae,__stopPropagation:oe,...pe}=r,re=F.useStyles({name:V||"CalendarHeader",classes:Bc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,varsResolver:P1,rootSelector:"calendarHeader"}),Ce=ae?Oe=>Oe.preventDefault():void 0;return M.jsxs(F.Box,{...re("calendarHeader"),ref:n,...pe,children:[ue&&M.jsx(F.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"previous","aria-label":I,onClick:D,unstyled:d,onMouseDown:Ce,disabled:ne,"data-disabled":ne||void 0,tabIndex:ae||ne?-1:0,"data-mantine-stop-propagation":oe||void 0,children:A||M.jsx(F.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),M.jsx(F.UnstyledButton,{component:K?"button":"div",...re("calendarHeaderLevel"),onClick:K?E:void 0,unstyled:d,onMouseDown:K?Ce:void 0,disabled:!K,"data-static":!K||void 0,"aria-label":le,tabIndex:ae||!K?-1:0,"data-mantine-stop-propagation":oe||void 0,children:N}),G&&M.jsx(F.UnstyledButton,{...re("calendarHeaderControl"),"data-direction":"next","aria-label":R,onClick:L,unstyled:d,onMouseDown:Ce,disabled:ee,"data-disabled":ee||void 0,tabIndex:ae||ee?-1:0,"data-mantine-stop-propagation":oe||void 0,children:C||M.jsx(F.AccordionChevron,{...re("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});ir.classes=Bc,ir.displayName="@mantine/dates/CalendarHeader";function $1(i){const n=kc(i);return[n[0][0],n[3][0]]}const N1={decadeLabelFormat:"YYYY"},Wo=F.factory((i,n)=>{const r=F.useProps("DecadeLevel",N1,i),{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,withCellSpacing:L,__preventFocus:D,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,nextDisabled:G,previousDisabled:ue,levelControlAriaLabel:V,withNext:ae,withPrevious:oe,decadeLabelFormat:pe,classNames:re,styles:Ce,unstyled:Oe,__staticSelector:B,__stopPropagation:k,size:T,...m}=r,f=an(),[w,p]=$1(s),g={__staticSelector:B||"DecadeLevel",classNames:re,styles:Ce,unstyled:Oe,size:T},O=typeof G=="boolean"?G:h?!Ie(p).endOf("year").isBefore(h):!1,Y=typeof ue=="boolean"?ue:v?!Ie(w).startOf("year").isAfter(v):!1,Q=(fe,de)=>Ie(fe).locale(l||f.locale).format(de);return M.jsxs(F.Box,{"data-decade-level":!0,size:T,ref:n,...m,children:[M.jsx(ir,{label:typeof pe=="function"?pe(w,p):`${Q(w,pe)} – ${Q(p,pe)}`,__preventFocus:D,__stopPropagation:k,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,nextDisabled:O,previousDisabled:Y,hasNextLevel:!1,levelControlAriaLabel:V,withNext:ae,withPrevious:oe,...g}),M.jsx(zo,{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,__preventFocus:D,__stopPropagation:k,withCellSpacing:L,...g})]})});Wo.classes={...zo.classes,...ir.classes},Wo.displayName="@mantine/dates/DecadeLevel";const B1={yearLabelFormat:"YYYY"},Yo=F.factory((i,n)=>{const r=F.useProps("YearLevel",B1,i),{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,withCellSpacing:L,__preventFocus:D,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,onLevelClick:G,nextDisabled:ue,previousDisabled:V,hasNextLevel:ae,levelControlAriaLabel:oe,withNext:pe,withPrevious:re,yearLabelFormat:Ce,__staticSelector:Oe,__stopPropagation:B,size:k,classNames:T,styles:m,unstyled:f,...w}=r,p=an(),g={__staticSelector:Oe||"YearLevel",classNames:T,styles:m,unstyled:f,size:k},O=typeof ue=="boolean"?ue:h?!Ie(s).endOf("year").isBefore(h):!1,Y=typeof V=="boolean"?V:v?!Ie(s).startOf("year").isAfter(v):!1;return M.jsxs(F.Box,{"data-year-level":!0,size:k,ref:n,...w,children:[M.jsx(ir,{label:typeof Ce=="function"?Ce(s):Ie(s).locale(l||p.locale).format(Ce),__preventFocus:D,__stopPropagation:B,nextIcon:E,previousIcon:N,nextLabel:ee,previousLabel:ne,onNext:K,onPrevious:le,onLevelClick:G,nextDisabled:O,previousDisabled:Y,hasNextLevel:ae,levelControlAriaLabel:oe,withNext:pe,withPrevious:re,...g}),M.jsx(Fo,{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__getControlRef:C,__onControlKeyDown:A,__onControlClick:R,__onControlMouseEnter:I,__preventFocus:D,__stopPropagation:B,withCellSpacing:L,...g})]})});Yo.classes={...ir.classes,...Fo.classes},Yo.displayName="@mantine/dates/YearLevel";const j1={monthLabelFormat:"MMMM YYYY"},qo=F.factory((i,n)=>{const r=F.useProps("MonthLevel",j1,i),{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__getDayRef:N,__onDayKeyDown:ee,__onDayClick:ne,__onDayMouseEnter:K,withCellSpacing:le,highlightToday:G,withWeekNumbers:ue,__preventFocus:V,__stopPropagation:ae,nextIcon:oe,previousIcon:pe,nextLabel:re,previousLabel:Ce,onNext:Oe,onPrevious:B,onLevelClick:k,nextDisabled:T,previousDisabled:m,hasNextLevel:f,levelControlAriaLabel:w,withNext:p,withPrevious:g,monthLabelFormat:O,classNames:Y,styles:Q,unstyled:fe,__staticSelector:de,size:we,static:X,...ce}=r,Ae=an(),be={__staticSelector:de||"MonthLevel",classNames:Y,styles:Q,unstyled:fe,size:we},U=typeof T=="boolean"?T:R?!Ie(s).endOf("month").isBefore(R):!1,q=typeof m=="boolean"?m:A?!Ie(s).startOf("month").isAfter(A):!1;return M.jsxs(F.Box,{"data-month-level":!0,size:we,ref:n,...ce,children:[M.jsx(ir,{label:typeof O=="function"?O(s):Ie(s).locale(l||Ae.locale).format(O),__preventFocus:V,__stopPropagation:ae,nextIcon:oe,previousIcon:pe,nextLabel:re,previousLabel:Ce,onNext:Oe,onPrevious:B,onLevelClick:k,nextDisabled:U,previousDisabled:q,hasNextLevel:f,levelControlAriaLabel:w,withNext:p,withPrevious:g,...be}),M.jsx(jo,{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__getDayRef:N,__onDayKeyDown:ee,__onDayClick:ne,__onDayMouseEnter:K,__preventFocus:V,__stopPropagation:ae,static:X,withCellSpacing:le,highlightToday:G,withWeekNumbers:ue,...be})]})});qo.classes={...jo.classes,...ir.classes},qo.displayName="@mantine/dates/MonthLevel";var jc={levelsGroup:"m_30b26e33"};const U1={},or=F.factory((i,n)=>{const r=F.useProps("LevelsGroup",U1,i),{classNames:s,className:l,style:v,styles:h,unstyled:d,vars:b,__staticSelector:C,...A}=r,R=F.useStyles({name:C||"LevelsGroup",classes:jc,props:r,className:l,style:v,classNames:s,styles:h,unstyled:d,vars:b,rootSelector:"levelsGroup"});return M.jsx(F.Box,{ref:n,...R("levelsGroup"),...A})});or.classes=jc,or.displayName="@mantine/dates/LevelsGroup";const z1={numberOfColumns:1},Ho=F.factory((i,n)=>{const r=F.useProps("DecadeLevelGroup",z1,i),{decade:s,locale:l,minDate:v,maxDate:h,yearsListFormat:d,getYearControlProps:b,__onControlClick:C,__onControlMouseEnter:A,withCellSpacing:R,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,nextDisabled:K,previousDisabled:le,classNames:G,styles:ue,unstyled:V,__staticSelector:ae,__stopPropagation:oe,numberOfColumns:pe,levelControlAriaLabel:re,decadeLabelFormat:Ce,size:Oe,vars:B,...k}=r,T=ye.useRef([]),m=Array(pe).fill(0).map((f,w)=>{const p=Ie(s).add(w*10,"years").toDate();return M.jsx(Wo,{size:Oe,yearsListFormat:d,decade:p,withNext:w===pe-1,withPrevious:w===0,decadeLabelFormat:Ce,__onControlClick:C,__onControlMouseEnter:A,__onControlKeyDown:(g,O)=>Aa({levelIndex:w,rowIndex:O.rowIndex,cellIndex:O.cellIndex,event:g,controlsRef:T}),__getControlRef:(g,O,Y)=>{Array.isArray(T.current[w])||(T.current[w]=[]),Array.isArray(T.current[w][g])||(T.current[w][g]=[]),T.current[w][g][O]=Y},levelControlAriaLabel:typeof re=="function"?re(p):re,locale:l,minDate:v,maxDate:h,__preventFocus:I,__stopPropagation:oe,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,nextDisabled:K,previousDisabled:le,getYearControlProps:b,__staticSelector:ae||"DecadeLevelGroup",classNames:G,styles:ue,unstyled:V,withCellSpacing:R},w)});return M.jsx(or,{classNames:G,styles:ue,__staticSelector:ae||"DecadeLevelGroup",ref:n,size:Oe,unstyled:V,...k,children:m})});Ho.classes={...or.classes,...Wo.classes},Ho.displayName="@mantine/dates/DecadeLevelGroup";const F1={numberOfColumns:1},Go=F.factory((i,n)=>{const r=F.useProps("YearLevelGroup",F1,i),{year:s,locale:l,minDate:v,maxDate:h,monthsListFormat:d,getMonthControlProps:b,__onControlClick:C,__onControlMouseEnter:A,withCellSpacing:R,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,onLevelClick:K,nextDisabled:le,previousDisabled:G,hasNextLevel:ue,classNames:V,styles:ae,unstyled:oe,__staticSelector:pe,__stopPropagation:re,numberOfColumns:Ce,levelControlAriaLabel:Oe,yearLabelFormat:B,size:k,vars:T,...m}=r,f=ye.useRef([]),w=Array(Ce).fill(0).map((p,g)=>{const O=Ie(s).add(g,"years").toDate();return M.jsx(Yo,{size:k,monthsListFormat:d,year:O,withNext:g===Ce-1,withPrevious:g===0,yearLabelFormat:B,__stopPropagation:re,__onControlClick:C,__onControlMouseEnter:A,__onControlKeyDown:(Y,Q)=>Aa({levelIndex:g,rowIndex:Q.rowIndex,cellIndex:Q.cellIndex,event:Y,controlsRef:f}),__getControlRef:(Y,Q,fe)=>{Array.isArray(f.current[g])||(f.current[g]=[]),Array.isArray(f.current[g][Y])||(f.current[g][Y]=[]),f.current[g][Y][Q]=fe},levelControlAriaLabel:typeof Oe=="function"?Oe(O):Oe,locale:l,minDate:v,maxDate:h,__preventFocus:I,nextIcon:L,previousIcon:D,nextLabel:E,previousLabel:N,onNext:ee,onPrevious:ne,onLevelClick:K,nextDisabled:le,previousDisabled:G,hasNextLevel:ue,getMonthControlProps:b,classNames:V,styles:ae,unstyled:oe,__staticSelector:pe||"YearLevelGroup",withCellSpacing:R},g)});return M.jsx(or,{classNames:V,styles:ae,__staticSelector:pe||"YearLevelGroup",ref:n,size:k,unstyled:oe,...m,children:w})});Go.classes={...Yo.classes,...or.classes},Go.displayName="@mantine/dates/YearLevelGroup";const W1={numberOfColumns:1},Vo=F.factory((i,n)=>{const r=F.useProps("MonthLevelGroup",W1,i),{month:s,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__onDayClick:N,__onDayMouseEnter:ee,withCellSpacing:ne,highlightToday:K,withWeekNumbers:le,__preventFocus:G,nextIcon:ue,previousIcon:V,nextLabel:ae,previousLabel:oe,onNext:pe,onPrevious:re,onLevelClick:Ce,nextDisabled:Oe,previousDisabled:B,hasNextLevel:k,classNames:T,styles:m,unstyled:f,numberOfColumns:w,levelControlAriaLabel:p,monthLabelFormat:g,__staticSelector:O,__stopPropagation:Y,size:Q,static:fe,vars:de,...we}=r,X=ye.useRef([]),ce=Array(w).fill(0).map((Ae,be)=>{const U=Ie(s).add(be,"months").toDate();return M.jsx(qo,{month:U,withNext:be===w-1,withPrevious:be===0,monthLabelFormat:g,__stopPropagation:Y,__onDayClick:N,__onDayMouseEnter:ee,__onDayKeyDown:(q,W)=>Aa({levelIndex:be,rowIndex:W.rowIndex,cellIndex:W.cellIndex,event:q,controlsRef:X}),__getDayRef:(q,W,J)=>{Array.isArray(X.current[be])||(X.current[be]=[]),Array.isArray(X.current[be][q])||(X.current[be][q]=[]),X.current[be][q][W]=J},levelControlAriaLabel:typeof p=="function"?p(U):p,locale:l,firstDayOfWeek:v,weekdayFormat:h,weekendDays:d,getDayProps:b,excludeDate:C,minDate:A,maxDate:R,renderDay:I,hideOutsideDates:L,hideWeekdays:D,getDayAriaLabel:E,__preventFocus:G,nextIcon:ue,previousIcon:V,nextLabel:ae,previousLabel:oe,onNext:pe,onPrevious:re,onLevelClick:Ce,nextDisabled:Oe,previousDisabled:B,hasNextLevel:k,classNames:T,styles:m,unstyled:f,__staticSelector:O||"MonthLevelGroup",size:Q,static:fe,withCellSpacing:ne,highlightToday:K,withWeekNumbers:le},be)});return M.jsx(or,{classNames:T,styles:m,__staticSelector:O||"MonthLevelGroup",ref:n,size:Q,...we,children:ce})});Vo.classes={...or.classes,...qo.classes},Vo.displayName="@mantine/dates/MonthLevelGroup";const Uc=i=>i==="range"?[null,null]:i==="multiple"?[]:null;function Da({type:i,value:n,defaultValue:r,onChange:s,applyTimezone:l=!0}){const v=ye.useRef(i),h=an(),[d,b,C]=Ot.useUncontrolled({value:Mr("add",n,h.getTimezone(),!l),defaultValue:Mr("add",r,h.getTimezone(),!l),finalValue:Uc(i),onChange:R=>{s==null||s(Mr("remove",R,h.getTimezone(),!l))}});let A=d;if(v.current!==i){if(v.current=i,n===void 0)A=r!==void 0?r:Uc(i),b(A);else if(process.env.NODE_ENV==="development")switch(i){case"default":n!==null&&typeof n!="string"&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `null` or `string`");break;case"multiple":n instanceof Array||console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `string[]`");break;case"range":(!(n instanceof Array)||n.length!==2)&&console.error("[@mantine/dates/use-uncontrolled-dates] Value must be type of `[string, string]`");break}}return[A,b,C]}function Ea(i,n){return i?i==="month"?0:i==="year"?1:2:n||0}function Y1(i){return i===0?"month":i===1?"year":"decade"}function Fi(i,n,r){return Y1(Ot.clamp(Ea(i,0),Ea(n,0),Ea(r,2)))}const q1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Zo=F.factory((i,n)=>{const r=F.useProps("Calendar",q1,i),{vars:s,maxLevel:l,minLevel:v,defaultLevel:h,level:d,onLevelChange:b,date:C,defaultDate:A,onDateChange:R,numberOfColumns:I,columnsToScroll:L,ariaLabels:D,nextLabel:E,previousLabel:N,onYearSelect:ee,onMonthSelect:ne,onYearMouseEnter:K,onMonthMouseEnter:le,__updateDateOnYearSelect:G,__updateDateOnMonthSelect:ue,firstDayOfWeek:V,weekdayFormat:ae,weekendDays:oe,getDayProps:pe,excludeDate:re,renderDay:Ce,hideOutsideDates:Oe,hideWeekdays:B,getDayAriaLabel:k,monthLabelFormat:T,nextIcon:m,previousIcon:f,__onDayClick:w,__onDayMouseEnter:p,withCellSpacing:g,highlightToday:O,withWeekNumbers:Y,monthsListFormat:Q,getMonthControlProps:fe,yearLabelFormat:de,yearsListFormat:we,getYearControlProps:X,decadeLabelFormat:ce,classNames:Ae,styles:be,unstyled:U,minDate:q,maxDate:W,locale:J,__staticSelector:se,size:Te,__preventFocus:u,__stopPropagation:c,onNextDecade:_,onPreviousDecade:$,onNextYear:j,onPreviousYear:te,onNextMonth:xe,onPreviousMonth:De,static:Re,__timezoneApplied:Se,...ke}=r,{resolvedClassNames:$e,resolvedStyles:Le}=F.useResolvedStylesApi({classNames:Ae,styles:be,props:r}),[Ke,Ge]=Ot.useUncontrolled({value:d?Fi(d,v,l):void 0,defaultValue:h?Fi(h,v,l):void 0,finalValue:Fi(void 0,v,l),onChange:b}),[ot,gt]=Da({type:"default",value:C,defaultValue:A,onChange:R,applyTimezone:!Se}),yt={__staticSelector:se||"Calendar",styles:Le,classNames:$e,unstyled:U,size:Te},ct=an(),Et=L||I||1,Rn=new Date,un=q&&q>Rn?q:Rn,St=ot||Mr("add",un,ct.getTimezone()),Sn=()=>{const st=Ie(St).add(Et,"month").toDate();xe==null||xe(st),gt(st)},Ln=()=>{const st=Ie(St).subtract(Et,"month").toDate();De==null||De(st),gt(st)},In=()=>{const st=Ie(St).add(Et,"year").toDate();j==null||j(st),gt(st)},ln=()=>{const st=Ie(St).subtract(Et,"year").toDate();te==null||te(st),gt(st)},cn=()=>{const st=Ie(St).add(10*Et,"year").toDate();_==null||_(st),gt(st)},fn=()=>{const st=Ie(St).subtract(10*Et,"year").toDate();$==null||$(st),gt(st)};return M.jsxs(F.Box,{ref:n,size:Te,"data-calendar":!0,...ke,children:[Ke==="month"&&M.jsx(Vo,{month:St,minDate:q,maxDate:W,firstDayOfWeek:V,weekdayFormat:ae,weekendDays:oe,getDayProps:pe,excludeDate:re,renderDay:Ce,hideOutsideDates:Oe,hideWeekdays:B,getDayAriaLabel:k,onNext:Sn,onPrevious:Ln,hasNextLevel:l!=="month",onLevelClick:()=>Ge("year"),numberOfColumns:I,locale:J,levelControlAriaLabel:D==null?void 0:D.monthLevelControl,nextLabel:(D==null?void 0:D.nextMonth)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousMonth)??N,previousIcon:f,monthLabelFormat:T,__onDayClick:w,__onDayMouseEnter:p,__preventFocus:u,__stopPropagation:c,static:Re,withCellSpacing:g,highlightToday:O,withWeekNumbers:Y,...yt}),Ke==="year"&&M.jsx(Go,{year:St,numberOfColumns:I,minDate:q,maxDate:W,monthsListFormat:Q,getMonthControlProps:fe,locale:J,onNext:In,onPrevious:ln,hasNextLevel:l!=="month"&&l!=="year",onLevelClick:()=>Ge("decade"),levelControlAriaLabel:D==null?void 0:D.yearLevelControl,nextLabel:(D==null?void 0:D.nextYear)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousYear)??N,previousIcon:f,yearLabelFormat:de,__onControlMouseEnter:le,__onControlClick:(st,rt)=>{ue&>(rt),Ge(Fi("month",v,l)),ne==null||ne(rt)},__preventFocus:u,__stopPropagation:c,withCellSpacing:g,...yt}),Ke==="decade"&&M.jsx(Ho,{decade:St,minDate:q,maxDate:W,yearsListFormat:we,getYearControlProps:X,locale:J,onNext:cn,onPrevious:fn,numberOfColumns:I,nextLabel:(D==null?void 0:D.nextDecade)??E,nextIcon:m,previousLabel:(D==null?void 0:D.previousDecade)??N,previousIcon:f,decadeLabelFormat:ce,__onControlMouseEnter:K,__onControlClick:(st,rt)=>{G&>(rt),Ge(Fi("year",v,l)),ee==null||ee(rt)},__preventFocus:u,__stopPropagation:c,withCellSpacing:g,...yt})]})});Zo.classes={...Ho.classes,...Go.classes,...Vo.classes},Zo.displayName="@mantine/dates/Calendar";function H1(i){const{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:v,nextIcon:h,previousIcon:d,date:b,defaultDate:C,onDateChange:A,numberOfColumns:R,columnsToScroll:I,ariaLabels:L,nextLabel:D,previousLabel:E,onYearSelect:N,onMonthSelect:ee,onYearMouseEnter:ne,onMonthMouseEnter:K,onNextMonth:le,onPreviousMonth:G,onNextYear:ue,onPreviousYear:V,onNextDecade:ae,onPreviousDecade:oe,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ce,__updateDateOnMonthSelect:Oe,withWeekNumbers:B,firstDayOfWeek:k,weekdayFormat:T,weekendDays:m,getDayProps:f,excludeDate:w,renderDay:p,hideOutsideDates:g,hideWeekdays:O,getDayAriaLabel:Y,monthLabelFormat:Q,monthsListFormat:fe,getMonthControlProps:de,yearLabelFormat:we,yearsListFormat:X,getYearControlProps:ce,decadeLabelFormat:Ae,allowSingleDateInRange:be,allowDeselect:U,minDate:q,maxDate:W,locale:J,...se}=i;return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:s,level:l,onLevelChange:v,nextIcon:h,previousIcon:d,date:b,defaultDate:C,onDateChange:A,numberOfColumns:R,columnsToScroll:I,ariaLabels:L,nextLabel:D,previousLabel:E,onYearSelect:N,onMonthSelect:ee,onYearMouseEnter:ne,onMonthMouseEnter:K,onNextMonth:le,onPreviousMonth:G,onNextYear:ue,onPreviousYear:V,onNextDecade:ae,onPreviousDecade:oe,withCellSpacing:pe,highlightToday:re,__updateDateOnYearSelect:Ce,__updateDateOnMonthSelect:Oe,withWeekNumbers:B,firstDayOfWeek:k,weekdayFormat:T,weekendDays:m,getDayProps:f,excludeDate:w,renderDay:p,hideOutsideDates:g,hideWeekdays:O,getDayAriaLabel:Y,monthLabelFormat:Q,monthsListFormat:fe,getMonthControlProps:de,yearLabelFormat:we,yearsListFormat:X,getYearControlProps:ce,decadeLabelFormat:Ae,allowSingleDateInRange:be,allowDeselect:U,minDate:q,maxDate:W,locale:J},others:se}}function G1(i,n){if(i===null)return null;const r=Mr("add",new Date(i),n);return Number.isNaN(r.getTime())||!i?null:r}function V1({date:i,maxDate:n,minDate:r}){return!(i==null||Number.isNaN(i.getTime())||n&&Ie(i).isAfter(n,"date")||r&&Ie(i).isBefore(r,"date"))}const Z1={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},Ko=F.factory((i,n)=>{const r=F.useInputProps("DateInput",Z1,i),{inputProps:s,wrapperProps:l,value:v,defaultValue:h,onChange:d,clearable:b,clearButtonProps:C,popoverProps:A,getDayProps:R,locale:I,valueFormat:L,dateParser:D,minDate:E,maxDate:N,fixOnBlur:ee,onFocus:ne,onBlur:K,onClick:le,readOnly:G,name:ue,form:V,rightSection:ae,unstyled:oe,classNames:pe,styles:re,allowDeselect:Ce,preserveTime:Oe,date:B,defaultDate:k,onDateChange:T,...m}=r,f=ye.useRef(null),w=ye.useRef(null),[p,g]=ye.useState(!1),{calendarProps:O,others:Y}=H1(m),Q=an(),de=D||(j=>{const te=Ie(j,L,Q.getLocale(I)).toDate();return Number.isNaN(te.getTime())?G1(j,Q.getTimezone()):te}),we=Ce!==void 0?Ce:b,X=j=>j?Ie(j).locale(Q.getLocale(I)).format(L):"",[ce,Ae,be]=Da({type:"default",value:v,defaultValue:h,onChange:d}),[U,q]=Da({type:"default",value:B,defaultValue:h||k,onChange:T});ye.useEffect(()=>{be&&v!==null&&q(v)},[be,v]);const[W,J]=ye.useState(X(ce));ye.useEffect(()=>{J(X(ce))},[Q.getLocale(I)]);const se=j=>{const te=j.currentTarget.value;if(J(te),g(!0),te.trim()===""&&b)Ae(null);else{const xe=de(te);V1({date:xe,minDate:E,maxDate:N})&&(Ae(xe),q(xe))}},Te=j=>{K==null||K(j),g(!1),ee&&J(X(ce))},u=j=>{ne==null||ne(j),g(!0)},c=j=>{le==null||le(j),g(!0)},_=j=>({...R==null?void 0:R(j),selected:Ie(ce).isSame(j,"day"),onClick:te=>{var Re,Se;(Se=R==null?void 0:(Re=R(j)).onClick)==null||Se.call(Re,te);const xe=Oe?Jg(ce,j):j,De=b&&we&&Ie(ce).isSame(j,"day")?null:xe;Ae(De),!be&&J(X(De)),g(!1)}}),$=ae||(b&&ce&&!G?M.jsx(F.CloseButton,{variant:"transparent",onMouseDown:j=>j.preventDefault(),tabIndex:-1,onClick:()=>{Ae(null),!be&&J(""),g(!1)},unstyled:oe,size:s.size||"sm",...C}):null);return Ot.useDidUpdate(()=>{ce!==void 0&&!p&&J(X(ce))},[ce]),Ot.useClickOutside(()=>g(!1),void 0,[f.current,w.current]),M.jsxs(M.Fragment,{children:[M.jsx(F.Input.Wrapper,{...l,__staticSelector:"DateInput",ref:f,children:M.jsxs(F.Popover,{opened:p,trapFocus:!1,position:"bottom-start",disabled:G,withRoles:!1,unstyled:oe,...A,children:[M.jsx(F.Popover.Target,{children:M.jsx(F.Input,{"data-dates-input":!0,"data-read-only":G||void 0,autoComplete:"off",ref:n,value:W,onChange:se,onBlur:Te,onFocus:u,onClick:c,readOnly:G,rightSection:$,...s,...Y,__staticSelector:"DateInput"})}),M.jsx(F.Popover.Dropdown,{onMouseDown:j=>j.preventDefault(),"data-dates-dropdown":!0,ref:w,children:M.jsx(Zo,{__staticSelector:"DateInput",__timezoneApplied:!0,...O,classNames:pe,styles:re,unstyled:oe,__preventFocus:!0,minDate:E,maxDate:N,locale:I,getDayProps:_,size:s.size,date:U,onDateChange:q})})]})}),M.jsx(Cc,{name:ue,form:V,value:ce,type:"default"})]})});Ko.classes={...F.Input.classes,...Zo.classes},Ko.displayName="@mantine/dates/DateInput";function K1(i){const n=bn.c(46),{fields:r,onClose:s,queryKey:l,apiPath:v,steps:h,onCreated:d}=i,[b,C]=ye.useState(0),[A,R]=ye.useState(!1),[I,L]=ye.useState(),{mutateAsync:D,isError:E,error:N,isPending:ee}=mc(v,l),{mutateAsync:ne,isPending:K}=Ca(v,l),le=ee||K;let G;n[0]!==r?(G=new Set(r.filter(n0).map(t0)),n[0]=r,n[1]=G):G=n[1];let ue;n[2]!==G?(ue=[...G],n[2]=G,n[3]=ue):ue=n[3];const V=ue;let ae;n[4]!==r?(ae=r.reduce(e0,{}),n[4]=r,n[5]=ae):ae=n[5];let oe;n[6]!==r?(oe=r.filter(X1).reduce(Q1,{}),n[6]=r,n[7]=oe):oe=n[7];let pe;n[8]!==ae||n[9]!==oe?(pe={mode:"uncontrolled",initialValues:ae,validate:oe},n[8]=ae,n[9]=oe,n[10]=pe):pe=n[10];const re=Ti.useForm(pe);let Ce;n[11]!==re?(Ce=function(g){return M.jsxs(ye.Fragment,{children:[(g.type===void 0||g.type=="text")&&M.jsx(F.TextInput,{label:g.column.title,placeholder:g.placeholder??"",...re.getInputProps(g.id),type:g.id.includes("email")?"email":void 0},re.key(g.id)),g.type==="number"&&M.jsx(F.NumberInput,{decimalSeparator:",",label:g.column.title,placeholder:g.placeholder??"",...re.getInputProps(g.id)},re.key(g.id)),g.type==="date"&&M.jsx(Ko,{label:g.column.title,placeholder:g.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...re.getInputProps(g.id)},re.key(g.id)),g.type==="boolean"&&M.jsx(F.Checkbox,{mt:"md",label:g.column.title,...re.getInputProps(g.id,{type:"checkbox"})},re.key(g.id)),g.type==="custom"&&g.render&&g.render(re.getValues(),re.getInputProps(g.id).onChange,R,re.setValues)]},g.id)},n[11]=re,n[12]=Ce):Ce=n[12];const Oe=Ce;let B;n[13]!==(N==null?void 0:N.message)||n[14]!==(N==null?void 0:N.name)||n[15]!==E?(B=E&&M.jsx(F.Alert,{variant:"outline",color:"red",title:(N==null?void 0:N.name)??"Fehler aufgetreten",mb:"lg",children:(N==null?void 0:N.message)??"Fehler aufgetreten"}),n[13]=N==null?void 0:N.message,n[14]=N==null?void 0:N.name,n[15]=E,n[16]=B):B=n[16];let k;n[17]!==b||n[18]!==D||n[19]!==re||n[20]!==E||n[21]!==s||n[22]!==d||n[23]!==I||n[24]!==V.length||n[25]!==ne?(k=re.onSubmit(async p=>{if(I)await ne({...p,id:I});else{const g=await D(p);L(g.id),d==null||d(g.id)}V.length&&b<V.length-1?E||C(b+1):E||(re.setInitialValues(p),re.reset(),s())}),n[17]=b,n[18]=D,n[19]=re,n[20]=E,n[21]=s,n[22]=d,n[23]=I,n[24]=V.length,n[25]=ne,n[26]=k):k=n[26];let T;n[27]!==b||n[28]!==r||n[29]!==Oe||n[30]!==h||n[31]!==V?(T=V.length?M.jsx(F.Stepper,{active:b,size:"sm",children:V.map(p=>M.jsx(F.Stepper.Step,{...h&&h[p-1]?{label:h[p-1].label}:{},children:r.filter(g=>g.step===p).map(g=>Oe(g))},p))}):r.map(p=>Oe(p)),n[27]=b,n[28]=r,n[29]=Oe,n[30]=h,n[31]=V,n[32]=T):T=n[32];let m;n[33]!==b||n[34]!==A||n[35]!==le||n[36]!==s||n[37]!==V.length?(m=!A&&M.jsxs(F.Group,{mt:"md",justify:"end",children:[M.jsx(F.Button,{onClick:()=>V.length?b===0?s():C(b-1):s(),variant:"outline",children:V.length?b===0?"Abbrechen":"Zurück":"Abbrechen"}),M.jsx(F.Button,{type:"submit",loading:le,children:V.length?b===V.length-1?"Speichern":"Weiter":"Speichern"})]}),n[33]=b,n[34]=A,n[35]=le,n[36]=s,n[37]=V.length,n[38]=m):m=n[38];let f;n[39]!==m||n[40]!==k||n[41]!==T?(f=M.jsxs("form",{onSubmit:k,children:[T,m]}),n[39]=m,n[40]=k,n[41]=T,n[42]=f):f=n[42];let w;return n[43]!==f||n[44]!==B?(w=M.jsxs(M.Fragment,{children:[B,f]}),n[43]=f,n[44]=B,n[45]=w):w=n[45],w}function Q1(i,n){return i[n.id]=J1,i}function J1(i){return i?null:"Pflichtfeld"}function X1(i){return i.required}function e0(i,n){return i[n.id]=n.type==="boolean"?!1:n.defaultValue??"",i}function t0(i){return i.step}function n0(i){return typeof i.step=="number"}var[r0,Ma]=F.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),zc=i=>{let{children:n,columnsOrder:r,setColumnsOrder:s,columnsToggle:l,setColumnsToggle:v,resetColumnsOrder:h,resetColumnsToggle:d,setColumnWidth:b,resetColumnsWidth:C}=i,[A,R]=ye.useState(""),[I,L]=ye.useState("");return M.jsx(r0,{value:{sourceColumn:A,setSourceColumn:R,targetColumn:I,setTargetColumn:L,columnsToggle:l,setColumnsToggle:v,swapColumns:()=>{if(!r||!s||!A||!I)return;let D=r.indexOf(A),E=r.indexOf(I);if(D!==-1&&E!==-1){let N=r.splice(D,1)[0];r.splice(E,0,N),s([...r])}},resetColumnsOrder:h,resetColumnsToggle:d,setColumnWidth:b,resetColumnsWidth:C},children:n})};function i0(){return M.jsx("tr",{className:"mantine-datatable-empty-row",children:M.jsx("td",{})})}function o0(){return M.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),M.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),M.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),M.jsx("path",{d:"M3 3l18 18"})]})}function s0({icon:i,text:n,pt:r,pb:s,active:l,children:v}){return M.jsx(F.Center,{pt:r,pb:s,className:"mantine-datatable-empty-state","data-active":l||void 0,children:v||M.jsxs(M.Fragment,{children:[i||M.jsx("div",{className:"mantine-datatable-empty-state-icon",children:M.jsx(o0,{})}),M.jsx(F.Text,{component:"div",size:"sm",c:"dimmed",children:n})]})})}var a0=({key:i,columns:n=[],getInitialValueInEffect:r=!0})=>{function s(G,ue){let V=[];return G.forEach(ae=>{ue.find(oe=>oe.accessor===ae)&&V.push(ae)}),ue.forEach(ae=>{V.includes(ae.accessor)||V.push(ae.accessor)}),V}function l(G,ue){let V=[];return G.forEach(ae=>{ue.find(oe=>oe.accessor===ae.accessor)&&V.push(ae)}),ue.forEach(ae=>{V.find(oe=>oe.accessor===ae.accessor)||V.push({accessor:ae.accessor,defaultToggle:ae.defaultToggle||!0,toggleable:ae.toggleable,toggled:ae.defaultToggle===void 0?!0:ae.defaultToggle})}),V}function v(G,ue){let V=[];return G.forEach(ae=>{let oe=Object.keys(ae)[0];ue.find(pe=>pe.accessor===oe)&&V.push(ae)}),ue.forEach(ae=>{let oe=ae.accessor;if(!V.find(pe=>Object.keys(pe)[0]===oe)){let pe={};pe[oe]="",V.push(pe)}}),V}function h(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-order`:"",defaultValue:i?C:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=s(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[ae,V]}function d(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-toggle`:"",defaultValue:i?R:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=l(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[l(G,n),V]}function b(){let[G,ue]=Ot.useLocalStorage({key:i?`${i}-columns-width`:"",defaultValue:i?A:void 0,getInitialValueInEffect:r});function V(pe){i&&ue(pe)}if(!i)return[G,V];let ae=v(G,n),oe=JSON.stringify(G);return JSON.stringify(ae)!==oe&&V(ae),[v(G,n),V]}let C=n&&n.map(G=>G.accessor)||[],A=n&&n.map(G=>({[G.accessor]:G.width??"initial"}))||[],R=n&&n.map(G=>({accessor:G.accessor,defaultToggle:G.defaultToggle||!0,toggleable:G.toggleable,toggled:G.defaultToggle===void 0?!0:G.defaultToggle})),[I,L]=h(),[D,E]=d(),[N,ee]=b(),ne=()=>L(C),K=()=>{E(R)},le=()=>ee(A);return{effectiveColumns:ye.useMemo(()=>I?I.map(G=>n.find(ue=>ue.accessor===G)).map(G=>{var ue;return{...G,hidden:(G==null?void 0:G.hidden)||!((ue=D.find(V=>V.accessor===(G==null?void 0:G.accessor)))!=null&&ue.toggled)}}).map(G=>{var ue;return{...G,width:(ue=N.find(V=>V[G==null?void 0:G.accessor]))==null?void 0:ue[G==null?void 0:G.accessor]}}):n,[n,I,D,N]),setColumnsOrder:L,columnsOrder:I,resetColumnsOrder:ne,columnsToggle:D,setColumnsToggle:E,resetColumnsToggle:K,columnsWidth:N,setColumnsWidth:ee,setColumnWidth:(G,ue)=>{let V=N.map(ae=>ae[G]?{[G]:ue}:ae);ee(V)},resetColumnsWidth:le}};function Jr(){var s;let[i]=Ot.useResizeObserver(),{width:n,height:r}=((s=i.current)==null?void 0:s.getBoundingClientRect())||{width:0,height:0};return{ref:i,width:n,height:r}}var u0=typeof window<"u"?ye.useLayoutEffect:ye.useEffect;function l0(i){let[n,r]=ye.useState(null),s=(i==null?void 0:i.join(":"))||"";return ye.useEffect(()=>{r(null)},[s]),{lastSelectionChangeIndex:n,setLastSelectionChangeIndex:r}}function c0(i,n){let r=()=>{n(i.map(l=>l.matches))},s=i.map(l=>{try{return l.addEventListener("change",r),()=>l.removeEventListener("change",r)}catch{return l.addListener(r),()=>l.removeListener(r)}});return()=>{s.forEach(l=>l())}}function f0(i,n){return n||(typeof window<"u"&&"matchMedia"in window?i.map(r=>window.matchMedia(r).matches):i.map(()=>!1))}function h0(i,n,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[s,l]=ye.useState(r?n:f0(i,n)),v=ye.useRef(null);return ye.useEffect(()=>{if("matchMedia"in window)return v.current=i.map(h=>window.matchMedia(h)),l(v.current.map(h=>h.matches)),c0(v.current,h=>{l(h)})},[i]),s}function d0(i){let n=F.useMantineTheme(),r=ye.useMemo(()=>i.map(l=>(typeof l=="function"?l(n):l)??""),[i,n]),s=ye.useMemo(()=>i.map(()=>!0),[i]);return h0(r,s)}function Qo(i){let n=F.useMantineTheme(),r=typeof i=="function"?i(n):i;return Ot.useMediaQuery(r||"",!0)}function Ra(i){let n=i.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function p0(i,n,r){return i.filter(s=>!n.map(r).includes(r(s)))}function La(i,n){return i.filter((r,s,l)=>s===l.findIndex(v=>n(r)===n(v)))}function Fc(i,n){return n?n.match(/([^[.\]])+/g).reduce((r,s)=>r&&r[s],i):void 0}function Bt(i,n){return typeof n=="string"?Fc(i,n):n(i)}function g0({rowExpansion:i,records:n,idAccessor:r}){let s=[];if(i&&n){let{trigger:d,allowMultiple:b,initiallyExpanded:C}=i;n&&d==="always"?s=n.map(A=>Bt(A,r)):C&&(s=n.filter((A,R)=>C({record:A,index:R})).map(A=>Bt(A,r)),b||(s=[s[0]]))}let l,v,h=ye.useState(s);if(i){let{expandable:d,trigger:b,allowMultiple:C,collapseProps:A,content:R}=i;i.expanded?{recordIds:l,onRecordIdsChange:v}=i.expanded:[l,v]=h;let I=L=>v==null?void 0:v(l.filter(D=>D!==Bt(L,r)));return{expandOnClick:b!=="always"&&b!=="never",isRowExpanded:L=>b==="always"?!0:l.includes(Bt(L,r)),isExpandable:({record:L,index:D})=>d?d({record:L,index:D}):!0,expandRow:L=>{let D=Bt(L,r);v==null||v(C?[...l,D]:[D])},collapseRow:I,collapseProps:A,content:({record:L,index:D})=>()=>R({record:L,index:D,collapse:()=>I(L)})}}}function v0(i,n){let[r,s]=ye.useState(i),[l,v]=ye.useState(i),h=Ot.useTimeout(()=>s(!0),0),d=Ot.useTimeout(()=>v(!1),n||200);return ye.useEffect(()=>{i?(d.clear(),v(!0),h.start()):(h.clear(),s(!1),d.start())},[h,d,i]),{expanded:r,visible:l}}var Ia="mantine-datatable-nowrap",ka="mantine-datatable-ellipsis",Xr="mantine-datatable-pointer-cursor",Wc="mantine-datatable-context-menu-cursor",m0="mantine-datatable-text-selection-disabled",Jo="mantine-datatable-text-align-left",Xo="mantine-datatable-text-align-center",es="mantine-datatable-text-align-right";function y0({className:i,style:n,visibleMediaQuery:r,title:s,noWrap:l,ellipsis:v,textAlign:h,width:d}){return Qo(r)?M.jsx(F.TableTh,{className:mt({[Ia]:l||v,[ka]:v,[Jo]:h==="left",[Xo]:h==="center",[es]:h==="right"},i),style:[{width:d,minWidth:d,maxWidth:d},n],children:s}):null}function w0({shadowVisible:i}){return M.jsx(F.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":i||void 0})}var _0=ye.forwardRef(function({className:i,style:n,columns:r,defaultColumnProps:s,selectionVisible:l,selectorCellShadowVisible:v,scrollDiff:h},d){let b=h<0;return M.jsx(F.TableTfoot,{ref:d,className:mt("mantine-datatable-footer",i),style:[{position:b?"relative":"sticky",bottom:F.rem(b?h:0)},n],children:M.jsxs(F.TableTr,{children:[l&&M.jsx(w0,{shadowVisible:v}),r.map(({hidden:C,...A})=>{if(C)return null;let{accessor:R,visibleMediaQuery:I,textAlign:L,width:D,footer:E,footerClassName:N,footerStyle:ee,noWrap:ne,ellipsis:K}={...s,...A};return M.jsx(y0,{className:N,style:ee,visibleMediaQuery:I,textAlign:L,width:D,title:E,noWrap:ne,ellipsis:K},R)})]})})});function b0({group:{id:i,columns:n,title:r,textAlign:s,className:l,style:v}}){let h=ye.useMemo(()=>n.map(({visibleMediaQuery:C})=>C),[n]),d=d0(h),b=ye.useMemo(()=>n.filter(({hidden:C},A)=>!C&&(d==null?void 0:d[A])).length,[n,d]);return b>0?M.jsx(F.TableTh,{colSpan:b,className:mt("mantine-datatable-column-group-header-cell",{[Jo]:s==="left",[Xo]:s==="center",[es]:s==="right"},l),style:v,children:r??Ra(i)}):null}function x0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function S0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function C0({children:i,isActive:n,filterPopoverProps:r}){let[s,{close:l,toggle:v}]=Ot.useDisclosure(!1),h=n?S0:x0,d=Ot.useClickOutside(l);return M.jsxs(F.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[M.jsx(F.PopoverTarget,{children:M.jsx(F.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":n||void 0,size:"sm",variant:"default",onClick:b=>{b.preventDefault(),v()},onKeyDown:b=>b.stopPropagation(),children:M.jsx(h,{})})}),M.jsx(F.PopoverDropdown,{ref:d,onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),children:typeof i=="function"?i({close:l}):i})]})}var A0=i=>{let{accessor:n,columnRef:r}=i,s=ye.useRef(null),[l,v]=ye.useState(0),{setColumnWidth:h}=Ma(),d=A=>{A.preventDefault(),A.stopPropagation(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),document.body.style.cursor="col-resize"},b=A=>{if(!r.current)return;let R=A.clientX-r.current.getBoundingClientRect().right,I=`${r.current.getBoundingClientRect().width+R}px`;r.current.style.width=I,h(n,r.current.style.width),v(-R)},C=()=>{r.current&&(document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),document.body.style.cursor="initial",h(n,r.current.style.width),v(0))};return M.jsx("div",{ref:s,onClick:A=>A.stopPropagation(),onMouseDown:d,onDoubleClick:()=>{r.current&&(r.current.style.maxWidth="initial",r.current.style.minWidth="initial",r.current.style.width="initial",h(n,"initial"))},className:"mantine-datatable-header-resizable-handle",style:{right:F.rem(l)}})};function O0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M12 5l0 14"}),M.jsx("path",{d:"M16 9l-4 -4"}),M.jsx("path",{d:"M8 9l4 -4"})]})}function T0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M8 7l4 -4l4 4"}),M.jsx("path",{d:"M8 17l4 4l4 -4"}),M.jsx("path",{d:"M12 3l0 18"})]})}function D0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),M.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function E0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M18 6l-12 12"}),M.jsx("path",{d:"M6 6l12 12"})]})}function M0({className:i,style:n,accessor:r,visibleMediaQuery:s,title:l,sortable:v,draggable:h,toggleable:d,resizable:b,sortIcons:C,textAlign:A,width:R,sortStatus:I,onSortStatusChange:L,filter:D,filterPopoverProps:E,filtering:N,sortKey:ee}){let{setSourceColumn:ne,setTargetColumn:K,swapColumns:le,setColumnsToggle:G}=Ma(),[ue,V]=ye.useState(!1),ae=ye.useRef(null);if(!Qo(s))return null;let oe=l??Ra(r),pe=typeof oe=="string"?oe:void 0,re=v&&L?f=>{f!=null&&f.defaultPrevented||L({sortKey:ee,columnAccessor:r,direction:(I==null?void 0:I.columnAccessor)===r?I.direction==="asc"?"desc":"asc":(I==null?void 0:I.direction)??"asc"})}:void 0,Ce=f=>{f.stopPropagation(),ne(r),V(!1)},Oe=f=>{f.preventDefault(),K(r),V(!0)},B=()=>{K(r),V(!1),le()},k=()=>{V(!0)},T=()=>{V(!1)},m=f=>{f.stopPropagation(),G(w=>w.map(p=>p.accessor===r?{...p,toggled:!1}:p))};return M.jsxs(F.TableTh,{className:mt({"mantine-datatable-header-cell-sortable":v,"mantine-datatable-header-cell-toggleable":d,"mantine-datatable-header-cell-resizable":b},i),style:[{width:R,...b?{minWidth:"1px"}:{minWidth:R,maxWidth:R}},n],role:v?"button":void 0,tabIndex:v?0:void 0,onClick:re,onKeyDown:f=>f.key==="Enter"&&(re==null?void 0:re()),ref:ae,children:[M.jsxs(F.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[M.jsxs(F.Flex,{align:"center",w:"100%",className:mt({"mantine-datatable-header-cell-draggable":h,"mantine-datatable-header-cell-drag-over":ue}),draggable:h,onDragStart:h?Ce:void 0,onDragEnter:h?k:void 0,onDragOver:h?Oe:void 0,onDrop:h?B:void 0,onDragLeave:h?T:void 0,children:[h?M.jsx(F.Center,{role:"img","aria-label":"Drag column",children:M.jsx(F.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:f=>{f.stopPropagation()},children:M.jsx(D0,{})})}):null,M.jsx(F.Box,{className:mt("mantine-datatable-header-cell-sortable-text",{[Jo]:A==="left",[Xo]:A==="center",[es]:A==="right"},Ia,ka),title:pe,children:oe})]}),d?M.jsx(F.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:M.jsx(F.ActionIcon,{size:"xs",variant:"light",onClick:m,children:M.jsx(E0,{})})}):null,v||(I==null?void 0:I.columnAccessor)===r?M.jsx(M.Fragment,{children:(I==null?void 0:I.columnAccessor)===r?M.jsx(F.Center,{className:mt("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":I.direction==="desc"}),role:"img","aria-label":`Sorted ${I.direction==="desc"?"descending":"ascending"}`,children:(C==null?void 0:C.sorted)||M.jsx(O0,{})}):M.jsx(F.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:(C==null?void 0:C.unsorted)||M.jsx(T0,{})})}):null,D?M.jsx(C0,{filterPopoverProps:E,isActive:!!N,children:D}):null]}),b?M.jsx(A0,{accessor:r,columnRef:ae}):null]})}var R0=ye.forwardRef(function({className:i,style:n,trigger:r,shadowVisible:s,checked:l,indeterminate:v,checkboxProps:h,onChange:d,rowSpan:b},C){let A=!h.disabled;return M.jsx(F.TableTh,{ref:C,className:mt("mantine-datatable-header-selector-cell",{[Xr]:r==="cell"&&A},i),style:n,rowSpan:b,"data-shadow-visible":s||void 0,onClick:r==="cell"&&A?d:void 0,children:M.jsx(F.Checkbox,{classNames:A?{input:Xr}:void 0,checked:l,indeterminate:v,onChange:d,...h,disabled:!(d||h.onChange)||h.disabled})})}),L0=ye.forwardRef(function({selectionColumnHeaderRef:i,className:n,style:r,sortStatus:s,sortIcons:l,onSortStatusChange:v,columns:h,defaultColumnProps:d,groups:b,selectionTrigger:C,selectionVisible:A,selectionChecked:R,selectionIndeterminate:I,onSelectionChange:L,selectionCheckboxProps:D,selectorCellShadowVisible:E,selectionColumnClassName:N,selectionColumnStyle:ee},ne){let K=A?M.jsx(R0,{ref:i,className:N,style:ee,trigger:C,shadowVisible:E,checked:R,indeterminate:I,checkboxProps:D,onChange:L,rowSpan:b?2:void 0}):null,{columnsToggle:le,setColumnsToggle:G}=Ma(),[ue,V]=ye.useState(!1),ae=h.some(re=>re.toggleable),oe=ae?Object.fromEntries(h.map(({accessor:re,title:Ce})=>[re,Ce??Ra(String(re))])):void 0,pe=M.jsxs(F.TableThead,{className:mt("mantine-datatable-header",n),style:r,ref:ne,onContextMenu:ae?re=>{re.preventDefault(),V(Ce=>!Ce)}:void 0,children:[b&&M.jsxs(F.TableTr,{children:[K,b.map(re=>M.jsx(b0,{group:re},re.id))]}),M.jsxs(F.TableTr,{children:[!b&&K,h.map(({hidden:re,...Ce},Oe)=>{if(re)return null;let{accessor:B,visibleMediaQuery:k,textAlign:T,width:m,title:f,sortable:w,draggable:p,toggleable:g,resizable:O,titleClassName:Y,titleStyle:Q,filter:fe,filterPopoverProps:de,filtering:we,sortKey:X}={...d,...Ce};return M.jsx(M0,{accessor:B,className:Y,style:Q,visibleMediaQuery:k,textAlign:T,width:m,title:f,sortable:w,draggable:p,toggleable:g,resizable:O&&Oe<h.length-1,sortStatus:s,sortIcons:l,sortKey:X,onSortStatusChange:v,filter:fe,filterPopoverProps:de,filtering:we},B)})]})]});return ae?M.jsxs(F.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:ue,onChange:V,children:[M.jsx(F.PopoverTarget,{children:pe}),M.jsx(F.PopoverDropdown,{children:M.jsx(F.Stack,{children:le.filter(re=>re.toggleable).map(re=>M.jsx(F.Group,{children:M.jsx(F.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:oe[re.accessor],checked:re.toggled,onChange:Ce=>{G(le.map(Oe=>Oe.accessor===re.accessor?{...Oe,toggled:Ce.currentTarget.checked}:Oe))}})},re.accessor))})})]}):pe});function I0({pt:i,pb:n,fetching:r,customContent:s,backgroundBlur:l,size:v,type:h,color:d}){return M.jsx(F.Center,{pt:i,pb:n,className:mt("mantine-datatable-loader",{"mantine-datatable-loader-fetching":r}),style:[{backdropFilter:l?`blur(${l}px)`:void 0}],children:r&&(s||M.jsx(F.Loader,{size:v,type:h,color:d}))})}function xt(i,n,r){return i?F.parseThemeColor({color:typeof i=="object"?i[r]:i,theme:n}).value:void 0}function k0({theme:i,c:n,backgroundColor:r,borderColor:s,rowBorderColor:l,stripedColor:v,highlightOnHoverColor:h}){return{"--mantine-datatable-color-light":xt(n,i,"light"),"--mantine-datatable-color-dark":xt(n,i,"dark"),"--mantine-datatable-background-color-light":xt(r,i,"light"),"--mantine-datatable-background-color-dark":xt(r,i,"dark"),"--mantine-datatable-border-color-light":xt(s,i,"light"),"--mantine-datatable-border-color-dark":xt(s,i,"dark"),"--mantine-datatable-row-border-color-light":xt(l,i,"light"),"--mantine-datatable-row-border-color-dark":xt(l,i,"dark"),"--mantine-datatable-striped-color-light":xt(v,i,"light"),"--mantine-datatable-striped-color-dark":xt(v,i,"dark"),"--mantine-datatable-highlight-on-hover-color-light":xt(h,i,"light"),"--mantine-datatable-highlight-on-hover-color-dark":xt(h,i,"dark")}}function Yc({theme:i,paginationActiveTextColor:n,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":xt(n,i,"light"),"--mantine-datatable-pagination-active-text-color-dark":xt(n,i,"dark"),"--mantine-datatable-pagination-active-background-color-light":xt(r,i,"light"),"--mantine-datatable-pagination-active-background-color-dark":xt(r,i,"dark")}}function P0({theme:i,color:n,backgroundColor:r}){return{"--mantine-datatable-row-color-light":xt(n,i,"light"),"--mantine-datatable-row-color-dark":xt(n,i,"dark"),"--mantine-datatable-row-background-color-light":xt(r,i,"light"),"--mantine-datatable-row-background-color-dark":xt(r,i,"dark")}}function $0(){return M.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[M.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),M.jsx("path",{d:"M8 9l4 -4l4 4"}),M.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var qc={xs:F.rem(22),sm:F.rem(26),md:F.rem(32),lg:F.rem(38),xl:F.rem(44)};function N0({size:i,label:n,values:r,value:s,activeTextColor:l,activeBackgroundColor:v,onChange:h}){return M.jsxs(F.Group,{gap:"xs",children:[M.jsx(F.Text,{component:"div",size:i,children:n}),M.jsxs(F.Menu,{withinPortal:!0,withArrow:!0,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[M.jsx(F.MenuTarget,{children:M.jsx(F.Button,{size:i,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:M.jsx($0,{}),style:[{fontWeight:"normal"},d=>({height:qc[i],paddingLeft:d.spacing[i],paddingRight:d.spacing[i]})],children:s})}),M.jsx(F.MenuDropdown,{children:r.map(d=>{let b=d===s;return M.jsx(F.MenuItem,{className:mt({"mantine-datatable-page-size-selector-active":b}),style:[{height:qc[i]},b&&(l||v)?C=>Yc({theme:C,paginationActiveTextColor:l,paginationActiveBackgroundColor:v}):void 0],disabled:b,onClick:()=>h(d),children:M.jsx(F.Text,{component:"div",size:i,children:d})},d)})})]})]})}var B0=ye.forwardRef(function({className:i,style:n,fetching:r,page:s,onPageChange:l,paginationWithEdges:v,paginationWithControls:h,paginationActiveTextColor:d,paginationActiveBackgroundColor:b,paginationSize:C,loadingText:A,noRecordsText:R,paginationText:I,totalRecords:L,recordsPerPage:D,onRecordsPerPageChange:E,recordsPerPageLabel:N,recordsPerPageOptions:ee,recordsLength:ne,horizontalSpacing:K,paginationWrapBreakpoint:le,getPaginationControlProps:G},ue){let V;if(L){let oe=(s-1)*D+1,pe=oe+(ne||0)-1;V=I({from:oe,to:pe,totalRecords:L})}else V=r?A:R;let ae=Qo(({breakpoints:oe})=>`(min-width: ${typeof le=="number"?`${F.rem(le)}rem`:oe[le]||le})`);return M.jsxs(F.Box,{ref:ue,px:K??"xs",py:"xs",className:mt("mantine-datatable-pagination",i),style:[{flexDirection:ae?"row":"column"},n],children:[M.jsx(F.Text,{component:"div",className:"mantine-datatable-pagination-text",size:C,children:V}),ee&&M.jsx(N0,{activeTextColor:d,activeBackgroundColor:b,size:C,label:N,values:ee,value:D,onChange:E}),M.jsx(F.Pagination,{classNames:{root:mt("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!ne}),control:"mantine-datatable-pagination-pages-control"},style:d||b?oe=>Yc({theme:oe,paginationActiveTextColor:d,paginationActiveBackgroundColor:b}):void 0,withEdges:v,withControls:h,value:s,onChange:l,size:C,total:Math.ceil(L/D),getControlProps:G})]})});function j0({className:i,style:n,visibleMediaQuery:r,record:s,index:l,onClick:v,onDoubleClick:h,onContextMenu:d,noWrap:b,ellipsis:C,textAlign:A,width:R,accessor:I,render:L,defaultRender:D,customCellAttributes:E}){return Qo(r)?M.jsx(F.TableTd,{className:mt({[Ia]:b||C,[ka]:C,[Xr]:v||h,[Wc]:d,[Jo]:A==="left",[Xo]:A==="center",[es]:A==="right"},i),style:[{width:R,minWidth:R,maxWidth:R},n],onClick:v,onDoubleClick:h,onContextMenu:d,...E==null?void 0:E(s,l),children:L?L(s,l):D?D(s,l,I):Fc(s,I)}):null}function U0({open:i,colSpan:n,content:r,collapseProps:s}){let{expanded:l,visible:v}=v0(i,s==null?void 0:s.transitionDuration);return v?M.jsxs(M.Fragment,{children:[M.jsx(F.TableTr,{}),M.jsx(F.TableTr,{children:M.jsx(F.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:n,children:M.jsx(F.Collapse,{in:l,...s,children:M.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function z0({className:i,style:n,record:r,index:s,trigger:l,onChange:v,withRightShadow:h,checkboxProps:d,getCheckboxProps:b,...C}){let A={...d,...b(r,s)},R=!C.disabled&&!A.disabled,I=L=>{L.stopPropagation(),l==="cell"&&R&&(v==null||v(L))};return M.jsx(F.TableTd,{className:mt("mantine-datatable-row-selector-cell",{[Xr]:l==="cell"&&R},i),style:n,"data-shadow-visible":h||void 0,onClick:I,children:M.jsx(F.Checkbox,{classNames:R?{input:Xr}:void 0,onChange:v,...C,...A})})}function F0({record:i,index:n,columns:r,defaultColumnProps:s,defaultColumnRender:l,selectionTrigger:v,selectionVisible:h,selectionChecked:d,onSelectionChange:b,isRecordSelectable:C,selectionCheckboxProps:A,getSelectionCheckboxProps:R,onClick:I,onDoubleClick:L,onContextMenu:D,onCellClick:E,onCellDoubleClick:N,onCellContextMenu:ee,expansion:ne,customAttributes:K,color:le,backgroundColor:G,className:ue,style:V,selectorCellShadowVisible:ae,selectionColumnClassName:oe,selectionColumnStyle:pe,rowFactory:re}){let Ce=M.jsxs(M.Fragment,{children:[h&&M.jsx(z0,{className:oe,style:pe,record:i,index:n,trigger:v,withRightShadow:ae,checked:d,disabled:!b||(C?!C(i,n):!1),onChange:b,checkboxProps:A,getCheckboxProps:R}),r.map(({hidden:k,hiddenContent:T,...m},f)=>{if(k||T)return null;let{accessor:w,visibleMediaQuery:p,textAlign:g,noWrap:O,ellipsis:Y,width:Q,render:fe,cellsClassName:de,cellsStyle:we,customCellAttributes:X}={...s,...m};return M.jsx(j0,{className:typeof de=="function"?de(i,n):de,style:we==null?void 0:we(i,n),visibleMediaQuery:p,record:i,index:n,onClick:E?ce=>E({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,onDoubleClick:N?ce=>N({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,onContextMenu:ee?ce=>ee({event:ce,record:i,index:n,column:m,columnIndex:f}):void 0,accessor:w,textAlign:g,noWrap:O,ellipsis:Y,width:Q,render:fe,defaultRender:l,customCellAttributes:X},w)})]}),Oe=ne&&M.jsx(U0,{colSpan:r.filter(({hidden:k})=>!k).length+(h?1:0),open:ne.isRowExpanded(i),content:ne.content({record:i,index:n}),collapseProps:ne.collapseProps}),B=W0({record:i,index:n,selectionChecked:d,onClick:I,onDoubleClick:L,onContextMenu:D,expansion:ne,customAttributes:K,color:le,backgroundColor:G,className:ue,style:V});return re?re({record:i,index:n,rowProps:B,children:Ce,expandedElement:Oe}):M.jsxs(M.Fragment,{children:[M.jsx(F.TableTr,{...B,children:Ce}),Oe]})}function W0({record:i,index:n,selectionChecked:r,onClick:s,onDoubleClick:l,onContextMenu:v,expansion:h,customAttributes:d,color:b,backgroundColor:C,className:A,style:R}){return{className:mt("mantine-datatable-row",{[Xr]:s||l||(h==null?void 0:h.isExpandable({record:i,index:n}))&&(h==null?void 0:h.expandOnClick)},{[Wc]:v},typeof A=="function"?A(i,n):A),"data-selected":r||void 0,onClick:I=>{if(h){let{isExpandable:L,isRowExpanded:D,expandOnClick:E,expandRow:N,collapseRow:ee}=h;L({record:i,index:n})&&E&&(D(i)?ee(i):N(i))}s==null||s({event:I,record:i,index:n})},onDoubleClick:l?I=>l({event:I,record:i,index:n}):void 0,onContextMenu:v?I=>v({event:I,record:i,index:n}):void 0,style:[b||C?I=>{let L=b==null?void 0:b(i,n),D=C==null?void 0:C(i,n);return P0({theme:I,color:L,backgroundColor:D})}:void 0,R==null?void 0:R(i,n)],...(d==null?void 0:d(i,n))??{}}}function Y0({topShadowVisible:i,leftShadowVisible:n,leftShadowBehind:r,rightShadowVisible:s,rightShadowBehind:l,bottomShadowVisible:v,headerHeight:h,footerHeight:d,onScrollPositionChange:b,children:C,viewportRef:A,scrollAreaProps:R}){return M.jsxs(F.ScrollArea,{...R,viewportRef:A,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:b,children:[C,M.jsx(F.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow",{"mantine-datatable-scroll-area-shadow-visible":i}),style:{top:h?F.rem(h):0}}),M.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-visible":n,"mantine-datatable-scroll-area-shadow-behind":r})}),M.jsx("div",{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-visible":s,"mantine-datatable-scroll-area-shadow-behind":l})}),M.jsx(F.Box,{className:mt("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow",{"mantine-datatable-scroll-area-shadow-visible":v}),style:{bottom:d?F.rem(d+1):0}})]})}function q0({withTableBorder:i,borderRadius:n,textSelectionDisabled:r,height:s="100%",minHeight:l,maxHeight:v,shadow:h,verticalAlign:d="center",fetching:b,columns:C,storeColumnsKey:A,groups:R,pinFirstColumn:I,pinLastColumn:L,defaultColumnProps:D,defaultColumnRender:E,idAccessor:N="id",records:ee,selectionTrigger:ne="checkbox",selectedRecords:K,onSelectedRecordsChange:le,selectionColumnClassName:G,selectionColumnStyle:ue,isRecordSelectable:V,selectionCheckboxProps:ae,allRecordsSelectionCheckboxProps:oe={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:pe=(qt,zn)=>({"aria-label":`Select record ${zn+1}`}),sortStatus:re,sortIcons:Ce,onSortStatusChange:Oe,horizontalSpacing:B,page:k,onPageChange:T,totalRecords:m,recordsPerPage:f,onRecordsPerPageChange:w,recordsPerPageOptions:p,recordsPerPageLabel:g="Records per page",paginationWithEdges:O,paginationWithControls:Y,paginationActiveTextColor:Q,paginationActiveBackgroundColor:fe,paginationSize:de="sm",paginationText:we=({from:qt,to:zn,totalRecords:Fn})=>`${qt} - ${zn} / ${Fn}`,paginationWrapBreakpoint:X="sm",getPaginationControlProps:ce=qt=>qt==="previous"?{"aria-label":"Previous page"}:qt==="next"?{"aria-label":"Next page"}:{},loaderBackgroundBlur:Ae,customLoader:be,loaderSize:U,loaderType:q,loaderColor:W,loadingText:J="...",emptyState:se,noRecordsText:Te="No records",noRecordsIcon:u,highlightOnHover:c,striped:_,noHeader:$,onRowClick:j,onRowDoubleClick:te,onRowContextMenu:xe,onCellClick:De,onCellDoubleClick:Re,onCellContextMenu:Se,onScroll:ke,onScrollToTop:$e,onScrollToBottom:Le,onScrollToLeft:Ke,onScrollToRight:Ge,c:ot,backgroundColor:gt,borderColor:yt,rowBorderColor:ct,stripedColor:Et,highlightOnHoverColor:Rn,rowColor:un,rowBackgroundColor:St,rowExpansion:Sn,rowClassName:Ln,rowStyle:In,customRowAttributes:ln,scrollViewportRef:cn,scrollAreaProps:fn,tableRef:st,bodyRef:rt,m:Mt,my:ai,mx:kn,mt:ui,mb:hr,ml:li,mr:ci,className:Pa,classNames:Rt,style:$a,styles:Lt,rowFactory:Na,tableWrapper:Hi,...Gi}){let{ref:qt,width:zn,height:Fn}=Jr(),Pr=ye.useMemo(()=>(R==null?void 0:R.flatMap(Ze=>Ze.columns))??C,[C,R]),ns=a0({key:A,columns:Pr}),{ref:Ba,height:dr}=Jr(),{ref:ja,width:pr,height:$r}=Jr(),{ref:Ua,height:za}=Jr(),{ref:rs,height:Vi}=Jr(),{ref:is,width:Fa}=Jr(),Wa=Ot.useMergedRef(ja,st),Ya=Ot.useMergedRef(qt,cn),[Zi,Ki]=ye.useState(!0),[fi,Qi]=ye.useState(!0),[Wn,os]=ye.useState(!0),[Nr,Br]=ye.useState(!0),ss=g0({rowExpansion:Sn,records:ee,idAccessor:N}),Ji=ye.useCallback(()=>{var vr,mr;let Ze=((vr=qt.current)==null?void 0:vr.scrollTop)??0,Kt=((mr=qt.current)==null?void 0:mr.scrollLeft)??0;if(b||$r<=Fn)Ki(!0),Qi(!0);else{let hn=Ze===0,Qt=$r-Ze-Fn<1;Ki(hn),Qi(Qt),hn&&hn!==Zi&&($e==null||$e()),Qt&&Qt!==fi&&(Le==null||Le())}if(b||pr===zn)os(!0),Br(!0);else{let hn=Kt===0,Qt=pr-Kt-zn<1;os(hn),Br(Qt),hn&&hn!==Wn&&(Ke==null||Ke()),Qt&&Qt!==Nr&&(Ge==null||Ge())}},[b,Le,Ke,Ge,$e,Fn,qt,zn,fi,Wn,Nr,Zi,$r,pr]);u0(Ji,[Ji]);let Xi=Ot.useDebouncedCallback(Ji,50),as=ye.useCallback(Ze=>{ke==null||ke(Ze),Xi()},[Xi,ke]),eo=ye.useCallback(Ze=>{var Kt;(Kt=qt.current)==null||Kt.scrollTo({top:0,left:0}),T(Ze)},[T,qt]),hi=ee==null?void 0:ee.length,to=ee==null?void 0:ee.map(Ze=>Bt(Ze,N)),Pn=!!K,Cn=K==null?void 0:K.map(Ze=>Bt(Ze,N)),Yn=to!==void 0&&Cn!==void 0&&Cn.length>0,gr=V?ee==null?void 0:ee.filter(V):ee,jr=gr==null?void 0:gr.map(Ze=>Bt(Ze,N)),di=Yn&&jr.every(Ze=>Cn.includes(Ze)),us=Yn&&jr.some(Ze=>Cn.includes(Ze)),ls=ye.useCallback(()=>{K&&le&&le(di?K.filter(Ze=>!jr.includes(Bt(Ze,N))):La([...K,...gr],Ze=>Bt(Ze,N)))},[di,N,le,jr,gr,K]),{lastSelectionChangeIndex:Ur,setLastSelectionChangeIndex:cs}=l0(to),no=Pn&&!Wn&&!I,qa={m:Mt,my:ai,mx:kn,mt:ui,mb:hr,ml:li,mr:ci},Ha=ye.useCallback(({children:Ze})=>Hi?Hi({children:Ze}):Ze,[Hi]);return M.jsx(zc,{...ns,children:M.jsxs(F.Box,{...qa,className:mt("mantine-datatable",{"mantine-datatable-with-border":i},Pa,Rt==null?void 0:Rt.root),style:[Ze=>({...k0({theme:Ze,c:ot,backgroundColor:gt,borderColor:yt,rowBorderColor:ct,stripedColor:Et,highlightOnHoverColor:Rn}),borderRadius:Ze.radius[n]||n,boxShadow:Ze.shadows[h]||h,height:s,minHeight:l,maxHeight:v}),$a,Lt==null?void 0:Lt.root,{position:"relative"}],children:[M.jsx(Y0,{viewportRef:Ya,topShadowVisible:!Zi,leftShadowVisible:!Wn,leftShadowBehind:Pn||!!I,rightShadowVisible:!Nr,rightShadowBehind:L,bottomShadowVisible:!fi,headerHeight:dr,footerHeight:za,onScrollPositionChange:as,scrollAreaProps:fn,children:M.jsx(Ha,{children:M.jsxs(F.Table,{ref:Wa,horizontalSpacing:B,className:mt("mantine-datatable-table",{[m0]:r,"mantine-datatable-vertical-align-top":d==="top","mantine-datatable-vertical-align-bottom":d==="bottom","mantine-datatable-last-row-border-bottom-visible":Gi.withRowBorders&&$r<Fn,"mantine-datatable-pin-last-column":L,"mantine-datatable-pin-last-column-scrolled":!Nr&&L,"mantine-datatable-selection-column-visible":Pn,"mantine-datatable-pin-first-column":I,"mantine-datatable-pin-first-column-scrolled":!Wn&&I},Rt==null?void 0:Rt.table),style:{...Lt==null?void 0:Lt.table,"--mantine-datatable-selection-column-width":`${Fa}px`},"data-striped":hi&&_||void 0,"data-highlight-on-hover":c||void 0,...Gi,children:[$?null:M.jsx(zc,{...ns,children:M.jsx(L0,{ref:Ba,selectionColumnHeaderRef:is,className:Rt==null?void 0:Rt.header,style:Lt==null?void 0:Lt.header,columns:Pr,defaultColumnProps:D,groups:R,sortStatus:re,sortIcons:Ce,onSortStatusChange:Oe,selectionTrigger:ne,selectionVisible:Pn,selectionChecked:di,selectionIndeterminate:us&&!di,onSelectionChange:ls,selectionCheckboxProps:{...ae,...oe},selectorCellShadowVisible:no,selectionColumnClassName:G,selectionColumnStyle:ue})}),M.jsx("tbody",{ref:rt,children:hi?ee.map((Ze,Kt)=>{let vr=Bt(Ze,N),mr=(Cn==null?void 0:Cn.includes(vr))||!1,hn;return le&&K&&(hn=Qt=>{if(Qt.nativeEvent.shiftKey&&Ur!==null){let yr=ee.filter(Kt>Ur?(qn,Hn)=>Hn>=Ur&&Hn<=Kt&&(V?V(qn,Hn):!0):(qn,Hn)=>Hn>=Kt&&Hn<=Ur&&(V?V(qn,Hn):!0));le(mr?p0(K,yr,qn=>Bt(qn,N)):La([...K,...yr],qn=>Bt(qn,N)))}else le(mr?K.filter(yr=>Bt(yr,N)!==vr):La([...K,Ze],yr=>Bt(yr,N)));cs(Kt)}),M.jsx(F0,{record:Ze,index:Kt,columns:Pr,defaultColumnProps:D,defaultColumnRender:E,selectionTrigger:ne,selectionVisible:Pn,selectionChecked:mr,onSelectionChange:hn,isRecordSelectable:V,selectionCheckboxProps:ae,getSelectionCheckboxProps:pe,onClick:j,onDoubleClick:te,onCellClick:De,onCellDoubleClick:Re,onContextMenu:xe,onCellContextMenu:Se,expansion:ss,color:un,backgroundColor:St,className:Ln,style:In,customAttributes:ln,selectorCellShadowVisible:no,selectionColumnClassName:G,selectionColumnStyle:ue,idAccessor:N,rowFactory:Na},vr)}):M.jsx(i0,{})}),Pr.some(({footer:Ze})=>Ze)&&M.jsx(_0,{ref:Ua,className:Rt==null?void 0:Rt.footer,style:Lt==null?void 0:Lt.footer,columns:Pr,defaultColumnProps:D,selectionVisible:Pn,selectorCellShadowVisible:no,scrollDiff:$r-Fn})]})})}),k&&M.jsx(B0,{ref:rs,className:Rt==null?void 0:Rt.pagination,style:Lt==null?void 0:Lt.pagination,horizontalSpacing:B,fetching:b,page:k,onPageChange:eo,totalRecords:m,recordsPerPage:f,onRecordsPerPageChange:w,recordsPerPageOptions:p,recordsPerPageLabel:g,paginationWithEdges:O,paginationWithControls:Y,paginationActiveTextColor:Q,paginationActiveBackgroundColor:fe,paginationSize:de,paginationText:we,paginationWrapBreakpoint:X,getPaginationControlProps:ce,noRecordsText:Te,loadingText:J,recordsLength:hi}),M.jsx(I0,{pt:dr,pb:Vi,fetching:b,backgroundBlur:Ae,customContent:be,size:U,type:q,color:W}),M.jsx(s0,{pt:dr,pb:Vi,icon:u,text:Te,active:!b&&!hi,children:se})]})})}var H0=ye.forwardRef(function({children:i,isDragging:n,...r},s){let l=ye.useRef(null),v=Ot.useMergedRef(l,s);return ye.useEffect(()=>{if(!l.current||!n)return;let h=l.current.parentElement.parentElement.children[0].children[0];for(let d=0;d<h.children.length;d++){let b=h.children[d].getBoundingClientRect(),C=l.current.children[d];C.style.height=b.height+"px",C.style.width=b.width+"px",C.style.minWidth=b.width+"px",C.style.maxWidth=b.width+"px"}},[n,i]),M.jsx(F.TableTr,{"data-is-dragging":n,ref:v,...r,children:i})});H0.displayName="DataTableDraggableRow";var Wi={exports:{}};/**
|
|
118
118
|
* @license
|
|
119
119
|
* Lodash <https://lodash.com/>
|
|
120
120
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|