@espresso-lab/mantine-data-table 1.1.0 → 1.3.0
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/index.es.js +521 -526
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
package/dist/index.umd.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
19
19
|
2. You might be breaking the Rules of Hooks
|
|
20
20
|
3. You might have more than one copy of React in the same app
|
|
21
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(t)}}()),Js}var ul;function gd(){return ul||(ul=1,process.env.NODE_ENV==="production"?So.exports=dd():So.exports=pd()),So.exports}var an=gd(),Co=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function vd(){}function ll(i){return typeof i=="number"&&i>=0&&i!==1/0}function md(i,t){return Math.max(i+(t||0)-Date.now(),0)}function Ao(i,t){return typeof i=="function"?i(t):i}function Mn(i,t){return typeof i=="function"?i(t):i}function cl(i){return JSON.stringify(i,(t,r)=>ea(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Xs(i,t){if(i===t)return i;const r=fl(i)&&fl(t);if(r||ea(i)&&ea(t)){const s=r?i:Object.keys(i),l=s.length,g=r?t:Object.keys(t),f=g.length,c=r?[]:{};let b=0;for(let C=0;C<f;C++){const O=r?C:g[C];(!r&&s.includes(O)||r)&&i[O]===void 0&&t[O]===void 0?(c[O]=void 0,b++):(c[O]=Xs(i[O],t[O]),c[O]===i[O]&&i[O]!==void 0&&b++)}return l===f&&b===l?i:c}return t}function Oo(i,t){if(!t||Object.keys(i).length!==Object.keys(t).length)return!1;for(const r in i)if(i[r]!==t[r])return!1;return!0}function fl(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function ea(i){if(!hl(i))return!1;const t=i.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!hl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function hl(i){return Object.prototype.toString.call(i)==="[object Object]"}function dl(i,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(i,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Xs(i,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return Xs(i,t)}return t}var yd=(Jc=class extends Co{constructor(){super();at(this,Ir);at(this,sr);at(this,ri);Ze(this,ri,t=>{if(!Ri&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ye(this,sr)||this.setEventListener(ye(this,ri))}onUnsubscribe(){var t;this.hasListeners()||((t=ye(this,sr))==null||t.call(this),Ze(this,sr,void 0))}setEventListener(t){var r;Ze(this,ri,t),(r=ye(this,sr))==null||r.call(this),Ze(this,sr,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){ye(this,Ir)!==t&&(Ze(this,Ir,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ye(this,Ir)=="boolean"?ye(this,Ir):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ir=new WeakMap,sr=new WeakMap,ri=new WeakMap,Jc),wd=new yd,_d=(Xc=class extends Co{constructor(){super();at(this,ii,!0);at(this,ar);at(this,oi);Ze(this,oi,t=>{if(!Ri&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){ye(this,ar)||this.setEventListener(ye(this,oi))}onUnsubscribe(){var t;this.hasListeners()||((t=ye(this,ar))==null||t.call(this),Ze(this,ar,void 0))}setEventListener(t){var r;Ze(this,oi,t),(r=ye(this,ar))==null||r.call(this),Ze(this,ar,t(this.setOnline.bind(this)))}setOnline(t){ye(this,ii)!==t&&(Ze(this,ii,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return ye(this,ii)}},ii=new WeakMap,ar=new WeakMap,oi=new WeakMap,Xc),bd=new _d;function pl(){let i,t;const r=new Promise((l,g)=>{i=l,t=g});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),i(l)},r.reject=l=>{s({status:"rejected",reason:l}),t(l)},r}function xd(i){return(i??"online")==="online"?bd.isOnline():!0}var Sd=i=>setTimeout(i,0);function Cd(){let i=[],t=0,r=c=>{c()},s=c=>{c()},l=Sd;const g=c=>{t?i.push(c):l(()=>{r(c)})},f=()=>{const c=i;i=[],c.length&&l(()=>{s(()=>{c.forEach(b=>{r(b)})})})};return{batch:c=>{let b;t++;try{b=c()}finally{t--,t||f()}return b},batchCalls:c=>(...b)=>{g(()=>{c(...b)})},schedule:g,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{l=c}}}var To=Cd();function Ad(i,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xd(t.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Od(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Td=(ef=class extends Co{constructor(t,r){super();at(this,it);at(this,Wt);at(this,Xe);at(this,qi);at(this,jt);at(this,Pr);at(this,si);at(this,ur);at(this,lr);at(this,Hi);at(this,ai);at(this,ui);at(this,$r);at(this,Nr);at(this,cr);at(this,li,new Set);this.options=r,Ze(this,Wt,t),Ze(this,lr,null),Ze(this,ur,pl()),this.options.experimental_prefetchInRender||ye(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ye(this,Xe).addObserver(this),gl(ye(this,Xe),this.options)?ht(this,it,_o).call(this):this.updateResult(),ht(this,it,tl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ta(ye(this,Xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ta(ye(this,Xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,it,nl).call(this),ht(this,it,rl).call(this),ye(this,Xe).removeObserver(this)}setOptions(t){const r=this.options,s=ye(this,Xe);if(this.options=ye(this,Wt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,ye(this,Xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,it,il).call(this),ye(this,Xe).setOptions(this.options),r._defaulted&&!Oo(this.options,r)&&ye(this,Wt).getQueryCache().notify({type:"observerOptionsUpdated",query:ye(this,Xe),observer:this});const l=this.hasListeners();l&&vl(ye(this,Xe),s,this.options,r)&&ht(this,it,_o).call(this),this.updateResult(),l&&(ye(this,Xe)!==s||Mn(this.options.enabled,ye(this,Xe))!==Mn(r.enabled,ye(this,Xe))||Ao(this.options.staleTime,ye(this,Xe))!==Ao(r.staleTime,ye(this,Xe)))&&ht(this,it,Ju).call(this);const g=ht(this,it,Xu).call(this);l&&(ye(this,Xe)!==s||Mn(this.options.enabled,ye(this,Xe))!==Mn(r.enabled,ye(this,Xe))||g!==ye(this,cr))&&ht(this,it,el).call(this,g)}getOptimisticResult(t){const r=ye(this,Wt).getQueryCache().build(ye(this,Wt),t),s=this.createResult(r,t);return Ed(this,s)&&(Ze(this,jt,s),Ze(this,si,this.options),Ze(this,Pr,ye(this,Xe).state)),s}getCurrentResult(){return ye(this,jt)}trackResult(t,r){const s={};return Object.keys(t).forEach(l=>{Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(l),r==null||r(l),t[l])})}),s}trackProp(t){ye(this,li).add(t)}getCurrentQuery(){return ye(this,Xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ye(this,Wt).defaultQueryOptions(t),s=ye(this,Wt).getQueryCache().build(ye(this,Wt),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return ht(this,it,_o).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ye(this,jt)))}createResult(t,r){var fe;const s=ye(this,Xe),l=this.options,g=ye(this,jt),f=ye(this,Pr),c=ye(this,si),C=t!==s?t.state:ye(this,qi),{state:O}=t;let L={...O},k=!1,E;if(r._optimisticResults){const de=this.hasListeners(),ie=!de&&gl(t,r),Ae=de&&vl(t,s,r,l);(ie||Ae)&&(L={...L,...Ad(O.data,t.options)}),r._optimisticResults==="isRestoring"&&(L.fetchStatus="idle")}let{error:R,errorUpdatedAt:M,status:$}=L;E=L.data;let Q=!1;if(r.placeholderData!==void 0&&E===void 0&&$==="pending"){let de;g!=null&&g.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(de=g.data,Q=!0):de=typeof r.placeholderData=="function"?r.placeholderData((fe=ye(this,ui))==null?void 0:fe.state.data,ye(this,ui)):r.placeholderData,de!==void 0&&($="success",E=dl(g==null?void 0:g.data,de,r),k=!0)}if(r.select&&E!==void 0&&!Q)if(g&&E===(f==null?void 0:f.data)&&r.select===ye(this,Hi))E=ye(this,ai);else try{Ze(this,Hi,r.select),E=r.select(E),E=dl(g==null?void 0:g.data,E,r),Ze(this,ai,E),Ze(this,lr,null)}catch(de){Ze(this,lr,de)}ye(this,lr)&&(R=ye(this,lr),E=ye(this,ai),M=Date.now(),$="error");const X=L.fetchStatus==="fetching",J=$==="pending",se=$==="error",q=J&&X,ue=E!==void 0,ee={status:$,fetchStatus:L.fetchStatus,isPending:J,isSuccess:$==="success",isError:se,isInitialLoading:q,isLoading:q,data:E,dataUpdatedAt:L.dataUpdatedAt,error:R,errorUpdatedAt:M,failureCount:L.fetchFailureCount,failureReason:L.fetchFailureReason,errorUpdateCount:L.errorUpdateCount,isFetched:L.dataUpdateCount>0||L.errorUpdateCount>0,isFetchedAfterMount:L.dataUpdateCount>C.dataUpdateCount||L.errorUpdateCount>C.errorUpdateCount,isFetching:X,isRefetching:X&&!J,isLoadingError:se&&!ue,isPaused:L.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:se&&ue,isStale:na(t,r),refetch:this.refetch,promise:ye(this,ur)};if(this.options.experimental_prefetchInRender){const de=Ce=>{ee.status==="error"?Ce.reject(ee.error):ee.data!==void 0&&Ce.resolve(ee.data)},ie=()=>{const Ce=Ze(this,ur,ee.promise=pl());de(Ce)},Ae=ye(this,ur);switch(Ae.status){case"pending":t.queryHash===s.queryHash&&de(Ae);break;case"fulfilled":(ee.status==="error"||ee.data!==Ae.value)&&ie();break;case"rejected":(ee.status!=="error"||ee.error!==Ae.reason)&&ie();break}}return ee}updateResult(){const t=ye(this,jt),r=this.createResult(ye(this,Xe),this.options);if(Ze(this,Pr,ye(this,Xe).state),Ze(this,si,this.options),ye(this,Pr).data!==void 0&&Ze(this,ui,ye(this,Xe)),Oo(r,t))return;Ze(this,jt,r);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,g=typeof l=="function"?l():l;if(g==="all"||!g&&!ye(this,li).size)return!0;const f=new Set(g??ye(this,li));return this.options.throwOnError&&f.add("error"),Object.keys(ye(this,jt)).some(c=>{const b=c;return ye(this,jt)[b]!==t[b]&&f.has(b)})};ht(this,it,fd).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,it,tl).call(this)}},Wt=new WeakMap,Xe=new WeakMap,qi=new WeakMap,jt=new WeakMap,Pr=new WeakMap,si=new WeakMap,ur=new WeakMap,lr=new WeakMap,Hi=new WeakMap,ai=new WeakMap,ui=new WeakMap,$r=new WeakMap,Nr=new WeakMap,cr=new WeakMap,li=new WeakMap,it=new WeakSet,_o=function(t){ht(this,it,il).call(this);let r=ye(this,Xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(vd)),r},Ju=function(){ht(this,it,nl).call(this);const t=Ao(this.options.staleTime,ye(this,Xe));if(Ri||ye(this,jt).isStale||!ll(t))return;const s=md(ye(this,jt).dataUpdatedAt,t)+1;Ze(this,$r,setTimeout(()=>{ye(this,jt).isStale||this.updateResult()},s))},Xu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ye(this,Xe)):this.options.refetchInterval)??!1},el=function(t){ht(this,it,rl).call(this),Ze(this,cr,t),!(Ri||Mn(this.options.enabled,ye(this,Xe))===!1||!ll(ye(this,cr))||ye(this,cr)===0)&&Ze(this,Nr,setInterval(()=>{(this.options.refetchIntervalInBackground||wd.isFocused())&&ht(this,it,_o).call(this)},ye(this,cr)))},tl=function(){ht(this,it,Ju).call(this),ht(this,it,el).call(this,ht(this,it,Xu).call(this))},nl=function(){ye(this,$r)&&(clearTimeout(ye(this,$r)),Ze(this,$r,void 0))},rl=function(){ye(this,Nr)&&(clearInterval(ye(this,Nr)),Ze(this,Nr,void 0))},il=function(){const t=ye(this,Wt).getQueryCache().build(ye(this,Wt),this.options);if(t===ye(this,Xe))return;const r=ye(this,Xe);Ze(this,Xe,t),Ze(this,qi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},fd=function(t){To.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ye(this,jt))}),ye(this,Wt).getQueryCache().notify({query:ye(this,Xe),type:"observerResultsUpdated"})})},ef);function Dd(i,t){return Mn(t.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&t.retryOnMount===!1)}function gl(i,t){return Dd(i,t)||i.state.data!==void 0&&ta(i,t,t.refetchOnMount)}function ta(i,t,r){if(Mn(t.enabled,i)!==!1){const s=typeof r=="function"?r(i):r;return s==="always"||s!==!1&&na(i,t)}return!1}function vl(i,t,r,s){return(i!==t||Mn(s.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&na(i,r)}function na(i,t){return Mn(t.enabled,i)!==!1&&i.isStaleByTime(Ao(t.staleTime,i))}function Ed(i,t){return!Oo(i.getCurrentResult(),t)}var Md=(tf=class extends Co{constructor(t,r){super();at(this,Nn);at(this,fr);at(this,hr);at(this,Yt);at(this,$n);Ze(this,fr,t),this.setOptions(r),this.bindMethods(),ht(this,Nn,Ks).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ye(this,fr).defaultMutationOptions(t),Oo(this.options,r)||ye(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ye(this,Yt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cl(r.mutationKey)!==cl(this.options.mutationKey)?this.reset():((s=ye(this,Yt))==null?void 0:s.state.status)==="pending"&&ye(this,Yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=ye(this,Yt))==null||t.removeObserver(this)}onMutationUpdate(t){ht(this,Nn,Ks).call(this),ht(this,Nn,ol).call(this,t)}getCurrentResult(){return ye(this,hr)}reset(){var t;(t=ye(this,Yt))==null||t.removeObserver(this),Ze(this,Yt,void 0),ht(this,Nn,Ks).call(this),ht(this,Nn,ol).call(this)}mutate(t,r){var s;return Ze(this,$n,r),(s=ye(this,Yt))==null||s.removeObserver(this),Ze(this,Yt,ye(this,fr).getMutationCache().build(ye(this,fr),this.options)),ye(this,Yt).addObserver(this),ye(this,Yt).execute(t)}},fr=new WeakMap,hr=new WeakMap,Yt=new WeakMap,$n=new WeakMap,Nn=new WeakSet,Ks=function(){var r;const t=((r=ye(this,Yt))==null?void 0:r.state)??Od();Ze(this,hr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ol=function(t){To.batch(()=>{var r,s,l,g,f,c,b,C;if(ye(this,$n)&&this.hasListeners()){const O=ye(this,hr).variables,L=ye(this,hr).context;(t==null?void 0:t.type)==="success"?((s=(r=ye(this,$n)).onSuccess)==null||s.call(r,t.data,O,L),(g=(l=ye(this,$n)).onSettled)==null||g.call(l,t.data,null,O,L)):(t==null?void 0:t.type)==="error"&&((c=(f=ye(this,$n)).onError)==null||c.call(f,t.error,O,L),(C=(b=ye(this,$n)).onSettled)==null||C.call(b,void 0,t.error,O,L))}this.listeners.forEach(O=>{O(ye(this,hr))})})},tf),Do={exports:{}},Li={};/**
|
|
21
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(t)}}()),Js}var ul;function gd(){return ul||(ul=1,process.env.NODE_ENV==="production"?So.exports=dd():So.exports=pd()),So.exports}var an=gd(),Co=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(i){return this.listeners.add(i),this.onSubscribe(),()=>{this.listeners.delete(i),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ri=typeof window>"u"||"Deno"in globalThis;function vd(){}function ll(i){return typeof i=="number"&&i>=0&&i!==1/0}function md(i,t){return Math.max(i+(t||0)-Date.now(),0)}function Ao(i,t){return typeof i=="function"?i(t):i}function Mn(i,t){return typeof i=="function"?i(t):i}function cl(i){return JSON.stringify(i,(t,r)=>ea(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Xs(i,t){if(i===t)return i;const r=fl(i)&&fl(t);if(r||ea(i)&&ea(t)){const s=r?i:Object.keys(i),l=s.length,g=r?t:Object.keys(t),f=g.length,c=r?[]:{};let b=0;for(let C=0;C<f;C++){const O=r?C:g[C];(!r&&s.includes(O)||r)&&i[O]===void 0&&t[O]===void 0?(c[O]=void 0,b++):(c[O]=Xs(i[O],t[O]),c[O]===i[O]&&i[O]!==void 0&&b++)}return l===f&&b===l?i:c}return t}function Oo(i,t){if(!t||Object.keys(i).length!==Object.keys(t).length)return!1;for(const r in i)if(i[r]!==t[r])return!1;return!0}function fl(i){return Array.isArray(i)&&i.length===Object.keys(i).length}function ea(i){if(!hl(i))return!1;const t=i.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!hl(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(i)!==Object.prototype)}function hl(i){return Object.prototype.toString.call(i)==="[object Object]"}function dl(i,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(i,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Xs(i,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${s}`),s}return Xs(i,t)}return t}var yd=(Jc=class extends Co{constructor(){super();at(this,Ir);at(this,sr);at(this,ri);Ze(this,ri,t=>{if(!Ri&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ye(this,sr)||this.setEventListener(ye(this,ri))}onUnsubscribe(){var t;this.hasListeners()||((t=ye(this,sr))==null||t.call(this),Ze(this,sr,void 0))}setEventListener(t){var r;Ze(this,ri,t),(r=ye(this,sr))==null||r.call(this),Ze(this,sr,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){ye(this,Ir)!==t&&(Ze(this,Ir,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ye(this,Ir)=="boolean"?ye(this,Ir):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ir=new WeakMap,sr=new WeakMap,ri=new WeakMap,Jc),wd=new yd,_d=(Xc=class extends Co{constructor(){super();at(this,ii,!0);at(this,ar);at(this,oi);Ze(this,oi,t=>{if(!Ri&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){ye(this,ar)||this.setEventListener(ye(this,oi))}onUnsubscribe(){var t;this.hasListeners()||((t=ye(this,ar))==null||t.call(this),Ze(this,ar,void 0))}setEventListener(t){var r;Ze(this,oi,t),(r=ye(this,ar))==null||r.call(this),Ze(this,ar,t(this.setOnline.bind(this)))}setOnline(t){ye(this,ii)!==t&&(Ze(this,ii,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return ye(this,ii)}},ii=new WeakMap,ar=new WeakMap,oi=new WeakMap,Xc),bd=new _d;function pl(){let i,t;const r=new Promise((l,g)=>{i=l,t=g});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),i(l)},r.reject=l=>{s({status:"rejected",reason:l}),t(l)},r}function xd(i){return(i??"online")==="online"?bd.isOnline():!0}var Sd=i=>setTimeout(i,0);function Cd(){let i=[],t=0,r=c=>{c()},s=c=>{c()},l=Sd;const g=c=>{t?i.push(c):l(()=>{r(c)})},f=()=>{const c=i;i=[],c.length&&l(()=>{s(()=>{c.forEach(b=>{r(b)})})})};return{batch:c=>{let b;t++;try{b=c()}finally{t--,t||f()}return b},batchCalls:c=>(...b)=>{g(()=>{c(...b)})},schedule:g,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{l=c}}}var To=Cd();function Ad(i,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xd(t.networkMode)?"fetching":"paused",...i===void 0&&{error:null,status:"pending"}}}function Od(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Td=(ef=class extends Co{constructor(t,r){super();at(this,it);at(this,Wt);at(this,Xe);at(this,qi);at(this,jt);at(this,Pr);at(this,si);at(this,ur);at(this,lr);at(this,Hi);at(this,ai);at(this,ui);at(this,$r);at(this,Nr);at(this,cr);at(this,li,new Set);this.options=r,Ze(this,Wt,t),Ze(this,lr,null),Ze(this,ur,pl()),this.options.experimental_prefetchInRender||ye(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ye(this,Xe).addObserver(this),gl(ye(this,Xe),this.options)?ht(this,it,_o).call(this):this.updateResult(),ht(this,it,tl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ta(ye(this,Xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ta(ye(this,Xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,it,nl).call(this),ht(this,it,rl).call(this),ye(this,Xe).removeObserver(this)}setOptions(t){const r=this.options,s=ye(this,Xe);if(this.options=ye(this,Wt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mn(this.options.enabled,ye(this,Xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,it,il).call(this),ye(this,Xe).setOptions(this.options),r._defaulted&&!Oo(this.options,r)&&ye(this,Wt).getQueryCache().notify({type:"observerOptionsUpdated",query:ye(this,Xe),observer:this});const l=this.hasListeners();l&&vl(ye(this,Xe),s,this.options,r)&&ht(this,it,_o).call(this),this.updateResult(),l&&(ye(this,Xe)!==s||Mn(this.options.enabled,ye(this,Xe))!==Mn(r.enabled,ye(this,Xe))||Ao(this.options.staleTime,ye(this,Xe))!==Ao(r.staleTime,ye(this,Xe)))&&ht(this,it,Ju).call(this);const g=ht(this,it,Xu).call(this);l&&(ye(this,Xe)!==s||Mn(this.options.enabled,ye(this,Xe))!==Mn(r.enabled,ye(this,Xe))||g!==ye(this,cr))&&ht(this,it,el).call(this,g)}getOptimisticResult(t){const r=ye(this,Wt).getQueryCache().build(ye(this,Wt),t),s=this.createResult(r,t);return Ed(this,s)&&(Ze(this,jt,s),Ze(this,si,this.options),Ze(this,Pr,ye(this,Xe).state)),s}getCurrentResult(){return ye(this,jt)}trackResult(t,r){return new Proxy(t,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(t){ye(this,li).add(t)}getCurrentQuery(){return ye(this,Xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ye(this,Wt).defaultQueryOptions(t),s=ye(this,Wt).getQueryCache().build(ye(this,Wt),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return ht(this,it,_o).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ye(this,jt)))}createResult(t,r){var fe;const s=ye(this,Xe),l=this.options,g=ye(this,jt),f=ye(this,Pr),c=ye(this,si),C=t!==s?t.state:ye(this,qi),{state:O}=t;let L={...O},k=!1,E;if(r._optimisticResults){const de=this.hasListeners(),ie=!de&&gl(t,r),Ae=de&&vl(t,s,r,l);(ie||Ae)&&(L={...L,...Ad(O.data,t.options)}),r._optimisticResults==="isRestoring"&&(L.fetchStatus="idle")}let{error:R,errorUpdatedAt:M,status:$}=L;E=L.data;let Q=!1;if(r.placeholderData!==void 0&&E===void 0&&$==="pending"){let de;g!=null&&g.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(de=g.data,Q=!0):de=typeof r.placeholderData=="function"?r.placeholderData((fe=ye(this,ui))==null?void 0:fe.state.data,ye(this,ui)):r.placeholderData,de!==void 0&&($="success",E=dl(g==null?void 0:g.data,de,r),k=!0)}if(r.select&&E!==void 0&&!Q)if(g&&E===(f==null?void 0:f.data)&&r.select===ye(this,Hi))E=ye(this,ai);else try{Ze(this,Hi,r.select),E=r.select(E),E=dl(g==null?void 0:g.data,E,r),Ze(this,ai,E),Ze(this,lr,null)}catch(de){Ze(this,lr,de)}ye(this,lr)&&(R=ye(this,lr),E=ye(this,ai),M=Date.now(),$="error");const X=L.fetchStatus==="fetching",J=$==="pending",se=$==="error",q=J&&X,ue=E!==void 0,ee={status:$,fetchStatus:L.fetchStatus,isPending:J,isSuccess:$==="success",isError:se,isInitialLoading:q,isLoading:q,data:E,dataUpdatedAt:L.dataUpdatedAt,error:R,errorUpdatedAt:M,failureCount:L.fetchFailureCount,failureReason:L.fetchFailureReason,errorUpdateCount:L.errorUpdateCount,isFetched:L.dataUpdateCount>0||L.errorUpdateCount>0,isFetchedAfterMount:L.dataUpdateCount>C.dataUpdateCount||L.errorUpdateCount>C.errorUpdateCount,isFetching:X,isRefetching:X&&!J,isLoadingError:se&&!ue,isPaused:L.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:se&&ue,isStale:na(t,r),refetch:this.refetch,promise:ye(this,ur)};if(this.options.experimental_prefetchInRender){const de=Ce=>{ee.status==="error"?Ce.reject(ee.error):ee.data!==void 0&&Ce.resolve(ee.data)},ie=()=>{const Ce=Ze(this,ur,ee.promise=pl());de(Ce)},Ae=ye(this,ur);switch(Ae.status){case"pending":t.queryHash===s.queryHash&&de(Ae);break;case"fulfilled":(ee.status==="error"||ee.data!==Ae.value)&&ie();break;case"rejected":(ee.status!=="error"||ee.error!==Ae.reason)&&ie();break}}return ee}updateResult(){const t=ye(this,jt),r=this.createResult(ye(this,Xe),this.options);if(Ze(this,Pr,ye(this,Xe).state),Ze(this,si,this.options),ye(this,Pr).data!==void 0&&Ze(this,ui,ye(this,Xe)),Oo(r,t))return;Ze(this,jt,r);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,g=typeof l=="function"?l():l;if(g==="all"||!g&&!ye(this,li).size)return!0;const f=new Set(g??ye(this,li));return this.options.throwOnError&&f.add("error"),Object.keys(ye(this,jt)).some(c=>{const b=c;return ye(this,jt)[b]!==t[b]&&f.has(b)})};ht(this,it,fd).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,it,tl).call(this)}},Wt=new WeakMap,Xe=new WeakMap,qi=new WeakMap,jt=new WeakMap,Pr=new WeakMap,si=new WeakMap,ur=new WeakMap,lr=new WeakMap,Hi=new WeakMap,ai=new WeakMap,ui=new WeakMap,$r=new WeakMap,Nr=new WeakMap,cr=new WeakMap,li=new WeakMap,it=new WeakSet,_o=function(t){ht(this,it,il).call(this);let r=ye(this,Xe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(vd)),r},Ju=function(){ht(this,it,nl).call(this);const t=Ao(this.options.staleTime,ye(this,Xe));if(Ri||ye(this,jt).isStale||!ll(t))return;const s=md(ye(this,jt).dataUpdatedAt,t)+1;Ze(this,$r,setTimeout(()=>{ye(this,jt).isStale||this.updateResult()},s))},Xu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ye(this,Xe)):this.options.refetchInterval)??!1},el=function(t){ht(this,it,rl).call(this),Ze(this,cr,t),!(Ri||Mn(this.options.enabled,ye(this,Xe))===!1||!ll(ye(this,cr))||ye(this,cr)===0)&&Ze(this,Nr,setInterval(()=>{(this.options.refetchIntervalInBackground||wd.isFocused())&&ht(this,it,_o).call(this)},ye(this,cr)))},tl=function(){ht(this,it,Ju).call(this),ht(this,it,el).call(this,ht(this,it,Xu).call(this))},nl=function(){ye(this,$r)&&(clearTimeout(ye(this,$r)),Ze(this,$r,void 0))},rl=function(){ye(this,Nr)&&(clearInterval(ye(this,Nr)),Ze(this,Nr,void 0))},il=function(){const t=ye(this,Wt).getQueryCache().build(ye(this,Wt),this.options);if(t===ye(this,Xe))return;const r=ye(this,Xe);Ze(this,Xe,t),Ze(this,qi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},fd=function(t){To.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ye(this,jt))}),ye(this,Wt).getQueryCache().notify({query:ye(this,Xe),type:"observerResultsUpdated"})})},ef);function Dd(i,t){return Mn(t.enabled,i)!==!1&&i.state.data===void 0&&!(i.state.status==="error"&&t.retryOnMount===!1)}function gl(i,t){return Dd(i,t)||i.state.data!==void 0&&ta(i,t,t.refetchOnMount)}function ta(i,t,r){if(Mn(t.enabled,i)!==!1){const s=typeof r=="function"?r(i):r;return s==="always"||s!==!1&&na(i,t)}return!1}function vl(i,t,r,s){return(i!==t||Mn(s.enabled,i)===!1)&&(!r.suspense||i.state.status!=="error")&&na(i,r)}function na(i,t){return Mn(t.enabled,i)!==!1&&i.isStaleByTime(Ao(t.staleTime,i))}function Ed(i,t){return!Oo(i.getCurrentResult(),t)}var Md=(tf=class extends Co{constructor(t,r){super();at(this,Nn);at(this,fr);at(this,hr);at(this,Yt);at(this,$n);Ze(this,fr,t),this.setOptions(r),this.bindMethods(),ht(this,Nn,Ks).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ye(this,fr).defaultMutationOptions(t),Oo(this.options,r)||ye(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ye(this,Yt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cl(r.mutationKey)!==cl(this.options.mutationKey)?this.reset():((s=ye(this,Yt))==null?void 0:s.state.status)==="pending"&&ye(this,Yt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=ye(this,Yt))==null||t.removeObserver(this)}onMutationUpdate(t){ht(this,Nn,Ks).call(this),ht(this,Nn,ol).call(this,t)}getCurrentResult(){return ye(this,hr)}reset(){var t;(t=ye(this,Yt))==null||t.removeObserver(this),Ze(this,Yt,void 0),ht(this,Nn,Ks).call(this),ht(this,Nn,ol).call(this)}mutate(t,r){var s;return Ze(this,$n,r),(s=ye(this,Yt))==null||s.removeObserver(this),Ze(this,Yt,ye(this,fr).getMutationCache().build(ye(this,fr),this.options)),ye(this,Yt).addObserver(this),ye(this,Yt).execute(t)}},fr=new WeakMap,hr=new WeakMap,Yt=new WeakMap,$n=new WeakMap,Nn=new WeakSet,Ks=function(){var r;const t=((r=ye(this,Yt))==null?void 0:r.state)??Od();Ze(this,hr,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ol=function(t){To.batch(()=>{var r,s,l,g,f,c,b,C;if(ye(this,$n)&&this.hasListeners()){const O=ye(this,hr).variables,L=ye(this,hr).context;(t==null?void 0:t.type)==="success"?((s=(r=ye(this,$n)).onSuccess)==null||s.call(r,t.data,O,L),(g=(l=ye(this,$n)).onSettled)==null||g.call(l,t.data,null,O,L)):(t==null?void 0:t.type)==="error"&&((c=(f=ye(this,$n)).onError)==null||c.call(f,t.error,O,L),(C=(b=ye(this,$n)).onSettled)==null||C.call(b,void 0,t.error,O,L))}this.listeners.forEach(O=>{O(ye(this,hr))})})},tf),Do={exports:{}},Li={};/**
|
|
22
22
|
* @license React
|
|
23
23
|
* react-jsx-runtime.production.js
|
|
24
24
|
*
|
|
@@ -140,5 +140,5 @@ __p += '`),et&&(_e+=`' +
|
|
|
140
140
|
function print() { __p += __j.call(arguments, '') }
|
|
141
141
|
`:`;
|
|
142
142
|
`)+_e+`return __p
|
|
143
|
-
}`;var qe=ad(function(){return rt(S,Pe+"return "+_e).apply(r,P)});if(qe.source=_e,Uu(qe))throw qe;return qe}function fb(e){return ot(e).toLowerCase()}function hb(e){return ot(e).toUpperCase()}function db(e,n,o){if(e=ot(e),e&&(o||n===r))return vf(e);if(!e||!(n=nn(n)))return e;var a=On(e),y=On(n),S=mf(a,y),P=yf(a,y)+1;return Er(a,S,P).join("")}function pb(e,n,o){if(e=ot(e),e&&(o||n===r))return e.slice(0,_f(e)+1);if(!e||!(n=nn(n)))return e;var a=On(e),y=yf(a,On(n))+1;return Er(a,0,y).join("")}function gb(e,n,o){if(e=ot(e),e&&(o||n===r))return e.replace(gr,"");if(!e||!(n=nn(n)))return e;var a=On(e),y=mf(a,On(n));return Er(a,y).join("")}function vb(e,n){var o=de,a=ie;if(vt(n)){var y="separator"in n?n.separator:y;o="length"in n?Ye(n.length):o,a="omission"in n?nn(n.omission):a}e=ot(e);var S=e.length;if(mi(e)){var P=On(e);S=P.length}if(o>=S)return e;var F=o-yi(a);if(F<1)return a;var V=P?Er(P,0,F).join(""):e.slice(0,F);if(y===r)return V+a;if(P&&(F+=V.length-F),zu(y)){if(e.slice(F).search(y)){var ge,ve=V;for(y.global||(y=ru(y.source,ot(Vi.exec(y))+"g")),y.lastIndex=0;ge=y.exec(ve);)var _e=ge.index;V=V.slice(0,_e===r?F:_e)}}else if(e.indexOf(nn(y),F)!=F){var De=V.lastIndexOf(y);De>-1&&(V=V.slice(0,De))}return V+a}function mb(e){return e=ot(e),e&&jn.test(e)?e.replace(Qt,Hv):e}var yb=Ai(function(e,n,o){return e+(o?" ":"")+n.toUpperCase()}),Yu=uh("toUpperCase");function sd(e,n,o){return e=ot(e),n=o?r:n,n===r?zv(e)?Zv(e):Lv(e):e.match(n)||[]}var ad=Ge(function(e,n){try{return en(e,r,n)}catch(o){return Uu(o)?o:new Fe(o)}}),wb=Kn(function(e,n){return gn(n,function(o){o=Pn(o),Vn(e,o,Bu(e[o],e))}),e});function _b(e){var n=e==null?0:e.length,o=Ne();return e=n?gt(e,function(a){if(typeof a[1]!="function")throw new vn(f);return[o(a[0]),a[1]]}):[],Ge(function(a){for(var y=-1;++y<n;){var S=e[y];if(en(S[0],this,a))return en(S[1],this,a)}})}function bb(e){return Hm(yn(e,L))}function qu(e){return function(){return e}}function xb(e,n){return e==null||e!==e?n:e}var Sb=ch(),Cb=ch(!0);function Kt(e){return e}function Hu(e){return Uf(typeof e=="function"?e:yn(e,L))}function Ab(e){return Ff(yn(e,L))}function Ob(e,n){return Wf(e,yn(n,L))}var Tb=Ge(function(e,n){return function(o){return ho(o,e,n)}}),Db=Ge(function(e,n){return function(o){return ho(e,o,n)}});function Gu(e,n,o){var a=Dt(n),y=Ms(n,a);o==null&&!(vt(n)&&(y.length||!a.length))&&(o=n,n=e,e=this,y=Ms(n,Dt(n)));var S=!(vt(o)&&"chain"in o)||!!o.chain,P=Jn(e);return gn(y,function(F){var V=n[F];e[F]=V,P&&(e.prototype[F]=function(){var ge=this.__chain__;if(S||ge){var ve=e(this.__wrapped__),_e=ve.__actions__=Gt(this.__actions__);return _e.push({func:V,args:arguments,thisArg:e}),ve.__chain__=ge,ve}return V.apply(e,Sr([this.value()],arguments))})}),e}function Eb(){return kt._===this&&(kt._=tm),this}function Vu(){}function Mb(e){return e=Ye(e),Ge(function(n){return Yf(n,e)})}var Rb=Au(gt),Lb=Au(ff),kb=Au(Ka);function ud(e){return Lu(e)?Qa(Pn(e)):ly(e)}function Ib(e){return function(n){return e==null?r:Zr(e,n)}}var Pb=hh(),$b=hh(!0);function Zu(){return[]}function Ku(){return!1}function Nb(){return{}}function Bb(){return""}function jb(){return!0}function Ub(e,n){if(e=Ye(e),e<1||e>p)return[];var o=m,a=Pt(e,m);n=Ne(n),e-=m;for(var y=eu(a,n);++o<e;)n(o);return y}function zb(e){return We(e)?gt(e,Pn):rn(e)?[e]:Gt(Dh(ot(e)))}function Fb(e){var n=++Xv;return ot(e)+n}var Wb=$s(function(e,n){return e+n},0),Yb=Ou("ceil"),qb=$s(function(e,n){return e/n},1),Hb=Ou("floor");function Gb(e){return e&&e.length?Es(e,Kt,fu):r}function Vb(e,n){return e&&e.length?Es(e,Ne(n,2),fu):r}function Zb(e){return pf(e,Kt)}function Kb(e,n){return pf(e,Ne(n,2))}function Qb(e){return e&&e.length?Es(e,Kt,gu):r}function Jb(e,n){return e&&e.length?Es(e,Ne(n,2),gu):r}var Xb=$s(function(e,n){return e*n},1),ex=Ou("round"),tx=$s(function(e,n){return e-n},0);function nx(e){return e&&e.length?Xa(e,Kt):0}function rx(e,n){return e&&e.length?Xa(e,Ne(n,2)):0}return x.after=Aw,x.ary=jh,x.assign=h_,x.assignIn=Xh,x.assignInWith=Zs,x.assignWith=d_,x.at=p_,x.before=Uh,x.bind=Bu,x.bindAll=wb,x.bindKey=zh,x.castArray=Nw,x.chain=$h,x.chunk=Hy,x.compact=Gy,x.concat=Vy,x.cond=_b,x.conforms=bb,x.constant=qu,x.countBy=nw,x.create=g_,x.curry=Fh,x.curryRight=Wh,x.debounce=Yh,x.defaults=v_,x.defaultsDeep=m_,x.defer=Ow,x.delay=Tw,x.difference=Zy,x.differenceBy=Ky,x.differenceWith=Qy,x.drop=Jy,x.dropRight=Xy,x.dropRightWhile=e2,x.dropWhile=t2,x.fill=n2,x.filter=iw,x.flatMap=aw,x.flatMapDeep=uw,x.flatMapDepth=lw,x.flatten=Lh,x.flattenDeep=r2,x.flattenDepth=i2,x.flip=Dw,x.flow=Sb,x.flowRight=Cb,x.fromPairs=o2,x.functions=C_,x.functionsIn=A_,x.groupBy=cw,x.initial=a2,x.intersection=u2,x.intersectionBy=l2,x.intersectionWith=c2,x.invert=T_,x.invertBy=D_,x.invokeMap=hw,x.iteratee=Hu,x.keyBy=dw,x.keys=Dt,x.keysIn=Zt,x.map=Ws,x.mapKeys=M_,x.mapValues=R_,x.matches=Ab,x.matchesProperty=Ob,x.memoize=qs,x.merge=L_,x.mergeWith=ed,x.method=Tb,x.methodOf=Db,x.mixin=Gu,x.negate=Hs,x.nthArg=Mb,x.omit=k_,x.omitBy=I_,x.once=Ew,x.orderBy=pw,x.over=Rb,x.overArgs=Mw,x.overEvery=Lb,x.overSome=kb,x.partial=ju,x.partialRight=qh,x.partition=gw,x.pick=P_,x.pickBy=td,x.property=ud,x.propertyOf=Ib,x.pull=p2,x.pullAll=Ih,x.pullAllBy=g2,x.pullAllWith=v2,x.pullAt=m2,x.range=Pb,x.rangeRight=$b,x.rearg=Rw,x.reject=yw,x.remove=y2,x.rest=Lw,x.reverse=$u,x.sampleSize=_w,x.set=N_,x.setWith=B_,x.shuffle=bw,x.slice=w2,x.sortBy=Cw,x.sortedUniq=O2,x.sortedUniqBy=T2,x.split=ab,x.spread=kw,x.tail=D2,x.take=E2,x.takeRight=M2,x.takeRightWhile=R2,x.takeWhile=L2,x.tap=G2,x.throttle=Iw,x.thru=Fs,x.toArray=Kh,x.toPairs=nd,x.toPairsIn=rd,x.toPath=zb,x.toPlainObject=Jh,x.transform=j_,x.unary=Pw,x.union=k2,x.unionBy=I2,x.unionWith=P2,x.uniq=$2,x.uniqBy=N2,x.uniqWith=B2,x.unset=U_,x.unzip=Nu,x.unzipWith=Ph,x.update=z_,x.updateWith=F_,x.values=Di,x.valuesIn=W_,x.without=j2,x.words=sd,x.wrap=$w,x.xor=U2,x.xorBy=z2,x.xorWith=F2,x.zip=W2,x.zipObject=Y2,x.zipObjectDeep=q2,x.zipWith=H2,x.entries=nd,x.entriesIn=rd,x.extend=Xh,x.extendWith=Zs,Gu(x,x),x.add=Wb,x.attempt=ad,x.camelCase=G_,x.capitalize=id,x.ceil=Yb,x.clamp=Y_,x.clone=Bw,x.cloneDeep=Uw,x.cloneDeepWith=zw,x.cloneWith=jw,x.conformsTo=Fw,x.deburr=od,x.defaultTo=xb,x.divide=qb,x.endsWith=V_,x.eq=Dn,x.escape=Z_,x.escapeRegExp=K_,x.every=rw,x.find=ow,x.findIndex=Mh,x.findKey=y_,x.findLast=sw,x.findLastIndex=Rh,x.findLastKey=w_,x.floor=Hb,x.forEach=Nh,x.forEachRight=Bh,x.forIn=__,x.forInRight=b_,x.forOwn=x_,x.forOwnRight=S_,x.get=Fu,x.gt=Ww,x.gte=Yw,x.has=O_,x.hasIn=Wu,x.head=kh,x.identity=Kt,x.includes=fw,x.indexOf=s2,x.inRange=q_,x.invoke=E_,x.isArguments=Jr,x.isArray=We,x.isArrayBuffer=qw,x.isArrayLike=Vt,x.isArrayLikeObject=wt,x.isBoolean=Hw,x.isBuffer=Mr,x.isDate=Gw,x.isElement=Vw,x.isEmpty=Zw,x.isEqual=Kw,x.isEqualWith=Qw,x.isError=Uu,x.isFinite=Jw,x.isFunction=Jn,x.isInteger=Hh,x.isLength=Gs,x.isMap=Gh,x.isMatch=Xw,x.isMatchWith=e_,x.isNaN=t_,x.isNative=n_,x.isNil=i_,x.isNull=r_,x.isNumber=Vh,x.isObject=vt,x.isObjectLike=yt,x.isPlainObject=wo,x.isRegExp=zu,x.isSafeInteger=o_,x.isSet=Zh,x.isString=Vs,x.isSymbol=rn,x.isTypedArray=Ti,x.isUndefined=s_,x.isWeakMap=a_,x.isWeakSet=u_,x.join=f2,x.kebabCase=Q_,x.last=_n,x.lastIndexOf=h2,x.lowerCase=J_,x.lowerFirst=X_,x.lt=l_,x.lte=c_,x.max=Gb,x.maxBy=Vb,x.mean=Zb,x.meanBy=Kb,x.min=Qb,x.minBy=Jb,x.stubArray=Zu,x.stubFalse=Ku,x.stubObject=Nb,x.stubString=Bb,x.stubTrue=jb,x.multiply=Xb,x.nth=d2,x.noConflict=Eb,x.noop=Vu,x.now=Ys,x.pad=eb,x.padEnd=tb,x.padStart=nb,x.parseInt=rb,x.random=H_,x.reduce=vw,x.reduceRight=mw,x.repeat=ib,x.replace=ob,x.result=$_,x.round=ex,x.runInContext=G,x.sample=ww,x.size=xw,x.snakeCase=sb,x.some=Sw,x.sortedIndex=_2,x.sortedIndexBy=b2,x.sortedIndexOf=x2,x.sortedLastIndex=S2,x.sortedLastIndexBy=C2,x.sortedLastIndexOf=A2,x.startCase=ub,x.startsWith=lb,x.subtract=tx,x.sum=nx,x.sumBy=rx,x.template=cb,x.times=Ub,x.toFinite=Xn,x.toInteger=Ye,x.toLength=Qh,x.toLower=fb,x.toNumber=bn,x.toSafeInteger=f_,x.toString=ot,x.toUpper=hb,x.trim=db,x.trimEnd=pb,x.trimStart=gb,x.truncate=vb,x.unescape=mb,x.uniqueId=Fb,x.upperCase=yb,x.upperFirst=Yu,x.each=Nh,x.eachRight=Bh,x.first=kh,Gu(x,function(){var e={};return kn(x,function(n,o){st.call(x.prototype,o)||(e[o]=n)}),e}(),{chain:!1}),x.VERSION=s,gn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){x[e].placeholder=x}),gn(["drop","take"],function(e,n){Je.prototype[e]=function(o){o=o===r?1:Ot(Ye(o),0);var a=this.__filtered__&&!n?new Je(this):this.clone();return a.__filtered__?a.__takeCount__=Pt(o,a.__takeCount__):a.__views__.push({size:Pt(o,m),type:e+(a.__dir__<0?"Right":"")}),a},Je.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),gn(["filter","map","takeWhile"],function(e,n){var o=n+1,a=o==U||o==A;Je.prototype[e]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:Ne(y,3),type:o}),S.__filtered__=S.__filtered__||a,S}}),gn(["head","last"],function(e,n){var o="take"+(n?"Right":"");Je.prototype[e]=function(){return this[o](1).value()[0]}}),gn(["initial","tail"],function(e,n){var o="drop"+(n?"":"Right");Je.prototype[e]=function(){return this.__filtered__?new Je(this):this[o](1)}}),Je.prototype.compact=function(){return this.filter(Kt)},Je.prototype.find=function(e){return this.filter(e).head()},Je.prototype.findLast=function(e){return this.reverse().find(e)},Je.prototype.invokeMap=Ge(function(e,n){return typeof e=="function"?new Je(this):this.map(function(o){return ho(o,e,n)})}),Je.prototype.reject=function(e){return this.filter(Hs(Ne(e)))},Je.prototype.slice=function(e,n){e=Ye(e);var o=this;return o.__filtered__&&(e>0||n<0)?new Je(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),n!==r&&(n=Ye(n),o=n<0?o.dropRight(-n):o.take(n-e)),o)},Je.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Je.prototype.toArray=function(){return this.take(m)},kn(Je.prototype,function(e,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),y=x[a?"take"+(n=="last"?"Right":""):n],S=a||/^find/.test(n);y&&(x.prototype[n]=function(){var P=this.__wrapped__,F=a?[1]:arguments,V=P instanceof Je,ge=F[0],ve=V||We(P),_e=function(Qe){var et=y.apply(x,Sr([Qe],F));return a&&De?et[0]:et};ve&&o&&typeof ge=="function"&&ge.length!=1&&(V=ve=!1);var De=this.__chain__,Pe=!!this.__actions__.length,Be=S&&!De,qe=V&&!Pe;if(!S&&ve){P=qe?P:new Je(this);var je=e.apply(P,F);return je.__actions__.push({func:Fs,args:[_e],thisArg:r}),new mn(je,De)}return Be&&qe?e.apply(this,F):(je=this.thru(_e),Be?a?je.value()[0]:je.value():je)})}),gn(["pop","push","shift","sort","splice","unshift"],function(e){var n=ps[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);x.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var S=this.value();return n.apply(We(S)?S:[],y)}return this[o](function(P){return n.apply(We(P)?P:[],y)})}}),kn(Je.prototype,function(e,n){var o=x[n];if(o){var a=o.name+"";st.call(xi,a)||(xi[a]=[]),xi[a].push({name:n,func:o})}}),xi[Ps(r,Q).name]=[{name:"wrapper",func:r}],Je.prototype.clone=mm,Je.prototype.reverse=ym,Je.prototype.value=wm,x.prototype.at=V2,x.prototype.chain=Z2,x.prototype.commit=K2,x.prototype.next=Q2,x.prototype.plant=X2,x.prototype.reverse=ew,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=tw,x.prototype.first=x.prototype.head,oo&&(x.prototype[oo]=J2),x},wi=Kv();Yr?((Yr.exports=wi)._=wi,Ha._=wi):kt._=wi}).call(Q0)}(Yi,Yi.exports)),Yi.exports}var Zc=J0();function X0(i){const t=an.c(40),{fields:r,onClose:s,queryKey:l,apiPath:g,id:f,steps:c}=i,[b,C]=me.useState(0),[O,L]=me.useState(!1),{data:k,isLoading:E}=mc(g,l,f),{mutateAsync:R,isError:M,error:$,isPending:Q}=Ca(g,l);let X;t[0]!==r?(X=new Set(r.filter(sv).map(ov)),t[0]=r,t[1]=X):X=t[1];let J;t[2]!==X?(J=[...X],t[2]=X,t[3]=J):J=t[3];const se=J;let q;t[4]!==r?(q=r.reduce(iv,{}),t[4]=r,t[5]=q):q=t[5];let ue;t[6]!==r?(ue=r.filter(rv).reduce(tv,{}),t[6]=r,t[7]=ue):ue=t[7];let ne;t[8]!==q||t[9]!==ue?(ne={mode:"uncontrolled",initialValues:q,validate:ue},t[8]=q,t[9]=ue,t[10]=ne):ne=t[10];const ee=Ei.useForm(ne);let fe;t[11]!==k||t[12]!==r||t[13]!==ee?(fe=()=>{if(k){const A=r.reduce((v,p)=>{const _=p.id;return v[_]=Array.isArray(k[_])?k[_]:p.type==="boolean"?k[_]??!1:p.type==="date"?k[_]?new Date(k[_]):"":k[_]??"",v},{});ee.initialize(A),ee.setValues(A)}},t[11]=k,t[12]=r,t[13]=ee,t[14]=fe):fe=t[14];let de;t[15]!==k?(de=[k],t[15]=k,t[16]=de):de=t[16],me.useEffect(fe,de);let ie;t[17]!==ee?(ie=function(v){return D.jsxs(me.Fragment,{children:[(v.type===void 0||v.type=="text")&&D.jsx(j.TextInput,{label:v.column.title,placeholder:v.placeholder??"",...ee.getInputProps(v.id),type:v.id.includes("email")?"email":void 0},ee.key(v.id)),v.type==="number"&&D.jsx(j.NumberInput,{decimalSeparator:",",label:v.column.title,placeholder:v.placeholder??"",...ee.getInputProps(v.id)},ee.key(v.id)),v.type==="date"&&D.jsx(Qo,{label:v.column.title,placeholder:v.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...ee.getInputProps(v.id)},ee.key(v.id)),v.type==="boolean"&&D.jsx(j.Checkbox,{mt:"md",label:v.column.title,...ee.getInputProps(v.id,{type:"checkbox"})},ee.key(v.id)),v.type==="custom"&&v.render&&v.render(ee.getValues(),ee.setValues,L)]},v.id)},t[17]=ee,t[18]=ie):ie=t[18];const Ae=ie;let Ce;t[19]!==M||t[20]!==($==null?void 0:$.message)||t[21]!==($==null?void 0:$.name)?(Ce=M&&D.jsx(j.Alert,{variant:"outline",color:"red",title:($==null?void 0:$.name)??"Fehler aufgetreten",mb:"lg",children:($==null?void 0:$.message)??"Fehler aufgetreten"}),t[19]=M,t[20]=$==null?void 0:$.message,t[21]=$==null?void 0:$.name,t[22]=Ce):Ce=t[22];let U;t[23]!==b||t[24]!==r||t[25]!==ee||t[26]!==O||t[27]!==f||t[28]!==E||t[29]!==Q||t[30]!==M||t[31]!==s||t[32]!==Ae||t[33]!==c||t[34]!==se||t[35]!==R?(U=E?D.jsxs(j.Stack,{gap:"md",children:[D.jsx(j.Skeleton,{height:40}),Array(r.length).fill(0).map(ev),D.jsxs(j.Group,{mt:"md",justify:"end",children:[D.jsx(j.Skeleton,{width:100,height:36}),D.jsx(j.Skeleton,{width:100,height:36})]})]}):D.jsxs("form",{onSubmit:ee.onSubmit(async A=>{await R({...A,id:f}),se.length&&b<se.length-1?M||C(b+1):M||(ee.setInitialValues(A),ee.reset(),s())}),children:[se.length?D.jsx(j.Stepper,{active:b,size:"sm",children:se.map(A=>D.jsx(j.Stepper.Step,{...c&&c[A-1]?{label:c[A-1].label}:{},children:r.filter(v=>v.step===A).map(v=>Ae(v))},A))}):r.map(A=>Ae(A)),!O&&D.jsxs(j.Group,{mt:"md",justify:"end",children:[D.jsx(j.Button,{onClick:()=>se.length?b===0?s():C(b-1):s(),variant:"outline",children:se.length?b===0?"Abbrechen":"Zurück":"Abbrechen"}),D.jsx(j.Button,{type:"submit",loading:Q,children:se.length?b===se.length-1?"Speichern":"Weiter":"Speichern"})]})]}),t[23]=b,t[24]=r,t[25]=ee,t[26]=O,t[27]=f,t[28]=E,t[29]=Q,t[30]=M,t[31]=s,t[32]=Ae,t[33]=c,t[34]=se,t[35]=R,t[36]=U):U=t[36];let I;return t[37]!==U||t[38]!==Ce?(I=D.jsxs(D.Fragment,{children:[Ce,U]}),t[37]=U,t[38]=Ce,t[39]=I):I=t[39],I}function ev(i,t){return D.jsx(j.Skeleton,{height:35},`skeleton-field-${t}`)}function tv(i,t){return i[t.id]=nv,i}function nv(i){return i?null:"Pflichtfeld"}function rv(i){return i.required}function iv(i,t){return i[t.id]=t.type==="boolean"?t.defaultValue??!1:t.defaultValue??"",i}function ov(i){return i.step}function sv(i){return typeof i.step=="number"}function av(i){const t=an.c(28),{queryKey:r,apiPath:s,onClose:l,selectedRecords:g}=i,{mutateAsync:f,isError:c,error:b,isPending:C}=_c(s,r),[O,L]=me.useState(g);let k;t[0]!==l||t[1]!==O.length?(k=()=>{O.length||l()},t[0]=l,t[1]=O.length,t[2]=k):k=t[2];let E;if(t[3]!==l||t[4]!==O?(E=[l,O],t[3]=l,t[4]=O,t[5]=E):E=t[5],me.useEffect(k,E),!O.length){let ue;return t[6]===Symbol.for("react.memo_cache_sentinel")?(ue=D.jsx(D.Fragment,{}),t[6]=ue):ue=t[6],ue}let R;t[7]!==b||t[8]!==c?(R=c&&b.message&&D.jsx(j.Alert,{variant:"outline",color:"red",title:b.name,children:b.message}),t[7]=b,t[8]=c,t[9]=R):R=t[9];let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=D.jsx("br",{}),t[10]=M):M=t[10];let $;t[11]!==g[0].id?($=D.jsxs(j.Text,{children:["Bist du sicher, dass du folgenden Eintrag löschen möchtest?",M,g[0].id]}),t[11]=g[0].id,t[12]=$):$=t[12];let Q;t[13]!==l?(Q=D.jsx(j.Button,{onClick:l,variant:"outline",children:"Abbrechen"}),t[13]=l,t[14]=Q):Q=t[14];let X;t[15]!==f||t[16]!==O[0].id?(X=async()=>{await f(O[0].id),L(ue=>ue.filter(ne=>ne.id!==O[0].id))},t[15]=f,t[16]=O[0].id,t[17]=X):X=t[17];let J;t[18]!==C||t[19]!==X?(J=D.jsx(j.Button,{color:"red",loading:C,onClick:X,children:"Delete"}),t[18]=C,t[19]=X,t[20]=J):J=t[20];let se;t[21]!==Q||t[22]!==J?(se=D.jsxs(j.Group,{mt:"md",justify:"end",children:[Q,J]}),t[21]=Q,t[22]=J,t[23]=se):se=t[23];let q;return t[24]!==R||t[25]!==$||t[26]!==se?(q=D.jsxs(D.Fragment,{children:[R,$,se]}),t[24]=R,t[25]=$,t[26]=se,t[27]=q):q=t[27],q}function Kc(i,t){const r=an.c(8);let s;r[0]!==i||r[1]!==t?(s=()=>{const C=localStorage.getItem(`use_persistent_storage_${t}`);return C?JSON.parse(C):i},r[0]=i,r[1]=t,r[2]=s):s=r[2];const[l,g]=me.useState(s);let f;r[3]!==t?(f=C=>{g(C),localStorage.setItem(`use_persistent_storage_${t}`,JSON.stringify(C))},r[3]=t,r[4]=f):f=r[4];const c=f;let b;return r[5]!==c||r[6]!==l?(b=[l,c],r[5]=c,r[6]=l,r[7]=b):b=r[7],b}const Qc=[10,15,20,50,100];function uv(i){const t=an.c(130),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:g,buttons:f,fields:c,selection:b,pagination:C,filters:O,actions:L,steps:k,defaultSort:E,createButtonText:R}=i,{data:M,isLoading:$,isError:Q,isRefetching:X,refetch:J}=yc(g,s);let se;t[0]===Symbol.for("react.memo_cache_sentinel")?(se=[],t[0]=se):se=t[0];const[q,ue]=me.useState(se),{queryClient:ne}=rr();let ee;t[1]!==M||t[2]!==l||t[3]!==O||t[4]!==ne?(ee=()=>{if(!(!M||!Array.isArray(M))){if(l==null||l.forEach(pt=>ne.invalidateQueries({queryKey:pt})),!O||O.length===0){ue(M);return}ue(M.filter(pt=>O.every(Mt=>{const dr=Mt.id;if(Mt.type==="query"&&typeof Mt.value=="string"){const pr=pt[dr];return typeof pr=="string"&&pr.includes(Mt.value)}else if(Mt.type==="date"){if(!Mt.value)return!0;const pr=Mt.value,[gr,ci]=pr;if(gr&&ci){const fi=pt[dr];if(typeof fi=="string"){const hi=new Date(fi);return hi>=gr&&hi<=ci}}return!0}return!0})))}},t[1]=M,t[2]=l,t[3]=O,t[4]=ne,t[5]=ee):ee=t[5];let fe;t[6]!==M||t[7]!==O?(fe=[M,O],t[6]=M,t[7]=O,t[8]=fe):fe=t[8],me.useEffect(ee,fe);const de=(E==null?void 0:E.field)??c[0].id,ie=(E==null?void 0:E.direction)??"desc";let Ae;t[9]!==de||t[10]!==ie?(Ae={columnAccessor:de,direction:ie},t[9]=de,t[10]=ie,t[11]=Ae):Ae=t[11];const[Ce,U]=me.useState(Ae);let I;t[12]!==q||t[13]!==(E==null?void 0:E.direction)||t[14]!==(E==null?void 0:E.field)||t[15]!==c[0]?(I=()=>{const pt=Zc.sortBy(q,(E==null?void 0:E.field)??c[0].id);return(E==null?void 0:E.direction)==="asc"?pt:pt.reverse()},t[12]=q,t[13]=E==null?void 0:E.direction,t[14]=E==null?void 0:E.field,t[15]=c[0],t[16]=I):I=t[16];const[A,v]=me.useState(I);let p;t[17]!==q||t[18]!==Ce.columnAccessor||t[19]!==Ce.direction?(p=()=>{const pt=Zc.sortBy(q,Ce.columnAccessor);v(Ce.direction==="desc"?pt.reverse():pt)},t[17]=q,t[18]=Ce.columnAccessor,t[19]=Ce.direction,t[20]=p):p=t[20];let _;t[21]!==q||t[22]!==Ce?(_=[Ce,q],t[21]=q,t[22]=Ce,t[23]=_):_=t[23],me.useEffect(p,_);const[d,m]=Kc(Qc[1],"mantine-table-page-size"),[T,H]=me.useState(1);let Z;t[24]!==d||t[25]!==C||t[26]!==A?(Z=C?A.slice(0,d):A,t[24]=d,t[25]=C,t[26]=A,t[27]=Z):Z=t[27];const[le,pe]=me.useState(Z);let we;t[28]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{H(1)},t[28]=we):we=t[28];let re;t[29]!==d?(re=[d],t[29]=d,t[30]=re):re=t[30],me.useEffect(we,re);let ce,Oe;t[31]!==T||t[32]!==d||t[33]!==C||t[34]!==A?(ce=()=>{if(C){const pt=(T-1)*d,Mt=pt+d;pe(A.slice(pt,Mt))}else pe(A)},Oe=[T,A,C,d],t[31]=T,t[32]=d,t[33]=C,t[34]=A,t[35]=ce,t[36]=Oe):(ce=t[35],Oe=t[36]),me.useEffect(ce,Oe);let be;t[37]===Symbol.for("react.memo_cache_sentinel")?(be=[],t[37]=be):be=t[37];const[B,Y]=me.useState(be);let W;t[38]!==B||t[39]!==b||t[40]!==A?(W=()=>{b&&Y(A.filter(pt=>B.some(Mt=>Mt.id===pt.id)))},t[38]=B,t[39]=b,t[40]=A,t[41]=W):W=t[41];let K;t[42]!==A?(K=[A],t[42]=A,t[43]=K):K=t[43],me.useEffect(W,K);const[ae,Te]=me.useState(!1),[u,h]=me.useState(!1),[w,N]=me.useState(!1),z=r?"space-between":"end";let te;t[44]!==r?(te=r&&(typeof r=="string"?D.jsx(j.Title,{order:4,children:r}):r),t[44]=r,t[45]=te):te=t[45];let xe;t[46]!==J?(xe=()=>J(),t[46]=J,t[47]=xe):xe=t[47];let Ee;t[48]===Symbol.for("react.memo_cache_sentinel")?(Ee=D.jsx(Mi.IconRefresh,{}),t[48]=Ee):Ee=t[48];let Re;t[49]!==xe?(Re=D.jsx(j.ActionIcon,{variant:"subtle",onClick:xe,"aria-label":"Neuladen",children:Ee}),t[49]=xe,t[50]=Re):Re=t[50];let Se;t[51]!==L||t[52]!==c||t[53]!==B||t[54]!==b?(Se=(c.some(vv)||b)&&D.jsxs(j.Menu,{shadow:"md",children:[D.jsx(j.Menu.Target,{children:D.jsx(j.Button,{variant:"outline",rightSection:D.jsx(Mi.IconCaretDownFilled,{size:14}),disabled:!B.length,children:"Aktionen"})}),D.jsxs(j.Menu.Dropdown,{children:[c.find(gv)&&D.jsx(j.Menu.Item,{leftSection:D.jsx(Mi.IconPencil,{size:14}),onClick:()=>h(!0),disabled:B.length!==1,children:"Bearbeiten"}),(L??[]).map((pt,Mt)=>me.createElement(j.Menu.Item,{...pt.icon&&{leftSection:pt.icon},key:`custom_action_${Mt}`,onClick:()=>pt.onClick(B)},pt.label)),c.find(pv)&&D.jsx(j.Menu.Item,{leftSection:D.jsx(Mi.IconTrash,{size:14}),onClick:()=>N(!0),color:"red",children:"Löschen"})]})]}),t[51]=L,t[52]=c,t[53]=B,t[54]=b,t[55]=Se):Se=t[55];let Le;t[56]!==R||t[57]!==c||t[58]!==$?(Le=c.find(dv)&&D.jsx(j.Button,{onClick:()=>Te(!0),disabled:$,children:R??"Erstellen"}),t[56]=R,t[57]=c,t[58]=$,t[59]=Le):Le=t[59];let $e;t[60]!==f||t[61]!==Re||t[62]!==Se||t[63]!==Le?($e=D.jsxs(j.Group,{align:"center",gap:"xs",children:[Re,Se,Le,f]}),t[60]=f,t[61]=Re,t[62]=Se,t[63]=Le,t[64]=$e):$e=t[64];let ke;t[65]!==z||t[66]!==te||t[67]!==$e?(ke=D.jsxs(j.Group,{gap:"xs",justify:z,align:"center",children:[te,$e]}),t[65]=z,t[66]=te,t[67]=$e,t[68]=ke):ke=t[68];let Ke;t[69]!==Q?(Ke=Q&&D.jsx(j.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:D.jsx(Mi.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),t[69]=Q,t[70]=Ke):Ke=t[70];let He;t[71]!==$||t[72]!==X?(He=($||X)&&D.jsxs(j.Stack,{my:"md",children:[D.jsx(j.Skeleton,{height:40}),Array(5).fill(0).map(hv)]}),t[71]=$,t[72]=X,t[73]=He):He=t[73];let tt;t[74]!==c||t[75]!==Q||t[76]!==$||t[77]!==X||t[78]!==T||t[79]!==d||t[80]!==C||t[81]!==le||t[82]!==B||t[83]!==b||t[84]!==m||t[85]!==Ce||t[86]!==A?(tt=!$&&!X&&D.jsx(Z0,{my:"md",striped:!0,minHeight:150,fetching:Q,records:le,sortStatus:Ce,onSortStatusChange:U,...b&&{selectedRecords:B,onSelectedRecordsChange:Y},...C&&le.length&&{totalRecords:A.length,recordsPerPage:d,onPageChange:H,page:T,recordsPerPageOptions:Qc,onRecordsPerPageChange:m,recordsPerPageLabel:"Einträge pro Seite"},columns:c.map(fv),noRecordsText:"Keine Einträge gefunden"}),t[74]=c,t[75]=Q,t[76]=$,t[77]=X,t[78]=T,t[79]=d,t[80]=C,t[81]=le,t[82]=B,t[83]=b,t[84]=m,t[85]=Ce,t[86]=A,t[87]=tt):tt=t[87];let dt;t[88]===Symbol.for("react.memo_cache_sentinel")?(dt=()=>{h(!1),Y([])},t[88]=dt):dt=t[88];const St=r??"Bearbeiten";let lt;t[89]!==g||t[90]!==c||t[91]!==s||t[92]!==B[0]||t[93]!==B.length||t[94]!==k?(lt=B.length>0&&D.jsx(X0,{fields:c.filter(cv),queryKey:s,apiPath:g,id:B[0].id,onClose:()=>{h(!1),Y([])},steps:k}),t[89]=g,t[90]=c,t[91]=s,t[92]=B[0],t[93]=B.length,t[94]=k,t[95]=lt):lt=t[95];let Ct;t[96]!==St||t[97]!==lt||t[98]!==u?(Ct=D.jsx(j.Modal,{opened:u,onClose:dt,title:St,children:lt}),t[96]=St,t[97]=lt,t[98]=u,t[99]=Ct):Ct=t[99];let Sn;t[100]===Symbol.for("react.memo_cache_sentinel")?(Sn=()=>{N(!1),Y([])},t[100]=Sn):Sn=t[100];const Bn=r??"Löschen";let xt;t[101]!==g||t[102]!==s||t[103]!==B?(xt=B.length>0&&D.jsx(av,{onClose:()=>{N(!1),Y([])},queryKey:s,apiPath:g,selectedRecords:B}),t[101]=g,t[102]=s,t[103]=B,t[104]=xt):xt=t[104];let Qt;t[105]!==w||t[106]!==Bn||t[107]!==xt?(Qt=D.jsx(j.Modal,{opened:w,onClose:Sn,title:Bn,children:xt}),t[105]=w,t[106]=Bn,t[107]=xt,t[108]=Qt):Qt=t[108];let Cn;t[109]===Symbol.for("react.memo_cache_sentinel")?(Cn=()=>{Te(!1)},t[109]=Cn):Cn=t[109];const jn=r??"Anlegen";let Rn;t[110]===Symbol.for("react.memo_cache_sentinel")?(Rn=()=>{Te(!1)},t[110]=Rn):Rn=t[110];let fn;t[111]!==c?(fn=c.filter(lv),t[111]=c,t[112]=fn):fn=t[112];let hn;t[113]!==g||t[114]!==s||t[115]!==k||t[116]!==fn?(hn=D.jsx(e0,{queryKey:s,apiPath:g,onClose:Rn,fields:fn,steps:k}),t[113]=g,t[114]=s,t[115]=k,t[116]=fn,t[117]=hn):hn=t[117];let nt;t[118]!==ae||t[119]!==jn||t[120]!==hn?(nt=D.jsx(j.Modal,{opened:ae,onClose:Cn,title:jn,children:hn}),t[118]=ae,t[119]=jn,t[120]=hn,t[121]=nt):nt=t[121];let qt;return t[122]!==ke||t[123]!==Ke||t[124]!==He||t[125]!==tt||t[126]!==Ct||t[127]!==Qt||t[128]!==nt?(qt=D.jsxs(D.Fragment,{children:[ke,Ke,He,tt,Ct,Qt,nt]}),t[122]=ke,t[123]=Ke,t[124]=He,t[125]=tt,t[126]=Ct,t[127]=Qt,t[128]=nt,t[129]=qt):qt=t[129],qt}function lv(i){return i.create}function cv(i){return i.update}function fv(i){return i.column}function hv(i,t){return D.jsx(j.Skeleton,{height:35},`skeleton-${t}`)}function dv(i){return i.create}function pv(i){return i.delete}function gv(i){return i.update}function vv(i){return i.update}function mv(i){const t=an.c(5),{queryClient:r}=rr();let s;t[0]!==i?(s=D.jsx(uv,{...i}),t[0]=i,t[1]=s):s=t[1];let l;return t[2]!==r||t[3]!==s?(l=D.jsx(xl,{client:r,children:s}),t[2]=r,t[3]=s,t[4]=l):l=t[4],l}ze.DataTable=mv,ze.DataTableProvider=jg,ze.api=zg,ze.createOne=gc,ze.deleteOne=pc,ze.getAll=hc,ze.getApiHeaders=Lr,ze.getOne=dc,ze.updateOne=vc,ze.useAddOne=wc,ze.useDataTable=rr,ze.useDeleteOne=_c,ze.useGetAll=yc,ze.useGetOne=mc,ze.usePersistentState=Kc,ze.useUpdateOne=Ca,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
|
|
143
|
+
}`;var qe=ad(function(){return rt(S,Pe+"return "+_e).apply(r,P)});if(qe.source=_e,Uu(qe))throw qe;return qe}function fb(e){return ot(e).toLowerCase()}function hb(e){return ot(e).toUpperCase()}function db(e,n,o){if(e=ot(e),e&&(o||n===r))return vf(e);if(!e||!(n=nn(n)))return e;var a=On(e),y=On(n),S=mf(a,y),P=yf(a,y)+1;return Er(a,S,P).join("")}function pb(e,n,o){if(e=ot(e),e&&(o||n===r))return e.slice(0,_f(e)+1);if(!e||!(n=nn(n)))return e;var a=On(e),y=yf(a,On(n))+1;return Er(a,0,y).join("")}function gb(e,n,o){if(e=ot(e),e&&(o||n===r))return e.replace(gr,"");if(!e||!(n=nn(n)))return e;var a=On(e),y=mf(a,On(n));return Er(a,y).join("")}function vb(e,n){var o=de,a=ie;if(vt(n)){var y="separator"in n?n.separator:y;o="length"in n?Ye(n.length):o,a="omission"in n?nn(n.omission):a}e=ot(e);var S=e.length;if(mi(e)){var P=On(e);S=P.length}if(o>=S)return e;var F=o-yi(a);if(F<1)return a;var V=P?Er(P,0,F).join(""):e.slice(0,F);if(y===r)return V+a;if(P&&(F+=V.length-F),zu(y)){if(e.slice(F).search(y)){var ge,ve=V;for(y.global||(y=ru(y.source,ot(Vi.exec(y))+"g")),y.lastIndex=0;ge=y.exec(ve);)var _e=ge.index;V=V.slice(0,_e===r?F:_e)}}else if(e.indexOf(nn(y),F)!=F){var De=V.lastIndexOf(y);De>-1&&(V=V.slice(0,De))}return V+a}function mb(e){return e=ot(e),e&&jn.test(e)?e.replace(Qt,Hv):e}var yb=Ai(function(e,n,o){return e+(o?" ":"")+n.toUpperCase()}),Yu=uh("toUpperCase");function sd(e,n,o){return e=ot(e),n=o?r:n,n===r?zv(e)?Zv(e):Lv(e):e.match(n)||[]}var ad=Ge(function(e,n){try{return en(e,r,n)}catch(o){return Uu(o)?o:new Fe(o)}}),wb=Kn(function(e,n){return gn(n,function(o){o=Pn(o),Vn(e,o,Bu(e[o],e))}),e});function _b(e){var n=e==null?0:e.length,o=Ne();return e=n?gt(e,function(a){if(typeof a[1]!="function")throw new vn(f);return[o(a[0]),a[1]]}):[],Ge(function(a){for(var y=-1;++y<n;){var S=e[y];if(en(S[0],this,a))return en(S[1],this,a)}})}function bb(e){return Hm(yn(e,L))}function qu(e){return function(){return e}}function xb(e,n){return e==null||e!==e?n:e}var Sb=ch(),Cb=ch(!0);function Kt(e){return e}function Hu(e){return Uf(typeof e=="function"?e:yn(e,L))}function Ab(e){return Ff(yn(e,L))}function Ob(e,n){return Wf(e,yn(n,L))}var Tb=Ge(function(e,n){return function(o){return ho(o,e,n)}}),Db=Ge(function(e,n){return function(o){return ho(e,o,n)}});function Gu(e,n,o){var a=Dt(n),y=Ms(n,a);o==null&&!(vt(n)&&(y.length||!a.length))&&(o=n,n=e,e=this,y=Ms(n,Dt(n)));var S=!(vt(o)&&"chain"in o)||!!o.chain,P=Jn(e);return gn(y,function(F){var V=n[F];e[F]=V,P&&(e.prototype[F]=function(){var ge=this.__chain__;if(S||ge){var ve=e(this.__wrapped__),_e=ve.__actions__=Gt(this.__actions__);return _e.push({func:V,args:arguments,thisArg:e}),ve.__chain__=ge,ve}return V.apply(e,Sr([this.value()],arguments))})}),e}function Eb(){return kt._===this&&(kt._=tm),this}function Vu(){}function Mb(e){return e=Ye(e),Ge(function(n){return Yf(n,e)})}var Rb=Au(gt),Lb=Au(ff),kb=Au(Ka);function ud(e){return Lu(e)?Qa(Pn(e)):ly(e)}function Ib(e){return function(n){return e==null?r:Zr(e,n)}}var Pb=hh(),$b=hh(!0);function Zu(){return[]}function Ku(){return!1}function Nb(){return{}}function Bb(){return""}function jb(){return!0}function Ub(e,n){if(e=Ye(e),e<1||e>p)return[];var o=m,a=Pt(e,m);n=Ne(n),e-=m;for(var y=eu(a,n);++o<e;)n(o);return y}function zb(e){return We(e)?gt(e,Pn):rn(e)?[e]:Gt(Dh(ot(e)))}function Fb(e){var n=++Xv;return ot(e)+n}var Wb=$s(function(e,n){return e+n},0),Yb=Ou("ceil"),qb=$s(function(e,n){return e/n},1),Hb=Ou("floor");function Gb(e){return e&&e.length?Es(e,Kt,fu):r}function Vb(e,n){return e&&e.length?Es(e,Ne(n,2),fu):r}function Zb(e){return pf(e,Kt)}function Kb(e,n){return pf(e,Ne(n,2))}function Qb(e){return e&&e.length?Es(e,Kt,gu):r}function Jb(e,n){return e&&e.length?Es(e,Ne(n,2),gu):r}var Xb=$s(function(e,n){return e*n},1),ex=Ou("round"),tx=$s(function(e,n){return e-n},0);function nx(e){return e&&e.length?Xa(e,Kt):0}function rx(e,n){return e&&e.length?Xa(e,Ne(n,2)):0}return x.after=Aw,x.ary=jh,x.assign=h_,x.assignIn=Xh,x.assignInWith=Zs,x.assignWith=d_,x.at=p_,x.before=Uh,x.bind=Bu,x.bindAll=wb,x.bindKey=zh,x.castArray=Nw,x.chain=$h,x.chunk=Hy,x.compact=Gy,x.concat=Vy,x.cond=_b,x.conforms=bb,x.constant=qu,x.countBy=nw,x.create=g_,x.curry=Fh,x.curryRight=Wh,x.debounce=Yh,x.defaults=v_,x.defaultsDeep=m_,x.defer=Ow,x.delay=Tw,x.difference=Zy,x.differenceBy=Ky,x.differenceWith=Qy,x.drop=Jy,x.dropRight=Xy,x.dropRightWhile=e2,x.dropWhile=t2,x.fill=n2,x.filter=iw,x.flatMap=aw,x.flatMapDeep=uw,x.flatMapDepth=lw,x.flatten=Lh,x.flattenDeep=r2,x.flattenDepth=i2,x.flip=Dw,x.flow=Sb,x.flowRight=Cb,x.fromPairs=o2,x.functions=C_,x.functionsIn=A_,x.groupBy=cw,x.initial=a2,x.intersection=u2,x.intersectionBy=l2,x.intersectionWith=c2,x.invert=T_,x.invertBy=D_,x.invokeMap=hw,x.iteratee=Hu,x.keyBy=dw,x.keys=Dt,x.keysIn=Zt,x.map=Ws,x.mapKeys=M_,x.mapValues=R_,x.matches=Ab,x.matchesProperty=Ob,x.memoize=qs,x.merge=L_,x.mergeWith=ed,x.method=Tb,x.methodOf=Db,x.mixin=Gu,x.negate=Hs,x.nthArg=Mb,x.omit=k_,x.omitBy=I_,x.once=Ew,x.orderBy=pw,x.over=Rb,x.overArgs=Mw,x.overEvery=Lb,x.overSome=kb,x.partial=ju,x.partialRight=qh,x.partition=gw,x.pick=P_,x.pickBy=td,x.property=ud,x.propertyOf=Ib,x.pull=p2,x.pullAll=Ih,x.pullAllBy=g2,x.pullAllWith=v2,x.pullAt=m2,x.range=Pb,x.rangeRight=$b,x.rearg=Rw,x.reject=yw,x.remove=y2,x.rest=Lw,x.reverse=$u,x.sampleSize=_w,x.set=N_,x.setWith=B_,x.shuffle=bw,x.slice=w2,x.sortBy=Cw,x.sortedUniq=O2,x.sortedUniqBy=T2,x.split=ab,x.spread=kw,x.tail=D2,x.take=E2,x.takeRight=M2,x.takeRightWhile=R2,x.takeWhile=L2,x.tap=G2,x.throttle=Iw,x.thru=Fs,x.toArray=Kh,x.toPairs=nd,x.toPairsIn=rd,x.toPath=zb,x.toPlainObject=Jh,x.transform=j_,x.unary=Pw,x.union=k2,x.unionBy=I2,x.unionWith=P2,x.uniq=$2,x.uniqBy=N2,x.uniqWith=B2,x.unset=U_,x.unzip=Nu,x.unzipWith=Ph,x.update=z_,x.updateWith=F_,x.values=Di,x.valuesIn=W_,x.without=j2,x.words=sd,x.wrap=$w,x.xor=U2,x.xorBy=z2,x.xorWith=F2,x.zip=W2,x.zipObject=Y2,x.zipObjectDeep=q2,x.zipWith=H2,x.entries=nd,x.entriesIn=rd,x.extend=Xh,x.extendWith=Zs,Gu(x,x),x.add=Wb,x.attempt=ad,x.camelCase=G_,x.capitalize=id,x.ceil=Yb,x.clamp=Y_,x.clone=Bw,x.cloneDeep=Uw,x.cloneDeepWith=zw,x.cloneWith=jw,x.conformsTo=Fw,x.deburr=od,x.defaultTo=xb,x.divide=qb,x.endsWith=V_,x.eq=Dn,x.escape=Z_,x.escapeRegExp=K_,x.every=rw,x.find=ow,x.findIndex=Mh,x.findKey=y_,x.findLast=sw,x.findLastIndex=Rh,x.findLastKey=w_,x.floor=Hb,x.forEach=Nh,x.forEachRight=Bh,x.forIn=__,x.forInRight=b_,x.forOwn=x_,x.forOwnRight=S_,x.get=Fu,x.gt=Ww,x.gte=Yw,x.has=O_,x.hasIn=Wu,x.head=kh,x.identity=Kt,x.includes=fw,x.indexOf=s2,x.inRange=q_,x.invoke=E_,x.isArguments=Jr,x.isArray=We,x.isArrayBuffer=qw,x.isArrayLike=Vt,x.isArrayLikeObject=wt,x.isBoolean=Hw,x.isBuffer=Mr,x.isDate=Gw,x.isElement=Vw,x.isEmpty=Zw,x.isEqual=Kw,x.isEqualWith=Qw,x.isError=Uu,x.isFinite=Jw,x.isFunction=Jn,x.isInteger=Hh,x.isLength=Gs,x.isMap=Gh,x.isMatch=Xw,x.isMatchWith=e_,x.isNaN=t_,x.isNative=n_,x.isNil=i_,x.isNull=r_,x.isNumber=Vh,x.isObject=vt,x.isObjectLike=yt,x.isPlainObject=wo,x.isRegExp=zu,x.isSafeInteger=o_,x.isSet=Zh,x.isString=Vs,x.isSymbol=rn,x.isTypedArray=Ti,x.isUndefined=s_,x.isWeakMap=a_,x.isWeakSet=u_,x.join=f2,x.kebabCase=Q_,x.last=_n,x.lastIndexOf=h2,x.lowerCase=J_,x.lowerFirst=X_,x.lt=l_,x.lte=c_,x.max=Gb,x.maxBy=Vb,x.mean=Zb,x.meanBy=Kb,x.min=Qb,x.minBy=Jb,x.stubArray=Zu,x.stubFalse=Ku,x.stubObject=Nb,x.stubString=Bb,x.stubTrue=jb,x.multiply=Xb,x.nth=d2,x.noConflict=Eb,x.noop=Vu,x.now=Ys,x.pad=eb,x.padEnd=tb,x.padStart=nb,x.parseInt=rb,x.random=H_,x.reduce=vw,x.reduceRight=mw,x.repeat=ib,x.replace=ob,x.result=$_,x.round=ex,x.runInContext=G,x.sample=ww,x.size=xw,x.snakeCase=sb,x.some=Sw,x.sortedIndex=_2,x.sortedIndexBy=b2,x.sortedIndexOf=x2,x.sortedLastIndex=S2,x.sortedLastIndexBy=C2,x.sortedLastIndexOf=A2,x.startCase=ub,x.startsWith=lb,x.subtract=tx,x.sum=nx,x.sumBy=rx,x.template=cb,x.times=Ub,x.toFinite=Xn,x.toInteger=Ye,x.toLength=Qh,x.toLower=fb,x.toNumber=bn,x.toSafeInteger=f_,x.toString=ot,x.toUpper=hb,x.trim=db,x.trimEnd=pb,x.trimStart=gb,x.truncate=vb,x.unescape=mb,x.uniqueId=Fb,x.upperCase=yb,x.upperFirst=Yu,x.each=Nh,x.eachRight=Bh,x.first=kh,Gu(x,function(){var e={};return kn(x,function(n,o){st.call(x.prototype,o)||(e[o]=n)}),e}(),{chain:!1}),x.VERSION=s,gn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){x[e].placeholder=x}),gn(["drop","take"],function(e,n){Je.prototype[e]=function(o){o=o===r?1:Ot(Ye(o),0);var a=this.__filtered__&&!n?new Je(this):this.clone();return a.__filtered__?a.__takeCount__=Pt(o,a.__takeCount__):a.__views__.push({size:Pt(o,m),type:e+(a.__dir__<0?"Right":"")}),a},Je.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),gn(["filter","map","takeWhile"],function(e,n){var o=n+1,a=o==U||o==A;Je.prototype[e]=function(y){var S=this.clone();return S.__iteratees__.push({iteratee:Ne(y,3),type:o}),S.__filtered__=S.__filtered__||a,S}}),gn(["head","last"],function(e,n){var o="take"+(n?"Right":"");Je.prototype[e]=function(){return this[o](1).value()[0]}}),gn(["initial","tail"],function(e,n){var o="drop"+(n?"":"Right");Je.prototype[e]=function(){return this.__filtered__?new Je(this):this[o](1)}}),Je.prototype.compact=function(){return this.filter(Kt)},Je.prototype.find=function(e){return this.filter(e).head()},Je.prototype.findLast=function(e){return this.reverse().find(e)},Je.prototype.invokeMap=Ge(function(e,n){return typeof e=="function"?new Je(this):this.map(function(o){return ho(o,e,n)})}),Je.prototype.reject=function(e){return this.filter(Hs(Ne(e)))},Je.prototype.slice=function(e,n){e=Ye(e);var o=this;return o.__filtered__&&(e>0||n<0)?new Je(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),n!==r&&(n=Ye(n),o=n<0?o.dropRight(-n):o.take(n-e)),o)},Je.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Je.prototype.toArray=function(){return this.take(m)},kn(Je.prototype,function(e,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),y=x[a?"take"+(n=="last"?"Right":""):n],S=a||/^find/.test(n);y&&(x.prototype[n]=function(){var P=this.__wrapped__,F=a?[1]:arguments,V=P instanceof Je,ge=F[0],ve=V||We(P),_e=function(Qe){var et=y.apply(x,Sr([Qe],F));return a&&De?et[0]:et};ve&&o&&typeof ge=="function"&&ge.length!=1&&(V=ve=!1);var De=this.__chain__,Pe=!!this.__actions__.length,Be=S&&!De,qe=V&&!Pe;if(!S&&ve){P=qe?P:new Je(this);var je=e.apply(P,F);return je.__actions__.push({func:Fs,args:[_e],thisArg:r}),new mn(je,De)}return Be&&qe?e.apply(this,F):(je=this.thru(_e),Be?a?je.value()[0]:je.value():je)})}),gn(["pop","push","shift","sort","splice","unshift"],function(e){var n=ps[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);x.prototype[e]=function(){var y=arguments;if(a&&!this.__chain__){var S=this.value();return n.apply(We(S)?S:[],y)}return this[o](function(P){return n.apply(We(P)?P:[],y)})}}),kn(Je.prototype,function(e,n){var o=x[n];if(o){var a=o.name+"";st.call(xi,a)||(xi[a]=[]),xi[a].push({name:n,func:o})}}),xi[Ps(r,Q).name]=[{name:"wrapper",func:r}],Je.prototype.clone=mm,Je.prototype.reverse=ym,Je.prototype.value=wm,x.prototype.at=V2,x.prototype.chain=Z2,x.prototype.commit=K2,x.prototype.next=Q2,x.prototype.plant=X2,x.prototype.reverse=ew,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=tw,x.prototype.first=x.prototype.head,oo&&(x.prototype[oo]=J2),x},wi=Kv();Yr?((Yr.exports=wi)._=wi,Ha._=wi):kt._=wi}).call(Q0)}(Yi,Yi.exports)),Yi.exports}var Zc=J0();function X0(i){const t=an.c(40),{fields:r,onClose:s,queryKey:l,apiPath:g,id:f,steps:c}=i,[b,C]=me.useState(0),[O,L]=me.useState(!1),{data:k,isLoading:E}=mc(g,l,f),{mutateAsync:R,isError:M,error:$,isPending:Q}=Ca(g,l);let X;t[0]!==r?(X=new Set(r.filter(sv).map(ov)),t[0]=r,t[1]=X):X=t[1];let J;t[2]!==X?(J=[...X],t[2]=X,t[3]=J):J=t[3];const se=J;let q;t[4]!==r?(q=r.reduce(iv,{}),t[4]=r,t[5]=q):q=t[5];let ue;t[6]!==r?(ue=r.filter(rv).reduce(tv,{}),t[6]=r,t[7]=ue):ue=t[7];let ne;t[8]!==q||t[9]!==ue?(ne={mode:"uncontrolled",initialValues:q,validate:ue},t[8]=q,t[9]=ue,t[10]=ne):ne=t[10];const ee=Ei.useForm(ne);let fe;t[11]!==k||t[12]!==r||t[13]!==ee?(fe=()=>{if(k){const A=r.reduce((v,p)=>{const _=p.id;return v[_]=Array.isArray(k[_])?k[_]:p.type==="boolean"?k[_]??!1:p.type==="date"?k[_]?new Date(k[_]):"":k[_]??"",v},{});ee.initialize(A),ee.setValues(A)}},t[11]=k,t[12]=r,t[13]=ee,t[14]=fe):fe=t[14];let de;t[15]!==k?(de=[k],t[15]=k,t[16]=de):de=t[16],me.useEffect(fe,de);let ie;t[17]!==ee?(ie=function(v){return D.jsxs(me.Fragment,{children:[(v.type===void 0||v.type=="text")&&D.jsx(j.TextInput,{label:v.column.title,placeholder:v.placeholder??"",...ee.getInputProps(v.id),type:v.id.includes("email")?"email":void 0},ee.key(v.id)),v.type==="number"&&D.jsx(j.NumberInput,{decimalSeparator:",",label:v.column.title,placeholder:v.placeholder??"",...ee.getInputProps(v.id)},ee.key(v.id)),v.type==="date"&&D.jsx(Qo,{label:v.column.title,placeholder:v.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...ee.getInputProps(v.id)},ee.key(v.id)),v.type==="boolean"&&D.jsx(j.Checkbox,{mt:"md",label:v.column.title,...ee.getInputProps(v.id,{type:"checkbox"})},ee.key(v.id)),v.type==="custom"&&v.render&&v.render(ee.getValues(),ee.setValues,L)]},v.id)},t[17]=ee,t[18]=ie):ie=t[18];const Ae=ie;let Ce;t[19]!==M||t[20]!==($==null?void 0:$.message)||t[21]!==($==null?void 0:$.name)?(Ce=M&&D.jsx(j.Alert,{variant:"outline",color:"red",title:($==null?void 0:$.name)??"Fehler aufgetreten",mb:"lg",children:($==null?void 0:$.message)??"Fehler aufgetreten"}),t[19]=M,t[20]=$==null?void 0:$.message,t[21]=$==null?void 0:$.name,t[22]=Ce):Ce=t[22];let U;t[23]!==b||t[24]!==r||t[25]!==ee||t[26]!==O||t[27]!==f||t[28]!==E||t[29]!==Q||t[30]!==M||t[31]!==s||t[32]!==Ae||t[33]!==c||t[34]!==se||t[35]!==R?(U=E?D.jsxs(j.Stack,{gap:"md",children:[D.jsx(j.Skeleton,{height:40}),Array(r.length).fill(0).map(ev),D.jsxs(j.Group,{mt:"md",justify:"end",children:[D.jsx(j.Skeleton,{width:100,height:36}),D.jsx(j.Skeleton,{width:100,height:36})]})]}):D.jsxs("form",{onSubmit:ee.onSubmit(async A=>{await R({...A,id:f}),se.length&&b<se.length-1?M||C(b+1):M||(ee.setInitialValues(A),ee.reset(),s())}),children:[se.length?D.jsx(j.Stepper,{active:b,size:"sm",children:se.map(A=>D.jsx(j.Stepper.Step,{...c&&c[A-1]?{label:c[A-1].label}:{},children:r.filter(v=>v.step===A).map(v=>Ae(v))},A))}):r.map(A=>Ae(A)),!O&&D.jsxs(j.Group,{mt:"md",justify:"end",children:[D.jsx(j.Button,{onClick:()=>se.length?b===0?s():C(b-1):s(),variant:"outline",children:se.length?b===0?"Abbrechen":"Zurück":"Abbrechen"}),D.jsx(j.Button,{type:"submit",loading:Q,children:se.length?b===se.length-1?"Speichern":"Weiter":"Speichern"})]})]}),t[23]=b,t[24]=r,t[25]=ee,t[26]=O,t[27]=f,t[28]=E,t[29]=Q,t[30]=M,t[31]=s,t[32]=Ae,t[33]=c,t[34]=se,t[35]=R,t[36]=U):U=t[36];let I;return t[37]!==U||t[38]!==Ce?(I=D.jsxs(D.Fragment,{children:[Ce,U]}),t[37]=U,t[38]=Ce,t[39]=I):I=t[39],I}function ev(i,t){return D.jsx(j.Skeleton,{height:35},`skeleton-field-${t}`)}function tv(i,t){return i[t.id]=nv,i}function nv(i){return i?null:"Pflichtfeld"}function rv(i){return i.required}function iv(i,t){return i[t.id]=t.type==="boolean"?t.defaultValue??!1:t.defaultValue??"",i}function ov(i){return i.step}function sv(i){return typeof i.step=="number"}function av(i){const t=an.c(28),{queryKey:r,apiPath:s,onClose:l,selectedRecords:g}=i,{mutateAsync:f,isError:c,error:b,isPending:C}=_c(s,r),[O,L]=me.useState(g);let k;t[0]!==l||t[1]!==O.length?(k=()=>{O.length||l()},t[0]=l,t[1]=O.length,t[2]=k):k=t[2];let E;if(t[3]!==l||t[4]!==O?(E=[l,O],t[3]=l,t[4]=O,t[5]=E):E=t[5],me.useEffect(k,E),!O.length){let ue;return t[6]===Symbol.for("react.memo_cache_sentinel")?(ue=D.jsx(D.Fragment,{}),t[6]=ue):ue=t[6],ue}let R;t[7]!==b||t[8]!==c?(R=c&&b.message&&D.jsx(j.Alert,{variant:"outline",color:"red",title:b.name,children:b.message}),t[7]=b,t[8]=c,t[9]=R):R=t[9];let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=D.jsx("br",{}),t[10]=M):M=t[10];let $;t[11]!==g[0].id?($=D.jsxs(j.Text,{children:["Bist du sicher, dass du folgenden Eintrag löschen möchtest?",M,g[0].id]}),t[11]=g[0].id,t[12]=$):$=t[12];let Q;t[13]!==l?(Q=D.jsx(j.Button,{onClick:l,variant:"outline",children:"Abbrechen"}),t[13]=l,t[14]=Q):Q=t[14];let X;t[15]!==f||t[16]!==O[0].id?(X=async()=>{await f(O[0].id),L(ue=>ue.filter(ne=>ne.id!==O[0].id))},t[15]=f,t[16]=O[0].id,t[17]=X):X=t[17];let J;t[18]!==C||t[19]!==X?(J=D.jsx(j.Button,{color:"red",loading:C,onClick:X,children:"Delete"}),t[18]=C,t[19]=X,t[20]=J):J=t[20];let se;t[21]!==Q||t[22]!==J?(se=D.jsxs(j.Group,{mt:"md",justify:"end",children:[Q,J]}),t[21]=Q,t[22]=J,t[23]=se):se=t[23];let q;return t[24]!==R||t[25]!==$||t[26]!==se?(q=D.jsxs(D.Fragment,{children:[R,$,se]}),t[24]=R,t[25]=$,t[26]=se,t[27]=q):q=t[27],q}function Kc(i,t){const r=an.c(8);let s;r[0]!==i||r[1]!==t?(s=()=>{const C=localStorage.getItem(`use_persistent_storage_${t}`);return C?JSON.parse(C):i},r[0]=i,r[1]=t,r[2]=s):s=r[2];const[l,g]=me.useState(s);let f;r[3]!==t?(f=C=>{g(C),localStorage.setItem(`use_persistent_storage_${t}`,JSON.stringify(C))},r[3]=t,r[4]=f):f=r[4];const c=f;let b;return r[5]!==c||r[6]!==l?(b=[l,c],r[5]=c,r[6]=l,r[7]=b):b=r[7],b}const Qc=[10,15,20,50,100,500];function uv(i){const t=an.c(130),{title:r,queryKey:s,connectedQueryKeys:l,apiPath:g,buttons:f,fields:c,selection:b,pagination:C,filters:O,actions:L,steps:k,defaultSort:E,createButtonText:R}=i,{data:M,isLoading:$,isError:Q,isRefetching:X,refetch:J}=yc(g,s);let se;t[0]===Symbol.for("react.memo_cache_sentinel")?(se=[],t[0]=se):se=t[0];const[q,ue]=me.useState(se),{queryClient:ne}=rr();let ee;t[1]!==M||t[2]!==l||t[3]!==O||t[4]!==ne?(ee=()=>{if(!(!M||!Array.isArray(M))){if(l==null||l.forEach(pt=>ne.invalidateQueries({queryKey:pt})),!O||O.length===0){ue(M);return}ue(M.filter(pt=>O.every(Mt=>{const dr=Mt.id;if(Mt.type==="query"&&typeof Mt.value=="string"){const pr=pt[dr];return typeof pr=="string"&&pr.includes(Mt.value)}else if(Mt.type==="date"){if(!Mt.value)return!0;const pr=Mt.value,[gr,ci]=pr;if(gr&&ci){const fi=pt[dr];if(typeof fi=="string"){const hi=new Date(fi);return hi>=gr&&hi<=ci}}return!0}return!0})))}},t[1]=M,t[2]=l,t[3]=O,t[4]=ne,t[5]=ee):ee=t[5];let fe;t[6]!==M||t[7]!==O?(fe=[M,O],t[6]=M,t[7]=O,t[8]=fe):fe=t[8],me.useEffect(ee,fe);const de=(E==null?void 0:E.field)??c[0].id,ie=(E==null?void 0:E.direction)??"desc";let Ae;t[9]!==de||t[10]!==ie?(Ae={columnAccessor:de,direction:ie},t[9]=de,t[10]=ie,t[11]=Ae):Ae=t[11];const[Ce,U]=me.useState(Ae);let I;t[12]!==q||t[13]!==(E==null?void 0:E.direction)||t[14]!==(E==null?void 0:E.field)||t[15]!==c[0]?(I=()=>{const pt=Zc.sortBy(q,(E==null?void 0:E.field)??c[0].id);return(E==null?void 0:E.direction)==="asc"?pt:pt.reverse()},t[12]=q,t[13]=E==null?void 0:E.direction,t[14]=E==null?void 0:E.field,t[15]=c[0],t[16]=I):I=t[16];const[A,v]=me.useState(I);let p;t[17]!==q||t[18]!==Ce.columnAccessor||t[19]!==Ce.direction?(p=()=>{const pt=Zc.sortBy(q,Ce.columnAccessor);v(Ce.direction==="desc"?pt.reverse():pt)},t[17]=q,t[18]=Ce.columnAccessor,t[19]=Ce.direction,t[20]=p):p=t[20];let _;t[21]!==q||t[22]!==Ce?(_=[Ce,q],t[21]=q,t[22]=Ce,t[23]=_):_=t[23],me.useEffect(p,_);const[d,m]=Kc(Qc[1],"mantine-table-page-size"),[T,H]=me.useState(1);let Z;t[24]!==d||t[25]!==C||t[26]!==A?(Z=C?A.slice(0,d):A,t[24]=d,t[25]=C,t[26]=A,t[27]=Z):Z=t[27];const[le,pe]=me.useState(Z);let we;t[28]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{H(1)},t[28]=we):we=t[28];let re;t[29]!==d?(re=[d],t[29]=d,t[30]=re):re=t[30],me.useEffect(we,re);let ce,Oe;t[31]!==T||t[32]!==d||t[33]!==C||t[34]!==A?(ce=()=>{if(C){const pt=(T-1)*d,Mt=pt+d;pe(A.slice(pt,Mt))}else pe(A)},Oe=[T,A,C,d],t[31]=T,t[32]=d,t[33]=C,t[34]=A,t[35]=ce,t[36]=Oe):(ce=t[35],Oe=t[36]),me.useEffect(ce,Oe);let be;t[37]===Symbol.for("react.memo_cache_sentinel")?(be=[],t[37]=be):be=t[37];const[B,Y]=me.useState(be);let W;t[38]!==B||t[39]!==b||t[40]!==A?(W=()=>{b&&Y(A.filter(pt=>B.some(Mt=>Mt.id===pt.id)))},t[38]=B,t[39]=b,t[40]=A,t[41]=W):W=t[41];let K;t[42]!==A?(K=[A],t[42]=A,t[43]=K):K=t[43],me.useEffect(W,K);const[ae,Te]=me.useState(!1),[u,h]=me.useState(!1),[w,N]=me.useState(!1),z=r?"space-between":"end";let te;t[44]!==r?(te=r&&(typeof r=="string"?D.jsx(j.Title,{order:4,children:r}):r),t[44]=r,t[45]=te):te=t[45];let xe;t[46]!==J?(xe=()=>J(),t[46]=J,t[47]=xe):xe=t[47];let Ee;t[48]===Symbol.for("react.memo_cache_sentinel")?(Ee=D.jsx(Mi.IconRefresh,{}),t[48]=Ee):Ee=t[48];let Re;t[49]!==xe?(Re=D.jsx(j.ActionIcon,{variant:"subtle",onClick:xe,"aria-label":"Neuladen",children:Ee}),t[49]=xe,t[50]=Re):Re=t[50];let Se;t[51]!==L||t[52]!==c||t[53]!==B||t[54]!==b?(Se=(c.some(vv)||b)&&D.jsxs(j.Menu,{shadow:"md",children:[D.jsx(j.Menu.Target,{children:D.jsx(j.Button,{variant:"outline",rightSection:D.jsx(Mi.IconCaretDownFilled,{size:14}),disabled:!B.length,children:"Aktionen"})}),D.jsxs(j.Menu.Dropdown,{children:[c.find(gv)&&D.jsx(j.Menu.Item,{leftSection:D.jsx(Mi.IconPencil,{size:14}),onClick:()=>h(!0),disabled:B.length!==1,children:"Bearbeiten"}),(L??[]).map((pt,Mt)=>me.createElement(j.Menu.Item,{...pt.icon&&{leftSection:pt.icon},key:`custom_action_${Mt}`,onClick:()=>pt.onClick(B)},pt.label)),c.find(pv)&&D.jsx(j.Menu.Item,{leftSection:D.jsx(Mi.IconTrash,{size:14}),onClick:()=>N(!0),color:"red",children:"Löschen"})]})]}),t[51]=L,t[52]=c,t[53]=B,t[54]=b,t[55]=Se):Se=t[55];let Le;t[56]!==R||t[57]!==c||t[58]!==$?(Le=c.find(dv)&&D.jsx(j.Button,{onClick:()=>Te(!0),disabled:$,children:R??"Erstellen"}),t[56]=R,t[57]=c,t[58]=$,t[59]=Le):Le=t[59];let $e;t[60]!==f||t[61]!==Re||t[62]!==Se||t[63]!==Le?($e=D.jsxs(j.Group,{align:"center",gap:"xs",children:[Re,Se,Le,f]}),t[60]=f,t[61]=Re,t[62]=Se,t[63]=Le,t[64]=$e):$e=t[64];let ke;t[65]!==z||t[66]!==te||t[67]!==$e?(ke=D.jsxs(j.Group,{gap:"xs",justify:z,align:"center",children:[te,$e]}),t[65]=z,t[66]=te,t[67]=$e,t[68]=ke):ke=t[68];let Ke;t[69]!==Q?(Ke=Q&&D.jsx(j.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:D.jsx(Mi.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),t[69]=Q,t[70]=Ke):Ke=t[70];let He;t[71]!==$||t[72]!==X?(He=($||X)&&D.jsxs(j.Stack,{my:"md",children:[D.jsx(j.Skeleton,{height:40}),Array(5).fill(0).map(hv)]}),t[71]=$,t[72]=X,t[73]=He):He=t[73];let tt;t[74]!==c||t[75]!==Q||t[76]!==$||t[77]!==X||t[78]!==T||t[79]!==d||t[80]!==C||t[81]!==le||t[82]!==B||t[83]!==b||t[84]!==m||t[85]!==Ce||t[86]!==A?(tt=!$&&!X&&D.jsx(Z0,{my:"md",striped:!0,minHeight:150,fetching:Q,records:le,sortStatus:Ce,onSortStatusChange:U,...b&&{selectedRecords:B,onSelectedRecordsChange:Y},...C&&le.length&&{totalRecords:A.length,recordsPerPage:d,onPageChange:H,page:T,recordsPerPageOptions:Qc,onRecordsPerPageChange:m,recordsPerPageLabel:"Einträge pro Seite"},columns:c.map(fv),noRecordsText:"Keine Einträge gefunden"}),t[74]=c,t[75]=Q,t[76]=$,t[77]=X,t[78]=T,t[79]=d,t[80]=C,t[81]=le,t[82]=B,t[83]=b,t[84]=m,t[85]=Ce,t[86]=A,t[87]=tt):tt=t[87];let dt;t[88]===Symbol.for("react.memo_cache_sentinel")?(dt=()=>{h(!1),Y([])},t[88]=dt):dt=t[88];const St=r??"Bearbeiten";let lt;t[89]!==g||t[90]!==c||t[91]!==s||t[92]!==B[0]||t[93]!==B.length||t[94]!==k?(lt=B.length>0&&D.jsx(X0,{fields:c.filter(cv),queryKey:s,apiPath:g,id:B[0].id,onClose:()=>{h(!1),Y([])},steps:k}),t[89]=g,t[90]=c,t[91]=s,t[92]=B[0],t[93]=B.length,t[94]=k,t[95]=lt):lt=t[95];let Ct;t[96]!==St||t[97]!==lt||t[98]!==u?(Ct=D.jsx(j.Modal,{opened:u,onClose:dt,title:St,children:lt}),t[96]=St,t[97]=lt,t[98]=u,t[99]=Ct):Ct=t[99];let Sn;t[100]===Symbol.for("react.memo_cache_sentinel")?(Sn=()=>{N(!1),Y([])},t[100]=Sn):Sn=t[100];const Bn=r??"Löschen";let xt;t[101]!==g||t[102]!==s||t[103]!==B?(xt=B.length>0&&D.jsx(av,{onClose:()=>{N(!1),Y([])},queryKey:s,apiPath:g,selectedRecords:B}),t[101]=g,t[102]=s,t[103]=B,t[104]=xt):xt=t[104];let Qt;t[105]!==w||t[106]!==Bn||t[107]!==xt?(Qt=D.jsx(j.Modal,{opened:w,onClose:Sn,title:Bn,children:xt}),t[105]=w,t[106]=Bn,t[107]=xt,t[108]=Qt):Qt=t[108];let Cn;t[109]===Symbol.for("react.memo_cache_sentinel")?(Cn=()=>{Te(!1)},t[109]=Cn):Cn=t[109];const jn=r??"Anlegen";let Rn;t[110]===Symbol.for("react.memo_cache_sentinel")?(Rn=()=>{Te(!1)},t[110]=Rn):Rn=t[110];let fn;t[111]!==c?(fn=c.filter(lv),t[111]=c,t[112]=fn):fn=t[112];let hn;t[113]!==g||t[114]!==s||t[115]!==k||t[116]!==fn?(hn=D.jsx(e0,{queryKey:s,apiPath:g,onClose:Rn,fields:fn,steps:k}),t[113]=g,t[114]=s,t[115]=k,t[116]=fn,t[117]=hn):hn=t[117];let nt;t[118]!==ae||t[119]!==jn||t[120]!==hn?(nt=D.jsx(j.Modal,{opened:ae,onClose:Cn,title:jn,children:hn}),t[118]=ae,t[119]=jn,t[120]=hn,t[121]=nt):nt=t[121];let qt;return t[122]!==ke||t[123]!==Ke||t[124]!==He||t[125]!==tt||t[126]!==Ct||t[127]!==Qt||t[128]!==nt?(qt=D.jsxs(D.Fragment,{children:[ke,Ke,He,tt,Ct,Qt,nt]}),t[122]=ke,t[123]=Ke,t[124]=He,t[125]=tt,t[126]=Ct,t[127]=Qt,t[128]=nt,t[129]=qt):qt=t[129],qt}function lv(i){return i.create}function cv(i){return i.update}function fv(i){return i.column}function hv(i,t){return D.jsx(j.Skeleton,{height:35},`skeleton-${t}`)}function dv(i){return i.create}function pv(i){return i.delete}function gv(i){return i.update}function vv(i){return i.update}function mv(i){const t=an.c(5),{queryClient:r}=rr();let s;t[0]!==i?(s=D.jsx(uv,{...i}),t[0]=i,t[1]=s):s=t[1];let l;return t[2]!==r||t[3]!==s?(l=D.jsx(xl,{client:r,children:s}),t[2]=r,t[3]=s,t[4]=l):l=t[4],l}ze.DataTable=mv,ze.DataTableProvider=jg,ze.api=zg,ze.createOne=gc,ze.deleteOne=pc,ze.getAll=hc,ze.getApiHeaders=Lr,ze.getOne=dc,ze.updateOne=vc,ze.useAddOne=wc,ze.useDataTable=rr,ze.useDeleteOne=_c,ze.useGetAll=yc,ze.useGetOne=mc,ze.usePersistentState=Kc,ze.useUpdateOne=Ca,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
|
|
144
144
|
//# sourceMappingURL=index.umd.js.map
|