@espresso-lab/mantine-data-table 1.10.0 → 1.10.2

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.umd.js CHANGED
@@ -1,24 +1,24 @@
1
- (function(we,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],Z):(we=typeof globalThis<"u"?globalThis:we||self,Z(we.MantineDataTable={},we.React,we.MantineCore,we.MantineForm,we.TablerIconsReact,we.MantineHooks))})(this,(function(we,Z,O,An,dt,Le){"use strict";function Is(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const Re=Is(Z);function jn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zt={exports:{}},Tr={};var En;function Ys(){if(En)return Tr;En=1;var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Tr.c=function(e){return t.H.useMemoCache(e)},Tr}var Rr={};var Tn;function zs(){return Tn||(Tn=1,process.env.NODE_ENV!=="production"&&(function(){var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Rr.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1
+ (function(be,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("react"),require("@mantine/core"),require("@mantine/form"),require("@tabler/icons-react"),require("@mantine/hooks")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/form","@tabler/icons-react","@mantine/hooks"],Z):(be=typeof globalThis<"u"?globalThis:be||self,Z(be.MantineDataTable={},be.React,be.MantineCore,be.MantineForm,be.TablerIconsReact,be.MantineHooks))})(this,(function(be,Z,O,jn,ct,Le){"use strict";function Ys(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const $e=Ys(Z);function En(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kt={exports:{}},Rr={};var Tn;function zs(){if(Tn)return Rr;Tn=1;var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Rr.c=function(e){return t.H.useMemoCache(e)},Rr}var $r={};var Rn;function Fs(){return Rn||(Rn=1,process.env.NODE_ENV!=="production"&&(function(){var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;$r.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
2
  1. You might have mismatching versions of React and the renderer (such as React DOM)
3
3
  2. You might be breaking the Rules of Hooks
4
4
  3. You might have more than one copy of React in the same app
5
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),Rr}var Rn;function Fs(){return Rn||(Rn=1,process.env.NODE_ENV==="production"?Zt.exports=Ys():Zt.exports=zs()),Zt.exports}var Fe=Fs(),Kt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ws={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Us=class{#t=Ws;#e=!1;setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&this.#e&&t!==this.#t&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#t,provider:t}),this.#t=t,process.env.NODE_ENV!=="production"&&(this.#e=!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},Jt=new Us;function qs(t){setTimeout(t,0)}var $t=typeof window>"u"||"Deno"in globalThis;function Xt(){}function $n(t){return typeof t=="number"&&t>=0&&t!==1/0}function Vs(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Nt(t,e){return typeof t=="function"?t(e):t}function Je(t,e){return typeof t=="function"?t(e):t}function Nn(t){return JSON.stringify(t,(e,r)=>Nr(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}var Hs=Object.prototype.hasOwnProperty;function $r(t,e){if(t===e)return t;const r=Ln(t)&&Ln(e);if(!r&&!(Nr(t)&&Nr(e)))return e;const s=(r?t:Object.keys(t)).length,l=r?e:Object.keys(e),d=l.length,a=r?new Array(d):{};let m=0;for(let y=0;y<d;y++){const _=r?y:l[y],M=t[_],S=e[_];if(M===S){a[_]=M,(r?y<s:Hs.call(t,_))&&m++;continue}if(M===null||S===null||typeof M!="object"||typeof S!="object"){a[_]=S;continue}const C=$r(M,S);a[_]=C,C===M&&m++}return s===d&&m===s?t:a}function er(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ln(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Nr(t){if(!Bn(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Bn(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Bn(t){return Object.prototype.toString.call(t)==="[object Object]"}function In(t,e,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(t,e);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return $r(t,e)}catch(n){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}]: ${n}`),n}return $r(t,e)}return e}function Yn(t,e){return typeof t=="function"?t(...e):!!t}var Gs=class extends Kt{#t;#e;#r;constructor(){super(),this.#r=t=>{if(!$t&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Qs=new Gs;function zn(){let t,e;const r=new Promise((s,l)=>{t=s,e=l});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}var Zs=qs;function Ks(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=Zs;const l=a=>{e?t.push(a):s(()=>{r(a)})},d=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(m=>{r(m)})})})};return{batch:a=>{let m;e++;try{m=a()}finally{e--,e||d()}return m},batchCalls:a=>(...m)=>{l(()=>{a(...m)})},schedule:l,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var tr=Ks(),Js=class extends Kt{#t=!0;#e;#r;constructor(){super(),this.#r=t=>{if(!$t&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},Xs=new Js;function ei(t){return(t??"online")==="online"?Xs.isOnline():!0}function ti(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ei(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}var ri=class extends Kt{constructor(t,e){super(),this.options=e,this.#t=t,this.#a=null,this.#i=zn(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#r=void 0;#n=void 0;#o;#s;#i;#a;#g;#h;#f;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Fn(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lr(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lr(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Je(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#e.setOptions(this.options),e._defaulted&&!er(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&Wn(this.#e,r,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#e!==r||Je(this.options.enabled,this.#e)!==Je(e.enabled,this.#e)||Nt(this.options.staleTime,this.#e)!==Nt(e.staleTime,this.#e))&&this.#m();const s=this.#y();n&&(this.#e!==r||Je(this.options.enabled,this.#e)!==Je(e.enabled,this.#e)||s!==this.#l)&&this.#v(s)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return oi(this,r)&&(this.#n=r,this.#s=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#x();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Xt)),e}#m(){this.#w();const t=Nt(this.options.staleTime,this.#e);if($t||this.#n.isStale||!$n(t))return;const r=Vs(this.#n.dataUpdatedAt,t)+1;this.#u=Jt.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#l=t,!($t||Je(this.options.enabled,this.#e)===!1||!$n(this.#l)||this.#l===0)&&(this.#c=Jt.setInterval(()=>{(this.options.refetchIntervalInBackground||Qs.isFocused())&&this.#d()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#u&&(Jt.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Jt.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const r=this.#e,n=this.options,s=this.#n,l=this.#o,d=this.#s,m=t!==r?t.state:this.#r,{state:y}=t;let _={...y},M=!1,S;if(e._optimisticResults){const K=this.hasListeners(),V=!K&&Fn(t,e),U=K&&Wn(t,r,e,n);(V||U)&&(_={..._,...ti(y.data,t.options)}),e._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:A}=_;S=_.data;let N=!1;if(e.placeholderData!==void 0&&S===void 0&&A==="pending"){let K;s?.isPlaceholderData&&e.placeholderData===d?.placeholderData?(K=s.data,N=!0):K=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,K!==void 0&&(A="success",S=In(s?.data,K,e),M=!0)}if(e.select&&S!==void 0&&!N)if(s&&S===l?.data&&e.select===this.#g)S=this.#h;else try{this.#g=e.select,S=e.select(S),S=In(s?.data,S,e),this.#h=S,this.#a=null}catch(K){this.#a=K}this.#a&&(C=this.#a,S=this.#h,k=Date.now(),A="error");const F=_.fetchStatus==="fetching",B=A==="pending",H=A==="error",W=B&&F,te=S!==void 0,G={status:A,fetchStatus:_.fetchStatus,isPending:B,isSuccess:A==="success",isError:H,isInitialLoading:W,isLoading:W,data:S,dataUpdatedAt:_.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>m.dataUpdateCount||_.errorUpdateCount>m.errorUpdateCount,isFetching:F,isRefetching:F&&!B,isLoadingError:H&&!te,isPaused:_.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:H&&te,isStale:Br(t,e),refetch:this.refetch,promise:this.#i,isEnabled:Je(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=J=>{G.status==="error"?J.reject(G.error):G.data!==void 0&&J.resolve(G.data)},V=()=>{const J=this.#i=G.promise=zn();K(J)},U=this.#i;switch(U.status){case"pending":t.queryHash===r.queryHash&&K(U);break;case"fulfilled":(G.status==="error"||G.data!==U.value)&&V();break;case"rejected":(G.status!=="error"||G.error!==U.reason)&&V();break}}return G}updateResult(){const t=this.#n,e=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#s=this.options,this.#o.data!==void 0&&(this.#f=this.#e),er(e,t))return;this.#n=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#n).some(d=>{const a=d;return this.#n[a]!==t[a]&&l.has(a)})};this.#C({listeners:r()})}#x(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){tr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ni(t,e){return Je(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Fn(t,e){return ni(t,e)||t.state.data!==void 0&&Lr(t,e,e.refetchOnMount)}function Lr(t,e,r){if(Je(e.enabled,t)!==!1&&Nt(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&Br(t,e)}return!1}function Wn(t,e,r,n){return(t!==e||Je(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Br(t,r)}function Br(t,e){return Je(e.enabled,t)!==!1&&t.isStaleByTime(Nt(e.staleTime,t))}function oi(t,e){return!er(t.getCurrentResult(),e)}function si(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ii=class extends Kt{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),er(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&Nn(e.mutationKey)!==Nn(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#s()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){const t=this.#r?.state??si();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){tr.batch(()=>{if(this.#n&&this.hasListeners()){const e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#n.onSuccess?.(t.data,e,r,n),this.#n.onSettled?.(t.data,null,e,r,n)):t?.type==="error"&&(this.#n.onError?.(t.error,e,r,n),this.#n.onSettled?.(void 0,t.error,e,r,n))}this.listeners.forEach(e=>{e(this.#e)})})}},rr={exports:{}},Lt={};var Un;function ai(){if(Un)return Lt;Un=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,l){var d=null;if(l!==void 0&&(d=""+l),s.key!==void 0&&(d=""+s.key),"key"in s){l={};for(var a in s)a!=="key"&&(l[a]=s[a])}else l=s;return s=l.ref,{$$typeof:t,type:n,key:d,ref:s!==void 0?s:null,props:l}}return Lt.Fragment=e,Lt.jsx=r,Lt.jsxs=r,Lt}var Bt={};var qn;function li(){return qn||(qn=1,process.env.NODE_ENV!=="production"&&(function(){function t(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===J?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case N:return"Fragment";case B:return"Profiler";case F:return"StrictMode";case oe:return"Suspense";case G:return"SuspenseList";case U:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case A:return"Portal";case W:return c.displayName||"Context";case H:return(c._context.displayName||"Context")+".Consumer";case te:var v=c.render;return c=c.displayName,c||(c=v.displayName||v.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case K:return v=c.displayName||null,v!==null?v:t(c.type)||"Memo";case V:v=c._payload,c=c._init;try{return t(c(v))}catch{}}return null}function e(c){return""+c}function r(c){try{e(c);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),e(c)}}function n(c){if(c===N)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===V)return"<...>";try{var v=t(c);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function s(){var c=se.A;return c===null?null:c.getOwner()}function l(){return Error("react-stack-top-frame")}function d(c){if(ne.call(c,"key")){var v=Object.getOwnPropertyDescriptor(c,"key").get;if(v&&v.isReactWarning)return!1}return c.key!==void 0}function a(c,v){function D(){w||(w=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(c,"key",{get:D,configurable:!0})}function m(){var c=t(this.type);return h[c]||(h[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function y(c,v,D,T,q,X){var re=D.ref;return c={$$typeof:k,type:c,key:v,props:D,_owner:T},(re!==void 0?re:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:m}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function _(c,v,D,T,q,X){var re=v.children;if(re!==void 0)if(T)if(P(re)){for(T=0;T<re.length;T++)M(re[T]);Object.freeze&&Object.freeze(re)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(re);if(ne.call(v,"key")){re=t(c);var ee=Object.keys(v).filter(function(ie){return ie!=="key"});T=0<ee.length?"{key: someKey, "+ee.join(": ..., ")+": ...}":"{key: someKey}",f[re+T]||(ee=0<ee.length?"{"+ee.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
5
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),$r}var $n;function Ws(){return $n||($n=1,process.env.NODE_ENV==="production"?Kt.exports=zs():Kt.exports=Fs()),Kt.exports}var Fe=Ws(),Jt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Us={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},qs=class{#t=Us;#e=!1;setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&this.#e&&t!==this.#t&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#t,provider:t}),this.#t=t,process.env.NODE_ENV!=="production"&&(this.#e=!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},Xt=new qs;function Vs(t){setTimeout(t,0)}var $t=typeof window>"u"||"Deno"in globalThis;function er(){}function Nn(t){return typeof t=="number"&&t>=0&&t!==1/0}function Hs(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Nt(t,e){return typeof t=="function"?t(e):t}function Ke(t,e){return typeof t=="function"?t(e):t}function Ln(t){return JSON.stringify(t,(e,r)=>Lr(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}var Gs=Object.prototype.hasOwnProperty;function Nr(t,e){if(t===e)return t;const r=Bn(t)&&Bn(e);if(!r&&!(Lr(t)&&Lr(e)))return e;const s=(r?t:Object.keys(t)).length,l=r?e:Object.keys(e),c=l.length,a=r?new Array(c):{};let m=0;for(let y=0;y<c;y++){const _=r?y:l[y],M=t[_],S=e[_];if(M===S){a[_]=M,(r?y<s:Gs.call(t,_))&&m++;continue}if(M===null||S===null||typeof M!="object"||typeof S!="object"){a[_]=S;continue}const C=Nr(M,S);a[_]=C,C===M&&m++}return s===c&&m===s?t:a}function tr(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Bn(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Lr(t){if(!In(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!In(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function In(t){return Object.prototype.toString.call(t)==="[object Object]"}function Yn(t,e,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(t,e);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Nr(t,e)}catch(n){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}]: ${n}`),n}return Nr(t,e)}return e}function zn(t,e){return typeof t=="function"?t(...e):!!t}var Qs=class extends Jt{#t;#e;#r;constructor(){super(),this.#r=t=>{if(!$t&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Zs=new Qs;function Fn(){let t,e;const r=new Promise((s,l)=>{t=s,e=l});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}var Ks=Vs;function Js(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=Ks;const l=a=>{e?t.push(a):s(()=>{r(a)})},c=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(m=>{r(m)})})})};return{batch:a=>{let m;e++;try{m=a()}finally{e--,e||c()}return m},batchCalls:a=>(...m)=>{l(()=>{a(...m)})},schedule:l,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var rr=Js(),Xs=class extends Jt{#t=!0;#e;#r;constructor(){super(),this.#r=t=>{if(!$t&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#r=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},ei=new Xs;function ti(t){return(t??"online")==="online"?ei.isOnline():!0}function ri(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ti(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}var ni=class extends Jt{constructor(t,e){super(),this.options=e,this.#t=t,this.#a=null,this.#i=Fn(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#r=void 0;#n=void 0;#o;#s;#i;#a;#g;#h;#f;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Wn(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Br(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Br(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#_(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#e.setOptions(this.options),e._defaulted&&!tr(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&Un(this.#e,r,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#e!==r||Ke(this.options.enabled,this.#e)!==Ke(e.enabled,this.#e)||Nt(this.options.staleTime,this.#e)!==Nt(e.staleTime,this.#e))&&this.#m();const s=this.#y();n&&(this.#e!==r||Ke(this.options.enabled,this.#e)!==Ke(e.enabled,this.#e)||s!==this.#l)&&this.#v(s)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(e,t);return si(this,r)&&(this.#n=r,this.#s=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#x();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(er)),e}#m(){this.#w();const t=Nt(this.options.staleTime,this.#e);if($t||this.#n.isStale||!Nn(t))return;const r=Hs(this.#n.dataUpdatedAt,t)+1;this.#u=Xt.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#_(),this.#l=t,!($t||Ke(this.options.enabled,this.#e)===!1||!Nn(this.#l)||this.#l===0)&&(this.#c=Xt.setInterval(()=>{(this.options.refetchIntervalInBackground||Zs.isFocused())&&this.#d()},this.#l))}#b(){this.#m(),this.#v(this.#y())}#w(){this.#u&&(Xt.clearTimeout(this.#u),this.#u=void 0)}#_(){this.#c&&(Xt.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const r=this.#e,n=this.options,s=this.#n,l=this.#o,c=this.#s,m=t!==r?t.state:this.#r,{state:y}=t;let _={...y},M=!1,S;if(e._optimisticResults){const K=this.hasListeners(),V=!K&&Wn(t,e),U=K&&Un(t,r,e,n);(V||U)&&(_={..._,...ri(y.data,t.options)}),e._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:A}=_;S=_.data;let N=!1;if(e.placeholderData!==void 0&&S===void 0&&A==="pending"){let K;s?.isPlaceholderData&&e.placeholderData===c?.placeholderData?(K=s.data,N=!0):K=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,K!==void 0&&(A="success",S=Yn(s?.data,K,e),M=!0)}if(e.select&&S!==void 0&&!N)if(s&&S===l?.data&&e.select===this.#g)S=this.#h;else try{this.#g=e.select,S=e.select(S),S=Yn(s?.data,S,e),this.#h=S,this.#a=null}catch(K){this.#a=K}this.#a&&(C=this.#a,S=this.#h,k=Date.now(),A="error");const F=_.fetchStatus==="fetching",B=A==="pending",H=A==="error",W=B&&F,te=S!==void 0,G={status:A,fetchStatus:_.fetchStatus,isPending:B,isSuccess:A==="success",isError:H,isInitialLoading:W,isLoading:W,data:S,dataUpdatedAt:_.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>m.dataUpdateCount||_.errorUpdateCount>m.errorUpdateCount,isFetching:F,isRefetching:F&&!B,isLoadingError:H&&!te,isPaused:_.fetchStatus==="paused",isPlaceholderData:M,isRefetchError:H&&te,isStale:Ir(t,e),refetch:this.refetch,promise:this.#i,isEnabled:Ke(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=J=>{G.status==="error"?J.reject(G.error):G.data!==void 0&&J.resolve(G.data)},V=()=>{const J=this.#i=G.promise=Fn();K(J)},U=this.#i;switch(U.status){case"pending":t.queryHash===r.queryHash&&K(U);break;case"fulfilled":(G.status==="error"||G.data!==U.value)&&V();break;case"rejected":(G.status!=="error"||G.error!==U.reason)&&V();break}}return G}updateResult(){const t=this.#n,e=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#s=this.options,this.#o.data!==void 0&&(this.#f=this.#e),tr(e,t))return;this.#n=e;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#n).some(c=>{const a=c;return this.#n[a]!==t[a]&&l.has(a)})};this.#C({listeners:r()})}#x(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#r=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){rr.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function oi(t,e){return Ke(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Wn(t,e){return oi(t,e)||t.state.data!==void 0&&Br(t,e,e.refetchOnMount)}function Br(t,e,r){if(Ke(e.enabled,t)!==!1&&Nt(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&Ir(t,e)}return!1}function Un(t,e,r,n){return(t!==e||Ke(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Ir(t,r)}function Ir(t,e){return Ke(e.enabled,t)!==!1&&t.isStaleByTime(Nt(e.staleTime,t))}function si(t,e){return!tr(t.getCurrentResult(),e)}function ii(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ai=class extends Jt{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),tr(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&Ln(e.mutationKey)!==Ln(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#s()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){const t=this.#r?.state??ii();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){rr.batch(()=>{if(this.#n&&this.hasListeners()){const e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#n.onSuccess?.(t.data,e,r,n),this.#n.onSettled?.(t.data,null,e,r,n)):t?.type==="error"&&(this.#n.onError?.(t.error,e,r,n),this.#n.onSettled?.(void 0,t.error,e,r,n))}this.listeners.forEach(e=>{e(this.#e)})})}},nr={exports:{}},Lt={};var qn;function li(){if(qn)return Lt;qn=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var a in s)a!=="key"&&(l[a]=s[a])}else l=s;return s=l.ref,{$$typeof:t,type:n,key:c,ref:s!==void 0?s:null,props:l}}return Lt.Fragment=e,Lt.jsx=r,Lt.jsxs=r,Lt}var Bt={};var Vn;function ui(){return Vn||(Vn=1,process.env.NODE_ENV!=="production"&&(function(){function t(d){if(d==null)return null;if(typeof d=="function")return d.$$typeof===J?null:d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case N:return"Fragment";case B:return"Profiler";case F:return"StrictMode";case oe:return"Suspense";case G:return"SuspenseList";case U:return"Activity"}if(typeof d=="object")switch(typeof d.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),d.$$typeof){case A:return"Portal";case W:return d.displayName||"Context";case H:return(d._context.displayName||"Context")+".Consumer";case te:var v=d.render;return d=d.displayName,d||(d=v.displayName||v.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case K:return v=d.displayName||null,v!==null?v:t(d.type)||"Memo";case V:v=d._payload,d=d._init;try{return t(d(v))}catch{}}return null}function e(d){return""+d}function r(d){try{e(d);var v=!1}catch{v=!0}if(v){v=console;var D=v.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&d[Symbol.toStringTag]||d.constructor.name||"Object";return D.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),e(d)}}function n(d){if(d===N)return"<>";if(typeof d=="object"&&d!==null&&d.$$typeof===V)return"<...>";try{var v=t(d);return v?"<"+v+">":"<...>"}catch{return"<...>"}}function s(){var d=se.A;return d===null?null:d.getOwner()}function l(){return Error("react-stack-top-frame")}function c(d){if(ne.call(d,"key")){var v=Object.getOwnPropertyDescriptor(d,"key").get;if(v&&v.isReactWarning)return!1}return d.key!==void 0}function a(d,v){function D(){w||(w=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}D.isReactWarning=!0,Object.defineProperty(d,"key",{get:D,configurable:!0})}function m(){var d=t(this.type);return h[d]||(h[d]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),d=this.props.ref,d!==void 0?d:null}function y(d,v,D,T,q,X){var re=D.ref;return d={$$typeof:k,type:d,key:v,props:D,_owner:T},(re!==void 0?re:null)!==null?Object.defineProperty(d,"ref",{enumerable:!1,get:m}):Object.defineProperty(d,"ref",{enumerable:!1,value:null}),d._store={},Object.defineProperty(d._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(d,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(d,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(d,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.freeze&&(Object.freeze(d.props),Object.freeze(d)),d}function _(d,v,D,T,q,X){var re=v.children;if(re!==void 0)if(T)if(P(re)){for(T=0;T<re.length;T++)M(re[T]);Object.freeze&&Object.freeze(re)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(re);if(ne.call(v,"key")){re=t(d);var ee=Object.keys(v).filter(function(ie){return ie!=="key"});T=0<ee.length?"{key: someKey, "+ee.join(": ..., ")+": ...}":"{key: someKey}",f[re+T]||(ee=0<ee.length?"{"+ee.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
6
6
  let props = %s;
7
7
  <%s {...props} />
8
8
  React keys must be passed directly to JSX without using spread:
9
9
  let props = %s;
10
- <%s key={someKey} {...props} />`,T,re,ee,re),f[re+T]=!0)}if(re=null,D!==void 0&&(r(D),re=""+D),d(v)&&(r(v.key),re=""+v.key),"key"in v){D={};for(var ae in v)ae!=="key"&&(D[ae]=v[ae])}else D=v;return re&&a(D,typeof c=="function"?c.displayName||c.name||"Unknown":c),y(c,re,D,s(),q,X)}function M(c){S(c)?c._store&&(c._store.validated=1):typeof c=="object"&&c!==null&&c.$$typeof===V&&(c._payload.status==="fulfilled"?S(c._payload.value)&&c._payload.value._store&&(c._payload.value._store.validated=1):c._store&&(c._store.validated=1))}function S(c){return typeof c=="object"&&c!==null&&c.$$typeof===k}var C=Z,k=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),W=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),se=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=Object.prototype.hasOwnProperty,P=Array.isArray,x=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(c){return c()}};var w,h={},i=C.react_stack_bottom_frame.bind(C,l)(),p=x(n(l)),f={};Bt.Fragment=N,Bt.jsx=function(c,v,D){var T=1e4>se.recentlyCreatedOwnerStacks++;return _(c,v,D,!1,T?Error("react-stack-top-frame"):i,T?x(n(c)):p)},Bt.jsxs=function(c,v,D){var T=1e4>se.recentlyCreatedOwnerStacks++;return _(c,v,D,!0,T?Error("react-stack-top-frame"):i,T?x(n(c)):p)}})()),Bt}var Vn;function ui(){return Vn||(Vn=1,process.env.NODE_ENV==="production"?rr.exports=ai():rr.exports=li()),rr.exports}var b=ui(),Hn=Re.createContext(void 0),Gn=t=>{const e=Re.useContext(Hn);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Qn=({client:t,children:e})=>(Re.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),b.jsx(Hn.Provider,{value:t,children:e})),Zn=Re.createContext(!1),ci=()=>Re.useContext(Zn);Zn.Provider;function di(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var hi=Re.createContext(di()),fi=()=>Re.useContext(hi),pi=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},gi=t=>{Re.useEffect(()=>{t.clearReset()},[t])},mi=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(s&&t.data===void 0||Yn(r,[t.error,n])),yi=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},vi=(t,e)=>t.isLoading&&t.isFetching&&!e,bi=(t,e)=>t?.suspense&&e.isPending,Kn=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function wi(t,e,r){if(process.env.NODE_ENV!=="production"&&(typeof t!="object"||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=ci(),s=fi(),l=Gn(),d=l.defaultQueryOptions(t);l.getDefaultOptions().queries?._experimental_beforeQuery?.(d),process.env.NODE_ENV!=="production"&&(d.queryFn||console.error(`[${d.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),d._optimisticResults=n?"isRestoring":"optimistic",yi(d),pi(d,s),gi(s);const a=!l.getQueryCache().get(d.queryHash),[m]=Re.useState(()=>new e(l,d)),y=m.getOptimisticResult(d),_=!n&&t.subscribed!==!1;if(Re.useSyncExternalStore(Re.useCallback(M=>{const S=_?m.subscribe(tr.batchCalls(M)):Xt;return m.updateResult(),S},[m,_]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),Re.useEffect(()=>{m.setOptions(d)},[d,m]),bi(d,y))throw Kn(d,m,s);if(mi({result:y,errorResetBoundary:s,throwOnError:d.throwOnError,query:l.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw y.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(d,y),d.experimental_prefetchInRender&&!$t&&vi(y,n)&&(a?Kn(d,m,s):l.getQueryCache().get(d.queryHash)?.promise)?.catch(Xt).finally(()=>{m.updateResult()}),d.notifyOnChangeProps?y:m.trackResult(y)}function Jn(t,e){return wi(t,ri)}function Ir(t,e){const r=Gn(),[n]=Re.useState(()=>new ii(r,t));Re.useEffect(()=>{n.setOptions(t)},[n,t]);const s=Re.useSyncExternalStore(Re.useCallback(d=>n.subscribe(tr.batchCalls(d)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=Re.useCallback((d,a)=>{n.mutate(d,a).catch(Xt)},[n]);if(s.error&&Yn(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var Xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yr(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var zr={exports:{}},It={};var eo;function _i(){if(eo)return It;eo=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,l){var d=null;if(l!==void 0&&(d=""+l),s.key!==void 0&&(d=""+s.key),"key"in s){l={};for(var a in s)a!=="key"&&(l[a]=s[a])}else l=s;return s=l.ref,{$$typeof:t,type:n,key:d,ref:s!==void 0?s:null,props:l}}return It.Fragment=e,It.jsx=r,It.jsxs=r,It}var nr={};var to;function xi(){return to||(to=1,process.env.NODE_ENV!=="production"&&(function(){function t(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===U?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case A:return"Fragment";case F:return"Profiler";case N:return"StrictMode";case te:return"Suspense";case oe:return"SuspenseList";case V:return"Activity"}if(typeof f=="object")switch(typeof f.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case k:return"Portal";case H:return(f.displayName||"Context")+".Provider";case B:return(f._context.displayName||"Context")+".Consumer";case W:var c=f.render;return f=f.displayName,f||(f=c.displayName||c.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case G:return c=f.displayName||null,c!==null?c:t(f.type)||"Memo";case K:c=f._payload,f=f._init;try{return t(f(c))}catch{}}return null}function e(f){return""+f}function r(f){try{e(f);var c=!1}catch{c=!0}if(c){c=console;var v=c.error,D=typeof Symbol=="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return v.call(c,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",D),e(f)}}function n(f){if(f===A)return"<>";if(typeof f=="object"&&f!==null&&f.$$typeof===K)return"<...>";try{var c=t(f);return c?"<"+c+">":"<...>"}catch{return"<...>"}}function s(){var f=J.A;return f===null?null:f.getOwner()}function l(){return Error("react-stack-top-frame")}function d(f){if(se.call(f,"key")){var c=Object.getOwnPropertyDescriptor(f,"key").get;if(c&&c.isReactWarning)return!1}return f.key!==void 0}function a(f,c){function v(){x||(x=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",c))}v.isReactWarning=!0,Object.defineProperty(f,"key",{get:v,configurable:!0})}function m(){var f=t(this.type);return w[f]||(w[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function y(f,c,v,D,T,q,X,re){return v=q.ref,f={$$typeof:C,type:f,key:c,props:q,_owner:T},(v!==void 0?v:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:m}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function _(f,c,v,D,T,q,X,re){var ee=c.children;if(ee!==void 0)if(D)if(ne(ee)){for(D=0;D<ee.length;D++)M(ee[D]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(ee);if(se.call(c,"key")){ee=t(f);var ae=Object.keys(c).filter(function(ue){return ue!=="key"});D=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",p[ee+D]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
10
+ <%s key={someKey} {...props} />`,T,re,ee,re),f[re+T]=!0)}if(re=null,D!==void 0&&(r(D),re=""+D),c(v)&&(r(v.key),re=""+v.key),"key"in v){D={};for(var ae in v)ae!=="key"&&(D[ae]=v[ae])}else D=v;return re&&a(D,typeof d=="function"?d.displayName||d.name||"Unknown":d),y(d,re,D,s(),q,X)}function M(d){S(d)?d._store&&(d._store.validated=1):typeof d=="object"&&d!==null&&d.$$typeof===V&&(d._payload.status==="fulfilled"?S(d._payload.value)&&d._payload.value._store&&(d._payload.value._store.validated=1):d._store&&(d._store.validated=1))}function S(d){return typeof d=="object"&&d!==null&&d.$$typeof===k}var C=Z,k=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),W=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),se=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=Object.prototype.hasOwnProperty,P=Array.isArray,x=console.createTask?console.createTask:function(){return null};C={react_stack_bottom_frame:function(d){return d()}};var w,h={},i=C.react_stack_bottom_frame.bind(C,l)(),p=x(n(l)),f={};Bt.Fragment=N,Bt.jsx=function(d,v,D){var T=1e4>se.recentlyCreatedOwnerStacks++;return _(d,v,D,!1,T?Error("react-stack-top-frame"):i,T?x(n(d)):p)},Bt.jsxs=function(d,v,D){var T=1e4>se.recentlyCreatedOwnerStacks++;return _(d,v,D,!0,T?Error("react-stack-top-frame"):i,T?x(n(d)):p)}})()),Bt}var Hn;function ci(){return Hn||(Hn=1,process.env.NODE_ENV==="production"?nr.exports=li():nr.exports=ui()),nr.exports}var b=ci(),Gn=$e.createContext(void 0),Qn=t=>{const e=$e.useContext(Gn);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Zn=({client:t,children:e})=>($e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),b.jsx(Gn.Provider,{value:t,children:e})),Kn=$e.createContext(!1),di=()=>$e.useContext(Kn);Kn.Provider;function hi(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var fi=$e.createContext(hi()),pi=()=>$e.useContext(fi),gi=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},mi=t=>{$e.useEffect(()=>{t.clearReset()},[t])},yi=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(s&&t.data===void 0||zn(r,[t.error,n])),vi=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},bi=(t,e)=>t.isLoading&&t.isFetching&&!e,wi=(t,e)=>t?.suspense&&e.isPending,Jn=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function _i(t,e,r){if(process.env.NODE_ENV!=="production"&&(typeof t!="object"||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=di(),s=pi(),l=Qn(),c=l.defaultQueryOptions(t);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c),process.env.NODE_ENV!=="production"&&(c.queryFn||console.error(`[${c.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),c._optimisticResults=n?"isRestoring":"optimistic",vi(c),gi(c,s),mi(s);const a=!l.getQueryCache().get(c.queryHash),[m]=$e.useState(()=>new e(l,c)),y=m.getOptimisticResult(c),_=!n&&t.subscribed!==!1;if($e.useSyncExternalStore($e.useCallback(M=>{const S=_?m.subscribe(rr.batchCalls(M)):er;return m.updateResult(),S},[m,_]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),$e.useEffect(()=>{m.setOptions(c)},[c,m]),wi(c,y))throw Jn(c,m,s);if(yi({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:l.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw y.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,y),c.experimental_prefetchInRender&&!$t&&bi(y,n)&&(a?Jn(c,m,s):l.getQueryCache().get(c.queryHash)?.promise)?.catch(er).finally(()=>{m.updateResult()}),c.notifyOnChangeProps?y:m.trackResult(y)}function Xn(t,e){return _i(t,ni)}function Yr(t,e){const r=Qn(),[n]=$e.useState(()=>new ai(r,t));$e.useEffect(()=>{n.setOptions(t)},[n,t]);const s=$e.useSyncExternalStore($e.useCallback(c=>n.subscribe(rr.batchCalls(c)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=$e.useCallback((c,a)=>{n.mutate(c,a).catch(er)},[n]);if(s.error&&zn(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zr(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Fr={exports:{}},It={};var to;function xi(){if(to)return It;to=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var a in s)a!=="key"&&(l[a]=s[a])}else l=s;return s=l.ref,{$$typeof:t,type:n,key:c,ref:s!==void 0?s:null,props:l}}return It.Fragment=e,It.jsx=r,It.jsxs=r,It}var or={};var ro;function Ci(){return ro||(ro=1,process.env.NODE_ENV!=="production"&&(function(){function t(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===U?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case A:return"Fragment";case F:return"Profiler";case N:return"StrictMode";case te:return"Suspense";case oe:return"SuspenseList";case V:return"Activity"}if(typeof f=="object")switch(typeof f.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case k:return"Portal";case H:return(f.displayName||"Context")+".Provider";case B:return(f._context.displayName||"Context")+".Consumer";case W:var d=f.render;return f=f.displayName,f||(f=d.displayName||d.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case G:return d=f.displayName||null,d!==null?d:t(f.type)||"Memo";case K:d=f._payload,f=f._init;try{return t(f(d))}catch{}}return null}function e(f){return""+f}function r(f){try{e(f);var d=!1}catch{d=!0}if(d){d=console;var v=d.error,D=typeof Symbol=="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return v.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",D),e(f)}}function n(f){if(f===A)return"<>";if(typeof f=="object"&&f!==null&&f.$$typeof===K)return"<...>";try{var d=t(f);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function s(){var f=J.A;return f===null?null:f.getOwner()}function l(){return Error("react-stack-top-frame")}function c(f){if(se.call(f,"key")){var d=Object.getOwnPropertyDescriptor(f,"key").get;if(d&&d.isReactWarning)return!1}return f.key!==void 0}function a(f,d){function v(){x||(x=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}v.isReactWarning=!0,Object.defineProperty(f,"key",{get:v,configurable:!0})}function m(){var f=t(this.type);return w[f]||(w[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function y(f,d,v,D,T,q,X,re){return v=q.ref,f={$$typeof:C,type:f,key:d,props:q,_owner:T},(v!==void 0?v:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:m}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function _(f,d,v,D,T,q,X,re){var ee=d.children;if(ee!==void 0)if(D)if(ne(ee)){for(D=0;D<ee.length;D++)M(ee[D]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(ee);if(se.call(d,"key")){ee=t(f);var ae=Object.keys(d).filter(function(ue){return ue!=="key"});D=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",p[ee+D]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
11
11
  let props = %s;
12
12
  <%s {...props} />
13
13
  React keys must be passed directly to JSX without using spread:
14
14
  let props = %s;
15
- <%s key={someKey} {...props} />`,D,ee,ae,ee),p[ee+D]=!0)}if(ee=null,v!==void 0&&(r(v),ee=""+v),d(c)&&(r(c.key),ee=""+c.key),"key"in c){v={};for(var ie in c)ie!=="key"&&(v[ie]=c[ie])}else v=c;return ee&&a(v,typeof f=="function"?f.displayName||f.name||"Unknown":f),y(f,ee,q,T,s(),v,X,re)}function M(f){typeof f=="object"&&f!==null&&f.$$typeof===C&&f._store&&(f._store.validated=1)}var S=Z,C=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),H=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),J=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ne=Array.isArray,P=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(f){return f()}};var x,w={},h=S.react_stack_bottom_frame.bind(S,l)(),i=P(n(l)),p={};nr.Fragment=A,nr.jsx=function(f,c,v,D,T){var q=1e4>J.recentlyCreatedOwnerStacks++;return _(f,c,v,!1,D,T,q?Error("react-stack-top-frame"):h,q?P(n(f)):i)},nr.jsxs=function(f,c,v,D,T){var q=1e4>J.recentlyCreatedOwnerStacks++;return _(f,c,v,!0,D,T,q?Error("react-stack-top-frame"):h,q?P(n(f)):i)}})()),nr}var ro;function Ci(){return ro||(ro=1,process.env.NODE_ENV==="production"?zr.exports=_i():zr.exports=xi()),zr.exports}Ci();var Fr={exports:{}},Wr={};var no;function Si(){if(no)return Wr;no=1;var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Wr.c=function(e){return t.H.useMemoCache(e)},Wr}var oo={};var so;function Di(){return so||(so=1,process.env.NODE_ENV!=="production"&&(function(){var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;oo.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
15
+ <%s key={someKey} {...props} />`,D,ee,ae,ee),p[ee+D]=!0)}if(ee=null,v!==void 0&&(r(v),ee=""+v),c(d)&&(r(d.key),ee=""+d.key),"key"in d){v={};for(var ie in d)ie!=="key"&&(v[ie]=d[ie])}else v=d;return ee&&a(v,typeof f=="function"?f.displayName||f.name||"Unknown":f),y(f,ee,q,T,s(),v,X,re)}function M(f){typeof f=="object"&&f!==null&&f.$$typeof===C&&f._store&&(f._store.validated=1)}var S=Z,C=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),H=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),J=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ne=Array.isArray,P=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(f){return f()}};var x,w={},h=S.react_stack_bottom_frame.bind(S,l)(),i=P(n(l)),p={};or.Fragment=A,or.jsx=function(f,d,v,D,T){var q=1e4>J.recentlyCreatedOwnerStacks++;return _(f,d,v,!1,D,T,q?Error("react-stack-top-frame"):h,q?P(n(f)):i)},or.jsxs=function(f,d,v,D,T){var q=1e4>J.recentlyCreatedOwnerStacks++;return _(f,d,v,!0,D,T,q?Error("react-stack-top-frame"):h,q?P(n(f)):i)}})()),or}var no;function Si(){return no||(no=1,process.env.NODE_ENV==="production"?Fr.exports=xi():Fr.exports=Ci()),Fr.exports}Si();var Wr={exports:{}},Ur={};var oo;function Di(){if(oo)return Ur;oo=1;var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ur.c=function(e){return t.H.useMemoCache(e)},Ur}var so={};var io;function ki(){return io||(io=1,process.env.NODE_ENV!=="production"&&(function(){var t=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;so.c=function(e){var r=t.H;return r===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
16
16
  1. You might have mismatching versions of React and the renderer (such as React DOM)
17
17
  2. You might be breaking the Rules of Hooks
18
18
  3. You might have more than one copy of React in the same app
19
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),oo}var io;function ki(){return io||(io=1,process.env.NODE_ENV==="production"?Fr.exports=Si():Fr.exports=Di()),Fr.exports}ki();var ao={},Yt={},lo;function Pi(){if(lo)return Yt;lo=1,Yt.byteLength=a,Yt.toByteArray=y,Yt.fromByteArray=S;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=n.length;s<l;++s)t[s]=n[s],e[n.charCodeAt(s)]=s;e[45]=62,e[95]=63;function d(C){var k=C.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=C.indexOf("=");A===-1&&(A=k);var N=A===k?0:4-A%4;return[A,N]}function a(C){var k=d(C),A=k[0],N=k[1];return(A+N)*3/4-N}function m(C,k,A){return(k+A)*3/4-A}function y(C){var k,A=d(C),N=A[0],F=A[1],B=new r(m(C,N,F)),H=0,W=F>0?N-4:N,te;for(te=0;te<W;te+=4)k=e[C.charCodeAt(te)]<<18|e[C.charCodeAt(te+1)]<<12|e[C.charCodeAt(te+2)]<<6|e[C.charCodeAt(te+3)],B[H++]=k>>16&255,B[H++]=k>>8&255,B[H++]=k&255;return F===2&&(k=e[C.charCodeAt(te)]<<2|e[C.charCodeAt(te+1)]>>4,B[H++]=k&255),F===1&&(k=e[C.charCodeAt(te)]<<10|e[C.charCodeAt(te+1)]<<4|e[C.charCodeAt(te+2)]>>2,B[H++]=k>>8&255,B[H++]=k&255),B}function _(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function M(C,k,A){for(var N,F=[],B=k;B<A;B+=3)N=(C[B]<<16&16711680)+(C[B+1]<<8&65280)+(C[B+2]&255),F.push(_(N));return F.join("")}function S(C){for(var k,A=C.length,N=A%3,F=[],B=16383,H=0,W=A-N;H<W;H+=B)F.push(M(C,H,H+B>W?W:H+B));return N===1?(k=C[A-1],F.push(t[k>>2]+t[k<<4&63]+"==")):N===2&&(k=(C[A-2]<<8)+C[A-1],F.push(t[k>>10]+t[k>>4&63]+t[k<<2&63]+"=")),F.join("")}return Yt}var Ur={};var uo;function Mi(){return uo||(uo=1,Ur.read=function(t,e,r,n,s){var l,d,a=s*8-n-1,m=(1<<a)-1,y=m>>1,_=-7,M=r?s-1:0,S=r?-1:1,C=t[e+M];for(M+=S,l=C&(1<<-_)-1,C>>=-_,_+=a;_>0;l=l*256+t[e+M],M+=S,_-=8);for(d=l&(1<<-_)-1,l>>=-_,_+=n;_>0;d=d*256+t[e+M],M+=S,_-=8);if(l===0)l=1-y;else{if(l===m)return d?NaN:(C?-1:1)*(1/0);d=d+Math.pow(2,n),l=l-y}return(C?-1:1)*d*Math.pow(2,l-n)},Ur.write=function(t,e,r,n,s,l){var d,a,m,y=l*8-s-1,_=(1<<y)-1,M=_>>1,S=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:l-1,k=n?1:-1,A=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,d=_):(d=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-d))<1&&(d--,m*=2),d+M>=1?e+=S/m:e+=S*Math.pow(2,1-M),e*m>=2&&(d++,m/=2),d+M>=_?(a=0,d=_):d+M>=1?(a=(e*m-1)*Math.pow(2,s),d=d+M):(a=e*Math.pow(2,M-1)*Math.pow(2,s),d=0));s>=8;t[r+C]=a&255,C+=k,a/=256,s-=8);for(d=d<<s|a,y+=s;y>0;t[r+C]=d&255,C+=k,d/=256,y-=8);t[r+C-k]|=A*128}),Ur}var qr,co;function Oi(){if(co)return qr;co=1;var t={}.toString;return qr=Array.isArray||function(e){return t.call(e)=="[object Array]"},qr}var ho;function Ai(){return ho||(ho=1,(function(t){var e=Pi(),r=Mi(),n=Oi();t.Buffer=a,t.SlowBuffer=F,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=Xn.TYPED_ARRAY_SUPPORT!==void 0?Xn.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=l();function s(){try{var o=new Uint8Array(1);return o.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},o.foo()===42&&typeof o.subarray=="function"&&o.subarray(1,1).byteLength===0}catch{return!1}}function l(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(o,u){if(l()<u)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(o=new Uint8Array(u),o.__proto__=a.prototype):(o===null&&(o=new a(u)),o.length=u),o}function a(o,u,g){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(o,u,g);if(typeof o=="number"){if(typeof u=="string")throw new Error("If encoding is specified then the first argument must be a string");return M(this,o)}return m(this,o,u,g)}a.poolSize=8192,a._augment=function(o){return o.__proto__=a.prototype,o};function m(o,u,g,j){if(typeof u=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&u instanceof ArrayBuffer?k(o,u,g,j):typeof u=="string"?S(o,u,g):A(o,u)}a.from=function(o,u,g){return m(null,o,u,g)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0}));function y(o){if(typeof o!="number")throw new TypeError('"size" argument must be a number');if(o<0)throw new RangeError('"size" argument must not be negative')}function _(o,u,g,j){return y(u),u<=0?d(o,u):g!==void 0?typeof j=="string"?d(o,u).fill(g,j):d(o,u).fill(g):d(o,u)}a.alloc=function(o,u,g){return _(null,o,u,g)};function M(o,u){if(y(u),o=d(o,u<0?0:N(u)|0),!a.TYPED_ARRAY_SUPPORT)for(var g=0;g<u;++g)o[g]=0;return o}a.allocUnsafe=function(o){return M(null,o)},a.allocUnsafeSlow=function(o){return M(null,o)};function S(o,u,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError('"encoding" must be a valid string encoding');var j=B(u,g)|0;o=d(o,j);var $=o.write(u,g);return $!==j&&(o=o.slice(0,$)),o}function C(o,u){var g=u.length<0?0:N(u.length)|0;o=d(o,g);for(var j=0;j<g;j+=1)o[j]=u[j]&255;return o}function k(o,u,g,j){if(u.byteLength,g<0||u.byteLength<g)throw new RangeError("'offset' is out of bounds");if(u.byteLength<g+(j||0))throw new RangeError("'length' is out of bounds");return g===void 0&&j===void 0?u=new Uint8Array(u):j===void 0?u=new Uint8Array(u,g):u=new Uint8Array(u,g,j),a.TYPED_ARRAY_SUPPORT?(o=u,o.__proto__=a.prototype):o=C(o,u),o}function A(o,u){if(a.isBuffer(u)){var g=N(u.length)|0;return o=d(o,g),o.length===0||u.copy(o,0,0,g),o}if(u){if(typeof ArrayBuffer<"u"&&u.buffer instanceof ArrayBuffer||"length"in u)return typeof u.length!="number"||ce(u.length)?d(o,0):C(o,u);if(u.type==="Buffer"&&n(u.data))return C(o,u.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function N(o){if(o>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return o|0}function F(o){return+o!=o&&(o=0),a.alloc(+o)}a.isBuffer=function(o){return!!(o!=null&&o._isBuffer)},a.compare=function(o,u){if(!a.isBuffer(o)||!a.isBuffer(u))throw new TypeError("Arguments must be Buffers");if(o===u)return 0;for(var g=o.length,j=u.length,$=0,z=Math.min(g,j);$<z;++$)if(o[$]!==u[$]){g=o[$],j=u[$];break}return g<j?-1:j<g?1:0},a.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(o,u){if(!n(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return a.alloc(0);var g;if(u===void 0)for(u=0,g=0;g<o.length;++g)u+=o[g].length;var j=a.allocUnsafe(u),$=0;for(g=0;g<o.length;++g){var z=o[g];if(!a.isBuffer(z))throw new TypeError('"list" argument must be an Array of Buffers');z.copy(j,$),$+=z.length}return j};function B(o,u){if(a.isBuffer(o))return o.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(o)||o instanceof ArrayBuffer))return o.byteLength;typeof o!="string"&&(o=""+o);var g=o.length;if(g===0)return 0;for(var j=!1;;)switch(u){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":case void 0:return E(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Y(o).length;default:if(j)return E(o).length;u=(""+u).toLowerCase(),j=!0}}a.byteLength=B;function H(o,u,g){var j=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,u>>>=0,g<=u))return"";for(o||(o="utf8");;)switch(o){case"hex":return p(this,u,g);case"utf8":case"utf-8":return P(this,u,g);case"ascii":return h(this,u,g);case"latin1":case"binary":return i(this,u,g);case"base64":return ne(this,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,u,g);default:if(j)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),j=!0}}a.prototype._isBuffer=!0;function W(o,u,g){var j=o[u];o[u]=o[g],o[g]=j}a.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<o;u+=2)W(this,u,u+1);return this},a.prototype.swap32=function(){var o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<o;u+=4)W(this,u,u+3),W(this,u+1,u+2);return this},a.prototype.swap64=function(){var o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<o;u+=8)W(this,u,u+7),W(this,u+1,u+6),W(this,u+2,u+5),W(this,u+3,u+4);return this},a.prototype.toString=function(){var o=this.length|0;return o===0?"":arguments.length===0?P(this,0,o):H.apply(this,arguments)},a.prototype.equals=function(o){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:a.compare(this,o)===0},a.prototype.inspect=function(){var o="",u=t.INSPECT_MAX_BYTES;return this.length>0&&(o=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(o+=" ... ")),"<Buffer "+o+">"},a.prototype.compare=function(o,u,g,j,$){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),g===void 0&&(g=o?o.length:0),j===void 0&&(j=0),$===void 0&&($=this.length),u<0||g>o.length||j<0||$>this.length)throw new RangeError("out of range index");if(j>=$&&u>=g)return 0;if(j>=$)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,j>>>=0,$>>>=0,this===o)return 0;for(var z=$-j,le=g-u,he=Math.min(z,le),pe=this.slice(j,$),Q=o.slice(u,g),fe=0;fe<he;++fe)if(pe[fe]!==Q[fe]){z=pe[fe],le=Q[fe];break}return z<le?-1:le<z?1:0};function te(o,u,g,j,$){if(o.length===0)return-1;if(typeof g=="string"?(j=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,isNaN(g)&&(g=$?0:o.length-1),g<0&&(g=o.length+g),g>=o.length){if($)return-1;g=o.length-1}else if(g<0)if($)g=0;else return-1;if(typeof u=="string"&&(u=a.from(u,j)),a.isBuffer(u))return u.length===0?-1:oe(o,u,g,j,$);if(typeof u=="number")return u=u&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(o,u,g):Uint8Array.prototype.lastIndexOf.call(o,u,g):oe(o,[u],g,j,$);throw new TypeError("val must be string, number or Buffer")}function oe(o,u,g,j,$){var z=1,le=o.length,he=u.length;if(j!==void 0&&(j=String(j).toLowerCase(),j==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(o.length<2||u.length<2)return-1;z=2,le/=2,he/=2,g/=2}function pe(Se,Ce){return z===1?Se[Ce]:Se.readUInt16BE(Ce*z)}var Q;if($){var fe=-1;for(Q=g;Q<le;Q++)if(pe(o,Q)===pe(u,fe===-1?0:Q-fe)){if(fe===-1&&(fe=Q),Q-fe+1===he)return fe*z}else fe!==-1&&(Q-=Q-fe),fe=-1}else for(g+he>le&&(g=le-he),Q=g;Q>=0;Q--){for(var me=!0,ge=0;ge<he;ge++)if(pe(o,Q+ge)!==pe(u,ge)){me=!1;break}if(me)return Q}return-1}a.prototype.includes=function(o,u,g){return this.indexOf(o,u,g)!==-1},a.prototype.indexOf=function(o,u,g){return te(this,o,u,g,!0)},a.prototype.lastIndexOf=function(o,u,g){return te(this,o,u,g,!1)};function G(o,u,g,j){g=Number(g)||0;var $=o.length-g;j?(j=Number(j),j>$&&(j=$)):j=$;var z=u.length;if(z%2!==0)throw new TypeError("Invalid hex string");j>z/2&&(j=z/2);for(var le=0;le<j;++le){var he=parseInt(u.substr(le*2,2),16);if(isNaN(he))return le;o[g+le]=he}return le}function K(o,u,g,j){return I(E(u,o.length-g),o,g,j)}function V(o,u,g,j){return I(L(u),o,g,j)}function U(o,u,g,j){return V(o,u,g,j)}function J(o,u,g,j){return I(Y(u),o,g,j)}function se(o,u,g,j){return I(R(u,o.length-g),o,g,j)}a.prototype.write=function(o,u,g,j){if(u===void 0)j="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")j=u,g=this.length,u=0;else if(isFinite(u))u=u|0,isFinite(g)?(g=g|0,j===void 0&&(j="utf8")):(j=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var $=this.length-u;if((g===void 0||g>$)&&(g=$),o.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");j||(j="utf8");for(var z=!1;;)switch(j){case"hex":return G(this,o,u,g);case"utf8":case"utf-8":return K(this,o,u,g);case"ascii":return V(this,o,u,g);case"latin1":case"binary":return U(this,o,u,g);case"base64":return J(this,o,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,o,u,g);default:if(z)throw new TypeError("Unknown encoding: "+j);j=(""+j).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(o,u,g){return u===0&&g===o.length?e.fromByteArray(o):e.fromByteArray(o.slice(u,g))}function P(o,u,g){g=Math.min(o.length,g);for(var j=[],$=u;$<g;){var z=o[$],le=null,he=z>239?4:z>223?3:z>191?2:1;if($+he<=g){var pe,Q,fe,me;switch(he){case 1:z<128&&(le=z);break;case 2:pe=o[$+1],(pe&192)===128&&(me=(z&31)<<6|pe&63,me>127&&(le=me));break;case 3:pe=o[$+1],Q=o[$+2],(pe&192)===128&&(Q&192)===128&&(me=(z&15)<<12|(pe&63)<<6|Q&63,me>2047&&(me<55296||me>57343)&&(le=me));break;case 4:pe=o[$+1],Q=o[$+2],fe=o[$+3],(pe&192)===128&&(Q&192)===128&&(fe&192)===128&&(me=(z&15)<<18|(pe&63)<<12|(Q&63)<<6|fe&63,me>65535&&me<1114112&&(le=me))}}le===null?(le=65533,he=1):le>65535&&(le-=65536,j.push(le>>>10&1023|55296),le=56320|le&1023),j.push(le),$+=he}return w(j)}var x=4096;function w(o){var u=o.length;if(u<=x)return String.fromCharCode.apply(String,o);for(var g="",j=0;j<u;)g+=String.fromCharCode.apply(String,o.slice(j,j+=x));return g}function h(o,u,g){var j="";g=Math.min(o.length,g);for(var $=u;$<g;++$)j+=String.fromCharCode(o[$]&127);return j}function i(o,u,g){var j="";g=Math.min(o.length,g);for(var $=u;$<g;++$)j+=String.fromCharCode(o[$]);return j}function p(o,u,g){var j=o.length;(!u||u<0)&&(u=0),(!g||g<0||g>j)&&(g=j);for(var $="",z=u;z<g;++z)$+=ue(o[z]);return $}function f(o,u,g){for(var j=o.slice(u,g),$="",z=0;z<j.length;z+=2)$+=String.fromCharCode(j[z]+j[z+1]*256);return $}a.prototype.slice=function(o,u){var g=this.length;o=~~o,u=u===void 0?g:~~u,o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<o&&(u=o);var j;if(a.TYPED_ARRAY_SUPPORT)j=this.subarray(o,u),j.__proto__=a.prototype;else{var $=u-o;j=new a($,void 0);for(var z=0;z<$;++z)j[z]=this[z+o]}return j};function c(o,u,g){if(o%1!==0||o<0)throw new RangeError("offset is not uint");if(o+u>g)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(o,u,g){o=o|0,u=u|0,g||c(o,u,this.length);for(var j=this[o],$=1,z=0;++z<u&&($*=256);)j+=this[o+z]*$;return j},a.prototype.readUIntBE=function(o,u,g){o=o|0,u=u|0,g||c(o,u,this.length);for(var j=this[o+--u],$=1;u>0&&($*=256);)j+=this[o+--u]*$;return j},a.prototype.readUInt8=function(o,u){return u||c(o,1,this.length),this[o]},a.prototype.readUInt16LE=function(o,u){return u||c(o,2,this.length),this[o]|this[o+1]<<8},a.prototype.readUInt16BE=function(o,u){return u||c(o,2,this.length),this[o]<<8|this[o+1]},a.prototype.readUInt32LE=function(o,u){return u||c(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},a.prototype.readUInt32BE=function(o,u){return u||c(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},a.prototype.readIntLE=function(o,u,g){o=o|0,u=u|0,g||c(o,u,this.length);for(var j=this[o],$=1,z=0;++z<u&&($*=256);)j+=this[o+z]*$;return $*=128,j>=$&&(j-=Math.pow(2,8*u)),j},a.prototype.readIntBE=function(o,u,g){o=o|0,u=u|0,g||c(o,u,this.length);for(var j=u,$=1,z=this[o+--j];j>0&&($*=256);)z+=this[o+--j]*$;return $*=128,z>=$&&(z-=Math.pow(2,8*u)),z},a.prototype.readInt8=function(o,u){return u||c(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},a.prototype.readInt16LE=function(o,u){u||c(o,2,this.length);var g=this[o]|this[o+1]<<8;return g&32768?g|4294901760:g},a.prototype.readInt16BE=function(o,u){u||c(o,2,this.length);var g=this[o+1]|this[o]<<8;return g&32768?g|4294901760:g},a.prototype.readInt32LE=function(o,u){return u||c(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},a.prototype.readInt32BE=function(o,u){return u||c(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},a.prototype.readFloatLE=function(o,u){return u||c(o,4,this.length),r.read(this,o,!0,23,4)},a.prototype.readFloatBE=function(o,u){return u||c(o,4,this.length),r.read(this,o,!1,23,4)},a.prototype.readDoubleLE=function(o,u){return u||c(o,8,this.length),r.read(this,o,!0,52,8)},a.prototype.readDoubleBE=function(o,u){return u||c(o,8,this.length),r.read(this,o,!1,52,8)};function v(o,u,g,j,$,z){if(!a.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>$||u<z)throw new RangeError('"value" argument is out of bounds');if(g+j>o.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(o,u,g,j){if(o=+o,u=u|0,g=g|0,!j){var $=Math.pow(2,8*g)-1;v(this,o,u,g,$,0)}var z=1,le=0;for(this[u]=o&255;++le<g&&(z*=256);)this[u+le]=o/z&255;return u+g},a.prototype.writeUIntBE=function(o,u,g,j){if(o=+o,u=u|0,g=g|0,!j){var $=Math.pow(2,8*g)-1;v(this,o,u,g,$,0)}var z=g-1,le=1;for(this[u+z]=o&255;--z>=0&&(le*=256);)this[u+z]=o/le&255;return u+g},a.prototype.writeUInt8=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,1,255,0),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),this[u]=o&255,u+1};function D(o,u,g,j){u<0&&(u=65535+u+1);for(var $=0,z=Math.min(o.length-g,2);$<z;++$)o[g+$]=(u&255<<8*(j?$:1-$))>>>(j?$:1-$)*8}a.prototype.writeUInt16LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8):D(this,o,u,!0),u+2},a.prototype.writeUInt16BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>8,this[u+1]=o&255):D(this,o,u,!1),u+2};function T(o,u,g,j){u<0&&(u=4294967295+u+1);for(var $=0,z=Math.min(o.length-g,4);$<z;++$)o[g+$]=u>>>(j?$:3-$)*8&255}a.prototype.writeUInt32LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255):T(this,o,u,!0),u+4},a.prototype.writeUInt32BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255):T(this,o,u,!1),u+4},a.prototype.writeIntLE=function(o,u,g,j){if(o=+o,u=u|0,!j){var $=Math.pow(2,8*g-1);v(this,o,u,g,$-1,-$)}var z=0,le=1,he=0;for(this[u]=o&255;++z<g&&(le*=256);)o<0&&he===0&&this[u+z-1]!==0&&(he=1),this[u+z]=(o/le>>0)-he&255;return u+g},a.prototype.writeIntBE=function(o,u,g,j){if(o=+o,u=u|0,!j){var $=Math.pow(2,8*g-1);v(this,o,u,g,$-1,-$)}var z=g-1,le=1,he=0;for(this[u+z]=o&255;--z>=0&&(le*=256);)o<0&&he===0&&this[u+z+1]!==0&&(he=1),this[u+z]=(o/le>>0)-he&255;return u+g},a.prototype.writeInt8=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,1,127,-128),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),o<0&&(o=255+o+1),this[u]=o&255,u+1},a.prototype.writeInt16LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8):D(this,o,u,!0),u+2},a.prototype.writeInt16BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>8,this[u+1]=o&255):D(this,o,u,!1),u+2},a.prototype.writeInt32LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24):T(this,o,u,!0),u+4},a.prototype.writeInt32BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255):T(this,o,u,!1),u+4};function q(o,u,g,j,$,z){if(g+j>o.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function X(o,u,g,j,$){return $||q(o,u,g,4),r.write(o,u,g,j,23,4),g+4}a.prototype.writeFloatLE=function(o,u,g){return X(this,o,u,!0,g)},a.prototype.writeFloatBE=function(o,u,g){return X(this,o,u,!1,g)};function re(o,u,g,j,$){return $||q(o,u,g,8),r.write(o,u,g,j,52,8),g+8}a.prototype.writeDoubleLE=function(o,u,g){return re(this,o,u,!0,g)},a.prototype.writeDoubleBE=function(o,u,g){return re(this,o,u,!1,g)},a.prototype.copy=function(o,u,g,j){if(g||(g=0),!j&&j!==0&&(j=this.length),u>=o.length&&(u=o.length),u||(u=0),j>0&&j<g&&(j=g),j===g||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("sourceStart out of bounds");if(j<0)throw new RangeError("sourceEnd out of bounds");j>this.length&&(j=this.length),o.length-u<j-g&&(j=o.length-u+g);var $=j-g,z;if(this===o&&g<u&&u<j)for(z=$-1;z>=0;--z)o[z+u]=this[z+g];else if($<1e3||!a.TYPED_ARRAY_SUPPORT)for(z=0;z<$;++z)o[z+u]=this[z+g];else Uint8Array.prototype.set.call(o,this.subarray(g,g+$),u);return $},a.prototype.fill=function(o,u,g,j){if(typeof o=="string"){if(typeof u=="string"?(j=u,u=0,g=this.length):typeof g=="string"&&(j=g,g=this.length),o.length===1){var $=o.charCodeAt(0);$<256&&(o=$)}if(j!==void 0&&typeof j!="string")throw new TypeError("encoding must be a string");if(typeof j=="string"&&!a.isEncoding(j))throw new TypeError("Unknown encoding: "+j)}else typeof o=="number"&&(o=o&255);if(u<0||this.length<u||this.length<g)throw new RangeError("Out of range index");if(g<=u)return this;u=u>>>0,g=g===void 0?this.length:g>>>0,o||(o=0);var z;if(typeof o=="number")for(z=u;z<g;++z)this[z]=o;else{var le=a.isBuffer(o)?o:E(new a(o,j).toString()),he=le.length;for(z=0;z<g-u;++z)this[z+u]=le[z%he]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function ae(o){if(o=ie(o).replace(ee,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function ie(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function ue(o){return o<16?"0"+o.toString(16):o.toString(16)}function E(o,u){u=u||1/0;for(var g,j=o.length,$=null,z=[],le=0;le<j;++le){if(g=o.charCodeAt(le),g>55295&&g<57344){if(!$){if(g>56319){(u-=3)>-1&&z.push(239,191,189);continue}else if(le+1===j){(u-=3)>-1&&z.push(239,191,189);continue}$=g;continue}if(g<56320){(u-=3)>-1&&z.push(239,191,189),$=g;continue}g=($-55296<<10|g-56320)+65536}else $&&(u-=3)>-1&&z.push(239,191,189);if($=null,g<128){if((u-=1)<0)break;z.push(g)}else if(g<2048){if((u-=2)<0)break;z.push(g>>6|192,g&63|128)}else if(g<65536){if((u-=3)<0)break;z.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((u-=4)<0)break;z.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return z}function L(o){for(var u=[],g=0;g<o.length;++g)u.push(o.charCodeAt(g)&255);return u}function R(o,u){for(var g,j,$,z=[],le=0;le<o.length&&!((u-=2)<0);++le)g=o.charCodeAt(le),j=g>>8,$=g%256,z.push($),z.push(j);return z}function Y(o){return e.toByteArray(ae(o))}function I(o,u,g,j){for(var $=0;$<j&&!($+g>=u.length||$>=o.length);++$)u[$+g]=o[$];return $}function ce(o){return o!==o}})(ao)),ao}Ai();var _t;if(typeof window<"u"&&window.crypto&&(_t=window.crypto),!_t&&typeof window<"u"&&window.msCrypto&&(_t=window.msCrypto),!_t&&typeof global<"u"&&global.crypto&&(_t=global.crypto),!_t&&typeof require=="function")try{_t=require("crypto")}catch{}var fo={};var Vr=function(t,e){return Vr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)n.hasOwnProperty(s)&&(r[s]=n[s])},Vr(t,e)};function ji(t,e){Vr(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Hr=function(){return Hr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Hr.apply(this,arguments)};function Ei(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ti(t,e,r,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(d=t[a])&&(l=(s<3?d(l):s>3?d(e,r,l):d(e,r))||l);return s>3&&l&&Object.defineProperty(e,r,l),l}function Ri(t,e){return function(r,n){e(r,n,t)}}function $i(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Ni(t,e,r,n){function s(l){return l instanceof r?l:new r(function(d){d(l)})}return new(r||(r=Promise))(function(l,d){function a(_){try{y(n.next(_))}catch(M){d(M)}}function m(_){try{y(n.throw(_))}catch(M){d(M)}}function y(_){_.done?l(_.value):s(_.value).then(a,m)}y((n=n.apply(t,e||[])).next())})}function Li(t,e){var r={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},n,s,l,d;return d={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function a(y){return function(_){return m([y,_])}}function m(y){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(l=y[0]&2?s.return:y[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,y[1])).done)return l;switch(s=0,l&&(y=[y[0]&2,l.value]),y[0]){case 0:case 1:l=y;break;case 4:return r.label++,{value:y[1],done:!1};case 5:r.label++,s=y[1],y=[0];continue;case 7:y=r.ops.pop(),r.trys.pop();continue;default:if(l=r.trys,!(l=l.length>0&&l[l.length-1])&&(y[0]===6||y[0]===2)){r=0;continue}if(y[0]===3&&(!l||y[1]>l[0]&&y[1]<l[3])){r.label=y[1];break}if(y[0]===6&&r.label<l[1]){r.label=l[1],l=y;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(y);break}l[2]&&r.ops.pop(),r.trys.pop();continue}y=e.call(t,r)}catch(_){y=[6,_],s=0}finally{n=l=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}function Bi(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Ii(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Gr(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function po(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,l=[],d;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)l.push(s.value)}catch(a){d={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(d)throw d.error}}return l}function Yi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(po(arguments[e]));return t}function zi(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var l=arguments[e],d=0,a=l.length;d<a;d++,s++)n[s]=l[d];return n}function zt(t){return this instanceof zt?(this.v=t,this):new zt(t)}function Fi(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,l=[];return s={},d("next"),d("throw"),d("return"),s[Symbol.asyncIterator]=function(){return this},s;function d(S){n[S]&&(s[S]=function(C){return new Promise(function(k,A){l.push([S,C,k,A])>1||a(S,C)})})}function a(S,C){try{m(n[S](C))}catch(k){M(l[0][3],k)}}function m(S){S.value instanceof zt?Promise.resolve(S.value.v).then(y,_):M(l[0][2],S)}function y(S){a("next",S)}function _(S){a("throw",S)}function M(S,C){S(C),l.shift(),l.length&&a(l[0][0],l[0][1])}}function Wi(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,l){e[s]=t[s]?function(d){return(r=!r)?{value:zt(t[s](d)),done:s==="return"}:l?l(d):d}:l}}function Ui(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Gr=="function"?Gr(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(l){r[l]=t[l]&&function(d){return new Promise(function(a,m){d=t[l](d),s(a,m,d.done,d.value)})}}function s(l,d,a,m){Promise.resolve(m).then(function(y){l({value:y,done:a})},d)}}function qi(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Vi(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Hi(t){return t&&t.__esModule?t:{default:t}}function Gi(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Qi(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Zi=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Hr},__asyncDelegator:Wi,__asyncGenerator:Fi,__asyncValues:Ui,__await:zt,__awaiter:Ni,__classPrivateFieldGet:Gi,__classPrivateFieldSet:Qi,__createBinding:Bi,__decorate:Ti,__exportStar:Ii,__extends:ji,__generator:Li,__importDefault:Hi,__importStar:Vi,__makeTemplateObject:qi,__metadata:$i,__param:Ri,__read:po,__rest:Ei,__spread:Yi,__spreadArrays:zi,__values:Gr},Symbol.toStringTag,{value:"Module"})),go=Yr(Zi);var Ft={},Ue={},mo;function yo(){return mo||(mo=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.MAX_HASHABLE_LENGTH=Ue.INIT=Ue.KEY=Ue.DIGEST_LENGTH=Ue.BLOCK_SIZE=void 0,Ue.BLOCK_SIZE=64,Ue.DIGEST_LENGTH=32,Ue.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ue.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Ue.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),Ue}var Wt={},vo;function Ki(){if(vo)return Wt;vo=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.RawSha256=void 0;var t=yo(),e=(function(){function r(){this.state=Int32Array.from(t.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,l=n.byteLength;if(this.bytesHashed+=l,this.bytesHashed*8>t.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;l>0;)this.buffer[this.bufferLength++]=n[s++],l--,this.bufferLength===t.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),l=this.bufferLength;if(s.setUint8(this.bufferLength++,128),l%t.BLOCK_SIZE>=t.BLOCK_SIZE-8){for(var d=this.bufferLength;d<t.BLOCK_SIZE;d++)s.setUint8(d,0);this.hashBuffer(),this.bufferLength=0}for(var d=this.bufferLength;d<t.BLOCK_SIZE-8;d++)s.setUint8(d,0);s.setUint32(t.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(t.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(t.DIGEST_LENGTH),d=0;d<8;d++)a[d*4]=this.state[d]>>>24&255,a[d*4+1]=this.state[d]>>>16&255,a[d*4+2]=this.state[d]>>>8&255,a[d*4+3]=this.state[d]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,l=n.state,d=l[0],a=l[1],m=l[2],y=l[3],_=l[4],M=l[5],S=l[6],C=l[7],k=0;k<t.BLOCK_SIZE;k++){if(k<16)this.temp[k]=(s[k*4]&255)<<24|(s[k*4+1]&255)<<16|(s[k*4+2]&255)<<8|s[k*4+3]&255;else{var A=this.temp[k-2],N=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10;A=this.temp[k-15];var F=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3;this.temp[k]=(N+this.temp[k-7]|0)+(F+this.temp[k-16]|0)}var B=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&M^~_&S)|0)+(C+(t.KEY[k]+this.temp[k]|0)|0)|0,H=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&a^d&m^a&m)|0;C=S,S=M,M=_,_=y+B|0,y=m,m=a,a=d,d=B+H|0}l[0]+=d,l[1]+=a,l[2]+=m,l[3]+=y,l[4]+=_,l[5]+=M,l[6]+=S,l[7]+=C},r})();return Wt.RawSha256=e,Wt}var bo={},Ut={};const Ji=t=>{const e=[];for(let r=0,n=t.length;r<n;r++){const s=t.charCodeAt(r);if(s<128)e.push(s);else if(s<2048)e.push(s>>6|192,s&63|128);else if(r+1<t.length&&(s&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320){const l=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023);e.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else e.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(e)},Xi=t=>{let e="";for(let r=0,n=t.length;r<n;r++){const s=t[r];if(s<128)e+=String.fromCharCode(s);else if(192<=s&&s<224){const l=t[++r];e+=String.fromCharCode((s&31)<<6|l&63)}else if(240<=s&&s<365){const l="%"+[s,t[++r],t[++r],t[++r]].map(d=>d.toString(16)).join("%");e+=decodeURIComponent(l)}else e+=String.fromCharCode((s&15)<<12|(t[++r]&63)<<6|t[++r]&63)}return e};function ea(t){return new TextEncoder().encode(t)}function ta(t){return new TextDecoder("utf-8").decode(t)}const ra=t=>typeof TextEncoder=="function"?ea(t):Ji(t),na=t=>typeof TextDecoder=="function"?ta(t):Xi(t),oa=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:ra,toUtf8:na},Symbol.toStringTag,{value:"Module"})),sa=Yr(oa);var wo;function ia(){if(wo)return Ut;wo=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.convertToBuffer=void 0;var t=sa,e=typeof Buffer<"u"&&Buffer.from?function(n){return Buffer.from(n,"utf8")}:t.fromUtf8;function r(n){return n instanceof Uint8Array?n:typeof n=="string"?e(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return Ut.convertToBuffer=r,Ut}var qt={},_o;function aa(){if(_o)return qt;_o=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.isEmptyData=void 0;function t(e){return typeof e=="string"?e.length===0:e.byteLength===0}return qt.isEmptyData=t,qt}var Vt={},xo;function la(){if(xo)return Vt;xo=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}return Vt.numToUint8=t,Vt}var Ht={},Co;function ua(){if(Co)return Ht;Co=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.uint32ArrayFrom=void 0;function t(e){if(!Array.from){for(var r=new Uint32Array(e.length),n=0;n<e.length;)r[n]=e[n];return r}return Uint32Array.from(e)}return Ht.uint32ArrayFrom=t,Ht}var So;function ca(){return So||(So=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var e=ia();Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return e.convertToBuffer}});var r=aa();Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var n=la();Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=ua();Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(bo)),bo}var Do;function da(){if(Do)return Ft;Do=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.Sha256=void 0;var t=go,e=yo(),r=Ki(),n=ca(),s=(function(){function d(a){if(this.hash=new r.RawSha256,a){this.outer=new r.RawSha256;var m=l(a),y=new Uint8Array(e.BLOCK_SIZE);y.set(m);for(var _=0;_<e.BLOCK_SIZE;_++)m[_]^=54,y[_]^=92;this.hash.update(m),this.outer.update(y);for(var _=0;_<m.byteLength;_++)m[_]=0}}return d.prototype.update=function(a){if(!((0,n.isEmptyData)(a)||this.error))try{this.hash.update((0,n.convertToBuffer)(a))}catch(m){this.error=m}},d.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},d.prototype.digest=function(){return(0,t.__awaiter)(this,void 0,void 0,function(){return(0,t.__generator)(this,function(a){return[2,this.digestSync()]})})},d})();Ft.Sha256=s;function l(d){var a=(0,n.convertToBuffer)(d);if(a.byteLength>e.BLOCK_SIZE){var m=new r.RawSha256;m.update(a),a=m.digest()}var y=new Uint8Array(e.BLOCK_SIZE);return y.set(a),y}return Ft}var ko;function ha(){return ko||(ko=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=go;(0,e.__exportStar)(da(),t)})(fo)),fo}ha();function ye(t,e){t!=null&&this.fromString(t,e)}function Be(){return new ye(null)}var ht,fa=0xdeadbeefcafe,Po=(fa&16777215)==15715070;function pa(t,e,r,n,s,l){for(;--l>=0;){var d=e*this[t++]+r[n]+s;s=Math.floor(d/67108864),r[n++]=d&67108863}return s}function ga(t,e,r,n,s,l){for(var d=e&32767,a=e>>15;--l>=0;){var m=this[t]&32767,y=this[t++]>>15,_=a*m+y*d;m=d*m+((_&32767)<<15)+r[n]+(s&1073741823),s=(m>>>30)+(_>>>15)+a*y+(s>>>30),r[n++]=m&1073741823}return s}function ma(t,e,r,n,s,l){for(var d=e&16383,a=e>>14;--l>=0;){var m=this[t]&16383,y=this[t++]>>14,_=a*m+y*d;m=d*m+((_&16383)<<14)+r[n]+s,s=(m>>28)+(_>>14)+a*y,r[n++]=m&268435455}return s}var Mo=typeof navigator<"u";Mo&&Po&&navigator.appName=="Microsoft Internet Explorer"?(ye.prototype.am=ga,ht=30):Mo&&Po&&navigator.appName!="Netscape"?(ye.prototype.am=pa,ht=26):(ye.prototype.am=ma,ht=28),ye.prototype.DB=ht,ye.prototype.DM=(1<<ht)-1,ye.prototype.DV=1<<ht;var Qr=52;ye.prototype.FV=Math.pow(2,Qr),ye.prototype.F1=Qr-ht,ye.prototype.F2=2*ht-Qr;var ya="0123456789abcdefghijklmnopqrstuvwxyz",or=new Array,Pt,qe;for(Pt=48,qe=0;qe<=9;++qe)or[Pt++]=qe;for(Pt=97,qe=10;qe<36;++qe)or[Pt++]=qe;for(Pt=65,qe=10;qe<36;++qe)or[Pt++]=qe;function Oo(t){return ya.charAt(t)}function va(t,e){var r=or[t.charCodeAt(e)];return r??-1}function ba(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function wa(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function Zr(t){var e=Be();return e.fromInt(t),e}function _a(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=t.length,s=!1,l=0;--n>=0;){var d=va(t,n);if(d<0){t.charAt(n)=="-"&&(s=!0);continue}s=!1,l==0?this[this.t++]=d:l+r>this.DB?(this[this.t-1]|=(d&(1<<this.DB-l)-1)<<l,this[this.t++]=d>>this.DB-l):this[this.t-1]|=d<<l,l+=r,l>=this.DB&&(l-=this.DB)}this.clamp(),s&&ye.ZERO.subTo(this,this)}function xa(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function Ca(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<e)-1,n,s=!1,l="",d=this.t,a=this.DB-d*this.DB%e;if(d-- >0)for(a<this.DB&&(n=this[d]>>a)>0&&(s=!0,l=Oo(n));d>=0;)a<e?(n=(this[d]&(1<<a)-1)<<e-a,n|=this[--d]>>(a+=this.DB-e)):(n=this[d]>>(a-=e)&r,a<=0&&(a+=this.DB,--d)),n>0&&(s=!0),s&&(l+=Oo(n));return s?l:"0"}function Sa(){var t=Be();return ye.ZERO.subTo(this,t),t}function Da(){return this.s<0?this.negate():this}function ka(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this[r]-t[r])!=0)return e;return 0}function Kr(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function Pa(){return this.t<=0?0:this.DB*(this.t-1)+Kr(this[this.t-1]^this.s&this.DM)}function Ma(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function Oa(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function Aa(t,e){var r=t%this.DB,n=this.DB-r,s=(1<<n)-1,l=Math.floor(t/this.DB),d=this.s<<r&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+l+1]=this[a]>>n|d,d=(this[a]&s)<<r;for(a=l-1;a>=0;--a)e[a]=0;e[l]=d,e.t=this.t+l+1,e.s=this.s,e.clamp()}function ja(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,s=this.DB-n,l=(1<<n)-1;e[0]=this[r]>>n;for(var d=r+1;d<this.t;++d)e[d-r-1]|=(this[d]&l)<<s,e[d-r]=this[d]>>n;n>0&&(e[this.t-r-1]|=(this.s&l)<<s),e.t=this.t-r,e.clamp()}function Ea(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function Ta(t,e){var r=this.abs(),n=t.abs(),s=r.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+r.t]=r.am(0,n[s],e,s,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&ye.ZERO.subTo(e,e)}function Ra(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function $a(t,e,r){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=Be());var l=Be(),d=this.s,a=t.s,m=this.DB-Kr(n[n.t-1]);m>0?(n.lShiftTo(m,l),s.lShiftTo(m,r)):(n.copyTo(l),s.copyTo(r));var y=l.t,_=l[y-1];if(_!=0){var M=_*(1<<this.F1)+(y>1?l[y-2]>>this.F2:0),S=this.FV/M,C=(1<<this.F1)/M,k=1<<this.F2,A=r.t,N=A-y,F=e??Be();for(l.dlShiftTo(N,F),r.compareTo(F)>=0&&(r[r.t++]=1,r.subTo(F,r)),ye.ONE.dlShiftTo(y,F),F.subTo(l,l);l.t<y;)l[l.t++]=0;for(;--N>=0;){var B=r[--A]==_?this.DM:Math.floor(r[A]*S+(r[A-1]+k)*C);if((r[A]+=l.am(0,B,r,N,0,y))<B)for(l.dlShiftTo(N,F),r.subTo(F,r);r[A]<--B;)r.subTo(F,r)}e!=null&&(r.drShiftTo(y,e),d!=a&&ye.ZERO.subTo(e,e)),r.t=y,r.clamp(),m>0&&r.rShiftTo(m,r),d<0&&ye.ZERO.subTo(r,r)}}}function Na(t){var e=Be();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(ye.ZERO)>0&&t.subTo(e,e),e}function La(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function Ba(t){return this.compareTo(t)==0}function Ia(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function Ya(t){var e=Be();return this.addTo(t,e),e}function za(t){var e=Be();return this.subTo(t,e),e}function Fa(t){var e=Be();return this.multiplyTo(t,e),e}function Wa(t){var e=Be();return this.divRemTo(t,e,null),e}function Mt(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function Ua(t){var e=Be();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(ye.ZERO)>0&&this.m.subTo(e,e),e}function qa(t){var e=Be();return t.copyTo(e),this.reduce(e),e}function Va(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=t[e]&32767,n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function Ha(t,e){t.squareTo(e),this.reduce(e)}function Ga(t,e,r){t.multiplyTo(e,r),this.reduce(r)}Mt.prototype.convert=Ua,Mt.prototype.revert=qa,Mt.prototype.reduce=Va,Mt.prototype.mulTo=Ga,Mt.prototype.sqrTo=Ha;function Qa(t,e,r){var n=t.bitLength(),s,l=Zr(1),d=new Mt(e);if(n<=0)return l;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var a=new Array,m=3,y=s-1,_=(1<<s)-1;if(a[1]=d.convert(this),s>1){var M=Be();for(d.sqrTo(a[1],M);m<=_;)a[m]=Be(),d.mulTo(M,a[m-2],a[m]),m+=2}var S=t.t-1,C,k=!0,A=Be(),N;for(n=Kr(t[S])-1;S>=0;){for(n>=y?C=t[S]>>n-y&_:(C=(t[S]&(1<<n+1)-1)<<y-n,S>0&&(C|=t[S-1]>>this.DB+n-y)),m=s;(C&1)==0;)C>>=1,--m;if((n-=m)<0&&(n+=this.DB,--S),k)a[C].copyTo(l),k=!1;else{for(;m>1;)d.sqrTo(l,A),d.sqrTo(A,l),m-=2;m>0?d.sqrTo(l,A):(N=l,l=A,A=N),d.mulTo(A,a[C],l)}for(;S>=0&&(t[S]&1<<n)==0;)d.sqrTo(l,A),N=l,l=A,A=N,--n<0&&(n=this.DB-1,--S)}var F=d.revert(l);return r(null,F),F}ye.prototype.copyTo=ba,ye.prototype.fromInt=wa,ye.prototype.fromString=_a,ye.prototype.clamp=xa,ye.prototype.dlShiftTo=Ma,ye.prototype.drShiftTo=Oa,ye.prototype.lShiftTo=Aa,ye.prototype.rShiftTo=ja,ye.prototype.subTo=Ea,ye.prototype.multiplyTo=Ta,ye.prototype.squareTo=Ra,ye.prototype.divRemTo=$a,ye.prototype.invDigit=La,ye.prototype.addTo=Ia,ye.prototype.toString=Ca,ye.prototype.negate=Sa,ye.prototype.abs=Da,ye.prototype.compareTo=ka,ye.prototype.bitLength=Pa,ye.prototype.mod=Na,ye.prototype.equals=Ba,ye.prototype.add=Ya,ye.prototype.subtract=za,ye.prototype.multiply=Fa,ye.prototype.divide=Wa,ye.prototype.modPow=Qa,ye.ZERO=Zr(0),ye.ONE=Zr(1);function Za(t,e){return e=e||{},new Promise(function(r,n){var s=new XMLHttpRequest,l=[],d=[],a={},m=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:m,headers:{keys:function(){return l},entries:function(){return d},get:function(_){return a[_.toLowerCase()]},has:function(_){return _.toLowerCase()in a}}}};for(var y in s.open(e.method||"get",t,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(_,M,S){l.push(M=M.toLowerCase()),d.push([M,S]),a[M]=a[M]?a[M]+","+S:S}),r(m())},s.onerror=n,s.withCredentials=e.credentials=="include",e.headers)s.setRequestHeader(y,e.headers[y]);s.send(e.body||null)})}const Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"})),Ao=Yr(Ka);var jo,Eo;function Ja(){return Eo||(Eo=1,jo=self.fetch||(self.fetch=Ao.default||Ao)),jo}Ja();var To={exports:{}};var Ro;function Xa(){return Ro||(Ro=1,(function(t,e){(function(r){var n;if(t.exports=r(),n=!0,!n){var s=window.Cookies,l=window.Cookies=r();l.noConflict=function(){return window.Cookies=s,l}}})(function(){function r(){for(var l=0,d={};l<arguments.length;l++){var a=arguments[l];for(var m in a)d[m]=a[m]}return d}function n(l){return l.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(l){function d(){}function a(y,_,M){if(!(typeof document>"u")){M=r({path:"/"},d.defaults,M),typeof M.expires=="number"&&(M.expires=new Date(new Date*1+M.expires*864e5)),M.expires=M.expires?M.expires.toUTCString():"";try{var S=JSON.stringify(_);/^[\{\[]/.test(S)&&(_=S)}catch{}_=l.write?l.write(_,y):encodeURIComponent(String(_)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),y=encodeURIComponent(String(y)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var C="";for(var k in M)M[k]&&(C+="; "+k,M[k]!==!0&&(C+="="+M[k].split(";")[0]));return document.cookie=y+"="+_+C}}function m(y,_){if(!(typeof document>"u")){for(var M={},S=document.cookie?document.cookie.split("; "):[],C=0;C<S.length;C++){var k=S[C].split("="),A=k.slice(1).join("=");!_&&A.charAt(0)==='"'&&(A=A.slice(1,-1));try{var N=n(k[0]);if(A=(l.read||l)(A,N)||n(A),_)try{A=JSON.parse(A)}catch{}if(M[N]=A,y===N)break}catch{}}return y?M[y]:M}}return d.set=a,d.get=function(y){return m(y,!1)},d.getJSON=function(y){return m(y,!0)},d.remove=function(y,_){a(y,"",r(_,{expires:-1}))},d.defaults={},d.withConverter=s,d}return s(function(){})})})(To)),To.exports}Xa();function el(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function tl(){return el().getCurrentUser()}function rl(){return new Promise((t,e)=>{const r=tl();r===null&&e(null),r?.getSession((n,s)=>{if(n!==null||s===null)return e(null);t({session:s,authenticatedUser:r})})})}async function nl(){const{session:t}=await rl();return t?.getIdToken().getJwtToken()}Z.createContext(void 0);var ol="undefined",sl="object",sr="browser",$o="cpu",No="device",Jr="engine",ir="os",ft="name",ar="type",Xr="vendor",Xe="version",en="architecture",tn="major",rn="model",il="console",al="mobile",ll="tablet",ul="smarttv",cl="wearable",dl="embedded",hl=typeof window!==ol,nn=hl&&window.navigator?window.navigator:void 0;nn&&nn.userAgentData&&nn.userAgentData;var lr=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},ur=function(t){for(var e in t){var r=t[e];typeof r==sl&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ur.call(t.init,[[sr,[ft,Xe,tn,ar]],[$o,[en]],[No,[ar,rn,Xr]],[Jr,[ft,Xe]],[ir,[ft,Xe]]]),ur.call(t.isIgnore,[[sr,[Xe,tn]],[Jr,[Xe]],[ir,[Xe]]]),ur.call(t.isIgnoreRgx,[[sr,/ ?browser$/i],[ir,/ ?os$/i]]),ur.call(t.toString,[[sr,[ft,Xe]],[$o,[en]],[No,[Xr,rn]],[Jr,[ft,Xe]],[ir,[ft,Xe]]]),t})(),lr([ft,Xe,tn,ar]),lr([en]),lr([rn,Xr,ar,il,al,ul,ll,cl,dl]),lr([ft,Xe]);var on={exports:{}},fl=on.exports,Lo;function pl(){return Lo||(Lo=1,(function(t,e){(function(r,n){t.exports=n()})(fl,()=>(()=>{var r={873:(d,a)=>{var m,y,_=(function(){var M=function(P,x){var w=P,h=F[x],i=null,p=0,f=null,c=[],v={},D=function(E,L){i=(function(R){for(var Y=new Array(R),I=0;I<R;I+=1){Y[I]=new Array(R);for(var ce=0;ce<R;ce+=1)Y[I][ce]=null}return Y})(p=4*w+17),T(0,0),T(p-7,0),T(0,p-7),X(),q(),ee(E,L),w>=7&&re(E),f==null&&(f=ie(w,h,c)),ae(f,L)},T=function(E,L){for(var R=-1;R<=7;R+=1)if(!(E+R<=-1||p<=E+R))for(var Y=-1;Y<=7;Y+=1)L+Y<=-1||p<=L+Y||(i[E+R][L+Y]=0<=R&&R<=6&&(Y==0||Y==6)||0<=Y&&Y<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=Y&&Y<=4)},q=function(){for(var E=8;E<p-8;E+=1)i[E][6]==null&&(i[E][6]=E%2==0);for(var L=8;L<p-8;L+=1)i[6][L]==null&&(i[6][L]=L%2==0)},X=function(){for(var E=B.getPatternPosition(w),L=0;L<E.length;L+=1)for(var R=0;R<E.length;R+=1){var Y=E[L],I=E[R];if(i[Y][I]==null)for(var ce=-2;ce<=2;ce+=1)for(var o=-2;o<=2;o+=1)i[Y+ce][I+o]=ce==-2||ce==2||o==-2||o==2||ce==0&&o==0}},re=function(E){for(var L=B.getBCHTypeNumber(w),R=0;R<18;R+=1){var Y=!E&&(L>>R&1)==1;i[Math.floor(R/3)][R%3+p-8-3]=Y}for(R=0;R<18;R+=1)Y=!E&&(L>>R&1)==1,i[R%3+p-8-3][Math.floor(R/3)]=Y},ee=function(E,L){for(var R=h<<3|L,Y=B.getBCHTypeInfo(R),I=0;I<15;I+=1){var ce=!E&&(Y>>I&1)==1;I<6?i[I][8]=ce:I<8?i[I+1][8]=ce:i[p-15+I][8]=ce}for(I=0;I<15;I+=1)ce=!E&&(Y>>I&1)==1,I<8?i[8][p-I-1]=ce:I<9?i[8][15-I-1+1]=ce:i[8][15-I-1]=ce;i[p-8][8]=!E},ae=function(E,L){for(var R=-1,Y=p-1,I=7,ce=0,o=B.getMaskFunction(L),u=p-1;u>0;u-=2)for(u==6&&(u-=1);;){for(var g=0;g<2;g+=1)if(i[Y][u-g]==null){var j=!1;ce<E.length&&(j=(E[ce]>>>I&1)==1),o(Y,u-g)&&(j=!j),i[Y][u-g]=j,(I-=1)==-1&&(ce+=1,I=7)}if((Y+=R)<0||p<=Y){Y-=R,R=-R;break}}},ie=function(E,L,R){for(var Y=te.getRSBlocks(E,L),I=oe(),ce=0;ce<R.length;ce+=1){var o=R[ce];I.put(o.getMode(),4),I.put(o.getLength(),B.getLengthInBits(o.getMode(),E)),o.write(I)}var u=0;for(ce=0;ce<Y.length;ce+=1)u+=Y[ce].dataCount;if(I.getLengthInBits()>8*u)throw"code length overflow. ("+I.getLengthInBits()+">"+8*u+")";for(I.getLengthInBits()+4<=8*u&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=8*u||(I.put(236,8),I.getLengthInBits()>=8*u));)I.put(17,8);return(function(g,j){for(var $=0,z=0,le=0,he=new Array(j.length),pe=new Array(j.length),Q=0;Q<j.length;Q+=1){var fe=j[Q].dataCount,me=j[Q].totalCount-fe;z=Math.max(z,fe),le=Math.max(le,me),he[Q]=new Array(fe);for(var ge=0;ge<he[Q].length;ge+=1)he[Q][ge]=255&g.getBuffer()[ge+$];$+=fe;var Se=B.getErrorCorrectPolynomial(me),Ce=W(he[Q],Se.getLength()-1).mod(Se);for(pe[Q]=new Array(Se.getLength()-1),ge=0;ge<pe[Q].length;ge+=1){var De=ge+Ce.getLength()-pe[Q].length;pe[Q][ge]=De>=0?Ce.getAt(De):0}}var He=0;for(ge=0;ge<j.length;ge+=1)He+=j[ge].totalCount;var $e=new Array(He),ke=0;for(ge=0;ge<z;ge+=1)for(Q=0;Q<j.length;Q+=1)ge<he[Q].length&&($e[ke]=he[Q][ge],ke+=1);for(ge=0;ge<le;ge+=1)for(Q=0;Q<j.length;Q+=1)ge<pe[Q].length&&($e[ke]=pe[Q][ge],ke+=1);return $e})(I,Y)};v.addData=function(E,L){var R=null;switch(L=L||"Byte"){case"Numeric":R=G(E);break;case"Alphanumeric":R=K(E);break;case"Byte":R=V(E);break;case"Kanji":R=U(E);break;default:throw"mode:"+L}c.push(R),f=null},v.isDark=function(E,L){if(E<0||p<=E||L<0||p<=L)throw E+","+L;return i[E][L]},v.getModuleCount=function(){return p},v.make=function(){if(w<1){for(var E=1;E<40;E++){for(var L=te.getRSBlocks(E,h),R=oe(),Y=0;Y<c.length;Y++){var I=c[Y];R.put(I.getMode(),4),R.put(I.getLength(),B.getLengthInBits(I.getMode(),E)),I.write(R)}var ce=0;for(Y=0;Y<L.length;Y++)ce+=L[Y].dataCount;if(R.getLengthInBits()<=8*ce)break}w=E}D(!1,(function(){for(var o=0,u=0,g=0;g<8;g+=1){D(!0,g);var j=B.getLostPoint(v);(g==0||o>j)&&(o=j,u=g)}return u})())},v.createTableTag=function(E,L){E=E||2;var R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+(L=L===void 0?4*E:L)+"px;",R+='">',R+="<tbody>";for(var Y=0;Y<v.getModuleCount();Y+=1){R+="<tr>";for(var I=0;I<v.getModuleCount();I+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+E+"px;",R+=" height: "+E+"px;",R+=" background-color: ",R+=v.isDark(Y,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return(R+="</tbody>")+"</table>"},v.createSvgTag=function(E,L,R,Y){var I={};typeof arguments[0]=="object"&&(E=(I=arguments[0]).cellSize,L=I.margin,R=I.alt,Y=I.title),E=E||2,L=L===void 0?4*E:L,(R=typeof R=="string"?{text:R}:R||{}).text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,(Y=typeof Y=="string"?{text:Y}:Y||{}).text=Y.text||null,Y.id=Y.text?Y.id||"qrcode-title":null;var ce,o,u,g,j=v.getModuleCount()*E+2*L,$="";for(g="l"+E+",0 0,"+E+" -"+E+",0 0,-"+E+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+j+'px" height="'+j+'px"',$+=' viewBox="0 0 '+j+" "+j+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=Y.text||R.text?' role="img" aria-labelledby="'+ue([Y.id,R.id].join(" ").trim())+'"':"",$+=">",$+=Y.text?'<title id="'+ue(Y.id)+'">'+ue(Y.text)+"</title>":"",$+=R.text?'<description id="'+ue(R.id)+'">'+ue(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',o=0;o<v.getModuleCount();o+=1)for(u=o*E+L,ce=0;ce<v.getModuleCount();ce+=1)v.isDark(o,ce)&&($+="M"+(ce*E+L)+","+u+g);return($+='" stroke="transparent" fill="black"/>')+"</svg>"},v.createDataURL=function(E,L){E=E||2,L=L===void 0?4*E:L;var R=v.getModuleCount()*E+2*L,Y=L,I=R-L;return ne(R,R,function(ce,o){if(Y<=ce&&ce<I&&Y<=o&&o<I){var u=Math.floor((ce-Y)/E),g=Math.floor((o-Y)/E);return v.isDark(g,u)?0:1}return 1})},v.createImgTag=function(E,L,R){E=E||2,L=L===void 0?4*E:L;var Y=v.getModuleCount()*E+2*L,I="";return I+="<img",I+=' src="',I+=v.createDataURL(E,L),I+='"',I+=' width="',I+=Y,I+='"',I+=' height="',I+=Y,I+='"',R&&(I+=' alt="',I+=ue(R),I+='"'),I+"/>"};var ue=function(E){for(var L="",R=0;R<E.length;R+=1){var Y=E.charAt(R);switch(Y){case"<":L+="&lt;";break;case">":L+="&gt;";break;case"&":L+="&amp;";break;case'"':L+="&quot;";break;default:L+=Y}}return L};return v.createASCII=function(E,L){if((E=E||1)<2)return(function(he){he=he===void 0?2:he;var pe,Q,fe,me,ge,Se=1*v.getModuleCount()+2*he,Ce=he,De=Se-he,He={"██":"█","█ ":"▀"," █":"▄"," ":" "},$e={"██":"▀","█ ":"▀"," █":" "," ":" "},ke="";for(pe=0;pe<Se;pe+=2){for(fe=Math.floor((pe-Ce)/1),me=Math.floor((pe+1-Ce)/1),Q=0;Q<Se;Q+=1)ge="█",Ce<=Q&&Q<De&&Ce<=pe&&pe<De&&v.isDark(fe,Math.floor((Q-Ce)/1))&&(ge=" "),Ce<=Q&&Q<De&&Ce<=pe+1&&pe+1<De&&v.isDark(me,Math.floor((Q-Ce)/1))?ge+=" ":ge+="█",ke+=he<1&&pe+1>=De?$e[ge]:He[ge];ke+=`
20
- `}return Se%2&&he>0?ke.substring(0,ke.length-Se-1)+Array(Se+1).join("▀"):ke.substring(0,ke.length-1)})(L);E-=1,L=L===void 0?2*E:L;var R,Y,I,ce,o=v.getModuleCount()*E+2*L,u=L,g=o-L,j=Array(E+1).join("██"),$=Array(E+1).join(" "),z="",le="";for(R=0;R<o;R+=1){for(I=Math.floor((R-u)/E),le="",Y=0;Y<o;Y+=1)ce=1,u<=Y&&Y<g&&u<=R&&R<g&&v.isDark(I,Math.floor((Y-u)/E))&&(ce=0),le+=ce?j:$;for(I=0;I<E;I+=1)z+=le+`
21
- `}return z.substring(0,z.length-1)},v.renderTo2dContext=function(E,L){L=L||2;for(var R=v.getModuleCount(),Y=0;Y<R;Y++)for(var I=0;I<R;I++)E.fillStyle=v.isDark(Y,I)?"black":"white",E.fillRect(Y*L,I*L,L,L)},v};M.stringToBytes=(M.stringToBytesFuncs={default:function(P){for(var x=[],w=0;w<P.length;w+=1){var h=P.charCodeAt(w);x.push(255&h)}return x}}).default,M.createStringToBytes=function(P,x){var w=(function(){for(var i=se(P),p=function(){var q=i.read();if(q==-1)throw"eof";return q},f=0,c={};;){var v=i.read();if(v==-1)break;var D=p(),T=p()<<8|p();c[String.fromCharCode(v<<8|D)]=T,f+=1}if(f!=x)throw f+" != "+x;return c})(),h=63;return function(i){for(var p=[],f=0;f<i.length;f+=1){var c=i.charCodeAt(f);if(c<128)p.push(c);else{var v=w[i.charAt(f)];typeof v=="number"?(255&v)==v?p.push(v):(p.push(v>>>8),p.push(255&v)):p.push(h)}}return p}};var S,C,k,A,N,F={L:1,M:0,Q:3,H:2},B=(S=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],C=1335,k=7973,N=function(P){for(var x=0;P!=0;)x+=1,P>>>=1;return x},(A={}).getBCHTypeInfo=function(P){for(var x=P<<10;N(x)-N(C)>=0;)x^=C<<N(x)-N(C);return 21522^(P<<10|x)},A.getBCHTypeNumber=function(P){for(var x=P<<12;N(x)-N(k)>=0;)x^=k<<N(x)-N(k);return P<<12|x},A.getPatternPosition=function(P){return S[P-1]},A.getMaskFunction=function(P){switch(P){case 0:return function(x,w){return(x+w)%2==0};case 1:return function(x,w){return x%2==0};case 2:return function(x,w){return w%3==0};case 3:return function(x,w){return(x+w)%3==0};case 4:return function(x,w){return(Math.floor(x/2)+Math.floor(w/3))%2==0};case 5:return function(x,w){return x*w%2+x*w%3==0};case 6:return function(x,w){return(x*w%2+x*w%3)%2==0};case 7:return function(x,w){return(x*w%3+(x+w)%2)%2==0};default:throw"bad maskPattern:"+P}},A.getErrorCorrectPolynomial=function(P){for(var x=W([1],0),w=0;w<P;w+=1)x=x.multiply(W([1,H.gexp(w)],0));return x},A.getLengthInBits=function(P,x){if(1<=x&&x<10)switch(P){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+P}else if(x<27)switch(P){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+P}else{if(!(x<41))throw"type:"+x;switch(P){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+P}}},A.getLostPoint=function(P){for(var x=P.getModuleCount(),w=0,h=0;h<x;h+=1)for(var i=0;i<x;i+=1){for(var p=0,f=P.isDark(h,i),c=-1;c<=1;c+=1)if(!(h+c<0||x<=h+c))for(var v=-1;v<=1;v+=1)i+v<0||x<=i+v||c==0&&v==0||f==P.isDark(h+c,i+v)&&(p+=1);p>5&&(w+=3+p-5)}for(h=0;h<x-1;h+=1)for(i=0;i<x-1;i+=1){var D=0;P.isDark(h,i)&&(D+=1),P.isDark(h+1,i)&&(D+=1),P.isDark(h,i+1)&&(D+=1),P.isDark(h+1,i+1)&&(D+=1),D!=0&&D!=4||(w+=3)}for(h=0;h<x;h+=1)for(i=0;i<x-6;i+=1)P.isDark(h,i)&&!P.isDark(h,i+1)&&P.isDark(h,i+2)&&P.isDark(h,i+3)&&P.isDark(h,i+4)&&!P.isDark(h,i+5)&&P.isDark(h,i+6)&&(w+=40);for(i=0;i<x;i+=1)for(h=0;h<x-6;h+=1)P.isDark(h,i)&&!P.isDark(h+1,i)&&P.isDark(h+2,i)&&P.isDark(h+3,i)&&P.isDark(h+4,i)&&!P.isDark(h+5,i)&&P.isDark(h+6,i)&&(w+=40);var T=0;for(i=0;i<x;i+=1)for(h=0;h<x;h+=1)P.isDark(h,i)&&(T+=1);return w+Math.abs(100*T/x/x-50)/5*10},A),H=(function(){for(var P=new Array(256),x=new Array(256),w=0;w<8;w+=1)P[w]=1<<w;for(w=8;w<256;w+=1)P[w]=P[w-4]^P[w-5]^P[w-6]^P[w-8];for(w=0;w<255;w+=1)x[P[w]]=w;return{glog:function(h){if(h<1)throw"glog("+h+")";return x[h]},gexp:function(h){for(;h<0;)h+=255;for(;h>=256;)h-=255;return P[h]}}})();function W(P,x){if(P.length===void 0)throw P.length+"/"+x;var w=(function(){for(var i=0;i<P.length&&P[i]==0;)i+=1;for(var p=new Array(P.length-i+x),f=0;f<P.length-i;f+=1)p[f]=P[f+i];return p})(),h={getAt:function(i){return w[i]},getLength:function(){return w.length},multiply:function(i){for(var p=new Array(h.getLength()+i.getLength()-1),f=0;f<h.getLength();f+=1)for(var c=0;c<i.getLength();c+=1)p[f+c]^=H.gexp(H.glog(h.getAt(f))+H.glog(i.getAt(c)));return W(p,0)},mod:function(i){if(h.getLength()-i.getLength()<0)return h;for(var p=H.glog(h.getAt(0))-H.glog(i.getAt(0)),f=new Array(h.getLength()),c=0;c<h.getLength();c+=1)f[c]=h.getAt(c);for(c=0;c<i.getLength();c+=1)f[c]^=H.gexp(H.glog(i.getAt(c))+p);return W(f,0).mod(i)}};return h}var te=(function(){var P=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],x=function(h,i){var p={};return p.totalCount=h,p.dataCount=i,p},w={getRSBlocks:function(h,i){var p=(function(re,ee){switch(ee){case F.L:return P[4*(re-1)+0];case F.M:return P[4*(re-1)+1];case F.Q:return P[4*(re-1)+2];case F.H:return P[4*(re-1)+3];default:return}})(h,i);if(p===void 0)throw"bad rs block @ typeNumber:"+h+"/errorCorrectionLevel:"+i;for(var f=p.length/3,c=[],v=0;v<f;v+=1)for(var D=p[3*v+0],T=p[3*v+1],q=p[3*v+2],X=0;X<D;X+=1)c.push(x(T,q));return c}};return w})(),oe=function(){var P=[],x=0,w={getBuffer:function(){return P},getAt:function(h){var i=Math.floor(h/8);return(P[i]>>>7-h%8&1)==1},put:function(h,i){for(var p=0;p<i;p+=1)w.putBit((h>>>i-p-1&1)==1)},getLengthInBits:function(){return x},putBit:function(h){var i=Math.floor(x/8);P.length<=i&&P.push(0),h&&(P[i]|=128>>>x%8),x+=1}};return w},G=function(P){var x=P,w={getMode:function(){return 1},getLength:function(p){return x.length},write:function(p){for(var f=x,c=0;c+2<f.length;)p.put(h(f.substring(c,c+3)),10),c+=3;c<f.length&&(f.length-c==1?p.put(h(f.substring(c,c+1)),4):f.length-c==2&&p.put(h(f.substring(c,c+2)),7))}},h=function(p){for(var f=0,c=0;c<p.length;c+=1)f=10*f+i(p.charAt(c));return f},i=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-48;throw"illegal char :"+p};return w},K=function(P){var x=P,w={getMode:function(){return 2},getLength:function(i){return x.length},write:function(i){for(var p=x,f=0;f+1<p.length;)i.put(45*h(p.charAt(f))+h(p.charAt(f+1)),11),f+=2;f<p.length&&i.put(h(p.charAt(f)),6)}},h=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return w},V=function(P){var x=M.stringToBytes(P);return{getMode:function(){return 4},getLength:function(w){return x.length},write:function(w){for(var h=0;h<x.length;h+=1)w.put(x[h],8)}}},U=function(P){var x=M.stringToBytesFuncs.SJIS;if(!x)throw"sjis not supported.";(function(){var i=x("友");if(i.length!=2||(i[0]<<8|i[1])!=38726)throw"sjis not supported."})();var w=x(P),h={getMode:function(){return 8},getLength:function(i){return~~(w.length/2)},write:function(i){for(var p=w,f=0;f+1<p.length;){var c=(255&p[f])<<8|255&p[f+1];if(33088<=c&&c<=40956)c-=33088;else{if(!(57408<=c&&c<=60351))throw"illegal char at "+(f+1)+"/"+c;c-=49472}c=192*(c>>>8&255)+(255&c),i.put(c,13),f+=2}if(f<p.length)throw"illegal char at "+(f+1)}};return h},J=function(){var P=[],x={writeByte:function(w){P.push(255&w)},writeShort:function(w){x.writeByte(w),x.writeByte(w>>>8)},writeBytes:function(w,h,i){h=h||0,i=i||w.length;for(var p=0;p<i;p+=1)x.writeByte(w[p+h])},writeString:function(w){for(var h=0;h<w.length;h+=1)x.writeByte(w.charCodeAt(h))},toByteArray:function(){return P},toString:function(){var w="";w+="[";for(var h=0;h<P.length;h+=1)h>0&&(w+=","),w+=P[h];return w+"]"}};return x},se=function(P){var x=P,w=0,h=0,i=0,p={read:function(){for(;i<8;){if(w>=x.length){if(i==0)return-1;throw"unexpected end of file./"+i}var c=x.charAt(w);if(w+=1,c=="=")return i=0,-1;c.match(/^\s$/)||(h=h<<6|f(c.charCodeAt(0)),i+=6)}var v=h>>>i-8&255;return i-=8,v}},f=function(c){if(65<=c&&c<=90)return c-65;if(97<=c&&c<=122)return c-97+26;if(48<=c&&c<=57)return c-48+52;if(c==43)return 62;if(c==47)return 63;throw"c:"+c};return p},ne=function(P,x,w){for(var h=(function(T,q){var X=T,re=q,ee=new Array(T*q),ae={setPixel:function(E,L,R){ee[L*X+E]=R},write:function(E){E.writeString("GIF87a"),E.writeShort(X),E.writeShort(re),E.writeByte(128),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(255),E.writeByte(255),E.writeByte(255),E.writeString(","),E.writeShort(0),E.writeShort(0),E.writeShort(X),E.writeShort(re),E.writeByte(0);var L=ie(2);E.writeByte(2);for(var R=0;L.length-R>255;)E.writeByte(255),E.writeBytes(L,R,255),R+=255;E.writeByte(L.length-R),E.writeBytes(L,R,L.length-R),E.writeByte(0),E.writeString(";")}},ie=function(E){for(var L=1<<E,R=1+(1<<E),Y=E+1,I=ue(),ce=0;ce<L;ce+=1)I.add(String.fromCharCode(ce));I.add(String.fromCharCode(L)),I.add(String.fromCharCode(R));var o,u,g,j=J(),$=(o=j,u=0,g=0,{write:function(pe,Q){if(pe>>>Q)throw"length over";for(;u+Q>=8;)o.writeByte(255&(pe<<u|g)),Q-=8-u,pe>>>=8-u,g=0,u=0;g|=pe<<u,u+=Q},flush:function(){u>0&&o.writeByte(g)}});$.write(L,Y);var z=0,le=String.fromCharCode(ee[z]);for(z+=1;z<ee.length;){var he=String.fromCharCode(ee[z]);z+=1,I.contains(le+he)?le+=he:($.write(I.indexOf(le),Y),I.size()<4095&&(I.size()==1<<Y&&(Y+=1),I.add(le+he)),le=he)}return $.write(I.indexOf(le),Y),$.write(R,Y),$.flush(),j.toByteArray()},ue=function(){var E={},L=0,R={add:function(Y){if(R.contains(Y))throw"dup key:"+Y;E[Y]=L,L+=1},size:function(){return L},indexOf:function(Y){return E[Y]},contains:function(Y){return E[Y]!==void 0}};return R};return ae})(P,x),i=0;i<x;i+=1)for(var p=0;p<P;p+=1)h.setPixel(p,i,w(p,i));var f=J();h.write(f);for(var c=(function(){var T=0,q=0,X=0,re="",ee={},ae=function(ue){re+=String.fromCharCode(ie(63&ue))},ie=function(ue){if(!(ue<0)){if(ue<26)return 65+ue;if(ue<52)return ue-26+97;if(ue<62)return ue-52+48;if(ue==62)return 43;if(ue==63)return 47}throw"n:"+ue};return ee.writeByte=function(ue){for(T=T<<8|255&ue,q+=8,X+=1;q>=6;)ae(T>>>q-6),q-=6},ee.flush=function(){if(q>0&&(ae(T<<6-q),T=0,q=0),X%3!=0)for(var ue=3-X%3,E=0;E<ue;E+=1)re+="="},ee.toString=function(){return re},ee})(),v=f.toByteArray(),D=0;D<v.length;D+=1)c.writeByte(v[D]);return c.flush(),"data:image/gif;base64,"+c};return M})();_.stringToBytesFuncs["UTF-8"]=function(M){return(function(S){for(var C=[],k=0;k<S.length;k++){var A=S.charCodeAt(k);A<128?C.push(A):A<2048?C.push(192|A>>6,128|63&A):A<55296||A>=57344?C.push(224|A>>12,128|A>>6&63,128|63&A):(k++,A=65536+((1023&A)<<10|1023&S.charCodeAt(k)),C.push(240|A>>18,128|A>>12&63,128|A>>6&63,128|63&A))}return C})(M)},(y=typeof(m=function(){return _})=="function"?m.apply(a,[]):m)===void 0||(d.exports=y)}},n={};function s(d){var a=n[d];if(a!==void 0)return a.exports;var m=n[d]={exports:{}};return r[d](m,m.exports,s),m.exports}s.n=d=>{var a=d&&d.__esModule?()=>d.default:()=>d;return s.d(a,{a}),a},s.d=(d,a)=>{for(var m in a)s.o(a,m)&&!s.o(d,m)&&Object.defineProperty(d,m,{enumerable:!0,get:a[m]})},s.o=(d,a)=>Object.prototype.hasOwnProperty.call(d,a);var l={};return(()=>{s.d(l,{default:()=>x});const d=w=>!!w&&typeof w=="object"&&!Array.isArray(w);function a(w,...h){if(!h.length)return w;const i=h.shift();return i!==void 0&&d(w)&&d(i)?(w=Object.assign({},w),Object.keys(i).forEach(p=>{const f=w[p],c=i[p];Array.isArray(f)&&Array.isArray(c)?w[p]=c:d(f)&&d(c)?w[p]=a(Object.assign({},f),c):w[p]=c}),a(w,...h)):w}function m(w,h){const i=document.createElement("a");i.download=h,i.href=w,document.body.appendChild(i),i.click(),document.body.removeChild(i)}const y={L:.07,M:.15,Q:.25,H:.3};class _{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let c;switch(this._type){case"dots":c=this._drawDot;break;case"classy":c=this._drawClassy;break;case"classy-rounded":c=this._drawClassyRounded;break;case"rounded":c=this._drawRounded;break;case"extra-rounded":c=this._drawExtraRounded;break;default:c=this._drawSquare}c.call(this,{x:h,y:i,size:p,getNeighbor:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:c}){var v;const D=h+p/2,T=i+p/2;c(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(p+i/2)),this._element.setAttribute("cy",String(f+i/2)),this._element.setAttribute("r",String(i/2))}}))}_basicSquare(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(p)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(i)),this._element.setAttribute("height",String(i))}}))}_basicSideRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h `+i/2+`a ${i/2} ${i/2}, 0, 0, 0, 0 ${-i}`)}}))}_basicCornerRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}v `+-i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${-i/2} ${-i/2}`)}}))}_basicCornerExtraRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}a ${i} ${i}, 0, 0, 0, ${-i} ${-i}`)}}))}_basicCornersRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v `+i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${i/2} ${i/2}h `+i/2+"v "+-i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${-i/2} ${-i/2}`)}}))}_drawDot({x:h,y:i,size:p}){this._basicDot({x:h,y:i,size:p,rotation:0})}_drawSquare({x:h,y:i,size:p}){this._basicSquare({x:h,y:i,size:p,rotation:0})}_drawRounded({x:h,y:i,size:p,getNeighbor:f}){const c=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0,q=c+v+D+T;if(q!==0)if(q>2||c&&v||D&&T)this._basicSquare({x:h,y:i,size:p,rotation:0});else{if(q===2){let X=0;return c&&D?X=Math.PI/2:D&&v?X=Math.PI:v&&T&&(X=-Math.PI/2),void this._basicCornerRounded({x:h,y:i,size:p,rotation:X})}if(q===1){let X=0;return D?X=Math.PI/2:v?X=Math.PI:T&&(X=-Math.PI/2),void this._basicSideRounded({x:h,y:i,size:p,rotation:X})}}else this._basicDot({x:h,y:i,size:p,rotation:0})}_drawExtraRounded({x:h,y:i,size:p,getNeighbor:f}){const c=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0,q=c+v+D+T;if(q!==0)if(q>2||c&&v||D&&T)this._basicSquare({x:h,y:i,size:p,rotation:0});else{if(q===2){let X=0;return c&&D?X=Math.PI/2:D&&v?X=Math.PI:v&&T&&(X=-Math.PI/2),void this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:X})}if(q===1){let X=0;return D?X=Math.PI/2:v?X=Math.PI:T&&(X=-Math.PI/2),void this._basicSideRounded({x:h,y:i,size:p,rotation:X})}}else this._basicDot({x:h,y:i,size:p,rotation:0})}_drawClassy({x:h,y:i,size:p,getNeighbor:f}){const c=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0;c+v+D+T!==0?c||D?v||T?this._basicSquare({x:h,y:i,size:p,rotation:0}):this._basicCornerRounded({x:h,y:i,size:p,rotation:Math.PI/2}):this._basicCornerRounded({x:h,y:i,size:p,rotation:-Math.PI/2}):this._basicCornersRounded({x:h,y:i,size:p,rotation:Math.PI/2})}_drawClassyRounded({x:h,y:i,size:p,getNeighbor:f}){const c=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0;c+v+D+T!==0?c||D?v||T?this._basicSquare({x:h,y:i,size:p,rotation:0}):this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:-Math.PI/2}):this._basicCornersRounded({x:h,y:i,size:p,rotation:Math.PI/2})}}const M={dot:"dot",square:"square",extraRounded:"extra-rounded"},S=Object.values(M);class C{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let c;switch(this._type){case M.square:c=this._drawSquare;break;case M.extraRounded:c=this._drawExtraRounded;break;default:c=this._drawDot}c.call(this,{x:h,y:i,size:p,rotation:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:c}){var v;const D=h+p/2,T=i+p/2;c(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h,c=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p+i/2} ${f}a ${i/2} ${i/2} 0 1 0 0.1 0zm 0 ${c}a ${i/2-c} ${i/2-c} 0 1 1 -0.1 0Z`)}}))}_basicSquare(h){const{size:i,x:p,y:f}=h,c=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}v `+-i+`zM ${p+c} ${f+c}h `+(i-2*c)+"v "+(i-2*c)+"h "+(2*c-i)+"z")}}))}_basicExtraRounded(h){const{size:i,x:p,y:f}=h,c=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p} ${f+2.5*c}v `+2*c+`a ${2.5*c} ${2.5*c}, 0, 0, 0, ${2.5*c} ${2.5*c}h `+2*c+`a ${2.5*c} ${2.5*c}, 0, 0, 0, ${2.5*c} ${2.5*-c}v `+-2*c+`a ${2.5*c} ${2.5*c}, 0, 0, 0, ${2.5*-c} ${2.5*-c}h `+-2*c+`a ${2.5*c} ${2.5*c}, 0, 0, 0, ${2.5*-c} ${2.5*c}M ${p+2.5*c} ${f+c}h `+2*c+`a ${1.5*c} ${1.5*c}, 0, 0, 1, ${1.5*c} ${1.5*c}v `+2*c+`a ${1.5*c} ${1.5*c}, 0, 0, 1, ${1.5*-c} ${1.5*c}h `+-2*c+`a ${1.5*c} ${1.5*c}, 0, 0, 1, ${1.5*-c} ${1.5*-c}v `+-2*c+`a ${1.5*c} ${1.5*c}, 0, 0, 1, ${1.5*c} ${1.5*-c}`)}}))}_drawDot({x:h,y:i,size:p,rotation:f}){this._basicDot({x:h,y:i,size:p,rotation:f})}_drawSquare({x:h,y:i,size:p,rotation:f}){this._basicSquare({x:h,y:i,size:p,rotation:f})}_drawExtraRounded({x:h,y:i,size:p,rotation:f}){this._basicExtraRounded({x:h,y:i,size:p,rotation:f})}}const k={dot:"dot",square:"square"},A=Object.values(k);class N{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let c;c=this._type===k.square?this._drawSquare:this._drawDot,c.call(this,{x:h,y:i,size:p,rotation:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:c}){var v;const D=h+p/2,T=i+p/2;c(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(p+i/2)),this._element.setAttribute("cy",String(f+i/2)),this._element.setAttribute("r",String(i/2))}}))}_basicSquare(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(p)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(i)),this._element.setAttribute("height",String(i))}}))}_drawDot({x:h,y:i,size:p,rotation:f}){this._basicDot({x:h,y:i,size:p,rotation:f})}_drawSquare({x:h,y:i,size:p,rotation:f}){this._basicSquare({x:h,y:i,size:p,rotation:f})}}const F="circle",B=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],H=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class W{constructor(h,i){this._roundSize=p=>this._options.dotsOptions.roundSize?Math.floor(p):p,this._window=i,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(h.width)),this._element.setAttribute("height",String(h.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),h.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${h.width} ${h.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=h.image,this._instanceId=W.instanceCount++,this._options=h}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(h){const i=h.getModuleCount(),p=Math.min(this._options.width,this._options.height)-2*this._options.margin,f=this._options.shape===F?p/Math.sqrt(2):p,c=this._roundSize(f/i);let v={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=h,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:D,qrOptions:T}=this._options,q=D.imageSize*y[T.errorCorrectionLevel],X=Math.floor(q*i*i);v=(function({originalHeight:re,originalWidth:ee,maxHiddenDots:ae,maxHiddenAxisDots:ie,dotSize:ue}){const E={x:0,y:0},L={x:0,y:0};if(re<=0||ee<=0||ae<=0||ue<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const R=re/ee;return E.x=Math.floor(Math.sqrt(ae/R)),E.x<=0&&(E.x=1),ie&&ie<E.x&&(E.x=ie),E.x%2==0&&E.x--,L.x=E.x*ue,E.y=1+2*Math.ceil((E.x*R-1)/2),L.y=Math.round(L.x*R),(E.y*E.x>ae||ie&&ie<E.y)&&(ie&&ie<E.y?(E.y=ie,E.y%2==0&&E.x--):E.y-=2,L.y=E.y*ue,E.x=1+2*Math.ceil((E.y/R-1)/2),L.x=Math.round(L.y/R)),{height:L.y,width:L.x,hideYDots:E.y,hideXDots:E.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:X,maxHiddenAxisDots:i-14,dotSize:c})}this.drawBackground(),this.drawDots((D,T)=>{var q,X,re,ee,ae,ie;return!(this._options.imageOptions.hideBackgroundDots&&D>=(i-v.hideYDots)/2&&D<(i+v.hideYDots)/2&&T>=(i-v.hideXDots)/2&&T<(i+v.hideXDots)/2||!((q=B[D])===null||q===void 0)&&q[T]||!((X=B[D-i+7])===null||X===void 0)&&X[T]||!((re=B[D])===null||re===void 0)&&re[T-i+7]||!((ee=H[D])===null||ee===void 0)&&ee[T]||!((ae=H[D-i+7])===null||ae===void 0)&&ae[T]||!((ie=H[D])===null||ie===void 0)&&ie[T-i+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:v.width,height:v.height,count:i,dotSize:c})}drawBackground(){var h,i,p;const f=this._element,c=this._options;if(f){const v=(h=c.backgroundOptions)===null||h===void 0?void 0:h.gradient,D=(i=c.backgroundOptions)===null||i===void 0?void 0:i.color;let T=c.height,q=c.width;if(v||D){const X=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((p=c.backgroundOptions)===null||p===void 0)&&p.round&&(T=q=Math.min(c.width,c.height),X.setAttribute("rx",String(T/2*c.backgroundOptions.round))),X.setAttribute("x",String(this._roundSize((c.width-q)/2))),X.setAttribute("y",String(this._roundSize((c.height-T)/2))),X.setAttribute("width",String(q)),X.setAttribute("height",String(T)),this._backgroundClipPath.appendChild(X),this._createColor({options:v,color:D,additionalRotation:0,x:0,y:0,height:c.height,width:c.width,name:`background-color-${this._instanceId}`})}}}drawDots(h){var i,p;if(!this._qr)throw"QR code is not defined";const f=this._options,c=this._qr.getModuleCount();if(c>f.width||c>f.height)throw"The canvas is too small.";const v=Math.min(f.width,f.height)-2*f.margin,D=f.shape===F?v/Math.sqrt(2):v,T=this._roundSize(D/c),q=this._roundSize((f.width-c*T)/2),X=this._roundSize((f.height-c*T)/2),re=new _({svg:this._element,type:f.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(i=f.dotsOptions)===null||i===void 0?void 0:i.gradient,color:f.dotsOptions.color,additionalRotation:0,x:0,y:0,height:f.height,width:f.width,name:`dot-color-${this._instanceId}`});for(let ee=0;ee<c;ee++)for(let ae=0;ae<c;ae++)h&&!h(ee,ae)||!((p=this._qr)===null||p===void 0)&&p.isDark(ee,ae)&&(re.draw(q+ae*T,X+ee*T,T,(ie,ue)=>!(ae+ie<0||ee+ue<0||ae+ie>=c||ee+ue>=c)&&!(h&&!h(ee+ue,ae+ie))&&!!this._qr&&this._qr.isDark(ee+ue,ae+ie)),re._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(re._element));if(f.shape===F){const ee=this._roundSize((v/T-c)/2),ae=c+2*ee,ie=q-ee*T,ue=X-ee*T,E=[],L=this._roundSize(ae/2);for(let R=0;R<ae;R++){E[R]=[];for(let Y=0;Y<ae;Y++)R>=ee-1&&R<=ae-ee&&Y>=ee-1&&Y<=ae-ee||Math.sqrt((R-L)*(R-L)+(Y-L)*(Y-L))>L?E[R][Y]=0:E[R][Y]=this._qr.isDark(Y-2*ee<0?Y:Y>=c?Y-2*ee:Y-ee,R-2*ee<0?R:R>=c?R-2*ee:R-ee)?1:0}for(let R=0;R<ae;R++)for(let Y=0;Y<ae;Y++)E[R][Y]&&(re.draw(ie+Y*T,ue+R*T,T,(I,ce)=>{var o;return!!(!((o=E[R+ce])===null||o===void 0)&&o[Y+I])}),re._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(re._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const h=this._element,i=this._options;if(!h)throw"Element code is not defined";const p=this._qr.getModuleCount(),f=Math.min(i.width,i.height)-2*i.margin,c=i.shape===F?f/Math.sqrt(2):f,v=this._roundSize(c/p),D=7*v,T=3*v,q=this._roundSize((i.width-p*v)/2),X=this._roundSize((i.height-p*v)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([re,ee,ae])=>{var ie,ue,E,L,R,Y,I,ce,o,u,g,j,$,z;const le=q+re*v*(p-7),he=X+ee*v*(p-7);let pe=this._dotsClipPath,Q=this._dotsClipPath;if((!((ie=i.cornersSquareOptions)===null||ie===void 0)&&ie.gradient||!((ue=i.cornersSquareOptions)===null||ue===void 0)&&ue.color)&&(pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),pe.setAttribute("id",`clip-path-corners-square-color-${re}-${ee}-${this._instanceId}`),this._defs.appendChild(pe),this._cornersSquareClipPath=this._cornersDotClipPath=Q=pe,this._createColor({options:(E=i.cornersSquareOptions)===null||E===void 0?void 0:E.gradient,color:(L=i.cornersSquareOptions)===null||L===void 0?void 0:L.color,additionalRotation:ae,x:le,y:he,height:D,width:D,name:`corners-square-color-${re}-${ee}-${this._instanceId}`})),((R=i.cornersSquareOptions)===null||R===void 0?void 0:R.type)&&S.includes(i.cornersSquareOptions.type)){const fe=new C({svg:this._element,type:i.cornersSquareOptions.type,window:this._window});fe.draw(le,he,D,ae),fe._element&&pe&&pe.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((Y=i.cornersSquareOptions)===null||Y===void 0?void 0:Y.type)||i.dotsOptions.type,window:this._window});for(let me=0;me<B.length;me++)for(let ge=0;ge<B[me].length;ge++)!((I=B[me])===null||I===void 0)&&I[ge]&&(fe.draw(le+ge*v,he+me*v,v,(Se,Ce)=>{var De;return!!(!((De=B[me+Ce])===null||De===void 0)&&De[ge+Se])}),fe._element&&pe&&pe.appendChild(fe._element))}if((!((ce=i.cornersDotOptions)===null||ce===void 0)&&ce.gradient||!((o=i.cornersDotOptions)===null||o===void 0)&&o.color)&&(Q=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Q.setAttribute("id",`clip-path-corners-dot-color-${re}-${ee}-${this._instanceId}`),this._defs.appendChild(Q),this._cornersDotClipPath=Q,this._createColor({options:(u=i.cornersDotOptions)===null||u===void 0?void 0:u.gradient,color:(g=i.cornersDotOptions)===null||g===void 0?void 0:g.color,additionalRotation:ae,x:le+2*v,y:he+2*v,height:T,width:T,name:`corners-dot-color-${re}-${ee}-${this._instanceId}`})),((j=i.cornersDotOptions)===null||j===void 0?void 0:j.type)&&A.includes(i.cornersDotOptions.type)){const fe=new N({svg:this._element,type:i.cornersDotOptions.type,window:this._window});fe.draw(le+2*v,he+2*v,T,ae),fe._element&&Q&&Q.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:(($=i.cornersDotOptions)===null||$===void 0?void 0:$.type)||i.dotsOptions.type,window:this._window});for(let me=0;me<H.length;me++)for(let ge=0;ge<H[me].length;ge++)!((z=H[me])===null||z===void 0)&&z[ge]&&(fe.draw(le+ge*v,he+me*v,v,(Se,Ce)=>{var De;return!!(!((De=H[me+Ce])===null||De===void 0)&&De[ge+Se])}),fe._element&&Q&&Q.appendChild(fe._element))}})}loadImage(){return new Promise((h,i)=>{var p;const f=this._options;if(!f.image)return i("Image is not defined");if(!((p=f.nodeCanvas)===null||p===void 0)&&p.loadImage)f.nodeCanvas.loadImage(f.image).then(c=>{var v,D;if(this._image=c,this._options.imageOptions.saveAsBlob){const T=(v=f.nodeCanvas)===null||v===void 0?void 0:v.createCanvas(this._image.width,this._image.height);(D=T?.getContext("2d"))===null||D===void 0||D.drawImage(c,0,0),this._imageUri=T?.toDataURL()}h()}).catch(i);else{const c=new this._window.Image;typeof f.imageOptions.crossOrigin=="string"&&(c.crossOrigin=f.imageOptions.crossOrigin),this._image=c,c.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(v,D){return new Promise(T=>{const q=new D.XMLHttpRequest;q.onload=function(){const X=new D.FileReader;X.onloadend=function(){T(X.result)},X.readAsDataURL(q.response)},q.open("GET",v),q.responseType="blob",q.send()})})(f.image||"",this._window)),h()},c.src=f.image}})}async drawImage({width:h,height:i,count:p,dotSize:f}){const c=this._options,v=this._roundSize((c.width-p*f)/2),D=this._roundSize((c.height-p*f)/2),T=v+this._roundSize(c.imageOptions.margin+(p*f-h)/2),q=D+this._roundSize(c.imageOptions.margin+(p*f-i)/2),X=h-2*c.imageOptions.margin,re=i-2*c.imageOptions.margin,ee=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");ee.setAttribute("href",this._imageUri||""),ee.setAttribute("xlink:href",this._imageUri||""),ee.setAttribute("x",String(T)),ee.setAttribute("y",String(q)),ee.setAttribute("width",`${X}px`),ee.setAttribute("height",`${re}px`),this._element.appendChild(ee)}_createColor({options:h,color:i,additionalRotation:p,x:f,y:c,height:v,width:D,name:T}){const q=D>v?D:v,X=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(X.setAttribute("x",String(f)),X.setAttribute("y",String(c)),X.setAttribute("height",String(v)),X.setAttribute("width",String(D)),X.setAttribute("clip-path",`url('#clip-path-${T}')`),h){let re;if(h.type==="radial")re=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),re.setAttribute("id",T),re.setAttribute("gradientUnits","userSpaceOnUse"),re.setAttribute("fx",String(f+D/2)),re.setAttribute("fy",String(c+v/2)),re.setAttribute("cx",String(f+D/2)),re.setAttribute("cy",String(c+v/2)),re.setAttribute("r",String(q/2));else{const ee=((h.rotation||0)+p)%(2*Math.PI),ae=(ee+2*Math.PI)%(2*Math.PI);let ie=f+D/2,ue=c+v/2,E=f+D/2,L=c+v/2;ae>=0&&ae<=.25*Math.PI||ae>1.75*Math.PI&&ae<=2*Math.PI?(ie-=D/2,ue-=v/2*Math.tan(ee),E+=D/2,L+=v/2*Math.tan(ee)):ae>.25*Math.PI&&ae<=.75*Math.PI?(ue-=v/2,ie-=D/2/Math.tan(ee),L+=v/2,E+=D/2/Math.tan(ee)):ae>.75*Math.PI&&ae<=1.25*Math.PI?(ie+=D/2,ue+=v/2*Math.tan(ee),E-=D/2,L-=v/2*Math.tan(ee)):ae>1.25*Math.PI&&ae<=1.75*Math.PI&&(ue+=v/2,ie+=D/2/Math.tan(ee),L-=v/2,E-=D/2/Math.tan(ee)),re=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),re.setAttribute("id",T),re.setAttribute("gradientUnits","userSpaceOnUse"),re.setAttribute("x1",String(Math.round(ie))),re.setAttribute("y1",String(Math.round(ue))),re.setAttribute("x2",String(Math.round(E))),re.setAttribute("y2",String(Math.round(L)))}h.colorStops.forEach(({offset:ee,color:ae})=>{const ie=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");ie.setAttribute("offset",100*ee+"%"),ie.setAttribute("stop-color",ae),re.appendChild(ie)}),X.setAttribute("fill",`url('#${T}')`),this._defs.appendChild(re)}else i&&X.setAttribute("fill",i);this._element.appendChild(X)}}W.instanceCount=0;const te=W,oe="canvas",G={};for(let w=0;w<=40;w++)G[w]=w;const K={type:oe,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:G[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function V(w){const h=Object.assign({},w);if(!h.colorStops||!h.colorStops.length)throw"Field 'colorStops' is required in gradient";return h.rotation?h.rotation=Number(h.rotation):h.rotation=0,h.colorStops=h.colorStops.map(i=>Object.assign(Object.assign({},i),{offset:Number(i.offset)})),h}function U(w){const h=Object.assign({},w);return h.width=Number(h.width),h.height=Number(h.height),h.margin=Number(h.margin),h.imageOptions=Object.assign(Object.assign({},h.imageOptions),{hideBackgroundDots:!!h.imageOptions.hideBackgroundDots,imageSize:Number(h.imageOptions.imageSize),margin:Number(h.imageOptions.margin)}),h.margin>Math.min(h.width,h.height)&&(h.margin=Math.min(h.width,h.height)),h.dotsOptions=Object.assign({},h.dotsOptions),h.dotsOptions.gradient&&(h.dotsOptions.gradient=V(h.dotsOptions.gradient)),h.cornersSquareOptions&&(h.cornersSquareOptions=Object.assign({},h.cornersSquareOptions),h.cornersSquareOptions.gradient&&(h.cornersSquareOptions.gradient=V(h.cornersSquareOptions.gradient))),h.cornersDotOptions&&(h.cornersDotOptions=Object.assign({},h.cornersDotOptions),h.cornersDotOptions.gradient&&(h.cornersDotOptions.gradient=V(h.cornersDotOptions.gradient))),h.backgroundOptions&&(h.backgroundOptions=Object.assign({},h.backgroundOptions),h.backgroundOptions.gradient&&(h.backgroundOptions.gradient=V(h.backgroundOptions.gradient))),h}var J=s(873),se=s.n(J);function ne(w){if(!w)throw new Error("Extension must be defined");w[0]==="."&&(w=w.substring(1));const h={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[w.toLowerCase()];if(!h)throw new Error(`Extension "${w}" is not supported`);return h}class P{constructor(h){h!=null&&h.jsdom?this._window=new h.jsdom("",{resources:"usable"}).window:this._window=window,this._options=h?U(a(K,h)):K,this.update()}static _clearContainer(h){h&&(h.innerHTML="")}_setupSvg(){if(!this._qr)return;const h=new te(this._options,this._window);this._svg=h.getElement(),this._svgDrawingPromise=h.drawQR(this._qr).then(()=>{var i;this._svg&&((i=this._extension)===null||i===void 0||i.call(this,h.getElement(),this._options))})}_setupCanvas(){var h,i;this._qr&&(!((h=this._options.nodeCanvas)===null||h===void 0)&&h.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(i=this._svgDrawingPromise)===null||i===void 0?void 0:i.then(()=>{var p;if(!this._svg)return;const f=this._svg,c=new this._window.XMLSerializer().serializeToString(f),v=btoa(c),D=`data:${ne("svg")};base64,${v}`;if(!((p=this._options.nodeCanvas)===null||p===void 0)&&p.loadImage)return this._options.nodeCanvas.loadImage(D).then(T=>{var q,X;T.width=this._options.width,T.height=this._options.height,(X=(q=this._nodeCanvas)===null||q===void 0?void 0:q.getContext("2d"))===null||X===void 0||X.drawImage(T,0,0)});{const T=new this._window.Image;return new Promise(q=>{T.onload=()=>{var X,re;(re=(X=this._domCanvas)===null||X===void 0?void 0:X.getContext("2d"))===null||re===void 0||re.drawImage(T,0,0),q()},T.src=D})}}))}async _getElement(h="png"){if(!this._qr)throw"QR code is empty";return h.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(h){P._clearContainer(this._container),this._options=h?U(a(this._options,h)):this._options,this._options.data&&(this._qr=se()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(i){switch(!0){case/^[0-9]*$/.test(i):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(i):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===oe?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(h){if(h){if(typeof h.appendChild!="function")throw"Container should be a single DOM node";this._options.type===oe?this._domCanvas&&h.appendChild(this._domCanvas):this._svg&&h.appendChild(this._svg),this._container=h}}applyExtension(h){if(!h)throw"Extension function should be defined.";this._extension=h,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(h="png"){if(!this._qr)throw"QR code is empty";const i=await this._getElement(h),p=ne(h);if(!i)return null;if(h.toLowerCase()==="svg"){const f=`<?xml version="1.0" standalone="no"?>\r
22
- ${new this._window.XMLSerializer().serializeToString(i)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(f):new Blob([f],{type:p})}return new Promise(f=>{const c=i;if("toBuffer"in c)if(p==="image/png")f(c.toBuffer(p));else if(p==="image/jpeg")f(c.toBuffer(p));else{if(p!=="application/pdf")throw Error("Unsupported extension");f(c.toBuffer(p))}else"toBlob"in c&&c.toBlob(f,p,1)})}async download(h){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let i="png",p="qr";typeof h=="string"?(i=h,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof h=="object"&&h!==null&&(h.name&&(p=h.name),h.extension&&(i=h.extension));const f=await this._getElement(i);if(f)if(i.toLowerCase()==="svg"){let c=new XMLSerializer().serializeToString(f);c=`<?xml version="1.0" standalone="no"?>\r
23
- `+c,m(`data:${ne(i)};charset=utf-8,${encodeURIComponent(c)}`,`${p}.svg`)}else m(f.toDataURL(ne(i)),`${p}.${i}`)}}const x=P})(),l.default})())})(on)),on.exports}pl();const Bo=Z.createContext(void 0);function gl(t){const e=Fe.c(9),{children:r,baseUrl:n,queryClient:s}=t;let l;e[0]!==n||e[1]!==s?(l={baseUrl:n,queryClient:s},e[0]=n,e[1]=s,e[2]=l):l=e[2];let d;e[3]!==r||e[4]!==s?(d=b.jsx(Qn,{client:s,children:r}),e[3]=r,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==d?(a=b.jsx(Bo.Provider,{value:l,children:d}),e[6]=l,e[7]=d,e[8]=a):a=e[8],a}function pt(){const t=Z.useContext(Bo);if(!t)throw new Error("useDataTable must be used within a DataTableProvider");return t}function sn(t){if(typeof t=="string")try{const e=JSON.parse(t);return{message:e.message||t,code:e.code,details:e.details}}catch{return{message:t}}return t instanceof Error?{message:t.message}:{message:"Unbekannter Fehler"}}async function Ot(t){const e=await t.text();if(!e)throw new Error(`HTTP ${t.status}: ${t.statusText}`);let r=null;try{r=JSON.parse(e)}catch{throw new Error(e)}throw r?.message?new Error(r.message):r?.error?new Error(r.error):new Error(e)}function ml(){const t=localStorage.getItem("a360.assumed-org");return t?{"X-Assume-Org":t}:{}}async function xt(){return{"Content-Type":"application/json",Authorization:`Bearer ${await nl()??""}`,...ml()}}async function Io(t){return fetch(t,{method:"GET",headers:await xt()}).then(async e=>(e.status>=400&&await Ot(e),e)).then(e=>e.json()).then(e=>e)}async function Yo(t,e){return fetch(`${t}/${e}`,{method:"GET",headers:await xt()}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.json()).then(r=>r)}async function zo(t,e){const r=await fetch(`${t}/${e}`,{method:"DELETE",headers:await xt()});r.status>=400&&await Ot(r)}async function Fo(t,e){return fetch(t,{method:"POST",headers:await xt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}async function yl(t,e,r){return fetch(e,{method:t,headers:await xt(),body:r?JSON.stringify(r):void 0}).then(async n=>(n.status>=400&&await Ot(n),n)).then(n=>{if(n.status!=204)return n.json()}).then(n=>n)}async function Wo(t,e){return fetch(`${t}/${e.id}`,{method:"PUT",headers:await xt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}function Uo(t,e,r){const n=Fe.c(13),{baseUrl:s}=pt();let l;if(n[0]!==r||n[1]!==e){let y;n[3]!==r?(y=r?.toString(),n[3]=r,n[4]=y):y=n[4],l=[...e.map(vl),String(y)],n[0]=r,n[1]=e,n[2]=l}else l=n[2];let d;n[5]!==t||n[6]!==s||n[7]!==r?(d=()=>Yo(`${s}${t}`,r),n[5]=t,n[6]=s,n[7]=r,n[8]=d):d=n[8];const a=!!r;let m;return n[9]!==l||n[10]!==d||n[11]!==a?(m={queryKey:l,queryFn:d,enabled:a},n[9]=l,n[10]=d,n[11]=a,n[12]=m):m=n[12],Jn(m)}function vl(t){return t.toString()}function qo(t,e,r){const n=Fe.c(9),s=r===void 0?!0:r,{baseUrl:l}=pt();let d;n[0]!==e?(d=[...e.map(bl)],n[0]=e,n[1]=d):d=n[1];let a;n[2]!==t||n[3]!==l?(a=()=>Io(`${l}${t}`),n[2]=t,n[3]=l,n[4]=a):a=n[4];let m;return n[5]!==s||n[6]!==d||n[7]!==a?(m={queryKey:d,queryFn:a,enabled:s},n[5]=s,n[6]=d,n[7]=a,n[8]=m):m=n[8],Jn(m)}function bl(t){return t.toString()}function Vo(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=pt();let l;r[0]!==e?(l=[...e.map(_l)],r[0]=e,r[1]=l):l=r[1];let d;r[2]!==t||r[3]!==n?(d=m=>Fo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=d):d=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==d?(a={mutationKey:l,mutationFn:d,onSettled(){return s.invalidateQueries({queryKey:[...e.map(wl)]})},onError(m){sn(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=d,r[9]=a):a=r[9],Ir(a)}function wl(t){return t.toString()}function _l(t){return t.toString()}function an(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=pt();let l;r[0]!==e?(l=[...e.map(Cl)],r[0]=e,r[1]=l):l=r[1];let d;r[2]!==t||r[3]!==n?(d=m=>Wo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=d):d=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==d?(a={mutationKey:l,mutationFn:d,onSettled(){return s.invalidateQueries({queryKey:[...e.map(xl)]})},onError(m){sn(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=d,r[9]=a):a=r[9],Ir(a)}function xl(t){return t.toString()}function Cl(t){return t.toString()}function Ho(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=pt();let l;r[0]!==e?(l=[...e.map(Dl)],r[0]=e,r[1]=l):l=r[1];let d;r[2]!==t||r[3]!==n?(d=m=>zo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=d):d=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==d?(a={mutationKey:l,mutationFn:d,onSettled(){return s.invalidateQueries({queryKey:[...e.map(Sl)]})},onError(m){sn(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=d,r[9]=a):a=r[9],Ir(a)}function Sl(t){return t.toString()}function Dl(t){return t.toString()}var cr={exports:{}},kl=cr.exports,Go;function Pl(){return Go||(Go=1,(function(t,e){(function(r,n){t.exports=n()})(kl,(function(){var r=1e3,n=6e4,s=36e5,l="millisecond",d="second",a="minute",m="hour",y="day",_="week",M="month",S="quarter",C="year",k="date",A="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var x=["th","st","nd","rd"],w=P%100;return"["+P+(x[(w-20)%10]||x[w]||x[0])+"]"}},H=function(P,x,w){var h=String(P);return!h||h.length>=x?P:""+Array(x+1-h.length).join(w)+P},W={s:H,z:function(P){var x=-P.utcOffset(),w=Math.abs(x),h=Math.floor(w/60),i=w%60;return(x<=0?"+":"-")+H(h,2,"0")+":"+H(i,2,"0")},m:function P(x,w){if(x.date()<w.date())return-P(w,x);var h=12*(w.year()-x.year())+(w.month()-x.month()),i=x.clone().add(h,M),p=w-i<0,f=x.clone().add(h+(p?-1:1),M);return+(-(h+(w-i)/(p?i-f:f-i))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M,y:C,w:_,d:y,D:k,h:m,m:a,s:d,ms:l,Q:S}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},te="en",oe={};oe[te]=B;var G="$isDayjsObject",K=function(P){return P instanceof se||!(!P||!P[G])},V=function P(x,w,h){var i;if(!x)return te;if(typeof x=="string"){var p=x.toLowerCase();oe[p]&&(i=p),w&&(oe[p]=w,i=p);var f=x.split("-");if(!i&&f.length>1)return P(f[0])}else{var c=x.name;oe[c]=x,i=c}return!h&&i&&(te=i),i||!h&&te},U=function(P,x){if(K(P))return P.clone();var w=typeof x=="object"?x:{};return w.date=P,w.args=arguments,new se(w)},J=W;J.l=V,J.i=K,J.w=function(P,x){return U(P,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var se=(function(){function P(w){this.$L=V(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[G]=!0}var x=P.prototype;return x.parse=function(w){this.$d=(function(h){var i=h.date,p=h.utc;if(i===null)return new Date(NaN);if(J.u(i))return new Date;if(i instanceof Date)return new Date(i);if(typeof i=="string"&&!/Z$/i.test(i)){var f=i.match(N);if(f){var c=f[2]-1||0,v=(f[7]||"0").substring(0,3);return p?new Date(Date.UTC(f[1],c,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)):new Date(f[1],c,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)}}return new Date(i)})(w),this.init()},x.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},x.$utils=function(){return J},x.isValid=function(){return this.$d.toString()!==A},x.isSame=function(w,h){var i=U(w);return this.startOf(h)<=i&&i<=this.endOf(h)},x.isAfter=function(w,h){return U(w)<this.startOf(h)},x.isBefore=function(w,h){return this.endOf(h)<U(w)},x.$g=function(w,h,i){return J.u(w)?this[h]:this.set(i,w)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(w,h){var i=this,p=!!J.u(h)||h,f=J.p(w),c=function(ae,ie){var ue=J.w(i.$u?Date.UTC(i.$y,ie,ae):new Date(i.$y,ie,ae),i);return p?ue:ue.endOf(y)},v=function(ae,ie){return J.w(i.toDate()[ae].apply(i.toDate("s"),(p?[0,0,0,0]:[23,59,59,999]).slice(ie)),i)},D=this.$W,T=this.$M,q=this.$D,X="set"+(this.$u?"UTC":"");switch(f){case C:return p?c(1,0):c(31,11);case M:return p?c(1,T):c(0,T+1);case _:var re=this.$locale().weekStart||0,ee=(D<re?D+7:D)-re;return c(p?q-ee:q+(6-ee),T);case y:case k:return v(X+"Hours",0);case m:return v(X+"Minutes",1);case a:return v(X+"Seconds",2);case d:return v(X+"Milliseconds",3);default:return this.clone()}},x.endOf=function(w){return this.startOf(w,!1)},x.$set=function(w,h){var i,p=J.p(w),f="set"+(this.$u?"UTC":""),c=(i={},i[y]=f+"Date",i[k]=f+"Date",i[M]=f+"Month",i[C]=f+"FullYear",i[m]=f+"Hours",i[a]=f+"Minutes",i[d]=f+"Seconds",i[l]=f+"Milliseconds",i)[p],v=p===y?this.$D+(h-this.$W):h;if(p===M||p===C){var D=this.clone().set(k,1);D.$d[c](v),D.init(),this.$d=D.set(k,Math.min(this.$D,D.daysInMonth())).$d}else c&&this.$d[c](v);return this.init(),this},x.set=function(w,h){return this.clone().$set(w,h)},x.get=function(w){return this[J.p(w)]()},x.add=function(w,h){var i,p=this;w=Number(w);var f=J.p(h),c=function(T){var q=U(p);return J.w(q.date(q.date()+Math.round(T*w)),p)};if(f===M)return this.set(M,this.$M+w);if(f===C)return this.set(C,this.$y+w);if(f===y)return c(1);if(f===_)return c(7);var v=(i={},i[a]=n,i[m]=s,i[d]=r,i)[f]||1,D=this.$d.getTime()+w*v;return J.w(D,this)},x.subtract=function(w,h){return this.add(-1*w,h)},x.format=function(w){var h=this,i=this.$locale();if(!this.isValid())return i.invalidDate||A;var p=w||"YYYY-MM-DDTHH:mm:ssZ",f=J.z(this),c=this.$H,v=this.$m,D=this.$M,T=i.weekdays,q=i.months,X=i.meridiem,re=function(ie,ue,E,L){return ie&&(ie[ue]||ie(h,p))||E[ue].slice(0,L)},ee=function(ie){return J.s(c%12||12,ie,"0")},ae=X||function(ie,ue,E){var L=ie<12?"AM":"PM";return E?L.toLowerCase():L};return p.replace(F,(function(ie,ue){return ue||(function(E){switch(E){case"YY":return String(h.$y).slice(-2);case"YYYY":return J.s(h.$y,4,"0");case"M":return D+1;case"MM":return J.s(D+1,2,"0");case"MMM":return re(i.monthsShort,D,q,3);case"MMMM":return re(q,D);case"D":return h.$D;case"DD":return J.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return re(i.weekdaysMin,h.$W,T,2);case"ddd":return re(i.weekdaysShort,h.$W,T,3);case"dddd":return T[h.$W];case"H":return String(c);case"HH":return J.s(c,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ae(c,v,!0);case"A":return ae(c,v,!1);case"m":return String(v);case"mm":return J.s(v,2,"0");case"s":return String(h.$s);case"ss":return J.s(h.$s,2,"0");case"SSS":return J.s(h.$ms,3,"0");case"Z":return f}return null})(ie)||f.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(w,h,i){var p,f=this,c=J.p(h),v=U(w),D=(v.utcOffset()-this.utcOffset())*n,T=this-v,q=function(){return J.m(f,v)};switch(c){case C:p=q()/12;break;case M:p=q();break;case S:p=q()/3;break;case _:p=(T-D)/6048e5;break;case y:p=(T-D)/864e5;break;case m:p=T/s;break;case a:p=T/n;break;case d:p=T/r;break;default:p=T}return i?p:J.a(p)},x.daysInMonth=function(){return this.endOf(M).$D},x.$locale=function(){return oe[this.$L]},x.locale=function(w,h){if(!w)return this.$L;var i=this.clone(),p=V(w,h,!0);return p&&(i.$L=p),i},x.clone=function(){return J.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},P})(),ne=se.prototype;return U.prototype=ne,[["$ms",l],["$s",d],["$m",a],["$H",m],["$W",y],["$M",M],["$y",C],["$D",k]].forEach((function(P){ne[P[1]]=function(x){return this.$g(x,P[0],P[1])}})),U.extend=function(P,x){return P.$i||(P(x,se,U),P.$i=!0),U},U.locale=V,U.isDayjs=K,U.unix=function(P){return U(1e3*P)},U.en=oe[te],U.Ls=oe,U.p={},U}))})(cr)),cr.exports}var Ml=Pl();const de=jn(Ml);function Ol({direction:t,levelIndex:e,rowIndex:r,cellIndex:n,size:s}){switch(t){case"up":return e===0&&r===0?null:r===0?{levelIndex:e-1,rowIndex:n<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:n}:{levelIndex:e,rowIndex:r-1,cellIndex:n};case"down":return r===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:n}:r===s[e].length-2&&n>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:n}:{levelIndex:e,rowIndex:r+1,cellIndex:n};case"left":return e===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:n===0?{levelIndex:e,rowIndex:r-1,cellIndex:s[e][r-1]-1}:{levelIndex:e,rowIndex:r,cellIndex:n-1};case"right":return r===s[e].length-1&&n===s[e][r]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:n===s[e][r]-1?{levelIndex:e,rowIndex:r+1,cellIndex:0}:{levelIndex:e,rowIndex:r,cellIndex:n+1};default:return{levelIndex:e,rowIndex:r,cellIndex:n}}}function Qo({controlsRef:t,direction:e,levelIndex:r,rowIndex:n,cellIndex:s,size:l}){const d=Ol({direction:e,size:l,rowIndex:n,cellIndex:s,levelIndex:r});if(!d)return;const a=t.current?.[d.levelIndex]?.[d.rowIndex]?.[d.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?Qo({controlsRef:t,direction:e,levelIndex:d.levelIndex,cellIndex:d.cellIndex,rowIndex:d.rowIndex,size:l}):a.focus())}function Al(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function jl(t){return t.current?.map(e=>e.map(r=>r.length))}function ln({controlsRef:t,levelIndex:e,rowIndex:r,cellIndex:n,event:s}){const l=Al(s.key);if(l){s.preventDefault();const d=jl(t);Qo({controlsRef:t,direction:l,levelIndex:e,rowIndex:r,cellIndex:n,size:d})}}function Ve(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD")}function Zo(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD HH:mm:ss")}const El={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Tl=Z.createContext(El);function gt(){const t=Z.useContext(Tl),e=Z.useCallback(l=>l||t.locale,[t.locale]),r=Z.useCallback(l=>typeof l=="number"?l:t.firstDayOfWeek,[t.firstDayOfWeek]),n=Z.useCallback(l=>Array.isArray(l)?l:t.weekendDays,[t.weekendDays]),s=Z.useCallback(l=>typeof l=="string"?l:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:r,getWeekendDays:n,getLabelSeparator:s}}function Rl({value:t,type:e,withTime:r}){const n=r?Zo:Ve;if(e==="range"&&Array.isArray(t)){const s=n(t[0]),l=n(t[1]);return s?l?`${s} – ${l}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?n(t):""}function Ko({value:t,type:e,name:r,form:n,withTime:s=!1}){return b.jsx("input",{type:"hidden",value:Rl({value:t,type:e,withTime:s}),name:r,form:n})}Ko.displayName="@mantine/dates/HiddenDatesInput";function Jo(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Jo(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Me(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Jo(t))&&(n&&(n+=" "),n+=e);return n}var Xo={day:"m_396ce5cb"};const $l=O.createVarsResolver((t,{size:e})=>({day:{"--day-size":O.getSize(e,"day-size")}})),un=O.factory((t,e)=>{const r=O.useProps("Day",null,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,date:y,disabled:_,__staticSelector:M,weekend:S,outside:C,selected:k,renderDay:A,inRange:N,firstInRange:F,lastInRange:B,hidden:H,static:W,highlightToday:te,attributes:oe,...G}=r,K=O.useStyles({name:M||"Day",classes:Xo,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:oe,vars:m,varsResolver:$l,rootSelector:"day"});return b.jsx(O.UnstyledButton,{...K("day",{style:H?{display:"none"}:void 0}),component:W?"div":"button",ref:e,disabled:_,"data-today":de(y).isSame(new Date,"day")||void 0,"data-hidden":H||void 0,"data-highlight-today":te||void 0,"data-disabled":_||void 0,"data-weekend":!_&&!C&&S||void 0,"data-outside":!_&&C||void 0,"data-selected":!_&&k||void 0,"data-in-range":N&&!_||void 0,"data-first-in-range":F&&!_||void 0,"data-last-in-range":B&&!_||void 0,"data-static":W||void 0,unstyled:a,...G,children:A?.(y)||de(y).date()})});un.classes=Xo,un.displayName="@mantine/dates/Day";function Nl({locale:t,format:e="dd",firstDayOfWeek:r=1}){const n=de().day(r),s=[];for(let l=0;l<7;l+=1)typeof e=="string"?s.push(de(n).add(l,"days").locale(t).format(e)):s.push(e(de(n).add(l,"days").format("YYYY-MM-DD")));return s}var es={weekday:"m_18a3eca"};const Ll=O.createVarsResolver((t,{size:e})=>({weekdaysRow:{"--wr-fz":O.getFontSize(e),"--wr-spacing":O.getSpacing(e)}})),cn=O.factory((t,e)=>{const r=O.useProps("WeekdaysRow",null,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,locale:y,firstDayOfWeek:_,weekdayFormat:M,cellComponent:S="th",__staticSelector:C,withWeekNumbers:k,attributes:A,...N}=r,F=O.useStyles({name:C||"WeekdaysRow",classes:es,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:A,vars:m,varsResolver:Ll,rootSelector:"weekdaysRow"}),B=gt(),H=Nl({locale:B.getLocale(y),format:M,firstDayOfWeek:B.getFirstDayOfWeek(_)}).map((W,te)=>b.jsx(S,{...F("weekday"),children:W},te));return b.jsxs(O.Box,{component:"tr",ref:e,...F("weekdaysRow"),...N,children:[k&&b.jsx(S,{...F("weekday"),children:"#"}),H]})});cn.classes=es,cn.displayName="@mantine/dates/WeekdaysRow";function Bl(t,e=1){let r=de(t);if(!r.isValid())return r;const n=e===0?6:e-1;for(;r.day()!==n;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function Il(t,e=1){let r=de(t);for(;r.day()!==e;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function Yl({month:t,firstDayOfWeek:e=1,consistentWeeks:r}){const n=de(t).subtract(de(t).date()-1,"day"),s=de(n.format("YYYY-M-D")),l=s.format("YYYY-MM-DD"),d=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Bl(d,e),m=[];let y=de(Il(l,e));for(;de(y).isBefore(a,"day");){const _=[];for(let M=0;M<7;M+=1)_.push(y.format("YYYY-MM-DD")),y=y.add(1,"day");m.push(_)}if(r&&m.length<6){const _=m[m.length-1],M=_[_.length-1];let S=de(M).add(1,"day");for(;m.length<6;){const C=[];for(let k=0;k<7;k+=1)C.push(S.format("YYYY-MM-DD")),S=S.add(1,"day");m.push(C)}}return m}function dn(t,e){return de(t).format("YYYY-MM")===de(e).format("YYYY-MM")}function ts(t,e){return e?de(t).isAfter(de(e).subtract(1,"day"),"day"):!0}function rs(t,e){return e?de(t).isBefore(de(e).add(1,"day"),"day"):!0}function zl({dates:t,minDate:e,maxDate:r,getDayProps:n,excludeDate:s,hideOutsideDates:l,month:d}){const a=t.flat().filter(_=>rs(_,r)&&ts(_,e)&&!s?.(_)&&!n?.(_)?.disabled&&(!l||dn(_,d))),m=a.find(_=>n?.(_)?.selected);if(m)return m;const y=a.find(_=>de().isSame(_,"date"));return y||a[0]}var dr={exports:{}},Fl=dr.exports,ns;function Wl(){return ns||(ns=1,(function(t,e){(function(r,n){t.exports=n()})(Fl,(function(){var r="day";return function(n,s,l){var d=function(y){return y.add(4-y.isoWeekday(),r)},a=s.prototype;a.isoWeekYear=function(){return d(this).year()},a.isoWeek=function(y){if(!this.$utils().u(y))return this.add(7*(y-this.isoWeek()),r);var _,M,S,C,k=d(this),A=(_=this.isoWeekYear(),M=this.$u,S=(M?l.utc:l)().year(_).startOf("year"),C=4-S.isoWeekday(),S.isoWeekday()>4&&(C+=7),S.add(C,r));return k.diff(A,"week")+1},a.isoWeekday=function(y){return this.$utils().u(y)?this.day()||7:this.day(this.day()%7?y:y-7)};var m=a.startOf;a.startOf=function(y,_){var M=this.$utils(),S=!!M.u(_)||_;return M.p(y)==="isoweek"?S?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(y,_)}}}))})(dr)),dr.exports}var Ul=Wl();const ql=jn(Ul);de.extend(ql);function Vl(t){const e=t.find(r=>de(r).day()===1);return de(e).isoWeek()}var os={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Hl={withCellSpacing:!0},Gl=O.createVarsResolver((t,{size:e})=>({weekNumber:{"--wn-fz":O.getFontSize(e),"--wn-size":O.getSize(e,"wn-size")}})),hr=O.factory((t,e)=>{const r=O.useProps("Month",Hl,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,__staticSelector:y,locale:_,firstDayOfWeek:M,weekdayFormat:S,month:C,weekendDays:k,getDayProps:A,excludeDate:N,minDate:F,maxDate:B,renderDay:H,hideOutsideDates:W,hideWeekdays:te,getDayAriaLabel:oe,static:G,__getDayRef:K,__onDayKeyDown:V,__onDayClick:U,__onDayMouseEnter:J,__preventFocus:se,__stopPropagation:ne,withCellSpacing:P,size:x,highlightToday:w,withWeekNumbers:h,attributes:i,...p}=r,f=O.useStyles({name:y||"Month",classes:os,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:i,vars:m,varsResolver:Gl,rootSelector:"month"}),c=gt(),v=Yl({month:C,firstDayOfWeek:c.getFirstDayOfWeek(M),consistentWeeks:c.consistentWeeks}),D=zl({dates:v,minDate:Ve(F),maxDate:Ve(B),getDayProps:A,excludeDate:N,hideOutsideDates:W,month:C}),{resolvedClassNames:T,resolvedStyles:q}=O.useResolvedStylesApi({classNames:n,styles:d,props:r}),X=v.map((re,ee)=>{const ae=re.map((ie,ue)=>{const E=!dn(ie,C),L=oe?.(ie)||de(ie).locale(_||c.locale).format("D MMMM YYYY"),R=A?.(ie),Y=de(ie).isSame(D,"date");return b.jsx("td",{...f("monthCell"),"data-with-spacing":P||void 0,children:b.jsx(un,{__staticSelector:y||"Month",classNames:T,styles:q,unstyled:a,"data-mantine-stop-propagation":ne||void 0,highlightToday:w,renderDay:H,date:ie,size:x,weekend:c.getWeekendDays(k).includes(de(ie).get("day")),outside:E,hidden:W?E:!1,"aria-label":L,static:G,disabled:N?.(ie)||!rs(ie,Ve(B))||!ts(ie,Ve(F)),ref:I=>{I&&K?.(ee,ue,I)},...R,onKeyDown:I=>{R?.onKeyDown?.(I),V?.(I,{rowIndex:ee,cellIndex:ue,date:ie})},onMouseEnter:I=>{R?.onMouseEnter?.(I),J?.(I,ie)},onClick:I=>{R?.onClick?.(I),U?.(I,ie)},onMouseDown:I=>{R?.onMouseDown?.(I),se&&I.preventDefault()},tabIndex:se||!Y?-1:0})},ie.toString())});return b.jsxs("tr",{...f("monthRow"),children:[h&&b.jsx("td",{...f("weekNumber"),children:Vl(re)}),ae]},ee)});return b.jsxs(O.Box,{component:"table",...f("month"),size:x,ref:e,...p,children:[!te&&b.jsx("thead",{...f("monthThead"),children:b.jsx(cn,{__staticSelector:y||"Month",locale:_,firstDayOfWeek:M,weekdayFormat:S,size:x,classNames:T,styles:q,unstyled:a,withWeekNumbers:h})}),b.jsx("tbody",{...f("monthTbody"),children:X})]})});hr.classes=os,hr.displayName="@mantine/dates/Month";var ss={pickerControl:"m_dc6a3c71"};const Ql=O.createVarsResolver((t,{size:e})=>({pickerControl:{"--dpc-fz":O.getFontSize(e),"--dpc-size":O.getSize(e,"dpc-size")}})),fr=O.factory((t,e)=>{const r=O.useProps("PickerControl",null,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,firstInRange:y,lastInRange:_,inRange:M,__staticSelector:S,selected:C,disabled:k,attributes:A,...N}=r,F=O.useStyles({name:S||"PickerControl",classes:ss,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:A,vars:m,varsResolver:Ql,rootSelector:"pickerControl"});return b.jsx(O.UnstyledButton,{...F("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":C&&!k||void 0,"data-disabled":k||void 0,"data-in-range":M&&!k&&!C||void 0,"data-first-in-range":y&&!k||void 0,"data-last-in-range":_&&!k||void 0,disabled:k,...N})});fr.classes=ss,fr.displayName="@mantine/dates/PickerControl";function is({year:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"year")||r&&de(t).isAfter(r,"year"))}function Zl({years:t,minDate:e,maxDate:r,getYearControlProps:n}){const s=t.flat().filter(a=>!is({year:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),l=s.find(a=>n?.(a)?.selected);if(l)return l;const d=s.find(a=>de().isSame(a,"year"));return d||s[0]}function as(t){const e=de(t).year(),r=e-e%10;let n=0;const s=[[],[],[],[]];for(let l=0;l<4;l+=1){const d=l===3?1:3;for(let a=0;a<d;a+=1)s[l].push(de(new Date(r+n,0)).format("YYYY-MM-DD")),n+=1}return s}var ls={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Kl={yearsListFormat:"YYYY",withCellSpacing:!0},pr=O.factory((t,e)=>{const r=O.useProps("YearsList",Kl,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,decade:y,yearsListFormat:_,locale:M,minDate:S,maxDate:C,getYearControlProps:k,__staticSelector:A,__getControlRef:N,__onControlKeyDown:F,__onControlClick:B,__onControlMouseEnter:H,__preventFocus:W,__stopPropagation:te,withCellSpacing:oe,size:G,attributes:K,...V}=r,U=O.useStyles({name:A||"YearsList",classes:ls,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:K,vars:m,rootSelector:"yearsList"}),J=gt(),se=as(y),ne=Zl({years:se,minDate:S,maxDate:C,getYearControlProps:k}),P=se.map((x,w)=>{const h=x.map((i,p)=>{const f=k?.(i),c=de(i).isSame(ne,"year");return b.jsx("td",{...U("yearsListCell"),"data-with-spacing":oe||void 0,children:b.jsx(fr,{...U("yearsListControl"),size:G,unstyled:a,"data-mantine-stop-propagation":te||void 0,disabled:is({year:i,minDate:S,maxDate:C}),ref:v=>{v&&N?.(w,p,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:w,cellIndex:p,date:i})},onClick:v=>{f?.onClick?.(v),B?.(v,i)},onMouseEnter:v=>{f?.onMouseEnter?.(v),H?.(v,i)},onMouseDown:v=>{f?.onMouseDown?.(v),W&&v.preventDefault()},tabIndex:W||!c?-1:0,children:de(i).locale(J.getLocale(M)).format(_)})},p)});return b.jsx("tr",{...U("yearsListRow"),children:h},w)});return b.jsx(O.Box,{component:"table",ref:e,size:G,...U("yearsList"),...V,children:b.jsx("tbody",{children:P})})});pr.classes=ls,pr.displayName="@mantine/dates/YearsList";function us({month:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"month")||r&&de(t).isAfter(r,"month"))}function Jl({months:t,minDate:e,maxDate:r,getMonthControlProps:n}){const s=t.flat().filter(a=>!us({month:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),l=s.find(a=>n?.(a)?.selected);if(l)return l;const d=s.find(a=>de().isSame(a,"month"));return d||s[0]}function Xl(t){const e=de(t).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let l=0;l<3;l+=1)r[s].push(de(e).add(n,"months").format("YYYY-MM-DD")),n+=1;return r}var cs={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const eu={monthsListFormat:"MMM",withCellSpacing:!0},gr=O.factory((t,e)=>{const r=O.useProps("MonthsList",eu,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,__staticSelector:y,year:_,monthsListFormat:M,locale:S,minDate:C,maxDate:k,getMonthControlProps:A,__getControlRef:N,__onControlKeyDown:F,__onControlClick:B,__onControlMouseEnter:H,__preventFocus:W,__stopPropagation:te,withCellSpacing:oe,size:G,attributes:K,...V}=r,U=O.useStyles({name:y||"MonthsList",classes:cs,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:K,vars:m,rootSelector:"monthsList"}),J=gt(),se=Xl(_),ne=Jl({months:se,minDate:Ve(C),maxDate:Ve(k),getMonthControlProps:A}),P=se.map((x,w)=>{const h=x.map((i,p)=>{const f=A?.(i),c=de(i).isSame(ne,"month");return b.jsx("td",{...U("monthsListCell"),"data-with-spacing":oe||void 0,children:b.jsx(fr,{...U("monthsListControl"),size:G,unstyled:a,__staticSelector:y||"MonthsList","data-mantine-stop-propagation":te||void 0,disabled:us({month:i,minDate:Ve(C),maxDate:Ve(k)}),ref:v=>{v&&N?.(w,p,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:w,cellIndex:p,date:i})},onClick:v=>{f?.onClick?.(v),B?.(v,i)},onMouseEnter:v=>{f?.onMouseEnter?.(v),H?.(v,i)},onMouseDown:v=>{f?.onMouseDown?.(v),W&&v.preventDefault()},tabIndex:W||!c?-1:0,children:de(i).locale(J.getLocale(S)).format(M)})},p)});return b.jsx("tr",{...U("monthsListRow"),children:h},w)});return b.jsx(O.Box,{component:"table",ref:e,size:G,...U("monthsList"),...V,children:b.jsx("tbody",{children:P})})});gr.classes=cs,gr.displayName="@mantine/dates/MonthsList";var ds={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const tu={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},ru=O.createVarsResolver((t,{size:e})=>({calendarHeader:{"--dch-control-size":O.getSize(e,"dch-control-size"),"--dch-fz":O.getFontSize(e)}})),mt=O.factory((t,e)=>{const r=O.useProps("CalendarHeader",tu,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,nextIcon:y,previousIcon:_,nextLabel:M,previousLabel:S,onNext:C,onPrevious:k,onLevelClick:A,label:N,nextDisabled:F,previousDisabled:B,hasNextLevel:H,levelControlAriaLabel:W,withNext:te,withPrevious:oe,headerControlsOrder:G,__staticSelector:K,__preventFocus:V,__stopPropagation:U,attributes:J,...se}=r,ne=O.useStyles({name:K||"CalendarHeader",classes:ds,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:J,vars:m,varsResolver:ru,rootSelector:"calendarHeader"}),P=V?p=>p.preventDefault():void 0,x=oe&&Z.createElement(O.UnstyledButton,{...ne("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":S,onClick:k,unstyled:a,onMouseDown:P,disabled:B,"data-disabled":B||void 0,tabIndex:V||B?-1:0,"data-mantine-stop-propagation":U||void 0},_||b.jsx(O.AccordionChevron,{...ne("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),w=Z.createElement(O.UnstyledButton,{component:H?"button":"div",...ne("calendarHeaderLevel"),key:"level",onClick:H?A:void 0,unstyled:a,onMouseDown:H?P:void 0,disabled:!H,"data-static":!H||void 0,"aria-label":W,tabIndex:V||!H?-1:0,"data-mantine-stop-propagation":U||void 0},N),h=te&&Z.createElement(O.UnstyledButton,{...ne("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":M,onClick:C,unstyled:a,onMouseDown:P,disabled:F,"data-disabled":F||void 0,tabIndex:V||F?-1:0,"data-mantine-stop-propagation":U||void 0},y||b.jsx(O.AccordionChevron,{...ne("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),i=G.map(p=>p==="previous"?x:p==="level"?w:p==="next"?h:null);return b.jsx(O.Box,{...ne("calendarHeader"),ref:e,...se,children:i})});mt.classes=ds,mt.displayName="@mantine/dates/CalendarHeader";function nu(t){const e=as(t);return[e[0][0],e[3][0]]}const ou={decadeLabelFormat:"YYYY"},mr=O.factory((t,e)=>{const r=O.useProps("DecadeLevel",ou,t),{decade:n,locale:s,minDate:l,maxDate:d,yearsListFormat:a,getYearControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,withCellSpacing:C,__preventFocus:k,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,nextDisabled:te,previousDisabled:oe,levelControlAriaLabel:G,withNext:K,withPrevious:V,headerControlsOrder:U,decadeLabelFormat:J,classNames:se,styles:ne,unstyled:P,__staticSelector:x,__stopPropagation:w,size:h,attributes:i,...p}=r,f=gt(),[c,v]=nu(n),D={__staticSelector:x||"DecadeLevel",classNames:se,styles:ne,unstyled:P,size:h,attributes:i},T=typeof te=="boolean"?te:d?!de(v).endOf("year").isBefore(d):!1,q=typeof oe=="boolean"?oe:l?!de(c).startOf("year").isAfter(l):!1,X=(re,ee)=>de(re).locale(s||f.locale).format(ee);return b.jsxs(O.Box,{"data-decade-level":!0,size:h,ref:e,...p,children:[b.jsx(mt,{label:typeof J=="function"?J(c,v):`${X(c,J)} – ${X(v,J)}`,__preventFocus:k,__stopPropagation:w,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,nextDisabled:T,previousDisabled:q,hasNextLevel:!1,levelControlAriaLabel:G,withNext:K,withPrevious:V,headerControlsOrder:U,...D}),b.jsx(pr,{decade:n,locale:s,minDate:l,maxDate:d,yearsListFormat:a,getYearControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,__preventFocus:k,__stopPropagation:w,withCellSpacing:C,...D})]})});mr.classes={...pr.classes,...mt.classes},mr.displayName="@mantine/dates/DecadeLevel";const su={yearLabelFormat:"YYYY"},yr=O.factory((t,e)=>{const r=O.useProps("YearLevel",su,t),{year:n,locale:s,minDate:l,maxDate:d,monthsListFormat:a,getMonthControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,withCellSpacing:C,__preventFocus:k,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,onLevelClick:te,nextDisabled:oe,previousDisabled:G,hasNextLevel:K,levelControlAriaLabel:V,withNext:U,withPrevious:J,headerControlsOrder:se,yearLabelFormat:ne,__staticSelector:P,__stopPropagation:x,size:w,classNames:h,styles:i,unstyled:p,attributes:f,...c}=r,v=gt(),D={__staticSelector:P||"YearLevel",classNames:h,styles:i,unstyled:p,size:w,attributes:f},T=typeof oe=="boolean"?oe:d?!de(n).endOf("year").isBefore(d):!1,q=typeof G=="boolean"?G:l?!de(n).startOf("year").isAfter(l):!1;return b.jsxs(O.Box,{"data-year-level":!0,size:w,ref:e,...c,children:[b.jsx(mt,{label:typeof ne=="function"?ne(n):de(n).locale(s||v.locale).format(ne),__preventFocus:k,__stopPropagation:x,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,onLevelClick:te,nextDisabled:T,previousDisabled:q,hasNextLevel:K,levelControlAriaLabel:V,withNext:U,withPrevious:J,headerControlsOrder:se,...D}),b.jsx(gr,{year:n,locale:s,minDate:l,maxDate:d,monthsListFormat:a,getMonthControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,__preventFocus:k,__stopPropagation:x,withCellSpacing:C,...D})]})});yr.classes={...mt.classes,...gr.classes},yr.displayName="@mantine/dates/YearLevel";const iu={monthLabelFormat:"MMMM YYYY"},vr=O.factory((t,e)=>{const r=O.useProps("MonthLevel",iu,t),{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:d,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__getDayRef:N,__onDayKeyDown:F,__onDayClick:B,__onDayMouseEnter:H,withCellSpacing:W,highlightToday:te,withWeekNumbers:oe,__preventFocus:G,__stopPropagation:K,nextIcon:V,previousIcon:U,nextLabel:J,previousLabel:se,onNext:ne,onPrevious:P,onLevelClick:x,nextDisabled:w,previousDisabled:h,hasNextLevel:i,levelControlAriaLabel:p,withNext:f,withPrevious:c,headerControlsOrder:v,monthLabelFormat:D,classNames:T,styles:q,unstyled:X,__staticSelector:re,size:ee,static:ae,attributes:ie,...ue}=r,E=gt(),L={__staticSelector:re||"MonthLevel",classNames:T,styles:q,unstyled:X,size:ee,attributes:ie},R=typeof w=="boolean"?w:M?!de(n).endOf("month").isBefore(M):!1,Y=typeof h=="boolean"?h:_?!de(n).startOf("month").isAfter(_):!1;return b.jsxs(O.Box,{"data-month-level":!0,size:ee,ref:e,...ue,children:[b.jsx(mt,{label:typeof D=="function"?D(n):de(n).locale(s||E.locale).format(D),__preventFocus:G,__stopPropagation:K,nextIcon:V,previousIcon:U,nextLabel:J,previousLabel:se,onNext:ne,onPrevious:P,onLevelClick:x,nextDisabled:R,previousDisabled:Y,hasNextLevel:i,levelControlAriaLabel:p,withNext:f,withPrevious:c,headerControlsOrder:v,...L}),b.jsx(hr,{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:d,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__getDayRef:N,__onDayKeyDown:F,__onDayClick:B,__onDayMouseEnter:H,__preventFocus:G,__stopPropagation:K,static:ae,withCellSpacing:W,highlightToday:te,withWeekNumbers:oe,...L})]})});vr.classes={...hr.classes,...mt.classes},vr.displayName="@mantine/dates/MonthLevel";var hs={levelsGroup:"m_30b26e33"};const yt=O.factory((t,e)=>{const r=O.useProps("LevelsGroup",null,t),{classNames:n,className:s,style:l,styles:d,unstyled:a,vars:m,__staticSelector:y,attributes:_,...M}=r,S=O.useStyles({name:y||"LevelsGroup",classes:hs,props:r,className:s,style:l,classNames:n,styles:d,unstyled:a,attributes:_,vars:m,rootSelector:"levelsGroup"});return b.jsx(O.Box,{ref:e,...S("levelsGroup"),...M})});yt.classes=hs,yt.displayName="@mantine/dates/LevelsGroup";const au={numberOfColumns:1},br=O.factory((t,e)=>{const r=O.useProps("DecadeLevelGroup",au,t),{decade:n,locale:s,minDate:l,maxDate:d,yearsListFormat:a,getYearControlProps:m,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,nextDisabled:H,previousDisabled:W,headerControlsOrder:te,classNames:oe,styles:G,unstyled:K,__staticSelector:V,__stopPropagation:U,numberOfColumns:J,levelControlAriaLabel:se,decadeLabelFormat:ne,size:P,vars:x,attributes:w,...h}=r,i=Z.useRef([]),p=Array(J).fill(0).map((f,c)=>{const v=de(n).add(c*10,"years").format("YYYY-MM-DD");return b.jsx(mr,{size:P,yearsListFormat:a,decade:v,withNext:c===J-1,withPrevious:c===0,decadeLabelFormat:ne,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(D,T)=>ln({levelIndex:c,rowIndex:T.rowIndex,cellIndex:T.cellIndex,event:D,controlsRef:i}),__getControlRef:(D,T,q)=>{Array.isArray(i.current[c])||(i.current[c]=[]),Array.isArray(i.current[c][D])||(i.current[c][D]=[]),i.current[c][D][T]=q},levelControlAriaLabel:typeof se=="function"?se(v):se,locale:s,minDate:l,maxDate:d,__preventFocus:S,__stopPropagation:U,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,nextDisabled:H,previousDisabled:W,getYearControlProps:m,__staticSelector:V||"DecadeLevelGroup",classNames:oe,styles:G,unstyled:K,withCellSpacing:M,headerControlsOrder:te,attributes:w},c)});return b.jsx(yt,{classNames:oe,styles:G,__staticSelector:V||"DecadeLevelGroup",ref:e,size:P,unstyled:K,attributes:w,...h,children:p})});br.classes={...yt.classes,...mr.classes},br.displayName="@mantine/dates/DecadeLevelGroup";const lu={numberOfColumns:1},wr=O.factory((t,e)=>{const r=O.useProps("YearLevelGroup",lu,t),{year:n,locale:s,minDate:l,maxDate:d,monthsListFormat:a,getMonthControlProps:m,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,onLevelClick:H,nextDisabled:W,previousDisabled:te,hasNextLevel:oe,headerControlsOrder:G,classNames:K,styles:V,unstyled:U,__staticSelector:J,__stopPropagation:se,numberOfColumns:ne,levelControlAriaLabel:P,yearLabelFormat:x,size:w,vars:h,attributes:i,...p}=r,f=Z.useRef([]),c=Array(ne).fill(0).map((v,D)=>{const T=de(n).add(D,"years").format("YYYY-MM-DD");return b.jsx(yr,{size:w,monthsListFormat:a,year:T,withNext:D===ne-1,withPrevious:D===0,yearLabelFormat:x,__stopPropagation:se,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(q,X)=>ln({levelIndex:D,rowIndex:X.rowIndex,cellIndex:X.cellIndex,event:q,controlsRef:f}),__getControlRef:(q,X,re)=>{Array.isArray(f.current[D])||(f.current[D]=[]),Array.isArray(f.current[D][q])||(f.current[D][q]=[]),f.current[D][q][X]=re},levelControlAriaLabel:typeof P=="function"?P(T):P,locale:s,minDate:l,maxDate:d,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,onLevelClick:H,nextDisabled:W,previousDisabled:te,hasNextLevel:oe,getMonthControlProps:m,classNames:K,styles:V,unstyled:U,__staticSelector:J||"YearLevelGroup",withCellSpacing:M,headerControlsOrder:G,attributes:i},D)});return b.jsx(yt,{classNames:K,styles:V,__staticSelector:J||"YearLevelGroup",ref:e,size:w,unstyled:U,attributes:i,...p,children:c})});wr.classes={...yr.classes,...yt.classes},wr.displayName="@mantine/dates/YearLevelGroup";const uu={numberOfColumns:1},_r=O.factory((t,e)=>{const r=O.useProps("MonthLevelGroup",uu,t),{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:d,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__onDayClick:N,__onDayMouseEnter:F,withCellSpacing:B,highlightToday:H,withWeekNumbers:W,__preventFocus:te,nextIcon:oe,previousIcon:G,nextLabel:K,previousLabel:V,onNext:U,onPrevious:J,onLevelClick:se,nextDisabled:ne,previousDisabled:P,hasNextLevel:x,headerControlsOrder:w,classNames:h,styles:i,unstyled:p,numberOfColumns:f,levelControlAriaLabel:c,monthLabelFormat:v,__staticSelector:D,__stopPropagation:T,size:q,static:X,vars:re,attributes:ee,...ae}=r,ie=Z.useRef([]),ue=Array(f).fill(0).map((E,L)=>{const R=de(n).add(L,"months").format("YYYY-MM-DD");return b.jsx(vr,{month:R,withNext:L===f-1,withPrevious:L===0,monthLabelFormat:v,__stopPropagation:T,__onDayClick:N,__onDayMouseEnter:F,__onDayKeyDown:(Y,I)=>ln({levelIndex:L,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:Y,controlsRef:ie}),__getDayRef:(Y,I,ce)=>{Array.isArray(ie.current[L])||(ie.current[L]=[]),Array.isArray(ie.current[L][Y])||(ie.current[L][Y]=[]),ie.current[L][Y][I]=ce},levelControlAriaLabel:typeof c=="function"?c(R):c,locale:s,firstDayOfWeek:l,weekdayFormat:d,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__preventFocus:te,nextIcon:oe,previousIcon:G,nextLabel:K,previousLabel:V,onNext:U,onPrevious:J,onLevelClick:se,nextDisabled:ne,previousDisabled:P,hasNextLevel:x,classNames:h,styles:i,unstyled:p,__staticSelector:D||"MonthLevelGroup",size:q,static:X,withCellSpacing:B,highlightToday:H,withWeekNumbers:W,headerControlsOrder:w,attributes:ee},L)});return b.jsx(yt,{classNames:h,styles:i,__staticSelector:D||"MonthLevelGroup",ref:e,size:q,attributes:ee,...ae,children:ue})});_r.classes={...yt.classes,...vr.classes},_r.displayName="@mantine/dates/MonthLevelGroup";const fs=t=>t==="range"?[null,null]:t==="multiple"?[]:null,ps=(t,e)=>{const r=e?Zo:Ve;return Array.isArray(t)?t.map(r):r(t)};function hn({type:t,value:e,defaultValue:r,onChange:n,withTime:s=!1}){const l=Z.useRef(t),[d,a,m]=Le.useUncontrolled({value:ps(e,s),defaultValue:ps(r,s),finalValue:fs(t),onChange:n});let y=d;return l.current!==t&&(l.current=t,e===void 0&&(y=r!==void 0?r:fs(t),a(y))),[y,a,m]}function fn(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function cu(t){return t===0?"month":t===1?"year":"decade"}function Gt(t,e,r){return cu(Le.clamp(fn(t,0),fn(e,0),fn(r,2)))}const du={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},xr=O.factory((t,e)=>{const r=O.useProps("Calendar",du,t),{vars:n,maxLevel:s,minLevel:l,defaultLevel:d,level:a,onLevelChange:m,date:y,defaultDate:_,onDateChange:M,numberOfColumns:S,columnsToScroll:C,ariaLabels:k,nextLabel:A,previousLabel:N,onYearSelect:F,onMonthSelect:B,onYearMouseEnter:H,onMonthMouseEnter:W,headerControlsOrder:te,__updateDateOnYearSelect:oe,__updateDateOnMonthSelect:G,__setDateRef:K,__setLevelRef:V,firstDayOfWeek:U,weekdayFormat:J,weekendDays:se,getDayProps:ne,excludeDate:P,renderDay:x,hideOutsideDates:w,hideWeekdays:h,getDayAriaLabel:i,monthLabelFormat:p,nextIcon:f,previousIcon:c,__onDayClick:v,__onDayMouseEnter:D,withCellSpacing:T,highlightToday:q,withWeekNumbers:X,monthsListFormat:re,getMonthControlProps:ee,yearLabelFormat:ae,yearsListFormat:ie,getYearControlProps:ue,decadeLabelFormat:E,classNames:L,styles:R,unstyled:Y,minDate:I,maxDate:ce,locale:o,__staticSelector:u,size:g,__preventFocus:j,__stopPropagation:$,onNextDecade:z,onPreviousDecade:le,onNextYear:he,onPreviousYear:pe,onNextMonth:Q,onPreviousMonth:fe,static:me,enableKeyboardNavigation:ge,attributes:Se,...Ce}=r,{resolvedClassNames:De,resolvedStyles:He}=O.useResolvedStylesApi({classNames:L,styles:R,props:r}),[$e,ke]=Le.useUncontrolled({value:a?Gt(a,l,s):void 0,defaultValue:d?Gt(d,l,s):void 0,finalValue:Gt(void 0,l,s),onChange:m}),[Ct,je]=hn({type:"default",value:Ve(y),defaultValue:Ve(_),onChange:M});Z.useImperativeHandle(K,()=>ve=>{je(ve)}),Z.useImperativeHandle(V,()=>ve=>{ke(ve)});const Ge={__staticSelector:u||"Calendar",styles:He,classNames:De,unstyled:Y,size:g,attributes:Se},Ye=C||S||1,tt=new Date,nt=I&&de(tt).isAfter(I)?I:de(tt).format("YYYY-MM-DD"),Ee=Ct||nt,ot=()=>{const ve=de(Ee).add(Ye,"month").format("YYYY-MM-DD");Q?.(ve),je(ve)},st=()=>{const ve=de(Ee).subtract(Ye,"month").format("YYYY-MM-DD");fe?.(ve),je(ve)},Qe=()=>{const ve=de(Ee).add(Ye,"year").format("YYYY-MM-DD");he?.(ve),je(ve)},Ze=()=>{const ve=de(Ee).subtract(Ye,"year").format("YYYY-MM-DD");pe?.(ve),je(ve)},it=()=>{const ve=de(Ee).add(10*Ye,"year").format("YYYY-MM-DD");z?.(ve),je(ve)},ut=()=>{const ve=de(Ee).subtract(10*Ye,"year").format("YYYY-MM-DD");le?.(ve),je(ve)},rt=Z.useRef(null);Z.useEffect(()=>{if(!ge||me)return;const ve=Oe=>{if(!rt.current?.contains(document.activeElement))return;const lt=Oe.ctrlKey||Oe.metaKey,vt=Oe.shiftKey;switch(Oe.key){case"ArrowUp":lt&&vt?(Oe.preventDefault(),ut()):lt&&(Oe.preventDefault(),Ze());break;case"ArrowDown":lt&&vt?(Oe.preventDefault(),it()):lt&&(Oe.preventDefault(),Qe());break;case"y":case"Y":$e==="month"&&(Oe.preventDefault(),ke("year"));break}};return document.addEventListener("keydown",ve),()=>{document.removeEventListener("keydown",ve)}},[ge,me,$e,Qe,Ze,it,ut]);const at=ve=>{rt.current=ve,typeof e=="function"?e(ve):e&&(e.current=ve)};return b.jsxs(O.Box,{ref:at,size:g,"data-calendar":!0,...Ce,children:[$e==="month"&&b.jsx(_r,{month:Ee,minDate:I,maxDate:ce,firstDayOfWeek:U,weekdayFormat:J,weekendDays:se,getDayProps:ne,excludeDate:P,renderDay:x,hideOutsideDates:w,hideWeekdays:h,getDayAriaLabel:i,onNext:ot,onPrevious:st,hasNextLevel:s!=="month",onLevelClick:()=>ke("year"),numberOfColumns:S,locale:o,levelControlAriaLabel:k?.monthLevelControl,nextLabel:k?.nextMonth??A,nextIcon:f,previousLabel:k?.previousMonth??N,previousIcon:c,monthLabelFormat:p,__onDayClick:v,__onDayMouseEnter:D,__preventFocus:j,__stopPropagation:$,static:me,withCellSpacing:T,highlightToday:q,withWeekNumbers:X,headerControlsOrder:te,...Ge}),$e==="year"&&b.jsx(wr,{year:Ee,numberOfColumns:S,minDate:I,maxDate:ce,monthsListFormat:re,getMonthControlProps:ee,locale:o,onNext:Qe,onPrevious:Ze,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>ke("decade"),levelControlAriaLabel:k?.yearLevelControl,nextLabel:k?.nextYear??A,nextIcon:f,previousLabel:k?.previousYear??N,previousIcon:c,yearLabelFormat:ae,__onControlMouseEnter:W,__onControlClick:(ve,Oe)=>{G&&je(Oe),ke(Gt("month",l,s)),B?.(Oe)},__preventFocus:j,__stopPropagation:$,withCellSpacing:T,headerControlsOrder:te,...Ge}),$e==="decade"&&b.jsx(br,{decade:Ee,minDate:I,maxDate:ce,yearsListFormat:ie,getYearControlProps:ue,locale:o,onNext:it,onPrevious:ut,numberOfColumns:S,nextLabel:k?.nextDecade??A,nextIcon:f,previousLabel:k?.previousDecade??N,previousIcon:c,decadeLabelFormat:E,__onControlMouseEnter:H,__onControlClick:(ve,Oe)=>{oe&&je(Oe),ke(Gt("year",l,s)),F?.(Oe)},__preventFocus:j,__stopPropagation:$,withCellSpacing:T,headerControlsOrder:te,...Ge})]})});xr.classes={...br.classes,...wr.classes,..._r.classes},xr.displayName="@mantine/dates/Calendar";function hu(t){const{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:l,nextIcon:d,previousIcon:a,date:m,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:S,ariaLabels:C,nextLabel:k,previousLabel:A,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:B,onMonthMouseEnter:H,onNextMonth:W,onPreviousMonth:te,onNextYear:oe,onPreviousYear:G,onNextDecade:K,onPreviousDecade:V,withCellSpacing:U,highlightToday:J,__updateDateOnYearSelect:se,__updateDateOnMonthSelect:ne,__setDateRef:P,__setLevelRef:x,withWeekNumbers:w,headerControlsOrder:h,firstDayOfWeek:i,weekdayFormat:p,weekendDays:f,getDayProps:c,excludeDate:v,renderDay:D,hideOutsideDates:T,hideWeekdays:q,getDayAriaLabel:X,monthLabelFormat:re,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:ie,yearsListFormat:ue,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:R,allowDeselect:Y,minDate:I,maxDate:ce,locale:o,...u}=t;return{calendarProps:{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:l,nextIcon:d,previousIcon:a,date:m,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:S,ariaLabels:C,nextLabel:k,previousLabel:A,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:B,onMonthMouseEnter:H,onNextMonth:W,onPreviousMonth:te,onNextYear:oe,onPreviousYear:G,onNextDecade:K,onPreviousDecade:V,withCellSpacing:U,highlightToday:J,__updateDateOnYearSelect:se,__updateDateOnMonthSelect:ne,__setDateRef:P,withWeekNumbers:w,headerControlsOrder:h,firstDayOfWeek:i,weekdayFormat:p,weekendDays:f,getDayProps:c,excludeDate:v,renderDay:D,hideOutsideDates:T,hideWeekdays:q,getDayAriaLabel:X,monthLabelFormat:re,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:ie,yearsListFormat:ue,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:R,allowDeselect:Y,minDate:I,maxDate:ce,locale:o},others:u}}function fu(t){if(t===null)return null;const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:de(e).format("YYYY-MM-DD")}function pu({date:t,maxDate:e,minDate:r}){return!(t==null||Number.isNaN(new Date(t).getTime())||e&&de(t).isAfter(e,"date")||r&&de(t).isBefore(r,"date"))}const gu={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},Cr=O.factory((t,e)=>{const r=O.useInputProps("DateInput",gu,t),{inputProps:n,wrapperProps:s,value:l,defaultValue:d,onChange:a,clearable:m,clearButtonProps:y,popoverProps:_,getDayProps:M,locale:S,valueFormat:C,dateParser:k,minDate:A,maxDate:N,fixOnBlur:F,onFocus:B,onBlur:H,onClick:W,onKeyDown:te,readOnly:oe,name:G,form:K,rightSection:V,unstyled:U,classNames:J,styles:se,allowDeselect:ne,date:P,defaultDate:x,onDateChange:w,getMonthControlProps:h,getYearControlProps:i,disabled:p,...f}=r,c=Z.useRef(null),v=Z.useRef(null),[D,T]=Z.useState(!1),{calendarProps:q,others:X}=hu(f),re=gt(),ae=k||(Q=>{const fe=de(Q,C,re.getLocale(S)).toDate();return Number.isNaN(fe.getTime())?fu(Q):de(fe).format("YYYY-MM-DD")}),ie=ne!==void 0?ne:m,ue=Q=>Q?de(Q).locale(re.getLocale(S)).format(C):"",[E,L,R]=hn({type:"default",value:l,defaultValue:d,onChange:a}),[Y,I]=hn({type:"default",value:P,defaultValue:d||x,onChange:w});Z.useEffect(()=>{R&&l!==null&&I(l)},[R,l]);const[ce,o]=Z.useState(ue(E));Z.useEffect(()=>{o(ue(E))},[re.getLocale(S)]);const u=Q=>{const fe=Q.currentTarget.value;if(o(fe),T(!0),fe.trim()===""&&(ne||m))L(null);else{const me=ae(fe);me&&pu({date:me,minDate:A,maxDate:N})&&(L(me),I(me))}},g=Q=>{H?.(Q),T(!1),F&&o(ue(E))},j=Q=>{B?.(Q),T(!0)},$=Q=>{W?.(Q),T(!0)},z=Q=>{Q.key==="Escape"&&T(!1),te?.(Q)},le=Q=>({...M?.(Q),selected:de(E).isSame(Q,"day"),onClick:fe=>{M?.(Q).onClick?.(fe);const me=ie&&de(E).isSame(Q,"day")?null:Q;L(me),!R&&me&&o(ue(me)),T(!1)}}),he=b.jsx(O.Input.ClearButton,{onClick:()=>{L(null),!R&&o(""),T(!1)},unstyled:U,...y}),pe=m&&!!E&&!oe&&!p;return Le.useDidUpdate(()=>{E!==void 0&&!D&&o(ue(E))},[E]),Le.useClickOutside(()=>T(!1),void 0,[c.current,v.current]),b.jsxs(b.Fragment,{children:[b.jsx(O.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:c,children:b.jsxs(O.Popover,{opened:D,trapFocus:!1,position:"bottom-start",disabled:oe||p,withRoles:!1,unstyled:U,..._,children:[b.jsx(O.Popover.Target,{children:b.jsx(O.Input,{"data-dates-input":!0,"data-read-only":oe||void 0,autoComplete:"off",ref:e,value:ce,onChange:u,onBlur:g,onFocus:j,onClick:$,onKeyDown:z,readOnly:oe,rightSection:V,__clearSection:he,__clearable:pe,...n,...X,disabled:p,__staticSelector:"DateInput"})}),b.jsx(O.Popover.Dropdown,{onMouseDown:Q=>Q.preventDefault(),"data-dates-dropdown":!0,ref:v,children:b.jsx(xr,{__staticSelector:"DateInput",...q,classNames:J,styles:se,unstyled:U,__preventFocus:!0,minDate:A,maxDate:N,locale:S,getDayProps:le,size:n.size,date:Y,onDateChange:I,getMonthControlProps:Q=>({selected:typeof E=="string"?dn(Q,E):!1,...h?.(Q)}),getYearControlProps:Q=>({selected:typeof E=="string"?de(Q).isSame(E,"year"):!1,...i?.(Q)}),attributes:s.attributes})})]})}),b.jsx(Ko,{name:G,form:K,value:E,type:"default"})]})});Cr.classes={...O.Input.classes,...xr.classes},Cr.displayName="@mantine/dates/DateInput";function gs(t){const e=Fe.c(49),{fields:r,onClose:n,queryKey:s,apiPath:l,steps:d,onCreated:a}=t,[m,y]=Z.useState(0),[_,M]=Z.useState(!1),[S,C]=Z.useState(),{mutateAsync:k,isError:A,error:N,isPending:F}=Vo(l,s),{mutateAsync:B,isPending:H}=an(l,s),W=F||H;let te;e[0]!==r?(te=new Set(r.filter(bu).map(vu)),e[0]=r,e[1]=te):te=e[1];let oe;e[2]!==te?(oe=[...te],e[2]=te,e[3]=oe):oe=e[3];const G=oe;let K;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=function(D,T){return typeof D.required=="function"?D.required(T??{}):!!D.required},e[4]=K):K=e[4];const V=K;let U;e[5]!==r?(U=r.reduce(yu,{}),e[5]=r,e[6]=U):U=e[6];let J;if(e[7]!==r){let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(D,T)=>(D[T.id]=(q,X)=>T.conditional&&!T.conditional(X)||!V(T,X)||q?null:"Pflichtfeld",D),e[9]=v):v=e[9],J=r.filter(mu).reduce(v,{}),e[7]=r,e[8]=J}else J=e[8];let se;e[10]!==U||e[11]!==J?(se={mode:"uncontrolled",initialValues:U,validate:J},e[10]=U,e[11]=J,e[12]=se):se=e[12];const ne=An.useForm(se);let P;e[13]!==ne||e[14]!==S?(P=function(D){const T=ne.getValues();if(D.conditional&&!D.conditional(T))return null;const q=V(D,T);return b.jsxs(Z.Fragment,{children:[(D.type===void 0||D.type=="text")&&b.jsx(O.TextInput,{label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),type:D.id.includes("email")?"email":void 0,required:q},ne.key(D.id)),D.type==="number"&&b.jsx(O.NumberInput,{decimalSeparator:",",label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),required:q},ne.key(D.id)),D.type==="date"&&b.jsx(Cr,{label:D.column.title,placeholder:D.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...ne.getInputProps(D.id),required:q},ne.key(D.id)),D.type==="boolean"&&b.jsx(O.Checkbox,{mt:"md",label:D.column.title,...ne.getInputProps(D.id,{type:"checkbox"}),required:q},ne.key(D.id)),D.type==="textarea"&&b.jsx(O.Textarea,{label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),minRows:3,autosize:!0,required:q},ne.key(D.id)),D.type==="custom"&&D.render&&D.render({...ne.getValues(),...S&&{id:S}},ne.setValues,M,{error:ne.getInputProps(D.id).error,required:q})]},D.id)},e[13]=ne,e[14]=S,e[15]=P):P=e[15];const x=P;let w;e[16]!==N?.message||e[17]!==N?.name||e[18]!==A?(w=A&&b.jsx(O.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[16]=N?.message,e[17]=N?.name,e[18]=A,e[19]=w):w=e[19];let h;e[20]!==m||e[21]!==k||e[22]!==ne||e[23]!==A||e[24]!==n||e[25]!==a||e[26]!==S||e[27]!==G.length||e[28]!==B?(h=ne.onSubmit(async v=>{if(S)await B({...v,id:S});else{const D=await k(v);C(D.id),a?.(D.id)}G.length&&m<G.length-1?A||y(m+1):A||(ne.setInitialValues(v),ne.reset(),n())}),e[20]=m,e[21]=k,e[22]=ne,e[23]=A,e[24]=n,e[25]=a,e[26]=S,e[27]=G.length,e[28]=B,e[29]=h):h=e[29];let i;e[30]!==m||e[31]!==r||e[32]!==x||e[33]!==d||e[34]!==G?(i=G.length?b.jsx(O.Stepper,{active:m,size:"sm",children:G.map(v=>b.jsx(O.Stepper.Step,{...d&&d[v-1]?{label:d[v-1].label}:{},children:r.filter(D=>D.step===v).map(D=>x(D))},v))}):r.map(v=>x(v)),e[30]=m,e[31]=r,e[32]=x,e[33]=d,e[34]=G,e[35]=i):i=e[35];let p;e[36]!==m||e[37]!==_||e[38]!==W||e[39]!==n||e[40]!==G.length?(p=!_&&b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:()=>G.length?m===0?n():y(m-1):n(),variant:"outline",children:G.length?m===0?"Abbrechen":"Zurück":"Abbrechen"}),b.jsx(O.Button,{type:"submit",loading:W,children:G.length?m===G.length-1?"Speichern":"Weiter":"Speichern"})]}),e[36]=m,e[37]=_,e[38]=W,e[39]=n,e[40]=G.length,e[41]=p):p=e[41];let f;e[42]!==i||e[43]!==p||e[44]!==h?(f=b.jsxs("form",{onSubmit:h,children:[i,p]}),e[42]=i,e[43]=p,e[44]=h,e[45]=f):f=e[45];let c;return e[46]!==f||e[47]!==w?(c=b.jsxs(b.Fragment,{children:[w,f]}),e[46]=f,e[47]=w,e[48]=c):c=e[48],c}function mu(t){return t.required}function yu(t,e){return t[e.id]=e.type==="boolean"?!1:e.defaultValue??"",t}function vu(t){return t.step}function bu(t){return typeof t.step=="number"}var[wu,pn]=O.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),ms=t=>{let{children:e,columnsOrder:r,setColumnsOrder:n,columnsToggle:s,setColumnsToggle:l,resetColumnsOrder:d,resetColumnsToggle:a,setColumnWidth:m,setMultipleColumnWidths:y,resetColumnsWidth:_}=t,[M,S]=Z.useState(""),[C,k]=Z.useState("");return b.jsx(wu,{value:{sourceColumn:M,setSourceColumn:S,targetColumn:C,setTargetColumn:k,columnsToggle:s,setColumnsToggle:l,swapColumns:()=>{if(!r||!n||!M||!C)return;let A=r.indexOf(M),N=r.indexOf(C);if(A!==-1&&N!==-1){let F=r.splice(A,1)[0];r.splice(N,0,F),n([...r])}},resetColumnsOrder:d,resetColumnsToggle:a,setColumnWidth:m,setMultipleColumnWidths:y,resetColumnsWidth:_},children:e})};function _u(){return b.jsx("tr",{className:"mantine-datatable-empty-row",children:b.jsx("td",{})})}function xu(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),b.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),b.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),b.jsx("path",{d:"M3 3l18 18"})]})}function Cu({icon:t,text:e,active:r,children:n}){return b.jsx(O.Center,{className:"mantine-datatable-empty-state","data-active":r||void 0,children:n||b.jsxs(b.Fragment,{children:[t||b.jsx("div",{className:"mantine-datatable-empty-state-icon",children:b.jsx(xu,{})}),b.jsx(O.Text,{component:"div",size:"sm",c:"dimmed",children:e})]})})}function Su({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,S){let C=[];return M.forEach(k=>{S.find(A=>A.accessor===k)&&C.push(k)}),S.forEach(k=>{C.includes(k.accessor)||C.push(k.accessor)}),C}let s=e&&e.map(M=>M.accessor)||[],[l,d]=Le.useLocalStorage({key:t?`${t}-columns-order`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&d(M)}let m=()=>{a(s)};if(!t)return{columnsOrder:l,setColumnsOrder:a,resetColumnsOrder:m};let y=n(l,e),_=JSON.stringify(l);return JSON.stringify(y)!==_&&a(y),{columnsOrder:y,setColumnsOrder:a,resetColumnsOrder:m}}function Du({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,onFixedLayoutChange:s}){let l=Z.useRef(!1),d=Z.useRef({}),[a,m]=Z.useState(!0),y=Z.useMemo(()=>e.some(V=>V.resizable&&!V.hidden&&V.accessor!=="__selection__"),[e]),_=Z.useMemo(()=>e.filter(V=>V.resizable&&!V.hidden&&V.accessor!=="__selection__"),[e]),M=Z.useMemo(()=>_.some(V=>V.width===void 0||V.width===""||V.width==="initial"),[_]),S=Z.useCallback(()=>e.filter(V=>V.accessor!=="__selection__").map(V=>({[V.accessor]:V.width??"auto"})),[e]),[C,k]=Le.useLocalStorage({key:t?`${t}-columns-width`:"",defaultValue:t?S():void 0,getInitialValueInEffect:!1}),[A,N]=Z.useState(()=>S());Z.useEffect(()=>{m(!1)},[]);let F=Z.useCallback(()=>{if(!n?.current||a)return{};let V=n.current,U=Array.from(V.querySelectorAll("th[data-accessor]")),J={};return U.forEach(se=>{let ne=se.getAttribute("data-accessor");if(!ne||ne==="__selection__")return;let P=_.find(x=>x.accessor===ne);if(P&&(P.width===void 0||P.width===""||P.width==="initial")){let x=se.getBoundingClientRect();J[ne]=Math.round(x.width)}}),J},[n,_,a]),B=Z.useCallback(V=>{let U=V.filter(se=>se.accessor!=="__selection__"),J=A.map(se=>{let ne=Object.keys(se)[0],P=U.find(x=>x.accessor===ne);return P?{[ne]:P.width}:se});N(J),t&&k(J)},[A,t,k]),H=Z.useCallback(V=>{B(V)},[B]),W=Z.useCallback(()=>{if(!(!n?.current||!s||a))if(M)s(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let V=F();d.current={...d.current,...V};let U=e.filter(J=>J.accessor!=="__selection__").map(J=>{let se=J.accessor,ne=C?.find(x=>Object.keys(x)[0]===se);if(ne&&ne[se]!=="auto")return{[se]:ne[se]};let P=V[se];return P?{[se]:`${P}px`}:{[se]:J.width??"auto"}});N(U),setTimeout(()=>{s(!0),l.current=!0},10)})});else{let V=e.filter(U=>U.accessor!=="__selection__").map(U=>({[U.accessor]:U.width??"auto"}));N(V),s(!0),l.current=!0}},[n,s,a,M,F,e,C]),te=W;Z.useEffect(()=>{if(!y||!s||a){s?.(!1);return}l.current=!1;let V=setTimeout(()=>{W()},50);return()=>clearTimeout(V)},[y,s,a,W]),Z.useEffect(()=>{a||!t||!r||C&&C.length>0&&N(C)},[a,t,r,C]);let oe=Z.useCallback(()=>{t&&k(S()),d.current={},l.current=!1,s&&(s(!1),setTimeout(()=>{W()},10))},[t,k,S,s,W]),G=Z.useCallback((V,U)=>{B([{accessor:V,width:U}])},[B]),K=Z.useMemo(()=>y?A.filter(V=>{let U=Object.keys(V)[0];return _.some(J=>J.accessor===U)}).every(V=>{let U=Object.values(V)[0];return U==="auto"||U==="initial"}):!1,[y,A,_]);return{columnsWidth:A,setColumnsWidth:B,setColumnWidth:G,setMultipleColumnWidths:H,resetColumnsWidth:oe,hasResizableColumns:y,allResizableWidthsInitial:K,measureAndSetColumnWidths:te}}function ku({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,S){let C=[];return M.forEach(k=>{S.find(A=>A.accessor===k.accessor)&&C.push(k)}),S.forEach(k=>{C.find(A=>A.accessor===k.accessor)||C.push({accessor:k.accessor,defaultToggle:k.defaultToggle||!0,toggleable:k.toggleable,toggled:k.defaultToggle===void 0?!0:k.defaultToggle})}),C}let s=e&&e.map(M=>({accessor:M.accessor,defaultToggle:M.defaultToggle||!0,toggleable:M.toggleable,toggled:M.defaultToggle===void 0?!0:M.defaultToggle})),[l,d]=Le.useLocalStorage({key:t?`${t}-columns-toggle`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&d(M)}let m=()=>{a(s)};if(!t)return{columnsToggle:l,setColumnsToggle:a,resetColumnsToggle:m};let y=n(l,e),_=JSON.stringify(l);return JSON.stringify(y)!==_&&a(y),{columnsToggle:y,setColumnsToggle:a,resetColumnsToggle:m}}var Pu=({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,scrollViewportRef:s,onFixedLayoutChange:l})=>{let{columnsOrder:d,setColumnsOrder:a,resetColumnsOrder:m}=Su({key:t,columns:e,getInitialValueInEffect:r}),{columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M}=ku({key:t,columns:e,getInitialValueInEffect:r}),{columnsWidth:S,setColumnsWidth:C,setColumnWidth:k,setMultipleColumnWidths:A,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:B,measureAndSetColumnWidths:H}=Du({key:t,columns:e,getInitialValueInEffect:r,headerRef:n,onFixedLayoutChange:l});return{effectiveColumns:Z.useMemo(()=>d?d.map(W=>e.find(te=>te.accessor===W)).map(W=>({...W,hidden:W?.hidden||!y.find(te=>te.accessor===W?.accessor)?.toggled})).map(W=>W?.accessor==="__selection__"?W:{...W,width:S.find(te=>te[W?.accessor])?.[W?.accessor]}):e,[e,d,y,S]),setColumnsOrder:a,columnsOrder:d,resetColumnsOrder:m,columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M,columnsWidth:S,setColumnsWidth:C,setColumnWidth:k,setMultipleColumnWidths:A,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:B,measureAndSetColumnWidths:H}},ys=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function vs(t){let e=Z.useRef(t);return e.current=t,e}var bs="--mantine-datatable-header-height",ws="--mantine-datatable-footer-height",_s="--mantine-datatable-selection-column-width",xs="--mantine-datatable-last-row-border-bottom";function et(t,e,r){t?.style.setProperty(e,r)}function gn(t){let e=t.borderBoxSize?.[0]||t.contentBoxSize?.[0];return e?{width:e.inlineSize,height:e.blockSize}:{width:t.contentRect.width,height:t.contentRect.height}}function mn(t,e,r){if(t){let n=new ResizeObserver(s=>{let l=s[0];l&&e(gn(l))});return n.observe(t),()=>{n.disconnect(),r()}}}function Mu({scrollCallbacks:t,withRowBorders:e}){let r={root:Z.useRef(null),table:Z.useRef(null),scrollViewport:Z.useRef(null),header:Z.useRef(null),footer:Z.useRef(null),selectionColumnHeader:Z.useRef(null)},{root:n,table:s,scrollViewport:l,header:d,footer:a,selectionColumnHeader:m}=r,y=vs({withRowBorders:e}),_=vs(t),M=Z.useRef(()=>{}),S=Z.useRef(()=>{}),C=Z.useCallback(k=>{_.current.onScroll?.(k),M.current()},[]);return Z.useEffect(()=>mn(d.current,k=>{et(n.current,bs,`${k.height}px`)},()=>et(n.current,bs,"0")),[d.current]),Z.useEffect(()=>mn(a.current,k=>{et(n.current,ws,`${k.height}px`)},()=>et(n.current,ws,"0")),[a.current]),Z.useEffect(()=>mn(m.current,k=>{et(n.current,_s,`${k.width}px`)},()=>et(n.current,_s,"0")),[m.current]),ys(()=>{if(typeof window===void 0)return;let k={top:!0,bottom:!0,left:!0,right:!0},A={width:0,height:0},N={width:0,height:0};function F(oe,G){let K=k[oe];return k[oe]=G,et(n.current,`--mantine-datatable-${oe}-shadow-opacity`,G?"0":"1"),K}function B(){let oe=A.height-N.height,G=oe<0;et(n.current,"--mantine-datatable-footer-position",G?"relative":"sticky"),et(n.current,"--mantine-datatable-footer-bottom",G?`${oe}px`:"0")}function H(){y.current.withRowBorders&&A.height<N.height?et(n.current,xs,`${O.rem("1px")} solid var(--mantine-datatable-border-color)`):et(n.current,xs,"unset")}S.current=H;function W(){let oe=_.current,G=l.current,K=G?.scrollTop??0,V=G?.scrollLeft??0,U=K===0,J=A.height-K-N.height<1,se=F("top",U),ne=F("bottom",J);U&&U!==se&&oe.onScrollToTop?.(),J&&J!==ne&&oe.onScrollToBottom?.();let P=G?getComputedStyle(G).direction==="rtl":!1,x=(G?.scrollWidth??0)-N.width,w,h;if(P){let f=Math.abs(V);h=f<1,w=x-f<1}else w=V<1,h=A.width-V-N.width<1;let i=F("left",w),p=F("right",h);w&&w!==i&&oe.onScrollToLeft?.(),h&&h!==p&&oe.onScrollToRight?.()}M.current=W;let te=new ResizeObserver(oe=>{for(let G of oe)switch(G.target.tagName){case"TABLE":{A=gn(G);break}case"DIV":{N=gn(G);break}}W(),B(),H()});return te.observe(s.current),te.observe(l.current),()=>{te.disconnect()}},[]),ys(()=>{S.current()},[e]),{refs:r,onScroll:C}}function Ou(t){let[e,r]=Z.useState(null),n=t?.join(":")||"";return Z.useEffect(()=>{r(null)},[n]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function Au(t,e){let r=()=>{e(t.map(s=>s.matches))},n=t.map(s=>{try{return s.addEventListener("change",r),()=>s.removeEventListener("change",r)}catch{return s.addListener(r),()=>s.removeListener(r)}});return()=>{n.forEach(s=>s())}}function ju(t,e){return e||(typeof window<"u"&&"matchMedia"in window?t.map(r=>window.matchMedia(r).matches):t.map(()=>!1))}function Eu(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,s]=Z.useState(r?e:ju(t,e)),l=Z.useRef(null);return Z.useEffect(()=>{if("matchMedia"in window)return l.current=t.map(d=>window.matchMedia(d)),s(l.current.map(d=>d.matches)),Au(l.current,d=>{s(d)})},[t]),n}function Tu(t){let e=O.useMantineTheme(),r=Z.useMemo(()=>t.map(s=>(typeof s=="function"?s(e):s)??""),[t,e]),n=Z.useMemo(()=>t.map(()=>!0),[t]);return Eu(r,n)}function Sr(t){let e=O.useMantineTheme(),r=typeof t=="function"?t(e):t;return Le.useMediaQuery(r||"",!0)}function yn(t){let e=t.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Ru(t,e,r){return t.filter(n=>!e.map(r).includes(r(n)))}function vn(t,e){return t.filter((r,n,s)=>n===s.findIndex(l=>e(r)===e(l)))}function Cs(t,e){return e?e.match(/([^[.\]])+/g).reduce((r,n)=>r&&r[n],t):void 0}function Ie(t,e){return typeof e=="string"?Cs(t,e):e(t)}function Ss(t){return!t||t.length===0?0:Math.max(...t.map(e=>e.groups&&e.groups.length>0?1+Ss(e.groups):1))}function bn(t){let e=[];for(let r of t)r.columns&&r.columns.length>0?e.push(...r.columns.filter(n=>n!=null)):r.groups&&r.groups.length>0&&e.push(...bn(r.groups));return e.filter(r=>r!=null)}function wn(t,e){return t.columns&&t.columns.length>0?t.columns.filter((r,n)=>r.hidden?!1:e?e[n]!==!1:!0).length:t.groups&&t.groups.length>0?t.groups.reduce((r,n)=>r+wn(n,e),0):0}function Ds(t,e,r=0){if(r===e)return[...t];let n=[];for(let s of t)s.groups&&s.groups.length>0&&n.push(...Ds(s.groups,e,r+1));return n}function $u(t,e,r){return r?!t||e:!1}function Nu({rowExpansion:t,records:e,idAccessor:r}){let n=[];if(t&&e){let{trigger:a,allowMultiple:m,initiallyExpanded:y}=t;e&&a==="always"?n=e.map(_=>Ie(_,r)):y&&(n=e.filter((_,M)=>y({record:_,index:M})).map(_=>Ie(_,r)),m||(n=[n[0]]))}let s,l,d=Z.useState(n);if(t){let{expandable:a,trigger:m,allowMultiple:y,collapseProps:_,content:M}=t;t.expanded?{recordIds:s,onRecordIdsChange:l}=t.expanded:[s,l]=d;let S=C=>l?.(s.filter(k=>k!==Ie(C,r)));return{expandOnClick:m!=="always"&&m!=="never",isRowExpanded:C=>m==="always"?!0:s.includes(Ie(C,r)),isExpandable:({record:C,index:k})=>a?a({record:C,index:k}):!0,expandRow:C=>{let k=Ie(C,r);l?.(y?[...s,k]:[k])},collapseRow:S,collapseProps:_,content:({record:C,index:k})=>()=>M({record:C,index:k,collapse:()=>S(C)})}}}function Lu(t,e){let[r,n]=Z.useState(t),[s,l]=Z.useState(t),d=Le.useTimeout(()=>n(!0),0),a=Le.useTimeout(()=>l(!1),e||200);return Z.useEffect(()=>{t?(a.clear(),l(!0),d.start()):(d.clear(),n(!1),a.start())},[d,a,t]),{expanded:r,visible:s}}var _n="mantine-datatable-nowrap",xn="mantine-datatable-ellipsis",At="mantine-datatable-pointer-cursor",ks="mantine-datatable-context-menu-cursor",Bu="mantine-datatable-text-selection-disabled",Dr="mantine-datatable-text-align-left",kr="mantine-datatable-text-align-center",Pr="mantine-datatable-text-align-right";function Iu({className:t,style:e,visibleMediaQuery:r,title:n,noWrap:s,ellipsis:l,textAlign:d,width:a}){return Sr(r)?b.jsx(O.TableTh,{className:Me({[_n]:s||l,[xn]:l,[Dr]:d==="left",[kr]:d==="center",[Pr]:d==="right"},t),style:[{width:a,minWidth:a,maxWidth:a},e],children:n}):null}function Yu({shadowVisible:t}){return b.jsx(O.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":t||void 0})}function zu({className:t,style:e,columns:r,defaultColumnProps:n,selectionVisible:s,selectorCellShadowVisible:l,ref:d}){return b.jsx(O.TableTfoot,{ref:d,className:Me("mantine-datatable-footer",t),style:e,children:b.jsxs(O.TableTr,{children:[s&&b.jsx(Yu,{shadowVisible:l}),r.map(({hidden:a,...m})=>{if(a)return null;let{accessor:y,visibleMediaQuery:_,textAlign:M,width:S,footer:C,footerClassName:k,footerStyle:A,noWrap:N,ellipsis:F}={...n,...m};return b.jsx(Iu,{className:k,style:A,visibleMediaQuery:_,textAlign:M,width:S,title:C,noWrap:N,ellipsis:F},y)})]})})}function Fu({group:{id:t,columns:e,groups:r,title:n,textAlign:s,className:l,style:d},maxDepth:a,currentDepth:m,previousGroups:y,isLastGroup:_,withColumnBorders:M=!1,totalTableColumns:S}){let C=Z.useMemo(()=>e&&e.length>0?e:r&&r.length>0?bn([{id:t,columns:e,groups:r}]):[],[e,r,t]),k=Z.useMemo(()=>C.map(({visibleMediaQuery:te})=>te),[C]),A=Tu(k),N=Z.useMemo(()=>wn({columns:e,groups:r},A),[t,e,r,A]),F=Z.useMemo(()=>y.reduce((te,oe)=>te+wn(oe,A),0),[y,A]),B=r&&r.length>0?1:a-m,H=F+N<S,W=$u(_,H,M);return N>0?b.jsx(O.TableTh,{colSpan:N,rowSpan:B>1?B:void 0,className:Me("mantine-datatable-column-group-header-cell",{[Dr]:s==="left",[kr]:s==="center",[Pr]:s==="right","mantine-datatable-column-group-header-cell--needs-border":W},l),style:d,children:n??yn(t)}):null}function Wu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function Uu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function qu({children:t,isActive:e,filterPopoverProps:r,filterPopoverDisableClickOutside:n}){let[s,{close:l,toggle:d}]=Le.useDisclosure(!1),a=e?Uu:Wu,m=Le.useClickOutside(l);return n&&(m=void 0),b.jsxs(O.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[b.jsx(O.PopoverTarget,{children:b.jsx(O.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":e||void 0,size:"sm",variant:"default",onClick:y=>{y.preventDefault(),d()},onKeyDown:y=>y.stopPropagation(),children:b.jsx(a,{})})}),b.jsx(O.PopoverDropdown,{ref:m,onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),children:typeof t=="function"?t({close:l}):t})]})}var Vu=t=>{let{accessor:e,columnRef:r}=t,[n,s]=Z.useState(!1),l=Z.useRef(0),d=Z.useRef({current:0,next:0}),{dir:a}=O.useDirection(),m=a==="rtl",{setMultipleColumnWidths:y}=pn(),_=Z.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!r.current)return;let C=r.current,k=C.nextElementSibling;for(;k;){let te=k.getAttribute("data-accessor");if(te&&te!=="__selection__")break;k=k.nextElementSibling}if(!k)return;let A=k.getAttribute("data-accessor");if(!A)return;let N=A==="__selection__";s(!0),l.current=S.clientX;let F=C.offsetWidth,B=k.offsetWidth;d.current={current:F,next:B};let H=te=>{if(!r.current)return;let oe=r.current,G=oe.nextElementSibling;if(!G)return;let K=te.clientX-l.current;m&&(K=-K);let V=50,U=d.current.current-V,J=d.current.next-V,se=Math.max(-U,Math.min(K,J)),ne=d.current.current+se,P=d.current.next-se;oe.style.width=`${ne}px`,G.style.width=`${P}px`,oe.style.minWidth=`${ne}px`,oe.style.maxWidth=`${ne}px`,G.style.minWidth=`${P}px`,G.style.maxWidth=`${P}px`},W=()=>{if(!r.current)return;let te=r.current,oe=te.nextElementSibling;s(!1),document.body.style.cursor="initial",document.body.style.userSelect="initial";let G=parseInt(te.style.width)||te.offsetWidth,K=oe?parseInt(oe.style.width)||oe.offsetWidth:0,V=[{accessor:e,width:`${G}px`}];if(oe&&!N){let U=oe.getAttribute("data-accessor");U&&V.push({accessor:U,width:`${K}px`})}setTimeout(()=>{y(V)},0),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",W)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",H),document.addEventListener("mouseup",W)},[e,r,m,y]),M=Z.useCallback(()=>{if(!r.current)return;let S=r.current,C=S.nextElementSibling;S.style.width="",S.style.minWidth="",S.style.maxWidth="";let k=[{accessor:e,width:"auto"}];if(C){C.style.width="",C.style.minWidth="",C.style.maxWidth="";let A=C.getAttribute("data-accessor");A&&A!=="__selection__"&&k.push({accessor:A,width:"auto"})}setTimeout(()=>{y(k)},0)},[e,r,y]);return b.jsx("div",{className:"mantine-datatable-header-resizable-handle",style:{cursor:n?"col-resize":void 0},onMouseDown:_,onDoubleClick:M,onClick:S=>S.stopPropagation(),title:"Drag to resize column, double-click to reset"})};function Hu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M12 5l0 14"}),b.jsx("path",{d:"M16 9l-4 -4"}),b.jsx("path",{d:"M8 9l4 -4"})]})}function Gu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M8 7l4 -4l4 4"}),b.jsx("path",{d:"M8 17l4 4l4 -4"}),b.jsx("path",{d:"M12 3l0 18"})]})}function Qu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function Zu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M18 6l-12 12"}),b.jsx("path",{d:"M6 6l12 12"})]})}function Ku({className:t,style:e,accessor:r,visibleMediaQuery:n,title:s,sortable:l,draggable:d,toggleable:a,resizable:m,sortIcons:y,textAlign:_,width:M,sortStatus:S,onSortStatusChange:C,filter:k,filterPopoverProps:A,filterPopoverDisableClickOutside:N,filtering:F,sortKey:B}){let{setSourceColumn:H,setTargetColumn:W,swapColumns:te,setColumnsToggle:oe}=pn(),[G,K]=Z.useState(!1),V=Z.useRef(null);if(!Sr(n))return null;let U=s??yn(r),J=typeof U=="string"?U:void 0,se=l&&C?p=>{p?.defaultPrevented||C({sortKey:B,columnAccessor:r,direction:S?.columnAccessor===r?S.direction==="asc"?"desc":"asc":S?.direction??"asc"})}:void 0,ne=p=>{p.stopPropagation(),H(r),K(!1)},P=p=>{p.preventDefault(),W(r),K(!0)},x=()=>{W(r),K(!1),te()},w=()=>{K(!0)},h=()=>{K(!1)},i=p=>{p.stopPropagation(),oe(f=>f.map(c=>c.accessor===r?{...c,toggled:!1}:c))};return b.jsxs(O.TableTh,{"data-accessor":r,className:Me({"mantine-datatable-header-cell-sortable":l,"mantine-datatable-header-cell-toggleable":a,"mantine-datatable-header-cell-resizable":m},t),style:[{width:M,...m?{}:{minWidth:M,maxWidth:M}},e],role:l?"button":void 0,tabIndex:l?0:void 0,onClick:se,onKeyDown:p=>p.key==="Enter"&&se?.(),ref:V,children:[b.jsxs(O.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[b.jsxs(O.Flex,{align:"center",w:"100%",className:Me({"mantine-datatable-header-cell-draggable":d,"mantine-datatable-header-cell-drag-over":G}),draggable:d,onDragStart:d?ne:void 0,onDragEnter:d?w:void 0,onDragOver:d?P:void 0,onDrop:d?x:void 0,onDragLeave:d?h:void 0,children:[d?b.jsx(O.Center,{role:"img","aria-label":"Drag column",children:b.jsx(O.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:p=>{p.stopPropagation()},children:b.jsx(Qu,{})})}):null,b.jsx(O.Box,{className:Me("mantine-datatable-header-cell-sortable-text",{[Dr]:_==="left",[kr]:_==="center",[Pr]:_==="right"},_n,xn),title:J,children:U})]}),a?b.jsx(O.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:b.jsx(O.ActionIcon,{size:"xs",variant:"light",onClick:i,children:b.jsx(Zu,{})})}):null,l||S?.columnAccessor===r?b.jsx(b.Fragment,{children:S?.columnAccessor===r?b.jsx(O.Center,{className:Me("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":S.direction==="desc"}),role:"img","aria-label":`Sorted ${S.direction==="desc"?"descending":"ascending"}`,children:y?.sorted||b.jsx(Hu,{})}):b.jsx(O.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:y?.unsorted||b.jsx(Gu,{})})}):null,k?b.jsx(qu,{filterPopoverProps:A,isActive:!!F,filterPopoverDisableClickOutside:N,children:k}):null]}),m&&r!=="__selection__"?b.jsx(Vu,{accessor:r,columnRef:V}):null]})}function Ju({className:t,style:e,trigger:r,shadowVisible:n,checked:s,indeterminate:l,checkboxProps:d,onChange:a,rowSpan:m,ref:y}){let _=!d.disabled;return b.jsx(O.TableTh,{ref:y,className:Me("mantine-datatable-header-selector-cell",{[At]:r==="cell"&&_},t),style:e,rowSpan:m,"data-shadow-visible":n||void 0,"data-accessor":"__selection__",onClick:r==="cell"&&_?a:void 0,children:b.jsx(O.Checkbox,{classNames:_?{input:At}:void 0,checked:s,indeterminate:l,onChange:a,...d,disabled:!(a||d.onChange)||d.disabled})})}function Xu({selectionColumnHeaderRef:t,className:e,style:r,sortStatus:n,sortIcons:s,onSortStatusChange:l,columns:d,defaultColumnProps:a,groups:m,selectionTrigger:y,selectionVisible:_,selectionChecked:M,selectionIndeterminate:S,onSelectionChange:C,selectionCheckboxProps:k,selectorCellShadowVisible:A,selectionColumnClassName:N,selectionColumnStyle:F,withColumnBorders:B=!1,ref:H}){let W=m?Ss(m):0,te=W>0?W+1:1,oe=_?b.jsx(Ju,{ref:t,className:N,style:F,trigger:y,shadowVisible:A,checked:M,indeterminate:S,checkboxProps:k,onChange:C,rowSpan:m?te:void 0}):null,{columnsToggle:G,setColumnsToggle:K}=pn(),[V,U]=Z.useState(!1),J=d.some(P=>P.toggleable),se=J?Object.fromEntries(d.map(({accessor:P,title:x})=>[P,x??yn(String(P))])):void 0,ne=b.jsxs(O.TableThead,{className:Me("mantine-datatable-header",e),style:r,ref:H,onContextMenu:J?P=>{P.preventDefault(),U(x=>!x)}:void 0,children:[m&&Array.from({length:W},(P,x)=>{let w=Ds(m,x);return b.jsxs(O.TableTr,{children:[x===0&&oe,w.map((h,i)=>b.jsx(Fu,{group:h,maxDepth:W,currentDepth:x,previousGroups:w.slice(0,i),isLastGroup:i===w.length-1,withColumnBorders:B,totalTableColumns:d.length},h.id))]},`group-depth-${x}`)}),b.jsxs(O.TableTr,{children:[!m&&oe,d.map(({hidden:P,...x},w)=>{if(P)return null;let{accessor:h,visibleMediaQuery:i,textAlign:p,width:f,title:c,sortable:v,draggable:D,toggleable:T,resizable:q,titleClassName:X,titleStyle:re,filter:ee,filterPopoverProps:ae,filterPopoverDisableClickOutside:ie,filtering:ue,sortKey:E}={...a,...x};return b.jsx(Ku,{accessor:h,className:X,style:re,visibleMediaQuery:i,textAlign:p,width:f,title:c,sortable:v,draggable:D,toggleable:T,resizable:q&&w<d.length-1,sortStatus:n,sortIcons:s,sortKey:E,onSortStatusChange:l,filter:ee,filterPopoverProps:ae,filterPopoverDisableClickOutside:ie,filtering:ue},h)})]})]});return J?b.jsxs(O.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:V,onChange:U,children:[b.jsx(O.PopoverTarget,{children:ne}),b.jsx(O.PopoverDropdown,{children:b.jsx(O.Stack,{children:G.filter(P=>P.toggleable).map(P=>b.jsx(O.Group,{children:b.jsx(O.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:se[P.accessor],checked:P.toggled,onChange:x=>{K(G.map(w=>w.accessor===P.accessor?{...w,toggled:x.currentTarget.checked}:w))}})},P.accessor))})})]}):ne}function ec({fetching:t,customContent:e,backgroundBlur:r,size:n,type:s,color:l}){return b.jsx(O.Center,{className:Me("mantine-datatable-loader",{"mantine-datatable-loader-fetching":t}),style:[{backdropFilter:r?`blur(${r}px)`:void 0}],children:t&&(e||b.jsx(O.Loader,{size:n,type:s,color:l}))})}function Ae(t,e,r){return t?O.parseThemeColor({color:typeof t=="object"?t[r]:t,theme:e}).value:void 0}function tc({theme:t,c:e,backgroundColor:r,borderColor:n,rowBorderColor:s,stripedColor:l,highlightOnHoverColor:d}){return{"--mantine-datatable-color-light":Ae(e,t,"light"),"--mantine-datatable-color-dark":Ae(e,t,"dark"),"--mantine-datatable-background-color-light":Ae(r,t,"light"),"--mantine-datatable-background-color-dark":Ae(r,t,"dark"),"--mantine-datatable-border-color-light":Ae(n,t,"light"),"--mantine-datatable-border-color-dark":Ae(n,t,"dark"),"--mantine-datatable-row-border-color-light":Ae(s,t,"light"),"--mantine-datatable-row-border-color-dark":Ae(s,t,"dark"),"--mantine-datatable-striped-color-light":Ae(l,t,"light"),"--mantine-datatable-striped-color-dark":Ae(l,t,"dark"),"--mantine-datatable-highlight-on-hover-color-light":Ae(d,t,"light"),"--mantine-datatable-highlight-on-hover-color-dark":Ae(d,t,"dark")}}function Ps({theme:t,paginationActiveTextColor:e,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":Ae(e,t,"light"),"--mantine-datatable-pagination-active-text-color-dark":Ae(e,t,"dark"),"--mantine-datatable-pagination-active-background-color-light":Ae(r,t,"light"),"--mantine-datatable-pagination-active-background-color-dark":Ae(r,t,"dark")}}function rc({theme:t,color:e,backgroundColor:r}){return{"--mantine-datatable-row-color-light":Ae(e,t,"light"),"--mantine-datatable-row-color-dark":Ae(e,t,"dark"),"--mantine-datatable-row-background-color-light":Ae(r,t,"light"),"--mantine-datatable-row-background-color-dark":Ae(r,t,"dark")}}function nc(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M8 9l4 -4l4 4"}),b.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var Ms={xs:O.rem(22),sm:O.rem(26),md:O.rem(32),lg:O.rem(38),xl:O.rem(44)};function oc({size:t,label:e,values:r,value:n,activeTextColor:s,activeBackgroundColor:l,onChange:d}){return b.jsxs(O.Group,{gap:"xs",children:[b.jsx(O.Text,{component:"div",size:t,children:e}),b.jsxs(O.Menu,{withinPortal:!0,withArrow:!0,offset:2,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[b.jsx(O.MenuTarget,{children:b.jsx(O.Button,{size:t,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:b.jsx(nc,{}),style:[{fontWeight:"normal"},a=>({height:Ms[t],paddingLeft:a.spacing[t],paddingRight:a.spacing[t]})],children:n})}),b.jsx(O.MenuDropdown,{children:r.map(a=>{let m=a===n;return b.jsx(O.MenuItem,{className:Me({"mantine-datatable-page-size-selector-active":m}),style:[{height:Ms[t]},m&&(s||l)?y=>Ps({theme:y,paginationActiveTextColor:s,paginationActiveBackgroundColor:l}):void 0],disabled:m,onClick:()=>d(a),children:b.jsx(O.Text,{component:"div",size:t,children:a})},a)})})]})]})}function sc({className:t,style:e,fetching:r,page:n,onPageChange:s,paginationWithEdges:l,paginationWithControls:d,paginationActiveTextColor:a,paginationActiveBackgroundColor:m,paginationSize:y,loadingText:_,noRecordsText:M,paginationText:S,totalRecords:C,recordsPerPage:k,onRecordsPerPageChange:A,recordsPerPageLabel:N,recordsPerPageOptions:F,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:W,getPaginationControlProps:te,getPaginationItemProps:oe,renderPagination:G}){let K;if(C){let x=(n-1)*k+1,w=x+(B||0)-1;K=S({from:x,to:w,totalRecords:C})}else K=r?_:M;let V=C&&k?Math.max(1,Math.ceil(C/k)):1,U=C?(n-1)*(k??0)+1:void 0,J=C?(U??1)+(B??0)-1:void 0,se=!Sr(({breakpoints:x})=>`(min-width: ${typeof W=="number"?`${O.rem(W)}rem`:x[W]||W})`),ne={Text:x=>b.jsx(O.Text,{component:"div",className:"mantine-datatable-pagination-text",size:y,...x,children:K}),PageSizeSelector:x=>F?b.jsx(oc,{activeTextColor:a,activeBackgroundColor:m,size:y,label:N,values:F,value:k,onChange:A,...x}):b.jsx(b.Fragment,{}),Pagination:x=>b.jsx(O.Pagination,{classNames:{root:Me("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!B}),control:"mantine-datatable-pagination-pages-control"},style:a||m?w=>Ps({theme:w,paginationActiveTextColor:a,paginationActiveBackgroundColor:m}):void 0,withEdges:l,withControls:d,value:n,onChange:s,size:y,total:V,getControlProps:te,getItemProps:oe,...x})},P={state:{paginationSize:y,page:n,totalPages:V,totalRecords:C,recordsPerPage:k,recordsLength:B,fetching:r,from:U,to:J,isWrapped:se},actions:{setPage:x=>s?.(x),setRecordsPerPage:A?x=>A(x):void 0},Controls:ne};return b.jsx(O.Box,{px:H??"xs",py:"xs",className:Me("mantine-datatable-pagination",t),style:[{flexDirection:se?"column":"row"},e],children:typeof G=="function"?G(P):b.jsxs(b.Fragment,{children:[b.jsx(ne.Text,{}),b.jsx(ne.PageSizeSelector,{}),b.jsx(ne.Pagination,{})]})})}function ic({className:t,style:e,visibleMediaQuery:r,record:n,index:s,onClick:l,onDoubleClick:d,onContextMenu:a,noWrap:m,ellipsis:y,textAlign:_,width:M,accessor:S,render:C,defaultRender:k,customCellAttributes:A}){return Sr(r)?b.jsx(O.TableTd,{className:Me({[_n]:m||y,[xn]:y,[At]:l||d,[ks]:a,[Dr]:_==="left",[kr]:_==="center",[Pr]:_==="right"},t),style:[{width:M,minWidth:M,maxWidth:M},e],onClick:l,onDoubleClick:d,onContextMenu:a,...A?.(n,s),children:C?C(n,s):k?k(n,s,S):Cs(n,S)}):null}function ac({open:t,colSpan:e,content:r,collapseProps:n}){let{expanded:s,visible:l}=Lu(t,n?.transitionDuration);return l?b.jsxs(b.Fragment,{children:[b.jsx(O.TableTr,{}),b.jsx(O.TableTr,{children:b.jsx(O.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:e,children:b.jsx(O.Collapse,{in:s,...n,children:b.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function lc({className:t,style:e,record:r,index:n,trigger:s,onChange:l,withRightShadow:d,checkboxProps:a,getCheckboxProps:m,...y}){let _={...a,...m(r,n)},M=!y.disabled&&!_.disabled,S=C=>{C.stopPropagation(),s==="cell"&&M&&l?.(C)};return b.jsx(O.TableTd,{className:Me("mantine-datatable-row-selector-cell",{[At]:s==="cell"&&M},t),style:e,"data-shadow-visible":d||void 0,onClick:S,children:b.jsx(O.Checkbox,{classNames:M?{input:At}:void 0,onChange:l,...y,..._})})}function uc({record:t,index:e,columns:r,defaultColumnProps:n,defaultColumnRender:s,selectionTrigger:l,selectionVisible:d,selectionChecked:a,onSelectionChange:m,isRecordSelectable:y,selectionCheckboxProps:_,getSelectionCheckboxProps:M,onClick:S,onDoubleClick:C,onContextMenu:k,onCellClick:A,onCellDoubleClick:N,onCellContextMenu:F,expansion:B,customAttributes:H,color:W,backgroundColor:te,className:oe,style:G,selectorCellShadowVisible:K,selectionColumnClassName:V,selectionColumnStyle:U,rowFactory:J}){let se=b.jsxs(b.Fragment,{children:[d&&b.jsx(lc,{className:V,style:U,record:t,index:e,trigger:l,withRightShadow:K,checked:a,disabled:!m||(y?!y(t,e):!1),onChange:m,checkboxProps:_,getCheckboxProps:M}),r.map(({hidden:x,hiddenContent:w,...h},i)=>{if(x||w)return null;let{accessor:p,visibleMediaQuery:f,textAlign:c,noWrap:v,ellipsis:D,width:T,render:q,cellsClassName:X,cellsStyle:re,customCellAttributes:ee}={...n,...h};return b.jsx(ic,{className:typeof X=="function"?X(t,e):X,style:re?.(t,e),visibleMediaQuery:f,record:t,index:e,onClick:A?ae=>A({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,onDoubleClick:N?ae=>N({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,onContextMenu:F?ae=>F({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,accessor:p,textAlign:c,noWrap:v,ellipsis:D,width:T,render:q,defaultRender:s,customCellAttributes:ee},p)})]}),ne=B&&b.jsx(ac,{colSpan:r.filter(({hidden:x})=>!x).length+(d?1:0),open:B.isRowExpanded(t),content:B.content({record:t,index:e}),collapseProps:B.collapseProps}),P=cc({record:t,index:e,selectionChecked:a,onClick:S,onDoubleClick:C,onContextMenu:k,expansion:B,customAttributes:H,color:W,backgroundColor:te,className:oe,style:G});return J?J({record:t,index:e,rowProps:P,children:se,expandedElement:ne}):b.jsxs(b.Fragment,{children:[b.jsx(O.TableTr,{...P,children:se}),ne]})}function cc({record:t,index:e,selectionChecked:r,onClick:n,onDoubleClick:s,onContextMenu:l,expansion:d,customAttributes:a,color:m,backgroundColor:y,className:_,style:M}){return{className:Me("mantine-datatable-row",{[At]:n||s||d?.isExpandable({record:t,index:e})&&d?.expandOnClick},{[ks]:l},typeof _=="function"?_(t,e):_),"data-selected":r||void 0,onClick:S=>{if(d){let{isExpandable:C,isRowExpanded:k,expandOnClick:A,expandRow:N,collapseRow:F}=d;C({record:t,index:e})&&A&&(k(t)?F(t):N(t))}n?.({event:S,record:t,index:e})},onDoubleClick:s?S=>s({event:S,record:t,index:e}):void 0,onContextMenu:l?S=>l({event:S,record:t,index:e}):void 0,style:[m||y?S=>{let C=m?.(t,e),k=y?.(t,e);return rc({theme:S,color:C,backgroundColor:k})}:void 0,M?.(t,e)],...a?.(t,e)??{}}}function dc({leftShadowBehind:t,rightShadowBehind:e,onScrollPositionChange:r,children:n,viewportRef:s,scrollAreaProps:l}){return b.jsxs(O.ScrollArea,{...l,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:r,children:[n,b.jsx(O.Box,{className:Me("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow")}),b.jsx("div",{className:Me("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-behind":t})}),b.jsx("div",{className:Me("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-behind":e})}),b.jsx(O.Box,{className:Me("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow")})]})}function hc({withTableBorder:t,borderRadius:e,textSelectionDisabled:r,height:n="100%",minHeight:s,maxHeight:l,shadow:d,verticalAlign:a="center",fetching:m,columns:y,storeColumnsKey:_,groups:M,pinFirstColumn:S,pinLastColumn:C,defaultColumnProps:k,defaultColumnRender:A,idAccessor:N="id",records:F,selectionTrigger:B="checkbox",selectedRecords:H,onSelectedRecordsChange:W,selectionColumnClassName:te,selectionColumnStyle:oe,isRecordSelectable:G,selectionCheckboxProps:K,allRecordsSelectionCheckboxProps:V={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:U=(be,Ne)=>({"aria-label":`Select record ${Ne+1}`}),sortStatus:J,sortIcons:se,onSortStatusChange:ne,horizontalSpacing:P,page:x,onPageChange:w,totalRecords:h,recordsPerPage:i,onRecordsPerPageChange:p,recordsPerPageOptions:f,recordsPerPageLabel:c="Records per page",paginationWithEdges:v,paginationWithControls:D,paginationActiveTextColor:T,paginationActiveBackgroundColor:q,paginationSize:X="sm",paginationText:re=({from:be,to:Ne,totalRecords:We})=>`${be} - ${Ne} / ${We}`,paginationWrapBreakpoint:ee="sm",getPaginationControlProps:ae=be=>be==="previous"?{"aria-label":"Previous page"}:be==="next"?{"aria-label":"Next page"}:{},getPaginationItemProps:ie,renderPagination:ue,loaderBackgroundBlur:E,customLoader:L,loaderSize:R,loaderType:Y,loaderColor:I,loadingText:ce="...",emptyState:o,noRecordsText:u="No records",noRecordsIcon:g,highlightOnHover:j,striped:$,noHeader:z,onRowClick:le,onRowDoubleClick:he,onRowContextMenu:pe,onCellClick:Q,onCellDoubleClick:fe,onCellContextMenu:me,onScroll:ge,onScrollToTop:Se,onScrollToBottom:Ce,onScrollToLeft:De,onScrollToRight:He,c:$e,backgroundColor:ke,borderColor:Ct,rowBorderColor:je,stripedColor:Ge,highlightOnHoverColor:Ye,rowColor:tt,rowBackgroundColor:nt,rowExpansion:Ee,rowClassName:ot,rowStyle:st,customRowAttributes:Qe,scrollViewportRef:Ze,scrollAreaProps:it,tableRef:ut,bodyRef:rt,m:at,my:ve,mx:Oe,mt:lt,mb:vt,ml:jt,mr:bt,className:wt,classNames:Ke,style:Et,styles:xe,rowFactory:Pe,tableWrapper:ct,...Te}){let be=Z.useMemo(()=>M?bn(M):y,[y,M]),[Ne,We]=Z.useState(!1),{refs:ze,onScroll:zc}=Mu({scrollCallbacks:{onScroll:ge,onScrollToTop:Se,onScrollToBottom:Ce,onScrollToLeft:De,onScrollToRight:He},withRowBorders:Te.withRowBorders}),Sn=Pu({key:_,columns:be,headerRef:ze.header,scrollViewportRef:ze.scrollViewport,onFixedLayoutChange:We}),Fc=Le.useMergedRef(ze.table,ut),Wc=Le.useMergedRef(ze.scrollViewport,Ze),Uc=Nu({rowExpansion:Ee,records:F,idAccessor:N}),Mr=Z.useRef(!1),$s=Z.useRef(x),Dn=Z.useRef(F),qc=Z.useCallback(_e=>{Mr.current=!0,Dn.current=F,w(_e)},[w,F]);Z.useEffect(()=>{$s.current!==x&&(Mr.current=!0,Dn.current=F,$s.current=x)},[x,F]);let Or=F?.length;Z.useLayoutEffect(()=>{if(!Mr.current||m||F===Dn.current)return;let _e=ze.scrollViewport.current;if(!_e)return;let St=requestAnimationFrame(()=>{_e.scrollTo({top:0,left:0}),Mr.current=!1});return()=>cancelAnimationFrame(St)},[m,F,ze.scrollViewport]);let Ns=F?.map(_e=>Ie(_e,N)),Tt=!!H,Qt=H?.map(_e=>Ie(_e,N)),Ls=Ns!==void 0&&Qt!==void 0&&Qt.length>0,kn=G?F?.filter(G):F,Ar=kn?.map(_e=>Ie(_e,N)),jr=Ls&&Ar.every(_e=>Qt.includes(_e)),Vc=Ls&&Ar.some(_e=>Qt.includes(_e)),Hc=Z.useCallback(()=>{H&&W&&W(jr?H.filter(_e=>!Ar.includes(Ie(_e,N))):vn([...H,...kn],_e=>Ie(_e,N)))},[jr,N,W,Ar,kn,H]),{lastSelectionChangeIndex:Er,setLastSelectionChangeIndex:Gc}=Ou(Ns),Pn=Tt&&!S,Qc={m:at,my:ve,mx:Oe,mt:lt,mb:vt,ml:jt,mr:bt},Zc=Z.useCallback(({children:_e})=>ct?ct({children:_e}):_e,[ct]);return b.jsx(ms,{...Sn,children:b.jsxs(O.Box,{ref:ze.root,...Qc,className:Me("mantine-datatable",{"mantine-datatable-with-border":t},wt,Ke?.root),style:[_e=>({...tc({theme:_e,c:$e,backgroundColor:ke,borderColor:Ct,rowBorderColor:je,stripedColor:Ge,highlightOnHoverColor:Ye}),borderRadius:_e.radius[e]||e,boxShadow:_e.shadows[d]||d,height:n,minHeight:s,maxHeight:l}),Et,xe?.root,{position:"relative"}],children:[b.jsx(dc,{viewportRef:Wc,leftShadowBehind:Tt||!!S,rightShadowBehind:C,onScrollPositionChange:zc,scrollAreaProps:it,children:b.jsx(Zc,{children:b.jsxs(O.Table,{ref:Fc,horizontalSpacing:P,className:Me("mantine-datatable-table",{[Bu]:r,"mantine-datatable-vertical-align-top":a==="top","mantine-datatable-vertical-align-bottom":a==="bottom","mantine-datatable-pin-last-column":C,"mantine-datatable-selection-column-visible":Tt,"mantine-datatable-pin-first-column":S,"mantine-datatable-resizable-columns":Sn.hasResizableColumns&&Ne},Ke?.table),style:{...xe?.table},"data-striped":Or&&$||void 0,"data-highlight-on-hover":j||void 0,...Te,children:[z?null:b.jsx(ms,{...Sn,children:b.jsx(Xu,{ref:ze.header,selectionColumnHeaderRef:ze.selectionColumnHeader,className:Ke?.header,style:xe?.header,columns:be,defaultColumnProps:k,groups:M,sortStatus:J,sortIcons:se,onSortStatusChange:ne,selectionTrigger:B,selectionVisible:Tt,selectionChecked:jr,selectionIndeterminate:Vc&&!jr,onSelectionChange:Hc,selectionCheckboxProps:{...K,...V},selectorCellShadowVisible:Pn,selectionColumnClassName:te,selectionColumnStyle:oe,withColumnBorders:Te.withColumnBorders})}),b.jsx("tbody",{ref:rt,children:Or?F.map((_e,St)=>{let Mn=Ie(_e,N),On=Qt?.includes(Mn)||!1,Bs;return W&&H&&(Bs=Kc=>{if(Kc.nativeEvent.shiftKey&&Er!==null){let Rt=F.filter(St>Er?(Dt,kt)=>kt>=Er&&kt<=St&&(G?G(Dt,kt):!0):(Dt,kt)=>kt>=St&&kt<=Er&&(G?G(Dt,kt):!0));W(On?Ru(H,Rt,Dt=>Ie(Dt,N)):vn([...H,...Rt],Dt=>Ie(Dt,N)))}else W(On?H.filter(Rt=>Ie(Rt,N)!==Mn):vn([...H,_e],Rt=>Ie(Rt,N)));Gc(St)}),b.jsx(uc,{record:_e,index:St,columns:be,defaultColumnProps:k,defaultColumnRender:A,selectionTrigger:B,selectionVisible:Tt,selectionChecked:On,onSelectionChange:Bs,isRecordSelectable:G,selectionCheckboxProps:K,getSelectionCheckboxProps:U,onClick:le,onDoubleClick:he,onCellClick:Q,onCellDoubleClick:fe,onContextMenu:pe,onCellContextMenu:me,expansion:Uc,color:tt,backgroundColor:nt,className:ot,style:st,customAttributes:Qe,selectorCellShadowVisible:Pn,selectionColumnClassName:te,selectionColumnStyle:oe,idAccessor:N,rowFactory:Pe},Mn)}):b.jsx(_u,{})}),be.some(({footer:_e})=>_e)&&b.jsx(zu,{ref:ze.footer,className:Ke?.footer,style:xe?.footer,columns:be,defaultColumnProps:k,selectionVisible:Tt,selectorCellShadowVisible:Pn})]})})}),x&&b.jsx(sc,{className:Ke?.pagination,style:xe?.pagination,horizontalSpacing:P,fetching:m,page:x,onPageChange:qc,totalRecords:h,recordsPerPage:i,onRecordsPerPageChange:p,recordsPerPageOptions:f,recordsPerPageLabel:c,paginationWithEdges:v,paginationWithControls:D,paginationActiveTextColor:T,paginationActiveBackgroundColor:q,paginationSize:X,paginationText:re,paginationWrapBreakpoint:ee,getPaginationControlProps:ae,getPaginationItemProps:ie,noRecordsText:u,loadingText:ce,recordsLength:Or,renderPagination:ue}),b.jsx(ec,{fetching:m,backgroundBlur:E,customContent:L,size:R,type:Y,color:I}),b.jsx(Cu,{icon:g,text:u,active:!m&&!Or,children:o})]})})}function Os(t){const e=Fe.c(42),{fields:r,onClose:n,queryKey:s,apiPath:l,id:d,steps:a}=t,[m,y]=Z.useState(0),[_,M]=Z.useState(!1),{data:S,isLoading:C}=Uo(l,s,d),{mutateAsync:k,isError:A,error:N,isPending:F}=an(l,s);let B;e[0]!==r?(B=new Set(r.filter(vc).map(yc)),e[0]=r,e[1]=B):B=e[1];let H;e[2]!==B?(H=[...B],e[2]=B,e[3]=H):H=e[3];const W=H;let te;e[4]!==r?(te=r.reduce(mc,{}),e[4]=r,e[5]=te):te=e[5];let oe;e[6]!==r?(oe=r.filter(gc).reduce(pc,{}),e[6]=r,e[7]=oe):oe=e[7];let G;e[8]!==te||e[9]!==oe?(G={mode:"uncontrolled",initialValues:te,validate:oe},e[8]=te,e[9]=oe,e[10]=G):G=e[10];const K=An.useForm(G);let V;e[11]!==S||e[12]!==r||e[13]!==K?(V=()=>{if(S){const i={...S};r.forEach(p=>{const f=p.id;p.type==="boolean"&&i[f]===null?i[f]=!1:p.type==="date"&&i[f]?i[f]=new Date(i[f]):i[f]===null&&(i[f]="")}),K.initialize(i),K.setValues(i)}},e[11]=S,e[12]=r,e[13]=K,e[14]=V):V=e[14];let U;e[15]!==S?(U=[S],e[15]=S,e[16]=U):U=e[16],Z.useEffect(V,U);let J;e[17]===Symbol.for("react.memo_cache_sentinel")?(J=function(p,f){return typeof p.required=="function"?p.required(f??{}):!!p.required},e[17]=J):J=e[17];const se=J;let ne;e[18]!==K||e[19]!==d?(ne=function(p){const f=K.getValues();if(p.conditional&&!p.conditional(f))return null;const c=se(p,f);return b.jsxs(Z.Fragment,{children:[(p.type===void 0||p.type=="text")&&b.jsx(O.TextInput,{label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),type:p.id.includes("email")?"email":void 0,required:c},K.key(p.id)),p.type==="number"&&b.jsx(O.NumberInput,{decimalSeparator:",",label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),required:c},K.key(p.id)),p.type==="date"&&b.jsx(Cr,{label:p.column.title,placeholder:p.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...K.getInputProps(p.id),required:c},K.key(p.id)),p.type==="boolean"&&b.jsx(O.Checkbox,{mt:"md",label:p.column.title,...K.getInputProps(p.id,{type:"checkbox"}),required:c},K.key(p.id)),p.type==="textarea"&&b.jsx(O.Textarea,{label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),minRows:3,autosize:!0,required:c},K.key(p.id)),p.type==="custom"&&p.render&&p.render({...K.getValues(),id:d},K.setValues,M,{error:K.getInputProps(p.id).error,required:c})]},p.id)},e[18]=K,e[19]=d,e[20]=ne):ne=e[20];const P=ne;let x;e[21]!==A||e[22]!==N?.message||e[23]!==N?.name?(x=A&&b.jsx(O.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[21]=A,e[22]=N?.message,e[23]=N?.name,e[24]=x):x=e[24];let w;e[25]!==m||e[26]!==r||e[27]!==K||e[28]!==_||e[29]!==d||e[30]!==C||e[31]!==F||e[32]!==A||e[33]!==n||e[34]!==P||e[35]!==a||e[36]!==W||e[37]!==k?(w=C?b.jsxs(O.Stack,{gap:"md",children:[b.jsx(O.Skeleton,{height:40}),Array(r.length).fill(0).map(fc),b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Skeleton,{width:100,height:36}),b.jsx(O.Skeleton,{width:100,height:36})]})]}):b.jsxs("form",{onSubmit:K.onSubmit(async i=>{await k({...i,id:d}),W.length&&m<W.length-1?A||y(m+1):A||(K.setInitialValues(i),K.reset(),n())}),children:[W.length?b.jsx(O.Stepper,{active:m,size:"sm",children:W.map(i=>b.jsx(O.Stepper.Step,{...a&&a[i-1]?{label:a[i-1].label}:{},children:r.filter(p=>p.step===i).map(p=>P(p))},i))}):r.map(i=>P(i)),!_&&b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:()=>W.length?m===0?n():y(m-1):n(),variant:"outline",children:W.length?m===0?"Abbrechen":"Zurück":"Abbrechen"}),b.jsx(O.Button,{type:"submit",loading:F,children:W.length?m===W.length-1?"Speichern":"Weiter":"Speichern"})]})]}),e[25]=m,e[26]=r,e[27]=K,e[28]=_,e[29]=d,e[30]=C,e[31]=F,e[32]=A,e[33]=n,e[34]=P,e[35]=a,e[36]=W,e[37]=k,e[38]=w):w=e[38];let h;return e[39]!==x||e[40]!==w?(h=b.jsxs(b.Fragment,{children:[x,w]}),e[39]=x,e[40]=w,e[41]=h):h=e[41],h}function fc(t,e){return b.jsx(O.Skeleton,{height:35},`skeleton-field-${e}`)}function pc(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||!(typeof e.required=="function"?e.required(n):!!e.required)||r?null:"Pflichtfeld",t}function gc(t){return t.required}function mc(t,e){return t[e.id]=e.type==="boolean"?e.defaultValue??!1:e.defaultValue??"",t}function yc(t){return t.step}function vc(t){return typeof t.step=="number"}function As({queryKey:t,apiPath:e,onClose:r,selectedRecords:n}){const{mutateAsync:s,isError:l,error:d,isPending:a}=Ho(e,t),[m,y]=Z.useState(n),[_,M]=Z.useState(!1),S=_||a;return Z.useEffect(()=>{m.length||r()},[r,m]),m.length?b.jsxs(b.Fragment,{children:[l&&d.message&&b.jsx(O.Alert,{variant:"outline",color:"red",title:d.name,children:d.message}),b.jsx(O.Text,{children:m.length===1?`Soll ${m.length} Eintrag wirklich gelöscht werden?`:`Sollen ${m.length} Einträge wirklich gelöscht werden?`}),b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:r,variant:"outline",disabled:S,children:"Abbrechen"}),b.jsx(O.Button,{color:"red",loading:S,onClick:async()=>{M(!0);try{await Promise.all(m.map(C=>s(C.id))),y([])}finally{M(!1)}},children:"Löschen"})]})]}):b.jsx(b.Fragment,{})}function js(t,e){const r=Fe.c(8);let n;r[0]!==t||r[1]!==e?(n=()=>{const y=localStorage.getItem(`use_persistent_storage_${e}`);return y?JSON.parse(y):t},r[0]=t,r[1]=e,r[2]=n):n=r[2];const[s,l]=Z.useState(n);let d;r[3]!==e?(d=y=>{l(y),localStorage.setItem(`use_persistent_storage_${e}`,JSON.stringify(y))},r[3]=e,r[4]=d):d=r[4];const a=d;let m;return r[5]!==a||r[6]!==s?(m=[s,a],r[5]=a,r[6]=s,r[7]=m):m=r[7],m}const bc=(t,e)=>{const r=t.map(m=>m[e]).filter(m=>m!=null&&m!=="");if(r.length===0)return"string";const n=Math.min(100,r.length),s=r.slice(0,n),l={string:0,number:0,date:0},d=[/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,/^\d{4}-\d{2}-\d{2}$/,/^\d{1,2}\/\d{1,2}\/\d{4}$/,/^\d{1,2}\.\d{1,2}\.\d{4}$/];s.forEach(m=>{if(typeof m=="number")l.number++;else if(typeof m=="string"){const y=m.trim();if(y!==""&&!isNaN(Number(y))&&!isNaN(parseFloat(y))){l.number++;return}if(d.some(_=>_.test(y))){const _=new Date(y);if(!isNaN(_.getTime())){l.date++;return}}l.string++}else m instanceof Date?l.date++:l.string++});const a=l.string+l.number+l.date;return l.date/a>=.6?"date":l.number/a>=.6?"number":l.string/a>=.6?"string":"mixed"},Es=new Map,Ts=(t,e,r="asc")=>{if(!t||t.length===0)return[];const n=`${String(e)}_${t.length}`;let s=Es.get(n);return s||(s=bc(t,e),Es.set(n,s)),[...t].sort((d,a)=>{const m=d[e],y=a[e],_=m==null||m==="",M=y==null||y==="";if(_&&M)return 0;if(_)return r==="asc"?-1:1;if(M)return r==="asc"?1:-1;let S,C;switch(s){case"date":if(typeof m=="string"){const B=new Date(m.trim());S=isNaN(B.getTime())?null:B.getTime()}else m instanceof Date?S=m.getTime():S=null;if(typeof y=="string"){const B=new Date(y.trim());C=isNaN(B.getTime())?null:B.getTime()}else y instanceof Date?C=y.getTime():C=null;break;case"number":if(typeof m=="number")S=m;else{const B=String(m).trim(),H=parseFloat(B);S=isNaN(H)?null:H}if(typeof y=="number")C=y;else{const B=String(y).trim(),H=parseFloat(B);C=isNaN(H)?null:H}break;case"string":const k=typeof m=="string"?m:String(m),A=typeof y=="string"?y:String(y);S=k.toLowerCase().trim(),C=A.toLowerCase().trim();break;case"mixed":default:const N=String(m),F=String(y);S=N.toLowerCase().trim(),C=F.toLowerCase().trim();break}return S===null&&C===null?0:S===null?r==="asc"?1:-1:C===null||S<C?r==="asc"?-1:1:S>C?r==="asc"?1:-1:0})};function wc(t,e){return e.split(".").reduce((r,n)=>{if(r&&typeof r=="object"&&n in r)return r[n]},t)}function _c(t,e){const r=e.column;if(r.render)return r.render(t,0);const n=r.accessor??e.id,s=wc(t,n);return s==null?b.jsx(O.Text,{c:"dimmed",children:"–"}):typeof s=="boolean"?b.jsx(O.Text,{fz:"sm",children:s?"Ja":"Nein"}):b.jsx(O.Text,{fz:"sm",children:String(s)})}function xc(t){const e=Fe.c(10),{field:r,record:n}=t,s=r.column.title??r.id;let l;e[0]!==s?(l=b.jsx(O.Text,{fw:700,fz:"sm",children:s}),e[0]=s,e[1]=l):l=e[1];let d;e[2]!==r||e[3]!==n?(d=_c(n,r),e[2]=r,e[3]=n,e[4]=d):d=e[4];let a;e[5]!==d?(a=b.jsx(O.Box,{ta:"right",children:d}),e[5]=d,e[6]=a):a=e[6];let m;return e[7]!==l||e[8]!==a?(m=b.jsxs(O.Group,{wrap:"nowrap",justify:"space-between",py:"xs",px:"sm",children:[l,a]}),e[7]=l,e[8]=a,e[9]=m):m=e[9],m}function Rs(t){const e=Fe.c(39),{records:r,fields:n,selection:s,selectedRecords:l,onSelectedRecordsChange:d,onRowClick:a,pagination:m,sort:y,rowExpansion:_}=t;let M;e[0]!==l?(M=l===void 0?[]:l,e[0]=l,e[1]=M):M=e[1];const S=M;let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=new Set,e[2]=C):C=e[2];const[k,A]=Z.useState(C);let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N=U=>{A(J=>{const se=new Set(J);return se.has(U)?se.delete(U):se.add(U),se})},e[3]=N):N=e[3];const F=N;let B,H,W,te,oe,G;if(e[4]!==k||e[5]!==n||e[6]!==a||e[7]!==d||e[8]!==r||e[9]!==_||e[10]!==S||e[11]!==s||e[12]!==y){G=Symbol.for("react.early_return_sentinel");e:{const U=n.filter(Pc),J=U.filter(kc).map(Dc);let se;e[19]!==S?(se=i=>S.some(p=>p.id===i.id),e[19]=S,e[20]=se):se=e[20];const ne=se;let P;e[21]!==ne||e[22]!==d||e[23]!==S?(P=i=>{d&&(ne(i)?d(S.filter(p=>p.id!==i.id)):d([...S,i]))},e[21]=ne,e[22]=d,e[23]=S,e[24]=P):P=e[24];const x=P;let w;e[25]!==a||e[26]!==s||e[27]!==x?(w=(i,p,f)=>{a?a({record:i,index:p,event:f}):s&&x(i)},e[25]=a,e[26]=s,e[27]=x,e[28]=w):w=e[28];const h=w;if(r.length===0){let i;e[29]===Symbol.for("react.memo_cache_sentinel")?(i=b.jsx(O.Text,{c:"dimmed",ta:"center",py:"xl",children:"Keine Einträge gefunden"}),e[29]=i):i=e[29],G=i;break e}B=O.Stack,H="sm",W="md",te=y&&J.length>0&&b.jsxs(O.Group,{gap:"xs",wrap:"nowrap",children:[b.jsx(O.Select,{data:J,value:y.field,onChange:i=>i&&y.onSortChange(i,y.direction),allowDeselect:!1,style:{flex:1}}),b.jsx(O.ActionIcon,{variant:"filled",size:"input-sm",onClick:()=>y.onSortChange(y.field,y.direction==="asc"?"desc":"asc"),children:y.direction==="asc"?b.jsx(dt.IconSortAscending,{size:18}):b.jsx(dt.IconSortDescending,{size:18})})]}),oe=r.map((i,p)=>{const f=ne(i),c=!!a||!!s,v=k.has(i.id);return b.jsx(Z.Fragment,{children:b.jsxs(O.Box,{bg:f?"var(--mantine-primary-color-light)":p%2===0?"var(--mantine-color-gray-0)":"white",bd:p%2===1&&!f?"1px solid var(--mantine-color-gray-2)":void 0,style:{borderRadius:"var(--mantine-radius-md)",overflow:"hidden"},children:[b.jsxs(O.UnstyledButton,{w:"100%",style:{cursor:c||_?"pointer":"default"},onClick:D=>{_&&!a?F(i.id):h(i,p,D)},component:c||_?void 0:"div",children:[(s||_)&&b.jsxs(O.Group,{px:"sm",pt:"sm",justify:"space-between",children:[s?b.jsx(O.Checkbox,{checked:f,onChange:()=>x(i),onClick:Sc}):b.jsx("span",{}),_&&b.jsx(O.Box,{c:"dimmed",style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:D=>{D.stopPropagation(),F(i.id)},children:b.jsx(dt.IconChevronDown,{size:16,style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms"}})})]}),U.map((D,T)=>b.jsxs(Z.Fragment,{children:[T>0&&b.jsx(O.Divider,{}),b.jsx(xc,{field:D,record:i})]},D.id))]}),_&&b.jsxs(O.Collapse,{in:v,children:[b.jsx(O.Divider,{}),b.jsx(O.Box,{px:"sm",py:"sm",children:_.content(i)})]})]})},i.id)})}e[4]=k,e[5]=n,e[6]=a,e[7]=d,e[8]=r,e[9]=_,e[10]=S,e[11]=s,e[12]=y,e[13]=B,e[14]=H,e[15]=W,e[16]=te,e[17]=oe,e[18]=G}else B=e[13],H=e[14],W=e[15],te=e[16],oe=e[17],G=e[18];if(G!==Symbol.for("react.early_return_sentinel"))return G;let K;e[30]!==m?(K=m&&m.totalRecords>m.recordsPerPage&&b.jsxs(O.Stack,{gap:"xs",mt:"sm",children:[b.jsx(O.Group,{justify:"center",children:b.jsx(O.Pagination,{total:Math.ceil(m.totalRecords/m.recordsPerPage),value:m.page,onChange:m.onPageChange,size:"sm"})}),m.recordsPerPageOptions&&m.onRecordsPerPageChange&&b.jsxs(O.Group,{justify:"center",gap:"xs",children:[b.jsx(O.Text,{fz:"xs",c:"dimmed",children:"Einträge pro Seite:"}),b.jsx(O.Select,{data:m.recordsPerPageOptions.map(Cc),value:String(m.recordsPerPage),onChange:U=>U&&m.onRecordsPerPageChange(Number(U)),allowDeselect:!1,size:"xs",w:70})]})]}),e[30]=m,e[31]=K):K=e[31];let V;return e[32]!==B||e[33]!==K||e[34]!==H||e[35]!==W||e[36]!==te||e[37]!==oe?(V=b.jsxs(B,{gap:H,my:W,children:[te,oe,K]}),e[32]=B,e[33]=K,e[34]=H,e[35]=W,e[36]=te,e[37]=oe,e[38]=V):V=e[38],V}function Cc(t){return{value:String(t),label:String(t)}}function Sc(t){return t.stopPropagation()}function Dc(t){return{value:t.column.accessor??t.id,label:t.column.title??t.id}}function kc(t){return t.column.sortable!==!1}function Pc(t){return t.list&&t.column}const Cn=[10,15,50,100,500];function Mc(t){const e=Fe.c(115),{title:r,queryKey:n,connectedQueryKeys:s,apiPath:l,mutationApiPath:d,buttons:a,fields:m,selection:y,pagination:_,filters:M,actions:S,steps:C,defaultSort:k,onSortChange:A,createButtonText:N,queryParams:F,tabs:B,defaultTab:H,activeTab:W,onActiveTabChange:te,canUpdate:oe,canDelete:G,showRefresh:K,rowExpansion:V,onRowClick:U,mobileCards:J}=t,se=K===void 0?!0:K,ne=J===void 0?!1:J,[P,x]=Z.useState(H||(B&&B.length>0?B[0].value:null)),w=W!==void 0?W:P;let h;e[0]!==W||e[1]!==te?(h=xe=>{W===void 0&&x(xe),te&&te(xe)},e[0]=W,e[1]=te,e[2]=h):h=e[2];const i=h,p=B?.find(xe=>xe.value===w)?.queryParams||{},f={...F,...p},c=f?"?"+Object.entries(f).filter(Ic).map(Bc).join("&"):"";let v;e[3]!==w||e[4]!==n?(v=w?[...n,w]:n,e[3]=w,e[4]=n,e[5]=v):v=e[5];const D=v,{data:T,isLoading:q,isError:X,isRefetching:re,refetch:ee}=qo(l+c,D),{queryClient:ae}=pt();let ie,ue;e[6]!==T||e[7]!==s||e[8]!==ae?(ie=()=>{!T||!Array.isArray(T)||s?.forEach(xe=>ae.invalidateQueries({queryKey:xe}))},ue=[T,s,ae],e[6]=T,e[7]=s,e[8]=ae,e[9]=ie,e[10]=ue):(ie=e[9],ue=e[10]),Z.useEffect(ie,ue);const E=!T||!Array.isArray(T)?[]:!M||M.length===0?T:T.filter(xe=>M.every(Pe=>{if(Pe.value===void 0)return!0;const ct=Pe.id;if(Pe.type==="query"){const Te=xe[ct];return Array.isArray(Pe.value)?Array.isArray(Te)?Te.some(be=>{if(typeof be=="string"||typeof be=="number")return Pe.value.includes(String(be));if(be&&typeof be=="object"){if("id"in be&&Pe.value.includes(be.id))return!0;for(const Ne in be){const We=be[Ne];if(typeof We=="string"&&Pe.value.includes(We)||We&&typeof We=="object"&&"id"in We&&Pe.value.includes(We.id))return!0}}return!1}):Te&&typeof Te=="object"&&"id"in Te?Pe.value.includes(Te.id):!1:typeof Te=="string"&&Te.includes(Pe.value)}else if(Pe.type==="date"){const Te=Pe.value;if(!Te)return!0;const[be,Ne]=Te;if(!be&&!Ne)return!0;const We=xe[ct];if(typeof We=="string"){const ze=We.split(" ")[0];if(be&&Ne)return ze>=be&&ze<=Ne;if(be&&!Ne)return ze>=be;if(!be&&Ne)return ze<=Ne}return!0}else if(Pe.type==="boolean")return xe[ct]===Pe.value;return!0})),L=k?.field??m[0].id,R=k?.direction??"desc";let Y;e[11]!==L||e[12]!==R?(Y={columnAccessor:L,direction:R},e[11]=L,e[12]=R,e[13]=Y):Y=e[13];const[I,ce]=Z.useState(Y);let o;e[14]!==A?(o=xe=>{ce(xe),A&&A(String(xe.columnAccessor),xe.direction)},e[14]=A,e[15]=o):o=e[15];const u=o,g=Ts(E,I.columnAccessor,I.direction),[j,$]=js(Cn[1],"mantine-table-page-size"),[z,le]=Z.useState(1),he=_?g.slice((z-1)*j,z*j):g;let pe;e[16]===Symbol.for("react.memo_cache_sentinel")?(pe=[],e[16]=pe):pe=e[16];const[Q,fe]=Z.useState(pe);let me;e[17]===Symbol.for("react.memo_cache_sentinel")?(me=()=>{fe([])},e[17]=me):me=e[17];let ge;e[18]!==w?(ge=[w],e[18]=w,e[19]=ge):ge=e[19],Z.useEffect(me,ge);const[Se,Ce]=Z.useState(!1),[De,He]=Z.useState(!1),[$e,ke]=Z.useState(!1),Ct=r?"space-between":"end";let je;e[20]!==r?(je=r&&(typeof r=="string"?b.jsx(O.Title,{order:4,children:r}):r),e[20]=r,e[21]=je):je=e[21];let Ge;e[22]!==ee||e[23]!==se?(Ge=se&&b.jsx(O.ActionIcon,{variant:"subtle",onClick:()=>ee(),"aria-label":"Neuladen",children:b.jsx(dt.IconRefresh,{})}),e[22]=ee,e[23]=se,e[24]=Ge):Ge=e[24];let Ye;e[25]!==S||e[26]!==G||e[27]!==oe||e[28]!==m||e[29]!==Q||e[30]!==y?(Ye=(m.some(Lc)||y)&&(()=>{const xe=m.find(Nc)&&(!oe||Q.length>0&&oe(Q[0])),Pe=m.find($c)&&(!G||Q.length>0&&G(Q[0])),ct=(S??[]).length>0,Te=xe||Pe||ct;return b.jsxs(O.Menu,{shadow:"md",children:[b.jsx(O.Menu.Target,{children:b.jsx(O.Button,{variant:"outline",rightSection:b.jsx(dt.IconCaretDownFilled,{size:14}),disabled:!Q.length||!Te,children:"Aktionen"})}),b.jsxs(O.Menu.Dropdown,{children:[xe&&b.jsx(O.Menu.Item,{leftSection:b.jsx(dt.IconPencil,{size:14}),onClick:()=>He(!0),disabled:Q.length!==1,children:"Bearbeiten"}),(S??[]).map((be,Ne)=>Z.createElement(O.Menu.Item,{...be.icon&&{leftSection:be.icon},key:`custom_action_${Ne}`,onClick:()=>be.onClick(Q)},be.label)),Pe&&b.jsx(O.Menu.Item,{leftSection:b.jsx(dt.IconTrash,{size:14}),onClick:()=>ke(!0),color:"red",children:"Löschen"})]})]})})(),e[25]=S,e[26]=G,e[27]=oe,e[28]=m,e[29]=Q,e[30]=y,e[31]=Ye):Ye=e[31];let tt;e[32]!==N||e[33]!==m||e[34]!==q?(tt=m.find(Rc)&&b.jsx(O.Button,{onClick:()=>Ce(!0),disabled:q,children:N??"Erstellen"}),e[32]=N,e[33]=m,e[34]=q,e[35]=tt):tt=e[35];let nt;e[36]!==a||e[37]!==Ge||e[38]!==Ye||e[39]!==tt?(nt=b.jsxs(O.Group,{align:"center",gap:"xs",children:[Ge,Ye,tt,a]}),e[36]=a,e[37]=Ge,e[38]=Ye,e[39]=tt,e[40]=nt):nt=e[40];let Ee;e[41]!==Ct||e[42]!==je||e[43]!==nt?(Ee=b.jsxs(O.Group,{gap:"xs",justify:Ct,align:"center",children:[je,nt]}),e[41]=Ct,e[42]=je,e[43]=nt,e[44]=Ee):Ee=e[44];let ot;e[45]!==w||e[46]!==i||e[47]!==B?(ot=B&&B.length>0&&b.jsx(O.Tabs,{value:w,onChange:i,mt:"md",children:b.jsx(O.Tabs.List,{children:B.map(Tc)})}),e[45]=w,e[46]=i,e[47]=B,e[48]=ot):ot=e[48];let st;e[49]!==X?(st=X&&b.jsx(O.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:b.jsx(dt.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),e[49]=X,e[50]=st):st=e[50];let Qe;e[51]!==q||e[52]!==re?(Qe=(q||re)&&b.jsxs(O.Stack,{my:"md",children:[b.jsx(O.Skeleton,{height:40}),Array(5).fill(0).map(Ec)]}),e[51]=q,e[52]=re,e[53]=Qe):Qe=e[53];let Ze;e[54]!==m||e[55]!==u||e[56]!==X||e[57]!==q||e[58]!==re||e[59]!==ne||e[60]!==U||e[61]!==z||e[62]!==j||e[63]!==_||e[64]!==he||e[65]!==V||e[66]!==Q||e[67]!==y||e[68]!==le||e[69]!==$||e[70]!==I||e[71]!==g?(Ze=!q&&!re&&b.jsxs(b.Fragment,{children:[b.jsx(O.Box,{...ne?{visibleFrom:"sm"}:{},children:b.jsx(hc,{my:"md",striped:!0,highlightOnHover:!0,minHeight:150,fetching:X,records:he,sortStatus:I,onSortStatusChange:u,...y&&{selectedRecords:Q,onSelectedRecordsChange:fe},..._&&he.length&&{totalRecords:g.length,recordsPerPage:j,onPageChange:le,page:z,recordsPerPageOptions:Cn,onRecordsPerPageChange:$,recordsPerPageLabel:"Einträge pro Seite"},...V&&{rowExpansion:{allowMultiple:V.allowMultiple??!1,content:xe=>{const{record:Pe}=xe;return V.content(Pe)},...V.expanded&&{expanded:V.expanded}}},columns:m.map(jc),noRecordsText:"Keine Einträge gefunden",onRowClick:U,...U&&{style:{cursor:"pointer"}}})}),ne&&b.jsx(O.Box,{hiddenFrom:"sm",children:b.jsx(Rs,{records:he,fields:m,selection:y,selectedRecords:Q,onSelectedRecordsChange:fe,onRowClick:U,sort:{field:String(I.columnAccessor),direction:I.direction,onSortChange:(xe,Pe)=>{u({columnAccessor:xe,direction:Pe})}},..._&&he.length&&{pagination:{totalRecords:g.length,recordsPerPage:j,page:z,onPageChange:le,recordsPerPageOptions:Cn,onRecordsPerPageChange:xe=>{$(xe),le(1)}}},...V&&{rowExpansion:{content:V.content}}})})]}),e[54]=m,e[55]=u,e[56]=X,e[57]=q,e[58]=re,e[59]=ne,e[60]=U,e[61]=z,e[62]=j,e[63]=_,e[64]=he,e[65]=V,e[66]=Q,e[67]=y,e[68]=le,e[69]=$,e[70]=I,e[71]=g,e[72]=Ze):Ze=e[72];let it;e[73]===Symbol.for("react.memo_cache_sentinel")?(it=()=>{He(!1),fe([])},e[73]=it):it=e[73];const ut=r??"Bearbeiten";let rt;e[74]!==l||e[75]!==m||e[76]!==d||e[77]!==n||e[78]!==Q[0]||e[79]!==Q.length||e[80]!==C?(rt=Q.length>0&&b.jsx(Os,{fields:m.filter(Ac),queryKey:n,apiPath:d??l,id:Q[0].id,onClose:()=>{He(!1),fe([])},steps:C}),e[74]=l,e[75]=m,e[76]=d,e[77]=n,e[78]=Q[0],e[79]=Q.length,e[80]=C,e[81]=rt):rt=e[81];let at;e[82]!==ut||e[83]!==rt||e[84]!==De?(at=b.jsx(O.Modal,{opened:De,onClose:it,title:ut,children:rt}),e[82]=ut,e[83]=rt,e[84]=De,e[85]=at):at=e[85];let ve;e[86]!==l||e[87]!==$e||e[88]!==d||e[89]!==n||e[90]!==Q||e[91]!==r?(ve=Q.length>0&&b.jsx(O.Modal,{opened:$e,onClose:()=>{ke(!1),fe([])},title:r??"Löschen",children:b.jsx(As,{onClose:()=>{ke(!1),fe([])},queryKey:n,apiPath:d??l,selectedRecords:Q})}),e[86]=l,e[87]=$e,e[88]=d,e[89]=n,e[90]=Q,e[91]=r,e[92]=ve):ve=e[92];let Oe;e[93]===Symbol.for("react.memo_cache_sentinel")?(Oe=()=>{Ce(!1)},e[93]=Oe):Oe=e[93];const lt=r??"Anlegen",vt=d??l;let jt;e[94]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{Ce(!1)},e[94]=jt):jt=e[94];let bt;e[95]!==m?(bt=m.filter(Oc),e[95]=m,e[96]=bt):bt=e[96];let wt;e[97]!==n||e[98]!==C||e[99]!==vt||e[100]!==bt?(wt=b.jsx(gs,{queryKey:n,apiPath:vt,onClose:jt,fields:bt,steps:C}),e[97]=n,e[98]=C,e[99]=vt,e[100]=bt,e[101]=wt):wt=e[101];let Ke;e[102]!==Se||e[103]!==lt||e[104]!==wt?(Ke=b.jsx(O.Modal,{opened:Se,onClose:Oe,title:lt,children:wt}),e[102]=Se,e[103]=lt,e[104]=wt,e[105]=Ke):Ke=e[105];let Et;return e[106]!==Ee||e[107]!==ot||e[108]!==st||e[109]!==Qe||e[110]!==Ze||e[111]!==at||e[112]!==ve||e[113]!==Ke?(Et=b.jsxs(b.Fragment,{children:[Ee,ot,st,Qe,Ze,at,ve,Ke]}),e[106]=Ee,e[107]=ot,e[108]=st,e[109]=Qe,e[110]=Ze,e[111]=at,e[112]=ve,e[113]=Ke,e[114]=Et):Et=e[114],Et}function Oc(t){return t.create}function Ac(t){return t.update}function jc(t){return t.column}function Ec(t,e){return b.jsx(O.Skeleton,{height:35},`skeleton-${e}`)}function Tc(t){return b.jsx(O.Tabs.Tab,{value:t.value,leftSection:t.icon,children:t.label},t.value)}function Rc(t){return t.create}function $c(t){return t.delete}function Nc(t){return t.update}function Lc(t){return t.update}function Bc(t){const[e,r]=t;return`${e}=${encodeURIComponent(r??"")}`}function Ic(t){const[,e]=t;return e!=null}function Yc(t){const e=Fe.c(5),{queryClient:r}=pt();let n;e[0]!==t?(n=b.jsx(Mc,{...t}),e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==r||e[3]!==n?(s=b.jsx(Qn,{client:r,children:n}),e[2]=r,e[3]=n,e[4]=s):s=e[4],s}we.CreateModal=gs,we.DataTable=Yc,we.DataTableProvider=gl,we.DeleteModal=As,we.MobileCardList=Rs,we.UpdateModal=Os,we.api=yl,we.createOne=Fo,we.deleteOne=zo,we.getAll=Io,we.getApiHeaders=xt,we.getOne=Yo,we.sortData=Ts,we.updateOne=Wo,we.useAddOne=Vo,we.useDataTable=pt,we.useDeleteOne=Ho,we.useGetAll=qo,we.useGetOne=Uo,we.usePersistentState=js,we.useUpdateOne=an,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})}));
19
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),r.useMemoCache(e)}})()),so}var ao;function Pi(){return ao||(ao=1,process.env.NODE_ENV==="production"?Wr.exports=Di():Wr.exports=ki()),Wr.exports}Pi();var lo={},Yt={},uo;function Mi(){if(uo)return Yt;uo=1,Yt.byteLength=a,Yt.toByteArray=y,Yt.fromByteArray=S;for(var t=[],e=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=n.length;s<l;++s)t[s]=n[s],e[n.charCodeAt(s)]=s;e[45]=62,e[95]=63;function c(C){var k=C.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=C.indexOf("=");A===-1&&(A=k);var N=A===k?0:4-A%4;return[A,N]}function a(C){var k=c(C),A=k[0],N=k[1];return(A+N)*3/4-N}function m(C,k,A){return(k+A)*3/4-A}function y(C){var k,A=c(C),N=A[0],F=A[1],B=new r(m(C,N,F)),H=0,W=F>0?N-4:N,te;for(te=0;te<W;te+=4)k=e[C.charCodeAt(te)]<<18|e[C.charCodeAt(te+1)]<<12|e[C.charCodeAt(te+2)]<<6|e[C.charCodeAt(te+3)],B[H++]=k>>16&255,B[H++]=k>>8&255,B[H++]=k&255;return F===2&&(k=e[C.charCodeAt(te)]<<2|e[C.charCodeAt(te+1)]>>4,B[H++]=k&255),F===1&&(k=e[C.charCodeAt(te)]<<10|e[C.charCodeAt(te+1)]<<4|e[C.charCodeAt(te+2)]>>2,B[H++]=k>>8&255,B[H++]=k&255),B}function _(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function M(C,k,A){for(var N,F=[],B=k;B<A;B+=3)N=(C[B]<<16&16711680)+(C[B+1]<<8&65280)+(C[B+2]&255),F.push(_(N));return F.join("")}function S(C){for(var k,A=C.length,N=A%3,F=[],B=16383,H=0,W=A-N;H<W;H+=B)F.push(M(C,H,H+B>W?W:H+B));return N===1?(k=C[A-1],F.push(t[k>>2]+t[k<<4&63]+"==")):N===2&&(k=(C[A-2]<<8)+C[A-1],F.push(t[k>>10]+t[k>>4&63]+t[k<<2&63]+"=")),F.join("")}return Yt}var qr={};var co;function Oi(){return co||(co=1,qr.read=function(t,e,r,n,s){var l,c,a=s*8-n-1,m=(1<<a)-1,y=m>>1,_=-7,M=r?s-1:0,S=r?-1:1,C=t[e+M];for(M+=S,l=C&(1<<-_)-1,C>>=-_,_+=a;_>0;l=l*256+t[e+M],M+=S,_-=8);for(c=l&(1<<-_)-1,l>>=-_,_+=n;_>0;c=c*256+t[e+M],M+=S,_-=8);if(l===0)l=1-y;else{if(l===m)return c?NaN:(C?-1:1)*(1/0);c=c+Math.pow(2,n),l=l-y}return(C?-1:1)*c*Math.pow(2,l-n)},qr.write=function(t,e,r,n,s,l){var c,a,m,y=l*8-s-1,_=(1<<y)-1,M=_>>1,S=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:l-1,k=n?1:-1,A=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,c=_):(c=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-c))<1&&(c--,m*=2),c+M>=1?e+=S/m:e+=S*Math.pow(2,1-M),e*m>=2&&(c++,m/=2),c+M>=_?(a=0,c=_):c+M>=1?(a=(e*m-1)*Math.pow(2,s),c=c+M):(a=e*Math.pow(2,M-1)*Math.pow(2,s),c=0));s>=8;t[r+C]=a&255,C+=k,a/=256,s-=8);for(c=c<<s|a,y+=s;y>0;t[r+C]=c&255,C+=k,c/=256,y-=8);t[r+C-k]|=A*128}),qr}var Vr,ho;function Ai(){if(ho)return Vr;ho=1;var t={}.toString;return Vr=Array.isArray||function(e){return t.call(e)=="[object Array]"},Vr}var fo;function ji(){return fo||(fo=1,(function(t){var e=Mi(),r=Oi(),n=Ai();t.Buffer=a,t.SlowBuffer=F,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=eo.TYPED_ARRAY_SUPPORT!==void 0?eo.TYPED_ARRAY_SUPPORT:s(),t.kMaxLength=l();function s(){try{var o=new Uint8Array(1);return o.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},o.foo()===42&&typeof o.subarray=="function"&&o.subarray(1,1).byteLength===0}catch{return!1}}function l(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(o,u){if(l()<u)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(o=new Uint8Array(u),o.__proto__=a.prototype):(o===null&&(o=new a(u)),o.length=u),o}function a(o,u,g){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(o,u,g);if(typeof o=="number"){if(typeof u=="string")throw new Error("If encoding is specified then the first argument must be a string");return M(this,o)}return m(this,o,u,g)}a.poolSize=8192,a._augment=function(o){return o.__proto__=a.prototype,o};function m(o,u,g,j){if(typeof u=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&u instanceof ArrayBuffer?k(o,u,g,j):typeof u=="string"?S(o,u,g):A(o,u)}a.from=function(o,u,g){return m(null,o,u,g)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0}));function y(o){if(typeof o!="number")throw new TypeError('"size" argument must be a number');if(o<0)throw new RangeError('"size" argument must not be negative')}function _(o,u,g,j){return y(u),u<=0?c(o,u):g!==void 0?typeof j=="string"?c(o,u).fill(g,j):c(o,u).fill(g):c(o,u)}a.alloc=function(o,u,g){return _(null,o,u,g)};function M(o,u){if(y(u),o=c(o,u<0?0:N(u)|0),!a.TYPED_ARRAY_SUPPORT)for(var g=0;g<u;++g)o[g]=0;return o}a.allocUnsafe=function(o){return M(null,o)},a.allocUnsafeSlow=function(o){return M(null,o)};function S(o,u,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError('"encoding" must be a valid string encoding');var j=B(u,g)|0;o=c(o,j);var $=o.write(u,g);return $!==j&&(o=o.slice(0,$)),o}function C(o,u){var g=u.length<0?0:N(u.length)|0;o=c(o,g);for(var j=0;j<g;j+=1)o[j]=u[j]&255;return o}function k(o,u,g,j){if(u.byteLength,g<0||u.byteLength<g)throw new RangeError("'offset' is out of bounds");if(u.byteLength<g+(j||0))throw new RangeError("'length' is out of bounds");return g===void 0&&j===void 0?u=new Uint8Array(u):j===void 0?u=new Uint8Array(u,g):u=new Uint8Array(u,g,j),a.TYPED_ARRAY_SUPPORT?(o=u,o.__proto__=a.prototype):o=C(o,u),o}function A(o,u){if(a.isBuffer(u)){var g=N(u.length)|0;return o=c(o,g),o.length===0||u.copy(o,0,0,g),o}if(u){if(typeof ArrayBuffer<"u"&&u.buffer instanceof ArrayBuffer||"length"in u)return typeof u.length!="number"||ce(u.length)?c(o,0):C(o,u);if(u.type==="Buffer"&&n(u.data))return C(o,u.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function N(o){if(o>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return o|0}function F(o){return+o!=o&&(o=0),a.alloc(+o)}a.isBuffer=function(o){return!!(o!=null&&o._isBuffer)},a.compare=function(o,u){if(!a.isBuffer(o)||!a.isBuffer(u))throw new TypeError("Arguments must be Buffers");if(o===u)return 0;for(var g=o.length,j=u.length,$=0,z=Math.min(g,j);$<z;++$)if(o[$]!==u[$]){g=o[$],j=u[$];break}return g<j?-1:j<g?1:0},a.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(o,u){if(!n(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return a.alloc(0);var g;if(u===void 0)for(u=0,g=0;g<o.length;++g)u+=o[g].length;var j=a.allocUnsafe(u),$=0;for(g=0;g<o.length;++g){var z=o[g];if(!a.isBuffer(z))throw new TypeError('"list" argument must be an Array of Buffers');z.copy(j,$),$+=z.length}return j};function B(o,u){if(a.isBuffer(o))return o.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(o)||o instanceof ArrayBuffer))return o.byteLength;typeof o!="string"&&(o=""+o);var g=o.length;if(g===0)return 0;for(var j=!1;;)switch(u){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":case void 0:return E(o).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Y(o).length;default:if(j)return E(o).length;u=(""+u).toLowerCase(),j=!0}}a.byteLength=B;function H(o,u,g){var j=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,u>>>=0,g<=u))return"";for(o||(o="utf8");;)switch(o){case"hex":return p(this,u,g);case"utf8":case"utf-8":return P(this,u,g);case"ascii":return h(this,u,g);case"latin1":case"binary":return i(this,u,g);case"base64":return ne(this,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,u,g);default:if(j)throw new TypeError("Unknown encoding: "+o);o=(o+"").toLowerCase(),j=!0}}a.prototype._isBuffer=!0;function W(o,u,g){var j=o[u];o[u]=o[g],o[g]=j}a.prototype.swap16=function(){var o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<o;u+=2)W(this,u,u+1);return this},a.prototype.swap32=function(){var o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<o;u+=4)W(this,u,u+3),W(this,u+1,u+2);return this},a.prototype.swap64=function(){var o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<o;u+=8)W(this,u,u+7),W(this,u+1,u+6),W(this,u+2,u+5),W(this,u+3,u+4);return this},a.prototype.toString=function(){var o=this.length|0;return o===0?"":arguments.length===0?P(this,0,o):H.apply(this,arguments)},a.prototype.equals=function(o){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:a.compare(this,o)===0},a.prototype.inspect=function(){var o="",u=t.INSPECT_MAX_BYTES;return this.length>0&&(o=this.toString("hex",0,u).match(/.{2}/g).join(" "),this.length>u&&(o+=" ... ")),"<Buffer "+o+">"},a.prototype.compare=function(o,u,g,j,$){if(!a.isBuffer(o))throw new TypeError("Argument must be a Buffer");if(u===void 0&&(u=0),g===void 0&&(g=o?o.length:0),j===void 0&&(j=0),$===void 0&&($=this.length),u<0||g>o.length||j<0||$>this.length)throw new RangeError("out of range index");if(j>=$&&u>=g)return 0;if(j>=$)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,j>>>=0,$>>>=0,this===o)return 0;for(var z=$-j,le=g-u,he=Math.min(z,le),pe=this.slice(j,$),Q=o.slice(u,g),fe=0;fe<he;++fe)if(pe[fe]!==Q[fe]){z=pe[fe],le=Q[fe];break}return z<le?-1:le<z?1:0};function te(o,u,g,j,$){if(o.length===0)return-1;if(typeof g=="string"?(j=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,isNaN(g)&&(g=$?0:o.length-1),g<0&&(g=o.length+g),g>=o.length){if($)return-1;g=o.length-1}else if(g<0)if($)g=0;else return-1;if(typeof u=="string"&&(u=a.from(u,j)),a.isBuffer(u))return u.length===0?-1:oe(o,u,g,j,$);if(typeof u=="number")return u=u&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?$?Uint8Array.prototype.indexOf.call(o,u,g):Uint8Array.prototype.lastIndexOf.call(o,u,g):oe(o,[u],g,j,$);throw new TypeError("val must be string, number or Buffer")}function oe(o,u,g,j,$){var z=1,le=o.length,he=u.length;if(j!==void 0&&(j=String(j).toLowerCase(),j==="ucs2"||j==="ucs-2"||j==="utf16le"||j==="utf-16le")){if(o.length<2||u.length<2)return-1;z=2,le/=2,he/=2,g/=2}function pe(Se,xe){return z===1?Se[xe]:Se.readUInt16BE(xe*z)}var Q;if($){var fe=-1;for(Q=g;Q<le;Q++)if(pe(o,Q)===pe(u,fe===-1?0:Q-fe)){if(fe===-1&&(fe=Q),Q-fe+1===he)return fe*z}else fe!==-1&&(Q-=Q-fe),fe=-1}else for(g+he>le&&(g=le-he),Q=g;Q>=0;Q--){for(var me=!0,ge=0;ge<he;ge++)if(pe(o,Q+ge)!==pe(u,ge)){me=!1;break}if(me)return Q}return-1}a.prototype.includes=function(o,u,g){return this.indexOf(o,u,g)!==-1},a.prototype.indexOf=function(o,u,g){return te(this,o,u,g,!0)},a.prototype.lastIndexOf=function(o,u,g){return te(this,o,u,g,!1)};function G(o,u,g,j){g=Number(g)||0;var $=o.length-g;j?(j=Number(j),j>$&&(j=$)):j=$;var z=u.length;if(z%2!==0)throw new TypeError("Invalid hex string");j>z/2&&(j=z/2);for(var le=0;le<j;++le){var he=parseInt(u.substr(le*2,2),16);if(isNaN(he))return le;o[g+le]=he}return le}function K(o,u,g,j){return I(E(u,o.length-g),o,g,j)}function V(o,u,g,j){return I(L(u),o,g,j)}function U(o,u,g,j){return V(o,u,g,j)}function J(o,u,g,j){return I(Y(u),o,g,j)}function se(o,u,g,j){return I(R(u,o.length-g),o,g,j)}a.prototype.write=function(o,u,g,j){if(u===void 0)j="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")j=u,g=this.length,u=0;else if(isFinite(u))u=u|0,isFinite(g)?(g=g|0,j===void 0&&(j="utf8")):(j=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var $=this.length-u;if((g===void 0||g>$)&&(g=$),o.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");j||(j="utf8");for(var z=!1;;)switch(j){case"hex":return G(this,o,u,g);case"utf8":case"utf-8":return K(this,o,u,g);case"ascii":return V(this,o,u,g);case"latin1":case"binary":return U(this,o,u,g);case"base64":return J(this,o,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,o,u,g);default:if(z)throw new TypeError("Unknown encoding: "+j);j=(""+j).toLowerCase(),z=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(o,u,g){return u===0&&g===o.length?e.fromByteArray(o):e.fromByteArray(o.slice(u,g))}function P(o,u,g){g=Math.min(o.length,g);for(var j=[],$=u;$<g;){var z=o[$],le=null,he=z>239?4:z>223?3:z>191?2:1;if($+he<=g){var pe,Q,fe,me;switch(he){case 1:z<128&&(le=z);break;case 2:pe=o[$+1],(pe&192)===128&&(me=(z&31)<<6|pe&63,me>127&&(le=me));break;case 3:pe=o[$+1],Q=o[$+2],(pe&192)===128&&(Q&192)===128&&(me=(z&15)<<12|(pe&63)<<6|Q&63,me>2047&&(me<55296||me>57343)&&(le=me));break;case 4:pe=o[$+1],Q=o[$+2],fe=o[$+3],(pe&192)===128&&(Q&192)===128&&(fe&192)===128&&(me=(z&15)<<18|(pe&63)<<12|(Q&63)<<6|fe&63,me>65535&&me<1114112&&(le=me))}}le===null?(le=65533,he=1):le>65535&&(le-=65536,j.push(le>>>10&1023|55296),le=56320|le&1023),j.push(le),$+=he}return w(j)}var x=4096;function w(o){var u=o.length;if(u<=x)return String.fromCharCode.apply(String,o);for(var g="",j=0;j<u;)g+=String.fromCharCode.apply(String,o.slice(j,j+=x));return g}function h(o,u,g){var j="";g=Math.min(o.length,g);for(var $=u;$<g;++$)j+=String.fromCharCode(o[$]&127);return j}function i(o,u,g){var j="";g=Math.min(o.length,g);for(var $=u;$<g;++$)j+=String.fromCharCode(o[$]);return j}function p(o,u,g){var j=o.length;(!u||u<0)&&(u=0),(!g||g<0||g>j)&&(g=j);for(var $="",z=u;z<g;++z)$+=ue(o[z]);return $}function f(o,u,g){for(var j=o.slice(u,g),$="",z=0;z<j.length;z+=2)$+=String.fromCharCode(j[z]+j[z+1]*256);return $}a.prototype.slice=function(o,u){var g=this.length;o=~~o,u=u===void 0?g:~~u,o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<o&&(u=o);var j;if(a.TYPED_ARRAY_SUPPORT)j=this.subarray(o,u),j.__proto__=a.prototype;else{var $=u-o;j=new a($,void 0);for(var z=0;z<$;++z)j[z]=this[z+o]}return j};function d(o,u,g){if(o%1!==0||o<0)throw new RangeError("offset is not uint");if(o+u>g)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUIntLE=function(o,u,g){o=o|0,u=u|0,g||d(o,u,this.length);for(var j=this[o],$=1,z=0;++z<u&&($*=256);)j+=this[o+z]*$;return j},a.prototype.readUIntBE=function(o,u,g){o=o|0,u=u|0,g||d(o,u,this.length);for(var j=this[o+--u],$=1;u>0&&($*=256);)j+=this[o+--u]*$;return j},a.prototype.readUInt8=function(o,u){return u||d(o,1,this.length),this[o]},a.prototype.readUInt16LE=function(o,u){return u||d(o,2,this.length),this[o]|this[o+1]<<8},a.prototype.readUInt16BE=function(o,u){return u||d(o,2,this.length),this[o]<<8|this[o+1]},a.prototype.readUInt32LE=function(o,u){return u||d(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},a.prototype.readUInt32BE=function(o,u){return u||d(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},a.prototype.readIntLE=function(o,u,g){o=o|0,u=u|0,g||d(o,u,this.length);for(var j=this[o],$=1,z=0;++z<u&&($*=256);)j+=this[o+z]*$;return $*=128,j>=$&&(j-=Math.pow(2,8*u)),j},a.prototype.readIntBE=function(o,u,g){o=o|0,u=u|0,g||d(o,u,this.length);for(var j=u,$=1,z=this[o+--j];j>0&&($*=256);)z+=this[o+--j]*$;return $*=128,z>=$&&(z-=Math.pow(2,8*u)),z},a.prototype.readInt8=function(o,u){return u||d(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},a.prototype.readInt16LE=function(o,u){u||d(o,2,this.length);var g=this[o]|this[o+1]<<8;return g&32768?g|4294901760:g},a.prototype.readInt16BE=function(o,u){u||d(o,2,this.length);var g=this[o+1]|this[o]<<8;return g&32768?g|4294901760:g},a.prototype.readInt32LE=function(o,u){return u||d(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},a.prototype.readInt32BE=function(o,u){return u||d(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},a.prototype.readFloatLE=function(o,u){return u||d(o,4,this.length),r.read(this,o,!0,23,4)},a.prototype.readFloatBE=function(o,u){return u||d(o,4,this.length),r.read(this,o,!1,23,4)},a.prototype.readDoubleLE=function(o,u){return u||d(o,8,this.length),r.read(this,o,!0,52,8)},a.prototype.readDoubleBE=function(o,u){return u||d(o,8,this.length),r.read(this,o,!1,52,8)};function v(o,u,g,j,$,z){if(!a.isBuffer(o))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>$||u<z)throw new RangeError('"value" argument is out of bounds');if(g+j>o.length)throw new RangeError("Index out of range")}a.prototype.writeUIntLE=function(o,u,g,j){if(o=+o,u=u|0,g=g|0,!j){var $=Math.pow(2,8*g)-1;v(this,o,u,g,$,0)}var z=1,le=0;for(this[u]=o&255;++le<g&&(z*=256);)this[u+le]=o/z&255;return u+g},a.prototype.writeUIntBE=function(o,u,g,j){if(o=+o,u=u|0,g=g|0,!j){var $=Math.pow(2,8*g)-1;v(this,o,u,g,$,0)}var z=g-1,le=1;for(this[u+z]=o&255;--z>=0&&(le*=256);)this[u+z]=o/le&255;return u+g},a.prototype.writeUInt8=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,1,255,0),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),this[u]=o&255,u+1};function D(o,u,g,j){u<0&&(u=65535+u+1);for(var $=0,z=Math.min(o.length-g,2);$<z;++$)o[g+$]=(u&255<<8*(j?$:1-$))>>>(j?$:1-$)*8}a.prototype.writeUInt16LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8):D(this,o,u,!0),u+2},a.prototype.writeUInt16BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>8,this[u+1]=o&255):D(this,o,u,!1),u+2};function T(o,u,g,j){u<0&&(u=4294967295+u+1);for(var $=0,z=Math.min(o.length-g,4);$<z;++$)o[g+$]=u>>>(j?$:3-$)*8&255}a.prototype.writeUInt32LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255):T(this,o,u,!0),u+4},a.prototype.writeUInt32BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255):T(this,o,u,!1),u+4},a.prototype.writeIntLE=function(o,u,g,j){if(o=+o,u=u|0,!j){var $=Math.pow(2,8*g-1);v(this,o,u,g,$-1,-$)}var z=0,le=1,he=0;for(this[u]=o&255;++z<g&&(le*=256);)o<0&&he===0&&this[u+z-1]!==0&&(he=1),this[u+z]=(o/le>>0)-he&255;return u+g},a.prototype.writeIntBE=function(o,u,g,j){if(o=+o,u=u|0,!j){var $=Math.pow(2,8*g-1);v(this,o,u,g,$-1,-$)}var z=g-1,le=1,he=0;for(this[u+z]=o&255;--z>=0&&(le*=256);)o<0&&he===0&&this[u+z+1]!==0&&(he=1),this[u+z]=(o/le>>0)-he&255;return u+g},a.prototype.writeInt8=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,1,127,-128),a.TYPED_ARRAY_SUPPORT||(o=Math.floor(o)),o<0&&(o=255+o+1),this[u]=o&255,u+1},a.prototype.writeInt16LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8):D(this,o,u,!0),u+2},a.prototype.writeInt16BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>8,this[u+1]=o&255):D(this,o,u,!1),u+2},a.prototype.writeInt32LE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24):T(this,o,u,!0),u+4},a.prototype.writeInt32BE=function(o,u,g){return o=+o,u=u|0,g||v(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),a.TYPED_ARRAY_SUPPORT?(this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255):T(this,o,u,!1),u+4};function q(o,u,g,j,$,z){if(g+j>o.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function X(o,u,g,j,$){return $||q(o,u,g,4),r.write(o,u,g,j,23,4),g+4}a.prototype.writeFloatLE=function(o,u,g){return X(this,o,u,!0,g)},a.prototype.writeFloatBE=function(o,u,g){return X(this,o,u,!1,g)};function re(o,u,g,j,$){return $||q(o,u,g,8),r.write(o,u,g,j,52,8),g+8}a.prototype.writeDoubleLE=function(o,u,g){return re(this,o,u,!0,g)},a.prototype.writeDoubleBE=function(o,u,g){return re(this,o,u,!1,g)},a.prototype.copy=function(o,u,g,j){if(g||(g=0),!j&&j!==0&&(j=this.length),u>=o.length&&(u=o.length),u||(u=0),j>0&&j<g&&(j=g),j===g||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("sourceStart out of bounds");if(j<0)throw new RangeError("sourceEnd out of bounds");j>this.length&&(j=this.length),o.length-u<j-g&&(j=o.length-u+g);var $=j-g,z;if(this===o&&g<u&&u<j)for(z=$-1;z>=0;--z)o[z+u]=this[z+g];else if($<1e3||!a.TYPED_ARRAY_SUPPORT)for(z=0;z<$;++z)o[z+u]=this[z+g];else Uint8Array.prototype.set.call(o,this.subarray(g,g+$),u);return $},a.prototype.fill=function(o,u,g,j){if(typeof o=="string"){if(typeof u=="string"?(j=u,u=0,g=this.length):typeof g=="string"&&(j=g,g=this.length),o.length===1){var $=o.charCodeAt(0);$<256&&(o=$)}if(j!==void 0&&typeof j!="string")throw new TypeError("encoding must be a string");if(typeof j=="string"&&!a.isEncoding(j))throw new TypeError("Unknown encoding: "+j)}else typeof o=="number"&&(o=o&255);if(u<0||this.length<u||this.length<g)throw new RangeError("Out of range index");if(g<=u)return this;u=u>>>0,g=g===void 0?this.length:g>>>0,o||(o=0);var z;if(typeof o=="number")for(z=u;z<g;++z)this[z]=o;else{var le=a.isBuffer(o)?o:E(new a(o,j).toString()),he=le.length;for(z=0;z<g-u;++z)this[z+u]=le[z%he]}return this};var ee=/[^+\/0-9A-Za-z-_]/g;function ae(o){if(o=ie(o).replace(ee,""),o.length<2)return"";for(;o.length%4!==0;)o=o+"=";return o}function ie(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function ue(o){return o<16?"0"+o.toString(16):o.toString(16)}function E(o,u){u=u||1/0;for(var g,j=o.length,$=null,z=[],le=0;le<j;++le){if(g=o.charCodeAt(le),g>55295&&g<57344){if(!$){if(g>56319){(u-=3)>-1&&z.push(239,191,189);continue}else if(le+1===j){(u-=3)>-1&&z.push(239,191,189);continue}$=g;continue}if(g<56320){(u-=3)>-1&&z.push(239,191,189),$=g;continue}g=($-55296<<10|g-56320)+65536}else $&&(u-=3)>-1&&z.push(239,191,189);if($=null,g<128){if((u-=1)<0)break;z.push(g)}else if(g<2048){if((u-=2)<0)break;z.push(g>>6|192,g&63|128)}else if(g<65536){if((u-=3)<0)break;z.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((u-=4)<0)break;z.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return z}function L(o){for(var u=[],g=0;g<o.length;++g)u.push(o.charCodeAt(g)&255);return u}function R(o,u){for(var g,j,$,z=[],le=0;le<o.length&&!((u-=2)<0);++le)g=o.charCodeAt(le),j=g>>8,$=g%256,z.push($),z.push(j);return z}function Y(o){return e.toByteArray(ae(o))}function I(o,u,g,j){for(var $=0;$<j&&!($+g>=u.length||$>=o.length);++$)u[$+g]=o[$];return $}function ce(o){return o!==o}})(lo)),lo}ji();var _t;if(typeof window<"u"&&window.crypto&&(_t=window.crypto),!_t&&typeof window<"u"&&window.msCrypto&&(_t=window.msCrypto),!_t&&typeof global<"u"&&global.crypto&&(_t=global.crypto),!_t&&typeof require=="function")try{_t=require("crypto")}catch{}var po={};var Hr=function(t,e){return Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)n.hasOwnProperty(s)&&(r[s]=n[s])},Hr(t,e)};function Ei(t,e){Hr(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Gr=function(){return Gr=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Gr.apply(this,arguments)};function Ti(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function Ri(t,e,r,n){var s=arguments.length,l=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(c=t[a])&&(l=(s<3?c(l):s>3?c(e,r,l):c(e,r))||l);return s>3&&l&&Object.defineProperty(e,r,l),l}function $i(t,e){return function(r,n){e(r,n,t)}}function Ni(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Li(t,e,r,n){function s(l){return l instanceof r?l:new r(function(c){c(l)})}return new(r||(r=Promise))(function(l,c){function a(_){try{y(n.next(_))}catch(M){c(M)}}function m(_){try{y(n.throw(_))}catch(M){c(M)}}function y(_){_.done?l(_.value):s(_.value).then(a,m)}y((n=n.apply(t,e||[])).next())})}function Bi(t,e){var r={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},n,s,l,c;return c={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(y){return function(_){return m([y,_])}}function m(y){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(l=y[0]&2?s.return:y[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,y[1])).done)return l;switch(s=0,l&&(y=[y[0]&2,l.value]),y[0]){case 0:case 1:l=y;break;case 4:return r.label++,{value:y[1],done:!1};case 5:r.label++,s=y[1],y=[0];continue;case 7:y=r.ops.pop(),r.trys.pop();continue;default:if(l=r.trys,!(l=l.length>0&&l[l.length-1])&&(y[0]===6||y[0]===2)){r=0;continue}if(y[0]===3&&(!l||y[1]>l[0]&&y[1]<l[3])){r.label=y[1];break}if(y[0]===6&&r.label<l[1]){r.label=l[1],l=y;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(y);break}l[2]&&r.ops.pop(),r.trys.pop();continue}y=e.call(t,r)}catch(_){y=[6,_],s=0}finally{n=l=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}}function Ii(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}function Yi(t,e){for(var r in t)r!=="default"&&!e.hasOwnProperty(r)&&(e[r]=t[r])}function Qr(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function go(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,l=[],c;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)l.push(s.value)}catch(a){c={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return l}function zi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(go(arguments[e]));return t}function Fi(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var l=arguments[e],c=0,a=l.length;c<a;c++,s++)n[s]=l[c];return n}function zt(t){return this instanceof zt?(this.v=t,this):new zt(t)}function Wi(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(S){n[S]&&(s[S]=function(C){return new Promise(function(k,A){l.push([S,C,k,A])>1||a(S,C)})})}function a(S,C){try{m(n[S](C))}catch(k){M(l[0][3],k)}}function m(S){S.value instanceof zt?Promise.resolve(S.value.v).then(y,_):M(l[0][2],S)}function y(S){a("next",S)}function _(S){a("throw",S)}function M(S,C){S(C),l.shift(),l.length&&a(l[0][0],l[0][1])}}function Ui(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,l){e[s]=t[s]?function(c){return(r=!r)?{value:zt(t[s](c)),done:s==="return"}:l?l(c):c}:l}}function qi(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Qr=="function"?Qr(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(l){r[l]=t[l]&&function(c){return new Promise(function(a,m){c=t[l](c),s(a,m,c.done,c.value)})}}function s(l,c,a,m){Promise.resolve(m).then(function(y){l({value:y,done:a})},c)}}function Vi(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Hi(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Gi(t){return t&&t.__esModule?t:{default:t}}function Qi(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Zi(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Ki=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Gr},__asyncDelegator:Ui,__asyncGenerator:Wi,__asyncValues:qi,__await:zt,__awaiter:Li,__classPrivateFieldGet:Qi,__classPrivateFieldSet:Zi,__createBinding:Ii,__decorate:Ri,__exportStar:Yi,__extends:Ei,__generator:Bi,__importDefault:Gi,__importStar:Hi,__makeTemplateObject:Vi,__metadata:Ni,__param:$i,__read:go,__rest:Ti,__spread:zi,__spreadArrays:Fi,__values:Qr},Symbol.toStringTag,{value:"Module"})),mo=zr(Ki);var Ft={},We={},yo;function vo(){return yo||(yo=1,Object.defineProperty(We,"__esModule",{value:!0}),We.MAX_HASHABLE_LENGTH=We.INIT=We.KEY=We.DIGEST_LENGTH=We.BLOCK_SIZE=void 0,We.BLOCK_SIZE=64,We.DIGEST_LENGTH=32,We.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),We.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],We.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1),We}var Wt={},bo;function Ji(){if(bo)return Wt;bo=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.RawSha256=void 0;var t=vo(),e=(function(){function r(){this.state=Int32Array.from(t.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(n){if(this.finished)throw new Error("Attempted to update an already finished hash.");var s=0,l=n.byteLength;if(this.bytesHashed+=l,this.bytesHashed*8>t.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;l>0;)this.buffer[this.bufferLength++]=n[s++],l--,this.bufferLength===t.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var n=this.bytesHashed*8,s=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),l=this.bufferLength;if(s.setUint8(this.bufferLength++,128),l%t.BLOCK_SIZE>=t.BLOCK_SIZE-8){for(var c=this.bufferLength;c<t.BLOCK_SIZE;c++)s.setUint8(c,0);this.hashBuffer(),this.bufferLength=0}for(var c=this.bufferLength;c<t.BLOCK_SIZE-8;c++)s.setUint8(c,0);s.setUint32(t.BLOCK_SIZE-8,Math.floor(n/4294967296),!0),s.setUint32(t.BLOCK_SIZE-4,n),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(t.DIGEST_LENGTH),c=0;c<8;c++)a[c*4]=this.state[c]>>>24&255,a[c*4+1]=this.state[c]>>>16&255,a[c*4+2]=this.state[c]>>>8&255,a[c*4+3]=this.state[c]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var n=this,s=n.buffer,l=n.state,c=l[0],a=l[1],m=l[2],y=l[3],_=l[4],M=l[5],S=l[6],C=l[7],k=0;k<t.BLOCK_SIZE;k++){if(k<16)this.temp[k]=(s[k*4]&255)<<24|(s[k*4+1]&255)<<16|(s[k*4+2]&255)<<8|s[k*4+3]&255;else{var A=this.temp[k-2],N=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10;A=this.temp[k-15];var F=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3;this.temp[k]=(N+this.temp[k-7]|0)+(F+this.temp[k-16]|0)}var B=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&M^~_&S)|0)+(C+(t.KEY[k]+this.temp[k]|0)|0)|0,H=((c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10))+(c&a^c&m^a&m)|0;C=S,S=M,M=_,_=y+B|0,y=m,m=a,a=c,c=B+H|0}l[0]+=c,l[1]+=a,l[2]+=m,l[3]+=y,l[4]+=_,l[5]+=M,l[6]+=S,l[7]+=C},r})();return Wt.RawSha256=e,Wt}var wo={},Ut={};const Xi=t=>{const e=[];for(let r=0,n=t.length;r<n;r++){const s=t.charCodeAt(r);if(s<128)e.push(s);else if(s<2048)e.push(s>>6|192,s&63|128);else if(r+1<t.length&&(s&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320){const l=65536+((s&1023)<<10)+(t.charCodeAt(++r)&1023);e.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else e.push(s>>12|224,s>>6&63|128,s&63|128)}return Uint8Array.from(e)},ea=t=>{let e="";for(let r=0,n=t.length;r<n;r++){const s=t[r];if(s<128)e+=String.fromCharCode(s);else if(192<=s&&s<224){const l=t[++r];e+=String.fromCharCode((s&31)<<6|l&63)}else if(240<=s&&s<365){const l="%"+[s,t[++r],t[++r],t[++r]].map(c=>c.toString(16)).join("%");e+=decodeURIComponent(l)}else e+=String.fromCharCode((s&15)<<12|(t[++r]&63)<<6|t[++r]&63)}return e};function ta(t){return new TextEncoder().encode(t)}function ra(t){return new TextDecoder("utf-8").decode(t)}const na=t=>typeof TextEncoder=="function"?ta(t):Xi(t),oa=t=>typeof TextDecoder=="function"?ra(t):ea(t),sa=Object.freeze(Object.defineProperty({__proto__:null,fromUtf8:na,toUtf8:oa},Symbol.toStringTag,{value:"Module"})),ia=zr(sa);var _o;function aa(){if(_o)return Ut;_o=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.convertToBuffer=void 0;var t=ia,e=typeof Buffer<"u"&&Buffer.from?function(n){return Buffer.from(n,"utf8")}:t.fromUtf8;function r(n){return n instanceof Uint8Array?n:typeof n=="string"?e(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)}return Ut.convertToBuffer=r,Ut}var qt={},xo;function la(){if(xo)return qt;xo=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.isEmptyData=void 0;function t(e){return typeof e=="string"?e.length===0:e.byteLength===0}return qt.isEmptyData=t,qt}var Vt={},Co;function ua(){if(Co)return Vt;Co=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.numToUint8=void 0;function t(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}return Vt.numToUint8=t,Vt}var Ht={},So;function ca(){if(So)return Ht;So=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.uint32ArrayFrom=void 0;function t(e){if(!Array.from){for(var r=new Uint32Array(e.length),n=0;n<e.length;)r[n]=e[n];return r}return Uint32Array.from(e)}return Ht.uint32ArrayFrom=t,Ht}var Do;function da(){return Do||(Do=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var e=aa();Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return e.convertToBuffer}});var r=la();Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return r.isEmptyData}});var n=ua();Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return n.numToUint8}});var s=ca();Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})})(wo)),wo}var ko;function ha(){if(ko)return Ft;ko=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.Sha256=void 0;var t=mo,e=vo(),r=Ji(),n=da(),s=(function(){function c(a){if(this.hash=new r.RawSha256,a){this.outer=new r.RawSha256;var m=l(a),y=new Uint8Array(e.BLOCK_SIZE);y.set(m);for(var _=0;_<e.BLOCK_SIZE;_++)m[_]^=54,y[_]^=92;this.hash.update(m),this.outer.update(y);for(var _=0;_<m.byteLength;_++)m[_]=0}}return c.prototype.update=function(a){if(!((0,n.isEmptyData)(a)||this.error))try{this.hash.update((0,n.convertToBuffer)(a))}catch(m){this.error=m}},c.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},c.prototype.digest=function(){return(0,t.__awaiter)(this,void 0,void 0,function(){return(0,t.__generator)(this,function(a){return[2,this.digestSync()]})})},c})();Ft.Sha256=s;function l(c){var a=(0,n.convertToBuffer)(c);if(a.byteLength>e.BLOCK_SIZE){var m=new r.RawSha256;m.update(a),a=m.digest()}var y=new Uint8Array(e.BLOCK_SIZE);return y.set(a),y}return Ft}var Po;function fa(){return Po||(Po=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=mo;(0,e.__exportStar)(ha(),t)})(po)),po}fa();function ye(t,e){t!=null&&this.fromString(t,e)}function Be(){return new ye(null)}var dt,pa=0xdeadbeefcafe,Mo=(pa&16777215)==15715070;function ga(t,e,r,n,s,l){for(;--l>=0;){var c=e*this[t++]+r[n]+s;s=Math.floor(c/67108864),r[n++]=c&67108863}return s}function ma(t,e,r,n,s,l){for(var c=e&32767,a=e>>15;--l>=0;){var m=this[t]&32767,y=this[t++]>>15,_=a*m+y*c;m=c*m+((_&32767)<<15)+r[n]+(s&1073741823),s=(m>>>30)+(_>>>15)+a*y+(s>>>30),r[n++]=m&1073741823}return s}function ya(t,e,r,n,s,l){for(var c=e&16383,a=e>>14;--l>=0;){var m=this[t]&16383,y=this[t++]>>14,_=a*m+y*c;m=c*m+((_&16383)<<14)+r[n]+s,s=(m>>28)+(_>>14)+a*y,r[n++]=m&268435455}return s}var Oo=typeof navigator<"u";Oo&&Mo&&navigator.appName=="Microsoft Internet Explorer"?(ye.prototype.am=ma,dt=30):Oo&&Mo&&navigator.appName!="Netscape"?(ye.prototype.am=ga,dt=26):(ye.prototype.am=ya,dt=28),ye.prototype.DB=dt,ye.prototype.DM=(1<<dt)-1,ye.prototype.DV=1<<dt;var Zr=52;ye.prototype.FV=Math.pow(2,Zr),ye.prototype.F1=Zr-dt,ye.prototype.F2=2*dt-Zr;var va="0123456789abcdefghijklmnopqrstuvwxyz",sr=new Array,Pt,Ue;for(Pt=48,Ue=0;Ue<=9;++Ue)sr[Pt++]=Ue;for(Pt=97,Ue=10;Ue<36;++Ue)sr[Pt++]=Ue;for(Pt=65,Ue=10;Ue<36;++Ue)sr[Pt++]=Ue;function Ao(t){return va.charAt(t)}function ba(t,e){var r=sr[t.charCodeAt(e)];return r??-1}function wa(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function _a(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0}function Kr(t){var e=Be();return e.fromInt(t),e}function xa(t,e){var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var n=t.length,s=!1,l=0;--n>=0;){var c=ba(t,n);if(c<0){t.charAt(n)=="-"&&(s=!0);continue}s=!1,l==0?this[this.t++]=c:l+r>this.DB?(this[this.t-1]|=(c&(1<<this.DB-l)-1)<<l,this[this.t++]=c>>this.DB-l):this[this.t-1]|=c<<l,l+=r,l>=this.DB&&(l-=this.DB)}this.clamp(),s&&ye.ZERO.subTo(this,this)}function Ca(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function Sa(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else if(t==4)e=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");var r=(1<<e)-1,n,s=!1,l="",c=this.t,a=this.DB-c*this.DB%e;if(c-- >0)for(a<this.DB&&(n=this[c]>>a)>0&&(s=!0,l=Ao(n));c>=0;)a<e?(n=(this[c]&(1<<a)-1)<<e-a,n|=this[--c]>>(a+=this.DB-e)):(n=this[c]>>(a-=e)&r,a<=0&&(a+=this.DB,--c)),n>0&&(s=!0),s&&(l+=Ao(n));return s?l:"0"}function Da(){var t=Be();return ye.ZERO.subTo(this,t),t}function ka(){return this.s<0?this.negate():this}function Pa(t){var e=this.s-t.s;if(e!=0)return e;var r=this.t;if(e=r-t.t,e!=0)return this.s<0?-e:e;for(;--r>=0;)if((e=this[r]-t[r])!=0)return e;return 0}function Jr(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}function Ma(){return this.t<=0?0:this.DB*(this.t-1)+Jr(this[this.t-1]^this.s&this.DM)}function Oa(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function Aa(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function ja(t,e){var r=t%this.DB,n=this.DB-r,s=(1<<n)-1,l=Math.floor(t/this.DB),c=this.s<<r&this.DM,a;for(a=this.t-1;a>=0;--a)e[a+l+1]=this[a]>>n|c,c=(this[a]&s)<<r;for(a=l-1;a>=0;--a)e[a]=0;e[l]=c,e.t=this.t+l+1,e.s=this.s,e.clamp()}function Ea(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t){e.t=0;return}var n=t%this.DB,s=this.DB-n,l=(1<<n)-1;e[0]=this[r]>>n;for(var c=r+1;c<this.t;++c)e[c-r-1]|=(this[c]&l)<<s,e[c-r]=this[c]>>n;n>0&&(e[this.t-r-1]|=(this.s&l)<<s),e.t=this.t-r,e.clamp()}function Ta(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()}function Ra(t,e){var r=this.abs(),n=t.abs(),s=r.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s<n.t;++s)e[s+r.t]=r.am(0,n[s],e,s,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&ye.ZERO.subTo(e,e)}function $a(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function Na(t,e,r){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=Be());var l=Be(),c=this.s,a=t.s,m=this.DB-Jr(n[n.t-1]);m>0?(n.lShiftTo(m,l),s.lShiftTo(m,r)):(n.copyTo(l),s.copyTo(r));var y=l.t,_=l[y-1];if(_!=0){var M=_*(1<<this.F1)+(y>1?l[y-2]>>this.F2:0),S=this.FV/M,C=(1<<this.F1)/M,k=1<<this.F2,A=r.t,N=A-y,F=e??Be();for(l.dlShiftTo(N,F),r.compareTo(F)>=0&&(r[r.t++]=1,r.subTo(F,r)),ye.ONE.dlShiftTo(y,F),F.subTo(l,l);l.t<y;)l[l.t++]=0;for(;--N>=0;){var B=r[--A]==_?this.DM:Math.floor(r[A]*S+(r[A-1]+k)*C);if((r[A]+=l.am(0,B,r,N,0,y))<B)for(l.dlShiftTo(N,F),r.subTo(F,r);r[A]<--B;)r.subTo(F,r)}e!=null&&(r.drShiftTo(y,e),c!=a&&ye.ZERO.subTo(e,e)),r.t=y,r.clamp(),m>0&&r.rShiftTo(m,r),c<0&&ye.ZERO.subTo(r,r)}}}function La(t){var e=Be();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(ye.ZERO)>0&&t.subTo(e,e),e}function Ba(){if(this.t<1)return 0;var t=this[0];if((t&1)==0)return 0;var e=t&3;return e=e*(2-(t&15)*e)&15,e=e*(2-(t&255)*e)&255,e=e*(2-((t&65535)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function Ia(t){return this.compareTo(t)==0}function Ya(t,e){for(var r=0,n=0,s=Math.min(t.t,this.t);r<s;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()}function za(t){var e=Be();return this.addTo(t,e),e}function Fa(t){var e=Be();return this.subTo(t,e),e}function Wa(t){var e=Be();return this.multiplyTo(t,e),e}function Ua(t){var e=Be();return this.divRemTo(t,e,null),e}function Mt(t){this.m=t,this.mp=t.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function qa(t){var e=Be();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(ye.ZERO)>0&&this.m.subTo(e,e),e}function Va(t){var e=Be();return t.copyTo(e),this.reduce(e),e}function Ha(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=t[e]&32767,n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function Ga(t,e){t.squareTo(e),this.reduce(e)}function Qa(t,e,r){t.multiplyTo(e,r),this.reduce(r)}Mt.prototype.convert=qa,Mt.prototype.revert=Va,Mt.prototype.reduce=Ha,Mt.prototype.mulTo=Qa,Mt.prototype.sqrTo=Ga;function Za(t,e,r){var n=t.bitLength(),s,l=Kr(1),c=new Mt(e);if(n<=0)return l;n<18?s=1:n<48?s=3:n<144?s=4:n<768?s=5:s=6;var a=new Array,m=3,y=s-1,_=(1<<s)-1;if(a[1]=c.convert(this),s>1){var M=Be();for(c.sqrTo(a[1],M);m<=_;)a[m]=Be(),c.mulTo(M,a[m-2],a[m]),m+=2}var S=t.t-1,C,k=!0,A=Be(),N;for(n=Jr(t[S])-1;S>=0;){for(n>=y?C=t[S]>>n-y&_:(C=(t[S]&(1<<n+1)-1)<<y-n,S>0&&(C|=t[S-1]>>this.DB+n-y)),m=s;(C&1)==0;)C>>=1,--m;if((n-=m)<0&&(n+=this.DB,--S),k)a[C].copyTo(l),k=!1;else{for(;m>1;)c.sqrTo(l,A),c.sqrTo(A,l),m-=2;m>0?c.sqrTo(l,A):(N=l,l=A,A=N),c.mulTo(A,a[C],l)}for(;S>=0&&(t[S]&1<<n)==0;)c.sqrTo(l,A),N=l,l=A,A=N,--n<0&&(n=this.DB-1,--S)}var F=c.revert(l);return r(null,F),F}ye.prototype.copyTo=wa,ye.prototype.fromInt=_a,ye.prototype.fromString=xa,ye.prototype.clamp=Ca,ye.prototype.dlShiftTo=Oa,ye.prototype.drShiftTo=Aa,ye.prototype.lShiftTo=ja,ye.prototype.rShiftTo=Ea,ye.prototype.subTo=Ta,ye.prototype.multiplyTo=Ra,ye.prototype.squareTo=$a,ye.prototype.divRemTo=Na,ye.prototype.invDigit=Ba,ye.prototype.addTo=Ya,ye.prototype.toString=Sa,ye.prototype.negate=Da,ye.prototype.abs=ka,ye.prototype.compareTo=Pa,ye.prototype.bitLength=Ma,ye.prototype.mod=La,ye.prototype.equals=Ia,ye.prototype.add=za,ye.prototype.subtract=Fa,ye.prototype.multiply=Wa,ye.prototype.divide=Ua,ye.prototype.modPow=Za,ye.ZERO=Kr(0),ye.ONE=Kr(1);function Ka(t,e){return e=e||{},new Promise(function(r,n){var s=new XMLHttpRequest,l=[],c=[],a={},m=function(){return{ok:(s.status/100|0)==2,statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:m,headers:{keys:function(){return l},entries:function(){return c},get:function(_){return a[_.toLowerCase()]},has:function(_){return _.toLowerCase()in a}}}};for(var y in s.open(e.method||"get",t,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(_,M,S){l.push(M=M.toLowerCase()),c.push([M,S]),a[M]=a[M]?a[M]+","+S:S}),r(m())},s.onerror=n,s.withCredentials=e.credentials=="include",e.headers)s.setRequestHeader(y,e.headers[y]);s.send(e.body||null)})}const Ja=Object.freeze(Object.defineProperty({__proto__:null,default:Ka},Symbol.toStringTag,{value:"Module"})),jo=zr(Ja);var Eo,To;function Xa(){return To||(To=1,Eo=self.fetch||(self.fetch=jo.default||jo)),Eo}Xa();var Ro={exports:{}};var $o;function el(){return $o||($o=1,(function(t,e){(function(r){var n;if(t.exports=r(),n=!0,!n){var s=window.Cookies,l=window.Cookies=r();l.noConflict=function(){return window.Cookies=s,l}}})(function(){function r(){for(var l=0,c={};l<arguments.length;l++){var a=arguments[l];for(var m in a)c[m]=a[m]}return c}function n(l){return l.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function s(l){function c(){}function a(y,_,M){if(!(typeof document>"u")){M=r({path:"/"},c.defaults,M),typeof M.expires=="number"&&(M.expires=new Date(new Date*1+M.expires*864e5)),M.expires=M.expires?M.expires.toUTCString():"";try{var S=JSON.stringify(_);/^[\{\[]/.test(S)&&(_=S)}catch{}_=l.write?l.write(_,y):encodeURIComponent(String(_)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),y=encodeURIComponent(String(y)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var C="";for(var k in M)M[k]&&(C+="; "+k,M[k]!==!0&&(C+="="+M[k].split(";")[0]));return document.cookie=y+"="+_+C}}function m(y,_){if(!(typeof document>"u")){for(var M={},S=document.cookie?document.cookie.split("; "):[],C=0;C<S.length;C++){var k=S[C].split("="),A=k.slice(1).join("=");!_&&A.charAt(0)==='"'&&(A=A.slice(1,-1));try{var N=n(k[0]);if(A=(l.read||l)(A,N)||n(A),_)try{A=JSON.parse(A)}catch{}if(M[N]=A,y===N)break}catch{}}return y?M[y]:M}}return c.set=a,c.get=function(y){return m(y,!1)},c.getJSON=function(y){return m(y,!0)},c.remove=function(y,_){a(y,"",r(_,{expires:-1}))},c.defaults={},c.withConverter=s,c}return s(function(){})})})(Ro)),Ro.exports}el();function tl(){if(!window.MantineCognitoUserPool)throw new Error("Cognito Userpool has not been initialized.");return window.MantineCognitoUserPool}function rl(){return tl().getCurrentUser()}function nl(){return new Promise((t,e)=>{const r=rl();r===null&&e(null),r?.getSession((n,s)=>{if(n!==null||s===null)return e(null);t({session:s,authenticatedUser:r})})})}async function ol(){const{session:t}=await nl();return t?.getIdToken().getJwtToken()}Z.createContext(void 0);var sl="undefined",il="object",ir="browser",No="cpu",Lo="device",Xr="engine",ar="os",ht="name",lr="type",en="vendor",Je="version",tn="architecture",rn="major",nn="model",al="console",ll="mobile",ul="tablet",cl="smarttv",dl="wearable",hl="embedded",fl=typeof window!==sl,on=fl&&window.navigator?window.navigator:void 0;on&&on.userAgentData&&on.userAgentData;var ur=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},cr=function(t){for(var e in t){var r=t[e];typeof r==il&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this};(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return cr.call(t.init,[[ir,[ht,Je,rn,lr]],[No,[tn]],[Lo,[lr,nn,en]],[Xr,[ht,Je]],[ar,[ht,Je]]]),cr.call(t.isIgnore,[[ir,[Je,rn]],[Xr,[Je]],[ar,[Je]]]),cr.call(t.isIgnoreRgx,[[ir,/ ?browser$/i],[ar,/ ?os$/i]]),cr.call(t.toString,[[ir,[ht,Je]],[No,[tn]],[Lo,[en,nn]],[Xr,[ht,Je]],[ar,[ht,Je]]]),t})(),ur([ht,Je,rn,lr]),ur([tn]),ur([nn,en,lr,al,ll,cl,ul,dl,hl]),ur([ht,Je]);var sn={exports:{}},pl=sn.exports,Bo;function gl(){return Bo||(Bo=1,(function(t,e){(function(r,n){t.exports=n()})(pl,()=>(()=>{var r={873:(c,a)=>{var m,y,_=(function(){var M=function(P,x){var w=P,h=F[x],i=null,p=0,f=null,d=[],v={},D=function(E,L){i=(function(R){for(var Y=new Array(R),I=0;I<R;I+=1){Y[I]=new Array(R);for(var ce=0;ce<R;ce+=1)Y[I][ce]=null}return Y})(p=4*w+17),T(0,0),T(p-7,0),T(0,p-7),X(),q(),ee(E,L),w>=7&&re(E),f==null&&(f=ie(w,h,d)),ae(f,L)},T=function(E,L){for(var R=-1;R<=7;R+=1)if(!(E+R<=-1||p<=E+R))for(var Y=-1;Y<=7;Y+=1)L+Y<=-1||p<=L+Y||(i[E+R][L+Y]=0<=R&&R<=6&&(Y==0||Y==6)||0<=Y&&Y<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=Y&&Y<=4)},q=function(){for(var E=8;E<p-8;E+=1)i[E][6]==null&&(i[E][6]=E%2==0);for(var L=8;L<p-8;L+=1)i[6][L]==null&&(i[6][L]=L%2==0)},X=function(){for(var E=B.getPatternPosition(w),L=0;L<E.length;L+=1)for(var R=0;R<E.length;R+=1){var Y=E[L],I=E[R];if(i[Y][I]==null)for(var ce=-2;ce<=2;ce+=1)for(var o=-2;o<=2;o+=1)i[Y+ce][I+o]=ce==-2||ce==2||o==-2||o==2||ce==0&&o==0}},re=function(E){for(var L=B.getBCHTypeNumber(w),R=0;R<18;R+=1){var Y=!E&&(L>>R&1)==1;i[Math.floor(R/3)][R%3+p-8-3]=Y}for(R=0;R<18;R+=1)Y=!E&&(L>>R&1)==1,i[R%3+p-8-3][Math.floor(R/3)]=Y},ee=function(E,L){for(var R=h<<3|L,Y=B.getBCHTypeInfo(R),I=0;I<15;I+=1){var ce=!E&&(Y>>I&1)==1;I<6?i[I][8]=ce:I<8?i[I+1][8]=ce:i[p-15+I][8]=ce}for(I=0;I<15;I+=1)ce=!E&&(Y>>I&1)==1,I<8?i[8][p-I-1]=ce:I<9?i[8][15-I-1+1]=ce:i[8][15-I-1]=ce;i[p-8][8]=!E},ae=function(E,L){for(var R=-1,Y=p-1,I=7,ce=0,o=B.getMaskFunction(L),u=p-1;u>0;u-=2)for(u==6&&(u-=1);;){for(var g=0;g<2;g+=1)if(i[Y][u-g]==null){var j=!1;ce<E.length&&(j=(E[ce]>>>I&1)==1),o(Y,u-g)&&(j=!j),i[Y][u-g]=j,(I-=1)==-1&&(ce+=1,I=7)}if((Y+=R)<0||p<=Y){Y-=R,R=-R;break}}},ie=function(E,L,R){for(var Y=te.getRSBlocks(E,L),I=oe(),ce=0;ce<R.length;ce+=1){var o=R[ce];I.put(o.getMode(),4),I.put(o.getLength(),B.getLengthInBits(o.getMode(),E)),o.write(I)}var u=0;for(ce=0;ce<Y.length;ce+=1)u+=Y[ce].dataCount;if(I.getLengthInBits()>8*u)throw"code length overflow. ("+I.getLengthInBits()+">"+8*u+")";for(I.getLengthInBits()+4<=8*u&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=8*u||(I.put(236,8),I.getLengthInBits()>=8*u));)I.put(17,8);return(function(g,j){for(var $=0,z=0,le=0,he=new Array(j.length),pe=new Array(j.length),Q=0;Q<j.length;Q+=1){var fe=j[Q].dataCount,me=j[Q].totalCount-fe;z=Math.max(z,fe),le=Math.max(le,me),he[Q]=new Array(fe);for(var ge=0;ge<he[Q].length;ge+=1)he[Q][ge]=255&g.getBuffer()[ge+$];$+=fe;var Se=B.getErrorCorrectPolynomial(me),xe=W(he[Q],Se.getLength()-1).mod(Se);for(pe[Q]=new Array(Se.getLength()-1),ge=0;ge<pe[Q].length;ge+=1){var Pe=ge+xe.getLength()-pe[Q].length;pe[Q][ge]=Pe>=0?xe.getAt(Pe):0}}var Ve=0;for(ge=0;ge<j.length;ge+=1)Ve+=j[ge].totalCount;var Ne=new Array(Ve),Me=0;for(ge=0;ge<z;ge+=1)for(Q=0;Q<j.length;Q+=1)ge<he[Q].length&&(Ne[Me]=he[Q][ge],Me+=1);for(ge=0;ge<le;ge+=1)for(Q=0;Q<j.length;Q+=1)ge<pe[Q].length&&(Ne[Me]=pe[Q][ge],Me+=1);return Ne})(I,Y)};v.addData=function(E,L){var R=null;switch(L=L||"Byte"){case"Numeric":R=G(E);break;case"Alphanumeric":R=K(E);break;case"Byte":R=V(E);break;case"Kanji":R=U(E);break;default:throw"mode:"+L}d.push(R),f=null},v.isDark=function(E,L){if(E<0||p<=E||L<0||p<=L)throw E+","+L;return i[E][L]},v.getModuleCount=function(){return p},v.make=function(){if(w<1){for(var E=1;E<40;E++){for(var L=te.getRSBlocks(E,h),R=oe(),Y=0;Y<d.length;Y++){var I=d[Y];R.put(I.getMode(),4),R.put(I.getLength(),B.getLengthInBits(I.getMode(),E)),I.write(R)}var ce=0;for(Y=0;Y<L.length;Y++)ce+=L[Y].dataCount;if(R.getLengthInBits()<=8*ce)break}w=E}D(!1,(function(){for(var o=0,u=0,g=0;g<8;g+=1){D(!0,g);var j=B.getLostPoint(v);(g==0||o>j)&&(o=j,u=g)}return u})())},v.createTableTag=function(E,L){E=E||2;var R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+(L=L===void 0?4*E:L)+"px;",R+='">',R+="<tbody>";for(var Y=0;Y<v.getModuleCount();Y+=1){R+="<tr>";for(var I=0;I<v.getModuleCount();I+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+E+"px;",R+=" height: "+E+"px;",R+=" background-color: ",R+=v.isDark(Y,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return(R+="</tbody>")+"</table>"},v.createSvgTag=function(E,L,R,Y){var I={};typeof arguments[0]=="object"&&(E=(I=arguments[0]).cellSize,L=I.margin,R=I.alt,Y=I.title),E=E||2,L=L===void 0?4*E:L,(R=typeof R=="string"?{text:R}:R||{}).text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,(Y=typeof Y=="string"?{text:Y}:Y||{}).text=Y.text||null,Y.id=Y.text?Y.id||"qrcode-title":null;var ce,o,u,g,j=v.getModuleCount()*E+2*L,$="";for(g="l"+E+",0 0,"+E+" -"+E+",0 0,-"+E+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+j+'px" height="'+j+'px"',$+=' viewBox="0 0 '+j+" "+j+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=Y.text||R.text?' role="img" aria-labelledby="'+ue([Y.id,R.id].join(" ").trim())+'"':"",$+=">",$+=Y.text?'<title id="'+ue(Y.id)+'">'+ue(Y.text)+"</title>":"",$+=R.text?'<description id="'+ue(R.id)+'">'+ue(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',o=0;o<v.getModuleCount();o+=1)for(u=o*E+L,ce=0;ce<v.getModuleCount();ce+=1)v.isDark(o,ce)&&($+="M"+(ce*E+L)+","+u+g);return($+='" stroke="transparent" fill="black"/>')+"</svg>"},v.createDataURL=function(E,L){E=E||2,L=L===void 0?4*E:L;var R=v.getModuleCount()*E+2*L,Y=L,I=R-L;return ne(R,R,function(ce,o){if(Y<=ce&&ce<I&&Y<=o&&o<I){var u=Math.floor((ce-Y)/E),g=Math.floor((o-Y)/E);return v.isDark(g,u)?0:1}return 1})},v.createImgTag=function(E,L,R){E=E||2,L=L===void 0?4*E:L;var Y=v.getModuleCount()*E+2*L,I="";return I+="<img",I+=' src="',I+=v.createDataURL(E,L),I+='"',I+=' width="',I+=Y,I+='"',I+=' height="',I+=Y,I+='"',R&&(I+=' alt="',I+=ue(R),I+='"'),I+"/>"};var ue=function(E){for(var L="",R=0;R<E.length;R+=1){var Y=E.charAt(R);switch(Y){case"<":L+="&lt;";break;case">":L+="&gt;";break;case"&":L+="&amp;";break;case'"':L+="&quot;";break;default:L+=Y}}return L};return v.createASCII=function(E,L){if((E=E||1)<2)return(function(he){he=he===void 0?2:he;var pe,Q,fe,me,ge,Se=1*v.getModuleCount()+2*he,xe=he,Pe=Se-he,Ve={"██":"█","█ ":"▀"," █":"▄"," ":" "},Ne={"██":"▀","█ ":"▀"," █":" "," ":" "},Me="";for(pe=0;pe<Se;pe+=2){for(fe=Math.floor((pe-xe)/1),me=Math.floor((pe+1-xe)/1),Q=0;Q<Se;Q+=1)ge="█",xe<=Q&&Q<Pe&&xe<=pe&&pe<Pe&&v.isDark(fe,Math.floor((Q-xe)/1))&&(ge=" "),xe<=Q&&Q<Pe&&xe<=pe+1&&pe+1<Pe&&v.isDark(me,Math.floor((Q-xe)/1))?ge+=" ":ge+="█",Me+=he<1&&pe+1>=Pe?Ne[ge]:Ve[ge];Me+=`
20
+ `}return Se%2&&he>0?Me.substring(0,Me.length-Se-1)+Array(Se+1).join("▀"):Me.substring(0,Me.length-1)})(L);E-=1,L=L===void 0?2*E:L;var R,Y,I,ce,o=v.getModuleCount()*E+2*L,u=L,g=o-L,j=Array(E+1).join("██"),$=Array(E+1).join(" "),z="",le="";for(R=0;R<o;R+=1){for(I=Math.floor((R-u)/E),le="",Y=0;Y<o;Y+=1)ce=1,u<=Y&&Y<g&&u<=R&&R<g&&v.isDark(I,Math.floor((Y-u)/E))&&(ce=0),le+=ce?j:$;for(I=0;I<E;I+=1)z+=le+`
21
+ `}return z.substring(0,z.length-1)},v.renderTo2dContext=function(E,L){L=L||2;for(var R=v.getModuleCount(),Y=0;Y<R;Y++)for(var I=0;I<R;I++)E.fillStyle=v.isDark(Y,I)?"black":"white",E.fillRect(Y*L,I*L,L,L)},v};M.stringToBytes=(M.stringToBytesFuncs={default:function(P){for(var x=[],w=0;w<P.length;w+=1){var h=P.charCodeAt(w);x.push(255&h)}return x}}).default,M.createStringToBytes=function(P,x){var w=(function(){for(var i=se(P),p=function(){var q=i.read();if(q==-1)throw"eof";return q},f=0,d={};;){var v=i.read();if(v==-1)break;var D=p(),T=p()<<8|p();d[String.fromCharCode(v<<8|D)]=T,f+=1}if(f!=x)throw f+" != "+x;return d})(),h=63;return function(i){for(var p=[],f=0;f<i.length;f+=1){var d=i.charCodeAt(f);if(d<128)p.push(d);else{var v=w[i.charAt(f)];typeof v=="number"?(255&v)==v?p.push(v):(p.push(v>>>8),p.push(255&v)):p.push(h)}}return p}};var S,C,k,A,N,F={L:1,M:0,Q:3,H:2},B=(S=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],C=1335,k=7973,N=function(P){for(var x=0;P!=0;)x+=1,P>>>=1;return x},(A={}).getBCHTypeInfo=function(P){for(var x=P<<10;N(x)-N(C)>=0;)x^=C<<N(x)-N(C);return 21522^(P<<10|x)},A.getBCHTypeNumber=function(P){for(var x=P<<12;N(x)-N(k)>=0;)x^=k<<N(x)-N(k);return P<<12|x},A.getPatternPosition=function(P){return S[P-1]},A.getMaskFunction=function(P){switch(P){case 0:return function(x,w){return(x+w)%2==0};case 1:return function(x,w){return x%2==0};case 2:return function(x,w){return w%3==0};case 3:return function(x,w){return(x+w)%3==0};case 4:return function(x,w){return(Math.floor(x/2)+Math.floor(w/3))%2==0};case 5:return function(x,w){return x*w%2+x*w%3==0};case 6:return function(x,w){return(x*w%2+x*w%3)%2==0};case 7:return function(x,w){return(x*w%3+(x+w)%2)%2==0};default:throw"bad maskPattern:"+P}},A.getErrorCorrectPolynomial=function(P){for(var x=W([1],0),w=0;w<P;w+=1)x=x.multiply(W([1,H.gexp(w)],0));return x},A.getLengthInBits=function(P,x){if(1<=x&&x<10)switch(P){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+P}else if(x<27)switch(P){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+P}else{if(!(x<41))throw"type:"+x;switch(P){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+P}}},A.getLostPoint=function(P){for(var x=P.getModuleCount(),w=0,h=0;h<x;h+=1)for(var i=0;i<x;i+=1){for(var p=0,f=P.isDark(h,i),d=-1;d<=1;d+=1)if(!(h+d<0||x<=h+d))for(var v=-1;v<=1;v+=1)i+v<0||x<=i+v||d==0&&v==0||f==P.isDark(h+d,i+v)&&(p+=1);p>5&&(w+=3+p-5)}for(h=0;h<x-1;h+=1)for(i=0;i<x-1;i+=1){var D=0;P.isDark(h,i)&&(D+=1),P.isDark(h+1,i)&&(D+=1),P.isDark(h,i+1)&&(D+=1),P.isDark(h+1,i+1)&&(D+=1),D!=0&&D!=4||(w+=3)}for(h=0;h<x;h+=1)for(i=0;i<x-6;i+=1)P.isDark(h,i)&&!P.isDark(h,i+1)&&P.isDark(h,i+2)&&P.isDark(h,i+3)&&P.isDark(h,i+4)&&!P.isDark(h,i+5)&&P.isDark(h,i+6)&&(w+=40);for(i=0;i<x;i+=1)for(h=0;h<x-6;h+=1)P.isDark(h,i)&&!P.isDark(h+1,i)&&P.isDark(h+2,i)&&P.isDark(h+3,i)&&P.isDark(h+4,i)&&!P.isDark(h+5,i)&&P.isDark(h+6,i)&&(w+=40);var T=0;for(i=0;i<x;i+=1)for(h=0;h<x;h+=1)P.isDark(h,i)&&(T+=1);return w+Math.abs(100*T/x/x-50)/5*10},A),H=(function(){for(var P=new Array(256),x=new Array(256),w=0;w<8;w+=1)P[w]=1<<w;for(w=8;w<256;w+=1)P[w]=P[w-4]^P[w-5]^P[w-6]^P[w-8];for(w=0;w<255;w+=1)x[P[w]]=w;return{glog:function(h){if(h<1)throw"glog("+h+")";return x[h]},gexp:function(h){for(;h<0;)h+=255;for(;h>=256;)h-=255;return P[h]}}})();function W(P,x){if(P.length===void 0)throw P.length+"/"+x;var w=(function(){for(var i=0;i<P.length&&P[i]==0;)i+=1;for(var p=new Array(P.length-i+x),f=0;f<P.length-i;f+=1)p[f]=P[f+i];return p})(),h={getAt:function(i){return w[i]},getLength:function(){return w.length},multiply:function(i){for(var p=new Array(h.getLength()+i.getLength()-1),f=0;f<h.getLength();f+=1)for(var d=0;d<i.getLength();d+=1)p[f+d]^=H.gexp(H.glog(h.getAt(f))+H.glog(i.getAt(d)));return W(p,0)},mod:function(i){if(h.getLength()-i.getLength()<0)return h;for(var p=H.glog(h.getAt(0))-H.glog(i.getAt(0)),f=new Array(h.getLength()),d=0;d<h.getLength();d+=1)f[d]=h.getAt(d);for(d=0;d<i.getLength();d+=1)f[d]^=H.gexp(H.glog(i.getAt(d))+p);return W(f,0).mod(i)}};return h}var te=(function(){var P=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],x=function(h,i){var p={};return p.totalCount=h,p.dataCount=i,p},w={getRSBlocks:function(h,i){var p=(function(re,ee){switch(ee){case F.L:return P[4*(re-1)+0];case F.M:return P[4*(re-1)+1];case F.Q:return P[4*(re-1)+2];case F.H:return P[4*(re-1)+3];default:return}})(h,i);if(p===void 0)throw"bad rs block @ typeNumber:"+h+"/errorCorrectionLevel:"+i;for(var f=p.length/3,d=[],v=0;v<f;v+=1)for(var D=p[3*v+0],T=p[3*v+1],q=p[3*v+2],X=0;X<D;X+=1)d.push(x(T,q));return d}};return w})(),oe=function(){var P=[],x=0,w={getBuffer:function(){return P},getAt:function(h){var i=Math.floor(h/8);return(P[i]>>>7-h%8&1)==1},put:function(h,i){for(var p=0;p<i;p+=1)w.putBit((h>>>i-p-1&1)==1)},getLengthInBits:function(){return x},putBit:function(h){var i=Math.floor(x/8);P.length<=i&&P.push(0),h&&(P[i]|=128>>>x%8),x+=1}};return w},G=function(P){var x=P,w={getMode:function(){return 1},getLength:function(p){return x.length},write:function(p){for(var f=x,d=0;d+2<f.length;)p.put(h(f.substring(d,d+3)),10),d+=3;d<f.length&&(f.length-d==1?p.put(h(f.substring(d,d+1)),4):f.length-d==2&&p.put(h(f.substring(d,d+2)),7))}},h=function(p){for(var f=0,d=0;d<p.length;d+=1)f=10*f+i(p.charAt(d));return f},i=function(p){if("0"<=p&&p<="9")return p.charCodeAt(0)-48;throw"illegal char :"+p};return w},K=function(P){var x=P,w={getMode:function(){return 2},getLength:function(i){return x.length},write:function(i){for(var p=x,f=0;f+1<p.length;)i.put(45*h(p.charAt(f))+h(p.charAt(f+1)),11),f+=2;f<p.length&&i.put(h(p.charAt(f)),6)}},h=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return w},V=function(P){var x=M.stringToBytes(P);return{getMode:function(){return 4},getLength:function(w){return x.length},write:function(w){for(var h=0;h<x.length;h+=1)w.put(x[h],8)}}},U=function(P){var x=M.stringToBytesFuncs.SJIS;if(!x)throw"sjis not supported.";(function(){var i=x("友");if(i.length!=2||(i[0]<<8|i[1])!=38726)throw"sjis not supported."})();var w=x(P),h={getMode:function(){return 8},getLength:function(i){return~~(w.length/2)},write:function(i){for(var p=w,f=0;f+1<p.length;){var d=(255&p[f])<<8|255&p[f+1];if(33088<=d&&d<=40956)d-=33088;else{if(!(57408<=d&&d<=60351))throw"illegal char at "+(f+1)+"/"+d;d-=49472}d=192*(d>>>8&255)+(255&d),i.put(d,13),f+=2}if(f<p.length)throw"illegal char at "+(f+1)}};return h},J=function(){var P=[],x={writeByte:function(w){P.push(255&w)},writeShort:function(w){x.writeByte(w),x.writeByte(w>>>8)},writeBytes:function(w,h,i){h=h||0,i=i||w.length;for(var p=0;p<i;p+=1)x.writeByte(w[p+h])},writeString:function(w){for(var h=0;h<w.length;h+=1)x.writeByte(w.charCodeAt(h))},toByteArray:function(){return P},toString:function(){var w="";w+="[";for(var h=0;h<P.length;h+=1)h>0&&(w+=","),w+=P[h];return w+"]"}};return x},se=function(P){var x=P,w=0,h=0,i=0,p={read:function(){for(;i<8;){if(w>=x.length){if(i==0)return-1;throw"unexpected end of file./"+i}var d=x.charAt(w);if(w+=1,d=="=")return i=0,-1;d.match(/^\s$/)||(h=h<<6|f(d.charCodeAt(0)),i+=6)}var v=h>>>i-8&255;return i-=8,v}},f=function(d){if(65<=d&&d<=90)return d-65;if(97<=d&&d<=122)return d-97+26;if(48<=d&&d<=57)return d-48+52;if(d==43)return 62;if(d==47)return 63;throw"c:"+d};return p},ne=function(P,x,w){for(var h=(function(T,q){var X=T,re=q,ee=new Array(T*q),ae={setPixel:function(E,L,R){ee[L*X+E]=R},write:function(E){E.writeString("GIF87a"),E.writeShort(X),E.writeShort(re),E.writeByte(128),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(0),E.writeByte(255),E.writeByte(255),E.writeByte(255),E.writeString(","),E.writeShort(0),E.writeShort(0),E.writeShort(X),E.writeShort(re),E.writeByte(0);var L=ie(2);E.writeByte(2);for(var R=0;L.length-R>255;)E.writeByte(255),E.writeBytes(L,R,255),R+=255;E.writeByte(L.length-R),E.writeBytes(L,R,L.length-R),E.writeByte(0),E.writeString(";")}},ie=function(E){for(var L=1<<E,R=1+(1<<E),Y=E+1,I=ue(),ce=0;ce<L;ce+=1)I.add(String.fromCharCode(ce));I.add(String.fromCharCode(L)),I.add(String.fromCharCode(R));var o,u,g,j=J(),$=(o=j,u=0,g=0,{write:function(pe,Q){if(pe>>>Q)throw"length over";for(;u+Q>=8;)o.writeByte(255&(pe<<u|g)),Q-=8-u,pe>>>=8-u,g=0,u=0;g|=pe<<u,u+=Q},flush:function(){u>0&&o.writeByte(g)}});$.write(L,Y);var z=0,le=String.fromCharCode(ee[z]);for(z+=1;z<ee.length;){var he=String.fromCharCode(ee[z]);z+=1,I.contains(le+he)?le+=he:($.write(I.indexOf(le),Y),I.size()<4095&&(I.size()==1<<Y&&(Y+=1),I.add(le+he)),le=he)}return $.write(I.indexOf(le),Y),$.write(R,Y),$.flush(),j.toByteArray()},ue=function(){var E={},L=0,R={add:function(Y){if(R.contains(Y))throw"dup key:"+Y;E[Y]=L,L+=1},size:function(){return L},indexOf:function(Y){return E[Y]},contains:function(Y){return E[Y]!==void 0}};return R};return ae})(P,x),i=0;i<x;i+=1)for(var p=0;p<P;p+=1)h.setPixel(p,i,w(p,i));var f=J();h.write(f);for(var d=(function(){var T=0,q=0,X=0,re="",ee={},ae=function(ue){re+=String.fromCharCode(ie(63&ue))},ie=function(ue){if(!(ue<0)){if(ue<26)return 65+ue;if(ue<52)return ue-26+97;if(ue<62)return ue-52+48;if(ue==62)return 43;if(ue==63)return 47}throw"n:"+ue};return ee.writeByte=function(ue){for(T=T<<8|255&ue,q+=8,X+=1;q>=6;)ae(T>>>q-6),q-=6},ee.flush=function(){if(q>0&&(ae(T<<6-q),T=0,q=0),X%3!=0)for(var ue=3-X%3,E=0;E<ue;E+=1)re+="="},ee.toString=function(){return re},ee})(),v=f.toByteArray(),D=0;D<v.length;D+=1)d.writeByte(v[D]);return d.flush(),"data:image/gif;base64,"+d};return M})();_.stringToBytesFuncs["UTF-8"]=function(M){return(function(S){for(var C=[],k=0;k<S.length;k++){var A=S.charCodeAt(k);A<128?C.push(A):A<2048?C.push(192|A>>6,128|63&A):A<55296||A>=57344?C.push(224|A>>12,128|A>>6&63,128|63&A):(k++,A=65536+((1023&A)<<10|1023&S.charCodeAt(k)),C.push(240|A>>18,128|A>>12&63,128|A>>6&63,128|63&A))}return C})(M)},(y=typeof(m=function(){return _})=="function"?m.apply(a,[]):m)===void 0||(c.exports=y)}},n={};function s(c){var a=n[c];if(a!==void 0)return a.exports;var m=n[c]={exports:{}};return r[c](m,m.exports,s),m.exports}s.n=c=>{var a=c&&c.__esModule?()=>c.default:()=>c;return s.d(a,{a}),a},s.d=(c,a)=>{for(var m in a)s.o(a,m)&&!s.o(c,m)&&Object.defineProperty(c,m,{enumerable:!0,get:a[m]})},s.o=(c,a)=>Object.prototype.hasOwnProperty.call(c,a);var l={};return(()=>{s.d(l,{default:()=>x});const c=w=>!!w&&typeof w=="object"&&!Array.isArray(w);function a(w,...h){if(!h.length)return w;const i=h.shift();return i!==void 0&&c(w)&&c(i)?(w=Object.assign({},w),Object.keys(i).forEach(p=>{const f=w[p],d=i[p];Array.isArray(f)&&Array.isArray(d)?w[p]=d:c(f)&&c(d)?w[p]=a(Object.assign({},f),d):w[p]=d}),a(w,...h)):w}function m(w,h){const i=document.createElement("a");i.download=h,i.href=w,document.body.appendChild(i),i.click(),document.body.removeChild(i)}const y={L:.07,M:.15,Q:.25,H:.3};class _{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let d;switch(this._type){case"dots":d=this._drawDot;break;case"classy":d=this._drawClassy;break;case"classy-rounded":d=this._drawClassyRounded;break;case"rounded":d=this._drawRounded;break;case"extra-rounded":d=this._drawExtraRounded;break;default:d=this._drawSquare}d.call(this,{x:h,y:i,size:p,getNeighbor:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:d}){var v;const D=h+p/2,T=i+p/2;d(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(p+i/2)),this._element.setAttribute("cy",String(f+i/2)),this._element.setAttribute("r",String(i/2))}}))}_basicSquare(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(p)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(i)),this._element.setAttribute("height",String(i))}}))}_basicSideRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h `+i/2+`a ${i/2} ${i/2}, 0, 0, 0, 0 ${-i}`)}}))}_basicCornerRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}v `+-i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${-i/2} ${-i/2}`)}}))}_basicCornerExtraRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}a ${i} ${i}, 0, 0, 0, ${-i} ${-i}`)}}))}_basicCornersRounded(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${p} ${f}v `+i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${i/2} ${i/2}h `+i/2+"v "+-i/2+`a ${i/2} ${i/2}, 0, 0, 0, ${-i/2} ${-i/2}`)}}))}_drawDot({x:h,y:i,size:p}){this._basicDot({x:h,y:i,size:p,rotation:0})}_drawSquare({x:h,y:i,size:p}){this._basicSquare({x:h,y:i,size:p,rotation:0})}_drawRounded({x:h,y:i,size:p,getNeighbor:f}){const d=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0,q=d+v+D+T;if(q!==0)if(q>2||d&&v||D&&T)this._basicSquare({x:h,y:i,size:p,rotation:0});else{if(q===2){let X=0;return d&&D?X=Math.PI/2:D&&v?X=Math.PI:v&&T&&(X=-Math.PI/2),void this._basicCornerRounded({x:h,y:i,size:p,rotation:X})}if(q===1){let X=0;return D?X=Math.PI/2:v?X=Math.PI:T&&(X=-Math.PI/2),void this._basicSideRounded({x:h,y:i,size:p,rotation:X})}}else this._basicDot({x:h,y:i,size:p,rotation:0})}_drawExtraRounded({x:h,y:i,size:p,getNeighbor:f}){const d=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0,q=d+v+D+T;if(q!==0)if(q>2||d&&v||D&&T)this._basicSquare({x:h,y:i,size:p,rotation:0});else{if(q===2){let X=0;return d&&D?X=Math.PI/2:D&&v?X=Math.PI:v&&T&&(X=-Math.PI/2),void this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:X})}if(q===1){let X=0;return D?X=Math.PI/2:v?X=Math.PI:T&&(X=-Math.PI/2),void this._basicSideRounded({x:h,y:i,size:p,rotation:X})}}else this._basicDot({x:h,y:i,size:p,rotation:0})}_drawClassy({x:h,y:i,size:p,getNeighbor:f}){const d=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0;d+v+D+T!==0?d||D?v||T?this._basicSquare({x:h,y:i,size:p,rotation:0}):this._basicCornerRounded({x:h,y:i,size:p,rotation:Math.PI/2}):this._basicCornerRounded({x:h,y:i,size:p,rotation:-Math.PI/2}):this._basicCornersRounded({x:h,y:i,size:p,rotation:Math.PI/2})}_drawClassyRounded({x:h,y:i,size:p,getNeighbor:f}){const d=f?+f(-1,0):0,v=f?+f(1,0):0,D=f?+f(0,-1):0,T=f?+f(0,1):0;d+v+D+T!==0?d||D?v||T?this._basicSquare({x:h,y:i,size:p,rotation:0}):this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:h,y:i,size:p,rotation:-Math.PI/2}):this._basicCornersRounded({x:h,y:i,size:p,rotation:Math.PI/2})}}const M={dot:"dot",square:"square",extraRounded:"extra-rounded"},S=Object.values(M);class C{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let d;switch(this._type){case M.square:d=this._drawSquare;break;case M.extraRounded:d=this._drawExtraRounded;break;default:d=this._drawDot}d.call(this,{x:h,y:i,size:p,rotation:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:d}){var v;const D=h+p/2,T=i+p/2;d(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h,d=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p+i/2} ${f}a ${i/2} ${i/2} 0 1 0 0.1 0zm 0 ${d}a ${i/2-d} ${i/2-d} 0 1 1 -0.1 0Z`)}}))}_basicSquare(h){const{size:i,x:p,y:f}=h,d=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p} ${f}v ${i}h ${i}v `+-i+`zM ${p+d} ${f+d}h `+(i-2*d)+"v "+(i-2*d)+"h "+(2*d-i)+"z")}}))}_basicExtraRounded(h){const{size:i,x:p,y:f}=h,d=i/7;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${p} ${f+2.5*d}v `+2*d+`a ${2.5*d} ${2.5*d}, 0, 0, 0, ${2.5*d} ${2.5*d}h `+2*d+`a ${2.5*d} ${2.5*d}, 0, 0, 0, ${2.5*d} ${2.5*-d}v `+-2*d+`a ${2.5*d} ${2.5*d}, 0, 0, 0, ${2.5*-d} ${2.5*-d}h `+-2*d+`a ${2.5*d} ${2.5*d}, 0, 0, 0, ${2.5*-d} ${2.5*d}M ${p+2.5*d} ${f+d}h `+2*d+`a ${1.5*d} ${1.5*d}, 0, 0, 1, ${1.5*d} ${1.5*d}v `+2*d+`a ${1.5*d} ${1.5*d}, 0, 0, 1, ${1.5*-d} ${1.5*d}h `+-2*d+`a ${1.5*d} ${1.5*d}, 0, 0, 1, ${1.5*-d} ${1.5*-d}v `+-2*d+`a ${1.5*d} ${1.5*d}, 0, 0, 1, ${1.5*d} ${1.5*-d}`)}}))}_drawDot({x:h,y:i,size:p,rotation:f}){this._basicDot({x:h,y:i,size:p,rotation:f})}_drawSquare({x:h,y:i,size:p,rotation:f}){this._basicSquare({x:h,y:i,size:p,rotation:f})}_drawExtraRounded({x:h,y:i,size:p,rotation:f}){this._basicExtraRounded({x:h,y:i,size:p,rotation:f})}}const k={dot:"dot",square:"square"},A=Object.values(k);class N{constructor({svg:h,type:i,window:p}){this._svg=h,this._type=i,this._window=p}draw(h,i,p,f){let d;d=this._type===k.square?this._drawSquare:this._drawDot,d.call(this,{x:h,y:i,size:p,rotation:f})}_rotateFigure({x:h,y:i,size:p,rotation:f=0,draw:d}){var v;const D=h+p/2,T=i+p/2;d(),(v=this._element)===null||v===void 0||v.setAttribute("transform",`rotate(${180*f/Math.PI},${D},${T})`)}_basicDot(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(p+i/2)),this._element.setAttribute("cy",String(f+i/2)),this._element.setAttribute("r",String(i/2))}}))}_basicSquare(h){const{size:i,x:p,y:f}=h;this._rotateFigure(Object.assign(Object.assign({},h),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(p)),this._element.setAttribute("y",String(f)),this._element.setAttribute("width",String(i)),this._element.setAttribute("height",String(i))}}))}_drawDot({x:h,y:i,size:p,rotation:f}){this._basicDot({x:h,y:i,size:p,rotation:f})}_drawSquare({x:h,y:i,size:p,rotation:f}){this._basicSquare({x:h,y:i,size:p,rotation:f})}}const F="circle",B=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],H=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class W{constructor(h,i){this._roundSize=p=>this._options.dotsOptions.roundSize?Math.floor(p):p,this._window=i,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(h.width)),this._element.setAttribute("height",String(h.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),h.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${h.width} ${h.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=h.image,this._instanceId=W.instanceCount++,this._options=h}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(h){const i=h.getModuleCount(),p=Math.min(this._options.width,this._options.height)-2*this._options.margin,f=this._options.shape===F?p/Math.sqrt(2):p,d=this._roundSize(f/i);let v={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=h,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:D,qrOptions:T}=this._options,q=D.imageSize*y[T.errorCorrectionLevel],X=Math.floor(q*i*i);v=(function({originalHeight:re,originalWidth:ee,maxHiddenDots:ae,maxHiddenAxisDots:ie,dotSize:ue}){const E={x:0,y:0},L={x:0,y:0};if(re<=0||ee<=0||ae<=0||ue<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const R=re/ee;return E.x=Math.floor(Math.sqrt(ae/R)),E.x<=0&&(E.x=1),ie&&ie<E.x&&(E.x=ie),E.x%2==0&&E.x--,L.x=E.x*ue,E.y=1+2*Math.ceil((E.x*R-1)/2),L.y=Math.round(L.x*R),(E.y*E.x>ae||ie&&ie<E.y)&&(ie&&ie<E.y?(E.y=ie,E.y%2==0&&E.x--):E.y-=2,L.y=E.y*ue,E.x=1+2*Math.ceil((E.y/R-1)/2),L.x=Math.round(L.y/R)),{height:L.y,width:L.x,hideYDots:E.y,hideXDots:E.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:X,maxHiddenAxisDots:i-14,dotSize:d})}this.drawBackground(),this.drawDots((D,T)=>{var q,X,re,ee,ae,ie;return!(this._options.imageOptions.hideBackgroundDots&&D>=(i-v.hideYDots)/2&&D<(i+v.hideYDots)/2&&T>=(i-v.hideXDots)/2&&T<(i+v.hideXDots)/2||!((q=B[D])===null||q===void 0)&&q[T]||!((X=B[D-i+7])===null||X===void 0)&&X[T]||!((re=B[D])===null||re===void 0)&&re[T-i+7]||!((ee=H[D])===null||ee===void 0)&&ee[T]||!((ae=H[D-i+7])===null||ae===void 0)&&ae[T]||!((ie=H[D])===null||ie===void 0)&&ie[T-i+7])}),this.drawCorners(),this._options.image&&await this.drawImage({width:v.width,height:v.height,count:i,dotSize:d})}drawBackground(){var h,i,p;const f=this._element,d=this._options;if(f){const v=(h=d.backgroundOptions)===null||h===void 0?void 0:h.gradient,D=(i=d.backgroundOptions)===null||i===void 0?void 0:i.color;let T=d.height,q=d.width;if(v||D){const X=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((p=d.backgroundOptions)===null||p===void 0)&&p.round&&(T=q=Math.min(d.width,d.height),X.setAttribute("rx",String(T/2*d.backgroundOptions.round))),X.setAttribute("x",String(this._roundSize((d.width-q)/2))),X.setAttribute("y",String(this._roundSize((d.height-T)/2))),X.setAttribute("width",String(q)),X.setAttribute("height",String(T)),this._backgroundClipPath.appendChild(X),this._createColor({options:v,color:D,additionalRotation:0,x:0,y:0,height:d.height,width:d.width,name:`background-color-${this._instanceId}`})}}}drawDots(h){var i,p;if(!this._qr)throw"QR code is not defined";const f=this._options,d=this._qr.getModuleCount();if(d>f.width||d>f.height)throw"The canvas is too small.";const v=Math.min(f.width,f.height)-2*f.margin,D=f.shape===F?v/Math.sqrt(2):v,T=this._roundSize(D/d),q=this._roundSize((f.width-d*T)/2),X=this._roundSize((f.height-d*T)/2),re=new _({svg:this._element,type:f.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(i=f.dotsOptions)===null||i===void 0?void 0:i.gradient,color:f.dotsOptions.color,additionalRotation:0,x:0,y:0,height:f.height,width:f.width,name:`dot-color-${this._instanceId}`});for(let ee=0;ee<d;ee++)for(let ae=0;ae<d;ae++)h&&!h(ee,ae)||!((p=this._qr)===null||p===void 0)&&p.isDark(ee,ae)&&(re.draw(q+ae*T,X+ee*T,T,(ie,ue)=>!(ae+ie<0||ee+ue<0||ae+ie>=d||ee+ue>=d)&&!(h&&!h(ee+ue,ae+ie))&&!!this._qr&&this._qr.isDark(ee+ue,ae+ie)),re._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(re._element));if(f.shape===F){const ee=this._roundSize((v/T-d)/2),ae=d+2*ee,ie=q-ee*T,ue=X-ee*T,E=[],L=this._roundSize(ae/2);for(let R=0;R<ae;R++){E[R]=[];for(let Y=0;Y<ae;Y++)R>=ee-1&&R<=ae-ee&&Y>=ee-1&&Y<=ae-ee||Math.sqrt((R-L)*(R-L)+(Y-L)*(Y-L))>L?E[R][Y]=0:E[R][Y]=this._qr.isDark(Y-2*ee<0?Y:Y>=d?Y-2*ee:Y-ee,R-2*ee<0?R:R>=d?R-2*ee:R-ee)?1:0}for(let R=0;R<ae;R++)for(let Y=0;Y<ae;Y++)E[R][Y]&&(re.draw(ie+Y*T,ue+R*T,T,(I,ce)=>{var o;return!!(!((o=E[R+ce])===null||o===void 0)&&o[Y+I])}),re._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(re._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const h=this._element,i=this._options;if(!h)throw"Element code is not defined";const p=this._qr.getModuleCount(),f=Math.min(i.width,i.height)-2*i.margin,d=i.shape===F?f/Math.sqrt(2):f,v=this._roundSize(d/p),D=7*v,T=3*v,q=this._roundSize((i.width-p*v)/2),X=this._roundSize((i.height-p*v)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach(([re,ee,ae])=>{var ie,ue,E,L,R,Y,I,ce,o,u,g,j,$,z;const le=q+re*v*(p-7),he=X+ee*v*(p-7);let pe=this._dotsClipPath,Q=this._dotsClipPath;if((!((ie=i.cornersSquareOptions)===null||ie===void 0)&&ie.gradient||!((ue=i.cornersSquareOptions)===null||ue===void 0)&&ue.color)&&(pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),pe.setAttribute("id",`clip-path-corners-square-color-${re}-${ee}-${this._instanceId}`),this._defs.appendChild(pe),this._cornersSquareClipPath=this._cornersDotClipPath=Q=pe,this._createColor({options:(E=i.cornersSquareOptions)===null||E===void 0?void 0:E.gradient,color:(L=i.cornersSquareOptions)===null||L===void 0?void 0:L.color,additionalRotation:ae,x:le,y:he,height:D,width:D,name:`corners-square-color-${re}-${ee}-${this._instanceId}`})),((R=i.cornersSquareOptions)===null||R===void 0?void 0:R.type)&&S.includes(i.cornersSquareOptions.type)){const fe=new C({svg:this._element,type:i.cornersSquareOptions.type,window:this._window});fe.draw(le,he,D,ae),fe._element&&pe&&pe.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:((Y=i.cornersSquareOptions)===null||Y===void 0?void 0:Y.type)||i.dotsOptions.type,window:this._window});for(let me=0;me<B.length;me++)for(let ge=0;ge<B[me].length;ge++)!((I=B[me])===null||I===void 0)&&I[ge]&&(fe.draw(le+ge*v,he+me*v,v,(Se,xe)=>{var Pe;return!!(!((Pe=B[me+xe])===null||Pe===void 0)&&Pe[ge+Se])}),fe._element&&pe&&pe.appendChild(fe._element))}if((!((ce=i.cornersDotOptions)===null||ce===void 0)&&ce.gradient||!((o=i.cornersDotOptions)===null||o===void 0)&&o.color)&&(Q=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),Q.setAttribute("id",`clip-path-corners-dot-color-${re}-${ee}-${this._instanceId}`),this._defs.appendChild(Q),this._cornersDotClipPath=Q,this._createColor({options:(u=i.cornersDotOptions)===null||u===void 0?void 0:u.gradient,color:(g=i.cornersDotOptions)===null||g===void 0?void 0:g.color,additionalRotation:ae,x:le+2*v,y:he+2*v,height:T,width:T,name:`corners-dot-color-${re}-${ee}-${this._instanceId}`})),((j=i.cornersDotOptions)===null||j===void 0?void 0:j.type)&&A.includes(i.cornersDotOptions.type)){const fe=new N({svg:this._element,type:i.cornersDotOptions.type,window:this._window});fe.draw(le+2*v,he+2*v,T,ae),fe._element&&Q&&Q.appendChild(fe._element)}else{const fe=new _({svg:this._element,type:(($=i.cornersDotOptions)===null||$===void 0?void 0:$.type)||i.dotsOptions.type,window:this._window});for(let me=0;me<H.length;me++)for(let ge=0;ge<H[me].length;ge++)!((z=H[me])===null||z===void 0)&&z[ge]&&(fe.draw(le+ge*v,he+me*v,v,(Se,xe)=>{var Pe;return!!(!((Pe=H[me+xe])===null||Pe===void 0)&&Pe[ge+Se])}),fe._element&&Q&&Q.appendChild(fe._element))}})}loadImage(){return new Promise((h,i)=>{var p;const f=this._options;if(!f.image)return i("Image is not defined");if(!((p=f.nodeCanvas)===null||p===void 0)&&p.loadImage)f.nodeCanvas.loadImage(f.image).then(d=>{var v,D;if(this._image=d,this._options.imageOptions.saveAsBlob){const T=(v=f.nodeCanvas)===null||v===void 0?void 0:v.createCanvas(this._image.width,this._image.height);(D=T?.getContext("2d"))===null||D===void 0||D.drawImage(d,0,0),this._imageUri=T?.toDataURL()}h()}).catch(i);else{const d=new this._window.Image;typeof f.imageOptions.crossOrigin=="string"&&(d.crossOrigin=f.imageOptions.crossOrigin),this._image=d,d.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(v,D){return new Promise(T=>{const q=new D.XMLHttpRequest;q.onload=function(){const X=new D.FileReader;X.onloadend=function(){T(X.result)},X.readAsDataURL(q.response)},q.open("GET",v),q.responseType="blob",q.send()})})(f.image||"",this._window)),h()},d.src=f.image}})}async drawImage({width:h,height:i,count:p,dotSize:f}){const d=this._options,v=this._roundSize((d.width-p*f)/2),D=this._roundSize((d.height-p*f)/2),T=v+this._roundSize(d.imageOptions.margin+(p*f-h)/2),q=D+this._roundSize(d.imageOptions.margin+(p*f-i)/2),X=h-2*d.imageOptions.margin,re=i-2*d.imageOptions.margin,ee=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");ee.setAttribute("href",this._imageUri||""),ee.setAttribute("xlink:href",this._imageUri||""),ee.setAttribute("x",String(T)),ee.setAttribute("y",String(q)),ee.setAttribute("width",`${X}px`),ee.setAttribute("height",`${re}px`),this._element.appendChild(ee)}_createColor({options:h,color:i,additionalRotation:p,x:f,y:d,height:v,width:D,name:T}){const q=D>v?D:v,X=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(X.setAttribute("x",String(f)),X.setAttribute("y",String(d)),X.setAttribute("height",String(v)),X.setAttribute("width",String(D)),X.setAttribute("clip-path",`url('#clip-path-${T}')`),h){let re;if(h.type==="radial")re=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),re.setAttribute("id",T),re.setAttribute("gradientUnits","userSpaceOnUse"),re.setAttribute("fx",String(f+D/2)),re.setAttribute("fy",String(d+v/2)),re.setAttribute("cx",String(f+D/2)),re.setAttribute("cy",String(d+v/2)),re.setAttribute("r",String(q/2));else{const ee=((h.rotation||0)+p)%(2*Math.PI),ae=(ee+2*Math.PI)%(2*Math.PI);let ie=f+D/2,ue=d+v/2,E=f+D/2,L=d+v/2;ae>=0&&ae<=.25*Math.PI||ae>1.75*Math.PI&&ae<=2*Math.PI?(ie-=D/2,ue-=v/2*Math.tan(ee),E+=D/2,L+=v/2*Math.tan(ee)):ae>.25*Math.PI&&ae<=.75*Math.PI?(ue-=v/2,ie-=D/2/Math.tan(ee),L+=v/2,E+=D/2/Math.tan(ee)):ae>.75*Math.PI&&ae<=1.25*Math.PI?(ie+=D/2,ue+=v/2*Math.tan(ee),E-=D/2,L-=v/2*Math.tan(ee)):ae>1.25*Math.PI&&ae<=1.75*Math.PI&&(ue+=v/2,ie+=D/2/Math.tan(ee),L-=v/2,E-=D/2/Math.tan(ee)),re=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),re.setAttribute("id",T),re.setAttribute("gradientUnits","userSpaceOnUse"),re.setAttribute("x1",String(Math.round(ie))),re.setAttribute("y1",String(Math.round(ue))),re.setAttribute("x2",String(Math.round(E))),re.setAttribute("y2",String(Math.round(L)))}h.colorStops.forEach(({offset:ee,color:ae})=>{const ie=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");ie.setAttribute("offset",100*ee+"%"),ie.setAttribute("stop-color",ae),re.appendChild(ie)}),X.setAttribute("fill",`url('#${T}')`),this._defs.appendChild(re)}else i&&X.setAttribute("fill",i);this._element.appendChild(X)}}W.instanceCount=0;const te=W,oe="canvas",G={};for(let w=0;w<=40;w++)G[w]=w;const K={type:oe,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:G[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function V(w){const h=Object.assign({},w);if(!h.colorStops||!h.colorStops.length)throw"Field 'colorStops' is required in gradient";return h.rotation?h.rotation=Number(h.rotation):h.rotation=0,h.colorStops=h.colorStops.map(i=>Object.assign(Object.assign({},i),{offset:Number(i.offset)})),h}function U(w){const h=Object.assign({},w);return h.width=Number(h.width),h.height=Number(h.height),h.margin=Number(h.margin),h.imageOptions=Object.assign(Object.assign({},h.imageOptions),{hideBackgroundDots:!!h.imageOptions.hideBackgroundDots,imageSize:Number(h.imageOptions.imageSize),margin:Number(h.imageOptions.margin)}),h.margin>Math.min(h.width,h.height)&&(h.margin=Math.min(h.width,h.height)),h.dotsOptions=Object.assign({},h.dotsOptions),h.dotsOptions.gradient&&(h.dotsOptions.gradient=V(h.dotsOptions.gradient)),h.cornersSquareOptions&&(h.cornersSquareOptions=Object.assign({},h.cornersSquareOptions),h.cornersSquareOptions.gradient&&(h.cornersSquareOptions.gradient=V(h.cornersSquareOptions.gradient))),h.cornersDotOptions&&(h.cornersDotOptions=Object.assign({},h.cornersDotOptions),h.cornersDotOptions.gradient&&(h.cornersDotOptions.gradient=V(h.cornersDotOptions.gradient))),h.backgroundOptions&&(h.backgroundOptions=Object.assign({},h.backgroundOptions),h.backgroundOptions.gradient&&(h.backgroundOptions.gradient=V(h.backgroundOptions.gradient))),h}var J=s(873),se=s.n(J);function ne(w){if(!w)throw new Error("Extension must be defined");w[0]==="."&&(w=w.substring(1));const h={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[w.toLowerCase()];if(!h)throw new Error(`Extension "${w}" is not supported`);return h}class P{constructor(h){h!=null&&h.jsdom?this._window=new h.jsdom("",{resources:"usable"}).window:this._window=window,this._options=h?U(a(K,h)):K,this.update()}static _clearContainer(h){h&&(h.innerHTML="")}_setupSvg(){if(!this._qr)return;const h=new te(this._options,this._window);this._svg=h.getElement(),this._svgDrawingPromise=h.drawQR(this._qr).then(()=>{var i;this._svg&&((i=this._extension)===null||i===void 0||i.call(this,h.getElement(),this._options))})}_setupCanvas(){var h,i;this._qr&&(!((h=this._options.nodeCanvas)===null||h===void 0)&&h.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(i=this._svgDrawingPromise)===null||i===void 0?void 0:i.then(()=>{var p;if(!this._svg)return;const f=this._svg,d=new this._window.XMLSerializer().serializeToString(f),v=btoa(d),D=`data:${ne("svg")};base64,${v}`;if(!((p=this._options.nodeCanvas)===null||p===void 0)&&p.loadImage)return this._options.nodeCanvas.loadImage(D).then(T=>{var q,X;T.width=this._options.width,T.height=this._options.height,(X=(q=this._nodeCanvas)===null||q===void 0?void 0:q.getContext("2d"))===null||X===void 0||X.drawImage(T,0,0)});{const T=new this._window.Image;return new Promise(q=>{T.onload=()=>{var X,re;(re=(X=this._domCanvas)===null||X===void 0?void 0:X.getContext("2d"))===null||re===void 0||re.drawImage(T,0,0),q()},T.src=D})}}))}async _getElement(h="png"){if(!this._qr)throw"QR code is empty";return h.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(h){P._clearContainer(this._container),this._options=h?U(a(this._options,h)):this._options,this._options.data&&(this._qr=se()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(i){switch(!0){case/^[0-9]*$/.test(i):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(i):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===oe?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(h){if(h){if(typeof h.appendChild!="function")throw"Container should be a single DOM node";this._options.type===oe?this._domCanvas&&h.appendChild(this._domCanvas):this._svg&&h.appendChild(this._svg),this._container=h}}applyExtension(h){if(!h)throw"Extension function should be defined.";this._extension=h,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(h="png"){if(!this._qr)throw"QR code is empty";const i=await this._getElement(h),p=ne(h);if(!i)return null;if(h.toLowerCase()==="svg"){const f=`<?xml version="1.0" standalone="no"?>\r
22
+ ${new this._window.XMLSerializer().serializeToString(i)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(f):new Blob([f],{type:p})}return new Promise(f=>{const d=i;if("toBuffer"in d)if(p==="image/png")f(d.toBuffer(p));else if(p==="image/jpeg")f(d.toBuffer(p));else{if(p!=="application/pdf")throw Error("Unsupported extension");f(d.toBuffer(p))}else"toBlob"in d&&d.toBlob(f,p,1)})}async download(h){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let i="png",p="qr";typeof h=="string"?(i=h,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof h=="object"&&h!==null&&(h.name&&(p=h.name),h.extension&&(i=h.extension));const f=await this._getElement(i);if(f)if(i.toLowerCase()==="svg"){let d=new XMLSerializer().serializeToString(f);d=`<?xml version="1.0" standalone="no"?>\r
23
+ `+d,m(`data:${ne(i)};charset=utf-8,${encodeURIComponent(d)}`,`${p}.svg`)}else m(f.toDataURL(ne(i)),`${p}.${i}`)}}const x=P})(),l.default})())})(sn)),sn.exports}gl();const Io=Z.createContext(void 0);function ml(t){const e=Fe.c(9),{children:r,baseUrl:n,queryClient:s}=t;let l;e[0]!==n||e[1]!==s?(l={baseUrl:n,queryClient:s},e[0]=n,e[1]=s,e[2]=l):l=e[2];let c;e[3]!==r||e[4]!==s?(c=b.jsx(Zn,{client:s,children:r}),e[3]=r,e[4]=s,e[5]=c):c=e[5];let a;return e[6]!==l||e[7]!==c?(a=b.jsx(Io.Provider,{value:l,children:c}),e[6]=l,e[7]=c,e[8]=a):a=e[8],a}function ft(){const t=Z.useContext(Io);if(!t)throw new Error("useDataTable must be used within a DataTableProvider");return t}function an(t){if(typeof t=="string")try{const e=JSON.parse(t);return{message:e.message||t,code:e.code,details:e.details}}catch{return{message:t}}return t instanceof Error?{message:t.message}:{message:"Unbekannter Fehler"}}async function Ot(t){const e=await t.text();if(!e)throw new Error(`HTTP ${t.status}: ${t.statusText}`);let r=null;try{r=JSON.parse(e)}catch{throw new Error(e)}throw r?.message?new Error(r.message):r?.error?new Error(r.error):new Error(e)}function yl(){const t=localStorage.getItem("a360.assumed-org");return t?{"X-Assume-Org":t}:{}}async function xt(){return{"Content-Type":"application/json",Authorization:`Bearer ${await ol()??""}`,...yl()}}async function Yo(t){return fetch(t,{method:"GET",headers:await xt()}).then(async e=>(e.status>=400&&await Ot(e),e)).then(e=>e.json()).then(e=>e)}async function zo(t,e){return fetch(`${t}/${e}`,{method:"GET",headers:await xt()}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.json()).then(r=>r)}async function Fo(t,e){const r=await fetch(`${t}/${e}`,{method:"DELETE",headers:await xt()});r.status>=400&&await Ot(r)}async function Wo(t,e){return fetch(t,{method:"POST",headers:await xt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}async function vl(t,e,r){return fetch(e,{method:t,headers:await xt(),body:r?JSON.stringify(r):void 0}).then(async n=>(n.status>=400&&await Ot(n),n)).then(n=>{if(n.status!=204)return n.json()}).then(n=>n)}async function Uo(t,e){return fetch(`${t}/${e.id}`,{method:"PUT",headers:await xt(),body:JSON.stringify(e)}).then(async r=>(r.status>=400&&await Ot(r),r)).then(r=>r.status==204?e:r.json()).then(r=>r)}function qo(t,e,r){const n=Fe.c(13),{baseUrl:s}=ft();let l;if(n[0]!==r||n[1]!==e){let y;n[3]!==r?(y=r?.toString(),n[3]=r,n[4]=y):y=n[4],l=[...e.map(bl),String(y)],n[0]=r,n[1]=e,n[2]=l}else l=n[2];let c;n[5]!==t||n[6]!==s||n[7]!==r?(c=()=>zo(`${s}${t}`,r),n[5]=t,n[6]=s,n[7]=r,n[8]=c):c=n[8];const a=!!r;let m;return n[9]!==l||n[10]!==c||n[11]!==a?(m={queryKey:l,queryFn:c,enabled:a},n[9]=l,n[10]=c,n[11]=a,n[12]=m):m=n[12],Xn(m)}function bl(t){return t.toString()}function Vo(t,e,r){const n=Fe.c(9),s=r===void 0?!0:r,{baseUrl:l}=ft();let c;n[0]!==e?(c=[...e.map(wl)],n[0]=e,n[1]=c):c=n[1];let a;n[2]!==t||n[3]!==l?(a=()=>Yo(`${l}${t}`),n[2]=t,n[3]=l,n[4]=a):a=n[4];let m;return n[5]!==s||n[6]!==c||n[7]!==a?(m={queryKey:c,queryFn:a,enabled:s},n[5]=s,n[6]=c,n[7]=a,n[8]=m):m=n[8],Xn(m)}function wl(t){return t.toString()}function Ho(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=ft();let l;r[0]!==e?(l=[...e.map(xl)],r[0]=e,r[1]=l):l=r[1];let c;r[2]!==t||r[3]!==n?(c=m=>Wo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=c):c=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==c?(a={mutationKey:l,mutationFn:c,onSettled(){return s.invalidateQueries({queryKey:[...e.map(_l)]})},onError(m){an(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=c,r[9]=a):a=r[9],Yr(a)}function _l(t){return t.toString()}function xl(t){return t.toString()}function ln(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=ft();let l;r[0]!==e?(l=[...e.map(Sl)],r[0]=e,r[1]=l):l=r[1];let c;r[2]!==t||r[3]!==n?(c=m=>Uo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=c):c=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==c?(a={mutationKey:l,mutationFn:c,onSettled(){return s.invalidateQueries({queryKey:[...e.map(Cl)]})},onError(m){an(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=c,r[9]=a):a=r[9],Yr(a)}function Cl(t){return t.toString()}function Sl(t){return t.toString()}function Go(t,e){const r=Fe.c(10),{baseUrl:n,queryClient:s}=ft();let l;r[0]!==e?(l=[...e.map(kl)],r[0]=e,r[1]=l):l=r[1];let c;r[2]!==t||r[3]!==n?(c=m=>Fo(`${n}${t}`,m),r[2]=t,r[3]=n,r[4]=c):c=r[4];let a;return r[5]!==s||r[6]!==e||r[7]!==l||r[8]!==c?(a={mutationKey:l,mutationFn:c,onSettled(){return s.invalidateQueries({queryKey:[...e.map(Dl)]})},onError(m){an(m)}},r[5]=s,r[6]=e,r[7]=l,r[8]=c,r[9]=a):a=r[9],Yr(a)}function Dl(t){return t.toString()}function kl(t){return t.toString()}var dr={exports:{}},Pl=dr.exports,Qo;function Ml(){return Qo||(Qo=1,(function(t,e){(function(r,n){t.exports=n()})(Pl,(function(){var r=1e3,n=6e4,s=36e5,l="millisecond",c="second",a="minute",m="hour",y="day",_="week",M="month",S="quarter",C="year",k="date",A="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,F=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var x=["th","st","nd","rd"],w=P%100;return"["+P+(x[(w-20)%10]||x[w]||x[0])+"]"}},H=function(P,x,w){var h=String(P);return!h||h.length>=x?P:""+Array(x+1-h.length).join(w)+P},W={s:H,z:function(P){var x=-P.utcOffset(),w=Math.abs(x),h=Math.floor(w/60),i=w%60;return(x<=0?"+":"-")+H(h,2,"0")+":"+H(i,2,"0")},m:function P(x,w){if(x.date()<w.date())return-P(w,x);var h=12*(w.year()-x.year())+(w.month()-x.month()),i=x.clone().add(h,M),p=w-i<0,f=x.clone().add(h+(p?-1:1),M);return+(-(h+(w-i)/(p?i-f:f-i))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M,y:C,w:_,d:y,D:k,h:m,m:a,s:c,ms:l,Q:S}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},te="en",oe={};oe[te]=B;var G="$isDayjsObject",K=function(P){return P instanceof se||!(!P||!P[G])},V=function P(x,w,h){var i;if(!x)return te;if(typeof x=="string"){var p=x.toLowerCase();oe[p]&&(i=p),w&&(oe[p]=w,i=p);var f=x.split("-");if(!i&&f.length>1)return P(f[0])}else{var d=x.name;oe[d]=x,i=d}return!h&&i&&(te=i),i||!h&&te},U=function(P,x){if(K(P))return P.clone();var w=typeof x=="object"?x:{};return w.date=P,w.args=arguments,new se(w)},J=W;J.l=V,J.i=K,J.w=function(P,x){return U(P,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var se=(function(){function P(w){this.$L=V(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[G]=!0}var x=P.prototype;return x.parse=function(w){this.$d=(function(h){var i=h.date,p=h.utc;if(i===null)return new Date(NaN);if(J.u(i))return new Date;if(i instanceof Date)return new Date(i);if(typeof i=="string"&&!/Z$/i.test(i)){var f=i.match(N);if(f){var d=f[2]-1||0,v=(f[7]||"0").substring(0,3);return p?new Date(Date.UTC(f[1],d,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)):new Date(f[1],d,f[3]||1,f[4]||0,f[5]||0,f[6]||0,v)}}return new Date(i)})(w),this.init()},x.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},x.$utils=function(){return J},x.isValid=function(){return this.$d.toString()!==A},x.isSame=function(w,h){var i=U(w);return this.startOf(h)<=i&&i<=this.endOf(h)},x.isAfter=function(w,h){return U(w)<this.startOf(h)},x.isBefore=function(w,h){return this.endOf(h)<U(w)},x.$g=function(w,h,i){return J.u(w)?this[h]:this.set(i,w)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(w,h){var i=this,p=!!J.u(h)||h,f=J.p(w),d=function(ae,ie){var ue=J.w(i.$u?Date.UTC(i.$y,ie,ae):new Date(i.$y,ie,ae),i);return p?ue:ue.endOf(y)},v=function(ae,ie){return J.w(i.toDate()[ae].apply(i.toDate("s"),(p?[0,0,0,0]:[23,59,59,999]).slice(ie)),i)},D=this.$W,T=this.$M,q=this.$D,X="set"+(this.$u?"UTC":"");switch(f){case C:return p?d(1,0):d(31,11);case M:return p?d(1,T):d(0,T+1);case _:var re=this.$locale().weekStart||0,ee=(D<re?D+7:D)-re;return d(p?q-ee:q+(6-ee),T);case y:case k:return v(X+"Hours",0);case m:return v(X+"Minutes",1);case a:return v(X+"Seconds",2);case c:return v(X+"Milliseconds",3);default:return this.clone()}},x.endOf=function(w){return this.startOf(w,!1)},x.$set=function(w,h){var i,p=J.p(w),f="set"+(this.$u?"UTC":""),d=(i={},i[y]=f+"Date",i[k]=f+"Date",i[M]=f+"Month",i[C]=f+"FullYear",i[m]=f+"Hours",i[a]=f+"Minutes",i[c]=f+"Seconds",i[l]=f+"Milliseconds",i)[p],v=p===y?this.$D+(h-this.$W):h;if(p===M||p===C){var D=this.clone().set(k,1);D.$d[d](v),D.init(),this.$d=D.set(k,Math.min(this.$D,D.daysInMonth())).$d}else d&&this.$d[d](v);return this.init(),this},x.set=function(w,h){return this.clone().$set(w,h)},x.get=function(w){return this[J.p(w)]()},x.add=function(w,h){var i,p=this;w=Number(w);var f=J.p(h),d=function(T){var q=U(p);return J.w(q.date(q.date()+Math.round(T*w)),p)};if(f===M)return this.set(M,this.$M+w);if(f===C)return this.set(C,this.$y+w);if(f===y)return d(1);if(f===_)return d(7);var v=(i={},i[a]=n,i[m]=s,i[c]=r,i)[f]||1,D=this.$d.getTime()+w*v;return J.w(D,this)},x.subtract=function(w,h){return this.add(-1*w,h)},x.format=function(w){var h=this,i=this.$locale();if(!this.isValid())return i.invalidDate||A;var p=w||"YYYY-MM-DDTHH:mm:ssZ",f=J.z(this),d=this.$H,v=this.$m,D=this.$M,T=i.weekdays,q=i.months,X=i.meridiem,re=function(ie,ue,E,L){return ie&&(ie[ue]||ie(h,p))||E[ue].slice(0,L)},ee=function(ie){return J.s(d%12||12,ie,"0")},ae=X||function(ie,ue,E){var L=ie<12?"AM":"PM";return E?L.toLowerCase():L};return p.replace(F,(function(ie,ue){return ue||(function(E){switch(E){case"YY":return String(h.$y).slice(-2);case"YYYY":return J.s(h.$y,4,"0");case"M":return D+1;case"MM":return J.s(D+1,2,"0");case"MMM":return re(i.monthsShort,D,q,3);case"MMMM":return re(q,D);case"D":return h.$D;case"DD":return J.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return re(i.weekdaysMin,h.$W,T,2);case"ddd":return re(i.weekdaysShort,h.$W,T,3);case"dddd":return T[h.$W];case"H":return String(d);case"HH":return J.s(d,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ae(d,v,!0);case"A":return ae(d,v,!1);case"m":return String(v);case"mm":return J.s(v,2,"0");case"s":return String(h.$s);case"ss":return J.s(h.$s,2,"0");case"SSS":return J.s(h.$ms,3,"0");case"Z":return f}return null})(ie)||f.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(w,h,i){var p,f=this,d=J.p(h),v=U(w),D=(v.utcOffset()-this.utcOffset())*n,T=this-v,q=function(){return J.m(f,v)};switch(d){case C:p=q()/12;break;case M:p=q();break;case S:p=q()/3;break;case _:p=(T-D)/6048e5;break;case y:p=(T-D)/864e5;break;case m:p=T/s;break;case a:p=T/n;break;case c:p=T/r;break;default:p=T}return i?p:J.a(p)},x.daysInMonth=function(){return this.endOf(M).$D},x.$locale=function(){return oe[this.$L]},x.locale=function(w,h){if(!w)return this.$L;var i=this.clone(),p=V(w,h,!0);return p&&(i.$L=p),i},x.clone=function(){return J.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},P})(),ne=se.prototype;return U.prototype=ne,[["$ms",l],["$s",c],["$m",a],["$H",m],["$W",y],["$M",M],["$y",C],["$D",k]].forEach((function(P){ne[P[1]]=function(x){return this.$g(x,P[0],P[1])}})),U.extend=function(P,x){return P.$i||(P(x,se,U),P.$i=!0),U},U.locale=V,U.isDayjs=K,U.unix=function(P){return U(1e3*P)},U.en=oe[te],U.Ls=oe,U.p={},U}))})(dr)),dr.exports}var Ol=Ml();const de=En(Ol);function Al({direction:t,levelIndex:e,rowIndex:r,cellIndex:n,size:s}){switch(t){case"up":return e===0&&r===0?null:r===0?{levelIndex:e-1,rowIndex:n<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:n}:{levelIndex:e,rowIndex:r-1,cellIndex:n};case"down":return r===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:n}:r===s[e].length-2&&n>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:n}:{levelIndex:e,rowIndex:r+1,cellIndex:n};case"left":return e===0&&r===0&&n===0?null:r===0&&n===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:n===0?{levelIndex:e,rowIndex:r-1,cellIndex:s[e][r-1]-1}:{levelIndex:e,rowIndex:r,cellIndex:n-1};case"right":return r===s[e].length-1&&n===s[e][r]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:n===s[e][r]-1?{levelIndex:e,rowIndex:r+1,cellIndex:0}:{levelIndex:e,rowIndex:r,cellIndex:n+1};default:return{levelIndex:e,rowIndex:r,cellIndex:n}}}function Zo({controlsRef:t,direction:e,levelIndex:r,rowIndex:n,cellIndex:s,size:l}){const c=Al({direction:e,size:l,rowIndex:n,cellIndex:s,levelIndex:r});if(!c)return;const a=t.current?.[c.levelIndex]?.[c.rowIndex]?.[c.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?Zo({controlsRef:t,direction:e,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:l}):a.focus())}function jl(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function El(t){return t.current?.map(e=>e.map(r=>r.length))}function un({controlsRef:t,levelIndex:e,rowIndex:r,cellIndex:n,event:s}){const l=jl(s.key);if(l){s.preventDefault();const c=El(t);Zo({controlsRef:t,direction:l,levelIndex:e,rowIndex:r,cellIndex:n,size:c})}}function qe(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD")}function Ko(t){return t==null||t===""?t:de(t).format("YYYY-MM-DD HH:mm:ss")}const Tl={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Rl=Z.createContext(Tl);function pt(){const t=Z.useContext(Rl),e=Z.useCallback(l=>l||t.locale,[t.locale]),r=Z.useCallback(l=>typeof l=="number"?l:t.firstDayOfWeek,[t.firstDayOfWeek]),n=Z.useCallback(l=>Array.isArray(l)?l:t.weekendDays,[t.weekendDays]),s=Z.useCallback(l=>typeof l=="string"?l:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:r,getWeekendDays:n,getLabelSeparator:s}}function $l({value:t,type:e,withTime:r}){const n=r?Ko:qe;if(e==="range"&&Array.isArray(t)){const s=n(t[0]),l=n(t[1]);return s?l?`${s} – ${l}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?n(t):""}function Jo({value:t,type:e,name:r,form:n,withTime:s=!1}){return b.jsx("input",{type:"hidden",value:$l({value:t,type:e,withTime:s}),name:r,form:n})}Jo.displayName="@mantine/dates/HiddenDatesInput";function Xo(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Xo(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ae(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Xo(t))&&(n&&(n+=" "),n+=e);return n}var es={day:"m_396ce5cb"};const Nl=O.createVarsResolver((t,{size:e})=>({day:{"--day-size":O.getSize(e,"day-size")}})),cn=O.factory((t,e)=>{const r=O.useProps("Day",null,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,date:y,disabled:_,__staticSelector:M,weekend:S,outside:C,selected:k,renderDay:A,inRange:N,firstInRange:F,lastInRange:B,hidden:H,static:W,highlightToday:te,attributes:oe,...G}=r,K=O.useStyles({name:M||"Day",classes:es,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:oe,vars:m,varsResolver:Nl,rootSelector:"day"});return b.jsx(O.UnstyledButton,{...K("day",{style:H?{display:"none"}:void 0}),component:W?"div":"button",ref:e,disabled:_,"data-today":de(y).isSame(new Date,"day")||void 0,"data-hidden":H||void 0,"data-highlight-today":te||void 0,"data-disabled":_||void 0,"data-weekend":!_&&!C&&S||void 0,"data-outside":!_&&C||void 0,"data-selected":!_&&k||void 0,"data-in-range":N&&!_||void 0,"data-first-in-range":F&&!_||void 0,"data-last-in-range":B&&!_||void 0,"data-static":W||void 0,unstyled:a,...G,children:A?.(y)||de(y).date()})});cn.classes=es,cn.displayName="@mantine/dates/Day";function Ll({locale:t,format:e="dd",firstDayOfWeek:r=1}){const n=de().day(r),s=[];for(let l=0;l<7;l+=1)typeof e=="string"?s.push(de(n).add(l,"days").locale(t).format(e)):s.push(e(de(n).add(l,"days").format("YYYY-MM-DD")));return s}var ts={weekday:"m_18a3eca"};const Bl=O.createVarsResolver((t,{size:e})=>({weekdaysRow:{"--wr-fz":O.getFontSize(e),"--wr-spacing":O.getSpacing(e)}})),dn=O.factory((t,e)=>{const r=O.useProps("WeekdaysRow",null,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,locale:y,firstDayOfWeek:_,weekdayFormat:M,cellComponent:S="th",__staticSelector:C,withWeekNumbers:k,attributes:A,...N}=r,F=O.useStyles({name:C||"WeekdaysRow",classes:ts,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:A,vars:m,varsResolver:Bl,rootSelector:"weekdaysRow"}),B=pt(),H=Ll({locale:B.getLocale(y),format:M,firstDayOfWeek:B.getFirstDayOfWeek(_)}).map((W,te)=>b.jsx(S,{...F("weekday"),children:W},te));return b.jsxs(O.Box,{component:"tr",ref:e,...F("weekdaysRow"),...N,children:[k&&b.jsx(S,{...F("weekday"),children:"#"}),H]})});dn.classes=ts,dn.displayName="@mantine/dates/WeekdaysRow";function Il(t,e=1){let r=de(t);if(!r.isValid())return r;const n=e===0?6:e-1;for(;r.day()!==n;)r=r.add(1,"day");return r.format("YYYY-MM-DD")}function Yl(t,e=1){let r=de(t);for(;r.day()!==e;)r=r.subtract(1,"day");return r.format("YYYY-MM-DD")}function zl({month:t,firstDayOfWeek:e=1,consistentWeeks:r}){const n=de(t).subtract(de(t).date()-1,"day"),s=de(n.format("YYYY-M-D")),l=s.format("YYYY-MM-DD"),c=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=Il(c,e),m=[];let y=de(Yl(l,e));for(;de(y).isBefore(a,"day");){const _=[];for(let M=0;M<7;M+=1)_.push(y.format("YYYY-MM-DD")),y=y.add(1,"day");m.push(_)}if(r&&m.length<6){const _=m[m.length-1],M=_[_.length-1];let S=de(M).add(1,"day");for(;m.length<6;){const C=[];for(let k=0;k<7;k+=1)C.push(S.format("YYYY-MM-DD")),S=S.add(1,"day");m.push(C)}}return m}function hn(t,e){return de(t).format("YYYY-MM")===de(e).format("YYYY-MM")}function rs(t,e){return e?de(t).isAfter(de(e).subtract(1,"day"),"day"):!0}function ns(t,e){return e?de(t).isBefore(de(e).add(1,"day"),"day"):!0}function Fl({dates:t,minDate:e,maxDate:r,getDayProps:n,excludeDate:s,hideOutsideDates:l,month:c}){const a=t.flat().filter(_=>ns(_,r)&&rs(_,e)&&!s?.(_)&&!n?.(_)?.disabled&&(!l||hn(_,c))),m=a.find(_=>n?.(_)?.selected);if(m)return m;const y=a.find(_=>de().isSame(_,"date"));return y||a[0]}var hr={exports:{}},Wl=hr.exports,os;function Ul(){return os||(os=1,(function(t,e){(function(r,n){t.exports=n()})(Wl,(function(){var r="day";return function(n,s,l){var c=function(y){return y.add(4-y.isoWeekday(),r)},a=s.prototype;a.isoWeekYear=function(){return c(this).year()},a.isoWeek=function(y){if(!this.$utils().u(y))return this.add(7*(y-this.isoWeek()),r);var _,M,S,C,k=c(this),A=(_=this.isoWeekYear(),M=this.$u,S=(M?l.utc:l)().year(_).startOf("year"),C=4-S.isoWeekday(),S.isoWeekday()>4&&(C+=7),S.add(C,r));return k.diff(A,"week")+1},a.isoWeekday=function(y){return this.$utils().u(y)?this.day()||7:this.day(this.day()%7?y:y-7)};var m=a.startOf;a.startOf=function(y,_){var M=this.$utils(),S=!!M.u(_)||_;return M.p(y)==="isoweek"?S?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):m.bind(this)(y,_)}}}))})(hr)),hr.exports}var ql=Ul();const Vl=En(ql);de.extend(Vl);function Hl(t){const e=t.find(r=>de(r).day()===1);return de(e).isoWeek()}var ss={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Gl={withCellSpacing:!0},Ql=O.createVarsResolver((t,{size:e})=>({weekNumber:{"--wn-fz":O.getFontSize(e),"--wn-size":O.getSize(e,"wn-size")}})),fr=O.factory((t,e)=>{const r=O.useProps("Month",Gl,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,__staticSelector:y,locale:_,firstDayOfWeek:M,weekdayFormat:S,month:C,weekendDays:k,getDayProps:A,excludeDate:N,minDate:F,maxDate:B,renderDay:H,hideOutsideDates:W,hideWeekdays:te,getDayAriaLabel:oe,static:G,__getDayRef:K,__onDayKeyDown:V,__onDayClick:U,__onDayMouseEnter:J,__preventFocus:se,__stopPropagation:ne,withCellSpacing:P,size:x,highlightToday:w,withWeekNumbers:h,attributes:i,...p}=r,f=O.useStyles({name:y||"Month",classes:ss,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:i,vars:m,varsResolver:Ql,rootSelector:"month"}),d=pt(),v=zl({month:C,firstDayOfWeek:d.getFirstDayOfWeek(M),consistentWeeks:d.consistentWeeks}),D=Fl({dates:v,minDate:qe(F),maxDate:qe(B),getDayProps:A,excludeDate:N,hideOutsideDates:W,month:C}),{resolvedClassNames:T,resolvedStyles:q}=O.useResolvedStylesApi({classNames:n,styles:c,props:r}),X=v.map((re,ee)=>{const ae=re.map((ie,ue)=>{const E=!hn(ie,C),L=oe?.(ie)||de(ie).locale(_||d.locale).format("D MMMM YYYY"),R=A?.(ie),Y=de(ie).isSame(D,"date");return b.jsx("td",{...f("monthCell"),"data-with-spacing":P||void 0,children:b.jsx(cn,{__staticSelector:y||"Month",classNames:T,styles:q,unstyled:a,"data-mantine-stop-propagation":ne||void 0,highlightToday:w,renderDay:H,date:ie,size:x,weekend:d.getWeekendDays(k).includes(de(ie).get("day")),outside:E,hidden:W?E:!1,"aria-label":L,static:G,disabled:N?.(ie)||!ns(ie,qe(B))||!rs(ie,qe(F)),ref:I=>{I&&K?.(ee,ue,I)},...R,onKeyDown:I=>{R?.onKeyDown?.(I),V?.(I,{rowIndex:ee,cellIndex:ue,date:ie})},onMouseEnter:I=>{R?.onMouseEnter?.(I),J?.(I,ie)},onClick:I=>{R?.onClick?.(I),U?.(I,ie)},onMouseDown:I=>{R?.onMouseDown?.(I),se&&I.preventDefault()},tabIndex:se||!Y?-1:0})},ie.toString())});return b.jsxs("tr",{...f("monthRow"),children:[h&&b.jsx("td",{...f("weekNumber"),children:Hl(re)}),ae]},ee)});return b.jsxs(O.Box,{component:"table",...f("month"),size:x,ref:e,...p,children:[!te&&b.jsx("thead",{...f("monthThead"),children:b.jsx(dn,{__staticSelector:y||"Month",locale:_,firstDayOfWeek:M,weekdayFormat:S,size:x,classNames:T,styles:q,unstyled:a,withWeekNumbers:h})}),b.jsx("tbody",{...f("monthTbody"),children:X})]})});fr.classes=ss,fr.displayName="@mantine/dates/Month";var is={pickerControl:"m_dc6a3c71"};const Zl=O.createVarsResolver((t,{size:e})=>({pickerControl:{"--dpc-fz":O.getFontSize(e),"--dpc-size":O.getSize(e,"dpc-size")}})),pr=O.factory((t,e)=>{const r=O.useProps("PickerControl",null,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,firstInRange:y,lastInRange:_,inRange:M,__staticSelector:S,selected:C,disabled:k,attributes:A,...N}=r,F=O.useStyles({name:S||"PickerControl",classes:is,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:A,vars:m,varsResolver:Zl,rootSelector:"pickerControl"});return b.jsx(O.UnstyledButton,{...F("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":C&&!k||void 0,"data-disabled":k||void 0,"data-in-range":M&&!k&&!C||void 0,"data-first-in-range":y&&!k||void 0,"data-last-in-range":_&&!k||void 0,disabled:k,...N})});pr.classes=is,pr.displayName="@mantine/dates/PickerControl";function as({year:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"year")||r&&de(t).isAfter(r,"year"))}function Kl({years:t,minDate:e,maxDate:r,getYearControlProps:n}){const s=t.flat().filter(a=>!as({year:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),l=s.find(a=>n?.(a)?.selected);if(l)return l;const c=s.find(a=>de().isSame(a,"year"));return c||s[0]}function ls(t){const e=de(t).year(),r=e-e%10;let n=0;const s=[[],[],[],[]];for(let l=0;l<4;l+=1){const c=l===3?1:3;for(let a=0;a<c;a+=1)s[l].push(de(new Date(r+n,0)).format("YYYY-MM-DD")),n+=1}return s}var us={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Jl={yearsListFormat:"YYYY",withCellSpacing:!0},gr=O.factory((t,e)=>{const r=O.useProps("YearsList",Jl,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,decade:y,yearsListFormat:_,locale:M,minDate:S,maxDate:C,getYearControlProps:k,__staticSelector:A,__getControlRef:N,__onControlKeyDown:F,__onControlClick:B,__onControlMouseEnter:H,__preventFocus:W,__stopPropagation:te,withCellSpacing:oe,size:G,attributes:K,...V}=r,U=O.useStyles({name:A||"YearsList",classes:us,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:K,vars:m,rootSelector:"yearsList"}),J=pt(),se=ls(y),ne=Kl({years:se,minDate:S,maxDate:C,getYearControlProps:k}),P=se.map((x,w)=>{const h=x.map((i,p)=>{const f=k?.(i),d=de(i).isSame(ne,"year");return b.jsx("td",{...U("yearsListCell"),"data-with-spacing":oe||void 0,children:b.jsx(pr,{...U("yearsListControl"),size:G,unstyled:a,"data-mantine-stop-propagation":te||void 0,disabled:as({year:i,minDate:S,maxDate:C}),ref:v=>{v&&N?.(w,p,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:w,cellIndex:p,date:i})},onClick:v=>{f?.onClick?.(v),B?.(v,i)},onMouseEnter:v=>{f?.onMouseEnter?.(v),H?.(v,i)},onMouseDown:v=>{f?.onMouseDown?.(v),W&&v.preventDefault()},tabIndex:W||!d?-1:0,children:de(i).locale(J.getLocale(M)).format(_)})},p)});return b.jsx("tr",{...U("yearsListRow"),children:h},w)});return b.jsx(O.Box,{component:"table",ref:e,size:G,...U("yearsList"),...V,children:b.jsx("tbody",{children:P})})});gr.classes=us,gr.displayName="@mantine/dates/YearsList";function cs({month:t,minDate:e,maxDate:r}){return!e&&!r?!1:!!(e&&de(t).isBefore(e,"month")||r&&de(t).isAfter(r,"month"))}function Xl({months:t,minDate:e,maxDate:r,getMonthControlProps:n}){const s=t.flat().filter(a=>!cs({month:a,minDate:e,maxDate:r})&&!n?.(a)?.disabled),l=s.find(a=>n?.(a)?.selected);if(l)return l;const c=s.find(a=>de().isSame(a,"month"));return c||s[0]}function eu(t){const e=de(t).startOf("year").toDate(),r=[[],[],[],[]];let n=0;for(let s=0;s<4;s+=1)for(let l=0;l<3;l+=1)r[s].push(de(e).add(n,"months").format("YYYY-MM-DD")),n+=1;return r}var ds={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const tu={monthsListFormat:"MMM",withCellSpacing:!0},mr=O.factory((t,e)=>{const r=O.useProps("MonthsList",tu,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,__staticSelector:y,year:_,monthsListFormat:M,locale:S,minDate:C,maxDate:k,getMonthControlProps:A,__getControlRef:N,__onControlKeyDown:F,__onControlClick:B,__onControlMouseEnter:H,__preventFocus:W,__stopPropagation:te,withCellSpacing:oe,size:G,attributes:K,...V}=r,U=O.useStyles({name:y||"MonthsList",classes:ds,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:K,vars:m,rootSelector:"monthsList"}),J=pt(),se=eu(_),ne=Xl({months:se,minDate:qe(C),maxDate:qe(k),getMonthControlProps:A}),P=se.map((x,w)=>{const h=x.map((i,p)=>{const f=A?.(i),d=de(i).isSame(ne,"month");return b.jsx("td",{...U("monthsListCell"),"data-with-spacing":oe||void 0,children:b.jsx(pr,{...U("monthsListControl"),size:G,unstyled:a,__staticSelector:y||"MonthsList","data-mantine-stop-propagation":te||void 0,disabled:cs({month:i,minDate:qe(C),maxDate:qe(k)}),ref:v=>{v&&N?.(w,p,v)},...f,onKeyDown:v=>{f?.onKeyDown?.(v),F?.(v,{rowIndex:w,cellIndex:p,date:i})},onClick:v=>{f?.onClick?.(v),B?.(v,i)},onMouseEnter:v=>{f?.onMouseEnter?.(v),H?.(v,i)},onMouseDown:v=>{f?.onMouseDown?.(v),W&&v.preventDefault()},tabIndex:W||!d?-1:0,children:de(i).locale(J.getLocale(S)).format(M)})},p)});return b.jsx("tr",{...U("monthsListRow"),children:h},w)});return b.jsx(O.Box,{component:"table",ref:e,size:G,...U("monthsList"),...V,children:b.jsx("tbody",{children:P})})});mr.classes=ds,mr.displayName="@mantine/dates/MonthsList";var hs={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const ru={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},nu=O.createVarsResolver((t,{size:e})=>({calendarHeader:{"--dch-control-size":O.getSize(e,"dch-control-size"),"--dch-fz":O.getFontSize(e)}})),gt=O.factory((t,e)=>{const r=O.useProps("CalendarHeader",ru,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,nextIcon:y,previousIcon:_,nextLabel:M,previousLabel:S,onNext:C,onPrevious:k,onLevelClick:A,label:N,nextDisabled:F,previousDisabled:B,hasNextLevel:H,levelControlAriaLabel:W,withNext:te,withPrevious:oe,headerControlsOrder:G,__staticSelector:K,__preventFocus:V,__stopPropagation:U,attributes:J,...se}=r,ne=O.useStyles({name:K||"CalendarHeader",classes:hs,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:J,vars:m,varsResolver:nu,rootSelector:"calendarHeader"}),P=V?p=>p.preventDefault():void 0,x=oe&&Z.createElement(O.UnstyledButton,{...ne("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":S,onClick:k,unstyled:a,onMouseDown:P,disabled:B,"data-disabled":B||void 0,tabIndex:V||B?-1:0,"data-mantine-stop-propagation":U||void 0},_||b.jsx(O.AccordionChevron,{...ne("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),w=Z.createElement(O.UnstyledButton,{component:H?"button":"div",...ne("calendarHeaderLevel"),key:"level",onClick:H?A:void 0,unstyled:a,onMouseDown:H?P:void 0,disabled:!H,"data-static":!H||void 0,"aria-label":W,tabIndex:V||!H?-1:0,"data-mantine-stop-propagation":U||void 0},N),h=te&&Z.createElement(O.UnstyledButton,{...ne("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":M,onClick:C,unstyled:a,onMouseDown:P,disabled:F,"data-disabled":F||void 0,tabIndex:V||F?-1:0,"data-mantine-stop-propagation":U||void 0},y||b.jsx(O.AccordionChevron,{...ne("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),i=G.map(p=>p==="previous"?x:p==="level"?w:p==="next"?h:null);return b.jsx(O.Box,{...ne("calendarHeader"),ref:e,...se,children:i})});gt.classes=hs,gt.displayName="@mantine/dates/CalendarHeader";function ou(t){const e=ls(t);return[e[0][0],e[3][0]]}const su={decadeLabelFormat:"YYYY"},yr=O.factory((t,e)=>{const r=O.useProps("DecadeLevel",su,t),{decade:n,locale:s,minDate:l,maxDate:c,yearsListFormat:a,getYearControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,withCellSpacing:C,__preventFocus:k,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,nextDisabled:te,previousDisabled:oe,levelControlAriaLabel:G,withNext:K,withPrevious:V,headerControlsOrder:U,decadeLabelFormat:J,classNames:se,styles:ne,unstyled:P,__staticSelector:x,__stopPropagation:w,size:h,attributes:i,...p}=r,f=pt(),[d,v]=ou(n),D={__staticSelector:x||"DecadeLevel",classNames:se,styles:ne,unstyled:P,size:h,attributes:i},T=typeof te=="boolean"?te:c?!de(v).endOf("year").isBefore(c):!1,q=typeof oe=="boolean"?oe:l?!de(d).startOf("year").isAfter(l):!1,X=(re,ee)=>de(re).locale(s||f.locale).format(ee);return b.jsxs(O.Box,{"data-decade-level":!0,size:h,ref:e,...p,children:[b.jsx(gt,{label:typeof J=="function"?J(d,v):`${X(d,J)} – ${X(v,J)}`,__preventFocus:k,__stopPropagation:w,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,nextDisabled:T,previousDisabled:q,hasNextLevel:!1,levelControlAriaLabel:G,withNext:K,withPrevious:V,headerControlsOrder:U,...D}),b.jsx(gr,{decade:n,locale:s,minDate:l,maxDate:c,yearsListFormat:a,getYearControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,__preventFocus:k,__stopPropagation:w,withCellSpacing:C,...D})]})});yr.classes={...gr.classes,...gt.classes},yr.displayName="@mantine/dates/DecadeLevel";const iu={yearLabelFormat:"YYYY"},vr=O.factory((t,e)=>{const r=O.useProps("YearLevel",iu,t),{year:n,locale:s,minDate:l,maxDate:c,monthsListFormat:a,getMonthControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,withCellSpacing:C,__preventFocus:k,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,onLevelClick:te,nextDisabled:oe,previousDisabled:G,hasNextLevel:K,levelControlAriaLabel:V,withNext:U,withPrevious:J,headerControlsOrder:se,yearLabelFormat:ne,__staticSelector:P,__stopPropagation:x,size:w,classNames:h,styles:i,unstyled:p,attributes:f,...d}=r,v=pt(),D={__staticSelector:P||"YearLevel",classNames:h,styles:i,unstyled:p,size:w,attributes:f},T=typeof oe=="boolean"?oe:c?!de(n).endOf("year").isBefore(c):!1,q=typeof G=="boolean"?G:l?!de(n).startOf("year").isAfter(l):!1;return b.jsxs(O.Box,{"data-year-level":!0,size:w,ref:e,...d,children:[b.jsx(gt,{label:typeof ne=="function"?ne(n):de(n).locale(s||v.locale).format(ne),__preventFocus:k,__stopPropagation:x,nextIcon:A,previousIcon:N,nextLabel:F,previousLabel:B,onNext:H,onPrevious:W,onLevelClick:te,nextDisabled:T,previousDisabled:q,hasNextLevel:K,levelControlAriaLabel:V,withNext:U,withPrevious:J,headerControlsOrder:se,...D}),b.jsx(mr,{year:n,locale:s,minDate:l,maxDate:c,monthsListFormat:a,getMonthControlProps:m,__getControlRef:y,__onControlKeyDown:_,__onControlClick:M,__onControlMouseEnter:S,__preventFocus:k,__stopPropagation:x,withCellSpacing:C,...D})]})});vr.classes={...gt.classes,...mr.classes},vr.displayName="@mantine/dates/YearLevel";const au={monthLabelFormat:"MMMM YYYY"},br=O.factory((t,e)=>{const r=O.useProps("MonthLevel",au,t),{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:c,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__getDayRef:N,__onDayKeyDown:F,__onDayClick:B,__onDayMouseEnter:H,withCellSpacing:W,highlightToday:te,withWeekNumbers:oe,__preventFocus:G,__stopPropagation:K,nextIcon:V,previousIcon:U,nextLabel:J,previousLabel:se,onNext:ne,onPrevious:P,onLevelClick:x,nextDisabled:w,previousDisabled:h,hasNextLevel:i,levelControlAriaLabel:p,withNext:f,withPrevious:d,headerControlsOrder:v,monthLabelFormat:D,classNames:T,styles:q,unstyled:X,__staticSelector:re,size:ee,static:ae,attributes:ie,...ue}=r,E=pt(),L={__staticSelector:re||"MonthLevel",classNames:T,styles:q,unstyled:X,size:ee,attributes:ie},R=typeof w=="boolean"?w:M?!de(n).endOf("month").isBefore(M):!1,Y=typeof h=="boolean"?h:_?!de(n).startOf("month").isAfter(_):!1;return b.jsxs(O.Box,{"data-month-level":!0,size:ee,ref:e,...ue,children:[b.jsx(gt,{label:typeof D=="function"?D(n):de(n).locale(s||E.locale).format(D),__preventFocus:G,__stopPropagation:K,nextIcon:V,previousIcon:U,nextLabel:J,previousLabel:se,onNext:ne,onPrevious:P,onLevelClick:x,nextDisabled:R,previousDisabled:Y,hasNextLevel:i,levelControlAriaLabel:p,withNext:f,withPrevious:d,headerControlsOrder:v,...L}),b.jsx(fr,{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:c,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__getDayRef:N,__onDayKeyDown:F,__onDayClick:B,__onDayMouseEnter:H,__preventFocus:G,__stopPropagation:K,static:ae,withCellSpacing:W,highlightToday:te,withWeekNumbers:oe,...L})]})});br.classes={...fr.classes,...gt.classes},br.displayName="@mantine/dates/MonthLevel";var fs={levelsGroup:"m_30b26e33"};const mt=O.factory((t,e)=>{const r=O.useProps("LevelsGroup",null,t),{classNames:n,className:s,style:l,styles:c,unstyled:a,vars:m,__staticSelector:y,attributes:_,...M}=r,S=O.useStyles({name:y||"LevelsGroup",classes:fs,props:r,className:s,style:l,classNames:n,styles:c,unstyled:a,attributes:_,vars:m,rootSelector:"levelsGroup"});return b.jsx(O.Box,{ref:e,...S("levelsGroup"),...M})});mt.classes=fs,mt.displayName="@mantine/dates/LevelsGroup";const lu={numberOfColumns:1},wr=O.factory((t,e)=>{const r=O.useProps("DecadeLevelGroup",lu,t),{decade:n,locale:s,minDate:l,maxDate:c,yearsListFormat:a,getYearControlProps:m,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,nextDisabled:H,previousDisabled:W,headerControlsOrder:te,classNames:oe,styles:G,unstyled:K,__staticSelector:V,__stopPropagation:U,numberOfColumns:J,levelControlAriaLabel:se,decadeLabelFormat:ne,size:P,vars:x,attributes:w,...h}=r,i=Z.useRef([]),p=Array(J).fill(0).map((f,d)=>{const v=de(n).add(d*10,"years").format("YYYY-MM-DD");return b.jsx(yr,{size:P,yearsListFormat:a,decade:v,withNext:d===J-1,withPrevious:d===0,decadeLabelFormat:ne,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(D,T)=>un({levelIndex:d,rowIndex:T.rowIndex,cellIndex:T.cellIndex,event:D,controlsRef:i}),__getControlRef:(D,T,q)=>{Array.isArray(i.current[d])||(i.current[d]=[]),Array.isArray(i.current[d][D])||(i.current[d][D]=[]),i.current[d][D][T]=q},levelControlAriaLabel:typeof se=="function"?se(v):se,locale:s,minDate:l,maxDate:c,__preventFocus:S,__stopPropagation:U,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,nextDisabled:H,previousDisabled:W,getYearControlProps:m,__staticSelector:V||"DecadeLevelGroup",classNames:oe,styles:G,unstyled:K,withCellSpacing:M,headerControlsOrder:te,attributes:w},d)});return b.jsx(mt,{classNames:oe,styles:G,__staticSelector:V||"DecadeLevelGroup",ref:e,size:P,unstyled:K,attributes:w,...h,children:p})});wr.classes={...mt.classes,...yr.classes},wr.displayName="@mantine/dates/DecadeLevelGroup";const uu={numberOfColumns:1},_r=O.factory((t,e)=>{const r=O.useProps("YearLevelGroup",uu,t),{year:n,locale:s,minDate:l,maxDate:c,monthsListFormat:a,getMonthControlProps:m,__onControlClick:y,__onControlMouseEnter:_,withCellSpacing:M,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,onLevelClick:H,nextDisabled:W,previousDisabled:te,hasNextLevel:oe,headerControlsOrder:G,classNames:K,styles:V,unstyled:U,__staticSelector:J,__stopPropagation:se,numberOfColumns:ne,levelControlAriaLabel:P,yearLabelFormat:x,size:w,vars:h,attributes:i,...p}=r,f=Z.useRef([]),d=Array(ne).fill(0).map((v,D)=>{const T=de(n).add(D,"years").format("YYYY-MM-DD");return b.jsx(vr,{size:w,monthsListFormat:a,year:T,withNext:D===ne-1,withPrevious:D===0,yearLabelFormat:x,__stopPropagation:se,__onControlClick:y,__onControlMouseEnter:_,__onControlKeyDown:(q,X)=>un({levelIndex:D,rowIndex:X.rowIndex,cellIndex:X.cellIndex,event:q,controlsRef:f}),__getControlRef:(q,X,re)=>{Array.isArray(f.current[D])||(f.current[D]=[]),Array.isArray(f.current[D][q])||(f.current[D][q]=[]),f.current[D][q][X]=re},levelControlAriaLabel:typeof P=="function"?P(T):P,locale:s,minDate:l,maxDate:c,__preventFocus:S,nextIcon:C,previousIcon:k,nextLabel:A,previousLabel:N,onNext:F,onPrevious:B,onLevelClick:H,nextDisabled:W,previousDisabled:te,hasNextLevel:oe,getMonthControlProps:m,classNames:K,styles:V,unstyled:U,__staticSelector:J||"YearLevelGroup",withCellSpacing:M,headerControlsOrder:G,attributes:i},D)});return b.jsx(mt,{classNames:K,styles:V,__staticSelector:J||"YearLevelGroup",ref:e,size:w,unstyled:U,attributes:i,...p,children:d})});_r.classes={...vr.classes,...mt.classes},_r.displayName="@mantine/dates/YearLevelGroup";const cu={numberOfColumns:1},xr=O.factory((t,e)=>{const r=O.useProps("MonthLevelGroup",cu,t),{month:n,locale:s,firstDayOfWeek:l,weekdayFormat:c,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__onDayClick:N,__onDayMouseEnter:F,withCellSpacing:B,highlightToday:H,withWeekNumbers:W,__preventFocus:te,nextIcon:oe,previousIcon:G,nextLabel:K,previousLabel:V,onNext:U,onPrevious:J,onLevelClick:se,nextDisabled:ne,previousDisabled:P,hasNextLevel:x,headerControlsOrder:w,classNames:h,styles:i,unstyled:p,numberOfColumns:f,levelControlAriaLabel:d,monthLabelFormat:v,__staticSelector:D,__stopPropagation:T,size:q,static:X,vars:re,attributes:ee,...ae}=r,ie=Z.useRef([]),ue=Array(f).fill(0).map((E,L)=>{const R=de(n).add(L,"months").format("YYYY-MM-DD");return b.jsx(br,{month:R,withNext:L===f-1,withPrevious:L===0,monthLabelFormat:v,__stopPropagation:T,__onDayClick:N,__onDayMouseEnter:F,__onDayKeyDown:(Y,I)=>un({levelIndex:L,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:Y,controlsRef:ie}),__getDayRef:(Y,I,ce)=>{Array.isArray(ie.current[L])||(ie.current[L]=[]),Array.isArray(ie.current[L][Y])||(ie.current[L][Y]=[]),ie.current[L][Y][I]=ce},levelControlAriaLabel:typeof d=="function"?d(R):d,locale:s,firstDayOfWeek:l,weekdayFormat:c,weekendDays:a,getDayProps:m,excludeDate:y,minDate:_,maxDate:M,renderDay:S,hideOutsideDates:C,hideWeekdays:k,getDayAriaLabel:A,__preventFocus:te,nextIcon:oe,previousIcon:G,nextLabel:K,previousLabel:V,onNext:U,onPrevious:J,onLevelClick:se,nextDisabled:ne,previousDisabled:P,hasNextLevel:x,classNames:h,styles:i,unstyled:p,__staticSelector:D||"MonthLevelGroup",size:q,static:X,withCellSpacing:B,highlightToday:H,withWeekNumbers:W,headerControlsOrder:w,attributes:ee},L)});return b.jsx(mt,{classNames:h,styles:i,__staticSelector:D||"MonthLevelGroup",ref:e,size:q,attributes:ee,...ae,children:ue})});xr.classes={...mt.classes,...br.classes},xr.displayName="@mantine/dates/MonthLevelGroup";const ps=t=>t==="range"?[null,null]:t==="multiple"?[]:null,gs=(t,e)=>{const r=e?Ko:qe;return Array.isArray(t)?t.map(r):r(t)};function fn({type:t,value:e,defaultValue:r,onChange:n,withTime:s=!1}){const l=Z.useRef(t),[c,a,m]=Le.useUncontrolled({value:gs(e,s),defaultValue:gs(r,s),finalValue:ps(t),onChange:n});let y=c;return l.current!==t&&(l.current=t,e===void 0&&(y=r!==void 0?r:ps(t),a(y))),[y,a,m]}function pn(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function du(t){return t===0?"month":t===1?"year":"decade"}function Gt(t,e,r){return du(Le.clamp(pn(t,0),pn(e,0),pn(r,2)))}const hu={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Cr=O.factory((t,e)=>{const r=O.useProps("Calendar",hu,t),{vars:n,maxLevel:s,minLevel:l,defaultLevel:c,level:a,onLevelChange:m,date:y,defaultDate:_,onDateChange:M,numberOfColumns:S,columnsToScroll:C,ariaLabels:k,nextLabel:A,previousLabel:N,onYearSelect:F,onMonthSelect:B,onYearMouseEnter:H,onMonthMouseEnter:W,headerControlsOrder:te,__updateDateOnYearSelect:oe,__updateDateOnMonthSelect:G,__setDateRef:K,__setLevelRef:V,firstDayOfWeek:U,weekdayFormat:J,weekendDays:se,getDayProps:ne,excludeDate:P,renderDay:x,hideOutsideDates:w,hideWeekdays:h,getDayAriaLabel:i,monthLabelFormat:p,nextIcon:f,previousIcon:d,__onDayClick:v,__onDayMouseEnter:D,withCellSpacing:T,highlightToday:q,withWeekNumbers:X,monthsListFormat:re,getMonthControlProps:ee,yearLabelFormat:ae,yearsListFormat:ie,getYearControlProps:ue,decadeLabelFormat:E,classNames:L,styles:R,unstyled:Y,minDate:I,maxDate:ce,locale:o,__staticSelector:u,size:g,__preventFocus:j,__stopPropagation:$,onNextDecade:z,onPreviousDecade:le,onNextYear:he,onPreviousYear:pe,onNextMonth:Q,onPreviousMonth:fe,static:me,enableKeyboardNavigation:ge,attributes:Se,...xe}=r,{resolvedClassNames:Pe,resolvedStyles:Ve}=O.useResolvedStylesApi({classNames:L,styles:R,props:r}),[Ne,Me]=Le.useUncontrolled({value:a?Gt(a,l,s):void 0,defaultValue:c?Gt(c,l,s):void 0,finalValue:Gt(void 0,l,s),onChange:m}),[Ct,Te]=fn({type:"default",value:qe(y),defaultValue:qe(_),onChange:M});Z.useImperativeHandle(K,()=>ve=>{Te(ve)}),Z.useImperativeHandle(V,()=>ve=>{Me(ve)});const rt={__staticSelector:u||"Calendar",styles:Ve,classNames:Pe,unstyled:Y,size:g,attributes:Se},Ye=C||S||1,et=new Date,nt=I&&de(et).isAfter(I)?I:de(et).format("YYYY-MM-DD"),Re=Ct||nt,ot=()=>{const ve=de(Re).add(Ye,"month").format("YYYY-MM-DD");Q?.(ve),Te(ve)},st=()=>{const ve=de(Re).subtract(Ye,"month").format("YYYY-MM-DD");fe?.(ve),Te(ve)},He=()=>{const ve=de(Re).add(Ye,"year").format("YYYY-MM-DD");he?.(ve),Te(ve)},Ge=()=>{const ve=de(Re).subtract(Ye,"year").format("YYYY-MM-DD");pe?.(ve),Te(ve)},Qe=()=>{const ve=de(Re).add(10*Ye,"year").format("YYYY-MM-DD");z?.(ve),Te(ve)},it=()=>{const ve=de(Re).subtract(10*Ye,"year").format("YYYY-MM-DD");le?.(ve),Te(ve)},yt=Z.useRef(null);Z.useEffect(()=>{if(!ge||me)return;const ve=Oe=>{if(!yt.current?.contains(document.activeElement))return;const tt=Oe.ctrlKey||Oe.metaKey,vt=Oe.shiftKey;switch(Oe.key){case"ArrowUp":tt&&vt?(Oe.preventDefault(),it()):tt&&(Oe.preventDefault(),Ge());break;case"ArrowDown":tt&&vt?(Oe.preventDefault(),Qe()):tt&&(Oe.preventDefault(),He());break;case"y":case"Y":Ne==="month"&&(Oe.preventDefault(),Me("year"));break}};return document.addEventListener("keydown",ve),()=>{document.removeEventListener("keydown",ve)}},[ge,me,Ne,He,Ge,Qe,it]);const at=ve=>{yt.current=ve,typeof e=="function"?e(ve):e&&(e.current=ve)};return b.jsxs(O.Box,{ref:at,size:g,"data-calendar":!0,...xe,children:[Ne==="month"&&b.jsx(xr,{month:Re,minDate:I,maxDate:ce,firstDayOfWeek:U,weekdayFormat:J,weekendDays:se,getDayProps:ne,excludeDate:P,renderDay:x,hideOutsideDates:w,hideWeekdays:h,getDayAriaLabel:i,onNext:ot,onPrevious:st,hasNextLevel:s!=="month",onLevelClick:()=>Me("year"),numberOfColumns:S,locale:o,levelControlAriaLabel:k?.monthLevelControl,nextLabel:k?.nextMonth??A,nextIcon:f,previousLabel:k?.previousMonth??N,previousIcon:d,monthLabelFormat:p,__onDayClick:v,__onDayMouseEnter:D,__preventFocus:j,__stopPropagation:$,static:me,withCellSpacing:T,highlightToday:q,withWeekNumbers:X,headerControlsOrder:te,...rt}),Ne==="year"&&b.jsx(_r,{year:Re,numberOfColumns:S,minDate:I,maxDate:ce,monthsListFormat:re,getMonthControlProps:ee,locale:o,onNext:He,onPrevious:Ge,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>Me("decade"),levelControlAriaLabel:k?.yearLevelControl,nextLabel:k?.nextYear??A,nextIcon:f,previousLabel:k?.previousYear??N,previousIcon:d,yearLabelFormat:ae,__onControlMouseEnter:W,__onControlClick:(ve,Oe)=>{G&&Te(Oe),Me(Gt("month",l,s)),B?.(Oe)},__preventFocus:j,__stopPropagation:$,withCellSpacing:T,headerControlsOrder:te,...rt}),Ne==="decade"&&b.jsx(wr,{decade:Re,minDate:I,maxDate:ce,yearsListFormat:ie,getYearControlProps:ue,locale:o,onNext:Qe,onPrevious:it,numberOfColumns:S,nextLabel:k?.nextDecade??A,nextIcon:f,previousLabel:k?.previousDecade??N,previousIcon:d,decadeLabelFormat:E,__onControlMouseEnter:H,__onControlClick:(ve,Oe)=>{oe&&Te(Oe),Me(Gt("year",l,s)),F?.(Oe)},__preventFocus:j,__stopPropagation:$,withCellSpacing:T,headerControlsOrder:te,...rt})]})});Cr.classes={...wr.classes,..._r.classes,...xr.classes},Cr.displayName="@mantine/dates/Calendar";function fu(t){const{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:l,nextIcon:c,previousIcon:a,date:m,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:S,ariaLabels:C,nextLabel:k,previousLabel:A,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:B,onMonthMouseEnter:H,onNextMonth:W,onPreviousMonth:te,onNextYear:oe,onPreviousYear:G,onNextDecade:K,onPreviousDecade:V,withCellSpacing:U,highlightToday:J,__updateDateOnYearSelect:se,__updateDateOnMonthSelect:ne,__setDateRef:P,__setLevelRef:x,withWeekNumbers:w,headerControlsOrder:h,firstDayOfWeek:i,weekdayFormat:p,weekendDays:f,getDayProps:d,excludeDate:v,renderDay:D,hideOutsideDates:T,hideWeekdays:q,getDayAriaLabel:X,monthLabelFormat:re,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:ie,yearsListFormat:ue,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:R,allowDeselect:Y,minDate:I,maxDate:ce,locale:o,...u}=t;return{calendarProps:{maxLevel:e,minLevel:r,defaultLevel:n,level:s,onLevelChange:l,nextIcon:c,previousIcon:a,date:m,defaultDate:y,onDateChange:_,numberOfColumns:M,columnsToScroll:S,ariaLabels:C,nextLabel:k,previousLabel:A,onYearSelect:N,onMonthSelect:F,onYearMouseEnter:B,onMonthMouseEnter:H,onNextMonth:W,onPreviousMonth:te,onNextYear:oe,onPreviousYear:G,onNextDecade:K,onPreviousDecade:V,withCellSpacing:U,highlightToday:J,__updateDateOnYearSelect:se,__updateDateOnMonthSelect:ne,__setDateRef:P,withWeekNumbers:w,headerControlsOrder:h,firstDayOfWeek:i,weekdayFormat:p,weekendDays:f,getDayProps:d,excludeDate:v,renderDay:D,hideOutsideDates:T,hideWeekdays:q,getDayAriaLabel:X,monthLabelFormat:re,monthsListFormat:ee,getMonthControlProps:ae,yearLabelFormat:ie,yearsListFormat:ue,getYearControlProps:E,decadeLabelFormat:L,allowSingleDateInRange:R,allowDeselect:Y,minDate:I,maxDate:ce,locale:o},others:u}}function pu(t){if(t===null)return null;const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:de(e).format("YYYY-MM-DD")}function gu({date:t,maxDate:e,minDate:r}){return!(t==null||Number.isNaN(new Date(t).getTime())||e&&de(t).isAfter(e,"date")||r&&de(t).isBefore(r,"date"))}const mu={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,size:"sm"},Sr=O.factory((t,e)=>{const r=O.useInputProps("DateInput",mu,t),{inputProps:n,wrapperProps:s,value:l,defaultValue:c,onChange:a,clearable:m,clearButtonProps:y,popoverProps:_,getDayProps:M,locale:S,valueFormat:C,dateParser:k,minDate:A,maxDate:N,fixOnBlur:F,onFocus:B,onBlur:H,onClick:W,onKeyDown:te,readOnly:oe,name:G,form:K,rightSection:V,unstyled:U,classNames:J,styles:se,allowDeselect:ne,date:P,defaultDate:x,onDateChange:w,getMonthControlProps:h,getYearControlProps:i,disabled:p,...f}=r,d=Z.useRef(null),v=Z.useRef(null),[D,T]=Z.useState(!1),{calendarProps:q,others:X}=fu(f),re=pt(),ae=k||(Q=>{const fe=de(Q,C,re.getLocale(S)).toDate();return Number.isNaN(fe.getTime())?pu(Q):de(fe).format("YYYY-MM-DD")}),ie=ne!==void 0?ne:m,ue=Q=>Q?de(Q).locale(re.getLocale(S)).format(C):"",[E,L,R]=fn({type:"default",value:l,defaultValue:c,onChange:a}),[Y,I]=fn({type:"default",value:P,defaultValue:c||x,onChange:w});Z.useEffect(()=>{R&&l!==null&&I(l)},[R,l]);const[ce,o]=Z.useState(ue(E));Z.useEffect(()=>{o(ue(E))},[re.getLocale(S)]);const u=Q=>{const fe=Q.currentTarget.value;if(o(fe),T(!0),fe.trim()===""&&(ne||m))L(null);else{const me=ae(fe);me&&gu({date:me,minDate:A,maxDate:N})&&(L(me),I(me))}},g=Q=>{H?.(Q),T(!1),F&&o(ue(E))},j=Q=>{B?.(Q),T(!0)},$=Q=>{W?.(Q),T(!0)},z=Q=>{Q.key==="Escape"&&T(!1),te?.(Q)},le=Q=>({...M?.(Q),selected:de(E).isSame(Q,"day"),onClick:fe=>{M?.(Q).onClick?.(fe);const me=ie&&de(E).isSame(Q,"day")?null:Q;L(me),!R&&me&&o(ue(me)),T(!1)}}),he=b.jsx(O.Input.ClearButton,{onClick:()=>{L(null),!R&&o(""),T(!1)},unstyled:U,...y}),pe=m&&!!E&&!oe&&!p;return Le.useDidUpdate(()=>{E!==void 0&&!D&&o(ue(E))},[E]),Le.useClickOutside(()=>T(!1),void 0,[d.current,v.current]),b.jsxs(b.Fragment,{children:[b.jsx(O.Input.Wrapper,{...s,__staticSelector:"DateInput",ref:d,children:b.jsxs(O.Popover,{opened:D,trapFocus:!1,position:"bottom-start",disabled:oe||p,withRoles:!1,unstyled:U,..._,children:[b.jsx(O.Popover.Target,{children:b.jsx(O.Input,{"data-dates-input":!0,"data-read-only":oe||void 0,autoComplete:"off",ref:e,value:ce,onChange:u,onBlur:g,onFocus:j,onClick:$,onKeyDown:z,readOnly:oe,rightSection:V,__clearSection:he,__clearable:pe,...n,...X,disabled:p,__staticSelector:"DateInput"})}),b.jsx(O.Popover.Dropdown,{onMouseDown:Q=>Q.preventDefault(),"data-dates-dropdown":!0,ref:v,children:b.jsx(Cr,{__staticSelector:"DateInput",...q,classNames:J,styles:se,unstyled:U,__preventFocus:!0,minDate:A,maxDate:N,locale:S,getDayProps:le,size:n.size,date:Y,onDateChange:I,getMonthControlProps:Q=>({selected:typeof E=="string"?hn(Q,E):!1,...h?.(Q)}),getYearControlProps:Q=>({selected:typeof E=="string"?de(Q).isSame(E,"year"):!1,...i?.(Q)}),attributes:s.attributes})})]})}),b.jsx(Jo,{name:G,form:K,value:E,type:"default"})]})});Sr.classes={...O.Input.classes,...Cr.classes},Sr.displayName="@mantine/dates/DateInput";function ms(t){const e=Fe.c(49),{fields:r,onClose:n,queryKey:s,apiPath:l,steps:c,onCreated:a}=t,[m,y]=Z.useState(0),[_,M]=Z.useState(!1),[S,C]=Z.useState(),{mutateAsync:k,isError:A,error:N,isPending:F}=Ho(l,s),{mutateAsync:B,isPending:H}=ln(l,s),W=F||H;let te;e[0]!==r?(te=new Set(r.filter(wu).map(bu)),e[0]=r,e[1]=te):te=e[1];let oe;e[2]!==te?(oe=[...te],e[2]=te,e[3]=oe):oe=e[3];const G=oe;let K;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=function(D,T){return typeof D.required=="function"?D.required(T??{}):!!D.required},e[4]=K):K=e[4];const V=K;let U;e[5]!==r?(U=r.reduce(vu,{}),e[5]=r,e[6]=U):U=e[6];let J;if(e[7]!==r){let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(D,T)=>(D[T.id]=(q,X)=>T.conditional&&!T.conditional(X)||!V(T,X)||q?null:"Pflichtfeld",D),e[9]=v):v=e[9],J=r.filter(yu).reduce(v,{}),e[7]=r,e[8]=J}else J=e[8];let se;e[10]!==U||e[11]!==J?(se={mode:"uncontrolled",initialValues:U,validate:J},e[10]=U,e[11]=J,e[12]=se):se=e[12];const ne=jn.useForm(se);let P;e[13]!==ne||e[14]!==S?(P=function(D){const T=ne.getValues();if(D.conditional&&!D.conditional(T))return null;const q=V(D,T);return b.jsxs(Z.Fragment,{children:[(D.type===void 0||D.type=="text")&&b.jsx(O.TextInput,{label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),type:D.id.includes("email")?"email":void 0,required:q},ne.key(D.id)),D.type==="number"&&b.jsx(O.NumberInput,{decimalSeparator:",",label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),required:q},ne.key(D.id)),D.type==="date"&&b.jsx(Sr,{label:D.column.title,placeholder:D.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...ne.getInputProps(D.id),required:q},ne.key(D.id)),D.type==="boolean"&&b.jsx(O.Checkbox,{mt:"md",label:D.column.title,...ne.getInputProps(D.id,{type:"checkbox"}),required:q},ne.key(D.id)),D.type==="textarea"&&b.jsx(O.Textarea,{label:D.column.title,placeholder:D.placeholder??"",...ne.getInputProps(D.id),minRows:3,autosize:!0,required:q},ne.key(D.id)),D.type==="custom"&&D.render&&D.render({...ne.getValues(),...S&&{id:S}},ne.setValues,M,{error:ne.getInputProps(D.id).error,required:q})]},D.id)},e[13]=ne,e[14]=S,e[15]=P):P=e[15];const x=P;let w;e[16]!==N?.message||e[17]!==N?.name||e[18]!==A?(w=A&&b.jsx(O.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[16]=N?.message,e[17]=N?.name,e[18]=A,e[19]=w):w=e[19];let h;e[20]!==m||e[21]!==k||e[22]!==ne||e[23]!==A||e[24]!==n||e[25]!==a||e[26]!==S||e[27]!==G.length||e[28]!==B?(h=ne.onSubmit(async v=>{if(S)await B({...v,id:S});else{const D=await k(v);C(D.id),a?.(D.id)}G.length&&m<G.length-1?A||y(m+1):A||(ne.setInitialValues(v),ne.reset(),n())}),e[20]=m,e[21]=k,e[22]=ne,e[23]=A,e[24]=n,e[25]=a,e[26]=S,e[27]=G.length,e[28]=B,e[29]=h):h=e[29];let i;e[30]!==m||e[31]!==r||e[32]!==x||e[33]!==c||e[34]!==G?(i=G.length?b.jsx(O.Stepper,{active:m,size:"sm",children:G.map(v=>b.jsx(O.Stepper.Step,{...c&&c[v-1]?{label:c[v-1].label}:{},children:r.filter(D=>D.step===v).map(D=>x(D))},v))}):r.map(v=>x(v)),e[30]=m,e[31]=r,e[32]=x,e[33]=c,e[34]=G,e[35]=i):i=e[35];let p;e[36]!==m||e[37]!==_||e[38]!==W||e[39]!==n||e[40]!==G.length?(p=!_&&b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:()=>G.length?m===0?n():y(m-1):n(),variant:"outline",children:G.length?m===0?"Abbrechen":"Zurück":"Abbrechen"}),b.jsx(O.Button,{type:"submit",loading:W,children:G.length?m===G.length-1?"Speichern":"Weiter":"Speichern"})]}),e[36]=m,e[37]=_,e[38]=W,e[39]=n,e[40]=G.length,e[41]=p):p=e[41];let f;e[42]!==i||e[43]!==p||e[44]!==h?(f=b.jsxs("form",{onSubmit:h,children:[i,p]}),e[42]=i,e[43]=p,e[44]=h,e[45]=f):f=e[45];let d;return e[46]!==f||e[47]!==w?(d=b.jsxs(b.Fragment,{children:[w,f]}),e[46]=f,e[47]=w,e[48]=d):d=e[48],d}function yu(t){return t.required}function vu(t,e){return t[e.id]=e.type==="boolean"?!1:e.defaultValue??"",t}function bu(t){return t.step}function wu(t){return typeof t.step=="number"}var[_u,gn]=O.createSafeContext("useDataTableColumnsContext must be used within DataTableColumnProvider"),ys=t=>{let{children:e,columnsOrder:r,setColumnsOrder:n,columnsToggle:s,setColumnsToggle:l,resetColumnsOrder:c,resetColumnsToggle:a,setColumnWidth:m,setMultipleColumnWidths:y,resetColumnsWidth:_}=t,[M,S]=Z.useState(""),[C,k]=Z.useState("");return b.jsx(_u,{value:{sourceColumn:M,setSourceColumn:S,targetColumn:C,setTargetColumn:k,columnsToggle:s,setColumnsToggle:l,swapColumns:()=>{if(!r||!n||!M||!C)return;let A=r.indexOf(M),N=r.indexOf(C);if(A!==-1&&N!==-1){let F=r.splice(A,1)[0];r.splice(N,0,F),n([...r])}},resetColumnsOrder:c,resetColumnsToggle:a,setColumnWidth:m,setMultipleColumnWidths:y,resetColumnsWidth:_},children:e})};function xu(){return b.jsx("tr",{className:"mantine-datatable-empty-row",children:b.jsx("td",{})})}function Cu(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74"}),b.jsx("path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6"}),b.jsx("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),b.jsx("path",{d:"M3 3l18 18"})]})}function Su({icon:t,text:e,active:r,children:n}){return b.jsx(O.Center,{className:"mantine-datatable-empty-state","data-active":r||void 0,children:n||b.jsxs(b.Fragment,{children:[t||b.jsx("div",{className:"mantine-datatable-empty-state-icon",children:b.jsx(Cu,{})}),b.jsx(O.Text,{component:"div",size:"sm",c:"dimmed",children:e})]})})}function Du({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,S){let C=[];return M.forEach(k=>{S.find(A=>A.accessor===k)&&C.push(k)}),S.forEach(k=>{C.includes(k.accessor)||C.push(k.accessor)}),C}let s=e&&e.map(M=>M.accessor)||[],[l,c]=Le.useLocalStorage({key:t?`${t}-columns-order`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&c(M)}let m=()=>{a(s)};if(!t)return{columnsOrder:l,setColumnsOrder:a,resetColumnsOrder:m};let y=n(l,e),_=JSON.stringify(l);return JSON.stringify(y)!==_&&a(y),{columnsOrder:y,setColumnsOrder:a,resetColumnsOrder:m}}function ku({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,onFixedLayoutChange:s}){let l=Z.useRef(!1),c=Z.useRef({}),[a,m]=Z.useState(!0),y=Z.useMemo(()=>e.some(V=>V.resizable&&!V.hidden&&V.accessor!=="__selection__"),[e]),_=Z.useMemo(()=>e.filter(V=>V.resizable&&!V.hidden&&V.accessor!=="__selection__"),[e]),M=Z.useMemo(()=>_.some(V=>V.width===void 0||V.width===""||V.width==="initial"),[_]),S=Z.useCallback(()=>e.filter(V=>V.accessor!=="__selection__").map(V=>({[V.accessor]:V.width??"auto"})),[e]),[C,k]=Le.useLocalStorage({key:t?`${t}-columns-width`:"",defaultValue:t?S():void 0,getInitialValueInEffect:!1}),[A,N]=Z.useState(()=>S());Z.useEffect(()=>{m(!1)},[]);let F=Z.useCallback(()=>{if(!n?.current||a)return{};let V=n.current,U=Array.from(V.querySelectorAll("th[data-accessor]")),J={};return U.forEach(se=>{let ne=se.getAttribute("data-accessor");if(!ne||ne==="__selection__")return;let P=_.find(x=>x.accessor===ne);if(P&&(P.width===void 0||P.width===""||P.width==="initial")){let x=se.getBoundingClientRect();J[ne]=Math.round(x.width)}}),J},[n,_,a]),B=Z.useCallback(V=>{let U=V.filter(se=>se.accessor!=="__selection__"),J=A.map(se=>{let ne=Object.keys(se)[0],P=U.find(x=>x.accessor===ne);return P?{[ne]:P.width}:se});N(J),t&&k(J)},[A,t,k]),H=Z.useCallback(V=>{B(V)},[B]),W=Z.useCallback(()=>{if(!(!n?.current||!s||a))if(M)s(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let V=F();c.current={...c.current,...V};let U=e.filter(J=>J.accessor!=="__selection__").map(J=>{let se=J.accessor,ne=C?.find(x=>Object.keys(x)[0]===se);if(ne&&ne[se]!=="auto")return{[se]:ne[se]};let P=V[se];return P?{[se]:`${P}px`}:{[se]:J.width??"auto"}});N(U),setTimeout(()=>{s(!0),l.current=!0},10)})});else{let V=e.filter(U=>U.accessor!=="__selection__").map(U=>({[U.accessor]:U.width??"auto"}));N(V),s(!0),l.current=!0}},[n,s,a,M,F,e,C]),te=W;Z.useEffect(()=>{if(!y||!s||a){s?.(!1);return}l.current=!1;let V=setTimeout(()=>{W()},50);return()=>clearTimeout(V)},[y,s,a,W]),Z.useEffect(()=>{a||!t||!r||C&&C.length>0&&N(C)},[a,t,r,C]);let oe=Z.useCallback(()=>{t&&k(S()),c.current={},l.current=!1,s&&(s(!1),setTimeout(()=>{W()},10))},[t,k,S,s,W]),G=Z.useCallback((V,U)=>{B([{accessor:V,width:U}])},[B]),K=Z.useMemo(()=>y?A.filter(V=>{let U=Object.keys(V)[0];return _.some(J=>J.accessor===U)}).every(V=>{let U=Object.values(V)[0];return U==="auto"||U==="initial"}):!1,[y,A,_]);return{columnsWidth:A,setColumnsWidth:B,setColumnWidth:G,setMultipleColumnWidths:H,resetColumnsWidth:oe,hasResizableColumns:y,allResizableWidthsInitial:K,measureAndSetColumnWidths:te}}function Pu({key:t,columns:e=[],getInitialValueInEffect:r=!0}){function n(M,S){let C=[];return M.forEach(k=>{S.find(A=>A.accessor===k.accessor)&&C.push(k)}),S.forEach(k=>{C.find(A=>A.accessor===k.accessor)||C.push({accessor:k.accessor,defaultToggle:k.defaultToggle||!0,toggleable:k.toggleable,toggled:k.defaultToggle===void 0?!0:k.defaultToggle})}),C}let s=e&&e.map(M=>({accessor:M.accessor,defaultToggle:M.defaultToggle||!0,toggleable:M.toggleable,toggled:M.defaultToggle===void 0?!0:M.defaultToggle})),[l,c]=Le.useLocalStorage({key:t?`${t}-columns-toggle`:"",defaultValue:t?s:void 0,getInitialValueInEffect:r});function a(M){t&&c(M)}let m=()=>{a(s)};if(!t)return{columnsToggle:l,setColumnsToggle:a,resetColumnsToggle:m};let y=n(l,e),_=JSON.stringify(l);return JSON.stringify(y)!==_&&a(y),{columnsToggle:y,setColumnsToggle:a,resetColumnsToggle:m}}var Mu=({key:t,columns:e=[],getInitialValueInEffect:r=!0,headerRef:n,scrollViewportRef:s,onFixedLayoutChange:l})=>{let{columnsOrder:c,setColumnsOrder:a,resetColumnsOrder:m}=Du({key:t,columns:e,getInitialValueInEffect:r}),{columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M}=Pu({key:t,columns:e,getInitialValueInEffect:r}),{columnsWidth:S,setColumnsWidth:C,setColumnWidth:k,setMultipleColumnWidths:A,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:B,measureAndSetColumnWidths:H}=ku({key:t,columns:e,getInitialValueInEffect:r,headerRef:n,onFixedLayoutChange:l});return{effectiveColumns:Z.useMemo(()=>c?c.map(W=>e.find(te=>te.accessor===W)).map(W=>({...W,hidden:W?.hidden||!y.find(te=>te.accessor===W?.accessor)?.toggled})).map(W=>W?.accessor==="__selection__"?W:{...W,width:S.find(te=>te[W?.accessor])?.[W?.accessor]}):e,[e,c,y,S]),setColumnsOrder:a,columnsOrder:c,resetColumnsOrder:m,columnsToggle:y,setColumnsToggle:_,resetColumnsToggle:M,columnsWidth:S,setColumnsWidth:C,setColumnWidth:k,setMultipleColumnWidths:A,resetColumnsWidth:N,hasResizableColumns:F,allResizableWidthsInitial:B,measureAndSetColumnWidths:H}},vs=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function bs(t){let e=Z.useRef(t);return e.current=t,e}var ws="--mantine-datatable-header-height",_s="--mantine-datatable-footer-height",xs="--mantine-datatable-selection-column-width",Cs="--mantine-datatable-last-row-border-bottom";function Xe(t,e,r){t?.style.setProperty(e,r)}function mn(t){let e=t.borderBoxSize?.[0]||t.contentBoxSize?.[0];return e?{width:e.inlineSize,height:e.blockSize}:{width:t.contentRect.width,height:t.contentRect.height}}function yn(t,e,r){if(t){let n=new ResizeObserver(s=>{let l=s[0];l&&e(mn(l))});return n.observe(t),()=>{n.disconnect(),r()}}}function Ou({scrollCallbacks:t,withRowBorders:e}){let r={root:Z.useRef(null),table:Z.useRef(null),scrollViewport:Z.useRef(null),header:Z.useRef(null),footer:Z.useRef(null),selectionColumnHeader:Z.useRef(null)},{root:n,table:s,scrollViewport:l,header:c,footer:a,selectionColumnHeader:m}=r,y=bs({withRowBorders:e}),_=bs(t),M=Z.useRef(()=>{}),S=Z.useRef(()=>{}),C=Z.useCallback(k=>{_.current.onScroll?.(k),M.current()},[]);return Z.useEffect(()=>yn(c.current,k=>{Xe(n.current,ws,`${k.height}px`)},()=>Xe(n.current,ws,"0")),[c.current]),Z.useEffect(()=>yn(a.current,k=>{Xe(n.current,_s,`${k.height}px`)},()=>Xe(n.current,_s,"0")),[a.current]),Z.useEffect(()=>yn(m.current,k=>{Xe(n.current,xs,`${k.width}px`)},()=>Xe(n.current,xs,"0")),[m.current]),vs(()=>{if(typeof window===void 0)return;let k={top:!0,bottom:!0,left:!0,right:!0},A={width:0,height:0},N={width:0,height:0};function F(oe,G){let K=k[oe];return k[oe]=G,Xe(n.current,`--mantine-datatable-${oe}-shadow-opacity`,G?"0":"1"),K}function B(){let oe=A.height-N.height,G=oe<0;Xe(n.current,"--mantine-datatable-footer-position",G?"relative":"sticky"),Xe(n.current,"--mantine-datatable-footer-bottom",G?`${oe}px`:"0")}function H(){y.current.withRowBorders&&A.height<N.height?Xe(n.current,Cs,`${O.rem("1px")} solid var(--mantine-datatable-border-color)`):Xe(n.current,Cs,"unset")}S.current=H;function W(){let oe=_.current,G=l.current,K=G?.scrollTop??0,V=G?.scrollLeft??0,U=K===0,J=A.height-K-N.height<1,se=F("top",U),ne=F("bottom",J);U&&U!==se&&oe.onScrollToTop?.(),J&&J!==ne&&oe.onScrollToBottom?.();let P=G?getComputedStyle(G).direction==="rtl":!1,x=(G?.scrollWidth??0)-N.width,w,h;if(P){let f=Math.abs(V);h=f<1,w=x-f<1}else w=V<1,h=A.width-V-N.width<1;let i=F("left",w),p=F("right",h);w&&w!==i&&oe.onScrollToLeft?.(),h&&h!==p&&oe.onScrollToRight?.()}M.current=W;let te=new ResizeObserver(oe=>{for(let G of oe)switch(G.target.tagName){case"TABLE":{A=mn(G);break}case"DIV":{N=mn(G);break}}W(),B(),H()});return te.observe(s.current),te.observe(l.current),()=>{te.disconnect()}},[]),vs(()=>{S.current()},[e]),{refs:r,onScroll:C}}function Au(t){let[e,r]=Z.useState(null),n=t?.join(":")||"";return Z.useEffect(()=>{r(null)},[n]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function ju(t,e){let r=()=>{e(t.map(s=>s.matches))},n=t.map(s=>{try{return s.addEventListener("change",r),()=>s.removeEventListener("change",r)}catch{return s.addListener(r),()=>s.removeListener(r)}});return()=>{n.forEach(s=>s())}}function Eu(t,e){return e||(typeof window<"u"&&"matchMedia"in window?t.map(r=>window.matchMedia(r).matches):t.map(()=>!1))}function Tu(t,e,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,s]=Z.useState(r?e:Eu(t,e)),l=Z.useRef(null);return Z.useEffect(()=>{if("matchMedia"in window)return l.current=t.map(c=>window.matchMedia(c)),s(l.current.map(c=>c.matches)),ju(l.current,c=>{s(c)})},[t]),n}function Ru(t){let e=O.useMantineTheme(),r=Z.useMemo(()=>t.map(s=>(typeof s=="function"?s(e):s)??""),[t,e]),n=Z.useMemo(()=>t.map(()=>!0),[t]);return Tu(r,n)}function Dr(t){let e=O.useMantineTheme(),r=typeof t=="function"?t(e):t;return Le.useMediaQuery(r||"",!0)}function vn(t){let e=t.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function $u(t,e,r){return t.filter(n=>!e.map(r).includes(r(n)))}function bn(t,e){return t.filter((r,n,s)=>n===s.findIndex(l=>e(r)===e(l)))}function Ss(t,e){return e?e.match(/([^[.\]])+/g).reduce((r,n)=>r&&r[n],t):void 0}function Ie(t,e){return typeof e=="string"?Ss(t,e):e(t)}function Ds(t){return!t||t.length===0?0:Math.max(...t.map(e=>e.groups&&e.groups.length>0?1+Ds(e.groups):1))}function wn(t){let e=[];for(let r of t)r.columns&&r.columns.length>0?e.push(...r.columns.filter(n=>n!=null)):r.groups&&r.groups.length>0&&e.push(...wn(r.groups));return e.filter(r=>r!=null)}function _n(t,e){return t.columns&&t.columns.length>0?t.columns.filter((r,n)=>r.hidden?!1:e?e[n]!==!1:!0).length:t.groups&&t.groups.length>0?t.groups.reduce((r,n)=>r+_n(n,e),0):0}function ks(t,e,r=0){if(r===e)return[...t];let n=[];for(let s of t)s.groups&&s.groups.length>0&&n.push(...ks(s.groups,e,r+1));return n}function Nu(t,e,r){return r?!t||e:!1}function Lu({rowExpansion:t,records:e,idAccessor:r}){let n=[];if(t&&e){let{trigger:a,allowMultiple:m,initiallyExpanded:y}=t;e&&a==="always"?n=e.map(_=>Ie(_,r)):y&&(n=e.filter((_,M)=>y({record:_,index:M})).map(_=>Ie(_,r)),m||(n=[n[0]]))}let s,l,c=Z.useState(n);if(t){let{expandable:a,trigger:m,allowMultiple:y,collapseProps:_,content:M}=t;t.expanded?{recordIds:s,onRecordIdsChange:l}=t.expanded:[s,l]=c;let S=C=>l?.(s.filter(k=>k!==Ie(C,r)));return{expandOnClick:m!=="always"&&m!=="never",isRowExpanded:C=>m==="always"?!0:s.includes(Ie(C,r)),isExpandable:({record:C,index:k})=>a?a({record:C,index:k}):!0,expandRow:C=>{let k=Ie(C,r);l?.(y?[...s,k]:[k])},collapseRow:S,collapseProps:_,content:({record:C,index:k})=>()=>M({record:C,index:k,collapse:()=>S(C)})}}}function Bu(t,e){let[r,n]=Z.useState(t),[s,l]=Z.useState(t),c=Le.useTimeout(()=>n(!0),0),a=Le.useTimeout(()=>l(!1),e||200);return Z.useEffect(()=>{t?(a.clear(),l(!0),c.start()):(c.clear(),n(!1),a.start())},[c,a,t]),{expanded:r,visible:s}}var xn="mantine-datatable-nowrap",Cn="mantine-datatable-ellipsis",At="mantine-datatable-pointer-cursor",Ps="mantine-datatable-context-menu-cursor",Iu="mantine-datatable-text-selection-disabled",kr="mantine-datatable-text-align-left",Pr="mantine-datatable-text-align-center",Mr="mantine-datatable-text-align-right";function Yu({className:t,style:e,visibleMediaQuery:r,title:n,noWrap:s,ellipsis:l,textAlign:c,width:a}){return Dr(r)?b.jsx(O.TableTh,{className:Ae({[xn]:s||l,[Cn]:l,[kr]:c==="left",[Pr]:c==="center",[Mr]:c==="right"},t),style:[{width:a,minWidth:a,maxWidth:a},e],children:n}):null}function zu({shadowVisible:t}){return b.jsx(O.TableTh,{className:"mantine-datatable-footer-selector-placeholder-cell","data-shadow-visible":t||void 0})}function Fu({className:t,style:e,columns:r,defaultColumnProps:n,selectionVisible:s,selectorCellShadowVisible:l,ref:c}){return b.jsx(O.TableTfoot,{ref:c,className:Ae("mantine-datatable-footer",t),style:e,children:b.jsxs(O.TableTr,{children:[s&&b.jsx(zu,{shadowVisible:l}),r.map(({hidden:a,...m})=>{if(a)return null;let{accessor:y,visibleMediaQuery:_,textAlign:M,width:S,footer:C,footerClassName:k,footerStyle:A,noWrap:N,ellipsis:F}={...n,...m};return b.jsx(Yu,{className:k,style:A,visibleMediaQuery:_,textAlign:M,width:S,title:C,noWrap:N,ellipsis:F},y)})]})})}function Wu({group:{id:t,columns:e,groups:r,title:n,textAlign:s,className:l,style:c},maxDepth:a,currentDepth:m,previousGroups:y,isLastGroup:_,withColumnBorders:M=!1,totalTableColumns:S}){let C=Z.useMemo(()=>e&&e.length>0?e:r&&r.length>0?wn([{id:t,columns:e,groups:r}]):[],[e,r,t]),k=Z.useMemo(()=>C.map(({visibleMediaQuery:te})=>te),[C]),A=Ru(k),N=Z.useMemo(()=>_n({columns:e,groups:r},A),[t,e,r,A]),F=Z.useMemo(()=>y.reduce((te,oe)=>te+_n(oe,A),0),[y,A]),B=r&&r.length>0?1:a-m,H=F+N<S,W=Nu(_,H,M);return N>0?b.jsx(O.TableTh,{colSpan:N,rowSpan:B>1?B:void 0,className:Ae("mantine-datatable-column-group-header-cell",{[kr]:s==="left",[Pr]:s==="center",[Mr]:s==="right","mantine-datatable-column-group-header-cell--needs-border":W},l),style:c,children:n??vn(t)}):null}function Uu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"})]})}function qu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M20 3h-16a1 1 0 0 0 -1 1v2.227l.008 .223a3 3 0 0 0 .772 1.795l4.22 4.641v8.114a1 1 0 0 0 1.316 .949l6 -2l.108 -.043a1 1 0 0 0 .576 -.906v-6.586l4.121 -4.12a3 3 0 0 0 .879 -2.123v-2.171a1 1 0 0 0 -1 -1z",strokeWidth:"0",fill:"currentColor"})]})}function Vu({children:t,isActive:e,filterPopoverProps:r,filterPopoverDisableClickOutside:n}){let[s,{close:l,toggle:c}]=Le.useDisclosure(!1),a=e?qu:Uu,m=Le.useClickOutside(l);return n&&(m=void 0),b.jsxs(O.Popover,{withArrow:!0,shadow:"md",opened:s,onClose:l,trapFocus:!0,...r,children:[b.jsx(O.PopoverTarget,{children:b.jsx(O.ActionIcon,{className:"mantine-datatable-header-cell-filter-action-icon","data-active":e||void 0,size:"sm",variant:"default",onClick:y=>{y.preventDefault(),c()},onKeyDown:y=>y.stopPropagation(),children:b.jsx(a,{})})}),b.jsx(O.PopoverDropdown,{ref:m,onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),children:typeof t=="function"?t({close:l}):t})]})}var Hu=t=>{let{accessor:e,columnRef:r}=t,[n,s]=Z.useState(!1),l=Z.useRef(0),c=Z.useRef({current:0,next:0}),{dir:a}=O.useDirection(),m=a==="rtl",{setMultipleColumnWidths:y}=gn(),_=Z.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!r.current)return;let C=r.current,k=C.nextElementSibling;for(;k;){let te=k.getAttribute("data-accessor");if(te&&te!=="__selection__")break;k=k.nextElementSibling}if(!k)return;let A=k.getAttribute("data-accessor");if(!A)return;let N=A==="__selection__";s(!0),l.current=S.clientX;let F=C.offsetWidth,B=k.offsetWidth;c.current={current:F,next:B};let H=te=>{if(!r.current)return;let oe=r.current,G=oe.nextElementSibling;if(!G)return;let K=te.clientX-l.current;m&&(K=-K);let V=50,U=c.current.current-V,J=c.current.next-V,se=Math.max(-U,Math.min(K,J)),ne=c.current.current+se,P=c.current.next-se;oe.style.width=`${ne}px`,G.style.width=`${P}px`,oe.style.minWidth=`${ne}px`,oe.style.maxWidth=`${ne}px`,G.style.minWidth=`${P}px`,G.style.maxWidth=`${P}px`},W=()=>{if(!r.current)return;let te=r.current,oe=te.nextElementSibling;s(!1),document.body.style.cursor="initial",document.body.style.userSelect="initial";let G=parseInt(te.style.width)||te.offsetWidth,K=oe?parseInt(oe.style.width)||oe.offsetWidth:0,V=[{accessor:e,width:`${G}px`}];if(oe&&!N){let U=oe.getAttribute("data-accessor");U&&V.push({accessor:U,width:`${K}px`})}setTimeout(()=>{y(V)},0),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",W)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",H),document.addEventListener("mouseup",W)},[e,r,m,y]),M=Z.useCallback(()=>{if(!r.current)return;let S=r.current,C=S.nextElementSibling;S.style.width="",S.style.minWidth="",S.style.maxWidth="";let k=[{accessor:e,width:"auto"}];if(C){C.style.width="",C.style.minWidth="",C.style.maxWidth="";let A=C.getAttribute("data-accessor");A&&A!=="__selection__"&&k.push({accessor:A,width:"auto"})}setTimeout(()=>{y(k)},0)},[e,r,y]);return b.jsx("div",{className:"mantine-datatable-header-resizable-handle",style:{cursor:n?"col-resize":void 0},onMouseDown:_,onDoubleClick:M,onClick:S=>S.stopPropagation(),title:"Drag to resize column, double-click to reset"})};function Gu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M12 5l0 14"}),b.jsx("path",{d:"M16 9l-4 -4"}),b.jsx("path",{d:"M8 9l4 -4"})]})}function Qu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M8 7l4 -4l4 4"}),b.jsx("path",{d:"M8 17l4 4l4 -4"}),b.jsx("path",{d:"M12 3l0 18"})]})}function Zu(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),b.jsx("path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function Ku(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M18 6l-12 12"}),b.jsx("path",{d:"M6 6l12 12"})]})}function Ju({className:t,style:e,accessor:r,visibleMediaQuery:n,title:s,sortable:l,draggable:c,toggleable:a,resizable:m,sortIcons:y,textAlign:_,width:M,sortStatus:S,onSortStatusChange:C,filter:k,filterPopoverProps:A,filterPopoverDisableClickOutside:N,filtering:F,sortKey:B}){let{setSourceColumn:H,setTargetColumn:W,swapColumns:te,setColumnsToggle:oe}=gn(),[G,K]=Z.useState(!1),V=Z.useRef(null);if(!Dr(n))return null;let U=s??vn(r),J=typeof U=="string"?U:void 0,se=l&&C?p=>{p?.defaultPrevented||C({sortKey:B,columnAccessor:r,direction:S?.columnAccessor===r?S.direction==="asc"?"desc":"asc":S?.direction??"asc"})}:void 0,ne=p=>{p.stopPropagation(),H(r),K(!1)},P=p=>{p.preventDefault(),W(r),K(!0)},x=()=>{W(r),K(!1),te()},w=()=>{K(!0)},h=()=>{K(!1)},i=p=>{p.stopPropagation(),oe(f=>f.map(d=>d.accessor===r?{...d,toggled:!1}:d))};return b.jsxs(O.TableTh,{"data-accessor":r,className:Ae({"mantine-datatable-header-cell-sortable":l,"mantine-datatable-header-cell-toggleable":a,"mantine-datatable-header-cell-resizable":m},t),style:[{width:M,...m?{}:{minWidth:M,maxWidth:M}},e],role:l?"button":void 0,tabIndex:l?0:void 0,onClick:se,onKeyDown:p=>p.key==="Enter"&&se?.(),ref:V,children:[b.jsxs(O.Group,{className:"mantine-datatable-header-cell-sortable-group",justify:"space-between",wrap:"nowrap",children:[b.jsxs(O.Flex,{align:"center",w:"100%",className:Ae({"mantine-datatable-header-cell-draggable":c,"mantine-datatable-header-cell-drag-over":G}),draggable:c,onDragStart:c?ne:void 0,onDragEnter:c?w:void 0,onDragOver:c?P:void 0,onDrop:c?x:void 0,onDragLeave:c?h:void 0,children:[c?b.jsx(O.Center,{role:"img","aria-label":"Drag column",children:b.jsx(O.ActionIcon,{className:"mantine-datatable-header-cell-draggable-action-icon",variant:"subtle",size:"xs",onClick:p=>{p.stopPropagation()},children:b.jsx(Zu,{})})}):null,b.jsx(O.Box,{className:Ae("mantine-datatable-header-cell-sortable-text",{[kr]:_==="left",[Pr]:_==="center",[Mr]:_==="right"},xn,Cn),title:J,children:U})]}),a?b.jsx(O.Center,{className:"mantine-datatable-header-cell-toggleable-icon",role:"img","aria-label":"Toggle column",children:b.jsx(O.ActionIcon,{size:"xs",variant:"light",onClick:i,children:b.jsx(Ku,{})})}):null,l||S?.columnAccessor===r?b.jsx(b.Fragment,{children:S?.columnAccessor===r?b.jsx(O.Center,{className:Ae("mantine-datatable-header-cell-sortable-icon",{"mantine-datatable-header-cell-sortable-icon-reversed":S.direction==="desc"}),role:"img","aria-label":`Sorted ${S.direction==="desc"?"descending":"ascending"}`,children:y?.sorted||b.jsx(Gu,{})}):b.jsx(O.Center,{className:"mantine-datatable-header-cell-sortable-unsorted-icon",role:"img","aria-label":"Not sorted",children:y?.unsorted||b.jsx(Qu,{})})}):null,k?b.jsx(Vu,{filterPopoverProps:A,isActive:!!F,filterPopoverDisableClickOutside:N,children:k}):null]}),m&&r!=="__selection__"?b.jsx(Hu,{accessor:r,columnRef:V}):null]})}function Xu({className:t,style:e,trigger:r,shadowVisible:n,checked:s,indeterminate:l,checkboxProps:c,onChange:a,rowSpan:m,ref:y}){let _=!c.disabled;return b.jsx(O.TableTh,{ref:y,className:Ae("mantine-datatable-header-selector-cell",{[At]:r==="cell"&&_},t),style:e,rowSpan:m,"data-shadow-visible":n||void 0,"data-accessor":"__selection__",onClick:r==="cell"&&_?a:void 0,children:b.jsx(O.Checkbox,{classNames:_?{input:At}:void 0,checked:s,indeterminate:l,onChange:a,...c,disabled:!(a||c.onChange)||c.disabled})})}function ec({selectionColumnHeaderRef:t,className:e,style:r,sortStatus:n,sortIcons:s,onSortStatusChange:l,columns:c,defaultColumnProps:a,groups:m,selectionTrigger:y,selectionVisible:_,selectionChecked:M,selectionIndeterminate:S,onSelectionChange:C,selectionCheckboxProps:k,selectorCellShadowVisible:A,selectionColumnClassName:N,selectionColumnStyle:F,withColumnBorders:B=!1,ref:H}){let W=m?Ds(m):0,te=W>0?W+1:1,oe=_?b.jsx(Xu,{ref:t,className:N,style:F,trigger:y,shadowVisible:A,checked:M,indeterminate:S,checkboxProps:k,onChange:C,rowSpan:m?te:void 0}):null,{columnsToggle:G,setColumnsToggle:K}=gn(),[V,U]=Z.useState(!1),J=c.some(P=>P.toggleable),se=J?Object.fromEntries(c.map(({accessor:P,title:x})=>[P,x??vn(String(P))])):void 0,ne=b.jsxs(O.TableThead,{className:Ae("mantine-datatable-header",e),style:r,ref:H,onContextMenu:J?P=>{P.preventDefault(),U(x=>!x)}:void 0,children:[m&&Array.from({length:W},(P,x)=>{let w=ks(m,x);return b.jsxs(O.TableTr,{children:[x===0&&oe,w.map((h,i)=>b.jsx(Wu,{group:h,maxDepth:W,currentDepth:x,previousGroups:w.slice(0,i),isLastGroup:i===w.length-1,withColumnBorders:B,totalTableColumns:c.length},h.id))]},`group-depth-${x}`)}),b.jsxs(O.TableTr,{children:[!m&&oe,c.map(({hidden:P,...x},w)=>{if(P)return null;let{accessor:h,visibleMediaQuery:i,textAlign:p,width:f,title:d,sortable:v,draggable:D,toggleable:T,resizable:q,titleClassName:X,titleStyle:re,filter:ee,filterPopoverProps:ae,filterPopoverDisableClickOutside:ie,filtering:ue,sortKey:E}={...a,...x};return b.jsx(Ju,{accessor:h,className:X,style:re,visibleMediaQuery:i,textAlign:p,width:f,title:d,sortable:v,draggable:D,toggleable:T,resizable:q&&w<c.length-1,sortStatus:n,sortIcons:s,sortKey:E,onSortStatusChange:l,filter:ee,filterPopoverProps:ae,filterPopoverDisableClickOutside:ie,filtering:ue},h)})]})]});return J?b.jsxs(O.Popover,{position:"bottom",withArrow:!0,shadow:"md",opened:V,onChange:U,children:[b.jsx(O.PopoverTarget,{children:ne}),b.jsx(O.PopoverDropdown,{children:b.jsx(O.Stack,{children:G.filter(P=>P.toggleable).map(P=>b.jsx(O.Group,{children:b.jsx(O.Checkbox,{classNames:{label:"mantine-datatable-header-column-toggle-checkbox-label"},size:"xs",label:se[P.accessor],checked:P.toggled,onChange:x=>{K(G.map(w=>w.accessor===P.accessor?{...w,toggled:x.currentTarget.checked}:w))}})},P.accessor))})})]}):ne}function tc({fetching:t,customContent:e,backgroundBlur:r,size:n,type:s,color:l}){return b.jsx(O.Center,{className:Ae("mantine-datatable-loader",{"mantine-datatable-loader-fetching":t}),style:[{backdropFilter:r?`blur(${r}px)`:void 0}],children:t&&(e||b.jsx(O.Loader,{size:n,type:s,color:l}))})}function je(t,e,r){return t?O.parseThemeColor({color:typeof t=="object"?t[r]:t,theme:e}).value:void 0}function rc({theme:t,c:e,backgroundColor:r,borderColor:n,rowBorderColor:s,stripedColor:l,highlightOnHoverColor:c}){return{"--mantine-datatable-color-light":je(e,t,"light"),"--mantine-datatable-color-dark":je(e,t,"dark"),"--mantine-datatable-background-color-light":je(r,t,"light"),"--mantine-datatable-background-color-dark":je(r,t,"dark"),"--mantine-datatable-border-color-light":je(n,t,"light"),"--mantine-datatable-border-color-dark":je(n,t,"dark"),"--mantine-datatable-row-border-color-light":je(s,t,"light"),"--mantine-datatable-row-border-color-dark":je(s,t,"dark"),"--mantine-datatable-striped-color-light":je(l,t,"light"),"--mantine-datatable-striped-color-dark":je(l,t,"dark"),"--mantine-datatable-highlight-on-hover-color-light":je(c,t,"light"),"--mantine-datatable-highlight-on-hover-color-dark":je(c,t,"dark")}}function Ms({theme:t,paginationActiveTextColor:e,paginationActiveBackgroundColor:r}){return{"--mantine-datatable-pagination-active-text-color-light":je(e,t,"light"),"--mantine-datatable-pagination-active-text-color-dark":je(e,t,"dark"),"--mantine-datatable-pagination-active-background-color-light":je(r,t,"light"),"--mantine-datatable-pagination-active-background-color-dark":je(r,t,"dark")}}function nc({theme:t,color:e,backgroundColor:r}){return{"--mantine-datatable-row-color-light":je(e,t,"light"),"--mantine-datatable-row-color-dark":je(e,t,"dark"),"--mantine-datatable-row-background-color-light":je(r,t,"light"),"--mantine-datatable-row-background-color-dark":je(r,t,"dark")}}function oc(){return b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),b.jsx("path",{d:"M8 9l4 -4l4 4"}),b.jsx("path",{d:"M16 15l-4 4l-4 -4"})]})}var Os={xs:O.rem(22),sm:O.rem(26),md:O.rem(32),lg:O.rem(38),xl:O.rem(44)};function sc({size:t,label:e,values:r,value:n,activeTextColor:s,activeBackgroundColor:l,onChange:c}){return b.jsxs(O.Group,{gap:"xs",children:[b.jsx(O.Text,{component:"div",size:t,children:e}),b.jsxs(O.Menu,{withinPortal:!0,withArrow:!0,offset:2,classNames:{arrow:"mantine-datatable-page-size-selector-menu-arrow"},children:[b.jsx(O.MenuTarget,{children:b.jsx(O.Button,{size:t,variant:"default",classNames:{section:"mantine-datatable-page-size-selector-button-icon"},rightSection:b.jsx(oc,{}),style:[{fontWeight:"normal"},a=>({height:Os[t],paddingLeft:a.spacing[t],paddingRight:a.spacing[t]})],children:n})}),b.jsx(O.MenuDropdown,{children:r.map(a=>{let m=a===n;return b.jsx(O.MenuItem,{className:Ae({"mantine-datatable-page-size-selector-active":m}),style:[{height:Os[t]},m&&(s||l)?y=>Ms({theme:y,paginationActiveTextColor:s,paginationActiveBackgroundColor:l}):void 0],disabled:m,onClick:()=>c(a),children:b.jsx(O.Text,{component:"div",size:t,children:a})},a)})})]})]})}function ic({className:t,style:e,fetching:r,page:n,onPageChange:s,paginationWithEdges:l,paginationWithControls:c,paginationActiveTextColor:a,paginationActiveBackgroundColor:m,paginationSize:y,loadingText:_,noRecordsText:M,paginationText:S,totalRecords:C,recordsPerPage:k,onRecordsPerPageChange:A,recordsPerPageLabel:N,recordsPerPageOptions:F,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:W,getPaginationControlProps:te,getPaginationItemProps:oe,renderPagination:G}){let K;if(C){let x=(n-1)*k+1,w=x+(B||0)-1;K=S({from:x,to:w,totalRecords:C})}else K=r?_:M;let V=C&&k?Math.max(1,Math.ceil(C/k)):1,U=C?(n-1)*(k??0)+1:void 0,J=C?(U??1)+(B??0)-1:void 0,se=!Dr(({breakpoints:x})=>`(min-width: ${typeof W=="number"?`${O.rem(W)}rem`:x[W]||W})`),ne={Text:x=>b.jsx(O.Text,{component:"div",className:"mantine-datatable-pagination-text",size:y,...x,children:K}),PageSizeSelector:x=>F?b.jsx(sc,{activeTextColor:a,activeBackgroundColor:m,size:y,label:N,values:F,value:k,onChange:A,...x}):b.jsx(b.Fragment,{}),Pagination:x=>b.jsx(O.Pagination,{classNames:{root:Ae("mantine-datatable-pagination-pages",{"mantine-datatable-pagination-pages-fetching":r||!B}),control:"mantine-datatable-pagination-pages-control"},style:a||m?w=>Ms({theme:w,paginationActiveTextColor:a,paginationActiveBackgroundColor:m}):void 0,withEdges:l,withControls:c,value:n,onChange:s,size:y,total:V,getControlProps:te,getItemProps:oe,...x})},P={state:{paginationSize:y,page:n,totalPages:V,totalRecords:C,recordsPerPage:k,recordsLength:B,fetching:r,from:U,to:J,isWrapped:se},actions:{setPage:x=>s?.(x),setRecordsPerPage:A?x=>A(x):void 0},Controls:ne};return b.jsx(O.Box,{px:H??"xs",py:"xs",className:Ae("mantine-datatable-pagination",t),style:[{flexDirection:se?"column":"row"},e],children:typeof G=="function"?G(P):b.jsxs(b.Fragment,{children:[b.jsx(ne.Text,{}),b.jsx(ne.PageSizeSelector,{}),b.jsx(ne.Pagination,{})]})})}function ac({className:t,style:e,visibleMediaQuery:r,record:n,index:s,onClick:l,onDoubleClick:c,onContextMenu:a,noWrap:m,ellipsis:y,textAlign:_,width:M,accessor:S,render:C,defaultRender:k,customCellAttributes:A}){return Dr(r)?b.jsx(O.TableTd,{className:Ae({[xn]:m||y,[Cn]:y,[At]:l||c,[Ps]:a,[kr]:_==="left",[Pr]:_==="center",[Mr]:_==="right"},t),style:[{width:M,minWidth:M,maxWidth:M},e],onClick:l,onDoubleClick:c,onContextMenu:a,...A?.(n,s),children:C?C(n,s):k?k(n,s,S):Ss(n,S)}):null}function lc({open:t,colSpan:e,content:r,collapseProps:n}){let{expanded:s,visible:l}=Bu(t,n?.transitionDuration);return l?b.jsxs(b.Fragment,{children:[b.jsx(O.TableTr,{}),b.jsx(O.TableTr,{children:b.jsx(O.TableTd,{className:"mantine-datatable-row-expansion-cell",colSpan:e,children:b.jsx(O.Collapse,{in:s,...n,children:b.jsx("div",{className:"mantine-datatable-row-expansion-cell-content",children:r()})})})})]}):null}function uc({className:t,style:e,record:r,index:n,trigger:s,onChange:l,withRightShadow:c,checkboxProps:a,getCheckboxProps:m,...y}){let _={...a,...m(r,n)},M=!y.disabled&&!_.disabled,S=C=>{C.stopPropagation(),s==="cell"&&M&&l?.(C)};return b.jsx(O.TableTd,{className:Ae("mantine-datatable-row-selector-cell",{[At]:s==="cell"&&M},t),style:e,"data-shadow-visible":c||void 0,onClick:S,children:b.jsx(O.Checkbox,{classNames:M?{input:At}:void 0,onChange:l,...y,..._})})}function cc({record:t,index:e,columns:r,defaultColumnProps:n,defaultColumnRender:s,selectionTrigger:l,selectionVisible:c,selectionChecked:a,onSelectionChange:m,isRecordSelectable:y,selectionCheckboxProps:_,getSelectionCheckboxProps:M,onClick:S,onDoubleClick:C,onContextMenu:k,onCellClick:A,onCellDoubleClick:N,onCellContextMenu:F,expansion:B,customAttributes:H,color:W,backgroundColor:te,className:oe,style:G,selectorCellShadowVisible:K,selectionColumnClassName:V,selectionColumnStyle:U,rowFactory:J}){let se=b.jsxs(b.Fragment,{children:[c&&b.jsx(uc,{className:V,style:U,record:t,index:e,trigger:l,withRightShadow:K,checked:a,disabled:!m||(y?!y(t,e):!1),onChange:m,checkboxProps:_,getCheckboxProps:M}),r.map(({hidden:x,hiddenContent:w,...h},i)=>{if(x||w)return null;let{accessor:p,visibleMediaQuery:f,textAlign:d,noWrap:v,ellipsis:D,width:T,render:q,cellsClassName:X,cellsStyle:re,customCellAttributes:ee}={...n,...h};return b.jsx(ac,{className:typeof X=="function"?X(t,e):X,style:re?.(t,e),visibleMediaQuery:f,record:t,index:e,onClick:A?ae=>A({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,onDoubleClick:N?ae=>N({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,onContextMenu:F?ae=>F({event:ae,record:t,index:e,column:h,columnIndex:i}):void 0,accessor:p,textAlign:d,noWrap:v,ellipsis:D,width:T,render:q,defaultRender:s,customCellAttributes:ee},p)})]}),ne=B&&b.jsx(lc,{colSpan:r.filter(({hidden:x})=>!x).length+(c?1:0),open:B.isRowExpanded(t),content:B.content({record:t,index:e}),collapseProps:B.collapseProps}),P=dc({record:t,index:e,selectionChecked:a,onClick:S,onDoubleClick:C,onContextMenu:k,expansion:B,customAttributes:H,color:W,backgroundColor:te,className:oe,style:G});return J?J({record:t,index:e,rowProps:P,children:se,expandedElement:ne}):b.jsxs(b.Fragment,{children:[b.jsx(O.TableTr,{...P,children:se}),ne]})}function dc({record:t,index:e,selectionChecked:r,onClick:n,onDoubleClick:s,onContextMenu:l,expansion:c,customAttributes:a,color:m,backgroundColor:y,className:_,style:M}){return{className:Ae("mantine-datatable-row",{[At]:n||s||c?.isExpandable({record:t,index:e})&&c?.expandOnClick},{[Ps]:l},typeof _=="function"?_(t,e):_),"data-selected":r||void 0,onClick:S=>{if(c){let{isExpandable:C,isRowExpanded:k,expandOnClick:A,expandRow:N,collapseRow:F}=c;C({record:t,index:e})&&A&&(k(t)?F(t):N(t))}n?.({event:S,record:t,index:e})},onDoubleClick:s?S=>s({event:S,record:t,index:e}):void 0,onContextMenu:l?S=>l({event:S,record:t,index:e}):void 0,style:[m||y?S=>{let C=m?.(t,e),k=y?.(t,e);return nc({theme:S,color:C,backgroundColor:k})}:void 0,M?.(t,e)],...a?.(t,e)??{}}}function hc({leftShadowBehind:t,rightShadowBehind:e,onScrollPositionChange:r,children:n,viewportRef:s,scrollAreaProps:l}){return b.jsxs(O.ScrollArea,{...l,viewportRef:s,classNames:{root:"mantine-datatable-scroll-area",scrollbar:"mantine-datatable-scroll-area-scrollbar",thumb:"mantine-datatable-scroll-area-thumb",corner:"mantine-datatable-scroll-area-corner"},onScrollPositionChange:r,children:[n,b.jsx(O.Box,{className:Ae("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-top-shadow")}),b.jsx("div",{className:Ae("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-left-shadow",{"mantine-datatable-scroll-area-shadow-behind":t})}),b.jsx("div",{className:Ae("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-right-shadow",{"mantine-datatable-scroll-area-shadow-behind":e})}),b.jsx(O.Box,{className:Ae("mantine-datatable-scroll-area-shadow","mantine-datatable-scroll-area-bottom-shadow")})]})}function fc({withTableBorder:t,borderRadius:e,textSelectionDisabled:r,height:n="100%",minHeight:s,maxHeight:l,shadow:c,verticalAlign:a="center",fetching:m,columns:y,storeColumnsKey:_,groups:M,pinFirstColumn:S,pinLastColumn:C,defaultColumnProps:k,defaultColumnRender:A,idAccessor:N="id",records:F,selectionTrigger:B="checkbox",selectedRecords:H,onSelectedRecordsChange:W,selectionColumnClassName:te,selectionColumnStyle:oe,isRecordSelectable:G,selectionCheckboxProps:K,allRecordsSelectionCheckboxProps:V={"aria-label":"Select all records"},getRecordSelectionCheckboxProps:U=(Ce,_e)=>({"aria-label":`Select record ${_e+1}`}),sortStatus:J,sortIcons:se,onSortStatusChange:ne,horizontalSpacing:P,page:x,onPageChange:w,totalRecords:h,recordsPerPage:i,onRecordsPerPageChange:p,recordsPerPageOptions:f,recordsPerPageLabel:d="Records per page",paginationWithEdges:v,paginationWithControls:D,paginationActiveTextColor:T,paginationActiveBackgroundColor:q,paginationSize:X="sm",paginationText:re=({from:Ce,to:_e,totalRecords:ze})=>`${Ce} - ${_e} / ${ze}`,paginationWrapBreakpoint:ee="sm",getPaginationControlProps:ae=Ce=>Ce==="previous"?{"aria-label":"Previous page"}:Ce==="next"?{"aria-label":"Next page"}:{},getPaginationItemProps:ie,renderPagination:ue,loaderBackgroundBlur:E,customLoader:L,loaderSize:R,loaderType:Y,loaderColor:I,loadingText:ce="...",emptyState:o,noRecordsText:u="No records",noRecordsIcon:g,highlightOnHover:j,striped:$,noHeader:z,onRowClick:le,onRowDoubleClick:he,onRowContextMenu:pe,onCellClick:Q,onCellDoubleClick:fe,onCellContextMenu:me,onScroll:ge,onScrollToTop:Se,onScrollToBottom:xe,onScrollToLeft:Pe,onScrollToRight:Ve,c:Ne,backgroundColor:Me,borderColor:Ct,rowBorderColor:Te,stripedColor:rt,highlightOnHoverColor:Ye,rowColor:et,rowBackgroundColor:nt,rowExpansion:Re,rowClassName:ot,rowStyle:st,customRowAttributes:He,scrollViewportRef:Ge,scrollAreaProps:Qe,tableRef:it,bodyRef:yt,m:at,my:ve,mx:Oe,mt:tt,mb:vt,ml:Qt,mr:jt,className:bt,classNames:Ze,style:wt,styles:lt,rowFactory:De,tableWrapper:ke,...ut}){let Ce=Z.useMemo(()=>M?wn(M):y,[y,M]),[_e,ze]=Z.useState(!1),{refs:Ee,onScroll:Et}=Ou({scrollCallbacks:{onScroll:ge,onScrollToTop:Se,onScrollToBottom:xe,onScrollToLeft:Pe,onScrollToRight:Ve},withRowBorders:ut.withRowBorders}),Dn=Mu({key:_,columns:Ce,headerRef:Ee.header,scrollViewportRef:Ee.scrollViewport,onFixedLayoutChange:ze}),Fc=Le.useMergedRef(Ee.table,it),Wc=Le.useMergedRef(Ee.scrollViewport,Ge),Uc=Lu({rowExpansion:Re,records:F,idAccessor:N}),Or=Z.useRef(!1),Ns=Z.useRef(x),kn=Z.useRef(F),qc=Z.useCallback(we=>{Or.current=!0,kn.current=F,w(we)},[w,F]);Z.useEffect(()=>{Ns.current!==x&&(Or.current=!0,kn.current=F,Ns.current=x)},[x,F]);let Ar=F?.length;Z.useLayoutEffect(()=>{if(!Or.current||m||F===kn.current)return;let we=Ee.scrollViewport.current;if(!we)return;let St=requestAnimationFrame(()=>{we.scrollTo({top:0,left:0}),Or.current=!1});return()=>cancelAnimationFrame(St)},[m,F,Ee.scrollViewport]);let Ls=F?.map(we=>Ie(we,N)),Tt=!!H,Zt=H?.map(we=>Ie(we,N)),Bs=Ls!==void 0&&Zt!==void 0&&Zt.length>0,Pn=G?F?.filter(G):F,jr=Pn?.map(we=>Ie(we,N)),Er=Bs&&jr.every(we=>Zt.includes(we)),Vc=Bs&&jr.some(we=>Zt.includes(we)),Hc=Z.useCallback(()=>{H&&W&&W(Er?H.filter(we=>!jr.includes(Ie(we,N))):bn([...H,...Pn],we=>Ie(we,N)))},[Er,N,W,jr,Pn,H]),{lastSelectionChangeIndex:Tr,setLastSelectionChangeIndex:Gc}=Au(Ls),Mn=Tt&&!S,Qc={m:at,my:ve,mx:Oe,mt:tt,mb:vt,ml:Qt,mr:jt},Zc=Z.useCallback(({children:we})=>ke?ke({children:we}):we,[ke]);return b.jsx(ys,{...Dn,children:b.jsxs(O.Box,{ref:Ee.root,...Qc,className:Ae("mantine-datatable",{"mantine-datatable-with-border":t},bt,Ze?.root),style:[we=>({...rc({theme:we,c:Ne,backgroundColor:Me,borderColor:Ct,rowBorderColor:Te,stripedColor:rt,highlightOnHoverColor:Ye}),borderRadius:we.radius[e]||e,boxShadow:we.shadows[c]||c,height:n,minHeight:s,maxHeight:l}),wt,lt?.root,{position:"relative"}],children:[b.jsx(hc,{viewportRef:Wc,leftShadowBehind:Tt||!!S,rightShadowBehind:C,onScrollPositionChange:Et,scrollAreaProps:Qe,children:b.jsx(Zc,{children:b.jsxs(O.Table,{ref:Fc,horizontalSpacing:P,className:Ae("mantine-datatable-table",{[Iu]:r,"mantine-datatable-vertical-align-top":a==="top","mantine-datatable-vertical-align-bottom":a==="bottom","mantine-datatable-pin-last-column":C,"mantine-datatable-selection-column-visible":Tt,"mantine-datatable-pin-first-column":S,"mantine-datatable-resizable-columns":Dn.hasResizableColumns&&_e},Ze?.table),style:{...lt?.table},"data-striped":Ar&&$||void 0,"data-highlight-on-hover":j||void 0,...ut,children:[z?null:b.jsx(ys,{...Dn,children:b.jsx(ec,{ref:Ee.header,selectionColumnHeaderRef:Ee.selectionColumnHeader,className:Ze?.header,style:lt?.header,columns:Ce,defaultColumnProps:k,groups:M,sortStatus:J,sortIcons:se,onSortStatusChange:ne,selectionTrigger:B,selectionVisible:Tt,selectionChecked:Er,selectionIndeterminate:Vc&&!Er,onSelectionChange:Hc,selectionCheckboxProps:{...K,...V},selectorCellShadowVisible:Mn,selectionColumnClassName:te,selectionColumnStyle:oe,withColumnBorders:ut.withColumnBorders})}),b.jsx("tbody",{ref:yt,children:Ar?F.map((we,St)=>{let On=Ie(we,N),An=Zt?.includes(On)||!1,Is;return W&&H&&(Is=Kc=>{if(Kc.nativeEvent.shiftKey&&Tr!==null){let Rt=F.filter(St>Tr?(Dt,kt)=>kt>=Tr&&kt<=St&&(G?G(Dt,kt):!0):(Dt,kt)=>kt>=St&&kt<=Tr&&(G?G(Dt,kt):!0));W(An?$u(H,Rt,Dt=>Ie(Dt,N)):bn([...H,...Rt],Dt=>Ie(Dt,N)))}else W(An?H.filter(Rt=>Ie(Rt,N)!==On):bn([...H,we],Rt=>Ie(Rt,N)));Gc(St)}),b.jsx(cc,{record:we,index:St,columns:Ce,defaultColumnProps:k,defaultColumnRender:A,selectionTrigger:B,selectionVisible:Tt,selectionChecked:An,onSelectionChange:Is,isRecordSelectable:G,selectionCheckboxProps:K,getSelectionCheckboxProps:U,onClick:le,onDoubleClick:he,onCellClick:Q,onCellDoubleClick:fe,onContextMenu:pe,onCellContextMenu:me,expansion:Uc,color:et,backgroundColor:nt,className:ot,style:st,customAttributes:He,selectorCellShadowVisible:Mn,selectionColumnClassName:te,selectionColumnStyle:oe,idAccessor:N,rowFactory:De},On)}):b.jsx(xu,{})}),Ce.some(({footer:we})=>we)&&b.jsx(Fu,{ref:Ee.footer,className:Ze?.footer,style:lt?.footer,columns:Ce,defaultColumnProps:k,selectionVisible:Tt,selectorCellShadowVisible:Mn})]})})}),x&&b.jsx(ic,{className:Ze?.pagination,style:lt?.pagination,horizontalSpacing:P,fetching:m,page:x,onPageChange:qc,totalRecords:h,recordsPerPage:i,onRecordsPerPageChange:p,recordsPerPageOptions:f,recordsPerPageLabel:d,paginationWithEdges:v,paginationWithControls:D,paginationActiveTextColor:T,paginationActiveBackgroundColor:q,paginationSize:X,paginationText:re,paginationWrapBreakpoint:ee,getPaginationControlProps:ae,getPaginationItemProps:ie,noRecordsText:u,loadingText:ce,recordsLength:Ar,renderPagination:ue}),b.jsx(tc,{fetching:m,backgroundBlur:E,customContent:L,size:R,type:Y,color:I}),b.jsx(Su,{icon:g,text:u,active:!m&&!Ar,children:o})]})})}function As(t){const e=Fe.c(42),{fields:r,onClose:n,queryKey:s,apiPath:l,id:c,steps:a}=t,[m,y]=Z.useState(0),[_,M]=Z.useState(!1),{data:S,isLoading:C}=qo(l,s,c),{mutateAsync:k,isError:A,error:N,isPending:F}=ln(l,s);let B;e[0]!==r?(B=new Set(r.filter(bc).map(vc)),e[0]=r,e[1]=B):B=e[1];let H;e[2]!==B?(H=[...B],e[2]=B,e[3]=H):H=e[3];const W=H;let te;e[4]!==r?(te=r.reduce(yc,{}),e[4]=r,e[5]=te):te=e[5];let oe;e[6]!==r?(oe=r.filter(mc).reduce(gc,{}),e[6]=r,e[7]=oe):oe=e[7];let G;e[8]!==te||e[9]!==oe?(G={mode:"uncontrolled",initialValues:te,validate:oe},e[8]=te,e[9]=oe,e[10]=G):G=e[10];const K=jn.useForm(G);let V;e[11]!==S||e[12]!==r||e[13]!==K?(V=()=>{if(S){const i={...S};r.forEach(p=>{const f=p.id;p.type==="boolean"&&i[f]===null?i[f]=!1:p.type==="date"&&i[f]?i[f]=new Date(i[f]):i[f]===null&&(i[f]="")}),K.initialize(i),K.setValues(i)}},e[11]=S,e[12]=r,e[13]=K,e[14]=V):V=e[14];let U;e[15]!==S?(U=[S],e[15]=S,e[16]=U):U=e[16],Z.useEffect(V,U);let J;e[17]===Symbol.for("react.memo_cache_sentinel")?(J=function(p,f){return typeof p.required=="function"?p.required(f??{}):!!p.required},e[17]=J):J=e[17];const se=J;let ne;e[18]!==K||e[19]!==c?(ne=function(p){const f=K.getValues();if(p.conditional&&!p.conditional(f))return null;const d=se(p,f);return b.jsxs(Z.Fragment,{children:[(p.type===void 0||p.type=="text")&&b.jsx(O.TextInput,{label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),type:p.id.includes("email")?"email":void 0,required:d},K.key(p.id)),p.type==="number"&&b.jsx(O.NumberInput,{decimalSeparator:",",label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),required:d},K.key(p.id)),p.type==="date"&&b.jsx(Sr,{label:p.column.title,placeholder:p.placeholder??"",valueFormat:"DD.MM.YYYY",clearable:!0,...K.getInputProps(p.id),required:d},K.key(p.id)),p.type==="boolean"&&b.jsx(O.Checkbox,{mt:"md",label:p.column.title,...K.getInputProps(p.id,{type:"checkbox"}),required:d},K.key(p.id)),p.type==="textarea"&&b.jsx(O.Textarea,{label:p.column.title,placeholder:p.placeholder??"",...K.getInputProps(p.id),minRows:3,autosize:!0,required:d},K.key(p.id)),p.type==="custom"&&p.render&&p.render({...K.getValues(),id:c},K.setValues,M,{error:K.getInputProps(p.id).error,required:d})]},p.id)},e[18]=K,e[19]=c,e[20]=ne):ne=e[20];const P=ne;let x;e[21]!==A||e[22]!==N?.message||e[23]!==N?.name?(x=A&&b.jsx(O.Alert,{variant:"outline",color:"red",title:N?.name??"Fehler aufgetreten",mb:"lg",children:N?.message??"Fehler aufgetreten"}),e[21]=A,e[22]=N?.message,e[23]=N?.name,e[24]=x):x=e[24];let w;e[25]!==m||e[26]!==r||e[27]!==K||e[28]!==_||e[29]!==c||e[30]!==C||e[31]!==F||e[32]!==A||e[33]!==n||e[34]!==P||e[35]!==a||e[36]!==W||e[37]!==k?(w=C?b.jsxs(O.Stack,{gap:"md",children:[b.jsx(O.Skeleton,{height:40}),Array(r.length).fill(0).map(pc),b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Skeleton,{width:100,height:36}),b.jsx(O.Skeleton,{width:100,height:36})]})]}):b.jsxs("form",{onSubmit:K.onSubmit(async i=>{await k({...i,id:c}),W.length&&m<W.length-1?A||y(m+1):A||(K.setInitialValues(i),K.reset(),n())}),children:[W.length?b.jsx(O.Stepper,{active:m,size:"sm",children:W.map(i=>b.jsx(O.Stepper.Step,{...a&&a[i-1]?{label:a[i-1].label}:{},children:r.filter(p=>p.step===i).map(p=>P(p))},i))}):r.map(i=>P(i)),!_&&b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:()=>W.length?m===0?n():y(m-1):n(),variant:"outline",children:W.length?m===0?"Abbrechen":"Zurück":"Abbrechen"}),b.jsx(O.Button,{type:"submit",loading:F,children:W.length?m===W.length-1?"Speichern":"Weiter":"Speichern"})]})]}),e[25]=m,e[26]=r,e[27]=K,e[28]=_,e[29]=c,e[30]=C,e[31]=F,e[32]=A,e[33]=n,e[34]=P,e[35]=a,e[36]=W,e[37]=k,e[38]=w):w=e[38];let h;return e[39]!==x||e[40]!==w?(h=b.jsxs(b.Fragment,{children:[x,w]}),e[39]=x,e[40]=w,e[41]=h):h=e[41],h}function pc(t,e){return b.jsx(O.Skeleton,{height:35},`skeleton-field-${e}`)}function gc(t,e){return t[e.id]=(r,n)=>e.conditional&&!e.conditional(n)||!(typeof e.required=="function"?e.required(n):!!e.required)||r?null:"Pflichtfeld",t}function mc(t){return t.required}function yc(t,e){return t[e.id]=e.type==="boolean"?e.defaultValue??!1:e.defaultValue??"",t}function vc(t){return t.step}function bc(t){return typeof t.step=="number"}function js({queryKey:t,apiPath:e,onClose:r,selectedRecords:n}){const{mutateAsync:s,isError:l,error:c,isPending:a}=Go(e,t),[m,y]=Z.useState(n),[_,M]=Z.useState(!1),S=_||a;return Z.useEffect(()=>{m.length||r()},[r,m]),m.length?b.jsxs(b.Fragment,{children:[l&&c.message&&b.jsx(O.Alert,{variant:"outline",color:"red",title:c.name,children:c.message}),b.jsx(O.Text,{children:m.length===1?`Soll ${m.length} Eintrag wirklich gelöscht werden?`:`Sollen ${m.length} Einträge wirklich gelöscht werden?`}),b.jsxs(O.Group,{mt:"md",justify:"end",children:[b.jsx(O.Button,{onClick:r,variant:"outline",disabled:S,children:"Abbrechen"}),b.jsx(O.Button,{color:"red",loading:S,onClick:async()=>{M(!0);try{await Promise.all(m.map(C=>s(C.id))),y([])}finally{M(!1)}},children:"Löschen"})]})]}):b.jsx(b.Fragment,{})}function Es(t,e){const r=Fe.c(8);let n;r[0]!==t||r[1]!==e?(n=()=>{const y=localStorage.getItem(`use_persistent_storage_${e}`);return y?JSON.parse(y):t},r[0]=t,r[1]=e,r[2]=n):n=r[2];const[s,l]=Z.useState(n);let c;r[3]!==e?(c=y=>{l(y),localStorage.setItem(`use_persistent_storage_${e}`,JSON.stringify(y))},r[3]=e,r[4]=c):c=r[4];const a=c;let m;return r[5]!==a||r[6]!==s?(m=[s,a],r[5]=a,r[6]=s,r[7]=m):m=r[7],m}const wc=(t,e)=>{const r=t.map(m=>m[e]).filter(m=>m!=null&&m!=="");if(r.length===0)return"string";const n=Math.min(100,r.length),s=r.slice(0,n),l={string:0,number:0,date:0},c=[/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/,/^\d{4}-\d{2}-\d{2}$/,/^\d{1,2}\/\d{1,2}\/\d{4}$/,/^\d{1,2}\.\d{1,2}\.\d{4}$/];s.forEach(m=>{if(typeof m=="number")l.number++;else if(typeof m=="string"){const y=m.trim();if(y!==""&&!isNaN(Number(y))&&!isNaN(parseFloat(y))){l.number++;return}if(c.some(_=>_.test(y))){const _=new Date(y);if(!isNaN(_.getTime())){l.date++;return}}l.string++}else m instanceof Date?l.date++:l.string++});const a=l.string+l.number+l.date;return l.date/a>=.6?"date":l.number/a>=.6?"number":l.string/a>=.6?"string":"mixed"},Ts=new Map,Rs=(t,e,r="asc")=>{if(!t||t.length===0)return[];const n=`${String(e)}_${t.length}`;let s=Ts.get(n);return s||(s=wc(t,e),Ts.set(n,s)),[...t].sort((c,a)=>{const m=c[e],y=a[e],_=m==null||m==="",M=y==null||y==="";if(_&&M)return 0;if(_)return r==="asc"?-1:1;if(M)return r==="asc"?1:-1;let S,C;switch(s){case"date":if(typeof m=="string"){const B=new Date(m.trim());S=isNaN(B.getTime())?null:B.getTime()}else m instanceof Date?S=m.getTime():S=null;if(typeof y=="string"){const B=new Date(y.trim());C=isNaN(B.getTime())?null:B.getTime()}else y instanceof Date?C=y.getTime():C=null;break;case"number":if(typeof m=="number")S=m;else{const B=String(m).trim(),H=parseFloat(B);S=isNaN(H)?null:H}if(typeof y=="number")C=y;else{const B=String(y).trim(),H=parseFloat(B);C=isNaN(H)?null:H}break;case"string":const k=typeof m=="string"?m:String(m),A=typeof y=="string"?y:String(y);S=k.toLowerCase().trim(),C=A.toLowerCase().trim();break;case"mixed":default:const N=String(m),F=String(y);S=N.toLowerCase().trim(),C=F.toLowerCase().trim();break}return S===null&&C===null?0:S===null?r==="asc"?1:-1:C===null||S<C?r==="asc"?-1:1:S>C?r==="asc"?1:-1:0})};function _c(t,e){return e.split(".").reduce((r,n)=>{if(r&&typeof r=="object"&&n in r)return r[n]},t)}function xc(t,e){const r=e.column;if(r.render)return r.render(t,0);const n=r.accessor??e.id,s=_c(t,n);return s==null?b.jsx(O.Text,{c:"dimmed",children:"–"}):typeof s=="boolean"?b.jsx(O.Text,{fz:"sm",children:s?"Ja":"Nein"}):b.jsx(O.Text,{fz:"sm",children:String(s)})}function Cc(t){const e=Fe.c(10),{field:r,record:n}=t,s=r.column.title??r.id;let l;e[0]!==s?(l=b.jsx(O.Text,{fw:700,fz:"sm",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r||e[3]!==n?(c=xc(n,r),e[2]=r,e[3]=n,e[4]=c):c=e[4];let a;e[5]!==c?(a=b.jsx(O.Box,{ta:"right",children:c}),e[5]=c,e[6]=a):a=e[6];let m;return e[7]!==l||e[8]!==a?(m=b.jsxs(O.Group,{wrap:"nowrap",justify:"space-between",py:"xs",px:"sm",children:[l,a]}),e[7]=l,e[8]=a,e[9]=m):m=e[9],m}function $s(t){const e=Fe.c(39),{records:r,fields:n,selection:s,selectedRecords:l,onSelectedRecordsChange:c,onRowClick:a,pagination:m,sort:y,rowExpansion:_}=t;let M;e[0]!==l?(M=l===void 0?[]:l,e[0]=l,e[1]=M):M=e[1];const S=M;let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=new Set,e[2]=C):C=e[2];const[k,A]=Z.useState(C);let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N=U=>{A(J=>{const se=new Set(J);return se.has(U)?se.delete(U):se.add(U),se})},e[3]=N):N=e[3];const F=N;let B,H,W,te,oe,G;if(e[4]!==k||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==r||e[9]!==_||e[10]!==S||e[11]!==s||e[12]!==y){G=Symbol.for("react.early_return_sentinel");e:{const U=n.filter(Mc),J=U.filter(Pc).map(kc);let se;e[19]!==S?(se=i=>S.some(p=>p.id===i.id),e[19]=S,e[20]=se):se=e[20];const ne=se;let P;e[21]!==ne||e[22]!==c||e[23]!==S?(P=i=>{c&&(ne(i)?c(S.filter(p=>p.id!==i.id)):c([...S,i]))},e[21]=ne,e[22]=c,e[23]=S,e[24]=P):P=e[24];const x=P;let w;e[25]!==a||e[26]!==s||e[27]!==x?(w=(i,p,f)=>{a?a({record:i,index:p,event:f}):s&&x(i)},e[25]=a,e[26]=s,e[27]=x,e[28]=w):w=e[28];const h=w;if(r.length===0){let i;e[29]===Symbol.for("react.memo_cache_sentinel")?(i=b.jsx(O.Text,{c:"dimmed",ta:"center",py:"xl",children:"Keine Einträge gefunden"}),e[29]=i):i=e[29],G=i;break e}B=O.Stack,H="sm",W="md",te=y&&J.length>0&&b.jsxs(O.Group,{gap:"xs",wrap:"nowrap",children:[b.jsx(O.Select,{data:J,value:y.field,onChange:i=>i&&y.onSortChange(i,y.direction),allowDeselect:!1,style:{flex:1}}),b.jsx(O.ActionIcon,{variant:"filled",size:"input-sm",onClick:()=>y.onSortChange(y.field,y.direction==="asc"?"desc":"asc"),children:y.direction==="asc"?b.jsx(ct.IconSortAscending,{size:18}):b.jsx(ct.IconSortDescending,{size:18})})]}),oe=r.map((i,p)=>{const f=ne(i),d=!!a||!!s,v=k.has(i.id);return b.jsx(Z.Fragment,{children:b.jsxs(O.Box,{bg:f?"var(--mantine-primary-color-light)":p%2===0?"var(--mantine-color-gray-0)":"white",bd:f?void 0:"1px solid var(--mantine-color-gray-2)",style:{borderRadius:"var(--mantine-radius-md)",overflow:"hidden"},children:[b.jsxs(O.Box,{w:"100%",style:{cursor:d||_?"pointer":"default"},onClick:D=>{_&&!a?F(i.id):h(i,p,D)},children:[(s||_)&&b.jsxs(O.Group,{px:"sm",pt:"sm",justify:"space-between",children:[s?b.jsx(O.Checkbox,{checked:f,onChange:()=>x(i),onClick:Dc}):b.jsx("span",{}),_&&b.jsx(O.Box,{c:"dimmed",style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:D=>{D.stopPropagation(),F(i.id)},children:b.jsx(ct.IconChevronDown,{size:16,style:{transform:v?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms"}})})]}),U.map((D,T)=>b.jsxs(Z.Fragment,{children:[T>0&&b.jsx(O.Divider,{}),b.jsx(Cc,{field:D,record:i})]},D.id))]}),_&&b.jsxs(O.Collapse,{in:v,children:[b.jsx(O.Divider,{}),b.jsx(O.Box,{px:"sm",py:"sm",children:_.content(i)})]})]})},i.id)})}e[4]=k,e[5]=n,e[6]=a,e[7]=c,e[8]=r,e[9]=_,e[10]=S,e[11]=s,e[12]=y,e[13]=B,e[14]=H,e[15]=W,e[16]=te,e[17]=oe,e[18]=G}else B=e[13],H=e[14],W=e[15],te=e[16],oe=e[17],G=e[18];if(G!==Symbol.for("react.early_return_sentinel"))return G;let K;e[30]!==m?(K=m&&m.totalRecords>m.recordsPerPage&&b.jsxs(O.Stack,{gap:"xs",mt:"sm",children:[b.jsx(O.Group,{justify:"center",children:b.jsx(O.Pagination,{total:Math.ceil(m.totalRecords/m.recordsPerPage),value:m.page,onChange:m.onPageChange,size:"sm"})}),m.recordsPerPageOptions&&m.onRecordsPerPageChange&&b.jsxs(O.Group,{justify:"center",gap:"xs",children:[b.jsx(O.Text,{fz:"xs",c:"dimmed",children:"Einträge pro Seite:"}),b.jsx(O.Select,{data:m.recordsPerPageOptions.map(Sc),value:String(m.recordsPerPage),onChange:U=>U&&m.onRecordsPerPageChange(Number(U)),allowDeselect:!1,size:"xs",w:70})]})]}),e[30]=m,e[31]=K):K=e[31];let V;return e[32]!==B||e[33]!==K||e[34]!==H||e[35]!==W||e[36]!==te||e[37]!==oe?(V=b.jsxs(B,{gap:H,my:W,children:[te,oe,K]}),e[32]=B,e[33]=K,e[34]=H,e[35]=W,e[36]=te,e[37]=oe,e[38]=V):V=e[38],V}function Sc(t){return{value:String(t),label:String(t)}}function Dc(t){return t.stopPropagation()}function kc(t){return{value:t.column.accessor??t.id,label:t.column.title??t.id}}function Pc(t){return t.column.sortable!==!1}function Mc(t){return t.list&&t.column}const Sn=[10,15,50,100,500];function Oc(t){const e=Fe.c(116),{title:r,queryKey:n,connectedQueryKeys:s,apiPath:l,mutationApiPath:c,buttons:a,fields:m,selection:y,pagination:_,filters:M,actions:S,steps:C,defaultSort:k,onSortChange:A,createButtonText:N,queryParams:F,tabs:B,defaultTab:H,activeTab:W,onActiveTabChange:te,canUpdate:oe,canDelete:G,showRefresh:K,rowExpansion:V,onRowClick:U,mobileCards:J}=t,se=K===void 0?!0:K,ne=J===void 0?!1:J,[P,x]=Z.useState(H||(B&&B.length>0?B[0].value:null)),w=W!==void 0?W:P;let h;e[0]!==W||e[1]!==te?(h=De=>{W===void 0&&x(De),te&&te(De)},e[0]=W,e[1]=te,e[2]=h):h=e[2];const i=h,p=B?.find(De=>De.value===w)?.queryParams||{},f={...F,...p},d=f?"?"+Object.entries(f).filter(Yc).map(Ic).join("&"):"";let v;e[3]!==w||e[4]!==n?(v=w?[...n,w]:n,e[3]=w,e[4]=n,e[5]=v):v=e[5];const D=v,{data:T,isLoading:q,isError:X,isRefetching:re,refetch:ee}=Vo(l+d,D),{queryClient:ae}=ft();let ie,ue;e[6]!==T||e[7]!==s||e[8]!==ae?(ie=()=>{!T||!Array.isArray(T)||s?.forEach(De=>ae.invalidateQueries({queryKey:De}))},ue=[T,s,ae],e[6]=T,e[7]=s,e[8]=ae,e[9]=ie,e[10]=ue):(ie=e[9],ue=e[10]),Z.useEffect(ie,ue);const E=!T||!Array.isArray(T)?[]:!M||M.length===0?T:T.filter(De=>M.every(ke=>{if(ke.value===void 0)return!0;const ut=ke.id;if(ke.type==="query"){const Ce=De[ut];return Array.isArray(ke.value)?Array.isArray(Ce)?Ce.some(_e=>{if(typeof _e=="string"||typeof _e=="number")return ke.value.includes(String(_e));if(_e&&typeof _e=="object"){if("id"in _e&&ke.value.includes(_e.id))return!0;for(const ze in _e){const Ee=_e[ze];if(typeof Ee=="string"&&ke.value.includes(Ee)||Ee&&typeof Ee=="object"&&"id"in Ee&&ke.value.includes(Ee.id))return!0}}return!1}):Ce&&typeof Ce=="object"&&"id"in Ce?ke.value.includes(Ce.id):!1:typeof Ce=="string"&&Ce.includes(ke.value)}else if(ke.type==="date"){const Ce=ke.value;if(!Ce)return!0;const[_e,ze]=Ce;if(!_e&&!ze)return!0;const Ee=De[ut];if(typeof Ee=="string"){const Et=Ee.split(" ")[0];if(_e&&ze)return Et>=_e&&Et<=ze;if(_e&&!ze)return Et>=_e;if(!_e&&ze)return Et<=ze}return!0}else if(ke.type==="boolean")return De[ut]===ke.value;return!0})),L=k?.field??m[0].id,R=k?.direction??"desc";let Y;e[11]!==L||e[12]!==R?(Y={columnAccessor:L,direction:R},e[11]=L,e[12]=R,e[13]=Y):Y=e[13];const[I,ce]=Z.useState(Y);let o;e[14]!==A?(o=De=>{ce(De),A&&A(String(De.columnAccessor),De.direction)},e[14]=A,e[15]=o):o=e[15];const u=o,g=Rs(E,I.columnAccessor,I.direction),[j,$]=Es(Sn[1],"mantine-table-page-size"),[z,le]=Z.useState(1),he=_?g.slice((z-1)*j,z*j):g;let pe;e[16]===Symbol.for("react.memo_cache_sentinel")?(pe=[],e[16]=pe):pe=e[16];const[Q,fe]=Z.useState(pe);let me;e[17]===Symbol.for("react.memo_cache_sentinel")?(me=()=>{fe([])},e[17]=me):me=e[17];let ge;e[18]!==w?(ge=[w],e[18]=w,e[19]=ge):ge=e[19],Z.useEffect(me,ge);const[Se,xe]=Z.useState(!1),[Pe,Ve]=Z.useState(!1),[Ne,Me]=Z.useState(!1),Ct=r?"space-between":"end";let Te;e[20]!==r?(Te=r&&(typeof r=="string"?b.jsx(O.Title,{order:4,children:r}):r),e[20]=r,e[21]=Te):Te=e[21];let rt;e[22]===Symbol.for("react.memo_cache_sentinel")?(rt={marginLeft:"auto"},e[22]=rt):rt=e[22];let Ye;e[23]!==ee||e[24]!==se?(Ye=se&&b.jsx(O.ActionIcon,{variant:"subtle",onClick:()=>ee(),"aria-label":"Neuladen",children:b.jsx(ct.IconRefresh,{})}),e[23]=ee,e[24]=se,e[25]=Ye):Ye=e[25];let et;e[26]!==S||e[27]!==G||e[28]!==oe||e[29]!==m||e[30]!==Q||e[31]!==y?(et=(m.some(Bc)||y)&&(()=>{const De=m.find(Lc)&&(!oe||Q.length>0&&oe(Q[0])),ke=m.find(Nc)&&(!G||Q.length>0&&G(Q[0])),ut=(S??[]).length>0,Ce=De||ke||ut;return b.jsxs(O.Menu,{shadow:"md",children:[b.jsx(O.Menu.Target,{children:b.jsx(O.Button,{variant:"outline",rightSection:b.jsx(ct.IconCaretDownFilled,{size:14}),disabled:!Q.length||!Ce,children:"Aktionen"})}),b.jsxs(O.Menu.Dropdown,{children:[De&&b.jsx(O.Menu.Item,{leftSection:b.jsx(ct.IconPencil,{size:14}),onClick:()=>Ve(!0),disabled:Q.length!==1,children:"Bearbeiten"}),(S??[]).map((_e,ze)=>Z.createElement(O.Menu.Item,{..._e.icon&&{leftSection:_e.icon},key:`custom_action_${ze}`,onClick:()=>_e.onClick(Q)},_e.label)),ke&&b.jsx(O.Menu.Item,{leftSection:b.jsx(ct.IconTrash,{size:14}),onClick:()=>Me(!0),color:"red",children:"Löschen"})]})]})})(),e[26]=S,e[27]=G,e[28]=oe,e[29]=m,e[30]=Q,e[31]=y,e[32]=et):et=e[32];let nt;e[33]!==N||e[34]!==m||e[35]!==q?(nt=m.find($c)&&b.jsx(O.Button,{onClick:()=>xe(!0),disabled:q,children:N??"Erstellen"}),e[33]=N,e[34]=m,e[35]=q,e[36]=nt):nt=e[36];let Re;e[37]!==a||e[38]!==Ye||e[39]!==et||e[40]!==nt?(Re=b.jsxs(O.Group,{align:"center",gap:"xs",wrap:"wrap",justify:"end",style:rt,children:[Ye,et,nt,a]}),e[37]=a,e[38]=Ye,e[39]=et,e[40]=nt,e[41]=Re):Re=e[41];let ot;e[42]!==Ct||e[43]!==Te||e[44]!==Re?(ot=b.jsxs(O.Group,{gap:"xs",justify:Ct,align:"center",wrap:"wrap",children:[Te,Re]}),e[42]=Ct,e[43]=Te,e[44]=Re,e[45]=ot):ot=e[45];let st;e[46]!==w||e[47]!==i||e[48]!==B?(st=B&&B.length>0&&b.jsx(O.Tabs,{value:w,onChange:i,mt:"md",children:b.jsx(O.Tabs.List,{children:B.map(Rc)})}),e[46]=w,e[47]=i,e[48]=B,e[49]=st):st=e[49];let He;e[50]!==X?(He=X&&b.jsx(O.Alert,{mt:"md",variant:"light",color:"red",title:"Es ist ein Fehler aufgetreten.",icon:b.jsx(ct.IconInfoCircle,{}),children:"Bitte versuche es später erneut oder sende eine Nachricht an unseren Support."}),e[50]=X,e[51]=He):He=e[51];let Ge;e[52]!==q||e[53]!==re?(Ge=(q||re)&&b.jsxs(O.Stack,{my:"md",children:[b.jsx(O.Skeleton,{height:40}),Array(5).fill(0).map(Tc)]}),e[52]=q,e[53]=re,e[54]=Ge):Ge=e[54];let Qe;e[55]!==m||e[56]!==u||e[57]!==X||e[58]!==q||e[59]!==re||e[60]!==ne||e[61]!==U||e[62]!==z||e[63]!==j||e[64]!==_||e[65]!==he||e[66]!==V||e[67]!==Q||e[68]!==y||e[69]!==le||e[70]!==$||e[71]!==I||e[72]!==g?(Qe=!q&&!re&&b.jsxs(b.Fragment,{children:[b.jsx(O.Box,{...ne?{visibleFrom:"sm"}:{},children:b.jsx(fc,{my:"md",striped:!0,highlightOnHover:!0,minHeight:150,fetching:X,records:he,sortStatus:I,onSortStatusChange:u,...y&&{selectedRecords:Q,onSelectedRecordsChange:fe},..._&&he.length&&{totalRecords:g.length,recordsPerPage:j,onPageChange:le,page:z,recordsPerPageOptions:Sn,onRecordsPerPageChange:$,recordsPerPageLabel:"Einträge pro Seite"},...V&&{rowExpansion:{allowMultiple:V.allowMultiple??!1,content:De=>{const{record:ke}=De;return V.content(ke)},...V.expanded&&{expanded:V.expanded}}},columns:m.map(Ec),noRecordsText:"Keine Einträge gefunden",onRowClick:U,...U&&{style:{cursor:"pointer"}}})}),ne&&b.jsx(O.Box,{hiddenFrom:"sm",children:b.jsx($s,{records:he,fields:m,selection:y,selectedRecords:Q,onSelectedRecordsChange:fe,onRowClick:U,sort:{field:String(I.columnAccessor),direction:I.direction,onSortChange:(De,ke)=>{u({columnAccessor:De,direction:ke})}},..._&&he.length&&{pagination:{totalRecords:g.length,recordsPerPage:j,page:z,onPageChange:le,recordsPerPageOptions:Sn,onRecordsPerPageChange:De=>{$(De),le(1)}}},...V&&{rowExpansion:{content:V.content}}})})]}),e[55]=m,e[56]=u,e[57]=X,e[58]=q,e[59]=re,e[60]=ne,e[61]=U,e[62]=z,e[63]=j,e[64]=_,e[65]=he,e[66]=V,e[67]=Q,e[68]=y,e[69]=le,e[70]=$,e[71]=I,e[72]=g,e[73]=Qe):Qe=e[73];let it;e[74]===Symbol.for("react.memo_cache_sentinel")?(it=()=>{Ve(!1),fe([])},e[74]=it):it=e[74];const yt=r??"Bearbeiten";let at;e[75]!==l||e[76]!==m||e[77]!==c||e[78]!==n||e[79]!==Q[0]||e[80]!==Q.length||e[81]!==C?(at=Q.length>0&&b.jsx(As,{fields:m.filter(jc),queryKey:n,apiPath:c??l,id:Q[0].id,onClose:()=>{Ve(!1),fe([])},steps:C}),e[75]=l,e[76]=m,e[77]=c,e[78]=n,e[79]=Q[0],e[80]=Q.length,e[81]=C,e[82]=at):at=e[82];let ve;e[83]!==yt||e[84]!==at||e[85]!==Pe?(ve=b.jsx(O.Modal,{opened:Pe,onClose:it,title:yt,children:at}),e[83]=yt,e[84]=at,e[85]=Pe,e[86]=ve):ve=e[86];let Oe;e[87]!==l||e[88]!==Ne||e[89]!==c||e[90]!==n||e[91]!==Q||e[92]!==r?(Oe=Q.length>0&&b.jsx(O.Modal,{opened:Ne,onClose:()=>{Me(!1),fe([])},title:r??"Löschen",children:b.jsx(js,{onClose:()=>{Me(!1),fe([])},queryKey:n,apiPath:c??l,selectedRecords:Q})}),e[87]=l,e[88]=Ne,e[89]=c,e[90]=n,e[91]=Q,e[92]=r,e[93]=Oe):Oe=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=()=>{xe(!1)},e[94]=tt):tt=e[94];const vt=r??"Anlegen",Qt=c??l;let jt;e[95]===Symbol.for("react.memo_cache_sentinel")?(jt=()=>{xe(!1)},e[95]=jt):jt=e[95];let bt;e[96]!==m?(bt=m.filter(Ac),e[96]=m,e[97]=bt):bt=e[97];let Ze;e[98]!==n||e[99]!==C||e[100]!==Qt||e[101]!==bt?(Ze=b.jsx(ms,{queryKey:n,apiPath:Qt,onClose:jt,fields:bt,steps:C}),e[98]=n,e[99]=C,e[100]=Qt,e[101]=bt,e[102]=Ze):Ze=e[102];let wt;e[103]!==Se||e[104]!==vt||e[105]!==Ze?(wt=b.jsx(O.Modal,{opened:Se,onClose:tt,title:vt,children:Ze}),e[103]=Se,e[104]=vt,e[105]=Ze,e[106]=wt):wt=e[106];let lt;return e[107]!==ot||e[108]!==st||e[109]!==He||e[110]!==Ge||e[111]!==Qe||e[112]!==ve||e[113]!==Oe||e[114]!==wt?(lt=b.jsxs(b.Fragment,{children:[ot,st,He,Ge,Qe,ve,Oe,wt]}),e[107]=ot,e[108]=st,e[109]=He,e[110]=Ge,e[111]=Qe,e[112]=ve,e[113]=Oe,e[114]=wt,e[115]=lt):lt=e[115],lt}function Ac(t){return t.create}function jc(t){return t.update}function Ec(t){return t.column}function Tc(t,e){return b.jsx(O.Skeleton,{height:35},`skeleton-${e}`)}function Rc(t){return b.jsx(O.Tabs.Tab,{value:t.value,leftSection:t.icon,children:t.label},t.value)}function $c(t){return t.create}function Nc(t){return t.delete}function Lc(t){return t.update}function Bc(t){return t.update}function Ic(t){const[e,r]=t;return`${e}=${encodeURIComponent(r??"")}`}function Yc(t){const[,e]=t;return e!=null}function zc(t){const e=Fe.c(5),{queryClient:r}=ft();let n;e[0]!==t?(n=b.jsx(Oc,{...t}),e[0]=t,e[1]=n):n=e[1];let s;return e[2]!==r||e[3]!==n?(s=b.jsx(Zn,{client:r,children:n}),e[2]=r,e[3]=n,e[4]=s):s=e[4],s}be.CreateModal=ms,be.DataTable=zc,be.DataTableProvider=ml,be.DeleteModal=js,be.MobileCardList=$s,be.UpdateModal=As,be.api=vl,be.createOne=Wo,be.deleteOne=Fo,be.getAll=Yo,be.getApiHeaders=xt,be.getOne=zo,be.sortData=Rs,be.updateOne=Uo,be.useAddOne=Ho,be.useDataTable=ft,be.useDeleteOne=Go,be.useGetAll=Vo,be.useGetOne=qo,be.usePersistentState=Es,be.useUpdateOne=ln,Object.defineProperty(be,Symbol.toStringTag,{value:"Module"})}));
24
24
  //# sourceMappingURL=index.umd.js.map