diff --git a/dist/client/assets/index-DA9apz9T.js b/dist/client/assets/index-C_wi83Kd.js similarity index 99% rename from dist/client/assets/index-DA9apz9T.js rename to dist/client/assets/index-C_wi83Kd.js index befd4cb..ee6b3da 100644 --- a/dist/client/assets/index-DA9apz9T.js +++ b/dist/client/assets/index-C_wi83Kd.js @@ -394,7 +394,7 @@ __p += '`),Ut&&(Re+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Re+`return __p -}`;var Tt=C4(function(){return nn(W,Xe+"return "+Re).apply(n,Z)});if(Tt.source=Re,YN(Tt))throw Tt;return Tt}function wce(x){return cn(x).toLowerCase()}function _ce(x){return cn(x).toUpperCase()}function Sce(x,C,D){if(x=cn(x),x&&(D||C===n))return MF(x);if(!x||!(C=Wi(C)))return x;var O=fa(x),F=fa(C),W=OF(O,F),Z=IF(O,F)+1;return $u(O,W,Z).join("")}function Cce(x,C,D){if(x=cn(x),x&&(D||C===n))return x.slice(0,LF(x)+1);if(!x||!(C=Wi(C)))return x;var O=fa(x),F=IF(O,fa(C))+1;return $u(O,0,F).join("")}function Ece(x,C,D){if(x=cn(x),x&&(D||C===n))return x.replace(ae,"");if(!x||!(C=Wi(C)))return x;var O=fa(x),F=OF(O,fa(C));return $u(O,F).join("")}function Rce(x,C){var D=k,O=M;if(Zn(C)){var F="separator"in C?C.separator:F;D="length"in C?Rt(C.length):D,O="omission"in C?Wi(C.omission):O}x=cn(x);var W=x.length;if(sm(x)){var Z=fa(x);W=Z.length}if(D>=W)return x;var re=D-im(O);if(re<1)return O;var ue=Z?$u(Z,0,re).join(""):x.slice(0,re);if(F===n)return ue+O;if(Z&&(re+=ue.length-re),XN(F)){if(x.slice(re).search(F)){var Se,Ce=ue;for(F.global||(F=fN(F.source,cn(st.exec(F))+"g")),F.lastIndex=0;Se=F.exec(Ce);)var Re=Se.index;ue=ue.slice(0,Re===n?re:Re)}}else if(x.indexOf(Wi(F),re)!=re){var Be=ue.lastIndexOf(F);Be>-1&&(ue=ue.slice(0,Be))}return ue+O}function Ace(x){return x=cn(x),x&&Zt.test(x)?x.replace(_t,nse):x}var Pce=fm(function(x,C,D){return x+(D?" ":"")+C.toUpperCase()}),JN=E3("toUpperCase");function S4(x,C,D){return x=cn(x),C=D?n:C,C===n?Qre(x)?ise(x):Ure(x):x.match(C)||[]}var C4=Dt(function(x,C){try{return Vi(x,n,C)}catch(D){return YN(D)?D:new bt(D)}}),Nce=sc(function(x,C){return No(C,function(D){D=sl(D),nc(x,D,GN(x[D],x))}),x});function Tce(x){var C=x==null?0:x.length,D=at();return x=C?Xn(x,function(O){if(typeof O[1]!="function")throw new To(o);return[D(O[0]),O[1]]}):[],Dt(function(O){for(var F=-1;++Fq)return[];var D=X,O=ws(x,X);C=at(C),x-=X;for(var F=cN(O,C);++D0||C<0)?new Bt(D):(x<0?D=D.takeRight(-x):x&&(D=D.drop(x)),C!==n&&(C=Rt(C),D=C<0?D.dropRight(-C):D.take(C-x)),D)},Bt.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},Bt.prototype.toArray=function(){return this.take(X)},nl(Bt.prototype,function(x,C){var D=/^(?:filter|find|map|reject)|While$/.test(C),O=/^(?:head|last)$/.test(C),F=V[O?"take"+(C=="last"?"Right":""):C],W=O||/^find/.test(C);F&&(V.prototype[C]=function(){var Z=this.__wrapped__,re=O?[1]:arguments,ue=Z instanceof Bt,Se=re[0],Ce=ue||wt(Z),Re=function(Lt){var Ut=F.apply(V,Du([Lt],re));return O&&Be?Ut[0]:Ut};Ce&&D&&typeof Se=="function"&&Se.length!=1&&(ue=Ce=!1);var Be=this.__chain__,Xe=!!this.__actions__.length,dt=W&&!Be,Tt=ue&&!Xe;if(!W&&Ce){Z=Tt?Z:new Bt(this);var ft=x.apply(Z,re);return ft.__actions__.push({func:jS,args:[Re],thisArg:n}),new ko(ft,Be)}return dt&&Tt?x.apply(this,re):(ft=this.thru(Re),dt?O?ft.value()[0]:ft.value():ft)})}),No(["pop","push","shift","sort","splice","unshift"],function(x){var C=lS[x],D=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",O=/^(?:pop|shift)$/.test(x);V.prototype[x]=function(){var F=arguments;if(O&&!this.__chain__){var W=this.value();return C.apply(wt(W)?W:[],F)}return this[D](function(Z){return C.apply(wt(Z)?Z:[],F)})}}),nl(Bt.prototype,function(x,C){var D=V[C];if(D){var O=D.name+"";pn.call(cm,O)||(cm[O]=[]),cm[O].push({name:C,func:D})}}),cm[NS(n,g).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=Ase,Bt.prototype.reverse=Pse,Bt.prototype.value=Nse,V.prototype.at=sae,V.prototype.chain=iae,V.prototype.commit=oae,V.prototype.next=aae,V.prototype.plant=cae,V.prototype.reverse=uae,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=dae,V.prototype.first=V.prototype.head,Wy&&(V.prototype[Wy]=lae),V},om=ose();Af?((Af.exports=om)._=om,tN._=om):os._=om}).call(pr)})(VE,VE.exports);var lC=VE.exports;const xO=({amount:t,scale:e})=>{const n=10**e;return Number(t)/n},ROe=t=>{const e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${e}-${n}-${r}`},Ik={locale:"es-ES"},Nm={amount:null,currencyCode:au.DEFAULT_CURRENCY_CODE,scale:2},ur=class ur extends v${constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r){const s=Kt.any().optional().valid(null),i=Kt.number().label(r.label?r.label:"amount"),o=Kt.alternatives(s,i);return bn.validate(o,n)}static getMonetaryValueInfo(n){const[r,s]=n.split("."),i=s?s.length:0;return[(r+s).replace(/[^0-9]/g,""),i]}static create(n=Nm,r=Ik){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=Nm.amount,currencyCode:i=Nm.currencyCode,scale:o=Nm.scale}=n||{},a=ur.validate(s,r);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,r));const c=ur.sanitize(a.object),u=au.createFromCode(i).object.code,f=N1({amount:Number(c),currency:u,precision:o}).setLocale(r.locale);return dn.ok(new this(f,lC.isNull(c),r))}static createFromFormattedValue(n,r,s={locale:Ik.locale}){if(n===null||n==="")return ur.create({amount:null,scale:ur.DEFAULT_SCALE,currencyCode:r});const i=String(n),[o,a]=i.split(",");let c=o,u=2;return a===void 0?u=0:(a===""&&(c=o+a.padEnd(1,"0"),u=1),a.length===1?(c=o+a.padEnd(1,"0"),u=1):a.length===2?(c=o+a.padEnd(2,"0"),u=2):a.length===3?(c=o+a.padEnd(3,"0"),u=3):a.length===4&&(c=o+a.padEnd(4,"0"),u=4)),ur.create({amount:c,scale:u,currencyCode:r},s)}static sanitize(n){let r=null;return typeof n=="string"?r=parseFloat(n):r=n,r}static createFromDinero(n){return dn.ok(new ur(n,!1,Ik))}static normalizeScale(n){return N1.normalizePrecision(n.map(r=>r.props)).map(r=>ur.createFromDinero(r).object)}static minimum(n){return ur.createFromDinero(N1.minimum(n.map(r=>r.props))).object}static maximum(n){return ur.createFromDinero(N1.maximum(n.map(r=>r.props))).object}static _toString(n,r,s){if(n===null)return"";new Intl.NumberFormat(s,{useGrouping:!0}).format(n===null?0:xO({amount:n,scale:r}));const i=Math.pow(10,r);return(Number(n)/i).toFixed(r)}toString(){return ur._toString(this.isNull()?null:this.getAmount(),this.getScale(),this._options.locale)}toJSON(){var n;return this._isNull?{}:(n=this.props)==null?void 0:n.toJSON()}toPrimitive(){var n;return this._isNull?null:Number((n=this.props)==null?void 0:n.getAmount())}toPrimitives(){return this.toObject()}getAmount(){return this.props.getAmount()}getScale(){return this.props.getPrecision()}convertScale(n,r="HALF_UP"){return this._isNull?ur.create({amount:null,scale:n,currencyCode:this.getCurrency().code}).object:ur.createFromDinero(this.props.convertPrecision(n,r)).object}getCurrency(){return au.createFromCode(this.props.getCurrency()).object}getLocale(){return this.props.getLocale()}add(n){return ur.createFromDinero(this.props.add(n.props)).object}subtract(n){return ur.createFromDinero(this.props.subtract(n.props)).object}multiply(n,r){return ur.createFromDinero(this.props.multiply(n,r)).object}divide(n,r){return ur.createFromDinero(this.props.divide(n,r)).object}percentage(n,r){return ur.createFromDinero(this.props.percentage(n,r)).object}allocate(n){return this.props.allocate(n).map(r=>ur.createFromDinero(r).object)}equalsTo(n){return this.props.equalsTo(n.props)}lessThan(n){return this.props.lessThan(n.props)}lessThanOrEqual(n){return this.props.lessThanOrEqual(n.props)}greaterThan(n){return this.props.greaterThan(n.props)}greaterThanOrEqual(n){return this.props.greaterThanOrEqual(n.props)}isZero(){return this.props.isZero()}isPositive(){return this.props.isPositive()}isNegative(){return this.props.isNegative()}hasSameCurrency(n){return this.props.hasSameCurrency(n.props)}hasSameAmount(n){return this.props.hasSameAmount(n.props)}toFormat(n,r){return this._isNull?"":this.props.toFormat(n,r)}toUnit(){return this.props.toUnit()}toRoundedUnit(n,r){return this.props.toRoundedUnit(n,r)}toObject(){const n=this.props.toObject();return{amount:this._isNull?null:n.amount,scale:n.precision,currency_code:String(n.currency)}}toNumber(){return this.toUnit()}};Te(ur,"DEFAULT_SCALE",Nm.scale),Te(ur,"DEFAULT_CURRENCY_CODE",Nm.currencyCode);let Jo=ur;class u6e extends Kt.ValidationError{}class nJ{constructor(e){Te(this,"_collection",[]);this._collection=e??[]}add(e){this._collection.push(e)}reset(){this._collection=[]}hasSomeFaultyResult(){return this._collection.some(e=>e.isFailure)}getFirstFaultyResult(){return this._collection.find(e=>e.isFailure)}getAllFaultyResults(){return this._collection.filter(e=>e.isFailure)}get objects(){return this._collection.filter(e=>e.isSuccess).map(e=>e.object)}get errors(){return this._collection.filter(e=>e.isFailure).map(e=>e.error)}}const rJ=2,jk={amount:0,scale:rJ},mn=class mn extends B_{constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r,s){const i=bn.RULE_ALLOW_NULL_OR_UNDEFINED,o=bn.RULE_ALLOW_EMPTY,a=bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"amount"),c=bn.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(s.label?s.label:"amount"),u=Kt.number().min(mn.MIN_SCALE).max(mn.MAX_SCALE).label(s.label?s.label:"scale"),f=new nJ([bn.validate(Kt.alternatives(i,o,a,c),n),bn.validate(Kt.alternatives(bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"scale"),u),r)]);if(f.hasSomeFaultyResult())return f.getFirstFaultyResult();let l=typeof n=="string"?parseInt(n,10):Number(n),d=lC.isNull(r)?mn.DEFAULT_SCALE:Number(r);const p=l/Math.pow(10,d);return pmn.MAX_VALUE?dn.fail(new Error(`Value with scale is out of range: ${p}`)):dn.ok()}static create(n=jk,r={}){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=jk.amount,scale:i=jk.scale}=n,o={label:"percentage",...r},a=mn.validate(s,i,o);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,o));let c=mn._sanitize(s);const u={amount:lC.isNull(c)?0:c,scale:i};return dn.ok(new this(u,lC.isNull(c),r))}static createFromFormattedValue(n,r={}){if(n===null||n==="")return mn.create({amount:null,scale:mn.DEFAULT_SCALE});const s=String(n),[i,o]=s.split(",");let a=i,c=2;return o===void 0?c=0:(o===""&&(a=i+o.padEnd(1,"0"),c=1),o.length===1?(a=i+o.padEnd(1,"0"),c=1):o.length===2&&(a=i+o.padEnd(2,"0"),c=2)),mn.create({amount:a,scale:c},r)}static _sanitize(n){let r=null;return typeof n=="string"?r=parseInt(n,10):r=n,r}static _toString(n,r){if(n===null)return"";const s=Math.pow(10,r);return(Number(n)/s).toFixed(r)}static _isWithinRange(n,r){const s=Number(mn._toString(n,r));return s>=mn.MIN_VALUE&&s<=mn.MAX_VALUE}get amount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}get scale(){var n;return Number((n=this.props)==null?void 0:n.scale)}getAmount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}getScale(){var n;return this.isNull()?0:Number((n=this.props)==null?void 0:n.scale)}toString(){return mn._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==mn.DEFAULT_SCALE?this.convertScale(mn.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(n){if(nmn.MAX_SCALE)throw new Error(`Scale out of range: ${n}`);if(this.isNull())return new mn({amount:null,scale:n},!0,this._options);const r=Math.pow(10,this.scale),s=Number(this.amount)/r,i=Math.pow(10,n),o=Math.round(s*i);if(!mn._isWithinRange(o,n))throw new Error(`Value out of range after conversion: ${o} ${n}`);return new mn({amount:o,scale:n},!1,this._options)}hasSameScale(n){return this.scale===n.scale}isWithinRange(){return mn._isWithinRange(this.amount,this.scale)}};Te(mn,"DEFAULT_SCALE",rJ),Te(mn,"MIN_VALUE",0),Te(mn,"MAX_VALUE",100),Te(mn,"MIN_SCALE",0),Te(mn,"MAX_SCALE",2);let lf=mn;class d6e extends Kt.ValidationError{}const sJ=2,Lk={amount:0,scale:sJ},Sn=class Sn extends B_{constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r,s={}){const i=bn.RULE_ALLOW_NULL_OR_UNDEFINED,o=bn.RULE_ALLOW_EMPTY,a=bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"amount"),c=bn.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(s.label?s.label:"amount"),u=Kt.number().min(Sn.MIN_SCALE).max(Sn.MAX_SCALE).label(s.label?s.label:"scale"),f=new nJ([bn.validate(Kt.alternatives(i,o,a,c),n),bn.validate(Kt.alternatives(bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"scale"),u),r)]);return f.hasSomeFaultyResult()?f.getFirstFaultyResult():dn.ok()}static create(n=Lk,r={}){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=Lk.amount,scale:i=Lk.scale}=n,o={label:"quantity",...r},a=Sn.validate(s,i,o);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,o));let c=Sn._sanitize(s);const u={amount:c===null?0:c,scale:i};return dn.ok(new Sn(u,c===null,r))}static createFromFormattedValue(n,r={}){if(n===null||n==="")return Sn.create({amount:null,scale:Sn.DEFAULT_SCALE});const s=String(n),[i,o]=s.split(",");let a=i,c=2;return o===void 0?c=0:(o===""&&(a=i+o.padEnd(1,"0"),c=1),o.length===1?(a=i+o.padEnd(1,"0"),c=1):o.length===2&&(a=i+o.padEnd(2,"0"),c=2)),Sn.create({amount:a,scale:c},r)}static _sanitize(n){let r=null;return typeof n=="string"?r=parseInt(n,10):r=n,r}static _toString(n,r){if(n===null)return"";const s=Math.pow(10,r);return(Number(n)/s).toFixed(r)}get amount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}get scale(){var n;return Number((n=this.props)==null?void 0:n.scale)}getAmount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}getScale(){var n;return this.isNull()?0:Number((n=this.props)==null?void 0:n.scale)}toString(){return Sn._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==Sn.DEFAULT_SCALE?this.convertScale(Sn.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(n){if(nSn.MAX_SCALE)throw new Error(`Scale out of range: ${n}`);if(this.isNull())return new Sn({amount:null,scale:n},!0,this._options);const r=Math.pow(10,this.scale),s=Number(this.amount)/r,i=Math.pow(10,n),o=Math.round(s*i);return new Sn({amount:o,scale:n},!1,this._options)}hasSameScale(n){return this.scale===n.scale}increment(n){return this.isNull()?n?Sn.create(n.toObject()):Sn.create():n?this.hasSameScale(n)?Sn.create({amount:Number(this.amount)+Number(n.amount),scale:this.scale},this._options):dn.fail(Error("No se pueden sumar cantidades con diferentes escalas.")):Sn.create({amount:Number(this.amount)+1,scale:this.scale},this._options)}decrement(n){return this.isNull()?n?Sn.create(n.toObject()):Sn.create():n?this.hasSameScale(n)?Sn.create({amount:Number(this.amount)-Number(n.amount),scale:this.scale},this._options):dn.fail(Error("No se pueden restar cantidades con diferentes escalas.")):Sn.create({amount:Number(this.amount)-1,scale:this.scale},this._options)}};Te(Sn,"DEFAULT_SCALE",sJ),Te(Sn,"MIN_SCALE",0),Te(Sn,"MAX_SCALE",2);let kp=Sn;class bg extends v${constructor(){super(...arguments);Te(this,"isValid",()=>!isNaN(this.props.valueOf())&&this.props.valueOf()!==0);Te(this,"isEmpty",()=>!this.isValid());Te(this,"toISO8601",()=>this.isValid()?this.props.toISOString():"");Te(this,"toDateString",()=>this.isValid()?this.props.toDateString():"");Te(this,"toLocaleDateString",(n,r)=>this.isValid()?this.props.toLocaleDateString(n,r):"");Te(this,"toLocaleTimeString",()=>this.isValid()?this.props.toLocaleTimeString():"")}static validate(n,r){const s=bn.RULE_ALLOW_EMPTY.default(0),i=Kt.date().label(String(r.label)),o=Kt.alternatives(s,i);return bn.validate(o,n)}static createCurrentDate(){return dn.ok(new bg(new Date))}static create(n,r={}){const s={...r,dateFormat:r.dateFormat?r.dateFormat:"YYYY-MM-DD",label:r.label?r.label:"date"},i=bg.validate(n,s);return i.isFailure?dn.fail(af(Ya.INVALID_INPUT_DATA,i.error.message,s)):dn.ok(new bg(new Date(i.object)))}toString(){if(!this.isEmpty()){const n=this.props.getFullYear(),r=String(this.props.getMonth()+1).padStart(2,"0"),s=String(this.props.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}return""}toPrimitive(){return this.toISO8601()}}const xg=0,y$=10,wO=1,iJ=100,AOe=({isPending:t,interval:e=1e3,onInterval:n})=>{const[r,s]=S.useState(void 0);return S.useEffect(()=>{let i;return t&&(i=setInterval(()=>{s(o=>o===void 0?e:o+e)},e)),()=>{clearInterval(i),s(void 0)}},[t,e]),S.useEffect(()=>{n&&r&&n(r)},[r]),{elapsedTime:r}},POe=2*60*1e3,NOe=60*1e3,b$=({queryKey:t,queryFn:e,enabled:n,select:r,queryOptions:s={},overtimeOptions:i})=>{const[o,a]=S.useState(!1),c=YR({queryKey:t,queryFn:e,placeholderData:b8,staleTime:NOe,refetchInterval:POe,refetchOnWindowFocus:!0,enabled:n&&!!e,select:r,...s});S.useEffect(()=>{c.isSuccess&&eOe(c.data)&&a(c.data.total_items===0)},[c]);const{elapsedTime:u}=AOe({isPending:c.isFetching,interval:i==null?void 0:i.interval,onInterval:i==null?void 0:i.onInterval});return{...c,overtime:{elapsedTime:u},isEmpty:o}},oJ=t=>YR({placeholderData:b8,...t});function TOe(t){return ru({...t})}const aJ=S.createContext(void 0),kOe=({dataSource:t,children:e})=>w.jsx(aJ.Provider,{value:t,children:e}),DOe=[5,10,15,30,50,75,100],mP=(t=xg,e=y$)=>{const[n,r]=S.useState({pageIndex:t,pageSize:e});return[n,i=>{const o=i;return o.pageIndexiJ)&&(o.pageSize=wO),r(a=>({...a,pageIndex:i.pageIndex,pageSize:i.pageSize})),o}]},MOe=(t=xg,e=y$)=>{const[n,r]=gme(),s=n.get("page_index"),i=n.get("page_size"),o=S.useMemo(()=>{const l=parseInt(s??"",10);let d=isNaN(l)?t:l;return d{const l=parseInt(i??"",10);let d=isNaN(l)?e:l;return(diJ)&&(d=e),d},[i,e]),[c,u]=mP(o,a);return[c,l=>{const d=u(l);r({page_index:String(d.pageIndex),page_size:String(d.pageSize)})}]},OOe=({syncWithLocation:t=!0,initialPageIndex:e,initialPageSize:n})=>{const[r,s]=MOe(),[i,o]=mP(e,n);return t?[r,s]:[i,o]},lJ=S.createContext(null),Jv=({syncWithLocation:t=!0,initialGlobalFilter:e=void 0,initialPageIndex:n,initialPageSize:r,children:s})=>{const[i,o]=OOe({syncWithLocation:t,initialPageIndex:n,initialPageSize:r}),[a,c]=S.useState(e),[u,f]=S.useState([]),l=S.useMemo(()=>!!(a&&a.length),[a]),d=S.useCallback(()=>c(""),[]);return w.jsx(lJ.Provider,{value:{pagination:i,setPagination:o,sorting:u,setSorting:f,globalFilter:a,setGlobalFilter:c,resetGlobalFilter:d,isFiltered:l},children:s})};/** +}`;var Tt=C4(function(){return nn(W,Xe+"return "+Re).apply(n,Z)});if(Tt.source=Re,YN(Tt))throw Tt;return Tt}function wce(x){return cn(x).toLowerCase()}function _ce(x){return cn(x).toUpperCase()}function Sce(x,C,D){if(x=cn(x),x&&(D||C===n))return MF(x);if(!x||!(C=Wi(C)))return x;var O=fa(x),F=fa(C),W=OF(O,F),Z=IF(O,F)+1;return $u(O,W,Z).join("")}function Cce(x,C,D){if(x=cn(x),x&&(D||C===n))return x.slice(0,LF(x)+1);if(!x||!(C=Wi(C)))return x;var O=fa(x),F=IF(O,fa(C))+1;return $u(O,0,F).join("")}function Ece(x,C,D){if(x=cn(x),x&&(D||C===n))return x.replace(ae,"");if(!x||!(C=Wi(C)))return x;var O=fa(x),F=OF(O,fa(C));return $u(O,F).join("")}function Rce(x,C){var D=k,O=M;if(Zn(C)){var F="separator"in C?C.separator:F;D="length"in C?Rt(C.length):D,O="omission"in C?Wi(C.omission):O}x=cn(x);var W=x.length;if(sm(x)){var Z=fa(x);W=Z.length}if(D>=W)return x;var re=D-im(O);if(re<1)return O;var ue=Z?$u(Z,0,re).join(""):x.slice(0,re);if(F===n)return ue+O;if(Z&&(re+=ue.length-re),XN(F)){if(x.slice(re).search(F)){var Se,Ce=ue;for(F.global||(F=fN(F.source,cn(st.exec(F))+"g")),F.lastIndex=0;Se=F.exec(Ce);)var Re=Se.index;ue=ue.slice(0,Re===n?re:Re)}}else if(x.indexOf(Wi(F),re)!=re){var Be=ue.lastIndexOf(F);Be>-1&&(ue=ue.slice(0,Be))}return ue+O}function Ace(x){return x=cn(x),x&&Zt.test(x)?x.replace(_t,nse):x}var Pce=fm(function(x,C,D){return x+(D?" ":"")+C.toUpperCase()}),JN=E3("toUpperCase");function S4(x,C,D){return x=cn(x),C=D?n:C,C===n?Qre(x)?ise(x):Ure(x):x.match(C)||[]}var C4=Dt(function(x,C){try{return Vi(x,n,C)}catch(D){return YN(D)?D:new bt(D)}}),Nce=sc(function(x,C){return No(C,function(D){D=sl(D),nc(x,D,GN(x[D],x))}),x});function Tce(x){var C=x==null?0:x.length,D=at();return x=C?Xn(x,function(O){if(typeof O[1]!="function")throw new To(o);return[D(O[0]),O[1]]}):[],Dt(function(O){for(var F=-1;++Fq)return[];var D=X,O=ws(x,X);C=at(C),x-=X;for(var F=cN(O,C);++D0||C<0)?new Bt(D):(x<0?D=D.takeRight(-x):x&&(D=D.drop(x)),C!==n&&(C=Rt(C),D=C<0?D.dropRight(-C):D.take(C-x)),D)},Bt.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},Bt.prototype.toArray=function(){return this.take(X)},nl(Bt.prototype,function(x,C){var D=/^(?:filter|find|map|reject)|While$/.test(C),O=/^(?:head|last)$/.test(C),F=V[O?"take"+(C=="last"?"Right":""):C],W=O||/^find/.test(C);F&&(V.prototype[C]=function(){var Z=this.__wrapped__,re=O?[1]:arguments,ue=Z instanceof Bt,Se=re[0],Ce=ue||wt(Z),Re=function(Lt){var Ut=F.apply(V,Du([Lt],re));return O&&Be?Ut[0]:Ut};Ce&&D&&typeof Se=="function"&&Se.length!=1&&(ue=Ce=!1);var Be=this.__chain__,Xe=!!this.__actions__.length,dt=W&&!Be,Tt=ue&&!Xe;if(!W&&Ce){Z=Tt?Z:new Bt(this);var ft=x.apply(Z,re);return ft.__actions__.push({func:jS,args:[Re],thisArg:n}),new ko(ft,Be)}return dt&&Tt?x.apply(this,re):(ft=this.thru(Re),dt?O?ft.value()[0]:ft.value():ft)})}),No(["pop","push","shift","sort","splice","unshift"],function(x){var C=lS[x],D=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",O=/^(?:pop|shift)$/.test(x);V.prototype[x]=function(){var F=arguments;if(O&&!this.__chain__){var W=this.value();return C.apply(wt(W)?W:[],F)}return this[D](function(Z){return C.apply(wt(Z)?Z:[],F)})}}),nl(Bt.prototype,function(x,C){var D=V[C];if(D){var O=D.name+"";pn.call(cm,O)||(cm[O]=[]),cm[O].push({name:C,func:D})}}),cm[NS(n,g).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=Ase,Bt.prototype.reverse=Pse,Bt.prototype.value=Nse,V.prototype.at=sae,V.prototype.chain=iae,V.prototype.commit=oae,V.prototype.next=aae,V.prototype.plant=cae,V.prototype.reverse=uae,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=dae,V.prototype.first=V.prototype.head,Wy&&(V.prototype[Wy]=lae),V},om=ose();Af?((Af.exports=om)._=om,tN._=om):os._=om}).call(pr)})(VE,VE.exports);var lC=VE.exports;const xO=({amount:t,scale:e})=>{const n=10**e;return Number(t)/n},ROe=t=>{const e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${e}-${n}-${r}`},Ik={locale:"es-ES"},Nm={amount:null,currencyCode:au.DEFAULT_CURRENCY_CODE,scale:2},ur=class ur extends v${constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r){const s=Kt.any().optional().valid(null),i=Kt.number().label(r.label?r.label:"amount"),o=Kt.alternatives(s,i);return bn.validate(o,n)}static getMonetaryValueInfo(n){const[r,s]=n.split("."),i=s?s.length:0;return[(r+s).replace(/[^0-9]/g,""),i]}static create(n=Nm,r=Ik){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=Nm.amount,currencyCode:i=Nm.currencyCode,scale:o=Nm.scale}=n||{},a=ur.validate(s,r);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,r));const c=ur.sanitize(a.object),u=au.createFromCode(i).object.code,f=N1({amount:Number(c),currency:u,precision:o}).setLocale(r.locale);return dn.ok(new this(f,lC.isNull(c),r))}static createFromFormattedValue(n,r,s={locale:Ik.locale}){if(n===null||n==="")return ur.create({amount:null,scale:ur.DEFAULT_SCALE,currencyCode:r});const i=String(n),[o,a]=i.split(",");let c=o,u=2;return a===void 0?u=0:(a===""&&(c=o+a.padEnd(1,"0"),u=1),a.length===1?(c=o+a.padEnd(1,"0"),u=1):a.length===2?(c=o+a.padEnd(2,"0"),u=2):a.length===3?(c=o+a.padEnd(3,"0"),u=3):a.length===4&&(c=o+a.padEnd(4,"0"),u=4)),ur.create({amount:c,scale:u,currencyCode:r},s)}static sanitize(n){let r=null;return typeof n=="string"?r=parseFloat(n):r=n,r}static createFromDinero(n){return dn.ok(new ur(n,!1,Ik))}static normalizeScale(n){return N1.normalizePrecision(n.map(r=>r.props)).map(r=>ur.createFromDinero(r).object)}static minimum(n){return ur.createFromDinero(N1.minimum(n.map(r=>r.props))).object}static maximum(n){return ur.createFromDinero(N1.maximum(n.map(r=>r.props))).object}static _toString(n,r,s){if(n===null)return"";new Intl.NumberFormat(s,{useGrouping:!0}).format(n===null?0:xO({amount:n,scale:r}));const i=Math.pow(10,r);return(Number(n)/i).toFixed(r)}toString(){return ur._toString(this.isNull()?null:this.getAmount(),this.getScale(),this._options.locale)}toJSON(){var n;return this._isNull?{}:(n=this.props)==null?void 0:n.toJSON()}toPrimitive(){var n;return this._isNull?null:Number((n=this.props)==null?void 0:n.getAmount())}toPrimitives(){return this.toObject()}getAmount(){return this.props.getAmount()}getScale(){return this.props.getPrecision()}convertScale(n,r="HALF_UP"){return this._isNull?ur.create({amount:null,scale:n,currencyCode:this.getCurrency().code}).object:ur.createFromDinero(this.props.convertPrecision(n,r)).object}getCurrency(){return au.createFromCode(this.props.getCurrency()).object}getLocale(){return this.props.getLocale()}add(n){return ur.createFromDinero(this.props.add(n.props)).object}subtract(n){return ur.createFromDinero(this.props.subtract(n.props)).object}multiply(n,r){return ur.createFromDinero(this.props.multiply(n,r)).object}divide(n,r){return ur.createFromDinero(this.props.divide(n,r)).object}percentage(n,r){return ur.createFromDinero(this.props.percentage(n,r)).object}allocate(n){return this.props.allocate(n).map(r=>ur.createFromDinero(r).object)}equalsTo(n){return this.props.equalsTo(n.props)}lessThan(n){return this.props.lessThan(n.props)}lessThanOrEqual(n){return this.props.lessThanOrEqual(n.props)}greaterThan(n){return this.props.greaterThan(n.props)}greaterThanOrEqual(n){return this.props.greaterThanOrEqual(n.props)}isZero(){return this.props.isZero()}isPositive(){return this.props.isPositive()}isNegative(){return this.props.isNegative()}hasSameCurrency(n){return this.props.hasSameCurrency(n.props)}hasSameAmount(n){return this.props.hasSameAmount(n.props)}toFormat(n,r){return this._isNull?"":this.props.toFormat(n,r)}toUnit(){return this.props.toUnit()}toRoundedUnit(n,r){return this.props.toRoundedUnit(n,r)}toObject(){const n=this.props.toObject();return{amount:this._isNull?null:n.amount,scale:n.precision,currency_code:String(n.currency)}}toNumber(){return this.toUnit()}};Te(ur,"DEFAULT_SCALE",Nm.scale),Te(ur,"DEFAULT_CURRENCY_CODE",Nm.currencyCode);let Jo=ur;class u6e extends Kt.ValidationError{}class nJ{constructor(e){Te(this,"_collection",[]);this._collection=e??[]}add(e){this._collection.push(e)}reset(){this._collection=[]}hasSomeFaultyResult(){return this._collection.some(e=>e.isFailure)}getFirstFaultyResult(){return this._collection.find(e=>e.isFailure)}getAllFaultyResults(){return this._collection.filter(e=>e.isFailure)}get objects(){return this._collection.filter(e=>e.isSuccess).map(e=>e.object)}get errors(){return this._collection.filter(e=>e.isFailure).map(e=>e.error)}}const rJ=2,jk={amount:0,scale:rJ},mn=class mn extends B_{constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r,s){const i=bn.RULE_ALLOW_NULL_OR_UNDEFINED,o=bn.RULE_ALLOW_EMPTY,a=bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"amount"),c=bn.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(s.label?s.label:"amount"),u=Kt.number().min(mn.MIN_SCALE).max(mn.MAX_SCALE).label(s.label?s.label:"scale"),f=new nJ([bn.validate(Kt.alternatives(i,o,a,c),n),bn.validate(Kt.alternatives(bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"scale"),u),r)]);if(f.hasSomeFaultyResult())return f.getFirstFaultyResult();let l=typeof n=="string"?parseInt(n,10):Number(n),d=lC.isNull(r)?mn.DEFAULT_SCALE:Number(r);const p=l/Math.pow(10,d);return pmn.MAX_VALUE?dn.fail(new Error(`Value with scale is out of range: ${p}`)):dn.ok()}static create(n=jk,r={}){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=jk.amount,scale:i=jk.scale}=n,o={label:"percentage",...r},a=mn.validate(s,i,o);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,o));let c=mn._sanitize(s);const u={amount:lC.isNull(c)?0:c,scale:i};return dn.ok(new this(u,lC.isNull(c),r))}static createFromFormattedValue(n,r={}){if(n===null||n==="")return mn.create({amount:null,scale:mn.DEFAULT_SCALE});const s=String(n),[i,o]=s.split(",");let a=i,c=2;return o===void 0?c=0:(o===""&&(a=i+o.padEnd(1,"0"),c=1),o.length===1?(a=i+o.padEnd(1,"0"),c=1):o.length===2&&(a=i+o.padEnd(2,"0"),c=2)),mn.create({amount:a,scale:c},r)}static _sanitize(n){let r=null;return typeof n=="string"?r=parseInt(n,10):r=n,r}static _toString(n,r){if(n===null)return"";const s=Math.pow(10,r);return(Number(n)/s).toFixed(r)}static _isWithinRange(n,r){const s=Number(mn._toString(n,r));return s>=mn.MIN_VALUE&&s<=mn.MAX_VALUE}get amount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}get scale(){var n;return Number((n=this.props)==null?void 0:n.scale)}getAmount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}getScale(){var n;return this.isNull()?0:Number((n=this.props)==null?void 0:n.scale)}toString(){return mn._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==mn.DEFAULT_SCALE?this.convertScale(mn.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(n){if(nmn.MAX_SCALE)throw new Error(`Scale out of range: ${n}`);if(this.isNull())return new mn({amount:null,scale:n},!0,this._options);const r=Math.pow(10,this.scale),s=Number(this.amount)/r,i=Math.pow(10,n),o=Math.round(s*i);if(!mn._isWithinRange(o,n))throw new Error(`Value out of range after conversion: ${o} ${n}`);return new mn({amount:o,scale:n},!1,this._options)}hasSameScale(n){return this.scale===n.scale}isWithinRange(){return mn._isWithinRange(this.amount,this.scale)}};Te(mn,"DEFAULT_SCALE",rJ),Te(mn,"MIN_VALUE",0),Te(mn,"MAX_VALUE",100),Te(mn,"MIN_SCALE",0),Te(mn,"MAX_SCALE",2);let lf=mn;class d6e extends Kt.ValidationError{}const sJ=2,Lk={amount:0,scale:sJ},Sn=class Sn extends B_{constructor(n,r,s){super(n);Te(this,"_isNull");Te(this,"_options");Te(this,"isEmpty",()=>this.isNull());Te(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(r),this._options=Object.freeze(s)}static validate(n,r,s={}){const i=bn.RULE_ALLOW_NULL_OR_UNDEFINED,o=bn.RULE_ALLOW_EMPTY,a=bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"amount"),c=bn.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(s.label?s.label:"amount"),u=Kt.number().min(Sn.MIN_SCALE).max(Sn.MAX_SCALE).label(s.label?s.label:"scale"),f=new nJ([bn.validate(Kt.alternatives(i,o,a,c),n),bn.validate(Kt.alternatives(bn.RULE_IS_TYPE_NUMBER.label(s.label?s.label:"scale"),u),r)]);return f.hasSomeFaultyResult()?f.getFirstFaultyResult():dn.ok()}static create(n=Lk,r={}){if(n===null)throw new Error("InvalidParams: props params is missing");const{amount:s=Lk.amount,scale:i=Lk.scale}=n,o={label:"quantity",...r},a=Sn.validate(s,i,o);if(a.isFailure)return dn.fail(af(Ya.INVALID_INPUT_DATA,a.error.message,o));let c=Sn._sanitize(s);const u={amount:c===null?0:c,scale:i};return dn.ok(new Sn(u,c===null,r))}static createFromFormattedValue(n,r={}){if(n===null||n==="")return Sn.create({amount:null,scale:Sn.DEFAULT_SCALE});const s=String(n),[i,o]=s.split(",");let a=i,c=2;return o===void 0?c=0:(o===""&&(a=i+o.padEnd(1,"0"),c=1),o.length===1?(a=i+o.padEnd(1,"0"),c=1):o.length===2&&(a=i+o.padEnd(2,"0"),c=2)),Sn.create({amount:a,scale:c},r)}static _sanitize(n){let r=null;return typeof n=="string"?r=parseInt(n,10):r=n,r}static _toString(n,r){if(n===null)return"";const s=Math.pow(10,r);return(Number(n)/s).toFixed(r)}get amount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}get scale(){var n;return Number((n=this.props)==null?void 0:n.scale)}getAmount(){var n;return this.isNull()?null:Number((n=this.props)==null?void 0:n.amount)}getScale(){var n;return this.isNull()?0:Number((n=this.props)==null?void 0:n.scale)}toString(){return Sn._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==Sn.DEFAULT_SCALE?this.convertScale(Sn.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(n){if(nSn.MAX_SCALE)throw new Error(`Scale out of range: ${n}`);if(this.isNull())return new Sn({amount:null,scale:n},!0,this._options);const r=Math.pow(10,this.scale),s=Number(this.amount)/r,i=Math.pow(10,n),o=Math.round(s*i);return new Sn({amount:o,scale:n},!1,this._options)}hasSameScale(n){return this.scale===n.scale}increment(n){return this.isNull()?n?Sn.create(n.toObject()):Sn.create():n?this.hasSameScale(n)?Sn.create({amount:Number(this.amount)+Number(n.amount),scale:this.scale},this._options):dn.fail(Error("No se pueden sumar cantidades con diferentes escalas.")):Sn.create({amount:Number(this.amount)+1,scale:this.scale},this._options)}decrement(n){return this.isNull()?n?Sn.create(n.toObject()):Sn.create():n?this.hasSameScale(n)?Sn.create({amount:Number(this.amount)-Number(n.amount),scale:this.scale},this._options):dn.fail(Error("No se pueden restar cantidades con diferentes escalas.")):Sn.create({amount:Number(this.amount)-1,scale:this.scale},this._options)}};Te(Sn,"DEFAULT_SCALE",sJ),Te(Sn,"MIN_SCALE",0),Te(Sn,"MAX_SCALE",2);let kp=Sn;class bg extends v${constructor(){super(...arguments);Te(this,"isValid",()=>!isNaN(this.props.valueOf())&&this.props.valueOf()!==0);Te(this,"isEmpty",()=>!this.isValid());Te(this,"toISO8601",()=>this.isValid()?this.props.toISOString():"");Te(this,"toDateString",()=>this.isValid()?this.props.toDateString():"");Te(this,"toLocaleDateString",(n,r)=>this.isValid()?this.props.toLocaleDateString(n,r):"");Te(this,"toLocaleTimeString",()=>this.isValid()?this.props.toLocaleTimeString():"")}static validate(n,r){const s=bn.RULE_ALLOW_EMPTY.default(0),i=Kt.date().label(String(r.label)),o=Kt.alternatives(s,i);return bn.validate(o,n)}static createCurrentDate(){return dn.ok(new bg(new Date))}static create(n,r={}){const s={...r,dateFormat:r.dateFormat?r.dateFormat:"YYYY-MM-DD",label:r.label?r.label:"date"},i=bg.validate(n,s);return i.isFailure?dn.fail(af(Ya.INVALID_INPUT_DATA,i.error.message,s)):dn.ok(new bg(new Date(i.object)))}toString(){if(!this.isEmpty()){const n=this.props.getFullYear(),r=String(this.props.getMonth()+1).padStart(2,"0"),s=String(this.props.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}return""}toPrimitive(){return this.toISO8601()}}const xg=0,y$=10,wO=1,iJ=9999,AOe=({isPending:t,interval:e=1e3,onInterval:n})=>{const[r,s]=S.useState(void 0);return S.useEffect(()=>{let i;return t&&(i=setInterval(()=>{s(o=>o===void 0?e:o+e)},e)),()=>{clearInterval(i),s(void 0)}},[t,e]),S.useEffect(()=>{n&&r&&n(r)},[r]),{elapsedTime:r}},POe=2*60*1e3,NOe=60*1e3,b$=({queryKey:t,queryFn:e,enabled:n,select:r,queryOptions:s={},overtimeOptions:i})=>{const[o,a]=S.useState(!1),c=YR({queryKey:t,queryFn:e,placeholderData:b8,staleTime:NOe,refetchInterval:POe,refetchOnWindowFocus:!0,enabled:n&&!!e,select:r,...s});S.useEffect(()=>{c.isSuccess&&eOe(c.data)&&a(c.data.total_items===0)},[c]);const{elapsedTime:u}=AOe({isPending:c.isFetching,interval:i==null?void 0:i.interval,onInterval:i==null?void 0:i.onInterval});return{...c,overtime:{elapsedTime:u},isEmpty:o}},oJ=t=>YR({placeholderData:b8,...t});function TOe(t){return ru({...t})}const aJ=S.createContext(void 0),kOe=({dataSource:t,children:e})=>w.jsx(aJ.Provider,{value:t,children:e}),DOe=[5,10,15,30,50,75,100],mP=(t=xg,e=y$)=>{const[n,r]=S.useState({pageIndex:t,pageSize:e});return[n,i=>{const o=i;return o.pageIndexiJ)&&(o.pageSize=wO),r(a=>({...a,pageIndex:i.pageIndex,pageSize:i.pageSize})),o}]},MOe=(t=xg,e=y$)=>{const[n,r]=gme(),s=n.get("page_index"),i=n.get("page_size"),o=S.useMemo(()=>{const l=parseInt(s??"",10);let d=isNaN(l)?t:l;return d{const l=parseInt(i??"",10);let d=isNaN(l)?e:l;return(diJ)&&(d=e),d},[i,e]),[c,u]=mP(o,a);return[c,l=>{const d=u(l);r({page_index:String(d.pageIndex),page_size:String(d.pageSize)})}]},OOe=({syncWithLocation:t=!0,initialPageIndex:e,initialPageSize:n})=>{const[r,s]=MOe(),[i,o]=mP(e,n);return t?[r,s]:[i,o]},lJ=S.createContext(null),Jv=({syncWithLocation:t=!0,initialGlobalFilter:e=void 0,initialPageIndex:n,initialPageSize:r,children:s})=>{const[i,o]=OOe({syncWithLocation:t,initialPageIndex:n,initialPageSize:r}),[a,c]=S.useState(e),[u,f]=S.useState([]),l=S.useMemo(()=>!!(a&&a.length),[a]),d=S.useCallback(()=>c(""),[]);return w.jsx(lJ.Provider,{value:{pagination:i,setPagination:o,sorting:u,setSorting:f,globalFilter:a,setGlobalFilter:c,resetGlobalFilter:d,isFiltered:l},children:s})};/** * table-core * * Copyright (c) TanStack diff --git a/dist/client/index.html b/dist/client/index.html index 8e1e158..53b239f 100644 --- a/dist/client/index.html +++ b/dist/client/index.html @@ -7,7 +7,7 @@ Uecko - +