diff --git a/app.md b/app.md index 632375f..459ea65 100644 --- a/app.md +++ b/app.md @@ -2,7 +2,7 @@ name: kanban lang: go domain: tools -version: 0.2.0 +version: 0.3.0 description: "Kanban board con persistencia SQLite, drag-and-drop entre columnas (dnd-kit) y tracking del tiempo que cada tarjeta pasa en cada columna. Frontend Vite + React + Mantine v9 embebido en el binario Go." tags: [service, kanban, web, dnd-kit, mantine, sqlite, time-tracking] uses_functions: diff --git a/backend/dist/assets/index-CFDWXN9Z.js b/backend/dist/assets/index-UVzY_37O.js similarity index 54% rename from backend/dist/assets/index-CFDWXN9Z.js rename to backend/dist/assets/index-UVzY_37O.js index 31f9280..7844e5e 100644 --- a/backend/dist/assets/index-CFDWXN9Z.js +++ b/backend/dist/assets/index-UVzY_37O.js @@ -1,4 +1,4 @@ -function sK(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var Dv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rk={exports:{}},eh={};/** +function gK(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var Nv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ok={exports:{}},ih={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ function sK(e,n){for(var t=0;t{ak(i[r])&&r in e?t[r]=R6(t[r],i[r]):t[r]=i[r]}),t}function cK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function fK(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function Vh(e){const n=fK(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function g5(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function uz(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?g5(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?g5(a):a}}return i}return t}const he=uz("rem",{shouldScale:!0}),Og=uz("em");function Tu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function cz(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var ok={exports:{}},Rn={};/** + */var g5;function yK(){if(g5)return ih;g5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return ih.Fragment=n,ih.jsx=t,ih.jsxs=t,ih}var y5;function bK(){return y5||(y5=1,ok.exports=yK()),ok.exports}var g=bK();function Pt(e){return Object.keys(e)}function sk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function P6(e,n){const t={...e},i=n;return sk(e)&&sk(n)&&Object.keys(n).forEach(r=>{sk(i[r])&&r in e?t[r]=P6(t[r],i[r]):t[r]=i[r]}),t}function wK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function kK(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function Yh(e){const n=kK(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function b5(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function vz(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?b5(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?b5(a):a}}return i}return t}const me=vz("rem",{shouldScale:!0}),Tg=vz("em");function Tu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function gz(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var lk={exports:{}},Nn={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ function sK(e,n){for(var t=0;t{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function w5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function jg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function hK(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function mK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const c=Array.from(((b=jg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>pK(l.currentTarget,w,e)),f=c.findIndex(w=>l.currentTarget===w),h=mK(f,c,i),d=hK(f,c,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),c[p].focus(),r&&c[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),c[v].focus(),r&&c[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),c[d].focus(),r&&c[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),c[h].focus(),r&&c[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!c[0].disabled&&c[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=c.length-1;!c[w].disabled&&c[w].focus();break}}}}const vK={app:100,modal:200,popover:300,overlay:400,max:9999};function wa(e){return vK[e]}const dS=()=>{};function gK(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||dS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function zn(e,n="size",t=!0){if(e!==void 0)return cz(e)?t?he(e):e:`var(--${n}-${e})`}function Ht(e){return zn(e,"mantine-spacing")}function Wt(e){return e===void 0?"var(--mantine-radius-default)":zn(e,"mantine-radius")}function ii(e){return zn(e,"mantine-font-size")}function yK(e){return zn(e,"mantine-line-height",!1)}function z6(e){if(e)return zn(e,"mantine-shadow",!1)}function br(e,n){return t=>{e==null||e(t),n==null||n(t)}}function L6(e,n){return e in n?Vh(n[e]):Vh(e)}function Wh(e,n){const t=e.map(i=>({value:i,px:L6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Hr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function bK(e,n,t){var i;return t?Array.from(((i=jg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Ko(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function al(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function wh(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function oy(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=wh(e),l=A.useRef(0),c=A.useRef(0),f=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),f.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(c.current),l.current=0,c.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(l.current!==0){const C=f.current;b(),o(...C)}},a))}if(r&&v){o(...p);const C=()=>{b()},x=()=>{l.current!==0&&(b(),o(...p))},E=()=>{b()};d.flush=x,d.cancel=E,l.current=window.setTimeout(C,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const C=()=>{l.current!==0&&(b(),o(...p))},x=()=>{b()};d.flush=C,d.cancel=x;const E=()=>{b()};l.current=window.setTimeout(E,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(b(),o(...p))},_=()=>{b()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const wK=["mousedown","touchstart"];function kK(e,n,t,i=!0){const r=A.useRef(null),a=n||wK,o=A.useEffectEvent(c=>{const{target:f}=c??{};if(!document.body.contains(f)&&(f==null?void 0:f.tagName)!=="HTML")return;const h=c.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(c):r.current&&!h.includes(r.current)&&e(c)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const c=l.split(",");return c.forEach(f=>document.addEventListener(f,o)),()=>{c.forEach(f=>document.removeEventListener(f,o))}},[l,i]),r}function _K(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function xK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:_K(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const us=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ts(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function dz({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return ts(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const SK=/input|select|textarea|button|object/,hz="a, input, select, textarea, button, object, [tabindex]";function CK(e){return e.style.display==="none"}function AK(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(CK(n))return!1;n=n.parentNode}return!0}function mz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function hS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(mz(e));return(SK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&AK(e)}function pz(e){const n=mz(e);return(Number.isNaN(n)||n>=0)&&hS(e)}function OK(e){return Array.from(e.querySelectorAll(hz)).filter(pz)}function jK(e,n){const t=OK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(c=>c.getAttribute("type")==="radio"&&c.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function EK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(hz));a=o.find(pz)||o.find(hS)||null,!a&&hS(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&jK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const TK=e=>(e+1)%1e6;function MK(){const[,e]=A.useReducer(TK,0);return e}function Vi(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return us(()=>{t(al())},[]),typeof e=="string"?e:n}function vz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function Eg(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function DK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=Eg(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():Eg(i,null)}),n.clear()}}}function Gt(...e){return A.useCallback(DK(...e),e)}function gz(e){return{x:Ko(e.x,0,1),y:Ko(e.y,0,1)}}function yz(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,c]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var f;(f=o.current)==null||f.call(o)}),[]),{ref:A.useCallback(f=>{const h=({x,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&f){f.style.userSelect="none";const O=f.getBoundingClientRect();if(O.width&&O.height){const j=Ko((x-O.left)/O.width,0,1);e({x:t==="ltr"?j:1-j,y:Ko((E-O.top)/O.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),c(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,c(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=x=>{v(),x.preventDefault(),k(x)},k=x=>h({x:x.clientX,y:x.clientY}),_=x=>{x.cancelable&&x.preventDefault(),v(),C(x)},C=x=>{x.cancelable&&x.preventDefault(),h({x:x.changedTouches[0].clientX,y:x.changedTouches[0].clientY})};return f==null||f.addEventListener("mousedown",w),f==null||f.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{f&&(f.removeEventListener("mousedown",w),f.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Pi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...c)=>{a(l),i==null||i(l,...c)};return e!==void 0?[e,i,!0]:[r,o,!1]}function I6(e,n){return xK("(prefers-reduced-motion: reduce)",e,n)}function bz(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function RK(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var sk={exports:{}},Ki={};/** + */var w5;function _K(){if(w5)return Nn;w5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(W){return W===null||typeof W!="object"?null:(W=p&&W[p]||W["@@iterator"],typeof W=="function"?W:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(W,G,z){this.props=W,this.context=G,this.refs=k,this.updater=z||b}_.prototype.isReactComponent={},_.prototype.setState=function(W,G){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,G,"setState")},_.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function C(){}C.prototype=_.prototype;function x(W,G,z){this.props=W,this.context=G,this.refs=k,this.updater=z||b}var E=x.prototype=new C;E.constructor=x,w(E,_.prototype),E.isPureReactComponent=!0;var j=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function q(W,G,z){var X=z.ref;return{$$typeof:e,type:W,key:G,ref:X!==void 0?X:null,props:z}}function R(W,G){return q(W.type,G,W.props)}function L(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function F(W){var G={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(z){return G[z]})}var Y=/\/+/g;function V(W,G){return typeof W=="object"&&W!==null&&W.key!=null?F(""+W.key):G.toString(36)}function $(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(O,O):(W.status="pending",W.then(function(G){W.status==="pending"&&(W.status="fulfilled",W.value=G)},function(G){W.status==="pending"&&(W.status="rejected",W.reason=G)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function P(W,G,z,X,ee){var re=typeof W;(re==="undefined"||re==="boolean")&&(W=null);var le=!1;if(W===null)le=!0;else switch(re){case"bigint":case"string":case"number":le=!0;break;case"object":switch(W.$$typeof){case e:case n:le=!0;break;case h:return le=W._init,P(le(W._payload),G,z,X,ee)}}if(le)return ee=ee(W),le=X===""?"."+V(W,0):X,j(ee)?(z="",le!=null&&(z=le.replace(Y,"$&/")+"/"),P(ee,G,z,"",function(ue){return ue})):ee!=null&&(L(ee)&&(ee=R(ee,z+(ee.key==null||W&&W.key===ee.key?"":(""+ee.key).replace(Y,"$&/")+"/")+le)),G.push(ee)),1;le=0;var ye=X===""?".":X+":";if(j(W))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function _5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Mg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function xK(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function SK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const c=Array.from(((b=Mg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>CK(l.currentTarget,w,e)),f=c.findIndex(w=>l.currentTarget===w),h=SK(f,c,i),d=xK(f,c,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),c[p].focus(),r&&c[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),c[v].focus(),r&&c[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),c[d].focus(),r&&c[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),c[h].focus(),r&&c[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!c[0].disabled&&c[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=c.length-1;!c[w].disabled&&c[w].focus();break}}}}const AK={app:100,modal:200,popover:300,overlay:400,max:9999};function Sa(e){return AK[e]}const mS=()=>{};function jK(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||mS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Bn(e,n="size",t=!0){if(e!==void 0)return gz(e)?t?me(e):e:`var(--${n}-${e})`}function Vt(e){return Bn(e,"mantine-spacing")}function Yt(e){return e===void 0?"var(--mantine-radius-default)":Bn(e,"mantine-radius")}function ri(e){return Bn(e,"mantine-font-size")}function OK(e){return Bn(e,"mantine-line-height",!1)}function L6(e){if(e)return Bn(e,"mantine-shadow",!1)}function Sr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function I6(e,n){return e in n?Yh(n[e]):Yh(e)}function Kh(e,n){const t=e.map(i=>({value:i,px:I6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Wr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function EK(e,n,t){var i;return t?Array.from(((i=Mg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function ns(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function cl(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function xh(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function ly(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=xh(e),l=A.useRef(0),c=A.useRef(0),f=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),f.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(c.current),l.current=0,c.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(l.current!==0){const C=f.current;b(),o(...C)}},a))}if(r&&v){o(...p);const C=()=>{b()},x=()=>{l.current!==0&&(b(),o(...p))},E=()=>{b()};d.flush=x,d.cancel=E,l.current=window.setTimeout(C,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const C=()=>{l.current!==0&&(b(),o(...p))},x=()=>{b()};d.flush=C,d.cancel=x;const E=()=>{b()};l.current=window.setTimeout(E,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(b(),o(...p))},_=()=>{b()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const TK=["mousedown","touchstart"];function MK(e,n,t,i=!0){const r=A.useRef(null),a=n||TK,o=A.useEffectEvent(c=>{const{target:f}=c??{};if(!document.body.contains(f)&&(f==null?void 0:f.tagName)!=="HTML")return;const h=c.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(c):r.current&&!h.includes(r.current)&&e(c)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const c=l.split(",");return c.forEach(f=>document.addEventListener(f,o)),()=>{c.forEach(f=>document.removeEventListener(f,o))}},[l,i]),r}function DK(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function RK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:DK(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const ps=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ls(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function bz({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return ls(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const PK=/input|select|textarea|button|object/,wz="a, input, select, textarea, button, object, [tabindex]";function NK(e){return e.style.display==="none"}function $K(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(NK(n))return!1;n=n.parentNode}return!0}function kz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function pS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(kz(e));return(PK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&$K(e)}function _z(e){const n=kz(e);return(Number.isNaN(n)||n>=0)&&pS(e)}function zK(e){return Array.from(e.querySelectorAll(wz)).filter(_z)}function LK(e,n){const t=zK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(c=>c.getAttribute("type")==="radio"&&c.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function IK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(wz));a=o.find(_z)||o.find(pS)||null,!a&&pS(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&LK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const BK=e=>(e+1)%1e6;function FK(){const[,e]=A.useReducer(BK,0);return e}function Vi(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return ps(()=>{t(cl())},[]),typeof e=="string"?e:n}function xz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function Dg(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function qK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=Dg(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():Dg(i,null)}),n.clear()}}}function Kt(...e){return A.useCallback(qK(...e),e)}function Sz(e){return{x:ns(e.x,0,1),y:ns(e.y,0,1)}}function Cz(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,c]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var f;(f=o.current)==null||f.call(o)}),[]),{ref:A.useCallback(f=>{const h=({x,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&f){f.style.userSelect="none";const j=f.getBoundingClientRect();if(j.width&&j.height){const O=ns((x-j.left)/j.width,0,1);e({x:t==="ltr"?O:1-O,y:ns((E-j.top)/j.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),c(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,c(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=x=>{v(),x.preventDefault(),k(x)},k=x=>h({x:x.clientX,y:x.clientY}),_=x=>{x.cancelable&&x.preventDefault(),v(),C(x)},C=x=>{x.cancelable&&x.preventDefault(),h({x:x.changedTouches[0].clientX,y:x.changedTouches[0].clientY})};return f==null||f.addEventListener("mousedown",w),f==null||f.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{f&&(f.removeEventListener("mousedown",w),f.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Ci({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...c)=>{a(l),i==null||i(l,...c)};return e!==void 0?[e,i,!0]:[r,o,!1]}function B6(e,n){return RK("(prefers-reduced-motion: reduce)",e,n)}function Az(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function HK(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var uk={exports:{}},Yi={};/** * @license React * react-dom.production.js * @@ -22,16 +22,16 @@ function sK(e,n){for(var t=0;t"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),sk.exports=PK(),sk.exports}var Qs=wz();const kh=pt(Qs);function NK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function $K(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});us(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>NK(`${e}:${String(i)}`,r[0])}return[n,t]}var zK={};function LK(){return"development"}function sy(e){var t;const n=Q.version;return typeof Q.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function dg(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=dn(n[i],r):n[i]=r})}),n}function Gh({theme:e,classNames:n,props:t,stylesCtx:i}){return BK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||IK))}function Tg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function x5(e){return e==="auto"||e==="dark"||e==="light"}function FK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return x5(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&x5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Yh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function qK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function HK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function UK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function VK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,c=o*(1-Math.abs(l%2-1)),f=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=c,p=0):l>=1&&l<2?(h=c,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=c):l>=3&&l<4?(h=0,d=c,p=o):l>=4&&l<5?(h=c,d=0,p=o):(h=o,d=0,p=c),{r:Math.round((h+f)*255),g:Math.round((d+f)*255),b:Math.round((p+f)*255),a:a||1}}function B6(e){return qK(e)?HK(e):e.startsWith("rgb")?UK(e):e.startsWith("hsl")?VK(e):{r:0,g:0,b:0,a:1}}function lk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function WK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function _z(e){if(e.startsWith("oklch("))return(WK(e)||0)/100;const{r:n,g:t,b:i}=B6(e),r=n/255,a=t/255,o=i/255,l=lk(r),c=lk(a),f=lk(o);return .2126*l+.7152*c+.0722*f}function nh(e,n=.179){return e.startsWith("var(")?!1:_z(e)>n}function cs({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:nh(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:nh(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:nh(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Yh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:nh(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:nh(e,n.luminanceThreshold),shade:a,variable:void 0}}function lt(e,n){const t=cs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function ru(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=B6(e),o=1-n,l=c=>Math.round(c*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function mS(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=lt(t.from,n),r=lt(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Ws(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=B6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const S5=Ws,GK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=cs({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${he(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${he(1)} solid transparent`}:{background:e,hover:ru(e,.1),color:l,border:`${he(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:ru(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${he(1)} solid transparent`}}return{background:Ws(e,.1),hover:Ws(e,.12),color:e,border:`${he(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${he(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Ws(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Ws(e,.05),color:e,border:`${he(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Ws(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}}return{background:"transparent",hover:Ws(e,.12),color:e,border:`${he(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${he(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${he(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${he(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:e,border:`${he(1)} solid transparent`}:t==="gradient"?{background:mS(i,n),hover:mS(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${he(1)} solid var(--mantine-color-default-border)`}:{}};function Df({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&cs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function C5(e,n){return Df({color:e.colors[e.primaryColor][Yh(e,n)],theme:e,autoContrast:null})}function qm(e,n){return typeof e=="boolean"?e:n.autoContrast}const xz=A.createContext(null);function go(){const e=A.use(xz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function YK(){return go().cssVariablesResolver}function KK(){return go().classNamesPrefix}function F6(){return go().getStyleNonce}function XK(){return go().withStaticClasses}function ZK(){return go().headless}function QK(){var e;return(e=go().stylesTransform)==null?void 0:e.sx}function JK(){var e;return(e=go().stylesTransform)==null?void 0:e.styles}function Hm(){return go().env||"default"}function eX(){return go().deduplicateInlineStyles}function Cc(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function nX({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,c=A.useCallback(h=>{i||(Cc(h,t),o(h),e.set(h))},[e.set,l,i]),f=A.useCallback(()=>{o(n),Cc(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),us(()=>{Cc(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return Cc(i,t),()=>{};i===void 0&&Cc(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&Cc(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:c,clearColorScheme:f}}const tX={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},A5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",q6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:tX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:GK,autoContrast:!1,luminanceThreshold:.3,fontFamily:A5,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:A5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:he(34),lineHeight:"1.3"},h2:{fontSize:he(26),lineHeight:"1.35"},h3:{fontSize:he(22),lineHeight:"1.4"},h4:{fontSize:he(18),lineHeight:"1.45"},h5:{fontSize:he(16),lineHeight:"1.5"},h6:{fontSize:he(14),lineHeight:"1.5"}}},fontSizes:{xs:he(12),sm:he(14),md:he(16),lg:he(18),xl:he(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:he(2),sm:he(4),md:he(8),lg:he(16),xl:he(32)},spacing:{xs:he(10),sm:he(12),md:he(16),lg:he(20),xl:he(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), 0 ${he(1)} ${he(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(10)} ${he(15)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(7)} ${he(7)} ${he(-5)}`,md:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(20)} ${he(25)} ${he(-5)}, rgba(0, 0, 0, 0.04) 0 ${he(10)} ${he(10)} ${he(-5)}`,lg:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(28)} ${he(23)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(12)} ${he(12)} ${he(-7)}`,xl:`0 ${he(1)} ${he(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${he(36)} ${he(28)} ${he(-7)}, rgba(0, 0, 0, 0.04) 0 ${he(17)} ${he(17)} ${he(-7)}`},other:{},components:{}},iX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",O5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function uk(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function j5(e){if(!(e.primaryColor in e.colors))throw new Error(iX);if(typeof e.primaryShade=="object"&&(!uk(e.primaryShade.dark)||!uk(e.primaryShade.light)))throw new Error(O5);if(typeof e.primaryShade=="number"&&!uk(e.primaryShade))throw new Error(O5)}function rX(e,n){var i;if(!n)return j5(e),e;const t=R6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),j5(t),t}const H6=A.createContext(null),aX=()=>A.use(H6)||q6;function ui(){const e=A.use(H6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function Sz({theme:e,children:n,inherit:t=!0}){const i=aX();return y.jsx(H6,{value:A.useMemo(()=>rX(t?i:q6,e),[e,i,t]),children:n})}Sz.displayName="@mantine/core/MantineThemeProvider";function ck(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function Cz(e,n){const t=n?[n]:[":root",":host"],i=ck(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=ck(e.dark),o=ck(e.light),l=c=>t.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${c}"])`:`${f}[data-mantine-color-scheme="${c}"]`).join(", ");return`${r} + */var x5;function UK(){if(x5)return Yi;x5=1;var e=N6();function n(c){var f="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),uk.exports=UK(),uk.exports}var il=jz();const Sh=yt(il);function VK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function WK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ps(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>VK(`${e}:${String(i)}`,r[0])}return[n,t]}var GK={};function YK(){return"development"}function uy(e){var t;const n=Q.version;return typeof Q.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function pg(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=pn(n[i],r):n[i]=r})}),n}function Xh({theme:e,classNames:n,props:t,stylesCtx:i}){return XK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||KK))}function Rg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function C5(e){return e==="auto"||e==="dark"||e==="light"}function ZK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return C5(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&C5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Zh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function QK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function JK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function eX(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function nX(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,c=o*(1-Math.abs(l%2-1)),f=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=c,p=0):l>=1&&l<2?(h=c,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=c):l>=3&&l<4?(h=0,d=c,p=o):l>=4&&l<5?(h=c,d=0,p=o):(h=o,d=0,p=c),{r:Math.round((h+f)*255),g:Math.round((d+f)*255),b:Math.round((p+f)*255),a:a||1}}function F6(e){return QK(e)?JK(e):e.startsWith("rgb")?eX(e):e.startsWith("hsl")?nX(e):{r:0,g:0,b:0,a:1}}function ck(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function tX(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function Ez(e){if(e.startsWith("oklch("))return(tX(e)||0)/100;const{r:n,g:t,b:i}=F6(e),r=n/255,a=t/255,o=i/255,l=ck(r),c=ck(a),f=ck(o);return .2126*l+.7152*c+.0722*f}function rh(e,n=.179){return e.startsWith("var(")?!1:Ez(e)>n}function vs({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:rh(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:rh(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:rh(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Zh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:rh(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:rh(e,n.luminanceThreshold),shade:a,variable:void 0}}function lt(e,n){const t=vs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function au(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=F6(e),o=1-n,l=c=>Math.round(c*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function vS(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=lt(t.from,n),r=lt(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Zs(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=F6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const A5=Zs,iX=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=vs({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${me(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${me(1)} solid transparent`}:{background:e,hover:au(e,.1),color:l,border:`${me(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:au(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${me(1)} solid transparent`}}return{background:Zs(e,.1),hover:Zs(e,.12),color:e,border:`${me(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${me(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Zs(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Zs(e,.05),color:e,border:`${me(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Zs(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}}return{background:"transparent",hover:Zs(e,.12),color:e,border:`${me(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${me(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:au(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:au(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:au(n.white,.01),color:e,border:`${me(1)} solid transparent`}:t==="gradient"?{background:vS(i,n),hover:vS(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${me(1)} solid var(--mantine-color-default-border)`}:{}};function Pf({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&vs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function j5(e,n){return Pf({color:e.colors[e.primaryColor][Zh(e,n)],theme:e,autoContrast:null})}function Gm(e,n){return typeof e=="boolean"?e:n.autoContrast}const Tz=A.createContext(null);function _o(){const e=A.use(Tz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function rX(){return _o().cssVariablesResolver}function aX(){return _o().classNamesPrefix}function q6(){return _o().getStyleNonce}function oX(){return _o().withStaticClasses}function sX(){return _o().headless}function lX(){var e;return(e=_o().stylesTransform)==null?void 0:e.sx}function uX(){var e;return(e=_o().stylesTransform)==null?void 0:e.styles}function Ym(){return _o().env||"default"}function cX(){return _o().deduplicateInlineStyles}function jc(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function fX({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,c=A.useCallback(h=>{i||(jc(h,t),o(h),e.set(h))},[e.set,l,i]),f=A.useCallback(()=>{o(n),jc(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),ps(()=>{jc(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return jc(i,t),()=>{};i===void 0&&jc(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&jc(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:c,clearColorScheme:f}}const dX={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},O5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",H6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:dX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:iX,autoContrast:!1,luminanceThreshold:.3,fontFamily:O5,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:O5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:me(34),lineHeight:"1.3"},h2:{fontSize:me(26),lineHeight:"1.35"},h3:{fontSize:me(22),lineHeight:"1.4"},h4:{fontSize:me(18),lineHeight:"1.45"},h5:{fontSize:me(16),lineHeight:"1.5"},h6:{fontSize:me(14),lineHeight:"1.5"}}},fontSizes:{xs:me(12),sm:me(14),md:me(16),lg:me(18),xl:me(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:me(2),sm:me(4),md:me(8),lg:me(16),xl:me(32)},spacing:{xs:me(10),sm:me(12),md:me(16),lg:me(20),xl:me(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), 0 ${me(1)} ${me(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(10)} ${me(15)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(7)} ${me(7)} ${me(-5)}`,md:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(20)} ${me(25)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(10)} ${me(10)} ${me(-5)}`,lg:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(28)} ${me(23)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(12)} ${me(12)} ${me(-7)}`,xl:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(36)} ${me(28)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(17)} ${me(17)} ${me(-7)}`},other:{},components:{}},hX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",E5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function fk(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function T5(e){if(!(e.primaryColor in e.colors))throw new Error(hX);if(typeof e.primaryShade=="object"&&(!fk(e.primaryShade.dark)||!fk(e.primaryShade.light)))throw new Error(E5);if(typeof e.primaryShade=="number"&&!fk(e.primaryShade))throw new Error(E5)}function mX(e,n){var i;if(!n)return T5(e),e;const t=P6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),T5(t),t}const U6=A.createContext(null),pX=()=>A.use(U6)||H6;function ui(){const e=A.use(U6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function Mz({theme:e,children:n,inherit:t=!0}){const i=pX();return g.jsx(U6,{value:A.useMemo(()=>mX(t?i:H6,e),[e,i,t]),children:n})}Mz.displayName="@mantine/core/MantineThemeProvider";function dk(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function Dz(e,n){const t=n?[n]:[":root",":host"],i=dk(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=dk(e.dark),o=dk(e.light),l=c=>t.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${c}"])`:`${f}[data-mantine-color-scheme="${c}"]`).join(", ");return`${r} ${a?`${l("dark")}{${a}}`:""} -${o?`${l("light")}{${o}}`:""}`}function Rv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Yh(e,"light"),c={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:S5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...c}:c}const a=Yh(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:ru(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:ru(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:S5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function oX(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Kl(e,n,t){Rt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const Az=e=>{const n=Yh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:he(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":C5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":C5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Kl(i.variables,e.breakpoints,"breakpoint"),Kl(i.variables,e.spacing,"spacing"),Kl(i.variables,e.fontSizes,"font-size"),Kl(i.variables,e.lineHeights,"line-height"),Kl(i.variables,e.shadows,"shadow"),Kl(i.variables,e.radius,"radius"),Kl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Rt(e.colors).forEach(a=>{const o=e.colors[a];if(oX(o)){Object.assign(i.light,Rv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Rv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,c)=>{i.variables[`--mantine-color-${a}-${c}`]=l}),Object.assign(i.light,Rv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Rv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Rt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function sX(){const e=ui(),n=F6(),t=Rt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Vh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Og(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Og(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return y.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function lX({theme:e,generator:n}){const t=Az(e),i=n==null?void 0:n(e);return i?R6(t,i):t}const fk=Az(q6);function uX(e){const n={variables:{},light:{},dark:{}};return Rt(e.variables).forEach(t=>{fk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Rt(e.light).forEach(t=>{fk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Rt(e.dark).forEach(t=>{fk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function cX(e){return Cz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function Oz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ui(),i=F6(),r=lX({theme:t,generator:YK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=Cz(a?uX(r):r,e);return o?y.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":cX(e)}`}}):null}Oz.displayName="@mantine/CssVariables";function fX({respectReducedMotion:e,getRootElement:n}){us(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function jz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:c="mantine",colorSchemeManager:f=FK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:C,clearColorScheme:x}=nX({defaultColorScheme:h,forceColorScheme:v,manager:f,getRootElement:d});return fX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),y.jsx(xz,{value:{colorScheme:_,setColorScheme:C,clearColorScheme:x,getRootElement:d,classNamesPrefix:c,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:y.jsxs(Sz,{theme:e,children:[o&&y.jsx(Oz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&y.jsx(sX,{}),n]})})}jz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=ui(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Tu(t)}}function Wi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ui();return{resolvedClassNames:e===void 0?void 0:Gh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Tg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const dX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function hX({theme:e,options:n,unstyled:t}){return dn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||dX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function mX({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Gh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function pX({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Gh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function vX({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function gX({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function yX({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function bX({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function wX({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:c,className:f,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:b,transformedStyles:w}){return dn(hX({theme:e,options:n,unstyled:c||b}),o.map(k=>k[i]),bX({options:n,classes:l,selector:i,unstyled:c||b}),a[i],pX({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),mX({selector:i,stylesCtx:p,options:n,props:d,theme:e}),vX({rootSelector:h,selector:i,className:f}),gX({selector:i,classes:l,unstyled:c||b}),v&&!b&&yX({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function U6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...U6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function kX({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:c,resolvedVars:f,resolvedRootStyle:h}){return{...c[n],...l[n],...!o&&Tg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...f[n],...a===n?h:null,...U6({style:t==null?void 0:t.style,theme:e})}}function _X(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Tu(t[i])}}),n),{})}function xX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=JK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(c=>r(c,{props:e,theme:i,ctx:n})),...t.map(c=>{var f;return r((f=i.components[c])==null?void 0:f.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Xe({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:c,styles:f,vars:h,varsResolver:d,attributes:p}){var P;const v=ui(),b=KK(),w=XK(),k=ZK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:C,getTransformedStyles:x}=xX({props:t,stylesCtx:i,themeName:_,theme:v}),E=Gh({theme:v,classNames:c,props:t,stylesCtx:i}),O=_.map(L=>{var H;return Gh({theme:v,classNames:(H=v.components[L])==null?void 0:H.classNames,props:t,stylesCtx:i})}),j=C?{}:Tg({theme:v,styles:f,props:t,stylesCtx:i}),M={};if(!C)for(const L of _){const H=Tg({theme:v,styles:(P=v.components[L])==null?void 0:P.styles,props:t,stylesCtx:i});for(const G of Object.keys(H))M[G]={...M[G],...H[G]}}const N=_X([k?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var H,G,U;return(U=(G=(H=v.components)==null?void 0:H[L])==null?void 0:G.vars)==null?void 0:U.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),q=U6({style:a,theme:v});return(L,H)=>({...p==null?void 0:p[L],className:wX({theme:v,options:H,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:E,resolvedThemeClassNames:O,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:x([H==null?void 0:H.styles,f])}),style:kX({theme:v,selector:L,options:H,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:C,resolvedStyles:j,resolvedThemeStyles:M,resolvedVars:N,resolvedRootStyle:q})})}function Mh(e){return Rt(e).reduce((n,t)=>e[t]!==void 0?`${n}${cK(t)}:${e[t]};`:n,"").trim()}function SX({selector:e,styles:n,media:t,container:i}){const r=n?Mh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${Mh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${Mh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function CX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Rf({deduplicate:e,...n}){const t=F6(),i=SX(n);return e?y.jsx("style",{href:`mantine-${CX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):y.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function AX(e){let n=5381;for(let t=0;t>>0).toString(36)}function OX(e,n){return`__mdi__-${AX(`${e?Mh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${Mh(t.styles)}`).join("|"):""}`)}`}function Du(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:c,ms:f,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pe:x,ps:E,pis:O,pie:j,bd:M,bdrs:N,bg:q,c:P,opacity:L,ff:H,fz:G,fw:U,lts:z,ta:D,lh:$,fs:B,tt:Y,td:R,w:W,miw:V,maw:I,h:X,mih:ee,mah:re,bgsz:le,bgp:ye,bgr:ae,bga:ue,pos:xe,top:ne,left:ze,bottom:we,right:Oe,inset:Ne,display:ge,flex:Se,hiddenFrom:Pe,visibleFrom:ce,lightHidden:Be,darkHidden:Ye,sx:We,...Ze}=e;return{styleProps:Tu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:c,ms:f,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pis:O,pie:j,pe:x,ps:E,bd:M,bg:q,c:P,opacity:L,ff:H,fz:G,fw:U,lts:z,ta:D,lh:$,fs:B,tt:Y,td:R,w:W,miw:V,maw:I,h:X,mih:ee,mah:re,bgsz:le,bgp:ye,bgr:ae,bga:ue,pos:xe,top:ne,left:ze,bottom:we,right:Oe,inset:Ne,display:ge,flex:Se,bdrs:N,hiddenFrom:Pe,visibleFrom:ce,lightHidden:Be,darkHidden:Ye,sx:We}),rest:Ze}}const jX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function V6(e,n){const t=cs({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function EX(e,n){const t=cs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:V6(e,n)}function TX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${he(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${V6(r.join(" "),n)}`),a.trim()}return e}const E5={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function MX(e){return typeof e=="string"&&e in E5?E5[e]:e}const DX=["h1","h2","h3","h4","h5","h6"];function RX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&DX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?he(e):e}function PX(e){return e}const NX=["h1","h2","h3","h4","h5","h6"];function $X(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&NX.includes(e)?`var(--mantine-${e}-line-height)`:e}function zX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?he(e):e}function LX(e){return typeof e=="number"?he(e):e}function IX(e,n){if(typeof e=="number")return he(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return he(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const dk={color:V6,textColor:EX,fontSize:RX,spacing:IX,radius:zX,identity:PX,size:LX,lineHeight:$X,fontFamily:MX,border:TX};function T5(e){return e.replace("(min-width: ","").replace("em)","")}function BX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(T5(i))-Number(T5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function FX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function qX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function HX(e){return typeof e=="object"&&e!==null?Rt(e).filter(n=>n!=="base"):[]}function UX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function VX({styleProps:e,data:n,theme:t}){return BX(Rt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=qX(e[r]);if(!FX(e[r]))return o.forEach(f=>{i.inlineStyles[f]=dk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const c=HX(e[r]);return o.forEach(f=>{l!=null&&(i.styles[f]=dk[a.type](l,t)),c.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[f]:dk[a.type](UX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function ly(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function Ez(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...Ez(i,n)}),{}):typeof e=="function"?e(n):e??{}}function WX(e){return e}const GX=WX;function Tz(e){return e}function Re(e){const n=e;return n.extend=Tz,n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function uy(e){return Re(e)}function ji(e){const n=e;return n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=Tz,n}function Mz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function YX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[Mz(t)]=e[t]),n},{})}function Dz(e){return e?typeof e=="string"?{[Mz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...Dz(t)}),{}):YX(e):null}function pS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...pS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function KX({theme:e,style:n,vars:t,styleProps:i}){const r=pS(n,e),a=pS(t,e);return{...r,...a,...i}}function Rz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:c,lightHidden:f,darkHidden:h,renderRoot:d,__size:p,ref:v,...b}){var q,P;const w=ui(),k=e||"div",{styleProps:_,rest:C}=Du(b),x=(P=(q=QK())==null?void 0:q())==null?void 0:P(_.sx),E=ly(),O=VX({styleProps:_,theme:w,data:jX}),j=eX(),M=j&&O.hasResponsiveStyles?OX(O.styles,O.media):E,N={ref:v,style:KX({theme:w,style:n,vars:t,styleProps:O.inlineStyles}),className:dn(i,x,{[M]:O.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${c}`]:c}),"data-variant":r,"data-size":cz(o)?void 0:o||void 0,size:p,...Dz(a),...C};return y.jsxs(y.Fragment,{children:[O.hasResponsiveStyles&&y.jsx(Rf,{selector:`.${M}`,styles:O.styles,media:O.media,deduplicate:j}),typeof d=="function"?d(N):y.jsx(k,{...N})]})}Rz.displayName="@mantine/core/Box";const me=GX(Rz),XX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Ru(){return A.use(XX)}const[ZX,ka]=Vr("ScrollArea.Root component was not found in tree");function ll(e,n){const t=A.useEffectEvent(n);us(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function QX(e){const{style:n,...t}=e,i=ka(),[r,a]=A.useState(0),[o,l]=A.useState(0),c=!!(r&&o);return ll(i.scrollbarX,()=>{var h;const f=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(f),l(f)}),ll(i.scrollbarY,()=>{var h;const f=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(f),a(f)}),c?y.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function JX(e){const n=ka(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?y.jsx(QX,{...e}):null}const eZ={scrollHideDelay:1e3,type:"hover"};function Pz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",eZ,e),[l,c]=A.useState(null),[f,h]=A.useState(null),[d,p]=A.useState(null),[v,b]=A.useState(null),[w,k]=A.useState(null),[_,C]=A.useState(0),[x,E]=A.useState(0),[O,j]=A.useState(!1),[M,N]=A.useState(!1),q=Gt(a,P=>c(P));return y.jsx(ZX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:f,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:O,onScrollbarXEnabledChange:j,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:N,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:r},children:y.jsx(me,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${x}px`}})})}Pz.displayName="@mantine/core/ScrollAreaRoot";function Nz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function cy(e){const n=Nz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function $z(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function nZ(e,[n,t]){return Math.min(t,Math.max(n,e))}function M5(e,n,t="ltr"){const i=cy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,c=nZ(e,t==="ltr"?[0,o]:[o*-1,0]);return $z([0,o],[0,l])(c)}function tZ(e,n,t,i="ltr"){const r=cy(t),a=r/2,o=n||a,l=r-o,c=t.scrollbar.paddingStart+o,f=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return $z([c,f],d)(e)}function zz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[iZ,Lz]=Vr("ScrollAreaScrollbar was not found in tree");function Iz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:c,onResize:f,ref:h,...d}=e,p=ka(),[v,b]=A.useState(null),w=Gt(h,N=>b(N)),k=A.useRef(null),_=A.useRef(""),{viewport:C}=p,x=n.content-n.viewport,E=A.useEffectEvent(c),O=wh(o),j=oy(f,10),M=N=>{k.current&&l({x:N.clientX-k.current.left,y:N.clientY-k.current.top})};return A.useEffect(()=>{const N=q=>{const P=q.target;v!=null&&v.contains(P)&&E(q,x)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[C,v,x]),A.useEffect(O,[n,O]),ll(v,j),ll(p.content,j),y.jsx(iZ,{value:{scrollbar:v,hasThumb:t,onThumbChange:wh(i),onThumbPointerUp:wh(r),onThumbPositionChange:O,onThumbPointerDown:wh(a)},children:y.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:hu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(N))}),onPointerMove:hu(e.onPointerMove,M),onPointerUp:hu(e.onPointerUp,N=>{const q=N.target;q.hasPointerCapture(N.pointerId)&&(N.preventDefault(),q.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const Bz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,c]=A.useState(),f=A.useRef(null),h=Gt(r,f,o.onScrollbarXChange);return A.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),y.jsx(Iz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${cy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),zz(v,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Mg(l.paddingLeft),paddingEnd:Mg(l.paddingRight)}})}})};Bz.displayName="@mantine/core/ScrollAreaScrollbarX";function Fz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,c]=A.useState(),f=A.useRef(null),h=Gt(r,f,o.onScrollbarYChange);return A.useEffect(()=>{f.current&&c(window.getComputedStyle(f.current))},[]),y.jsx(Iz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${cy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),zz(v,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Mg(l.paddingTop),paddingEnd:Mg(l.paddingBottom)}})}})}Fz.displayName="@mantine/core/ScrollAreaScrollbarY";function fy(e){const{orientation:n="vertical",...t}=e,{dir:i}=Ru(),r=ka(),a=A.useRef(null),o=A.useRef(0),[l,c]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=Nz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:c,hasThumb:f>0&&f<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>tZ(p,o.current,l,v);return n==="horizontal"?y.jsx(Bz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=M5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?y.jsx(Fz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=M5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}fy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function W6(e){const n=ka(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=oy(()=>{if(n.viewport){const c=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const c=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",c),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",c),o.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),n||r?y.jsx(W6,{"data-state":r?"visible":"hidden",...t}):null}qz.displayName="@mantine/core/ScrollAreaScrollbarHover";function rZ(e){const{forceMount:n,...t}=e,i=ka(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=oy(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:c}=i,f=r?"scrollLeft":"scrollTop";if(c){let h=c[f];const d=()=>{const p=c[f];h!==p&&(o("scrolling"),l()),h=p};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?y.jsx(fy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:hu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:hu(e.onPointerLeave,()=>o("idle"))}):null}function vS(e){const{forceMount:n,...t}=e,i=ka(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?y.jsx(qz,{...t,forceMount:n}):i.type==="scroll"?y.jsx(rZ,{...t,forceMount:n}):i.type==="auto"?y.jsx(W6,{...t,forceMount:n}):i.type==="always"?y.jsx(fy,{...t}):null}vS.displayName="@mantine/core/ScrollAreaScrollbar";function aZ(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function Hz(e){const{style:n,ref:t,...i}=e,r=ka(),a=Lz(),{onThumbPositionChange:o}=a,l=Gt(t,h=>a.onThumbChange(h)),c=A.useRef(void 0),f=oy(()=>{c.current&&(c.current(),c.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{f(),c.current||(c.current=aZ(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,f,o]),y.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:hu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:hu(e.onPointerUp,a.onThumbPointerUp)})}Hz.displayName="@mantine/core/ScrollAreaThumb";function gS(e){const{forceMount:n,...t}=e,i=Lz();return n||i.hasThumb?y.jsx(Hz,{...t}):null}gS.displayName="@mantine/core/ScrollAreaThumb";function Uz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ka(),o=Gt(t,a.onViewportChange),l=c=>{if(i==null||i(c),a.scrollbarXEnabled&&a.viewport&&c.shiftKey){const{scrollTop:f,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,b=f<1,w=f>=h-d-1;p>v&&(b||w)&&c.stopPropagation()}};return y.jsx(me,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:y.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}Uz.displayName="@mantine/core/ScrollAreaViewport";var G6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function dy(){return typeof window<"u"}function Pf(e){return Vz(e)?(e.nodeName||"").toLowerCase():"#document"}function kr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function yo(e){var n;return(n=(Vz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Vz(e){return dy()?e instanceof Node||e instanceof kr(e).Node:!1}function Ut(e){return dy()?e instanceof Element||e instanceof kr(e).Element:!1}function _a(e){return dy()?e instanceof HTMLElement||e instanceof kr(e).HTMLElement:!1}function yS(e){return!dy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kr(e).ShadowRoot}function Um(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function oZ(e){return/^(table|td|th)$/.test(Pf(e))}function hy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const sZ=/transform|translate|scale|rotate|perspective|filter/,lZ=/paint|layout|strict|content/,Xl=e=>!!e&&e!=="none";let hk;function Y6(e){const n=Ut(e)?ga(e):e;return Xl(n.transform)||Xl(n.translate)||Xl(n.scale)||Xl(n.rotate)||Xl(n.perspective)||!my()&&(Xl(n.backdropFilter)||Xl(n.filter))||sZ.test(n.willChange||"")||lZ.test(n.contain||"")}function uZ(e){let n=is(e);for(;_a(n)&&!Xo(n);){if(Y6(n))return n;if(hy(n))return null;n=is(n)}return null}function my(){return hk==null&&(hk=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hk}function Xo(e){return/^(html|body|#document)$/.test(Pf(e))}function ga(e){return kr(e).getComputedStyle(e)}function py(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function is(e){if(Pf(e)==="html")return e;const n=e.assignedSlot||e.parentNode||yS(e)&&e.host||yo(e);return yS(n)?n.host:n}function Wz(e){const n=is(e);return Xo(n)?e.ownerDocument?e.ownerDocument.body:e.body:_a(n)&&Um(n)?n:Wz(n)}function Zo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Wz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=kr(r);if(a){const l=bS(o);return n.concat(o,o.visualViewport||[],Um(r)?r:[],l&&t?Zo(l):[])}else return n.concat(r,Zo(r,[],t))}function bS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const cZ=["top","right","bottom","left"],Ha=Math.min,Qi=Math.max,Dg=Math.round,Pv=Math.floor,ro=e=>({x:e,y:e}),fZ={left:"right",right:"left",bottom:"top",top:"bottom"};function wS(e,n,t){return Qi(e,Ha(n,t))}function co(e,n){return typeof e=="function"?e(n):e}function Ua(e){return e.split("-")[0]}function Nf(e){return e.split("-")[1]}function K6(e){return e==="x"?"y":"x"}function X6(e){return e==="y"?"height":"width"}function Ia(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Z6(e){return K6(Ia(e))}function dZ(e,n,t){t===void 0&&(t=!1);const i=Nf(e),r=Z6(e),a=X6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Rg(o)),[o,Rg(o)]}function hZ(e){const n=Rg(e);return[kS(e),n,kS(n)]}function kS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const D5=["left","right"],R5=["right","left"],mZ=["top","bottom"],pZ=["bottom","top"];function vZ(e,n,t){switch(e){case"top":case"bottom":return t?n?R5:D5:n?D5:R5;case"left":case"right":return n?mZ:pZ;default:return[]}}function gZ(e,n,t,i){const r=Nf(e);let a=vZ(Ua(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(kS)))),a}function Rg(e){const n=Ua(e);return fZ[n]+e.slice(n.length)}function yZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q6(e){return typeof e!="number"?yZ(e):{top:e,right:e,bottom:e,left:e}}function Jc(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function bZ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function wZ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function kZ(){return/apple/i.test(navigator.vendor)}function _Z(){return bZ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function xZ(){return wZ().includes("jsdom/")}const P5="data-floating-ui-focusable",SZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function N5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Kh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&yS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function zc(e){return"composedPath"in e?e.composedPath()[0]:e.target}function mk(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function CZ(e){return e.matches("html,body")}function ou(e){return(e==null?void 0:e.ownerDocument)||document}function AZ(e){return _a(e)&&e.matches(SZ)}function OZ(e){if(!e||xZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function jZ(e){return e?e.hasAttribute(P5)?e:e.querySelector("["+P5+"]")||e:null}function hg(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...hg(e,r.id,t)])}function EZ(e){return"nativeEvent"in e}function _S(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var TZ=typeof document<"u",MZ=function(){},ao=TZ?A.useLayoutEffect:MZ;const DZ={...fz};function Nv(e){const n=A.useRef(e);return ao(()=>{n.current=e}),n}const RZ=DZ.useInsertionEffect,PZ=RZ||(e=>e());function eo(e){const n=A.useRef(()=>{});return PZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:NZ},c=await(o.isRTL==null?void 0:o.isRTL(n));let f=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=$5(f,i,c),p=i,v=0;const b={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:f,padding:h=0}=co(e,n)||{};if(f==null)return{};const d=Q6(h),p={x:t,y:i},v=Z6(r),b=X6(v),w=await o.getDimensions(f),k=v==="y",_=k?"top":"left",C=k?"bottom":"right",x=k?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[v]-p[v]-a.floating[b],O=p[v]-a.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=j?j[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(j)))&&(M=l.floating[x]||a.floating[b]);const N=E/2-O/2,q=M/2-w[b]/2-1,P=Ha(d[_],q),L=Ha(d[C],q),H=P,G=M-w[b]-L,U=M/2-w[b]/2+N,z=wS(H,U,G),D=!c.arrow&&Nf(r)!=null&&U!==z&&a.reference[b]/2-(UU<=0)){var L,H;const U=(((L=a.flip)==null?void 0:L.index)||0)+1,z=M[U];if(z&&(!(d==="alignment"?C!==Ia(z):!1)||P.every(B=>Ia(B.placement)===C?B.overflows[0]>0:!0)))return{data:{index:U,overflows:P},reset:{placement:z}};let D=(H=P.filter($=>$.overflows[0]<=0).sort(($,B)=>$.overflows[1]-B.overflows[1])[0])==null?void 0:H.placement;if(!D)switch(v){case"bestFit":{var G;const $=(G=P.filter(B=>{if(j){const Y=Ia(B.placement);return Y===C||Y==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Y=>Y>0).reduce((Y,R)=>Y+R,0)]).sort((B,Y)=>B[1]-Y[1])[0])==null?void 0:G[0];$&&(D=$);break}case"initialPlacement":D=l;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function z5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function L5(e){return cZ.some(n=>e[n]>=0)}const BZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=co(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=z5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:L5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=z5(o,t.floating);return{data:{escapedOffsets:l,escaped:L5(l)}}}default:return{}}}}};function Gz(e){const n=Ha(...e.map(a=>a.left)),t=Ha(...e.map(a=>a.top)),i=Qi(...e.map(a=>a.right)),r=Qi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function FZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>Jc(Gz(r)))}const qZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:c,y:f}=co(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=FZ(h),p=Jc(Gz(h)),v=Q6(l);function b(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&f!=null)return d.find(k=>c>k.left-v.left&&ck.top-v.top&&f=2){if(Ia(t)==="y"){const P=d[0],L=d[d.length-1],H=Ua(t)==="top",G=P.top,U=L.bottom,z=H?P.left:L.left,D=H?P.right:L.right,$=D-z,B=U-G;return{top:G,bottom:U,left:z,right:D,width:$,height:B,x:z,y:G}}const k=Ua(t)==="left",_=Qi(...d.map(P=>P.right)),C=Ha(...d.map(P=>P.left)),x=d.filter(P=>k?P.left===C:P.right===_),E=x[0].top,O=x[x.length-1].bottom,j=C,M=_,N=M-j,q=O-E;return{top:E,bottom:O,left:j,right:M,width:N,height:q,x:j,y:E}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:b},floating:i.floating,strategy:o});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},Yz=new Set(["left","top"]);async function HZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ua(t),l=Nf(t),c=Ia(t)==="y",f=Yz.has(o)?-1:1,h=a&&c?-1:1,d=co(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),c?{x:v*h,y:p*f}:{x:p*f,y:v*h}}const UZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,c=await HZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:o}}}}},VZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:_=>{let{x:C,y:x}=_;return{x:C,y:x}}},...f}=co(e,n),h={x:t,y:i},d=await a.detectOverflow(n,f),p=Ia(Ua(r)),v=K6(p);let b=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",C=v==="y"?"bottom":"right",x=b+d[_],E=b-d[C];b=wS(x,b,E)}if(l){const _=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[_],E=w-d[C];w=wS(x,w,E)}const k=c.fn({...n,[v]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},WZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=co(e,n),h={x:t,y:i},d=Ia(r),p=K6(d);let v=h[p],b=h[d];const w=co(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=p==="y"?"height":"width",E=a.reference[p]-a.floating[x]+k.mainAxis,O=a.reference[p]+a.reference[x]-k.mainAxis;vO&&(v=O)}if(f){var _,C;const x=p==="y"?"width":"height",E=Yz.has(Ua(r)),O=a.reference[d]-a.floating[x]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:k.crossAxis),j=a.reference[d]+a.reference[x]+(E?0:((C=o.offset)==null?void 0:C[d])||0)-(E?k.crossAxis:0);bj&&(b=j)}return{[p]:v,[d]:b}}}},GZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:c=()=>{},...f}=co(e,n),h=await o.detectOverflow(n,f),d=Ua(r),p=Nf(r),v=Ia(r)==="y",{width:b,height:w}=a.floating;let k,_;d==="top"||d==="bottom"?(k=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,k=p==="end"?"top":"bottom");const C=w-h.top-h.bottom,x=b-h.left-h.right,E=Ha(w-h[k],C),O=Ha(b-h[_],x),j=!n.middlewareData.shift;let M=E,N=O;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=x),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=C),j&&!p){const P=Qi(h.left,0),L=Qi(h.right,0),H=Qi(h.top,0),G=Qi(h.bottom,0);v?N=b-2*(P!==0||L!==0?P+L:Qi(h.left,h.right)):M=w-2*(H!==0||G!==0?H+G:Qi(h.top,h.bottom))}await c({...n,availableWidth:N,availableHeight:M});const q=await o.getDimensions(l.floating);return b!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function Kz(e){const n=ga(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=_a(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Dg(t)!==a||Dg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function J6(e){return Ut(e)?e:e.contextElement}function Uc(e){const n=J6(e);if(!_a(n))return ro(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Kz(n);let o=(a?Dg(t.width):t.width)/i,l=(a?Dg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const YZ=ro(0);function Xz(e){const n=kr(e);return!my()||!n.visualViewport?YZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function KZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==kr(e)?!1:n}function vu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=J6(e);let o=ro(1);n&&(i?Ut(i)&&(o=Uc(i)):o=Uc(e));const l=KZ(a,t,i)?Xz(a):ro(0);let c=(r.left+l.x)/o.x,f=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=kr(a),v=i&&Ut(i)?kr(i):i;let b=p,w=bS(b);for(;w&&i&&v!==b;){const k=Uc(w),_=w.getBoundingClientRect(),C=ga(w),x=_.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=_.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;c*=k.x,f*=k.y,h*=k.x,d*=k.y,c+=x,f+=E,b=kr(w),w=bS(b)}}return Jc({width:h,height:d,x:c,y:f})}function vy(e,n){const t=py(e).scrollLeft;return n?n.left+t:vu(yo(e)).left+t}function Zz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-vy(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function XZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=yo(i),l=n?hy(n.floating):!1;if(i===o||l&&a)return t;let c={scrollLeft:0,scrollTop:0},f=ro(1);const h=ro(0),d=_a(i);if((d||!d&&!a)&&((Pf(i)!=="body"||Um(o))&&(c=py(i)),d)){const v=vu(i);f=Uc(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Zz(o,c):ro(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-c.scrollLeft*f.x+h.x+p.x,y:t.y*f.y-c.scrollTop*f.y+h.y+p.y}}function ZZ(e){return Array.from(e.getClientRects())}function QZ(e){const n=yo(e),t=py(e),i=e.ownerDocument.body,r=Qi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Qi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+vy(e);const l=-t.scrollTop;return ga(i).direction==="rtl"&&(o+=Qi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const I5=25;function JZ(e,n){const t=kr(e),i=yo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,c=0;if(r){a=r.width,o=r.height;const h=my();(!h||h&&n==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}const f=vy(i);if(f<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-v);b<=I5&&(a-=b)}else f<=I5&&(a+=f);return{width:a,height:o,x:l,y:c}}function eQ(e,n){const t=vu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=_a(e)?Uc(e):ro(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=r*a.x,f=i*a.y;return{width:o,height:l,x:c,y:f}}function B5(e,n,t){let i;if(n==="viewport")i=JZ(e,t);else if(n==="document")i=QZ(yo(e));else if(Ut(n))i=eQ(n,t);else{const r=Xz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Jc(i)}function Qz(e,n){const t=is(e);return t===n||!Ut(t)||Xo(t)?!1:ga(t).position==="fixed"||Qz(t,n)}function nQ(e,n){const t=n.get(e);if(t)return t;let i=Zo(e,[],!1).filter(l=>Ut(l)&&Pf(l)!=="body"),r=null;const a=ga(e).position==="fixed";let o=a?is(e):e;for(;Ut(o)&&!Xo(o);){const l=ga(o),c=Y6(o);!c&&l.position==="fixed"&&(r=null),(a?!c&&!r:!c&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Um(o)&&!c&&Qz(e,o))?i=i.filter(h=>h!==o):r=l,o=is(o)}return n.set(e,i),i}function tQ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?hy(n)?[]:nQ(n,this._c):[].concat(t),i],l=B5(n,o[0],r);let c=l.top,f=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!eL(f,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(O,{...x,root:r.ownerDocument})}catch{t=new IntersectionObserver(O,x)}t.observe(e)}return o(!0),a}function xS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,f=J6(e),h=r||a?[...f?Zo(f):[],...n?Zo(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=f&&l?lQ(f,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[C]=_;C&&C.target===f&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(n)})),t()}),f&&!c&&v.observe(f),n&&v.observe(n));let b,w=c?vu(e):null;c&&k();function k(){const _=vu(e);w&&!eL(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(C=>{r&&C.removeEventListener("scroll",t),a&&C.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const uQ=UZ,cQ=VZ,fQ=IZ,dQ=GZ,hQ=BZ,q5=LZ,mQ=qZ,pQ=WZ,vQ=(e,n,t)=>{const i=new Map,r={platform:sQ,...t},a={...r.platform,_c:i};return zZ(e,n,{...r,platform:a})};var gQ=typeof document<"u",yQ=function(){},mg=gQ?A.useLayoutEffect:yQ;function Pg(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!Pg(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!Pg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function nL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function H5(e,n){const t=nL(e);return Math.round(n*t)/t}function vk(e){const n=A.useRef(e);return mg(()=>{n.current=e}),n}function bQ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);Pg(p,i)||v(i);const[b,w]=A.useState(null),[k,_]=A.useState(null),C=A.useCallback(B=>{B!==j.current&&(j.current=B,w(B))},[]),x=A.useCallback(B=>{B!==M.current&&(M.current=B,_(B))},[]),E=a||b,O=o||k,j=A.useRef(null),M=A.useRef(null),N=A.useRef(h),q=c!=null,P=vk(c),L=vk(r),H=vk(f),G=A.useCallback(()=>{if(!j.current||!M.current)return;const B={placement:n,strategy:t,middleware:p};L.current&&(B.platform=L.current),vQ(j.current,M.current,B).then(Y=>{const R={...Y,isPositioned:H.current!==!1};U.current&&!Pg(N.current,R)&&(N.current=R,Qs.flushSync(()=>{d(R)}))})},[p,n,t,L,H]);mg(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[f]);const U=A.useRef(!1);mg(()=>(U.current=!0,()=>{U.current=!1}),[]),mg(()=>{if(E&&(j.current=E),O&&(M.current=O),E&&O){if(P.current)return P.current(E,O,G);G()}},[E,O,G,P,q]);const z=A.useMemo(()=>({reference:j,floating:M,setReference:C,setFloating:x}),[C,x]),D=A.useMemo(()=>({reference:E,floating:O}),[E,O]),$=A.useMemo(()=>{const B={position:t,left:0,top:0};if(!D.floating)return B;const Y=H5(D.floating,h.x),R=H5(D.floating,h.y);return l?{...B,transform:"translate("+Y+"px, "+R+"px)",...nL(D.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:R}},[t,l,D.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:G,refs:z,elements:D,floatingStyles:$}),[h,G,z,D,$])}const wQ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?q5({element:i.current,padding:r}).fn(t):{}:i?q5({element:i,padding:r}).fn(t):{}}}},tL=(e,n)=>{const t=uQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},eC=(e,n)=>{const t=cQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},U5=(e,n)=>({fn:pQ(e).fn,options:[e,n]}),Ng=(e,n)=>{const t=fQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},kQ=(e,n)=>{const t=dQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},_Q=(e,n)=>{const t=hQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Dh=(e,n)=>{const t=mQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},iL=(e,n)=>{const t=wQ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function rL(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const xQ="data-floating-ui-focusable",V5="active",W5="selected",SQ={...fz};let G5=!1,CQ=0;const Y5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+CQ++;function AQ(){const[e,n]=A.useState(()=>G5?Y5():void 0);return ao(()=>{e==null&&n(Y5())},[]),A.useEffect(()=>{G5=!0},[]),e}const OQ=SQ.useId,aL=OQ||AQ;function jQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const EQ=A.createContext(null),TQ=A.createContext(null),nC=()=>{var e;return((e=A.useContext(EQ))==null?void 0:e.id)||null},tC=()=>A.useContext(TQ);function iC(e){return"data-floating-ui-"+e}function la(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const K5=iC("safe-polygon");function pg(e,n,t){if(t&&!_S(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function gk(e){return typeof e=="function"?e():e}function MQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:c=0,handleClose:f=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=tC(),b=nC(),w=Nv(f),k=Nv(c),_=Nv(t),C=Nv(d),x=A.useRef(),E=A.useRef(-1),O=A.useRef(),j=A.useRef(-1),M=A.useRef(!0),N=A.useRef(!1),q=A.useRef(()=>{}),P=A.useRef(!1),L=eo(()=>{var $;const B=($=r.current.openEvent)==null?void 0:$.type;return(B==null?void 0:B.includes("mouse"))&&B!=="mousedown"});A.useEffect(()=>{if(!l)return;function $(B){let{open:Y}=B;Y||(la(E),la(j),M.current=!0,P.current=!1)}return a.on("openchange",$),()=>{a.off("openchange",$)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function $(Y){L()&&i(!1,Y,"hover")}const B=ou(o.floating).documentElement;return B.addEventListener("mouseleave",$),()=>{B.removeEventListener("mouseleave",$)}},[o.floating,t,i,l,w,L]);const H=A.useCallback(function($,B,Y){B===void 0&&(B=!0),Y===void 0&&(Y="hover");const R=pg(k.current,"close",x.current);R&&!O.current?(la(E),E.current=window.setTimeout(()=>i(!1,$,Y),R)):B&&(la(E),i(!1,$,Y))},[k,i]),G=eo(()=>{q.current(),O.current=void 0}),U=eo(()=>{if(N.current){const $=ou(o.floating).body;$.style.pointerEvents="",$.removeAttribute(K5),N.current=!1}}),z=eo(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function $(V){if(la(E),M.current=!1,h&&!_S(x.current)||gk(C.current)>0&&!pg(k.current,"open"))return;const I=pg(k.current,"open",x.current);I?E.current=window.setTimeout(()=>{_.current||i(!0,V,"hover")},I):t||i(!0,V,"hover")}function B(V){if(z()){U();return}q.current();const I=ou(o.floating);if(la(j),P.current=!1,w.current&&r.current.floatingContext){t||la(E),O.current=w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),z()||H(V,!0,"safe-polygon")}});const ee=O.current;I.addEventListener("mousemove",ee),q.current=()=>{I.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Kh(o.floating,V.relatedTarget):!0)&&H(V)}function Y(V){z()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),z()||H(V)}})(V))}function R(){la(E)}function W(V){z()||H(V,!1)}if(Ut(o.domReference)){const V=o.domReference,I=o.floating;return t&&V.addEventListener("mouseleave",Y),p&&V.addEventListener("mousemove",$,{once:!0}),V.addEventListener("mouseenter",$),V.addEventListener("mouseleave",B),I&&(I.addEventListener("mouseleave",Y),I.addEventListener("mouseenter",R),I.addEventListener("mouseleave",W)),()=>{t&&V.removeEventListener("mouseleave",Y),p&&V.removeEventListener("mousemove",$),V.removeEventListener("mouseenter",$),V.removeEventListener("mouseleave",B),I&&(I.removeEventListener("mouseleave",Y),I.removeEventListener("mouseenter",R),I.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,H,G,U,i,t,_,v,k,w,r,z,C]),ao(()=>{var $;if(l&&t&&($=w.current)!=null&&($=$.__options)!=null&&$.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(Ut(o.domReference)&&Y){var B;const R=ou(o.floating).body;R.setAttribute(K5,"");const W=o.domReference,V=v==null||(B=v.nodesRef.current.find(I=>I.id===b))==null||(B=B.context)==null?void 0:B.elements.floating;return V&&(V.style.pointerEvents=""),R.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{R.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,v,w,L]),ao(()=>{t||(x.current=void 0,P.current=!1,G(),U())},[t,G,U]),A.useEffect(()=>()=>{G(),la(E),la(j),U()},[l,o.domReference,G,U]);const D=A.useMemo(()=>{function $(B){x.current=B.pointerType}return{onPointerDown:$,onPointerEnter:$,onMouseMove(B){const{nativeEvent:Y}=B;function R(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!_S(x.current)||t||gk(C.current)===0||P.current&&B.movementX**2+B.movementY**2<2||(la(j),x.current==="touch"?R():(P.current=!0,j.current=window.setTimeout(R,gk(C.current))))}}},[h,i,t,_,C]);return A.useMemo(()=>l?{reference:D}:{},[l,D])}const SS=()=>{},oL=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:SS,setState:SS,isInstantPhase:!1}),DQ=()=>A.useContext(oL);function RQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((c,f)=>({...c,...f}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(c=>{a({currentId:c})},[]);return ao(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),y.jsx(oL.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function PQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,c=DQ(),{currentId:f,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=c;return ao(()=>{o&&f&&(p({delay:{open:1,close:pg(d,"close")}}),f!==l&&i(!1))},[o,l,i,p,f,d]),ao(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&f&&!t&&f===l){if(v){const w=window.setTimeout(b,v);return()=>{clearTimeout(w)}}b()}},[o,t,p,f,l,i,d,v]),ao(()=>{o&&(h===SS||!t||h(l))},[o,t,h,l]),c}const NQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$Q={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},X5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function zQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:b}=n,w=tC(),k=eo(typeof c=="function"?c:()=>!1),_=typeof c=="function"?k:c,C=A.useRef(!1),{escapeKey:x,outsidePress:E}=X5(v),{escapeKey:O,outsidePress:j}=X5(b),M=A.useRef(!1),N=eo(U=>{var z;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const D=(z=a.current.floatingContext)==null?void 0:z.nodeId,$=w?hg(w.nodesRef.current,D):[];if(!x&&(U.stopPropagation(),$.length>0)){let B=!0;if($.forEach(Y=>{var R;if((R=Y.context)!=null&&R.open&&!Y.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}i(!1,EZ(U)?U.nativeEvent:U,"escape-key")}),q=eo(U=>{var z;const D=()=>{var $;N(U),($=zc(U))==null||$.removeEventListener("keydown",D)};(z=zc(U))==null||z.addEventListener("keydown",D)}),P=eo(U=>{var z;const D=a.current.insideReactTree;a.current.insideReactTree=!1;const $=C.current;if(C.current=!1,f==="click"&&$||D||typeof _=="function"&&!_(U))return;const B=zc(U),Y="["+iC("inert")+"]",R=ou(r.floating).querySelectorAll(Y);let W=Ut(B)?B:null;for(;W&&!Xo(W);){const ee=is(W);if(Xo(ee)||!Ut(ee))break;W=ee}if(R.length&&Ut(B)&&!CZ(B)&&!Kh(B,r.floating)&&Array.from(R).every(ee=>!Kh(W,ee)))return;if(_a(B)&&G){const ee=Xo(B),re=ga(B),le=/auto|scroll/,ye=ee||le.test(re.overflowX),ae=ee||le.test(re.overflowY),ue=ye&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,xe=ae&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,ne=re.direction==="rtl",ze=xe&&(ne?U.offsetX<=B.offsetWidth-B.clientWidth:U.offsetX>B.clientWidth),we=ue&&U.offsetY>B.clientHeight;if(ze||we)return}const V=(z=a.current.floatingContext)==null?void 0:z.nodeId,I=w&&hg(w.nodesRef.current,V).some(ee=>{var re;return mk(U,(re=ee.context)==null?void 0:re.elements.floating)});if(mk(U,r.floating)||mk(U,r.domReference)||I)return;const X=w?hg(w.nodesRef.current,V):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var le;if((le=re.context)!=null&&le.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,U,"outside-press")}),L=eo(U=>{var z;const D=()=>{var $;P(U),($=zc(U))==null||$.removeEventListener(f,D)};(z=zc(U))==null||z.addEventListener(f,D)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=x,a.current.__outsidePressBubbles=E;let U=-1;function z(R){i(!1,R,"ancestor-scroll")}function D(){window.clearTimeout(U),M.current=!0}function $(){U=window.setTimeout(()=>{M.current=!1},my()?5:0)}const B=ou(r.floating);l&&(B.addEventListener("keydown",O?q:N,O),B.addEventListener("compositionstart",D),B.addEventListener("compositionend",$)),_&&B.addEventListener(f,j?L:P,j);let Y=[];return p&&(Ut(r.domReference)&&(Y=Zo(r.domReference)),Ut(r.floating)&&(Y=Y.concat(Zo(r.floating))),!Ut(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Zo(r.reference.contextElement)))),Y=Y.filter(R=>{var W;return R!==((W=B.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(R=>{R.addEventListener("scroll",z,{passive:!0})}),()=>{l&&(B.removeEventListener("keydown",O?q:N,O),B.removeEventListener("compositionstart",D),B.removeEventListener("compositionend",$)),_&&B.removeEventListener(f,j?L:P,j),Y.forEach(R=>{R.removeEventListener("scroll",z)}),window.clearTimeout(U)}},[a,r,l,_,f,t,i,p,o,x,E,N,O,q,P,j,L]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,f]);const H=A.useMemo(()=>({onKeyDown:N,...h&&{[NQ[d]]:U=>{i(!1,U.nativeEvent,"reference-press")},...d!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=A.useMemo(()=>{function U(z){z.button===0&&(C.current=!0)}return{onKeyDown:N,onMouseDown:U,onMouseUp:U,[$Q[f]]:()=>{a.current.insideReactTree=!0}}},[N,f,a]);return A.useMemo(()=>o?{reference:H,floating:G}:{},[o,H,G])}function LQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=aL(),a=A.useRef({}),[o]=A.useState(()=>jQ()),l=nC()!=null,[c,f]=A.useState(i.reference),h=eo((v,b,w)=>{a.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:w,nested:l}),t==null||t(v,b,w)}),d=A.useMemo(()=>({setPositionReference:f}),[]),p=A.useMemo(()=>({reference:c||i.reference||null,floating:i.floating||null,domReference:i.reference}),[c,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function rC(e){e===void 0&&(e={});const{nodeId:n}=e,t=LQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,c]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=tC();ao(()=>{h&&(d.current=h)},[h]);const v=bQ({...e,elements:{...r,...l&&{reference:l}}}),b=A.useCallback(x=>{const E=Ut(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;c(E),v.refs.setReference(E)},[v.refs]),w=A.useCallback(x=>{(Ut(x)||x===null)&&(d.current=x,o(x)),(Ut(v.refs.reference.current)||v.refs.reference.current===null||x!==null&&!Ut(x))&&v.refs.setReference(x)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:b,domReference:d}),[v.refs,w,b]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),C=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return ao(()=>{i.dataRef.current.floatingContext=C;const x=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);x&&(x.context=C)}),A.useMemo(()=>({...v,context:C,refs:k,elements:_}),[v,k,_,C])}function yk(){return _Z()&&kZ()}function IQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:c=!0}=n,f=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=kr(o.domReference);function b(){!t&&_a(o.domReference)&&o.domReference===N5(ou(o.domReference))&&(f.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",b),yk()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",b),yk()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(f.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{la(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(v){if(f.current)return;const b=zc(v.nativeEvent);if(c&&Ut(b)){if(yk()&&!v.relatedTarget){if(!d.current&&!AZ(b))return}else if(!OZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){f.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Ut(b)&&b.hasAttribute(iC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const C=N5(o.domReference?o.domReference.ownerDocument:document);!b&&C===o.domReference||Kh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,C)||Kh(o.domReference,C)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,c]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function bk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[V5]:o,[W5]:l,...c}=e;a=c}return{...t==="floating"&&{tabIndex:-1,[xQ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(c=>{let[f,h]=c;if(!(r&&[V5,W5].includes(f)))if(f.indexOf("on")===0){if(i.has(f)||i.set(f,[]),typeof h=="function"){var d;(d=i.get(f))==null||d.push(h),o[f]=function(){for(var p,v=arguments.length,b=new Array(v),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[f]=h}),o),{})}}function BQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>bk(l,e,"reference"),n),a=A.useCallback(l=>bk(l,e,"floating"),t),o=A.useCallback(l=>bk(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const FQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:c="dialog"}=n,f=aL(),h=((t=a.domReference)==null?void 0:t.id)||f,d=A.useMemo(()=>{var C;return((C=jZ(a.floating))==null?void 0:C.id)||o},[a.floating,o]),p=(i=FQ.get(c))!=null?i:c,b=nC()!=null,w=A.useMemo(()=>p==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&b&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,c]),k=A.useMemo(()=>{const C={id:d,...p&&{role:p}};return p==="tooltip"||c==="label"?C:{...C,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,c]),_=A.useCallback(C=>{let{active:x,selected:E}=C;const O={role:"option",...x&&{id:d+"-fui-option"}};switch(c){case"select":case"combobox":return{...O,"aria-selected":E}}return{}},[d,c]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const sL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},lL=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":he(n),"--scrollarea-over-scroll-behavior":r}}},Wr=Re(e=>{const n=be("ScrollArea",sL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:c,type:f,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:C,onLeftReached:x,onRightReached:E,overscrollBehavior:O,startScrollPosition:j,attributes:M,...N}=n,[q,P]=A.useState(!1),[L,H]=A.useState(!1),[G,U]=A.useState(!1),z=A.useRef(!0),D=A.useRef(!1),$=A.useRef(!0),B=A.useRef(!1),Y=Xe({name:"ScrollArea",props:n,classes:G6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:c,varsResolver:lL}),R=A.useRef(null),[W,V]=A.useState(null),I=rL([p,R,A.useCallback(X=>{V(ee=>ee===X?ee:X)},[])]);return ll(w==="present"?W:null,()=>{const X=R.current;X&&(H(X.scrollHeight>X.clientHeight),U(X.scrollWidth>X.clientWidth))}),us(()=>{j&&R.current&&R.current.scrollTo({left:j.x??0,top:j.y??0})},[]),y.jsxs(Pz,{getStyles:Y,type:f==="never"?"always":f,scrollHideDelay:h,scrollbars:k,...Y("root"),...N,children:[y.jsx(Uz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:I,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":w==="present"&&!G?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:X=>{var Oe;(Oe=d==null?void 0:d.onScroll)==null||Oe.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:le,scrollLeft:ye,scrollWidth:ae,clientWidth:ue}=X.currentTarget,xe=ee-(re-le)>=-.8,ne=ee===0;xe&&!D.current&&(_==null||_()),ne&&!z.current&&(C==null||C()),D.current=xe,z.current=ne;const ze=ye-(ae-ue)>=-.8,we=ye===0;ze&&!B.current&&(E==null||E()),we&&!$.current&&(x==null||x()),B.current=ze,$.current=we},children:b}),(k==="xy"||k==="x")&&y.jsx(vS,{...Y("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(gS,{...Y("thumb")})}),(k==="xy"||k==="y")&&y.jsx(vS,{...Y("scrollbar"),orientation:"vertical","data-hidden":f==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(gS,{...Y("thumb")})}),y.jsx(JX,{...Y("corner"),"data-hovered":q||void 0,"data-hidden":f==="never"||void 0})]})});Wr.displayName="@mantine/core/ScrollArea";const aC=Re(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:c,overscrollBehavior:f,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:C,onTopReached:x,startScrollPosition:E,onOverflowChange:O,...j}=be("ScrollAreaAutosize",sL,e),M=A.useRef(null),[N,q]=A.useState(null),P=rL([h,M,A.useCallback(U=>{q(z=>z===U?z:U)},[])]),L=A.useRef(!1),H=A.useRef(!1),G=A.useEffectEvent(()=>{const U=M.current;if(!U||!O)return;const z=U.scrollHeight>U.clientHeight;z!==L.current&&(H.current?O(z):(H.current=!0,z&&O(!0)),L.current=z)});return ll(O?N:null,G),y.jsx(me,{...j,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:y.jsx(me,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:y.jsx(Wr,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:c,overscrollBehavior:f,viewportRef:P,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:C,onTopReached:x,startScrollPosition:E,"data-autosize":"true",children:n})})})});Wr.classes=G6;Wr.varsResolver=lL;aC.displayName="@mantine/core/ScrollAreaAutosize";aC.classes=G6;Wr.Autosize=aC;var uL={root:"m_87cf2631"};const HQ={__staticSelector:"UnstyledButton"},Ot=ji(e=>{const n=be("UnstyledButton",HQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:c,attributes:f,...h}=n;return y.jsx(me,{...Xe({name:r,props:n,classes:uL,className:t,style:c,classNames:o,styles:l,unstyled:a,attributes:f})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Ot.classes=uL;Ot.displayName="@mantine/core/UnstyledButton";var cL={root:"m_515a97f8"};const oC=Re(e=>{const n=be("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,...f}=n;return y.jsx(me,{component:"span",...Xe({name:"VisuallyHidden",classes:cL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c})("root"),...f})});oC.classes=cL;oC.displayName="@mantine/core/VisuallyHidden";var fL={root:"m_1b7284a3"};const dL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Wt(n),"--paper-shadow":z6(t)}}),Mt=ji(e=>{const n=be("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:c,radius:f,shadow:h,variant:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Paper",props:n,classes:fL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:c,varsResolver:dL});return y.jsx(me,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Mt.classes=fL;Mt.varsResolver=dL;Mt.displayName="@mantine/core/Paper";function Z5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function Q5(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const UQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function VQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[c,f="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[UQ[c]]:i},d=-n/2;return c==="left"?{...h,...Z5(f,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:c==="right"?{...h,...Z5(f,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:c==="top"?{...h,...Q5(f,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:c==="bottom"?{...h,...Q5(f,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function $g({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:c,...f}){const{dir:h}=Ru();return a?y.jsx("div",{...f,style:{...c,...VQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}$g.displayName="@mantine/core/FloatingArrow";function hL(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function mL({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},c=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:c}}var pL={root:"m_9814e45f"};const WQ={zIndex:wa("modal")},vL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Ws(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${he(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Wt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Vm=ji(e=>{const n=be("Overlay",WQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:c,center:f,children:h,radius:d,zIndex:p,gradient:v,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:C,...x}=n;return y.jsx(me,{...Xe({name:"Overlay",props:n,classes:pL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:vL})("root"),mod:[{center:f,fixed:c},_],...x,children:h})});Vm.classes=pL;Vm.varsResolver=vL;Vm.displayName="@mantine/core/Overlay";function wk(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function GQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||wk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=wk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return wk(t)}const YQ={reuseTargetNode:!0},gL=Re(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",YQ,e),[o,l]=A.useState(!1),c=A.useRef(null);return us(()=>(l(!0),c.current=GQ({target:t,reuseTargetNode:i,...a}),Eg(r,c.current),!t&&!i&&c.current&&document.body.appendChild(c.current),()=>{!t&&!i&&c.current&&document.body.removeChild(c.current)}),[t]),!o||!c.current?null:Qs.createPortal(y.jsx(y.Fragment,{children:n}),c.current)});gL.displayName="@mantine/core/Portal";const ul=Re(({withinPortal:e=!0,children:n,...t})=>Hm()==="test"||!e?y.jsx(y.Fragment,{children:n}):y.jsx(gL,{...t,children:n}));ul.displayName="@mantine/core/OptionalPortal";const th=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),$v={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...th("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...th("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...th("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...th("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...th("top"),common:{transformOrigin:"top right"}}},J5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function eT({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in $v?{transitionProperty:$v[e].transitionProperty,...r,...$v[e].common,...$v[e][J5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[J5[n]]}}function KQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:c,exitDelay:f}){const h=ui(),d=I6(),p=h.respectReducedMotion?d:!1,[v,b]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),C=A.useRef(-1),x=A.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(C.current),cancelAnimationFrame(x.current)}const O=M=>{E();const N=M?r:a,q=M?o:l,P=p?0:M?e:n;b(P),P===0?(typeof N=="function"&&N(),typeof q=="function"&&q(),k(M?"entered":"exited")):x.current=requestAnimationFrame(()=>{kh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),x.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),k(M?"entered":"exited")},P)})})},j=M=>{if(E(),typeof(M?c:f)!="number"){O(M);return}C.current=window.setTimeout(()=>{O(M)},M?c:f)};return ts(()=>{j(i)},[i]),A.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function rs({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:c,onEnter:f,onExited:h,enterDelay:d,exitDelay:p}){const v=Hm(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=KQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:c,onEnter:f,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?y.jsx(y.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?y.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?y.jsx(y.Fragment,{children:a({})}):null;const _=w==="exited";return e?y.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:eT({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:y.jsx(y.Fragment,{children:a(eT({transition:n,duration:b,state:w,timingFunction:k}))})}rs.displayName="@mantine/core/Transition";const XQ={duration:100,transition:"fade"};function nT(e,n){return{...XQ,...n,...e}}const[ZQ,yL]=Vr("Popover component was not found in the tree");function gy({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Gt(EK(n),i),a=Mu(e);return a?A.cloneElement(a,{[t]:r}):e}function bL(e){return y.jsx(oC,{tabIndex:-1,"data-autofocus":!0,...e})}gy.displayName="@mantine/core/FocusTrap";bL.displayName="@mantine/core/FocusTrapInitialFocus";gy.InitialFocus=bL;var wL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const sC=Re(e=>{var k,_,C,x;const n=be("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:c,styles:f,ref:h,...d}=n,p=yL(),v=dz({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Gt(h,p.floating);return p.disabled?null:y.jsx(ul,{...p.portalProps,withinPortal:p.withinPortal,children:y.jsx(rs,{mounted:p.opened,...p.transitionProps,transition:((k=p.transitionProps)==null?void 0:k.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((C=p.transitionProps)==null?void 0:C.exitDuration)=="number"?p.transitionProps.exitDuration:(x=p.transitionProps)==null?void 0:x.duration,children:E=>{var O;return y.jsx(gy,{active:p.trapFocus&&p.opened,innerRef:w,children:y.jsxs(me,{...b,...d,variant:l,onKeyDownCapture:gK(()=>{var j,M;(j=p.onClose)==null||j.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:c,styles:f,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:he(p.width),...p.referenceHidden?{display:"none"}:null},(O=p.resolvedStyles)==null?void 0:O.dropdown,f==null?void 0:f.dropdown,i]}),children:[a,y.jsx($g,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:c,styles:f})})]})})}})})});sC.classes=wL;sC.displayName="@mantine/core/PopoverDropdown";const QQ={refProp:"ref",popupType:"dialog"},kL=Re(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",QQ,e),o=Mu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,c=yL(),f=Gt(c.reference,sy(o),r),h=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...c.targetProps,className:dn(c.targetProps.className,l.className,d.className),[t]:f,...c.controlled?null:{onClick:p=>{var v;c.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});kL.displayName="@mantine/core/PopoverTarget";function JQ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function eJ(e,n,t){const i=JQ(e.middlewares),r=[tL(e.offset),_Q()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Ng():Ng(i.flip)),i.shift&&r.push(eC(typeof i.shift=="boolean"?{limiter:U5(),padding:5}:{limiter:U5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Dh():Dh(i.inline)),r.push(iL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(kQ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...c}){var h;const f=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...c}):Object.assign(f,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(f,{width:`${a.reference.width}px`})}})),r}function nJ(e){const n=Hm(),[t,i]=Pi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=rC({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:eJ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:xS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return xS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),ts(()=>{var c;(c=e.onPositionChange)==null||c.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),ts(()=>{var c,f;t!==r.current&&(t?(f=e.onOpen)==null||f.call(e):(c=e.onClose)==null||c.call(e)),r.current=t},[t,e.onClose,e.onOpen]),us(()=>{let c=-1;return t&&(c=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(c)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const tJ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:wa("popover"),__staticSelector:"Popover",width:"max-content"},_L=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Wt(n),"--popover-shadow":z6(t)}});function jn(e){var rn,fn,En,pn,on,nn,Nn;const n=be("Popover",tJ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:f,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:C,styles:x,closeOnClickOutside:E,withinPortal:O,portalProps:j,closeOnEscape:M,clickOutsideEvents:N,trapFocus:q,onClose:P,onDismiss:L,onOpen:H,onChange:G,zIndex:U,radius:z,shadow:D,id:$,defaultOpened:B,__staticSelector:Y,withRoles:R,disabled:W,returnFocus:V,variant:I,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:le,overlayProps:ye,hideDetached:ae,attributes:ue,preventPositionChangeWhenVisible:xe,...ne}=n,ze=Xe({name:Y,props:n,classes:wL,classNames:C,styles:x,unstyled:_,attributes:ue,rootSelector:"dropdown",vars:ee,varsResolver:_L}),{resolvedStyles:we}=Wi({classNames:C,styles:x,props:n}),[Oe,Ne]=A.useState(o??B??!1),ge=A.useRef(i),Se=A.useRef(null),[Pe,ce]=A.useState(null),[Be,Ye]=A.useState(null),{dir:We}=Ru(),Ze=Hm(),Qe=Vi($),ie=nJ({middlewares:d,width:h,position:hL(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:Se,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:B,onChange:G,onOpen:H,onClose:P,onDismiss:L,strategy:re,dropdownVisible:Oe,setDropdownVisible:Ne,positionRef:ge,disabled:W,preventPositionChangeWhenVisible:xe,keepMounted:X});kK(()=>{E&&(ie.onClose(),L==null||L())},N,[Pe,Be]);const ve=A.useCallback(De=>{ce(De),ie.floating.refs.setReference(De)},[ie.floating.refs.setReference]),Ke=A.useCallback(De=>{Ye(De),ie.floating.refs.setFloating(De)},[ie.floating.refs.setFloating]),Je=A.useCallback(()=>{var De;(De=l==null?void 0:l.onExited)==null||De.call(l),c==null||c(),Ne(!1),xe||(ge.current=i)},[l==null?void 0:l.onExited,c,xe,i]),Ae=A.useCallback(()=>{var De;(De=l==null?void 0:l.onEntered)==null||De.call(l),f==null||f()},[l==null?void 0:l.onEntered,f]);return y.jsxs(ZQ,{value:{returnFocus:V,disabled:W,controlled:ie.controlled,reference:ve,floating:Ke,x:ie.floating.x,y:ie.floating.y,arrowX:(En=(fn=(rn=ie.floating)==null?void 0:rn.middlewareData)==null?void 0:fn.arrow)==null?void 0:En.x,arrowY:(nn=(on=(pn=ie.floating)==null?void 0:pn.middlewareData)==null?void 0:on.arrow)==null?void 0:nn.y,opened:ie.opened,arrowRef:Se,transitionProps:{...l,onExited:Je,onEntered:Ae},width:h,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:q,withinPortal:O,portalProps:j,zIndex:U,radius:z,shadow:D,closeOnEscape:M,onDismiss:L,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Qe,getDropdownId:()=>`${Qe}-dropdown`,withRoles:R,targetProps:ne,__staticSelector:Y,classNames:C,styles:x,unstyled:_,variant:I,keepMounted:X,getStyles:ze,resolvedStyles:we,floatingStrategy:re,referenceHidden:ae&&Ze!=="test"?(Nn=ie.floating.middlewareData.hide)==null?void 0:Nn.referenceHidden:!1},children:[t,le&&y.jsx(rs,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:De=>y.jsx(ul,{withinPortal:O,children:y.jsx(Vm,{...ye,...ze("overlay",{className:ye==null?void 0:ye.className,style:[De,ye==null?void 0:ye.style]})})})})]})}jn.Target=kL;jn.Dropdown=sC;jn.varsResolver=_L;jn.displayName="@mantine/core/Popover";jn.extend=e=>e;jn.withProps=e=>{const n=t=>y.jsx(jn,{...e,...t});return n.extend=jn.extend,n.displayName=`WithProps(${jn.displayName})`,n};var Ba={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const xL=({className:e,...n})=>y.jsxs(me,{component:"span",className:dn(Ba.barsLoader,e),...n,children:[y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar})]});xL.displayName="@mantine/core/Bars";const SL=({className:e,...n})=>y.jsxs(me,{component:"span",className:dn(Ba.dotsLoader,e),...n,children:[y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot})]});SL.displayName="@mantine/core/Dots";const CL=({className:e,...n})=>y.jsx(me,{component:"span",className:dn(Ba.ovalLoader,e),...n});CL.displayName="@mantine/core/Oval";const AL={bars:xL,oval:CL,dots:SL},iJ={loaders:AL,type:"oval"},OL=(e,{size:n,color:t})=>({root:{"--loader-size":zn(n,"loader-size"),"--loader-color":t?lt(t,e):void 0}}),bi=Re(e=>{const n=be("Loader",iJ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:c,styles:f,unstyled:h,loaders:d,variant:p,children:v,attributes:b,...w}=n,k=Xe({name:"Loader",props:n,classes:Ba,className:o,style:l,classNames:c,styles:f,unstyled:h,attributes:b,vars:a,varsResolver:OL});return v?y.jsx(me,{...k("root"),...w,children:v}):y.jsx(me,{...k("root"),component:d[r],variant:p,size:t,...w})});bi.defaultLoaders=AL;bi.classes=Ba;bi.varsResolver=OL;bi.displayName="@mantine/core/Loader";var $f={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const tT={orientation:"horizontal"},jL=(e,{borderWidth:n})=>({group:{"--ai-border-width":he(n)}}),yy=Re(e=>{const n=be("ActionIconGroup",tT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:c,borderWidth:f,variant:h,mod:d,attributes:p,...v}=be("ActionIconGroup",tT,e);return y.jsx(me,{...Xe({name:"ActionIconGroup",props:n,classes:$f,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:jL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});yy.classes=$f;yy.varsResolver=jL;yy.displayName="@mantine/core/ActionIconGroup";const EL=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":zn(o,"section-height"),"--section-padding-x":zn(o,"section-padding-x"),"--section-fz":ii(o),"--section-radius":n===void 0?void 0:Wt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},by=Re(e=>{const n=be("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:c,gradient:f,radius:h,autoContrast:d,attributes:p,...v}=n;return y.jsx(me,{...Xe({name:"ActionIconGroupSection",props:n,classes:$f,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:EL,rootSelector:"groupSection"})("groupSection"),variant:c,...v})});by.classes=$f;by.varsResolver=EL;by.displayName="@mantine/core/ActionIconGroupSection";const TL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":zn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Wt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},wt=ji(e=>{const n=be("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:c,loaderProps:f,size:h,color:d,radius:p,__staticSelector:v,gradient:b,vars:w,children:k,disabled:_,"data-disabled":C,autoContrast:x,mod:E,attributes:O,...j}=n,M=Xe({name:["ActionIcon",v],props:n,className:t,style:l,classes:$f,classNames:a,styles:o,unstyled:i,attributes:O,vars:w,varsResolver:TL});return y.jsxs(Ot,{...M("root",{active:!_&&!c&&!C}),...j,unstyled:i,variant:r,size:h,disabled:_||c,mod:[{loading:c,disabled:_||C},E],children:[typeof c=="boolean"&&y.jsx(rs,{mounted:c,transition:"slide-down",duration:150,children:N=>y.jsx(me,{component:"span",...M("loader",{style:N}),"aria-hidden":!0,children:y.jsx(bi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...f})})}),y.jsx(me,{component:"span",mod:{loading:c},...M("icon"),children:k})]})});wt.classes=$f;wt.varsResolver=TL;wt.displayName="@mantine/core/ActionIcon";wt.Group=yy;wt.GroupSection=by;function ML({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}ML.displayName="@mantine/core/CloseIcon";var DL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const rJ={variant:"subtle"},RL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":zn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Wt(t),"--cb-icon-size":he(i)}}),ml=ji(e=>{const n=be("CloseButton",rJ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:c,styles:f,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:b,mod:w,attributes:k,__staticSelector:_,...C}=n,x=Xe({name:_||"CloseButton",props:n,className:o,style:c,classes:DL,classNames:l,styles:f,unstyled:h,attributes:k,vars:r,varsResolver:RL});return y.jsxs(Ot,{...C,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...x("root",{variant:v,active:!p&&!d}),children:[b||y.jsx(ML,{}),i]})});ml.classes=DL;ml.varsResolver=RL;ml.displayName="@mantine/core/CloseButton";function aJ(e){return A.Children.toArray(e).filter(Boolean)}var PL={root:"m_4081bf90"};const oJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},NL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ht(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),He=Re(e=>{const n=be("Group",oJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:c,align:f,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:b,variant:w,__size:k,mod:_,attributes:C,...x}=n,E=aJ(l),O=E.length,j=Ht(c??"md");return y.jsx(me,{...Xe({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/O}% - (${j} - ${j} / ${O}))`},className:i,style:r,classes:PL,classNames:t,styles:a,unstyled:o,attributes:C,vars:b,varsResolver:NL})("root"),variant:w,mod:[{grow:p},_],size:k,...x,children:E})});He.classes=PL;He.varsResolver=NL;He.displayName="@mantine/core/Group";const[sJ,fs]=Vr("ModalBase component was not found in tree");function lJ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=I6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function uJ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Vi(e),[c,f]=A.useState(!1),[h,d]=A.useState(!1),p=lJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return vz("keydown",v=>{var b;v.key==="Escape"&&r&&!v.isComposing&&t&&((b=v.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),dz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:c,bodyMounted:h,shouldLockScroll:p,setTitleMounted:f,setBodyMounted:d}}var no=function(){return no=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return AJ;var n=OJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},EJ=IL(),Vc="data-scroll-locked",TJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` - .`.concat(fJ,` { +${o?`${l("light")}{${o}}`:""}`}function $v({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Zh(e,"light"),c={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:A5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...c}:c}const a=Zh(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:au(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:au(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:A5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function vX(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Xl(e,n,t){Pt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const Rz=e=>{const n=Zh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:me(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":j5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":j5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Xl(i.variables,e.breakpoints,"breakpoint"),Xl(i.variables,e.spacing,"spacing"),Xl(i.variables,e.fontSizes,"font-size"),Xl(i.variables,e.lineHeights,"line-height"),Xl(i.variables,e.shadows,"shadow"),Xl(i.variables,e.radius,"radius"),Xl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Pt(e.colors).forEach(a=>{const o=e.colors[a];if(vX(o)){Object.assign(i.light,$v({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,$v({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,c)=>{i.variables[`--mantine-color-${a}-${c}`]=l}),Object.assign(i.light,$v({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,$v({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Pt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function gX(){const e=ui(),n=q6(),t=Pt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Yh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Tg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Tg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return g.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function yX({theme:e,generator:n}){const t=Rz(e),i=n==null?void 0:n(e);return i?P6(t,i):t}const hk=Rz(H6);function bX(e){const n={variables:{},light:{},dark:{}};return Pt(e.variables).forEach(t=>{hk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Pt(e.light).forEach(t=>{hk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Pt(e.dark).forEach(t=>{hk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function wX(e){return Dz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function Pz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ui(),i=q6(),r=yX({theme:t,generator:rX()}),a=(e===void 0||e===":root"||e===":host")&&n,o=Dz(a?bX(r):r,e);return o?g.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":wX(e)}`}}):null}Pz.displayName="@mantine/CssVariables";function kX({respectReducedMotion:e,getRootElement:n}){ps(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function Nz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:c="mantine",colorSchemeManager:f=ZK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:C,clearColorScheme:x}=fX({defaultColorScheme:h,forceColorScheme:v,manager:f,getRootElement:d});return kX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),g.jsx(Tz,{value:{colorScheme:_,setColorScheme:C,clearColorScheme:x,getRootElement:d,classNamesPrefix:c,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:g.jsxs(Mz,{theme:e,children:[o&&g.jsx(Pz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&g.jsx(gX,{}),n]})})}Nz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=ui(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Tu(t)}}function Wi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ui();return{resolvedClassNames:e===void 0?void 0:Xh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Rg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const _X={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function xX({theme:e,options:n,unstyled:t}){return pn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||_X[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function SX({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Xh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function CX({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Xh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function AX({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function jX({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function OX({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function EX({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function TX({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:c,className:f,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:b,transformedStyles:w}){return pn(xX({theme:e,options:n,unstyled:c||b}),o.map(k=>k[i]),EX({options:n,classes:l,selector:i,unstyled:c||b}),a[i],CX({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),SX({selector:i,stylesCtx:p,options:n,props:d,theme:e}),AX({rootSelector:h,selector:i,className:f}),jX({selector:i,classes:l,unstyled:c||b}),v&&!b&&OX({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function V6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...V6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function MX({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:c,resolvedVars:f,resolvedRootStyle:h}){return{...c[n],...l[n],...!o&&Rg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...f[n],...a===n?h:null,...V6({style:t==null?void 0:t.style,theme:e})}}function DX(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Tu(t[i])}}),n),{})}function RX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=uX())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(c=>r(c,{props:e,theme:i,ctx:n})),...t.map(c=>{var f;return r((f=i.components[c])==null?void 0:f.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Xe({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:c,styles:f,vars:h,varsResolver:d,attributes:p}){var R;const v=ui(),b=aX(),w=oX(),k=sX(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:C,getTransformedStyles:x}=RX({props:t,stylesCtx:i,themeName:_,theme:v}),E=Xh({theme:v,classNames:c,props:t,stylesCtx:i}),j=_.map(L=>{var F;return Xh({theme:v,classNames:(F=v.components[L])==null?void 0:F.classNames,props:t,stylesCtx:i})}),O=C?{}:Rg({theme:v,styles:f,props:t,stylesCtx:i}),M={};if(!C)for(const L of _){const F=Rg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const Y of Object.keys(F))M[Y]={...M[Y],...F[Y]}}const N=DX([k?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var F,Y,V;return(V=(Y=(F=v.components)==null?void 0:F[L])==null?void 0:Y.vars)==null?void 0:V.call(Y,v,t,i)}),h==null?void 0:h(v,t,i)]),q=V6({style:a,theme:v});return(L,F)=>({...p==null?void 0:p[L],className:TX({theme:v,options:F,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:E,resolvedThemeClassNames:j,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:x([F==null?void 0:F.styles,f])}),style:MX({theme:v,selector:L,options:F,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:C,resolvedStyles:O,resolvedThemeStyles:M,resolvedVars:N,resolvedRootStyle:q})})}function Ph(e){return Pt(e).reduce((n,t)=>e[t]!==void 0?`${n}${wK(t)}:${e[t]};`:n,"").trim()}function PX({selector:e,styles:n,media:t,container:i}){const r=n?Ph(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${Ph(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${Ph(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function NX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Nf({deduplicate:e,...n}){const t=q6(),i=PX(n);return e?g.jsx("style",{href:`mantine-${NX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):g.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function $X(e){let n=5381;for(let t=0;t>>0).toString(36)}function zX(e,n){return`__mdi__-${$X(`${e?Ph(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${Ph(t.styles)}`).join("|"):""}`)}`}function Du(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:c,ms:f,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pe:x,ps:E,pis:j,pie:O,bd:M,bdrs:N,bg:q,c:R,opacity:L,ff:F,fz:Y,fw:V,lts:$,ta:P,lh:I,fs:H,tt:U,td:D,w:W,miw:G,maw:z,h:X,mih:ee,mah:re,bgsz:le,bgp:ye,bgr:ae,bga:ue,pos:Se,top:ne,left:Le,bottom:ke,right:je,inset:Ne,display:ge,flex:Ce,hiddenFrom:Pe,visibleFrom:ce,lightHidden:qe,darkHidden:Ye,sx:We,...Ze}=e;return{styleProps:Tu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:c,ms:f,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pis:j,pie:O,pe:x,ps:E,bd:M,bg:q,c:R,opacity:L,ff:F,fz:Y,fw:V,lts:$,ta:P,lh:I,fs:H,tt:U,td:D,w:W,miw:G,maw:z,h:X,mih:ee,mah:re,bgsz:le,bgp:ye,bgr:ae,bga:ue,pos:Se,top:ne,left:Le,bottom:ke,right:je,inset:Ne,display:ge,flex:Ce,bdrs:N,hiddenFrom:Pe,visibleFrom:ce,lightHidden:qe,darkHidden:Ye,sx:We}),rest:Ze}}const LX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function W6(e,n){const t=vs({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function IX(e,n){const t=vs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:W6(e,n)}function BX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${me(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${W6(r.join(" "),n)}`),a.trim()}return e}const M5={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function FX(e){return typeof e=="string"&&e in M5?M5[e]:e}const qX=["h1","h2","h3","h4","h5","h6"];function HX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&qX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?me(e):e}function UX(e){return e}const VX=["h1","h2","h3","h4","h5","h6"];function WX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&VX.includes(e)?`var(--mantine-${e}-line-height)`:e}function GX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?me(e):e}function YX(e){return typeof e=="number"?me(e):e}function KX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return me(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const mk={color:W6,textColor:IX,fontSize:HX,spacing:KX,radius:GX,identity:UX,size:YX,lineHeight:WX,fontFamily:FX,border:BX};function D5(e){return e.replace("(min-width: ","").replace("em)","")}function XX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(D5(i))-Number(D5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function ZX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function QX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function JX(e){return typeof e=="object"&&e!==null?Pt(e).filter(n=>n!=="base"):[]}function eZ(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function nZ({styleProps:e,data:n,theme:t}){return XX(Pt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=QX(e[r]);if(!ZX(e[r]))return o.forEach(f=>{i.inlineStyles[f]=mk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const c=JX(e[r]);return o.forEach(f=>{l!=null&&(i.styles[f]=mk[a.type](l,t)),c.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[f]:mk[a.type](eZ(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function cy(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function $z(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...$z(i,n)}),{}):typeof e=="function"?e(n):e??{}}function tZ(e){return e}const iZ=tZ;function zz(e){return e}function De(e){const n=e;return n.extend=zz,n.withProps=t=>{const i=r=>g.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function fy(e){return De(e)}function Ai(e){const n=e;return n.withProps=t=>{const i=r=>g.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=zz,n}function Lz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function rZ(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[Lz(t)]=e[t]),n},{})}function Iz(e){return e?typeof e=="string"?{[Lz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...Iz(t)}),{}):rZ(e):null}function gS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...gS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function aZ({theme:e,style:n,vars:t,styleProps:i}){const r=gS(n,e),a=gS(t,e);return{...r,...a,...i}}function Bz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:c,lightHidden:f,darkHidden:h,renderRoot:d,__size:p,ref:v,...b}){var q,R;const w=ui(),k=e||"div",{styleProps:_,rest:C}=Du(b),x=(R=(q=lX())==null?void 0:q())==null?void 0:R(_.sx),E=cy(),j=nZ({styleProps:_,theme:w,data:LX}),O=cX(),M=O&&j.hasResponsiveStyles?zX(j.styles,j.media):E,N={ref:v,style:aZ({theme:w,style:n,vars:t,styleProps:j.inlineStyles}),className:pn(i,x,{[M]:j.hasResponsiveStyles,"mantine-light-hidden":f,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${c}`]:c}),"data-variant":r,"data-size":gz(o)?void 0:o||void 0,size:p,...Iz(a),...C};return g.jsxs(g.Fragment,{children:[j.hasResponsiveStyles&&g.jsx(Nf,{selector:`.${M}`,styles:j.styles,media:j.media,deduplicate:O}),typeof d=="function"?d(N):g.jsx(k,{...N})]})}Bz.displayName="@mantine/core/Box";const he=iZ(Bz),oZ=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Ru(){return A.use(oZ)}const[sZ,Ca]=Xr("ScrollArea.Root component was not found in tree");function hl(e,n){const t=A.useEffectEvent(n);ps(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function lZ(e){const{style:n,...t}=e,i=Ca(),[r,a]=A.useState(0),[o,l]=A.useState(0),c=!!(r&&o);return hl(i.scrollbarX,()=>{var h;const f=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(f),l(f)}),hl(i.scrollbarY,()=>{var h;const f=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(f),a(f)}),c?g.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function uZ(e){const n=Ca(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?g.jsx(lZ,{...e}):null}const cZ={scrollHideDelay:1e3,type:"hover"};function Fz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",cZ,e),[l,c]=A.useState(null),[f,h]=A.useState(null),[d,p]=A.useState(null),[v,b]=A.useState(null),[w,k]=A.useState(null),[_,C]=A.useState(0),[x,E]=A.useState(0),[j,O]=A.useState(!1),[M,N]=A.useState(!1),q=Kt(a,R=>c(R));return g.jsx(sZ,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:f,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:j,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:N,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:r},children:g.jsx(he,{...o,ref:q,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${x}px`}})})}Fz.displayName="@mantine/core/ScrollAreaRoot";function qz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function dy(e){const n=qz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function Hz(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function fZ(e,[n,t]){return Math.min(t,Math.max(n,e))}function R5(e,n,t="ltr"){const i=dy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,c=fZ(e,t==="ltr"?[0,o]:[o*-1,0]);return Hz([0,o],[0,l])(c)}function dZ(e,n,t,i="ltr"){const r=dy(t),a=r/2,o=n||a,l=r-o,c=t.scrollbar.paddingStart+o,f=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return Hz([c,f],d)(e)}function Uz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[hZ,Vz]=Xr("ScrollAreaScrollbar was not found in tree");function Wz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:c,onResize:f,ref:h,...d}=e,p=Ca(),[v,b]=A.useState(null),w=Kt(h,N=>b(N)),k=A.useRef(null),_=A.useRef(""),{viewport:C}=p,x=n.content-n.viewport,E=A.useEffectEvent(c),j=xh(o),O=ly(f,10),M=N=>{k.current&&l({x:N.clientX-k.current.left,y:N.clientY-k.current.top})};return A.useEffect(()=>{const N=q=>{const R=q.target;v!=null&&v.contains(R)&&E(q,x)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[C,v,x]),A.useEffect(j,[n,j]),hl(v,O),hl(p.content,O),g.jsx(hZ,{value:{scrollbar:v,hasThumb:t,onThumbChange:xh(i),onThumbPointerUp:xh(r),onThumbPositionChange:j,onThumbPointerDown:xh(a)},children:g.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:mu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(N))}),onPointerMove:mu(e.onPointerMove,M),onPointerUp:mu(e.onPointerUp,N=>{const q=N.target;q.hasPointerCapture(N.pointerId)&&(N.preventDefault(),q.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const Gz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Ca(),[l,c]=A.useState(),f=A.useRef(null),h=Kt(r,f,o.onScrollbarXChange);return A.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),g.jsx(Wz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${dy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Uz(v,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Pg(l.paddingLeft),paddingEnd:Pg(l.paddingRight)}})}})};Gz.displayName="@mantine/core/ScrollAreaScrollbarX";function Yz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=Ca(),[l,c]=A.useState(),f=A.useRef(null),h=Kt(r,f,o.onScrollbarYChange);return A.useEffect(()=>{f.current&&c(window.getComputedStyle(f.current))},[]),g.jsx(Wz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${dy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Uz(v,p)&&d.preventDefault()}},onResize:()=>{f.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Pg(l.paddingTop),paddingEnd:Pg(l.paddingBottom)}})}})}Yz.displayName="@mantine/core/ScrollAreaScrollbarY";function hy(e){const{orientation:n="vertical",...t}=e,{dir:i}=Ru(),r=Ca(),a=A.useRef(null),o=A.useRef(0),[l,c]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=qz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:c,hasThumb:f>0&&f<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>dZ(p,o.current,l,v);return n==="horizontal"?g.jsx(Gz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=R5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?g.jsx(Yz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=R5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}hy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function G6(e){const n=Ca(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=ly(()=>{if(n.viewport){const c=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const c=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",c),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",c),o.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),n||r?g.jsx(G6,{"data-state":r?"visible":"hidden",...t}):null}Kz.displayName="@mantine/core/ScrollAreaScrollbarHover";function mZ(e){const{forceMount:n,...t}=e,i=Ca(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=ly(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:c}=i,f=r?"scrollLeft":"scrollTop";if(c){let h=c[f];const d=()=>{const p=c[f];h!==p&&(o("scrolling"),l()),h=p};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?g.jsx(hy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:mu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:mu(e.onPointerLeave,()=>o("idle"))}):null}function yS(e){const{forceMount:n,...t}=e,i=Ca(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?g.jsx(Kz,{...t,forceMount:n}):i.type==="scroll"?g.jsx(mZ,{...t,forceMount:n}):i.type==="auto"?g.jsx(G6,{...t,forceMount:n}):i.type==="always"?g.jsx(hy,{...t}):null}yS.displayName="@mantine/core/ScrollAreaScrollbar";function pZ(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function Xz(e){const{style:n,ref:t,...i}=e,r=Ca(),a=Vz(),{onThumbPositionChange:o}=a,l=Kt(t,h=>a.onThumbChange(h)),c=A.useRef(void 0),f=ly(()=>{c.current&&(c.current(),c.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{f(),c.current||(c.current=pZ(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,f,o]),g.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:mu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:mu(e.onPointerUp,a.onThumbPointerUp)})}Xz.displayName="@mantine/core/ScrollAreaThumb";function bS(e){const{forceMount:n,...t}=e,i=Vz();return n||i.hasThumb?g.jsx(Xz,{...t}):null}bS.displayName="@mantine/core/ScrollAreaThumb";function Zz({children:e,style:n,ref:t,onWheel:i,...r}){const a=Ca(),o=Kt(t,a.onViewportChange),l=c=>{if(i==null||i(c),a.scrollbarXEnabled&&a.viewport&&c.shiftKey){const{scrollTop:f,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,b=f<1,w=f>=h-d-1;p>v&&(b||w)&&c.stopPropagation()}};return g.jsx(he,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:g.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}Zz.displayName="@mantine/core/ScrollAreaViewport";var Y6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function my(){return typeof window<"u"}function $f(e){return Qz(e)?(e.nodeName||"").toLowerCase():"#document"}function Ar(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function xo(e){var n;return(n=(Qz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Qz(e){return my()?e instanceof Node||e instanceof Ar(e).Node:!1}function Wt(e){return my()?e instanceof Element||e instanceof Ar(e).Element:!1}function Aa(e){return my()?e instanceof HTMLElement||e instanceof Ar(e).HTMLElement:!1}function wS(e){return!my()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ar(e).ShadowRoot}function Km(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=_a(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function vZ(e){return/^(table|td|th)$/.test($f(e))}function py(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const gZ=/transform|translate|scale|rotate|perspective|filter/,yZ=/paint|layout|strict|content/,Zl=e=>!!e&&e!=="none";let pk;function K6(e){const n=Wt(e)?_a(e):e;return Zl(n.transform)||Zl(n.translate)||Zl(n.scale)||Zl(n.rotate)||Zl(n.perspective)||!vy()&&(Zl(n.backdropFilter)||Zl(n.filter))||gZ.test(n.willChange||"")||yZ.test(n.contain||"")}function bZ(e){let n=us(e);for(;Aa(n)&&!ts(n);){if(K6(n))return n;if(py(n))return null;n=us(n)}return null}function vy(){return pk==null&&(pk=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),pk}function ts(e){return/^(html|body|#document)$/.test($f(e))}function _a(e){return Ar(e).getComputedStyle(e)}function gy(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function us(e){if($f(e)==="html")return e;const n=e.assignedSlot||e.parentNode||wS(e)&&e.host||xo(e);return wS(n)?n.host:n}function Jz(e){const n=us(e);return ts(n)?e.ownerDocument?e.ownerDocument.body:e.body:Aa(n)&&Km(n)?n:Jz(n)}function is(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Jz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=Ar(r);if(a){const l=kS(o);return n.concat(o,o.visualViewport||[],Km(r)?r:[],l&&t?is(l):[])}else return n.concat(r,is(r,[],t))}function kS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const wZ=["top","right","bottom","left"],Ua=Math.min,Zi=Math.max,Ng=Math.round,zv=Math.floor,lo=e=>({x:e,y:e}),kZ={left:"right",right:"left",bottom:"top",top:"bottom"};function _S(e,n,t){return Zi(e,Ua(n,t))}function po(e,n){return typeof e=="function"?e(n):e}function Va(e){return e.split("-")[0]}function zf(e){return e.split("-")[1]}function X6(e){return e==="x"?"y":"x"}function Z6(e){return e==="y"?"height":"width"}function Ba(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Q6(e){return X6(Ba(e))}function _Z(e,n,t){t===void 0&&(t=!1);const i=zf(e),r=Q6(e),a=Z6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=$g(o)),[o,$g(o)]}function xZ(e){const n=$g(e);return[xS(e),n,xS(n)]}function xS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const P5=["left","right"],N5=["right","left"],SZ=["top","bottom"],CZ=["bottom","top"];function AZ(e,n,t){switch(e){case"top":case"bottom":return t?n?N5:P5:n?P5:N5;case"left":case"right":return n?SZ:CZ;default:return[]}}function jZ(e,n,t,i){const r=zf(e);let a=AZ(Va(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(xS)))),a}function $g(e){const n=Va(e);return kZ[n]+e.slice(n.length)}function OZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function J6(e){return typeof e!="number"?OZ(e):{top:e,right:e,bottom:e,left:e}}function nf(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function EZ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function TZ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function MZ(){return/apple/i.test(navigator.vendor)}function DZ(){return EZ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function RZ(){return TZ().includes("jsdom/")}const $5="data-floating-ui-focusable",PZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function z5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Qh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&wS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Ic(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vk(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function NZ(e){return e.matches("html,body")}function su(e){return(e==null?void 0:e.ownerDocument)||document}function $Z(e){return Aa(e)&&e.matches(PZ)}function zZ(e){if(!e||RZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function LZ(e){return e?e.hasAttribute($5)?e:e.querySelector("["+$5+"]")||e:null}function vg(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...vg(e,r.id,t)])}function IZ(e){return"nativeEvent"in e}function SS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var BZ=typeof document<"u",FZ=function(){},uo=BZ?A.useLayoutEffect:FZ;const qZ={...yz};function Lv(e){const n=A.useRef(e);return uo(()=>{n.current=e}),n}const HZ=qZ.useInsertionEffect,UZ=HZ||(e=>e());function ro(e){const n=A.useRef(()=>{});return UZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:VZ},c=await(o.isRTL==null?void 0:o.isRTL(n));let f=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=L5(f,i,c),p=i,v=0;const b={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:c}=n,{element:f,padding:h=0}=po(e,n)||{};if(f==null)return{};const d=J6(h),p={x:t,y:i},v=Q6(r),b=Z6(v),w=await o.getDimensions(f),k=v==="y",_=k?"top":"left",C=k?"bottom":"right",x=k?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[v]-p[v]-a.floating[b],j=p[v]-a.reference[v],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=O?O[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[x]||a.floating[b]);const N=E/2-j/2,q=M/2-w[b]/2-1,R=Ua(d[_],q),L=Ua(d[C],q),F=R,Y=M-w[b]-L,V=M/2-w[b]/2+N,$=_S(F,V,Y),P=!c.arrow&&zf(r)!=null&&V!==$&&a.reference[b]/2-(VV<=0)){var L,F;const V=(((L=a.flip)==null?void 0:L.index)||0)+1,$=M[V];if($&&(!(d==="alignment"?C!==Ba($):!1)||R.every(H=>Ba(H.placement)===C?H.overflows[0]>0:!0)))return{data:{index:V,overflows:R},reset:{placement:$}};let P=(F=R.filter(I=>I.overflows[0]<=0).sort((I,H)=>I.overflows[1]-H.overflows[1])[0])==null?void 0:F.placement;if(!P)switch(v){case"bestFit":{var Y;const I=(Y=R.filter(H=>{if(O){const U=Ba(H.placement);return U===C||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,D)=>U+D,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:Y[0];I&&(P=I);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function I5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function B5(e){return wZ.some(n=>e[n]>=0)}const XZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=po(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=I5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:B5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=I5(o,t.floating);return{data:{escapedOffsets:l,escaped:B5(l)}}}default:return{}}}}};function eL(e){const n=Ua(...e.map(a=>a.left)),t=Ua(...e.map(a=>a.top)),i=Zi(...e.map(a=>a.right)),r=Zi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function ZZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>nf(eL(r)))}const QZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:c,y:f}=po(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=ZZ(h),p=nf(eL(h)),v=J6(l);function b(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&f!=null)return d.find(k=>c>k.left-v.left&&ck.top-v.top&&f=2){if(Ba(t)==="y"){const R=d[0],L=d[d.length-1],F=Va(t)==="top",Y=R.top,V=L.bottom,$=F?R.left:L.left,P=F?R.right:L.right,I=P-$,H=V-Y;return{top:Y,bottom:V,left:$,right:P,width:I,height:H,x:$,y:Y}}const k=Va(t)==="left",_=Zi(...d.map(R=>R.right)),C=Ua(...d.map(R=>R.left)),x=d.filter(R=>k?R.left===C:R.right===_),E=x[0].top,j=x[x.length-1].bottom,O=C,M=_,N=M-O,q=j-E;return{top:E,bottom:j,left:O,right:M,width:N,height:q,x:O,y:E}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:b},floating:i.floating,strategy:o});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},nL=new Set(["left","top"]);async function JZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Va(t),l=zf(t),c=Ba(t)==="y",f=nL.has(o)?-1:1,h=a&&c?-1:1,d=po(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),c?{x:v*h,y:p*f}:{x:p*f,y:v*h}}const eQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,c=await JZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:o}}}}},nQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:_=>{let{x:C,y:x}=_;return{x:C,y:x}}},...f}=po(e,n),h={x:t,y:i},d=await a.detectOverflow(n,f),p=Ba(Va(r)),v=X6(p);let b=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",C=v==="y"?"bottom":"right",x=b+d[_],E=b-d[C];b=_S(x,b,E)}if(l){const _=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[_],E=w-d[C];w=_S(x,w,E)}const k=c.fn({...n,[v]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},tQ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=po(e,n),h={x:t,y:i},d=Ba(r),p=X6(d);let v=h[p],b=h[d];const w=po(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=p==="y"?"height":"width",E=a.reference[p]-a.floating[x]+k.mainAxis,j=a.reference[p]+a.reference[x]-k.mainAxis;vj&&(v=j)}if(f){var _,C;const x=p==="y"?"width":"height",E=nL.has(Va(r)),j=a.reference[d]-a.floating[x]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:k.crossAxis),O=a.reference[d]+a.reference[x]+(E?0:((C=o.offset)==null?void 0:C[d])||0)-(E?k.crossAxis:0);bO&&(b=O)}return{[p]:v,[d]:b}}}},iQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:c=()=>{},...f}=po(e,n),h=await o.detectOverflow(n,f),d=Va(r),p=zf(r),v=Ba(r)==="y",{width:b,height:w}=a.floating;let k,_;d==="top"||d==="bottom"?(k=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,k=p==="end"?"top":"bottom");const C=w-h.top-h.bottom,x=b-h.left-h.right,E=Ua(w-h[k],C),j=Ua(b-h[_],x),O=!n.middlewareData.shift;let M=E,N=j;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=x),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=C),O&&!p){const R=Zi(h.left,0),L=Zi(h.right,0),F=Zi(h.top,0),Y=Zi(h.bottom,0);v?N=b-2*(R!==0||L!==0?R+L:Zi(h.left,h.right)):M=w-2*(F!==0||Y!==0?F+Y:Zi(h.top,h.bottom))}await c({...n,availableWidth:N,availableHeight:M});const q=await o.getDimensions(l.floating);return b!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function tL(e){const n=_a(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=Aa(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Ng(t)!==a||Ng(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function eC(e){return Wt(e)?e:e.contextElement}function Wc(e){const n=eC(e);if(!Aa(n))return lo(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=tL(n);let o=(a?Ng(t.width):t.width)/i,l=(a?Ng(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const rQ=lo(0);function iL(e){const n=Ar(e);return!vy()||!n.visualViewport?rQ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function aQ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==Ar(e)?!1:n}function gu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=eC(e);let o=lo(1);n&&(i?Wt(i)&&(o=Wc(i)):o=Wc(e));const l=aQ(a,t,i)?iL(a):lo(0);let c=(r.left+l.x)/o.x,f=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=Ar(a),v=i&&Wt(i)?Ar(i):i;let b=p,w=kS(b);for(;w&&i&&v!==b;){const k=Wc(w),_=w.getBoundingClientRect(),C=_a(w),x=_.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=_.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;c*=k.x,f*=k.y,h*=k.x,d*=k.y,c+=x,f+=E,b=Ar(w),w=kS(b)}}return nf({width:h,height:d,x:c,y:f})}function yy(e,n){const t=gy(e).scrollLeft;return n?n.left+t:gu(xo(e)).left+t}function rL(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-yy(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function oQ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=xo(i),l=n?py(n.floating):!1;if(i===o||l&&a)return t;let c={scrollLeft:0,scrollTop:0},f=lo(1);const h=lo(0),d=Aa(i);if((d||!d&&!a)&&(($f(i)!=="body"||Km(o))&&(c=gy(i)),d)){const v=gu(i);f=Wc(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?rL(o,c):lo(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-c.scrollLeft*f.x+h.x+p.x,y:t.y*f.y-c.scrollTop*f.y+h.y+p.y}}function sQ(e){return Array.from(e.getClientRects())}function lQ(e){const n=xo(e),t=gy(e),i=e.ownerDocument.body,r=Zi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Zi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+yy(e);const l=-t.scrollTop;return _a(i).direction==="rtl"&&(o+=Zi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const F5=25;function uQ(e,n){const t=Ar(e),i=xo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,c=0;if(r){a=r.width,o=r.height;const h=vy();(!h||h&&n==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}const f=yy(i);if(f<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-v);b<=F5&&(a-=b)}else f<=F5&&(a+=f);return{width:a,height:o,x:l,y:c}}function cQ(e,n){const t=gu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=Aa(e)?Wc(e):lo(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=r*a.x,f=i*a.y;return{width:o,height:l,x:c,y:f}}function q5(e,n,t){let i;if(n==="viewport")i=uQ(e,t);else if(n==="document")i=lQ(xo(e));else if(Wt(n))i=cQ(n,t);else{const r=iL(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return nf(i)}function aL(e,n){const t=us(e);return t===n||!Wt(t)||ts(t)?!1:_a(t).position==="fixed"||aL(t,n)}function fQ(e,n){const t=n.get(e);if(t)return t;let i=is(e,[],!1).filter(l=>Wt(l)&&$f(l)!=="body"),r=null;const a=_a(e).position==="fixed";let o=a?us(e):e;for(;Wt(o)&&!ts(o);){const l=_a(o),c=K6(o);!c&&l.position==="fixed"&&(r=null),(a?!c&&!r:!c&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Km(o)&&!c&&aL(e,o))?i=i.filter(h=>h!==o):r=l,o=us(o)}return n.set(e,i),i}function dQ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?py(n)?[]:fQ(n,this._c):[].concat(t),i],l=q5(n,o[0],r);let c=l.top,f=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!sL(f,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(j,{...x,root:r.ownerDocument})}catch{t=new IntersectionObserver(j,x)}t.observe(e)}return o(!0),a}function CS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,f=eC(e),h=r||a?[...f?is(f):[],...n?is(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=f&&l?yQ(f,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[C]=_;C&&C.target===f&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(n)})),t()}),f&&!c&&v.observe(f),n&&v.observe(n));let b,w=c?gu(e):null;c&&k();function k(){const _=gu(e);w&&!sL(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(C=>{r&&C.removeEventListener("scroll",t),a&&C.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const bQ=eQ,wQ=nQ,kQ=KZ,_Q=iQ,xQ=XZ,U5=YZ,SQ=QZ,CQ=tQ,AQ=(e,n,t)=>{const i=new Map,r={platform:gQ,...t},a={...r.platform,_c:i};return GZ(e,n,{...r,platform:a})};var jQ=typeof document<"u",OQ=function(){},gg=jQ?A.useLayoutEffect:OQ;function zg(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!zg(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!zg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function lL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V5(e,n){const t=lL(e);return Math.round(n*t)/t}function yk(e){const n=A.useRef(e);return gg(()=>{n.current=e}),n}function EQ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);zg(p,i)||v(i);const[b,w]=A.useState(null),[k,_]=A.useState(null),C=A.useCallback(H=>{H!==O.current&&(O.current=H,w(H))},[]),x=A.useCallback(H=>{H!==M.current&&(M.current=H,_(H))},[]),E=a||b,j=o||k,O=A.useRef(null),M=A.useRef(null),N=A.useRef(h),q=c!=null,R=yk(c),L=yk(r),F=yk(f),Y=A.useCallback(()=>{if(!O.current||!M.current)return;const H={placement:n,strategy:t,middleware:p};L.current&&(H.platform=L.current),AQ(O.current,M.current,H).then(U=>{const D={...U,isPositioned:F.current!==!1};V.current&&!zg(N.current,D)&&(N.current=D,il.flushSync(()=>{d(D)}))})},[p,n,t,L,F]);gg(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[f]);const V=A.useRef(!1);gg(()=>(V.current=!0,()=>{V.current=!1}),[]),gg(()=>{if(E&&(O.current=E),j&&(M.current=j),E&&j){if(R.current)return R.current(E,j,Y);Y()}},[E,j,Y,R,q]);const $=A.useMemo(()=>({reference:O,floating:M,setReference:C,setFloating:x}),[C,x]),P=A.useMemo(()=>({reference:E,floating:j}),[E,j]),I=A.useMemo(()=>{const H={position:t,left:0,top:0};if(!P.floating)return H;const U=V5(P.floating,h.x),D=V5(P.floating,h.y);return l?{...H,transform:"translate("+U+"px, "+D+"px)",...lL(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:U,top:D}},[t,l,P.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:Y,refs:$,elements:P,floatingStyles:I}),[h,Y,$,P,I])}const TQ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?U5({element:i.current,padding:r}).fn(t):{}:i?U5({element:i,padding:r}).fn(t):{}}}},uL=(e,n)=>{const t=bQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},nC=(e,n)=>{const t=wQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},W5=(e,n)=>({fn:CQ(e).fn,options:[e,n]}),Lg=(e,n)=>{const t=kQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},MQ=(e,n)=>{const t=_Q(e);return{name:t.name,fn:t.fn,options:[e,n]}},DQ=(e,n)=>{const t=xQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Nh=(e,n)=>{const t=SQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},cL=(e,n)=>{const t=TQ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function fL(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const RQ="data-floating-ui-focusable",G5="active",Y5="selected",PQ={...yz};let K5=!1,NQ=0;const X5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+NQ++;function $Q(){const[e,n]=A.useState(()=>K5?X5():void 0);return uo(()=>{e==null&&n(X5())},[]),A.useEffect(()=>{K5=!0},[]),e}const zQ=PQ.useId,dL=zQ||$Q;function LQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const IQ=A.createContext(null),BQ=A.createContext(null),tC=()=>{var e;return((e=A.useContext(IQ))==null?void 0:e.id)||null},iC=()=>A.useContext(BQ);function rC(e){return"data-floating-ui-"+e}function ha(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Z5=rC("safe-polygon");function yg(e,n,t){if(t&&!SS(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function bk(e){return typeof e=="function"?e():e}function FQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:c=0,handleClose:f=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=iC(),b=tC(),w=Lv(f),k=Lv(c),_=Lv(t),C=Lv(d),x=A.useRef(),E=A.useRef(-1),j=A.useRef(),O=A.useRef(-1),M=A.useRef(!0),N=A.useRef(!1),q=A.useRef(()=>{}),R=A.useRef(!1),L=ro(()=>{var I;const H=(I=r.current.openEvent)==null?void 0:I.type;return(H==null?void 0:H.includes("mouse"))&&H!=="mousedown"});A.useEffect(()=>{if(!l)return;function I(H){let{open:U}=H;U||(ha(E),ha(O),M.current=!0,R.current=!1)}return a.on("openchange",I),()=>{a.off("openchange",I)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function I(U){L()&&i(!1,U,"hover")}const H=su(o.floating).documentElement;return H.addEventListener("mouseleave",I),()=>{H.removeEventListener("mouseleave",I)}},[o.floating,t,i,l,w,L]);const F=A.useCallback(function(I,H,U){H===void 0&&(H=!0),U===void 0&&(U="hover");const D=yg(k.current,"close",x.current);D&&!j.current?(ha(E),E.current=window.setTimeout(()=>i(!1,I,U),D)):H&&(ha(E),i(!1,I,U))},[k,i]),Y=ro(()=>{q.current(),j.current=void 0}),V=ro(()=>{if(N.current){const I=su(o.floating).body;I.style.pointerEvents="",I.removeAttribute(Z5),N.current=!1}}),$=ro(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function I(G){if(ha(E),M.current=!1,h&&!SS(x.current)||bk(C.current)>0&&!yg(k.current,"open"))return;const z=yg(k.current,"open",x.current);z?E.current=window.setTimeout(()=>{_.current||i(!0,G,"hover")},z):t||i(!0,G,"hover")}function H(G){if($()){V();return}q.current();const z=su(o.floating);if(ha(O),R.current=!1,w.current&&r.current.floatingContext){t||ha(E),j.current=w.current({...r.current.floatingContext,tree:v,x:G.clientX,y:G.clientY,onClose(){V(),Y(),$()||F(G,!0,"safe-polygon")}});const ee=j.current;z.addEventListener("mousemove",ee),q.current=()=>{z.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Qh(o.floating,G.relatedTarget):!0)&&F(G)}function U(G){$()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:G.clientX,y:G.clientY,onClose(){V(),Y(),$()||F(G)}})(G))}function D(){ha(E)}function W(G){$()||F(G,!1)}if(Wt(o.domReference)){const G=o.domReference,z=o.floating;return t&&G.addEventListener("mouseleave",U),p&&G.addEventListener("mousemove",I,{once:!0}),G.addEventListener("mouseenter",I),G.addEventListener("mouseleave",H),z&&(z.addEventListener("mouseleave",U),z.addEventListener("mouseenter",D),z.addEventListener("mouseleave",W)),()=>{t&&G.removeEventListener("mouseleave",U),p&&G.removeEventListener("mousemove",I),G.removeEventListener("mouseenter",I),G.removeEventListener("mouseleave",H),z&&(z.removeEventListener("mouseleave",U),z.removeEventListener("mouseenter",D),z.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,F,Y,V,i,t,_,v,k,w,r,$,C]),uo(()=>{var I;if(l&&t&&(I=w.current)!=null&&(I=I.__options)!=null&&I.blockPointerEvents&&L()){N.current=!0;const U=o.floating;if(Wt(o.domReference)&&U){var H;const D=su(o.floating).body;D.setAttribute(Z5,"");const W=o.domReference,G=v==null||(H=v.nodesRef.current.find(z=>z.id===b))==null||(H=H.context)==null?void 0:H.elements.floating;return G&&(G.style.pointerEvents=""),D.style.pointerEvents="none",W.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{D.style.pointerEvents="",W.style.pointerEvents="",U.style.pointerEvents=""}}}},[l,t,b,o,v,w,L]),uo(()=>{t||(x.current=void 0,R.current=!1,Y(),V())},[t,Y,V]),A.useEffect(()=>()=>{Y(),ha(E),ha(O),V()},[l,o.domReference,Y,V]);const P=A.useMemo(()=>{function I(H){x.current=H.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(H){const{nativeEvent:U}=H;function D(){!M.current&&!_.current&&i(!0,U,"hover")}h&&!SS(x.current)||t||bk(C.current)===0||R.current&&H.movementX**2+H.movementY**2<2||(ha(O),x.current==="touch"?D():(R.current=!0,O.current=window.setTimeout(D,bk(C.current))))}}},[h,i,t,_,C]);return A.useMemo(()=>l?{reference:P}:{},[l,P])}const AS=()=>{},hL=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:AS,setState:AS,isInstantPhase:!1}),qQ=()=>A.useContext(hL);function HQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((c,f)=>({...c,...f}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(c=>{a({currentId:c})},[]);return uo(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),g.jsx(hL.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function UQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,c=qQ(),{currentId:f,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=c;return uo(()=>{o&&f&&(p({delay:{open:1,close:yg(d,"close")}}),f!==l&&i(!1))},[o,l,i,p,f,d]),uo(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&f&&!t&&f===l){if(v){const w=window.setTimeout(b,v);return()=>{clearTimeout(w)}}b()}},[o,t,p,f,l,i,d,v]),uo(()=>{o&&(h===AS||!t||h(l))},[o,t,h,l]),c}const VQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},WQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Q5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function GQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:b}=n,w=iC(),k=ro(typeof c=="function"?c:()=>!1),_=typeof c=="function"?k:c,C=A.useRef(!1),{escapeKey:x,outsidePress:E}=Q5(v),{escapeKey:j,outsidePress:O}=Q5(b),M=A.useRef(!1),N=ro(V=>{var $;if(!t||!o||!l||V.key!=="Escape"||M.current)return;const P=($=a.current.floatingContext)==null?void 0:$.nodeId,I=w?vg(w.nodesRef.current,P):[];if(!x&&(V.stopPropagation(),I.length>0)){let H=!0;if(I.forEach(U=>{var D;if((D=U.context)!=null&&D.open&&!U.context.dataRef.current.__escapeKeyBubbles){H=!1;return}}),!H)return}i(!1,IZ(V)?V.nativeEvent:V,"escape-key")}),q=ro(V=>{var $;const P=()=>{var I;N(V),(I=Ic(V))==null||I.removeEventListener("keydown",P)};($=Ic(V))==null||$.addEventListener("keydown",P)}),R=ro(V=>{var $;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const I=C.current;if(C.current=!1,f==="click"&&I||P||typeof _=="function"&&!_(V))return;const H=Ic(V),U="["+rC("inert")+"]",D=su(r.floating).querySelectorAll(U);let W=Wt(H)?H:null;for(;W&&!ts(W);){const ee=us(W);if(ts(ee)||!Wt(ee))break;W=ee}if(D.length&&Wt(H)&&!NZ(H)&&!Qh(H,r.floating)&&Array.from(D).every(ee=>!Qh(W,ee)))return;if(Aa(H)&&Y){const ee=ts(H),re=_a(H),le=/auto|scroll/,ye=ee||le.test(re.overflowX),ae=ee||le.test(re.overflowY),ue=ye&&H.clientWidth>0&&H.scrollWidth>H.clientWidth,Se=ae&&H.clientHeight>0&&H.scrollHeight>H.clientHeight,ne=re.direction==="rtl",Le=Se&&(ne?V.offsetX<=H.offsetWidth-H.clientWidth:V.offsetX>H.clientWidth),ke=ue&&V.offsetY>H.clientHeight;if(Le||ke)return}const G=($=a.current.floatingContext)==null?void 0:$.nodeId,z=w&&vg(w.nodesRef.current,G).some(ee=>{var re;return vk(V,(re=ee.context)==null?void 0:re.elements.floating)});if(vk(V,r.floating)||vk(V,r.domReference)||z)return;const X=w?vg(w.nodesRef.current,G):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var le;if((le=re.context)!=null&&le.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,V,"outside-press")}),L=ro(V=>{var $;const P=()=>{var I;R(V),(I=Ic(V))==null||I.removeEventListener(f,P)};($=Ic(V))==null||$.addEventListener(f,P)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=x,a.current.__outsidePressBubbles=E;let V=-1;function $(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(V),M.current=!0}function I(){V=window.setTimeout(()=>{M.current=!1},vy()?5:0)}const H=su(r.floating);l&&(H.addEventListener("keydown",j?q:N,j),H.addEventListener("compositionstart",P),H.addEventListener("compositionend",I)),_&&H.addEventListener(f,O?L:R,O);let U=[];return p&&(Wt(r.domReference)&&(U=is(r.domReference)),Wt(r.floating)&&(U=U.concat(is(r.floating))),!Wt(r.reference)&&r.reference&&r.reference.contextElement&&(U=U.concat(is(r.reference.contextElement)))),U=U.filter(D=>{var W;return D!==((W=H.defaultView)==null?void 0:W.visualViewport)}),U.forEach(D=>{D.addEventListener("scroll",$,{passive:!0})}),()=>{l&&(H.removeEventListener("keydown",j?q:N,j),H.removeEventListener("compositionstart",P),H.removeEventListener("compositionend",I)),_&&H.removeEventListener(f,O?L:R,O),U.forEach(D=>{D.removeEventListener("scroll",$)}),window.clearTimeout(V)}},[a,r,l,_,f,t,i,p,o,x,E,N,j,q,R,O,L]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,f]);const F=A.useMemo(()=>({onKeyDown:N,...h&&{[VQ[d]]:V=>{i(!1,V.nativeEvent,"reference-press")},...d!=="click"&&{onClick(V){i(!1,V.nativeEvent,"reference-press")}}}}),[N,i,h,d]),Y=A.useMemo(()=>{function V($){$.button===0&&(C.current=!0)}return{onKeyDown:N,onMouseDown:V,onMouseUp:V,[WQ[f]]:()=>{a.current.insideReactTree=!0}}},[N,f,a]);return A.useMemo(()=>o?{reference:F,floating:Y}:{},[o,F,Y])}function YQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=dL(),a=A.useRef({}),[o]=A.useState(()=>LQ()),l=tC()!=null,[c,f]=A.useState(i.reference),h=ro((v,b,w)=>{a.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:w,nested:l}),t==null||t(v,b,w)}),d=A.useMemo(()=>({setPositionReference:f}),[]),p=A.useMemo(()=>({reference:c||i.reference||null,floating:i.floating||null,domReference:i.reference}),[c,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function aC(e){e===void 0&&(e={});const{nodeId:n}=e,t=YQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,c]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=iC();uo(()=>{h&&(d.current=h)},[h]);const v=EQ({...e,elements:{...r,...l&&{reference:l}}}),b=A.useCallback(x=>{const E=Wt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;c(E),v.refs.setReference(E)},[v.refs]),w=A.useCallback(x=>{(Wt(x)||x===null)&&(d.current=x,o(x)),(Wt(v.refs.reference.current)||v.refs.reference.current===null||x!==null&&!Wt(x))&&v.refs.setReference(x)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:b,domReference:d}),[v.refs,w,b]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),C=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return uo(()=>{i.dataRef.current.floatingContext=C;const x=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);x&&(x.context=C)}),A.useMemo(()=>({...v,context:C,refs:k,elements:_}),[v,k,_,C])}function wk(){return DZ()&&MZ()}function KQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:c=!0}=n,f=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=Ar(o.domReference);function b(){!t&&Aa(o.domReference)&&o.domReference===z5(su(o.domReference))&&(f.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",b),wk()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",b),wk()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(f.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{ha(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(v){if(f.current)return;const b=Ic(v.nativeEvent);if(c&&Wt(b)){if(wk()&&!v.relatedTarget){if(!d.current&&!$Z(b))return}else if(!zZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){f.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Wt(b)&&b.hasAttribute(rC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const C=z5(o.domReference?o.domReference.ownerDocument:document);!b&&C===o.domReference||Qh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,C)||Qh(o.domReference,C)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,c]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function kk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[G5]:o,[Y5]:l,...c}=e;a=c}return{...t==="floating"&&{tabIndex:-1,[RQ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(c=>{let[f,h]=c;if(!(r&&[G5,Y5].includes(f)))if(f.indexOf("on")===0){if(i.has(f)||i.set(f,[]),typeof h=="function"){var d;(d=i.get(f))==null||d.push(h),o[f]=function(){for(var p,v=arguments.length,b=new Array(v),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[f]=h}),o),{})}}function XQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>kk(l,e,"reference"),n),a=A.useCallback(l=>kk(l,e,"floating"),t),o=A.useCallback(l=>kk(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const ZQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function QQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:c="dialog"}=n,f=dL(),h=((t=a.domReference)==null?void 0:t.id)||f,d=A.useMemo(()=>{var C;return((C=LZ(a.floating))==null?void 0:C.id)||o},[a.floating,o]),p=(i=ZQ.get(c))!=null?i:c,b=tC()!=null,w=A.useMemo(()=>p==="tooltip"||c==="label"?{["aria-"+(c==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&b&&{role:"menuitem"},...c==="select"&&{"aria-autocomplete":"none"},...c==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,c]),k=A.useMemo(()=>{const C={id:d,...p&&{role:p}};return p==="tooltip"||c==="label"?C:{...C,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,c]),_=A.useCallback(C=>{let{active:x,selected:E}=C;const j={role:"option",...x&&{id:d+"-fui-option"}};switch(c){case"select":case"combobox":return{...j,"aria-selected":E}}return{}},[d,c]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const mL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},pL=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":me(n),"--scrollarea-over-scroll-behavior":r}}},fr=De(e=>{const n=be("ScrollArea",mL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:c,type:f,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:C,onLeftReached:x,onRightReached:E,overscrollBehavior:j,startScrollPosition:O,attributes:M,...N}=n,[q,R]=A.useState(!1),[L,F]=A.useState(!1),[Y,V]=A.useState(!1),$=A.useRef(!0),P=A.useRef(!1),I=A.useRef(!0),H=A.useRef(!1),U=Xe({name:"ScrollArea",props:n,classes:Y6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:c,varsResolver:pL}),D=A.useRef(null),[W,G]=A.useState(null),z=fL([p,D,A.useCallback(X=>{G(ee=>ee===X?ee:X)},[])]);return hl(w==="present"?W:null,()=>{const X=D.current;X&&(F(X.scrollHeight>X.clientHeight),V(X.scrollWidth>X.clientWidth))}),ps(()=>{O&&D.current&&D.current.scrollTo({left:O.x??0,top:O.y??0})},[]),g.jsxs(Fz,{getStyles:U,type:f==="never"?"always":f,scrollHideDelay:h,scrollbars:k,...U("root"),...N,children:[g.jsx(Zz,{...d,...U("viewport",{style:d==null?void 0:d.style}),ref:z,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":w==="present"&&!Y?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:X=>{var je;(je=d==null?void 0:d.onScroll)==null||je.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:le,scrollLeft:ye,scrollWidth:ae,clientWidth:ue}=X.currentTarget,Se=ee-(re-le)>=-.8,ne=ee===0;Se&&!P.current&&(_==null||_()),ne&&!$.current&&(C==null||C()),P.current=Se,$.current=ne;const Le=ye-(ae-ue)>=-.8,ke=ye===0;Le&&!H.current&&(E==null||E()),ke&&!I.current&&(x==null||x()),H.current=Le,I.current=ke},children:b}),(k==="xy"||k==="x")&&g.jsx(yS,{...U("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||w==="present"&&!Y?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:g.jsx(bS,{...U("thumb")})}),(k==="xy"||k==="y")&&g.jsx(yS,{...U("scrollbar"),orientation:"vertical","data-hidden":f==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:g.jsx(bS,{...U("thumb")})}),g.jsx(uZ,{...U("corner"),"data-hovered":q||void 0,"data-hidden":f==="never"||void 0})]})});fr.displayName="@mantine/core/ScrollArea";const oC=De(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:c,overscrollBehavior:f,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:C,onTopReached:x,startScrollPosition:E,onOverflowChange:j,...O}=be("ScrollAreaAutosize",mL,e),M=A.useRef(null),[N,q]=A.useState(null),R=fL([h,M,A.useCallback(V=>{q($=>$===V?$:V)},[])]),L=A.useRef(!1),F=A.useRef(!1),Y=A.useEffectEvent(()=>{const V=M.current;if(!V||!j)return;const $=V.scrollHeight>V.clientHeight;$!==L.current&&(F.current?j($):(F.current=!0,$&&j(!0)),L.current=$)});return hl(j?N:null,Y),g.jsx(he,{...O,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:g.jsx(he,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:g.jsx(fr,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:c,overscrollBehavior:f,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:C,onTopReached:x,startScrollPosition:E,"data-autosize":"true",children:n})})})});fr.classes=Y6;fr.varsResolver=pL;oC.displayName="@mantine/core/ScrollAreaAutosize";oC.classes=Y6;fr.Autosize=oC;var vL={root:"m_87cf2631"};const JQ={__staticSelector:"UnstyledButton"},Et=Ai(e=>{const n=be("UnstyledButton",JQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:c,attributes:f,...h}=n;return g.jsx(he,{...Xe({name:r,props:n,classes:vL,className:t,style:c,classNames:o,styles:l,unstyled:a,attributes:f})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Et.classes=vL;Et.displayName="@mantine/core/UnstyledButton";var gL={root:"m_515a97f8"};const sC=De(e=>{const n=be("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,...f}=n;return g.jsx(he,{component:"span",...Xe({name:"VisuallyHidden",classes:gL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c})("root"),...f})});sC.classes=gL;sC.displayName="@mantine/core/VisuallyHidden";var yL={root:"m_1b7284a3"};const bL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Yt(n),"--paper-shadow":L6(t)}}),Dt=Ai(e=>{const n=be("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:c,radius:f,shadow:h,variant:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Paper",props:n,classes:yL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:c,varsResolver:bL});return g.jsx(he,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Dt.classes=yL;Dt.varsResolver=bL;Dt.displayName="@mantine/core/Paper";function J5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function eT(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const eJ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function nJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[c,f="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[eJ[c]]:i},d=-n/2;return c==="left"?{...h,...J5(f,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:c==="right"?{...h,...J5(f,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:c==="top"?{...h,...eT(f,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:c==="bottom"?{...h,...eT(f,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Ig({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:c,...f}){const{dir:h}=Ru();return a?g.jsx("div",{...f,style:{...c,...nJ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Ig.displayName="@mantine/core/FloatingArrow";function wL(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function kL({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},c=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:c}}var _L={root:"m_9814e45f"};const tJ={zIndex:Sa("modal")},xL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Zs(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${me(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Yt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Xm=Ai(e=>{const n=be("Overlay",tJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:c,center:f,children:h,radius:d,zIndex:p,gradient:v,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:C,...x}=n;return g.jsx(he,{...Xe({name:"Overlay",props:n,classes:_L,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:xL})("root"),mod:[{center:f,fixed:c},_],...x,children:h})});Xm.classes=_L;Xm.varsResolver=xL;Xm.displayName="@mantine/core/Overlay";function _k(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function iJ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||_k(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=_k(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return _k(t)}const rJ={reuseTargetNode:!0},SL=De(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",rJ,e),[o,l]=A.useState(!1),c=A.useRef(null);return ps(()=>(l(!0),c.current=iJ({target:t,reuseTargetNode:i,...a}),Dg(r,c.current),!t&&!i&&c.current&&document.body.appendChild(c.current),()=>{!t&&!i&&c.current&&document.body.removeChild(c.current)}),[t]),!o||!c.current?null:il.createPortal(g.jsx(g.Fragment,{children:n}),c.current)});SL.displayName="@mantine/core/Portal";const ml=De(({withinPortal:e=!0,children:n,...t})=>Ym()==="test"||!e?g.jsx(g.Fragment,{children:n}):g.jsx(SL,{...t,children:n}));ml.displayName="@mantine/core/OptionalPortal";const ah=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Iv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...ah("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...ah("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...ah("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...ah("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...ah("top"),common:{transformOrigin:"top right"}}},nT={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function tT({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in Iv?{transitionProperty:Iv[e].transitionProperty,...r,...Iv[e].common,...Iv[e][nT[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[nT[n]]}}function aJ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:c,exitDelay:f}){const h=ui(),d=B6(),p=h.respectReducedMotion?d:!1,[v,b]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),C=A.useRef(-1),x=A.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(C.current),cancelAnimationFrame(x.current)}const j=M=>{E();const N=M?r:a,q=M?o:l,R=p?0:M?e:n;b(R),R===0?(typeof N=="function"&&N(),typeof q=="function"&&q(),k(M?"entered":"exited")):x.current=requestAnimationFrame(()=>{Sh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),x.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof q=="function"&&q(),k(M?"entered":"exited")},R)})})},O=M=>{if(E(),typeof(M?c:f)!="number"){j(M);return}C.current=window.setTimeout(()=>{j(M)},M?c:f)};return ls(()=>{O(i)},[i]),A.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function cs({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:c,onEnter:f,onExited:h,enterDelay:d,exitDelay:p}){const v=Ym(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=aJ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:c,onEnter:f,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?g.jsx(g.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?g.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?g.jsx(g.Fragment,{children:a({})}):null;const _=w==="exited";return e?g.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:tT({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:g.jsx(g.Fragment,{children:a(tT({transition:n,duration:b,state:w,timingFunction:k}))})}cs.displayName="@mantine/core/Transition";const oJ={duration:100,transition:"fade"};function iT(e,n){return{...oJ,...n,...e}}const[sJ,CL]=Xr("Popover component was not found in the tree");function by({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Kt(IK(n),i),a=Mu(e);return a?A.cloneElement(a,{[t]:r}):e}function AL(e){return g.jsx(sC,{tabIndex:-1,"data-autofocus":!0,...e})}by.displayName="@mantine/core/FocusTrap";AL.displayName="@mantine/core/FocusTrapInitialFocus";by.InitialFocus=AL;var jL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const lC=De(e=>{var k,_,C,x;const n=be("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:c,styles:f,ref:h,...d}=n,p=CL(),v=bz({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Kt(h,p.floating);return p.disabled?null:g.jsx(ml,{...p.portalProps,withinPortal:p.withinPortal,children:g.jsx(cs,{mounted:p.opened,...p.transitionProps,transition:((k=p.transitionProps)==null?void 0:k.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((C=p.transitionProps)==null?void 0:C.exitDuration)=="number"?p.transitionProps.exitDuration:(x=p.transitionProps)==null?void 0:x.duration,children:E=>{var j;return g.jsx(by,{active:p.trapFocus&&p.opened,innerRef:w,children:g.jsxs(he,{...b,...d,variant:l,onKeyDownCapture:jK(()=>{var O,M;(O=p.onClose)==null||O.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:c,styles:f,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:me(p.width),...p.referenceHidden?{display:"none"}:null},(j=p.resolvedStyles)==null?void 0:j.dropdown,f==null?void 0:f.dropdown,i]}),children:[a,g.jsx(Ig,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:c,styles:f})})]})})}})})});lC.classes=jL;lC.displayName="@mantine/core/PopoverDropdown";const lJ={refProp:"ref",popupType:"dialog"},OL=De(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",lJ,e),o=Mu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,c=CL(),f=Kt(c.reference,uy(o),r),h=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...c.targetProps,className:pn(c.targetProps.className,l.className,d.className),[t]:f,...c.controlled?null:{onClick:p=>{var v;c.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});OL.displayName="@mantine/core/PopoverTarget";function uJ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function cJ(e,n,t){const i=uJ(e.middlewares),r=[uL(e.offset),DQ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Lg():Lg(i.flip)),i.shift&&r.push(nC(typeof i.shift=="boolean"?{limiter:W5(),padding:5}:{limiter:W5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Nh():Nh(i.inline)),r.push(cL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(MQ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...c}){var h;const f=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...c}):Object.assign(f,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(f,{width:`${a.reference.width}px`})}})),r}function fJ(e){const n=Ym(),[t,i]=Ci({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=aC({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:cJ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:CS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return CS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),ls(()=>{var c;(c=e.onPositionChange)==null||c.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),ls(()=>{var c,f;t!==r.current&&(t?(f=e.onOpen)==null||f.call(e):(c=e.onClose)==null||c.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ps(()=>{let c=-1;return t&&(c=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(c)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const dJ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:Sa("popover"),__staticSelector:"Popover",width:"max-content"},EL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Yt(n),"--popover-shadow":L6(t)}});function On(e){var an,mn,En,vn,sn,en,zn;const n=be("Popover",dJ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:f,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:C,styles:x,closeOnClickOutside:E,withinPortal:j,portalProps:O,closeOnEscape:M,clickOutsideEvents:N,trapFocus:q,onClose:R,onDismiss:L,onOpen:F,onChange:Y,zIndex:V,radius:$,shadow:P,id:I,defaultOpened:H,__staticSelector:U,withRoles:D,disabled:W,returnFocus:G,variant:z,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:le,overlayProps:ye,hideDetached:ae,attributes:ue,preventPositionChangeWhenVisible:Se,...ne}=n,Le=Xe({name:U,props:n,classes:jL,classNames:C,styles:x,unstyled:_,attributes:ue,rootSelector:"dropdown",vars:ee,varsResolver:EL}),{resolvedStyles:ke}=Wi({classNames:C,styles:x,props:n}),[je,Ne]=A.useState(o??H??!1),ge=A.useRef(i),Ce=A.useRef(null),[Pe,ce]=A.useState(null),[qe,Ye]=A.useState(null),{dir:We}=Ru(),Ze=Ym(),Qe=Vi(I),ie=fJ({middlewares:d,width:h,position:wL(We,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:Ce,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:H,onChange:Y,onOpen:F,onClose:R,onDismiss:L,strategy:re,dropdownVisible:je,setDropdownVisible:Ne,positionRef:ge,disabled:W,preventPositionChangeWhenVisible:Se,keepMounted:X});MK(()=>{E&&(ie.onClose(),L==null||L())},N,[Pe,qe]);const ve=A.useCallback(Re=>{ce(Re),ie.floating.refs.setReference(Re)},[ie.floating.refs.setReference]),Ke=A.useCallback(Re=>{Ye(Re),ie.floating.refs.setFloating(Re)},[ie.floating.refs.setFloating]),Je=A.useCallback(()=>{var Re;(Re=l==null?void 0:l.onExited)==null||Re.call(l),c==null||c(),Ne(!1),Se||(ge.current=i)},[l==null?void 0:l.onExited,c,Se,i]),Ae=A.useCallback(()=>{var Re;(Re=l==null?void 0:l.onEntered)==null||Re.call(l),f==null||f()},[l==null?void 0:l.onEntered,f]);return g.jsxs(sJ,{value:{returnFocus:G,disabled:W,controlled:ie.controlled,reference:ve,floating:Ke,x:ie.floating.x,y:ie.floating.y,arrowX:(En=(mn=(an=ie.floating)==null?void 0:an.middlewareData)==null?void 0:mn.arrow)==null?void 0:En.x,arrowY:(en=(sn=(vn=ie.floating)==null?void 0:vn.middlewareData)==null?void 0:sn.arrow)==null?void 0:en.y,opened:ie.opened,arrowRef:Ce,transitionProps:{...l,onExited:Je,onEntered:Ae},width:h,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:q,withinPortal:j,portalProps:O,zIndex:V,radius:$,shadow:P,closeOnEscape:M,onDismiss:L,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Qe,getDropdownId:()=>`${Qe}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:U,classNames:C,styles:x,unstyled:_,variant:z,keepMounted:X,getStyles:Le,resolvedStyles:ke,floatingStrategy:re,referenceHidden:ae&&Ze!=="test"?(zn=ie.floating.middlewareData.hide)==null?void 0:zn.referenceHidden:!1},children:[t,le&&g.jsx(cs,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:Re=>g.jsx(ml,{withinPortal:j,children:g.jsx(Xm,{...ye,...Le("overlay",{className:ye==null?void 0:ye.className,style:[Re,ye==null?void 0:ye.style]})})})})]})}On.Target=OL;On.Dropdown=lC;On.varsResolver=EL;On.displayName="@mantine/core/Popover";On.extend=e=>e;On.withProps=e=>{const n=t=>g.jsx(On,{...e,...t});return n.extend=On.extend,n.displayName=`WithProps(${On.displayName})`,n};var Fa={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const TL=({className:e,...n})=>g.jsxs(he,{component:"span",className:pn(Fa.barsLoader,e),...n,children:[g.jsx("span",{className:Fa.bar}),g.jsx("span",{className:Fa.bar}),g.jsx("span",{className:Fa.bar})]});TL.displayName="@mantine/core/Bars";const ML=({className:e,...n})=>g.jsxs(he,{component:"span",className:pn(Fa.dotsLoader,e),...n,children:[g.jsx("span",{className:Fa.dot}),g.jsx("span",{className:Fa.dot}),g.jsx("span",{className:Fa.dot})]});ML.displayName="@mantine/core/Dots";const DL=({className:e,...n})=>g.jsx(he,{component:"span",className:pn(Fa.ovalLoader,e),...n});DL.displayName="@mantine/core/Oval";const RL={bars:TL,oval:DL,dots:ML},hJ={loaders:RL,type:"oval"},PL=(e,{size:n,color:t})=>({root:{"--loader-size":Bn(n,"loader-size"),"--loader-color":t?lt(t,e):void 0}}),ai=De(e=>{const n=be("Loader",hJ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:c,styles:f,unstyled:h,loaders:d,variant:p,children:v,attributes:b,...w}=n,k=Xe({name:"Loader",props:n,classes:Fa,className:o,style:l,classNames:c,styles:f,unstyled:h,attributes:b,vars:a,varsResolver:PL});return v?g.jsx(he,{...k("root"),...w,children:v}):g.jsx(he,{...k("root"),component:d[r],variant:p,size:t,...w})});ai.defaultLoaders=RL;ai.classes=Fa;ai.varsResolver=PL;ai.displayName="@mantine/core/Loader";var Lf={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const rT={orientation:"horizontal"},NL=(e,{borderWidth:n})=>({group:{"--ai-border-width":me(n)}}),wy=De(e=>{const n=be("ActionIconGroup",rT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:c,borderWidth:f,variant:h,mod:d,attributes:p,...v}=be("ActionIconGroup",rT,e);return g.jsx(he,{...Xe({name:"ActionIconGroup",props:n,classes:Lf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:NL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});wy.classes=Lf;wy.varsResolver=NL;wy.displayName="@mantine/core/ActionIconGroup";const $L=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Bn(o,"section-height"),"--section-padding-x":Bn(o,"section-padding-x"),"--section-fz":ri(o),"--section-radius":n===void 0?void 0:Yt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},ky=De(e=>{const n=be("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:c,gradient:f,radius:h,autoContrast:d,attributes:p,...v}=n;return g.jsx(he,{...Xe({name:"ActionIconGroupSection",props:n,classes:Lf,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:$L,rootSelector:"groupSection"})("groupSection"),variant:c,...v})});ky.classes=Lf;ky.varsResolver=$L;ky.displayName="@mantine/core/ActionIconGroupSection";const zL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":Bn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Yt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},vt=Ai(e=>{const n=be("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:c,loaderProps:f,size:h,color:d,radius:p,__staticSelector:v,gradient:b,vars:w,children:k,disabled:_,"data-disabled":C,autoContrast:x,mod:E,attributes:j,...O}=n,M=Xe({name:["ActionIcon",v],props:n,className:t,style:l,classes:Lf,classNames:a,styles:o,unstyled:i,attributes:j,vars:w,varsResolver:zL});return g.jsxs(Et,{...M("root",{active:!_&&!c&&!C}),...O,unstyled:i,variant:r,size:h,disabled:_||c,mod:[{loading:c,disabled:_||C},E],children:[typeof c=="boolean"&&g.jsx(cs,{mounted:c,transition:"slide-down",duration:150,children:N=>g.jsx(he,{component:"span",...M("loader",{style:N}),"aria-hidden":!0,children:g.jsx(ai,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...f})})}),g.jsx(he,{component:"span",mod:{loading:c},...M("icon"),children:k})]})});vt.classes=Lf;vt.varsResolver=zL;vt.displayName="@mantine/core/ActionIcon";vt.Group=wy;vt.GroupSection=ky;function LL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}LL.displayName="@mantine/core/CloseIcon";var IL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const mJ={variant:"subtle"},BL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Bn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Yt(t),"--cb-icon-size":me(i)}}),bl=Ai(e=>{const n=be("CloseButton",mJ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:c,styles:f,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:b,mod:w,attributes:k,__staticSelector:_,...C}=n,x=Xe({name:_||"CloseButton",props:n,className:o,style:c,classes:IL,classNames:l,styles:f,unstyled:h,attributes:k,vars:r,varsResolver:BL});return g.jsxs(Et,{...C,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...x("root",{variant:v,active:!p&&!d}),children:[b||g.jsx(LL,{}),i]})});bl.classes=IL;bl.varsResolver=BL;bl.displayName="@mantine/core/CloseButton";function pJ(e){return A.Children.toArray(e).filter(Boolean)}var FL={root:"m_4081bf90"};const vJ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},qL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Vt(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),ze=De(e=>{const n=be("Group",vJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:c,align:f,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:b,variant:w,__size:k,mod:_,attributes:C,...x}=n,E=pJ(l),j=E.length,O=Vt(c??"md");return g.jsx(he,{...Xe({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/j}% - (${O} - ${O} / ${j}))`},className:i,style:r,classes:FL,classNames:t,styles:a,unstyled:o,attributes:C,vars:b,varsResolver:qL})("root"),variant:w,mod:[{grow:p},_],size:k,...x,children:E})});ze.classes=FL;ze.varsResolver=qL;ze.displayName="@mantine/core/Group";const[gJ,gs]=Xr("ModalBase component was not found in tree");function yJ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=B6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function bJ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Vi(e),[c,f]=A.useState(!1),[h,d]=A.useState(!1),p=yJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return xz("keydown",v=>{var b;v.key==="Escape"&&r&&!v.isComposing&&t&&((b=v.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),bz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:c,bodyMounted:h,shouldLockScroll:p,setTitleMounted:f,setBodyMounted:d}}var ao=function(){return ao=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return $J;var n=zJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},IJ=WL(),Gc="data-scroll-locked",BJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` + .`.concat(kJ,` { overflow: hidden `).concat(i,`; padding-right: `).concat(l,"px ").concat(i,`; } - body[`).concat(Vc,`] { + body[`).concat(Gc,`] { overflow: hidden `).concat(i,`; overscroll-behavior: contain; `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` @@ -44,29 +44,29 @@ ${o?`${l("light")}{${o}}`:""}`}function Rv({theme:e,color:n,colorScheme:t,name:i `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` } - .`).concat(vg,` { + .`).concat(bg,` { right: `).concat(l,"px ").concat(i,`; } - .`).concat(gg,` { + .`).concat(wg,` { margin-right: `).concat(l,"px ").concat(i,`; } - .`).concat(vg," .").concat(vg,` { + .`).concat(bg," .").concat(bg,` { right: 0 `).concat(i,`; } - .`).concat(gg," .").concat(gg,` { + .`).concat(wg," .").concat(wg,` { margin-right: 0 `).concat(i,`; } - body[`).concat(Vc,`] { - `).concat(dJ,": ").concat(l,`px; + body[`).concat(Gc,`] { + `).concat(_J,": ").concat(l,`px; } -`)},rT=function(){var e=parseInt(document.body.getAttribute(Vc)||"0",10);return isFinite(e)?e:0},MJ=function(){A.useEffect(function(){return document.body.setAttribute(Vc,(rT()+1).toString()),function(){var e=rT()-1;e<=0?document.body.removeAttribute(Vc):document.body.setAttribute(Vc,e.toString())}},[])},DJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;MJ();var a=A.useMemo(function(){return jJ(r)},[r]);return A.createElement(EJ,{styles:TJ(a,!n,r,t?"":"!important")})},CS=!1;if(typeof window<"u")try{var zv=Object.defineProperty({},"passive",{get:function(){return CS=!0,!0}});window.addEventListener("test",zv,zv),window.removeEventListener("test",zv,zv)}catch{CS=!1}var Ac=CS?{passive:!1}:!1,RJ=function(e){return e.tagName==="TEXTAREA"},BL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!RJ(e)&&t[n]==="visible")},PJ=function(e){return BL(e,"overflowY")},NJ=function(e){return BL(e,"overflowX")},aT=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=FL(e,i);if(r){var a=qL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},$J=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},zJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},FL=function(e,n){return e==="v"?PJ(n):NJ(n)},qL=function(e,n){return e==="v"?$J(n):zJ(n)},LJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},IJ=function(e,n,t,i,r){var a=LJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,c=n.contains(l),f=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=qL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&FL(e,l)&&(d+=_,p+=b);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},Lv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oT=function(e){return[e.deltaX,e.deltaY]},sT=function(e){return e&&"current"in e?e.current:e},BJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},FJ=function(e){return` +`)},oT=function(){var e=parseInt(document.body.getAttribute(Gc)||"0",10);return isFinite(e)?e:0},FJ=function(){A.useEffect(function(){return document.body.setAttribute(Gc,(oT()+1).toString()),function(){var e=oT()-1;e<=0?document.body.removeAttribute(Gc):document.body.setAttribute(Gc,e.toString())}},[])},qJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;FJ();var a=A.useMemo(function(){return LJ(r)},[r]);return A.createElement(IJ,{styles:BJ(a,!n,r,t?"":"!important")})},jS=!1;if(typeof window<"u")try{var Bv=Object.defineProperty({},"passive",{get:function(){return jS=!0,!0}});window.addEventListener("test",Bv,Bv),window.removeEventListener("test",Bv,Bv)}catch{jS=!1}var Oc=jS?{passive:!1}:!1,HJ=function(e){return e.tagName==="TEXTAREA"},GL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!HJ(e)&&t[n]==="visible")},UJ=function(e){return GL(e,"overflowY")},VJ=function(e){return GL(e,"overflowX")},sT=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=YL(e,i);if(r){var a=KL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},WJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},GJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},YL=function(e,n){return e==="v"?UJ(n):VJ(n)},KL=function(e,n){return e==="v"?WJ(n):GJ(n)},YJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},KJ=function(e,n,t,i,r){var a=YJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,c=n.contains(l),f=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=KL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&YL(e,l)&&(d+=_,p+=b);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(f=!0),f},Fv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lT=function(e){return[e.deltaX,e.deltaY]},uT=function(e){return e&&"current"in e?e.current:e},XJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},ZJ=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},qJ=0,Oc=[];function HJ(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(qJ++)[0],a=A.useState(IL)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=cJ([e.lockRef.current],(e.shards||[]).map(sT),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=Lv(w),C=t.current,x="deltaX"in w?w.deltaX:C[0]-_[0],E="deltaY"in w?w.deltaY:C[1]-_[1],O,j=w.target,M=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&j.type==="range")return!1;var N=window.getSelection(),q=N&&N.anchorNode,P=q?q===j||q.contains(j):!1;if(P)return!1;var L=aT(M,j);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=aT(M,j)),!L)return!1;if(!i.current&&"changedTouches"in w&&(x||E)&&(i.current=O),!O)return!0;var H=i.current||O;return IJ(H,k,w,H==="h"?x:E)},[]),c=A.useCallback(function(w){var k=w;if(!(!Oc.length||Oc[Oc.length-1]!==a)){var _="deltaY"in k?oT(k):Lv(k),C=n.current.filter(function(O){return O.name===k.type&&(O.target===k.target||k.target===O.shadowParent)&&BJ(O.delta,_)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var x=(o.current.shards||[]).map(sT).filter(Boolean).filter(function(O){return O.contains(k.target)}),E=x.length>0?l(k,x[0]):!o.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),f=A.useCallback(function(w,k,_,C){var x={name:w,delta:k,target:_,should:C,shadowParent:UJ(_)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(E){return E!==x})},1)},[]),h=A.useCallback(function(w){t.current=Lv(w),i.current=void 0},[]),d=A.useCallback(function(w){f(w.type,oT(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){f(w.type,Lv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return Oc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ac),document.addEventListener("touchmove",c,Ac),document.addEventListener("touchstart",h,Ac),function(){Oc=Oc.filter(function(w){return w!==a}),document.removeEventListener("wheel",c,Ac),document.removeEventListener("touchmove",c,Ac),document.removeEventListener("touchstart",h,Ac)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:FJ(r)}):null,v?A.createElement(DJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function UJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const VJ=bJ(LL,HJ);var gu=A.forwardRef(function(e,n){return A.createElement(wy,no({},e,{ref:n,sideCar:VJ}))});gu.classNames=wy.classNames;function HL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:c,returnFocus:f,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:b,zIndex:w,shadow:k,padding:_,__vars:C,unstyled:x,removeScrollProps:E,...O}){const{_id:j,titleMounted:M,bodyMounted:N,shouldLockScroll:q,setTitleMounted:P,setBodyMounted:L}=uJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:c,onClose:t,returnFocus:f}),{key:H,...G}=E||{};return y.jsx(ul,{...p,withinPortal:d,children:y.jsx(sJ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${j}-title`,getBodyId:()=>`${j}-body`,titleMounted:M,bodyMounted:N,setTitleMounted:P,setBodyMounted:L,trapFocus:l,closeOnEscape:c,zIndex:w,unstyled:x},children:y.jsx(gu,{enabled:q&&v,...G,children:y.jsx(me,{...O,id:j,__vars:{...C,"--mb-z-index":(w||wa("modal")).toString(),"--mb-shadow":z6(k),"--mb-padding":Ht(_)},children:b})},H)})})}HL.displayName="@mantine/core/ModalBase";function WJ(){const e=fs();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var ef={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function UL({className:e,...n}){const t=WJ(),i=fs();return y.jsx(me,{id:t,className:dn({[ef.body]:!i.unstyled},e),...n})}UL.displayName="@mantine/core/ModalBaseBody";function VL({className:e,onClick:n,...t}){const i=fs();return y.jsx(ml,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:dn({[ef.close]:!i.unstyled},e),unstyled:i.unstyled})}VL.displayName="@mantine/core/ModalBaseCloseButton";function WL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=fs();return y.jsx(rs,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var c,f,h;(c=l.onExitTransitionEnd)==null||c.call(l),(h=(f=l.transitionProps)==null?void 0:f.onExited)==null||h.call(f)},onEntered:()=>{var c,f,h;(c=l.onEnterTransitionEnd)==null||c.call(l),(h=(f=l.transitionProps)==null?void 0:f.onEntered)==null||h.call(f)},...e,children:c=>y.jsx("div",{...t,className:dn({[ef.inner]:!l.unstyled},t.className),children:y.jsx(gy,{active:l.opened&&l.trapFocus,innerRef:a,children:y.jsx(Mt,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,c],className:dn({[ef.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}WL.displayName="@mantine/core/ModalBaseContent";function GL({className:e,...n}){const t=fs();return y.jsx(me,{component:"header",className:dn({[ef.header]:!t.unstyled},e),...n})}GL.displayName="@mantine/core/ModalBaseHeader";const GJ={duration:200,timingFunction:"ease",transition:"fade"};function YJ(e){const n=fs();return{...GJ,...n.transitionProps,...e}}function YL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=fs(),o=YJ(n);return y.jsx(rs,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>y.jsx(Vm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e==null||e(c),a.closeOnClickOutside&&a.onClose()},...r})})}YL.displayName="@mantine/core/ModalBaseOverlay";function KJ(){const e=fs();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function KL({className:e,...n}){const t=KJ(),i=fs();return y.jsx(me,{component:"h2",className:dn({[ef.title]:!i.unstyled},e),id:t,...n})}KL.displayName="@mantine/core/ModalBaseTitle";function XJ({children:e}){return y.jsx(y.Fragment,{children:e})}const XL=A.createContext({size:"sm"}),ZL=Re(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,c=A.use(XL),{resolvedClassNames:f,resolvedStyles:h}=Wi({classNames:a,styles:o,props:n});return y.jsx(ml,{variant:i||"transparent",size:t||(c==null?void 0:c.size)||"sm",classNames:f,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});ZL.displayName="@mantine/core/InputClearButton";const ZJ={xs:7,sm:8,md:10,lg:12,xl:15};function QJ({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?y.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:ZJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const Pu=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var xa={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const QL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ii(n)} - ${he(2)})`}}),Wm=Re(e=>{const n=be("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,__inheritStyles:f=!0,attributes:h,...d}=be("InputDescription",null,n),p=A.use(Pu),v=Xe({name:["InputWrapper",c],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:QL});return y.jsx(me,{component:"p",...(f&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Wm.classes=xa;Wm.varsResolver=QL;Wm.displayName="@mantine/core/InputDescription";const JL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ii(n)} - ${he(2)})`}}),Gm=Re(e=>{const n=be("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,__staticSelector:f,__inheritStyles:h=!0,...d}=n,p=Xe({name:["InputWrapper",f],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,rootSelector:"error",vars:l,varsResolver:JL}),v=A.use(Pu);return y.jsx(me,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Gm.classes=xa;Gm.varsResolver=JL;Gm.displayName="@mantine/core/InputError";const JJ={labelElement:"label"},eI=(e,{size:n})=>({label:{"--input-label-size":ii(n),"--input-asterisk-color":void 0}}),Ym=Re(e=>{const n=be("InputLabel",JJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:c,required:f,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:b,attributes:w,...k}=n,_=Xe({name:["InputWrapper",v],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:eI}),C=A.use(Pu),x=(C==null?void 0:C.getStyles)||_;return y.jsxs(me,{...x("label",C!=null&&C.getStyles?{className:i,style:r}:void 0),component:c,htmlFor:c==="label"?h:void 0,mod:[{required:f},b],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...k,children:[p,f&&y.jsx("span",{...x("required"),"aria-hidden":!0,children:" *"})]})});Ym.classes=xa;Ym.varsResolver=eI;Ym.displayName="@mantine/core/InputLabel";const lC=Re(e=>{const n=be("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,error:f,mod:h,attributes:d,...p}=n;return y.jsx(me,{...Xe({name:["InputPlaceholder",c],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!f},h],component:"span",...p})});lC.classes=xa;lC.displayName="@mantine/core/InputPlaceholder";function eee(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const nee={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},nI=(e,{size:n})=>({label:{"--input-label-size":ii(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ii(n)} - ${he(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ii(n)} - ${he(2)})`}}),ky=Re(e=>{const n=be("InputWrapper",nee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,variant:f,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:C,labelElement:x,children:E,withAsterisk:O,id:j,required:M,__stylesApiProps:N,mod:q,attributes:P,...L}=n,H=Xe({name:["InputWrapper",h],props:N||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,varsResolver:nI}),G={size:c,variant:f,__staticSelector:h},U=Vi(j),z=typeof O=="boolean"?O:M,D=(C==null?void 0:C.id)||`${U}-error`,$=(_==null?void 0:_.id)||`${U}-description`,B=U,Y=!!b&&typeof b!="boolean",R=!!w,W=`${Y?D:""} ${R?$:""}`,V=W.trim().length>0?W.trim():void 0,I=(k==null?void 0:k.id)||`${U}-label`,X=v&&y.jsx(Ym,{labelElement:x,id:I,htmlFor:B,required:z,...G,...k,children:v},"label"),ee=R&&y.jsx(Wm,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||$,children:w},"description"),re=y.jsx(A.Fragment,{children:d(E)},"input"),le=Y&&A.createElement(Gm,{...C,...G,size:(C==null?void 0:C.size)||G.size,key:"error",id:(C==null?void 0:C.id)||D},b),ye=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return le;default:return null}});return y.jsx(Pu,{value:{getStyles:H,describedBy:V,inputId:B,labelId:I,...eee(p,{hasDescription:R,hasError:Y})},children:y.jsx(me,{variant:f,size:c,mod:[{error:!!b},q],id:x==="label"?void 0:j,...H("root"),...L,children:ye})})});ky.classes=xa;ky.varsResolver=nI;ky.displayName="@mantine/core/InputWrapper";const tee={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},tI=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":zn(n.size,"input-height"),"--input-fz":ii(n.size),"--input-radius":n.radius===void 0?void 0:Wt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?he(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?he(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?zn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Vt=ji(e=>{const n=be("Input",tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:c,__stylesApiProps:f,size:h,wrapperProps:d,error:p,disabled:v,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:C,rightSectionWidth:x,rightSectionPointerEvents:E,leftSectionPointerEvents:O,variant:j,vars:M,pointer:N,multiline:q,radius:P,id:L,withAria:H,withErrorStyles:G,mod:U,inputSize:z,attributes:D,__clearSection:$,__clearable:B,__clearSectionMode:Y,__defaultRightSection:R,loading:W,loadingPosition:V,rootRef:I,...X}=n,{styleProps:ee,rest:re}=Du(X),le=A.use(Pu),ye={offsetBottom:le==null?void 0:le.offsetBottom,offsetTop:le==null?void 0:le.offsetTop},ae=Xe({name:["Input",c],props:f||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:D,stylesCtx:ye,rootSelector:"wrapper",vars:M,varsResolver:tI}),ue=H?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":le==null?void 0:le.describedBy,id:(le==null?void 0:le.inputId)||L}:{},xe=W?y.jsx(bi,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=W&&V==="left"?xe:b,ze=QJ({__clearable:B,__clearSection:$,rightSection:W&&V==="right"?xe:_,__defaultRightSection:R,size:h,__clearSectionMode:Y});return y.jsx(XL,{value:{size:h||"sm"},children:y.jsxs(me,{ref:I,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:q,"data-with-right-section":!!ze,"data-with-left-section":!!ne},U],variant:j,size:h,children:[ne&&y.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),y.jsx(me,{component:"input",...re,...ue,required:l,mod:{disabled:v,error:!!p&&G},variant:j,__size:z,...ae("input")}),ze&&y.jsx("div",{...C,"data-position":"right",...ae("section",{className:C==null?void 0:C.className,style:C==null?void 0:C.style}),children:ze})]})})});Vt.classes=xa;Vt.varsResolver=tI;Vt.Wrapper=ky;Vt.Label=Ym;Vt.Error=Gm;Vt.Description=Wm;Vt.Placeholder=lC;Vt.ClearButton=ZL;Vt.displayName="@mantine/core/Input";function iI(e,n,t){const i=be(e,n,t),{label:r,description:a,error:o,required:l,classNames:c,styles:f,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:C,size:x,style:E,inputContainer:O,inputWrapperOrder:j,withAsterisk:M,variant:N,vars:q,mod:P,attributes:L,...H}=i,{styleProps:G,rest:U}=Du(H),z={label:r,description:a,error:o,required:l,classNames:c,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:f,size:x,style:E,inputContainer:O,inputWrapperOrder:j,withAsterisk:M,variant:N,id:C,mod:P,attributes:L,..._};return{...U,classNames:c,styles:f,unstyled:d,wrapperProps:{...z,...G},inputProps:{required:l,classNames:c,styles:f,unstyled:d,size:x,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:C,attributes:L}}}const iee={__staticSelector:"InputBase",withAria:!0,size:"sm"},Gi=ji(e=>{const{inputProps:n,wrapperProps:t,...i}=iI("InputBase",iee,e);return y.jsx(Vt.Wrapper,{...t,children:y.jsx(Vt,{...n,...i})})});Gi.classes={...Vt.classes,...Vt.Wrapper.classes};Gi.displayName="@mantine/core/InputBase";function zg({style:e,size:n=16,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:he(n),height:he(n),display:"block"},...t,children:y.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}zg.displayName="@mantine/core/AccordionChevron";var rI={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const aI=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({color:t||e.primaryColor,theme:e,variant:i||"light",autoContrast:r});return{root:{"--alert-radius":n===void 0?void 0:Wt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},Xh=Re(e=>{const n=be("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:c,color:f,title:h,children:d,id:p,icon:v,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:C,role:x,attributes:E,...O}=n,j=Xe({name:"Alert",classes:rI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:aI}),M=Vi(p),N=h&&`${M}-title`||void 0,q=`${M}-body`;return y.jsx(me,{id:M,...j("root",{variant:_}),variant:_,...O,role:x||"alert","aria-describedby":d?q:void 0,"aria-labelledby":h?N:void 0,children:y.jsxs("div",{...j("wrapper"),children:[v&&y.jsx("div",{...j("icon"),children:v}),y.jsxs("div",{...j("body"),children:[h&&y.jsx("div",{...j("title"),"data-with-close-button":b||void 0,children:y.jsx("span",{id:N,...j("label"),children:h})}),d&&y.jsx("div",{id:q,...j("message"),"data-variant":_,children:d})]}),b&&y.jsx(ml,{...j("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});Xh.classes=rI;Xh.varsResolver=aI;Xh.displayName="@mantine/core/Alert";var oI={root:"m_b6d8b162"};function ree(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const aee={inherit:!1},sI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ii(r),"--text-lh":yK(r),"--text-gradient":n==="gradient"?mS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),Ce=ji(e=>{const n=be("Text",aee,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:c,vars:f,className:h,style:d,classNames:p,styles:v,unstyled:b,variant:w,mod:k,size:_,attributes:C,...x}=n;return y.jsx(me,{...Xe({name:["Text",c],props:n,classes:oI,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:C,vars:f,varsResolver:sI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":ree(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...x})});Ce.classes=oI;Ce.varsResolver=sI;Ce.displayName="@mantine/core/Text";var lI={root:"m_849cf0da"};const oee={underline:"hover"},_y=ji(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",oee,e);return y.jsx(Ce,{component:"a",className:dn({[lI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});_y.classes=lI;_y.displayName="@mantine/core/Anchor";const[see,zf]=Vr("AppShell was not found in tree");var pl={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const uC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellAside",null,e),d=zf();return d.disabled?null:y.jsx(me,{component:"aside",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("aside",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});uC.classes=pl;uC.displayName="@mantine/core/AppShellAside";const cC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellFooter",null,e),d=zf();return d.disabled?null:y.jsx(me,{component:"footer",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("footer",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=c??d.zIndex)==null?void 0:p.toString()}})});cC.classes=pl;cC.displayName="@mantine/core/AppShellFooter";const fC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellHeader",null,e),d=zf();return d.disabled?null:y.jsx(me,{component:"header",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("header",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=c??d.zIndex)==null?void 0:p.toString()}})});fC.classes=pl;fC.displayName="@mantine/core/AppShellHeader";const dC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return y.jsx(me,{component:"main",...zf().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});dC.classes=pl;dC.displayName="@mantine/core/AppShellMain";const hC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellNavbar",null,e),d=zf();return d.disabled?null:y.jsx(me,{component:"nav",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});hC.classes=pl;hC.displayName="@mantine/core/AppShellNavbar";const mC=ji(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...c}=be("AppShellSection",null,e),f=zf();return y.jsx(me,{mod:[{grow:o},l],...f.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...c})});mC.classes=pl;mC.displayName="@mantine/core/AppShellSection";function Km(e){return typeof e=="object"?e.base:e}function Xm(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Zm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function lee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Xm(o)){const p=he(Km(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Zm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=he(o.base),e["--app-shell-aside-offset"]=he(o.base)),Rt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=he(o[p]),n[p]["--app-shell-aside-offset"]=he(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=c,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=L6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=c,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function uee({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),Xm(r)){const l=he(Km(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Zm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=he(r.base),o&&(e["--app-shell-footer-offset"]=he(r.base))),Rt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=he(r[l]),o&&(n[l]["--app-shell-footer-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function cee({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),Xm(r)){const l=he(Km(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Zm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=he(r.base),o&&(e["--app-shell-header-offset"]=he(r.base))),Rt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=he(r[l]),o&&(n[l]["--app-shell-header-offset"]=he(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function fee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Xm(o)){const p=he(Km(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Zm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=he(o.base),e["--app-shell-navbar-offset"]=he(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=he(o.base))),Rt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=he(o[p]),n[p]["--app-shell-navbar-offset"]=he(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=he(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=c,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=L6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=c}}function Sk(e){return Number(e)===0?"0px":Ht(e)}function dee({padding:e,baseStyles:n,minMediaStyles:t}){Xm(e)&&(n["--app-shell-padding"]=Sk(Km(e))),Zm(e)&&(e.base&&(n["--app-shell-padding"]=Sk(e.base)),Rt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=Sk(e[i]))}))}function hee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},c={},f={};o==="static"&&(f["--app-shell-main-grid-column"]="1 / -1",f["--app-shell-main-grid-row"]="2"),fee({baseStyles:f,minMediaStyles:l,maxMediaStyles:c,navbar:e,theme:a,mode:o}),lee({baseStyles:f,minMediaStyles:l,maxMediaStyles:c,aside:i,theme:a,mode:o}),cee({baseStyles:f,minMediaStyles:l,header:n,mode:o}),uee({baseStyles:f,minMediaStyles:l,footer:t,mode:o}),dee({baseStyles:f,minMediaStyles:l,padding:r});const h=Wh(Rt(l),a.breakpoints).map(p=>({query:`(min-width: ${Og(p.px)})`,styles:l[p.value]})),d=Wh(Rt(c),a.breakpoints).map(p=>({query:`(max-width: ${Og(p.px)})`,styles:c[p.value]}));return{baseStyles:f,media:[...h,...d]}}function mee({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ui(),c=go(),{media:f,baseStyles:h}=hee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return y.jsx(Rf,{media:f,styles:h,selector:o||c.cssVariablesSelector})}function pee({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return vz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),us(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const vee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:wa("app"),mode:"fixed"},uI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),yr=Re(e=>{const n=be("AppShell",vee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:c,withBorder:f,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:b,layout:w,disabled:k,aside:_,footer:C,offsetScrollbars:x=!0,mode:E,mod:O,attributes:j,id:M,...N}=n,q=Xe({name:"AppShell",classes:pl,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:uI}),P=pee({disabled:k,transitionDuration:d}),L=Vi(M);return y.jsxs(see,{value:{getStyles:q,withBorder:f,zIndex:b,disabled:k,offsetScrollbars:x,mode:E},children:[y.jsx(mee,{navbar:c,header:v,aside:_,footer:C,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),y.jsx(me,{...q("root"),id:L,mod:[{resizing:P,layout:w,disabled:k,mode:E},O],...N})]})});yr.classes=pl;yr.varsResolver=uI;yr.displayName="@mantine/core/AppShell";yr.Navbar=hC;yr.Header=fC;yr.Main=dC;yr.Aside=uC;yr.Footer=cC;yr.Section=mC;function cI(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>cI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function xy(e){return e?e.map(n=>cI(n)):[]}function Qm(e){return e.reduce((n,t)=>"group"in t?{...n,...Qm(t.items)}:(n[`${t.value}`]=t,n),{})}var lr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const gee={error:null},fI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":zn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?lt(t,e):void 0}}),Sy=Re(e=>{const n=be("ComboboxChevron",gee,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:c,vars:f,attributes:h,mod:d,...p}=n,v=Xe({name:"ComboboxChevron",classes:lr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:c,vars:f,varsResolver:fI,attributes:h,rootSelector:"chevron"});return y.jsx(me,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:y.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});Sy.classes=lr;Sy.varsResolver=fI;Sy.displayName="@mantine/core/ComboboxChevron";const[yee,Sa]=Vr("Combobox component was not found in tree");function dI({onMouseDown:e,onClick:n,onClear:t,...i}){return y.jsx(Vt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}dI.displayName="@mantine/core/ComboboxClearButton";const pC=Re(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=Sa();return y.jsx(jn.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});pC.classes=lr;pC.displayName="@mantine/core/ComboboxDropdown";const bee={refProp:"ref"},hI=Re(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",bee,e);if(Sa(),!N6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return y.jsx(jn.Target,{ref:i,refProp:t,children:n})});hI.displayName="@mantine/core/ComboboxDropdownTarget";const vC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return y.jsx(me,{...Sa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});vC.classes=lr;vC.displayName="@mantine/core/ComboboxEmpty";function gC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Sa(),[c,f]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?f(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?f(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const wee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},mI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:c,...f}=be("ComboboxEventsTarget",wee,e),h=Mu(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa();return A.cloneElement(h,{...gC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f,[t]:Gt(c,d.store.targetRef,sy(h))})});mI.displayName="@mantine/core/ComboboxEventsTarget";const yC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return y.jsx(me,{...Sa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});yC.classes=lr;yC.displayName="@mantine/core/ComboboxFooter";const bC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:c,...f}=be("ComboboxGroup",null,e),h=Sa(),d=Vi(c);return y.jsxs(me,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...f,children:[l&&y.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});bC.classes=lr;bC.displayName="@mantine/core/ComboboxGroup";const wC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return y.jsx(me,{...Sa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});wC.classes=lr;wC.displayName="@mantine/core/ComboboxHeader";function pI({value:e,valuesDivider:n=",",...t}){return y.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}pI.displayName="@mantine/core/ComboboxHiddenInput";const kC=Re(e=>{const n=be("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:c,active:f,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:b,...w}=n,k=Sa(),_=A.useId(),C=c||_;return y.jsx(me,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:C,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":p,"combobox-selected":v},b],role:"option",onClick:x=>{var E;p?x.preventDefault():((E=k.onOptionSubmit)==null||E.call(k,n.value,n),l==null||l(x))},onMouseDown:x=>{x.preventDefault(),h==null||h(x)},onMouseOver:x=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(x)}})});kC.classes=lr;kC.displayName="@mantine/core/ComboboxOption";const _C=Re(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...c}=be("ComboboxOptions",null,e),f=Sa(),h=Vi(a);return A.useEffect(()=>{f.store.setListId(h)},[h]),y.jsx(me,{...f.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...c,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});_C.classes=lr;_C.displayName="@mantine/core/ComboboxOptions";const kee={withAriaAttributes:!0,withKeyboardNavigation:!0},xC=Re(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:c,size:f,ref:h,...d}=be("ComboboxSearch",kee,e),p=Sa(),v=p.getStyles("search"),b=gC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return y.jsx(Vt,{ref:Gt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:f||p.size,...b,...d,__staticSelector:"Combobox"})});xC.classes=lr;xC.displayName="@mantine/core/ComboboxSearch";const _ee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},vI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:c,...f}=be("ComboboxTarget",_ee,e),h=Mu(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa(),p=A.cloneElement(h,{...gC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f});return y.jsx(jn.Target,{refProp:t,ref:Gt(c,d.store.targetRef),children:p})});vI.displayName="@mantine/core/ComboboxTarget";function xee(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function See(e,n,t){for(let i=e+1;i{l||(c(!0),r==null||r(D))},[c,r,l]),_=A.useCallback((D="unknown")=>{l&&(c(!1),i==null||i(D))},[c,i,l]),C=A.useCallback((D="unknown")=>{l?_(D):k(D)},[_,k,l]),x=A.useCallback(()=>{const D=Bo(p.current),$=dg(`#${f.current} [data-combobox-selected]`,D);$==null||$.removeAttribute("data-combobox-selected"),$==null||$.removeAttribute("aria-selected")},[]),E=A.useCallback(D=>{const $=Bo(p.current),B=dg(`#${f.current}`,$),Y=B?Ho("[data-combobox-option]",B):null;if(!Y)return null;const R=D>=Y.length?0:D<0?Y.length-1:D;return h.current=R,Y!=null&&Y[R]&&!Y[R].hasAttribute("data-combobox-disabled")?(x(),Y[R].setAttribute("data-combobox-selected","true"),Y[R].setAttribute("aria-selected","true"),Y[R].scrollIntoView({block:"nearest",behavior:o}),Y[R].id):null},[o,x]),O=A.useCallback(()=>{const D=Bo(p.current),$=dg(`#${f.current} [data-combobox-active]`,D);return E($?Ho(`#${f.current} [data-combobox-option]`,D).findIndex(B=>B===$):0)},[E]),j=A.useCallback(()=>{const D=Bo(p.current),$=Ho(`#${f.current} [data-combobox-option]`,D);return E(See(h.current,$,a))},[E,a]),M=A.useCallback(()=>{const D=Bo(p.current),$=Ho(`#${f.current} [data-combobox-option]`,D);return E(xee(h.current,$,a))},[E,a]),N=A.useCallback(()=>{const D=Bo(p.current);return E(Cee(Ho(`#${f.current} [data-combobox-option]`,D)))},[E]),q=A.useCallback((D="selected",$)=>{var B;if(typeof D=="number"){h.current=D;const Y=Bo(p.current),R=Ho(`#${f.current} [data-combobox-option]`,Y);$!=null&&$.scrollIntoView&&((B=R[D])==null||B.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var V;const Y=Bo(p.current),R=Ho(`#${f.current} [data-combobox-option]`,Y),W=R.findIndex(I=>I.hasAttribute(`data-combobox-${D}`));h.current=W,$!=null&&$.scrollIntoView&&((V=R[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),P=A.useCallback(()=>{h.current=-1,x()},[x]),L=A.useCallback(()=>{var $,B;const D=Bo(p.current);(B=($=Ho(`#${f.current} [data-combobox-option]`,D))==null?void 0:$[h.current])==null||B.click()},[]),H=A.useCallback(D=>{f.current=D},[]),G=A.useCallback(()=>{v.current=window.setTimeout(()=>{var D;return(D=d.current)==null?void 0:D.focus()},0)},[]),U=A.useCallback(()=>{b.current=window.setTimeout(()=>{var D;return(D=p.current)==null?void 0:D.focus()},0)},[]),z=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:C,selectedOptionIndex:h.current,getSelectedOptionIndex:z,selectOption:E,selectFirstOption:N,selectActiveOption:O,selectNextOption:j,selectPreviousOption:M,resetSelectedOption:P,updateSelectedOptionIndex:q,listId:f.current,setListId:H,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:U}}const Aee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},gI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ii(n),"--combobox-option-padding":zn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:he(t),"--combobox-option-fz":ii(n),"--combobox-option-padding":zn(n,"combobox-option-padding")}}),Cn=e=>{const n=be("Combobox",Aee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:c,onClose:f,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:b,attributes:w,...k}=n,_=Lf(),C=o||_,x=Xe({name:v||"Combobox",classes:lr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:gI}),E=()=>{f==null||f(),C.closeDropdown()};return y.jsx(yee,{value:{getStyles:x,store:C,onOptionSubmit:c,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:y.jsx(jn,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:O=>!O&&E(),withRoles:!1,unstyled:r,children:a})})},Oee=e=>e;Cn.extend=Oee;Cn.classes=lr;Cn.varsResolver=gI;Cn.displayName="@mantine/core/Combobox";Cn.Target=vI;Cn.Dropdown=pC;Cn.Options=_C;Cn.Option=kC;Cn.Search=xC;Cn.Empty=vC;Cn.Chevron=Sy;Cn.Footer=yC;Cn.Header=wC;Cn.EventsTarget=mI;Cn.DropdownTarget=hI;Cn.Group=bC;Cn.ClearButton=dI;Cn.HiddenInput=pI;function jee({children:e,role:n}){const t=A.use(Pu);return t?y.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):y.jsx(y.Fragment,{children:e})}const SC=A.createContext(null),Eee={hiddenInputValuesSeparator:","},CC=uy((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:c,hiddenInputValuesSeparator:f,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=be("CheckboxGroup",Eee,e),[b,w]=Pi({value:n,defaultValue:t,finalValue:[],onChange:i}),k=x=>{const E=typeof x=="string"?x:x.currentTarget.value;if(l)return;const O=b.includes(E);!O&&d&&b.length>=d||w(O?b.filter(j=>j!==E):[...b,E])},_=x=>{if(p)return!0;if(!d)return!1;const E=b.includes(x),O=b.length>=d;return!E&&O},C=b.join(f);return y.jsx(SC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:y.jsxs(Vt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[y.jsx(jee,{role:"group",children:o}),y.jsx("input",{type:"hidden",name:c,value:C,...h})]})})}));CC.classes=Vt.Wrapper.classes;CC.displayName="@mantine/core/CheckboxGroup";var yI={card:"m_26775b0a"};const bI=A.createContext(null),Tee={withBorder:!0},wI=(e,{radius:n})=>({card:{"--card-radius":Wt(n)}}),Cy=Re(e=>{const n=be("CheckboxCard",Tee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:c,mod:f,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:b,attributes:w,...k}=n,_=Xe({name:"CheckboxCard",classes:yI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:wI,rootSelector:"card"}),C=A.use(SC),[x,E]=Pi({value:typeof c=="boolean"?c:C?C.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return y.jsx(bI,{value:{checked:x},children:y.jsx(Ot,{mod:[{"with-border":h,checked:x},f],..._("card"),...k,role:"checkbox","aria-checked":x,onClick:O=>{p==null||p(O),C==null||C.onChange(d||""),E(!x)}})})});Cy.displayName="@mantine/core/CheckboxCard";Cy.classes=yI;Cy.varsResolver=wI;function AC({size:e,style:n,...t}){return y.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:he(e),height:he(e),...n}:n,"aria-hidden":!0,...t,children:y.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function kI({indeterminate:e,...n}){return e?y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:y.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):y.jsx(AC,{...n})}var _I={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Mee={icon:kI,variant:"filled",radius:"sm"},xI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=cs({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":zn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Wt(n),"--checkbox-color":a==="outline"?c:lt(t,e),"--checkbox-icon-color":r?lt(r,e):qm(o,e)?Df({color:t,theme:e,autoContrast:o}):void 0}}},Ay=Re(e=>{const n=be("CheckboxIndicator",Mee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:c,indeterminate:f,radius:h,color:d,iconColor:p,autoContrast:v,checked:b,mod:w,variant:k,disabled:_,attributes:C,...x}=n,E=Xe({name:"CheckboxIndicator",classes:_I,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:xI,rootSelector:"indicator"}),O=A.use(bI),j=typeof b=="boolean"||typeof f=="boolean"?b||f:(O==null?void 0:O.checked)||!1;return y.jsx(me,{...E("indicator",{variant:k}),variant:k,mod:[{checked:j,disabled:_},w],...x,children:y.jsx(c,{indeterminate:f,...E("icon")})})});Ay.displayName="@mantine/core/CheckboxIndicator";Ay.classes=_I;Ay.varsResolver=xI;var SI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const Dee=SI;function CI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:c,id:f,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:C,mod:x,attributes:E,...O}){const j=Xe({name:e,props:n,className:t,style:_,classes:SI,classNames:i,styles:r,unstyled:a,attributes:E});return y.jsx(me,{...j("root"),__vars:{"--label-fz":ii(p),"--label-lh":zn(p,"label-lh")},mod:[{"label-position":v},x],variant:k,size:p,...O,children:y.jsxs(me,{component:b,htmlFor:b==="label"?f:void 0,...j("body"),children:[o,y.jsxs("div",{...j("labelWrapper"),"data-disabled":h||void 0,children:[l&&y.jsx(me,{component:w,htmlFor:w==="label"?f:void 0,...j("label"),"data-disabled":h||void 0,children:l}),c&&y.jsx(Vt.Description,{size:p,__inheritStyles:!1,...j("description"),children:c}),d&&typeof d!="boolean"&&y.jsx(Vt.Error,{size:p,__inheritStyles:!1,...j("error"),children:d})]})]})})}CI.displayName="@mantine/core/InlineInput";var AI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Ree={labelPosition:"right",icon:kI,withErrorStyles:!0,variant:"filled",radius:"sm"},OI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=cs({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":zn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Wt(n),"--checkbox-color":a==="outline"?c:lt(t,e),"--checkbox-icon-color":r?lt(r,e):qm(o,e)?Df({color:t,theme:e,autoContrast:o}):void 0}}},cl=Re(e=>{var le;const n=be("Checkbox",Ree,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,label:f,id:h,size:d,radius:p,wrapperProps:v,checked:b,labelPosition:w,description:k,error:_,disabled:C,variant:x,indeterminate:E,icon:O,rootRef:j,iconColor:M,onChange:N,autoContrast:q,mod:P,attributes:L,readOnly:H,onClick:G,withErrorStyles:U,ref:z,...D}=n,$=A.useRef(null),B=A.use(SC),Y=d||(B==null?void 0:B.size),R=Xe({name:"Checkbox",props:n,classes:AI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:OI}),{styleProps:W,rest:V}=Du(D),I=Vi(h),X={checked:(B==null?void 0:B.value.includes(V.value))??b,onChange:ye=>{B==null||B.onChange(ye),N==null||N(ye)}},ee=((le=B==null?void 0:B.isDisabled)==null?void 0:le.call(B,V.value))??!1,re=C||ee;return A.useEffect(()=>{$.current&&($.current.indeterminate=E||!1,E?$.current.setAttribute("data-indeterminate","true"):$.current.removeAttribute("data-indeterminate"))},[E]),y.jsx(CI,{...R("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:I,size:Y,labelPosition:w,label:f,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||b||void 0,variant:x,ref:j,mod:P,attributes:L,inert:V.inert,...W,...v,children:y.jsxs(me,{...R("inner"),mod:{"data-label-position":w},children:[y.jsx(me,{component:"input",id:I,ref:Gt($,z),mod:{error:!!_},...R("input",{focusable:!0,variant:x}),...V,...X,disabled:re,inert:V.inert,type:"checkbox",onClick:ye=>{H&&ye.preventDefault(),G==null||G(ye)}}),y.jsx(O,{indeterminate:E,...R("icon")})]})})});cl.classes={...AI,...Dee};cl.varsResolver=OI;cl.displayName="@mantine/core/Checkbox";cl.Group=CC;cl.Indicator=Ay;cl.Card=Cy;function yu(e){return"group"in e}function jI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function EI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(yu(t))EI(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function Nee(e,n){return Array.isArray(e)?e.includes(n):e===n}function TI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!yu(e)){const c=Nee(i,e.value),f=n&&(c?y.jsx(AC,{className:lr.optionsDropdownCheckIcon}):t?y.jsx("div",{className:lr.optionsDropdownCheckPlaceholder}):null),h=y.jsxs(y.Fragment,{children:[r==="left"&&f,y.jsx("span",{children:e.label}),r==="right"&&f]});return y.jsx(Cn.Option,{value:e.value,disabled:e.disabled,className:dn({[lr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":c||void 0,"aria-selected":c,active:c,children:typeof o=="function"?o({option:e,checked:c}):h})}const l=e.items.map(c=>y.jsx(TI,{data:c,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${c.value}`));return y.jsx(Cn.Group,{label:e.group,children:l})}function Oy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:c=!0,withCheckIcon:f=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":C}){EI(e);const x=typeof r=="string"?(i||jI)({options:e,search:c?r:"",limit:a??1/0}):e,E=Pee(x),O=x.map(j=>y.jsx(TI,{data:j,withCheckIcon:f,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},yu(j)?j.group:`${j.value}`));return y.jsx(Cn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:y.jsxs(Cn.Options,{labelledBy:w,"aria-label":C,children:[l?y.jsx(Wr.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:O}):O,E&&v&&y.jsx(Cn.Empty,{children:v})]})})}const jy=Re(e=>{const n=be("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:O,disabled:j,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:P,size:L,id:H,renderOption:G,autoComplete:U,scrollAreaProps:z,onClear:D,clearButtonProps:$,error:B,clearable:Y,clearSectionMode:R,rightSection:W,autoSelectOnBlur:V,openOnFocus:I=!0,attributes:X,...ee}=n,re=Vi(H),le=xy(b),ye=Qm(le),[ae,ue]=Pi({value:w,defaultValue:k,finalValue:"",onChange:v}),xe=Lf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),C&&xe.selectFirstOption()},onDropdownClose:()=>{c==null||c(),setTimeout(xe.resetSelectedOption,0)}}),ne=Ne=>{ue(Ne),xe.resetSelectedOption()},{resolvedClassNames:ze,resolvedStyles:we}=Wi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&xe.selectFirstOption()},[_,ae]);const Oe=y.jsx(Cn.ClearButton,{...$,onClear:()=>{ne(""),D==null||D()}});return y.jsxs(Cn,{store:xe,__staticSelector:"Autocomplete",classNames:ze,styles:we,unstyled:r,readOnly:O,size:L,attributes:X,keepMounted:V,onOptionSubmit:Ne=>{x==null||x(Ne),ne(ye[Ne].label),xe.closeDropdown()},...E,children:[y.jsx(Cn.Target,{autoComplete:U,withExpandedAttribute:!0,children:y.jsx(Gi,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:Oe,__clearable:Y&&!!ae&&!j&&!O,__clearSectionMode:R,rightSection:W,disabled:j,readOnly:O,value:ae,error:B,onChange:Ne=>{ne(Ne.currentTarget.value),xe.openDropdown(),_&&xe.selectFirstOption()},onFocus:Ne=>{I&&xe.openDropdown(),h==null||h(Ne)},onBlur:Ne=>{V&&xe.clickSelectedOption(),xe.closeDropdown(),d==null||d(Ne)},onClick:Ne=>{xe.openDropdown(),p==null||p(Ne)},classNames:ze,styles:we,unstyled:r,attributes:X,id:re})}),y.jsx(Oy,{data:le,hidden:O||j,filter:M,search:ae,limit:N,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:P,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:z})]})});jy.classes={...Gi.classes,...Cn.classes};jy.displayName="@mantine/core/Autocomplete";var Ey={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const MI=A.createContext({withinGroup:!1}),DI=(e,{spacing:n})=>({group:{"--ag-spacing":Ht(n)}}),Ty=Re(e=>{const n=be("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:c,attributes:f,...h}=n;return y.jsx(MI,{value:{withinGroup:!0},children:y.jsx(me,{...Xe({name:"AvatarGroup",classes:Ey,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:DI,rootSelector:"group"})("group"),...h})})});Ty.classes=Ey;Ty.varsResolver=DI;Ty.displayName="@mantine/core/AvatarGroup";function $ee(e){return y.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function zee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const RI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:c})=>{const f=a==="initials"&&typeof l=="string"?Iee(l,c):a,h=e.variantColorResolver({color:f||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":zn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Wt(t),"--avatar-bg":f||i?h.background:void 0,"--avatar-color":f||i?h.color:void 0,"--avatar-bd":f||i?h.border:void 0}}},fo=ji(e=>{const n=be("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:c,alt:f,radius:h,color:d,gradient:p,imageProps:v,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:C,attributes:x,...E}=n,O=A.use(MI),[j,M]=A.useState(!c),N=Xe({name:"Avatar",props:n,classes:Ey,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:RI});return A.useEffect(()=>M(!c),[c]),y.jsx(me,{...N("root"),mod:[{"within-group":O.withinGroup},k],...E,children:j||!c?y.jsx("span",{...N("placeholder"),title:f,children:b||typeof _=="string"&&Bee(_)||y.jsx($ee,{})}):y.jsx("img",{...v,...N("image"),src:c,alt:f,onError:q=>{var P;M(!0),(P=v==null?void 0:v.onError)==null||P.call(v,q)}})})});fo.classes=Ey;fo.varsResolver=RI;fo.displayName="@mantine/core/Avatar";fo.Group=Ty;var PI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const NI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const c=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":zn(a,"badge-height"),"--badge-padding-x":zn(a,"badge-padding-x"),"--badge-fz":zn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Wt(n),"--badge-bg":t||r?c.background:void 0,"--badge-color":t||r?c.color:void 0,"--badge-bd":t||r?c.border:void 0,"--badge-dot-color":r==="dot"?lt(t,e):void 0}}},ot=ji(e=>{const n=be("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:c,color:f,gradient:h,leftSection:d,rightSection:p,children:v,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:C,attributes:x,...E}=n,O=Xe({name:"Badge",props:n,classes:PI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:NI});return y.jsxs(me,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},C],...O("root",{variant:b}),...E,children:[d&&y.jsx("span",{...O("section"),"data-position":"left",children:d}),y.jsx("span",{...O("label"),children:v}),p&&y.jsx("span",{...O("section"),"data-position":"right",children:p})]})});ot.classes=PI;ot.varsResolver=NI;ot.displayName="@mantine/core/Badge";var If={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const lT={orientation:"horizontal"},$I=(e,{borderWidth:n})=>({group:{"--button-border-width":he(n)}}),My=Re(e=>{const n=be("ButtonGroup",lT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:c,borderWidth:f,mod:h,attributes:d,...p}=be("ButtonGroup",lT,e);return y.jsx(me,{...Xe({name:"ButtonGroup",props:n,classes:If,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:$I,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});My.classes=If;My.varsResolver=$I;My.displayName="@mantine/core/ButtonGroup";const zI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":zn(o,"section-height"),"--section-padding-x":zn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ii(o.replace("compact-","")):ii(o),"--section-radius":n===void 0?void 0:Wt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Dy=Re(e=>{const n=be("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:c,radius:f,autoContrast:h,attributes:d,...p}=n;return y.jsx(me,{...Xe({name:"ButtonGroupSection",props:n,classes:If,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:zI,rootSelector:"groupSection"})("groupSection"),...p})});Dy.classes=If;Dy.varsResolver=zI;Dy.displayName="@mantine/core/ButtonGroupSection";const Fee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${he(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},LI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const c=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":zn(a,"button-height"),"--button-padding-x":zn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ii(a.replace("compact-","")):ii(a),"--button-radius":n===void 0?void 0:Wt(n),"--button-bg":t||r?c.background:void 0,"--button-hover":t||r?c.hover:void 0,"--button-color":c.color,"--button-bd":t||r?c.border:void 0,"--button-hover-color":t||r?c.hoverColor:void 0}}},gt=ji(e=>{const n=be("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:c,rightSection:f,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:C,"data-disabled":x,autoContrast:E,mod:O,attributes:j,...M}=n,N=Xe({name:"Button",props:n,classes:If,className:r,style:t,classNames:k,styles:_,unstyled:C,attributes:j,vars:i,varsResolver:LI}),q=!!c,P=!!f;return y.jsxs(Ot,{...N("root",{active:!o&&!v&&!x}),unstyled:C,variant:d,disabled:o||v,mod:[{disabled:o||x,loading:v,block:h,"with-left-section":q,"with-right-section":P},O],...M,children:[typeof v=="boolean"&&y.jsx(rs,{mounted:v,transition:Fee,duration:150,children:L=>y.jsx(me,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:y.jsx(bi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),y.jsxs("span",{...N("inner"),children:[c&&y.jsx(me,{component:"span",...N("section"),mod:{position:"left"},children:c}),y.jsx(me,{component:"span",mod:{loading:v},...N("label"),children:l}),f&&y.jsx(me,{component:"span",...N("section"),mod:{position:"right"},children:f})]})]})});gt.classes=If;gt.varsResolver=LI;gt.displayName="@mantine/core/Button";gt.Group=My;gt.GroupSection=Dy;const[qee,Hee]=Vr("Card component was not found in tree");var OC={root:"m_e615b15f",section:"m_599a2148"};const Ry=ji(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:c,...f}=be("CardSection",null,e),h=Hee();return y.jsx(me,{mod:[{"with-border":o,"inherit-padding":l},c],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...f})});Ry.classes=OC;Ry.displayName="@mantine/core/CardSection";const II=(e,{padding:n})=>({root:{"--card-padding":Ht(n)}}),Uee={orientation:"vertical"},za=ji(e=>{const n=be("Card",Uee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,padding:f,attributes:h,orientation:d,...p}=n,v=Xe({name:"Card",props:n,classes:OC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:II}),b=A.Children.toArray(c),w=b.map((k,_)=>{var C;return typeof k=="object"&&k&&"type"in k&&(k.type===Ry||((C=k.type)==null?void 0:C.displayName)==="@mantine/core/CardSection")?A.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return y.jsx(qee,{value:{getStyles:v},children:y.jsx(Mt,{unstyled:o,"data-orientation":d,...v("root"),...p,children:w})})});za.classes=OC;za.varsResolver=II;za.displayName="@mantine/core/Card";za.Section=Ry;var BI={root:"m_4451eb3a"};const Bf=ji(e=>{const n=be("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:c,mod:f,attributes:h,...d}=n,p=Xe({name:"Center",props:n,classes:BI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return y.jsx(me,{mod:[{inline:c},f],...p("root"),...d})});Bf.classes=BI;Bf.displayName="@mantine/core/Center";var FI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const uT={withShadow:!0},qI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Wt(n),"--cs-size":he(t)}}),Ff=ji(e=>{const n=be("ColorSwatch",uT,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,radius:f,withShadow:h,children:d,attributes:p,...v}=be("ColorSwatch",uT,n),b=Xe({name:"ColorSwatch",props:n,classes:FI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:qI});return y.jsxs(me,{...b("root",{focusable:!0}),...v,children:[y.jsx("span",{...b("alphaOverlay")}),h&&y.jsx("span",{...b("shadowOverlay")}),y.jsx("span",{...b("colorOverlay",{style:{backgroundColor:c}})}),y.jsx("span",{...b("childrenOverlay"),children:d})]})});Ff.classes=FI;Ff.varsResolver=qI;Ff.displayName="@mantine/core/ColorSwatch";function ha(e,n=0,t=10**n){return Math.round(t*e)/t}function Vee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const Wee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Gee(e,n="deg"){return Number(e)*(Wee[n]||1)}const Yee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function cT(e){const n=Yee.exec(e);return n?Vee({h:Gee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function AS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ha(60*(o<0?o+6:o),3),s:ha(r?a/r*100:0,3),v:ha(r/255*100,3),a:i}}function OS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?AS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):AS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Kee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ha(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...OS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...OS(i),a:r}}const Xee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function fT(e){const n=Xee.exec(e);return n?AS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const HI={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},Zee={hex:OS,hexa:Kee,rgb:fT,rgba:fT,hsl:cT,hsla:cT};function Qee(e){for(const[,n]of Object.entries(HI))if(n.test(e))return!0;return!1}function Iv(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const n=e.trim();for(const[t,i]of Object.entries(HI))if(i.test(n))return Zee[t](n);return{h:0,s:0,v:0,a:1}}const Py=A.createContext(null);function jC({position:e,...n}){return y.jsx(me,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}jC.displayName="@mantine/core/ColorPickerThumb";var Ny={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const qf=Re(e=>{var B;const n=be("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:c,onChangeEnd:f,maxValue:h,round:d,size:p="md",focusable:v=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:C,__staticSelector:x="ColorPicker",attributes:E,ref:O,...j}=n,M=Xe({name:x,classes:Ny,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),N=((B=A.use(Py))==null?void 0:B.getStyles)||M,q=ui(),[P,L]=A.useState({y:0,x:b/h}),H=A.useRef(P),G=Y=>d?Math.round(Y*h):Y*h,{ref:U}=yz(({x:Y,y:R})=>{H.current={x:Y,y:R},c==null||c(G(Y))},{onScrubEnd:()=>{const{x:Y}=H.current;f==null||f(G(Y)),C==null||C()},onScrubStart:_});ts(()=>{L({y:0,x:b/h})},[b]);const z=(Y,R)=>{Y.preventDefault();const W=gz(R);c==null||c(G(W.x)),f==null||f(G(W.x))},D=Y=>{switch(Y.key){case"ArrowRight":z(Y,{x:P.x+.05,y:P.y});break;case"ArrowLeft":z(Y,{x:P.x-.05,y:P.y});break}},$=w.map((Y,R)=>A.createElement("div",{...N("sliderOverlay"),style:Y,key:R}));return y.jsxs(me,{...j,ref:Gt(U,O),...N("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:D,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[$,y.jsx(jC,{position:P,...N("thumb",{style:{top:he(1),background:k}})})]})});qf.displayName="@mantine/core/ColorSlider";qf.classes=Ny;const Jee={__staticSelector:"AlphaSlider"},EC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",Jee,e);return y.jsx(qf,{...a,value:n,onChange:o=>t==null?void 0:t(ha(o,2)),onChangeEnd:o=>i==null?void 0:i(ha(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${he(8)} ${he(8)}`,backgroundPosition:`0 0, 0 ${he(4)}, ${he(4)} ${he(-4)}, ${he(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});EC.displayName="@mantine/core/AlphaSlider";EC.classes=qf.classes;function UI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),c=o*(1-a),f=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ha([o,f,c,c,h,o][d]*255),g:ha([h,o,o,f,c,c][d]*255),b:ha([c,c,h,o,o,f][d]*255),a:ha(i,2)}}function dT(e,n){const{r:t,g:i,b:r,a}=UI(e);return n?`rgba(${t}, ${i}, ${r}, ${ha(a,2)})`:`rgb(${t}, ${i}, ${r})`}function hT({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ha(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function yg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function VI(e){const{r:n,g:t,b:i}=UI(e);return`#${yg(n)}${yg(t)}${yg(i)}`}function ene(e){const n=Math.round(e.a*255);return`${VI(e)}${yg(n)}`}const Ck={hex:VI,hexa:e=>ene(e),rgb:e=>dT(e,!1),rgba:e=>dT(e,!0),hsl:e=>hT(e,!1),hsla:e=>hT(e,!0)};function Us(e,n){return n?e in Ck?Ck[e](n):Ck.hex(n):"#000000"}const nne={__staticSelector:"HueSlider"},TC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",nne,e);return y.jsx(qf,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${he(1)} inset, rgb(0, 0, 0, .15) 0 0 ${he(4)} inset`}]})});TC.displayName="@mantine/core/HueSlider";TC.classes=qf.classes;function WI({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:c,onScrubEnd:f,...h}){const{getStyles:d}=A.use(Py),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),b=A.useRef(p),{ref:w}=yz(({x:C,y:x})=>{b.current={x:C,y:x},n({s:Math.round(C*100),v:Math.round((1-x)*100)})},{onScrubEnd:()=>{const{x:C,y:x}=b.current;t({s:Math.round(C*100),v:Math.round((1-x)*100)}),f==null||f()},onScrubStart:c});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(C,x)=>{C.preventDefault();const E=gz(x);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=C=>{switch(C.key){case"ArrowUp":k(C,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(C,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(C,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(C,{x:p.x-.05,y:p.y});break}};return y.jsxs(me,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Us("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[y.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),y.jsx(jC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}WI.displayName="@mantine/core/Saturation";function GI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:c,...f}){const h=A.use(Py),d=o.map((p,v)=>A.createElement(Ff,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},c===p&&y.jsx(AC,{size:"35%",color:_z(p)<.5?"white":"black"})));return y.jsx(me,{...h.getStyles("swatches"),...f,children:d})}GI.displayName="@mantine/core/Swatches";const tne={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},YI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":zn(n,"cp-preview-size"),"--cp-width":zn(n,"cp-width"),"--cp-body-spacing":Ht(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":zn(n,"cp-thumb-size"),"--cp-saturation-height":zn(n,"cp-saturation-height")}}),$y=Re(e=>{const n=be("ColorPicker",tne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:c="hex",value:f,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:C,swatches:x,swatchesPerRow:E,fullWidth:O,onColorSwatchClick:j,__staticSelector:M,mod:N,attributes:q,name:P,hiddenInputProps:L,...H}=n,G=Xe({name:M,props:n,classes:Ny,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:YI}),U=A.useRef(c||"hex"),z=A.useRef(""),D=A.useRef(-1),$=A.useRef(!1),B=c==="hexa"||c==="rgba"||c==="hsla",[Y,R,W]=Pi({value:f,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[V,I]=A.useState(Iv(Y)),X=()=>{window.clearTimeout(D.current),$.current=!0},ee=()=>{window.clearTimeout(D.current),D.current=window.setTimeout(()=>{$.current=!1},200)},re=le=>{I(ye=>{const ae={...ye,...le};return z.current=Us(U.current,ae),ae}),R(z.current)};return ts(()=>{typeof f=="string"&&Qee(f)&&!$.current&&I(Iv(f))},[f]),ts(()=>{U.current=c||"hex",R(Us(U.current,V))},[c]),y.jsx(Py,{value:{getStyles:G,unstyled:o},children:y.jsxs(me,{...G("wrapper"),size:b,mod:[{"full-width":O},N],...H,children:[P&&y.jsx("input",{type:"hidden",name:P,value:Y,...L}),v&&y.jsxs(y.Fragment,{children:[y.jsx(WI,{value:V,onChange:re,onChangeEnd:({s:le,v:ye})=>p==null?void 0:p(Us(U.current,{...V,s:le,v:ye})),color:Y,size:b,focusable:C,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),y.jsxs("div",{...G("body"),children:[y.jsxs("div",{...G("sliders"),children:[y.jsx(TC,{value:V.h,onChange:le=>re({h:le}),onChangeEnd:le=>p==null?void 0:p(Us(U.current,{...V,h:le})),size:b,focusable:C,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),B&&y.jsx(EC,{value:V.a,onChange:le=>re({a:le}),onChangeEnd:le=>{p==null||p(Us(U.current,{...V,a:le}))},size:b,color:Us("hex",V),focusable:C,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),B&&y.jsx(Ff,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(x)&&y.jsx(GI,{data:x,swatchesPerRow:E,focusable:C,setValue:R,value:Y,onChangeEnd:le=>{const ye=Us(c,Iv(le));j==null||j(ye),p==null||p(ye),W||I(Iv(le))}})]})})});$y.classes=Ny;$y.varsResolver=YI;$y.displayName="@mantine/core/ColorPicker";var KI={root:"m_3eebeb36",label:"m_9e365f20"};const ine={orientation:"horizontal"},XI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?lt(n,e):void 0,"--divider-border-style":t,"--divider-size":zn(i,"divider-size")}}),Hf=Re(e=>{const n=be("Divider",ine,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,orientation:f,label:h,labelPosition:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Divider",classes:KI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:XI});return y.jsx(me,{mod:[{orientation:f,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&y.jsx(me,{component:"span",mod:{position:d},...w("label"),children:h})})});Hf.classes=KI;Hf.varsResolver=XI;Hf.displayName="@mantine/core/Divider";const[mT,ZI]=Vr("Grid component was not found in tree"),jS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},pT=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":jS(e,n),vT=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},gT=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function rne({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ui(),o=ZI(),l=o.breakpoints||a.breakpoints,c=Hr(e),f=c===void 0?12:c,h=Tu({"--col-order":(v=Hr(n))==null?void 0:v.toString(),"--col-flex-grow":vT(f,o.grow),"--col-flex-basis":jS(f,o.columns),"--col-width":f==="content"?"auto":void 0,"--col-max-width":pT(f,o.columns,o.grow),"--col-offset":gT(Hr(t),o.columns),"--col-align-self":Hr(i)}),d=Rt(l).reduce((b,w)=>{var k;return b[w]||(b[w]={}),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-flex-grow"]=vT(e[w],o.grow),b[w]["--col-flex-basis"]=jS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=pT(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=gT(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Wh(Rt(d),l).filter(b=>Rt(d[b.value]).length>0).map(b=>({query:o.type==="container"?`mantine-grid (min-width: ${l[b.value]})`:`(min-width: ${l[b.value]})`,styles:d[b.value]}));return y.jsx(Rf,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var MC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const ane={span:12},DC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:c,align:f,...h}=be("GridCol",ane,e),d=ZI(),p=ly();return y.jsxs(y.Fragment,{children:[y.jsx(rne,{selector:`.${p}`,span:o,order:l,offset:c,align:f}),y.jsx(me,{...d.getStyles("col",{className:dn(t,p),style:i,classNames:n,styles:r}),...h})]})});DC.classes=MC;DC.displayName="@mantine/core/GridCol";function yT({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ui(),l=r||o.breakpoints,c=Tu({"--grid-gap":Ht(Hr(e)),"--grid-row-gap":Ht(Hr(n)),"--grid-column-gap":Ht(Hr(t))}),f=Rt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ht(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ht(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ht(t[p])),d),{}),h=Wh(Rt(f),l).filter(d=>Rt(f[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:f[d.value]}));return y.jsx(Rf,{styles:c,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const one={gap:"md",columns:12},QI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Br=Re(e=>{const n=be("Grid",one,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:c,gap:f,rowGap:h,columnGap:d,columns:p,align:v,justify:b,children:w,breakpoints:k,type:_,attributes:C,...x}=n,E=Xe({name:"Grid",classes:MC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:QI}),O=ly();return _==="container"&&k?y.jsxs(mT,{value:{getStyles:E,grow:c,columns:p,breakpoints:k,type:_},children:[y.jsx(yT,{selector:`.${O}`,...n}),y.jsx("div",{...E("container"),children:y.jsx(me,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})})]}):y.jsxs(mT,{value:{getStyles:E,grow:c,columns:p,breakpoints:k,type:_},children:[y.jsx(yT,{selector:`.${O}`,...n}),y.jsx(me,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})]})});Br.classes=MC;Br.varsResolver=QI;Br.displayName="@mantine/core/Grid";Br.Col=DC;function sne(e="top-end",n=0){const t={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},i=typeof n=="number"?n:n.x,r=typeof n=="number"?n:n.y,a=he(i),o=he(r),[l,c]=e.split("-");return l==="top"&&(t["--indicator-top"]=o,t["--indicator-translate-y"]="-50%"),l==="middle"&&(t["--indicator-top"]="50%",t["--indicator-translate-y"]="-50%"),l==="bottom"&&(t["--indicator-bottom"]=o,t["--indicator-translate-y"]="50%"),c==="start"&&(t["--indicator-left"]=a,t["--indicator-translate-x"]="-50%"),c==="center"&&(t["--indicator-left"]="50%",t["--indicator-translate-x"]="-50%"),c==="end"&&(t["--indicator-right"]=a,t["--indicator-translate-x"]="50%"),t}var JI={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const lne={position:"top-end",offset:0,showZero:!0},eB=(e,{color:n,position:t,offset:i,size:r,radius:a,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":n?lt(n,e):void 0,"--indicator-text-color":qm(l,e)?Df({color:n,theme:e,autoContrast:l}):void 0,"--indicator-size":he(r),"--indicator-radius":a===void 0?void 0:Wt(a),"--indicator-z-index":o==null?void 0:o.toString(),...sne(t,i)}}),zy=Re(e=>{const n=be("Indicator",lne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,position:f,offset:h,inline:d,label:p,radius:v,color:b,withBorder:w,disabled:k,processing:_,zIndex:C,autoContrast:x,maxValue:E,showZero:O,mod:j,attributes:M,...N}=n,q=Xe({name:"Indicator",classes:JI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:eB}),P=!O&&(p===0||p==="0"),L=E!==void 0&&typeof p=="number"&&p>E?`${E}+`:p;return y.jsxs(me,{...q("root"),mod:[{inline:d},j],...N,children:[!k&&!P&&y.jsx(me,{mod:{"with-label":!!p,"with-border":w,processing:_},...q("indicator"),children:L}),c]})});zy.classes=JI;zy.varsResolver=eB;zy.displayName="@mantine/core/Indicator";const une=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],bT={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function wT(e){Object.keys(bT).forEach(n=>{e.style.setProperty(n,bT[n],"important")})}function cne(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of une)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let Mi=null;function fne(e,n,t=1,i=1/0){Mi||(Mi=document.createElement("textarea"),Mi.setAttribute("tabindex","-1"),Mi.setAttribute("aria-hidden","true"),Mi.setAttribute("aria-label","autosize measurement"),wT(Mi)),Mi.parentNode===null&&document.body.appendChild(Mi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Mi.style[p]=o[p]}),wT(Mi),Mi.value=n;let c=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r;Mi.value=n,c=l==="border-box"?Mi.scrollHeight+a:Mi.scrollHeight-r,Mi.value="x";const f=Mi.scrollHeight-r;let h=f*t;l==="border-box"&&(h=h+r+a),c=Math.max(h,c);let d=f*i;return l==="border-box"&&(d=d+r+a),c=Math.min(d,c),[c,f]}function dne({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=Gt(o,i),c=A.useRef(0),f=()=>{const d=o.current;if(!d)return;const p=cne(d);if(!p)return;const[v]=fne(p,d.value||d.placeholder||"x",n,e);c.current!==v&&(c.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||f(),t==null||t(d)};return A.useLayoutEffect(f),A.useEffect(()=>{const d=()=>f();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>f();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&f()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),y.jsx("textarea",{...r,onChange:h,ref:l})}const hne={size:"sm"},bu=Re(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",hne,e),l=n&&LK()!=="test",c=l?{maxRows:t,minRows:i}:{};return y.jsx(Gi,{component:l?dne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...c})});bu.classes=Gi.classes;bu.displayName="@mantine/core/Textarea";const[mne,vl]=Vr("Menu component was not found in the tree");var gl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const RC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return y.jsx(me,{...vl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});RC.classes=gl;RC.displayName="@mantine/core/MenuDivider";const PC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:c,children:f,ref:h,...d}=be("MenuDropdown",null,e),p=A.useRef(null),v=vl(),b=br(c,_=>{var C,x;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(x=(C=p.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||x.focus())}),w=br(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=br(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return y.jsxs(jn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Gt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&y.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});PC.classes=gl;PC.displayName="@mantine/core/MenuDropdown";const Zh=A.createContext(null),NC=ji(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:c,rightSection:f,children:h,disabled:d,"data-disabled":p,ref:v,...b}=be("MenuItem",null,e),w=vl(),k=A.use(Zh),_=ui(),{dir:C}=Ru(),x=A.useRef(null),E=b,O=br(E.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),j=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?cs({color:o,theme:_}):null,N=br(E.onKeyDown,q=>{q.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return y.jsxs(Ot,{onMouseDown:q=>q.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Gt(x,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:O,onKeyDown:$6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:j==null?void 0:j.color,"--menu-item-hover":j==null?void 0:j.hover},children:[c&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:c}),h&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),f&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f})]})});NC.classes=gl;NC.displayName="@mantine/core/MenuItem";const $C=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return y.jsx(me,{...vl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});$C.classes=gl;$C.displayName="@mantine/core/MenuLabel";const zC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:c,children:f,ref:h,...d}=be("MenuSubDropdown",null,e),p=A.useRef(null),v=vl(),b=A.use(Zh),w=br(o,b==null?void 0:b.open),k=br(l,b==null?void 0:b.close);return y.jsx(jn.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Gt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:f})});zC.classes=gl;zC.displayName="@mantine/core/MenuSubDropdown";const LC=ji(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:c,children:f,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...b}=be("MenuSubItem",null,e),w=vl(),k=A.use(Zh),_=ui(),{dir:C}=Ru(),x=A.useRef(null),E=b,O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,j=o?cs({color:o,theme:_}):null,M=br(E.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),N=br(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),q=br(E.onMouseEnter,k==null?void 0:k.open),P=br(E.onMouseLeave,k==null?void 0:k.close);return y.jsxs(Ot,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Gt(x,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:q,onMouseLeave:P,onClick:N,onKeyDown:$6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":j!=null&&j.isThemeColor&&(j==null?void 0:j.shade)===void 0?`var(--mantine-color-${j.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[l&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),f&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:f}),y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c||y.jsx(zg,{...w.getStyles("chevron"),size:14})})]})});LC.classes=gl;LC.displayName="@mantine/core/MenuSubItem";function nB({children:e,refProp:n}){if(!N6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return vl(),y.jsx(jn.Target,{refProp:n,popupType:"menu",children:e})}nB.displayName="@mantine/core/MenuSubTarget";const pne={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Uf(e){const{children:n,closeDelay:t,openDelay:i,...r}=be("MenuSub",pne,e),a=Vi(),[o,{open:l,close:c}]=bz(!1),f=A.use(Zh),{openDropdown:h,closeDropdown:d}=mL({open:l,close:c,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var b,w;(w=(b=document.getElementById(`${a}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return y.jsx(Zh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:f},children:y.jsx(jn,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Uf.extend=e=>e;Uf.displayName="@mantine/core/MenuSub";Uf.Target=nB;Uf.Dropdown=zC;Uf.Item=LC;const vne={refProp:"ref"};function tB(e){const{children:n,refProp:t,...i}=be("MenuTarget",vne,e),r=Mu(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=vl(),o=r.props,l=br(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=br(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),f=br(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return y.jsx(jn.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:c,onMouseLeave:f,"data-expanded":a.opened?!0:void 0})})}tB.displayName="@mantine/core/MenuTarget";const gne={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Wn=Re(e=>{const n=be("Menu",gne,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:c,closeOnItemClick:f,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:C,vars:x,menuItemTabIndex:E,keepMounted:O,withInitialFocusPlaceholder:j,attributes:M,...N}=n,q=Xe({name:"Menu",classes:gl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[P,L]=Pi({value:a,defaultValue:o,finalValue:!1,onChange:c}),[H,G]=A.useState(!1),U=()=>{L(!1),G(!1),P&&(r==null||r())},z=()=>{L(!0),!P&&(i==null||i())},D=()=>{P?U():z()},{openDropdown:$,closeDropdown:B}=mL({open:z,close:U,closeDelay:b,openDelay:v}),Y=V=>bK("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:R,resolvedStyles:W}=Wi({classNames:w,styles:k,props:n});return y.jsx(mne,{value:{getStyles:q,opened:P,toggleDropdown:D,getItemIndex:Y,openedViaClick:H,setOpenedViaClick:G,closeOnItemClick:f,closeDropdown:p==="click"?U:B,openDropdown:p==="click"?z:$,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:j},children:y.jsx(jn,{returnFocus:!0,...N,opened:P,onChange:D,defaultOpened:o,trapFocus:O?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:R,styles:W,unstyled:_,variant:C,keepMounted:O,children:t})})});Wn.displayName="@mantine/core/Menu";Wn.classes=gl;Wn.Item=NC;Wn.Label=$C;Wn.Dropdown=PC;Wn.Target=tB;Wn.Divider=RC;Wn.Sub=Uf;const[yne,Vf]=Vr("Modal component was not found in tree");var ds={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Ly=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalBody",null,e);return y.jsx(UL,{...Vf().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});Ly.classes=ds;Ly.displayName="@mantine/core/ModalBody";const Iy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalCloseButton",null,e);return y.jsx(VL,{...Vf().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});Iy.classes=ds;Iy.displayName="@mantine/core/ModalCloseButton";const By=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...c}=be("ModalContent",null,e),f=Vf(),h=f.scrollAreaComponent||XJ;return y.jsx(WL,{...f.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:f.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...c,children:y.jsx(h,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${he(f.yOffset)} * 2))`},children:o})})});By.classes=ds;By.displayName="@mantine/core/ModalContent";const Fy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalHeader",null,e);return y.jsx(GL,{...Vf().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});Fy.classes=ds;Fy.displayName="@mantine/core/ModalHeader";const qy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalOverlay",null,e);return y.jsx(YL,{...Vf().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});qy.classes=ds;qy.displayName="@mantine/core/ModalOverlay";const bne={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},iB=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Wt(n),"--modal-size":zn(t,"modal-size"),"--modal-y-offset":he(i),"--modal-x-offset":he(r)}}),Jm=Re(e=>{const n=be("ModalRoot",bne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:c,scrollAreaComponent:f,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:b,attributes:w,...k}=n,_=Xe({name:b,classes:ds,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:iB});return y.jsx(yne,{value:{yOffset:c,scrollAreaComponent:f,getStyles:_,fullScreen:d},children:y.jsx(HL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":f===Wr.Autosize||void 0,unstyled:o,...k})})});Jm.classes=ds;Jm.varsResolver=iB;Jm.displayName="@mantine/core/ModalRoot";const rB=A.createContext(null);function aB({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(wa("modal"));return y.jsx(rB,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}aB.displayName="@mantine/core/ModalStack";const Hy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalTitle",null,e);return y.jsx(KL,{...Vf().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});Hy.classes=ds;Hy.displayName="@mantine/core/ModalTitle";const wne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},_r=Re(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:c,stackId:f,zIndex:h,...d}=be("Modal",wne,e),p=A.use(rB),v=!!n||r,b=p&&f?{closeOnEscape:p.currentId===f,trapFocus:p.currentId===f,zIndex:p.getZIndex(f)}:{},w=t===!1?!1:f&&p?p.currentId===f:c;return A.useEffect(()=>{p&&f&&(c?p.addModal(f,h||wa("modal")):p.removeModal(f))},[c,f,h]),y.jsxs(Jm,{radius:l,opened:c,zIndex:p&&f?p.getZIndex(f):h,...d,...b,children:[t&&y.jsx(qy,{visible:w,transitionProps:p&&f?{duration:0}:void 0,...i}),y.jsxs(By,{radius:l,__hidden:p&&f&&c?f!==p.currentId:!1,children:[v&&y.jsxs(Fy,{children:[n&&y.jsx(Hy,{children:n}),r&&y.jsx(Iy,{...a})]}),y.jsx(Ly,{children:o})]})]})});_r.classes=ds;_r.displayName="@mantine/core/Modal";_r.Root=Jm;_r.Overlay=qy;_r.Content=By;_r.Body=Ly;_r.Header=Fy;_r.Title=Hy;_r.CloseButton=Iy;_r.Stack=aB;const Uy=A.createContext(null);var Vy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const oB=A.createContext(null),sB=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?zn(n):zn(t,"pg-gap")}}),Wy=Re(e=>{var b;const n=be("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,disabled:f,attributes:h,...d}=n,p=((b=A.use(Uy))==null?void 0:b.size)||c||void 0,v=Xe({name:"PillGroup",classes:Vy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:sB,stylesCtx:{size:p},rootSelector:"group"});return y.jsx(oB,{value:{size:p,disabled:f},children:y.jsx(me,{size:p,...v("group"),...d})})});Wy.classes=Vy;Wy.varsResolver=sB;Wy.displayName="@mantine/core/PillGroup";const kne={variant:"default"},lB=(e,{radius:n},{size:t})=>({root:{"--pill-fz":zn(t,"pill-fz"),"--pill-height":zn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Wt(n)}}),fl=Re(e=>{const n=be("Pill",kne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:c,children:f,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:b,disabled:w,mod:k,attributes:_,...C}=n,x=A.use(oB),E=A.use(Uy),O=b||(x==null?void 0:x.size)||void 0,j=(E==null?void 0:E.variant)==="filled"?"contrast":c||"default",M=Xe({name:"Pill",classes:Vy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:lB,stylesCtx:{size:O}});return y.jsxs(me,{component:"span",variant:j,size:O,...M("root",{variant:j}),mod:[{"with-remove":h&&!w,disabled:w||(x==null?void 0:x.disabled)},k],...C,children:[y.jsx("span",{...M("label"),children:f}),h&&y.jsx(ml,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var q;N.preventDefault(),N.stopPropagation(),(q=p==null?void 0:p.onMouseDown)==null||q.call(p,N)},onClick:N=>{var q;N.stopPropagation(),d==null||d(),(q=p==null?void 0:p.onClick)==null||q.call(p,N)}})]})});fl.classes=Vy;fl.varsResolver=lB;fl.displayName="@mantine/core/Pill";fl.Group=Wy;var uB={field:"m_45c4369d"};const _ne={type:"visible"},IC=Re(e=>{const n=be("PillsInputField",_ne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:c,disabled:f,id:h,pointer:d,mod:p,attributes:v,ref:b,...w}=n,k=A.use(Uy),_=A.use(Pu),C=Xe({name:"PillsInputField",classes:uB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),x=f||(k==null?void 0:k.disabled);return y.jsx(me,{component:"input",ref:Gt(b,k==null?void 0:k.fieldRef),"data-type":c,disabled:x,mod:[{disabled:x,pointer:d},p],...C("field"),...w,id:(_==null?void 0:_.inputId)||h,"aria-invalid":k==null?void 0:k.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});IC.classes=uB;IC.displayName="@mantine/core/PillsInputField";const xne={size:"sm"},wu=Re(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:c,...f}=be("PillsInput",xne,e),h=A.useRef(null);return y.jsx(Uy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:c},children:y.jsx(Gi,{size:r,error:l,variant:c,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...f,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});wu.displayName="@mantine/core/PillsInput";wu.classes=Gi.classes;wu.Field=IC;function Ak(e){return typeof e=="string"?e.trim().toLowerCase():e}function Sne({data:e,value:n}){const t=n.map(Ak);return e.reduce((i,r)=>(yu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(Ak(a.value))===-1)}):t.indexOf(Ak(r.value))===-1&&i.push(r),i),[])}const kT={xs:41,sm:50,md:60,lg:72,xl:89},Cne={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Gy=uy(e=>{const n=be("MultiSelect",Cne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,value:f,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:C,selectFirstOptionOnChange:x,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:O,comboboxProps:j,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:P,searchValue:L,defaultSearchValue:H,onSearchChange:G,readOnly:U,disabled:z,onFocus:D,onBlur:$,radius:B,rightSection:Y,rightSectionWidth:R,rightSectionPointerEvents:W,rightSectionProps:V,leftSection:I,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:le,inputWrapperOrder:ye,withAsterisk:ae,labelProps:ue,descriptionProps:xe,errorProps:ne,wrapperProps:ze,description:we,label:Oe,error:Ne,maxValues:ge,searchable:Se,nothingFoundMessage:Pe,withCheckIcon:ce,withAlignedLabels:Be,checkIconPosition:Ye,hidePickedOptions:We,withErrorStyles:Ze,name:Qe,form:ie,id:ve,clearable:Ke,clearSectionMode:Je,clearButtonProps:Ae,hiddenInputProps:rn,placeholder:fn,hiddenInputValuesDivider:En,required:pn,mod:on,renderOption:nn,renderPill:Nn,onRemove:De,onClear:Fe,onMaxValues:Mn,scrollAreaProps:bn,chevronColor:yn,attributes:kn,clearSearchOnChange:ut,openOnFocus:jt,loading:Ie,loadingPosition:Ue,...$n}=n,at=Vi(ve),Dn=xy(b),tn=Qm(Dn),en=A.useRef({}),an=Lf({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&an.selectFirstOption()},onDropdownClose:()=>{C==null||C(),an.resetSelectedOption()}}),{styleProps:Ln,rest:{type:Yn,autoComplete:Nt,...Tn}}=Du($n),[An,Jn]=Pi({value:f,defaultValue:h,finalValue:[],onChange:d}),[Yt,ci]=Pi({value:L,defaultValue:H,finalValue:"",onChange:G}),ir=un=>{ci(un),an.resetSelectedOption()},Gr=Xe({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:kn}),{resolvedClassNames:Yr,resolvedStyles:Aa}=Wi({props:n,styles:a,classNames:t}),Oa=un=>{p==null||p(un),un.key===" "&&!Se&&(un.preventDefault(),an.toggleDropdown()),un.key==="Backspace"&&Yt.length===0&&An.length>0&&(De==null||De(An[An.length-1]),Jn(An.slice(0,An.length-1)))},_o=An.map((un,Ar)=>{var Or;const Ya=tn[`${un}`]||en.current[`${un}`];return Nn?y.jsx(A.Fragment,{children:Nn({option:Ya,value:un,onRemove:()=>{Jn(An.filter(jr=>un!==jr)),De==null||De(un)},disabled:z})},`${un}-${Ar}`):y.jsx(fl,{withRemoveButton:!U&&!((Or=tn[`${un}`])!=null&&Or.disabled),onRemove:()=>{Jn(An.filter(jr=>un!==jr)),De==null||De(un)},unstyled:o,disabled:z,...Gr("pill"),children:(Ya==null?void 0:Ya.label)||un},`${un}-${Ar}`)});A.useEffect(()=>{x&&an.selectFirstOption()},[x,Yt]),A.useEffect(()=>{An.forEach(un=>{`${un}`in tn&&(en.current[`${un}`]=tn[`${un}`])})},[tn,An]);const Kr=y.jsx(Cn.ClearButton,{...Ae,onClear:()=>{Fe==null||Fe(),Jn([]),ir("")}}),Cr=Sne({data:Dn,value:An}),hn=Ke&&An.length>0&&!z&&!U,fi=hn?{paddingInlineEnd:kT[c]??kT.sm}:void 0;return y.jsxs(y.Fragment,{children:[y.jsxs(Cn,{store:an,classNames:Yr,styles:Aa,unstyled:o,size:c,readOnly:U,__staticSelector:"MultiSelect",attributes:kn,onOptionSubmit:un=>{O==null||O(un),ut&&ir(""),an.updateSelectedOptionIndex("selected"),An.includes(tn[`${un}`].value)?(Jn(An.filter(Ar=>Ar!==tn[`${un}`].value)),De==null||De(tn[`${un}`].value)):An.lengthSe?an.openDropdown():an.toggleDropdown(),"data-expanded":an.dropdownOpened||void 0,id:at,required:pn,mod:on,attributes:kn,children:y.jsxs(fl.Group,{attributes:kn,disabled:z,unstyled:o,...Gr("pillsList",{style:fi}),children:[_o,y.jsx(Cn.EventsTarget,{autoComplete:Nt,withExpandedAttribute:!0,children:y.jsx(wu.Field,{...Tn,id:at,placeholder:fn,type:!Se&&!fn?"hidden":"visible",...Gr("inputField"),unstyled:o,onFocus:un=>{D==null||D(un),jt&&Se&&an.openDropdown()},onBlur:un=>{$==null||$(un),an.closeDropdown(),ir("")},onKeyDown:Oa,value:Yt,onChange:un=>{ir(un.currentTarget.value),Se&&an.openDropdown(),x&&an.selectFirstOption()},disabled:z,readOnly:U||!Se,pointer:!Se})})]})})}),y.jsx(Oy,{data:We?Cr:Dn,hidden:U||z,filter:M,search:Yt,limit:N,hiddenWhenEmpty:!Pe,withScrollArea:q,maxDropdownHeight:P,filterOptions:Se,value:An,checkIconPosition:Ye,withCheckIcon:ce,withAlignedLabels:Be,nothingFoundMessage:Pe,unstyled:o,labelId:Oe?`${at}-label`:void 0,"aria-label":Oe?void 0:$n["aria-label"],renderOption:nn,scrollAreaProps:bn})]}),y.jsx(Cn.HiddenInput,{name:Qe,valuesDivider:En,value:An,form:ie,disabled:z,...rn})]})});Gy.classes={...Gi.classes,...Cn.classes};Gy.displayName="@mantine/core/MultiSelect";var cB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Ane={withCloseButton:!0},fB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Wt(n),"--notification-color":t?lt(t,e):void 0}}),Yy=Re(e=>{const n=be("Notification",Ane,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:c,icon:f,children:h,onClose:d,closeButtonProps:p,classNames:v,style:b,styles:w,unstyled:k,vars:_,mod:C,loaderProps:x,role:E,attributes:O,...j}=n,M=Xe({name:"Notification",classes:cB,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:O,vars:_,varsResolver:fB});return y.jsxs(me,{...M("root"),mod:[{"data-with-icon":!!f||a,"data-with-border":l},C],role:E||"alert",...j,children:[f&&!a&&y.jsx("div",{...M("icon"),children:f}),a&&y.jsx(bi,{size:28,color:i,...M("loader"),...x}),y.jsxs("div",{...M("body"),children:[c&&y.jsx("div",{...M("title"),children:c}),y.jsx(me,{...M("description"),mod:{"data-with-title":!!c},children:h})]}),o&&y.jsx(ml,{iconSize:16,color:"gray",...p,unstyled:k,onClick:N=>{var q;(q=p==null?void 0:p.onClick)==null||q.call(p,N),d==null||d()},...M("closeButton")})]})});Yy.classes=cB;Yy.varsResolver=fB;Yy.displayName="@mantine/core/Notification";function dB(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+xT("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function ST(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=BC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,c=parseFloat("0."+(o||"0")),f=o.length<=n?"0."+o:c.toFixed(n),h=f.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=pB(h[1]||"",n,t),v=l?"-":"",b=i?".":"";return""+v+d+b+p}function au(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var gB=One(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),Dne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function Rne(e,n,t){return Math.min(Math.max(e,n),t)}function Ok(e){return Math.max(e.selectionStart,e.selectionEnd)}function Pne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Nne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $ne(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function zne(e,n,t,i,r,a,o){o===void 0&&(o=$ne);var l=r.findIndex(function(E){return E}),c=e.slice(0,l);!n&&!t.startsWith(c)&&(n=c,t=c+t,i=i+c.length);for(var f=t.length,h=e.length,d={},p=new Array(f),v=0;v0&&p[_]===-1;)_--;var x=_===-1||p[_]===-1?0:p[_]+1;return x>C?C:i-x=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function Lne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||jL||d>e.length-o.length)&&(P=d),e=e.substring(0,P),e=qne(x?"-"+e:e,r),e=(e.match(Hne(b))||[]).join("");var H=e.indexOf(b);e=e.replace(new RegExp(mB(b),"g"),function($,B){return B===H?".":""});var G=BC(e,r),U=G.beforeDecimal,z=G.afterDecimal,D=G.addNegation;return f.end-f.startMath.abs(E)?"h":"v";if("touches"in w&&M==="h"&&O.type==="range")return!1;var N=window.getSelection(),q=N&&N.anchorNode,R=q?q===O||q.contains(O):!1;if(R)return!1;var L=sT(M,O);if(!L)return!0;if(L?j=M:(j=M==="v"?"h":"v",L=sT(M,O)),!L)return!1;if(!i.current&&"changedTouches"in w&&(x||E)&&(i.current=j),!j)return!0;var F=i.current||j;return KJ(F,k,w,F==="h"?x:E)},[]),c=A.useCallback(function(w){var k=w;if(!(!Ec.length||Ec[Ec.length-1]!==a)){var _="deltaY"in k?lT(k):Fv(k),C=n.current.filter(function(j){return j.name===k.type&&(j.target===k.target||k.target===j.shadowParent)&&XJ(j.delta,_)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var x=(o.current.shards||[]).map(uT).filter(Boolean).filter(function(j){return j.contains(k.target)}),E=x.length>0?l(k,x[0]):!o.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),f=A.useCallback(function(w,k,_,C){var x={name:w,delta:k,target:_,should:C,shadowParent:eee(_)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(E){return E!==x})},1)},[]),h=A.useCallback(function(w){t.current=Fv(w),i.current=void 0},[]),d=A.useCallback(function(w){f(w.type,lT(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){f(w.type,Fv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return Ec.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Oc),document.addEventListener("touchmove",c,Oc),document.addEventListener("touchstart",h,Oc),function(){Ec=Ec.filter(function(w){return w!==a}),document.removeEventListener("wheel",c,Oc),document.removeEventListener("touchmove",c,Oc),document.removeEventListener("touchstart",h,Oc)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:ZJ(r)}):null,v?A.createElement(qJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eee(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const nee=EJ(VL,JJ);var yu=A.forwardRef(function(e,n){return A.createElement(_y,ao({},e,{ref:n,sideCar:nee}))});yu.classNames=_y.classNames;function XL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:c,returnFocus:f,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:b,zIndex:w,shadow:k,padding:_,__vars:C,unstyled:x,removeScrollProps:E,...j}){const{_id:O,titleMounted:M,bodyMounted:N,shouldLockScroll:q,setTitleMounted:R,setBodyMounted:L}=bJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:c,onClose:t,returnFocus:f}),{key:F,...Y}=E||{};return g.jsx(ml,{...p,withinPortal:d,children:g.jsx(gJ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${O}-title`,getBodyId:()=>`${O}-body`,titleMounted:M,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:c,zIndex:w,unstyled:x},children:g.jsx(yu,{enabled:q&&v,...Y,children:g.jsx(he,{...j,id:O,__vars:{...C,"--mb-z-index":(w||Sa("modal")).toString(),"--mb-shadow":L6(k),"--mb-padding":Vt(_)},children:b})},F)})})}XL.displayName="@mantine/core/ModalBase";function tee(){const e=gs();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var tf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function ZL({className:e,...n}){const t=tee(),i=gs();return g.jsx(he,{id:t,className:pn({[tf.body]:!i.unstyled},e),...n})}ZL.displayName="@mantine/core/ModalBaseBody";function QL({className:e,onClick:n,...t}){const i=gs();return g.jsx(bl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:pn({[tf.close]:!i.unstyled},e),unstyled:i.unstyled})}QL.displayName="@mantine/core/ModalBaseCloseButton";function JL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=gs();return g.jsx(cs,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var c,f,h;(c=l.onExitTransitionEnd)==null||c.call(l),(h=(f=l.transitionProps)==null?void 0:f.onExited)==null||h.call(f)},onEntered:()=>{var c,f,h;(c=l.onEnterTransitionEnd)==null||c.call(l),(h=(f=l.transitionProps)==null?void 0:f.onEntered)==null||h.call(f)},...e,children:c=>g.jsx("div",{...t,className:pn({[tf.inner]:!l.unstyled},t.className),children:g.jsx(by,{active:l.opened&&l.trapFocus,innerRef:a,children:g.jsx(Dt,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,c],className:pn({[tf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}JL.displayName="@mantine/core/ModalBaseContent";function eI({className:e,...n}){const t=gs();return g.jsx(he,{component:"header",className:pn({[tf.header]:!t.unstyled},e),...n})}eI.displayName="@mantine/core/ModalBaseHeader";const iee={duration:200,timingFunction:"ease",transition:"fade"};function ree(e){const n=gs();return{...iee,...n.transitionProps,...e}}function nI({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=gs(),o=ree(n);return g.jsx(cs,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>g.jsx(Xm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e==null||e(c),a.closeOnClickOutside&&a.onClose()},...r})})}nI.displayName="@mantine/core/ModalBaseOverlay";function aee(){const e=gs();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function tI({className:e,...n}){const t=aee(),i=gs();return g.jsx(he,{component:"h2",className:pn({[tf.title]:!i.unstyled},e),id:t,...n})}tI.displayName="@mantine/core/ModalBaseTitle";function oee({children:e}){return g.jsx(g.Fragment,{children:e})}const iI=A.createContext({size:"sm"}),rI=De(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,c=A.use(iI),{resolvedClassNames:f,resolvedStyles:h}=Wi({classNames:a,styles:o,props:n});return g.jsx(bl,{variant:i||"transparent",size:t||(c==null?void 0:c.size)||"sm",classNames:f,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});rI.displayName="@mantine/core/InputClearButton";const see={xs:7,sm:8,md:10,lg:12,xl:15};function lee({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?g.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:see[r]},children:[o,t||i]}):t===null?null:t||o||i}const Pu=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var ja={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const aI=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),Zm=De(e=>{const n=be("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,__inheritStyles:f=!0,attributes:h,...d}=be("InputDescription",null,n),p=A.use(Pu),v=Xe({name:["InputWrapper",c],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:aI});return g.jsx(he,{component:"p",...(f&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Zm.classes=ja;Zm.varsResolver=aI;Zm.displayName="@mantine/core/InputDescription";const oI=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),Qm=De(e=>{const n=be("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,__staticSelector:f,__inheritStyles:h=!0,...d}=n,p=Xe({name:["InputWrapper",f],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,rootSelector:"error",vars:l,varsResolver:oI}),v=A.use(Pu);return g.jsx(he,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Qm.classes=ja;Qm.varsResolver=oI;Qm.displayName="@mantine/core/InputError";const uee={labelElement:"label"},sI=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0}}),Jm=De(e=>{const n=be("InputLabel",uee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:c,required:f,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:b,attributes:w,...k}=n,_=Xe({name:["InputWrapper",v],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:sI}),C=A.use(Pu),x=(C==null?void 0:C.getStyles)||_;return g.jsxs(he,{...x("label",C!=null&&C.getStyles?{className:i,style:r}:void 0),component:c,htmlFor:c==="label"?h:void 0,mod:[{required:f},b],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...k,children:[p,f&&g.jsx("span",{...x("required"),"aria-hidden":!0,children:" *"})]})});Jm.classes=ja;Jm.varsResolver=sI;Jm.displayName="@mantine/core/InputLabel";const uC=De(e=>{const n=be("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,error:f,mod:h,attributes:d,...p}=n;return g.jsx(he,{...Xe({name:["InputPlaceholder",c],props:n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!f},h],component:"span",...p})});uC.classes=ja;uC.displayName="@mantine/core/InputPlaceholder";function cee(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const fee={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},lI=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),xy=De(e=>{const n=be("InputWrapper",fee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,variant:f,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:C,labelElement:x,children:E,withAsterisk:j,id:O,required:M,__stylesApiProps:N,mod:q,attributes:R,...L}=n,F=Xe({name:["InputWrapper",h],props:N||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:lI}),Y={size:c,variant:f,__staticSelector:h},V=Vi(O),$=typeof j=="boolean"?j:M,P=(C==null?void 0:C.id)||`${V}-error`,I=(_==null?void 0:_.id)||`${V}-description`,H=V,U=!!b&&typeof b!="boolean",D=!!w,W=`${U?P:""} ${D?I:""}`,G=W.trim().length>0?W.trim():void 0,z=(k==null?void 0:k.id)||`${V}-label`,X=v&&g.jsx(Jm,{labelElement:x,id:z,htmlFor:H,required:$,...Y,...k,children:v},"label"),ee=D&&g.jsx(Zm,{..._,...Y,size:(_==null?void 0:_.size)||Y.size,id:(_==null?void 0:_.id)||I,children:w},"description"),re=g.jsx(A.Fragment,{children:d(E)},"input"),le=U&&A.createElement(Qm,{...C,...Y,size:(C==null?void 0:C.size)||Y.size,key:"error",id:(C==null?void 0:C.id)||P},b),ye=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return le;default:return null}});return g.jsx(Pu,{value:{getStyles:F,describedBy:G,inputId:H,labelId:z,...cee(p,{hasDescription:D,hasError:U})},children:g.jsx(he,{variant:f,size:c,mod:[{error:!!b},q],id:x==="label"?void 0:O,...F("root"),...L,children:ye})})});xy.classes=ja;xy.varsResolver=lI;xy.displayName="@mantine/core/InputWrapper";const dee={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},uI=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Bn(n.size,"input-height"),"--input-fz":ri(n.size),"--input-radius":n.radius===void 0?void 0:Yt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?me(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?me(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Bn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Gt=Ai(e=>{const n=be("Input",dee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:c,__stylesApiProps:f,size:h,wrapperProps:d,error:p,disabled:v,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:C,rightSectionWidth:x,rightSectionPointerEvents:E,leftSectionPointerEvents:j,variant:O,vars:M,pointer:N,multiline:q,radius:R,id:L,withAria:F,withErrorStyles:Y,mod:V,inputSize:$,attributes:P,__clearSection:I,__clearable:H,__clearSectionMode:U,__defaultRightSection:D,loading:W,loadingPosition:G,rootRef:z,...X}=n,{styleProps:ee,rest:re}=Du(X),le=A.use(Pu),ye={offsetBottom:le==null?void 0:le.offsetBottom,offsetTop:le==null?void 0:le.offsetTop},ae=Xe({name:["Input",c],props:f||n,classes:ja,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:ye,rootSelector:"wrapper",vars:M,varsResolver:uI}),ue=F?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":le==null?void 0:le.describedBy,id:(le==null?void 0:le.inputId)||L}:{},Se=W?g.jsx(ai,{size:G==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=W&&G==="left"?Se:b,Le=lee({__clearable:H,__clearSection:I,rightSection:W&&G==="right"?Se:_,__defaultRightSection:D,size:h,__clearSectionMode:U});return g.jsx(iI,{value:{size:h||"sm"},children:g.jsxs(he,{ref:z,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&Y,pointer:N,disabled:v,multiline:q,"data-with-right-section":!!Le,"data-with-left-section":!!ne},V],variant:O,size:h,children:[ne&&g.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),g.jsx(he,{component:"input",...re,...ue,required:l,mod:{disabled:v,error:!!p&&Y},variant:O,__size:$,...ae("input")}),Le&&g.jsx("div",{...C,"data-position":"right",...ae("section",{className:C==null?void 0:C.className,style:C==null?void 0:C.style}),children:Le})]})})});Gt.classes=ja;Gt.varsResolver=uI;Gt.Wrapper=xy;Gt.Label=Jm;Gt.Error=Qm;Gt.Description=Zm;Gt.Placeholder=uC;Gt.ClearButton=rI;Gt.displayName="@mantine/core/Input";function cI(e,n,t){const i=be(e,n,t),{label:r,description:a,error:o,required:l,classNames:c,styles:f,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:C,size:x,style:E,inputContainer:j,inputWrapperOrder:O,withAsterisk:M,variant:N,vars:q,mod:R,attributes:L,...F}=i,{styleProps:Y,rest:V}=Du(F),$={label:r,description:a,error:o,required:l,classNames:c,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:f,size:x,style:E,inputContainer:j,inputWrapperOrder:O,withAsterisk:M,variant:N,id:C,mod:R,attributes:L,..._};return{...V,classNames:c,styles:f,unstyled:d,wrapperProps:{...$,...Y},inputProps:{required:l,classNames:c,styles:f,unstyled:d,size:x,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:C,attributes:L}}}const hee={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ri=Ai(e=>{const{inputProps:n,wrapperProps:t,...i}=cI("InputBase",hee,e);return g.jsx(Gt.Wrapper,{...t,children:g.jsx(Gt,{...n,...i})})});Ri.classes={...Gt.classes,...Gt.Wrapper.classes};Ri.displayName="@mantine/core/InputBase";function Bg({style:e,size:n=16,...t}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:me(n),height:me(n),display:"block"},...t,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Bg.displayName="@mantine/core/AccordionChevron";var fI={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const dI=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({color:t||e.primaryColor,theme:e,variant:i||"light",autoContrast:r});return{root:{"--alert-radius":n===void 0?void 0:Yt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},bu=De(e=>{const n=be("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:c,color:f,title:h,children:d,id:p,icon:v,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:C,role:x,attributes:E,...j}=n,O=Xe({name:"Alert",classes:fI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:dI}),M=Vi(p),N=h&&`${M}-title`||void 0,q=`${M}-body`;return g.jsx(he,{id:M,...O("root",{variant:_}),variant:_,...j,role:x||"alert","aria-describedby":d?q:void 0,"aria-labelledby":h?N:void 0,children:g.jsxs("div",{...O("wrapper"),children:[v&&g.jsx("div",{...O("icon"),children:v}),g.jsxs("div",{...O("body"),children:[h&&g.jsx("div",{...O("title"),"data-with-close-button":b||void 0,children:g.jsx("span",{id:N,...O("label"),children:h})}),d&&g.jsx("div",{id:q,...O("message"),"data-variant":_,children:d})]}),b&&g.jsx(bl,{...O("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});bu.classes=fI;bu.varsResolver=dI;bu.displayName="@mantine/core/Alert";var hI={root:"m_b6d8b162"};function mee(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const pee={inherit:!1},mI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ri(r),"--text-lh":OK(r),"--text-gradient":n==="gradient"?vS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),xe=Ai(e=>{const n=be("Text",pee,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:c,vars:f,className:h,style:d,classNames:p,styles:v,unstyled:b,variant:w,mod:k,size:_,attributes:C,...x}=n;return g.jsx(he,{...Xe({name:["Text",c],props:n,classes:hI,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:C,vars:f,varsResolver:mI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":mee(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...x})});xe.classes=hI;xe.varsResolver=mI;xe.displayName="@mantine/core/Text";var pI={root:"m_849cf0da"};const vee={underline:"hover"},Sy=Ai(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",vee,e);return g.jsx(xe,{component:"a",className:pn({[pI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});Sy.classes=pI;Sy.displayName="@mantine/core/Anchor";const[gee,If]=Xr("AppShell was not found in tree");var wl={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const cC=De(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellAside",null,e),d=If();return d.disabled?null:g.jsx(he,{component:"aside",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("aside",{className:pn({[yu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});cC.classes=wl;cC.displayName="@mantine/core/AppShellAside";const fC=De(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellFooter",null,e),d=If();return d.disabled?null:g.jsx(he,{component:"footer",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("footer",{className:pn({[yu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=c??d.zIndex)==null?void 0:p.toString()}})});fC.classes=wl;fC.displayName="@mantine/core/AppShellFooter";const dC=De(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellHeader",null,e),d=If();return d.disabled?null:g.jsx(he,{component:"header",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("header",{className:pn({[yu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=c??d.zIndex)==null?void 0:p.toString()}})});dC.classes=wl;dC.displayName="@mantine/core/AppShellHeader";const hC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return g.jsx(he,{component:"main",...If().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});hC.classes=wl;hC.displayName="@mantine/core/AppShellMain";const mC=De(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:c,mod:f,...h}=be("AppShellNavbar",null,e),d=If();return d.disabled?null:g.jsx(he,{component:"nav",mod:[{"with-border":l??d.withBorder},f],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});mC.classes=wl;mC.displayName="@mantine/core/AppShellNavbar";const pC=Ai(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...c}=be("AppShellSection",null,e),f=If();return g.jsx(he,{mod:[{grow:o},l],...f.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...c})});pC.classes=wl;pC.displayName="@mantine/core/AppShellSection";function ep(e){return typeof e=="object"?e.base:e}function np(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function tp(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function yee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),np(o)){const p=me(ep(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(tp(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=me(o.base),e["--app-shell-aside-offset"]=me(o.base)),Pt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=me(o[p]),n[p]["--app-shell-aside-offset"]=me(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=c,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=I6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=c,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function bee({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),np(r)){const l=me(ep(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}tp(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=me(r.base),o&&(e["--app-shell-footer-offset"]=me(r.base))),Pt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=me(r[l]),o&&(n[l]["--app-shell-footer-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function wee({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),np(r)){const l=me(ep(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}tp(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=me(r.base),o&&(e["--app-shell-header-offset"]=me(r.base))),Pt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=me(r[l]),o&&(n[l]["--app-shell-header-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function kee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var f,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((f=i==null?void 0:i.collapsed)!=null&&f.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),np(o)){const p=me(ep(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(tp(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=me(o.base),e["--app-shell-navbar-offset"]=me(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=me(o.base))),Pt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=me(o[p]),n[p]["--app-shell-navbar-offset"]=me(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=me(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=c,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=I6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=c}}function Ak(e){return Number(e)===0?"0px":Vt(e)}function _ee({padding:e,baseStyles:n,minMediaStyles:t}){np(e)&&(n["--app-shell-padding"]=Ak(ep(e))),tp(e)&&(e.base&&(n["--app-shell-padding"]=Ak(e.base)),Pt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=Ak(e[i]))}))}function xee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},c={},f={};o==="static"&&(f["--app-shell-main-grid-column"]="1 / -1",f["--app-shell-main-grid-row"]="2"),kee({baseStyles:f,minMediaStyles:l,maxMediaStyles:c,navbar:e,theme:a,mode:o}),yee({baseStyles:f,minMediaStyles:l,maxMediaStyles:c,aside:i,theme:a,mode:o}),wee({baseStyles:f,minMediaStyles:l,header:n,mode:o}),bee({baseStyles:f,minMediaStyles:l,footer:t,mode:o}),_ee({baseStyles:f,minMediaStyles:l,padding:r});const h=Kh(Pt(l),a.breakpoints).map(p=>({query:`(min-width: ${Tg(p.px)})`,styles:l[p.value]})),d=Kh(Pt(c),a.breakpoints).map(p=>({query:`(max-width: ${Tg(p.px)})`,styles:c[p.value]}));return{baseStyles:f,media:[...h,...d]}}function See({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ui(),c=_o(),{media:f,baseStyles:h}=xee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return g.jsx(Nf,{media:f,styles:h,selector:o||c.cssVariablesSelector})}function Cee({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return xz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),ps(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const Aee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Sa("app"),mode:"fixed"},vI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),xr=De(e=>{const n=be("AppShell",Aee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:c,withBorder:f,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:b,layout:w,disabled:k,aside:_,footer:C,offsetScrollbars:x=!0,mode:E,mod:j,attributes:O,id:M,...N}=n,q=Xe({name:"AppShell",classes:wl,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:vI}),R=Cee({disabled:k,transitionDuration:d}),L=Vi(M);return g.jsxs(gee,{value:{getStyles:q,withBorder:f,zIndex:b,disabled:k,offsetScrollbars:x,mode:E},children:[g.jsx(See,{navbar:c,header:v,aside:_,footer:C,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),g.jsx(he,{...q("root"),id:L,mod:[{resizing:R,layout:w,disabled:k,mode:E},j],...N})]})});xr.classes=wl;xr.varsResolver=vI;xr.displayName="@mantine/core/AppShell";xr.Navbar=mC;xr.Header=dC;xr.Main=hC;xr.Aside=cC;xr.Footer=fC;xr.Section=pC;function gI(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>gI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function Cy(e){return e?e.map(n=>gI(n)):[]}function ip(e){return e.reduce((n,t)=>"group"in t?{...n,...ip(t.items)}:(n[`${t.value}`]=t,n),{})}var cr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const jee={error:null},yI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Bn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?lt(t,e):void 0}}),Ay=De(e=>{const n=be("ComboboxChevron",jee,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:c,vars:f,attributes:h,mod:d,...p}=n,v=Xe({name:"ComboboxChevron",classes:cr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:c,vars:f,varsResolver:yI,attributes:h,rootSelector:"chevron"});return g.jsx(he,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:g.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});Ay.classes=cr;Ay.varsResolver=yI;Ay.displayName="@mantine/core/ComboboxChevron";const[Oee,Oa]=Xr("Combobox component was not found in tree");function bI({onMouseDown:e,onClick:n,onClear:t,...i}){return g.jsx(Gt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}bI.displayName="@mantine/core/ComboboxClearButton";const vC=De(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=Oa();return g.jsx(On.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});vC.classes=cr;vC.displayName="@mantine/core/ComboboxDropdown";const Eee={refProp:"ref"},wI=De(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",Eee,e);if(Oa(),!$6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return g.jsx(On.Target,{ref:i,refProp:t,children:n})});wI.displayName="@mantine/core/ComboboxDropdownTarget";const gC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return g.jsx(he,{...Oa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});gC.classes=cr;gC.displayName="@mantine/core/ComboboxEmpty";function yC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Oa(),[c,f]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?f(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?f(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),f(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const Tee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},kI=De(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:c,...f}=be("ComboboxEventsTarget",Tee,e),h=Mu(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Oa();return A.cloneElement(h,{...yC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f,[t]:Kt(c,d.store.targetRef,uy(h))})});kI.displayName="@mantine/core/ComboboxEventsTarget";const bC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return g.jsx(he,{...Oa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});bC.classes=cr;bC.displayName="@mantine/core/ComboboxFooter";const wC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:c,...f}=be("ComboboxGroup",null,e),h=Oa(),d=Vi(c);return g.jsxs(he,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...f,children:[l&&g.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});wC.classes=cr;wC.displayName="@mantine/core/ComboboxGroup";const kC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return g.jsx(he,{...Oa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});kC.classes=cr;kC.displayName="@mantine/core/ComboboxHeader";function _I({value:e,valuesDivider:n=",",...t}){return g.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}_I.displayName="@mantine/core/ComboboxHiddenInput";const _C=De(e=>{const n=be("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:c,active:f,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:b,...w}=n,k=Oa(),_=A.useId(),C=c||_;return g.jsx(he,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:C,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":p,"combobox-selected":v},b],role:"option",onClick:x=>{var E;p?x.preventDefault():((E=k.onOptionSubmit)==null||E.call(k,n.value,n),l==null||l(x))},onMouseDown:x=>{x.preventDefault(),h==null||h(x)},onMouseOver:x=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(x)}})});_C.classes=cr;_C.displayName="@mantine/core/ComboboxOption";const xC=De(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...c}=be("ComboboxOptions",null,e),f=Oa(),h=Vi(a);return A.useEffect(()=>{f.store.setListId(h)},[h]),g.jsx(he,{...f.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...c,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});xC.classes=cr;xC.displayName="@mantine/core/ComboboxOptions";const Mee={withAriaAttributes:!0,withKeyboardNavigation:!0},SC=De(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:c,size:f,ref:h,...d}=be("ComboboxSearch",Mee,e),p=Oa(),v=p.getStyles("search"),b=yC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return g.jsx(Gt,{ref:Kt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:f||p.size,...b,...d,__staticSelector:"Combobox"})});SC.classes=cr;SC.displayName="@mantine/core/ComboboxSearch";const Dee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},xI=De(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:c,...f}=be("ComboboxTarget",Dee,e),h=Mu(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Oa(),p=A.cloneElement(h,{...yC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...f});return g.jsx(On.Target,{refProp:t,ref:Kt(c,d.store.targetRef),children:p})});xI.displayName="@mantine/core/ComboboxTarget";function Ree(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function Pee(e,n,t){for(let i=e+1;i{l||(c(!0),r==null||r(P))},[c,r,l]),_=A.useCallback((P="unknown")=>{l&&(c(!1),i==null||i(P))},[c,i,l]),C=A.useCallback((P="unknown")=>{l?_(P):k(P)},[_,k,l]),x=A.useCallback(()=>{const P=Wo(p.current),I=pg(`#${f.current} [data-combobox-selected]`,P);I==null||I.removeAttribute("data-combobox-selected"),I==null||I.removeAttribute("aria-selected")},[]),E=A.useCallback(P=>{const I=Wo(p.current),H=pg(`#${f.current}`,I),U=H?Ko("[data-combobox-option]",H):null;if(!U)return null;const D=P>=U.length?0:P<0?U.length-1:P;return h.current=D,U!=null&&U[D]&&!U[D].hasAttribute("data-combobox-disabled")?(x(),U[D].setAttribute("data-combobox-selected","true"),U[D].setAttribute("aria-selected","true"),U[D].scrollIntoView({block:"nearest",behavior:o}),U[D].id):null},[o,x]),j=A.useCallback(()=>{const P=Wo(p.current),I=pg(`#${f.current} [data-combobox-active]`,P);return E(I?Ko(`#${f.current} [data-combobox-option]`,P).findIndex(H=>H===I):0)},[E]),O=A.useCallback(()=>{const P=Wo(p.current),I=Ko(`#${f.current} [data-combobox-option]`,P);return E(Pee(h.current,I,a))},[E,a]),M=A.useCallback(()=>{const P=Wo(p.current),I=Ko(`#${f.current} [data-combobox-option]`,P);return E(Ree(h.current,I,a))},[E,a]),N=A.useCallback(()=>{const P=Wo(p.current);return E(Nee(Ko(`#${f.current} [data-combobox-option]`,P)))},[E]),q=A.useCallback((P="selected",I)=>{var H;if(typeof P=="number"){h.current=P;const U=Wo(p.current),D=Ko(`#${f.current} [data-combobox-option]`,U);I!=null&&I.scrollIntoView&&((H=D[P])==null||H.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var G;const U=Wo(p.current),D=Ko(`#${f.current} [data-combobox-option]`,U),W=D.findIndex(z=>z.hasAttribute(`data-combobox-${P}`));h.current=W,I!=null&&I.scrollIntoView&&((G=D[W])==null||G.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=A.useCallback(()=>{h.current=-1,x()},[x]),L=A.useCallback(()=>{var I,H;const P=Wo(p.current);(H=(I=Ko(`#${f.current} [data-combobox-option]`,P))==null?void 0:I[h.current])==null||H.click()},[]),F=A.useCallback(P=>{f.current=P},[]),Y=A.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),V=A.useCallback(()=>{b.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),$=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:C,selectedOptionIndex:h.current,getSelectedOptionIndex:$,selectOption:E,selectFirstOption:N,selectActiveOption:j,selectNextOption:O,selectPreviousOption:M,resetSelectedOption:R,updateSelectedOptionIndex:q,listId:f.current,setListId:F,clickSelectedOption:L,searchRef:d,focusSearchInput:Y,targetRef:p,focusTarget:V}}const $ee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},SI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ri(n),"--combobox-option-padding":Bn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:me(t),"--combobox-option-fz":ri(n),"--combobox-option-padding":Bn(n,"combobox-option-padding")}}),An=e=>{const n=be("Combobox",$ee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:c,onClose:f,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:b,attributes:w,...k}=n,_=Bf(),C=o||_,x=Xe({name:v||"Combobox",classes:cr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:SI}),E=()=>{f==null||f(),C.closeDropdown()};return g.jsx(Oee,{value:{getStyles:x,store:C,onOptionSubmit:c,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:g.jsx(On,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:j=>!j&&E(),withRoles:!1,unstyled:r,children:a})})},zee=e=>e;An.extend=zee;An.classes=cr;An.varsResolver=SI;An.displayName="@mantine/core/Combobox";An.Target=xI;An.Dropdown=vC;An.Options=xC;An.Option=_C;An.Search=SC;An.Empty=gC;An.Chevron=Ay;An.Footer=bC;An.Header=kC;An.EventsTarget=kI;An.DropdownTarget=wI;An.Group=wC;An.ClearButton=bI;An.HiddenInput=_I;function Lee({children:e,role:n}){const t=A.use(Pu);return t?g.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):g.jsx(g.Fragment,{children:e})}const CC=A.createContext(null),Iee={hiddenInputValuesSeparator:","},AC=fy((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:c,hiddenInputValuesSeparator:f,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=be("CheckboxGroup",Iee,e),[b,w]=Ci({value:n,defaultValue:t,finalValue:[],onChange:i}),k=x=>{const E=typeof x=="string"?x:x.currentTarget.value;if(l)return;const j=b.includes(E);!j&&d&&b.length>=d||w(j?b.filter(O=>O!==E):[...b,E])},_=x=>{if(p)return!0;if(!d)return!1;const E=b.includes(x),j=b.length>=d;return!E&&j},C=b.join(f);return g.jsx(CC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:g.jsxs(Gt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[g.jsx(Lee,{role:"group",children:o}),g.jsx("input",{type:"hidden",name:c,value:C,...h})]})})}));AC.classes=Gt.Wrapper.classes;AC.displayName="@mantine/core/CheckboxGroup";var CI={card:"m_26775b0a"};const AI=A.createContext(null),Bee={withBorder:!0},jI=(e,{radius:n})=>({card:{"--card-radius":Yt(n)}}),jy=De(e=>{const n=be("CheckboxCard",Bee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:c,mod:f,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:b,attributes:w,...k}=n,_=Xe({name:"CheckboxCard",classes:CI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:jI,rootSelector:"card"}),C=A.use(CC),[x,E]=Ci({value:typeof c=="boolean"?c:C?C.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return g.jsx(AI,{value:{checked:x},children:g.jsx(Et,{mod:[{"with-border":h,checked:x},f],..._("card"),...k,role:"checkbox","aria-checked":x,onClick:j=>{p==null||p(j),C==null||C.onChange(d||""),E(!x)}})})});jy.displayName="@mantine/core/CheckboxCard";jy.classes=CI;jy.varsResolver=jI;function jC({size:e,style:n,...t}){return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:me(e),height:me(e),...n}:n,"aria-hidden":!0,...t,children:g.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function OI({indeterminate:e,...n}){return e?g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:g.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):g.jsx(jC,{...n})}var EI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Fee={icon:OI,variant:"filled",radius:"sm"},TI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Bn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Yt(n),"--checkbox-color":a==="outline"?c:lt(t,e),"--checkbox-icon-color":r?lt(r,e):Gm(o,e)?Pf({color:t,theme:e,autoContrast:o}):void 0}}},Oy=De(e=>{const n=be("CheckboxIndicator",Fee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:c,indeterminate:f,radius:h,color:d,iconColor:p,autoContrast:v,checked:b,mod:w,variant:k,disabled:_,attributes:C,...x}=n,E=Xe({name:"CheckboxIndicator",classes:EI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:TI,rootSelector:"indicator"}),j=A.use(AI),O=typeof b=="boolean"||typeof f=="boolean"?b||f:(j==null?void 0:j.checked)||!1;return g.jsx(he,{...E("indicator",{variant:k}),variant:k,mod:[{checked:O,disabled:_},w],...x,children:g.jsx(c,{indeterminate:f,...E("icon")})})});Oy.displayName="@mantine/core/CheckboxIndicator";Oy.classes=EI;Oy.varsResolver=TI;var MI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const qee=MI;function DI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:c,id:f,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:C,mod:x,attributes:E,...j}){const O=Xe({name:e,props:n,className:t,style:_,classes:MI,classNames:i,styles:r,unstyled:a,attributes:E});return g.jsx(he,{...O("root"),__vars:{"--label-fz":ri(p),"--label-lh":Bn(p,"label-lh")},mod:[{"label-position":v},x],variant:k,size:p,...j,children:g.jsxs(he,{component:b,htmlFor:b==="label"?f:void 0,...O("body"),children:[o,g.jsxs("div",{...O("labelWrapper"),"data-disabled":h||void 0,children:[l&&g.jsx(he,{component:w,htmlFor:w==="label"?f:void 0,...O("label"),"data-disabled":h||void 0,children:l}),c&&g.jsx(Gt.Description,{size:p,__inheritStyles:!1,...O("description"),children:c}),d&&typeof d!="boolean"&&g.jsx(Gt.Error,{size:p,__inheritStyles:!1,...O("error"),children:d})]})]})})}DI.displayName="@mantine/core/InlineInput";var RI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Hee={labelPosition:"right",icon:OI,withErrorStyles:!0,variant:"filled",radius:"sm"},PI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=vs({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Bn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Yt(n),"--checkbox-color":a==="outline"?c:lt(t,e),"--checkbox-icon-color":r?lt(r,e):Gm(o,e)?Pf({color:t,theme:e,autoContrast:o}):void 0}}},vo=De(e=>{var le;const n=be("Checkbox",Hee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,label:f,id:h,size:d,radius:p,wrapperProps:v,checked:b,labelPosition:w,description:k,error:_,disabled:C,variant:x,indeterminate:E,icon:j,rootRef:O,iconColor:M,onChange:N,autoContrast:q,mod:R,attributes:L,readOnly:F,onClick:Y,withErrorStyles:V,ref:$,...P}=n,I=A.useRef(null),H=A.use(CC),U=d||(H==null?void 0:H.size),D=Xe({name:"Checkbox",props:n,classes:RI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:PI}),{styleProps:W,rest:G}=Du(P),z=Vi(h),X={checked:(H==null?void 0:H.value.includes(G.value))??b,onChange:ye=>{H==null||H.onChange(ye),N==null||N(ye)}},ee=((le=H==null?void 0:H.isDisabled)==null?void 0:le.call(H,G.value))??!1,re=C||ee;return A.useEffect(()=>{I.current&&(I.current.indeterminate=E||!1,E?I.current.setAttribute("data-indeterminate","true"):I.current.removeAttribute("data-indeterminate"))},[E]),g.jsx(DI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:z,size:U,labelPosition:w,label:f,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||b||void 0,variant:x,ref:O,mod:R,attributes:L,inert:G.inert,...W,...v,children:g.jsxs(he,{...D("inner"),mod:{"data-label-position":w},children:[g.jsx(he,{component:"input",id:z,ref:Kt(I,$),mod:{error:!!_},...D("input",{focusable:!0,variant:x}),...G,...X,disabled:re,inert:G.inert,type:"checkbox",onClick:ye=>{F&&ye.preventDefault(),Y==null||Y(ye)}}),g.jsx(j,{indeterminate:E,...D("icon")})]})})});vo.classes={...RI,...qee};vo.varsResolver=PI;vo.displayName="@mantine/core/Checkbox";vo.Group=AC;vo.Indicator=Oy;vo.Card=jy;function wu(e){return"group"in e}function NI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function $I(e,n=new Set){if(Array.isArray(e))for(const t of e)if(wu(t))$I(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function Vee(e,n){return Array.isArray(e)?e.includes(n):e===n}function zI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!wu(e)){const c=Vee(i,e.value),f=n&&(c?g.jsx(jC,{className:cr.optionsDropdownCheckIcon}):t?g.jsx("div",{className:cr.optionsDropdownCheckPlaceholder}):null),h=g.jsxs(g.Fragment,{children:[r==="left"&&f,g.jsx("span",{children:e.label}),r==="right"&&f]});return g.jsx(An.Option,{value:e.value,disabled:e.disabled,className:pn({[cr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":c||void 0,"aria-selected":c,active:c,children:typeof o=="function"?o({option:e,checked:c}):h})}const l=e.items.map(c=>g.jsx(zI,{data:c,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${c.value}`));return g.jsx(An.Group,{label:e.group,children:l})}function Ey({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:c=!0,withCheckIcon:f=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":C}){$I(e);const x=typeof r=="string"?(i||NI)({options:e,search:c?r:"",limit:a??1/0}):e,E=Uee(x),j=x.map(O=>g.jsx(zI,{data:O,withCheckIcon:f,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},wu(O)?O.group:`${O.value}`));return g.jsx(An.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:g.jsxs(An.Options,{labelledBy:w,"aria-label":C,children:[l?g.jsx(fr.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:j}):j,E&&v&&g.jsx(An.Empty,{children:v})]})})}const Ty=De(e=>{const n=be("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:j,disabled:O,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,id:F,renderOption:Y,autoComplete:V,scrollAreaProps:$,onClear:P,clearButtonProps:I,error:H,clearable:U,clearSectionMode:D,rightSection:W,autoSelectOnBlur:G,openOnFocus:z=!0,attributes:X,...ee}=n,re=Vi(F),le=Cy(b),ye=ip(le),[ae,ue]=Ci({value:w,defaultValue:k,finalValue:"",onChange:v}),Se=Bf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),C&&Se.selectFirstOption()},onDropdownClose:()=>{c==null||c(),setTimeout(Se.resetSelectedOption,0)}}),ne=Ne=>{ue(Ne),Se.resetSelectedOption()},{resolvedClassNames:Le,resolvedStyles:ke}=Wi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&Se.selectFirstOption()},[_,ae]);const je=g.jsx(An.ClearButton,{...I,onClear:()=>{ne(""),P==null||P()}});return g.jsxs(An,{store:Se,__staticSelector:"Autocomplete",classNames:Le,styles:ke,unstyled:r,readOnly:j,size:L,attributes:X,keepMounted:G,onOptionSubmit:Ne=>{x==null||x(Ne),ne(ye[Ne].label),Se.closeDropdown()},...E,children:[g.jsx(An.Target,{autoComplete:V,withExpandedAttribute:!0,children:g.jsx(Ri,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:je,__clearable:U&&!!ae&&!O&&!j,__clearSectionMode:D,rightSection:W,disabled:O,readOnly:j,value:ae,error:H,onChange:Ne=>{ne(Ne.currentTarget.value),Se.openDropdown(),_&&Se.selectFirstOption()},onFocus:Ne=>{z&&Se.openDropdown(),h==null||h(Ne)},onBlur:Ne=>{G&&Se.clickSelectedOption(),Se.closeDropdown(),d==null||d(Ne)},onClick:Ne=>{Se.openDropdown(),p==null||p(Ne)},classNames:Le,styles:ke,unstyled:r,attributes:X,id:re})}),g.jsx(Ey,{data:le,hidden:j||O,filter:M,search:ae,limit:N,hiddenWhenEmpty:!0,withScrollArea:q,maxDropdownHeight:R,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:Y,scrollAreaProps:$})]})});Ty.classes={...Ri.classes,...An.classes};Ty.displayName="@mantine/core/Autocomplete";var My={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const LI=A.createContext({withinGroup:!1}),II=(e,{spacing:n})=>({group:{"--ag-spacing":Vt(n)}}),Dy=De(e=>{const n=be("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:c,attributes:f,...h}=n;return g.jsx(LI,{value:{withinGroup:!0},children:g.jsx(he,{...Xe({name:"AvatarGroup",classes:My,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:II,rootSelector:"group"})("group"),...h})})});Dy.classes=My;Dy.varsResolver=II;Dy.displayName="@mantine/core/AvatarGroup";function Wee(e){return g.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Gee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const BI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:c})=>{const f=a==="initials"&&typeof l=="string"?Kee(l,c):a,h=e.variantColorResolver({color:f||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Bn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Yt(t),"--avatar-bg":f||i?h.background:void 0,"--avatar-color":f||i?h.color:void 0,"--avatar-bd":f||i?h.border:void 0}}},go=Ai(e=>{const n=be("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:c,alt:f,radius:h,color:d,gradient:p,imageProps:v,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:C,attributes:x,...E}=n,j=A.use(LI),[O,M]=A.useState(!c),N=Xe({name:"Avatar",props:n,classes:My,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:BI});return A.useEffect(()=>M(!c),[c]),g.jsx(he,{...N("root"),mod:[{"within-group":j.withinGroup},k],...E,children:O||!c?g.jsx("span",{...N("placeholder"),title:f,children:b||typeof _=="string"&&Xee(_)||g.jsx(Wee,{})}):g.jsx("img",{...v,...N("image"),src:c,alt:f,onError:q=>{var R;M(!0),(R=v==null?void 0:v.onError)==null||R.call(v,q)}})})});go.classes=My;go.varsResolver=BI;go.displayName="@mantine/core/Avatar";go.Group=Dy;var FI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const qI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const c=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Bn(a,"badge-height"),"--badge-padding-x":Bn(a,"badge-padding-x"),"--badge-fz":Bn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Yt(n),"--badge-bg":t||r?c.background:void 0,"--badge-color":t||r?c.color:void 0,"--badge-bd":t||r?c.border:void 0,"--badge-dot-color":r==="dot"?lt(t,e):void 0}}},it=Ai(e=>{const n=be("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:c,color:f,gradient:h,leftSection:d,rightSection:p,children:v,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:C,attributes:x,...E}=n,j=Xe({name:"Badge",props:n,classes:FI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:qI});return g.jsxs(he,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},C],...j("root",{variant:b}),...E,children:[d&&g.jsx("span",{...j("section"),"data-position":"left",children:d}),g.jsx("span",{...j("label"),children:v}),p&&g.jsx("span",{...j("section"),"data-position":"right",children:p})]})});it.classes=FI;it.varsResolver=qI;it.displayName="@mantine/core/Badge";var Ff={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const cT={orientation:"horizontal"},HI=(e,{borderWidth:n})=>({group:{"--button-border-width":me(n)}}),Ry=De(e=>{const n=be("ButtonGroup",cT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:c,borderWidth:f,mod:h,attributes:d,...p}=be("ButtonGroup",cT,e);return g.jsx(he,{...Xe({name:"ButtonGroup",props:n,classes:Ff,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:HI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Ry.classes=Ff;Ry.varsResolver=HI;Ry.displayName="@mantine/core/ButtonGroup";const UI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Bn(o,"section-height"),"--section-padding-x":Bn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ri(o.replace("compact-","")):ri(o),"--section-radius":n===void 0?void 0:Yt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Py=De(e=>{const n=be("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:c,radius:f,autoContrast:h,attributes:d,...p}=n;return g.jsx(he,{...Xe({name:"ButtonGroupSection",props:n,classes:Ff,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:UI,rootSelector:"groupSection"})("groupSection"),...p})});Py.classes=Ff;Py.varsResolver=UI;Py.displayName="@mantine/core/ButtonGroupSection";const Zee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${me(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},VI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const c=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Bn(a,"button-height"),"--button-padding-x":Bn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ri(a.replace("compact-","")):ri(a),"--button-radius":n===void 0?void 0:Yt(n),"--button-bg":t||r?c.background:void 0,"--button-hover":t||r?c.hover:void 0,"--button-color":c.color,"--button-bd":t||r?c.border:void 0,"--button-hover-color":t||r?c.hoverColor:void 0}}},st=Ai(e=>{const n=be("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:c,rightSection:f,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:C,"data-disabled":x,autoContrast:E,mod:j,attributes:O,...M}=n,N=Xe({name:"Button",props:n,classes:Ff,className:r,style:t,classNames:k,styles:_,unstyled:C,attributes:O,vars:i,varsResolver:VI}),q=!!c,R=!!f;return g.jsxs(Et,{...N("root",{active:!o&&!v&&!x}),unstyled:C,variant:d,disabled:o||v,mod:[{disabled:o||x,loading:v,block:h,"with-left-section":q,"with-right-section":R},j],...M,children:[typeof v=="boolean"&&g.jsx(cs,{mounted:v,transition:Zee,duration:150,children:L=>g.jsx(he,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:g.jsx(ai,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),g.jsxs("span",{...N("inner"),children:[c&&g.jsx(he,{component:"span",...N("section"),mod:{position:"left"},children:c}),g.jsx(he,{component:"span",mod:{loading:v},...N("label"),children:l}),f&&g.jsx(he,{component:"span",...N("section"),mod:{position:"right"},children:f})]})]})});st.classes=Ff;st.varsResolver=VI;st.displayName="@mantine/core/Button";st.Group=Ry;st.GroupSection=Py;const[Qee,Jee]=Xr("Card component was not found in tree");var OC={root:"m_e615b15f",section:"m_599a2148"};const Ny=Ai(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:c,...f}=be("CardSection",null,e),h=Jee();return g.jsx(he,{mod:[{"with-border":o,"inherit-padding":l},c],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...f})});Ny.classes=OC;Ny.displayName="@mantine/core/CardSection";const WI=(e,{padding:n})=>({root:{"--card-padding":Vt(n)}}),ene={orientation:"vertical"},La=Ai(e=>{const n=be("Card",ene,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,padding:f,attributes:h,orientation:d,...p}=n,v=Xe({name:"Card",props:n,classes:OC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:WI}),b=A.Children.toArray(c),w=b.map((k,_)=>{var C;return typeof k=="object"&&k&&"type"in k&&(k.type===Ny||((C=k.type)==null?void 0:C.displayName)==="@mantine/core/CardSection")?A.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return g.jsx(Qee,{value:{getStyles:v},children:g.jsx(Dt,{unstyled:o,"data-orientation":d,...v("root"),...p,children:w})})});La.classes=OC;La.varsResolver=WI;La.displayName="@mantine/core/Card";La.Section=Ny;var GI={root:"m_4451eb3a"};const qf=Ai(e=>{const n=be("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:c,mod:f,attributes:h,...d}=n,p=Xe({name:"Center",props:n,classes:GI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return g.jsx(he,{mod:[{inline:c},f],...p("root"),...d})});qf.classes=GI;qf.displayName="@mantine/core/Center";var YI={root:"m_b183c0a2"};const KI=(e,{color:n})=>({root:{"--code-bg":n?lt(n,e):void 0}}),Jh=De(e=>{const n=be("Code",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,block:f,mod:h,attributes:d,...p}=n,v=Xe({name:"Code",props:n,classes:YI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:KI});return g.jsx(he,{component:f?"pre":"code",mod:[{block:f},h],...v("root"),...p,dir:"ltr"})});Jh.classes=YI;Jh.varsResolver=KI;Jh.displayName="@mantine/core/Code";var XI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const fT={withShadow:!0},ZI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Yt(n),"--cs-size":me(t)}}),Hf=Ai(e=>{const n=be("ColorSwatch",fT,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,radius:f,withShadow:h,children:d,attributes:p,...v}=be("ColorSwatch",fT,n),b=Xe({name:"ColorSwatch",props:n,classes:XI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:ZI});return g.jsxs(he,{...b("root",{focusable:!0}),...v,children:[g.jsx("span",{...b("alphaOverlay")}),h&&g.jsx("span",{...b("shadowOverlay")}),g.jsx("span",{...b("colorOverlay",{style:{backgroundColor:c}})}),g.jsx("span",{...b("childrenOverlay"),children:d})]})});Hf.classes=XI;Hf.varsResolver=ZI;Hf.displayName="@mantine/core/ColorSwatch";function ya(e,n=0,t=10**n){return Math.round(t*e)/t}function nne({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const tne={grad:360/400,turn:360,rad:360/(Math.PI*2)};function ine(e,n="deg"){return Number(e)*(tne[n]||1)}const rne=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function dT(e){const n=rne.exec(e);return n?nne({h:ine(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function OS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ya(60*(o<0?o+6:o),3),s:ya(r?a/r*100:0,3),v:ya(r/255*100,3),a:i}}function ES(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?OS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):OS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function ane(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ya(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...ES(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...ES(i),a:r}}const one=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function hT(e){const n=one.exec(e);return n?OS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const QI={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},sne={hex:ES,hexa:ane,rgb:hT,rgba:hT,hsl:dT,hsla:dT};function lne(e){for(const[,n]of Object.entries(QI))if(n.test(e))return!0;return!1}function qv(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const n=e.trim();for(const[t,i]of Object.entries(QI))if(i.test(n))return sne[t](n);return{h:0,s:0,v:0,a:1}}const $y=A.createContext(null);function EC({position:e,...n}){return g.jsx(he,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}EC.displayName="@mantine/core/ColorPickerThumb";var zy={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Uf=De(e=>{var H;const n=be("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:c,onChangeEnd:f,maxValue:h,round:d,size:p="md",focusable:v=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:C,__staticSelector:x="ColorPicker",attributes:E,ref:j,...O}=n,M=Xe({name:x,classes:zy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),N=((H=A.use($y))==null?void 0:H.getStyles)||M,q=ui(),[R,L]=A.useState({y:0,x:b/h}),F=A.useRef(R),Y=U=>d?Math.round(U*h):U*h,{ref:V}=Cz(({x:U,y:D})=>{F.current={x:U,y:D},c==null||c(Y(U))},{onScrubEnd:()=>{const{x:U}=F.current;f==null||f(Y(U)),C==null||C()},onScrubStart:_});ls(()=>{L({y:0,x:b/h})},[b]);const $=(U,D)=>{U.preventDefault();const W=Sz(D);c==null||c(Y(W.x)),f==null||f(Y(W.x))},P=U=>{switch(U.key){case"ArrowRight":$(U,{x:R.x+.05,y:R.y});break;case"ArrowLeft":$(U,{x:R.x-.05,y:R.y});break}},I=w.map((U,D)=>A.createElement("div",{...N("sliderOverlay"),style:U,key:D}));return g.jsxs(he,{...O,ref:Kt(V,j),...N("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":q.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[I,g.jsx(EC,{position:R,...N("thumb",{style:{top:me(1),background:k}})})]})});Uf.displayName="@mantine/core/ColorSlider";Uf.classes=zy;const une={__staticSelector:"AlphaSlider"},TC=De(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",une,e);return g.jsx(Uf,{...a,value:n,onChange:o=>t==null?void 0:t(ya(o,2)),onChangeEnd:o=>i==null?void 0:i(ya(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${me(8)} ${me(8)}`,backgroundPosition:`0 0, 0 ${me(4)}, ${me(4)} ${me(-4)}, ${me(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});TC.displayName="@mantine/core/AlphaSlider";TC.classes=Uf.classes;function JI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),c=o*(1-a),f=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ya([o,f,c,c,h,o][d]*255),g:ya([h,o,o,f,c,c][d]*255),b:ya([c,c,h,o,o,f][d]*255),a:ya(i,2)}}function mT(e,n){const{r:t,g:i,b:r,a}=JI(e);return n?`rgba(${t}, ${i}, ${r}, ${ya(a,2)})`:`rgb(${t}, ${i}, ${r})`}function pT({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ya(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function kg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function eB(e){const{r:n,g:t,b:i}=JI(e);return`#${kg(n)}${kg(t)}${kg(i)}`}function cne(e){const n=Math.round(e.a*255);return`${eB(e)}${kg(n)}`}const jk={hex:eB,hexa:e=>cne(e),rgb:e=>mT(e,!1),rgba:e=>mT(e,!0),hsl:e=>pT(e,!1),hsla:e=>pT(e,!0)};function Ks(e,n){return n?e in jk?jk[e](n):jk.hex(n):"#000000"}const fne={__staticSelector:"HueSlider"},MC=De(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",fne,e);return g.jsx(Uf,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});MC.displayName="@mantine/core/HueSlider";MC.classes=Uf.classes;function nB({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:c,onScrubEnd:f,...h}){const{getStyles:d}=A.use($y),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),b=A.useRef(p),{ref:w}=Cz(({x:C,y:x})=>{b.current={x:C,y:x},n({s:Math.round(C*100),v:Math.round((1-x)*100)})},{onScrubEnd:()=>{const{x:C,y:x}=b.current;t({s:Math.round(C*100),v:Math.round((1-x)*100)}),f==null||f()},onScrubStart:c});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(C,x)=>{C.preventDefault();const E=Sz(x);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=C=>{switch(C.key){case"ArrowUp":k(C,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(C,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(C,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(C,{x:p.x-.05,y:p.y});break}};return g.jsxs(he,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Ks("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[g.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),g.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),g.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),g.jsx(EC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}nB.displayName="@mantine/core/Saturation";function tB({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:c,...f}){const h=A.use($y),d=o.map((p,v)=>A.createElement(Hf,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},c===p&&g.jsx(jC,{size:"35%",color:Ez(p)<.5?"white":"black"})));return g.jsx(he,{...h.getStyles("swatches"),...f,children:d})}tB.displayName="@mantine/core/Swatches";const dne={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},iB=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Bn(n,"cp-preview-size"),"--cp-width":Bn(n,"cp-width"),"--cp-body-spacing":Vt(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Bn(n,"cp-thumb-size"),"--cp-saturation-height":Bn(n,"cp-saturation-height")}}),Ly=De(e=>{const n=be("ColorPicker",dne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:c="hex",value:f,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:C,swatches:x,swatchesPerRow:E,fullWidth:j,onColorSwatchClick:O,__staticSelector:M,mod:N,attributes:q,name:R,hiddenInputProps:L,...F}=n,Y=Xe({name:M,props:n,classes:zy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,rootSelector:"wrapper",vars:l,varsResolver:iB}),V=A.useRef(c||"hex"),$=A.useRef(""),P=A.useRef(-1),I=A.useRef(!1),H=c==="hexa"||c==="rgba"||c==="hsla",[U,D,W]=Ci({value:f,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[G,z]=A.useState(qv(U)),X=()=>{window.clearTimeout(P.current),I.current=!0},ee=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{I.current=!1},200)},re=le=>{z(ye=>{const ae={...ye,...le};return $.current=Ks(V.current,ae),ae}),D($.current)};return ls(()=>{typeof f=="string"&&lne(f)&&!I.current&&z(qv(f))},[f]),ls(()=>{V.current=c||"hex",D(Ks(V.current,G))},[c]),g.jsx($y,{value:{getStyles:Y,unstyled:o},children:g.jsxs(he,{...Y("wrapper"),size:b,mod:[{"full-width":j},N],...F,children:[R&&g.jsx("input",{type:"hidden",name:R,value:U,...L}),v&&g.jsxs(g.Fragment,{children:[g.jsx(nB,{value:G,onChange:re,onChangeEnd:({s:le,v:ye})=>p==null?void 0:p(Ks(V.current,{...G,s:le,v:ye})),color:U,size:b,focusable:C,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),g.jsxs("div",{...Y("body"),children:[g.jsxs("div",{...Y("sliders"),children:[g.jsx(MC,{value:G.h,onChange:le=>re({h:le}),onChangeEnd:le=>p==null?void 0:p(Ks(V.current,{...G,h:le})),size:b,focusable:C,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),H&&g.jsx(TC,{value:G.a,onChange:le=>re({a:le}),onChangeEnd:le=>{p==null||p(Ks(V.current,{...G,a:le}))},size:b,color:Ks("hex",G),focusable:C,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),H&&g.jsx(Hf,{color:U,radius:"sm",size:"var(--cp-preview-size)",...Y("preview")})]})]}),Array.isArray(x)&&g.jsx(tB,{data:x,swatchesPerRow:E,focusable:C,setValue:D,value:U,onChangeEnd:le=>{const ye=Ks(c,qv(le));O==null||O(ye),p==null||p(ye),W||z(qv(le))}})]})})});Ly.classes=zy;Ly.varsResolver=iB;Ly.displayName="@mantine/core/ColorPicker";var rB={root:"m_3eebeb36",label:"m_9e365f20"};const hne={orientation:"horizontal"},aB=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?lt(n,e):void 0,"--divider-border-style":t,"--divider-size":Bn(i,"divider-size")}}),Nu=De(e=>{const n=be("Divider",hne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:c,orientation:f,label:h,labelPosition:d,mod:p,attributes:v,...b}=n,w=Xe({name:"Divider",classes:rB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:aB});return g.jsx(he,{mod:[{orientation:f,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&g.jsx(he,{component:"span",mod:{position:d},...w("label"),children:h})})});Nu.classes=rB;Nu.varsResolver=aB;Nu.displayName="@mantine/core/Divider";const[vT,oB]=Xr("Grid component was not found in tree"),TS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},gT=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":TS(e,n),yT=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},bT=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function mne({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ui(),o=oB(),l=o.breakpoints||a.breakpoints,c=Wr(e),f=c===void 0?12:c,h=Tu({"--col-order":(v=Wr(n))==null?void 0:v.toString(),"--col-flex-grow":yT(f,o.grow),"--col-flex-basis":TS(f,o.columns),"--col-width":f==="content"?"auto":void 0,"--col-max-width":gT(f,o.columns,o.grow),"--col-offset":bT(Wr(t),o.columns),"--col-align-self":Wr(i)}),d=Pt(l).reduce((b,w)=>{var k;return b[w]||(b[w]={}),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-flex-grow"]=yT(e[w],o.grow),b[w]["--col-flex-basis"]=TS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=gT(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=bT(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Kh(Pt(d),l).filter(b=>Pt(d[b.value]).length>0).map(b=>({query:o.type==="container"?`mantine-grid (min-width: ${l[b.value]})`:`(min-width: ${l[b.value]})`,styles:d[b.value]}));return g.jsx(Nf,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var DC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const pne={span:12},RC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:c,align:f,...h}=be("GridCol",pne,e),d=oB(),p=cy();return g.jsxs(g.Fragment,{children:[g.jsx(mne,{selector:`.${p}`,span:o,order:l,offset:c,align:f}),g.jsx(he,{...d.getStyles("col",{className:pn(t,p),style:i,classNames:n,styles:r}),...h})]})});RC.classes=DC;RC.displayName="@mantine/core/GridCol";function wT({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ui(),l=r||o.breakpoints,c=Tu({"--grid-gap":Vt(Wr(e)),"--grid-row-gap":Vt(Wr(n)),"--grid-column-gap":Vt(Wr(t))}),f=Pt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Vt(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Vt(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Vt(t[p])),d),{}),h=Kh(Pt(f),l).filter(d=>Pt(f[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:f[d.value]}));return g.jsx(Nf,{styles:c,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const vne={gap:"md",columns:12},sB=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Hr=De(e=>{const n=be("Grid",vne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:c,gap:f,rowGap:h,columnGap:d,columns:p,align:v,justify:b,children:w,breakpoints:k,type:_,attributes:C,...x}=n,E=Xe({name:"Grid",classes:DC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:sB}),j=cy();return _==="container"&&k?g.jsxs(vT,{value:{getStyles:E,grow:c,columns:p,breakpoints:k,type:_},children:[g.jsx(wT,{selector:`.${j}`,...n}),g.jsx("div",{...E("container"),children:g.jsx(he,{...E("root",{className:j}),...x,children:g.jsx("div",{...E("inner"),children:w})})})]}):g.jsxs(vT,{value:{getStyles:E,grow:c,columns:p,breakpoints:k,type:_},children:[g.jsx(wT,{selector:`.${j}`,...n}),g.jsx(he,{...E("root",{className:j}),...x,children:g.jsx("div",{...E("inner"),children:w})})]})});Hr.classes=DC;Hr.varsResolver=sB;Hr.displayName="@mantine/core/Grid";Hr.Col=RC;function gne(e="top-end",n=0){const t={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},i=typeof n=="number"?n:n.x,r=typeof n=="number"?n:n.y,a=me(i),o=me(r),[l,c]=e.split("-");return l==="top"&&(t["--indicator-top"]=o,t["--indicator-translate-y"]="-50%"),l==="middle"&&(t["--indicator-top"]="50%",t["--indicator-translate-y"]="-50%"),l==="bottom"&&(t["--indicator-bottom"]=o,t["--indicator-translate-y"]="50%"),c==="start"&&(t["--indicator-left"]=a,t["--indicator-translate-x"]="-50%"),c==="center"&&(t["--indicator-left"]="50%",t["--indicator-translate-x"]="-50%"),c==="end"&&(t["--indicator-right"]=a,t["--indicator-translate-x"]="50%"),t}var lB={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const yne={position:"top-end",offset:0,showZero:!0},uB=(e,{color:n,position:t,offset:i,size:r,radius:a,zIndex:o,autoContrast:l})=>({root:{"--indicator-color":n?lt(n,e):void 0,"--indicator-text-color":Gm(l,e)?Pf({color:n,theme:e,autoContrast:l}):void 0,"--indicator-size":me(r),"--indicator-radius":a===void 0?void 0:Yt(a),"--indicator-z-index":o==null?void 0:o.toString(),...gne(t,i)}}),Iy=De(e=>{const n=be("Indicator",yne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,position:f,offset:h,inline:d,label:p,radius:v,color:b,withBorder:w,disabled:k,processing:_,zIndex:C,autoContrast:x,maxValue:E,showZero:j,mod:O,attributes:M,...N}=n,q=Xe({name:"Indicator",classes:lB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:l,varsResolver:uB}),R=!j&&(p===0||p==="0"),L=E!==void 0&&typeof p=="number"&&p>E?`${E}+`:p;return g.jsxs(he,{...q("root"),mod:[{inline:d},O],...N,children:[!k&&!R&&g.jsx(he,{mod:{"with-label":!!p,"with-border":w,processing:_},...q("indicator"),children:L}),c]})});Iy.classes=lB;Iy.varsResolver=uB;Iy.displayName="@mantine/core/Indicator";const bne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],kT={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function _T(e){Object.keys(kT).forEach(n=>{e.style.setProperty(n,kT[n],"important")})}function wne(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of bne)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let Ti=null;function kne(e,n,t=1,i=1/0){Ti||(Ti=document.createElement("textarea"),Ti.setAttribute("tabindex","-1"),Ti.setAttribute("aria-hidden","true"),Ti.setAttribute("aria-label","autosize measurement"),_T(Ti)),Ti.parentNode===null&&document.body.appendChild(Ti);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Ti.style[p]=o[p]}),_T(Ti),Ti.value=n;let c=l==="border-box"?Ti.scrollHeight+a:Ti.scrollHeight-r;Ti.value=n,c=l==="border-box"?Ti.scrollHeight+a:Ti.scrollHeight-r,Ti.value="x";const f=Ti.scrollHeight-r;let h=f*t;l==="border-box"&&(h=h+r+a),c=Math.max(h,c);let d=f*i;return l==="border-box"&&(d=d+r+a),c=Math.min(d,c),[c,f]}function _ne({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=Kt(o,i),c=A.useRef(0),f=()=>{const d=o.current;if(!d)return;const p=wne(d);if(!p)return;const[v]=kne(p,d.value||d.placeholder||"x",n,e);c.current!==v&&(c.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||f(),t==null||t(d)};return A.useLayoutEffect(f),A.useEffect(()=>{const d=()=>f();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>f();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&f()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),g.jsx("textarea",{...r,onChange:h,ref:l})}const xne={size:"sm"},pl=De(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",xne,e),l=n&&YK()!=="test",c=l?{maxRows:t,minRows:i}:{};return g.jsx(Ri,{component:l?_ne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...c})});pl.classes=Ri.classes;pl.displayName="@mantine/core/Textarea";function xT(e,n){if(typeof e=="string"&&e.trim().length===0)return!0;try{return n(e),!0}catch{return!1}}const Sne={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm",indentSpaces:2},PC=De(e=>{const{value:n,defaultValue:t,onChange:i,formatOnBlur:r,validationError:a,serialize:o,deserialize:l,onFocus:c,onBlur:f,readOnly:h,error:d,indentSpaces:p,...v}=be("JsonInput",Sne,e),[b,w]=Ci({value:n,defaultValue:t,finalValue:"",onChange:i}),[k,_]=A.useState(xT(b,l)),C=E=>{c==null||c(E),_(!0)},x=E=>{f==null||f(E);const j=xT(E.currentTarget.value,l);r&&!h&&j&&E.currentTarget.value.trim()!==""&&w(o(l(E.currentTarget.value),null,p)),_(j)};return g.jsx(pl,{value:b,onChange:E=>w(E.currentTarget.value),onFocus:C,onBlur:x,readOnly:h,...v,autoComplete:"off",__staticSelector:"JsonInput",error:k?d:a||!0,"data-monospace":!0})});PC.classes=Ri.classes;PC.displayName="@mantine/core/JsonInput";const[Cne,kl]=Xr("Menu component was not found in the tree");var _l={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const NC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return g.jsx(he,{...kl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});NC.classes=_l;NC.displayName="@mantine/core/MenuDivider";const $C=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:c,children:f,ref:h,...d}=be("MenuDropdown",null,e),p=A.useRef(null),v=kl(),b=Sr(c,_=>{var C,x;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(x=(C=p.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||x.focus())}),w=Sr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=Sr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return g.jsxs(On.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Kt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&g.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});$C.classes=_l;$C.displayName="@mantine/core/MenuDropdown";const em=A.createContext(null),zC=Ai(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:c,rightSection:f,children:h,disabled:d,"data-disabled":p,ref:v,...b}=be("MenuItem",null,e),w=kl(),k=A.use(em),_=ui(),{dir:C}=Ru(),x=A.useRef(null),E=b,j=Sr(E.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?vs({color:o,theme:_}):null,N=Sr(E.onKeyDown,q=>{q.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return g.jsxs(Et,{onMouseDown:q=>q.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Kt(x,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:j,onKeyDown:z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[c&&g.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:c}),h&&g.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),f&&g.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f})]})});zC.classes=_l;zC.displayName="@mantine/core/MenuItem";const LC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return g.jsx(he,{...kl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});LC.classes=_l;LC.displayName="@mantine/core/MenuLabel";const IC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:c,children:f,ref:h,...d}=be("MenuSubDropdown",null,e),p=A.useRef(null),v=kl(),b=A.use(em),w=Sr(o,b==null?void 0:b.open),k=Sr(l,b==null?void 0:b.close);return g.jsx(On.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Kt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:f})});IC.classes=_l;IC.displayName="@mantine/core/MenuSubDropdown";const BC=Ai(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:c,children:f,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...b}=be("MenuSubItem",null,e),w=kl(),k=A.use(em),_=ui(),{dir:C}=Ru(),x=A.useRef(null),E=b,j=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,O=o?vs({color:o,theme:_}):null,M=Sr(E.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),N=Sr(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),q=Sr(E.onMouseEnter,k==null?void 0:k.open),R=Sr(E.onMouseLeave,k==null?void 0:k.close);return g.jsxs(Et,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Kt(x,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:q,onMouseLeave:R,onClick:N,onKeyDown:z6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":O!=null&&O.isThemeColor&&(O==null?void 0:O.shade)===void 0?`var(--mantine-color-${O.color}-6)`:j==null?void 0:j.color,"--menu-item-hover":j==null?void 0:j.hover},children:[l&&g.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),f&&g.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:f}),g.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c||g.jsx(Bg,{...w.getStyles("chevron"),size:14})})]})});BC.classes=_l;BC.displayName="@mantine/core/MenuSubItem";function cB({children:e,refProp:n}){if(!$6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return kl(),g.jsx(On.Target,{refProp:n,popupType:"menu",children:e})}cB.displayName="@mantine/core/MenuSubTarget";const Ane={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Vf(e){const{children:n,closeDelay:t,openDelay:i,...r}=be("MenuSub",Ane,e),a=Vi(),[o,{open:l,close:c}]=Az(!1),f=A.use(em),{openDropdown:h,closeDropdown:d}=kL({open:l,close:c,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var b,w;(w=(b=document.getElementById(`${a}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return g.jsx(em,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:f},children:g.jsx(On,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Vf.extend=e=>e;Vf.displayName="@mantine/core/MenuSub";Vf.Target=cB;Vf.Dropdown=IC;Vf.Item=BC;const jne={refProp:"ref"};function fB(e){const{children:n,refProp:t,...i}=be("MenuTarget",jne,e),r=Mu(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=kl(),o=r.props,l=Sr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=Sr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),f=Sr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return g.jsx(On.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:c,onMouseLeave:f,"data-expanded":a.opened?!0:void 0})})}fB.displayName="@mantine/core/MenuTarget";const One={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Vn=De(e=>{const n=be("Menu",One,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:c,closeOnItemClick:f,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:C,vars:x,menuItemTabIndex:E,keepMounted:j,withInitialFocusPlaceholder:O,attributes:M,...N}=n,q=Xe({name:"Menu",classes:_l,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[R,L]=Ci({value:a,defaultValue:o,finalValue:!1,onChange:c}),[F,Y]=A.useState(!1),V=()=>{L(!1),Y(!1),R&&(r==null||r())},$=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?V():$()},{openDropdown:I,closeDropdown:H}=kL({open:$,close:V,closeDelay:b,openDelay:v}),U=G=>EK("[data-menu-item]","[data-menu-dropdown]",G),{resolvedClassNames:D,resolvedStyles:W}=Wi({classNames:w,styles:k,props:n});return g.jsx(Cne,{value:{getStyles:q,opened:R,toggleDropdown:P,getItemIndex:U,openedViaClick:F,setOpenedViaClick:Y,closeOnItemClick:f,closeDropdown:p==="click"?V:H,openDropdown:p==="click"?$:I,closeDropdownImmediately:V,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:O},children:g.jsx(On,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:j?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:W,unstyled:_,variant:C,keepMounted:j,children:t})})});Vn.displayName="@mantine/core/Menu";Vn.classes=_l;Vn.Item=zC;Vn.Label=LC;Vn.Dropdown=$C;Vn.Target=fB;Vn.Divider=NC;Vn.Sub=Vf;const[Ene,Wf]=Xr("Modal component was not found in tree");var ys={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const By=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalBody",null,e);return g.jsx(ZL,{...Wf().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});By.classes=ys;By.displayName="@mantine/core/ModalBody";const Fy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalCloseButton",null,e);return g.jsx(QL,{...Wf().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});Fy.classes=ys;Fy.displayName="@mantine/core/ModalCloseButton";const qy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...c}=be("ModalContent",null,e),f=Wf(),h=f.scrollAreaComponent||oee;return g.jsx(JL,{...f.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:f.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...c,children:g.jsx(h,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${me(f.yOffset)} * 2))`},children:o})})});qy.classes=ys;qy.displayName="@mantine/core/ModalContent";const Hy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalHeader",null,e);return g.jsx(eI,{...Wf().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});Hy.classes=ys;Hy.displayName="@mantine/core/ModalHeader";const Uy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalOverlay",null,e);return g.jsx(nI,{...Wf().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});Uy.classes=ys;Uy.displayName="@mantine/core/ModalOverlay";const Tne={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Sa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},dB=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Yt(n),"--modal-size":Bn(t,"modal-size"),"--modal-y-offset":me(i),"--modal-x-offset":me(r)}}),rp=De(e=>{const n=be("ModalRoot",Tne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:c,scrollAreaComponent:f,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:b,attributes:w,...k}=n,_=Xe({name:b,classes:ys,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:dB});return g.jsx(Ene,{value:{yOffset:c,scrollAreaComponent:f,getStyles:_,fullScreen:d},children:g.jsx(XL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":f===fr.Autosize||void 0,unstyled:o,...k})})});rp.classes=ys;rp.varsResolver=dB;rp.displayName="@mantine/core/ModalRoot";const hB=A.createContext(null);function mB({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(Sa("modal"));return g.jsx(hB,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}mB.displayName="@mantine/core/ModalStack";const Vy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalTitle",null,e);return g.jsx(tI,{...Wf().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});Vy.classes=ys;Vy.displayName="@mantine/core/ModalTitle";const Mne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Sa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},hr=De(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:c,stackId:f,zIndex:h,...d}=be("Modal",Mne,e),p=A.use(hB),v=!!n||r,b=p&&f?{closeOnEscape:p.currentId===f,trapFocus:p.currentId===f,zIndex:p.getZIndex(f)}:{},w=t===!1?!1:f&&p?p.currentId===f:c;return A.useEffect(()=>{p&&f&&(c?p.addModal(f,h||Sa("modal")):p.removeModal(f))},[c,f,h]),g.jsxs(rp,{radius:l,opened:c,zIndex:p&&f?p.getZIndex(f):h,...d,...b,children:[t&&g.jsx(Uy,{visible:w,transitionProps:p&&f?{duration:0}:void 0,...i}),g.jsxs(qy,{radius:l,__hidden:p&&f&&c?f!==p.currentId:!1,children:[v&&g.jsxs(Hy,{children:[n&&g.jsx(Vy,{children:n}),r&&g.jsx(Fy,{...a})]}),g.jsx(By,{children:o})]})]})});hr.classes=ys;hr.displayName="@mantine/core/Modal";hr.Root=rp;hr.Overlay=Uy;hr.Content=qy;hr.Body=By;hr.Header=Hy;hr.Title=Vy;hr.CloseButton=Fy;hr.Stack=mB;const Wy=A.createContext(null);var Gy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const pB=A.createContext(null),vB=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Bn(n):Bn(t,"pg-gap")}}),Yy=De(e=>{var b;const n=be("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,disabled:f,attributes:h,...d}=n,p=((b=A.use(Wy))==null?void 0:b.size)||c||void 0,v=Xe({name:"PillGroup",classes:Gy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:vB,stylesCtx:{size:p},rootSelector:"group"});return g.jsx(pB,{value:{size:p,disabled:f},children:g.jsx(he,{size:p,...v("group"),...d})})});Yy.classes=Gy;Yy.varsResolver=vB;Yy.displayName="@mantine/core/PillGroup";const Dne={variant:"default"},gB=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Bn(t,"pill-fz"),"--pill-height":Bn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Yt(n)}}),vl=De(e=>{const n=be("Pill",Dne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:c,children:f,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:b,disabled:w,mod:k,attributes:_,...C}=n,x=A.use(pB),E=A.use(Wy),j=b||(x==null?void 0:x.size)||void 0,O=(E==null?void 0:E.variant)==="filled"?"contrast":c||"default",M=Xe({name:"Pill",classes:Gy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:gB,stylesCtx:{size:j}});return g.jsxs(he,{component:"span",variant:O,size:j,...M("root",{variant:O}),mod:[{"with-remove":h&&!w,disabled:w||(x==null?void 0:x.disabled)},k],...C,children:[g.jsx("span",{...M("label"),children:f}),h&&g.jsx(bl,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var q;N.preventDefault(),N.stopPropagation(),(q=p==null?void 0:p.onMouseDown)==null||q.call(p,N)},onClick:N=>{var q;N.stopPropagation(),d==null||d(),(q=p==null?void 0:p.onClick)==null||q.call(p,N)}})]})});vl.classes=Gy;vl.varsResolver=gB;vl.displayName="@mantine/core/Pill";vl.Group=Yy;var yB={field:"m_45c4369d"};const Rne={type:"visible"},FC=De(e=>{const n=be("PillsInputField",Rne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:c,disabled:f,id:h,pointer:d,mod:p,attributes:v,ref:b,...w}=n,k=A.use(Wy),_=A.use(Pu),C=Xe({name:"PillsInputField",classes:yB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),x=f||(k==null?void 0:k.disabled);return g.jsx(he,{component:"input",ref:Kt(b,k==null?void 0:k.fieldRef),"data-type":c,disabled:x,mod:[{disabled:x,pointer:d},p],...C("field"),...w,id:(_==null?void 0:_.inputId)||h,"aria-invalid":k==null?void 0:k.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});FC.classes=yB;FC.displayName="@mantine/core/PillsInputField";const Pne={size:"sm"},ku=De(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:c,...f}=be("PillsInput",Pne,e),h=A.useRef(null);return g.jsx(Wy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:c},children:g.jsx(Ri,{size:r,error:l,variant:c,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...f,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});ku.displayName="@mantine/core/PillsInput";ku.classes=Ri.classes;ku.Field=FC;function Ok(e){return typeof e=="string"?e.trim().toLowerCase():e}function Nne({data:e,value:n}){const t=n.map(Ok);return e.reduce((i,r)=>(wu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(Ok(a.value))===-1)}):t.indexOf(Ok(r.value))===-1&&i.push(r),i),[])}const ST={xs:41,sm:50,md:60,lg:72,xl:89},$ne={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Ky=fy(e=>{const n=be("MultiSelect",$ne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,value:f,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:C,selectFirstOptionOnChange:x,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:j,comboboxProps:O,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:R,searchValue:L,defaultSearchValue:F,onSearchChange:Y,readOnly:V,disabled:$,onFocus:P,onBlur:I,radius:H,rightSection:U,rightSectionWidth:D,rightSectionPointerEvents:W,rightSectionProps:G,leftSection:z,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:le,inputWrapperOrder:ye,withAsterisk:ae,labelProps:ue,descriptionProps:Se,errorProps:ne,wrapperProps:Le,description:ke,label:je,error:Ne,maxValues:ge,searchable:Ce,nothingFoundMessage:Pe,withCheckIcon:ce,withAlignedLabels:qe,checkIconPosition:Ye,hidePickedOptions:We,withErrorStyles:Ze,name:Qe,form:ie,id:ve,clearable:Ke,clearSectionMode:Je,clearButtonProps:Ae,hiddenInputProps:an,placeholder:mn,hiddenInputValuesDivider:En,required:vn,mod:sn,renderOption:en,renderPill:zn,onRemove:Re,onClear:He,onMaxValues:Dn,scrollAreaProps:kn,chevronColor:bn,attributes:_n,clearSearchOnChange:ft,openOnFocus:Tt,loading:Be,loadingPosition:Ue,...Ln}=n,ut=Vi(ve),Pn=Cy(b),rn=ip(Pn),tn=A.useRef({}),on=Bf({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&on.selectFirstOption()},onDropdownClose:()=>{C==null||C(),on.resetSelectedOption()}}),{styleProps:In,rest:{type:Gn,autoComplete:_t,...Rn}}=Du(Ln),[Tn,Kn]=Ci({value:f,defaultValue:h,finalValue:[],onChange:d}),[$t,Oi]=Ci({value:L,defaultValue:F,finalValue:"",onChange:Y}),tr=cn=>{Oi(cn),on.resetSelectedOption()},Zr=Xe({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:_n}),{resolvedClassNames:Ka,resolvedStyles:Qr}=Wi({props:n,styles:a,classNames:t}),pr=cn=>{p==null||p(cn),cn.key===" "&&!Ce&&(cn.preventDefault(),on.toggleDropdown()),cn.key==="Backspace"&&$t.length===0&&Tn.length>0&&(Re==null||Re(Tn[Tn.length-1]),Kn(Tn.slice(0,Tn.length-1)))},Xa=Tn.map((cn,Er)=>{var Tr;const Za=rn[`${cn}`]||tn.current[`${cn}`];return zn?g.jsx(A.Fragment,{children:zn({option:Za,value:cn,onRemove:()=>{Kn(Tn.filter(Mr=>cn!==Mr)),Re==null||Re(cn)},disabled:$})},`${cn}-${Er}`):g.jsx(vl,{withRemoveButton:!V&&!((Tr=rn[`${cn}`])!=null&&Tr.disabled),onRemove:()=>{Kn(Tn.filter(Mr=>cn!==Mr)),Re==null||Re(cn)},unstyled:o,disabled:$,...Zr("pill"),children:(Za==null?void 0:Za.label)||cn},`${cn}-${Er}`)});A.useEffect(()=>{x&&on.selectFirstOption()},[x,$t]),A.useEffect(()=>{Tn.forEach(cn=>{`${cn}`in rn&&(tn.current[`${cn}`]=rn[`${cn}`])})},[rn,Tn]);const Jr=g.jsx(An.ClearButton,{...Ae,onClear:()=>{He==null||He(),Kn([]),tr("")}}),ea=Nne({data:Pn,value:Tn}),gn=Ke&&Tn.length>0&&!$&&!V,ci=gn?{paddingInlineEnd:ST[c]??ST.sm}:void 0;return g.jsxs(g.Fragment,{children:[g.jsxs(An,{store:on,classNames:Ka,styles:Qr,unstyled:o,size:c,readOnly:V,__staticSelector:"MultiSelect",attributes:_n,onOptionSubmit:cn=>{j==null||j(cn),ft&&tr(""),on.updateSelectedOptionIndex("selected"),Tn.includes(rn[`${cn}`].value)?(Kn(Tn.filter(Er=>Er!==rn[`${cn}`].value)),Re==null||Re(rn[`${cn}`].value)):Tn.lengthCe?on.openDropdown():on.toggleDropdown(),"data-expanded":on.dropdownOpened||void 0,id:ut,required:vn,mod:sn,attributes:_n,children:g.jsxs(vl.Group,{attributes:_n,disabled:$,unstyled:o,...Zr("pillsList",{style:ci}),children:[Xa,g.jsx(An.EventsTarget,{autoComplete:_t,withExpandedAttribute:!0,children:g.jsx(ku.Field,{...Rn,id:ut,placeholder:mn,type:!Ce&&!mn?"hidden":"visible",...Zr("inputField"),unstyled:o,onFocus:cn=>{P==null||P(cn),Tt&&Ce&&on.openDropdown()},onBlur:cn=>{I==null||I(cn),on.closeDropdown(),tr("")},onKeyDown:pr,value:$t,onChange:cn=>{tr(cn.currentTarget.value),Ce&&on.openDropdown(),x&&on.selectFirstOption()},disabled:$,readOnly:V||!Ce,pointer:!Ce})})]})})}),g.jsx(Ey,{data:We?ea:Pn,hidden:V||$,filter:M,search:$t,limit:N,hiddenWhenEmpty:!Pe,withScrollArea:q,maxDropdownHeight:R,filterOptions:Ce,value:Tn,checkIconPosition:Ye,withCheckIcon:ce,withAlignedLabels:qe,nothingFoundMessage:Pe,unstyled:o,labelId:je?`${ut}-label`:void 0,"aria-label":je?void 0:Ln["aria-label"],renderOption:en,scrollAreaProps:kn})]}),g.jsx(An.HiddenInput,{name:Qe,valuesDivider:En,value:Tn,form:ie,disabled:$,...an})]})});Ky.classes={...Ri.classes,...An.classes};Ky.displayName="@mantine/core/MultiSelect";var bB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const zne={withCloseButton:!0},wB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Yt(n),"--notification-color":t?lt(t,e):void 0}}),Xy=De(e=>{const n=be("Notification",zne,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:c,icon:f,children:h,onClose:d,closeButtonProps:p,classNames:v,style:b,styles:w,unstyled:k,vars:_,mod:C,loaderProps:x,role:E,attributes:j,...O}=n,M=Xe({name:"Notification",classes:bB,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:j,vars:_,varsResolver:wB});return g.jsxs(he,{...M("root"),mod:[{"data-with-icon":!!f||a,"data-with-border":l},C],role:E||"alert",...O,children:[f&&!a&&g.jsx("div",{...M("icon"),children:f}),a&&g.jsx(ai,{size:28,color:i,...M("loader"),...x}),g.jsxs("div",{...M("body"),children:[c&&g.jsx("div",{...M("title"),children:c}),g.jsx(he,{...M("description"),mod:{"data-with-title":!!c},children:h})]}),o&&g.jsx(bl,{iconSize:16,color:"gray",...p,unstyled:k,onClick:N=>{var q;(q=p==null?void 0:p.onClick)==null||q.call(p,N),d==null||d()},...M("closeButton")})]})});Xy.classes=bB;Xy.varsResolver=wB;Xy.displayName="@mantine/core/Notification";function kB(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+AT("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function jT(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=qC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,c=parseFloat("0."+(o||"0")),f=o.length<=n?"0."+o:c.toFixed(n),h=f.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=SB(h[1]||"",n,t),v=l?"-":"",b=i?".":"";return""+v+d+b+p}function ou(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var AB=Lne(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),Hne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function Une(e,n,t){return Math.min(Math.max(e,n),t)}function Ek(e){return Math.max(e.selectionStart,e.selectionEnd)}function Vne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Wne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Gne(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function Yne(e,n,t,i,r,a,o){o===void 0&&(o=Gne);var l=r.findIndex(function(E){return E}),c=e.slice(0,l);!n&&!t.startsWith(c)&&(n=c,t=c+t,i=i+c.length);for(var f=t.length,h=e.length,d={},p=new Array(f),v=0;v0&&p[_]===-1;)_--;var x=_===-1||p[_]===-1?0:p[_]+1;return x>C?C:i-x=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function Kne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||OL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=Jne(x?"-"+e:e,r),e=(e.match(ete(b))||[]).join("");var F=e.indexOf(b);e=e.replace(new RegExp(xB(b),"g"),function(I,H){return H===F?".":""});var Y=qC(e,r),V=Y.beforeDecimal,$=Y.afterDecimal,P=Y.addNegation;return f.end-f.startW?!1:R>=ee.start&&Rt?t:e}function Qne(e){return e.toString().replace(".","").length}function Jne(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Mk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},kB=(e,{size:n})=>({controls:{"--ni-chevron-size":zn(n,"ni-chevron-size")}});function nte(e,n,t){const i=e.toString(),r=bB.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Ko(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function tte(e,n){if(e===""||e==="-")return e;const t=_h(e);return t===null?e:n.clampBehavior==="blur"?bg(t,n.min,n.max):t}const Jh=uy(e=>{const n=be("NumberInput",Mk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:c,value:f,defaultValue:h,max:d,min:p,step:v,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:C,allowDecimal:x,decimalScale:E,onKeyDown:O,onKeyDownCapture:j,handlersRef:M,startValue:N,disabled:q,rightSectionPointerEvents:P,allowNegative:L,readOnly:H,size:G,rightSectionWidth:U,stepHoldInterval:z,stepHoldDelay:D,allowLeadingZeros:$,withKeyboardEvents:B,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:R,selectAllOnFocus:W,onMinReached:V,onMaxReached:I,onFocus:X,attributes:ee,ref:re,...le}=n,ye=L??!0,ae=$??!0,ue=Xe({name:"NumberInput",classes:ES,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:kB}),{resolvedClassNames:xe,resolvedStyles:ne}=Wi({classNames:i,styles:r,props:n}),ze=A.useRef(jk(f)||jk(h)?"bigint":"number");jk(f)?ze.current="bigint":typeof f=="number"&&(ze.current="number");const we=ze.current==="bigint",[Oe,Ne]=Pi({value:f,defaultValue:h,finalValue:"",onChange:l}),ge=D!==void 0&&z!==void 0,Se=A.useRef(null),Pe=A.useRef(null),ce=A.useRef(0),Be=typeof p=="number"?p:void 0,Ye=typeof d=="number"?d:void 0,We=typeof v=="number"?v:Mk.step,Ze=typeof N=="number"?N:Mk.startValue,Qe=Bv(p),ie=Bv(d),ve=Bv(v)??BigInt(1),Ke=Bv(N)??BigInt(0),Je=Ie=>!wB(Ie,ye)||ae&&jT.test(Ie)?Ie:_h(Ie)??Ie,Ae=Ie=>{const Ue=Number(Ie);return Number.isSafeInteger(Ue)?Ue:void 0},rn=(Ie,Ue)=>{Ue.source==="event"&&Ne(we?Je(Ie.value):Jne(Ie.floatValue,Ie.value)&&!Xne.test(Ie.value)&&!(ae&&jT.test(Ie.value))&&!Zne.test(Ie.value)&&!bB.test(Ie.value)?Ie.floatValue:Ie.value),c==null||c(Ie,Ue)},fn=Ie=>{const Ue=String(Ie).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Ue?Math.max(0,(Ue[1]?Ue[1].length:0)-(Ue[2]?+Ue[2]:0)):0},En=Ie=>{Se.current&&typeof Ie<"u"&&Se.current.setSelectionRange(Ie,Ie)},pn=A.useRef(dS);pn.current=()=>{if(we){if(!Tk(Oe,ye))return;let en;const an=Oe;if(typeof an=="bigint"){const Yn=an+ve;ie!==void 0&&Yn>ie&&(I==null||I()),en=ie!==void 0&&Yn>ie?ie:Yn}else if(typeof an=="string"&&an!==""){const Yn=_h(an);if(Yn===null)return;const Nt=Yn+ve;ie!==void 0&&Nt>ie&&(I==null||I()),en=ie!==void 0&&Nt>ie?ie:Nt}else en=bg(Ke,Qe,ie);const Ln=en.toString();Ne(en),c==null||c({floatValue:Ae(en),formattedValue:Ln,value:Ln},{source:"increment"}),setTimeout(()=>{var Yn;return En((Yn=Se.current)==null?void 0:Yn.value.length)},0);return}if(!Ek(Oe))return;let Ie;const Ue=fn(Oe),$n=fn(We),at=Math.max(Ue,$n),Dn=10**at;if(!TS(Oe)&&(typeof Oe!="number"||Number.isNaN(Oe)))Ie=Ko(Ze,Be,Ye);else if(Ye!==void 0){const en=(Math.round(Number(Oe)*Dn)+Math.round(We*Dn))/Dn;en>Ye&&(I==null||I()),Ie=en<=Ye?en:Ye}else Ie=(Math.round(Number(Oe)*Dn)+Math.round(We*Dn))/Dn;const tn=Ie.toFixed(at);Ne(parseFloat(tn)),c==null||c({floatValue:parseFloat(tn),formattedValue:tn,value:tn},{source:"increment"}),setTimeout(()=>{var en;return En((en=Se.current)==null?void 0:en.value.length)},0)};const on=A.useRef(dS);on.current=()=>{if(we){if(!Tk(Oe,ye))return;let an;const Ln=Qe!==void 0?Qe:ye?void 0:BigInt(0),Yn=Oe;if(typeof Yn=="bigint"){const Tn=Yn-ve;Ln!==void 0&&Tn{var Tn;return En((Tn=Se.current)==null?void 0:Tn.value.length)},0);return}if(!Ek(Oe))return;let Ie;const Ue=Be!==void 0?Be:ye?Number.MIN_SAFE_INTEGER:0,$n=fn(Oe),at=fn(We),Dn=Math.max($n,at),tn=10**Dn;if(!TS(Oe)&&typeof Oe!="number"||Number.isNaN(Oe))Ie=Ko(Ze,Ue,Ye);else{const an=(Math.round(Number(Oe)*tn)-Math.round(We*tn))/tn;Ue!==void 0&&an{var an;return En((an=Se.current)==null?void 0:an.value.length)},0)};const nn=Ie=>{var Dn,tn,en;const Ue=Ie.clipboardData.getData("text"),$n=le.decimalSeparator||".",at=(R||[".",","]).filter(an=>an!==$n);if(at.some(an=>Ue.includes(an))){Ie.preventDefault();let an=Ue;at.forEach(Yn=>{an=an.split(Yn).join($n)});const Ln=Se.current;if(Ln){const Yn=Ln.selectionStart??0,Nt=Ln.selectionEnd??0,Tn=Ln.value,An=Tn.substring(0,Yn)+an+Tn.substring(Nt);(tn=(Dn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Dn.set)==null||tn.call(Ln,An),Ln.dispatchEvent(new Event("change",{bubbles:!0}));const Jn=Yn+an.length;setTimeout(()=>En(Jn),0)}}(en=le.onPaste)==null||en.call(le,Ie)},Nn=Ie=>{var Ue,$n;O==null||O(Ie),!(H||!B)&&(Ie.key==="ArrowUp"&&(Ie.preventDefault(),(Ue=pn.current)==null||Ue.call(pn)),Ie.key==="ArrowDown"&&(Ie.preventDefault(),($n=on.current)==null||$n.call(on)))},De=Ie=>{if(j==null||j(Ie),Ie.key==="Backspace"){const Ue=Se.current;Ue&&Ue.selectionStart===0&&Ue.selectionStart===Ue.selectionEnd&&(Ie.preventDefault(),window.setTimeout(()=>En(0),0))}},Fe=Ie=>{W&&setTimeout(()=>Ie.currentTarget.select(),0),X==null||X(Ie)},Mn=Ie=>{let Ue=Oe;we?(_==="blur"&&typeof Ue=="bigint"&&(Ue=bg(Ue,Qe,ie)),Y&&typeof Ue=="string"&&(Ue=tte(Ue,{min:Qe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof Ue=="number"&&(Ue=Ko(Ue,Be,Ye)),Y&&typeof Ue=="string"&&fn(Ue)<15&&(Ue=nte(Ue,Ye,Be))),Oe!==Ue&&Ne(Ue),C==null||C(Ie)};Eg(M,{increment:pn.current,decrement:on.current});const bn=Ie=>{var Ue,$n;Ie?(Ue=pn.current)==null||Ue.call(pn):($n=on.current)==null||$n.call(on),ce.current+=1},yn=Ie=>{if(bn(Ie),ge){const Ue=typeof z=="number"?z:z(ce.current);Pe.current=window.setTimeout(()=>yn(Ie),Ue)}},kn=(Ie,Ue)=>{var $n;Ie.preventDefault(),($n=Se.current)==null||$n.focus(),bn(Ue),ge&&(Pe.current=window.setTimeout(()=>yn(Ue),D))},ut=()=>{Pe.current&&window.clearTimeout(Pe.current),Pe.current=null,ce.current=0},jt=y.jsxs("div",{...ue("controls"),children:[y.jsx(Ot,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Oe=="number"&&Ye!==void 0&&Oe>=Ye||typeof Oe=="bigint"&&ie!==void 0&&Oe>=ie,mod:{direction:"up"},onMouseDown:Ie=>Ie.preventDefault(),onPointerDown:Ie=>{kn(Ie,!0)},onPointerUp:ut,onPointerLeave:ut,children:y.jsx(OT,{direction:"up"})}),y.jsx(Ot,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof Oe=="number"&&Be!==void 0&&Oe<=Be||typeof Oe=="bigint"&&Qe!==void 0&&Oe<=Qe,mod:{direction:"down"},onMouseDown:Ie=>Ie.preventDefault(),onPointerDown:Ie=>{kn(Ie,!1)},onPointerUp:ut,onPointerLeave:ut,children:y.jsx(OT,{direction:"down"})})]});return y.jsx(Gi,{component:Kne,allowNegative:L,className:dn(ES.root,t),size:G,...le,inputMode:we?"numeric":"decimal",readOnly:H,disabled:q,value:typeof Oe=="bigint"?Oe.toString():Oe,getInputRef:Gt(re,Se),onValueChange:rn,rightSection:b||H||!(we?Tk(Oe,ye):Ek(Oe))?w:w||jt,classNames:xe,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:we?0:x?E:0,onPaste:nn,onFocus:Fe,onKeyDown:Nn,onKeyDownCapture:De,rightSectionPointerEvents:P??(q?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:$,allowedDecimalSeparators:R,onBlur:Mn,attributes:ee,isAllowed:Ie=>{if(!(!k||k(Ie)))return!1;if(_!=="strict")return!0;if(!we)return ete(Ie.floatValue,Be,Ye);if(Ie.value===""||Ie.value==="-")return!0;const Ue=_h(Ie.value);return Ue===null?!0:(Qe===void 0||Ue>=Qe)&&(ie===void 0||Ue<=ie)}})});Jh.classes={...Gi.classes,...ES};Jh.varsResolver=kB;Jh.displayName="@mantine/core/NumberInput";function ite({reveal:e}){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),y.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var MS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const rte={visibilityToggleIcon:ite,size:"sm"},_B=(e,{size:n})=>({root:{"--psi-icon-size":zn(n,"psi-icon-size"),"--psi-button-size":zn(n,"psi-button-size")}}),Xy=Re(e=>{const n=be("PasswordInput",rte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:c,error:f,leftSection:h,disabled:d,id:p,variant:v,inputContainer:b,description:w,label:k,size:_,errorProps:C,descriptionProps:x,labelProps:E,withAsterisk:O,inputWrapperOrder:j,wrapperProps:M,radius:N,rightSection:q,rightSectionWidth:P,rightSectionPointerEvents:L,leftSectionWidth:H,visible:G,defaultVisible:U,onVisibilityChange:z,visibilityToggleIcon:D,visibilityToggleButtonProps:$,rightSectionProps:B,leftSectionProps:Y,leftSectionPointerEvents:R,withErrorStyles:W,mod:V,attributes:I,...X}=n,ee=Vi(p),[re,le]=Pi({value:G,defaultValue:U,finalValue:!1,onChange:z}),ye=()=>le(!re),ae=Xe({name:"PasswordInput",classes:MS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:I,vars:l,varsResolver:_B}),{resolvedClassNames:ue,resolvedStyles:xe}=Wi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:ze}=Du(X),we=(C==null?void 0:C.id)||`${ee}-error`,Oe=(x==null?void 0:x.id)||`${ee}-description`,Ne=`${f&&typeof f!="boolean"?we:""} ${w?Oe:""}`,ge=Ne.trim().length>0?Ne.trim():void 0,Se=y.jsx(wt,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...$,variant:($==null?void 0:$.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Pe=>{var ce;Pe.preventDefault(),(ce=$==null?void 0:$.onTouchEnd)==null||ce.call($,Pe),ye()},onMouseDown:Pe=>{var ce;Pe.preventDefault(),(ce=$==null?void 0:$.onMouseDown)==null||ce.call($,Pe),ye()},onKeyDown:Pe=>{var ce;(ce=$==null?void 0:$.onKeyDown)==null||ce.call($,Pe),Pe.key===" "&&(Pe.preventDefault(),ye())},children:y.jsx(D,{reveal:re})});return y.jsx(Vt.Wrapper,{required:c,id:ee,label:k,error:f,description:w,size:_,classNames:ue,styles:xe,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:O,inputWrapperOrder:j,inputContainer:b,variant:v,labelProps:{...E,htmlFor:ee},descriptionProps:{...x,id:Oe},errorProps:{...C,id:we},mod:V,attributes:I,...ae("root"),...ne,...M,children:y.jsx(Vt,{component:"div",error:f,leftSection:h,size:_,classNames:{...ue,input:dn(MS.input,ue==null?void 0:ue.input)},styles:xe,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:P,rightSection:q??Se,variant:v,unstyled:o,leftSectionWidth:H,rightSectionPointerEvents:L||"all",rightSectionProps:B,leftSectionProps:Y,leftSectionPointerEvents:R,withAria:!1,withErrorStyles:W,attributes:I,children:y.jsx("input",{required:c,"data-invalid":!!f||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...ze,"aria-describedby":ge,autoComplete:ze.autoComplete||"off",type:re?"text":"password"})})})});Xy.classes={...Gi.classes,...MS};Xy.varsResolver=_B;Xy.displayName="@mantine/core/PasswordInput";function ate({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:c,refs:f,update:h,placement:d}=rC({placement:n,middleware:[eC({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=A.useCallback(({clientX:w,clientY:k})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[c.reference]);return A.useEffect(()=>{if(f.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=Zo(f.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[c.reference,f.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:f.setFloating}}var Zy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const ote={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:wa("popover")},xB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Wt(n),"--tooltip-bg":t?lt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Qy=Re(e=>{const n=be("TooltipFloating",ote,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:c,unstyled:f,radius:h,color:d,label:p,offset:v,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:C,variant:x,vars:E,portalProps:O,attributes:j,ref:M,...N}=n,q=ui(),P=Xe({name:"TooltipFloating",props:n,classes:Zy,className:o,style:a,classNames:l,styles:c,unstyled:f,attributes:j,rootSelector:"tooltip",vars:E,varsResolver:xB}),{handleMouseMove:L,x:H,y:G,opened:U,boundaryRef:z,floating:D,setOpened:$}=ate({offset:v,position:b,defaultOpened:C}),B=Mu(t);if(!B)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Gt(z,sy(B),M),R=B.props,W=I=>{var X;(X=R.onMouseEnter)==null||X.call(R,I),L(I),$(!0)},V=I=>{var X;(X=R.onMouseLeave)==null||X.call(R,I),$(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...O,withinPortal:r,children:y.jsx(me,{...N,...P("tooltip",{style:{...Ez(a,q),zIndex:k,display:!_&&U?"block":"none",top:(G&&Math.round(G))??"",left:(H&&Math.round(H))??""}}),variant:x,ref:D,mod:{multiline:w},children:p})}),A.cloneElement(B,{...R,[i]:Y,onMouseEnter:W,onMouseLeave:V})]})});Qy.classes=Zy;Qy.varsResolver=xB;Qy.displayName="@mantine/core/TooltipFloating";const SB=A.createContext({withinGroup:!1}),ste={openDelay:0,closeDelay:0};function FC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",ste,e);return y.jsx(SB,{value:{withinGroup:!0},children:y.jsx(RQ,{delay:{open:n,close:t},children:i})})}FC.displayName="@mantine/core/TooltipGroup";FC.extend=e=>e;function lte(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function ute(e){const n=lte(e.middlewares),t=[tL(e.offset)];return n.shift&&t.push(eC(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Ng():Ng(n.flip)),t.push(iL({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Dh():Dh(n.inline)):e.inline&&t.push(Dh()),t}function cte(e){var E,O,j;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(SB).withinGroup,a=Vi(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:c,context:f,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=rC({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:ute(e),whileElementsMounted:xS}),{delay:b,currentId:w,setCurrentId:k}=PQ(f,{id:a}),{getReferenceProps:_,getFloatingProps:C}=BQ([MQ(f,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((O=e.events)!=null&&O.touch)}),IQ(f,{enabled:(j=e.events)==null?void 0:j.focus,visibleOnly:!0}),qQ(f,{role:"tooltip"}),zQ(f,{enabled:typeof e.opened>"u"})]);ts(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const x=i&&w&&w!==a;return{x:l,y:c,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:C,getReferenceProps:_,isGroupPhase:x,opened:i,placement:d}}const fte={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:wa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},CB=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Wt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Qt=Re(e=>{const n=be("Tooltip",fte,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:c,opened:f,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:b,styles:w,unstyled:k,style:_,className:C,withArrow:x,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,offset:N,transitionProps:q,multiline:P,events:L,zIndex:H,disabled:G,onClick:U,onMouseEnter:z,onMouseLeave:D,inline:$,variant:B,keepMounted:Y,vars:R,portalProps:W,mod:V,floatingStrategy:I,middlewares:X,autoContrast:ee,attributes:re,target:le,ref:ye,...ae}=n,{dir:ue}=Ru(),xe=A.useRef(null),ne=cte({position:hL(ue,i),closeDelay:l,openDelay:o,onPositionChange:c,opened:f,defaultOpened:h,events:L,arrowRef:xe,arrowOffset:O,offset:typeof N=="number"?N+(x?E/2:0):N,inline:$,strategy:I,middlewares:X});A.useEffect(()=>{const Pe=le instanceof HTMLElement?le:typeof le=="string"?document.querySelector(le):(le==null?void 0:le.current)||null;Pe&&ne.reference(Pe)},[le,ne]);const ze=Xe({name:"Tooltip",props:n,classes:Zy,className:C,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:R,varsResolver:CB}),we=Mu(t);if(!le&&!we)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Oe=ze("tooltip");if(le){const Pe=nT(q,{duration:100,transition:"fade"});return y.jsx(y.Fragment,{children:y.jsx(ul,{...W,withinPortal:d,children:y.jsx(rs,{...Pe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Pe.duration,children:ce=>y.jsxs(me,{...ae,"data-fixed":I==="fixed"||void 0,variant:B,mod:[{multiline:P},V],...Oe,...ne.getFloatingProps({ref:ne.floating,className:Oe.className,style:{...Oe.style,...ce,zIndex:H,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx($g,{ref:xe,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,...ze("arrow")})]})})})})}const Ne=we.props,ge=Gt(ne.reference,sy(we),ye),Se=nT(q,{duration:100,transition:"fade"});return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...W,withinPortal:d,children:y.jsx(rs,{...Se,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Se.duration,children:Pe=>y.jsxs(me,{...ae,"data-fixed":I==="fixed"||void 0,variant:B,mod:[{multiline:P},V],...ne.getFloatingProps({ref:ne.floating,className:ze("tooltip").className,style:{...ze("tooltip").style,...Pe,zIndex:H,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx($g,{ref:xe,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,...ze("arrow")})]})})}),A.cloneElement(we,ne.getReferenceProps({onClick:U,onMouseEnter:z,onMouseLeave:D,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ne,className:dn(C,Ne.className),[r]:ge}))]})});Qt.classes=Zy;Qt.varsResolver=CB;Qt.displayName="@mantine/core/Tooltip";Qt.Floating=Qy;Qt.Group=FC;const dte={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},ya=uy(e=>{const n=be("Select",dte,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:O,disabled:j,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:P,size:L,searchable:H,rightSection:G,checkIconPosition:U,withCheckIcon:z,withAlignedLabels:D,nothingFoundMessage:$,name:B,form:Y,searchValue:R,defaultSearchValue:W,onSearchChange:V,allowDeselect:I,error:X,rightSectionPointerEvents:ee,id:re,clearable:le,clearSectionMode:ye,clearButtonProps:ae,hiddenInputProps:ue,renderOption:xe,onClear:ne,autoComplete:ze,scrollAreaProps:we,__defaultRightSection:Oe,__clearSection:Ne,__clearable:ge,chevronColor:Se,autoSelectOnBlur:Pe,openOnFocus:ce,attributes:Be,...Ye}=n,We=A.useMemo(()=>xy(b),[b]),Ze=A.useRef({}),Qe=A.useMemo(()=>Qm(We),[We]),ie=Vi(re),[ve,Ke,Je]=Pi({value:w,defaultValue:k,finalValue:null,onChange:v}),Ae=ve!=null?`${ve}`in Qe?Qe[`${ve}`]:Ze.current[`${ve}`]:void 0,rn=RK(Ae),[fn,En,pn]=Pi({value:R,defaultValue:W,finalValue:Ae?Ae.label:"",onChange:V}),on=Lf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),C?on.selectFirstOption():on.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),setTimeout(on.resetSelectedOption,0)}}),nn=bn=>{En(bn),on.resetSelectedOption()},{resolvedClassNames:Nn,resolvedStyles:De}=Wi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&on.selectFirstOption()},[_,fn]),A.useEffect(()=>{w===null&&nn(""),w!=null&&Ae&&((rn==null?void 0:rn.value)!==Ae.value||(rn==null?void 0:rn.label)!==Ae.label)&&nn(Ae.label)},[w,Ae]),A.useEffect(()=>{var bn,yn;!Je&&!pn&&nn(ve!=null?`${ve}`in Qe?(bn=Qe[`${ve}`])==null?void 0:bn.label:((yn=Ze.current[`${ve}`])==null?void 0:yn.label)||"":"")},[Qe,ve]),A.useEffect(()=>{ve&&`${ve}`in Qe&&(Ze.current[`${ve}`]=Qe[`${ve}`])},[Qe,ve]);const Fe=y.jsx(Cn.ClearButton,{...ae,onClear:()=>{Ke(null,null),nn(""),ne==null||ne()}}),Mn=le&&!!ve&&!j&&!O;return y.jsxs(y.Fragment,{children:[y.jsxs(Cn,{store:on,__staticSelector:"Select",classNames:Nn,styles:De,unstyled:r,readOnly:O,size:L,attributes:Be,keepMounted:Pe,onOptionSubmit:bn=>{x==null||x(bn);const yn=I&&`${Qe[bn].value}`==`${ve}`?null:Qe[bn],kn=yn?yn.value:null;kn!==ve&&Ke(kn,yn),!Je&&nn(kn!=null&&(yn==null?void 0:yn.label)||""),on.closeDropdown()},...E,children:[y.jsx(Cn.Target,{targetType:H?"input":"button",autoComplete:ze,withExpandedAttribute:!0,children:y.jsx(Gi,{id:ie,__defaultRightSection:y.jsx(Cn.Chevron,{size:L,error:X,unstyled:r,color:Se}),__clearSection:Fe,__clearable:Mn,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:ee||"none",...Ye,size:L,__staticSelector:"Select",disabled:j,readOnly:O||!H,value:fn,onChange:bn=>{nn(bn.currentTarget.value),on.openDropdown(),_&&on.selectFirstOption()},onFocus:bn=>{ce&&H&&on.openDropdown(),h==null||h(bn)},onBlur:bn=>{Pe&&on.clickSelectedOption(),H&&on.closeDropdown();const yn=ve!=null&&(`${ve}`in Qe?Qe[`${ve}`]:Ze.current[`${ve}`]);nn(yn&&yn.label||""),d==null||d(bn)},onClick:bn=>{H?on.openDropdown():on.toggleDropdown(),p==null||p(bn)},classNames:Nn,styles:De,unstyled:r,pointer:!H,error:X,attributes:Be})}),y.jsx(Oy,{data:We,hidden:O||j,filter:M,search:fn,limit:N,hiddenWhenEmpty:!$,withScrollArea:q,maxDropdownHeight:P,filterOptions:!!H&&(Ae==null?void 0:Ae.label)!==fn,value:ve,checkIconPosition:U,withCheckIcon:z,withAlignedLabels:D,nothingFoundMessage:$,unstyled:r,labelId:Ye.label?`${ie}-label`:void 0,"aria-label":Ye.label?void 0:Ye["aria-label"],renderOption:xe,scrollAreaProps:we})]}),y.jsx(Cn.HiddenInput,{value:ve,name:B,form:Y,disabled:j,...ue})]})});ya.classes={...Gi.classes,...Cn.classes};ya.displayName="@mantine/core/Select";function AB(e){if(e!==void 0)return typeof e=="number"?he(e):e}function hte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ui(),l=n===void 0?e:n,c=i!==void 0,f=Tu({"--sg-spacing-x":Ht(Hr(e)),"--sg-spacing-y":Ht(Hr(l)),"--sg-auto-rows":r,...c?{"--sg-min-col-width":AB(i)}:{"--sg-cols":(d=Hr(t))==null?void 0:d.toString()}}),h=Rt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(l[v])),!c&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Rf,{styles:f,media:Wh(Rt(h),o.breakpoints).filter(p=>Rt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function Dk(e){return typeof e=="object"&&e!==null?Rt(e):[]}function mte(e){return e.sort((n,t)=>Vh(n)-Vh(t))}function pte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return mte(Array.from(new Set([...Dk(e),...Dk(n),...i!==void 0?[]:Dk(t)])))}function vte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,c=Tu({"--sg-spacing-x":Ht(Hr(e)),"--sg-spacing-y":Ht(Hr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":AB(i)}:{"--sg-cols":(d=Hr(t))==null?void 0:d.toString()}}),f=pte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=f.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Rf,{styles:c,container:f.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var OB={container:"m_925c2d2c",root:"m_2415a157"};const gte={cols:1,spacing:"md",type:"media"},Vo=Re(e=>{const n=be("SimpleGrid",gte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:c,verticalSpacing:f,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:b,attributes:w,...k}=n,_=Xe({name:"SimpleGrid",classes:OB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),C=ly(),x=p!==void 0?v||"auto-fill":void 0;return d==="container"?y.jsxs(y.Fragment,{children:[y.jsx(vte,{...n,selector:`.${C}`}),y.jsx("div",{..._("container"),children:y.jsx(me,{..._("root",{className:C}),...k,"data-auto-cols":x})})]}):y.jsxs(y.Fragment,{children:[y.jsx(hte,{...n,selector:`.${C}`}),y.jsx(me,{..._("root",{className:C}),...k,"data-auto-cols":x})]})});Vo.classes=OB;Vo.displayName="@mantine/core/SimpleGrid";var jB={root:"m_6d731127"};const yte={gap:"md",align:"stretch",justify:"flex-start"},EB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ht(n),"--stack-align":t,"--stack-justify":i}}),Hn=Re(e=>{const n=be("Stack",yte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:c,justify:f,gap:h,variant:d,attributes:p,...v}=n;return y.jsx(me,{...Xe({name:"Stack",props:n,classes:jB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:EB})("root"),variant:d,...v})});Hn.classes=jB;Hn.varsResolver=EB;Hn.displayName="@mantine/core/Stack";const[bte,wte]=Vr("Table component was not found in the tree");var ep={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function kte(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function Nu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Re(r=>{const a=be(t,{},r),{classNames:o,className:l,style:c,styles:f,...h}=a,d=wte();return y.jsx(me,{component:e,...kte(d,n),...d.getStyles(e,{className:l,classNames:o,style:c,styles:f,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=ep,i}const DS=Nu("th",{columnBorder:!0}),TB=Nu("td",{columnBorder:!0}),wg=Nu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),MB=Nu("thead",{stickyHeader:!0}),DB=Nu("tbody"),RB=Nu("tfoot"),PB=Nu("caption",{captionSide:!0}),_te={type:"scrollarea"},NB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":he(n),"--table-max-height":he(t),"--table-overflow":i==="native"?"auto":void 0}}),Jy=Re(e=>{const n=be("TableScrollContainer",_te,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,minWidth:f,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...b}=n,w=Xe({name:"TableScrollContainer",classes:ep,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:NB,rootSelector:"scrollContainer"});return y.jsx(me,{component:d==="scrollarea"?Wr:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:y.jsx("div",{...w("scrollContainerInner"),children:c})})});Jy.classes=ep;Jy.varsResolver=NB;Jy.displayName="@mantine/core/TableScrollContainer";function qC({data:e}){return y.jsxs(y.Fragment,{children:[e.caption&&y.jsx(PB,{children:e.caption}),e.head&&y.jsx(MB,{children:y.jsx(wg,{children:e.head.map((n,t)=>y.jsx(DS,{children:n},t))})}),e.body&&y.jsx(DB,{children:e.body.map((n,t)=>y.jsx(wg,{children:n.map((i,r)=>y.jsx(TB,{children:i},r))},t))}),e.foot&&y.jsx(RB,{children:y.jsx(wg,{children:e.foot.map((n,t)=>y.jsx(DS,{children:n},t))})})]})}qC.displayName="@mantine/core/TableDataRenderer";const xte={withRowBorders:!0,verticalSpacing:7},$B=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:c,highlightOnHover:f,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ht(i),"--table-vertical-spacing":Ht(r),"--table-border-color":a?lt(a,e):void 0,"--table-striped-color":c&&o?lt(o,e):void 0,"--table-highlight-on-hover-color":f&&l?lt(l,e):void 0,"--table-sticky-header-offset":d?he(h):void 0}}),gn=Re(e=>{const n=be("Table",xte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:c,verticalSpacing:f,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:C,layout:x,data:E,children:O,stickyHeader:j,stickyHeaderOffset:M,mod:N,tabularNums:q,attributes:P,...L}=n,H=Xe({name:"Table",props:n,className:i,style:r,classes:ep,classNames:t,styles:a,unstyled:o,attributes:P,rootSelector:"table",vars:l,varsResolver:$B});return y.jsx(bte,{value:{getStyles:H,stickyHeader:j,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:y.jsx(me,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},N],...H("table"),...L,children:O||!!E&&y.jsx(qC,{data:E})})})});gn.classes=ep;gn.varsResolver=$B;gn.displayName="@mantine/core/Table";gn.Td=TB;gn.Th=DS;gn.Tr=wg;gn.Thead=MB;gn.Tbody=DB;gn.Tfoot=RB;gn.Caption=PB;gn.ScrollContainer=Jy;gn.DataRenderer=qC;const[Ste,HC]=Vr("Tabs component was not found in the tree");var np={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const UC=Re(e=>{const n=be("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:c,mod:f,...h}=n,d=HC();return y.jsx(me,{...d.getStyles("list",{className:i,style:c,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},f],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});UC.classes=np;UC.displayName="@mantine/core/TabsList";const VC=Re(e=>{const n=be("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:c,keepMounted:f,...h}=n,d=Hm(),p=HC(),v=p.value===r,b=p.keepMounted||f,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?y.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):b||v?t:null;return y.jsx(me,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},c],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});VC.classes=np;VC.displayName="@mantine/core/TabsPanel";const WC=Re(e=>{const n=be("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:c,disabled:f,color:h,style:d,classNames:p,styles:v,vars:b,mod:w,tabIndex:k,..._}=n,C=ui(),{dir:x}=Ru(),E=HC(),O=o===E.value,j=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},M={classNames:p,styles:v,props:n};return y.jsxs(Ot,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...M}),disabled:f,unstyled:E.unstyled,variant:E.variant,mod:[{active:O,disabled:f,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},w],role:"tab",id:E.getTabId(o),"aria-selected":O,tabIndex:k!==void 0?k:O||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:j,__vars:{"--tabs-color":h?lt(h,C):void 0},onKeyDown:$6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:x,onKeyDown:c}),..._,children:[a&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"left",children:a}),i&&y.jsx("span",{...E.getStyles("tabLabel",M),children:i}),r&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"right",children:r})]})});WC.classes=np;WC.displayName="@mantine/core/TabsTab";const ET="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Cte={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},zB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Wt(n),"--tabs-color":lt(t,e),"--tabs-text-color":qm(i,e)?Df({color:t,theme:e,autoContrast:i}):void 0}}),Ci=Re(e=>{const n=be("Tabs",Cte,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:c,activateTabWithKeyboard:f,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:C,styles:x,unstyled:E,className:O,style:j,vars:M,autoContrast:N,mod:q,attributes:P,...L}=n,H=Vi(c),[G,U]=Pi({value:i,defaultValue:t,finalValue:null,onChange:r}),z=Xe({name:"Tabs",props:n,classes:np,className:O,style:j,classNames:C,styles:x,unstyled:E,attributes:P,vars:M,varsResolver:zB});return y.jsx(Ste,{value:{placement:w,value:G,orientation:a,id:H,loop:l,activateTabWithKeyboard:f,getTabId:w5(`${H}-tab`,ET),getPanelId:w5(`${H}-panel`,ET),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:z},children:y.jsx(me,{id:H,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},q],...z("root"),...L,children:o})})});Ci.classes=np;Ci.varsResolver=zB;Ci.displayName="@mantine/core/Tabs";Ci.Tab=WC;Ci.Panel=VC;Ci.List=UC;function Ate({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(yu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function Ote(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function TT({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Ote(e,i),c=[];if(n)c.push(...r,...l);else{c.push(...r);for(const f of l)(a?h=>a(h,c):h=>c.some(d=>d.toLowerCase()===h.toLowerCase()))(f)?o==null||o(f):c.push(f)}return t?c.slice(0,t):c}const jte={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},GC=Re(e=>{const n=be("TagsInput",jte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,value:f,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:C,defaultDropdownOpened:x,onDropdownOpen:E,onDropdownClose:O,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:N,comboboxProps:q,filter:P,limit:L,withScrollArea:H,maxDropdownHeight:G,searchValue:U,defaultSearchValue:z,onSearchChange:D,readOnly:$,disabled:B,splitChars:Y,onFocus:R,onBlur:W,onPaste:V,radius:I,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:xe,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Oe,labelProps:Ne,descriptionProps:ge,errorProps:Se,wrapperProps:Pe,description:ce,label:Be,error:Ye,withErrorStyles:We,name:Ze,form:Qe,id:ie,clearable:ve,clearSectionMode:Ke,clearButtonProps:Je,hiddenInputProps:Ae,hiddenInputValuesDivider:rn,mod:fn,renderOption:En,renderPill:pn,onRemove:on,onClear:nn,onMaxTags:Nn,scrollAreaProps:De,acceptValueOnBlur:Fe,isDuplicate:Mn,openOnFocus:bn,attributes:yn,ref:kn,loading:ut,loadingPosition:jt,...Ie}=n,Ue=Vi(ie),$n=xy(_),at=Qm($n),Dn=A.useRef(null),tn=Gt(Dn,kn),en=Lf({opened:C,defaultOpened:x,onDropdownOpen:()=>{E==null||E(),M&&en.selectFirstOption()},onDropdownClose:()=>{O==null||O(),en.resetSelectedOption()}}),{styleProps:an,rest:{type:Ln,autoComplete:Yn,...Nt}}=Du(Ie),[Tn,An]=Pi({value:f,defaultValue:h,finalValue:[],onChange:d}),[Jn,Yt]=Pi({value:U,defaultValue:z,finalValue:"",onChange:D}),ci=hn=>{Yt(hn),en.resetSelectedOption()},ir=Xe({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Gr,resolvedStyles:Yr}=Wi({props:n,styles:a,classNames:t}),Aa=hn=>{if((Mn?Mn(hn,Tn):Tn.some(fi=>fi.toLowerCase()===hn.toLowerCase()))&&(w==null||w(hn),!b)){ci("");return}if(Tn.length>=v){Nn==null||Nn(hn);return}N==null||N(hn),ci(""),hn.length>0&&An([...Tn,hn])},Oa=hn=>{if(p==null||p(hn),hn.isPropagationStopped())return;const fi=Jn.trim(),{length:un}=fi;if(Y.includes(hn.key)&&un>0&&(An(TT({splitChars:Y,allowDuplicates:b,maxTags:v,value:Jn,currentTags:Tn,isDuplicate:Mn,onDuplicate:w})),ci(""),hn.preventDefault()),hn.key==="Enter"&&un>0&&!hn.nativeEvent.isComposing){if(hn.preventDefault(),document.querySelector(`#${en.listId} [data-combobox-option][data-combobox-selected]`))return;Aa(fi)}hn.key==="Backspace"&&un===0&&Tn.length>0&&!hn.nativeEvent.isComposing&&!$&&(on==null||on(Tn[Tn.length-1]),An(Tn.slice(0,Tn.length-1)))},_o=hn=>{V==null||V(hn),hn.preventDefault(),hn.clipboardData&&(An(TT({splitChars:Y,allowDuplicates:b,maxTags:v,value:`${Jn}${hn.clipboardData.getData("text/plain")}`,currentTags:Tn,isDuplicate:Mn,onDuplicate:w})),ci(""))},Kr=Tn.map((hn,fi)=>{const un=()=>{const Ar=Tn.slice();Ar.splice(fi,1),An(Ar),on==null||on(hn)};return pn?y.jsx(A.Fragment,{children:pn({option:at[hn]||{value:hn,label:hn,disabled:!1},value:hn,onRemove:un,disabled:B||$})},`${hn}-${fi}`):y.jsx(fl,{withRemoveButton:!$,onRemove:un,unstyled:o,disabled:B,attributes:yn,...ir("pill"),children:hn},`${hn}-${fi}`)});A.useEffect(()=>{j&&en.selectFirstOption()},[j,Tn,Jn]);const Cr=y.jsx(Cn.ClearButton,{...Je,onClear:()=>{var hn;An([]),ci(""),(hn=Dn.current)==null||hn.focus(),en.openDropdown(),nn==null||nn()}});return y.jsxs(y.Fragment,{children:[y.jsxs(Cn,{store:en,classNames:Gr,styles:Yr,unstyled:o,size:c,readOnly:$,__staticSelector:"TagsInput",attributes:yn,onOptionSubmit:hn=>{N==null||N(hn),ci(""),Tn.length>=v?Nn==null||Nn(hn):An([...Tn,at[hn].value]),en.resetSelectedOption()},...q,children:[y.jsx(Cn.DropdownTarget,{children:y.jsx(wu,{...an,__staticSelector:"TagsInput",classNames:Gr,styles:Yr,unstyled:o,size:c,className:i,style:r,variant:k,disabled:B,radius:I,rightSection:X,__clearSection:Cr,__clearable:ve&&Tn.length>0&&!B&&!$,__clearSectionMode:Ke,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:xe,loading:ut,loadingPosition:jt,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Oe,labelProps:Ne,descriptionProps:ge,errorProps:Se,wrapperProps:Pe,description:ce,label:Be,error:Ye,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Ue,mod:fn,attributes:yn,children:y.jsxs(fl.Group,{disabled:B,unstyled:o,...ir("pillsList"),children:[Kr,y.jsx(Cn.EventsTarget,{autoComplete:Yn,withExpandedAttribute:!0,children:y.jsx(wu.Field,{...Nt,ref:tn,...ir("inputField"),unstyled:o,onKeyDown:Oa,onFocus:hn=>{R==null||R(hn),bn&&en.openDropdown()},onBlur:hn=>{W==null||W(hn),Fe&&Aa(Jn),en.closeDropdown()},onPaste:_o,value:Jn,onChange:hn=>ci(hn.currentTarget.value),required:Oe&&Tn.length===0,disabled:B,readOnly:$,id:Ue})})]})})}),y.jsx(Oy,{data:Ate({data:$n,value:Tn}),hidden:$||B,filter:P,search:Jn,limit:L,hiddenWhenEmpty:!0,withScrollArea:H,maxDropdownHeight:G,unstyled:o,labelId:Be?`${Ue}-label`:void 0,"aria-label":Be?void 0:Ie["aria-label"],renderOption:En,scrollAreaProps:De})]}),y.jsx(Cn.HiddenInput,{name:Ze,form:Qe,value:Tn,valuesDivider:rn,disabled:B,...Ae})]})});GC.classes={...Gi.classes,...Cn.classes};GC.displayName="@mantine/core/TagsInput";const dl=Re(e=>y.jsx(Gi,{component:"input",...be("TextInput",null,e),__staticSelector:"TextInput"}));dl.classes=Gi.classes;dl.displayName="@mantine/core/TextInput";const[Ete,Tte]=Vr("Timeline component was not found in tree");var YC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const KC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:c,__vars:f,bullet:h,radius:d,color:p,lineVariant:v,children:b,title:w,mod:k,..._}=be("TimelineItem",null,e),C=Tte(),x=ui(),E={classNames:n,styles:r};return y.jsxs(me,{...C.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":c,active:o},k],__vars:{"--tli-radius":d!==void 0?Wt(d):void 0,"--tli-color":p?lt(p,x):void 0,"--tli-border-style":v||void 0},..._,children:[y.jsx(me,{...C.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),y.jsxs("div",{...C.getStyles("itemBody",E),children:[w&&y.jsx("div",{...C.getStyles("itemTitle",E),children:w}),y.jsx("div",{...C.getStyles("itemContent",E),children:b})]})]})});KC.classes=YC;KC.displayName="@mantine/core/TimelineItem";const Mte={active:-1,align:"left"},LB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":he(n),"--tl-line-width":he(t),"--tl-radius":i===void 0?void 0:Wt(i),"--tl-color":r?lt(r,e):void 0,"--tl-icon-color":qm(a,e)?Df({color:r,theme:e,autoContrast:a}):void 0}}),tf=Re(e=>{const n=be("Timeline",Mte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,active:f,color:h,radius:d,bulletSize:p,align:v,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:C,...x}=n,E=Xe({name:"Timeline",classes:YC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:LB}),O=A.Children.toArray(c),j=O.map((M,N)=>{var q,P;return A.cloneElement(M,{unstyled:o,__align:v,__active:((q=M.props)==null?void 0:q.active)||(w?f>=O.length-N-1:f>=N),__lineActive:((P=M.props)==null?void 0:P.lineActive)||(w?f>=O.length-N-1:f-1>=N)})});return y.jsx(Ete,{value:{getStyles:E},children:y.jsx(me,{...E("root"),mod:[{align:v},k],...x,children:j})})});tf.classes=YC;tf.varsResolver=LB;tf.displayName="@mantine/core/Timeline";tf.Item=KC;const Dte=["h1","h2","h3","h4","h5","h6"],Rte=["xs","sm","md","lg","xl"];function Pte(e,n){const t=n!==void 0?n:`h${e}`;return Dte.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:Rte.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:he(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var IB={root:"m_8a5d1357"};const Nte={order:1},BB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=Pte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},yl=Re(e=>{const n=be("Title",Nte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:c,size:f,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:b,...w}=n,k=Xe({name:"Title",props:n,classes:IB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:c,varsResolver:BB});return[1,2,3,4,5,6].includes(l)?y.jsx(me,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:f,...w}):null});yl.classes=IB;yl.varsResolver=BB;yl.displayName="@mantine/core/Title";const XC=A.createContext(null);XC.displayName="@mantine/modals/ModalsContext";function $te(){const e=A.use(XC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[zte,$u]=$K("mantine-modals"),Lte=e=>{const n=e.modalId||al();return $u("openModal")({...e,modalId:n}),n},Ite=e=>{const n=e.modalId||al();return $u("openConfirmModal")({...e,modalId:n}),n},Bte=e=>{const n=e.modalId||al();return $u("openContextModal")({...e,modalId:n}),n},Fte=$u("closeModal"),qte=$u("closeAllModals"),Hte=e=>$u("updateModal")(e),Ute=e=>$u("updateContextModal")(e),Ra={open:Lte,close:Fte,closeAll:qte,openConfirmModal:Ite,openContextModal:Bte,updateModal:Hte,updateContextModal:Ute};function Vte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:c,children:f}){const{cancel:h,confirm:d}=i,p=$te(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},b=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof c=="function"&&c(),r&&p.closeModal(e)};return y.jsxs(y.Fragment,{children:[f&&y.jsx(me,{mb:"md",children:f}),y.jsxs(He,{mt:f?0:"md",justify:"flex-end",...o,children:[y.jsx(gt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),y.jsx(gt,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function MT(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function Wte(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function Gte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:c,groupProps:f,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:c,groupProps:f,labels:h},modalProps:{id:n,...d}}}function Yte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(Wte,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),c=A.useCallback(x=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{MT(E,x)}),l.current=!1),a({type:"CLOSE_ALL",canceled:x})},[o,a]),f=A.useCallback(({modalId:x,...E})=>{const O=x||al();return a({type:"OPEN",modal:{id:O,type:"content",props:E}}),O},[a]),h=A.useCallback(({modalId:x,...E})=>{const O=x||al();return a({type:"OPEN",modal:{id:O,type:"confirm",props:E}}),O},[a]),d=A.useCallback((x,{modalId:E,...O})=>{const j=E||al();return a({type:"OPEN",modal:{id:j,type:"context",props:O,ctx:x}}),j},[a]),p=A.useCallback((x,E)=>{if(!l.current){const O=o.current.modals.find(j=>j.id===x);O&&(l.current=!0,MT(O,E),l.current=!1)}a({type:"CLOSE",modalId:x,canceled:E})},[o,a]),v=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]),b=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]);zte({openModal:f,openConfirmModal:h,openContextModal:({modal:x,...E})=>d(x,E),closeModal:p,closeContextModal:p,closeAllModals:c,updateModal:v,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:f,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:c,updateModal:v,updateContextModal:b},k=()=>{const x=o.current.current;switch(x==null?void 0:x.type){case"context":{const{innerProps:E,...O}=x.props,j=i[x.ctx];return{modalProps:O,content:y.jsx(j,{innerProps:E,context:w,id:x.id})}}case"confirm":{const{modalProps:E,confirmProps:O}=Gte(x.props);return{modalProps:E,content:y.jsx(Vte,{...O,id:x.id,labels:x.props.labels||t})}}case"content":{const{children:E,...O}=x.props;return{modalProps:O,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:C}=k();return y.jsxs(XC,{value:w,children:[y.jsx(_r,{zIndex:wa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var x;return p((x=r.current)==null?void 0:x.id)},children:C}),e]})}function Kte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function Xte(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Zte(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const Qte=()=>Kte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),zu=Qte(),Jte=(e=zu)=>Xte(e);function Wf(e,n){const t=e.getState(),i=Zte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function eie(e,n=zu){const t=e.id||al();return Wf(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function FB(e,n=zu){return Wf(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function nie(e,n=zu){return Wf(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function tie(e=zu){Wf(e,()=>[])}function iie(e=zu){Wf(e,n=>n.slice(0,e.getState().limit))}const Pn={show:eie,hide:FB,update:nie,clean:tie,cleanQueue:iie,updateState:Wf},qB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function rie(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),qB.reduce((t,i)=>(t[i]=[],t),{}))}const DT={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},aie={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function oie({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:DT[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},c={opacity:1,transform:aie[o]},f={opacity:0,maxHeight:0,transform:DT[o]};return{...l,...{entering:c,entered:c,exiting:f,exited:f}[e]}}function sie(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function HB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:c,onOpen:f,...h}=e,d=sie(t,e.autoClose),p=A.useRef(-1),[v,b]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},C=()=>{b(!0),r==null||r()},x=()=>{b(!1),a==null||a()};return A.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),y.jsx(Yy,{...o,...h,onClose:k,onMouseEnter:C,onMouseLeave:x,children:c})}HB.displayName="@mantine/notifications/NotificationContainer";var UB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function RS(){return RS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":he(t)}}),bo=Re(e=>{const n=be("Notifications",wie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,position:f,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:C,pauseResetOnHover:x,...E}=n,O=ui(),j=Jte(k),M=MK(),N=I6(),q=A.useRef({}),P=A.useRef(0),[L,H]=A.useState(0),G=A.useCallback(()=>H(Y=>Y+1),[]),U=A.useCallback(()=>H(Y=>Math.max(0,Y-1)),[]),z=O.respectReducedMotion&&N?1:d,D=Xe({name:"Notifications",classes:UB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:GB});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:f}))},[b,f]),ts(()=>{j.notifications.length>P.current&&setTimeout(()=>M(),0),P.current=j.notifications.length},[j.notifications]);const $=rie(j.notifications,f),B=qB.reduce((Y,R)=>(Y[R]=$[R].map(({style:W,...V})=>y.jsx(bie,{timeout:z,onEnter:()=>q.current[V.id].offsetHeight,nodeRef:{current:q.current[V.id]},children:I=>y.jsx(HB,{ref:X=>{X&&(q.current[V.id]=X)},data:V,onHide:X=>FB(X,k),autoClose:h,paused:x==="all"?L>0:!1,onHoverStart:G,onHoverEnd:U,...D("notification",{style:{...oie({state:I,position:R,transitionDuration:z,maxHeight:v}),...W}})})},V.id)),Y),{});return y.jsxs(ul,{withinPortal:C,..._,children:[y.jsx(me,{...D("root"),"data-position":"top-center",...E,children:y.jsx(Gs,{children:B["top-center"]})}),y.jsx(me,{...D("root"),"data-position":"top-left",...E,children:y.jsx(Gs,{children:B["top-left"]})}),y.jsx(me,{...D("root",{className:gu.classNames.fullWidth}),"data-position":"top-right",...E,children:y.jsx(Gs,{children:B["top-right"]})}),y.jsx(me,{...D("root",{className:gu.classNames.fullWidth}),"data-position":"bottom-right",...E,children:y.jsx(Gs,{children:B["bottom-right"]})}),y.jsx(me,{...D("root"),"data-position":"bottom-left",...E,children:y.jsx(Gs,{children:B["bottom-left"]})}),y.jsx(me,{...D("root"),"data-position":"bottom-center",...E,children:y.jsx(Gs,{children:B["bottom-center"]})})]})});bo.classes=UB;bo.varsResolver=GB;bo.displayName="@mantine/notifications/Notifications";bo.show=Pn.show;bo.hide=Pn.hide;bo.update=Pn.update;bo.clean=Pn.clean;bo.cleanQueue=Pn.cleanQueue;bo.updateState=Pn.updateState;var $k={exports:{}},ih={},zk={exports:{}},Lk={};/** + `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function ate(e){e=rte(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var n=e.suffix,t=e.allowNegative,i=e.allowLeadingZeros,r=e.onKeyDown;r===void 0&&(r=nl);var a=e.onBlur;a===void 0&&(a=nl);var o=e.thousandSeparator,l=e.decimalScale,c=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var h=e.defaultValue,d=e.value,p=e.valueIsNumericString,v=e.onValueChange,b=kB(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),w=Zy(e),k=w.decimalSeparator,_=w.allowedDecimalSeparators,C=function(P){return ET(P,e)},x=function(P,I){return tte(P,I,e)},E=rl(d)?h:d,j=p??nte(E,f,n);rl(d)?rl(h)||(j=j||typeof h=="number"):j=j||typeof d=="number";var O=function(P){return _B(P)?P:(typeof P=="number"&&(P=CB(P)),j&&typeof l=="number"?jT(P,l,!!c):P)},M=jB(O(d),O(h),!!j,C,x,v),N=M[0],q=N.numAsString,R=N.formattedValue,L=M[1],F=function(P){var I=P.target,H=P.key,U=I.selectionStart,D=I.selectionEnd,W=I.value;if(W===void 0&&(W=""),(H==="Backspace"||H==="Delete")&&DW?!1:D>=ee.start&&Dt?t:e}function ute(e){return e.toString().replace(".","").length}function cte(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Rk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},TB=(e,{size:n})=>({controls:{"--ni-chevron-size":Bn(n,"ni-chevron-size")}});function dte(e,n,t){const i=e.toString(),r=OB.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=ns(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function hte(e,n){if(e===""||e==="-")return e;const t=Ch(e);return t===null?e:n.clampBehavior==="blur"?_g(t,n.min,n.max):t}const tm=fy(e=>{const n=be("NumberInput",Rk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:c,value:f,defaultValue:h,max:d,min:p,step:v,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:C,allowDecimal:x,decimalScale:E,onKeyDown:j,onKeyDownCapture:O,handlersRef:M,startValue:N,disabled:q,rightSectionPointerEvents:R,allowNegative:L,readOnly:F,size:Y,rightSectionWidth:V,stepHoldInterval:$,stepHoldDelay:P,allowLeadingZeros:I,withKeyboardEvents:H,trimLeadingZeroesOnBlur:U,allowedDecimalSeparators:D,selectAllOnFocus:W,onMinReached:G,onMaxReached:z,onFocus:X,attributes:ee,ref:re,...le}=n,ye=L??!0,ae=I??!0,ue=Xe({name:"NumberInput",classes:MS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:TB}),{resolvedClassNames:Se,resolvedStyles:ne}=Wi({classNames:i,styles:r,props:n}),Le=A.useRef(Tk(f)||Tk(h)?"bigint":"number");Tk(f)?Le.current="bigint":typeof f=="number"&&(Le.current="number");const ke=Le.current==="bigint",[je,Ne]=Ci({value:f,defaultValue:h,finalValue:"",onChange:l}),ge=P!==void 0&&$!==void 0,Ce=A.useRef(null),Pe=A.useRef(null),ce=A.useRef(0),qe=typeof p=="number"?p:void 0,Ye=typeof d=="number"?d:void 0,We=typeof v=="number"?v:Rk.step,Ze=typeof N=="number"?N:Rk.startValue,Qe=Hv(p),ie=Hv(d),ve=Hv(v)??BigInt(1),Ke=Hv(N)??BigInt(0),Je=Be=>!EB(Be,ye)||ae&&MT.test(Be)?Be:Ch(Be)??Be,Ae=Be=>{const Ue=Number(Be);return Number.isSafeInteger(Ue)?Ue:void 0},an=(Be,Ue)=>{Ue.source==="event"&&Ne(ke?Je(Be.value):cte(Be.floatValue,Be.value)&&!ste.test(Be.value)&&!(ae&&MT.test(Be.value))&&!lte.test(Be.value)&&!OB.test(Be.value)?Be.floatValue:Be.value),c==null||c(Be,Ue)},mn=Be=>{const Ue=String(Be).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Ue?Math.max(0,(Ue[1]?Ue[1].length:0)-(Ue[2]?+Ue[2]:0)):0},En=Be=>{Ce.current&&typeof Be<"u"&&Ce.current.setSelectionRange(Be,Be)},vn=A.useRef(mS);vn.current=()=>{if(ke){if(!Dk(je,ye))return;let tn;const on=je;if(typeof on=="bigint"){const Gn=on+ve;ie!==void 0&&Gn>ie&&(z==null||z()),tn=ie!==void 0&&Gn>ie?ie:Gn}else if(typeof on=="string"&&on!==""){const Gn=Ch(on);if(Gn===null)return;const _t=Gn+ve;ie!==void 0&&_t>ie&&(z==null||z()),tn=ie!==void 0&&_t>ie?ie:_t}else tn=_g(Ke,Qe,ie);const In=tn.toString();Ne(tn),c==null||c({floatValue:Ae(tn),formattedValue:In,value:In},{source:"increment"}),setTimeout(()=>{var Gn;return En((Gn=Ce.current)==null?void 0:Gn.value.length)},0);return}if(!Mk(je))return;let Be;const Ue=mn(je),Ln=mn(We),ut=Math.max(Ue,Ln),Pn=10**ut;if(!DS(je)&&(typeof je!="number"||Number.isNaN(je)))Be=ns(Ze,qe,Ye);else if(Ye!==void 0){const tn=(Math.round(Number(je)*Pn)+Math.round(We*Pn))/Pn;tn>Ye&&(z==null||z()),Be=tn<=Ye?tn:Ye}else Be=(Math.round(Number(je)*Pn)+Math.round(We*Pn))/Pn;const rn=Be.toFixed(ut);Ne(parseFloat(rn)),c==null||c({floatValue:parseFloat(rn),formattedValue:rn,value:rn},{source:"increment"}),setTimeout(()=>{var tn;return En((tn=Ce.current)==null?void 0:tn.value.length)},0)};const sn=A.useRef(mS);sn.current=()=>{if(ke){if(!Dk(je,ye))return;let on;const In=Qe!==void 0?Qe:ye?void 0:BigInt(0),Gn=je;if(typeof Gn=="bigint"){const Rn=Gn-ve;In!==void 0&&Rn{var Rn;return En((Rn=Ce.current)==null?void 0:Rn.value.length)},0);return}if(!Mk(je))return;let Be;const Ue=qe!==void 0?qe:ye?Number.MIN_SAFE_INTEGER:0,Ln=mn(je),ut=mn(We),Pn=Math.max(Ln,ut),rn=10**Pn;if(!DS(je)&&typeof je!="number"||Number.isNaN(je))Be=ns(Ze,Ue,Ye);else{const on=(Math.round(Number(je)*rn)-Math.round(We*rn))/rn;Ue!==void 0&&on{var on;return En((on=Ce.current)==null?void 0:on.value.length)},0)};const en=Be=>{var Pn,rn,tn;const Ue=Be.clipboardData.getData("text"),Ln=le.decimalSeparator||".",ut=(D||[".",","]).filter(on=>on!==Ln);if(ut.some(on=>Ue.includes(on))){Be.preventDefault();let on=Ue;ut.forEach(Gn=>{on=on.split(Gn).join(Ln)});const In=Ce.current;if(In){const Gn=In.selectionStart??0,_t=In.selectionEnd??0,Rn=In.value,Tn=Rn.substring(0,Gn)+on+Rn.substring(_t);(rn=(Pn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Pn.set)==null||rn.call(In,Tn),In.dispatchEvent(new Event("change",{bubbles:!0}));const Kn=Gn+on.length;setTimeout(()=>En(Kn),0)}}(tn=le.onPaste)==null||tn.call(le,Be)},zn=Be=>{var Ue,Ln;j==null||j(Be),!(F||!H)&&(Be.key==="ArrowUp"&&(Be.preventDefault(),(Ue=vn.current)==null||Ue.call(vn)),Be.key==="ArrowDown"&&(Be.preventDefault(),(Ln=sn.current)==null||Ln.call(sn)))},Re=Be=>{if(O==null||O(Be),Be.key==="Backspace"){const Ue=Ce.current;Ue&&Ue.selectionStart===0&&Ue.selectionStart===Ue.selectionEnd&&(Be.preventDefault(),window.setTimeout(()=>En(0),0))}},He=Be=>{W&&setTimeout(()=>Be.currentTarget.select(),0),X==null||X(Be)},Dn=Be=>{let Ue=je;ke?(_==="blur"&&typeof Ue=="bigint"&&(Ue=_g(Ue,Qe,ie)),U&&typeof Ue=="string"&&(Ue=hte(Ue,{min:Qe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof Ue=="number"&&(Ue=ns(Ue,qe,Ye)),U&&typeof Ue=="string"&&mn(Ue)<15&&(Ue=dte(Ue,Ye,qe))),je!==Ue&&Ne(Ue),C==null||C(Be)};Dg(M,{increment:vn.current,decrement:sn.current});const kn=Be=>{var Ue,Ln;Be?(Ue=vn.current)==null||Ue.call(vn):(Ln=sn.current)==null||Ln.call(sn),ce.current+=1},bn=Be=>{if(kn(Be),ge){const Ue=typeof $=="number"?$:$(ce.current);Pe.current=window.setTimeout(()=>bn(Be),Ue)}},_n=(Be,Ue)=>{var Ln;Be.preventDefault(),(Ln=Ce.current)==null||Ln.focus(),kn(Ue),ge&&(Pe.current=window.setTimeout(()=>bn(Ue),P))},ft=()=>{Pe.current&&window.clearTimeout(Pe.current),Pe.current=null,ce.current=0},Tt=g.jsxs("div",{...ue("controls"),children:[g.jsx(Et,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof je=="number"&&Ye!==void 0&&je>=Ye||typeof je=="bigint"&&ie!==void 0&&je>=ie,mod:{direction:"up"},onMouseDown:Be=>Be.preventDefault(),onPointerDown:Be=>{_n(Be,!0)},onPointerUp:ft,onPointerLeave:ft,children:g.jsx(TT,{direction:"up"})}),g.jsx(Et,{...ue("control"),tabIndex:-1,"aria-hidden":!0,disabled:q||typeof je=="number"&&qe!==void 0&&je<=qe||typeof je=="bigint"&&Qe!==void 0&&je<=Qe,mod:{direction:"down"},onMouseDown:Be=>Be.preventDefault(),onPointerDown:Be=>{_n(Be,!1)},onPointerUp:ft,onPointerLeave:ft,children:g.jsx(TT,{direction:"down"})})]});return g.jsx(Ri,{component:ote,allowNegative:L,className:pn(MS.root,t),size:Y,...le,inputMode:ke?"numeric":"decimal",readOnly:F,disabled:q,value:typeof je=="bigint"?je.toString():je,getInputRef:Kt(re,Ce),onValueChange:an,rightSection:b||F||!(ke?Dk(je,ye):Mk(je))?w:w||Tt,classNames:Se,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:ke?0:x?E:0,onPaste:en,onFocus:He,onKeyDown:zn,onKeyDownCapture:Re,rightSectionPointerEvents:R??(q?"none":void 0),rightSectionWidth:V??`var(--ni-right-section-width-${Y||"sm"})`,allowLeadingZeros:I,allowedDecimalSeparators:D,onBlur:Dn,attributes:ee,isAllowed:Be=>{if(!(!k||k(Be)))return!1;if(_!=="strict")return!0;if(!ke)return fte(Be.floatValue,qe,Ye);if(Be.value===""||Be.value==="-")return!0;const Ue=Ch(Be.value);return Ue===null?!0:(Qe===void 0||Ue>=Qe)&&(ie===void 0||Ue<=ie)}})});tm.classes={...Ri.classes,...MS};tm.varsResolver=TB;tm.displayName="@mantine/core/NumberInput";function mte({reveal:e}){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?g.jsxs(g.Fragment,{children:[g.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),g.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),g.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):g.jsxs(g.Fragment,{children:[g.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),g.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),g.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var RS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const pte={visibilityToggleIcon:mte,size:"sm"},MB=(e,{size:n})=>({root:{"--psi-icon-size":Bn(n,"psi-icon-size"),"--psi-button-size":Bn(n,"psi-button-size")}}),Qy=De(e=>{const n=be("PasswordInput",pte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:c,error:f,leftSection:h,disabled:d,id:p,variant:v,inputContainer:b,description:w,label:k,size:_,errorProps:C,descriptionProps:x,labelProps:E,withAsterisk:j,inputWrapperOrder:O,wrapperProps:M,radius:N,rightSection:q,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:F,visible:Y,defaultVisible:V,onVisibilityChange:$,visibilityToggleIcon:P,visibilityToggleButtonProps:I,rightSectionProps:H,leftSectionProps:U,leftSectionPointerEvents:D,withErrorStyles:W,mod:G,attributes:z,...X}=n,ee=Vi(p),[re,le]=Ci({value:Y,defaultValue:V,finalValue:!1,onChange:$}),ye=()=>le(!re),ae=Xe({name:"PasswordInput",classes:RS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:MB}),{resolvedClassNames:ue,resolvedStyles:Se}=Wi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:Le}=Du(X),ke=(C==null?void 0:C.id)||`${ee}-error`,je=(x==null?void 0:x.id)||`${ee}-description`,Ne=`${f&&typeof f!="boolean"?ke:""} ${w?je:""}`,ge=Ne.trim().length>0?Ne.trim():void 0,Ce=g.jsx(vt,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...I,variant:(I==null?void 0:I.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Pe=>{var ce;Pe.preventDefault(),(ce=I==null?void 0:I.onTouchEnd)==null||ce.call(I,Pe),ye()},onMouseDown:Pe=>{var ce;Pe.preventDefault(),(ce=I==null?void 0:I.onMouseDown)==null||ce.call(I,Pe),ye()},onKeyDown:Pe=>{var ce;(ce=I==null?void 0:I.onKeyDown)==null||ce.call(I,Pe),Pe.key===" "&&(Pe.preventDefault(),ye())},children:g.jsx(P,{reveal:re})});return g.jsx(Gt.Wrapper,{required:c,id:ee,label:k,error:f,description:w,size:_,classNames:ue,styles:Se,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:j,inputWrapperOrder:O,inputContainer:b,variant:v,labelProps:{...E,htmlFor:ee},descriptionProps:{...x,id:je},errorProps:{...C,id:ke},mod:G,attributes:z,...ae("root"),...ne,...M,children:g.jsx(Gt,{component:"div",error:f,leftSection:h,size:_,classNames:{...ue,input:pn(RS.input,ue==null?void 0:ue.input)},styles:Se,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:q??Ce,variant:v,unstyled:o,leftSectionWidth:F,rightSectionPointerEvents:L||"all",rightSectionProps:H,leftSectionProps:U,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:W,attributes:z,children:g.jsx("input",{required:c,"data-invalid":!!f||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...Le,"aria-describedby":ge,autoComplete:Le.autoComplete||"off",type:re?"text":"password"})})})});Qy.classes={...Ri.classes,...RS};Qy.varsResolver=MB;Qy.displayName="@mantine/core/PasswordInput";function vte({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:c,refs:f,update:h,placement:d}=aC({placement:n,middleware:[nC({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=A.useCallback(({clientX:w,clientY:k})=>{f.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[c.reference]);return A.useEffect(()=>{if(f.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=is(f.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[c.reference,f.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:f.setFloating}}var Jy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const gte={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Sa("popover")},DB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Yt(n),"--tooltip-bg":t?lt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),e0=De(e=>{const n=be("TooltipFloating",gte,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:c,unstyled:f,radius:h,color:d,label:p,offset:v,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:C,variant:x,vars:E,portalProps:j,attributes:O,ref:M,...N}=n,q=ui(),R=Xe({name:"TooltipFloating",props:n,classes:Jy,className:o,style:a,classNames:l,styles:c,unstyled:f,attributes:O,rootSelector:"tooltip",vars:E,varsResolver:DB}),{handleMouseMove:L,x:F,y:Y,opened:V,boundaryRef:$,floating:P,setOpened:I}=vte({offset:v,position:b,defaultOpened:C}),H=Mu(t);if(!H)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const U=Kt($,uy(H),M),D=H.props,W=z=>{var X;(X=D.onMouseEnter)==null||X.call(D,z),L(z),I(!0)},G=z=>{var X;(X=D.onMouseLeave)==null||X.call(D,z),I(!1)};return g.jsxs(g.Fragment,{children:[g.jsx(ml,{...j,withinPortal:r,children:g.jsx(he,{...N,...R("tooltip",{style:{...$z(a,q),zIndex:k,display:!_&&V?"block":"none",top:(Y&&Math.round(Y))??"",left:(F&&Math.round(F))??""}}),variant:x,ref:P,mod:{multiline:w},children:p})}),A.cloneElement(H,{...D,[i]:U,onMouseEnter:W,onMouseLeave:G})]})});e0.classes=Jy;e0.varsResolver=DB;e0.displayName="@mantine/core/TooltipFloating";const RB=A.createContext({withinGroup:!1}),yte={openDelay:0,closeDelay:0};function HC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",yte,e);return g.jsx(RB,{value:{withinGroup:!0},children:g.jsx(HQ,{delay:{open:n,close:t},children:i})})}HC.displayName="@mantine/core/TooltipGroup";HC.extend=e=>e;function bte(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function wte(e){const n=bte(e.middlewares),t=[uL(e.offset)];return n.shift&&t.push(nC(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Lg():Lg(n.flip)),t.push(cL({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Nh():Nh(n.inline)):e.inline&&t.push(Nh()),t}function kte(e){var E,j,O;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(RB).withinGroup,a=Vi(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:c,context:f,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=aC({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:wte(e),whileElementsMounted:CS}),{delay:b,currentId:w,setCurrentId:k}=UQ(f,{id:a}),{getReferenceProps:_,getFloatingProps:C}=XQ([FQ(f,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((j=e.events)!=null&&j.touch)}),KQ(f,{enabled:(O=e.events)==null?void 0:O.focus,visibleOnly:!0}),QQ(f,{role:"tooltip"}),GQ(f,{enabled:typeof e.opened>"u"})]);ls(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const x=i&&w&&w!==a;return{x:l,y:c,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:C,getReferenceProps:_,isGroupPhase:x,opened:i,placement:d}}const _te={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Sa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},PB=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Yt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},Zt=De(e=>{const n=be("Tooltip",_te,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:c,opened:f,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:b,styles:w,unstyled:k,style:_,className:C,withArrow:x,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,offset:N,transitionProps:q,multiline:R,events:L,zIndex:F,disabled:Y,onClick:V,onMouseEnter:$,onMouseLeave:P,inline:I,variant:H,keepMounted:U,vars:D,portalProps:W,mod:G,floatingStrategy:z,middlewares:X,autoContrast:ee,attributes:re,target:le,ref:ye,...ae}=n,{dir:ue}=Ru(),Se=A.useRef(null),ne=kte({position:wL(ue,i),closeDelay:l,openDelay:o,onPositionChange:c,opened:f,defaultOpened:h,events:L,arrowRef:Se,arrowOffset:j,offset:typeof N=="number"?N+(x?E/2:0):N,inline:I,strategy:z,middlewares:X});A.useEffect(()=>{const Pe=le instanceof HTMLElement?le:typeof le=="string"?document.querySelector(le):(le==null?void 0:le.current)||null;Pe&&ne.reference(Pe)},[le,ne]);const Le=Xe({name:"Tooltip",props:n,classes:Jy,className:C,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:D,varsResolver:PB}),ke=Mu(t);if(!le&&!ke)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const je=Le("tooltip");if(le){const Pe=iT(q,{duration:100,transition:"fade"});return g.jsx(g.Fragment,{children:g.jsx(ml,{...W,withinPortal:d,children:g.jsx(cs,{...Pe,keepMounted:U,mounted:!Y&&!!ne.opened,duration:ne.isGroupPhase?10:Pe.duration,children:ce=>g.jsxs(he,{...ae,"data-fixed":z==="fixed"||void 0,variant:H,mod:[{multiline:R},G],...je,...ne.getFloatingProps({ref:ne.floating,className:je.className,style:{...je.style,...ce,zIndex:F,top:ne.y??0,left:ne.x??0}}),children:[a,g.jsx(Ig,{ref:Se,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,...Le("arrow")})]})})})})}const Ne=ke.props,ge=Kt(ne.reference,uy(ke),ye),Ce=iT(q,{duration:100,transition:"fade"});return g.jsxs(g.Fragment,{children:[g.jsx(ml,{...W,withinPortal:d,children:g.jsx(cs,{...Ce,keepMounted:U,mounted:!Y&&!!ne.opened,duration:ne.isGroupPhase?10:Ce.duration,children:Pe=>g.jsxs(he,{...ae,"data-fixed":z==="fixed"||void 0,variant:H,mod:[{multiline:R},G],...ne.getFloatingProps({ref:ne.floating,className:Le("tooltip").className,style:{...Le("tooltip").style,...Pe,zIndex:F,top:ne.y??0,left:ne.x??0}}),children:[a,g.jsx(Ig,{ref:Se,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:j,arrowRadius:O,arrowPosition:M,...Le("arrow")})]})})}),A.cloneElement(ke,ne.getReferenceProps({onClick:V,onMouseEnter:$,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ne,className:pn(C,Ne.className),[r]:ge}))]})});Zt.classes=Jy;Zt.varsResolver=PB;Zt.displayName="@mantine/core/Tooltip";Zt.Floating=e0;Zt.Group=HC;const xte={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Kr=fy(e=>{const n=be("Select",xte,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:f,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:j,disabled:O,filter:M,limit:N,withScrollArea:q,maxDropdownHeight:R,size:L,searchable:F,rightSection:Y,checkIconPosition:V,withCheckIcon:$,withAlignedLabels:P,nothingFoundMessage:I,name:H,form:U,searchValue:D,defaultSearchValue:W,onSearchChange:G,allowDeselect:z,error:X,rightSectionPointerEvents:ee,id:re,clearable:le,clearSectionMode:ye,clearButtonProps:ae,hiddenInputProps:ue,renderOption:Se,onClear:ne,autoComplete:Le,scrollAreaProps:ke,__defaultRightSection:je,__clearSection:Ne,__clearable:ge,chevronColor:Ce,autoSelectOnBlur:Pe,openOnFocus:ce,attributes:qe,...Ye}=n,We=A.useMemo(()=>Cy(b),[b]),Ze=A.useRef({}),Qe=A.useMemo(()=>ip(We),[We]),ie=Vi(re),[ve,Ke,Je]=Ci({value:w,defaultValue:k,finalValue:null,onChange:v}),Ae=ve!=null?`${ve}`in Qe?Qe[`${ve}`]:Ze.current[`${ve}`]:void 0,an=HK(Ae),[mn,En,vn]=Ci({value:D,defaultValue:W,finalValue:Ae?Ae.label:"",onChange:G}),sn=Bf({opened:o,defaultOpened:l,onDropdownOpen:()=>{f==null||f(),C?sn.selectFirstOption():sn.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),setTimeout(sn.resetSelectedOption,0)}}),en=kn=>{En(kn),sn.resetSelectedOption()},{resolvedClassNames:zn,resolvedStyles:Re}=Wi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&sn.selectFirstOption()},[_,mn]),A.useEffect(()=>{w===null&&en(""),w!=null&&Ae&&((an==null?void 0:an.value)!==Ae.value||(an==null?void 0:an.label)!==Ae.label)&&en(Ae.label)},[w,Ae]),A.useEffect(()=>{var kn,bn;!Je&&!vn&&en(ve!=null?`${ve}`in Qe?(kn=Qe[`${ve}`])==null?void 0:kn.label:((bn=Ze.current[`${ve}`])==null?void 0:bn.label)||"":"")},[Qe,ve]),A.useEffect(()=>{ve&&`${ve}`in Qe&&(Ze.current[`${ve}`]=Qe[`${ve}`])},[Qe,ve]);const He=g.jsx(An.ClearButton,{...ae,onClear:()=>{Ke(null,null),en(""),ne==null||ne()}}),Dn=le&&!!ve&&!O&&!j;return g.jsxs(g.Fragment,{children:[g.jsxs(An,{store:sn,__staticSelector:"Select",classNames:zn,styles:Re,unstyled:r,readOnly:j,size:L,attributes:qe,keepMounted:Pe,onOptionSubmit:kn=>{x==null||x(kn);const bn=z&&`${Qe[kn].value}`==`${ve}`?null:Qe[kn],_n=bn?bn.value:null;_n!==ve&&Ke(_n,bn),!Je&&en(_n!=null&&(bn==null?void 0:bn.label)||""),sn.closeDropdown()},...E,children:[g.jsx(An.Target,{targetType:F?"input":"button",autoComplete:Le,withExpandedAttribute:!0,children:g.jsx(Ri,{id:ie,__defaultRightSection:g.jsx(An.Chevron,{size:L,error:X,unstyled:r,color:Ce}),__clearSection:He,__clearable:Dn,__clearSectionMode:ye,rightSection:Y,rightSectionPointerEvents:ee||"none",...Ye,size:L,__staticSelector:"Select",disabled:O,readOnly:j||!F,value:mn,onChange:kn=>{en(kn.currentTarget.value),sn.openDropdown(),_&&sn.selectFirstOption()},onFocus:kn=>{ce&&F&&sn.openDropdown(),h==null||h(kn)},onBlur:kn=>{Pe&&sn.clickSelectedOption(),F&&sn.closeDropdown();const bn=ve!=null&&(`${ve}`in Qe?Qe[`${ve}`]:Ze.current[`${ve}`]);en(bn&&bn.label||""),d==null||d(kn)},onClick:kn=>{F?sn.openDropdown():sn.toggleDropdown(),p==null||p(kn)},classNames:zn,styles:Re,unstyled:r,pointer:!F,error:X,attributes:qe})}),g.jsx(Ey,{data:We,hidden:j||O,filter:M,search:mn,limit:N,hiddenWhenEmpty:!I,withScrollArea:q,maxDropdownHeight:R,filterOptions:!!F&&(Ae==null?void 0:Ae.label)!==mn,value:ve,checkIconPosition:V,withCheckIcon:$,withAlignedLabels:P,nothingFoundMessage:I,unstyled:r,labelId:Ye.label?`${ie}-label`:void 0,"aria-label":Ye.label?void 0:Ye["aria-label"],renderOption:Se,scrollAreaProps:ke})]}),g.jsx(An.HiddenInput,{value:ve,name:H,form:U,disabled:O,...ue})]})});Kr.classes={...Ri.classes,...An.classes};Kr.displayName="@mantine/core/Select";function NB(e){if(e!==void 0)return typeof e=="number"?me(e):e}function Ste({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ui(),l=n===void 0?e:n,c=i!==void 0,f=Tu({"--sg-spacing-x":Vt(Wr(e)),"--sg-spacing-y":Vt(Wr(l)),"--sg-auto-rows":r,...c?{"--sg-min-col-width":NB(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),h=Pt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Vt(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Vt(l[v])),!c&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return g.jsx(Nf,{styles:f,media:Kh(Pt(h),o.breakpoints).filter(p=>Pt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function Pk(e){return typeof e=="object"&&e!==null?Pt(e):[]}function Cte(e){return e.sort((n,t)=>Yh(n)-Yh(t))}function Ate({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return Cte(Array.from(new Set([...Pk(e),...Pk(n),...i!==void 0?[]:Pk(t)])))}function jte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,c=Tu({"--sg-spacing-x":Vt(Wr(e)),"--sg-spacing-y":Vt(Wr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":NB(i)}:{"--sg-cols":(d=Wr(t))==null?void 0:d.toString()}}),f=Ate({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=f.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Vt(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Vt(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return g.jsx(Nf,{styles:c,container:f.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var $B={container:"m_925c2d2c",root:"m_2415a157"};const Ote={cols:1,spacing:"md",type:"media"},Zo=De(e=>{const n=be("SimpleGrid",Ote,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:c,verticalSpacing:f,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:b,attributes:w,...k}=n,_=Xe({name:"SimpleGrid",classes:$B,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),C=cy(),x=p!==void 0?v||"auto-fill":void 0;return d==="container"?g.jsxs(g.Fragment,{children:[g.jsx(jte,{...n,selector:`.${C}`}),g.jsx("div",{..._("container"),children:g.jsx(he,{..._("root",{className:C}),...k,"data-auto-cols":x})})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ste,{...n,selector:`.${C}`}),g.jsx(he,{..._("root",{className:C}),...k,"data-auto-cols":x})]})});Zo.classes=$B;Zo.displayName="@mantine/core/SimpleGrid";var zB={root:"m_6d731127"};const Ete={gap:"md",align:"stretch",justify:"flex-start"},LB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Vt(n),"--stack-align":t,"--stack-justify":i}}),$n=De(e=>{const n=be("Stack",Ete,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:c,justify:f,gap:h,variant:d,attributes:p,...v}=n;return g.jsx(he,{...Xe({name:"Stack",props:n,classes:zB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:LB})("root"),variant:d,...v})});$n.classes=zB;$n.varsResolver=LB;$n.displayName="@mantine/core/Stack";const[Tte,Mte]=Xr("Table component was not found in the tree");var ap={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Dte(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function $u(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=De(r=>{const a=be(t,{},r),{classNames:o,className:l,style:c,styles:f,...h}=a,d=Mte();return g.jsx(he,{component:e,...Dte(d,n),...d.getStyles(e,{className:l,classNames:o,style:c,styles:f,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=ap,i}const PS=$u("th",{columnBorder:!0}),IB=$u("td",{columnBorder:!0}),xg=$u("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),BB=$u("thead",{stickyHeader:!0}),FB=$u("tbody"),qB=$u("tfoot"),HB=$u("caption",{captionSide:!0}),Rte={type:"scrollarea"},UB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":me(n),"--table-max-height":me(t),"--table-overflow":i==="native"?"auto":void 0}}),n0=De(e=>{const n=be("TableScrollContainer",Rte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,minWidth:f,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...b}=n,w=Xe({name:"TableScrollContainer",classes:ap,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:UB,rootSelector:"scrollContainer"});return g.jsx(he,{component:d==="scrollarea"?fr:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:g.jsx("div",{...w("scrollContainerInner"),children:c})})});n0.classes=ap;n0.varsResolver=UB;n0.displayName="@mantine/core/TableScrollContainer";function UC({data:e}){return g.jsxs(g.Fragment,{children:[e.caption&&g.jsx(HB,{children:e.caption}),e.head&&g.jsx(BB,{children:g.jsx(xg,{children:e.head.map((n,t)=>g.jsx(PS,{children:n},t))})}),e.body&&g.jsx(FB,{children:e.body.map((n,t)=>g.jsx(xg,{children:n.map((i,r)=>g.jsx(IB,{children:i},r))},t))}),e.foot&&g.jsx(qB,{children:g.jsx(xg,{children:e.foot.map((n,t)=>g.jsx(PS,{children:n},t))})})]})}UC.displayName="@mantine/core/TableDataRenderer";const Pte={withRowBorders:!0,verticalSpacing:7},VB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:c,highlightOnHover:f,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Vt(i),"--table-vertical-spacing":Vt(r),"--table-border-color":a?lt(a,e):void 0,"--table-striped-color":c&&o?lt(o,e):void 0,"--table-highlight-on-hover-color":f&&l?lt(l,e):void 0,"--table-sticky-header-offset":d?me(h):void 0}}),nn=De(e=>{const n=be("Table",Pte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:c,verticalSpacing:f,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:C,layout:x,data:E,children:j,stickyHeader:O,stickyHeaderOffset:M,mod:N,tabularNums:q,attributes:R,...L}=n,F=Xe({name:"Table",props:n,className:i,style:r,classes:ap,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:VB});return g.jsx(Tte,{value:{getStyles:F,stickyHeader:O,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:g.jsx(he,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":q},N],...F("table"),...L,children:j||!!E&&g.jsx(UC,{data:E})})})});nn.classes=ap;nn.varsResolver=VB;nn.displayName="@mantine/core/Table";nn.Td=IB;nn.Th=PS;nn.Tr=xg;nn.Thead=BB;nn.Tbody=FB;nn.Tfoot=qB;nn.Caption=HB;nn.ScrollContainer=n0;nn.DataRenderer=UC;const[Nte,VC]=Xr("Tabs component was not found in the tree");var op={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const WC=De(e=>{const n=be("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:c,mod:f,...h}=n,d=VC();return g.jsx(he,{...d.getStyles("list",{className:i,style:c,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},f],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});WC.classes=op;WC.displayName="@mantine/core/TabsList";const GC=De(e=>{const n=be("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:c,keepMounted:f,...h}=n,d=Ym(),p=VC(),v=p.value===r,b=p.keepMounted||f,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?g.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):b||v?t:null;return g.jsx(he,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},c],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});GC.classes=op;GC.displayName="@mantine/core/TabsPanel";const YC=De(e=>{const n=be("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:c,disabled:f,color:h,style:d,classNames:p,styles:v,vars:b,mod:w,tabIndex:k,..._}=n,C=ui(),{dir:x}=Ru(),E=VC(),j=o===E.value,O=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},M={classNames:p,styles:v,props:n};return g.jsxs(Et,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...M}),disabled:f,unstyled:E.unstyled,variant:E.variant,mod:[{active:j,disabled:f,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},w],role:"tab",id:E.getTabId(o),"aria-selected":j,tabIndex:k!==void 0?k:j||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:O,__vars:{"--tabs-color":h?lt(h,C):void 0},onKeyDown:z6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:x,onKeyDown:c}),..._,children:[a&&g.jsx("span",{...E.getStyles("tabSection",M),"data-position":"left",children:a}),i&&g.jsx("span",{...E.getStyles("tabLabel",M),children:i}),r&&g.jsx("span",{...E.getStyles("tabSection",M),"data-position":"right",children:r})]})});YC.classes=op;YC.displayName="@mantine/core/TabsTab";const DT="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",$te={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},WB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Yt(n),"--tabs-color":lt(t,e),"--tabs-text-color":Gm(i,e)?Pf({color:t,theme:e,autoContrast:i}):void 0}}),Ut=De(e=>{const n=be("Tabs",$te,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:c,activateTabWithKeyboard:f,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:C,styles:x,unstyled:E,className:j,style:O,vars:M,autoContrast:N,mod:q,attributes:R,...L}=n,F=Vi(c),[Y,V]=Ci({value:i,defaultValue:t,finalValue:null,onChange:r}),$=Xe({name:"Tabs",props:n,classes:op,className:j,style:O,classNames:C,styles:x,unstyled:E,attributes:R,vars:M,varsResolver:WB});return g.jsx(Nte,{value:{placement:w,value:Y,orientation:a,id:F,loop:l,activateTabWithKeyboard:f,getTabId:_5(`${F}-tab`,DT),getPanelId:_5(`${F}-panel`,DT),onChange:V,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:$},children:g.jsx(he,{id:F,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},q],...$("root"),...L,children:o})})});Ut.classes=op;Ut.varsResolver=WB;Ut.displayName="@mantine/core/Tabs";Ut.Tab=YC;Ut.Panel=GC;Ut.List=WC;function zte({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(wu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function Lte(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function RT({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=Lte(e,i),c=[];if(n)c.push(...r,...l);else{c.push(...r);for(const f of l)(a?h=>a(h,c):h=>c.some(d=>d.toLowerCase()===h.toLowerCase()))(f)?o==null||o(f):c.push(f)}return t?c.slice(0,t):c}const Ite={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},KC=De(e=>{const n=be("TagsInput",Ite,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:c,value:f,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:C,defaultDropdownOpened:x,onDropdownOpen:E,onDropdownClose:j,selectFirstOptionOnChange:O,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:N,comboboxProps:q,filter:R,limit:L,withScrollArea:F,maxDropdownHeight:Y,searchValue:V,defaultSearchValue:$,onSearchChange:P,readOnly:I,disabled:H,splitChars:U,onFocus:D,onBlur:W,onPaste:G,radius:z,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:Se,inputContainer:ne,inputWrapperOrder:Le,withAsterisk:ke,required:je,labelProps:Ne,descriptionProps:ge,errorProps:Ce,wrapperProps:Pe,description:ce,label:qe,error:Ye,withErrorStyles:We,name:Ze,form:Qe,id:ie,clearable:ve,clearSectionMode:Ke,clearButtonProps:Je,hiddenInputProps:Ae,hiddenInputValuesDivider:an,mod:mn,renderOption:En,renderPill:vn,onRemove:sn,onClear:en,onMaxTags:zn,scrollAreaProps:Re,acceptValueOnBlur:He,isDuplicate:Dn,openOnFocus:kn,attributes:bn,ref:_n,loading:ft,loadingPosition:Tt,...Be}=n,Ue=Vi(ie),Ln=Cy(_),ut=ip(Ln),Pn=A.useRef(null),rn=Kt(Pn,_n),tn=Bf({opened:C,defaultOpened:x,onDropdownOpen:()=>{E==null||E(),M&&tn.selectFirstOption()},onDropdownClose:()=>{j==null||j(),tn.resetSelectedOption()}}),{styleProps:on,rest:{type:In,autoComplete:Gn,..._t}}=Du(Be),[Rn,Tn]=Ci({value:f,defaultValue:h,finalValue:[],onChange:d}),[Kn,$t]=Ci({value:V,defaultValue:$,finalValue:"",onChange:P}),Oi=gn=>{$t(gn),tn.resetSelectedOption()},tr=Xe({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Zr,resolvedStyles:Ka}=Wi({props:n,styles:a,classNames:t}),Qr=gn=>{if((Dn?Dn(gn,Rn):Rn.some(ci=>ci.toLowerCase()===gn.toLowerCase()))&&(w==null||w(gn),!b)){Oi("");return}if(Rn.length>=v){zn==null||zn(gn);return}N==null||N(gn),Oi(""),gn.length>0&&Tn([...Rn,gn])},pr=gn=>{if(p==null||p(gn),gn.isPropagationStopped())return;const ci=Kn.trim(),{length:cn}=ci;if(U.includes(gn.key)&&cn>0&&(Tn(RT({splitChars:U,allowDuplicates:b,maxTags:v,value:Kn,currentTags:Rn,isDuplicate:Dn,onDuplicate:w})),Oi(""),gn.preventDefault()),gn.key==="Enter"&&cn>0&&!gn.nativeEvent.isComposing){if(gn.preventDefault(),document.querySelector(`#${tn.listId} [data-combobox-option][data-combobox-selected]`))return;Qr(ci)}gn.key==="Backspace"&&cn===0&&Rn.length>0&&!gn.nativeEvent.isComposing&&!I&&(sn==null||sn(Rn[Rn.length-1]),Tn(Rn.slice(0,Rn.length-1)))},Xa=gn=>{G==null||G(gn),gn.preventDefault(),gn.clipboardData&&(Tn(RT({splitChars:U,allowDuplicates:b,maxTags:v,value:`${Kn}${gn.clipboardData.getData("text/plain")}`,currentTags:Rn,isDuplicate:Dn,onDuplicate:w})),Oi(""))},Jr=Rn.map((gn,ci)=>{const cn=()=>{const Er=Rn.slice();Er.splice(ci,1),Tn(Er),sn==null||sn(gn)};return vn?g.jsx(A.Fragment,{children:vn({option:ut[gn]||{value:gn,label:gn,disabled:!1},value:gn,onRemove:cn,disabled:H||I})},`${gn}-${ci}`):g.jsx(vl,{withRemoveButton:!I,onRemove:cn,unstyled:o,disabled:H,attributes:bn,...tr("pill"),children:gn},`${gn}-${ci}`)});A.useEffect(()=>{O&&tn.selectFirstOption()},[O,Rn,Kn]);const ea=g.jsx(An.ClearButton,{...Je,onClear:()=>{var gn;Tn([]),Oi(""),(gn=Pn.current)==null||gn.focus(),tn.openDropdown(),en==null||en()}});return g.jsxs(g.Fragment,{children:[g.jsxs(An,{store:tn,classNames:Zr,styles:Ka,unstyled:o,size:c,readOnly:I,__staticSelector:"TagsInput",attributes:bn,onOptionSubmit:gn=>{N==null||N(gn),Oi(""),Rn.length>=v?zn==null||zn(gn):Tn([...Rn,ut[gn].value]),tn.resetSelectedOption()},...q,children:[g.jsx(An.DropdownTarget,{children:g.jsx(ku,{...on,__staticSelector:"TagsInput",classNames:Zr,styles:Ka,unstyled:o,size:c,className:i,style:r,variant:k,disabled:H,radius:z,rightSection:X,__clearSection:ea,__clearable:ve&&Rn.length>0&&!H&&!I,__clearSectionMode:Ke,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:le,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:ue,leftSectionProps:Se,loading:ft,loadingPosition:Tt,inputContainer:ne,inputWrapperOrder:Le,withAsterisk:ke,required:je,labelProps:Ne,descriptionProps:ge,errorProps:Ce,wrapperProps:Pe,description:ce,label:qe,error:Ye,withErrorStyles:We,__stylesApiProps:{...n,multiline:!0},id:Ue,mod:mn,attributes:bn,children:g.jsxs(vl.Group,{disabled:H,unstyled:o,...tr("pillsList"),children:[Jr,g.jsx(An.EventsTarget,{autoComplete:Gn,withExpandedAttribute:!0,children:g.jsx(ku.Field,{..._t,ref:rn,...tr("inputField"),unstyled:o,onKeyDown:pr,onFocus:gn=>{D==null||D(gn),kn&&tn.openDropdown()},onBlur:gn=>{W==null||W(gn),He&&Qr(Kn),tn.closeDropdown()},onPaste:Xa,value:Kn,onChange:gn=>Oi(gn.currentTarget.value),required:je&&Rn.length===0,disabled:H,readOnly:I,id:Ue})})]})})}),g.jsx(Ey,{data:zte({data:Ln,value:Rn}),hidden:I||H,filter:R,search:Kn,limit:L,hiddenWhenEmpty:!0,withScrollArea:F,maxDropdownHeight:Y,unstyled:o,labelId:qe?`${Ue}-label`:void 0,"aria-label":qe?void 0:Be["aria-label"],renderOption:En,scrollAreaProps:Re})]}),g.jsx(An.HiddenInput,{name:Ze,form:Qe,value:Rn,valuesDivider:an,disabled:H,...Ae})]})});KC.classes={...Ri.classes,...An.classes};KC.displayName="@mantine/core/TagsInput";const Gr=De(e=>g.jsx(Ri,{component:"input",...be("TextInput",null,e),__staticSelector:"TextInput"}));Gr.classes=Ri.classes;Gr.displayName="@mantine/core/TextInput";const[Bte,Fte]=Xr("Timeline component was not found in tree");var XC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const ZC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:c,__vars:f,bullet:h,radius:d,color:p,lineVariant:v,children:b,title:w,mod:k,..._}=be("TimelineItem",null,e),C=Fte(),x=ui(),E={classNames:n,styles:r};return g.jsxs(he,{...C.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":c,active:o},k],__vars:{"--tli-radius":d!==void 0?Yt(d):void 0,"--tli-color":p?lt(p,x):void 0,"--tli-border-style":v||void 0},..._,children:[g.jsx(he,{...C.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),g.jsxs("div",{...C.getStyles("itemBody",E),children:[w&&g.jsx("div",{...C.getStyles("itemTitle",E),children:w}),g.jsx("div",{...C.getStyles("itemContent",E),children:b})]})]})});ZC.classes=XC;ZC.displayName="@mantine/core/TimelineItem";const qte={active:-1,align:"left"},GB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":me(n),"--tl-line-width":me(t),"--tl-radius":i===void 0?void 0:Yt(i),"--tl-color":r?lt(r,e):void 0,"--tl-icon-color":Gm(a,e)?Pf({color:r,theme:e,autoContrast:a}):void 0}}),af=De(e=>{const n=be("Timeline",qte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:c,active:f,color:h,radius:d,bulletSize:p,align:v,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:C,...x}=n,E=Xe({name:"Timeline",classes:XC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:GB}),j=A.Children.toArray(c),O=j.map((M,N)=>{var q,R;return A.cloneElement(M,{unstyled:o,__align:v,__active:((q=M.props)==null?void 0:q.active)||(w?f>=j.length-N-1:f>=N),__lineActive:((R=M.props)==null?void 0:R.lineActive)||(w?f>=j.length-N-1:f-1>=N)})});return g.jsx(Bte,{value:{getStyles:E},children:g.jsx(he,{...E("root"),mod:[{align:v},k],...x,children:O})})});af.classes=XC;af.varsResolver=GB;af.displayName="@mantine/core/Timeline";af.Item=ZC;const Hte=["h1","h2","h3","h4","h5","h6"],Ute=["xs","sm","md","lg","xl"];function Vte(e,n){const t=n!==void 0?n:`h${e}`;return Hte.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:Ute.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:me(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var YB={root:"m_8a5d1357"};const Wte={order:1},KB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=Vte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},xl=De(e=>{const n=be("Title",Wte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:c,size:f,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:b,...w}=n,k=Xe({name:"Title",props:n,classes:YB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:c,varsResolver:KB});return[1,2,3,4,5,6].includes(l)?g.jsx(he,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:f,...w}):null});xl.classes=YB;xl.varsResolver=KB;xl.displayName="@mantine/core/Title";const QC=A.createContext(null);QC.displayName="@mantine/modals/ModalsContext";function Gte(){const e=A.use(QC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Yte,zu]=WK("mantine-modals"),Kte=e=>{const n=e.modalId||cl();return zu("openModal")({...e,modalId:n}),n},Xte=e=>{const n=e.modalId||cl();return zu("openConfirmModal")({...e,modalId:n}),n},Zte=e=>{const n=e.modalId||cl();return zu("openContextModal")({...e,modalId:n}),n},Qte=zu("closeModal"),Jte=zu("closeAllModals"),eie=e=>zu("updateModal")(e),nie=e=>zu("updateContextModal")(e),Pa={open:Kte,close:Qte,closeAll:Jte,openConfirmModal:Xte,openContextModal:Zte,updateModal:eie,updateContextModal:nie};function tie({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:c,children:f}){const{cancel:h,confirm:d}=i,p=Gte(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},b=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof c=="function"&&c(),r&&p.closeModal(e)};return g.jsxs(g.Fragment,{children:[f&&g.jsx(he,{mb:"md",children:f}),g.jsxs(ze,{mt:f?0:"md",justify:"flex-end",...o,children:[g.jsx(st,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),g.jsx(st,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function PT(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function iie(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function rie(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:c,groupProps:f,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:c,groupProps:f,labels:h},modalProps:{id:n,...d}}}function aie({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(iie,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),c=A.useCallback(x=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{PT(E,x)}),l.current=!1),a({type:"CLOSE_ALL",canceled:x})},[o,a]),f=A.useCallback(({modalId:x,...E})=>{const j=x||cl();return a({type:"OPEN",modal:{id:j,type:"content",props:E}}),j},[a]),h=A.useCallback(({modalId:x,...E})=>{const j=x||cl();return a({type:"OPEN",modal:{id:j,type:"confirm",props:E}}),j},[a]),d=A.useCallback((x,{modalId:E,...j})=>{const O=E||cl();return a({type:"OPEN",modal:{id:O,type:"context",props:j,ctx:x}}),O},[a]),p=A.useCallback((x,E)=>{if(!l.current){const j=o.current.modals.find(O=>O.id===x);j&&(l.current=!0,PT(j,E),l.current=!1)}a({type:"CLOSE",modalId:x,canceled:E})},[o,a]),v=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]),b=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]);Yte({openModal:f,openConfirmModal:h,openContextModal:({modal:x,...E})=>d(x,E),closeModal:p,closeContextModal:p,closeAllModals:c,updateModal:v,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:f,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:c,updateModal:v,updateContextModal:b},k=()=>{const x=o.current.current;switch(x==null?void 0:x.type){case"context":{const{innerProps:E,...j}=x.props,O=i[x.ctx];return{modalProps:j,content:g.jsx(O,{innerProps:E,context:w,id:x.id})}}case"confirm":{const{modalProps:E,confirmProps:j}=rie(x.props);return{modalProps:E,content:g.jsx(tie,{...j,id:x.id,labels:x.props.labels||t})}}case"content":{const{children:E,...j}=x.props;return{modalProps:j,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:C}=k();return g.jsxs(QC,{value:w,children:[g.jsx(hr,{zIndex:Sa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var x;return p((x=r.current)==null?void 0:x.id)},children:C}),e]})}function oie(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function sie(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function lie(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const uie=()=>oie({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Lu=uie(),cie=(e=Lu)=>sie(e);function Gf(e,n){const t=e.getState(),i=lie(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function fie(e,n=Lu){const t=e.id||cl();return Gf(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function XB(e,n=Lu){return Gf(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function die(e,n=Lu){return Gf(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function hie(e=Lu){Gf(e,()=>[])}function mie(e=Lu){Gf(e,n=>n.slice(0,e.getState().limit))}const wn={show:fie,hide:XB,update:die,clean:hie,cleanQueue:mie,updateState:Gf},ZB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function pie(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),ZB.reduce((t,i)=>(t[i]=[],t),{}))}const NT={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},vie={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function gie({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:NT[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},c={opacity:1,transform:vie[o]},f={opacity:0,maxHeight:0,transform:NT[o]};return{...l,...{entering:c,entered:c,exiting:f,exited:f}[e]}}function yie(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function QB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:c,onOpen:f,...h}=e,d=yie(t,e.autoClose),p=A.useRef(-1),[v,b]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},C=()=>{b(!0),r==null||r()},x=()=>{b(!1),a==null||a()};return A.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),g.jsx(Xy,{...o,...h,onClose:k,onMouseEnter:C,onMouseLeave:x,children:c})}QB.displayName="@mantine/notifications/NotificationContainer";var JB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function NS(){return NS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":me(t)}}),So=De(e=>{const n=be("Notifications",Mie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:c,position:f,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:C,pauseResetOnHover:x,...E}=n,j=ui(),O=cie(k),M=FK(),N=B6(),q=A.useRef({}),R=A.useRef(0),[L,F]=A.useState(0),Y=A.useCallback(()=>F(U=>U+1),[]),V=A.useCallback(()=>F(U=>Math.max(0,U-1)),[]),$=j.respectReducedMotion&&N?1:d,P=Xe({name:"Notifications",classes:JB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:tF});A.useEffect(()=>{k==null||k.updateState(U=>({...U,limit:b||5,defaultPosition:f}))},[b,f]),ls(()=>{O.notifications.length>R.current&&setTimeout(()=>M(),0),R.current=O.notifications.length},[O.notifications]);const I=pie(O.notifications,f),H=ZB.reduce((U,D)=>(U[D]=I[D].map(({style:W,...G})=>g.jsx(Tie,{timeout:$,onEnter:()=>q.current[G.id].offsetHeight,nodeRef:{current:q.current[G.id]},children:z=>g.jsx(QB,{ref:X=>{X&&(q.current[G.id]=X)},data:G,onHide:X=>XB(X,k),autoClose:h,paused:x==="all"?L>0:!1,onHoverStart:Y,onHoverEnd:V,...P("notification",{style:{...gie({state:z,position:D,transitionDuration:$,maxHeight:v}),...W}})})},G.id)),U),{});return g.jsxs(ml,{withinPortal:C,..._,children:[g.jsx(he,{...P("root"),"data-position":"top-center",...E,children:g.jsx(Qs,{children:H["top-center"]})}),g.jsx(he,{...P("root"),"data-position":"top-left",...E,children:g.jsx(Qs,{children:H["top-left"]})}),g.jsx(he,{...P("root",{className:yu.classNames.fullWidth}),"data-position":"top-right",...E,children:g.jsx(Qs,{children:H["top-right"]})}),g.jsx(he,{...P("root",{className:yu.classNames.fullWidth}),"data-position":"bottom-right",...E,children:g.jsx(Qs,{children:H["bottom-right"]})}),g.jsx(he,{...P("root"),"data-position":"bottom-left",...E,children:g.jsx(Qs,{children:H["bottom-left"]})}),g.jsx(he,{...P("root"),"data-position":"bottom-center",...E,children:g.jsx(Qs,{children:H["bottom-center"]})})]})});So.classes=JB;So.varsResolver=tF;So.displayName="@mantine/notifications/Notifications";So.show=wn.show;So.hide=wn.hide;So.update=wn.update;So.clean=wn.clean;So.cleanQueue=wn.cleanQueue;So.updateState=wn.updateState;var Lk={exports:{}},oh={},Ik={exports:{}},Bk={};/** * @license React * scheduler.production.js * @@ -82,7 +82,7 @@ ${o?`${l("light")}{${o}}`:""}`}function Rv({theme:e,color:n,colorScheme:t,name:i * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var zT;function kie(){return zT||(zT=1,(function(e){function n(D,$){var B=D.length;D.push($);e:for(;0>>1,R=D[Y];if(0>>1;Yr(I,B))Xr(ee,I)?(D[Y]=ee,D[X]=B,Y=X):(D[Y]=I,D[V]=B,Y=V);else if(Xr(ee,B))D[Y]=ee,D[X]=B,Y=X;else break e}}return $}function r(D,$){var B=D.sortIndex-$.sortIndex;return B!==0?B:D.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],h=1,d=null,p=3,v=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function E(D){for(var $=t(f);$!==null;){if($.callback===null)i(f);else if($.startTime<=D)i(f),$.sortIndex=$.expirationTime,n(c,$);else break;$=t(f)}}function O(D){if(w=!1,E(D),!b)if(t(c)!==null)b=!0,j||(j=!0,H());else{var $=t(f);$!==null&&z(O,$.startTime-D)}}var j=!1,M=-1,N=5,q=-1;function P(){return k?!0:!(e.unstable_now()-qD&&P());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var R=Y(d.expirationTime<=D);if(D=e.unstable_now(),typeof R=="function"){d.callback=R,E(D),$=!0;break n}d===t(c)&&i(c),E(D)}else i(c);d=t(c)}if(d!==null)$=!0;else{var W=t(f);W!==null&&z(O,W.startTime-D),$=!1}}break e}finally{d=null,p=B,v=!1}$=void 0}}finally{$?H():j=!1}}}var H;if(typeof x=="function")H=function(){x(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=L,H=function(){U.postMessage(null)}}else H=function(){_(L,0)};function z(D,$){M=_(function(){D(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125Y?(D.sortIndex=B,n(f,D),t(c)===null&&D===t(f)&&(w?(C(M),M=-1):w=!0,z(O,B-Y))):(D.sortIndex=R,n(c,D),b||v||(b=!0,j||(j=!0,H()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var $=p;return function(){var B=p;p=$;try{return D.apply(this,arguments)}finally{p=B}}}})(Lk)),Lk}var LT;function _ie(){return LT||(LT=1,zk.exports=kie()),zk.exports}/** + */var BT;function Die(){return BT||(BT=1,(function(e){function n(P,I){var H=P.length;P.push(I);e:for(;0>>1,D=P[U];if(0>>1;Ur(z,H))Xr(ee,z)?(P[U]=ee,P[X]=H,U=X):(P[U]=z,P[G]=H,U=G);else if(Xr(ee,H))P[U]=ee,P[X]=H,U=X;else break e}}return I}function r(P,I){var H=P.sortIndex-I.sortIndex;return H!==0?H:P.id-I.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],h=1,d=null,p=3,v=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function E(P){for(var I=t(f);I!==null;){if(I.callback===null)i(f);else if(I.startTime<=P)i(f),I.sortIndex=I.expirationTime,n(c,I);else break;I=t(f)}}function j(P){if(w=!1,E(P),!b)if(t(c)!==null)b=!0,O||(O=!0,F());else{var I=t(f);I!==null&&$(j,I.startTime-P)}}var O=!1,M=-1,N=5,q=-1;function R(){return k?!0:!(e.unstable_now()-qP&&R());){var U=d.callback;if(typeof U=="function"){d.callback=null,p=d.priorityLevel;var D=U(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,E(P),I=!0;break n}d===t(c)&&i(c),E(P)}else i(c);d=t(c)}if(d!==null)I=!0;else{var W=t(f);W!==null&&$(j,W.startTime-P),I=!1}}break e}finally{d=null,p=H,v=!1}I=void 0}}finally{I?F():O=!1}}}var F;if(typeof x=="function")F=function(){x(L)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,V=Y.port2;Y.port1.onmessage=L,F=function(){V.postMessage(null)}}else F=function(){_(L,0)};function $(P,I){M=_(function(){P(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125U?(P.sortIndex=H,n(f,P),t(c)===null&&P===t(f)&&(w?(C(M),M=-1):w=!0,$(j,H-U))):(P.sortIndex=D,n(c,P),b||v||(b=!0,O||(O=!0,F()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var I=p;return function(){var H=p;p=I;try{return P.apply(this,arguments)}finally{p=H}}}})(Bk)),Bk}var FT;function Rie(){return FT||(FT=1,Ik.exports=Die()),Ik.exports}/** * @license React * react-dom-client.production.js * @@ -90,347 +90,362 @@ ${o?`${l("light")}{${o}}`:""}`}function Rv({theme:e,color:n,colorScheme:t,name:i * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var IT;function xie(){if(IT)return ih;IT=1;var e=_ie(),n=P6(),t=wz();function i(s){var u="https://react.dev/errors/"+s;if(1R||(s.current=Y[R],Y[R]=null,R--)}function I(s,u){R++,Y[R]=s.current,s.current=u}var X=W(null),ee=W(null),re=W(null),le=W(null);function ye(s,u){switch(I(re,u),I(ee,s),I(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?LE(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=LE(u),s=IE(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(X),I(X,s)}function ae(){V(X),V(ee),V(re)}function ue(s){s.memoizedState!==null&&I(le,s);var u=X.current,m=IE(u,s.type);u!==m&&(I(ee,s),I(X,m))}function xe(s){ee.current===s&&(V(X),V(ee)),le.current===s&&(V(le),Xd._currentValue=B)}var ne,ze;function we(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",ze=-1D||(s.current=U[D],U[D]=null,D--)}function z(s,u){D++,U[D]=s.current,s.current=u}var X=W(null),ee=W(null),re=W(null),le=W(null);function ye(s,u){switch(z(re,u),z(ee,s),z(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?BE(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=BE(u),s=FE(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}G(X),z(X,s)}function ae(){G(X),G(ee),G(re)}function ue(s){s.memoizedState!==null&&z(le,s);var u=X.current,m=FE(u,s.type);u!==m&&(z(ee,s),z(X,m))}function Se(s){ee.current===s&&(G(X),G(ee)),le.current===s&&(G(le),Jd._currentValue=H)}var ne,Le;function ke(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",Le=-1)":-1S||J[g]!==de[S]){var je=` -`+J[g].replace(" at new "," at ");return s.displayName&&je.includes("")&&(je=je.replace("",s.displayName)),je}while(1<=g&&0<=S);break}}}finally{Oe=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?we(m):""}function ge(s,u){switch(s.tag){case 26:case 27:case 5:return we(s.type);case 16:return we("Lazy");case 13:return s.child!==u&&u!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ne(s.type,!1);case 11:return Ne(s.type.render,!1);case 1:return Ne(s.type,!0);case 31:return we("Activity");default:return""}}function Se(s){try{var u="",m=null;do u+=ge(s,m),m=s,s=s.return;while(s);return u}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}var Pe=Object.prototype.hasOwnProperty,ce=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Ye=e.unstable_shouldYield,We=e.unstable_requestPaint,Ze=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,Je=e.unstable_LowPriority,Ae=e.unstable_IdlePriority,rn=e.log,fn=e.unstable_setDisableYieldValue,En=null,pn=null;function on(s){if(typeof rn=="function"&&fn(s),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(En,s)}catch{}}var nn=Math.clz32?Math.clz32:Fe,Nn=Math.log,De=Math.LN2;function Fe(s){return s>>>=0,s===0?32:31-(Nn(s)/De|0)|0}var Mn=256,bn=262144,yn=4194304;function kn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ut(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var S=0,T=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~T,g!==0?S=kn(g):(F&=K,F!==0?S=kn(F):m||(m=K&~s,m!==0&&(S=kn(m))))):(K=g&~T,K!==0?S=kn(K):F!==0?S=kn(F):m||(m=g&~s,m!==0&&(S=kn(m)))),S===0?0:u!==0&&u!==S&&(u&T)===0&&(T=S&-S,m=u&-u,T>=m||T===32&&(m&4194048)!==0)?u:S}function jt(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Ie(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var s=yn;return yn<<=1,(yn&62914560)===0&&(yn=4194304),s}function $n(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function at(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Dn(s,u,m,g,S,T){var F=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,de=s.hiddenUpdates;for(m=F&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Cp=/[\n"\\]/g;function rr(s){return s.replace(Cp,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Wu(s,u,m,g,S,T,F,K){s.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?s.type=F:s.removeAttribute("type"),u!=null?F==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+fr(u)):s.value!==""+fr(u)&&(s.value=""+fr(u)):F!=="submit"&&F!=="reset"||s.removeAttribute("value"),u!=null?Gu(s,F,fr(u)):m!=null?Gu(s,F,fr(m)):g!=null&&s.removeAttribute("value"),S==null&&T!=null&&(s.defaultChecked=!!T),S!=null&&(s.checked=S&&typeof S!="function"&&typeof S!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+fr(K):s.removeAttribute("name")}function fd(s,u,m,g,S,T,F,K){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(s.type=T),u!=null||m!=null){if(!(T!=="submit"&&T!=="reset"||u!=null)){Tl(s);return}m=m!=null?""+fr(m):"",u=u!=null?""+fr(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??S,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(s.name=F),Tl(s)}function Gu(s,u,m){u==="number"&&Ml(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function xo(s,u,m,g){if(s=s.options,u){u={};for(var S=0;S"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ft=!1;if(Et)try{var ri={};Object.defineProperty(ri,"passive",{get:function(){ft=!0}}),window.addEventListener("test",ri,ri),window.removeEventListener("test",ri,ri)}catch{ft=!1}var ai=null,Yi=null,Er=null;function ob(){if(Er)return Er;var s,u=Yi,m=u.length,g,S="value"in ai?ai.value:ai.textContent,T=S.length;for(s=0;s=gd),VA=" ",WA=!1;function GA(s,u){switch(s){case"keyup":return EG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Xu=!1;function MG(s,u){switch(s){case"compositionend":return YA(u);case"keypress":return u.which!==32?null:(WA=!0,VA);case"textInput":return s=u.data,s===VA&&WA?null:s;default:return null}}function DG(s,u){if(Xu)return s==="compositionend"||!cb&&GA(s,u)?(s=ob(),Er=Yi=ai=null,Xu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=tO(m)}}function rO(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?rO(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function aO(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Ml(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Ml(s.document)}return u}function hb(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var BG=Et&&"documentMode"in document&&11>=document.documentMode,Zu=null,mb=null,kd=null,pb=!1;function oO(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;pb||Zu==null||Zu!==Ml(g)||(g=Zu,"selectionStart"in g&&hb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),kd&&wd(kd,g)||(kd=g,g=gv(mb,"onSelect"),0>=F,S-=F,Ka=1<<32-nn(u)+S|m<Fn?(nt=cn,cn=null):nt=cn.sibling;var ht=pe(se,cn,fe[Fn],Te);if(ht===null){cn===null&&(cn=nt);break}s&&cn&&ht.alternate===null&&u(se,cn),te=T(ht,te,Fn),dt===null?vn=ht:dt.sibling=ht,dt=ht,cn=nt}if(Fn===fe.length)return m(se,cn),it&&Ao(se,Fn),vn;if(cn===null){for(;FnFn?(nt=cn,cn=null):nt=cn.sibling;var qs=pe(se,cn,ht.value,Te);if(qs===null){cn===null&&(cn=nt);break}s&&cn&&qs.alternate===null&&u(se,cn),te=T(qs,te,Fn),dt===null?vn=qs:dt.sibling=qs,dt=qs,cn=nt}if(ht.done)return m(se,cn),it&&Ao(se,Fn),vn;if(cn===null){for(;!ht.done;Fn++,ht=fe.next())ht=Me(se,ht.value,Te),ht!==null&&(te=T(ht,te,Fn),dt===null?vn=ht:dt.sibling=ht,dt=ht);return it&&Ao(se,Fn),vn}for(cn=g(cn);!ht.done;Fn++,ht=fe.next())ht=ke(cn,se,Fn,ht.value,Te),ht!==null&&(s&&ht.alternate!==null&&cn.delete(ht.key===null?Fn:ht.key),te=T(ht,te,Fn),dt===null?vn=ht:dt.sibling=ht,dt=ht);return s&&cn.forEach(function(oK){return u(se,oK)}),it&&Ao(se,Fn),vn}function Ct(se,te,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var vn=fe.key;te!==null;){if(te.key===vn){if(vn=fe.type,vn===w){if(te.tag===7){m(se,te.sibling),Te=S(te,fe.props.children),Te.return=se,se=Te;break e}}else if(te.elementType===vn||typeof vn=="object"&&vn!==null&&vn.$$typeof===N&&ql(vn)===te.type){m(se,te.sibling),Te=S(te,fe.props),Od(Te,fe),Te.return=se,se=Te;break e}m(se,te);break}else u(se,te);te=te.sibling}fe.type===w?(Te=zl(fe.props.children,se.mode,Te,fe.key),Te.return=se,se=Te):(Te=Pp(fe.type,fe.key,fe.props,null,se.mode,Te),Od(Te,fe),Te.return=se,se=Te)}return F(se);case b:e:{for(vn=fe.key;te!==null;){if(te.key===vn)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){m(se,te.sibling),Te=S(te,fe.children||[]),Te.return=se,se=Te;break e}else{m(se,te);break}else u(se,te);te=te.sibling}Te=_b(fe,se.mode,Te),Te.return=se,se=Te}return F(se);case N:return fe=ql(fe),Ct(se,te,fe,Te)}if(z(fe))return ln(se,te,fe,Te);if(H(fe)){if(vn=H(fe),typeof vn!="function")throw Error(i(150));return fe=vn.call(fe),xn(se,te,fe,Te)}if(typeof fe.then=="function")return Ct(se,te,Fp(fe),Te);if(fe.$$typeof===x)return Ct(se,te,zp(se,fe),Te);qp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(m(se,te.sibling),Te=S(te,fe),Te.return=se,se=Te):(m(se,te),Te=kb(fe,se.mode,Te),Te.return=se,se=Te),F(se)):m(se,te)}return function(se,te,fe,Te){try{Ad=0;var vn=Ct(se,te,fe,Te);return lc=null,vn}catch(cn){if(cn===sc||cn===Ip)throw cn;var dt=Mr(29,cn,null,se.mode);return dt.lanes=Te,dt.return=se,dt}finally{}}}var Ul=EO(!0),TO=EO(!1),Cs=!1;function Pb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function As(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Os(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(vt&2)!==0){var S=g.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),g.pending=u,u=Rp(s),hO(s,null,m),u}return Dp(s,g,u,m),Rp(s)}function jd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,en(s,m)}}function $b(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var S=null,T=null;if(m=m.firstBaseUpdate,m!==null){do{var F={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};T===null?S=T=F:T=T.next=F,m=m.next}while(m!==null);T===null?S=T=u:T=T.next=u}else S=T=u;m={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var zb=!1;function Ed(){if(zb){var s=oc;if(s!==null)throw s}}function Td(s,u,m,g){zb=!1;var S=s.updateQueue;Cs=!1;var T=S.firstBaseUpdate,F=S.lastBaseUpdate,K=S.shared.pending;if(K!==null){S.shared.pending=null;var J=K,de=J.next;J.next=null,F===null?T=de:F.next=de,F=J;var je=s.alternate;je!==null&&(je=je.updateQueue,K=je.lastBaseUpdate,K!==F&&(K===null?je.firstBaseUpdate=de:K.next=de,je.lastBaseUpdate=J))}if(T!==null){var Me=S.baseState;F=0,je=de=J=null,K=T;do{var pe=K.lane&-536870913,ke=pe!==K.lane;if(ke?(et&pe)===pe:(g&pe)===pe){pe!==0&&pe===ac&&(zb=!0),je!==null&&(je=je.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var ln=s,xn=K;pe=u;var Ct=m;switch(xn.tag){case 1:if(ln=xn.payload,typeof ln=="function"){Me=ln.call(Ct,Me,pe);break e}Me=ln;break e;case 3:ln.flags=ln.flags&-65537|128;case 0:if(ln=xn.payload,pe=typeof ln=="function"?ln.call(Ct,Me,pe):ln,pe==null)break e;Me=d({},Me,pe);break e;case 2:Cs=!0}}pe=K.callback,pe!==null&&(s.flags|=64,ke&&(s.flags|=8192),ke=S.callbacks,ke===null?S.callbacks=[pe]:ke.push(pe))}else ke={lane:pe,tag:K.tag,payload:K.payload,callback:K.callback,next:null},je===null?(de=je=ke,J=Me):je=je.next=ke,F|=pe;if(K=K.next,K===null){if(K=S.shared.pending,K===null)break;ke=K,K=ke.next,ke.next=null,S.lastBaseUpdate=ke,S.shared.pending=null}}while(!0);je===null&&(J=Me),S.baseState=J,S.firstBaseUpdate=de,S.lastBaseUpdate=je,T===null&&(S.shared.lanes=0),Ds|=F,s.lanes=F,s.memoizedState=Me}}function MO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function DO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sT?T:8;var F=D.T,K={};D.T=K,tw(s,!1,u,m);try{var J=S(),de=D.S;if(de!==null&&de(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var je=KG(J,g);Rd(s,u,je,$r(s))}else Rd(s,u,g,$r(s))}catch(Me){Rd(s,u,{then:function(){},status:"rejected",reason:Me},$r())}finally{$.p=T,F!==null&&K.types!==null&&(F.types=K.types),D.T=F}}function nY(){}function ew(s,u,m,g){if(s.tag!==5)throw Error(i(476));var S=cj(s).queue;uj(s,S,u,B,m===null?nY:function(){return fj(s),m(g)})}function cj(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:B},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:To,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function fj(s){var u=cj(s);u.next===null&&(u=s.alternate.memoizedState),Rd(s,u.next.queue,{},$r())}function nw(){return Li(Xd)}function dj(){return li().memoizedState}function hj(){return li().memoizedState}function tY(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=$r();s=As(m);var g=Os(u,s,m);g!==null&&(vr(g,u,m),jd(g,u,m)),u={cache:Tb()},s.payload=u;return}u=u.return}}function iY(s,u,m){var g=$r();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Qp(s)?pj(u,m):(m=bb(s,u,m,g),m!==null&&(vr(m,s,g),vj(m,u,g)))}function mj(s,u,m){var g=$r();Rd(s,u,m,g)}function Rd(s,u,m,g){var S={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Qp(s))pj(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var F=u.lastRenderedState,K=T(F,m);if(S.hasEagerState=!0,S.eagerState=K,Tr(K,F))return Dp(s,u,S,0),Tt===null&&Mp(),!1}catch{}finally{}if(m=bb(s,u,S,g),m!==null)return vr(m,s,g),vj(m,u,g),!0}return!1}function tw(s,u,m,g){if(g={lane:2,revertLane:Pw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Qp(s)){if(u)throw Error(i(479))}else u=bb(s,m,g,2),u!==null&&vr(u,s,2)}function Qp(s){var u=s.alternate;return s===In||u!==null&&u===In}function pj(s,u){cc=Vp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function vj(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,en(s,m)}}var Pd={readContext:Li,use:Yp,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Pd.useEffectEvent=Jt;var gj={readContext:Li,use:Yp,useCallback:function(s,u){return ar().memoizedState=[s,u===void 0?null:u],s},useContext:Li,useEffect:ej,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Xp(4194308,4,rj.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Xp(4194308,4,s,u)},useInsertionEffect:function(s,u){Xp(4,2,s,u)},useMemo:function(s,u){var m=ar();u=u===void 0?null:u;var g=s();if(Vl){on(!0);try{s()}finally{on(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=ar();if(m!==void 0){var S=m(u);if(Vl){on(!0);try{m(u)}finally{on(!1)}}}else S=u;return g.memoizedState=g.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},g.queue=s,s=s.dispatch=iY.bind(null,In,s),[g.memoizedState,s]},useRef:function(s){var u=ar();return s={current:s},u.memoizedState=s},useState:function(s){s=Kb(s);var u=s.queue,m=mj.bind(null,In,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Qb,useDeferredValue:function(s,u){var m=ar();return Jb(m,s,u)},useTransition:function(){var s=Kb(!1);return s=uj.bind(null,In,s.queue,!0,!1),ar().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=In,S=ar();if(it){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),Tt===null)throw Error(i(349));(et&127)!==0||LO(g,u,m)}S.memoizedState=m;var T={value:m,getSnapshot:u};return S.queue=T,ej(BO.bind(null,g,T,s),[s]),g.flags|=2048,dc(9,{destroy:void 0},IO.bind(null,g,T,m,u),null),m},useId:function(){var s=ar(),u=Tt.identifierPrefix;if(it){var m=Xa,g=Ka;m=(g&~(1<<32-nn(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Wp++,0<\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof g.is=="string"?F.createElement("select",{is:g.is}):F.createElement("select"),g.multiple?T.multiple=!0:g.size&&(T.size=g.size);break;default:T=typeof g.is=="string"?F.createElement(S,{is:g.is}):F.createElement(S)}}T[Jn]=u,T[Yt]=g;e:for(F=u.child;F!==null;){if(F.tag===5||F.tag===6)T.appendChild(F.stateNode);else if(F.tag!==4&&F.tag!==27&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===u)break e;for(;F.sibling===null;){if(F.return===null||F.return===u)break e;F=F.return}F.sibling.return=F.return,F=F.sibling}u.stateNode=T;e:switch(Bi(T,S,g),S){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Do(u)}}return Ft(u),vw(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&Do(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,ic(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,S=zi,S!==null)switch(S.tag){case 27:case 5:g=S.memoizedProps}s[Jn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||$E(s.nodeValue,m)),s||xs(u,!0)}else s=yv(s).createTextNode(g),s[Jn]=u,u.stateNode=s}return Ft(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=ic(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Jn]=u}else Ll(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ft(u),s=!1}else m=Ab(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Rr(u),u):(Rr(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Ft(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=ic(u),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(i(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(i(317));S[Jn]=u}else Ll(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ft(u),S=!1}else S=Ab(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?(Rr(u),u):(Rr(u),null)}return Rr(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,S=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(S=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==S&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),iv(u,u.updateQueue),Ft(u),null);case 4:return ae(),s===null&&Lw(u.stateNode.containerInfo),Ft(u),null;case 10:return jo(u.type),Ft(u),null;case 19:if(V(si),g=u.memoizedState,g===null)return Ft(u),null;if(S=(u.flags&128)!==0,T=g.rendering,T===null)if(S)$d(g,!1);else{if(ei!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=Up(s),T!==null){for(u.flags|=128,$d(g,!1),s=T.updateQueue,u.updateQueue=s,iv(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)mO(m,s),m=m.sibling;return I(si,si.current&1|2),it&&Ao(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ze()>lv&&(u.flags|=128,S=!0,$d(g,!1),u.lanes=4194304)}else{if(!S)if(s=Up(T),s!==null){if(u.flags|=128,S=!0,s=s.updateQueue,u.updateQueue=s,iv(u,s),$d(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!it)return Ft(u),null}else 2*Ze()-g.renderingStartTime>lv&&m!==536870912&&(u.flags|=128,S=!0,$d(g,!1),u.lanes=4194304);g.isBackwards?(T.sibling=u.child,u.child=T):(s=g.last,s!==null?s.sibling=T:u.child=T,g.last=T)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ze(),s.sibling=null,m=si.current,I(si,S?m&1|2:m&1),it&&Ao(u,g.treeForkCount),s):(Ft(u),null);case 22:case 23:return Rr(u),Ib(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(Ft(u),u.subtreeFlags&6&&(u.flags|=8192)):Ft(u),m=u.updateQueue,m!==null&&iv(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&V(Fl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),jo(di),Ft(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function lY(s,u){switch(Sb(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return jo(di),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return xe(u),null;case 31:if(u.memoizedState!==null){if(Rr(u),u.alternate===null)throw Error(i(340));Ll()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Rr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Ll()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return V(si),null;case 4:return ae(),null;case 10:return jo(u.type),null;case 22:case 23:return Rr(u),Ib(),s!==null&&V(Fl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return jo(di),null;case 25:return null;default:return null}}function Fj(s,u){switch(Sb(u),u.tag){case 3:jo(di),ae();break;case 26:case 27:case 5:xe(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Rr(u);break;case 13:Rr(u);break;case 19:V(si);break;case 10:jo(u.type);break;case 22:case 23:Rr(u),Ib(),s!==null&&V(Fl);break;case 24:jo(di)}}function zd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var S=g.next;m=S;do{if((m.tag&s)===s){g=void 0;var T=m.create,F=m.inst;g=T(),F.destroy=g}m=m.next}while(m!==S)}}catch(K){_t(u,u.return,K)}}function Ts(s,u,m){try{var g=u.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var T=S.next;g=T;do{if((g.tag&s)===s){var F=g.inst,K=F.destroy;if(K!==void 0){F.destroy=void 0,S=u;var J=m,de=K;try{de()}catch(je){_t(S,J,je)}}}g=g.next}while(g!==T)}}catch(je){_t(u,u.return,je)}}function qj(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{DO(u,m)}catch(g){_t(s,s.return,g)}}}function Hj(s,u,m){m.props=Wl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){_t(s,u,g)}}function Ld(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(S){_t(s,u,S)}}function Za(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(S){_t(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(S){_t(s,u,S)}else m.current=null}function Uj(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(S){_t(s,s.return,S)}}function gw(s,u,m){try{var g=s.stateNode;TY(g,s.type,m,u),g[Yt]=u}catch(S){_t(s,s.return,S)}}function Vj(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&zs(s.type)||s.tag===4}function yw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Vj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&zs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function bw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=oe));else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(bw(s,u,m),s=s.sibling;s!==null;)bw(s,u,m),s=s.sibling}function rv(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(rv(s,u,m),s=s.sibling;s!==null;)rv(s,u,m),s=s.sibling}function Wj(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);Bi(u,g,m),u[Jn]=s,u[Yt]=m}catch(T){_t(s,s.return,T)}}var Ro=!1,pi=!1,ww=!1,Gj=typeof WeakSet=="function"?WeakSet:Set,Ti=null;function uY(s,u){if(s=s.containerInfo,Fw=Cv,s=aO(s),hb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var S=g.anchorOffset,T=g.focusNode;g=g.focusOffset;try{m.nodeType,T.nodeType}catch{m=null;break e}var F=0,K=-1,J=-1,de=0,je=0,Me=s,pe=null;n:for(;;){for(var ke;Me!==m||S!==0&&Me.nodeType!==3||(K=F+S),Me!==T||g!==0&&Me.nodeType!==3||(J=F+g),Me.nodeType===3&&(F+=Me.nodeValue.length),(ke=Me.firstChild)!==null;)pe=Me,Me=ke;for(;;){if(Me===s)break n;if(pe===m&&++de===S&&(K=F),pe===T&&++je===g&&(J=F),(ke=Me.nextSibling)!==null)break;Me=pe,pe=Me.parentNode}Me=ke}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(qw={focusedElem:s,selectionRange:m},Cv=!1,Ti=u;Ti!==null;)if(u=Ti,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Ti=s;else for(;Ti!==null;){switch(u=Ti,T=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Bi(T,g,m),T[Jn]=s,un(T),g=T;break e;case"link":var F=JE("link","href",S).get(g+(m.href||""));if(F){for(var K=0;KCt&&(F=Ct,Ct=xn,xn=F);var se=iO(K,xn),te=iO(K,Ct);if(se&&te&&(ke.rangeCount!==1||ke.anchorNode!==se.node||ke.anchorOffset!==se.offset||ke.focusNode!==te.node||ke.focusOffset!==te.offset)){var fe=Me.createRange();fe.setStart(se.node,se.offset),ke.removeAllRanges(),xn>Ct?(ke.addRange(fe),ke.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ke.addRange(fe))}}}}for(Me=[],ke=K;ke=ke.parentNode;)ke.nodeType===1&&Me.push({element:ke,left:ke.scrollLeft,top:ke.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,D.T=null,m=Ow,Ow=null;var T=Ps,F=Lo;if(_i=0,gc=Ps=null,Lo=0,(vt&6)!==0)throw Error(i(331));var K=vt;if(vt|=4,rE(T.current),nE(T,T.current,F,m),vt=K,Ud(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(En,T)}catch{}return!0}finally{$.p=S,D.T=g,_E(s,u)}}function SE(s,u,m){u=Qr(m,u),u=ow(s.stateNode,u,2),s=Os(s,u,2),s!==null&&(at(s,2),Qa(s))}function _t(s,u,m){if(s.tag===3)SE(s,s,m);else for(;u!==null;){if(u.tag===3){SE(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Rs===null||!Rs.has(g))){s=Qr(m,s),m=Cj(2),g=Os(u,m,2),g!==null&&(Aj(m,g,u,s),at(g,2),Qa(g));break}}u=u.return}}function Mw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new dY;var S=new Set;g.set(u,S)}else S=g.get(u),S===void 0&&(S=new Set,g.set(u,S));S.has(m)||(xw=!0,S.add(m),s=gY.bind(null,s,u,m),u.then(s,s))}function gY(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Tt===s&&(et&m)===m&&(ei===4||ei===3&&(et&62914560)===et&&300>Ze()-sv?(vt&2)===0&&yc(s,0):Sw|=m,vc===et&&(vc=0)),Qa(s)}function CE(s,u){u===0&&(u=Ue()),s=$l(s,u),s!==null&&(at(s,u),Qa(s))}function yY(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),CE(s,m)}function bY(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,S=s.memoizedState;S!==null&&(m=S.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),CE(s,m)}function wY(s,u){return ce(s,u)}var mv=null,wc=null,Dw=!1,pv=!1,Rw=!1,$s=0;function Qa(s){s!==wc&&s.next===null&&(wc===null?mv=wc=s:wc=wc.next=s),pv=!0,Dw||(Dw=!0,_Y())}function Ud(s,u){if(!Rw&&pv){Rw=!0;do for(var m=!1,g=mv;g!==null;){if(s!==0){var S=g.pendingLanes;if(S===0)var T=0;else{var F=g.suspendedLanes,K=g.pingedLanes;T=(1<<31-nn(42|s)+1)-1,T&=S&~(F&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(m=!0,EE(g,T))}else T=et,T=ut(g,g===Tt?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(T&3)===0||jt(g,T)||(m=!0,EE(g,T));g=g.next}while(m);Rw=!1}}function kY(){AE()}function AE(){pv=Dw=!1;var s=0;$s!==0&&DY()&&(s=$s);for(var u=Ze(),m=null,g=mv;g!==null;){var S=g.next,T=OE(g,u);T===0?(g.next=null,m===null?mv=S:m.next=S,S===null&&(wc=m)):(m=g,(s!==0||(T&3)!==0)&&(pv=!0)),g=S}_i!==0&&_i!==5||Ud(s),$s!==0&&($s=0)}function OE(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0K)break;var je=J.transferSize,Me=J.initiatorType;je&&zE(Me)&&(J=J.responseEnd,F+=je*(J"u"?null:document;function KE(s,u,m){var g=kc;if(g&&typeof u=="string"&&u){var S=rr(u);S='link[rel="'+s+'"][href="'+S+'"]',typeof m=="string"&&(S+='[crossorigin="'+m+'"]'),YE.has(S)||(YE.add(S),s={rel:s,crossOrigin:m,href:u},g.querySelector(S)===null&&(u=g.createElement("link"),Bi(u,"link",s),un(u),g.head.appendChild(u)))}}function FY(s){Io.D(s),KE("dns-prefetch",s,null)}function qY(s,u){Io.C(s,u),KE("preconnect",s,u)}function HY(s,u,m){Io.L(s,u,m);var g=kc;if(g&&s&&u){var S='link[rel="preload"][as="'+rr(u)+'"]';u==="image"&&m&&m.imageSrcSet?(S+='[imagesrcset="'+rr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(S+='[imagesizes="'+rr(m.imageSizes)+'"]')):S+='[href="'+rr(s)+'"]';var T=S;switch(u){case"style":T=_c(s);break;case"script":T=xc(s)}ra.has(T)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),ra.set(T,s),g.querySelector(S)!==null||u==="style"&&g.querySelector(Yd(T))||u==="script"&&g.querySelector(Kd(T))||(u=g.createElement("link"),Bi(u,"link",s),un(u),g.head.appendChild(u)))}}function UY(s,u){Io.m(s,u);var m=kc;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+rr(g)+'"][href="'+rr(s)+'"]',T=S;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=xc(s)}if(!ra.has(T)&&(s=d({rel:"modulepreload",href:s},u),ra.set(T,s),m.querySelector(S)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Kd(T)))return}g=m.createElement("link"),Bi(g,"link",s),un(g),m.head.appendChild(g)}}}function VY(s,u,m){Io.S(s,u,m);var g=kc;if(g&&s){var S=fi(g).hoistableStyles,T=_c(s);u=u||"default";var F=S.get(T);if(!F){var K={loading:0,preload:null};if(F=g.querySelector(Yd(T)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=ra.get(T))&&Kw(s,m);var J=F=g.createElement("link");un(J),Bi(J,"link",s),J._p=new Promise(function(de,je){J.onload=de,J.onerror=je}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,wv(F,u,g)}F={type:"stylesheet",instance:F,count:1,state:K},S.set(T,F)}}}function WY(s,u){Io.X(s,u);var m=kc;if(m&&s){var g=fi(m).hoistableScripts,S=xc(s),T=g.get(S);T||(T=m.querySelector(Kd(S)),T||(s=d({src:s,async:!0},u),(u=ra.get(S))&&Xw(s,u),T=m.createElement("script"),un(T),Bi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(S,T))}}function GY(s,u){Io.M(s,u);var m=kc;if(m&&s){var g=fi(m).hoistableScripts,S=xc(s),T=g.get(S);T||(T=m.querySelector(Kd(S)),T||(s=d({src:s,async:!0,type:"module"},u),(u=ra.get(S))&&Xw(s,u),T=m.createElement("script"),un(T),Bi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(S,T))}}function XE(s,u,m,g){var S=(S=re.current)?bv(S):null;if(!S)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=_c(m.href),m=fi(S).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=_c(m.href);var T=fi(S).hoistableStyles,F=T.get(s);if(F||(S=S.ownerDocument||S,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(s,F),(T=S.querySelector(Yd(s)))&&!T._p&&(F.instance=T,F.state.loading=5),ra.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ra.set(s,m),T||YY(S,s,m,F.state))),u&&g===null)throw Error(i(528,""));return F}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=xc(m),m=fi(S).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function _c(s){return'href="'+rr(s)+'"'}function Yd(s){return'link[rel="stylesheet"]['+s+"]"}function ZE(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function YY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),Bi(u,"link",m),un(u),s.head.appendChild(u))}function xc(s){return'[src="'+rr(s)+'"]'}function Kd(s){return"script[async]"+s}function QE(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+rr(m.href)+'"]');if(g)return u.instance=g,un(g),g;var S=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),un(g),Bi(g,"style",S),wv(g,m.precedence,s),u.instance=g;case"stylesheet":S=_c(m.href);var T=s.querySelector(Yd(S));if(T)return u.state.loading|=4,u.instance=T,un(T),T;g=ZE(m),(S=ra.get(S))&&Kw(g,S),T=(s.ownerDocument||s).createElement("link"),un(T);var F=T;return F._p=new Promise(function(K,J){F.onload=K,F.onerror=J}),Bi(T,"link",g),u.state.loading|=4,wv(T,m.precedence,s),u.instance=T;case"script":return T=xc(m.src),(S=s.querySelector(Kd(T)))?(u.instance=S,un(S),S):(g=m,(S=ra.get(T))&&(g=d({},m),Xw(g,S)),s=s.ownerDocument||s,S=s.createElement("script"),un(S),Bi(S,"link",g),s.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,wv(g,m.precedence,s));return u.instance}function wv(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=g.length?g[g.length-1]:null,T=S,F=0;F title"):null)}function KY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function n5(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function XY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var S=_c(g.href),T=u.querySelector(Yd(S));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=_v.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=T,un(T);return}T=u.ownerDocument||u,g=ZE(g),(S=ra.get(S))&&Kw(g,S),T=T.createElement("link"),un(T);var F=T;F._p=new Promise(function(K,J){F.onload=K,F.onerror=J}),Bi(T,"link",g),m.instance=T}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=_v.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Zw=0;function ZY(s,u){return s.stylesheets&&s.count===0&&Sv(s,s.stylesheets),0Zw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(S)}}:null}function _v(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var xv=null;function Sv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,xv=new Map,u.forEach(QY,s),xv=null,_v.call(s))}function QY(s,u){if(!(u.state.loading&4)){var m=xv.get(s);if(m)var g=m.get(null);else{m=new Map,xv.set(s,m);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),$k.exports=xie(),$k.exports}var Cie=Sie();class YB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function Aie(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new YB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Oie="/api";function Vn(e,n){return Aie(e,n,Oie)}function FT(){return Vn("/board")}function jie(){return Vn("/flags")}function KB(){return Vn("/version")}function Eie(e){return Vn("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Zl(e,n){return Vn(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Tie(e){return Vn(`/columns/${e}`,{method:"DELETE"})}function Mie(e){return Vn("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Die(e){return Vn("/cards",{method:"POST",body:JSON.stringify(e)})}function Ec(e,n){return Vn(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Rie(e){return Vn(`/cards/${e}`,{method:"DELETE"})}function Ik(e,n){return Vn(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function Pie(){return Vn("/trash")}function Nie(e){return Vn(`/cards/${e}/restore`,{method:"POST"})}function $ie(e){return Vn(`/cards/${e}/purge`,{method:"DELETE"})}function zie(){return Vn("/archive")}function Lie(e){return Vn(`/cards/${e}/archive`,{method:"POST"})}function Iie(e){return Vn(`/cards/${e}/unarchive`,{method:"POST"})}function Bie(e,n){const t=new URLSearchParams({date:e});return Vn(`/reports/daily?${t.toString()}`)}function Fie(e){return Vn(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function qie(e,n){const t=new URLSearchParams({date:e});return Vn(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Hie(e){return Vn(`/settings/${encodeURIComponent(e)}`)}function Uie(e,n){return Vn(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function Vie(e,n,t){return Vn(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function Wie(e){return Vn(`/cards/${e}/history`)}function Gie(e){return Vn(`/cards/${e}/messages`)}function Yie(e,n){return Vn(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Kie(e,n){return Vn(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Xie(e){return Vn(`/cards/${e}/duplicate`,{method:"POST"})}function Zie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function Qie(e){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/cards/${e}/chat/ws`}function XB(e=!1){return Vn(`/notifications${e?"?unread=1":""}`)}function ZB(){return Vn("/notifications/unread-count")}function Jie(e){return Vn(`/notifications/${e}/read`,{method:"POST"})}function ere(){return Vn("/notifications/read-all",{method:"POST"})}function nre(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(Zie());let o=!1;const l=c=>{if(!o){o=!0;try{a.close()}catch{}c?r(c):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=c=>{try{const f=JSON.parse(typeof c.data=="string"?c.data:"");n(f),(f.type==="done"||f.type==="error")&&l(f.type==="error"?new Error(f.error):void 0)}catch(f){l(f)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function qT(e,n){return Vn("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function tre(e,n,t){return Vn("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function ire(){return Vn("/auth/logout",{method:"POST"})}function rre(){return Vn("/me")}function HT(e){return Vn("/me",{method:"PATCH",body:JSON.stringify(e)})}function QB(){return Vn("/users")}function JB(){return Vn("/tags")}function are(){return Vn("/requesters")}function eF(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return Vn(`/metrics${t?`?${t}`:""}`)}const nF=A.createContext(null);function ore({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{rre().then(t).catch(c=>{(!(c instanceof YB)||c.status!==401)&&console.warn("getMe failed",c)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(c,f)=>{const h=await qT(c,f);t(h)},[]),o=A.useCallback(async(c,f,h)=>{await tre(c,f,h);const d=await qT(c,f);t(d)},[]),l=A.useCallback(async()=>{await ire(),t(null)},[]);return y.jsx(nF.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function QC(){const e=A.useContext(nF);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function sre(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const e0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gf(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function JC(e){return"nodeType"in e}function cr(e){var n,t;return e?Gf(e)?e:JC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function e9(e){const{Document:n}=cr(e);return e instanceof n}function tp(e){return Gf(e)?!1:e instanceof cr(e).HTMLElement}function tF(e){return e instanceof cr(e).SVGElement}function Yf(e){return e?Gf(e)?e.document:JC(e)?e9(e)?e:tp(e)||tF(e)?e.ownerDocument:document:document:document}const Va=e0?A.useLayoutEffect:A.useEffect;function n0(e){const n=A.useRef(e);return Va(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function em(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Va(()=>{t.current!==e&&(t.current=e)},n),t}function ip(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function Ig(e){const n=n0(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function Bg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let Bk={};function rp(e,n){return A.useMemo(()=>{if(n)return n;const t=Bk[e]==null?0:Bk[e]+1;return Bk[e]=t,e+"-"+t},[e,n])}function iF(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[c,f]of l){const h=a[c];h!=null&&(a[c]=h+e*f)}return a},{...n})}}const Wc=iF(1),nm=iF(-1);function ure(e){return"clientX"in e&&"clientY"in e}function t0(e){if(!e)return!1;const{KeyboardEvent:n}=cr(e.target);return n&&e instanceof n}function cre(e){if(!e)return!1;const{TouchEvent:n}=cr(e.target);return n&&e instanceof n}function Fg(e){if(cre(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return ure(e)?{x:e.clientX,y:e.clientY}:null}const ho=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[ho.Translate.toString(e),ho.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),UT="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function fre(e){return e.matches(UT)?e:e.querySelector(UT)}const dre={display:"none"};function hre(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:dre},t)}function mre(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Q.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function pre(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const rF=A.createContext(null);function vre(e){const n=A.useContext(rF);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function gre(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const yre={draggable:` +`);for(S=y=0;yS||J[y]!==de[S]){var Oe=` +`+J[y].replace(" at new "," at ");return s.displayName&&Oe.includes("")&&(Oe=Oe.replace("",s.displayName)),Oe}while(1<=y&&0<=S);break}}}finally{je=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?ke(m):""}function ge(s,u){switch(s.tag){case 26:case 27:case 5:return ke(s.type);case 16:return ke("Lazy");case 13:return s.child!==u&&u!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Ne(s.type,!1);case 11:return Ne(s.type.render,!1);case 1:return Ne(s.type,!0);case 31:return ke("Activity");default:return""}}function Ce(s){try{var u="",m=null;do u+=ge(s,m),m=s,s=s.return;while(s);return u}catch(y){return` +Error generating stack: `+y.message+` +`+y.stack}}var Pe=Object.prototype.hasOwnProperty,ce=e.unstable_scheduleCallback,qe=e.unstable_cancelCallback,Ye=e.unstable_shouldYield,We=e.unstable_requestPaint,Ze=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,Je=e.unstable_LowPriority,Ae=e.unstable_IdlePriority,an=e.log,mn=e.unstable_setDisableYieldValue,En=null,vn=null;function sn(s){if(typeof an=="function"&&mn(s),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(En,s)}catch{}}var en=Math.clz32?Math.clz32:He,zn=Math.log,Re=Math.LN2;function He(s){return s>>>=0,s===0?32:31-(zn(s)/Re|0)|0}var Dn=256,kn=262144,bn=4194304;function _n(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ft(s,u,m){var y=s.pendingLanes;if(y===0)return 0;var S=0,T=s.suspendedLanes,B=s.pingedLanes;s=s.warmLanes;var K=y&134217727;return K!==0?(y=K&~T,y!==0?S=_n(y):(B&=K,B!==0?S=_n(B):m||(m=K&~s,m!==0&&(S=_n(m))))):(K=y&~T,K!==0?S=_n(K):B!==0?S=_n(B):m||(m=y&~s,m!==0&&(S=_n(m)))),S===0?0:u!==0&&u!==S&&(u&T)===0&&(T=S&-S,m=u&-u,T>=m||T===32&&(m&4194048)!==0)?u:S}function Tt(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Be(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var s=bn;return bn<<=1,(bn&62914560)===0&&(bn=4194304),s}function Ln(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function ut(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Pn(s,u,m,y,S,T){var B=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,de=s.hiddenUpdates;for(m=B&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Ep=/[\n"\\]/g;function rr(s){return s.replace(Ep,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Yu(s,u,m,y,S,T,B,K){s.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?s.type=B:s.removeAttribute("type"),u!=null?B==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+ir(u)):s.value!==""+ir(u)&&(s.value=""+ir(u)):B!=="submit"&&B!=="reset"||s.removeAttribute("value"),u!=null?Ku(s,B,ir(u)):m!=null?Ku(s,B,ir(m)):y!=null&&s.removeAttribute("value"),S==null&&T!=null&&(s.defaultChecked=!!T),S!=null&&(s.checked=S&&typeof S!="function"&&typeof S!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+ir(K):s.removeAttribute("name")}function md(s,u,m,y,S,T,B,K){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(s.type=T),u!=null||m!=null){if(!(T!=="submit"&&T!=="reset"||u!=null)){Gu(s);return}m=m!=null?""+ir(m):"",u=u!=null?""+ir(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}y=y??S,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=K?s.checked:!!y,s.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(s.name=B),Gu(s)}function Ku(s,u,m){u==="number"&&Cs(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function jo(s,u,m,y){if(s=s.options,u){u={};for(var S=0;S"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(ht)try{var Ni={};Object.defineProperty(Ni,"passive",{get:function(){fi=!0}}),window.addEventListener("test",Ni,Ni),window.removeEventListener("test",Ni,Ni)}catch{fi=!1}var zt=null,dt=null,di=null;function ar(){if(di)return di;var s,u=dt,m=u.length,y,S="value"in zt?zt.value:zt.textContent,T=S.length;for(s=0;s=wd),GA=" ",YA=!1;function KA(s,u){switch(s){case"keyup":return IG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Qu=!1;function FG(s,u){switch(s){case"compositionend":return XA(u);case"keypress":return u.which!==32?null:(YA=!0,GA);case"textInput":return s=u.data,s===GA&&YA?null:s;default:return null}}function qG(s,u){if(Qu)return s==="compositionend"||!db&&KA(s,u)?(s=ar(),di=dt=zt=null,Qu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=rj(m)}}function oj(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?oj(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function sj(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Cs(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Cs(s.document)}return u}function pb(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var XG=ht&&"documentMode"in document&&11>=document.documentMode,Ju=null,vb=null,Sd=null,gb=!1;function lj(s,u,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;gb||Ju==null||Ju!==Cs(y)||(y=Ju,"selectionStart"in y&&pb(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Sd&&xd(Sd,y)||(Sd=y,y=wv(vb,"onSelect"),0>=B,S-=B,Ja=1<<32-en(u)+S|m<Hn?(tt=dn,dn=null):tt=dn.sibling;var pt=pe(se,dn,fe[Hn],Te);if(pt===null){dn===null&&(dn=tt);break}s&&dn&&pt.alternate===null&&u(se,dn),te=T(pt,te,Hn),mt===null?yn=pt:mt.sibling=pt,mt=pt,dn=tt}if(Hn===fe.length)return m(se,dn),at&&Do(se,Hn),yn;if(dn===null){for(;HnHn?(tt=dn,dn=null):tt=dn.sibling;var Gs=pe(se,dn,pt.value,Te);if(Gs===null){dn===null&&(dn=tt);break}s&&dn&&Gs.alternate===null&&u(se,dn),te=T(Gs,te,Hn),mt===null?yn=Gs:mt.sibling=Gs,mt=Gs,dn=tt}if(pt.done)return m(se,dn),at&&Do(se,Hn),yn;if(dn===null){for(;!pt.done;Hn++,pt=fe.next())pt=Me(se,pt.value,Te),pt!==null&&(te=T(pt,te,Hn),mt===null?yn=pt:mt.sibling=pt,mt=pt);return at&&Do(se,Hn),yn}for(dn=y(dn);!pt.done;Hn++,pt=fe.next())pt=_e(dn,se,Hn,pt.value,Te),pt!==null&&(s&&pt.alternate!==null&&dn.delete(pt.key===null?Hn:pt.key),te=T(pt,te,Hn),mt===null?yn=pt:mt.sibling=pt,mt=pt);return s&&dn.forEach(function(vK){return u(se,vK)}),at&&Do(se,Hn),yn}function jt(se,te,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var yn=fe.key;te!==null;){if(te.key===yn){if(yn=fe.type,yn===w){if(te.tag===7){m(se,te.sibling),Te=S(te,fe.props.children),Te.return=se,se=Te;break e}}else if(te.elementType===yn||typeof yn=="object"&&yn!==null&&yn.$$typeof===N&&Hl(yn)===te.type){m(se,te.sibling),Te=S(te,fe.props),Td(Te,fe),Te.return=se,se=Te;break e}m(se,te);break}else u(se,te);te=te.sibling}fe.type===w?(Te=Ll(fe.props.children,se.mode,Te,fe.key),Te.return=se,se=Te):(Te=zp(fe.type,fe.key,fe.props,null,se.mode,Te),Td(Te,fe),Te.return=se,se=Te)}return B(se);case b:e:{for(yn=fe.key;te!==null;){if(te.key===yn)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){m(se,te.sibling),Te=S(te,fe.children||[]),Te.return=se,se=Te;break e}else{m(se,te);break}else u(se,te);te=te.sibling}Te=Sb(fe,se.mode,Te),Te.return=se,se=Te}return B(se);case N:return fe=Hl(fe),jt(se,te,fe,Te)}if($(fe))return un(se,te,fe,Te);if(F(fe)){if(yn=F(fe),typeof yn!="function")throw Error(i(150));return fe=yn.call(fe),Sn(se,te,fe,Te)}if(typeof fe.then=="function")return jt(se,te,Up(fe),Te);if(fe.$$typeof===x)return jt(se,te,Bp(se,fe),Te);Vp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(m(se,te.sibling),Te=S(te,fe),Te.return=se,se=Te):(m(se,te),Te=xb(fe,se.mode,Te),Te.return=se,se=Te),B(se)):m(se,te)}return function(se,te,fe,Te){try{Ed=0;var yn=jt(se,te,fe,Te);return cc=null,yn}catch(dn){if(dn===uc||dn===qp)throw dn;var mt=Pr(29,dn,null,se.mode);return mt.lanes=Te,mt.return=se,mt}finally{}}}var Vl=Mj(!0),Dj=Mj(!1),Ts=!1;function $b(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ms(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ds(s,u,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(bt&2)!==0){var S=y.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),y.pending=u,u=$p(s),pj(s,null,m),u}return Np(s,y,u,m),$p(s)}function Md(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var y=u.lanes;y&=s.pendingLanes,m|=y,u.lanes=m,tn(s,m)}}function Lb(s,u){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var S=null,T=null;if(m=m.firstBaseUpdate,m!==null){do{var B={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};T===null?S=T=B:T=T.next=B,m=m.next}while(m!==null);T===null?S=T=u:T=T.next=u}else S=T=u;m={baseState:y.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:y.shared,callbacks:y.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var Ib=!1;function Dd(){if(Ib){var s=lc;if(s!==null)throw s}}function Rd(s,u,m,y){Ib=!1;var S=s.updateQueue;Ts=!1;var T=S.firstBaseUpdate,B=S.lastBaseUpdate,K=S.shared.pending;if(K!==null){S.shared.pending=null;var J=K,de=J.next;J.next=null,B===null?T=de:B.next=de,B=J;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==B&&(K===null?Oe.firstBaseUpdate=de:K.next=de,Oe.lastBaseUpdate=J))}if(T!==null){var Me=S.baseState;B=0,Oe=de=J=null,K=T;do{var pe=K.lane&-536870913,_e=pe!==K.lane;if(_e?(nt&pe)===pe:(y&pe)===pe){pe!==0&&pe===sc&&(Ib=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var un=s,Sn=K;pe=u;var jt=m;switch(Sn.tag){case 1:if(un=Sn.payload,typeof un=="function"){Me=un.call(jt,Me,pe);break e}Me=un;break e;case 3:un.flags=un.flags&-65537|128;case 0:if(un=Sn.payload,pe=typeof un=="function"?un.call(jt,Me,pe):un,pe==null)break e;Me=d({},Me,pe);break e;case 2:Ts=!0}}pe=K.callback,pe!==null&&(s.flags|=64,_e&&(s.flags|=8192),_e=S.callbacks,_e===null?S.callbacks=[pe]:_e.push(pe))}else _e={lane:pe,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(de=Oe=_e,J=Me):Oe=Oe.next=_e,B|=pe;if(K=K.next,K===null){if(K=S.shared.pending,K===null)break;_e=K,K=_e.next,_e.next=null,S.lastBaseUpdate=_e,S.shared.pending=null}}while(!0);Oe===null&&(J=Me),S.baseState=J,S.firstBaseUpdate=de,S.lastBaseUpdate=Oe,T===null&&(S.shared.lanes=0),zs|=B,s.lanes=B,s.memoizedState=Me}}function Rj(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function Pj(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sT?T:8;var B=P.T,K={};P.T=K,rw(s,!1,u,m);try{var J=S(),de=P.S;if(de!==null&&de(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Oe=aY(J,y);$d(s,u,Oe,Ir(s))}else $d(s,u,y,Ir(s))}catch(Me){$d(s,u,{then:function(){},status:"rejected",reason:Me},Ir())}finally{I.p=T,B!==null&&K.types!==null&&(B.types=K.types),P.T=B}}function fY(){}function tw(s,u,m,y){if(s.tag!==5)throw Error(i(476));var S=dO(s).queue;fO(s,S,u,H,m===null?fY:function(){return hO(s),m(y)})}function dO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:H},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function hO(s){var u=dO(s);u.next===null&&(u=s.alternate.memoizedState),$d(s,u.next.queue,{},Ir())}function iw(){return Li(Jd)}function mO(){return li().memoizedState}function pO(){return li().memoizedState}function dY(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Ir();s=Ms(m);var y=Ds(u,s,m);y!==null&&(kr(y,u,m),Md(y,u,m)),u={cache:Db()},s.payload=u;return}u=u.return}}function hY(s,u,m){var y=Ir();m={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},nv(s)?gO(u,m):(m=kb(s,u,m,y),m!==null&&(kr(m,s,y),yO(m,u,y)))}function vO(s,u,m){var y=Ir();$d(s,u,m,y)}function $d(s,u,m,y){var S={lane:y,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(nv(s))gO(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var B=u.lastRenderedState,K=T(B,m);if(S.hasEagerState=!0,S.eagerState=K,Rr(K,B))return Np(s,u,S,0),Mt===null&&Pp(),!1}catch{}finally{}if(m=kb(s,u,S,y),m!==null)return kr(m,s,y),yO(m,u,y),!0}return!1}function rw(s,u,m,y){if(y={lane:2,revertLane:$w(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},nv(s)){if(u)throw Error(i(479))}else u=kb(s,m,y,2),u!==null&&kr(u,s,2)}function nv(s){var u=s.alternate;return s===Fn||u!==null&&u===Fn}function gO(s,u){dc=Yp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function yO(s,u,m){if((m&4194048)!==0){var y=u.lanes;y&=s.pendingLanes,m|=y,u.lanes=m,tn(s,m)}}var zd={readContext:Li,use:Zp,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useLayoutEffect:ei,useInsertionEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useSyncExternalStore:ei,useId:ei,useHostTransitionStatus:ei,useFormState:ei,useActionState:ei,useOptimistic:ei,useMemoCache:ei,useCacheRefresh:ei};zd.useEffectEvent=ei;var bO={readContext:Li,use:Zp,useCallback:function(s,u){return sr().memoizedState=[s,u===void 0?null:u],s},useContext:Li,useEffect:tO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Jp(4194308,4,oO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Jp(4194308,4,s,u)},useInsertionEffect:function(s,u){Jp(4,2,s,u)},useMemo:function(s,u){var m=sr();u=u===void 0?null:u;var y=s();if(Wl){sn(!0);try{s()}finally{sn(!1)}}return m.memoizedState=[y,u],y},useReducer:function(s,u,m){var y=sr();if(m!==void 0){var S=m(u);if(Wl){sn(!0);try{m(u)}finally{sn(!1)}}}else S=u;return y.memoizedState=y.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},y.queue=s,s=s.dispatch=hY.bind(null,Fn,s),[y.memoizedState,s]},useRef:function(s){var u=sr();return s={current:s},u.memoizedState=s},useState:function(s){s=Zb(s);var u=s.queue,m=vO.bind(null,Fn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:ew,useDeferredValue:function(s,u){var m=sr();return nw(m,s,u)},useTransition:function(){var s=Zb(!1);return s=fO.bind(null,Fn,s.queue,!0,!1),sr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var y=Fn,S=sr();if(at){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),Mt===null)throw Error(i(349));(nt&127)!==0||Bj(y,u,m)}S.memoizedState=m;var T={value:m,getSnapshot:u};return S.queue=T,tO(qj.bind(null,y,T,s),[s]),y.flags|=2048,mc(9,{destroy:void 0},Fj.bind(null,y,T,m,u),null),m},useId:function(){var s=sr(),u=Mt.identifierPrefix;if(at){var m=eo,y=Ja;m=(y&~(1<<32-en(y)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Kp++,0<\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?T.multiple=!0:y.size&&(T.size=y.size);break;default:T=typeof y.is=="string"?B.createElement(S,{is:y.is}):B.createElement(S)}}T[Kn]=u,T[$t]=y;e:for(B=u.child;B!==null;){if(B.tag===5||B.tag===6)T.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===u)break e;for(;B.sibling===null;){if(B.return===null||B.return===u)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}u.stateNode=T;e:switch(Bi(T,S,y),S){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&Lo(u)}}return qt(u),yw(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==y&&Lo(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,ac(u)){if(s=u.stateNode,m=u.memoizedProps,y=null,S=zi,S!==null)switch(S.tag){case 27:case 5:y=S.memoizedProps}s[Kn]=u,s=!!(s.nodeValue===m||y!==null&&y.suppressHydrationWarning===!0||LE(s.nodeValue,m)),s||Os(u,!0)}else s=kv(s).createTextNode(y),s[Kn]=u,u.stateNode=s}return qt(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(y=ac(u),m!==null){if(s===null){if(!y)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Kn]=u}else Il(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qt(u),s=!1}else m=Ob(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?($r(u),u):($r(u),null);if((u.flags&128)!==0)throw Error(i(558))}return qt(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=ac(u),y!==null&&y.dehydrated!==null){if(s===null){if(!S)throw Error(i(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(i(317));S[Kn]=u}else Il(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qt(u),S=!1}else S=Ob(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?($r(u),u):($r(u),null)}return $r(u),(u.flags&128)!==0?(u.lanes=m,u):(m=y!==null,s=s!==null&&s.memoizedState!==null,m&&(y=u.child,S=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(S=y.alternate.memoizedState.cachePool.pool),T=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(T=y.memoizedState.cachePool.pool),T!==S&&(y.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),ov(u,u.updateQueue),qt(u),null);case 4:return ae(),s===null&&Bw(u.stateNode.containerInfo),qt(u),null;case 10:return Po(u.type),qt(u),null;case 19:if(G(si),y=u.memoizedState,y===null)return qt(u),null;if(S=(u.flags&128)!==0,T=y.rendering,T===null)if(S)Id(y,!1);else{if(ni!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=Gp(s),T!==null){for(u.flags|=128,Id(y,!1),s=T.updateQueue,u.updateQueue=s,ov(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)vj(m,s),m=m.sibling;return z(si,si.current&1|2),at&&Do(u,y.treeForkCount),u.child}s=s.sibling}y.tail!==null&&Ze()>fv&&(u.flags|=128,S=!0,Id(y,!1),u.lanes=4194304)}else{if(!S)if(s=Gp(T),s!==null){if(u.flags|=128,S=!0,s=s.updateQueue,u.updateQueue=s,ov(u,s),Id(y,!0),y.tail===null&&y.tailMode==="hidden"&&!T.alternate&&!at)return qt(u),null}else 2*Ze()-y.renderingStartTime>fv&&m!==536870912&&(u.flags|=128,S=!0,Id(y,!1),u.lanes=4194304);y.isBackwards?(T.sibling=u.child,u.child=T):(s=y.last,s!==null?s.sibling=T:u.child=T,y.last=T)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Ze(),s.sibling=null,m=si.current,z(si,S?m&1|2:m&1),at&&Do(u,y.treeForkCount),s):(qt(u),null);case 22:case 23:return $r(u),Fb(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(m&536870912)!==0&&(u.flags&128)===0&&(qt(u),u.subtreeFlags&6&&(u.flags|=8192)):qt(u),m=u.updateQueue,m!==null&&ov(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==m&&(u.flags|=2048),s!==null&&G(ql),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),Po(hi),qt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function yY(s,u){switch(Ab(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Po(hi),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Se(u),null;case 31:if(u.memoizedState!==null){if($r(u),u.alternate===null)throw Error(i(340));Il()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if($r(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Il()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return G(si),null;case 4:return ae(),null;case 10:return Po(u.type),null;case 22:case 23:return $r(u),Fb(),s!==null&&G(ql),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Po(hi),null;case 25:return null;default:return null}}function HO(s,u){switch(Ab(u),u.tag){case 3:Po(hi),ae();break;case 26:case 27:case 5:Se(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&$r(u);break;case 13:$r(u);break;case 19:G(si);break;case 10:Po(u.type);break;case 22:case 23:$r(u),Fb(),s!==null&&G(ql);break;case 24:Po(hi)}}function Bd(s,u){try{var m=u.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var S=y.next;m=S;do{if((m.tag&s)===s){y=void 0;var T=m.create,B=m.inst;y=T(),B.destroy=y}m=m.next}while(m!==S)}}catch(K){St(u,u.return,K)}}function Ns(s,u,m){try{var y=u.updateQueue,S=y!==null?y.lastEffect:null;if(S!==null){var T=S.next;y=T;do{if((y.tag&s)===s){var B=y.inst,K=B.destroy;if(K!==void 0){B.destroy=void 0,S=u;var J=m,de=K;try{de()}catch(Oe){St(S,J,Oe)}}}y=y.next}while(y!==T)}}catch(Oe){St(u,u.return,Oe)}}function UO(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{Pj(u,m)}catch(y){St(s,s.return,y)}}}function VO(s,u,m){m.props=Gl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(y){St(s,u,y)}}function Fd(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof m=="function"?s.refCleanup=m(y):m.current=y}}catch(S){St(s,u,S)}}function no(s,u){var m=s.ref,y=s.refCleanup;if(m!==null)if(typeof y=="function")try{y()}catch(S){St(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(S){St(s,u,S)}else m.current=null}function WO(s){var u=s.type,m=s.memoizedProps,y=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&y.focus();break e;case"img":m.src?y.src=m.src:m.srcSet&&(y.srcset=m.srcSet)}}catch(S){St(s,s.return,S)}}function bw(s,u,m){try{var y=s.stateNode;BY(y,s.type,m,u),y[$t]=u}catch(S){St(s,s.return,S)}}function GO(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&qs(s.type)||s.tag===4}function ww(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||GO(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&qs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function kw(s,u,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=vr));else if(y!==4&&(y===27&&qs(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(kw(s,u,m),s=s.sibling;s!==null;)kw(s,u,m),s=s.sibling}function sv(s,u,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(y!==4&&(y===27&&qs(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(sv(s,u,m),s=s.sibling;s!==null;)sv(s,u,m),s=s.sibling}function YO(s){var u=s.stateNode,m=s.memoizedProps;try{for(var y=s.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);Bi(u,y,m),u[Kn]=s,u[$t]=m}catch(T){St(s,s.return,T)}}var Io=!1,vi=!1,_w=!1,KO=typeof WeakSet=="function"?WeakSet:Set,Ei=null;function bY(s,u){if(s=s.containerInfo,Hw=Ov,s=sj(s),pb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var S=y.anchorOffset,T=y.focusNode;y=y.focusOffset;try{m.nodeType,T.nodeType}catch{m=null;break e}var B=0,K=-1,J=-1,de=0,Oe=0,Me=s,pe=null;n:for(;;){for(var _e;Me!==m||S!==0&&Me.nodeType!==3||(K=B+S),Me!==T||y!==0&&Me.nodeType!==3||(J=B+y),Me.nodeType===3&&(B+=Me.nodeValue.length),(_e=Me.firstChild)!==null;)pe=Me,Me=_e;for(;;){if(Me===s)break n;if(pe===m&&++de===S&&(K=B),pe===T&&++Oe===y&&(J=B),(_e=Me.nextSibling)!==null)break;Me=pe,pe=Me.parentNode}Me=_e}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Uw={focusedElem:s,selectionRange:m},Ov=!1,Ei=u;Ei!==null;)if(u=Ei,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Ei=s;else for(;Ei!==null;){switch(u=Ei,T=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),Bi(T,y,m),T[Kn]=s,cn(T),y=T;break e;case"link":var B=n5("link","href",S).get(y+(m.href||""));if(B){for(var K=0;Kjt&&(B=jt,jt=Sn,Sn=B);var se=aj(K,Sn),te=aj(K,jt);if(se&&te&&(_e.rangeCount!==1||_e.anchorNode!==se.node||_e.anchorOffset!==se.offset||_e.focusNode!==te.node||_e.focusOffset!==te.offset)){var fe=Me.createRange();fe.setStart(se.node,se.offset),_e.removeAllRanges(),Sn>jt?(_e.addRange(fe),_e.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),_e.addRange(fe))}}}}for(Me=[],_e=K;_e=_e.parentNode;)_e.nodeType===1&&Me.push({element:_e,left:_e.scrollLeft,top:_e.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=Ew,Ew=null;var T=Is,B=Uo;if(wi=0,bc=Is=null,Uo=0,(bt&6)!==0)throw Error(i(331));var K=bt;if(bt|=4,oE(T.current),iE(T,T.current,B,m),bt=K,Gd(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(En,T)}catch{}return!0}finally{I.p=S,P.T=y,SE(s,u)}}function AE(s,u,m){u=ia(m,u),u=lw(s.stateNode,u,2),s=Ds(s,u,2),s!==null&&(ut(s,2),to(s))}function St(s,u,m){if(s.tag===3)AE(s,s,m);else for(;u!==null;){if(u.tag===3){AE(u,s,m);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ls===null||!Ls.has(y))){s=ia(m,s),m=jO(2),y=Ds(u,m,2),y!==null&&(OO(m,y,u,s),ut(y,2),to(y));break}}u=u.return}}function Rw(s,u,m){var y=s.pingCache;if(y===null){y=s.pingCache=new _Y;var S=new Set;y.set(u,S)}else S=y.get(u),S===void 0&&(S=new Set,y.set(u,S));S.has(m)||(Cw=!0,S.add(m),s=jY.bind(null,s,u,m),u.then(s,s))}function jY(s,u,m){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Mt===s&&(nt&m)===m&&(ni===4||ni===3&&(nt&62914560)===nt&&300>Ze()-cv?(bt&2)===0&&wc(s,0):Aw|=m,yc===nt&&(yc=0)),to(s)}function jE(s,u){u===0&&(u=Ue()),s=zl(s,u),s!==null&&(ut(s,u),to(s))}function OY(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),jE(s,m)}function EY(s,u){var m=0;switch(s.tag){case 31:case 13:var y=s.stateNode,S=s.memoizedState;S!==null&&(m=S.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(i(314))}y!==null&&y.delete(u),jE(s,m)}function TY(s,u){return ce(s,u)}var gv=null,_c=null,Pw=!1,yv=!1,Nw=!1,Fs=0;function to(s){s!==_c&&s.next===null&&(_c===null?gv=_c=s:_c=_c.next=s),yv=!0,Pw||(Pw=!0,DY())}function Gd(s,u){if(!Nw&&yv){Nw=!0;do for(var m=!1,y=gv;y!==null;){if(s!==0){var S=y.pendingLanes;if(S===0)var T=0;else{var B=y.suspendedLanes,K=y.pingedLanes;T=(1<<31-en(42|s)+1)-1,T&=S&~(B&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(m=!0,ME(y,T))}else T=nt,T=ft(y,y===Mt?T:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(T&3)===0||Tt(y,T)||(m=!0,ME(y,T));y=y.next}while(m);Nw=!1}}function MY(){OE()}function OE(){yv=Pw=!1;var s=0;Fs!==0&&qY()&&(s=Fs);for(var u=Ze(),m=null,y=gv;y!==null;){var S=y.next,T=EE(y,u);T===0?(y.next=null,m===null?gv=S:m.next=S,S===null&&(_c=m)):(m=y,(s!==0||(T&3)!==0)&&(yv=!0)),y=S}wi!==0&&wi!==5||Gd(s),Fs!==0&&(Fs=0)}function EE(s,u){for(var m=s.suspendedLanes,y=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0K)break;var Oe=J.transferSize,Me=J.initiatorType;Oe&&IE(Me)&&(J=J.responseEnd,B+=Oe*(J"u"?null:document;function ZE(s,u,m){var y=xc;if(y&&typeof u=="string"&&u){var S=rr(u);S='link[rel="'+s+'"][href="'+S+'"]',typeof m=="string"&&(S+='[crossorigin="'+m+'"]'),XE.has(S)||(XE.add(S),s={rel:s,crossOrigin:m,href:u},y.querySelector(S)===null&&(u=y.createElement("link"),Bi(u,"link",s),cn(u),y.head.appendChild(u)))}}function ZY(s){Vo.D(s),ZE("dns-prefetch",s,null)}function QY(s,u){Vo.C(s,u),ZE("preconnect",s,u)}function JY(s,u,m){Vo.L(s,u,m);var y=xc;if(y&&s&&u){var S='link[rel="preload"][as="'+rr(u)+'"]';u==="image"&&m&&m.imageSrcSet?(S+='[imagesrcset="'+rr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(S+='[imagesizes="'+rr(m.imageSizes)+'"]')):S+='[href="'+rr(s)+'"]';var T=S;switch(u){case"style":T=Sc(s);break;case"script":T=Cc(s)}ua.has(T)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),ua.set(T,s),y.querySelector(S)!==null||u==="style"&&y.querySelector(Zd(T))||u==="script"&&y.querySelector(Qd(T))||(u=y.createElement("link"),Bi(u,"link",s),cn(u),y.head.appendChild(u)))}}function eK(s,u){Vo.m(s,u);var m=xc;if(m&&s){var y=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+rr(y)+'"][href="'+rr(s)+'"]',T=S;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=Cc(s)}if(!ua.has(T)&&(s=d({rel:"modulepreload",href:s},u),ua.set(T,s),m.querySelector(S)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Qd(T)))return}y=m.createElement("link"),Bi(y,"link",s),cn(y),m.head.appendChild(y)}}}function nK(s,u,m){Vo.S(s,u,m);var y=xc;if(y&&s){var S=ci(y).hoistableStyles,T=Sc(s);u=u||"default";var B=S.get(T);if(!B){var K={loading:0,preload:null};if(B=y.querySelector(Zd(T)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=ua.get(T))&&Zw(s,m);var J=B=y.createElement("link");cn(J),Bi(J,"link",s),J._p=new Promise(function(de,Oe){J.onload=de,J.onerror=Oe}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,xv(B,u,y)}B={type:"stylesheet",instance:B,count:1,state:K},S.set(T,B)}}}function tK(s,u){Vo.X(s,u);var m=xc;if(m&&s){var y=ci(m).hoistableScripts,S=Cc(s),T=y.get(S);T||(T=m.querySelector(Qd(S)),T||(s=d({src:s,async:!0},u),(u=ua.get(S))&&Qw(s,u),T=m.createElement("script"),cn(T),Bi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},y.set(S,T))}}function iK(s,u){Vo.M(s,u);var m=xc;if(m&&s){var y=ci(m).hoistableScripts,S=Cc(s),T=y.get(S);T||(T=m.querySelector(Qd(S)),T||(s=d({src:s,async:!0,type:"module"},u),(u=ua.get(S))&&Qw(s,u),T=m.createElement("script"),cn(T),Bi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},y.set(S,T))}}function QE(s,u,m,y){var S=(S=re.current)?_v(S):null;if(!S)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=Sc(m.href),m=ci(S).hoistableStyles,y=m.get(u),y||(y={type:"style",instance:null,count:0,state:null},m.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=Sc(m.href);var T=ci(S).hoistableStyles,B=T.get(s);if(B||(S=S.ownerDocument||S,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(s,B),(T=S.querySelector(Zd(s)))&&!T._p&&(B.instance=T,B.state.loading=5),ua.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ua.set(s,m),T||rK(S,s,m,B.state))),u&&y===null)throw Error(i(528,""));return B}if(u&&y!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Cc(m),m=ci(S).hoistableScripts,y=m.get(u),y||(y={type:"script",instance:null,count:0,state:null},m.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function Sc(s){return'href="'+rr(s)+'"'}function Zd(s){return'link[rel="stylesheet"]['+s+"]"}function JE(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function rK(s,u,m,y){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=s.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),Bi(u,"link",m),cn(u),s.head.appendChild(u))}function Cc(s){return'[src="'+rr(s)+'"]'}function Qd(s){return"script[async]"+s}function e5(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var y=s.querySelector('style[data-href~="'+rr(m.href)+'"]');if(y)return u.instance=y,cn(y),y;var S=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),cn(y),Bi(y,"style",S),xv(y,m.precedence,s),u.instance=y;case"stylesheet":S=Sc(m.href);var T=s.querySelector(Zd(S));if(T)return u.state.loading|=4,u.instance=T,cn(T),T;y=JE(m),(S=ua.get(S))&&Zw(y,S),T=(s.ownerDocument||s).createElement("link"),cn(T);var B=T;return B._p=new Promise(function(K,J){B.onload=K,B.onerror=J}),Bi(T,"link",y),u.state.loading|=4,xv(T,m.precedence,s),u.instance=T;case"script":return T=Cc(m.src),(S=s.querySelector(Qd(T)))?(u.instance=S,cn(S),S):(y=m,(S=ua.get(T))&&(y=d({},m),Qw(y,S)),s=s.ownerDocument||s,S=s.createElement("script"),cn(S),Bi(S,"link",y),s.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,xv(y,m.precedence,s));return u.instance}function xv(s,u,m){for(var y=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=y.length?y[y.length-1]:null,T=S,B=0;B title"):null)}function aK(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function i5(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function oK(s,u,m,y){if(m.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var S=Sc(y.href),T=u.querySelector(Zd(S));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=Cv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=T,cn(T);return}T=u.ownerDocument||u,y=JE(y),(S=ua.get(S))&&Zw(y,S),T=T.createElement("link"),cn(T);var B=T;B._p=new Promise(function(K,J){B.onload=K,B.onerror=J}),Bi(T,"link",y),m.instance=T}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=Cv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Jw=0;function sK(s,u){return s.stylesheets&&s.count===0&&jv(s,s.stylesheets),0Jw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(y),clearTimeout(S)}}:null}function Cv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Av=null;function jv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Av=new Map,u.forEach(lK,s),Av=null,Cv.call(s))}function lK(s,u){if(!(u.state.loading&4)){var m=Av.get(s);if(m)var y=m.get(null);else{m=new Map,Av.set(s,m);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Lk.exports=Pie(),Lk.exports}var $ie=Nie();class iF extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function zie(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new iF(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const Lie="/api";function Mn(e,n){return zie(e,n,Lie)}function UT(){return Mn("/board")}function Iie(){return Mn("/flags")}function rF(){return Mn("/version")}function Bie(e){return Mn("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Ql(e,n){return Mn(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Fie(e){return Mn(`/columns/${e}`,{method:"DELETE"})}function qie(e){return Mn("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function Hie(e){return Mn("/cards",{method:"POST",body:JSON.stringify(e)})}function Mc(e,n){return Mn(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Uie(e){return Mn(`/cards/${e}`,{method:"DELETE"})}function Fk(e,n){return Mn(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function VT(){return Mn("/trash")}function Vie(e){return Mn(`/cards/${e}/restore`,{method:"POST"})}function Wie(e){return Mn(`/cards/${e}/purge`,{method:"DELETE"})}function WT(){return Mn("/archive")}function Gie(e){return Mn(`/cards/${e}/archive`,{method:"POST"})}function Yie(e){return Mn(`/cards/${e}/unarchive`,{method:"POST"})}function Kie(e,n){const t=new URLSearchParams({date:e});return Mn(`/reports/daily?${t.toString()}`)}function Xie(e){return Mn(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function Zie(e,n){const t=new URLSearchParams({date:e});return Mn(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Qie(e){return Mn(`/settings/${encodeURIComponent(e)}`)}function Jie(e,n){return Mn(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function ere(e,n,t){return Mn(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function nre(e){return Mn(`/cards/${e}/history`)}function tre(e){return Mn(`/cards/${e}/messages`)}function ire(e,n){return Mn(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function rre(e,n){return Mn(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function are(e){return Mn(`/cards/${e}/duplicate`,{method:"POST"})}function ore(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function sre(e){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/cards/${e}/chat/ws`}function aF(e=!1){return Mn(`/notifications${e?"?unread=1":""}`)}function oF(){return Mn("/notifications/unread-count")}function lre(e){return Mn(`/notifications/${e}/read`,{method:"POST"})}function ure(){return Mn("/notifications/read-all",{method:"POST"})}function cre(){return Mn("/modules")}function fre(e){return Mn("/modules",{method:"POST",body:JSON.stringify(e)})}function dre(e,n){return Mn(`/modules/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function hre(e){return Mn(`/modules/${e}`,{method:"DELETE"})}function mre(e,n=100){return Mn(`/modules/${e}/logs?limit=${n}`)}function GT(e,n){const t={method:"POST"};return n&&(t.body=JSON.stringify(n)),Mn(`/modules/${e}/test`,t)}function pre(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(ore());let o=!1;const l=c=>{if(!o){o=!0;try{a.close()}catch{}c?r(c):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=c=>{try{const f=JSON.parse(typeof c.data=="string"?c.data:"");n(f),(f.type==="done"||f.type==="error")&&l(f.type==="error"?new Error(f.error):void 0)}catch(f){l(f)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function YT(e,n){return Mn("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function vre(e,n,t){return Mn("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function gre(){return Mn("/auth/logout",{method:"POST"})}function yre(){return Mn("/me")}function KT(e){return Mn("/me",{method:"PATCH",body:JSON.stringify(e)})}function sF(){return Mn("/users")}function lF(){return Mn("/tags")}function bre(){return Mn("/requesters")}function uF(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return Mn(`/metrics${t?`?${t}`:""}`)}const cF=A.createContext(null);function wre({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{yre().then(t).catch(c=>{(!(c instanceof iF)||c.status!==401)&&console.warn("getMe failed",c)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(c,f)=>{const h=await YT(c,f);t(h)},[]),o=A.useCallback(async(c,f,h)=>{await vre(c,f,h);const d=await YT(c,f);t(d)},[]),l=A.useCallback(async()=>{await gre(),t(null)},[]);return g.jsx(cF.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function e9(){const e=A.useContext(cF);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function kre(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const t0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yf(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function n9(e){return"nodeType"in e}function mr(e){var n,t;return e?Yf(e)?e:n9(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function t9(e){const{Document:n}=mr(e);return e instanceof n}function sp(e){return Yf(e)?!1:e instanceof mr(e).HTMLElement}function fF(e){return e instanceof mr(e).SVGElement}function Kf(e){return e?Yf(e)?e.document:n9(e)?t9(e)?e:sp(e)||fF(e)?e.ownerDocument:document:document:document}const Wa=t0?A.useLayoutEffect:A.useEffect;function i0(e){const n=A.useRef(e);return Wa(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function im(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Wa(()=>{t.current!==e&&(t.current=e)},n),t}function lp(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function qg(e){const n=i0(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function Hg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let qk={};function up(e,n){return A.useMemo(()=>{if(n)return n;const t=qk[e]==null?0:qk[e]+1;return qk[e]=t,e+"-"+t},[e,n])}function dF(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[c,f]of l){const h=a[c];h!=null&&(a[c]=h+e*f)}return a},{...n})}}const Yc=dF(1),rm=dF(-1);function xre(e){return"clientX"in e&&"clientY"in e}function r0(e){if(!e)return!1;const{KeyboardEvent:n}=mr(e.target);return n&&e instanceof n}function Sre(e){if(!e)return!1;const{TouchEvent:n}=mr(e.target);return n&&e instanceof n}function Ug(e){if(Sre(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return xre(e)?{x:e.clientX,y:e.clientY}:null}const yo=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[yo.Translate.toString(e),yo.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),XT="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Cre(e){return e.matches(XT)?e:e.querySelector(XT)}const Are={display:"none"};function jre(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:Are},t)}function Ore(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Q.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function Ere(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const hF=A.createContext(null);function Tre(e){const n=A.useContext(hF);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function Mre(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const Dre={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},bre={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function wre(e){let{announcements:n=bre,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=yre}=e;const{announce:a,announcement:o}=pre(),l=rp("DndLiveRegion"),[c,f]=A.useState(!1);if(A.useEffect(()=>{f(!0)},[]),vre(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!c)return null;const h=Q.createElement(Q.Fragment,null,Q.createElement(hre,{id:i,value:r.draggable}),Q.createElement(mre,{id:l,announcement:o}));return t?Qs.createPortal(h,t):h}var Ai;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ai||(Ai={}));function qg(){}function VT(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function kre(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Wa=Object.freeze({x:0,y:0});function n9(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function _re(e,n){const t=Fg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function t9(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function xre(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function $S(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function aF(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function WT(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const Sre=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=WT(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,c=t.get(l);if(c){const f=n9(WT(c),r);a.push({id:l,data:{droppableContainer:o,value:f}})}}return a.sort(t9)},oF=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=$S(n),a=[];for(const o of i){const{id:l}=o,c=t.get(l);if(c){const f=$S(c),h=r.reduce((p,v,b)=>p+n9(f[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(t9)};function Cre(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const c=Cre(l,n);c>0&&r.push({id:o,data:{droppableContainer:a,value:c}})}}return r.sort(xre)};function Are(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Ore=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Are(i,l)){const f=$S(l).reduce((d,p)=>d+n9(i,p),0),h=Number((f/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(t9)};function jre(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function lF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Wa}function Ere(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const Tre=Ere(1);function uF(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Mre(e,n,t){const i=uF(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,c=e.left-o-(1-r)*parseFloat(t),f=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:f,right:c+h,bottom:f+d,left:c}}const Dre={ignoreTransform:!1};function Kf(e,n){n===void 0&&(n=Dre);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:f,transformOrigin:h}=cr(e).getComputedStyle(e);f&&(t=Mre(t,f,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:c}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:c}}function GT(e){return Kf(e,{ignoreTransform:!0})}function Rre(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Pre(e,n){return n===void 0&&(n=cr(e).getComputedStyle(e)),n.position==="fixed"}function Nre(e,n){n===void 0&&(n=cr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function i0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(e9(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!tp(r)||tF(r)||t.includes(r))return t;const a=cr(e).getComputedStyle(r);return r!==e&&Nre(r,a)&&t.push(r),Pre(r,a)?t:i(r.parentNode)}return e?i(e):t}function cF(e){const[n]=i0(e,1);return n??null}function Fk(e){return!e0||!e?null:Gf(e)?e:JC(e)?e9(e)||e===Yf(e).scrollingElement?window:tp(e)?e:null:null}function fF(e){return Gf(e)?e.scrollX:e.scrollLeft}function dF(e){return Gf(e)?e.scrollY:e.scrollTop}function zS(e){return{x:fF(e),y:dF(e)}}var Ri;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ri||(Ri={}));function hF(e){return!e0||!e?!1:e===document.scrollingElement}function mF(e){const n={x:0,y:0},t=hF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const $re={x:.2,y:.2};function zre(e,n,t,i,r){let{top:a,left:o,right:l,bottom:c}=t;i===void 0&&(i=10),r===void 0&&(r=$re);const{isTop:f,isBottom:h,isLeft:d,isRight:p}=mF(e),v={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!f&&a<=n.top+w.height?(v.y=Ri.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&c>=n.bottom-w.height&&(v.y=Ri.Forward,b.y=i*Math.abs((n.bottom-w.height-c)/w.height)),!p&&l>=n.right-w.width?(v.x=Ri.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Ri.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:b}}function Lre(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function pF(e){return e.reduce((n,t)=>Wc(n,zS(t)),Wa)}function Ire(e){return e.reduce((n,t)=>n+fF(t),0)}function Bre(e){return e.reduce((n,t)=>n+dF(t),0)}function vF(e,n){if(n===void 0&&(n=Kf),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);cF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Fre=[["x",["left","right"],Ire],["y",["top","bottom"],Bre]];class i9{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=i0(t),r=pF(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Fre)for(const c of o)Object.defineProperty(this,c,{get:()=>{const f=l(i),h=r[a]-f;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Rh{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function qre(e){const{EventTarget:n}=cr(e);return e instanceof n?e:Yf(e)}function qk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var ca;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ca||(ca={}));function YT(e){e.preventDefault()}function Hre(e){e.stopPropagation()}var rt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(rt||(rt={}));const gF={start:[rt.Space,rt.Enter],cancel:[rt.Esc],end:[rt.Space,rt.Enter,rt.Tab]},Ure=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case rt.Right:return{...t,x:t.x+25};case rt.Left:return{...t,x:t.x-25};case rt.Down:return{...t,y:t.y+25};case rt.Up:return{...t,y:t.y-25}}};class r9{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new Rh(Yf(t)),this.windowListeners=new Rh(cr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ca.Resize,this.handleCancel),this.windowListeners.add(ca.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ca.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&vF(i),t(Wa)}handleKeyDown(n){if(t0(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=gF,coordinateGetter:o=Ure,scrollBehavior:l="smooth"}=r,{code:c}=n;if(a.end.includes(c)){this.handleEnd(n);return}if(a.cancel.includes(c)){this.handleCancel(n);return}const{collisionRect:f}=i.current,h=f?{x:f.left,y:f.top}:Wa;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=nm(d,h),v={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:C,isLeft:x,isBottom:E,maxScroll:O,minScroll:j}=mF(w),M=Lre(w),N={x:Math.min(k===rt.Right?M.right-M.width/2:M.right,Math.max(k===rt.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===rt.Down?M.bottom-M.height/2:M.bottom,Math.max(k===rt.Down?M.top:M.top+M.height/2,d.y))},q=k===rt.Right&&!C||k===rt.Left&&!x,P=k===rt.Down&&!E||k===rt.Up&&!_;if(q&&N.x!==d.x){const L=w.scrollLeft+p.x,H=k===rt.Right&&L<=O.x||k===rt.Left&&L>=j.x;if(H&&!p.y){w.scrollTo({left:L,behavior:l});return}H?v.x=w.scrollLeft-L:v.x=k===rt.Right?w.scrollLeft-O.x:w.scrollLeft-j.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(P&&N.y!==d.y){const L=w.scrollTop+p.y,H=k===rt.Down&&L<=O.y||k===rt.Up&&L>=j.y;if(H&&!p.x){w.scrollTo({top:L,behavior:l});return}H?v.y=w.scrollTop-L:v.y=k===rt.Down?w.scrollTop-O.y:w.scrollTop-j.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Wc(nm(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}r9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=gF,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function KT(e){return!!(e&&"distance"in e)}function XT(e){return!!(e&&"delay"in e)}class a9{constructor(n,t,i){var r;i===void 0&&(i=qre(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Yf(o),this.documentListeners=new Rh(this.document),this.listeners=new Rh(i),this.windowListeners=new Rh(cr(o)),this.initialCoordinates=(r=Fg(a))!=null?r:Wa,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(ca.Resize,this.handleCancel),this.windowListeners.add(ca.DragStart,YT),this.windowListeners.add(ca.VisibilityChange,this.handleCancel),this.windowListeners.add(ca.ContextMenu,YT),this.documentListeners.add(ca.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(XT(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(KT(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(ca.Click,Hre,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ca.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const c=(t=Fg(n))!=null?t:Wa,f=nm(r,c);if(!i&&l){if(KT(l)){if(l.tolerance!=null&&qk(f,l.tolerance))return this.handleCancel();if(qk(f,l.distance))return this.handleStart()}if(XT(l)&&qk(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}n.cancelable&&n.preventDefault(),o(c)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===rt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Vre={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class o9 extends a9{constructor(n){const{event:t}=n,i=Yf(t.target);super(n,Vre,i)}}o9.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const Wre={move:{name:"mousemove"},end:{name:"mouseup"}};var LS;(function(e){e[e.RightClick=2]="RightClick"})(LS||(LS={}));class Gre extends a9{constructor(n){super(n,Wre,Yf(n.event.target))}}Gre.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===LS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Hk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yre extends a9{constructor(n){super(n,Hk)}static setup(){return window.addEventListener(Hk.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Hk.move.name,n)};function n(){}}}Yre.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var Ph;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ph||(Ph={}));var Hg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hg||(Hg={}));function Kre(e){let{acceleration:n,activator:t=Ph.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Hg.TreeOrder,pointerCoordinates:c,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=Zre({delta:d,disabled:!a}),[b,w]=lre(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(t){case Ph.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ph.DraggableRect:return r}},[t,r,c]),x=A.useRef(null),E=A.useCallback(()=>{const j=x.current;if(!j)return;const M=k.current.x*_.current.x,N=k.current.y*_.current.y;j.scrollBy(M,N)},[]),O=A.useMemo(()=>l===Hg.TreeOrder?[...f].reverse():f,[l,f]);A.useEffect(()=>{if(!a||!f.length||!C){w();return}for(const j of O){if((i==null?void 0:i(j))===!1)continue;const M=f.indexOf(j),N=h[M];if(!N)continue;const{direction:q,speed:P}=zre(j,N,C,n,p);for(const L of["x","y"])v[L][q[L]]||(P[L]=0,q[L]=0);if(P.x>0||P.y>0){w(),x.current=j,b(E,o),k.current=P,_.current=q;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,E,i,w,a,o,JSON.stringify(C),JSON.stringify(v),b,f,O,h,JSON.stringify(p)])}const Xre={x:{[Ri.Backward]:!1,[Ri.Forward]:!1},y:{[Ri.Backward]:!1,[Ri.Forward]:!1}};function Zre(e){let{delta:n,disabled:t}=e;const i=Bg(n);return ip(r=>{if(t||!i||!r)return Xre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ri.Backward]:r.x[Ri.Backward]||a.x===-1,[Ri.Forward]:r.x[Ri.Forward]||a.x===1},y:{[Ri.Backward]:r.y[Ri.Backward]||a.y===-1,[Ri.Forward]:r.y[Ri.Forward]||a.y===1}}},[t,n,i])}function Qre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return ip(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Jre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var tm;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(tm||(tm={}));var IS;(function(e){e.Optimized="optimized"})(IS||(IS={}));const ZT=new Map;function eae(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:c,strategy:f}=r,h=A.useRef(e),d=k(),p=em(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(C=>C===null?_:C.concat(_.filter(x=>!C.includes(x))))},[p]),b=A.useRef(null),w=ip(_=>{if(d&&!t)return ZT;if(!_||_===ZT||h.current!==e||a!=null){const C=new Map;for(let x of e){if(!x)continue;if(a&&a.length>0&&!a.includes(x.id)&&x.rect.current){C.set(x.id,x.rect.current);continue}const E=x.node.current,O=E?new i9(c(E),E):null;x.rect.current=O,O&&C.set(x.id,O)}return C}return _},[e,a,t,d,c]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(f){case tm.Always:return!1;case tm.BeforeDragging:return t;default:return!t}}}function s9(e,n){return ip(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function nae(e,n){return s9(e,n)}function tae(e){let{callback:n,disabled:t}=e;const i=n0(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function r0(e){let{callback:n,disabled:t}=e;const i=n0(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function iae(e){return new i9(Kf(e),e)}function QT(e,n,t){n===void 0&&(n=iae);const[i,r]=A.useState(null);function a(){r(c=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=c??t)!=null?f:null}const h=n(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const o=tae({callback(c){if(e)for(const f of c){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=r0({callback:a});return Va(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function rae(e){const n=s9(e);return lF(e,n)}const JT=[];function aae(e){const n=A.useRef(e),t=ip(i=>e?i&&i!==JT&&e&&n.current&&e.parentNode===n.current.parentNode?i:i0(e):JT,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function oae(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=Fk(a.target);o&&t(l=>l?(l.set(o,zS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(c=>{const f=Fk(c);return f?(f.addEventListener("scroll",r,{passive:!0}),[f,zS(f)]):null}).filter(c=>c!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(c=>{const f=Fk(c);f==null||f.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Wc(a,o),Wa):pF(e):Wa,[e,n])}function eM(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Wa;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?nm(e,t.current):Wa}function sae(e){A.useEffect(()=>{if(!e0)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function lae(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function yF(e){return A.useMemo(()=>e?Rre(e):null,[e])}const nM=[];function uae(e,n){n===void 0&&(n=Kf);const[t]=e,i=yF(t?cr(t):null),[r,a]=A.useState(nM);function o(){a(()=>e.length?e.map(c=>hF(c)?i:new i9(n(c),c)):nM)}const l=r0({callback:o});return Va(()=>{l==null||l.disconnect(),o(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),r}function bF(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return tp(n)?n:e}function cae(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(f=>{for(const{target:h}of f)if(tp(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=r0({callback:r}),o=A.useCallback(f=>{const h=bF(f);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,c]=Ig(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:c}),[t,l,c])}const fae=[{sensor:o9,options:{}},{sensor:r9,options:{}}],dae={current:{}},kg={draggable:{measure:GT},droppable:{measure:GT,strategy:tm.WhileDragging,frequency:IS.Optimized},dragOverlay:{measure:Kf}};class Nh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const hae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:qg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:kg,measureDroppableContainers:qg,windowRect:null,measuringScheduled:!1},wF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:qg,draggableNodes:new Map,over:null,measureDroppableContainers:qg},ap=A.createContext(wF),kF=A.createContext(hae);function mae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nh}}}function pae(e,n){switch(n.type){case Ai.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Ai.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Ai.DragEnd:case Ai.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ai.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Nh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case Ai.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new Nh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case Ai.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Nh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function vae(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(ap),a=Bg(i),o=Bg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!t0(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:c,node:f}=l;if(!c.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[c.current,f.current]){if(!h)continue;const d=fre(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function _F(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function gae(e){return A.useMemo(()=>({draggable:{...kg.draggable,...e==null?void 0:e.draggable},droppable:{...kg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...kg.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function yae(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Va(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const f=n==null?void 0:n.node.current;if(!f||f.isConnected===!1)return;const h=t(f),d=lF(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=cF(f);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const a0=A.createContext({...Wa,scaleX:1,scaleY:1});var Ys;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ys||(Ys={}));const bae=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:c=!0,children:f,sensors:h=fae,collisionDetection:d=sF,measuring:p,modifiers:v,...b}=n;const w=A.useReducer(pae,void 0,mae),[k,_]=w,[C,x]=gre(),[E,O]=A.useState(Ys.Uninitialized),j=E===Ys.Initialized,{draggable:{active:M,nodes:N,translate:q},droppable:{containers:P}}=k,L=M!=null?N.get(M):null,H=A.useRef({initial:null,translated:null}),G=A.useMemo(()=>{var yn;return M!=null?{id:M,data:(yn=L==null?void 0:L.data)!=null?yn:dae,rect:H}:null},[M,L]),U=A.useRef(null),[z,D]=A.useState(null),[$,B]=A.useState(null),Y=em(b,Object.values(b)),R=rp("DndDescribedBy",o),W=A.useMemo(()=>P.getEnabled(),[P]),V=gae(p),{droppableRects:I,measureDroppableContainers:X,measuringScheduled:ee}=eae(W,{dragging:j,dependencies:[q.x,q.y],config:V.droppable}),re=Qre(N,M),le=A.useMemo(()=>$?Fg($):null,[$]),ye=bn(),ae=nae(re,V.draggable.measure);yae({activeNode:M!=null?N.get(M):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:V.draggable.measure});const ue=QT(re,V.draggable.measure,ae),xe=QT(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=P.getNodeFor((t=ne.current.over)==null?void 0:t.id),we=cae({measure:V.dragOverlay.measure}),Oe=(i=we.nodeRef.current)!=null?i:re,Ne=j?(r=we.rect)!=null?r:ue:null,ge=!!(we.nodeRef.current&&we.rect),Se=rae(ge?null:ue),Pe=yF(Oe?cr(Oe):null),ce=aae(j?ze??re:null),Be=uae(ce),Ye=_F(v,{transform:{x:q.x-Se.x,y:q.y-Se.y,scaleX:1,scaleY:1},activatorEvent:$,active:G,activeNodeRect:ue,containerNodeRect:xe,draggingNodeRect:Ne,over:ne.current.over,overlayNodeRect:we.rect,scrollableAncestors:ce,scrollableAncestorRects:Be,windowRect:Pe}),We=le?Wc(le,q):null,Ze=oae(ce),Qe=eM(Ze),ie=eM(Ze,[ue]),ve=Wc(Ye,Qe),Ke=Ne?Tre(Ne,Ye):null,Je=G&&Ke?d({active:G,collisionRect:Ke,droppableRects:I,droppableContainers:W,pointerCoordinates:We}):null,Ae=aF(Je,"id"),[rn,fn]=A.useState(null),En=ge?Ye:Wc(Ye,ie),pn=jre(En,(a=rn==null?void 0:rn.rect)!=null?a:null,ue),on=A.useRef(null),nn=A.useCallback((yn,kn)=>{let{sensor:ut,options:jt}=kn;if(U.current==null)return;const Ie=N.get(U.current);if(!Ie)return;const Ue=yn.nativeEvent,$n=new ut({active:U.current,activeNode:Ie,event:Ue,options:jt,context:ne,onAbort(Dn){if(!N.get(Dn))return;const{onDragAbort:en}=Y.current,an={id:Dn};en==null||en(an),C({type:"onDragAbort",event:an})},onPending(Dn,tn,en,an){if(!N.get(Dn))return;const{onDragPending:Yn}=Y.current,Nt={id:Dn,constraint:tn,initialCoordinates:en,offset:an};Yn==null||Yn(Nt),C({type:"onDragPending",event:Nt})},onStart(Dn){const tn=U.current;if(tn==null)return;const en=N.get(tn);if(!en)return;const{onDragStart:an}=Y.current,Ln={activatorEvent:Ue,active:{id:tn,data:en.data,rect:H}};Qs.unstable_batchedUpdates(()=>{an==null||an(Ln),O(Ys.Initializing),_({type:Ai.DragStart,initialCoordinates:Dn,active:tn}),C({type:"onDragStart",event:Ln}),D(on.current),B(Ue)})},onMove(Dn){_({type:Ai.DragMove,coordinates:Dn})},onEnd:at(Ai.DragEnd),onCancel:at(Ai.DragCancel)});on.current=$n;function at(Dn){return async function(){const{active:en,collisions:an,over:Ln,scrollAdjustedTranslate:Yn}=ne.current;let Nt=null;if(en&&Yn){const{cancelDrop:Tn}=Y.current;Nt={activatorEvent:Ue,active:en,collisions:an,delta:Yn,over:Ln},Dn===Ai.DragEnd&&typeof Tn=="function"&&await Promise.resolve(Tn(Nt))&&(Dn=Ai.DragCancel)}U.current=null,Qs.unstable_batchedUpdates(()=>{_({type:Dn}),O(Ys.Uninitialized),fn(null),D(null),B(null),on.current=null;const Tn=Dn===Ai.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const An=Y.current[Tn];An==null||An(Nt),C({type:Tn,event:Nt})}})}}},[N]),Nn=A.useCallback((yn,kn)=>(ut,jt)=>{const Ie=ut.nativeEvent,Ue=N.get(jt);if(U.current!==null||!Ue||Ie.dndKit||Ie.defaultPrevented)return;const $n={active:Ue};yn(ut,kn.options,$n)===!0&&(Ie.dndKit={capturedBy:kn.sensor},U.current=jt,nn(ut,kn))},[N,nn]),De=Jre(h,Nn);sae(h),Va(()=>{ue&&E===Ys.Initializing&&O(Ys.Initialized)},[ue,E]),A.useEffect(()=>{const{onDragMove:yn}=Y.current,{active:kn,activatorEvent:ut,collisions:jt,over:Ie}=ne.current;if(!kn||!ut)return;const Ue={active:kn,activatorEvent:ut,collisions:jt,delta:{x:ve.x,y:ve.y},over:Ie};Qs.unstable_batchedUpdates(()=>{yn==null||yn(Ue),C({type:"onDragMove",event:Ue})})},[ve.x,ve.y]),A.useEffect(()=>{const{active:yn,activatorEvent:kn,collisions:ut,droppableContainers:jt,scrollAdjustedTranslate:Ie}=ne.current;if(!yn||U.current==null||!kn||!Ie)return;const{onDragOver:Ue}=Y.current,$n=jt.get(Ae),at=$n&&$n.rect.current?{id:$n.id,rect:$n.rect.current,data:$n.data,disabled:$n.disabled}:null,Dn={active:yn,activatorEvent:kn,collisions:ut,delta:{x:Ie.x,y:Ie.y},over:at};Qs.unstable_batchedUpdates(()=>{fn(at),Ue==null||Ue(Dn),C({type:"onDragOver",event:Dn})})},[Ae]),Va(()=>{ne.current={activatorEvent:$,active:G,activeNode:re,collisionRect:Ke,collisions:Je,droppableRects:I,draggableNodes:N,draggingNode:Oe,draggingNodeRect:Ne,droppableContainers:P,over:rn,scrollableAncestors:ce,scrollAdjustedTranslate:ve},H.current={initial:Ne,translated:Ke}},[G,re,Je,Ke,N,Oe,Ne,I,P,rn,ce,ve]),Kre({...ye,delta:q,draggingRect:Ke,pointerCoordinates:We,scrollableAncestors:ce,scrollableAncestorRects:Be});const Fe=A.useMemo(()=>({active:G,activeNode:re,activeNodeRect:ue,activatorEvent:$,collisions:Je,containerNodeRect:xe,dragOverlay:we,draggableNodes:N,droppableContainers:P,droppableRects:I,over:rn,measureDroppableContainers:X,scrollableAncestors:ce,scrollableAncestorRects:Be,measuringConfiguration:V,measuringScheduled:ee,windowRect:Pe}),[G,re,ue,$,Je,xe,we,N,P,I,rn,X,ce,Be,V,ee,Pe]),Mn=A.useMemo(()=>({activatorEvent:$,activators:De,active:G,activeNodeRect:ue,ariaDescribedById:{draggable:R},dispatch:_,draggableNodes:N,over:rn,measureDroppableContainers:X}),[$,De,G,ue,_,R,N,rn,X]);return Q.createElement(rF.Provider,{value:x},Q.createElement(ap.Provider,{value:Mn},Q.createElement(kF.Provider,{value:Fe},Q.createElement(a0.Provider,{value:pn},f)),Q.createElement(vae,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(wre,{...l,hiddenTextDescribedById:R}));function bn(){const yn=(z==null?void 0:z.autoScrollEnabled)===!1,kn=typeof c=="object"?c.enabled===!1:c===!1,ut=j&&!yn&&!kn;return typeof c=="object"?{...c,enabled:ut}:{enabled:ut}}}),wae=A.createContext(null),tM="button",kae="Draggable";function _ae(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=rp(kae),{activators:o,activatorEvent:l,active:c,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(ap),{role:v=tM,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(c==null?void 0:c.id)===n,_=A.useContext(k?a0:wae),[C,x]=Ig(),[E,O]=Ig(),j=lae(o,n),M=em(t);Va(()=>(d.set(n,{id:n,key:a,node:C,activatorNode:E,data:M}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const N=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===tM?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,v,w,k,b,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:f,attributes:N,isDragging:k,listeners:i?void 0:j,node:C,over:p,setNodeRef:x,setActivatorNodeRef:O,transform:_}}function xF(){return A.useContext(kF)}const xae="Droppable",Sae={timeout:25};function Cae(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=rp(xae),{active:o,dispatch:l,over:c,measureDroppableContainers:f}=A.useContext(ap),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...Sae,...r},_=em(w??i),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{f(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),x=r0({callback:C,disabled:b||!o}),E=A.useCallback((N,q)=>{x&&(q&&(x.unobserve(q),d.current=!1),N&&x.observe(N))},[x]),[O,j]=Ig(E),M=em(n);return A.useEffect(()=>{!x||!O.current||(x.disconnect(),d.current=!1,x.observe(O.current))},[O,x]),A.useEffect(()=>(l({type:Ai.RegisterDroppable,element:{id:i,key:a,disabled:t,node:O,rect:p,data:M}}),()=>l({type:Ai.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:Ai.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(c==null?void 0:c.id)===i,node:O,over:c,setNodeRef:j}}function Aae(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Bg(t);return!t&&!i&&l&&r(l),Va(()=>{if(!a)return;const c=i==null?void 0:i.key,f=i==null?void 0:i.props.id;if(c==null||f==null){r(null);return}Promise.resolve(n(f,a)).then(()=>{r(null)})},[n,i,a]),Q.createElement(Q.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const Oae={x:0,y:0,scaleX:1,scaleY:1};function jae(e){let{children:n}=e;return Q.createElement(ap.Provider,{value:wF},Q.createElement(a0.Provider,{value:Oae},n))}const Eae={position:"fixed",touchAction:"none"},Tae=e=>t0(e)?"transform 250ms ease":void 0,Mae=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:c,transform:f,transition:h=Tae}=e;if(!l)return null;const d=r?f:{...f,scaleX:1,scaleY:1},p={...Eae,width:l.width,height:l.height,top:l.top,left:l.left,transform:ho.Transform.toString(d),transformOrigin:r&&i?_re(i,l):void 0,transition:typeof h=="function"?h(i):h,...c};return Q.createElement(t,{className:o,style:p,ref:n},a)}),Dae=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,c]of Object.entries(a.active))c!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,c));if(a!=null&&a.dragOverlay)for(const[l,c]of Object.entries(a.dragOverlay))c!==void 0&&i.node.style.setProperty(l,c);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[c,f]of Object.entries(r))t.node.style.setProperty(c,f);o!=null&&o.active&&t.node.classList.remove(o.active)}},Rae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:ho.Transform.toString(n)},{transform:ho.Transform.toString(t)}]},Pae={duration:250,easing:"ease",keyframes:Rae,sideEffects:Dae({styles:{active:{opacity:"0"}}})};function Nae(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return n0((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const c=l.node.current;if(!c)return;const f=bF(o);if(!f)return;const{transform:h}=cr(o).getComputedStyle(o),d=uF(h);if(!d)return;const p=typeof n=="function"?n:$ae(n);return vF(c,r.draggable.measure),p({active:{id:a,data:l.data,node:c,rect:r.draggable.measure(c)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function $ae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Pae,...e};return a=>{let{active:o,dragOverlay:l,transform:c,...f}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:c.scaleX!==1?o.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?o.rect.height*c.scaleY/l.rect.height:1},p={x:c.x-h.x,y:c.y-h.y,...d},v=r({...f,active:o,dragOverlay:l,transform:{initial:c,final:p}}),[b]=v,w=v[v.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...f}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(C=>{_.onfinish=()=>{k==null||k(),C()}})}}let iM=0;function zae(e){return A.useMemo(()=>{if(e!=null)return iM++,iM},[e])}const Lae=Q.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:c,zIndex:f=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:C,scrollableAncestors:x,scrollableAncestorRects:E,windowRect:O}=xF(),j=A.useContext(a0),M=zae(d==null?void 0:d.id),N=_F(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:x,scrollableAncestorRects:E,transform:j,windowRect:O}),q=s9(p),P=Nae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:C}),L=q?k.setRef:void 0;return Q.createElement(jae,null,Q.createElement(Aae,{animation:P},d&&M?Q.createElement(Mae,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:c,transition:a,rect:q,style:{zIndex:f,...r},transform:N},t):null))});function Ug(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Iae(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Fv(e){return e!==null&&e>=0}function Bae(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const c=Hae(t,o,r);if(o===r){const f=t[a];return f?{x:rr&&o<=a?{x:-l.width-c,y:0,...qv}:o=a?{x:l.width+c,y:0,...qv}:{x:0,y:0,...qv}};function Hae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=Ug(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},Hv={scaleX:1,scaleY:1},CF=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const f=a[o];return f?{x:0,y:tt&&r<=o?{x:0,y:-l.height-c,...Hv}:r=o?{x:0,y:l.height+c,...Hv}:{x:0,y:0,...Hv}};function Uae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),b=o!=null,w=o?v.indexOf(o.id):-1,k=f?v.indexOf(f.id):-1,_=A.useRef(v),C=!Bae(v,_.current),x=k!==-1&&w===-1||C,E=Fae(a);Va(()=>{C&&b&&h(v)},[C,v,b,h]),A.useEffect(()=>{_.current=v},[v]);const O=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:E,disableTransforms:x,items:v,overIndex:k,useDragOverlay:p,sortedRects:Iae(v,c),strategy:r}),[w,d,E.draggable,E.droppable,x,v,k,c,p,r]);return Q.createElement(OF.Provider,{value:O},n)}const Vae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Ug(t,i,r).indexOf(n)},Wae=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:c,transition:f}=e;return!f||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===c},Gae={duration:200,easing:"ease"},jF="transform",Yae=ho.Transition.toString({property:jF,duration:0,easing:"linear"}),Kae={roleDescription:"sortable"};function Xae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Va(()=>{if(!n&&t!==l.current&&i.current){const c=r.current;if(c){const f=Kf(i.current,{ignoreTransform:!0}),h={x:c.left-f.left,y:c.top-f.top,scaleX:c.width/f.width,scaleY:c.height/f.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function EF(e){let{animateLayoutChanges:n=Wae,attributes:t,disabled:i,data:r,getNewIndex:a=Vae,id:o,strategy:l,resizeObserverConfig:c,transition:f=Gae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:C}=A.useContext(OF),x=Zae(i,v),E=h.indexOf(o),O=A.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),j=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:N,isOver:q,setNodeRef:P}=Cae({id:o,data:O,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...c}}),{active:L,activatorEvent:H,activeNodeRect:G,attributes:U,setNodeRef:z,listeners:D,isDragging:$,over:B,setActivatorNodeRef:Y,transform:R}=_ae({id:o,data:O,attributes:{...Kae,...t},disabled:x.draggable}),W=sre(P,z),V=!!L,I=V&&!b&&Fv(p)&&Fv(k),X=!_&&$,ee=X&&I?R:null,le=I?ee??(l??C)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:E}):null,ye=Fv(p)&&Fv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=L==null?void 0:L.id,ue=A.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),xe=h!==ue.current.items,ne=n({active:L,containerId:d,isDragging:$,isSorting:V,id:o,index:E,items:h,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:f,wasDragging:ue.current.activeId!=null}),ze=Xae({disabled:!ne,index:E,node:N,rect:M});return A.useEffect(()=>{V&&ue.current.newIndex!==ye&&(ue.current.newIndex=ye),d!==ue.current.containerId&&(ue.current.containerId=d),h!==ue.current.items&&(ue.current.items=h)},[V,ye,d,h]),A.useEffect(()=>{if(ae===ue.current.activeId)return;if(ae!=null&&ue.current.activeId==null){ue.current.activeId=ae;return}const Oe=setTimeout(()=>{ue.current.activeId=ae},50);return()=>clearTimeout(Oe)},[ae]),{active:L,activeIndex:p,attributes:U,data:O,rect:M,index:E,newIndex:ye,items:h,isOver:q,isSorting:V,isDragging:$,listeners:D,node:N,overIndex:k,over:B,setNodeRef:W,setActivatorNodeRef:Y,setDroppableNodeRef:P,setDraggableNodeRef:z,transform:ze??le,transition:we()};function we(){if(ze||xe&&ue.current.newIndex===E)return Yae;if(!(X&&!t0(H)||!f)&&(V||ne))return ho.Transition.toString({...f,property:jF})}}function Zae(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function Vg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const Qae=[rt.Down,rt.Right,rt.Up,rt.Left],Jae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Qae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const c=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case rt.Down:i.topp.top&&c.push(d);break;case rt.Left:i.left>p.left&&c.push(d);break;case rt.Right:i.left1&&(h=f[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&d&&p){const k=i0(b).some((j,M)=>l[M]!==j),_=TF(d,p),C=eoe(d,p),x=k||!_?{x:0,y:0}:{x:C?i.width-v.width:0,y:C?i.height-v.height:0},E={x:v.left,y:v.top};return x.x&&x.y?E:nm(E,x)}}}};function TF(e,n){return!Vg(e)||!Vg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function eoe(e,n){return!Vg(e)||!Vg(n)||!TF(e,n)?!1:e.data.current.sortable.index=z?U:""+Array(z+1-$.length).join(D)+U},E={s:x,z:function(U){var z=-U.utcOffset(),D=Math.abs(z),$=Math.floor(D/60),B=D%60;return(z<=0?"+":"-")+x($,2,"0")+":"+x(B,2,"0")},m:function U(z,D){if(z.date()1)return U(R[0])}else{var W=z.name;j[W]=z,B=W}return!$&&B&&(O=B),B||!$&&O},P=function(U,z){if(N(U))return U.clone();var D=typeof z=="object"?z:{};return D.date=U,D.args=arguments,new H(D)},L=E;L.l=q,L.i=N,L.w=function(U,z){return P(U,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var H=(function(){function U(D){this.$L=q(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[M]=!0}var z=U.prototype;return z.parse=function(D){this.$d=(function($){var B=$.date,Y=$.utc;if(B===null)return new Date(NaN);if(L.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var R=B.match(k);if(R){var W=R[2]-1||0,V=(R[7]||"0").substring(0,3);return Y?new Date(Date.UTC(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,V)):new Date(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,V)}}return new Date(B)})(D),this.init()},z.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},z.$utils=function(){return L},z.isValid=function(){return this.$d.toString()!==w},z.isSame=function(D,$){var B=P(D);return this.startOf($)<=B&&B<=this.endOf($)},z.isAfter=function(D,$){return P(D)Le(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function aoe({formatter:e,...n}){return(e||roe)(n)}function ooe({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function MF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var c,f,h;const o=ooe({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(f=(c=e.current)==null?void 0:c[o.levelIndex])==null?void 0:f[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?MF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function soe(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function loe(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function l9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=soe(r.key);a&&(r.preventDefault(),MF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:loe(e)}))}function er(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD")}function DF(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD HH:mm:ss")}function FS({minDate:e,maxDate:n}){const t=Le();return!e&&!n?er(t):e&&Le(t).isBefore(e)?er(e):n&&Le(t).isAfter(n)?er(n):er(t)}const uoe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},coe=A.createContext(uoe);function bl(){const e=A.use(coe),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function foe({value:e,type:n,withTime:t}){const i=t?DF:er;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function RF({value:e,type:n,name:t,form:i,withTime:r=!1}){return y.jsx("input",{type:"hidden",value:foe({value:e,type:n,withTime:r}),name:t,form:i})}RF.displayName="@mantine/dates/HiddenDatesInput";var PF={day:"m_396ce5cb"};const NF=(e,{size:n})=>({day:{"--day-size":zn(n,"day-size")}}),o0=Re(e=>{const n=be("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:c,disabled:f,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:C,static:x,highlightToday:E,fullWidth:O,attributes:j,...M}=n;return y.jsx(Ot,{...Xe({name:h||"Day",classes:PF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:NF,rootSelector:"day"})("day",{style:C?{display:"none"}:void 0}),component:x?"div":"button",disabled:f,"data-today":Le(c).isSame(new Date,"day")||void 0,"data-hidden":C||void 0,"data-highlight-today":E||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!p&&d||void 0,"data-outside":!f&&p||void 0,"data-selected":!f&&v||void 0,"data-in-range":w&&!f||void 0,"data-first-in-range":k&&!f||void 0,"data-last-in-range":_&&!f||void 0,"data-static":x||void 0,"data-full-width":O||void 0,unstyled:o,...M,children:(b==null?void 0:b(c))||Le(c).date()})});o0.classes=PF;o0.varsResolver=NF;o0.displayName="@mantine/dates/Day";function doe({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Le().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Le(i).add(a,"days").locale(e).format(n)):r.push(n(Le(i).add(a,"days").format("YYYY-MM-DD")));return r}var $F={weekday:"m_18a3eca"};const zF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ii(n),"--wr-spacing":Ht(n)}}),s0=Re(e=>{const n=be("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:c,firstDayOfWeek:f,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:b,...w}=n,k=Xe({name:p||"WeekdaysRow",classes:$F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:zF,rootSelector:"weekdaysRow"}),_=bl(),C=doe({locale:_.getLocale(c),format:h,firstDayOfWeek:_.getFirstDayOfWeek(f)}).map((x,E)=>y.jsx(d,{...k("weekday"),children:x},E));return y.jsxs(me,{component:"tr",...k("weekdaysRow"),...w,children:[v&&y.jsx(d,{...k("weekday"),children:"#"}),C]})});s0.classes=$F;s0.varsResolver=zF;s0.displayName="@mantine/dates/WeekdaysRow";function hoe(e,n=1){let t=Le(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function moe(e,n=1){let t=Le(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function poe({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Le(Le(e).subtract(Le(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=hoe(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Le(moe(r,n));for(;Le(l).isBefore(a,"day");){const c=[];for(let f=0;f<7;f+=1)c.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(c)}if(t&&o.length<6){const c=o[o.length-1],f=c[c.length-1];let h=Le(f).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function u9(e,n){return Le(e).format("YYYY-MM")===Le(n).format("YYYY-MM")}function LF(e,n){return n?Le(e).isAfter(Le(n).subtract(1,"day"),"day"):!0}function IF(e,n){return n?Le(e).isBefore(Le(n).add(1,"day"),"day"):!0}function voe({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return IF(h,t)&&LF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||u9(h,o))}),c=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(c)return c;const f=l.find(h=>Le().isSame(h,"date"));return f||l[0]}var xg={exports:{}},goe=xg.exports,aM;function yoe(){return aM||(aM=1,(function(e,n){(function(t,i){e.exports=i()})(goe,(function(){var t="day";return function(i,r,a){var o=function(f){return f.add(4-f.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),t);var h,d,p,v,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return b.diff(w,"week")+1},l.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var c=l.startOf;l.startOf=function(f,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(f)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(f,h)}}}))})(xg)),xg.exports}var boe=yoe();const woe=pt(boe);Le.extend(woe);function koe(e){return Le(e.find(n=>Le(n).day()===1)).isoWeek()}var BF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const _oe={withCellSpacing:!0},FF=(e,{size:n})=>({weekNumber:{"--wn-fz":ii(n),"--wn-size":zn(n,"wn-size")}}),op=Re(e=>{const n=be("Month",_oe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,locale:f,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:C,hideOutsideDates:x,hideWeekdays:E,getDayAriaLabel:O,static:j,__getDayRef:M,__onDayKeyDown:N,__onDayClick:q,__onDayMouseEnter:P,__preventFocus:L,__stopPropagation:H,withCellSpacing:G,size:U,highlightToday:z,withWeekNumbers:D,fullWidth:$,attributes:B,...Y}=n,R=Xe({name:c||"Month",classes:BF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:B,vars:l,varsResolver:FF,rootSelector:"month"}),W=bl(),V=poe({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),I=voe({dates:V,minDate:er(k),maxDate:er(_),getDayProps:b,excludeDate:w,hideOutsideDates:x,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Wi({classNames:t,styles:a,props:n}),re=V.map((le,ye)=>{const ae=le.map((ue,xe)=>{const ne=!u9(ue,p),ze=(O==null?void 0:O(ue))||Le(ue).locale(f||W.locale).format("D MMMM YYYY"),we=b==null?void 0:b(ue),Oe=Le(ue).isSame(I,"date");return y.jsx("td",{...R("monthCell"),"data-with-spacing":G||void 0,children:y.jsx(o0,{__staticSelector:c||"Month",classNames:X,styles:ee,attributes:B,unstyled:o,"data-mantine-stop-propagation":H||void 0,highlightToday:z,renderDay:C,date:ue,size:U,weekend:W.getWeekendDays(v).includes(Le(ue).get("day")),outside:ne,hidden:x?ne:!1,"aria-label":ze,static:j,fullWidth:$,disabled:(w==null?void 0:w(ue))||!IF(ue,er(_))||!LF(ue,er(k)),ref:Ne=>{Ne&&(M==null||M(ye,xe,Ne))},...we,onKeyDown:Ne=>{var ge;(ge=we==null?void 0:we.onKeyDown)==null||ge.call(we,Ne),N==null||N(Ne,{rowIndex:ye,cellIndex:xe,date:ue})},onMouseEnter:Ne=>{var ge;(ge=we==null?void 0:we.onMouseEnter)==null||ge.call(we,Ne),P==null||P(Ne,ue)},onClick:Ne=>{var ge;(ge=we==null?void 0:we.onClick)==null||ge.call(we,Ne),q==null||q(Ne,ue)},onMouseDown:Ne=>{var ge;(ge=we==null?void 0:we.onMouseDown)==null||ge.call(we,Ne),L&&Ne.preventDefault()},tabIndex:L||!Oe?-1:0})},ue.toString())});return y.jsxs("tr",{...R("monthRow"),children:[D&&y.jsx("td",{...R("weekNumber"),children:koe(le)}),ae]},ye)});return y.jsxs(me,{component:"table",...R("month"),size:U,"data-full-width":$||void 0,...Y,children:[!E&&y.jsx("thead",{...R("monthThead"),children:y.jsx(s0,{__staticSelector:c||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:D,size:U,classNames:X,styles:ee,unstyled:o,attributes:B})}),y.jsx("tbody",{...R("monthTbody"),children:re})]})});op.classes=BF;op.varsResolver=FF;op.displayName="@mantine/dates/Month";var qF={pickerControl:"m_dc6a3c71"};const HF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ii(n),"--dpc-size":zn(n,"dpc-size")}}),sp=Re(e=>{const n=be("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:c,lastInRange:f,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:b,attributes:w,...k}=n;return y.jsx(Ot,{...Xe({name:d||"PickerControl",classes:qF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:HF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":c&&!v||void 0,"data-last-in-range":f&&!v||void 0,disabled:v,...k})});sp.classes=qF;sp.varsResolver=HF;sp.displayName="@mantine/dates/PickerControl";function UF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"year")||t&&Le(e).isAfter(t,"year"))}function xoe({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var c;return!UF({year:l,minDate:n,maxDate:t})&&!((c=i==null?void 0:i(l))!=null&&c.disabled)}),a=r.find(l=>{var c;return(c=i==null?void 0:i(l))==null?void 0:c.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"year"));return o||r[0]}function VF(e){const n=Le(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=be("YearsList",Soe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:c,yearsListFormat:f,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:O,fullWidth:j,size:M,attributes:N,...q}=n,P=Xe({name:b||"YearsList",classes:WF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=bl(),H=VF(c),G=xoe({years:H,minDate:d,maxDate:p,getYearControlProps:v}),U=H.map((z,D)=>{const $=z.map((B,Y)=>{const R=v==null?void 0:v(B),W=Le(B).isSame(G,"year");return y.jsx("td",{...P("yearsListCell"),"data-with-spacing":O||void 0,children:y.jsx(sp,{...P("yearsListControl"),size:M,unstyled:o,fullWidth:j,"data-mantine-stop-propagation":E||void 0,disabled:UF({year:B,minDate:d,maxDate:p}),ref:V=>{V&&(w==null||w(D,Y,V))},...R,onKeyDown:V=>{var I;(I=R==null?void 0:R.onKeyDown)==null||I.call(R,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:B})},onClick:V=>{var I;(I=R==null?void 0:R.onClick)==null||I.call(R,V),_==null||_(V,B)},onMouseEnter:V=>{var I;(I=R==null?void 0:R.onMouseEnter)==null||I.call(R,V),C==null||C(V,B)},onMouseDown:V=>{var I;(I=R==null?void 0:R.onMouseDown)==null||I.call(R,V),x&&V.preventDefault()},tabIndex:x||!W?-1:0,children:(R==null?void 0:R.children)??Le(B).locale(L.getLocale(h)).format(f)})},Y)});return y.jsx("tr",{...P("yearsListRow"),children:$},D)});return y.jsx(me,{component:"table",size:M,...P("yearsList"),"data-full-width":j||void 0,...q,children:y.jsx("tbody",{children:U})})});l0.classes=WF;l0.displayName="@mantine/dates/YearsList";function GF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"month")||t&&Le(e).isAfter(t,"month"))}function Coe({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var c;return!GF({month:l,minDate:n,maxDate:t})&&!((c=i==null?void 0:i(l))!=null&&c.disabled)}),a=r.find(l=>{var c;return(c=i==null?void 0:i(l))==null?void 0:c.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"month"));return o||r[0]}function Aoe(e){const n=Le(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(Le(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var YF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Ooe={monthsListFormat:"MMM",withCellSpacing:!0},u0=Re(e=>{const n=be("MonthsList",Ooe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,year:f,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:O,fullWidth:j,size:M,attributes:N,...q}=n,P=Xe({name:c||"MonthsList",classes:YF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=bl(),H=Aoe(f),G=Coe({months:H,minDate:er(p),maxDate:er(v),getMonthControlProps:b}),U=H.map((z,D)=>{const $=z.map((B,Y)=>{const R=b==null?void 0:b(B),W=Le(B).isSame(G,"month");return y.jsx("td",{...P("monthsListCell"),"data-with-spacing":O||void 0,children:y.jsx(sp,{...P("monthsListControl"),size:M,unstyled:o,fullWidth:j,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:GF({month:B,minDate:er(p),maxDate:er(v)}),ref:V=>{V&&(w==null||w(D,Y,V))},...R,onKeyDown:V=>{var I;(I=R==null?void 0:R.onKeyDown)==null||I.call(R,V),k==null||k(V,{rowIndex:D,cellIndex:Y,date:B})},onClick:V=>{var I;(I=R==null?void 0:R.onClick)==null||I.call(R,V),_==null||_(V,B)},onMouseEnter:V=>{var I;(I=R==null?void 0:R.onMouseEnter)==null||I.call(R,V),C==null||C(V,B)},onMouseDown:V=>{var I;(I=R==null?void 0:R.onMouseDown)==null||I.call(R,V),x&&V.preventDefault()},tabIndex:x||!W?-1:0,children:(R==null?void 0:R.children)??Le(B).locale(L.getLocale(d)).format(h)})},Y)});return y.jsx("tr",{...P("monthsListRow"),children:$},D)});return y.jsx(me,{component:"table",size:M,...P("monthsList"),"data-full-width":j||void 0,...q,children:y.jsx("tbody",{children:U})})});u0.classes=YF;u0.displayName="@mantine/dates/MonthsList";var KF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const joe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},XF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":zn(n,"dch-control-size"),"--dch-fz":ii(n)}}),ms=Re(e=>{const n=be("CalendarHeader",joe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:c,previousIcon:f,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:C,levelControlAriaLabel:x,withNext:E,withPrevious:O,headerControlsOrder:j,fullWidth:M,__staticSelector:N,__preventFocus:q,__stopPropagation:P,attributes:L,...H}=n,G=Xe({name:N||"CalendarHeader",classes:KF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:XF,rootSelector:"calendarHeader"}),U=q?Y=>Y.preventDefault():void 0,z=O&&A.createElement(Ot,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":P||void 0},f||y.jsx(zg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),D=A.createElement(Ot,{component:C?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:C?b:void 0,unstyled:o,onMouseDown:C?U:void 0,disabled:!C,"data-static":!C||void 0,"aria-label":x,tabIndex:q||!C?-1:0,"data-mantine-stop-propagation":P||void 0},w),$=E&&A.createElement(Ot,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:q||k?-1:0,"data-mantine-stop-propagation":P||void 0},c||y.jsx(zg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),B=j.map(Y=>Y==="previous"?z:Y==="level"?D:Y==="next"?$:null);return y.jsx(me,{...G("calendarHeader"),"data-full-width":M||void 0,...H,children:B})});ms.classes=KF;ms.varsResolver=XF;ms.displayName="@mantine/dates/CalendarHeader";function Eoe(e){const n=VF(e);return[n[0][0],n[3][0]]}const Toe={decadeLabelFormat:"YYYY"},c0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:x,previousDisabled:E,levelControlAriaLabel:O,withNext:j,withPrevious:M,headerControlsOrder:N,decadeLabelFormat:q,classNames:P,styles:L,unstyled:H,__staticSelector:G,__stopPropagation:U,size:z,fullWidth:D,attributes:$,...B}=be("DecadeLevel",Toe,e),Y=bl(),[R,W]=Eoe(n),V={__staticSelector:G||"DecadeLevel",classNames:P,styles:L,unstyled:H,size:z,attributes:$},I=typeof x=="boolean"?x:r?!Le(W).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!Le(R).startOf("year").isAfter(i):!1,ee=(re,le)=>Le(re).locale(t||Y.locale).format(le);return y.jsxs(me,{"data-decade-level":!0,size:z,...B,children:[y.jsx(ms,{label:typeof q=="function"?q(R,W):`${ee(R,q)} – ${ee(W,q)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:I,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:O,withNext:j,withPrevious:M,headerControlsOrder:N,fullWidth:D,...V}),y.jsx(l0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:U,withCellSpacing:d,fullWidth:D,...V})]})});c0.classes={...l0.classes,...ms.classes};c0.displayName="@mantine/dates/DecadeLevel";const Moe={yearLabelFormat:"YYYY"},f0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:E,previousDisabled:O,hasNextLevel:j,levelControlAriaLabel:M,withNext:N,withPrevious:q,headerControlsOrder:P,yearLabelFormat:L,__staticSelector:H,__stopPropagation:G,size:U,classNames:z,styles:D,unstyled:$,fullWidth:B,attributes:Y,...R}=be("YearLevel",Moe,e),W=bl(),V={__staticSelector:H||"YearLevel",classNames:z,styles:D,unstyled:$,size:U,attributes:Y},I=typeof E=="boolean"?E:r?!Le(n).endOf("year").isBefore(r):!1,X=typeof O=="boolean"?O:i?!Le(n).startOf("year").isAfter(i):!1;return y.jsxs(me,{"data-year-level":!0,size:U,...R,children:[y.jsx(ms,{label:typeof L=="function"?L(n):Le(n).locale(t||W.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:I,previousDisabled:X,hasNextLevel:j,levelControlAriaLabel:M,withNext:N,withPrevious:q,headerControlsOrder:P,fullWidth:B,...V}),y.jsx(u0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:B,...V})]})});f0.classes={...ms.classes,...u0.classes};f0.displayName="@mantine/dates/YearLevel";const Doe={monthLabelFormat:"MMMM YYYY"},d0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,__preventFocus:O,__stopPropagation:j,nextIcon:M,previousIcon:N,nextLabel:q,previousLabel:P,onNext:L,onPrevious:H,onLevelClick:G,nextDisabled:U,previousDisabled:z,hasNextLevel:D,levelControlAriaLabel:$,withNext:B,withPrevious:Y,headerControlsOrder:R,monthLabelFormat:W,classNames:V,styles:I,unstyled:X,__staticSelector:ee,size:re,static:le,fullWidth:ye,attributes:ae,...ue}=be("MonthLevel",Doe,e),xe=bl(),ne={__staticSelector:ee||"MonthLevel",classNames:V,styles:I,unstyled:X,size:re,attributes:ae},ze=typeof U=="boolean"?U:f?!Le(n).endOf("month").isBefore(f):!1,we=typeof z=="boolean"?z:c?!Le(n).startOf("month").isAfter(c):!1;return y.jsxs(me,{"data-month-level":!0,size:re,...ue,children:[y.jsx(ms,{label:typeof W=="function"?W(n):Le(n).locale(t||xe.locale).format(W),__preventFocus:O,__stopPropagation:j,nextIcon:M,previousIcon:N,nextLabel:q,previousLabel:P,onNext:L,onPrevious:H,onLevelClick:G,nextDisabled:ze,previousDisabled:we,hasNextLevel:D,levelControlAriaLabel:$,withNext:B,withPrevious:Y,headerControlsOrder:R,fullWidth:ye,...ne}),y.jsx(op,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:O,__stopPropagation:j,static:le,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,fullWidth:ye,...ne})]})});d0.classes={...op.classes,...ms.classes};d0.displayName="@mantine/dates/MonthLevel";var ZF={levelsGroup:"m_30b26e33"};const wl=Re(e=>{const n=be("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,fullWidth:f,attributes:h,...d}=n;return y.jsx(me,{...Xe({name:c||"LevelsGroup",classes:ZF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":f||void 0,...d})});wl.classes=ZF;wl.displayName="@mantine/dates/LevelsGroup";const Roe={numberOfColumns:1},h0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:c,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,headerControlsOrder:x,classNames:E,styles:O,unstyled:j,__staticSelector:M,__stopPropagation:N,numberOfColumns:q,levelControlAriaLabel:P,decadeLabelFormat:L,size:H,fullWidth:G,vars:U,attributes:z,...D}=be("DecadeLevelGroup",Roe,e),$=A.useRef([]),B=Array(q).fill(0).map((Y,R)=>{const W=Le(n).add(R*10,"years").format("YYYY-MM-DD");return y.jsx(c0,{size:H,yearsListFormat:a,decade:W,withNext:R===q-1,withPrevious:R===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:c,__onControlKeyDown:(V,I)=>l9({levelIndex:R,rowIndex:I.rowIndex,cellIndex:I.cellIndex,event:V,controlsRef:$}),__getControlRef:(V,I,X)=>{Array.isArray($.current[R])||($.current[R]=[]),Array.isArray($.current[R][V])||($.current[R][V]=[]),$.current[R][V][I]=X},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:E,styles:O,unstyled:j,withCellSpacing:f,headerControlsOrder:x,fullWidth:G,attributes:z},R)});return y.jsx(wl,{classNames:E,styles:O,__staticSelector:M||"DecadeLevelGroup",size:H,unstyled:j,fullWidth:G,attributes:z,...D,children:B})});h0.classes={...wl.classes,...c0.classes};h0.displayName="@mantine/dates/DecadeLevelGroup";const Poe={numberOfColumns:1},m0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:c,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,headerControlsOrder:O,classNames:j,styles:M,unstyled:N,__staticSelector:q,__stopPropagation:P,numberOfColumns:L,levelControlAriaLabel:H,yearLabelFormat:G,size:U,fullWidth:z,vars:D,attributes:$,...B}=be("YearLevelGroup",Poe,e),Y=A.useRef([]),R=Array(L).fill(0).map((W,V)=>{const I=Le(n).add(V,"years").format("YYYY-MM-DD");return y.jsx(f0,{size:U,monthsListFormat:a,year:I,withNext:V===L-1,withPrevious:V===0,yearLabelFormat:G,__stopPropagation:P,__onControlClick:l,__onControlMouseEnter:c,__onControlKeyDown:(X,ee)=>l9({levelIndex:V,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[V])||(Y.current[V]=[]),Array.isArray(Y.current[V][X])||(Y.current[V][X]=[]),Y.current[V][X][ee]=re},levelControlAriaLabel:typeof H=="function"?H(I):H,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,getMonthControlProps:o,classNames:j,styles:M,unstyled:N,__staticSelector:q||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:O,fullWidth:z,attributes:$},V)});return y.jsx(wl,{classNames:j,styles:M,__staticSelector:q||"YearLevelGroup",size:U,unstyled:N,fullWidth:z,attributes:$,...B,children:R})});m0.classes={...f0.classes,...wl.classes};m0.displayName="@mantine/dates/YearLevelGroup";const Noe={numberOfColumns:1},p0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,__preventFocus:x,nextIcon:E,previousIcon:O,nextLabel:j,previousLabel:M,onNext:N,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:H,hasNextLevel:G,headerControlsOrder:U,classNames:z,styles:D,unstyled:$,numberOfColumns:B,levelControlAriaLabel:Y,monthLabelFormat:R,__staticSelector:W,__stopPropagation:V,size:I,static:X,fullWidth:ee,vars:re,attributes:le,...ye}=be("MonthLevelGroup",Noe,e),ae=A.useRef([]),ue=Array(B).fill(0).map((xe,ne)=>{const ze=Le(n).add(ne,"months").format("YYYY-MM-DD");return y.jsx(d0,{month:ze,withNext:ne===B-1,withPrevious:ne===0,monthLabelFormat:R,__stopPropagation:V,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(we,Oe)=>l9({levelIndex:ne,rowIndex:Oe.rowIndex,cellIndex:Oe.cellIndex,event:we,controlsRef:ae}),__getDayRef:(we,Oe,Ne)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][we])||(ae.current[ne][we]=[]),ae.current[ne][we][Oe]=Ne},levelControlAriaLabel:typeof Y=="function"?Y(ze):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:x,nextIcon:E,previousIcon:O,nextLabel:j,previousLabel:M,onNext:N,onPrevious:q,onLevelClick:P,nextDisabled:L,previousDisabled:H,hasNextLevel:G,classNames:z,styles:D,unstyled:$,__staticSelector:W||"MonthLevelGroup",size:I,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,headerControlsOrder:U,fullWidth:ee,attributes:le},ne)});return y.jsx(wl,{classNames:z,styles:D,__staticSelector:W||"MonthLevelGroup",size:I,fullWidth:ee,attributes:le,...ye,children:ue})});p0.classes={...wl.classes,...d0.classes};p0.displayName="@mantine/dates/MonthLevelGroup";var QF={input:"m_6fa5e2aa"};const Xf=Re(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:c,dropdownType:f,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:C,rightSection:x,shouldClear:E,readOnly:O,disabled:j,value:M,name:N,form:q,type:P,onDropdownClose:L,withTime:H,...G}=iI("PickerInputBase",{size:"sm"},e),U=y.jsx(Vt.ClearButton,{onClick:_,unstyled:o,...C}),z=()=>{P==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return y.jsxs(y.Fragment,{children:[f==="modal"&&!O&&y.jsx(_r,{opened:v,onClose:z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...c,children:h}),y.jsx(Vt.Wrapper,{...t,children:y.jsxs(jn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||f==="modal"||O,onChange:D=>{var $;D||(($=l==null?void 0:l.onClose)==null||$.call(l),z())},children:[y.jsx(jn.Target,{children:y.jsx(Vt,{"data-dates-input":!0,"data-read-only":O||void 0,disabled:j,component:"button",type:"button",multiline:!0,onClick:D=>{b==null||b(D),p.toggle()},__clearSection:U,__clearable:w&&E&&!O&&!j,__clearSectionMode:k,rightSection:x,...n,classNames:{...r,input:dn(QF.input,r==null?void 0:r.input)},...G,children:d||y.jsx(Vt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),y.jsx(jn.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),y.jsx(RF,{value:M,name:N,form:q,type:P,withTime:H})]})});Xf.classes=QF;Xf.displayName="@mantine/dates/PickerInputBase";const oM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,sM=(e,n)=>{const t=n?DF:er;return Array.isArray(e)?e.map(t):t(e)};function c9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,c]=Pi({value:sM(n,r),defaultValue:sM(t,r),finalValue:oM(e),onChange:i});let f=o;return a.current!==e&&(a.current=e,n===void 0&&(f=t!==void 0?t:oM(e),l(f))),[f,l,c]}function Uk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function $oe(e){return e===0?"month":e===1?"year":"decade"}function rh(e,n,t){return $oe(Ko(Uk(e,0),Uk(n,0),Uk(t,2)))}const zoe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Zf=Re(e=>{const n=be("Calendar",zoe,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,headerControlsOrder:E,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:j,__setDateRef:M,__setLevelRef:N,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:H,excludeDate:G,renderDay:U,hideOutsideDates:z,hideWeekdays:D,getDayAriaLabel:$,monthLabelFormat:B,nextIcon:Y,previousIcon:R,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:I,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:le,yearLabelFormat:ye,yearsListFormat:ae,getYearControlProps:ue,decadeLabelFormat:xe,classNames:ne,styles:ze,unstyled:we,minDate:Oe,maxDate:Ne,locale:ge,__staticSelector:Se,size:Pe,__preventFocus:ce,__stopPropagation:Be,onNextDecade:Ye,onPreviousDecade:We,onNextYear:Ze,onPreviousYear:Qe,onNextMonth:ie,onPreviousMonth:ve,static:Ke,enableKeyboardNavigation:Je,fullWidth:Ae,attributes:rn,ref:fn,...En}=n,{resolvedClassNames:pn,resolvedStyles:on}=Wi({classNames:ne,styles:ze,props:n}),[nn,Nn]=Pi({value:o?rh(o,r,i):void 0,defaultValue:a?rh(a,r,i):void 0,finalValue:rh(void 0,r,i),onChange:l}),[De,Fe]=c9({type:"default",value:er(c),defaultValue:er(f),onChange:h});A.useImperativeHandle(M,()=>tn=>{Fe(tn)}),A.useImperativeHandle(N,()=>tn=>{Nn(tn)});const Mn={__staticSelector:Se||"Calendar",styles:on,classNames:pn,unstyled:we,size:Pe,attributes:rn},bn=p||d||1,yn=A.useRef(null);if(yn.current===null){const tn=new Date;yn.current=Oe&&Le(tn).isAfter(Oe)?Oe:Le(tn).format("YYYY-MM-DD")}const kn=De||yn.current,ut=()=>{const tn=Le(kn).add(bn,"month").format("YYYY-MM-DD");ie==null||ie(tn),Fe(tn)},jt=()=>{const tn=Le(kn).subtract(bn,"month").format("YYYY-MM-DD");ve==null||ve(tn),Fe(tn)},Ie=()=>{const tn=Le(kn).add(bn,"year").format("YYYY-MM-DD");Ze==null||Ze(tn),Fe(tn)},Ue=()=>{const tn=Le(kn).subtract(bn,"year").format("YYYY-MM-DD");Qe==null||Qe(tn),Fe(tn)},$n=()=>{const tn=Le(kn).add(10*bn,"year").format("YYYY-MM-DD");Ye==null||Ye(tn),Fe(tn)},at=()=>{const tn=Le(kn).subtract(10*bn,"year").format("YYYY-MM-DD");We==null||We(tn),Fe(tn)},Dn=A.useRef(null);return A.useEffect(()=>{if(!Je||Ke)return;const tn=en=>{var Yn;if(!((Yn=Dn.current)!=null&&Yn.contains(document.activeElement)))return;const an=en.ctrlKey||en.metaKey,Ln=en.shiftKey;switch(en.key){case"ArrowUp":an&&Ln?(en.preventDefault(),at()):an&&(en.preventDefault(),Ue());break;case"ArrowDown":an&&Ln?(en.preventDefault(),$n()):an&&(en.preventDefault(),Ie());break;case"y":case"Y":nn==="month"&&(en.preventDefault(),Nn("year"));break}};return document.addEventListener("keydown",tn),()=>{document.removeEventListener("keydown",tn)}},[Je,Ke,nn,Ie,Ue,$n,at]),y.jsxs(me,{ref:Gt(Dn,fn),size:Pe,"data-calendar":!0,"data-full-width":Ae||void 0,...En,children:[nn==="month"&&y.jsx(p0,{month:kn,minDate:Oe,maxDate:Ne,firstDayOfWeek:q,weekdayFormat:P,weekendDays:L,getDayProps:H,excludeDate:G,renderDay:U,hideOutsideDates:z,hideWeekdays:D,getDayAriaLabel:$,onNext:ut,onPrevious:jt,hasNextLevel:i!=="month",onLevelClick:()=>Nn("year"),numberOfColumns:d,locale:ge,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:R,monthLabelFormat:B,__onDayClick:W,__onDayMouseEnter:V,__preventFocus:ce,__stopPropagation:Be,static:Ke,withCellSpacing:I,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:Ae,...Mn}),nn==="year"&&y.jsx(m0,{year:kn,numberOfColumns:d,minDate:Oe,maxDate:Ne,monthsListFormat:re,getMonthControlProps:le,locale:ge,onNext:Ie,onPrevious:Ue,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Nn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:R,yearLabelFormat:ye,__onControlMouseEnter:x,__onControlClick:(tn,en)=>{j&&Fe(en),Nn(rh("month",r,i)),_==null||_(en)},__preventFocus:ce,__stopPropagation:Be,withCellSpacing:I,headerControlsOrder:E,fullWidth:Ae,...Mn}),nn==="decade"&&y.jsx(h0,{decade:kn,minDate:Oe,maxDate:Ne,yearsListFormat:ae,getYearControlProps:ue,locale:ge,onNext:$n,onPrevious:at,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:R,decadeLabelFormat:xe,__onControlMouseEnter:C,__onControlClick:(tn,en)=>{O&&Fe(en),Nn(rh("year",r,i)),k==null||k(en)},__preventFocus:ce,__stopPropagation:Be,withCellSpacing:I,headerControlsOrder:E,fullWidth:Ae,...Mn})]})});Zf.classes={...h0.classes,...m0.classes,...p0.classes};Zf.displayName="@mantine/dates/Calendar";function v0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:O,onNextYear:j,onPreviousYear:M,onNextDecade:N,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:H,__updateDateOnMonthSelect:G,__setDateRef:U,__setLevelRef:z,withWeekNumbers:D,headerControlsOrder:$,firstDayOfWeek:B,weekdayFormat:Y,weekendDays:R,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:xe,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Oe,minDate:Ne,maxDate:ge,locale:Se,...Pe}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:O,onNextYear:j,onPreviousYear:M,onNextDecade:N,onPreviousDecade:q,withCellSpacing:P,highlightToday:L,__updateDateOnYearSelect:H,__updateDateOnMonthSelect:G,__setDateRef:U,withWeekNumbers:D,headerControlsOrder:$,firstDayOfWeek:B,weekdayFormat:Y,weekendDays:R,getDayProps:W,excludeDate:V,renderDay:I,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:xe,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Oe,minDate:Ne,maxDate:ge,locale:Se},others:Pe}}function lM(e,n){const t=[...n].sort((i,r)=>Le(i).isAfter(Le(r))?1:-1);return Le(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Le(t[1]).endOf("day").add(1,"ms").isAfter(e)}function JF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[c,f]=c9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[p,v]=A.useState(null),b=O=>{if(e==="range"){if(h&&!c[1]){if(Le(O).isSame(h,n)&&!a){d(null),v(null),f([null,null]);return}const j=[O,h];j.sort((M,N)=>Le(M).isAfter(Le(N))?1:-1),f(j),v(null),d(null);return}if(c[0]&&!c[1]&&Le(O).isSame(c[0],n)&&!a){d(null),v(null),f([null,null]);return}f([O,null]),v(null),d(O);return}if(e==="multiple"){c.some(j=>Le(j).isSame(O,n))?f(c.filter(j=>!Le(j).isSame(O,n))):f([...c,O]);return}c&&o&&Le(O).isSame(c,n)?f(null):f(O)},w=O=>h&&p?lM(O,[p,h]):c[0]&&c[1]?lM(O,c):!1,k=e==="range"?O=>{l==null||l(O),v(null)}:l,_=O=>c[0]&&Le(O).isSame(c[0],n)?!(p&&Le(p).isBefore(c[0])):!1,C=O=>c[1]?Le(O).isSame(c[1],n):!c[0]||!p?!1:Le(p).isBefore(c[0])&&Le(O).isSame(c[0],n),x=O=>{if(e==="range")return{selected:c.some(M=>M&&Le(M).isSame(O,n)),inRange:w(O),firstInRange:_(O),lastInRange:C(O),"data-autofocus":!!c[0]&&Le(c[0]).isSame(O,n)||void 0};if(e==="multiple")return{selected:c.some(M=>M&&Le(M).isSame(O,n)),"data-autofocus":!!c[0]&&Le(c[0]).isSame(O,n)||void 0};const j=Le(c).isSame(O,n);return{selected:j,"data-autofocus":j||void 0}},E=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(c[0]&&!c[1])d(c[0]);else{const O=c[0]==null&&c[1]==null,j=c[0]!=null&&c[1]!=null;(O||j)&&(d(null),v(null))}},[c]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:E,getControlProps:x,_value:c,setValue:f}}var eq={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const nq=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ii(n)}}),Loe={type:"default"},lp=Re(e=>{const n=be("MonthPicker",Loe,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:c,__staticSelector:f,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:C,className:x,style:E,unstyled:O,size:j,attributes:M,onLevelChange:N,...q}=n,{calendarProps:P,others:L}=v0(q),H=A.useRef(null),G=A.useRef(null),U=Xe({name:f||"MonthPicker",classes:eq,props:n,className:x,style:E,classNames:t,styles:i,unstyled:O,attributes:M,rootSelector:C?"monthPickerRoot":void 0,varsResolver:nq,vars:r}),{onDateChange:z,onRootMouseLeave:D,onHoveredDateChange:$,getControlProps:B,setValue:Y}=JF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:c,onMouseLeave:v}),{resolvedClassNames:R,resolvedStyles:W}=Wi({classNames:t,styles:i,props:n}),V=y.jsx(Zf,{classNames:R,styles:W,size:j,...P,...C?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:f||"MonthPicker",onMouseLeave:D,onMonthMouseEnter:(ee,re)=>$(re),onMonthSelect:ee=>{z(ee),b==null||b(ee)},getMonthControlProps:ee=>({...B(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:H,__setLevelRef:G,__stopPropagation:_,attributes:M,...C?{}:{className:x,style:E}});if(!C)return V;const I=ee=>{var le,ye;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((le=H.current)==null||le.call(H,re),(ye=G.current)==null||ye.call(G,"year"),k?k(re):Y(ee))},X=C.map((ee,re)=>y.jsx(Ot,{...U("presetButton"),onClick:()=>I(ee.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return y.jsxs(me,{...U("monthPickerRoot"),size:j,...L,children:[y.jsx("div",{...U("presetsList"),children:X}),V]})});lp.classes={...Zf.classes,...eq};lp.varsResolver=nq;lp.displayName="@mantine/dates/MonthPicker";var Ioe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const tq=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ii(n)}}),Boe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},up=Re(e=>{const n=be("DatePicker",Boe,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:c,styles:f,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:b,presets:w,className:k,style:_,unstyled:C,size:x,vars:E,attributes:O,...j}=n,{calendarProps:M,others:N}=v0(j),q=A.useRef(null),P=A.useRef(null),L=Xe({name:h||"DatePicker",classes:Ioe,props:n,className:k,style:_,classNames:c,styles:f,unstyled:C,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:tq,vars:E}),{onDateChange:H,onRootMouseLeave:G,onHoveredDateChange:U,getControlProps:z,_value:D,setValue:$}=JF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:B,resolvedStyles:Y}=Wi({classNames:c,styles:f,props:n}),R=y.jsx(Zf,{classNames:B,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:x,...M,...w?{}:N,__stopPropagation:b,__setDateRef:q,__setLevelRef:P,minLevel:M.minLevel||"month",__onDayMouseEnter:(I,X)=>{U(X),p==null||p(I,X)},__onDayClick:(I,X)=>{H(X),d==null||d(I,X)},getDayProps:I=>{var X;return{...z(I),...(X=M.getDayProps)==null?void 0:X.call(M,I)}},getMonthControlProps:I=>{var X;return{selected:typeof D=="string"?u9(I,D):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,I)}},getYearControlProps:I=>{var X;return{selected:typeof D=="string"?Le(I).isSame(D,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,I)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:O,...w?{}:{className:k,style:_}});if(!w)return R;const W=I=>{var ee,re;const X=Array.isArray(I)?I[0]:I;X!==void 0&&((ee=q.current)==null||ee.call(q,X),(re=P.current)==null||re.call(P,"month"),v?v(X):$(I))},V=w.map((I,X)=>y.jsx(Ot,{...L("presetButton"),onClick:()=>W(I.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:I.label},X));return y.jsxs(me,{...L("datePickerRoot"),size:x,...N,children:[y.jsx("div",{...L("presetsList"),children:V}),R]})});up.classes=Zf.classes;up.varsResolver=tq;up.displayName="@mantine/dates/DatePicker";function iq({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:c,valueFormatter:f}){const h=bl(),[d,p]=bz(!1),[v,b]=c9({type:e,value:n,defaultValue:t,onChange:i}),w=aoe({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(c),formatter:f}),k=C=>{o&&(e==="default"&&p.close(),e==="range"&&C[0]&&C[1]&&p.close()),b(l&&e==="multiple"?[...C].sort((x,E)=>Le(x).isAfter(Le(E))?1:-1):C)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const Foe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},f9=Re(e=>{const n=be("MonthPickerInput",Foe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:c,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,valueFormatter:E,presets:O,attributes:j,...M}=n,{resolvedClassNames:N,resolvedStyles:q}=Wi({classNames:f,styles:h,props:n}),{calendarProps:P,others:L}=v0(M),{_value:H,setValue:G,formattedValue:U,dropdownHandlers:z,dropdownOpened:D,onClear:$,shouldClear:B}=iq({type:t,value:i,defaultValue:r,onChange:a,locale:c,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:E});return y.jsx(Xf,{formattedValue:U,dropdownOpened:D,dropdownHandlers:z,classNames:N,styles:q,unstyled:d,onClear:$,shouldClear:B,value:H,size:v,variant:b,dropdownType:w,...L,attributes:j,type:t,__staticSelector:"MonthPickerInput",children:y.jsx(lp,{...P,size:v,variant:b,type:t,value:H,defaultDate:P.defaultDate||(Array.isArray(H)?H[0]||FS({maxDate:C,minDate:_}):H||FS({maxDate:C,minDate:_})),onChange:G,locale:c,classNames:N,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:O,attributes:j})})});f9.classes={...Xf.classes,...lp.classes};f9.displayName="@mantine/dates/MonthPickerInput";const qoe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},ku=Re(e=>{const n=be("DatePickerInput",qoe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:c,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,defaultDate:E,valueFormatter:O,presets:j,attributes:M,...N}=n,{resolvedClassNames:q,resolvedStyles:P}=Wi({classNames:f,styles:h,props:n}),{calendarProps:L,others:H}=v0(N),{_value:G,setValue:U,formattedValue:z,dropdownHandlers:D,dropdownOpened:$,onClear:B,shouldClear:Y}=iq({type:t,value:i,defaultValue:r,onChange:a,locale:c,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:O}),R=Array.isArray(G)?G[0]||E:G||E;return y.jsx(Xf,{formattedValue:z,dropdownOpened:$,dropdownHandlers:D,classNames:q,styles:P,unstyled:d,onClear:B,shouldClear:Y,value:G,size:v,variant:b,dropdownType:w,...H,type:t,__staticSelector:"DatePickerInput",attributes:M,children:y.jsx(up,{...L,size:v,variant:b,type:t,value:G,defaultDate:R||FS({maxDate:C,minDate:_}),onChange:U,locale:c,classNames:q,styles:P,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:j,attributes:M})})});ku.classes={...Xf.classes,...up.classes};ku.displayName="@mantine/dates/DatePickerInput";/** + `},Rre={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Pre(e){let{announcements:n=Rre,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=Dre}=e;const{announce:a,announcement:o}=Ere(),l=up("DndLiveRegion"),[c,f]=A.useState(!1);if(A.useEffect(()=>{f(!0)},[]),Tre(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!c)return null;const h=Q.createElement(Q.Fragment,null,Q.createElement(jre,{id:i,value:r.draggable}),Q.createElement(Ore,{id:l,announcement:o}));return t?il.createPortal(h,t):h}var xi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xi||(xi={}));function Vg(){}function ZT(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function Nre(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Ga=Object.freeze({x:0,y:0});function i9(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function $re(e,n){const t=Ug(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function r9(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function zre(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function LS(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function mF(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function QT(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const Lre=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=QT(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,c=t.get(l);if(c){const f=i9(QT(c),r);a.push({id:l,data:{droppableContainer:o,value:f}})}}return a.sort(r9)},pF=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=LS(n),a=[];for(const o of i){const{id:l}=o,c=t.get(l);if(c){const f=LS(c),h=r.reduce((p,v,b)=>p+i9(f[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(r9)};function Ire(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const c=Ire(l,n);c>0&&r.push({id:o,data:{droppableContainer:a,value:c}})}}return r.sort(zre)};function Bre(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Fre=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Bre(i,l)){const f=LS(l).reduce((d,p)=>d+i9(i,p),0),h=Number((f/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(r9)};function qre(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function gF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ga}function Hre(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const Ure=Hre(1);function yF(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Vre(e,n,t){const i=yF(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,c=e.left-o-(1-r)*parseFloat(t),f=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:f,right:c+h,bottom:f+d,left:c}}const Wre={ignoreTransform:!1};function Xf(e,n){n===void 0&&(n=Wre);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:f,transformOrigin:h}=mr(e).getComputedStyle(e);f&&(t=Vre(t,f,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:c}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:c}}function JT(e){return Xf(e,{ignoreTransform:!0})}function Gre(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function Yre(e,n){return n===void 0&&(n=mr(e).getComputedStyle(e)),n.position==="fixed"}function Kre(e,n){n===void 0&&(n=mr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function a0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(t9(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!sp(r)||fF(r)||t.includes(r))return t;const a=mr(e).getComputedStyle(r);return r!==e&&Kre(r,a)&&t.push(r),Yre(r,a)?t:i(r.parentNode)}return e?i(e):t}function bF(e){const[n]=a0(e,1);return n??null}function Hk(e){return!t0||!e?null:Yf(e)?e:n9(e)?t9(e)||e===Kf(e).scrollingElement?window:sp(e)?e:null:null}function wF(e){return Yf(e)?e.scrollX:e.scrollLeft}function kF(e){return Yf(e)?e.scrollY:e.scrollTop}function IS(e){return{x:wF(e),y:kF(e)}}var Di;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Di||(Di={}));function _F(e){return!t0||!e?!1:e===document.scrollingElement}function xF(e){const n={x:0,y:0},t=_F(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const Xre={x:.2,y:.2};function Zre(e,n,t,i,r){let{top:a,left:o,right:l,bottom:c}=t;i===void 0&&(i=10),r===void 0&&(r=Xre);const{isTop:f,isBottom:h,isLeft:d,isRight:p}=xF(e),v={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!f&&a<=n.top+w.height?(v.y=Di.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&c>=n.bottom-w.height&&(v.y=Di.Forward,b.y=i*Math.abs((n.bottom-w.height-c)/w.height)),!p&&l>=n.right-w.width?(v.x=Di.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Di.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:b}}function Qre(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function SF(e){return e.reduce((n,t)=>Yc(n,IS(t)),Ga)}function Jre(e){return e.reduce((n,t)=>n+wF(t),0)}function eae(e){return e.reduce((n,t)=>n+kF(t),0)}function CF(e,n){if(n===void 0&&(n=Xf),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);bF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const nae=[["x",["left","right"],Jre],["y",["top","bottom"],eae]];class a9{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=a0(t),r=SF(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of nae)for(const c of o)Object.defineProperty(this,c,{get:()=>{const f=l(i),h=r[a]-f;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class $h{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function tae(e){const{EventTarget:n}=mr(e);return e instanceof n?e:Kf(e)}function Uk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var pa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pa||(pa={}));function eM(e){e.preventDefault()}function iae(e){e.stopPropagation()}var ot;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ot||(ot={}));const AF={start:[ot.Space,ot.Enter],cancel:[ot.Esc],end:[ot.Space,ot.Enter,ot.Tab]},rae=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case ot.Right:return{...t,x:t.x+25};case ot.Left:return{...t,x:t.x-25};case ot.Down:return{...t,y:t.y+25};case ot.Up:return{...t,y:t.y-25}}};class o9{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new $h(Kf(t)),this.windowListeners=new $h(mr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&CF(i),t(Ga)}handleKeyDown(n){if(r0(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=AF,coordinateGetter:o=rae,scrollBehavior:l="smooth"}=r,{code:c}=n;if(a.end.includes(c)){this.handleEnd(n);return}if(a.cancel.includes(c)){this.handleCancel(n);return}const{collisionRect:f}=i.current,h=f?{x:f.left,y:f.top}:Ga;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=rm(d,h),v={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:C,isLeft:x,isBottom:E,maxScroll:j,minScroll:O}=xF(w),M=Qre(w),N={x:Math.min(k===ot.Right?M.right-M.width/2:M.right,Math.max(k===ot.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===ot.Down?M.bottom-M.height/2:M.bottom,Math.max(k===ot.Down?M.top:M.top+M.height/2,d.y))},q=k===ot.Right&&!C||k===ot.Left&&!x,R=k===ot.Down&&!E||k===ot.Up&&!_;if(q&&N.x!==d.x){const L=w.scrollLeft+p.x,F=k===ot.Right&&L<=j.x||k===ot.Left&&L>=O.x;if(F&&!p.y){w.scrollTo({left:L,behavior:l});return}F?v.x=w.scrollLeft-L:v.x=k===ot.Right?w.scrollLeft-j.x:w.scrollLeft-O.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=w.scrollTop+p.y,F=k===ot.Down&&L<=j.y||k===ot.Up&&L>=O.y;if(F&&!p.x){w.scrollTo({top:L,behavior:l});return}F?v.y=w.scrollTop-L:v.y=k===ot.Down?w.scrollTop-j.y:w.scrollTop-O.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Yc(rm(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}o9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=AF,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function nM(e){return!!(e&&"distance"in e)}function tM(e){return!!(e&&"delay"in e)}class s9{constructor(n,t,i){var r;i===void 0&&(i=tae(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Kf(o),this.documentListeners=new $h(this.document),this.listeners=new $h(i),this.windowListeners=new $h(mr(o)),this.initialCoordinates=(r=Ug(a))!=null?r:Ga,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(pa.Resize,this.handleCancel),this.windowListeners.add(pa.DragStart,eM),this.windowListeners.add(pa.VisibilityChange,this.handleCancel),this.windowListeners.add(pa.ContextMenu,eM),this.documentListeners.add(pa.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(tM(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(nM(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(pa.Click,iae,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pa.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const c=(t=Ug(n))!=null?t:Ga,f=rm(r,c);if(!i&&l){if(nM(l)){if(l.tolerance!=null&&Uk(f,l.tolerance))return this.handleCancel();if(Uk(f,l.distance))return this.handleStart()}if(tM(l)&&Uk(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}n.cancelable&&n.preventDefault(),o(c)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===ot.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const aae={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class l9 extends s9{constructor(n){const{event:t}=n,i=Kf(t.target);super(n,aae,i)}}l9.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const oae={move:{name:"mousemove"},end:{name:"mouseup"}};var BS;(function(e){e[e.RightClick=2]="RightClick"})(BS||(BS={}));class sae extends s9{constructor(n){super(n,oae,Kf(n.event.target))}}sae.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===BS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Vk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class lae extends s9{constructor(n){super(n,Vk)}static setup(){return window.addEventListener(Vk.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Vk.move.name,n)};function n(){}}}lae.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var zh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(zh||(zh={}));var Wg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Wg||(Wg={}));function uae(e){let{acceleration:n,activator:t=zh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Wg.TreeOrder,pointerCoordinates:c,scrollableAncestors:f,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=fae({delta:d,disabled:!a}),[b,w]=_re(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(t){case zh.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case zh.DraggableRect:return r}},[t,r,c]),x=A.useRef(null),E=A.useCallback(()=>{const O=x.current;if(!O)return;const M=k.current.x*_.current.x,N=k.current.y*_.current.y;O.scrollBy(M,N)},[]),j=A.useMemo(()=>l===Wg.TreeOrder?[...f].reverse():f,[l,f]);A.useEffect(()=>{if(!a||!f.length||!C){w();return}for(const O of j){if((i==null?void 0:i(O))===!1)continue;const M=f.indexOf(O),N=h[M];if(!N)continue;const{direction:q,speed:R}=Zre(O,N,C,n,p);for(const L of["x","y"])v[L][q[L]]||(R[L]=0,q[L]=0);if(R.x>0||R.y>0){w(),x.current=O,b(E,o),k.current=R,_.current=q;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,E,i,w,a,o,JSON.stringify(C),JSON.stringify(v),b,f,j,h,JSON.stringify(p)])}const cae={x:{[Di.Backward]:!1,[Di.Forward]:!1},y:{[Di.Backward]:!1,[Di.Forward]:!1}};function fae(e){let{delta:n,disabled:t}=e;const i=Hg(n);return lp(r=>{if(t||!i||!r)return cae;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Di.Backward]:r.x[Di.Backward]||a.x===-1,[Di.Forward]:r.x[Di.Forward]||a.x===1},y:{[Di.Backward]:r.y[Di.Backward]||a.y===-1,[Di.Forward]:r.y[Di.Forward]||a.y===1}}},[t,n,i])}function dae(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return lp(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function hae(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var am;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(am||(am={}));var FS;(function(e){e.Optimized="optimized"})(FS||(FS={}));const iM=new Map;function mae(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:c,strategy:f}=r,h=A.useRef(e),d=k(),p=im(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(C=>C===null?_:C.concat(_.filter(x=>!C.includes(x))))},[p]),b=A.useRef(null),w=lp(_=>{if(d&&!t)return iM;if(!_||_===iM||h.current!==e||a!=null){const C=new Map;for(let x of e){if(!x)continue;if(a&&a.length>0&&!a.includes(x.id)&&x.rect.current){C.set(x.id,x.rect.current);continue}const E=x.node.current,j=E?new a9(c(E),E):null;x.rect.current=j,j&&C.set(x.id,j)}return C}return _},[e,a,t,d,c]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(f){case am.Always:return!1;case am.BeforeDragging:return t;default:return!t}}}function u9(e,n){return lp(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function pae(e,n){return u9(e,n)}function vae(e){let{callback:n,disabled:t}=e;const i=i0(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function o0(e){let{callback:n,disabled:t}=e;const i=i0(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function gae(e){return new a9(Xf(e),e)}function rM(e,n,t){n===void 0&&(n=gae);const[i,r]=A.useState(null);function a(){r(c=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=c??t)!=null?f:null}const h=n(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const o=vae({callback(c){if(e)for(const f of c){const{type:h,target:d}=f;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=o0({callback:a});return Wa(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function yae(e){const n=u9(e);return gF(e,n)}const aM=[];function bae(e){const n=A.useRef(e),t=lp(i=>e?i&&i!==aM&&e&&n.current&&e.parentNode===n.current.parentNode?i:a0(e):aM,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function wae(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=Hk(a.target);o&&t(l=>l?(l.set(o,IS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(c=>{const f=Hk(c);return f?(f.addEventListener("scroll",r,{passive:!0}),[f,IS(f)]):null}).filter(c=>c!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(c=>{const f=Hk(c);f==null||f.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Yc(a,o),Ga):SF(e):Ga,[e,n])}function oM(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Ga;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?rm(e,t.current):Ga}function kae(e){A.useEffect(()=>{if(!t0)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function _ae(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function jF(e){return A.useMemo(()=>e?Gre(e):null,[e])}const sM=[];function xae(e,n){n===void 0&&(n=Xf);const[t]=e,i=jF(t?mr(t):null),[r,a]=A.useState(sM);function o(){a(()=>e.length?e.map(c=>_F(c)?i:new a9(n(c),c)):sM)}const l=o0({callback:o});return Wa(()=>{l==null||l.disconnect(),o(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),r}function OF(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return sp(n)?n:e}function Sae(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(f=>{for(const{target:h}of f)if(sp(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=o0({callback:r}),o=A.useCallback(f=>{const h=OF(f);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,c]=qg(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:c}),[t,l,c])}const Cae=[{sensor:l9,options:{}},{sensor:o9,options:{}}],Aae={current:{}},Sg={draggable:{measure:JT},droppable:{measure:JT,strategy:am.WhileDragging,frequency:FS.Optimized},dragOverlay:{measure:Xf}};class Lh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const jae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Lh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Vg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Sg,measureDroppableContainers:Vg,windowRect:null,measuringScheduled:!1},EF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Vg,draggableNodes:new Map,over:null,measureDroppableContainers:Vg},cp=A.createContext(EF),TF=A.createContext(jae);function Oae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Lh}}}function Eae(e,n){switch(n.type){case xi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case xi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case xi.DragEnd:case xi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Lh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case xi.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new Lh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case xi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Lh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Tae(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(cp),a=Hg(i),o=Hg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!r0(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:c,node:f}=l;if(!c.current&&!f.current)return;requestAnimationFrame(()=>{for(const h of[c.current,f.current]){if(!h)continue;const d=Cre(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function MF(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function Mae(e){return A.useMemo(()=>({draggable:{...Sg.draggable,...e==null?void 0:e.draggable},droppable:{...Sg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Sg.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Dae(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Wa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const f=n==null?void 0:n.node.current;if(!f||f.isConnected===!1)return;const h=t(f),d=gF(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=bF(f);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const s0=A.createContext({...Ga,scaleX:1,scaleY:1});var Js;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Js||(Js={}));const Rae=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:c=!0,children:f,sensors:h=Cae,collisionDetection:d=vF,measuring:p,modifiers:v,...b}=n;const w=A.useReducer(Eae,void 0,Oae),[k,_]=w,[C,x]=Mre(),[E,j]=A.useState(Js.Uninitialized),O=E===Js.Initialized,{draggable:{active:M,nodes:N,translate:q},droppable:{containers:R}}=k,L=M!=null?N.get(M):null,F=A.useRef({initial:null,translated:null}),Y=A.useMemo(()=>{var bn;return M!=null?{id:M,data:(bn=L==null?void 0:L.data)!=null?bn:Aae,rect:F}:null},[M,L]),V=A.useRef(null),[$,P]=A.useState(null),[I,H]=A.useState(null),U=im(b,Object.values(b)),D=up("DndDescribedBy",o),W=A.useMemo(()=>R.getEnabled(),[R]),G=Mae(p),{droppableRects:z,measureDroppableContainers:X,measuringScheduled:ee}=mae(W,{dragging:O,dependencies:[q.x,q.y],config:G.droppable}),re=dae(N,M),le=A.useMemo(()=>I?Ug(I):null,[I]),ye=kn(),ae=pae(re,G.draggable.measure);Dae({activeNode:M!=null?N.get(M):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:G.draggable.measure});const ue=rM(re,G.draggable.measure,ae),Se=rM(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:z,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Le=R.getNodeFor((t=ne.current.over)==null?void 0:t.id),ke=Sae({measure:G.dragOverlay.measure}),je=(i=ke.nodeRef.current)!=null?i:re,Ne=O?(r=ke.rect)!=null?r:ue:null,ge=!!(ke.nodeRef.current&&ke.rect),Ce=yae(ge?null:ue),Pe=jF(je?mr(je):null),ce=bae(O?Le??re:null),qe=xae(ce),Ye=MF(v,{transform:{x:q.x-Ce.x,y:q.y-Ce.y,scaleX:1,scaleY:1},activatorEvent:I,active:Y,activeNodeRect:ue,containerNodeRect:Se,draggingNodeRect:Ne,over:ne.current.over,overlayNodeRect:ke.rect,scrollableAncestors:ce,scrollableAncestorRects:qe,windowRect:Pe}),We=le?Yc(le,q):null,Ze=wae(ce),Qe=oM(Ze),ie=oM(Ze,[ue]),ve=Yc(Ye,Qe),Ke=Ne?Ure(Ne,Ye):null,Je=Y&&Ke?d({active:Y,collisionRect:Ke,droppableRects:z,droppableContainers:W,pointerCoordinates:We}):null,Ae=mF(Je,"id"),[an,mn]=A.useState(null),En=ge?Ye:Yc(Ye,ie),vn=qre(En,(a=an==null?void 0:an.rect)!=null?a:null,ue),sn=A.useRef(null),en=A.useCallback((bn,_n)=>{let{sensor:ft,options:Tt}=_n;if(V.current==null)return;const Be=N.get(V.current);if(!Be)return;const Ue=bn.nativeEvent,Ln=new ft({active:V.current,activeNode:Be,event:Ue,options:Tt,context:ne,onAbort(Pn){if(!N.get(Pn))return;const{onDragAbort:tn}=U.current,on={id:Pn};tn==null||tn(on),C({type:"onDragAbort",event:on})},onPending(Pn,rn,tn,on){if(!N.get(Pn))return;const{onDragPending:Gn}=U.current,_t={id:Pn,constraint:rn,initialCoordinates:tn,offset:on};Gn==null||Gn(_t),C({type:"onDragPending",event:_t})},onStart(Pn){const rn=V.current;if(rn==null)return;const tn=N.get(rn);if(!tn)return;const{onDragStart:on}=U.current,In={activatorEvent:Ue,active:{id:rn,data:tn.data,rect:F}};il.unstable_batchedUpdates(()=>{on==null||on(In),j(Js.Initializing),_({type:xi.DragStart,initialCoordinates:Pn,active:rn}),C({type:"onDragStart",event:In}),P(sn.current),H(Ue)})},onMove(Pn){_({type:xi.DragMove,coordinates:Pn})},onEnd:ut(xi.DragEnd),onCancel:ut(xi.DragCancel)});sn.current=Ln;function ut(Pn){return async function(){const{active:tn,collisions:on,over:In,scrollAdjustedTranslate:Gn}=ne.current;let _t=null;if(tn&&Gn){const{cancelDrop:Rn}=U.current;_t={activatorEvent:Ue,active:tn,collisions:on,delta:Gn,over:In},Pn===xi.DragEnd&&typeof Rn=="function"&&await Promise.resolve(Rn(_t))&&(Pn=xi.DragCancel)}V.current=null,il.unstable_batchedUpdates(()=>{_({type:Pn}),j(Js.Uninitialized),mn(null),P(null),H(null),sn.current=null;const Rn=Pn===xi.DragEnd?"onDragEnd":"onDragCancel";if(_t){const Tn=U.current[Rn];Tn==null||Tn(_t),C({type:Rn,event:_t})}})}}},[N]),zn=A.useCallback((bn,_n)=>(ft,Tt)=>{const Be=ft.nativeEvent,Ue=N.get(Tt);if(V.current!==null||!Ue||Be.dndKit||Be.defaultPrevented)return;const Ln={active:Ue};bn(ft,_n.options,Ln)===!0&&(Be.dndKit={capturedBy:_n.sensor},V.current=Tt,en(ft,_n))},[N,en]),Re=hae(h,zn);kae(h),Wa(()=>{ue&&E===Js.Initializing&&j(Js.Initialized)},[ue,E]),A.useEffect(()=>{const{onDragMove:bn}=U.current,{active:_n,activatorEvent:ft,collisions:Tt,over:Be}=ne.current;if(!_n||!ft)return;const Ue={active:_n,activatorEvent:ft,collisions:Tt,delta:{x:ve.x,y:ve.y},over:Be};il.unstable_batchedUpdates(()=>{bn==null||bn(Ue),C({type:"onDragMove",event:Ue})})},[ve.x,ve.y]),A.useEffect(()=>{const{active:bn,activatorEvent:_n,collisions:ft,droppableContainers:Tt,scrollAdjustedTranslate:Be}=ne.current;if(!bn||V.current==null||!_n||!Be)return;const{onDragOver:Ue}=U.current,Ln=Tt.get(Ae),ut=Ln&&Ln.rect.current?{id:Ln.id,rect:Ln.rect.current,data:Ln.data,disabled:Ln.disabled}:null,Pn={active:bn,activatorEvent:_n,collisions:ft,delta:{x:Be.x,y:Be.y},over:ut};il.unstable_batchedUpdates(()=>{mn(ut),Ue==null||Ue(Pn),C({type:"onDragOver",event:Pn})})},[Ae]),Wa(()=>{ne.current={activatorEvent:I,active:Y,activeNode:re,collisionRect:Ke,collisions:Je,droppableRects:z,draggableNodes:N,draggingNode:je,draggingNodeRect:Ne,droppableContainers:R,over:an,scrollableAncestors:ce,scrollAdjustedTranslate:ve},F.current={initial:Ne,translated:Ke}},[Y,re,Je,Ke,N,je,Ne,z,R,an,ce,ve]),uae({...ye,delta:q,draggingRect:Ke,pointerCoordinates:We,scrollableAncestors:ce,scrollableAncestorRects:qe});const He=A.useMemo(()=>({active:Y,activeNode:re,activeNodeRect:ue,activatorEvent:I,collisions:Je,containerNodeRect:Se,dragOverlay:ke,draggableNodes:N,droppableContainers:R,droppableRects:z,over:an,measureDroppableContainers:X,scrollableAncestors:ce,scrollableAncestorRects:qe,measuringConfiguration:G,measuringScheduled:ee,windowRect:Pe}),[Y,re,ue,I,Je,Se,ke,N,R,z,an,X,ce,qe,G,ee,Pe]),Dn=A.useMemo(()=>({activatorEvent:I,activators:Re,active:Y,activeNodeRect:ue,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:an,measureDroppableContainers:X}),[I,Re,Y,ue,_,D,N,an,X]);return Q.createElement(hF.Provider,{value:x},Q.createElement(cp.Provider,{value:Dn},Q.createElement(TF.Provider,{value:He},Q.createElement(s0.Provider,{value:vn},f)),Q.createElement(Tae,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(Pre,{...l,hiddenTextDescribedById:D}));function kn(){const bn=($==null?void 0:$.autoScrollEnabled)===!1,_n=typeof c=="object"?c.enabled===!1:c===!1,ft=O&&!bn&&!_n;return typeof c=="object"?{...c,enabled:ft}:{enabled:ft}}}),Pae=A.createContext(null),lM="button",Nae="Draggable";function $ae(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=up(Nae),{activators:o,activatorEvent:l,active:c,activeNodeRect:f,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(cp),{role:v=lM,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(c==null?void 0:c.id)===n,_=A.useContext(k?s0:Pae),[C,x]=qg(),[E,j]=qg(),O=_ae(o,n),M=im(t);Wa(()=>(d.set(n,{id:n,key:a,node:C,activatorNode:E,data:M}),()=>{const q=d.get(n);q&&q.key===a&&d.delete(n)}),[d,n]);const N=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===lM?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,v,w,k,b,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:f,attributes:N,isDragging:k,listeners:i?void 0:O,node:C,over:p,setNodeRef:x,setActivatorNodeRef:j,transform:_}}function DF(){return A.useContext(TF)}const zae="Droppable",Lae={timeout:25};function Iae(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=up(zae),{active:o,dispatch:l,over:c,measureDroppableContainers:f}=A.useContext(cp),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...Lae,...r},_=im(w??i),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{f(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),x=o0({callback:C,disabled:b||!o}),E=A.useCallback((N,q)=>{x&&(q&&(x.unobserve(q),d.current=!1),N&&x.observe(N))},[x]),[j,O]=qg(E),M=im(n);return A.useEffect(()=>{!x||!j.current||(x.disconnect(),d.current=!1,x.observe(j.current))},[j,x]),A.useEffect(()=>(l({type:xi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:j,rect:p,data:M}}),()=>l({type:xi.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:xi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(c==null?void 0:c.id)===i,node:j,over:c,setNodeRef:O}}function Bae(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Hg(t);return!t&&!i&&l&&r(l),Wa(()=>{if(!a)return;const c=i==null?void 0:i.key,f=i==null?void 0:i.props.id;if(c==null||f==null){r(null);return}Promise.resolve(n(f,a)).then(()=>{r(null)})},[n,i,a]),Q.createElement(Q.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const Fae={x:0,y:0,scaleX:1,scaleY:1};function qae(e){let{children:n}=e;return Q.createElement(cp.Provider,{value:EF},Q.createElement(s0.Provider,{value:Fae},n))}const Hae={position:"fixed",touchAction:"none"},Uae=e=>r0(e)?"transform 250ms ease":void 0,Vae=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:c,transform:f,transition:h=Uae}=e;if(!l)return null;const d=r?f:{...f,scaleX:1,scaleY:1},p={...Hae,width:l.width,height:l.height,top:l.top,left:l.left,transform:yo.Transform.toString(d),transformOrigin:r&&i?$re(i,l):void 0,transition:typeof h=="function"?h(i):h,...c};return Q.createElement(t,{className:o,style:p,ref:n},a)}),Wae=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,c]of Object.entries(a.active))c!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,c));if(a!=null&&a.dragOverlay)for(const[l,c]of Object.entries(a.dragOverlay))c!==void 0&&i.node.style.setProperty(l,c);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[c,f]of Object.entries(r))t.node.style.setProperty(c,f);o!=null&&o.active&&t.node.classList.remove(o.active)}},Gae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:yo.Transform.toString(n)},{transform:yo.Transform.toString(t)}]},Yae={duration:250,easing:"ease",keyframes:Gae,sideEffects:Wae({styles:{active:{opacity:"0"}}})};function Kae(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return i0((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const c=l.node.current;if(!c)return;const f=OF(o);if(!f)return;const{transform:h}=mr(o).getComputedStyle(o),d=yF(h);if(!d)return;const p=typeof n=="function"?n:Xae(n);return CF(c,r.draggable.measure),p({active:{id:a,data:l.data,node:c,rect:r.draggable.measure(c)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(f)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function Xae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...Yae,...e};return a=>{let{active:o,dragOverlay:l,transform:c,...f}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:c.scaleX!==1?o.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?o.rect.height*c.scaleY/l.rect.height:1},p={x:c.x-h.x,y:c.y-h.y,...d},v=r({...f,active:o,dragOverlay:l,transform:{initial:c,final:p}}),[b]=v,w=v[v.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...f}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(C=>{_.onfinish=()=>{k==null||k(),C()}})}}let uM=0;function Zae(e){return A.useMemo(()=>{if(e!=null)return uM++,uM},[e])}const Qae=Q.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:c,zIndex:f=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:C,scrollableAncestors:x,scrollableAncestorRects:E,windowRect:j}=DF(),O=A.useContext(s0),M=Zae(d==null?void 0:d.id),N=MF(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:x,scrollableAncestorRects:E,transform:O,windowRect:j}),q=u9(p),R=Kae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:C}),L=q?k.setRef:void 0;return Q.createElement(qae,null,Q.createElement(Bae,{animation:R},d&&M?Q.createElement(Vae,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:c,transition:a,rect:q,style:{zIndex:f,...r},transform:N},t):null))});function Gg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function Jae(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Uv(e){return e!==null&&e>=0}function eoe(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const c=ioe(t,o,r);if(o===r){const f=t[a];return f?{x:rr&&o<=a?{x:-l.width-c,y:0,...Vv}:o=a?{x:l.width+c,y:0,...Vv}:{x:0,y:0,...Vv}};function ioe(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=Gg(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},Wv={scaleX:1,scaleY:1},PF=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const f=a[o];return f?{x:0,y:tt&&r<=o?{x:0,y:-l.height-c,...Wv}:r=o?{x:0,y:l.height+c,...Wv}:{x:0,y:0,...Wv}};function roe(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(O=>typeof O=="object"&&"id"in O?O.id:O),[i]),b=o!=null,w=o?v.indexOf(o.id):-1,k=f?v.indexOf(f.id):-1,_=A.useRef(v),C=!eoe(v,_.current),x=k!==-1&&w===-1||C,E=noe(a);Wa(()=>{C&&b&&h(v)},[C,v,b,h]),A.useEffect(()=>{_.current=v},[v]);const j=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:E,disableTransforms:x,items:v,overIndex:k,useDragOverlay:p,sortedRects:Jae(v,c),strategy:r}),[w,d,E.draggable,E.droppable,x,v,k,c,p,r]);return Q.createElement($F.Provider,{value:j},n)}const aoe=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Gg(t,i,r).indexOf(n)},ooe=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:c,transition:f}=e;return!f||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===c},soe={duration:200,easing:"ease"},zF="transform",loe=yo.Transition.toString({property:zF,duration:0,easing:"linear"}),uoe={roleDescription:"sortable"};function coe(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Wa(()=>{if(!n&&t!==l.current&&i.current){const c=r.current;if(c){const f=Xf(i.current,{ignoreTransform:!0}),h={x:c.left-f.left,y:c.top-f.top,scaleX:c.width/f.width,scaleY:c.height/f.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function LF(e){let{animateLayoutChanges:n=ooe,attributes:t,disabled:i,data:r,getNewIndex:a=aoe,id:o,strategy:l,resizeObserverConfig:c,transition:f=soe}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:C}=A.useContext($F),x=foe(i,v),E=h.indexOf(o),j=A.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),O=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:N,isOver:q,setNodeRef:R}=Iae({id:o,data:j,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...c}}),{active:L,activatorEvent:F,activeNodeRect:Y,attributes:V,setNodeRef:$,listeners:P,isDragging:I,over:H,setActivatorNodeRef:U,transform:D}=$ae({id:o,data:j,attributes:{...uoe,...t},disabled:x.draggable}),W=kre(R,$),G=!!L,z=G&&!b&&Uv(p)&&Uv(k),X=!_&&I,ee=X&&z?D:null,le=z?ee??(l??C)({rects:w,activeNodeRect:Y,activeIndex:p,overIndex:k,index:E}):null,ye=Uv(p)&&Uv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=L==null?void 0:L.id,ue=A.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),Se=h!==ue.current.items,ne=n({active:L,containerId:d,isDragging:I,isSorting:G,id:o,index:E,items:h,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:f,wasDragging:ue.current.activeId!=null}),Le=coe({disabled:!ne,index:E,node:N,rect:M});return A.useEffect(()=>{G&&ue.current.newIndex!==ye&&(ue.current.newIndex=ye),d!==ue.current.containerId&&(ue.current.containerId=d),h!==ue.current.items&&(ue.current.items=h)},[G,ye,d,h]),A.useEffect(()=>{if(ae===ue.current.activeId)return;if(ae!=null&&ue.current.activeId==null){ue.current.activeId=ae;return}const je=setTimeout(()=>{ue.current.activeId=ae},50);return()=>clearTimeout(je)},[ae]),{active:L,activeIndex:p,attributes:V,data:j,rect:M,index:E,newIndex:ye,items:h,isOver:q,isSorting:G,isDragging:I,listeners:P,node:N,overIndex:k,over:H,setNodeRef:W,setActivatorNodeRef:U,setDroppableNodeRef:R,setDraggableNodeRef:$,transform:Le??le,transition:ke()};function ke(){if(Le||Se&&ue.current.newIndex===E)return loe;if(!(X&&!r0(F)||!f)&&(G||ne))return yo.Transition.toString({...f,property:zF})}}function foe(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function Yg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const doe=[ot.Down,ot.Right,ot.Up,ot.Left],hoe=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(doe.includes(e.code)){if(e.preventDefault(),!t||!i)return;const c=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case ot.Down:i.topp.top&&c.push(d);break;case ot.Left:i.left>p.left&&c.push(d);break;case ot.Right:i.left1&&(h=f[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&d&&p){const k=a0(b).some((O,M)=>l[M]!==O),_=IF(d,p),C=moe(d,p),x=k||!_?{x:0,y:0}:{x:C?i.width-v.width:0,y:C?i.height-v.height:0},E={x:v.left,y:v.top};return x.x&&x.y?E:rm(E,x)}}}};function IF(e,n){return!Yg(e)||!Yg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function moe(e,n){return!Yg(e)||!Yg(n)||!IF(e,n)?!1:e.data.current.sortable.index=$?V:""+Array($+1-I.length).join(P)+V},E={s:x,z:function(V){var $=-V.utcOffset(),P=Math.abs($),I=Math.floor(P/60),H=P%60;return($<=0?"+":"-")+x(I,2,"0")+":"+x(H,2,"0")},m:function V($,P){if($.date()1)return V(D[0])}else{var W=$.name;O[W]=$,H=W}return!I&&H&&(j=H),H||!I&&j},R=function(V,$){if(N(V))return V.clone();var P=typeof $=="object"?$:{};return P.date=V,P.args=arguments,new F(P)},L=E;L.l=q,L.i=N,L.w=function(V,$){return R(V,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var F=(function(){function V(P){this.$L=q(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[M]=!0}var $=V.prototype;return $.parse=function(P){this.$d=(function(I){var H=I.date,U=I.utc;if(H===null)return new Date(NaN);if(L.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var D=H.match(k);if(D){var W=D[2]-1||0,G=(D[7]||"0").substring(0,3);return U?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,G)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,G)}}return new Date(H)})(P),this.init()},$.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},$.$utils=function(){return L},$.isValid=function(){return this.$d.toString()!==w},$.isSame=function(P,I){var H=R(P);return this.startOf(I)<=H&&H<=this.endOf(I)},$.isAfter=function(P,I){return R(P)Ie(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function boe({formatter:e,...n}){return(e||yoe)(n)}function woe({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function BF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var c,f,h;const o=woe({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(f=(c=e.current)==null?void 0:c[o.levelIndex])==null?void 0:f[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?BF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function koe(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function _oe(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function c9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=koe(r.key);a&&(r.preventDefault(),BF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:_oe(e)}))}function Ji(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD")}function FF(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD HH:mm:ss")}function HS({minDate:e,maxDate:n}){const t=Ie();return!e&&!n?Ji(t):e&&Ie(t).isBefore(e)?Ji(e):n&&Ie(t).isAfter(n)?Ji(n):Ji(t)}const xoe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Soe=A.createContext(xoe);function Sl(){const e=A.use(Soe),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function Coe({value:e,type:n,withTime:t}){const i=t?FF:Ji;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function qF({value:e,type:n,name:t,form:i,withTime:r=!1}){return g.jsx("input",{type:"hidden",value:Coe({value:e,type:n,withTime:r}),name:t,form:i})}qF.displayName="@mantine/dates/HiddenDatesInput";var HF={day:"m_396ce5cb"};const UF=(e,{size:n})=>({day:{"--day-size":Bn(n,"day-size")}}),l0=De(e=>{const n=be("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:c,disabled:f,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:C,static:x,highlightToday:E,fullWidth:j,attributes:O,...M}=n;return g.jsx(Et,{...Xe({name:h||"Day",classes:HF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:O,vars:l,varsResolver:UF,rootSelector:"day"})("day",{style:C?{display:"none"}:void 0}),component:x?"div":"button",disabled:f,"data-today":Ie(c).isSame(new Date,"day")||void 0,"data-hidden":C||void 0,"data-highlight-today":E||void 0,"data-disabled":f||void 0,"data-weekend":!f&&!p&&d||void 0,"data-outside":!f&&p||void 0,"data-selected":!f&&v||void 0,"data-in-range":w&&!f||void 0,"data-first-in-range":k&&!f||void 0,"data-last-in-range":_&&!f||void 0,"data-static":x||void 0,"data-full-width":j||void 0,unstyled:o,...M,children:(b==null?void 0:b(c))||Ie(c).date()})});l0.classes=HF;l0.varsResolver=UF;l0.displayName="@mantine/dates/Day";function Aoe({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Ie().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Ie(i).add(a,"days").locale(e).format(n)):r.push(n(Ie(i).add(a,"days").format("YYYY-MM-DD")));return r}var VF={weekday:"m_18a3eca"};const WF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ri(n),"--wr-spacing":Vt(n)}}),u0=De(e=>{const n=be("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:c,firstDayOfWeek:f,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:b,...w}=n,k=Xe({name:p||"WeekdaysRow",classes:VF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:WF,rootSelector:"weekdaysRow"}),_=Sl(),C=Aoe({locale:_.getLocale(c),format:h,firstDayOfWeek:_.getFirstDayOfWeek(f)}).map((x,E)=>g.jsx(d,{...k("weekday"),children:x},E));return g.jsxs(he,{component:"tr",...k("weekdaysRow"),...w,children:[v&&g.jsx(d,{...k("weekday"),children:"#"}),C]})});u0.classes=VF;u0.varsResolver=WF;u0.displayName="@mantine/dates/WeekdaysRow";function joe(e,n=1){let t=Ie(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function Ooe(e,n=1){let t=Ie(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function Eoe({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Ie(Ie(e).subtract(Ie(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=joe(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Ie(Ooe(r,n));for(;Ie(l).isBefore(a,"day");){const c=[];for(let f=0;f<7;f+=1)c.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(c)}if(t&&o.length<6){const c=o[o.length-1],f=c[c.length-1];let h=Ie(f).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function f9(e,n){return Ie(e).format("YYYY-MM")===Ie(n).format("YYYY-MM")}function GF(e,n){return n?Ie(e).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function YF(e,n){return n?Ie(e).isBefore(Ie(n).add(1,"day"),"day"):!0}function Toe({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return YF(h,t)&&GF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||f9(h,o))}),c=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(c)return c;const f=l.find(h=>Ie().isSame(h,"date"));return f||l[0]}var Ag={exports:{}},Moe=Ag.exports,fM;function Doe(){return fM||(fM=1,(function(e,n){(function(t,i){e.exports=i()})(Moe,(function(){var t="day";return function(i,r,a){var o=function(f){return f.add(4-f.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),t);var h,d,p,v,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return b.diff(w,"week")+1},l.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var c=l.startOf;l.startOf=function(f,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(f)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(f,h)}}}))})(Ag)),Ag.exports}var Roe=Doe();const Poe=yt(Roe);Ie.extend(Poe);function Noe(e){return Ie(e.find(n=>Ie(n).day()===1)).isoWeek()}var KF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const $oe={withCellSpacing:!0},XF=(e,{size:n})=>({weekNumber:{"--wn-fz":ri(n),"--wn-size":Bn(n,"wn-size")}}),fp=De(e=>{const n=be("Month",$oe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,locale:f,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:C,hideOutsideDates:x,hideWeekdays:E,getDayAriaLabel:j,static:O,__getDayRef:M,__onDayKeyDown:N,__onDayClick:q,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:F,withCellSpacing:Y,size:V,highlightToday:$,withWeekNumbers:P,fullWidth:I,attributes:H,...U}=n,D=Xe({name:c||"Month",classes:KF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:H,vars:l,varsResolver:XF,rootSelector:"month"}),W=Sl(),G=Eoe({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),z=Toe({dates:G,minDate:Ji(k),maxDate:Ji(_),getDayProps:b,excludeDate:w,hideOutsideDates:x,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Wi({classNames:t,styles:a,props:n}),re=G.map((le,ye)=>{const ae=le.map((ue,Se)=>{const ne=!f9(ue,p),Le=(j==null?void 0:j(ue))||Ie(ue).locale(f||W.locale).format("D MMMM YYYY"),ke=b==null?void 0:b(ue),je=Ie(ue).isSame(z,"date");return g.jsx("td",{...D("monthCell"),"data-with-spacing":Y||void 0,children:g.jsx(l0,{__staticSelector:c||"Month",classNames:X,styles:ee,attributes:H,unstyled:o,"data-mantine-stop-propagation":F||void 0,highlightToday:$,renderDay:C,date:ue,size:V,weekend:W.getWeekendDays(v).includes(Ie(ue).get("day")),outside:ne,hidden:x?ne:!1,"aria-label":Le,static:O,fullWidth:I,disabled:(w==null?void 0:w(ue))||!YF(ue,Ji(_))||!GF(ue,Ji(k)),ref:Ne=>{Ne&&(M==null||M(ye,Se,Ne))},...ke,onKeyDown:Ne=>{var ge;(ge=ke==null?void 0:ke.onKeyDown)==null||ge.call(ke,Ne),N==null||N(Ne,{rowIndex:ye,cellIndex:Se,date:ue})},onMouseEnter:Ne=>{var ge;(ge=ke==null?void 0:ke.onMouseEnter)==null||ge.call(ke,Ne),R==null||R(Ne,ue)},onClick:Ne=>{var ge;(ge=ke==null?void 0:ke.onClick)==null||ge.call(ke,Ne),q==null||q(Ne,ue)},onMouseDown:Ne=>{var ge;(ge=ke==null?void 0:ke.onMouseDown)==null||ge.call(ke,Ne),L&&Ne.preventDefault()},tabIndex:L||!je?-1:0})},ue.toString())});return g.jsxs("tr",{...D("monthRow"),children:[P&&g.jsx("td",{...D("weekNumber"),children:Noe(le)}),ae]},ye)});return g.jsxs(he,{component:"table",...D("month"),size:V,"data-full-width":I||void 0,...U,children:[!E&&g.jsx("thead",{...D("monthThead"),children:g.jsx(u0,{__staticSelector:c||"Month",locale:f,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:V,classNames:X,styles:ee,unstyled:o,attributes:H})}),g.jsx("tbody",{...D("monthTbody"),children:re})]})});fp.classes=KF;fp.varsResolver=XF;fp.displayName="@mantine/dates/Month";var ZF={pickerControl:"m_dc6a3c71"};const QF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ri(n),"--dpc-size":Bn(n,"dpc-size")}}),dp=De(e=>{const n=be("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:c,lastInRange:f,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:b,attributes:w,...k}=n;return g.jsx(Et,{...Xe({name:d||"PickerControl",classes:ZF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:QF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":c&&!v||void 0,"data-last-in-range":f&&!v||void 0,disabled:v,...k})});dp.classes=ZF;dp.varsResolver=QF;dp.displayName="@mantine/dates/PickerControl";function JF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"year")||t&&Ie(e).isAfter(t,"year"))}function zoe({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var c;return!JF({year:l,minDate:n,maxDate:t})&&!((c=i==null?void 0:i(l))!=null&&c.disabled)}),a=r.find(l=>{var c;return(c=i==null?void 0:i(l))==null?void 0:c.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"year"));return o||r[0]}function eq(e){const n=Ie(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=be("YearsList",Loe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:c,yearsListFormat:f,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:j,fullWidth:O,size:M,attributes:N,...q}=n,R=Xe({name:b||"YearsList",classes:nq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=Sl(),F=eq(c),Y=zoe({years:F,minDate:d,maxDate:p,getYearControlProps:v}),V=F.map(($,P)=>{const I=$.map((H,U)=>{const D=v==null?void 0:v(H),W=Ie(H).isSame(Y,"year");return g.jsx("td",{...R("yearsListCell"),"data-with-spacing":j||void 0,children:g.jsx(dp,{...R("yearsListControl"),size:M,unstyled:o,fullWidth:O,"data-mantine-stop-propagation":E||void 0,disabled:JF({year:H,minDate:d,maxDate:p}),ref:G=>{G&&(w==null||w(P,U,G))},...D,onKeyDown:G=>{var z;(z=D==null?void 0:D.onKeyDown)==null||z.call(D,G),k==null||k(G,{rowIndex:P,cellIndex:U,date:H})},onClick:G=>{var z;(z=D==null?void 0:D.onClick)==null||z.call(D,G),_==null||_(G,H)},onMouseEnter:G=>{var z;(z=D==null?void 0:D.onMouseEnter)==null||z.call(D,G),C==null||C(G,H)},onMouseDown:G=>{var z;(z=D==null?void 0:D.onMouseDown)==null||z.call(D,G),x&&G.preventDefault()},tabIndex:x||!W?-1:0,children:(D==null?void 0:D.children)??Ie(H).locale(L.getLocale(h)).format(f)})},U)});return g.jsx("tr",{...R("yearsListRow"),children:I},P)});return g.jsx(he,{component:"table",size:M,...R("yearsList"),"data-full-width":O||void 0,...q,children:g.jsx("tbody",{children:V})})});c0.classes=nq;c0.displayName="@mantine/dates/YearsList";function tq({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"month")||t&&Ie(e).isAfter(t,"month"))}function Ioe({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var c;return!tq({month:l,minDate:n,maxDate:t})&&!((c=i==null?void 0:i(l))!=null&&c.disabled)}),a=r.find(l=>{var c;return(c=i==null?void 0:i(l))==null?void 0:c.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"month"));return o||r[0]}function Boe(e){const n=Ie(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(Ie(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var iq={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Foe={monthsListFormat:"MMM",withCellSpacing:!0},f0=De(e=>{const n=be("MonthsList",Foe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,year:f,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:j,fullWidth:O,size:M,attributes:N,...q}=n,R=Xe({name:c||"MonthsList",classes:iq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=Sl(),F=Boe(f),Y=Ioe({months:F,minDate:Ji(p),maxDate:Ji(v),getMonthControlProps:b}),V=F.map(($,P)=>{const I=$.map((H,U)=>{const D=b==null?void 0:b(H),W=Ie(H).isSame(Y,"month");return g.jsx("td",{...R("monthsListCell"),"data-with-spacing":j||void 0,children:g.jsx(dp,{...R("monthsListControl"),size:M,unstyled:o,fullWidth:O,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:tq({month:H,minDate:Ji(p),maxDate:Ji(v)}),ref:G=>{G&&(w==null||w(P,U,G))},...D,onKeyDown:G=>{var z;(z=D==null?void 0:D.onKeyDown)==null||z.call(D,G),k==null||k(G,{rowIndex:P,cellIndex:U,date:H})},onClick:G=>{var z;(z=D==null?void 0:D.onClick)==null||z.call(D,G),_==null||_(G,H)},onMouseEnter:G=>{var z;(z=D==null?void 0:D.onMouseEnter)==null||z.call(D,G),C==null||C(G,H)},onMouseDown:G=>{var z;(z=D==null?void 0:D.onMouseDown)==null||z.call(D,G),x&&G.preventDefault()},tabIndex:x||!W?-1:0,children:(D==null?void 0:D.children)??Ie(H).locale(L.getLocale(d)).format(h)})},U)});return g.jsx("tr",{...R("monthsListRow"),children:I},P)});return g.jsx(he,{component:"table",size:M,...R("monthsList"),"data-full-width":O||void 0,...q,children:g.jsx("tbody",{children:V})})});f0.classes=iq;f0.displayName="@mantine/dates/MonthsList";var rq={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const qoe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},aq=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Bn(n,"dch-control-size"),"--dch-fz":ri(n)}}),ws=De(e=>{const n=be("CalendarHeader",qoe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:c,previousIcon:f,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:C,levelControlAriaLabel:x,withNext:E,withPrevious:j,headerControlsOrder:O,fullWidth:M,__staticSelector:N,__preventFocus:q,__stopPropagation:R,attributes:L,...F}=n,Y=Xe({name:N||"CalendarHeader",classes:rq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:aq,rootSelector:"calendarHeader"}),V=q?U=>U.preventDefault():void 0,$=j&&A.createElement(Et,{...Y("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:V,disabled:_,"data-disabled":_||void 0,tabIndex:q||_?-1:0,"data-mantine-stop-propagation":R||void 0},f||g.jsx(Bg,{...Y("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=A.createElement(Et,{component:C?"button":"div",...Y("calendarHeaderLevel"),key:"level",onClick:C?b:void 0,unstyled:o,onMouseDown:C?V:void 0,disabled:!C,"data-static":!C||void 0,"aria-label":x,tabIndex:q||!C?-1:0,"data-mantine-stop-propagation":R||void 0},w),I=E&&A.createElement(Et,{...Y("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:V,disabled:k,"data-disabled":k||void 0,tabIndex:q||k?-1:0,"data-mantine-stop-propagation":R||void 0},c||g.jsx(Bg,{...Y("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),H=O.map(U=>U==="previous"?$:U==="level"?P:U==="next"?I:null);return g.jsx(he,{...Y("calendarHeader"),"data-full-width":M||void 0,...F,children:H})});ws.classes=rq;ws.varsResolver=aq;ws.displayName="@mantine/dates/CalendarHeader";function Hoe(e){const n=eq(e);return[n[0][0],n[3][0]]}const Uoe={decadeLabelFormat:"YYYY"},d0=De(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:x,previousDisabled:E,levelControlAriaLabel:j,withNext:O,withPrevious:M,headerControlsOrder:N,decadeLabelFormat:q,classNames:R,styles:L,unstyled:F,__staticSelector:Y,__stopPropagation:V,size:$,fullWidth:P,attributes:I,...H}=be("DecadeLevel",Uoe,e),U=Sl(),[D,W]=Hoe(n),G={__staticSelector:Y||"DecadeLevel",classNames:R,styles:L,unstyled:F,size:$,attributes:I},z=typeof x=="boolean"?x:r?!Ie(W).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!Ie(D).startOf("year").isAfter(i):!1,ee=(re,le)=>Ie(re).locale(t||U.locale).format(le);return g.jsxs(he,{"data-decade-level":!0,size:$,...H,children:[g.jsx(ws,{label:typeof q=="function"?q(D,W):`${ee(D,q)} – ${ee(W,q)}`,__preventFocus:p,__stopPropagation:V,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:z,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:j,withNext:O,withPrevious:M,headerControlsOrder:N,fullWidth:P,...G}),g.jsx(c0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:V,withCellSpacing:d,fullWidth:P,...G})]})});d0.classes={...c0.classes,...ws.classes};d0.displayName="@mantine/dates/DecadeLevel";const Voe={yearLabelFormat:"YYYY"},h0=De(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:E,previousDisabled:j,hasNextLevel:O,levelControlAriaLabel:M,withNext:N,withPrevious:q,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:F,__stopPropagation:Y,size:V,classNames:$,styles:P,unstyled:I,fullWidth:H,attributes:U,...D}=be("YearLevel",Voe,e),W=Sl(),G={__staticSelector:F||"YearLevel",classNames:$,styles:P,unstyled:I,size:V,attributes:U},z=typeof E=="boolean"?E:r?!Ie(n).endOf("year").isBefore(r):!1,X=typeof j=="boolean"?j:i?!Ie(n).startOf("year").isAfter(i):!1;return g.jsxs(he,{"data-year-level":!0,size:V,...D,children:[g.jsx(ws,{label:typeof L=="function"?L(n):Ie(n).locale(t||W.locale).format(L),__preventFocus:p,__stopPropagation:Y,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:z,previousDisabled:X,hasNextLevel:O,levelControlAriaLabel:M,withNext:N,withPrevious:q,headerControlsOrder:R,fullWidth:H,...G}),g.jsx(f0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:c,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:Y,withCellSpacing:d,fullWidth:H,...G})]})});h0.classes={...ws.classes,...f0.classes};h0.displayName="@mantine/dates/YearLevel";const Woe={monthLabelFormat:"MMMM YYYY"},m0=De(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,__preventFocus:j,__stopPropagation:O,nextIcon:M,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:F,onLevelClick:Y,nextDisabled:V,previousDisabled:$,hasNextLevel:P,levelControlAriaLabel:I,withNext:H,withPrevious:U,headerControlsOrder:D,monthLabelFormat:W,classNames:G,styles:z,unstyled:X,__staticSelector:ee,size:re,static:le,fullWidth:ye,attributes:ae,...ue}=be("MonthLevel",Woe,e),Se=Sl(),ne={__staticSelector:ee||"MonthLevel",classNames:G,styles:z,unstyled:X,size:re,attributes:ae},Le=typeof V=="boolean"?V:f?!Ie(n).endOf("month").isBefore(f):!1,ke=typeof $=="boolean"?$:c?!Ie(n).startOf("month").isAfter(c):!1;return g.jsxs(he,{"data-month-level":!0,size:re,...ue,children:[g.jsx(ws,{label:typeof W=="function"?W(n):Ie(n).locale(t||Se.locale).format(W),__preventFocus:j,__stopPropagation:O,nextIcon:M,previousIcon:N,nextLabel:q,previousLabel:R,onNext:L,onPrevious:F,onLevelClick:Y,nextDisabled:Le,previousDisabled:ke,hasNextLevel:P,levelControlAriaLabel:I,withNext:H,withPrevious:U,headerControlsOrder:D,fullWidth:ye,...ne}),g.jsx(fp,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:j,__stopPropagation:O,static:le,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,fullWidth:ye,...ne})]})});m0.classes={...fp.classes,...ws.classes};m0.displayName="@mantine/dates/MonthLevel";var oq={levelsGroup:"m_30b26e33"};const Cl=De(e=>{const n=be("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:c,fullWidth:f,attributes:h,...d}=n;return g.jsx(he,{...Xe({name:c||"LevelsGroup",classes:oq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":f||void 0,...d})});Cl.classes=oq;Cl.displayName="@mantine/dates/LevelsGroup";const Goe={numberOfColumns:1},p0=De(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:c,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,headerControlsOrder:x,classNames:E,styles:j,unstyled:O,__staticSelector:M,__stopPropagation:N,numberOfColumns:q,levelControlAriaLabel:R,decadeLabelFormat:L,size:F,fullWidth:Y,vars:V,attributes:$,...P}=be("DecadeLevelGroup",Goe,e),I=A.useRef([]),H=Array(q).fill(0).map((U,D)=>{const W=Ie(n).add(D*10,"years").format("YYYY-MM-DD");return g.jsx(d0,{size:F,yearsListFormat:a,decade:W,withNext:D===q-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:c,__onControlKeyDown:(G,z)=>c9({levelIndex:D,rowIndex:z.rowIndex,cellIndex:z.cellIndex,event:G,controlsRef:I}),__getControlRef:(G,z,X)=>{Array.isArray(I.current[D])||(I.current[D]=[]),Array.isArray(I.current[D][G])||(I.current[D][G]=[]),I.current[D][G][z]=X},levelControlAriaLabel:typeof R=="function"?R(W):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:E,styles:j,unstyled:O,withCellSpacing:f,headerControlsOrder:x,fullWidth:Y,attributes:$},D)});return g.jsx(Cl,{classNames:E,styles:j,__staticSelector:M||"DecadeLevelGroup",size:F,unstyled:O,fullWidth:Y,attributes:$,...P,children:H})});p0.classes={...Cl.classes,...d0.classes};p0.displayName="@mantine/dates/DecadeLevelGroup";const Yoe={numberOfColumns:1},v0=De(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:c,withCellSpacing:f,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,headerControlsOrder:j,classNames:O,styles:M,unstyled:N,__staticSelector:q,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:F,yearLabelFormat:Y,size:V,fullWidth:$,vars:P,attributes:I,...H}=be("YearLevelGroup",Yoe,e),U=A.useRef([]),D=Array(L).fill(0).map((W,G)=>{const z=Ie(n).add(G,"years").format("YYYY-MM-DD");return g.jsx(h0,{size:V,monthsListFormat:a,year:z,withNext:G===L-1,withPrevious:G===0,yearLabelFormat:Y,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:c,__onControlKeyDown:(X,ee)=>c9({levelIndex:G,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:U}),__getControlRef:(X,ee,re)=>{Array.isArray(U.current[G])||(U.current[G]=[]),Array.isArray(U.current[G][X])||(U.current[G][X]=[]),U.current[G][X][ee]=re},levelControlAriaLabel:typeof F=="function"?F(z):F,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,getMonthControlProps:o,classNames:O,styles:M,unstyled:N,__staticSelector:q||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:j,fullWidth:$,attributes:I},G)});return g.jsx(Cl,{classNames:O,styles:M,__staticSelector:q||"YearLevelGroup",size:V,unstyled:N,fullWidth:$,attributes:I,...H,children:D})});v0.classes={...h0.classes,...Cl.classes};v0.displayName="@mantine/dates/YearLevelGroup";const Koe={numberOfColumns:1},g0=De(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,__preventFocus:x,nextIcon:E,previousIcon:j,nextLabel:O,previousLabel:M,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:F,hasNextLevel:Y,headerControlsOrder:V,classNames:$,styles:P,unstyled:I,numberOfColumns:H,levelControlAriaLabel:U,monthLabelFormat:D,__staticSelector:W,__stopPropagation:G,size:z,static:X,fullWidth:ee,vars:re,attributes:le,...ye}=be("MonthLevelGroup",Koe,e),ae=A.useRef([]),ue=Array(H).fill(0).map((Se,ne)=>{const Le=Ie(n).add(ne,"months").format("YYYY-MM-DD");return g.jsx(m0,{month:Le,withNext:ne===H-1,withPrevious:ne===0,monthLabelFormat:D,__stopPropagation:G,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(ke,je)=>c9({levelIndex:ne,rowIndex:je.rowIndex,cellIndex:je.cellIndex,event:ke,controlsRef:ae}),__getDayRef:(ke,je,Ne)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][ke])||(ae.current[ne][ke]=[]),ae.current[ne][ke][je]=Ne},levelControlAriaLabel:typeof U=="function"?U(Le):U,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:c,maxDate:f,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:x,nextIcon:E,previousIcon:j,nextLabel:O,previousLabel:M,onNext:N,onPrevious:q,onLevelClick:R,nextDisabled:L,previousDisabled:F,hasNextLevel:Y,classNames:$,styles:P,unstyled:I,__staticSelector:W||"MonthLevelGroup",size:z,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,headerControlsOrder:V,fullWidth:ee,attributes:le},ne)});return g.jsx(Cl,{classNames:$,styles:P,__staticSelector:W||"MonthLevelGroup",size:z,fullWidth:ee,attributes:le,...ye,children:ue})});g0.classes={...Cl.classes,...m0.classes};g0.displayName="@mantine/dates/MonthLevelGroup";var sq={input:"m_6fa5e2aa"};const Zf=De(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:c,dropdownType:f,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:C,rightSection:x,shouldClear:E,readOnly:j,disabled:O,value:M,name:N,form:q,type:R,onDropdownClose:L,withTime:F,...Y}=cI("PickerInputBase",{size:"sm"},e),V=g.jsx(Gt.ClearButton,{onClick:_,unstyled:o,...C}),$=()=>{R==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return g.jsxs(g.Fragment,{children:[f==="modal"&&!j&&g.jsx(hr,{opened:v,onClose:$,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...c,children:h}),g.jsx(Gt.Wrapper,{...t,children:g.jsxs(On,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||f==="modal"||j,onChange:P=>{var I;P||((I=l==null?void 0:l.onClose)==null||I.call(l),$())},children:[g.jsx(On.Target,{children:g.jsx(Gt,{"data-dates-input":!0,"data-read-only":j||void 0,disabled:O,component:"button",type:"button",multiline:!0,onClick:P=>{b==null||b(P),p.toggle()},__clearSection:V,__clearable:w&&E&&!j&&!O,__clearSectionMode:k,rightSection:x,...n,classNames:{...r,input:pn(sq.input,r==null?void 0:r.input)},...Y,children:d||g.jsx(Gt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),g.jsx(On.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),g.jsx(qF,{value:M,name:N,form:q,type:R,withTime:F})]})});Zf.classes=sq;Zf.displayName="@mantine/dates/PickerInputBase";const dM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,hM=(e,n)=>{const t=n?FF:Ji;return Array.isArray(e)?e.map(t):t(e)};function d9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,c]=Ci({value:hM(n,r),defaultValue:hM(t,r),finalValue:dM(e),onChange:i});let f=o;return a.current!==e&&(a.current=e,n===void 0&&(f=t!==void 0?t:dM(e),l(f))),[f,l,c]}function Wk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Xoe(e){return e===0?"month":e===1?"year":"decade"}function sh(e,n,t){return Xoe(ns(Wk(e,0),Wk(n,0),Wk(t,2)))}const Zoe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Qf=De(e=>{const n=be("Calendar",Zoe,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,headerControlsOrder:E,__updateDateOnYearSelect:j,__updateDateOnMonthSelect:O,__setDateRef:M,__setLevelRef:N,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:F,excludeDate:Y,renderDay:V,hideOutsideDates:$,hideWeekdays:P,getDayAriaLabel:I,monthLabelFormat:H,nextIcon:U,previousIcon:D,__onDayClick:W,__onDayMouseEnter:G,withCellSpacing:z,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:le,yearLabelFormat:ye,yearsListFormat:ae,getYearControlProps:ue,decadeLabelFormat:Se,classNames:ne,styles:Le,unstyled:ke,minDate:je,maxDate:Ne,locale:ge,__staticSelector:Ce,size:Pe,__preventFocus:ce,__stopPropagation:qe,onNextDecade:Ye,onPreviousDecade:We,onNextYear:Ze,onPreviousYear:Qe,onNextMonth:ie,onPreviousMonth:ve,static:Ke,enableKeyboardNavigation:Je,fullWidth:Ae,attributes:an,ref:mn,...En}=n,{resolvedClassNames:vn,resolvedStyles:sn}=Wi({classNames:ne,styles:Le,props:n}),[en,zn]=Ci({value:o?sh(o,r,i):void 0,defaultValue:a?sh(a,r,i):void 0,finalValue:sh(void 0,r,i),onChange:l}),[Re,He]=d9({type:"default",value:Ji(c),defaultValue:Ji(f),onChange:h});A.useImperativeHandle(M,()=>rn=>{He(rn)}),A.useImperativeHandle(N,()=>rn=>{zn(rn)});const Dn={__staticSelector:Ce||"Calendar",styles:sn,classNames:vn,unstyled:ke,size:Pe,attributes:an},kn=p||d||1,bn=A.useRef(null);if(bn.current===null){const rn=new Date;bn.current=je&&Ie(rn).isAfter(je)?je:Ie(rn).format("YYYY-MM-DD")}const _n=Re||bn.current,ft=()=>{const rn=Ie(_n).add(kn,"month").format("YYYY-MM-DD");ie==null||ie(rn),He(rn)},Tt=()=>{const rn=Ie(_n).subtract(kn,"month").format("YYYY-MM-DD");ve==null||ve(rn),He(rn)},Be=()=>{const rn=Ie(_n).add(kn,"year").format("YYYY-MM-DD");Ze==null||Ze(rn),He(rn)},Ue=()=>{const rn=Ie(_n).subtract(kn,"year").format("YYYY-MM-DD");Qe==null||Qe(rn),He(rn)},Ln=()=>{const rn=Ie(_n).add(10*kn,"year").format("YYYY-MM-DD");Ye==null||Ye(rn),He(rn)},ut=()=>{const rn=Ie(_n).subtract(10*kn,"year").format("YYYY-MM-DD");We==null||We(rn),He(rn)},Pn=A.useRef(null);return A.useEffect(()=>{if(!Je||Ke)return;const rn=tn=>{var Gn;if(!((Gn=Pn.current)!=null&&Gn.contains(document.activeElement)))return;const on=tn.ctrlKey||tn.metaKey,In=tn.shiftKey;switch(tn.key){case"ArrowUp":on&&In?(tn.preventDefault(),ut()):on&&(tn.preventDefault(),Ue());break;case"ArrowDown":on&&In?(tn.preventDefault(),Ln()):on&&(tn.preventDefault(),Be());break;case"y":case"Y":en==="month"&&(tn.preventDefault(),zn("year"));break}};return document.addEventListener("keydown",rn),()=>{document.removeEventListener("keydown",rn)}},[Je,Ke,en,Be,Ue,Ln,ut]),g.jsxs(he,{ref:Kt(Pn,mn),size:Pe,"data-calendar":!0,"data-full-width":Ae||void 0,...En,children:[en==="month"&&g.jsx(g0,{month:_n,minDate:je,maxDate:Ne,firstDayOfWeek:q,weekdayFormat:R,weekendDays:L,getDayProps:F,excludeDate:Y,renderDay:V,hideOutsideDates:$,hideWeekdays:P,getDayAriaLabel:I,onNext:ft,onPrevious:Tt,hasNextLevel:i!=="month",onLevelClick:()=>zn("year"),numberOfColumns:d,locale:ge,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??b,nextIcon:U,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:D,monthLabelFormat:H,__onDayClick:W,__onDayMouseEnter:G,__preventFocus:ce,__stopPropagation:qe,static:Ke,withCellSpacing:z,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:Ae,...Dn}),en==="year"&&g.jsx(v0,{year:_n,numberOfColumns:d,minDate:je,maxDate:Ne,monthsListFormat:re,getMonthControlProps:le,locale:ge,onNext:Be,onPrevious:Ue,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>zn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??b,nextIcon:U,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:D,yearLabelFormat:ye,__onControlMouseEnter:x,__onControlClick:(rn,tn)=>{O&&He(tn),zn(sh("month",r,i)),_==null||_(tn)},__preventFocus:ce,__stopPropagation:qe,withCellSpacing:z,headerControlsOrder:E,fullWidth:Ae,...Dn}),en==="decade"&&g.jsx(p0,{decade:_n,minDate:je,maxDate:Ne,yearsListFormat:ae,getYearControlProps:ue,locale:ge,onNext:Ln,onPrevious:ut,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??b,nextIcon:U,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:D,decadeLabelFormat:Se,__onControlMouseEnter:C,__onControlClick:(rn,tn)=>{j&&He(tn),zn(sh("year",r,i)),k==null||k(tn)},__preventFocus:ce,__stopPropagation:qe,withCellSpacing:z,headerControlsOrder:E,fullWidth:Ae,...Dn})]})});Qf.classes={...p0.classes,...v0.classes,...g0.classes};Qf.displayName="@mantine/dates/Calendar";function y0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:j,onNextYear:O,onPreviousYear:M,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:F,__updateDateOnMonthSelect:Y,__setDateRef:V,__setLevelRef:$,withWeekNumbers:P,headerControlsOrder:I,firstDayOfWeek:H,weekdayFormat:U,weekendDays:D,getDayProps:W,excludeDate:G,renderDay:z,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:Se,getYearControlProps:ne,decadeLabelFormat:Le,allowSingleDateInRange:ke,allowDeselect:je,minDate:Ne,maxDate:ge,locale:Ce,...Pe}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:c,defaultDate:f,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:j,onNextYear:O,onPreviousYear:M,onNextDecade:N,onPreviousDecade:q,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:F,__updateDateOnMonthSelect:Y,__setDateRef:V,withWeekNumbers:P,headerControlsOrder:I,firstDayOfWeek:H,weekdayFormat:U,weekendDays:D,getDayProps:W,excludeDate:G,renderDay:z,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:le,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:ue,yearsListFormat:Se,getYearControlProps:ne,decadeLabelFormat:Le,allowSingleDateInRange:ke,allowDeselect:je,minDate:Ne,maxDate:ge,locale:Ce},others:Pe}}function mM(e,n){const t=[...n].sort((i,r)=>Ie(i).isAfter(Ie(r))?1:-1);return Ie(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Ie(t[1]).endOf("day").add(1,"ms").isAfter(e)}function lq({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[c,f]=d9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[p,v]=A.useState(null),b=j=>{if(e==="range"){if(h&&!c[1]){if(Ie(j).isSame(h,n)&&!a){d(null),v(null),f([null,null]);return}const O=[j,h];O.sort((M,N)=>Ie(M).isAfter(Ie(N))?1:-1),f(O),v(null),d(null);return}if(c[0]&&!c[1]&&Ie(j).isSame(c[0],n)&&!a){d(null),v(null),f([null,null]);return}f([j,null]),v(null),d(j);return}if(e==="multiple"){c.some(O=>Ie(O).isSame(j,n))?f(c.filter(O=>!Ie(O).isSame(j,n))):f([...c,j]);return}c&&o&&Ie(j).isSame(c,n)?f(null):f(j)},w=j=>h&&p?mM(j,[p,h]):c[0]&&c[1]?mM(j,c):!1,k=e==="range"?j=>{l==null||l(j),v(null)}:l,_=j=>c[0]&&Ie(j).isSame(c[0],n)?!(p&&Ie(p).isBefore(c[0])):!1,C=j=>c[1]?Ie(j).isSame(c[1],n):!c[0]||!p?!1:Ie(p).isBefore(c[0])&&Ie(j).isSame(c[0],n),x=j=>{if(e==="range")return{selected:c.some(M=>M&&Ie(M).isSame(j,n)),inRange:w(j),firstInRange:_(j),lastInRange:C(j),"data-autofocus":!!c[0]&&Ie(c[0]).isSame(j,n)||void 0};if(e==="multiple")return{selected:c.some(M=>M&&Ie(M).isSame(j,n)),"data-autofocus":!!c[0]&&Ie(c[0]).isSame(j,n)||void 0};const O=Ie(c).isSame(j,n);return{selected:O,"data-autofocus":O||void 0}},E=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(c[0]&&!c[1])d(c[0]);else{const j=c[0]==null&&c[1]==null,O=c[0]!=null&&c[1]!=null;(j||O)&&(d(null),v(null))}},[c]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:E,getControlProps:x,_value:c,setValue:f}}var uq={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const cq=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ri(n)}}),Qoe={type:"default"},hp=De(e=>{const n=be("MonthPicker",Qoe,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:c,__staticSelector:f,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:C,className:x,style:E,unstyled:j,size:O,attributes:M,onLevelChange:N,...q}=n,{calendarProps:R,others:L}=y0(q),F=A.useRef(null),Y=A.useRef(null),V=Xe({name:f||"MonthPicker",classes:uq,props:n,className:x,style:E,classNames:t,styles:i,unstyled:j,attributes:M,rootSelector:C?"monthPickerRoot":void 0,varsResolver:cq,vars:r}),{onDateChange:$,onRootMouseLeave:P,onHoveredDateChange:I,getControlProps:H,setValue:U}=lq({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:c,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:W}=Wi({classNames:t,styles:i,props:n}),G=g.jsx(Qf,{classNames:D,styles:W,size:O,...R,...C?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:f||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(ee,re)=>I(re),onMonthSelect:ee=>{$(ee),b==null||b(ee)},getMonthControlProps:ee=>({...H(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:F,__setLevelRef:Y,__stopPropagation:_,attributes:M,...C?{}:{className:x,style:E}});if(!C)return G;const z=ee=>{var le,ye;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((le=F.current)==null||le.call(F,re),(ye=Y.current)==null||ye.call(Y,"year"),k?k(re):U(ee))},X=C.map((ee,re)=>g.jsx(Et,{...V("presetButton"),onClick:()=>z(ee.value),onMouseDown:le=>le.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return g.jsxs(he,{...V("monthPickerRoot"),size:O,...L,children:[g.jsx("div",{...V("presetsList"),children:X}),G]})});hp.classes={...Qf.classes,...uq};hp.varsResolver=cq;hp.displayName="@mantine/dates/MonthPicker";var Joe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const fq=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ri(n)}}),ese={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},mp=De(e=>{const n=be("DatePicker",ese,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:c,styles:f,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:b,presets:w,className:k,style:_,unstyled:C,size:x,vars:E,attributes:j,...O}=n,{calendarProps:M,others:N}=y0(O),q=A.useRef(null),R=A.useRef(null),L=Xe({name:h||"DatePicker",classes:Joe,props:n,className:k,style:_,classNames:c,styles:f,unstyled:C,attributes:j,rootSelector:w?"datePickerRoot":void 0,varsResolver:fq,vars:E}),{onDateChange:F,onRootMouseLeave:Y,onHoveredDateChange:V,getControlProps:$,_value:P,setValue:I}=lq({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:H,resolvedStyles:U}=Wi({classNames:c,styles:f,props:n}),D=g.jsx(Qf,{classNames:H,styles:U,__staticSelector:h||"DatePicker",onMouseLeave:Y,size:x,...M,...w?{}:N,__stopPropagation:b,__setDateRef:q,__setLevelRef:R,minLevel:M.minLevel||"month",__onDayMouseEnter:(z,X)=>{V(X),p==null||p(z,X)},__onDayClick:(z,X)=>{F(X),d==null||d(z,X)},getDayProps:z=>{var X;return{...$(z),...(X=M.getDayProps)==null?void 0:X.call(M,z)}},getMonthControlProps:z=>{var X;return{selected:typeof P=="string"?f9(z,P):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,z)}},getYearControlProps:z=>{var X;return{selected:typeof P=="string"?Ie(z).isSame(P,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,z)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:j,...w?{}:{className:k,style:_}});if(!w)return D;const W=z=>{var ee,re;const X=Array.isArray(z)?z[0]:z;X!==void 0&&((ee=q.current)==null||ee.call(q,X),(re=R.current)==null||re.call(R,"month"),v?v(X):I(z))},G=w.map((z,X)=>g.jsx(Et,{...L("presetButton"),onClick:()=>W(z.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:z.label},X));return g.jsxs(he,{...L("datePickerRoot"),size:x,...N,children:[g.jsx("div",{...L("presetsList"),children:G}),D]})});mp.classes=Qf.classes;mp.varsResolver=fq;mp.displayName="@mantine/dates/DatePicker";function dq({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:c,valueFormatter:f}){const h=Sl(),[d,p]=Az(!1),[v,b]=d9({type:e,value:n,defaultValue:t,onChange:i}),w=boe({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(c),formatter:f}),k=C=>{o&&(e==="default"&&p.close(),e==="range"&&C[0]&&C[1]&&p.close()),b(l&&e==="multiple"?[...C].sort((x,E)=>Ie(x).isAfter(Ie(E))?1:-1):C)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const nse={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},h9=De(e=>{const n=be("MonthPickerInput",nse,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:c,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,valueFormatter:E,presets:j,attributes:O,...M}=n,{resolvedClassNames:N,resolvedStyles:q}=Wi({classNames:f,styles:h,props:n}),{calendarProps:R,others:L}=y0(M),{_value:F,setValue:Y,formattedValue:V,dropdownHandlers:$,dropdownOpened:P,onClear:I,shouldClear:H}=dq({type:t,value:i,defaultValue:r,onChange:a,locale:c,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:E});return g.jsx(Zf,{formattedValue:V,dropdownOpened:P,dropdownHandlers:$,classNames:N,styles:q,unstyled:d,onClear:I,shouldClear:H,value:F,size:v,variant:b,dropdownType:w,...L,attributes:O,type:t,__staticSelector:"MonthPickerInput",children:g.jsx(hp,{...R,size:v,variant:b,type:t,value:F,defaultDate:R.defaultDate||(Array.isArray(F)?F[0]||HS({maxDate:C,minDate:_}):F||HS({maxDate:C,minDate:_})),onChange:Y,locale:c,classNames:N,styles:q,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:j,attributes:O})})});h9.classes={...Zf.classes,...hp.classes};h9.displayName="@mantine/dates/MonthPickerInput";const tse={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},_u=De(e=>{const n=be("DatePickerInput",tse,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:c,classNames:f,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,defaultDate:E,valueFormatter:j,presets:O,attributes:M,...N}=n,{resolvedClassNames:q,resolvedStyles:R}=Wi({classNames:f,styles:h,props:n}),{calendarProps:L,others:F}=y0(N),{_value:Y,setValue:V,formattedValue:$,dropdownHandlers:P,dropdownOpened:I,onClear:H,shouldClear:U}=dq({type:t,value:i,defaultValue:r,onChange:a,locale:c,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:j}),D=Array.isArray(Y)?Y[0]||E:Y||E;return g.jsx(Zf,{formattedValue:$,dropdownOpened:I,dropdownHandlers:P,classNames:q,styles:R,unstyled:d,onClear:H,shouldClear:U,value:Y,size:v,variant:b,dropdownType:w,...F,type:t,__staticSelector:"DatePickerInput",attributes:M,children:g.jsx(mp,{...L,size:v,variant:b,type:t,value:Y,defaultDate:D||HS({maxDate:C,minDate:_}),onChange:V,locale:c,classNames:q,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:O,attributes:M})})});_u.classes={...Zf.classes,...mp.classes};_u.displayName="@mantine/dates/DatePickerInput";/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Hoe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** + */var ise={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const mn=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:c,className:f,children:h,...d},p)=>A.createElement("svg",{ref:p,...Hoe[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,f].join(" "),strokeWidth:l,stroke:a,...d},[c&&A.createElement("title",{key:"svg-title"},c),...i.map(([v,b])=>A.createElement(v,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** + */const hn=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:c,className:f,children:h,...d},p)=>A.createElement("svg",{ref:p,...ise[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,f].join(" "),strokeWidth:l,stroke:a,...d},[c&&A.createElement("title",{key:"svg-title"},c),...i.map(([v,b])=>A.createElement(v,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Uoe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],qS=mn("outline","alert-triangle","AlertTriangle",Uoe);/** + */const rse=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],US=hn("outline","alert-triangle","AlertTriangle",rse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Voe=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Woe=mn("outline","archive-off","ArchiveOff",Voe);/** + */const ase=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],ose=hn("outline","archive-off","ArchiveOff",ase);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Goe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],rq=mn("outline","archive","Archive",Goe);/** + */const sse=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],hq=hn("outline","archive","Archive",sse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Yoe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Wg=mn("outline","arrow-back-up","ArrowBackUp",Yoe);/** + */const lse=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Kg=hn("outline","arrow-back-up","ArrowBackUp",lse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Koe=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],Xoe=mn("outline","arrows-horizontal","ArrowsHorizontal",Koe);/** + */const use=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],cse=hn("outline","arrows-horizontal","ArrowsHorizontal",use);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Zoe=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],Qoe=mn("outline","at","At",Zoe);/** + */const fse=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],dse=hn("outline","at","At",fse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Joe=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],ese=mn("outline","bell","Bell",Joe);/** + */const hse=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],mse=hn("outline","bell","Bell",hse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const nse=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],aq=mn("outline","calendar-due","CalendarDue",nse);/** + */const pse=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],mq=hn("outline","calendar-due","CalendarDue",pse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const tse=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],ise=mn("outline","calendar-off","CalendarOff",tse);/** + */const vse=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],gse=hn("outline","calendar-off","CalendarOff",vse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const rse=[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M14 18a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]],ase=mn("outline","calendar-stats","CalendarStats",rse);/** + */const yse=[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M14 18a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]],bse=hn("outline","calendar-stats","CalendarStats",yse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ose=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],sse=mn("outline","calendar","Calendar",ose);/** + */const wse=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],kse=hn("outline","calendar","Calendar",wse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const lse=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],use=mn("outline","chart-bar","ChartBar",lse);/** + */const _se=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],xse=hn("outline","chart-bar","ChartBar",_se);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const cse=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],_u=mn("outline","check","Check",cse);/** + */const Sse=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],xu=hn("outline","check","Check",Sse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const fse=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],im=mn("outline","checkbox","Checkbox",fse);/** + */const Cse=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],om=hn("outline","checkbox","Checkbox",Cse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const dse=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],HS=mn("outline","chevron-down","ChevronDown",dse);/** + */const Ase=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],VS=hn("outline","chevron-down","ChevronDown",Ase);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const hse=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],US=mn("outline","chevron-right","ChevronRight",hse);/** + */const jse=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],WS=hn("outline","chevron-right","ChevronRight",jse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const mse=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],uM=mn("outline","clipboard-list","ClipboardList",mse);/** + */const Ose=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],pM=hn("outline","clipboard-list","ClipboardList",Ose);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const pse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],vse=mn("outline","clock-hour-4","ClockHour4",pse);/** + */const Ese=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],Tse=hn("outline","clock-hour-4","ClockHour4",Ese);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const gse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Gg=mn("outline","clock","Clock",gse);/** + */const Mse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Xg=hn("outline","clock","Clock",Mse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const yse=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],bse=mn("outline","columns-3","Columns3",yse);/** + */const Dse=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],Rse=hn("outline","columns-3","Columns3",Dse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const wse=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],kse=mn("outline","copy","Copy",wse);/** + */const Pse=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Nse=hn("outline","copy","Copy",Pse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const _se=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M8 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-1"}],["path",{d:"M15 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-2"}],["path",{d:"M15 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-3"}],["path",{d:"M8 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-4"}],["path",{d:"M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-5"}]],xse=mn("outline","dice-5","Dice5",_se);/** + */const $se=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M8 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-1"}],["path",{d:"M15 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-2"}],["path",{d:"M15 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-3"}],["path",{d:"M8 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-4"}],["path",{d:"M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-5"}]],zse=hn("outline","dice-5","Dice5",$se);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Sse=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],oq=mn("outline","dots-vertical","DotsVertical",Sse);/** + */const Lse=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],pq=hn("outline","dots-vertical","DotsVertical",Lse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Cse=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],Ase=mn("outline","download","Download",Cse);/** + */const Ise=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],Bse=hn("outline","download","Download",Ise);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Ose=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],Sh=mn("outline","edit","Edit",Ose);/** + */const Fse=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],jh=hn("outline","edit","Edit",Fse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const jse=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],Ese=mn("outline","external-link","ExternalLink",jse);/** + */const qse=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],Hse=hn("outline","external-link","ExternalLink",qse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Tse=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],sq=mn("outline","grip-vertical","GripVertical",Tse);/** + */const Use=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],vq=hn("outline","grip-vertical","GripVertical",Use);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Mse=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],Dse=mn("outline","history","History",Mse);/** + */const Vse=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],Wse=hn("outline","history","History",Vse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Rse=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],Yg=mn("outline","hourglass","Hourglass",Rse);/** + */const Gse=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],Zg=hn("outline","hourglass","Hourglass",Gse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Pse=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],VS=mn("outline","layout-kanban","LayoutKanban",Pse);/** + */const Yse=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],GS=hn("outline","layout-kanban","LayoutKanban",Yse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Nse=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],$se=mn("outline","link","Link",Nse);/** + */const Kse=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],Xse=hn("outline","link","Link",Kse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const zse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],lq=mn("outline","lock-open","LockOpen",zse);/** + */const Zse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],gq=hn("outline","lock-open","LockOpen",Zse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Lse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],el=mn("outline","lock","Lock",Lse);/** + */const Qse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],al=hn("outline","lock","Lock",Qse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Ise=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],Bse=mn("outline","logout","Logout",Ise);/** + */const Jse=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],ele=hn("outline","logout","Logout",Jse);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Fse=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],qse=mn("outline","menu-2","Menu2",Fse);/** + */const nle=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],tle=hn("outline","menu-2","Menu2",nle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Hse=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],uq=mn("outline","message-chatbot","MessageChatbot",Hse);/** + */const ile=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],yq=hn("outline","message-chatbot","MessageChatbot",ile);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Use=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]],cq=mn("outline","message","Message",Use);/** + */const rle=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]],bq=hn("outline","message","Message",rle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Vse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],Wse=mn("outline","mood-smile","MoodSmile",Vse);/** + */const ale=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],ole=hn("outline","mood-smile","MoodSmile",ale);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Gse=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],d9=mn("outline","palette","Palette",Gse);/** + */const sle=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],m9=hn("outline","palette","Palette",sle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Yse=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],Kse=mn("outline","paperclip","Paperclip",Yse);/** + */const lle=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],ule=hn("outline","paperclip","Paperclip",lle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Xse=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Zse=mn("outline","pencil","Pencil",Xse);/** + */const cle=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],fle=hn("outline","pencil","Pencil",cle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Qse=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],rf=mn("outline","plus","Plus",Qse);/** + */const dle=[["path",{d:"M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5",key:"svg-0"}],["path",{d:"M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5",key:"svg-1"}],["path",{d:"M3 21l2.5 -2.5",key:"svg-2"}],["path",{d:"M18.5 5.5l2.5 -2.5",key:"svg-3"}],["path",{d:"M10 11l-2 2",key:"svg-4"}],["path",{d:"M13 14l-2 2",key:"svg-5"}]],hle=hn("outline","plug-connected","PlugConnected",dle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Jse=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],WS=mn("outline","refresh","Refresh",Jse);/** + */const mle=[["path",{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054",key:"svg-0"}],["path",{d:"M4 20l3.5 -3.5",key:"svg-1"}],["path",{d:"M15 4l-3.5 3.5",key:"svg-2"}],["path",{d:"M20 9l-3.5 3.5",key:"svg-3"}]],wq=hn("outline","plug","Plug",mle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ele=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],nle=mn("outline","search","Search",ele);/** + */const ple=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],of=hn("outline","plus","Plus",ple);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const tle=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],fq=mn("outline","send","Send",tle);/** + */const vle=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],sm=hn("outline","refresh","Refresh",vle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ile=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],rle=mn("outline","settings","Settings",ile);/** + */const gle=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],yle=hn("outline","search","Search",gle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ale=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],ole=mn("outline","sparkles","Sparkles",ale);/** + */const ble=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],kq=hn("outline","send","Send",ble);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const sle=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],lle=mn("outline","tag","Tag",sle);/** + */const wle=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],kle=hn("outline","settings","Settings",wle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ule=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],cle=mn("outline","trash-x","TrashX",ule);/** + */const _le=[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],xle=hn("outline","sparkles","Sparkles",_le);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const fle=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],xu=mn("outline","trash","Trash",fle);/** + */const Sle=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],Cle=hn("outline","tag","Tag",Sle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const dle=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],GS=mn("outline","trending-up","TrendingUp",dle);/** + */const Ale=[["path",{d:"M20 8.04l-12.122 12.124a2.857 2.857 0 1 1 -4.041 -4.04l12.122 -12.124",key:"svg-0"}],["path",{d:"M7 13h8",key:"svg-1"}],["path",{d:"M19 15l1.5 1.6a2 2 0 1 1 -3 0l1.5 -1.6",key:"svg-2"}],["path",{d:"M15 3l6 6",key:"svg-3"}]],jle=hn("outline","test-pipe","TestPipe",Ale);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const hle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],mle=mn("outline","user-check","UserCheck",hle);/** + */const Ole=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],Ele=hn("outline","trash-x","TrashX",Ole);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ple=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],vle=mn("outline","user-circle","UserCircle",ple);/** + */const Tle=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],gl=hn("outline","trash","Trash",Tle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const gle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.348 0 .686 .045 1.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],yle=mn("outline","user-minus","UserMinus",gle);/** + */const Mle=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],YS=hn("outline","trending-up","TrendingUp",Mle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const ble=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],wle=mn("outline","user-plus","UserPlus",ble);/** + */const Dle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-1"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-2"}]],Rle=hn("outline","user-check","UserCheck",Dle);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const kle=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],_le=mn("outline","user-square","UserSquare",kle);/** + */const Ple=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],Nle=hn("outline","user-circle","UserCircle",Ple);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const xle=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],Sle=mn("outline","user","User",xle);/** + */const $le=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4c.348 0 .686 .045 1.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],zle=hn("outline","user-minus","UserMinus",$le);/** * @license @tabler/icons-react v3.42.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const Cle=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Ch=mn("outline","x","X",Cle);function dq({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,c]=A.useState((e==null?void 0:e.requester)??""),[f,h]=A.useState((e==null?void 0:e.title)??""),[d,p]=A.useState((e==null?void 0:e.description)??""),[v,b]=A.useState((e==null?void 0:e.assignee_id)??null),[w,k]=A.useState((e==null?void 0:e.tags)??[]),_=async x=>{x==null||x.preventDefault();const E=f.trim();E&&await a({requester:l.trim(),title:E,description:d,assignee_id:v,tags:w})},C=x=>{x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),_())};return y.jsx("form",{onSubmit:_,children:y.jsxs(Hn,{gap:"sm",children:[y.jsx(bu,{label:"Tarea",value:f,onChange:x=>h(x.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),_())}}),y.jsx(jy,{label:"Solicitante",value:l,onChange:c,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:x=>{x.key==="Enter"&&x.preventDefault()}}),y.jsx(bu,{label:"Descripcion",value:d,onChange:x=>p(x.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),y.jsx(ya,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:x=>b(x),data:t.map(x=>({value:x.id,label:x.display_name||x.username})),clearable:!0,searchable:!0,tabIndex:4}),y.jsx(GC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),y.jsxs(He,{justify:"flex-end",gap:"xs",mt:"xs",children:[y.jsx(gt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),y.jsx(gt,{tabIndex:6,type:"submit",disabled:!f.trim(),children:n})]})]})})}function Ale(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const h9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function m9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function hq(e){return e?m9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:h9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function p9(e){return e?m9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:h9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function Ole(e){return e?m9(e)?e:h9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const mq=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],jle=mq,Ele=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function hl(e){return Ale(e,Ele)}const YS=6e4,Ah=60*YS,Bc=24*Ah,Uv=7*Bc,Vk=30*Bc;function Zt(e){if(!Number.isFinite(e)||e<0)return"0m";if(e=0&&n-t<=64;t--){const i=e[t];if(i==="@"){if(t===0||/\s/.test(e[t-1])){const r=e.slice(t+1,n);if(/^[a-z0-9_.-]*$/i.test(r))return{start:t,query:r.toLowerCase()}}return null}if(/\s/.test(i))return null}return null}const Rle=/(^|\s)(@[a-z0-9][a-z0-9_.-]{0,63})/gi;function Ple(e,n){const t=[];let i=0,r=0;for(const a of e.matchAll(Rle)){const o=a[2].slice(1).toLowerCase(),l=(a.index??0)+a[1].length;l>i&&t.push(e.slice(i,l));const c=n.get(o);c?t.push(y.jsxs(ot,{size:"xs",variant:"light",color:c.color||hl(c.username),style:{verticalAlign:"middle"},children:["@",c.username]},`m${r++}`)):t.push(`@${o}`),i=l+a[2].length}return inew Map(n.map(D=>[D.id,D])),[n]),O=A.useMemo(()=>new Map(n.map(D=>[D.username.toLowerCase(),D])),[n]),j=A.useCallback(async()=>{try{const D=await Gie(e);a(D),i==null||i(D)}catch(D){Pn.show({color:"red",message:D.message})}finally{l(!1)}},[e,i]);A.useEffect(()=>{j()},[j]),A.useEffect(()=>{const D=new WebSocket(Qie(e));return _.current=D,D.onmessage=$=>{try{const B=JSON.parse($.data);B.type==="message.created"&&B.message?a(Y=>{if(Y.some(W=>W.id===B.message.id))return Y;const R=[...Y,B.message];return i==null||i(R),R}):B.type==="typing"&&B.user_id?v(Y=>({...Y,[B.user_id]:Date.now()})):B.type==="error"&&Pn.show({color:"red",message:B.error})}catch{}},D.onerror=()=>{},()=>{D.close(),_.current=null}},[e,i]),A.useEffect(()=>{const D=setInterval(()=>{const $=Date.now();v(B=>{const Y={};for(const[R,W]of Object.entries(B))$-WclearInterval(D)},[]),A.useEffect(()=>{k.current&&k.current.scrollTo({top:k.current.scrollHeight,behavior:"smooth"})},[r.length]);const M=()=>{const D=_.current;if(!D||D.readyState!==WebSocket.OPEN)return;const $=Date.now();$-x.currentw(null)}),q=A.useMemo(()=>b?n.filter(D=>D.username.toLowerCase().startsWith(b.query)).slice(0,8):[],[n,b]);A.useEffect(()=>{b&&q.length>0?(N.openDropdown(),N.selectFirstOption()):N.closeDropdown()},[b==null?void 0:b.query,q.length]);const P=D=>{if(!b)return;const $=c.slice(0,b.start),B=c.slice(b.start+1+b.query.length),Y=`@${D} `,R=$+Y+B;f(R),w(null),requestAnimationFrame(()=>{const W=C.current;if(!W)return;const V=($+Y).length;W.focus(),W.setSelectionRange(V,V)})},L=async()=>{const D=c.trim();if(!D||h)return;d(!0);const $=_.current;try{if($&&$.readyState===WebSocket.OPEN)$.send(JSON.stringify({type:"send",body:D})),f("");else{const B=await Yie(e,D);a(Y=>[...Y,B]),i==null||i([...r,B]),f("")}}catch(B){Pn.show({color:"red",message:B.message})}finally{d(!1)}},H=async D=>{try{await Kie(e,D);const $=r.filter(B=>B.id!==D);a($),i==null||i($)}catch($){Pn.show({color:"red",message:$.message})}},G=D=>{f(D.currentTarget.value),M();const $=D.currentTarget.selectionStart??D.currentTarget.value.length;w(Dle(D.currentTarget.value,$))},U=D=>{if(b&&q.length>0&&(D.key==="Enter"||D.key==="Tab")){D.preventDefault();const $=N.getSelectedOptionIndex(),B=q[Math.max(0,$)];B&&P(B.username);return}if(b&&D.key==="Escape"){w(null);return}D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),L())},z=Object.keys(p).filter(D=>D!==t).map(D=>{const $=E.get(D);return($==null?void 0:$.display_name)||($==null?void 0:$.username)||"alguien"});return y.jsxs(Hn,{gap:"xs",style:{height:"100%",minHeight:0},children:[y.jsx(Wr,{viewportRef:k,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:o?y.jsx(He,{justify:"center",p:"md",children:y.jsx(bi,{size:"sm"})}):r.length===0?y.jsx(Ce,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):y.jsx(Hn,{gap:6,p:4,children:r.map(D=>{const $=D.author_id?E.get(D.author_id):null,B=D.author_id&&D.author_id===t,Y=$?$.display_name||$.username:"Anonimo";return y.jsx(Mt,{withBorder:!0,p:"xs",radius:"sm",bg:B?"var(--mantine-color-blue-light)":void 0,children:y.jsxs(He,{gap:6,wrap:"nowrap",align:"flex-start",children:[y.jsx(fo,{size:22,radius:"xl",color:($==null?void 0:$.color)||hl(Y),children:Y.slice(0,2).toUpperCase()}),y.jsxs(me,{style:{flex:1,minWidth:0},children:[y.jsxs(He,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(He,{gap:6,wrap:"nowrap",children:[y.jsx(Ce,{size:"xs",fw:600,children:Y}),y.jsx(Ce,{size:"xs",c:"dimmed",children:Kg(D.created_at)})]}),B&&y.jsx(Qt,{label:"Borrar",withArrow:!0,children:y.jsx(wt,{size:"xs",variant:"subtle",color:"red",onClick:()=>H(D.id),children:y.jsx(xu,{size:12})})})]}),y.jsx(Ce,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:Ple(D.body,O)})]})]})},D.id)})})}),z.length>0&&y.jsx(Ce,{size:"xs",c:"dimmed",px:6,children:z.length===1?`${z[0]} esta escribiendo...`:`${z.slice(0,2).join(", ")}${z.length>2?"...":""} estan escribiendo...`}),y.jsxs(Cn,{store:N,onOptionSubmit:D=>P(D),position:"top-start",withinPortal:!1,children:[y.jsx(Cn.DropdownTarget,{children:y.jsxs(He,{gap:"xs",align:"flex-end",children:[y.jsx(bu,{ref:C,value:c,onChange:G,onKeyDown:U,placeholder:"Escribe un mensaje (Enter = enviar, @ para mencionar)",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:h}),y.jsx(Qt,{label:"Enviar",withArrow:!0,children:y.jsx(wt,{size:"lg",variant:"filled",color:"blue",onClick:L,disabled:!c.trim()||h,"aria-label":"Enviar",children:y.jsx(fq,{size:16})})})]})}),y.jsx(Cn.Dropdown,{hidden:!b||q.length===0,children:y.jsx(Cn.Options,{children:q.map(D=>y.jsx(Cn.Option,{value:D.username,children:y.jsxs(He,{gap:6,wrap:"nowrap",children:[y.jsx(fo,{size:18,radius:"xl",color:D.color||hl(D.username),children:(D.display_name||D.username).slice(0,2).toUpperCase()}),y.jsxs(Ce,{size:"sm",fw:600,children:["@",D.username]}),D.display_name&&D.display_name!==D.username&&y.jsx(Ce,{size:"xs",c:"dimmed",children:D.display_name})]})},D.id))})})]})]})}const cM=/(https?:\/\/[^\s<>()"']+)/gi;function Wk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(cM.lastIndex=0;(r=cM.exec(n))!==null;){let a=r[1];a=a.replace(/[.,;:!?)\]}>]+$/,""),!i.has(a)&&(i.add(a),t.push({url:a,source:e,context:n}))}return t}function $le(e){try{return new URL(e).hostname}catch{return e}}function zle({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...Wk("title",e.title),...Wk("description",e.description),...n.flatMap(l=>Wk("chat",l.body))],o=new Set;return a.filter(l=>o.has(l.url)?!1:(o.add(l.url),!0))},[e.title,e.description,n]);if(t.length===0)return y.jsxs(Hn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[y.jsx(Ce,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),y.jsx(Ce,{size:"xs",c:"dimmed",ta:"center",children:"Pega URLs en el titulo, descripcion o chat y apareceran aqui."})]});const i=a=>a==="title"?"grape":a==="description"?"blue":"teal",r=a=>a==="title"?"titulo":a==="description"?"descripcion":"chat";return y.jsx(Hn,{gap:6,p:4,children:t.map(a=>y.jsx(Mt,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(He,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[y.jsxs(me,{style:{flex:1,minWidth:0},children:[y.jsx(_y,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:y.jsxs(He,{gap:4,wrap:"nowrap",align:"center",children:[y.jsx(Ese,{size:12}),y.jsx("span",{children:$le(a.url)})]})}),y.jsx(Ce,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),y.jsx(ot,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function Lle({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o}){const[l,c]=A.useState([]),[f,h]=A.useState(e),d=async p=>{h(v=>({...v,title:p.title,description:p.description,requester:p.requester,tags:p.tags,assignee_id:p.assignee_id})),await a(p)};return y.jsxs(He,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[y.jsx(me,{style:{flex:"1 1 0",minWidth:320},children:y.jsx(dq,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:f.requester,title:f.title,description:f.description,assignee_id:f.assignee_id,tags:f.tags||[]},submitLabel:"Guardar",onSubmit:d,onCancel:o})}),y.jsx(Hf,{orientation:"vertical"}),y.jsx(me,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:y.jsxs(Ci,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[y.jsxs(Ci.List,{children:[y.jsx(Ci.Tab,{value:"chat",leftSection:y.jsx(cq,{size:14}),children:"Chat"}),y.jsx(Ci.Tab,{value:"links",leftSection:y.jsx($se,{size:14}),children:"Enlaces"}),y.jsx(Ci.Tab,{value:"files",leftSection:y.jsx(Kse,{size:14}),disabled:!0,children:"Archivos"})]}),y.jsxs(me,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[y.jsx(Ci.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:y.jsx(me,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:y.jsx(Nle,{cardId:f.id,users:n,currentUserId:t,onMessagesChange:c})})}),y.jsx(Ci.Panel,{value:"links",children:y.jsx(zle,{card:f,messages:l})}),y.jsx(Ci.Panel,{value:"files",children:y.jsx(Ce,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function Ile(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ble=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fle=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qle={};function fM(e,n){return(qle.jsx?Fle:Ble).test(e)}const Hle=/[ \t\n\f\r]/g;function Ule(e){return typeof e=="object"?e.type==="text"?dM(e.value):!1:dM(e)}function dM(e){return e.replace(Hle,"")===""}class cp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}cp.prototype.normal={};cp.prototype.property={};cp.prototype.space=void 0;function pq(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new cp(t,i,n)}function KS(e){return e.toLowerCase()}class xr{constructor(n,t){this.attribute=t,this.property=n}}xr.prototype.attribute="";xr.prototype.booleanish=!1;xr.prototype.boolean=!1;xr.prototype.commaOrSpaceSeparated=!1;xr.prototype.commaSeparated=!1;xr.prototype.defined=!1;xr.prototype.mustUseProperty=!1;xr.prototype.number=!1;xr.prototype.overloadedBoolean=!1;xr.prototype.property="";xr.prototype.spaceSeparated=!1;xr.prototype.space=void 0;let Vle=0;const qn=Lu(),vi=Lu(),XS=Lu(),Ve=Lu(),zt=Lu(),Gc=Lu(),zr=Lu();function Lu(){return 2**++Vle}const ZS=Object.freeze(Object.defineProperty({__proto__:null,boolean:qn,booleanish:vi,commaOrSpaceSeparated:zr,commaSeparated:Gc,number:Ve,overloadedBoolean:XS,spaceSeparated:zt},Symbol.toStringTag,{value:"Module"})),Gk=Object.keys(ZS);class v9 extends xr{constructor(n,t,i,r){let a=-1;if(super(n,t),hM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&Xle.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(mM,Jle);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!mM.test(a)){let o=a.replace(Kle,Qle);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=v9}return new r(i,n)}function Qle(e){return"-"+e.toLowerCase()}function Jle(e){return e.charAt(1).toUpperCase()}const eue=pq([vq,Wle,bq,wq,kq],"html"),g9=pq([vq,Gle,bq,wq,kq],"svg");function nue(e){return e.join(" ").trim()}var Tc={},Yk,pM;function tue(){if(pM)return Yk;pM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` -`,f="/",h="*",d="",p="comment",v="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var C=1,x=1;function E(U){var z=U.match(n);z&&(C+=z.length);var D=U.lastIndexOf(c);x=~D?U.length-D:x+U.length}function O(){var U={line:C,column:x};return function(z){return z.position=new j(U),q(),z}}function j(U){this.start=U,this.end={line:C,column:x},this.source=_.source}j.prototype.content=k;function M(U){var z=new Error(_.source+":"+C+":"+x+": "+U);if(z.reason=U,z.filename=_.source,z.line=C,z.column=x,z.source=k,!_.silent)throw z}function N(U){var z=U.exec(k);if(z){var D=z[0];return E(D),k=k.slice(D.length),z}}function q(){N(t)}function P(U){var z;for(U=U||[];z=L();)z!==!1&&U.push(z);return U}function L(){var U=O();if(!(f!=k.charAt(0)||h!=k.charAt(1))){for(var z=2;d!=k.charAt(z)&&(h!=k.charAt(z)||f!=k.charAt(z+1));)++z;if(z+=2,d===k.charAt(z-1))return M("End of comment missing");var D=k.slice(2,z-2);return x+=2,E(D),k=k.slice(z),x+=2,U({type:p,comment:D})}}function H(){var U=O(),z=N(i);if(z){if(L(),!N(r))return M("property missing ':'");var D=N(a),$=U({type:v,property:w(z[0].replace(e,d)),value:D?w(D[0].replace(e,d)):d});return N(o),$}}function G(){var U=[];P(U);for(var z;z=H();)z!==!1&&(U.push(z),P(U));return U}return q(),G()}function w(k){return k?k.replace(l,d):d}return Yk=b,Yk}var vM;function iue(){if(vM)return Tc;vM=1;var e=Tc&&Tc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.default=t;const n=e(tue());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;l?r(f,h,c):h&&(a=a||{},a[f]=h)}),a}return Tc}var ah={},gM;function rue(){if(gM)return ah;gM=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(f){return!f||t.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(r,l):f=f.replace(i,l),f.replace(n,o))};return ah.camelCase=c,ah}var oh,yM;function aue(){if(yM)return oh;yM=1;var e=oh&&oh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(iue()),t=rue();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return i.default=i,oh=i,oh}var oue=aue();const sue=pt(oue),_q=xq("end"),y9=xq("start");function xq(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function lue(e){const n=y9(e),t=_q(e);if(n&&t)return{start:n,end:t}}function $h(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bM(e.position):"start"in e||"end"in e?bM(e):"line"in e||"column"in e?QS(e):""}function QS(e){return wM(e&&e.line)+":"+wM(e&&e.column)}function bM(e){return QS(e&&e.start)+"-"+QS(e&&e.end)}function wM(e){return e&&typeof e=="number"?e:1}class tr extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const c=i.indexOf(":");c===-1?a.ruleId=i:(a.source=i.slice(0,c),a.ruleId=i.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=$h(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tr.prototype.file="";tr.prototype.name="";tr.prototype.reason="";tr.prototype.message="";tr.prototype.stack="";tr.prototype.column=void 0;tr.prototype.line=void 0;tr.prototype.ancestors=void 0;tr.prototype.cause=void 0;tr.prototype.fatal=void 0;tr.prototype.place=void 0;tr.prototype.ruleId=void 0;tr.prototype.source=void 0;const b9={}.hasOwnProperty,uue=new Map,cue=/[A-Z]/g,fue=new Set(["table","tbody","thead","tfoot","tr"]),due=new Set(["td","th"]),Sq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hue(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=kue(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=wue(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?g9:eue,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=Cq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function Cq(e,n,t){if(n.type==="element")return mue(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return pue(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return gue(e,n,t);if(n.type==="mdxjsEsm")return vue(e,n);if(n.type==="root")return yue(e,n,t);if(n.type==="text")return bue(e,n)}function mue(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=g9,e.schema=r),e.ancestors.push(n);const a=Oq(e,n.tagName,!1),o=_ue(e,n);let l=k9(e,n);return fue.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!Ule(c):!0})),Aq(e,o,a,n),w9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function pue(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}rm(e,n.position)}function vue(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);rm(e,n.position)}function gue(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=g9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:Oq(e,n.name,!0),o=xue(e,n),l=k9(e,n);return Aq(e,o,a,n),w9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function yue(e,n,t){const i={};return w9(i,k9(e,n)),e.create(n,e.Fragment,i,t)}function bue(e,n){return n.value}function Aq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function w9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function wue(e,n,t){return i;function i(r,a,o,l){const f=Array.isArray(o.children)?t:n;return l?f(a,o,l):f(a,o)}}function kue(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),c=y9(i);return n(r,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function _ue(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&b9.call(n.properties,r)){const a=Sue(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&due.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function xue(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else rm(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else rm(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function k9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:uue;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Ur(e,e.length,0,n),e):n}const xM={}.hasOwnProperty;function Eq(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const or=kl(/[A-Za-z]/),nr=kl(/[\dA-Za-z]/),Rue=kl(/[#-'*+\--9=?A-Z^-~]/);function Xg(e){return e!==null&&(e<32||e===127)}const JS=kl(/\d/),Pue=kl(/[\dA-Fa-f]/),Nue=kl(/[!-/:-@[-`{-~]/);function _n(e){return e!==null&&e<-2}function Pt(e){return e!==null&&(e<0||e===32)}function Qn(e){return e===-2||e===-1||e===32}const g0=kl(new RegExp("\\p{P}|\\p{S}","u")),Su=kl(/\s/);function kl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Jf(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function st(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Qn(c)?(e.enter(t),l(c)):n(c)}function l(c){return Qn(c)&&a++o))return;const M=n.events.length;let N=M,q,P;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(q){P=n.events[N][1].end;break}q=!0}for(_(i),j=M;jx;){const O=t[E];n.containerState=O[1],O[0].exit.call(n,e)}t.length=x}function C(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function Bue(e,n,t){return st(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function af(e){if(e===null||Pt(e)||Su(e))return 1;if(g0(e))return 2}function y0(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};CM(d,-c),CM(p,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=da(f,[["enter",e[i][1],n],["exit",e[i][1],n]])),f=da(f,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),f=da(f,y0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),f=da(f,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,f=da(f,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Ur(e,i-1,t-i+3,f),t=i+f.length-h-2;break}}for(t=-1;++t0&&Qn(j)?st(e,C,"linePrefix",a+1)(j):C(j)}function C(j){return j===null||_n(j)?e.check(AM,w,E)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||_n(j)?(e.exit("codeFlowValue"),C(j)):(e.consume(j),x)}function E(j){return e.exit("codeFenced"),n(j)}function O(j,M,N){let q=0;return P;function P(z){return j.enter("lineEnding"),j.consume(z),j.exit("lineEnding"),L}function L(z){return j.enter("codeFencedFence"),Qn(z)?st(j,H,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):H(z)}function H(z){return z===l?(j.enter("codeFencedFenceSequence"),G(z)):N(z)}function G(z){return z===l?(q++,j.consume(z),G):q>=o?(j.exit("codeFencedFenceSequence"),Qn(z)?st(j,U,"whitespace")(z):U(z)):N(z)}function U(z){return z===null||_n(z)?(j.exit("codeFencedFence"),M(z)):N(z)}}}function Que(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Xk={name:"codeIndented",tokenize:ece},Jue={partial:!0,tokenize:nce};function ece(e,n,t){const i=this;return r;function r(f){return e.enter("codeIndented"),st(e,a,"linePrefix",5)(f)}function a(f){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):t(f)}function o(f){return f===null?c(f):_n(f)?e.attempt(Jue,o,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||_n(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),n(f)}}function nce(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):_n(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):st(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):_n(o)?r(o):t(o)}}const tce={name:"codeText",previous:rce,resolve:ice,tokenize:ace};function ice(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&sh(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),sh(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),sh(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function Nq(e,n,t,i,r,a,o,l,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Xg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||_n(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Pt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):_n(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||_n(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),c||(c=!Qn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function zq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,c):t(p)}function c(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),f(p))}function f(p){return p===o?(e.exit(a),c(o)):p===null?t(p):_n(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),st(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||_n(p)?(e.exit("chunkString"),f(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function zh(e,n){let t;return i;function i(r){return _n(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Qn(r)?st(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const hce={name:"definition",tokenize:pce},mce={partial:!0,tokenize:vce};function pce(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return $q.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=qa(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):t(v)}function c(v){return Pt(v)?zh(e,f)(v):f(v)}function f(v){return Nq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(mce,d,d)(v)}function d(v){return Qn(v)?st(e,p,"whitespace")(v):p(v)}function p(v){return v===null||_n(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function vce(e,n,t){return i;function i(l){return Pt(l)?zh(e,r)(l):t(l)}function r(l){return zq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Qn(l)?st(e,o,"whitespace")(l):o(l)}function o(l){return l===null||_n(l)?n(l):t(l)}}const gce={name:"hardBreakEscape",tokenize:yce};function yce(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return _n(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const bce={name:"headingAtx",resolve:wce,tokenize:kce};function wce(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Ur(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function kce(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||Pt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||_n(h)?(e.exit("atxHeading"),n(h)):Qn(h)?st(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||Pt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const _ce=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],jM=["pre","script","style","textarea"],xce={concrete:!0,name:"htmlFlow",resolveTo:Ace,tokenize:Oce},Sce={partial:!0,tokenize:Ece},Cce={partial:!0,tokenize:jce};function Ace(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Oce(e,n,t){const i=this;let r,a,o,l,c;return f;function f(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),d}function d(I){return I===33?(e.consume(I),p):I===47?(e.consume(I),a=!0,w):I===63?(e.consume(I),r=3,i.interrupt?n:R):or(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function p(I){return I===45?(e.consume(I),r=2,v):I===91?(e.consume(I),r=5,l=0,b):or(I)?(e.consume(I),r=4,i.interrupt?n:R):t(I)}function v(I){return I===45?(e.consume(I),i.interrupt?n:R):t(I)}function b(I){const X="CDATA[";return I===X.charCodeAt(l++)?(e.consume(I),l===X.length?i.interrupt?n:H:b):t(I)}function w(I){return or(I)?(e.consume(I),o=String.fromCharCode(I),k):t(I)}function k(I){if(I===null||I===47||I===62||Pt(I)){const X=I===47,ee=o.toLowerCase();return!X&&!a&&jM.includes(ee)?(r=1,i.interrupt?n(I):H(I)):_ce.includes(o.toLowerCase())?(r=6,X?(e.consume(I),_):i.interrupt?n(I):H(I)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(I):a?C(I):x(I))}return I===45||nr(I)?(e.consume(I),o+=String.fromCharCode(I),k):t(I)}function _(I){return I===62?(e.consume(I),i.interrupt?n:H):t(I)}function C(I){return Qn(I)?(e.consume(I),C):P(I)}function x(I){return I===47?(e.consume(I),P):I===58||I===95||or(I)?(e.consume(I),E):Qn(I)?(e.consume(I),x):P(I)}function E(I){return I===45||I===46||I===58||I===95||nr(I)?(e.consume(I),E):O(I)}function O(I){return I===61?(e.consume(I),j):Qn(I)?(e.consume(I),O):x(I)}function j(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),c=I,M):Qn(I)?(e.consume(I),j):N(I)}function M(I){return I===c?(e.consume(I),c=null,q):I===null||_n(I)?t(I):(e.consume(I),M)}function N(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Pt(I)?O(I):(e.consume(I),N)}function q(I){return I===47||I===62||Qn(I)?x(I):t(I)}function P(I){return I===62?(e.consume(I),L):t(I)}function L(I){return I===null||_n(I)?H(I):Qn(I)?(e.consume(I),L):t(I)}function H(I){return I===45&&r===2?(e.consume(I),D):I===60&&r===1?(e.consume(I),$):I===62&&r===4?(e.consume(I),W):I===63&&r===3?(e.consume(I),R):I===93&&r===5?(e.consume(I),Y):_n(I)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Sce,V,G)(I)):I===null||_n(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),H)}function G(I){return e.check(Cce,U,V)(I)}function U(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),z}function z(I){return I===null||_n(I)?G(I):(e.enter("htmlFlowData"),H(I))}function D(I){return I===45?(e.consume(I),R):H(I)}function $(I){return I===47?(e.consume(I),o="",B):H(I)}function B(I){if(I===62){const X=o.toLowerCase();return jM.includes(X)?(e.consume(I),W):H(I)}return or(I)&&o.length<8?(e.consume(I),o+=String.fromCharCode(I),B):H(I)}function Y(I){return I===93?(e.consume(I),R):H(I)}function R(I){return I===62?(e.consume(I),W):I===45&&r===2?(e.consume(I),R):H(I)}function W(I){return I===null||_n(I)?(e.exit("htmlFlowData"),V(I)):(e.consume(I),W)}function V(I){return e.exit("htmlFlow"),n(I)}}function jce(e,n,t){const i=this;return r;function r(o){return _n(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Ece(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(fp,n,t)}}const Tce={name:"htmlText",tokenize:Mce};function Mce(e,n,t){const i=this;let r,a,o;return l;function l(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),c}function c(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),O):R===63?(e.consume(R),x):or(R)?(e.consume(R),N):t(R)}function f(R){return R===45?(e.consume(R),h):R===91?(e.consume(R),a=0,b):or(R)?(e.consume(R),C):t(R)}function h(R){return R===45?(e.consume(R),v):t(R)}function d(R){return R===null?t(R):R===45?(e.consume(R),p):_n(R)?(o=d,$(R)):(e.consume(R),d)}function p(R){return R===45?(e.consume(R),v):d(R)}function v(R){return R===62?D(R):R===45?p(R):d(R)}function b(R){const W="CDATA[";return R===W.charCodeAt(a++)?(e.consume(R),a===W.length?w:b):t(R)}function w(R){return R===null?t(R):R===93?(e.consume(R),k):_n(R)?(o=w,$(R)):(e.consume(R),w)}function k(R){return R===93?(e.consume(R),_):w(R)}function _(R){return R===62?D(R):R===93?(e.consume(R),_):w(R)}function C(R){return R===null||R===62?D(R):_n(R)?(o=C,$(R)):(e.consume(R),C)}function x(R){return R===null?t(R):R===63?(e.consume(R),E):_n(R)?(o=x,$(R)):(e.consume(R),x)}function E(R){return R===62?D(R):x(R)}function O(R){return or(R)?(e.consume(R),j):t(R)}function j(R){return R===45||nr(R)?(e.consume(R),j):M(R)}function M(R){return _n(R)?(o=M,$(R)):Qn(R)?(e.consume(R),M):D(R)}function N(R){return R===45||nr(R)?(e.consume(R),N):R===47||R===62||Pt(R)?q(R):t(R)}function q(R){return R===47?(e.consume(R),D):R===58||R===95||or(R)?(e.consume(R),P):_n(R)?(o=q,$(R)):Qn(R)?(e.consume(R),q):D(R)}function P(R){return R===45||R===46||R===58||R===95||nr(R)?(e.consume(R),P):L(R)}function L(R){return R===61?(e.consume(R),H):_n(R)?(o=L,$(R)):Qn(R)?(e.consume(R),L):q(R)}function H(R){return R===null||R===60||R===61||R===62||R===96?t(R):R===34||R===39?(e.consume(R),r=R,G):_n(R)?(o=H,$(R)):Qn(R)?(e.consume(R),H):(e.consume(R),U)}function G(R){return R===r?(e.consume(R),r=void 0,z):R===null?t(R):_n(R)?(o=G,$(R)):(e.consume(R),G)}function U(R){return R===null||R===34||R===39||R===60||R===61||R===96?t(R):R===47||R===62||Pt(R)?q(R):(e.consume(R),U)}function z(R){return R===47||R===62||Pt(R)?q(R):t(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),n):t(R)}function $(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),B}function B(R){return Qn(R)?st(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Y(R)}function Y(R){return e.enter("htmlTextData"),o(R)}}const S9={name:"labelEnd",resolveAll:Nce,resolveTo:$ce,tokenize:zce},Dce={tokenize:Lce},Rce={tokenize:Ice},Pce={tokenize:Bce};function Nce(e){let n=-1;const t=[];for(;++n=3&&(f===null||_n(f))?(e.exit("thematicBreak"),n(f)):t(f)}function c(f){return f===r?(e.consume(f),i++,c):(e.exit("thematicBreakSequence"),Qn(f)?st(e,l,"whitespace")(f):l(f))}}const gr={continuation:{tokenize:Xce},exit:Qce,name:"list",tokenize:Kce},Gce={partial:!0,tokenize:Jce},Yce={partial:!0,tokenize:Zce};function Kce(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const b=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:JS(v)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Sg,t,f)(v):f(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return t(v)}function c(v){return JS(v)&&++o<10?(e.consume(v),c):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):t(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(fp,i.interrupt?t:h,e.attempt(Gce,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Qn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function Xce(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(fp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,st(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Qn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Yce,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,st(e,e.attempt(gr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Zce(e,n,t){const i=this;return st(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function Qce(e){e.exit(this.containerState.type)}function Jce(e,n,t){const i=this;return st(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Qn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const EM={name:"setextUnderline",resolveTo:efe,tokenize:nfe};function efe(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function nfe(e,n,t){const i=this;let r;return a;function a(f){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=f,o(f)):t(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===r?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Qn(f)?st(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||_n(f)?(e.exit("setextHeadingLine"),n(f)):t(f)}}const tfe={tokenize:ife};function ife(e){const n=this,t=e.attempt(fp,i,e.attempt(this.parser.constructs.flowInitial,r,st(e,e.attempt(this.parser.constructs.flow,r,e.attempt(lce,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const rfe={resolveAll:Iq()},afe=Lq("string"),ofe=Lq("text");function Lq(e){return{resolveAll:Iq(e==="text"?sfe:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return f(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return f(h)?(t.exit("data"),a(h)):(t.consume(h),c)}function f(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function wfe(e,n){let t=-1;const i=[];let r;for(;++t{x==null||x.preventDefault();const E=f.trim();E&&await a({requester:l.trim(),title:E,description:d,assignee_id:v,tags:w})},C=x=>{x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),_())};return g.jsx("form",{onSubmit:_,children:g.jsxs($n,{gap:"sm",children:[g.jsx(pl,{label:"Tarea",value:f,onChange:x=>h(x.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),_())}}),g.jsx(Ty,{label:"Solicitante",value:l,onChange:c,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:x=>{x.key==="Enter"&&x.preventDefault()}}),g.jsx(pl,{label:"Descripcion",value:d,onChange:x=>p(x.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),g.jsx(Kr,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:x=>b(x),data:t.map(x=>({value:x.id,label:x.display_name||x.username})),clearable:!0,searchable:!0,tabIndex:4}),g.jsx(KC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),g.jsxs(ze,{justify:"flex-end",gap:"xs",mt:"xs",children:[g.jsx(st,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),g.jsx(st,{tabIndex:6,type:"submit",disabled:!f.trim(),children:n})]})]})})}function Vle(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const p9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function v9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function xq(e){return e?v9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:p9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function g9(e){return e?v9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:p9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function Wle(e){return e?v9(e)?e:p9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const Sq=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],Gle=Sq,Yle=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function yl(e){return Vle(e,Yle)}const KS=6e4,Eh=60*KS,qc=24*Eh,Gv=7*qc,Gk=30*qc;function Jt(e){if(!Number.isFinite(e)||e<0)return"0m";if(e=0&&n-t<=64;t--){const i=e[t];if(i==="@"){if(t===0||/\s/.test(e[t-1])){const r=e.slice(t+1,n);if(/^[a-z0-9_.-]*$/i.test(r))return{start:t,query:r.toLowerCase()}}return null}if(/\s/.test(i))return null}return null}const Qle=/(^|\s)(@[a-z0-9][a-z0-9_.-]{0,63})/gi;function Jle(e,n){const t=[];let i=0,r=0;for(const a of e.matchAll(Qle)){const o=a[2].slice(1).toLowerCase(),l=(a.index??0)+a[1].length;l>i&&t.push(e.slice(i,l));const c=n.get(o);c?t.push(g.jsxs(it,{size:"xs",variant:"light",color:c.color||yl(c.username),style:{verticalAlign:"middle"},children:["@",c.username]},`m${r++}`)):t.push(`@${o}`),i=l+a[2].length}return inew Map(n.map(U=>[U.id,U])),[n]),O=A.useMemo(()=>new Map(n.map(U=>[U.username.toLowerCase(),U])),[n]),M=A.useCallback(async()=>{try{const U=await tre(e);o(U),i==null||i(U)}catch(U){wn.show({color:"red",message:U.message})}finally{c(!1)}},[e,i]);A.useEffect(()=>{M()},[M]),A.useEffect(()=>{const U=new WebSocket(sre(e));return C.current=U,U.onmessage=D=>{try{const W=JSON.parse(D.data);W.type==="message.created"&&W.message?o(G=>{if(G.some(X=>X.id===W.message.id))return G;const z=[...G,W.message];return i==null||i(z),z}):W.type==="typing"&&W.user_id?b(G=>({...G,[W.user_id]:Date.now()})):W.type==="error"&&wn.show({color:"red",message:W.error})}catch{}},U.onerror=()=>{},()=>{U.close(),C.current=null}},[e,i]),A.useEffect(()=>{const U=setInterval(()=>{const D=Date.now();b(W=>{const G={};for(const[z,X]of Object.entries(W))D-XclearInterval(U)},[]),A.useEffect(()=>{_.current&&_.current.scrollTo({top:_.current.scrollHeight,behavior:"smooth"})},[a.length]);const[N,q]=A.useState(null);A.useEffect(()=>{if(!r||!a.some(W=>W.id===r))return;const U=document.querySelector(`[data-msg-id="${r}"]`);U&&U instanceof HTMLElement&&U.scrollIntoView({behavior:"smooth",block:"center"}),q(r);const D=setTimeout(()=>q(null),2200);return()=>clearTimeout(D)},[r,a]);const R=()=>{const U=C.current;if(!U||U.readyState!==WebSocket.OPEN)return;const D=Date.now();D-E.currentk(null)}),F=A.useMemo(()=>w?n.filter(U=>U.username.toLowerCase().startsWith(w.query)).slice(0,8):[],[n,w]);A.useEffect(()=>{w&&F.length>0?(L.openDropdown(),L.selectFirstOption()):L.closeDropdown()},[w==null?void 0:w.query,F.length]);const Y=U=>{if(!w)return;const D=f.slice(0,w.start),W=f.slice(w.start+1+w.query.length),G=`@${U} `,z=D+G+W;h(z),k(null),requestAnimationFrame(()=>{const X=x.current;if(!X)return;const ee=(D+G).length;X.focus(),X.setSelectionRange(ee,ee)})},V=async()=>{const U=f.trim();if(!U||d)return;p(!0);const D=C.current;try{if(D&&D.readyState===WebSocket.OPEN)D.send(JSON.stringify({type:"send",body:U})),h("");else{const W=await ire(e,U);o(G=>[...G,W]),i==null||i([...a,W]),h("")}}catch(W){wn.show({color:"red",message:W.message})}finally{p(!1)}},$=async U=>{try{await rre(e,U);const D=a.filter(W=>W.id!==U);o(D),i==null||i(D)}catch(D){wn.show({color:"red",message:D.message})}},P=U=>{h(U.currentTarget.value),R();const D=U.currentTarget.selectionStart??U.currentTarget.value.length;k(Zle(U.currentTarget.value,D))},I=U=>{if(w&&F.length>0&&(U.key==="Enter"||U.key==="Tab")){U.preventDefault();const D=L.getSelectedOptionIndex(),W=F[Math.max(0,D)];W&&Y(W.username);return}if(w&&U.key==="Escape"){k(null);return}U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),V())},H=Object.keys(v).filter(U=>U!==t).map(U=>{const D=j.get(U);return(D==null?void 0:D.display_name)||(D==null?void 0:D.username)||"alguien"});return g.jsxs($n,{gap:"xs",style:{height:"100%",minHeight:0},children:[g.jsx(fr,{viewportRef:_,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:l?g.jsx(ze,{justify:"center",p:"md",children:g.jsx(ai,{size:"sm"})}):a.length===0?g.jsx(xe,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):g.jsx($n,{gap:6,p:4,children:a.map(U=>{const D=U.author_id?j.get(U.author_id):null,W=U.author_id&&U.author_id===t,G=D?D.display_name||D.username:"Anonimo",z=N===U.id;return g.jsx(Dt,{withBorder:!0,p:"xs",radius:"sm","data-msg-id":U.id,bg:z?"var(--mantine-color-yellow-light)":W?"var(--mantine-color-blue-light)":void 0,style:{transition:"background-color 600ms ease",boxShadow:z?"0 0 0 2px var(--mantine-color-yellow-5)":void 0},children:g.jsxs(ze,{gap:6,wrap:"nowrap",align:"flex-start",children:[g.jsx(go,{size:22,radius:"xl",color:(D==null?void 0:D.color)||yl(G),children:G.slice(0,2).toUpperCase()}),g.jsxs(he,{style:{flex:1,minWidth:0},children:[g.jsxs(ze,{gap:6,wrap:"nowrap",justify:"space-between",children:[g.jsxs(ze,{gap:6,wrap:"nowrap",children:[g.jsx(xe,{size:"xs",fw:600,children:G}),g.jsx(xe,{size:"xs",c:"dimmed",children:lm(U.created_at)})]}),W&&g.jsx(Zt,{label:"Borrar",withArrow:!0,children:g.jsx(vt,{size:"xs",variant:"subtle",color:"red",onClick:()=>$(U.id),children:g.jsx(gl,{size:12})})})]}),g.jsx(xe,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:Jle(U.body,O)})]})]})},U.id)})})}),H.length>0&&g.jsx(xe,{size:"xs",c:"dimmed",px:6,children:H.length===1?`${H[0]} esta escribiendo...`:`${H.slice(0,2).join(", ")}${H.length>2?"...":""} estan escribiendo...`}),g.jsxs(An,{store:L,onOptionSubmit:U=>Y(U),position:"top-start",withinPortal:!1,children:[g.jsx(An.DropdownTarget,{children:g.jsxs(ze,{gap:"xs",align:"flex-end",children:[g.jsx(pl,{ref:x,value:f,onChange:P,onKeyDown:I,placeholder:"Escribe un mensaje (Enter = enviar, @ para mencionar)",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:d}),g.jsx(Zt,{label:"Enviar",withArrow:!0,children:g.jsx(vt,{size:"lg",variant:"filled",color:"blue",onClick:V,disabled:!f.trim()||d,"aria-label":"Enviar",children:g.jsx(kq,{size:16})})})]})}),g.jsx(An.Dropdown,{hidden:!w||F.length===0,children:g.jsx(An.Options,{children:F.map(U=>g.jsx(An.Option,{value:U.username,children:g.jsxs(ze,{gap:6,wrap:"nowrap",children:[g.jsx(go,{size:18,radius:"xl",color:U.color||yl(U.username),children:(U.display_name||U.username).slice(0,2).toUpperCase()}),g.jsxs(xe,{size:"sm",fw:600,children:["@",U.username]}),U.display_name&&U.display_name!==U.username&&g.jsx(xe,{size:"xs",c:"dimmed",children:U.display_name})]})},U.id))})})]})]})}const vM=/(https?:\/\/[^\s<>()"']+)/gi;function Yk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(vM.lastIndex=0;(r=vM.exec(n))!==null;){let a=r[1];a=a.replace(/[.,;:!?)\]}>]+$/,""),!i.has(a)&&(i.add(a),t.push({url:a,source:e,context:n}))}return t}function nue(e){try{return new URL(e).hostname}catch{return e}}function tue({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...Yk("title",e.title),...Yk("description",e.description),...n.flatMap(l=>Yk("chat",l.body))],o=new Set;return a.filter(l=>o.has(l.url)?!1:(o.add(l.url),!0))},[e.title,e.description,n]);if(t.length===0)return g.jsxs($n,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[g.jsx(xe,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),g.jsx(xe,{size:"xs",c:"dimmed",ta:"center",children:"Pega URLs en el titulo, descripcion o chat y apareceran aqui."})]});const i=a=>a==="title"?"grape":a==="description"?"blue":"teal",r=a=>a==="title"?"titulo":a==="description"?"descripcion":"chat";return g.jsx($n,{gap:6,p:4,children:t.map(a=>g.jsx(Dt,{withBorder:!0,p:"xs",radius:"sm",children:g.jsxs(ze,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[g.jsxs(he,{style:{flex:1,minWidth:0},children:[g.jsx(Sy,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:g.jsxs(ze,{gap:4,wrap:"nowrap",align:"center",children:[g.jsx(Hse,{size:12}),g.jsx("span",{children:nue(a.url)})]})}),g.jsx(xe,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),g.jsx(it,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function iue({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o,highlightMessageId:l}){const[c,f]=A.useState([]),[h,d]=A.useState(e),p=async v=>{d(b=>({...b,title:v.title,description:v.description,requester:v.requester,tags:v.tags,assignee_id:v.assignee_id})),await a(v)};return g.jsxs(ze,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[g.jsx(he,{style:{flex:"1 1 0",minWidth:320},children:g.jsx(_q,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:h.requester,title:h.title,description:h.description,assignee_id:h.assignee_id,tags:h.tags||[]},submitLabel:"Guardar",onSubmit:p,onCancel:o})}),g.jsx(Nu,{orientation:"vertical"}),g.jsx(he,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:g.jsxs(Ut,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[g.jsxs(Ut.List,{children:[g.jsx(Ut.Tab,{value:"chat",leftSection:g.jsx(bq,{size:14}),children:"Chat"}),g.jsx(Ut.Tab,{value:"links",leftSection:g.jsx(Xse,{size:14}),children:"Enlaces"}),g.jsx(Ut.Tab,{value:"files",leftSection:g.jsx(ule,{size:14}),disabled:!0,children:"Archivos"})]}),g.jsxs(he,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[g.jsx(Ut.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:g.jsx(he,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:g.jsx(eue,{cardId:h.id,users:n,currentUserId:t,onMessagesChange:f,highlightMessageId:l})})}),g.jsx(Ut.Panel,{value:"links",children:g.jsx(tue,{card:h,messages:c})}),g.jsx(Ut.Panel,{value:"files",children:g.jsx(xe,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function rue(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const aue=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oue=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sue={};function gM(e,n){return(sue.jsx?oue:aue).test(e)}const lue=/[ \t\n\f\r]/g;function uue(e){return typeof e=="object"?e.type==="text"?yM(e.value):!1:yM(e)}function yM(e){return e.replace(lue,"")===""}class pp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}pp.prototype.normal={};pp.prototype.property={};pp.prototype.space=void 0;function Cq(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new pp(t,i,n)}function XS(e){return e.toLowerCase()}class jr{constructor(n,t){this.attribute=t,this.property=n}}jr.prototype.attribute="";jr.prototype.booleanish=!1;jr.prototype.boolean=!1;jr.prototype.commaOrSpaceSeparated=!1;jr.prototype.commaSeparated=!1;jr.prototype.defined=!1;jr.prototype.mustUseProperty=!1;jr.prototype.number=!1;jr.prototype.overloadedBoolean=!1;jr.prototype.property="";jr.prototype.spaceSeparated=!1;jr.prototype.space=void 0;let cue=0;const Un=Iu(),gi=Iu(),ZS=Iu(),Ve=Iu(),Lt=Iu(),Kc=Iu(),Br=Iu();function Iu(){return 2**++cue}const QS=Object.freeze(Object.defineProperty({__proto__:null,boolean:Un,booleanish:gi,commaOrSpaceSeparated:Br,commaSeparated:Kc,number:Ve,overloadedBoolean:ZS,spaceSeparated:Lt},Symbol.toStringTag,{value:"Module"})),Kk=Object.keys(QS);class y9 extends jr{constructor(n,t,i,r){let a=-1;if(super(n,t),bM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&pue.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(wM,yue);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!wM.test(a)){let o=a.replace(mue,gue);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=y9}return new r(i,n)}function gue(e){return"-"+e.toLowerCase()}function yue(e){return e.charAt(1).toUpperCase()}const bue=Cq([Aq,fue,Eq,Tq,Mq],"html"),b9=Cq([Aq,due,Eq,Tq,Mq],"svg");function wue(e){return e.join(" ").trim()}var Dc={},Xk,kM;function kue(){if(kM)return Xk;kM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` +`,f="/",h="*",d="",p="comment",v="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var C=1,x=1;function E(V){var $=V.match(n);$&&(C+=$.length);var P=V.lastIndexOf(c);x=~P?V.length-P:x+V.length}function j(){var V={line:C,column:x};return function($){return $.position=new O(V),q(),$}}function O(V){this.start=V,this.end={line:C,column:x},this.source=_.source}O.prototype.content=k;function M(V){var $=new Error(_.source+":"+C+":"+x+": "+V);if($.reason=V,$.filename=_.source,$.line=C,$.column=x,$.source=k,!_.silent)throw $}function N(V){var $=V.exec(k);if($){var P=$[0];return E(P),k=k.slice(P.length),$}}function q(){N(t)}function R(V){var $;for(V=V||[];$=L();)$!==!1&&V.push($);return V}function L(){var V=j();if(!(f!=k.charAt(0)||h!=k.charAt(1))){for(var $=2;d!=k.charAt($)&&(h!=k.charAt($)||f!=k.charAt($+1));)++$;if($+=2,d===k.charAt($-1))return M("End of comment missing");var P=k.slice(2,$-2);return x+=2,E(P),k=k.slice($),x+=2,V({type:p,comment:P})}}function F(){var V=j(),$=N(i);if($){if(L(),!N(r))return M("property missing ':'");var P=N(a),I=V({type:v,property:w($[0].replace(e,d)),value:P?w(P[0].replace(e,d)):d});return N(o),I}}function Y(){var V=[];R(V);for(var $;$=F();)$!==!1&&(V.push($),R(V));return V}return q(),Y()}function w(k){return k?k.replace(l,d):d}return Xk=b,Xk}var _M;function _ue(){if(_M)return Dc;_M=1;var e=Dc&&Dc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.default=t;const n=e(kue());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;l?r(f,h,c):h&&(a=a||{},a[f]=h)}),a}return Dc}var lh={},xM;function xue(){if(xM)return lh;xM=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(f){return!f||t.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(r,l):f=f.replace(i,l),f.replace(n,o))};return lh.camelCase=c,lh}var uh,SM;function Sue(){if(SM)return uh;SM=1;var e=uh&&uh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(_ue()),t=xue();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return i.default=i,uh=i,uh}var Cue=Sue();const Aue=yt(Cue),Dq=Rq("end"),w9=Rq("start");function Rq(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function jue(e){const n=w9(e),t=Dq(e);if(n&&t)return{start:n,end:t}}function Ih(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?CM(e.position):"start"in e||"end"in e?CM(e):"line"in e||"column"in e?JS(e):""}function JS(e){return AM(e&&e.line)+":"+AM(e&&e.column)}function CM(e){return JS(e&&e.start)+"-"+JS(e&&e.end)}function AM(e){return e&&typeof e=="number"?e:1}class nr extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const c=i.indexOf(":");c===-1?a.ruleId=i:(a.source=i.slice(0,c),a.ruleId=i.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ih(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nr.prototype.file="";nr.prototype.name="";nr.prototype.reason="";nr.prototype.message="";nr.prototype.stack="";nr.prototype.column=void 0;nr.prototype.line=void 0;nr.prototype.ancestors=void 0;nr.prototype.cause=void 0;nr.prototype.fatal=void 0;nr.prototype.place=void 0;nr.prototype.ruleId=void 0;nr.prototype.source=void 0;const k9={}.hasOwnProperty,Oue=new Map,Eue=/[A-Z]/g,Tue=new Set(["table","tbody","thead","tfoot","tr"]),Mue=new Set(["td","th"]),Pq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Due(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Bue(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Iue(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?b9:bue,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=Nq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function Nq(e,n,t){if(n.type==="element")return Rue(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Pue(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return $ue(e,n,t);if(n.type==="mdxjsEsm")return Nue(e,n);if(n.type==="root")return zue(e,n,t);if(n.type==="text")return Lue(e,n)}function Rue(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=b9,e.schema=r),e.ancestors.push(n);const a=zq(e,n.tagName,!1),o=Fue(e,n);let l=x9(e,n);return Tue.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!uue(c):!0})),$q(e,o,a,n),_9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Pue(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}um(e,n.position)}function Nue(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);um(e,n.position)}function $ue(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=b9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:zq(e,n.name,!0),o=que(e,n),l=x9(e,n);return $q(e,o,a,n),_9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function zue(e,n,t){const i={};return _9(i,x9(e,n)),e.create(n,e.Fragment,i,t)}function Lue(e,n){return n.value}function $q(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function _9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Iue(e,n,t){return i;function i(r,a,o,l){const f=Array.isArray(o.children)?t:n;return l?f(a,o,l):f(a,o)}}function Bue(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),c=w9(i);return n(r,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Fue(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&k9.call(n.properties,r)){const a=Hue(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Mue.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function que(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else um(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else um(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function x9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Oue;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Yr(e,e.length,0,n),e):n}const EM={}.hasOwnProperty;function Iq(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ha(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=Al(/[A-Za-z]/),er=Al(/[\dA-Za-z]/),Que=Al(/[#-'*+\--9=?A-Z^-~]/);function Qg(e){return e!==null&&(e<32||e===127)}const e4=Al(/\d/),Jue=Al(/[\dA-Fa-f]/),ece=Al(/[!-/:-@[-`{-~]/);function xn(e){return e!==null&&e<-2}function Nt(e){return e!==null&&(e<0||e===32)}function Jn(e){return e===-2||e===-1||e===32}const b0=Al(new RegExp("\\p{P}|\\p{S}","u")),Su=Al(/\s/);function Al(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ed(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function ct(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Jn(c)?(e.enter(t),l(c)):n(c)}function l(c){return Jn(c)&&a++o))return;const M=n.events.length;let N=M,q,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(q){R=n.events[N][1].end;break}q=!0}for(_(i),O=M;Ox;){const j=t[E];n.containerState=j[1],j[0].exit.call(n,e)}t.length=x}function C(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function ace(e,n,t){return ct(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function sf(e){if(e===null||Nt(e)||Su(e))return 1;if(b0(e))return 2}function w0(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};MM(d,-c),MM(p,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=ga(f,[["enter",e[i][1],n],["exit",e[i][1],n]])),f=ga(f,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),f=ga(f,w0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),f=ga(f,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,f=ga(f,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Yr(e,i-1,t-i+3,f),t=i+f.length-h-2;break}}for(t=-1;++t0&&Jn(O)?ct(e,C,"linePrefix",a+1)(O):C(O)}function C(O){return O===null||xn(O)?e.check(DM,w,E)(O):(e.enter("codeFlowValue"),x(O))}function x(O){return O===null||xn(O)?(e.exit("codeFlowValue"),C(O)):(e.consume(O),x)}function E(O){return e.exit("codeFenced"),n(O)}function j(O,M,N){let q=0;return R;function R($){return O.enter("lineEnding"),O.consume($),O.exit("lineEnding"),L}function L($){return O.enter("codeFencedFence"),Jn($)?ct(O,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):F($)}function F($){return $===l?(O.enter("codeFencedFenceSequence"),Y($)):N($)}function Y($){return $===l?(q++,O.consume($),Y):q>=o?(O.exit("codeFencedFenceSequence"),Jn($)?ct(O,V,"whitespace")($):V($)):N($)}function V($){return $===null||xn($)?(O.exit("codeFencedFence"),M($)):N($)}}}function gce(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Qk={name:"codeIndented",tokenize:bce},yce={partial:!0,tokenize:wce};function bce(e,n,t){const i=this;return r;function r(f){return e.enter("codeIndented"),ct(e,a,"linePrefix",5)(f)}function a(f){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):t(f)}function o(f){return f===null?c(f):xn(f)?e.attempt(yce,o,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||xn(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),n(f)}}function wce(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):xn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):ct(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):xn(o)?r(o):t(o)}}const kce={name:"codeText",previous:xce,resolve:_ce,tokenize:Sce};function _ce(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&ch(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),ch(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),ch(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function Vq(e,n,t,i,r,a,o,l,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Qg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||xn(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Nt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):xn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||xn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),c||(c=!Jn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function Gq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,c):t(p)}function c(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),f(p))}function f(p){return p===o?(e.exit(a),c(o)):p===null?t(p):xn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ct(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||xn(p)?(e.exit("chunkString"),f(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function Bh(e,n){let t;return i;function i(r){return xn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Jn(r)?ct(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Dce={name:"definition",tokenize:Pce},Rce={partial:!0,tokenize:Nce};function Pce(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return Wq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=Ha(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):t(v)}function c(v){return Nt(v)?Bh(e,f)(v):f(v)}function f(v){return Vq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Rce,d,d)(v)}function d(v){return Jn(v)?ct(e,p,"whitespace")(v):p(v)}function p(v){return v===null||xn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Nce(e,n,t){return i;function i(l){return Nt(l)?Bh(e,r)(l):t(l)}function r(l){return Gq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Jn(l)?ct(e,o,"whitespace")(l):o(l)}function o(l){return l===null||xn(l)?n(l):t(l)}}const $ce={name:"hardBreakEscape",tokenize:zce};function zce(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return xn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Lce={name:"headingAtx",resolve:Ice,tokenize:Bce};function Ice(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Yr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Bce(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||Nt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||xn(h)?(e.exit("atxHeading"),n(h)):Jn(h)?ct(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||Nt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const Fce=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],PM=["pre","script","style","textarea"],qce={concrete:!0,name:"htmlFlow",resolveTo:Vce,tokenize:Wce},Hce={partial:!0,tokenize:Yce},Uce={partial:!0,tokenize:Gce};function Vce(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Wce(e,n,t){const i=this;let r,a,o,l,c;return f;function f(z){return h(z)}function h(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),d}function d(z){return z===33?(e.consume(z),p):z===47?(e.consume(z),a=!0,w):z===63?(e.consume(z),r=3,i.interrupt?n:D):lr(z)?(e.consume(z),o=String.fromCharCode(z),k):t(z)}function p(z){return z===45?(e.consume(z),r=2,v):z===91?(e.consume(z),r=5,l=0,b):lr(z)?(e.consume(z),r=4,i.interrupt?n:D):t(z)}function v(z){return z===45?(e.consume(z),i.interrupt?n:D):t(z)}function b(z){const X="CDATA[";return z===X.charCodeAt(l++)?(e.consume(z),l===X.length?i.interrupt?n:F:b):t(z)}function w(z){return lr(z)?(e.consume(z),o=String.fromCharCode(z),k):t(z)}function k(z){if(z===null||z===47||z===62||Nt(z)){const X=z===47,ee=o.toLowerCase();return!X&&!a&&PM.includes(ee)?(r=1,i.interrupt?n(z):F(z)):Fce.includes(o.toLowerCase())?(r=6,X?(e.consume(z),_):i.interrupt?n(z):F(z)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(z):a?C(z):x(z))}return z===45||er(z)?(e.consume(z),o+=String.fromCharCode(z),k):t(z)}function _(z){return z===62?(e.consume(z),i.interrupt?n:F):t(z)}function C(z){return Jn(z)?(e.consume(z),C):R(z)}function x(z){return z===47?(e.consume(z),R):z===58||z===95||lr(z)?(e.consume(z),E):Jn(z)?(e.consume(z),x):R(z)}function E(z){return z===45||z===46||z===58||z===95||er(z)?(e.consume(z),E):j(z)}function j(z){return z===61?(e.consume(z),O):Jn(z)?(e.consume(z),j):x(z)}function O(z){return z===null||z===60||z===61||z===62||z===96?t(z):z===34||z===39?(e.consume(z),c=z,M):Jn(z)?(e.consume(z),O):N(z)}function M(z){return z===c?(e.consume(z),c=null,q):z===null||xn(z)?t(z):(e.consume(z),M)}function N(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Nt(z)?j(z):(e.consume(z),N)}function q(z){return z===47||z===62||Jn(z)?x(z):t(z)}function R(z){return z===62?(e.consume(z),L):t(z)}function L(z){return z===null||xn(z)?F(z):Jn(z)?(e.consume(z),L):t(z)}function F(z){return z===45&&r===2?(e.consume(z),P):z===60&&r===1?(e.consume(z),I):z===62&&r===4?(e.consume(z),W):z===63&&r===3?(e.consume(z),D):z===93&&r===5?(e.consume(z),U):xn(z)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Hce,G,Y)(z)):z===null||xn(z)?(e.exit("htmlFlowData"),Y(z)):(e.consume(z),F)}function Y(z){return e.check(Uce,V,G)(z)}function V(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),$}function $(z){return z===null||xn(z)?Y(z):(e.enter("htmlFlowData"),F(z))}function P(z){return z===45?(e.consume(z),D):F(z)}function I(z){return z===47?(e.consume(z),o="",H):F(z)}function H(z){if(z===62){const X=o.toLowerCase();return PM.includes(X)?(e.consume(z),W):F(z)}return lr(z)&&o.length<8?(e.consume(z),o+=String.fromCharCode(z),H):F(z)}function U(z){return z===93?(e.consume(z),D):F(z)}function D(z){return z===62?(e.consume(z),W):z===45&&r===2?(e.consume(z),D):F(z)}function W(z){return z===null||xn(z)?(e.exit("htmlFlowData"),G(z)):(e.consume(z),W)}function G(z){return e.exit("htmlFlow"),n(z)}}function Gce(e,n,t){const i=this;return r;function r(o){return xn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Yce(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(vp,n,t)}}const Kce={name:"htmlText",tokenize:Xce};function Xce(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),c}function c(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),j):D===63?(e.consume(D),x):lr(D)?(e.consume(D),N):t(D)}function f(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,b):lr(D)?(e.consume(D),C):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):xn(D)?(o=d,I(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function b(D){const W="CDATA[";return D===W.charCodeAt(a++)?(e.consume(D),a===W.length?w:b):t(D)}function w(D){return D===null?t(D):D===93?(e.consume(D),k):xn(D)?(o=w,I(D)):(e.consume(D),w)}function k(D){return D===93?(e.consume(D),_):w(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):w(D)}function C(D){return D===null||D===62?P(D):xn(D)?(o=C,I(D)):(e.consume(D),C)}function x(D){return D===null?t(D):D===63?(e.consume(D),E):xn(D)?(o=x,I(D)):(e.consume(D),x)}function E(D){return D===62?P(D):x(D)}function j(D){return lr(D)?(e.consume(D),O):t(D)}function O(D){return D===45||er(D)?(e.consume(D),O):M(D)}function M(D){return xn(D)?(o=M,I(D)):Jn(D)?(e.consume(D),M):P(D)}function N(D){return D===45||er(D)?(e.consume(D),N):D===47||D===62||Nt(D)?q(D):t(D)}function q(D){return D===47?(e.consume(D),P):D===58||D===95||lr(D)?(e.consume(D),R):xn(D)?(o=q,I(D)):Jn(D)?(e.consume(D),q):P(D)}function R(D){return D===45||D===46||D===58||D===95||er(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),F):xn(D)?(o=L,I(D)):Jn(D)?(e.consume(D),L):q(D)}function F(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,Y):xn(D)?(o=F,I(D)):Jn(D)?(e.consume(D),F):(e.consume(D),V)}function Y(D){return D===r?(e.consume(D),r=void 0,$):D===null?t(D):xn(D)?(o=Y,I(D)):(e.consume(D),Y)}function V(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||Nt(D)?q(D):(e.consume(D),V)}function $(D){return D===47||D===62||Nt(D)?q(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function I(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),H}function H(D){return Jn(D)?ct(e,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):U(D)}function U(D){return e.enter("htmlTextData"),o(D)}}const A9={name:"labelEnd",resolveAll:efe,resolveTo:nfe,tokenize:tfe},Zce={tokenize:ife},Qce={tokenize:rfe},Jce={tokenize:afe};function efe(e){let n=-1;const t=[];for(;++n=3&&(f===null||xn(f))?(e.exit("thematicBreak"),n(f)):t(f)}function c(f){return f===r?(e.consume(f),i++,c):(e.exit("thematicBreakSequence"),Jn(f)?ct(e,l,"whitespace")(f):l(f))}}const _r={continuation:{tokenize:pfe},exit:gfe,name:"list",tokenize:mfe},dfe={partial:!0,tokenize:yfe},hfe={partial:!0,tokenize:vfe};function mfe(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const b=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:e4(v)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(jg,t,f)(v):f(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return t(v)}function c(v){return e4(v)&&++o<10?(e.consume(v),c):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):t(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(vp,i.interrupt?t:h,e.attempt(dfe,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Jn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function pfe(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(vp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ct(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Jn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(hfe,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,ct(e,e.attempt(_r,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function vfe(e,n,t){const i=this;return ct(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function gfe(e){e.exit(this.containerState.type)}function yfe(e,n,t){const i=this;return ct(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Jn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const NM={name:"setextUnderline",resolveTo:bfe,tokenize:wfe};function bfe(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function wfe(e,n,t){const i=this;let r;return a;function a(f){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=f,o(f)):t(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===r?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Jn(f)?ct(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||xn(f)?(e.exit("setextHeadingLine"),n(f)):t(f)}}const kfe={tokenize:_fe};function _fe(e){const n=this,t=e.attempt(vp,i,e.attempt(this.parser.constructs.flowInitial,r,ct(e,e.attempt(this.parser.constructs.flow,r,e.attempt(jce,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const xfe={resolveAll:Kq()},Sfe=Yq("string"),Cfe=Yq("text");function Yq(e){return{resolveAll:Kq(e==="text"?Afe:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return f(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return f(h)?(t.exit("data"),a(h)):(t.consume(h),c)}function f(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Ife(e,n){let t=-1;const i=[];let r;for(;++t0){const rn=Ke.tokenStack[Ke.tokenStack.length-1];(rn[1]||MM).call(Ke,void 0,rn[0])}for(ve.position={start:Hs(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Hs(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Pfe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Nfe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function $fe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Jf(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,f),e.applyData(n,f)}function zfe(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Lfe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function qq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function Ife(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return qq(e,n);const r={src:Jf(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function Bfe(e,n){const t={src:Jf(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function Ffe(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function qfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return qq(e,n);const r={href:Jf(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function Hfe(e,n){const t={href:Jf(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Ufe(e,n,t){const i=e.all(n),r=t?Vfe(t):Hq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l0){const an=Ke.tokenStack[Ke.tokenStack.length-1];(an[1]||zM).call(Ke,void 0,an[0])}for(ve.position={start:Ys(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Ys(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Ae=-1;++Ae0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Jfe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ede(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function nde(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=ed(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,f),e.applyData(n,f)}function tde(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ide(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Qq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function rde(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Qq(e,n);const r={src:ed(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function ade(e,n){const t={src:ed(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function ode(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function sde(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Qq(e,n);const r={href:ed(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function lde(e,n){const t={href:ed(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function ude(e,n,t){const i=e.all(n),r=t?cde(t):Jq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function Wfe(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=y9(n.children[1]),c=_q(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function Zfe(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const f=[];for(;++c0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(PM(n.slice(r),r>0,!1)),a.join("")}function PM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===DM||a===RM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===DM||a===RM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function ede(e,n){const t={type:"text",value:Jfe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function nde(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const tde={blockquote:Mfe,break:Dfe,code:Rfe,delete:Pfe,emphasis:Nfe,footnoteReference:$fe,heading:zfe,html:Lfe,imageReference:Ife,image:Bfe,inlineCode:Ffe,linkReference:qfe,link:Hfe,listItem:Ufe,list:Wfe,paragraph:Gfe,root:Yfe,strong:Kfe,table:Xfe,tableCell:Qfe,tableRow:Zfe,text:ede,thematicBreak:nde,toml:Vv,yaml:Vv,definition:Vv,footnoteDefinition:Vv};function Vv(){}const Uq=-1,b0=0,Lh=1,Zg=2,C9=3,A9=4,O9=5,j9=6,Vq=7,Wq=8,ide=typeof self=="object"?self:globalThis,NM=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ide[e](n)},rde=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case b0:case Uq:return t(o,r);case Lh:{const l=t([],r);for(const c of o)l.push(i(c));return l}case Zg:{const l=t({},r);for(const[c,f]of o)l[i(c)]=i(f);return l}case C9:return t(new Date(o),r);case A9:{const{source:l,flags:c}=o;return t(new RegExp(l,c),r)}case O9:{const l=t(new Map,r);for(const[c,f]of o)l.set(i(c),i(f));return l}case j9:{const l=t(new Set,r);for(const c of o)l.add(i(c));return l}case Vq:{const{name:l,message:c}=o;return t(NM(l,c),r)}case Wq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(NM(a,o),r)};return i},$M=e=>rde(new Map,e)(0),Mc="",{toString:ade}={},{keys:ode}=Object,lh=e=>{const n=typeof e;if(n!=="object"||!e)return[b0,n];const t=ade.call(e).slice(8,-1);switch(t){case"Array":return[Lh,Mc];case"Object":return[Zg,Mc];case"Date":return[C9,Mc];case"RegExp":return[A9,Mc];case"Map":return[O9,Mc];case"Set":return[j9,Mc];case"DataView":return[Lh,t]}return t.includes("Array")?[Lh,t]:t.includes("Error")?[Vq,t]:[Zg,t]},Wv=([e,n])=>e===b0&&(n==="function"||n==="symbol"),sde=(e,n,t,i)=>{const r=(o,l)=>{const c=i.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=lh(o);switch(l){case b0:{let h=o;switch(c){case"bigint":l=Wq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return r([Uq],o)}return r([l,h],o)}case Lh:{if(c){let p=o;return c==="DataView"?p=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(o)),r([c,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Zg:{if(c)switch(c){case"BigInt":return r([c,o.toString()],o);case"Boolean":case"Number":case"String":return r([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of ode(o))(e||!Wv(lh(o[p])))&&h.push([a(p),a(o[p])]);return d}case C9:return r([l,o.toISOString()],o);case A9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case O9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Wv(lh(p))||Wv(lh(v))))&&h.push([a(p),a(v)]);return d}case j9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Wv(lh(p)))&&h.push(a(p));return d}}const{message:f}=o;return r([l,{name:c,message:f}],o)};return a},zM=(e,{json:n,lossy:t}={})=>{const i=[];return sde(!(n||t),!!n,new Map,i)(e),i},Qg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?$M(zM(e,n)):structuredClone(e):(e,n)=>$M(zM(e,n));function lde(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ude(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function cde(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||lde,i=e.options.footnoteBackLabel||ude,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&b.push({type:"text",value:" "});let C=typeof t=="string"?t:t(c,v);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qg(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`});const f={type:"element",tagName:"li",properties:a,children:o};return e.patch(n,f),e.applyData(n,f)}function cde(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let i=-1;for(;!n&&++i1}function fde(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=w9(n.children[1]),c=Dq(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function vde(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const f=[];for(;++c0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(BM(n.slice(r),r>0,!1)),a.join("")}function BM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===LM||a===IM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===LM||a===IM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function bde(e,n){const t={type:"text",value:yde(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function wde(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const kde={blockquote:Xfe,break:Zfe,code:Qfe,delete:Jfe,emphasis:ede,footnoteReference:nde,heading:tde,html:ide,imageReference:rde,image:ade,inlineCode:ode,linkReference:sde,link:lde,listItem:ude,list:fde,paragraph:dde,root:hde,strong:mde,table:pde,tableCell:gde,tableRow:vde,text:bde,thematicBreak:wde,toml:Yv,yaml:Yv,definition:Yv,footnoteDefinition:Yv};function Yv(){}const eH=-1,k0=0,Fh=1,Jg=2,j9=3,O9=4,E9=5,T9=6,nH=7,tH=8,_de=typeof self=="object"?self:globalThis,FM=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new _de[e](n)},xde=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case k0:case eH:return t(o,r);case Fh:{const l=t([],r);for(const c of o)l.push(i(c));return l}case Jg:{const l=t({},r);for(const[c,f]of o)l[i(c)]=i(f);return l}case j9:return t(new Date(o),r);case O9:{const{source:l,flags:c}=o;return t(new RegExp(l,c),r)}case E9:{const l=t(new Map,r);for(const[c,f]of o)l.set(i(c),i(f));return l}case T9:{const l=t(new Set,r);for(const c of o)l.add(i(c));return l}case nH:{const{name:l,message:c}=o;return t(FM(l,c),r)}case tH:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(FM(a,o),r)};return i},qM=e=>xde(new Map,e)(0),Rc="",{toString:Sde}={},{keys:Cde}=Object,fh=e=>{const n=typeof e;if(n!=="object"||!e)return[k0,n];const t=Sde.call(e).slice(8,-1);switch(t){case"Array":return[Fh,Rc];case"Object":return[Jg,Rc];case"Date":return[j9,Rc];case"RegExp":return[O9,Rc];case"Map":return[E9,Rc];case"Set":return[T9,Rc];case"DataView":return[Fh,t]}return t.includes("Array")?[Fh,t]:t.includes("Error")?[nH,t]:[Jg,t]},Kv=([e,n])=>e===k0&&(n==="function"||n==="symbol"),Ade=(e,n,t,i)=>{const r=(o,l)=>{const c=i.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=fh(o);switch(l){case k0:{let h=o;switch(c){case"bigint":l=tH,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return r([eH],o)}return r([l,h],o)}case Fh:{if(c){let p=o;return c==="DataView"?p=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(o)),r([c,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Jg:{if(c)switch(c){case"BigInt":return r([c,o.toString()],o);case"Boolean":case"Number":case"String":return r([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Cde(o))(e||!Kv(fh(o[p])))&&h.push([a(p),a(o[p])]);return d}case j9:return r([l,o.toISOString()],o);case O9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case E9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Kv(fh(p))||Kv(fh(v))))&&h.push([a(p),a(v)]);return d}case T9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Kv(fh(p)))&&h.push(a(p));return d}}const{message:f}=o;return r([l,{name:c,message:f}],o)};return a},HM=(e,{json:n,lossy:t}={})=>{const i=[];return Ade(!(n||t),!!n,new Map,i)(e),i},e1=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?qM(HM(e,n)):structuredClone(e):(e,n)=>qM(HM(e,n));function jde(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ode(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Ede(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||jde,i=e.options.footnoteBackLabel||Ode,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&b.push({type:"text",value:" "});let C=typeof t=="string"?t:t(c,v);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...e1(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const w0=(function(e){if(e==null)return mde;if(typeof e=="function")return k0(e);if(typeof e=="object")return Array.isArray(e)?fde(e):dde(e);if(typeof e=="string")return hde(e);throw new Error("Expected function, string, or object as test")});function fde(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=Gq,b,w,k;if((!n||a(c,f,h[h.length-1]||void 0))&&(v=yde(t(c,h)),v[0]===n4))return v;if("children"in c&&c.children){const _=c;if(_.children&&v[0]!==gde)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const C=_.children[w];if(b=l(C,w,k)(),b[0]===n4)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function yde(e){return Array.isArray(e)?e:typeof e=="number"?[vde,e]:e==null?Gq:[e]}function E9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),Yq(e,a,l,r);function l(c,f){const h=f[f.length-1],d=h?h.children.indexOf(c):void 0;return o(c,d,h)}}const t4={}.hasOwnProperty,bde={};function wde(e,n){const t=n||bde,i=new Map,r=new Map,a=new Map,o={...tde,...t.handlers},l={all:f,applyData:_de,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:t,patch:kde,wrap:Sde};return E9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function c(h,d){const p=h.type,v=l.handlers[p];if(t4.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=Qg(k);return _.children=l.all(h),_}return Qg(h)}return(l.options.unknownHandler||xde)(l,h,d)}function f(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v":""))+")"})}return p;function p(){let v=iH,b,w,k;if((!n||a(c,f,h[h.length-1]||void 0))&&(v=zde(t(c,h)),v[0]===t4))return v;if("children"in c&&c.children){const _=c;if(_.children&&v[0]!==$de)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const C=_.children[w];if(b=l(C,w,k)(),b[0]===t4)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function zde(e){return Array.isArray(e)?e:typeof e=="number"?[Nde,e]:e==null?iH:[e]}function M9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),rH(e,a,l,r);function l(c,f){const h=f[f.length-1],d=h?h.children.indexOf(c):void 0;return o(c,d,h)}}const i4={}.hasOwnProperty,Lde={};function Ide(e,n){const t=n||Lde,i=new Map,r=new Map,a=new Map,o={...kde,...t.handlers},l={all:f,applyData:Fde,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:t,patch:Bde,wrap:Hde};return M9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function c(h,d){const p=h.type,v=l.handlers[p];if(i4.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=e1(k);return _.children=l.all(h),_}return e1(h)}return(l.options.unknownHandler||qde)(l,h,d)}function f(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` -`}),t}function LM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function IM(e,n){const t=wde(e,n),i=t.one(e,void 0),r=cde(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` -`},r),a}function Cde(e,n){return e&&"run"in e?async function(t,i){const r=IM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return IM(t,{file:i,...e||n})}}function BM(e){if(e)throw e}var Qk,FM;function Ade(){if(FM)return Qk;FM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},a=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!d)return!1;var p;for(p in f);return typeof p>"u"||e.call(f,p)},o=function(f,h){t&&h.name==="__proto__"?t(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(i)return i(f,h).value}else return;return f[h]};return Qk=function c(){var f,h,d,p,v,b,w=arguments[0],k=1,_=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(f=arguments[k],f!=null)for(h in f)d=l(w,h),p=l(f,h),w!==p&&(C&&p&&(a(p)||(v=r(p)))?(v?(v=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:c(C,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},Qk}var Ode=Ade();const Jk=pt(Ode);function i4(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jde(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(c,...f){const h=e[++a];let d=-1;if(c){o(c);return}for(;++do.length;let c;l&&o.push(r);try{c=e.apply(this,o)}catch(f){const h=f;if(l&&t)throw h;return r(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,r):c instanceof Error?r(c):a(c))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const Ja={basename:Tde,dirname:Mde,extname:Dde,join:Rde,sep:"/"};function Tde(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');dp(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function Mde(e){if(dp(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Dde(e){dp(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function Rde(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Nde(e,n){let t="",i=0,r=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",i=0):(t=t.slice(0,c),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function dp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $de={cwd:zde};function zde(){return"/"}function r4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Lde(e){if(typeof e=="string")e=new URL(e);else if(!r4(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Ide(e)}function Ide(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...b]=h;const w=i[p][1];i4(w)&&i4(v)&&(v=Jk(!0,w,v)),i[p]=[f,v,...b]}}}}const Hde=new T9().freeze();function i_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function r_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function a_(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HM(e){if(!i4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function UM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Gv(e){return Ude(e)?e:new Kq(e)}function Ude(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vde(e){return typeof e=="string"||Wde(e)}function Wde(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Gde="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",VM=[],WM={allowDangerousHtml:!0},Yde=/^(https?|ircs?|mailto|xmpp)$/i,Kde=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Xde(e){const n=Zde(e),t=Qde(e);return Jde(n.runSync(n.parse(t),t),e)}function Zde(e){const n=e.rehypePlugins||VM,t=e.remarkPlugins||VM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...WM}:WM;return Hde().use(Tfe).use(t).use(Cde,i).use(n)}function Qde(e){const n=e.children||"",t=new Kq;return typeof n=="string"&&(t.value=n),t}function Jde(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,c=n.urlTransform||ehe;for(const h of Kde)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Gde+h.id,void 0);return E9(e,f),hue(e,{Fragment:y.Fragment,components:r,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Kk)if(Object.hasOwn(Kk,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=Kk[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=c(String(b||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function ehe(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||Yde.test(e.slice(0,n))?e:""}function GM(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function nhe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function the(e,n,t){const r=w0((t||{}).ignore||[]),a=ihe(n);let o=-1;for(;++o0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=E+1:(b!==E&&C.push({type:"text",value:f.value.slice(b,E)}),Array.isArray(j)?C.push(...j):j&&C.push(j),b=E+x[0].length,_=!0),!p.global)break;x=p.exec(f.value)}return _?(b?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=GM(e,"(");let a=GM(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Xq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Su(t)||g0(t))&&(!n||t!==47)}Zq.peek=Ahe;function yhe(){this.buffer()}function bhe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function whe(){this.buffer()}function khe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function _he(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function xhe(e){this.exit(e)}function She(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Che(e){this.exit(e)}function Ahe(){return"["}function Zq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function Ohe(){return{enter:{gfmFootnoteCallString:yhe,gfmFootnoteCall:bhe,gfmFootnoteDefinitionLabelString:whe,gfmFootnoteDefinition:khe},exit:{gfmFootnoteCallString:_he,gfmFootnoteCall:xhe,gfmFootnoteDefinitionLabelString:She,gfmFootnoteDefinition:Che}}}function jhe(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Zq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let c=l.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return c+=l.move(a.safe(a.associationId(i),{before:c,after:"]"})),h(),c+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),c+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?Qq:Ehe))),f(),c}}function Ehe(e,n,t){return n===0?e:Qq(e,n,t)}function Qq(e,n,t){return(t?"":" ")+e}const The=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Jq.peek=Nhe;function Mhe(){return{canContainEols:["delete"],enter:{strikethrough:Rhe},exit:{strikethrough:Phe}}}function Dhe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:The}],handlers:{delete:Jq}}}function Rhe(e){this.enter({type:"delete",children:[]},e)}function Phe(e){this.exit(e)}function Jq(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function Nhe(){return"~"}function $he(e){return e.length}function zhe(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||$he,a=[],o=[],l=[],c=[];let f=0,h=-1;for(;++hf&&(f=e[h].length);++_c[_])&&(c[_]=x)}w.push(C)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++dc[d]&&(c[d]=C),v[d]=C),p[d]=x}o.splice(1,0,p),l.splice(1,0,v),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),Bhe);return r(),o}function Bhe(e,n,t){return">"+(t?"":" ")+e}function Fhe(e,n){return KM(e,n.inConstruct,!0)&&!KM(e,n.notInConstruct,!1)}function KM(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function Hhe(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Uhe(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Vhe(e,n,t,i){const r=Uhe(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(Hhe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,Whe);return d(),p}const l=t.createTracker(i),c=r.repeat(Math.max(qhe(a,r)+1,3)),f=t.enter("codeFenced");let h=l.move(c);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` +`}),t}function UM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function VM(e,n){const t=Ide(e,n),i=t.one(e,void 0),r=Ede(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function Ude(e,n){return e&&"run"in e?async function(t,i){const r=VM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return VM(t,{file:i,...e||n})}}function WM(e){if(e)throw e}var e_,GM;function Vde(){if(GM)return e_;GM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},a=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!d)return!1;var p;for(p in f);return typeof p>"u"||e.call(f,p)},o=function(f,h){t&&h.name==="__proto__"?t(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(i)return i(f,h).value}else return;return f[h]};return e_=function c(){var f,h,d,p,v,b,w=arguments[0],k=1,_=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(f=arguments[k],f!=null)for(h in f)d=l(w,h),p=l(f,h),w!==p&&(C&&p&&(a(p)||(v=r(p)))?(v?(v=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:c(C,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},e_}var Wde=Vde();const n_=yt(Wde);function r4(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gde(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(c,...f){const h=e[++a];let d=-1;if(c){o(c);return}for(;++do.length;let c;l&&o.push(r);try{c=e.apply(this,o)}catch(f){const h=f;if(l&&t)throw h;return r(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,r):c instanceof Error?r(c):a(c))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const io={basename:Kde,dirname:Xde,extname:Zde,join:Qde,sep:"/"};function Kde(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');gp(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function Xde(e){if(gp(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Zde(e){gp(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function Qde(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ehe(e,n){let t="",i=0,r=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",i=0):(t=t.slice(0,c),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function gp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const nhe={cwd:the};function the(){return"/"}function a4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ihe(e){if(typeof e=="string")e=new URL(e);else if(!a4(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return rhe(e)}function rhe(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...b]=h;const w=i[p][1];r4(w)&&r4(v)&&(v=n_(!0,w,v)),i[p]=[f,v,...b]}}}}const lhe=new D9().freeze();function a_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function o_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function s_(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function KM(e){if(!r4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function XM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Xv(e){return uhe(e)?e:new aH(e)}function uhe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function che(e){return typeof e=="string"||fhe(e)}function fhe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dhe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ZM=[],QM={allowDangerousHtml:!0},hhe=/^(https?|ircs?|mailto|xmpp)$/i,mhe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function phe(e){const n=vhe(e),t=ghe(e);return yhe(n.runSync(n.parse(t),t),e)}function vhe(e){const n=e.rehypePlugins||ZM,t=e.remarkPlugins||ZM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...QM}:QM;return lhe().use(Kfe).use(t).use(Ude,i).use(n)}function ghe(e){const n=e.children||"",t=new aH;return typeof n=="string"&&(t.value=n),t}function yhe(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,c=n.urlTransform||bhe;for(const h of mhe)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+dhe+h.id,void 0);return M9(e,f),Due(e,{Fragment:g.Fragment,components:r,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Zk)if(Object.hasOwn(Zk,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=Zk[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=c(String(b||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function bhe(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||hhe.test(e.slice(0,n))?e:""}function JM(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function whe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function khe(e,n,t){const r=_0((t||{}).ignore||[]),a=_he(n);let o=-1;for(;++o0?{type:"text",value:O}:void 0),O===!1?p.lastIndex=E+1:(b!==E&&C.push({type:"text",value:f.value.slice(b,E)}),Array.isArray(O)?C.push(...O):O&&C.push(O),b=E+x[0].length,_=!0),!p.global)break;x=p.exec(f.value)}return _?(b?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=JM(e,"(");let a=JM(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function oH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Su(t)||b0(t))&&(!n||t!==47)}sH.peek=Vhe;function zhe(){this.buffer()}function Lhe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ihe(){this.buffer()}function Bhe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Fhe(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ha(this.sliceSerialize(e)).toLowerCase(),t.label=n}function qhe(e){this.exit(e)}function Hhe(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ha(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Uhe(e){this.exit(e)}function Vhe(){return"["}function sH(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function Whe(){return{enter:{gfmFootnoteCallString:zhe,gfmFootnoteCall:Lhe,gfmFootnoteDefinitionLabelString:Ihe,gfmFootnoteDefinition:Bhe},exit:{gfmFootnoteCallString:Fhe,gfmFootnoteCall:qhe,gfmFootnoteDefinitionLabelString:Hhe,gfmFootnoteDefinition:Uhe}}}function Ghe(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:sH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let c=l.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return c+=l.move(a.safe(a.associationId(i),{before:c,after:"]"})),h(),c+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),c+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?lH:Yhe))),f(),c}}function Yhe(e,n,t){return n===0?e:lH(e,n,t)}function lH(e,n,t){return(t?"":" ")+e}const Khe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uH.peek=eme;function Xhe(){return{canContainEols:["delete"],enter:{strikethrough:Qhe},exit:{strikethrough:Jhe}}}function Zhe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Khe}],handlers:{delete:uH}}}function Qhe(e){this.enter({type:"delete",children:[]},e)}function Jhe(e){this.exit(e)}function uH(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function eme(){return"~"}function nme(e){return e.length}function tme(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||nme,a=[],o=[],l=[],c=[];let f=0,h=-1;for(;++hf&&(f=e[h].length);++_c[_])&&(c[_]=x)}w.push(C)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++dc[d]&&(c[d]=C),v[d]=C),p[d]=x}o.splice(1,0,p),l.splice(1,0,v),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),ame);return r(),o}function ame(e,n,t){return">"+(t?"":" ")+e}function ome(e,n){return n8(e,n.inConstruct,!0)&&!n8(e,n.notInConstruct,!1)}function n8(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function lme(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ume(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function cme(e,n,t,i){const r=ume(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(lme(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,fme);return d(),p}const l=t.createTracker(i),c=r.repeat(Math.max(sme(a,r)+1,3)),f=t.enter("codeFenced");let h=l.move(c);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` `,encode:["`"],...l.current()})),d()}return h+=l.move(` `),a&&(h+=l.move(a+` -`)),h+=l.move(c),f(),h}function Whe(e,n,t){return(t?"":" ")+e}function M9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Ghe(e,n,t,i){const r=M9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(i);let f=c.move("[");return f+=c.move(t.safe(t.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(t.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=t.enter("destinationRaw"),f+=c.move(t.safe(e.url,{before:f,after:e.title?" ":` -`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=c.move(" "+r),f+=c.move(t.safe(e.title,{before:f,after:r,...c.current()})),f+=c.move(r),l()),o(),f}function Yhe(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function am(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jg(e,n,t){const i=af(e),r=af(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}eH.peek=Khe;function eH(e,n,t,i){const r=Yhe(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let c=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=c.charCodeAt(0),h=Jg(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(c=am(f)+c.slice(1));const d=c.charCodeAt(c.length-1),p=Jg(i.after.charCodeAt(0),d,r);p.inside&&(c=c.slice(0,-1)+am(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+v}function Khe(e,n,t){return t.options.emphasis||"*"}function Xhe(e,n){let t=!1;return E9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,n4}),!!((!e.depth||e.depth<3)&&_9(e)&&(n.options.setext||t))}function Zhe(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(Xhe(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`)),h+=l.move(c),f(),h}function fme(e,n,t){return(t?"":" ")+e}function R9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function dme(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(i);let f=c.move("[");return f+=c.move(t.safe(t.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(t.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=t.enter("destinationRaw"),f+=c.move(t.safe(e.url,{before:f,after:e.title?" ":` +`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=c.move(" "+r),f+=c.move(t.safe(e.title,{before:f,after:r,...c.current()})),f+=c.move(r),l()),o(),f}function hme(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function cm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function n1(e,n,t){const i=sf(e),r=sf(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}cH.peek=mme;function cH(e,n,t,i){const r=hme(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let c=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=c.charCodeAt(0),h=n1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(c=cm(f)+c.slice(1));const d=c.charCodeAt(c.length-1),p=n1(i.after.charCodeAt(0),d,r);p.inside&&(c=c.slice(0,-1)+cm(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+v}function mme(e,n,t){return t.options.emphasis||"*"}function pme(e,n){let t=!1;return M9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,t4}),!!((!e.depth||e.depth<3)&&S9(e)&&(n.options.setext||t))}function vme(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(pme(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` `,after:` `});return d(),h(),p+` `+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),c=t.enter("phrasing");a.move(o+" ");let f=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(f)&&(f=am(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,t.options.closeAtx&&(f+=" "+o),c(),l(),f}nH.peek=Qhe;function nH(e){return e.value||""}function Qhe(){return"<"}tH.peek=Jhe;function tH(e,n,t,i){const r=M9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(i);let f=c.move("![");return f+=c.move(t.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(t.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=t.enter("destinationRaw"),f+=c.move(t.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=c.move(" "+r),f+=c.move(t.safe(e.title,{before:f,after:r,...c.current()})),f+=c.move(r),l()),f+=c.move(")"),o(),f}function Jhe(){return"!"}iH.peek=eme;function iH(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let c=l.move("![");const f=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?c+=l.move(d+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function eme(){return"!"}rH.peek=nme;function rH(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}oH.peek=tme;function oH(e,n,t,i){const r=M9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,c;if(aH(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),c=t.enter("label");let f=o.move("[");return f+=o.move(t.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(t.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(c=t.enter("destinationRaw"),f+=o.move(t.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),f+=o.move(" "+r),f+=o.move(t.safe(e.title,{before:f,after:r,...o.current()})),f+=o.move(r),c()),f+=o.move(")"),l(),f}function tme(e,n,t){return aH(e,t)?"<":"["}sH.peek=ime;function sH(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let c=l.move("[");const f=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?c+=l.move(d+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function ime(){return"["}function D9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function rme(e){const n=D9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function ame(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function lH(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function ome(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?ame(t):D9(t);const l=e.ordered?o==="."?")":".":rme(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),lH(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,l.current()),h);return c(),f;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function ume(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const cme=w0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fme(e,n,t,i){return(e.children.some(function(o){return cme(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function dme(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}uH.peek=hme;function uH(e,n,t,i){const r=dme(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let c=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=c.charCodeAt(0),h=Jg(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(c=am(f)+c.slice(1));const d=c.charCodeAt(c.length-1),p=Jg(i.after.charCodeAt(0),d,r);p.inside&&(c=c.slice(0,-1)+am(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+v}function hme(e,n,t){return t.options.strong||"*"}function mme(e,n,t,i){return t.safe(e.value,i)}function pme(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function vme(e,n,t){const i=(lH(t)+(t.options.ruleSpaces?" ":"")).repeat(pme(t));return t.options.ruleSpaces?i.slice(0,-1):i}const cH={blockquote:Ihe,break:XM,code:Vhe,definition:Ghe,emphasis:eH,hardBreak:XM,heading:Zhe,html:nH,image:tH,imageReference:iH,inlineCode:rH,link:oH,linkReference:sH,list:ome,listItem:lme,paragraph:ume,root:fme,strong:uH,text:mme,thematicBreak:vme};function gme(){return{enter:{table:yme,tableData:ZM,tableHeader:ZM,tableRow:wme},exit:{codeText:kme,table:bme,tableData:u_,tableHeader:u_,tableRow:u_}}}function yme(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function bme(e){this.exit(e),this.data.inTable=void 0}function wme(e){this.enter({type:"tableRow",children:[]},e)}function u_(e){this.exit(e)}function ZM(e){this.enter({type:"tableCell",children:[]},e)}function kme(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,_me));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function _me(e,n){return n==="|"?n:e}function xme(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...a.current()});return/^[\t ]/.test(f)&&(f=cm(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,t.options.closeAtx&&(f+=" "+o),c(),l(),f}fH.peek=gme;function fH(e){return e.value||""}function gme(){return"<"}dH.peek=yme;function dH(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(i);let f=c.move("![");return f+=c.move(t.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(t.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=t.enter("destinationRaw"),f+=c.move(t.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),f+=c.move(" "+r),f+=c.move(t.safe(e.title,{before:f,after:r,...c.current()})),f+=c.move(r),l()),f+=c.move(")"),o(),f}function yme(){return"!"}hH.peek=bme;function hH(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let c=l.move("![");const f=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?c+=l.move(d+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function bme(){return"!"}mH.peek=wme;function mH(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}vH.peek=kme;function vH(e,n,t,i){const r=R9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,c;if(pH(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),c=t.enter("label");let f=o.move("[");return f+=o.move(t.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(t.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(c=t.enter("destinationRaw"),f+=o.move(t.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),f+=o.move(" "+r),f+=o.move(t.safe(e.title,{before:f,after:r,...o.current()})),f+=o.move(r),c()),f+=o.move(")"),l(),f}function kme(e,n,t){return pH(e,t)?"<":"["}gH.peek=_me;function gH(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let c=l.move("[");const f=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!f||f!==d?c+=l.move(d+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function _me(){return"["}function P9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function xme(e){const n=P9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Sme(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function yH(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Cme(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Sme(t):P9(t);const l=e.ordered?o==="."?")":".":xme(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),yH(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,l.current()),h);return c(),f;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function Ome(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const Eme=_0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tme(e,n,t,i){return(e.children.some(function(o){return Eme(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Mme(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}bH.peek=Dme;function bH(e,n,t,i){const r=Mme(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let c=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const f=c.charCodeAt(0),h=n1(i.before.charCodeAt(i.before.length-1),f,r);h.inside&&(c=cm(f)+c.slice(1));const d=c.charCodeAt(c.length-1),p=n1(i.after.charCodeAt(0),d,r);p.inside&&(c=c.slice(0,-1)+cm(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+c+v}function Dme(e,n,t){return t.options.strong||"*"}function Rme(e,n,t,i){return t.safe(e.value,i)}function Pme(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Nme(e,n,t){const i=(yH(t)+(t.options.ruleSpaces?" ":"")).repeat(Pme(t));return t.options.ruleSpaces?i.slice(0,-1):i}const wH={blockquote:rme,break:t8,code:cme,definition:dme,emphasis:cH,hardBreak:t8,heading:vme,html:fH,image:dH,imageReference:hH,inlineCode:mH,link:vH,linkReference:gH,list:Cme,listItem:jme,paragraph:Ome,root:Tme,strong:bH,text:Rme,thematicBreak:Nme};function $me(){return{enter:{table:zme,tableData:i8,tableHeader:i8,tableRow:Ime},exit:{codeText:Bme,table:Lme,tableData:f_,tableHeader:f_,tableRow:f_}}}function zme(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Lme(e){this.exit(e),this.data.inTable=void 0}function Ime(e){this.enter({type:"tableRow",children:[]},e)}function f_(e){this.exit(e)}function i8(e){this.enter({type:"tableCell",children:[]},e)}function Bme(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Fme));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Fme(e,n){return n==="|"?n:e}function qme(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:l}};function o(v,b,w,k){return f(h(v,w,k),v.align)}function l(v,b,w,k){const _=d(v,w,k),C=f([_]);return C.slice(0,C.indexOf(` -`))}function c(v,b,w,k){const _=w.enter("tableCell"),C=w.enter("phrasing"),x=w.containerPhrasing(v,{...k,before:a,after:a});return C(),_(),x}function f(v,b){return zhe(v,{align:b,alignDelimiters:i,padding:t,stringLength:r})}function h(v,b,w){const k=v.children;let _=-1;const C=[],x=b.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Fme={tokenize:Kme,partial:!0};function qme(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Wme,continuation:{tokenize:Gme},exit:Yme}},text:{91:{name:"gfmFootnoteCall",tokenize:Vme},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Hme,resolveTo:Ume}}}}function Hme(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const c=i.events[r][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const f=qa(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Ume(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function Vme(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(d){if(a>999||d===93&&!o||d===null||d===91||Pt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(qa(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Pt(d)||(o=!0),a++,e.consume(d),d===92?h:f}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function Wme(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||Pt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=qa(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Pt(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),r.includes(a)||r.push(a),st(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function Gme(e,n,t){return e.check(fp,n,e.attempt(Fme,n,t))}function Yme(e){e.exit("gfmFootnoteDefinition")}function Kme(e,n,t){const i=this;return st(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function Xme(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let c=-1;for(;++c1?c(b):(o.consume(b),d++,v);if(d<2&&!t)return c(b);const k=o.exit("strikethroughSequenceTemporary"),_=af(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class Zme{constructor(){this.map=[]}add(n,t,i){Qme(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function Qme(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[L][1].type;if(U==="lineEnding"||U==="linePrefix")L--;else break}const H=L>-1?i.events[L][1].type:null,G=H==="tableHead"||H==="tableRow"?j:c;return G===j&&i.parser.lazy[i.now().line]?t(P):G(P)}function c(P){return e.enter("tableHead"),e.enter("tableRow"),f(P)}function f(P){return P===124||(o=!0,a+=1),h(P)}function h(P){return P===null?t(P):_n(P)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):t(P):Qn(P)?st(e,h,"whitespace")(P):(a+=1,o&&(o=!1,r+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(P)))}function d(P){return P===null||P===124||Pt(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?p:d)}function p(P){return P===92||P===124?(e.consume(P),d):d(P)}function v(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(P):(e.enter("tableDelimiterRow"),o=!1,Qn(P)?st(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?k(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),w):O(P)}function w(P){return Qn(P)?st(e,k,"whitespace")(P):k(P)}function k(P){return P===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(a+=1,_(P)):P===null||_n(P)?E(P):O(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),C(P)):O(P)}function C(P){return P===45?(e.consume(P),C):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(P))}function x(P){return Qn(P)?st(e,E,"whitespace")(P):E(P)}function E(P){return P===124?b(P):P===null||_n(P)?!o||r!==a?O(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):O(P)}function O(P){return t(P)}function j(P){return e.enter("tableRow"),M(P)}function M(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),M):P===null||_n(P)?(e.exit("tableRow"),n(P)):Qn(P)?st(e,M,"whitespace")(P):(e.enter("data"),N(P))}function N(P){return P===null||P===124||Pt(P)?(e.exit("data"),M(P)):(e.consume(P),P===92?q:N)}function q(P){return P===92||P===124?(e.consume(P),N):N(P)}}function tpe(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,f,h,d;const p=new Zme;for(;++tt[2]+1){const b=t[2]+1,w=t[3]-t[2]-1;e.add(b,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Ic(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function JM(e,n,t,i,r){const a=[],o=Ic(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function Ic(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const ipe={name:"tasklistCheck",tokenize:ape};function rpe(){return{text:{91:ipe}}}function ape(e,n,t){const i=this;return r;function r(c){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Pt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return _n(c)?n(c):Qn(c)?e.check({tokenize:ope},n,t)(c):t(c)}}function ope(e,n,t){return st(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function spe(e){return Eq([Dme(),qme(),Xme(e),epe(),rpe()])}const lpe={};function upe(e){const n=this,t=e||lpe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(spe(t)),a.push(jme()),o.push(Eme(t))}const o4="kanban_chat_v1";function cpe(){try{const e=localStorage.getItem(o4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function fpe({onBoardChange:e}){const[n,t]=A.useState(()=>cpe()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,c]=A.useState(""),[f,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(o4,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,f,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),c(""),h([]);let C="";const x=[];let E=!1;const O=j=>{switch(j.type){case"delta":C+=j.text,c(C);break;case"tool_use":{const M={tool:j.tool,ok:!0,input:j.input};x.push(M),h([...x]);break}case"tool_result":{for(let M=x.length-1;M>=0;M--){const N=x[M];if(N.error===void 0&&N.ok){j.is_error&&(N.ok=!1,N.error=j.result||"tool error");break}}h([...x]);break}case"result":j.text&&C.trim()===""&&(C=j.text,c(C));break;case"done":j.board_changed&&(E=!0);break;case"error":C=`Error: ${j.error}`,c(C);break}};try{const j=_.map(M=>({role:M.role,content:M.content}));await nre(j,O)}catch(j){const M=j.message;Pn.show({color:"red",message:M}),C=C||`Error: ${M}`}finally{const j={role:"assistant",content:C,ts:Date.now(),tool_calls:x.length>0?x:void 0};t(M=>[...M,j]),c(""),h([]),o(!1),E&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(o4)};return y.jsxs(Hn,{gap:0,h:"100%",children:[y.jsxs(He,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsxs(He,{gap:6,children:[y.jsx(uq,{size:18}),y.jsx(Ce,{fw:600,size:"sm",children:"Asistente"})]}),y.jsx(Qt,{label:"Limpiar conversacion",withArrow:!0,children:y.jsx(wt,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:y.jsx(xu,{size:14})})})]}),y.jsx(Wr,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:y.jsxs(Hn,{gap:"xs",children:[n.length===0&&!a&&y.jsxs(Ce,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",y.jsx("br",{}),'- "crea columna Backlog"',y.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',y.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>y.jsx(e8,{msg:w},k)),a&&y.jsx(e8,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:f.length>0?f:void 0},streaming:!0}),a&&l===""&&f.length===0&&y.jsxs(He,{gap:6,pl:"xs",children:[y.jsx(bi,{size:"xs"}),y.jsx(Ce,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),y.jsx(Hn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:y.jsxs(He,{align:"flex-end",gap:4,wrap:"nowrap",children:[y.jsx(bu,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),y.jsx(wt,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?y.jsx(bi,{size:"xs",color:"white"}):y.jsx(fq,{size:16})})]})})]})}function e8({msg:e,streaming:n=!1}){const t=e.role==="user";return y.jsx(Mt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:y.jsxs(Hn,{gap:4,children:[e.content&&y.jsx(me,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:y.jsx(Xde,{remarkPlugins:[upe],children:e.content})}),n&&e.content&&y.jsx(me,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&y.jsx(He,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>y.jsxs(ot,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?y.jsx(bi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const dpe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function hpe({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=A.useState(null),[o,l]=A.useState(new Date),[c,f]=A.useState(null),[h,d]=A.useState(null),[p,v]=A.useState(!1);A.useEffect(()=>{let x=!1;v(!0);const E=Le(o).startOf("month").format("YYYY-MM-DD"),O=Le(o).endOf("month").format("YYYY-MM-DD");return eF({from:E,to:O,assignee_id:c||void 0}).then(j=>{x||d(j)}).finally(()=>{x||v(!1)}),()=>{x=!0}},[o,c]);const b=A.useMemo(()=>e.map(x=>({value:x.id,label:x.display_name||x.username})),[e]),w=A.useMemo(()=>{const x=new Map;if(!h)return x;for(const E of h.created_daily){const O=x.get(E.date)??{created:0,done:0,deadlines:[]};O.created=E.count,x.set(E.date,O)}for(const E of h.throughput_daily){const O=x.get(E.date)??{created:0,done:0,deadlines:[]};O.done=E.count,x.set(E.date,O)}for(const E of n){if(!E.deadline||E.deleted_at)continue;const O=E.deadline.slice(0,10),j=x.get(O)??{created:0,done:0,deadlines:[]};j.deadlines.push(E),x.set(O,j)}return x},[h,n]),k=A.useMemo(()=>{const x=Le(o).startOf("month"),E=Le(o).endOf("month"),O=(x.day()+6)%7,j=[];for(let M=0;MArray.from(w.values()).reduce((x,E)=>x+E.created,0),[w]),C=A.useMemo(()=>Array.from(w.values()).reduce((x,E)=>x+E.done,0),[w]);return y.jsx(me,{p:"md",children:y.jsxs(Hn,{gap:"md",children:[y.jsxs(He,{justify:"space-between",children:[y.jsx(yl,{order:3,children:"Calendario"}),y.jsxs(He,{gap:"xs",wrap:"nowrap",children:[y.jsx(f9,{label:"Mes",size:"xs",value:o,onChange:x=>x&&l(typeof x=="string"?new Date(x):x),style:{minWidth:160},clearable:!1}),y.jsx(ya,{label:"Asignado",size:"xs",placeholder:"Todos",value:c,onChange:f,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),y.jsxs(He,{gap:"md",children:[y.jsx(Mt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(He,{gap:6,children:[y.jsx(rf,{size:14,color:"var(--mantine-color-blue-5)"}),y.jsx(Ce,{size:"sm",fw:600,children:_}),y.jsx(Ce,{size:"xs",c:"dimmed",children:"creadas"})]})}),y.jsx(Mt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(He,{gap:6,children:[y.jsx(im,{size:14,color:"var(--mantine-color-green-5)"}),y.jsx(Ce,{size:"sm",fw:600,children:C}),y.jsx(Ce,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?y.jsx(Bf,{p:"xl",children:y.jsx(bi,{})}):y.jsxs(Mt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Vo,{cols:7,spacing:4,mb:4,children:dpe.map(x=>y.jsx(Ce,{size:"xs",c:"dimmed",ta:"center",fw:600,children:x},x))}),y.jsx(Vo,{cols:7,spacing:4,children:k.map((x,E)=>{if(!x.date)return y.jsx(me,{style:{minHeight:72}},E);const O=w.get(x.date)??{created:0,done:0,deadlines:[]},j=parseInt(x.date.slice(8,10),10),M=x.date===Le().format("YYYY-MM-DD"),N=Le().startOf("day").valueOf(),P=Le(x.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":O.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:y.jsxs(Hn,{gap:2,children:[y.jsx(Ot,{onClick:()=>x.date&&(i==null?void 0:i(x.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${x.date}`,children:y.jsx(Ce,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:j})}),O.created>0&&y.jsxs(He,{gap:3,wrap:"nowrap",children:[y.jsx(rf,{size:10,color:"var(--mantine-color-blue-5)"}),y.jsx(Ce,{size:"xs",c:"blue",children:O.created})]}),O.done>0&&y.jsxs(He,{gap:3,wrap:"nowrap",children:[y.jsx(im,{size:10,color:"var(--mantine-color-green-5)"}),y.jsx(Ce,{size:"xs",c:"green",children:O.done})]}),O.deadlines.length>0&&y.jsxs(jn,{opened:r===x.date,onChange:L=>a(L?x.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[y.jsx(jn.Target,{children:y.jsx(Ot,{onClick:()=>a(r===x.date?null:x.date),style:{textAlign:"left"},children:y.jsx(Hn,{gap:1,children:y.jsxs(He,{gap:3,wrap:"nowrap",children:[y.jsx(Yg,{size:10,color:P?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),y.jsxs(Ce,{size:"xs",c:P?"red":"orange",fw:700,td:"underline",children:[O.deadlines.length," deadline",O.deadlines.length===1?"":"s"]})]})})})}),y.jsx(jn.Dropdown,{p:6,children:y.jsxs(Hn,{gap:2,children:[y.jsxs(Ce,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Le(x.date).format("DD/MM/YYYY")]}),O.deadlines.map(L=>y.jsx(Ot,{onClick:()=>{a(null),t==null||t(L.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:y.jsxs(He,{gap:6,wrap:"nowrap",children:[y.jsxs(Ce,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(L.seq_num).padStart(5,"0")]}),y.jsx(Ce,{size:"xs",lineClamp:1,title:L.title,children:L.title})]})},L.id))]})})]})]})},E)})})]})]})})}function bH(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var mpe={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function ppe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[c,f]=l;return c===i?o:{...o,[c]:f}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function vpe(e,n){const t=ppe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function n8(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const gpe={type:"area",showColor:!0},P9=Re(e=>{var P,L;const n=be("ChartTooltip",gpe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:c,label:f,unit:h,type:d,segmentId:p,mod:v,series:b,valueFormatter:w,showColor:k,attributes:_,...C}=n,x=ui(),E=Xe({name:"ChartTooltip",classes:mpe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!c)return null;const O=vpe(c,p),j=d==="scatter"?(L=(P=c[0])==null?void 0:P.payload)==null?void 0:L.name:null,M=bH(b),N=f||j,q=O.map(H=>y.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[y.jsxs("div",{...E("tooltipItemBody"),children:[k&&y.jsx("svg",{...E("tooltipItemColor"),children:y.jsx("circle",{r:6,fill:lt(H.color,x),width:12,height:12,cx:6,cy:6})}),y.jsx("div",{...E("tooltipItemName"),children:M[H.name]||H.name})]}),y.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(n8(H,d)):n8(H,d),h||H.unit]})]},(H==null?void 0:H.key)??H.name));return y.jsxs(me,{...E("tooltip"),mod:[{type:d},v],...C,children:[N&&y.jsx("div",{...E("tooltipLabel"),children:N}),y.jsx("div",{...E("tooltipBody"),children:q})]})});P9.displayName="@mantine/charts/ChartTooltip";var wH={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function ype(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function bpe(e){return ype(e.filter(n=>n.color!=="none"))}const _0=Re(e=>{const n=be("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:c,onHighlight:f,legendPosition:h,mod:d,series:p,showColor:v,centered:b,attributes:w,...k}=n,_=Xe({name:"ChartLegend",classes:wH,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!c)return null;const C=bpe(c),x=bH(p),E=C.map((O,j)=>y.jsxs("div",{..._("legendItem"),onMouseEnter:()=>f(O.dataKey),onMouseLeave:()=>f(null),"data-without-color":v===!1||void 0,children:[y.jsx(Ff,{color:O.color,size:12,..._("legendItemColor"),withShadow:!1}),y.jsx("p",{..._("legendItemName"),children:x[O.dataKey]||O.dataKey})]},j));return y.jsx(me,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:E})});_0.displayName="@mantine/charts/ChartLegend";_0.classes=wH;function wpe({x:e,y:n,value:t,valueFormatter:i}){return y.jsx("g",{transform:`translate(${e},${n})`,children:y.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var x0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},c_,t8;function Sr(){if(t8)return c_;t8=1;var e=Array.isArray;return c_=e,c_}var f_,i8;function kH(){if(i8)return f_;i8=1;var e=typeof Dv=="object"&&Dv&&Dv.Object===Object&&Dv;return f_=e,f_}var d_,r8;function ko(){if(r8)return d_;r8=1;var e=kH(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return d_=t,d_}var h_,a8;function hp(){if(a8)return h_;a8=1;var e=ko(),n=e.Symbol;return h_=n,h_}var m_,o8;function kpe(){if(o8)return m_;o8=1;var e=hp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),c=o[r];try{o[r]=void 0;var f=!0}catch{}var h=i.call(o);return f&&(l?o[r]=c:delete o[r]),h}return m_=a,m_}var p_,s8;function _pe(){if(s8)return p_;s8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return p_=t,p_}var v_,l8;function vs(){if(l8)return v_;l8=1;var e=hp(),n=kpe(),t=_pe(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return v_=o,v_}var g_,u8;function gs(){if(u8)return g_;u8=1;function e(n){return n!=null&&typeof n=="object"}return g_=e,g_}var y_,c8;function ed(){if(c8)return y_;c8=1;var e=vs(),n=gs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return y_=i,y_}var b_,f8;function N9(){if(f8)return b_;f8=1;var e=Sr(),n=ed(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return b_=r,b_}var w_,d8;function _l(){if(d8)return w_;d8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return w_=e,w_}var k_,h8;function $9(){if(h8)return k_;h8=1;var e=vs(),n=_l(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var c=e(l);return c==i||c==r||c==t||c==a}return k_=o,k_}var __,m8;function xpe(){if(m8)return __;m8=1;var e=ko(),n=e["__core-js_shared__"];return __=n,__}var x_,p8;function Spe(){if(p8)return x_;p8=1;var e=xpe(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return x_=t,x_}var S_,v8;function _H(){if(v8)return S_;v8=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return S_=t,S_}var C_,g8;function Cpe(){if(g8)return C_;g8=1;var e=$9(),n=Spe(),t=_l(),i=_H(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return C_=d,C_}var A_,y8;function Ape(){if(y8)return A_;y8=1;function e(n,t){return n==null?void 0:n[t]}return A_=e,A_}var O_,b8;function Iu(){if(b8)return O_;b8=1;var e=Cpe(),n=Ape();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return O_=t,O_}var j_,w8;function S0(){if(w8)return j_;w8=1;var e=Iu(),n=e(Object,"create");return j_=n,j_}var E_,k8;function Ope(){if(k8)return E_;k8=1;var e=S0();function n(){this.__data__=e?e(null):{},this.size=0}return E_=n,E_}var T_,_8;function jpe(){if(_8)return T_;_8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return T_=e,T_}var M_,x8;function Epe(){if(x8)return M_;x8=1;var e=S0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return M_=r,M_}var D_,S8;function Tpe(){if(S8)return D_;S8=1;var e=S0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return D_=i,D_}var R_,C8;function Mpe(){if(C8)return R_;C8=1;var e=S0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return R_=t,R_}var P_,A8;function Dpe(){if(A8)return P_;A8=1;var e=Ope(),n=jpe(),t=Epe(),i=Tpe(),r=Mpe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l-1}return B_=n,B_}var F_,R8;function zpe(){if(R8)return F_;R8=1;var e=C0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return F_=n,F_}var q_,P8;function A0(){if(P8)return q_;P8=1;var e=Rpe(),n=Ppe(),t=Npe(),i=$pe(),r=zpe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const ope={tokenize:mpe,partial:!0};function spe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:fpe,continuation:{tokenize:dpe},exit:hpe}},text:{91:{name:"gfmFootnoteCall",tokenize:cpe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lpe,resolveTo:upe}}}}function lpe(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const c=i.events[r][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const f=Ha(i.sliceSerialize({start:o.end,end:i.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function upe(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function cpe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(d){if(a>999||d===93&&!o||d===null||d===91||Nt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(Ha(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Nt(d)||(o=!0),a++,e.consume(d),d===92?h:f}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function fpe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||Nt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Ha(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Nt(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),r.includes(a)||r.push(a),ct(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function dpe(e,n,t){return e.check(vp,n,e.attempt(ope,n,t))}function hpe(e){e.exit("gfmFootnoteDefinition")}function mpe(e,n,t){const i=this;return ct(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function ppe(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let c=-1;for(;++c1?c(b):(o.consume(b),d++,v);if(d<2&&!t)return c(b);const k=o.exit("strikethroughSequenceTemporary"),_=sf(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class vpe{constructor(){this.map=[]}add(n,t,i){gpe(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function gpe(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const V=i.events[L][1].type;if(V==="lineEnding"||V==="linePrefix")L--;else break}const F=L>-1?i.events[L][1].type:null,Y=F==="tableHead"||F==="tableRow"?O:c;return Y===O&&i.parser.lazy[i.now().line]?t(R):Y(R)}function c(R){return e.enter("tableHead"),e.enter("tableRow"),f(R)}function f(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):xn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Jn(R)?ct(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Nt(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Jn(R)?ct(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):b(R))}function b(R){return R===45||R===58?k(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),w):j(R)}function w(R){return Jn(R)?ct(e,k,"whitespace")(R):k(R)}function k(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||xn(R)?E(R):j(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),C(R)):j(R)}function C(R){return R===45?(e.consume(R),C):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(R))}function x(R){return Jn(R)?ct(e,E,"whitespace")(R):E(R)}function E(R){return R===124?b(R):R===null||xn(R)?!o||r!==a?j(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):j(R)}function j(R){return t(R)}function O(R){return e.enter("tableRow"),M(R)}function M(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),M):R===null||xn(R)?(e.exit("tableRow"),n(R)):Jn(R)?ct(e,M,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||Nt(R)?(e.exit("data"),M(R)):(e.consume(R),R===92?q:N)}function q(R){return R===92||R===124?(e.consume(R),N):N(R)}}function kpe(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,f,h,d;const p=new vpe;for(;++tt[2]+1){const b=t[2]+1,w=t[3]-t[2]-1;e.add(b,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Fc(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function a8(e,n,t,i,r){const a=[],o=Fc(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function Fc(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const _pe={name:"tasklistCheck",tokenize:Spe};function xpe(){return{text:{91:_pe}}}function Spe(e,n,t){const i=this;return r;function r(c){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Nt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return xn(c)?n(c):Jn(c)?e.check({tokenize:Cpe},n,t)(c):t(c)}}function Cpe(e,n,t){return ct(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Ape(e){return Iq([Zme(),spe(),ppe(e),bpe(),xpe()])}const jpe={};function Ope(e){const n=this,t=e||jpe,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Ape(t)),a.push(Gme()),o.push(Yme(t))}const s4="kanban_chat_v1";function Epe(){try{const e=localStorage.getItem(s4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Tpe({onBoardChange:e}){const[n,t]=A.useState(()=>Epe()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,c]=A.useState(""),[f,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(s4,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,f,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),c(""),h([]);let C="";const x=[];let E=!1;const j=O=>{switch(O.type){case"delta":C+=O.text,c(C);break;case"tool_use":{const M={tool:O.tool,ok:!0,input:O.input};x.push(M),h([...x]);break}case"tool_result":{for(let M=x.length-1;M>=0;M--){const N=x[M];if(N.error===void 0&&N.ok){O.is_error&&(N.ok=!1,N.error=O.result||"tool error");break}}h([...x]);break}case"result":O.text&&C.trim()===""&&(C=O.text,c(C));break;case"done":O.board_changed&&(E=!0);break;case"error":C=`Error: ${O.error}`,c(C);break}};try{const O=_.map(M=>({role:M.role,content:M.content}));await pre(O,j)}catch(O){const M=O.message;wn.show({color:"red",message:M}),C=C||`Error: ${M}`}finally{const O={role:"assistant",content:C,ts:Date.now(),tool_calls:x.length>0?x:void 0};t(M=>[...M,O]),c(""),h([]),o(!1),E&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(s4)};return g.jsxs($n,{gap:0,h:"100%",children:[g.jsxs(ze,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[g.jsxs(ze,{gap:6,children:[g.jsx(yq,{size:18}),g.jsx(xe,{fw:600,size:"sm",children:"Asistente"})]}),g.jsx(Zt,{label:"Limpiar conversacion",withArrow:!0,children:g.jsx(vt,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:g.jsx(gl,{size:14})})})]}),g.jsx(fr,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:g.jsxs($n,{gap:"xs",children:[n.length===0&&!a&&g.jsxs(xe,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",g.jsx("br",{}),'- "crea columna Backlog"',g.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',g.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>g.jsx(o8,{msg:w},k)),a&&g.jsx(o8,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:f.length>0?f:void 0},streaming:!0}),a&&l===""&&f.length===0&&g.jsxs(ze,{gap:6,pl:"xs",children:[g.jsx(ai,{size:"xs"}),g.jsx(xe,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),g.jsx($n,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:g.jsxs(ze,{align:"flex-end",gap:4,wrap:"nowrap",children:[g.jsx(pl,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),g.jsx(vt,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?g.jsx(ai,{size:"xs",color:"white"}):g.jsx(kq,{size:16})})]})})]})}function o8({msg:e,streaming:n=!1}){const t=e.role==="user";return g.jsx(Dt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:g.jsxs($n,{gap:4,children:[e.content&&g.jsx(he,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:g.jsx(phe,{remarkPlugins:[Ope],children:e.content})}),n&&e.content&&g.jsx(he,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&g.jsx(ze,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>g.jsxs(it,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?g.jsx(ai,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Mpe=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Dpe({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=A.useState(null),[o,l]=A.useState(new Date),[c,f]=A.useState(null),[h,d]=A.useState(null),[p,v]=A.useState(!1);A.useEffect(()=>{let x=!1;v(!0);const E=Ie(o).startOf("month").format("YYYY-MM-DD"),j=Ie(o).endOf("month").format("YYYY-MM-DD");return uF({from:E,to:j,assignee_id:c||void 0}).then(O=>{x||d(O)}).finally(()=>{x||v(!1)}),()=>{x=!0}},[o,c]);const b=A.useMemo(()=>e.map(x=>({value:x.id,label:x.display_name||x.username})),[e]),w=A.useMemo(()=>{const x=new Map;if(!h)return x;for(const E of h.created_daily){const j=x.get(E.date)??{created:0,done:0,deadlines:[]};j.created=E.count,x.set(E.date,j)}for(const E of h.throughput_daily){const j=x.get(E.date)??{created:0,done:0,deadlines:[]};j.done=E.count,x.set(E.date,j)}for(const E of n){if(!E.deadline||E.deleted_at)continue;const j=E.deadline.slice(0,10),O=x.get(j)??{created:0,done:0,deadlines:[]};O.deadlines.push(E),x.set(j,O)}return x},[h,n]),k=A.useMemo(()=>{const x=Ie(o).startOf("month"),E=Ie(o).endOf("month"),j=(x.day()+6)%7,O=[];for(let M=0;MArray.from(w.values()).reduce((x,E)=>x+E.created,0),[w]),C=A.useMemo(()=>Array.from(w.values()).reduce((x,E)=>x+E.done,0),[w]);return g.jsx(he,{p:"md",children:g.jsxs($n,{gap:"md",children:[g.jsxs(ze,{justify:"space-between",children:[g.jsx(xl,{order:3,children:"Calendario"}),g.jsxs(ze,{gap:"xs",wrap:"nowrap",children:[g.jsx(h9,{label:"Mes",size:"xs",value:o,onChange:x=>x&&l(typeof x=="string"?new Date(x):x),style:{minWidth:160},clearable:!1}),g.jsx(Kr,{label:"Asignado",size:"xs",placeholder:"Todos",value:c,onChange:f,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),g.jsxs(ze,{gap:"md",children:[g.jsx(Dt,{withBorder:!0,p:"sm",radius:"md",children:g.jsxs(ze,{gap:6,children:[g.jsx(of,{size:14,color:"var(--mantine-color-blue-5)"}),g.jsx(xe,{size:"sm",fw:600,children:_}),g.jsx(xe,{size:"xs",c:"dimmed",children:"creadas"})]})}),g.jsx(Dt,{withBorder:!0,p:"sm",radius:"md",children:g.jsxs(ze,{gap:6,children:[g.jsx(om,{size:14,color:"var(--mantine-color-green-5)"}),g.jsx(xe,{size:"sm",fw:600,children:C}),g.jsx(xe,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?g.jsx(qf,{p:"xl",children:g.jsx(ai,{})}):g.jsxs(Dt,{withBorder:!0,p:"md",radius:"md",children:[g.jsx(Zo,{cols:7,spacing:4,mb:4,children:Mpe.map(x=>g.jsx(xe,{size:"xs",c:"dimmed",ta:"center",fw:600,children:x},x))}),g.jsx(Zo,{cols:7,spacing:4,children:k.map((x,E)=>{if(!x.date)return g.jsx(he,{style:{minHeight:72}},E);const j=w.get(x.date)??{created:0,done:0,deadlines:[]},O=parseInt(x.date.slice(8,10),10),M=x.date===Ie().format("YYYY-MM-DD"),N=Ie().startOf("day").valueOf(),R=Ie(x.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":j.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:g.jsxs($n,{gap:2,children:[g.jsx(Et,{onClick:()=>x.date&&(i==null?void 0:i(x.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${x.date}`,children:g.jsx(xe,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:O})}),j.created>0&&g.jsxs(ze,{gap:3,wrap:"nowrap",children:[g.jsx(of,{size:10,color:"var(--mantine-color-blue-5)"}),g.jsx(xe,{size:"xs",c:"blue",children:j.created})]}),j.done>0&&g.jsxs(ze,{gap:3,wrap:"nowrap",children:[g.jsx(om,{size:10,color:"var(--mantine-color-green-5)"}),g.jsx(xe,{size:"xs",c:"green",children:j.done})]}),j.deadlines.length>0&&g.jsxs(On,{opened:r===x.date,onChange:L=>a(L?x.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[g.jsx(On.Target,{children:g.jsx(Et,{onClick:()=>a(r===x.date?null:x.date),style:{textAlign:"left"},children:g.jsx($n,{gap:1,children:g.jsxs(ze,{gap:3,wrap:"nowrap",children:[g.jsx(Zg,{size:10,color:R?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),g.jsxs(xe,{size:"xs",c:R?"red":"orange",fw:700,td:"underline",children:[j.deadlines.length," deadline",j.deadlines.length===1?"":"s"]})]})})})}),g.jsx(On.Dropdown,{p:6,children:g.jsxs($n,{gap:2,children:[g.jsxs(xe,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Ie(x.date).format("DD/MM/YYYY")]}),j.deadlines.map(L=>g.jsx(Et,{onClick:()=>{a(null),t==null||t(L.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:g.jsxs(ze,{gap:6,wrap:"nowrap",children:[g.jsxs(xe,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(L.seq_num).padStart(5,"0")]}),g.jsx(xe,{size:"xs",lineClamp:1,title:L.title,children:L.title})]})},L.id))]})})]})]})},E)})})]})]})})}function EH(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var Rpe={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function Ppe(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[c,f]=l;return c===i?o:{...o,[c]:f}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function Npe(e,n){const t=Ppe(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function s8(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const $pe={type:"area",showColor:!0},$9=De(e=>{var R,L;const n=be("ChartTooltip",$pe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:c,label:f,unit:h,type:d,segmentId:p,mod:v,series:b,valueFormatter:w,showColor:k,attributes:_,...C}=n,x=ui(),E=Xe({name:"ChartTooltip",classes:Rpe,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!c)return null;const j=Npe(c,p),O=d==="scatter"?(L=(R=c[0])==null?void 0:R.payload)==null?void 0:L.name:null,M=EH(b),N=f||O,q=j.map(F=>g.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[g.jsxs("div",{...E("tooltipItemBody"),children:[k&&g.jsx("svg",{...E("tooltipItemColor"),children:g.jsx("circle",{r:6,fill:lt(F.color,x),width:12,height:12,cx:6,cy:6})}),g.jsx("div",{...E("tooltipItemName"),children:M[F.name]||F.name})]}),g.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(s8(F,d)):s8(F,d),h||F.unit]})]},(F==null?void 0:F.key)??F.name));return g.jsxs(he,{...E("tooltip"),mod:[{type:d},v],...C,children:[N&&g.jsx("div",{...E("tooltipLabel"),children:N}),g.jsx("div",{...E("tooltipBody"),children:q})]})});$9.displayName="@mantine/charts/ChartTooltip";var TH={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function zpe(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Lpe(e){return zpe(e.filter(n=>n.color!=="none"))}const S0=De(e=>{const n=be("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:c,onHighlight:f,legendPosition:h,mod:d,series:p,showColor:v,centered:b,attributes:w,...k}=n,_=Xe({name:"ChartLegend",classes:TH,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!c)return null;const C=Lpe(c),x=EH(p),E=C.map((j,O)=>g.jsxs("div",{..._("legendItem"),onMouseEnter:()=>f(j.dataKey),onMouseLeave:()=>f(null),"data-without-color":v===!1||void 0,children:[g.jsx(Hf,{color:j.color,size:12,..._("legendItemColor"),withShadow:!1}),g.jsx("p",{..._("legendItemName"),children:x[j.dataKey]||j.dataKey})]},O));return g.jsx(he,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:E})});S0.displayName="@mantine/charts/ChartLegend";S0.classes=TH;function Ipe({x:e,y:n,value:t,valueFormatter:i}){return g.jsx("g",{transform:`translate(${e},${n})`,children:g.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var C0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},d_,l8;function Or(){if(l8)return d_;l8=1;var e=Array.isArray;return d_=e,d_}var h_,u8;function MH(){if(u8)return h_;u8=1;var e=typeof Nv=="object"&&Nv&&Nv.Object===Object&&Nv;return h_=e,h_}var m_,c8;function Ao(){if(c8)return m_;c8=1;var e=MH(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return m_=t,m_}var p_,f8;function yp(){if(f8)return p_;f8=1;var e=Ao(),n=e.Symbol;return p_=n,p_}var v_,d8;function Bpe(){if(d8)return v_;d8=1;var e=yp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),c=o[r];try{o[r]=void 0;var f=!0}catch{}var h=i.call(o);return f&&(l?o[r]=c:delete o[r]),h}return v_=a,v_}var g_,h8;function Fpe(){if(h8)return g_;h8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return g_=t,g_}var y_,m8;function _s(){if(m8)return y_;m8=1;var e=yp(),n=Bpe(),t=Fpe(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return y_=o,y_}var b_,p8;function xs(){if(p8)return b_;p8=1;function e(n){return n!=null&&typeof n=="object"}return b_=e,b_}var w_,v8;function nd(){if(v8)return w_;v8=1;var e=_s(),n=xs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return w_=i,w_}var k_,g8;function z9(){if(g8)return k_;g8=1;var e=Or(),n=nd(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return k_=r,k_}var __,y8;function jl(){if(y8)return __;y8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return __=e,__}var x_,b8;function L9(){if(b8)return x_;b8=1;var e=_s(),n=jl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var c=e(l);return c==i||c==r||c==t||c==a}return x_=o,x_}var S_,w8;function qpe(){if(w8)return S_;w8=1;var e=Ao(),n=e["__core-js_shared__"];return S_=n,S_}var C_,k8;function Hpe(){if(k8)return C_;k8=1;var e=qpe(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return C_=t,C_}var A_,_8;function DH(){if(_8)return A_;_8=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return A_=t,A_}var j_,x8;function Upe(){if(x8)return j_;x8=1;var e=L9(),n=Hpe(),t=jl(),i=DH(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,f=l.hasOwnProperty,h=RegExp("^"+c.call(f).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return j_=d,j_}var O_,S8;function Vpe(){if(S8)return O_;S8=1;function e(n,t){return n==null?void 0:n[t]}return O_=e,O_}var E_,C8;function Bu(){if(C8)return E_;C8=1;var e=Upe(),n=Vpe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return E_=t,E_}var T_,A8;function A0(){if(A8)return T_;A8=1;var e=Bu(),n=e(Object,"create");return T_=n,T_}var M_,j8;function Wpe(){if(j8)return M_;j8=1;var e=A0();function n(){this.__data__=e?e(null):{},this.size=0}return M_=n,M_}var D_,O8;function Gpe(){if(O8)return D_;O8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return D_=e,D_}var R_,E8;function Ype(){if(E8)return R_;E8=1;var e=A0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return R_=r,R_}var P_,T8;function Kpe(){if(T8)return P_;T8=1;var e=A0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return P_=i,P_}var N_,M8;function Xpe(){if(M8)return N_;M8=1;var e=A0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return N_=t,N_}var $_,D8;function Zpe(){if(D8)return $_;D8=1;var e=Wpe(),n=Gpe(),t=Ype(),i=Kpe(),r=Xpe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l-1}return q_=n,q_}var H_,I8;function tve(){if(I8)return H_;I8=1;var e=j0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return H_=n,H_}var U_,B8;function O0(){if(B8)return U_;B8=1;var e=Qpe(),n=Jpe(),t=eve(),i=nve(),r=tve();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l0?1:-1},lu=function(n){return Cu(n)&&n.indexOf("%")===n.length-1},Ge=function(n){return ove(n)&&!td(n)},sve=function(n){return Gn(n)},Oi=function(n){return Ge(n)||Cu(n)},lve=0,id=function(n){var t=++lve;return"".concat(n||"").concat(t)},Au=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ge(n)&&!Cu(n))return i;var a;if(lu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return td(a)&&(a=i),r&&a>t&&(a=t),a},Zs=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},uve=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function vve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function l4(e){"@babel/helpers - typeof";return l4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l4(e)}var lD={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Qo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},uD=null,m2=null,H9=function e(n){if(n===uD&&Array.isArray(m2))return m2;var t=[];return A.Children.forEach(n,function(i){Gn(i)||(tve.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),m2=t,uD=n,t};function va(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Qo(r)}):i=[Qo(n)],H9(e).forEach(function(r){var a=pa(r,"type.displayName")||pa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Fr(e,n){var t=va(e,n);return t&&t[0]}var cD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ge(i)||i<=0||!Ge(r)||r<=0)},gve=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],yve=function(n){return n&&n.type&&Cu(n.type)&&gve.indexOf(n.type)>=0},jH=function(n){return n&&l4(n)==="object"&&"clipDot"in n},bve=function(n,t,i,r){var a,o=(a=h2==null?void 0:h2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!Bn(n)&&(r&&o.includes(t)||dve.includes(t))||i&&q9.includes(t)},Un=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!nd(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;bve((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},u4=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return fD(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Sve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function f4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,f=xve(e,_ve),h=r||{width:t,height:i,x:0,y:0},d=dn("recharts-surface",a);return Q.createElement("svg",c4({},Un(f,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,c),n)}var Cve=["children","className"];function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Ove(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var It=Q.forwardRef(function(e,n){var t=e.children,i=e.className,r=Ave(e,Cve),a=dn("recharts-layer",i);return Q.createElement("g",d4({className:a},Un(r,!0),{ref:n}),t)}),Jo=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return v2=n,v2}var g2,pD;function EH(){if(pD)return g2;pD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function c(f){return l.test(f)}return g2=c,g2}var y2,vD;function Tve(){if(vD)return y2;vD=1;function e(n){return n.split("")}return y2=e,y2}var b2,gD;function Mve(){if(gD)return b2;gD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=f+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,C="(?:"+[h+l+"?",l,d,p,o].join("|")+")",x=RegExp(c+"(?="+c+")|"+C+_,"g");function E(O){return O.match(x)||[]}return b2=E,b2}var w2,yD;function Dve(){if(yD)return w2;yD=1;var e=Tve(),n=EH(),t=Mve();function i(r){return n(r)?t(r):e(r)}return w2=i,w2}var k2,bD;function Rve(){if(bD)return k2;bD=1;var e=Eve(),n=EH(),t=Dve(),i=SH();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,c=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return c[a]()+f}}return k2=r,k2}var _2,wD;function Pve(){if(wD)return _2;wD=1;var e=Rve(),n=e("toUpperCase");return _2=n,_2}var Nve=Pve();const E0=pt(Nve);function Lt(e){return function(){return e}}const TH=Math.cos,i1=Math.sin,Ga=Math.sqrt,r1=Math.PI,T0=2*r1,h4=Math.PI,m4=2*h4,tu=1e-6,$ve=m4-tu;function MH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return MH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rtu)if(!(Math.abs(d*c-f*h)>tu)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,b=r-l,w=c*c+f*f,k=v*v+b*b,_=Math.sqrt(w),C=Math.sqrt(p),x=a*Math.tan((h4-Math.acos((w+p-k)/(2*_*C)))/2),E=x/C,O=x/_;Math.abs(E-1)>tu&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=n+O*c},${this._y1=t+O*f}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),c=i*Math.sin(r),f=n+l,h=t+c,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>tu||Math.abs(this._y1-h)>tu)&&this._append`L${f},${h}`,i&&(p<0&&(p=p%m4+m4),p>$ve?this._append`A${i},${i},0,1,${d},${n-l},${t-c}A${i},${i},0,1,${d},${this._x1=f},${this._y1=h}`:p>tu&&this._append`A${i},${i},0,${+(p>=h4)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function U9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new Lve(n)}function V9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function DH(e){this._context=e}DH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function M0(e){return new DH(e)}function RH(e){return e[0]}function PH(e){return e[1]}function NH(e,n){var t=Lt(!0),i=null,r=M0,a=null,o=U9(l);e=typeof e=="function"?e:e===void 0?RH:Lt(e),n=typeof n=="function"?n:n===void 0?PH:Lt(n);function l(c){var f,h=(c=V9(c)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),f=0;f<=h;++f)!(f=v;--b)l.point(x[b],E[b]);l.lineEnd(),l.areaEnd()}_&&(x[p]=+e(k,p,d),E[p]=+n(k,p,d),l.point(i?+i(k,p,d):x[p],t?+t(k,p,d):E[p]))}if(C)return l=null,C+""||null}function h(){return NH().defined(r).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),i=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),f):e},f.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Lt(+d),f):i},f.y=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),t=null,f):n},f.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),f):n},f.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Lt(+d),f):t},f.lineX0=f.lineY0=function(){return h().x(e).y(n)},f.lineY1=function(){return h().x(e).y(t)},f.lineX1=function(){return h().x(i).y(n)},f.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Lt(!!d),f):r},f.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),f):a},f}class $H{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function Ive(e){return new $H(e,!0)}function Bve(e){return new $H(e,!1)}const W9={draw(e,n){const t=Ga(n/r1);e.moveTo(t,0),e.arc(0,0,t,0,T0)}},Fve={draw(e,n){const t=Ga(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},zH=Ga(1/3),qve=zH*2,Hve={draw(e,n){const t=Ga(n/qve),i=t*zH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},Uve={draw(e,n){const t=Ga(n),i=-t/2;e.rect(i,i,t,t)}},Vve=.8908130915292852,LH=i1(r1/10)/i1(7*r1/10),Wve=i1(T0/10)*LH,Gve=-TH(T0/10)*LH,Yve={draw(e,n){const t=Ga(n*Vve),i=Wve*t,r=Gve*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=T0*a/5,l=TH(o),c=i1(o);e.lineTo(c*t,-l*t),e.lineTo(l*i-c*r,c*i+l*r)}e.closePath()}},x2=Ga(3),Kve={draw(e,n){const t=-Ga(n/(x2*3));e.moveTo(0,t*2),e.lineTo(-x2*t,-t),e.lineTo(x2*t,-t),e.closePath()}},aa=-.5,oa=Ga(3)/2,p4=1/Ga(12),Xve=(p4/2+1)*3,Zve={draw(e,n){const t=Ga(n/Xve),i=t/2,r=t*p4,a=i,o=t*p4+t,l=-a,c=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(aa*i-oa*r,oa*i+aa*r),e.lineTo(aa*a-oa*o,oa*a+aa*o),e.lineTo(aa*l-oa*c,oa*l+aa*c),e.lineTo(aa*i+oa*r,aa*r-oa*i),e.lineTo(aa*a+oa*o,aa*o-oa*a),e.lineTo(aa*l+oa*c,aa*c-oa*l),e.closePath()}};function Qve(e,n){let t=null,i=U9(r);e=typeof e=="function"?e:Lt(e||W9),n=typeof n=="function"?n:Lt(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:Lt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Lt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function a1(){}function o1(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function IH(e){this._context=e}IH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:o1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Jve(e){return new IH(e)}function BH(e){this._context=e}BH.prototype={areaStart:a1,areaEnd:a1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function ege(e){return new BH(e)}function FH(e){this._context=e}FH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:o1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function nge(e){return new FH(e)}function qH(e){this._context=e}qH.prototype={areaStart:a1,areaEnd:a1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function tge(e){return new qH(e)}function kD(e){return e<0?-1:1}function _D(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(kD(a)+kD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function xD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function S2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function s1(e){this._context=e}s1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:S2(this,this._t0,xD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,S2(this,xD(this,t=_D(this,e,n)),t);break;default:S2(this,this._t0,t=_D(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function HH(e){this._context=new UH(e)}(HH.prototype=Object.create(s1.prototype)).point=function(e,n){s1.prototype.point.call(this,n,e)};function UH(e){this._context=e}UH.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function ige(e){return new s1(e)}function rge(e){return new HH(e)}function VH(e){this._context=e}VH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=SD(e),r=SD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function oge(e){return new D0(e,.5)}function sge(e){return new D0(e,0)}function lge(e){return new D0(e,1)}function of(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function uge(e,n){return e[n]}function cge(e){const n=[];return n.key=e,n}function fge(){var e=Lt([]),n=v4,t=of,i=uge;function r(a){var o=Array.from(e.apply(this,arguments),cge),l,c=o.length,f=-1,h;for(const d of a)for(l=0,++f;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function wge(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var WH={symbolCircle:W9,symbolCross:Fve,symbolDiamond:Hve,symbolSquare:Uve,symbolStar:Yve,symbolTriangle:Kve,symbolWye:Zve},kge=Math.PI/180,_ge=function(n){var t="symbol".concat(E0(n));return WH[t]||W9},xge=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*kge;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Sge=function(n,t){WH["symbol".concat(E0(n))]=t},G9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,c=bge(n,pge),f=AD(AD({},c),{},{type:i,size:a,sizeType:l}),h=function(){var k=_ge(i),_=Qve().type(k).size(xge(a,l,i));return _()},d=f.className,p=f.cx,v=f.cy,b=Un(f,!0);return p===+p&&v===+v&&a===+a?Q.createElement("path",g4({},b,{className:dn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};G9.registerSymbol=Sge;function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sf(e)}function y4(){return y4=Object.assign?Object.assign.bind():function(e){for(var n=1;n0?1:-1},uu=function(n){return Cu(n)&&n.indexOf("%")===n.length-1},Ge=function(n){return Cve(n)&&!id(n)},Ave=function(n){return Yn(n)},Si=function(n){return Ge(n)||Cu(n)},jve=0,rd=function(n){var t=++jve;return"".concat(n||"").concat(t)},Au=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ge(n)&&!Cu(n))return i;var a;if(uu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return id(a)&&(a=i),r&&a>t&&(a=t),a},tl=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},Ove=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Nve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function u4(e){"@babel/helpers - typeof";return u4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},u4(e)}var mD={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},rs=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},pD=null,v2=null,V9=function e(n){if(n===pD&&Array.isArray(v2))return v2;var t=[];return A.Children.forEach(n,function(i){Yn(i)||(kve.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),v2=t,pD=n,t};function ka(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return rs(r)}):i=[rs(n)],V9(e).forEach(function(r){var a=wa(r,"type.displayName")||wa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Ur(e,n){var t=ka(e,n);return t&&t[0]}var vD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ge(i)||i<=0||!Ge(r)||r<=0)},$ve=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zve=function(n){return n&&n.type&&Cu(n.type)&&$ve.indexOf(n.type)>=0},LH=function(n){return n&&u4(n)==="object"&&"clipDot"in n},Lve=function(n,t,i,r){var a,o=(a=p2==null?void 0:p2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!qn(n)&&(r&&o.includes(t)||Mve.includes(t))||i&&U9.includes(t)},Wn=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!td(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Lve((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},c4=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return gD(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Hve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function d4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,f=qve(e,Fve),h=r||{width:t,height:i,x:0,y:0},d=pn("recharts-surface",a);return Q.createElement("svg",f4({},Wn(f,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,c),n)}var Uve=["children","className"];function h4(){return h4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Wve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Bt=Q.forwardRef(function(e,n){var t=e.children,i=e.className,r=Vve(e,Uve),a=pn("recharts-layer",i);return Q.createElement("g",h4({className:a},Wn(r,!0),{ref:n}),t)}),as=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return y2=n,y2}var b2,kD;function IH(){if(kD)return b2;kD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function c(f){return l.test(f)}return b2=c,b2}var w2,_D;function Kve(){if(_D)return w2;_D=1;function e(n){return n.split("")}return w2=e,w2}var k2,xD;function Xve(){if(xD)return k2;xD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=f+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,C="(?:"+[h+l+"?",l,d,p,o].join("|")+")",x=RegExp(c+"(?="+c+")|"+C+_,"g");function E(j){return j.match(x)||[]}return k2=E,k2}var _2,SD;function Zve(){if(SD)return _2;SD=1;var e=Kve(),n=IH(),t=Xve();function i(r){return n(r)?t(r):e(r)}return _2=i,_2}var x2,CD;function Qve(){if(CD)return x2;CD=1;var e=Yve(),n=IH(),t=Zve(),i=PH();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,c=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return c[a]()+f}}return x2=r,x2}var S2,AD;function Jve(){if(AD)return S2;AD=1;var e=Qve(),n=e("toUpperCase");return S2=n,S2}var ege=Jve();const M0=yt(ege);function It(e){return function(){return e}}const BH=Math.cos,a1=Math.sin,Ya=Math.sqrt,o1=Math.PI,D0=2*o1,m4=Math.PI,p4=2*m4,iu=1e-6,nge=p4-iu;function FH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return FH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;riu)if(!(Math.abs(d*c-f*h)>iu)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,b=r-l,w=c*c+f*f,k=v*v+b*b,_=Math.sqrt(w),C=Math.sqrt(p),x=a*Math.tan((m4-Math.acos((w+p-k)/(2*_*C)))/2),E=x/C,j=x/_;Math.abs(E-1)>iu&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=n+j*c},${this._y1=t+j*f}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),c=i*Math.sin(r),f=n+l,h=t+c,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>iu||Math.abs(this._y1-h)>iu)&&this._append`L${f},${h}`,i&&(p<0&&(p=p%p4+p4),p>nge?this._append`A${i},${i},0,1,${d},${n-l},${t-c}A${i},${i},0,1,${d},${this._x1=f},${this._y1=h}`:p>iu&&this._append`A${i},${i},0,${+(p>=m4)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function W9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new ige(n)}function G9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qH(e){this._context=e}qH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function R0(e){return new qH(e)}function HH(e){return e[0]}function UH(e){return e[1]}function VH(e,n){var t=It(!0),i=null,r=R0,a=null,o=W9(l);e=typeof e=="function"?e:e===void 0?HH:It(e),n=typeof n=="function"?n:n===void 0?UH:It(n);function l(c){var f,h=(c=G9(c)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),f=0;f<=h;++f)!(f=v;--b)l.point(x[b],E[b]);l.lineEnd(),l.areaEnd()}_&&(x[p]=+e(k,p,d),E[p]=+n(k,p,d),l.point(i?+i(k,p,d):x[p],t?+t(k,p,d):E[p]))}if(C)return l=null,C+""||null}function h(){return VH().defined(r).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:It(+d),i=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:It(+d),f):e},f.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:It(+d),f):i},f.y=function(d){return arguments.length?(n=typeof d=="function"?d:It(+d),t=null,f):n},f.y0=function(d){return arguments.length?(n=typeof d=="function"?d:It(+d),f):n},f.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:It(+d),f):t},f.lineX0=f.lineY0=function(){return h().x(e).y(n)},f.lineY1=function(){return h().x(e).y(t)},f.lineX1=function(){return h().x(i).y(n)},f.defined=function(d){return arguments.length?(r=typeof d=="function"?d:It(!!d),f):r},f.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),f):a},f}class WH{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function rge(e){return new WH(e,!0)}function age(e){return new WH(e,!1)}const Y9={draw(e,n){const t=Ya(n/o1);e.moveTo(t,0),e.arc(0,0,t,0,D0)}},oge={draw(e,n){const t=Ya(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},GH=Ya(1/3),sge=GH*2,lge={draw(e,n){const t=Ya(n/sge),i=t*GH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},uge={draw(e,n){const t=Ya(n),i=-t/2;e.rect(i,i,t,t)}},cge=.8908130915292852,YH=a1(o1/10)/a1(7*o1/10),fge=a1(D0/10)*YH,dge=-BH(D0/10)*YH,hge={draw(e,n){const t=Ya(n*cge),i=fge*t,r=dge*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=D0*a/5,l=BH(o),c=a1(o);e.lineTo(c*t,-l*t),e.lineTo(l*i-c*r,c*i+l*r)}e.closePath()}},C2=Ya(3),mge={draw(e,n){const t=-Ya(n/(C2*3));e.moveTo(0,t*2),e.lineTo(-C2*t,-t),e.lineTo(C2*t,-t),e.closePath()}},ca=-.5,fa=Ya(3)/2,v4=1/Ya(12),pge=(v4/2+1)*3,vge={draw(e,n){const t=Ya(n/pge),i=t/2,r=t*v4,a=i,o=t*v4+t,l=-a,c=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(ca*i-fa*r,fa*i+ca*r),e.lineTo(ca*a-fa*o,fa*a+ca*o),e.lineTo(ca*l-fa*c,fa*l+ca*c),e.lineTo(ca*i+fa*r,ca*r-fa*i),e.lineTo(ca*a+fa*o,ca*o-fa*a),e.lineTo(ca*l+fa*c,ca*c-fa*l),e.closePath()}};function gge(e,n){let t=null,i=W9(r);e=typeof e=="function"?e:It(e||Y9),n=typeof n=="function"?n:It(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:It(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:It(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function s1(){}function l1(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function KH(e){this._context=e}KH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:l1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:l1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function yge(e){return new KH(e)}function XH(e){this._context=e}XH.prototype={areaStart:s1,areaEnd:s1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:l1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function bge(e){return new XH(e)}function ZH(e){this._context=e}ZH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:l1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function wge(e){return new ZH(e)}function QH(e){this._context=e}QH.prototype={areaStart:s1,areaEnd:s1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function kge(e){return new QH(e)}function jD(e){return e<0?-1:1}function OD(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(jD(a)+jD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function ED(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function A2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function u1(e){this._context=e}u1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:A2(this,this._t0,ED(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,A2(this,ED(this,t=OD(this,e,n)),t);break;default:A2(this,this._t0,t=OD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function JH(e){this._context=new eU(e)}(JH.prototype=Object.create(u1.prototype)).point=function(e,n){u1.prototype.point.call(this,n,e)};function eU(e){this._context=e}eU.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function _ge(e){return new u1(e)}function xge(e){return new JH(e)}function nU(e){this._context=e}nU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=TD(e),r=TD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function Cge(e){return new P0(e,.5)}function Age(e){return new P0(e,0)}function jge(e){return new P0(e,1)}function lf(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function Oge(e,n){return e[n]}function Ege(e){const n=[];return n.key=e,n}function Tge(){var e=It([]),n=g4,t=lf,i=Oge;function r(a){var o=Array.from(e.apply(this,arguments),Ege),l,c=o.length,f=-1,h;for(const d of a)for(l=0,++f;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Ige(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var tU={symbolCircle:Y9,symbolCross:oge,symbolDiamond:lge,symbolSquare:uge,symbolStar:hge,symbolTriangle:mge,symbolWye:vge},Bge=Math.PI/180,Fge=function(n){var t="symbol".concat(M0(n));return tU[t]||Y9},qge=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Bge;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Hge=function(n,t){tU["symbol".concat(M0(n))]=t},K9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,c=Lge(n,Pge),f=DD(DD({},c),{},{type:i,size:a,sizeType:l}),h=function(){var k=Fge(i),_=gge().type(k).size(qge(a,l,i));return _()},d=f.className,p=f.cx,v=f.cy,b=Wn(f,!0);return p===+p&&v===+v&&a===+a?Q.createElement("path",y4({},b,{className:pn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};K9.registerSymbol=Hge;function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uf(e)}function b4(){return b4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var C=v.inactive?f:v.color;return Q.createElement("li",y4({className:k,style:d,key:"legend-item-".concat(b)},t1(i.props,v,b)),Q.createElement(f4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},w?w(_,v,b):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);sm(Y9,"displayName","Legend");sm(Y9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var C2,jD;function Pge(){if(jD)return C2;jD=1;var e=A0();function n(){this.__data__=new e,this.size=0}return C2=n,C2}var A2,ED;function Nge(){if(ED)return A2;ED=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return A2=e,A2}var O2,TD;function $ge(){if(TD)return O2;TD=1;function e(n){return this.__data__.get(n)}return O2=e,O2}var j2,MD;function zge(){if(MD)return j2;MD=1;function e(n){return this.__data__.has(n)}return j2=e,j2}var E2,DD;function Lge(){if(DD)return E2;DD=1;var e=A0(),n=L9(),t=I9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!n||c.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,C=!0,x=c&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return Z2=n,Z2}var Q2,t7;function Zge(){if(t7)return Q2;t7=1;var e=vs(),n=Q9(),t=gs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",x="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",q="[object Uint16Array]",P="[object Uint32Array]",L={};L[C]=L[x]=L[E]=L[O]=L[j]=L[M]=L[N]=L[q]=L[P]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[c]=L[f]=L[h]=L[d]=L[p]=L[v]=L[b]=L[w]=!1;function H(G){return t(G)&&n(G.length)&&!!L[e(G)]}return Q2=H,Q2}var J2,i7;function tU(){if(i7)return J2;i7=1;function e(n){return function(t){return n(t)}}return J2=e,J2}var jh={exports:{}};jh.exports;var r7;function Qge(){return r7||(r7=1,(function(e,n){var t=kH(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var c=r&&r.require&&r.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(jh,jh.exports)),jh.exports}var ex,a7;function iU(){if(a7)return ex;a7=1;var e=Zge(),n=tU(),t=Qge(),i=t&&t.isTypedArray,r=i?n(i):e;return ex=r,ex}var nx,o7;function Jge(){if(o7)return nx;o7=1;var e=Yge(),n=X9(),t=Sr(),i=nU(),r=Z9(),a=iU(),o=Object.prototype,l=o.hasOwnProperty;function c(f,h){var d=t(f),p=!d&&n(f),v=!d&&!p&&i(f),b=!d&&!p&&!v&&a(f),w=d||p||v||b,k=w?e(f.length,String):[],_=k.length;for(var C in f)(h||l.call(f,C))&&!(w&&(C=="length"||v&&(C=="offset"||C=="parent")||b&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||r(C,_)))&&k.push(C);return k}return nx=c,nx}var tx,s7;function e1e(){if(s7)return tx;s7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return tx=n,tx}var ix,l7;function rU(){if(l7)return ix;l7=1;function e(n,t){return function(i){return n(t(i))}}return ix=e,ix}var rx,u7;function n1e(){if(u7)return rx;u7=1;var e=rU(),n=e(Object.keys,Object);return rx=n,rx}var ax,c7;function t1e(){if(c7)return ax;c7=1;var e=e1e(),n=n1e(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return ax=r,ax}var ox,f7;function mp(){if(f7)return ox;f7=1;var e=$9(),n=Q9();function t(i){return i!=null&&n(i.length)&&!e(i)}return ox=t,ox}var sx,d7;function R0(){if(d7)return sx;d7=1;var e=Jge(),n=t1e(),t=mp();function i(r){return t(r)?e(r):n(r)}return sx=i,sx}var lx,h7;function i1e(){if(h7)return lx;h7=1;var e=Uge(),n=Gge(),t=R0();function i(r){return e(r,t,n)}return lx=i,lx}var ux,m7;function r1e(){if(m7)return ux;m7=1;var e=i1e(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,c,f,h){var d=l&n,p=e(a),v=p.length,b=e(o),w=b.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var C=h.get(a),x=h.get(o);if(C&&x)return C==o&&x==a;var E=!0;h.set(a,o),h.set(o,a);for(var O=d;++k-1}return Nx=n,Nx}var $x,F7;function S1e(){if(F7)return $x;F7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=f?null:r(c);if(_)return a(_);b=!1,p=i,k=new e}else k=f?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function I1e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function B1e(e){return e.value}function F1e(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=L1e(n,T1e);return Q.createElement(Y9,t)}var K7=1,es=(function(e){function n(){var t;M1e(this,n);for(var i=arguments.length,r=new Array(i),a=0;aK7||Math.abs(r.height-this.lastBoundingBox.height)>K7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Fo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,c=r.margin,f=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((f||0)-v.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((h||0)-b.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Fo(Fo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,c=r.wrapperStyle,f=r.payloadUniqBy,h=r.payload,d=Fo(Fo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return Q.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},F1e(a,Fo(Fo({},this.props),{},{payload:uU(h,f,B1e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Fo(Fo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ge(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);P0(es,"displayName","Legend");P0(es,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Fx,X7;function q1e(){if(X7)return Fx;X7=1;var e=hp(),n=X9(),t=Sr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return Fx=r,Fx}var qx,Z7;function dU(){if(Z7)return qx;Z7=1;var e=eU(),n=q1e();function t(i,r,a,o,l){var c=-1,f=i.length;for(a||(a=n),l||(l=[]);++c0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return qx=t,qx}var Hx,Q7;function H1e(){if(Q7)return Hx;Q7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),c=l.length;c--;){var f=l[n?c:++a];if(i(o[f],f,o)===!1)break}return t}}return Hx=e,Hx}var Ux,J7;function U1e(){if(J7)return Ux;J7=1;var e=H1e(),n=e();return Ux=n,Ux}var Vx,eR;function hU(){if(eR)return Vx;eR=1;var e=U1e(),n=R0();function t(i,r){return i&&e(i,r,n)}return Vx=t,Vx}var Wx,nR;function V1e(){if(nR)return Wx;nR=1;var e=mp();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,c=Object(r);(i?l--:++li||l&&c&&h&&!f&&!d||a&&c&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=f)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Zx=n,Zx}var Qx,sR;function K1e(){if(sR)return Qx;sR=1;var e=B9(),n=F9(),t=xl(),i=mU(),r=W1e(),a=tU(),o=Y1e(),l=rd(),c=Sr();function f(h,d,p){d.length?d=e(d,function(w){return c(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var C=e(d,function(x){return x(w)});return{criteria:C,index:++v,value:w}});return r(b,function(w,k){return o(w,k,p)})}return Qx=f,Qx}var Jx,lR;function X1e(){if(lR)return Jx;lR=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Jx=e,Jx}var e3,uR;function Z1e(){if(uR)return e3;uR=1;var e=X1e(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,c=n(o.length-r,0),f=Array(c);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return r3=i,r3}var a3,mR;function nye(){if(mR)return a3;mR=1;var e=J1e(),n=eye(),t=n(e);return a3=t,a3}var o3,pR;function tye(){if(pR)return o3;pR=1;var e=rd(),n=Z1e(),t=nye();function i(r,a){return t(n(r,a,e),r+"")}return o3=i,o3}var s3,vR;function N0(){if(vR)return s3;vR=1;var e=z9(),n=mp(),t=Z9(),i=_l();function r(a,o,l){if(!i(l))return!1;var c=typeof o;return(c=="number"?n(l)&&t(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return s3=r,s3}var l3,gR;function iye(){if(gR)return l3;gR=1;var e=dU(),n=K1e(),t=tye(),i=N0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return l3=r,l3}var rye=iye();const nA=pt(rye);function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function k4(){return k4=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(uh,"-left"),Ge(t)&&n&&Ge(n.x)&&t=n.y),"".concat(uh,"-top"),Ge(i)&&n&&Ge(n.y)&&iw?Math.max(h,c[i]):Math.max(d,c[i])}function bye(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function wye(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,f,h,d;return o.height>0&&o.width>0&&t?(h=wR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=wR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),f=bye({translateX:h,translateY:d,useTranslate3d:l})):f=gye,{cssProperties:f,cssClasses:yye({translateX:h,translateY:d,coordinate:t})}}function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uf(e)}function kR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function _R(e){for(var n=1;nxR||Math.abs(i.height-this.state.lastBoundingBox.height)>xR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,c=r.animationEasing,f=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,C=r.wrapperStyle,x=wye({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=x.cssClasses,O=x.cssProperties,j=_R(_R({transition:p&&a?"transform ".concat(l,"ms ").concat(c):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return Q.createElement("div",{tabIndex:-1,className:E,style:j,ref:function(N){i.wrapperNode=N}},f)}}])})(A.PureComponent),Tye=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Bu={isSsr:Tye()};function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cf(e)}function SR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function CR(e){for(var n=1;n0;return Q.createElement(Eye,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:a,coordinate:h,hasPayload:j,offset:v,position:k,reverseDirection:_,useTranslate3d:C,viewBox:x,wrapperStyle:E},Bye(f,CR(CR({},this.props),{},{payload:O})))}}])})(A.PureComponent);tA(fa,"displayName","Tooltip");tA(fa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Bu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var c3,AR;function Fye(){if(AR)return c3;AR=1;var e=ko(),n=function(){return e.Date.now()};return c3=n,c3}var f3,OR;function qye(){if(OR)return f3;OR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return f3=n,f3}var d3,jR;function Hye(){if(jR)return d3;jR=1;var e=qye(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return d3=t,d3}var h3,ER;function wU(){if(ER)return h3;ER=1;var e=Hye(),n=_l(),t=ed(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(f){if(typeof f=="number")return f;if(t(f))return i;if(n(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=n(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var d=a.test(f);return d||o.test(f)?l(f.slice(2),d?2:8):r.test(f)?i:+f}return h3=c,h3}var m3,TR;function Uye(){if(TR)return m3;TR=1;var e=_l(),n=Fye(),t=wU(),i="Expected a function",r=Math.max,a=Math.min;function o(l,c,f){var h,d,p,v,b,w,k=0,_=!1,C=!1,x=!0;if(typeof l!="function")throw new TypeError(i);c=t(c)||0,e(f)&&(_=!!f.leading,C="maxWait"in f,p=C?r(t(f.maxWait)||0,c):p,x="trailing"in f?!!f.trailing:x);function E(G){var U=h,z=d;return h=d=void 0,k=G,v=l.apply(z,U),v}function O(G){return k=G,b=setTimeout(N,c),_?E(G):v}function j(G){var U=G-w,z=G-k,D=c-U;return C?a(D,p-z):D}function M(G){var U=G-w,z=G-k;return w===void 0||U>=c||U<0||C&&z>=p}function N(){var G=n();if(M(G))return q(G);b=setTimeout(N,j(G))}function q(G){return b=void 0,x&&h?E(G):(h=d=void 0,v)}function P(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?v:q(n())}function H(){var G=n(),U=M(G);if(h=arguments,d=this,w=G,U){if(b===void 0)return O(w);if(C)return clearTimeout(b),b=setTimeout(N,c),E(w)}return b===void 0&&(b=setTimeout(N,c)),v}return H.cancel=P,H.flush=L,H}return m3=o,m3}var p3,MR;function Vye(){if(MR)return p3;MR=1;var e=Uye(),n=_l(),t="Expected a function";function i(r,a,o){var l=!0,c=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(r,a,{leading:l,maxWait:a,trailing:c})}return p3=i,p3}var Wye=Vye();const kU=pt(Wye);function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cm(e)}function DR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Zv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=kU(G,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(G),z=O.current.getBoundingClientRect(),D=z.width,$=z.height;return L(D,$),U.observe(O.current),function(){U.disconnect()}},[L,w]);var H=A.useMemo(function(){var G=q.containerWidth,U=q.containerHeight;if(G<0||U<0)return null;Jo(lu(o)||lu(c),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,c),Jo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var z=lu(o)?G:o,D=lu(c)?U:c;t&&t>0&&(z?D=z/t:D&&(z=D*t),p&&D>p&&(D=p)),Jo(z>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(da,"M").concat(2*l,",").concat(a,` + A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(i.type==="rect")return Q.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(da/8,"h").concat(da,"v").concat(da*3/4,"h").concat(-da,"z"),className:"recharts-legend-icon"});if(Q.isValidElement(i.legendIcon)){var f=Uge({},i);return delete f.legendIcon,Q.cloneElement(i.legendIcon,f)}return Q.createElement(K9,{fill:c,cx:a,cy:a,size:da,sizeType:"diameter",type:i.type})}},{key:"renderItems",value:function(){var i=this,r=this.props,a=r.payload,o=r.iconSize,l=r.layout,c=r.formatter,f=r.inactiveColor,h={x:0,y:0,width:da,height:da},d={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,b){var w=v.formatter||c,k=pn(dm(dm({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",v.inactive));if(v.type==="none")return null;var _=qn(v.value)?null:v.value;as(!qn(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var C=v.inactive?f:v.color;return Q.createElement("li",b4({className:k,style:d,key:"legend-item-".concat(b)},r1(i.props,v,b)),Q.createElement(d4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},w?w(_,v,b):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);dm(X9,"displayName","Legend");dm(X9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var j2,PD;function Jge(){if(PD)return j2;PD=1;var e=O0();function n(){this.__data__=new e,this.size=0}return j2=n,j2}var O2,ND;function e1e(){if(ND)return O2;ND=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return O2=e,O2}var E2,$D;function n1e(){if($D)return E2;$D=1;function e(n){return this.__data__.get(n)}return E2=e,E2}var T2,zD;function t1e(){if(zD)return T2;zD=1;function e(n){return this.__data__.has(n)}return T2=e,T2}var M2,LD;function i1e(){if(LD)return M2;LD=1;var e=O0(),n=B9(),t=F9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!n||c.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,C=!0,x=c&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return J2=n,J2}var ex,l7;function v1e(){if(l7)return ex;l7=1;var e=_s(),n=eA(),t=xs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",x="[object Float64Array]",E="[object Int8Array]",j="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",q="[object Uint16Array]",R="[object Uint32Array]",L={};L[C]=L[x]=L[E]=L[j]=L[O]=L[M]=L[N]=L[q]=L[R]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[c]=L[f]=L[h]=L[d]=L[p]=L[v]=L[b]=L[w]=!1;function F(Y){return t(Y)&&n(Y.length)&&!!L[e(Y)]}return ex=F,ex}var nx,u7;function dU(){if(u7)return nx;u7=1;function e(n){return function(t){return n(t)}}return nx=e,nx}var Mh={exports:{}};Mh.exports;var c7;function g1e(){return c7||(c7=1,(function(e,n){var t=MH(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var c=r&&r.require&&r.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Mh,Mh.exports)),Mh.exports}var tx,f7;function hU(){if(f7)return tx;f7=1;var e=v1e(),n=dU(),t=g1e(),i=t&&t.isTypedArray,r=i?n(i):e;return tx=r,tx}var ix,d7;function y1e(){if(d7)return ix;d7=1;var e=h1e(),n=Q9(),t=Or(),i=fU(),r=J9(),a=hU(),o=Object.prototype,l=o.hasOwnProperty;function c(f,h){var d=t(f),p=!d&&n(f),v=!d&&!p&&i(f),b=!d&&!p&&!v&&a(f),w=d||p||v||b,k=w?e(f.length,String):[],_=k.length;for(var C in f)(h||l.call(f,C))&&!(w&&(C=="length"||v&&(C=="offset"||C=="parent")||b&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||r(C,_)))&&k.push(C);return k}return ix=c,ix}var rx,h7;function b1e(){if(h7)return rx;h7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return rx=n,rx}var ax,m7;function mU(){if(m7)return ax;m7=1;function e(n,t){return function(i){return n(t(i))}}return ax=e,ax}var ox,p7;function w1e(){if(p7)return ox;p7=1;var e=mU(),n=e(Object.keys,Object);return ox=n,ox}var sx,v7;function k1e(){if(v7)return sx;v7=1;var e=b1e(),n=w1e(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return sx=r,sx}var lx,g7;function bp(){if(g7)return lx;g7=1;var e=L9(),n=eA();function t(i){return i!=null&&n(i.length)&&!e(i)}return lx=t,lx}var ux,y7;function N0(){if(y7)return ux;y7=1;var e=y1e(),n=k1e(),t=bp();function i(r){return t(r)?e(r):n(r)}return ux=i,ux}var cx,b7;function _1e(){if(b7)return cx;b7=1;var e=u1e(),n=d1e(),t=N0();function i(r){return e(r,t,n)}return cx=i,cx}var fx,w7;function x1e(){if(w7)return fx;w7=1;var e=_1e(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,c,f,h){var d=l&n,p=e(a),v=p.length,b=e(o),w=b.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var C=h.get(a),x=h.get(o);if(C&&x)return C==o&&x==a;var E=!0;h.set(a,o),h.set(o,a);for(var j=d;++k-1}return zx=n,zx}var Lx,G7;function H1e(){if(G7)return Lx;G7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=f?null:r(c);if(_)return a(_);b=!1,p=i,k=new e}else k=f?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function rye(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function aye(e){return e.value}function oye(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=iye(n,K1e);return Q.createElement(X9,t)}var nR=1,os=(function(e){function n(){var t;X1e(this,n);for(var i=arguments.length,r=new Array(i),a=0;anR||Math.abs(r.height-this.lastBoundingBox.height)>nR)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Go({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,c=r.margin,f=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((f||0)-v.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((h||0)-b.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Go(Go({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,c=r.wrapperStyle,f=r.payloadUniqBy,h=r.payload,d=Go(Go({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return Q.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},oye(a,Go(Go({},this.props),{},{payload:bU(h,f,aye)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Go(Go({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ge(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);$0(os,"displayName","Legend");$0(os,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Hx,tR;function sye(){if(tR)return Hx;tR=1;var e=yp(),n=Q9(),t=Or(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return Hx=r,Hx}var Ux,iR;function _U(){if(iR)return Ux;iR=1;var e=cU(),n=sye();function t(i,r,a,o,l){var c=-1,f=i.length;for(a||(a=n),l||(l=[]);++c0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Ux=t,Ux}var Vx,rR;function lye(){if(rR)return Vx;rR=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),c=l.length;c--;){var f=l[n?c:++a];if(i(o[f],f,o)===!1)break}return t}}return Vx=e,Vx}var Wx,aR;function uye(){if(aR)return Wx;aR=1;var e=lye(),n=e();return Wx=n,Wx}var Gx,oR;function xU(){if(oR)return Gx;oR=1;var e=uye(),n=N0();function t(i,r){return i&&e(i,r,n)}return Gx=t,Gx}var Yx,sR;function cye(){if(sR)return Yx;sR=1;var e=bp();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,c=Object(r);(i?l--:++li||l&&c&&h&&!f&&!d||a&&c&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=f)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Jx=n,Jx}var e3,hR;function mye(){if(hR)return e3;hR=1;var e=q9(),n=H9(),t=Ol(),i=SU(),r=fye(),a=dU(),o=hye(),l=ad(),c=Or();function f(h,d,p){d.length?d=e(d,function(w){return c(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var C=e(d,function(x){return x(w)});return{criteria:C,index:++v,value:w}});return r(b,function(w,k){return o(w,k,p)})}return e3=f,e3}var n3,mR;function pye(){if(mR)return n3;mR=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return n3=e,n3}var t3,pR;function vye(){if(pR)return t3;pR=1;var e=pye(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,c=n(o.length-r,0),f=Array(c);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return o3=i,o3}var s3,wR;function wye(){if(wR)return s3;wR=1;var e=yye(),n=bye(),t=n(e);return s3=t,s3}var l3,kR;function kye(){if(kR)return l3;kR=1;var e=ad(),n=vye(),t=wye();function i(r,a){return t(n(r,a,e),r+"")}return l3=i,l3}var u3,_R;function z0(){if(_R)return u3;_R=1;var e=I9(),n=bp(),t=J9(),i=jl();function r(a,o,l){if(!i(l))return!1;var c=typeof o;return(c=="number"?n(l)&&t(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return u3=r,u3}var c3,xR;function _ye(){if(xR)return c3;xR=1;var e=_U(),n=mye(),t=kye(),i=z0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return c3=r,c3}var xye=_ye();const iA=yt(xye);function hm(e){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hm(e)}function _4(){return _4=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(dh,"-left"),Ge(t)&&n&&Ge(n.x)&&t=n.y),"".concat(dh,"-top"),Ge(i)&&n&&Ge(n.y)&&iw?Math.max(h,c[i]):Math.max(d,c[i])}function Lye(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function Iye(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,f,h,d;return o.height>0&&o.width>0&&t?(h=AR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=AR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),f=Lye({translateX:h,translateY:d,useTranslate3d:l})):f=$ye,{cssProperties:f,cssClasses:zye({translateX:h,translateY:d,coordinate:t})}}function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ff(e)}function jR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function OR(e){for(var n=1;nER||Math.abs(i.height-this.state.lastBoundingBox.height)>ER)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,c=r.animationEasing,f=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,C=r.wrapperStyle,x=Iye({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=x.cssClasses,j=x.cssProperties,O=OR(OR({transition:p&&a?"transform ".concat(l,"ms ").concat(c):void 0},j),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return Q.createElement("div",{tabIndex:-1,className:E,style:O,ref:function(N){i.wrapperNode=N}},f)}}])})(A.PureComponent),Kye=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Fu={isSsr:Kye()};function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},df(e)}function TR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function MR(e){for(var n=1;n0;return Q.createElement(Yye,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:a,coordinate:h,hasPayload:O,offset:v,position:k,reverseDirection:_,useTranslate3d:C,viewBox:x,wrapperStyle:E},a0e(f,MR(MR({},this.props),{},{payload:j})))}}])})(A.PureComponent);rA(va,"displayName","Tooltip");rA(va,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Fu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var d3,DR;function o0e(){if(DR)return d3;DR=1;var e=Ao(),n=function(){return e.Date.now()};return d3=n,d3}var h3,RR;function s0e(){if(RR)return h3;RR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return h3=n,h3}var m3,PR;function l0e(){if(PR)return m3;PR=1;var e=s0e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return m3=t,m3}var p3,NR;function TU(){if(NR)return p3;NR=1;var e=l0e(),n=jl(),t=nd(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(f){if(typeof f=="number")return f;if(t(f))return i;if(n(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=n(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var d=a.test(f);return d||o.test(f)?l(f.slice(2),d?2:8):r.test(f)?i:+f}return p3=c,p3}var v3,$R;function u0e(){if($R)return v3;$R=1;var e=jl(),n=o0e(),t=TU(),i="Expected a function",r=Math.max,a=Math.min;function o(l,c,f){var h,d,p,v,b,w,k=0,_=!1,C=!1,x=!0;if(typeof l!="function")throw new TypeError(i);c=t(c)||0,e(f)&&(_=!!f.leading,C="maxWait"in f,p=C?r(t(f.maxWait)||0,c):p,x="trailing"in f?!!f.trailing:x);function E(Y){var V=h,$=d;return h=d=void 0,k=Y,v=l.apply($,V),v}function j(Y){return k=Y,b=setTimeout(N,c),_?E(Y):v}function O(Y){var V=Y-w,$=Y-k,P=c-V;return C?a(P,p-$):P}function M(Y){var V=Y-w,$=Y-k;return w===void 0||V>=c||V<0||C&&$>=p}function N(){var Y=n();if(M(Y))return q(Y);b=setTimeout(N,O(Y))}function q(Y){return b=void 0,x&&h?E(Y):(h=d=void 0,v)}function R(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?v:q(n())}function F(){var Y=n(),V=M(Y);if(h=arguments,d=this,w=Y,V){if(b===void 0)return j(w);if(C)return clearTimeout(b),b=setTimeout(N,c),E(w)}return b===void 0&&(b=setTimeout(N,c)),v}return F.cancel=R,F.flush=L,F}return v3=o,v3}var g3,zR;function c0e(){if(zR)return g3;zR=1;var e=u0e(),n=jl(),t="Expected a function";function i(r,a,o){var l=!0,c=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(r,a,{leading:l,maxWait:a,trailing:c})}return g3=i,g3}var f0e=c0e();const MU=yt(f0e);function pm(e){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function LR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function eg(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(Y=MU(Y,w,{trailing:!0,leading:!1}));var V=new ResizeObserver(Y),$=j.current.getBoundingClientRect(),P=$.width,I=$.height;return L(P,I),V.observe(j.current),function(){V.disconnect()}},[L,w]);var F=A.useMemo(function(){var Y=q.containerWidth,V=q.containerHeight;if(Y<0||V<0)return null;as(uu(o)||uu(c),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,c),as(!t||t>0,"The aspect(%s) must be greater than zero.",t);var $=uu(o)?Y:o,P=uu(c)?V:c;t&&t>0&&($?P=$/t:P&&($=P*t),p&&P>p&&(P=p)),as($>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,z,D,o,c,h,d,t);var $=!Array.isArray(v)&&Qo(v.type).endsWith("Chart");return Q.Children.map(v,function(B){return Q.isValidElement(B)?A.cloneElement(B,Zv({width:z,height:D},$?{style:Zv({height:"100%",width:"100%",maxHeight:D,maxWidth:z},B.props.style)}:{})):B})},[t,v,c,p,d,h,q,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:dn("recharts-responsive-container",_),style:Zv(Zv({},E),{},{width:o,height:c,minWidth:h,minHeight:d,maxHeight:p}),ref:O},H)}),_U=function(n){return null};_U.displayName="Cell";function fm(e){"@babel/helpers - typeof";return fm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fm(e)}function PR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function C4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Bu.isSsr)return{width:0,height:0};var i=o0e(t),r=JSON.stringify({text:n,copyStyle:i});if(Dc.widthCache[r])return Dc.widthCache[r];try{var a=document.getElementById(NR);a||(a=document.createElement("span"),a.setAttribute("id",NR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=C4(C4({},a0e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Dc.widthCache[r]=c,++Dc.cacheCount>r0e&&(Dc.cacheCount=0,Dc.widthCache={}),c}catch{return{width:0,height:0}}},s0e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function dm(e){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dm(e)}function d1(e,n){return f0e(e)||c0e(e,n)||u0e(e,n)||l0e()}function l0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u0e(e,n){if(e){if(typeof e=="string")return $R(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $R(e,n)}}function $R(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function C0e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function qR(e,n){return E0e(e)||j0e(e,n)||O0e(e,n)||A0e()}function A0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O0e(e,n){if(e){if(typeof e=="string")return HR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return HR(e,n)}}function HR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return z.reduce(function(D,$){var B=$.word,Y=$.width,R=D[D.length-1];if(R&&(r==null||a||R.width+Y+i$.width?D:$})};if(!h)return v;for(var w="…",k=function(z){var D=d.slice(0,z),$=AU({breakAll:f,style:c,children:D+w}).wordsWithComputedWidth,B=p($),Y=B.length>o||b(B).width>Number(r);return[Y,B]},_=0,C=d.length-1,x=0,E;_<=C&&x<=d.length-1;){var O=Math.floor((_+C)/2),j=O-1,M=k(j),N=qR(M,2),q=N[0],P=N[1],L=k(O),H=qR(L,1),G=H[0];if(!q&&!G&&(_=O+1),q&&G&&(C=O-1),!q&&G){E=P;break}x++}return E||v},UR=function(n){var t=Gn(n)?[]:n.toString().split(CU);return[{words:t}]},M0e=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Bu.isSsr){var c,f,h=AU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;c=d,f=p}else return UR(r);return T0e({breakAll:o,children:r,maxLines:l,style:a},c,f,t,i)}return UR(r)},VR="#808080",h1=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,c=n.capHeight,f=c===void 0?"0.71em":c,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?VR:k,C=FR(n,x0e),x=A.useMemo(function(){return M0e({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),E=C.dx,O=C.dy,j=C.angle,M=C.className,N=C.breakAll,q=FR(C,S0e);if(!Oi(i)||!Oi(a))return null;var P=i+(Ge(E)?E:0),L=a+(Ge(O)?O:0),H;switch(w){case"start":H=v3("calc(".concat(f,")"));break;case"middle":H=v3("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:H=v3("calc(".concat(x.length-1," * -").concat(l,")"));break}var G=[];if(d){var U=x[0].width,z=C.width;G.push("scale(".concat((Ge(z)?z/U:1)/U,")"))}return j&&G.push("rotate(".concat(j,", ").concat(P,", ").concat(L,")")),G.length&&(q.transform=G.join(" ")),Q.createElement("text",A4({},Un(q,!0),{x:P,y:L,className:dn("recharts-text",M),textAnchor:v,fill:_.includes("url")?VR:_}),x.map(function(D,$){var B=D.words.join(N?"":" ");return Q.createElement("tspan",{x:P,dy:$===0?H:l,key:"".concat(B,"-").concat($)},B)}))};function ol(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function D0e(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function rA(e){let n,t,i;e.length!==2?(n=ol,t=(l,c)=>ol(e(l),c),i=(l,c)=>e(l)-c):(n=e===ol||e===D0e?e:R0e,t=e,i=e);function r(l,c,f=0,h=l.length){if(f>>1;t(l[d],c)<0?f=d+1:h=d}while(f>>1;t(l[d],c)<=0?f=d+1:h=d}while(ff&&i(l[d-1],c)>-i(l[d],c)?d-1:d}return{left:r,center:o,right:a}}function R0e(){return 0}function OU(e){return e===null?NaN:+e}function*P0e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const N0e=rA(ol),pp=N0e.right;rA(OU).center;class WR extends Map{constructor(n,t=L0e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(GR(this,n))}has(n){return super.has(GR(this,n))}set(n,t){return super.set($0e(this,n),t)}delete(n){return super.delete(z0e(this,n))}}function GR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function $0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function z0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function L0e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function I0e(e=ol){if(e===ol)return jU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function jU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const B0e=Math.sqrt(50),F0e=Math.sqrt(10),q0e=Math.sqrt(2);function m1(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=B0e?10:a>=F0e?5:a>=q0e?2:1;let l,c,f;return r<0?(f=Math.pow(10,-r)/o,l=Math.round(e*f),c=Math.round(n*f),l/fn&&--c,f=-f):(f=Math.pow(10,r)*o,l=Math.round(e/f),c=Math.round(n/f),l*fn&&--c),c0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,c=new Array(l);if(i)if(o<0)for(let f=0;f=i)&&(t=i);return t}function KR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function EU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?jU:I0e(r);i>t;){if(i-t>600){const c=i-t+1,f=n-t+1,h=Math.log(c),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(c-d)/c)*(f-c/2<0?-1:1),v=Math.max(t,Math.floor(n-f*d/c+p)),b=Math.min(i,Math.floor(n+(c-f)*d/c+p));EU(e,n,v,b,r)}const a=e[n];let o=t,l=i;for(ch(e,t,n),r(e[i],a)>0&&ch(e,t,i);o0;)--l}r(e[t],a)===0?ch(e,t,l):(++l,ch(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function ch(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function H0e(e,n,t){if(e=Float64Array.from(P0e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return KR(e);if(n>=1)return YR(e);var i,r=(i-1)*n,a=Math.floor(r),o=YR(EU(e,a).subarray(0,a+1)),l=KR(e.subarray(a+1));return o+(l-o)*(r-a)}}function U0e(e,n,t=OU){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function V0e(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?Jv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Jv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=G0e.exec(e))?new wr(n[1],n[2],n[3],1):(n=Y0e.exec(e))?new wr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=K0e.exec(e))?Jv(n[1],n[2],n[3],n[4]):(n=X0e.exec(e))?Jv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Z0e.exec(e))?tP(n[1],n[2]/100,n[3]/100,1):(n=Q0e.exec(e))?tP(n[1],n[2]/100,n[3]/100,n[4]):XR.hasOwnProperty(e)?JR(XR[e]):e==="transparent"?new wr(NaN,NaN,NaN,0):null}function JR(e){return new wr(e>>16&255,e>>8&255,e&255,1)}function Jv(e,n,t,i){return i<=0&&(e=n=t=NaN),new wr(e,n,t,i)}function nbe(e){return e instanceof vp||(e=vm(e)),e?(e=e.rgb(),new wr(e.r,e.g,e.b,e.opacity)):new wr}function M4(e,n,t,i){return arguments.length===1?nbe(e):new wr(e,n,t,i??1)}function wr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}oA(wr,M4,MU(vp,{brighter(e){return e=e==null?p1:Math.pow(p1,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mm:Math.pow(mm,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wr(mu(this.r),mu(this.g),mu(this.b),v1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:eP,formatHex:eP,formatHex8:tbe,formatRgb:nP,toString:nP}));function eP(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}`}function tbe(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}${uu((isNaN(this.opacity)?1:this.opacity)*255)}`}function nP(){const e=v1(this.opacity);return`${e===1?"rgb(":"rgba("}${mu(this.r)}, ${mu(this.g)}, ${mu(this.b)}${e===1?")":`, ${e})`}`}function v1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uu(e){return e=mu(e),(e<16?"0":"")+e.toString(16)}function tP(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new La(e,n,t,i)}function DU(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof vp||(e=vm(e)),!e)return new La;if(e instanceof La)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,c=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&c<1?0:o,new La(o,l,c,e.opacity)}function ibe(e,n,t,i){return arguments.length===1?DU(e):new La(e,n,t,i??1)}function La(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}oA(La,ibe,MU(vp,{brighter(e){return e=e==null?p1:Math.pow(p1,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mm:Math.pow(mm,e),new La(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new wr(g3(e>=240?e-240:e+120,r,i),g3(e,r,i),g3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new La(iP(this.h),eg(this.s),eg(this.l),v1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=v1(this.opacity);return`${e===1?"hsl(":"hsla("}${iP(this.h)}, ${eg(this.s)*100}%, ${eg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iP(e){return e=(e||0)%360,e<0?e+360:e}function eg(e){return Math.max(0,Math.min(1,e||0))}function g3(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const sA=e=>()=>e;function rbe(e,n){return function(t){return e+t*n}}function abe(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function obe(e){return(e=+e)==1?RU:function(n,t){return t-n?abe(n,t,e):sA(isNaN(n)?t:n)}}function RU(e,n){var t=n-e;return t?rbe(e,t):sA(isNaN(e)?n:e)}const rP=(function e(n){var t=obe(n);function i(r,a){var o=t((r=M4(r)).r,(a=M4(a)).r),l=t(r.g,a.g),c=t(r.b,a.b),f=RU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=c(h),r.opacity=f(h),r+""}}return i.gamma=e,i})(1);function sbe(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,c.push({i:o,x:g1(i,r)})),t=y3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function ybe(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?bbe:ybe,c=f=null,d}function d(p){return p==null||isNaN(p=+p)?a:(c||(c=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((f||(f=l(n,e.map(i),g1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,y1),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=lA,h()},d.clamp=function(p){return arguments.length?(o=p?!0:sr,h()):o!==sr},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function uA(){return $0()(sr,sr)}function wbe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function b1(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function ff(e){return e=b1(Math.abs(e)),e?e[1]:NaN}function kbe(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],c=0;r>0&&l>0&&(c+l+1>i&&(l=Math.max(1,i-c)),a.push(t.substring(r-=l,r+l)),!((c+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function _be(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var xbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gm(e){if(!(n=xbe.exec(e)))throw new Error("invalid format: "+e);var n;return new cA({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}gm.prototype=cA.prototype;function cA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}cA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sbe(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var w1;function Cbe(e,n){var t=b1(e,n);if(!t)return w1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(w1=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+b1(e,Math.max(0,n+a-1))[0]}function oP(e,n){var t=b1(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const sP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wbe,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>oP(e*100,n),r:oP,s:Cbe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function lP(e){return e}var uP=Array.prototype.map,cP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Abe(e){var n=e.grouping===void 0||e.thousands===void 0?lP:kbe(uP.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?lP:_be(uP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(d,p){d=gm(d);var v=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,C=d.width,x=d.comma,E=d.precision,O=d.trim,j=d.type;j==="n"?(x=!0,j="g"):sP[j]||(E===void 0&&(E=12),O=!0,j="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),N=(k==="$"?i:/[%p]/.test(j)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),q=sP[j],P=/[defgprs%]/.test(j);E=E===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(H){var G=M,U=N,z,D,$;if(j==="c")U=q(H)+U,H="";else{H=+H;var B=H<0||1/H<0;if(H=isNaN(H)?c:q(Math.abs(H),E),O&&(H=Sbe(H)),B&&+H==0&&w!=="+"&&(B=!1),G=(B?w==="("?w:l:w==="-"||w==="("?"":w)+G,U=(j==="s"&&!isNaN(H)&&w1!==void 0?cP[8+w1/3]:"")+U+(B&&w==="("?")":""),P){for(z=-1,D=H.length;++z$||$>57){U=($===46?r+H.slice(z+1):H.slice(z))+U,H=H.slice(0,z);break}}}x&&!_&&(H=n(H,1/0));var Y=G.length+H.length+U.length,R=Y>1)+G+H+U+R.slice(Y);break;default:H=R+G+H+U;break}return a(H)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(ff(p)/3)))*3,b=Math.pow(10,-v),w=f((d=gm(d),d.type="f",d),{suffix:cP[8+v/3]});return function(k){return w(b*k)}}return{format:f,formatPrefix:h}}var ng,fA,PU;Obe({thousands:",",grouping:[3],currency:["$",""]});function Obe(e){return ng=Abe(e),fA=ng.format,PU=ng.formatPrefix,ng}function jbe(e){return Math.max(0,-ff(Math.abs(e)))}function Ebe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ff(n)/3)))*3-ff(Math.abs(e)))}function Tbe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,ff(n)-ff(e))+1}function NU(e,n,t,i){var r=E4(e,n,t),a;switch(i=gm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Ebe(r,o))&&(i.precision=a),PU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Tbe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=jbe(r))&&(i.precision=a-(i.type==="%")*2);break}}return fA(i)}function Sl(e){var n=e.domain;return e.ticks=function(t){var i=n();return O4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return NU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],c,f,h=10;for(l0;){if(f=j4(o,l,t),f===c)return i[r]=o,i[a]=l,n(i);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;c=f}return e},e}function k1(){var e=uA();return e.copy=function(){return gp(e,k1())},Ca.apply(e,arguments),Sl(e)}function $U(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,y1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return $U(e).unknown(n)},e=arguments.length?Array.from(e,y1):[0,1],Sl(t)}function zU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function Nbe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function hP(e){return(n,t)=>-e(-n,t)}function dA(e){const n=e(fP,dP),t=n.domain;let i=10,r,a;function o(){return r=Nbe(i),a=Pbe(i),t()[0]<0?(r=hP(r),a=hP(a),e(Mbe,Dbe)):e(fP,dP),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const c=t();let f=c[0],h=c[c.length-1];const d=h0){for(;p<=v;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=v;++p)for(b=i-1;b>=1;--b)if(w=p>0?b/a(-p):b*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=gm(c)).precision==null&&(c.trim=!0),c=fA(c)),l===1/0)return c;const f=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(zU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function LU(){const e=dA($0()).domain([1,10]);return e.copy=()=>gp(e,LU()).base(e.base()),Ca.apply(e,arguments),e}function mP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function pP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function hA(e){var n=1,t=e(mP(n),pP(n));return t.constant=function(i){return arguments.length?e(mP(n=+i),pP(n)):n},Sl(t)}function IU(){var e=hA($0());return e.copy=function(){return gp(e,IU()).constant(e.constant())},Ca.apply(e,arguments)}function vP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function $be(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zbe(e){return e<0?-e*e:e*e}function mA(e){var n=e(sr,sr),t=1;function i(){return t===1?e(sr,sr):t===.5?e($be,zbe):e(vP(t),vP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},Sl(n)}function pA(){var e=mA($0());return e.copy=function(){return gp(e,pA()).exponent(e.exponent())},Ca.apply(e,arguments),e}function Lbe(){return pA.apply(null,arguments).exponent(.5)}function gP(e){return Math.sign(e)*e*e}function Ibe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function BU(){var e=uA(),n=[0,1],t=!1,i;function r(a){var o=Ibe(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(gP(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,y1)).map(gP)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return BU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Ca.apply(r,arguments),Sl(r)}function FU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[f-1],i[f]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return i.slice()},o.copy=function(){return qU().domain([e,n]).range(r).unknown(a)},Ca.apply(Sl(o),arguments)}function HU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[pp(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return HU().domain(e).range(n).unknown(t)},Ca.apply(r,arguments)}const b3=new Date,w3=new Date;function Ei(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const c=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return c;let f;do c.push(f=new Date(+a)),n(a,l),e(a);while(fEi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(b3.setTime(+a),w3.setTime(+o),e(b3),e(w3),Math.floor(t(b3,w3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const _1=Ei(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);_1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ei(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):_1);_1.range;const Wo=1e3,ma=Wo*60,Go=ma*60,as=Go*24,vA=as*7,yP=as*30,k3=as*365,cu=Ei(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Wo)},(e,n)=>(n-e)/Wo,e=>e.getUTCSeconds());cu.range;const gA=Ei(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wo)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getMinutes());gA.range;const yA=Ei(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getUTCMinutes());yA.range;const bA=Ei(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wo-e.getMinutes()*ma)},(e,n)=>{e.setTime(+e+n*Go)},(e,n)=>(n-e)/Go,e=>e.getHours());bA.range;const wA=Ei(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Go)},(e,n)=>(n-e)/Go,e=>e.getUTCHours());wA.range;const yp=Ei(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ma)/as,e=>e.getDate()-1);yp.range;const z0=Ei(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>e.getUTCDate()-1);z0.range;const UU=Ei(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>Math.floor(e/as));UU.range;function Fu(e){return Ei(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*ma)/vA)}const L0=Fu(0),x1=Fu(1),Bbe=Fu(2),Fbe=Fu(3),df=Fu(4),qbe=Fu(5),Hbe=Fu(6);L0.range;x1.range;Bbe.range;Fbe.range;df.range;qbe.range;Hbe.range;function qu(e){return Ei(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/vA)}const I0=qu(0),S1=qu(1),Ube=qu(2),Vbe=qu(3),hf=qu(4),Wbe=qu(5),Gbe=qu(6);I0.range;S1.range;Ube.range;Vbe.range;hf.range;Wbe.range;Gbe.range;const kA=Ei(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());kA.range;const _A=Ei(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());_A.range;const os=Ei(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());os.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ei(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});os.range;const ss=Ei(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ei(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});ss.range;function VU(e,n,t,i,r,a){const o=[[cu,1,Wo],[cu,5,5*Wo],[cu,15,15*Wo],[cu,30,30*Wo],[a,1,ma],[a,5,5*ma],[a,15,15*ma],[a,30,30*ma],[r,1,Go],[r,3,3*Go],[r,6,6*Go],[r,12,12*Go],[i,1,as],[i,2,2*as],[t,1,vA],[n,1,yP],[n,3,3*yP],[e,1,k3]];function l(f,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(E4(f/k3,h/k3,d));if(v===0)return _1.every(Math.max(E4(f,h,d),1));const[b,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(we=x3(fh(ne.y,0,1)),Oe=we.getUTCDay(),we=Oe>4||Oe===0?S1.ceil(we):S1(we),we=z0.offset(we,(ne.V-1)*7),ne.y=we.getUTCFullYear(),ne.m=we.getUTCMonth(),ne.d=we.getUTCDate()+(ne.w+6)%7):(we=_3(fh(ne.y,0,1)),Oe=we.getDay(),we=Oe>4||Oe===0?x1.ceil(we):x1(we),we=yp.offset(we,(ne.V-1)*7),ne.y=we.getFullYear(),ne.m=we.getMonth(),ne.d=we.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Oe="Z"in ne?x3(fh(ne.y,0,1)).getUTCDay():_3(fh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Oe+5)%7:ne.w+ne.U*7-(Oe+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,x3(ne)):_3(ne)}}function N(ae,ue,xe,ne){for(var ze=0,we=ue.length,Oe=xe.length,Ne,ge;ze=Oe)return-1;if(Ne=ue.charCodeAt(ze++),Ne===37){if(Ne=ue.charAt(ze++),ge=O[Ne in bP?ue.charAt(ze++):Ne],!ge||(ne=ge(ae,xe,ne))<0)return-1}else if(Ne!=xe.charCodeAt(ne++))return-1}return ne}function q(ae,ue,xe){var ne=f.exec(ue.slice(xe));return ne?(ae.p=h.get(ne[0].toLowerCase()),xe+ne[0].length):-1}function P(ae,ue,xe){var ne=v.exec(ue.slice(xe));return ne?(ae.w=b.get(ne[0].toLowerCase()),xe+ne[0].length):-1}function L(ae,ue,xe){var ne=d.exec(ue.slice(xe));return ne?(ae.w=p.get(ne[0].toLowerCase()),xe+ne[0].length):-1}function H(ae,ue,xe){var ne=_.exec(ue.slice(xe));return ne?(ae.m=C.get(ne[0].toLowerCase()),xe+ne[0].length):-1}function G(ae,ue,xe){var ne=w.exec(ue.slice(xe));return ne?(ae.m=k.get(ne[0].toLowerCase()),xe+ne[0].length):-1}function U(ae,ue,xe){return N(ae,n,ue,xe)}function z(ae,ue,xe){return N(ae,t,ue,xe)}function D(ae,ue,xe){return N(ae,i,ue,xe)}function $(ae){return o[ae.getDay()]}function B(ae){return a[ae.getDay()]}function Y(ae){return c[ae.getMonth()]}function R(ae){return l[ae.getMonth()]}function W(ae){return r[+(ae.getHours()>=12)]}function V(ae){return 1+~~(ae.getMonth()/3)}function I(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return c[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function le(ae){return r[+(ae.getUTCHours()>=12)]}function ye(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ue=j(ae+="",x);return ue.toString=function(){return ae},ue},parse:function(ae){var ue=M(ae+="",!1);return ue.toString=function(){return ae},ue},utcFormat:function(ae){var ue=j(ae+="",E);return ue.toString=function(){return ae},ue},utcParse:function(ae){var ue=M(ae+="",!0);return ue.toString=function(){return ae},ue}}}var bP={"-":"",_:" ",0:"0"},Ni=/^\s*\d+/,Jbe=/^%/,ewe=/[\\^$*+?|[\]().{}]/g;function mt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function twe(e,n,t){var i=Ni.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function iwe(e,n,t){var i=Ni.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function rwe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function awe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function owe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function wP(e,n,t){var i=Ni.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function kP(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function swe(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function lwe(e,n,t){var i=Ni.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function uwe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function _P(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function cwe(e,n,t){var i=Ni.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function xP(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function fwe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function dwe(e,n,t){var i=Ni.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function hwe(e,n,t){var i=Ni.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function mwe(e,n,t){var i=Ni.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function pwe(e,n,t){var i=Jbe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function vwe(e,n,t){var i=Ni.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function gwe(e,n,t){var i=Ni.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function SP(e,n){return mt(e.getDate(),n,2)}function ywe(e,n){return mt(e.getHours(),n,2)}function bwe(e,n){return mt(e.getHours()%12||12,n,2)}function wwe(e,n){return mt(1+yp.count(os(e),e),n,3)}function WU(e,n){return mt(e.getMilliseconds(),n,3)}function kwe(e,n){return WU(e,n)+"000"}function _we(e,n){return mt(e.getMonth()+1,n,2)}function xwe(e,n){return mt(e.getMinutes(),n,2)}function Swe(e,n){return mt(e.getSeconds(),n,2)}function Cwe(e){var n=e.getDay();return n===0?7:n}function Awe(e,n){return mt(L0.count(os(e)-1,e),n,2)}function GU(e){var n=e.getDay();return n>=4||n===0?df(e):df.ceil(e)}function Owe(e,n){return e=GU(e),mt(df.count(os(e),e)+(os(e).getDay()===4),n,2)}function jwe(e){return e.getDay()}function Ewe(e,n){return mt(x1.count(os(e)-1,e),n,2)}function Twe(e,n){return mt(e.getFullYear()%100,n,2)}function Mwe(e,n){return e=GU(e),mt(e.getFullYear()%100,n,2)}function Dwe(e,n){return mt(e.getFullYear()%1e4,n,4)}function Rwe(e,n){var t=e.getDay();return e=t>=4||t===0?df(e):df.ceil(e),mt(e.getFullYear()%1e4,n,4)}function Pwe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+mt(n/60|0,"0",2)+mt(n%60,"0",2)}function CP(e,n){return mt(e.getUTCDate(),n,2)}function Nwe(e,n){return mt(e.getUTCHours(),n,2)}function $we(e,n){return mt(e.getUTCHours()%12||12,n,2)}function zwe(e,n){return mt(1+z0.count(ss(e),e),n,3)}function YU(e,n){return mt(e.getUTCMilliseconds(),n,3)}function Lwe(e,n){return YU(e,n)+"000"}function Iwe(e,n){return mt(e.getUTCMonth()+1,n,2)}function Bwe(e,n){return mt(e.getUTCMinutes(),n,2)}function Fwe(e,n){return mt(e.getUTCSeconds(),n,2)}function qwe(e){var n=e.getUTCDay();return n===0?7:n}function Hwe(e,n){return mt(I0.count(ss(e)-1,e),n,2)}function KU(e){var n=e.getUTCDay();return n>=4||n===0?hf(e):hf.ceil(e)}function Uwe(e,n){return e=KU(e),mt(hf.count(ss(e),e)+(ss(e).getUTCDay()===4),n,2)}function Vwe(e){return e.getUTCDay()}function Wwe(e,n){return mt(S1.count(ss(e)-1,e),n,2)}function Gwe(e,n){return mt(e.getUTCFullYear()%100,n,2)}function Ywe(e,n){return e=KU(e),mt(e.getUTCFullYear()%100,n,2)}function Kwe(e,n){return mt(e.getUTCFullYear()%1e4,n,4)}function Xwe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?hf(e):hf.ceil(e),mt(e.getUTCFullYear()%1e4,n,4)}function Zwe(){return"+0000"}function AP(){return"%"}function OP(e){return+e}function jP(e){return Math.floor(+e/1e3)}var Rc,XU,ZU;Qwe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Qwe(e){return Rc=Qbe(e),XU=Rc.format,Rc.parse,ZU=Rc.utcFormat,Rc.utcParse,Rc}function Jwe(e){return new Date(e)}function eke(e){return e instanceof Date?+e:+new Date(+e)}function xA(e,n,t,i,r,a,o,l,c,f){var h=uA(),d=h.invert,p=h.domain,v=f(".%L"),b=f(":%S"),w=f("%I:%M"),k=f("%I %p"),_=f("%a %d"),C=f("%b %d"),x=f("%B"),E=f("%Y");function O(j){return(c(j)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>H0e(e,a/i))},t.copy=function(){return nV(n).domain(e)},ys.apply(t,arguments)}function F0(){var e=0,n=.5,t=1,i=1,r,a,o,l,c,f=sr,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return C3=e,C3}var A3,DP;function oke(){if(DP)return A3;DP=1;var e=aV(),n=ake(),t=rd();function i(r){return r&&r.length?e(r,t,n):void 0}return A3=i,A3}var ske=oke();const nl=pt(ske);var O3,RP;function lke(){if(RP)return O3;RP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};sn.decimalPlaces=sn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*qt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};sn.dividedBy=sn.div=function(e){return ns(this,new this.constructor(e))};sn.dividedToIntegerBy=sn.idiv=function(e){var n=this,t=n.constructor;return Dt(ns(n,new t(e),0,1),t.precision)};sn.equals=sn.eq=function(e){return!this.cmp(e)};sn.exponent=function(){return yi(this)};sn.greaterThan=sn.gt=function(e){return this.cmp(e)>0};sn.greaterThanOrEqualTo=sn.gte=function(e){return this.cmp(e)>=0};sn.isInteger=sn.isint=function(){return this.e>this.d.length-2};sn.isNegative=sn.isneg=function(){return this.s<0};sn.isPositive=sn.ispos=function(){return this.s>0};sn.isZero=function(){return this.s===0};sn.lessThan=sn.lt=function(e){return this.cmp(e)<0};sn.lessThanOrEqualTo=sn.lte=function(e){return this.cmp(e)<1};sn.logarithm=sn.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(qr))throw Error(ba+"NaN");if(t.s<1)throw Error(ba+(t.s?"NaN":"-Infinity"));return t.eq(qr)?new i(0):(Xt=!1,n=ns(ym(t,a),ym(e,a),a),Xt=!0,Dt(n,r))};sn.minus=sn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?uV(n,e):sV(n,(e.s=-e.s,e))};sn.modulo=sn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ba+"NaN");return t.s?(Xt=!1,n=ns(t,e,0,1).times(e),Xt=!0,t.minus(n)):Dt(new i(t),r)};sn.naturalExponential=sn.exp=function(){return lV(this)};sn.naturalLogarithm=sn.ln=function(){return ym(this)};sn.negated=sn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};sn.plus=sn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?sV(n,e):uV(n,(e.s=-e.s,e))};sn.precision=sn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(pu+e);if(n=yi(r)+1,i=r.d.length-1,t=i*qt+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};sn.squareRoot=sn.sqrt=function(){var e,n,t,i,r,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(ba+"NaN")}for(e=yi(l),Xt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=to(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=sd((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new c(n)):i=new c(r.toString()),t=c.precision,r=o=t+3;;)if(a=i,i=a.plus(ns(l,a,o+2)).times(.5),to(a.d).slice(0,o)===(n=to(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Dt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Xt=!0,Dt(i,t)};sn.times=sn.mul=function(e){var n,t,i,r,a,o,l,c,f,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,c=p.length,f=v.length,c=0;){for(n=0,r=c+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%Di|0,n=l/Di|0;a[r]=(a[r]+n)%Di|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Xt?Dt(e,d.precision):e};sn.toDecimalPlaces=sn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(mo(e,0,od),n===void 0?n=i.rounding:mo(n,0,8),Dt(t,e+yi(t)+1,n))};sn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=Ou(i,!0):(mo(e,0,od),n===void 0?n=r.rounding:mo(n,0,8),i=Dt(new r(i),e+1,n),t=Ou(i,!0,e+1)),t};sn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?Ou(r):(mo(e,0,od),n===void 0?n=a.rounding:mo(n,0,8),i=Dt(new a(r),e+yi(r)+1,n),t=Ou(i.abs(),!1,e+yi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};sn.toInteger=sn.toint=function(){var e=this,n=e.constructor;return Dt(new n(e),yi(e)+1,n.rounding)};sn.toNumber=function(){return+this};sn.toPower=sn.pow=function(e){var n,t,i,r,a,o,l=this,c=l.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(qr);if(l=new c(l),!l.s){if(e.s<1)throw Error(ba+"Infinity");return l}if(l.eq(qr))return l;if(i=c.precision,e.eq(qr))return Dt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=oV){for(r=new c(qr),n=Math.ceil(i/qt+4),Xt=!1;t%2&&(r=r.times(l),IP(r.d,n)),t=sd(t/2),t!==0;)l=l.times(l),IP(l.d,n);return Xt=!0,e.s<0?new c(qr).div(r):Dt(r,i)}}else if(a<0)throw Error(ba+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Xt=!1,r=e.times(ym(l,i+f)),Xt=!0,r=lV(r),r.s=a,r};sn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=yi(r),i=Ou(r,t<=a.toExpNeg||t>=a.toExpPos)):(mo(e,1,od),n===void 0?n=a.rounding:mo(n,0,8),r=Dt(new a(r),e,n),t=yi(r),i=Ou(r,e<=t||t<=a.toExpNeg,e)),i};sn.toSignificantDigits=sn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(mo(e,1,od),n===void 0?n=i.rounding:mo(n,0,8)),Dt(new i(t),e,n)};sn.toString=sn.valueOf=sn.val=sn.toJSON=sn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=yi(e),t=e.constructor;return Ou(e,n<=t.toExpNeg||n>=t.toExpPos)};function sV(e,n){var t,i,r,a,o,l,c,f,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Xt?Dt(n,d):n;if(c=e.d,f=n.d,o=e.e,r=n.e,c=c.slice(),a=o-r,a){for(a<0?(i=c,a=-a,l=f.length):(i=f,r=o,l=c.length),o=Math.ceil(d/qt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=c.length,a=f.length,l-a<0&&(a=l,i=f,f=c,c=i),t=0;a;)t=(c[--a]=c[a]+f[a]+t)/Di|0,c[a]%=Di;for(t&&(c.unshift(t),++r),l=c.length;c[--l]==0;)c.pop();return n.d=c,n.e=r,Xt?Dt(n,d):n}function mo(e,n,t){if(e!==~~e||et)throw Error(pu+e)}function to(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=c=0;lr[l]?1:-1;break}return c}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,c,f,h,d,p,v,b,w,k,_,C,x,E,O,j,M,N,q=i.constructor,P=i.s==r.s?1:-1,L=i.d,H=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(ba+"Division by zero");for(c=i.e-r.e,M=H.length,O=L.length,v=new q(P),b=v.d=[],f=0;H[f]==(L[f]||0);)++f;if(H[f]>(L[f]||0)&&--c,a==null?C=a=q.precision:o?C=a+(yi(i)-yi(r))+1:C=a,C<0)return new q(0);if(C=C/qt+2|0,f=0,M==1)for(h=0,H=H[0],C++;(f1&&(H=e(H,h),L=e(L,h),M=H.length,O=L.length),E=M,w=L.slice(0,M),k=w.length;k=Di/2&&++j;do h=0,l=n(H,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Di+(w[1]||0)),h=_/j|0,h>1?(h>=Di&&(h=Di-1),d=e(H,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(AA+yi(e));if(!e.s)return new h(qr);for(Xt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(i=Math.log(iu(2,f))/Math.LN10*2+5|0,l+=i,t=r=a=new h(qr),h.precision=l;;){if(r=Dt(r.times(e),l),t=t.times(++c),o=a.plus(ns(r,t,l)),to(o.d).slice(0,l)===to(a.d).slice(0,l)){for(;f--;)a=Dt(a.times(a),l);return h.precision=d,n==null?(Xt=!0,Dt(a,d)):a}a=o}}function yi(e){for(var n=e.e*qt,t=e.d[0];t>=10;t/=10)n++;return n}function D3(e,n,t){if(n>e.LN10.sd())throw Xt=!0,t&&(e.precision=t),Error(ba+"LN10 precision limit exceeded");return Dt(new e(e.LN10),n)}function Ks(e){for(var n="";e--;)n+="0";return n}function ym(e,n){var t,i,r,a,o,l,c,f,h,d=1,p=10,v=e,b=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(ba+(v.s?"NaN":"-Infinity"));if(v.eq(qr))return new w(0);if(n==null?(Xt=!1,f=k):f=n,v.eq(10))return n==null&&(Xt=!0),D3(w,f);if(f+=p,w.precision=f,t=to(b),i=t.charAt(0),a=yi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=to(v.d),i=t.charAt(0),d++;a=yi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return c=D3(w,f+2,k).times(a+""),v=ym(new w(i+"."+t.slice(1)),f-p).plus(c),w.precision=k,n==null?(Xt=!0,Dt(v,k)):v;for(l=o=v=ns(v.minus(qr),v.plus(qr),f),h=Dt(v.times(v),f),r=3;;){if(o=Dt(o.times(h),f),c=l.plus(ns(o,new w(r),f)),to(c.d).slice(0,f)===to(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(D3(w,f+2,k).times(a+""))),l=ns(l,new w(d),f),w.precision=k,n==null?(Xt=!0,Dt(l,k)):l;l=c,r+=2}}function LP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=sd(t/qt),e.d=[],i=(t+1)%qt,t<0&&(i+=qt),iC1||e.e<-C1))throw Error(AA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Dt(e,n,t){var i,r,a,o,l,c,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=qt,r=n,f=d[h=0];else{if(h=Math.ceil((i+1)/qt),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;i%=qt,r=i-qt+o}if(t!==void 0&&(a=iu(10,o-r-1),l=f/a%10|0,c=n<0||d[h+1]!==void 0||f%a,c=t<4?(l||c)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||c||t==6&&(i>0?r>0?f/iu(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return c?(a=yi(e),d.length=1,n=n-a-1,d[0]=iu(10,(qt-n%qt)%qt),e.e=sd(-n/qt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=iu(10,qt-i),d[h]=r>0?(f/iu(10,o-r)%iu(10,r)|0)*a:0),c)for(;;)if(h==0){(d[0]+=a)==Di&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Di)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Xt&&(e.e>C1||e.e<-C1))throw Error(AA+yi(e));return e}function uV(e,n){var t,i,r,a,o,l,c,f,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Xt?Dt(n,v):n;if(c=e.d,d=n.d,i=n.e,f=e.e,c=c.slice(),o=f-i,o){for(h=o<0,h?(t=c,o=-o,l=d.length):(t=d,i=f,l=c.length),r=Math.max(Math.ceil(v/qt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=c.length,l=d.length,h=r0;--r)c[l++]=0;for(r=d.length;r>o;){if(c[--r]0?a=a.charAt(0)+"."+a.slice(1)+Ks(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+Ks(-r-1)+a,t&&(i=t-o)>0&&(a+=Ks(i))):r>=o?(a+=Ks(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+Ks(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=Ks(i))),e.s<0?"-"+a:a}function IP(e,n){if(e.length>n)return e.length=n,!0}function cV(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(pu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return LP(o,a.toString())}else if(typeof a!="string")throw Error(pu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,yke.test(a))LP(o,a);else throw Error(pu+a)}if(r.prototype=sn,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=cV,r.config=r.set=bke,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(pu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(pu+t+": "+i);return this}var OA=cV(gke);qr=new OA(1);const At=OA;function wke(e){return Ske(e)||xke(e)||_ke(e)||kke()}function kke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _ke(e,n){if(e){if(typeof e=="string")return P4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P4(e,n)}}function xke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Ske(e){if(Array.isArray(e))return P4(e)}function P4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,BP(function(){for(var l=arguments.length,c=new Array(l),f=0;fe.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(c){r=!0,a=c}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function Ike(e){if(Array.isArray(e))return e}function pV(e){var n=bm(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function vV(e,n,t){if(e.lte(0))return new At(0);var i=U0.getDigitCount(e.toNumber()),r=new At(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new At(Math.ceil(a.div(o).toNumber())).add(t).mul(o),c=l.mul(r);return n?c:new At(Math.ceil(c))}function Bke(e,n,t){var i=1,r=new At(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new At(10).pow(U0.getDigitCount(e)-1),r=new At(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new At(Math.floor(e)))}else e===0?r=new At(Math.floor((n-1)/2)):t||(r=new At(Math.floor(e)));var o=Math.floor((n-1)/2),l=jke(Oke(function(c){return r.add(new At(c-o).mul(i)).toNumber()}),N4);return l(0,n)}function gV(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new At(0),tickMin:new At(0),tickMax:new At(0)};var a=vV(new At(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new At(0):(o=new At(e).add(n).div(2),o=o.sub(new At(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new At(n).sub(o).div(a).toNumber()),f=l+c+1;return f>t?gV(e,n,t,i,r+1):(f0?c+(t-f):c,l=n>0?l:l+(t-f)),{step:a,tickMin:o.sub(new At(l).mul(a)),tickMax:o.add(new At(c).mul(a))})}function Fke(e){var n=bm(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=pV([t,i]),c=bm(l,2),f=c[0],h=c[1];if(f===-1/0||h===1/0){var d=h===1/0?[f].concat(z4(N4(0,r-1).map(function(){return 1/0}))):[].concat(z4(N4(0,r-1).map(function(){return-1/0})),[h]);return t>i?$4(d):d}if(f===h)return Bke(f,r,a);var p=gV(f,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=U0.rangeStep(b,w.add(new At(.1).mul(v)),v);return t>i?$4(k):k}function qke(e,n){var t=bm(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=pV([i,r]),l=bm(o,2),c=l[0],f=l[1];if(c===-1/0||f===1/0)return[i,r];if(c===f)return[c];var h=Math.max(n,2),d=vV(new At(f).sub(c).div(h-1),a,0),p=[].concat(z4(U0.rangeStep(new At(c),new At(f).sub(new At(.99).mul(d)),d)),[f]);return i>r?$4(p):p}var Hke=hV(Fke),Uke=hV(qke),Vke="Invariant failed";function ju(e,n){throw new Error(Vke)}var Wke=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pf(e)}function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Jke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function e_e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function n_e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f0?r[f-1].coordinate:r[l-1].coordinate,d=r[f].coordinate,p=f>=l-1?r[0].coordinate:r[f+1].coordinate,v=void 0;if(Fa(d-h)!==Fa(p-d)){var b=[];if(Fa(p-d)===Fa(c[1]-c[0])){v=p;var w=d+c[1]-c[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+c[1]-c[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[f].index;break}}else{var C=Math.min(h,p),x=Math.max(h,p);if(n>(C+d)/2&&n<=(x+d)/2){o=r[f].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},jA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ni(ni({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,c;switch(r){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},y_e=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),c=0,f=l.length;c=0});if(_&&_.length){var C=_[0].type.defaultProps,x=C!==void 0?ni(ni({},C),_[0].props):_[0].props,E=x.barSize,O=x[k];o[O]||(o[O]=[]);var j=Gn(E)?t:E;o[O].push({item:_[0],stackList:_.slice(1),barSize:Gn(j)?void 0:Au(j,i,0)})}}return o},b_e=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,c=o.length;if(c<1)return null;var f=Au(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/c,b=o.reduce(function(E,O){return E+O.barSize||0},0);b+=(c-1)*f,b>=r&&(b-=(c-1)*f,f=0),b>=r&&v>0&&(p=!0,v*=.9,b=c*v);var w=(r-b)/2>>0,k={offset:w-f,size:0};h=o.reduce(function(E,O){var j={item:O.item,position:{offset:k.offset+k.size+f,size:p?v:O.barSize}},M=[].concat(HP(E),[j]);return k=M[M.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:k})}),M},d)}else{var _=Au(i,r,0,!0);r-2*_-(c-1)*f<=0&&(f=0);var C=(r-2*_-(c-1)*f)/c;C>1&&(C>>=0);var x=l===+l?Math.min(C,l):C;h=o.reduce(function(E,O,j){var M=[].concat(HP(E),[{item:O.item,position:{offset:_+(C+f)*j+(C-x)/2,size:x}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:M[M.length-1].position})}),M},d)}return h},w_e=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,c=o-(l.left||0)-(l.right||0),f=kV({children:a,legendWidth:c});if(f){var h=r||{},d=h.width,p=h.height,v=f.align,b=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&v!=="center"&&Ge(n[v]))return ni(ni({},n),{},Xc({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&Ge(n[b]))return ni(ni({},n),{},Xc({},b,n[b]+(p||0)))}return n},k_e=function(n,t,i){return Gn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},_V=function(n,t,i,r,a){var o=t.props.children,l=va(o,bp).filter(function(f){return k_e(r,a,f.props.direction)});if(l&&l.length){var c=l.map(function(f){return f.props.dataKey});return n.reduce(function(f,h){var d=ur(h,i);if(Gn(d))return f;var p=Array.isArray(d)?[q0(d),nl(d)]:[d,d],v=c.reduce(function(b,w){var k=ur(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),C=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(C,b[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},__e=function(n,t,i,r,a){var o=t.map(function(l){return _V(n,l,i,a,r)}).filter(function(l){return!Gn(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},xV=function(n,t,i,r,a){var o=t.map(function(c){var f=c.props.dataKey;return i==="number"&&f&&_V(n,c,f,r)||Fh(n,f,i,a)});if(i==="number")return o.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,f){for(var h=0,d=f.length;h=2?Fa(l[0]-l[1])*2*f:f,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+f,value:d,offset:f}});return h.filter(function(d){return!td(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+f,value:d,index:p,offset:f}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+f,value:d,offset:f}}):r.domain().map(function(d,p){return{coordinate:r(d)+f,value:a?a[d]:d,index:p,offset:f}})},R3=new WeakMap,tg=function(n,t){if(typeof t!="function")return n;R3.has(n)||R3.set(n,new WeakMap);var i=R3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},x_e=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:hm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:k1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:Bh(),realScaleType:"point"}:a==="category"?{scale:hm(),realScaleType:"band"}:{scale:k1(),realScaleType:"linear"};if(Cu(r)){var c="scale".concat(E0(r));return{scale:(EP[c]||Bh)(),realScaleType:EP[c]?c:"point"}}return Bn(r)?{scale:r}:{scale:Bh(),realScaleType:"point"}},VP=1e-4,S_e=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-VP,o=Math.max(r[0],r[1])+VP,l=n(t[0]),c=n(t[i-1]);(lo||co)&&n.domain([t[0],t[i-1]])}},C_e=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+c,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+c,o=n[l][i][1])}},j_e=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},E_e={sign:O_e,expand:dge,none:of,silhouette:hge,wiggle:mge,positive:j_e},T_e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=E_e[i],o=fge().keys(r).value(function(l,c){return+ur(l,c,0)}).order(v4).offset(a);return o(n)},M_e=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,c={},f=l.reduce(function(d,p){var v,b=(v=p.type)!==null&&v!==void 0&&v.defaultProps?ni(ni({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],C=d[_]||{hasStack:!1,stackGroups:{}};if(Oi(w)){var x=C.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};x.items.push(p),C.hasStack=!0,C.stackGroups[w]=x}else C.stackGroups[id("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ni(ni({},d),{},Xc({},_,C))},c),h={};return Object.keys(f).reduce(function(d,p){var v=f[p];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return ni(ni({},w),{},Xc({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:T_e(n,_.items,a)}))},b)}return ni(ni({},d),{},Xc({},p,v))},h)},D_e=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,c=i||t.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=n.domain();if(!f.length)return null;var h=Hke(f,a,l);return n.domain([q0(h),nl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=Uke(d,a,l);return{niceTicks:p}}return null};function j1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Gn(r[n.dataKey])){var l=e1(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var c=ur(r,Gn(o)?n.dataKey:o);return Gn(c)?null:n.scale(c)}var WP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var c=ur(o,t.dataKey,t.domain[l]);return Gn(c)?null:t.scale(c)-a/2+r},R_e=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},P_e=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ni(ni({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(Oi(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},N_e=function(n){return n.reduce(function(t,i){return[q0(i.concat([t[0]]).filter(Ge)),nl(i.concat([t[1]]).filter(Ge))]},[1/0,-1/0])},AV=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,c=l.reduce(function(f,h){var d=N_e(h.slice(t,i+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},GP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,YP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,F4=function(n,t,i){if(Bn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ge(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(GP.test(n[0])){var a=+GP.exec(n[0])[1];r[0]=t[0]-a}else Bn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ge(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(YP.test(n[1])){var o=+YP.exec(n[1])[1];r[1]=t[1]+o}else Bn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},E1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=nA(t,function(d){return d.coordinate}),o=1/0,l=1,c=a.length;lo&&(f=2*Math.PI-f),{radius:l,angle:I_e(f),angleInRadian:f}},q_e=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},H_e=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},QP=function(n,t){var i=n.x,r=n.y,a=F_e({x:i,y:r},t),o=a.radius,l=a.angle,c=t.innerRadius,f=t.outerRadius;if(of)return!1;if(o===0)return!0;var h=q_e(t),d=h.startAngle,p=h.endAngle,v=l,b;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return b?ZP(ZP({},t),{},{radius:o,angle:H_e(v,t)}):null};function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}var U_e=["offset"];function V_e(e){return K_e(e)||Y_e(e)||G_e(e)||W_e()}function W_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G_e(e,n){if(e){if(typeof e=="string")return q4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return q4(e,n)}}function Y_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K_e(e){if(Array.isArray(e))return q4(e)}function q4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Z_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function JP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Si(e){for(var n=1;n=0?1:-1,x,E;r==="insideStart"?(x=v+C*o,E=w):r==="insideEnd"?(x=b-C*o,E=!w):r==="end"&&(x=b+C*o,E=w),E=_<=0?E:!E;var O=Ui(f,h,k,x),j=Ui(f,h,k,x+(E?1:-1)*359),M="M".concat(O.x,",").concat(O.y,` + height and width.`,$,P,o,c,h,d,t);var I=!Array.isArray(v)&&rs(v.type).endsWith("Chart");return Q.Children.map(v,function(H){return Q.isValidElement(H)?A.cloneElement(H,eg({width:$,height:P},I?{style:eg({height:"100%",width:"100%",maxHeight:P,maxWidth:$},H.props.style)}:{})):H})},[t,v,c,p,d,h,q,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:pn("recharts-responsive-container",_),style:eg(eg({},E),{},{width:o,height:c,minWidth:h,minHeight:d,maxHeight:p}),ref:j},F)}),DU=function(n){return null};DU.displayName="Cell";function vm(e){"@babel/helpers - typeof";return vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vm(e)}function BR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function A4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Fu.isSsr)return{width:0,height:0};var i=C0e(t),r=JSON.stringify({text:n,copyStyle:i});if(Pc.widthCache[r])return Pc.widthCache[r];try{var a=document.getElementById(FR);a||(a=document.createElement("span"),a.setAttribute("id",FR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=A4(A4({},S0e),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Pc.widthCache[r]=c,++Pc.cacheCount>x0e&&(Pc.cacheCount=0,Pc.widthCache={}),c}catch{return{width:0,height:0}}},A0e=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function gm(e){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function m1(e,n){return T0e(e)||E0e(e,n)||O0e(e,n)||j0e()}function j0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O0e(e,n){if(e){if(typeof e=="string")return qR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qR(e,n)}}function qR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function U0e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function YR(e,n){return Y0e(e)||G0e(e,n)||W0e(e,n)||V0e()}function V0e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W0e(e,n){if(e){if(typeof e=="string")return KR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return KR(e,n)}}function KR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(P,I){var H=I.word,U=I.width,D=P[P.length-1];if(D&&(r==null||a||D.width+U+iI.width?P:I})};if(!h)return v;for(var w="…",k=function($){var P=d.slice(0,$),I=$U({breakAll:f,style:c,children:P+w}).wordsWithComputedWidth,H=p(I),U=H.length>o||b(H).width>Number(r);return[U,H]},_=0,C=d.length-1,x=0,E;_<=C&&x<=d.length-1;){var j=Math.floor((_+C)/2),O=j-1,M=k(O),N=YR(M,2),q=N[0],R=N[1],L=k(j),F=YR(L,1),Y=F[0];if(!q&&!Y&&(_=j+1),q&&Y&&(C=j-1),!q&&Y){E=R;break}x++}return E||v},XR=function(n){var t=Yn(n)?[]:n.toString().split(NU);return[{words:t}]},X0e=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Fu.isSsr){var c,f,h=$U({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;c=d,f=p}else return XR(r);return K0e({breakAll:o,children:r,maxLines:l,style:a},c,f,t,i)}return XR(r)},ZR="#808080",p1=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,c=n.capHeight,f=c===void 0?"0.71em":c,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?ZR:k,C=GR(n,q0e),x=A.useMemo(function(){return X0e({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),E=C.dx,j=C.dy,O=C.angle,M=C.className,N=C.breakAll,q=GR(C,H0e);if(!Si(i)||!Si(a))return null;var R=i+(Ge(E)?E:0),L=a+(Ge(j)?j:0),F;switch(w){case"start":F=y3("calc(".concat(f,")"));break;case"middle":F=y3("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:F=y3("calc(".concat(x.length-1," * -").concat(l,")"));break}var Y=[];if(d){var V=x[0].width,$=C.width;Y.push("scale(".concat((Ge($)?$/V:1)/V,")"))}return O&&Y.push("rotate(".concat(O,", ").concat(R,", ").concat(L,")")),Y.length&&(q.transform=Y.join(" ")),Q.createElement("text",j4({},Wn(q,!0),{x:R,y:L,className:pn("recharts-text",M),textAnchor:v,fill:_.includes("url")?ZR:_}),x.map(function(P,I){var H=P.words.join(N?"":" ");return Q.createElement("tspan",{x:R,dy:I===0?F:l,key:"".concat(H,"-").concat(I)},H)}))};function fl(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function Z0e(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function oA(e){let n,t,i;e.length!==2?(n=fl,t=(l,c)=>fl(e(l),c),i=(l,c)=>e(l)-c):(n=e===fl||e===Z0e?e:Q0e,t=e,i=e);function r(l,c,f=0,h=l.length){if(f>>1;t(l[d],c)<0?f=d+1:h=d}while(f>>1;t(l[d],c)<=0?f=d+1:h=d}while(ff&&i(l[d-1],c)>-i(l[d],c)?d-1:d}return{left:r,center:o,right:a}}function Q0e(){return 0}function zU(e){return e===null?NaN:+e}function*J0e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const ebe=oA(fl),wp=ebe.right;oA(zU).center;class QR extends Map{constructor(n,t=ibe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(JR(this,n))}has(n){return super.has(JR(this,n))}set(n,t){return super.set(nbe(this,n),t)}delete(n){return super.delete(tbe(this,n))}}function JR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function nbe({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function tbe({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function ibe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function rbe(e=fl){if(e===fl)return LU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function LU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const abe=Math.sqrt(50),obe=Math.sqrt(10),sbe=Math.sqrt(2);function v1(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=abe?10:a>=obe?5:a>=sbe?2:1;let l,c,f;return r<0?(f=Math.pow(10,-r)/o,l=Math.round(e*f),c=Math.round(n*f),l/fn&&--c,f=-f):(f=Math.pow(10,r)*o,l=Math.round(e/f),c=Math.round(n/f),l*fn&&--c),c0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,c=new Array(l);if(i)if(o<0)for(let f=0;f=i)&&(t=i);return t}function nP(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function IU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?LU:rbe(r);i>t;){if(i-t>600){const c=i-t+1,f=n-t+1,h=Math.log(c),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(c-d)/c)*(f-c/2<0?-1:1),v=Math.max(t,Math.floor(n-f*d/c+p)),b=Math.min(i,Math.floor(n+(c-f)*d/c+p));IU(e,n,v,b,r)}const a=e[n];let o=t,l=i;for(hh(e,t,n),r(e[i],a)>0&&hh(e,t,i);o0;)--l}r(e[t],a)===0?hh(e,t,l):(++l,hh(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function hh(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function lbe(e,n,t){if(e=Float64Array.from(J0e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return nP(e);if(n>=1)return eP(e);var i,r=(i-1)*n,a=Math.floor(r),o=eP(IU(e,a).subarray(0,a+1)),l=nP(e.subarray(a+1));return o+(l-o)*(r-a)}}function ube(e,n,t=zU){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function cbe(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?tg(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?tg(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=dbe.exec(e))?new Cr(n[1],n[2],n[3],1):(n=hbe.exec(e))?new Cr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=mbe.exec(e))?tg(n[1],n[2],n[3],n[4]):(n=pbe.exec(e))?tg(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=vbe.exec(e))?lP(n[1],n[2]/100,n[3]/100,1):(n=gbe.exec(e))?lP(n[1],n[2]/100,n[3]/100,n[4]):tP.hasOwnProperty(e)?aP(tP[e]):e==="transparent"?new Cr(NaN,NaN,NaN,0):null}function aP(e){return new Cr(e>>16&255,e>>8&255,e&255,1)}function tg(e,n,t,i){return i<=0&&(e=n=t=NaN),new Cr(e,n,t,i)}function wbe(e){return e instanceof kp||(e=km(e)),e?(e=e.rgb(),new Cr(e.r,e.g,e.b,e.opacity)):new Cr}function D4(e,n,t,i){return arguments.length===1?wbe(e):new Cr(e,n,t,i??1)}function Cr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}lA(Cr,D4,FU(kp,{brighter(e){return e=e==null?g1:Math.pow(g1,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bm:Math.pow(bm,e),new Cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cr(pu(this.r),pu(this.g),pu(this.b),y1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oP,formatHex:oP,formatHex8:kbe,formatRgb:sP,toString:sP}));function oP(){return`#${cu(this.r)}${cu(this.g)}${cu(this.b)}`}function kbe(){return`#${cu(this.r)}${cu(this.g)}${cu(this.b)}${cu((isNaN(this.opacity)?1:this.opacity)*255)}`}function sP(){const e=y1(this.opacity);return`${e===1?"rgb(":"rgba("}${pu(this.r)}, ${pu(this.g)}, ${pu(this.b)}${e===1?")":`, ${e})`}`}function y1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cu(e){return e=pu(e),(e<16?"0":"")+e.toString(16)}function lP(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ia(e,n,t,i)}function qU(e){if(e instanceof Ia)return new Ia(e.h,e.s,e.l,e.opacity);if(e instanceof kp||(e=km(e)),!e)return new Ia;if(e instanceof Ia)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,c=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&c<1?0:o,new Ia(o,l,c,e.opacity)}function _be(e,n,t,i){return arguments.length===1?qU(e):new Ia(e,n,t,i??1)}function Ia(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}lA(Ia,_be,FU(kp,{brighter(e){return e=e==null?g1:Math.pow(g1,e),new Ia(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bm:Math.pow(bm,e),new Ia(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new Cr(b3(e>=240?e-240:e+120,r,i),b3(e,r,i),b3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Ia(uP(this.h),ig(this.s),ig(this.l),y1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=y1(this.opacity);return`${e===1?"hsl(":"hsla("}${uP(this.h)}, ${ig(this.s)*100}%, ${ig(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uP(e){return e=(e||0)%360,e<0?e+360:e}function ig(e){return Math.max(0,Math.min(1,e||0))}function b3(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const uA=e=>()=>e;function xbe(e,n){return function(t){return e+t*n}}function Sbe(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function Cbe(e){return(e=+e)==1?HU:function(n,t){return t-n?Sbe(n,t,e):uA(isNaN(n)?t:n)}}function HU(e,n){var t=n-e;return t?xbe(e,t):uA(isNaN(e)?n:e)}const cP=(function e(n){var t=Cbe(n);function i(r,a){var o=t((r=D4(r)).r,(a=D4(a)).r),l=t(r.g,a.g),c=t(r.b,a.b),f=HU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=c(h),r.opacity=f(h),r+""}}return i.gamma=e,i})(1);function Abe(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,c.push({i:o,x:b1(i,r)})),t=w3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function zbe(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?Lbe:zbe,c=f=null,d}function d(p){return p==null||isNaN(p=+p)?a:(c||(c=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((f||(f=l(n,e.map(i),b1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,w1),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=cA,h()},d.clamp=function(p){return arguments.length?(o=p?!0:ur,h()):o!==ur},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function fA(){return L0()(ur,ur)}function Ibe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function k1(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function hf(e){return e=k1(Math.abs(e)),e?e[1]:NaN}function Bbe(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],c=0;r>0&&l>0&&(c+l+1>i&&(l=Math.max(1,i-c)),a.push(t.substring(r-=l,r+l)),!((c+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function Fbe(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var qbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _m(e){if(!(n=qbe.exec(e)))throw new Error("invalid format: "+e);var n;return new dA({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}_m.prototype=dA.prototype;function dA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}dA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hbe(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var _1;function Ube(e,n){var t=k1(e,n);if(!t)return _1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(_1=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+k1(e,Math.max(0,n+a-1))[0]}function dP(e,n){var t=k1(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const hP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ibe,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>dP(e*100,n),r:dP,s:Ube,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function mP(e){return e}var pP=Array.prototype.map,vP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vbe(e){var n=e.grouping===void 0||e.thousands===void 0?mP:Bbe(pP.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?mP:Fbe(pP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(d,p){d=_m(d);var v=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,C=d.width,x=d.comma,E=d.precision,j=d.trim,O=d.type;O==="n"?(x=!0,O="g"):hP[O]||(E===void 0&&(E=12),j=!0,O="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),N=(k==="$"?i:/[%p]/.test(O)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),q=hP[O],R=/[defgprs%]/.test(O);E=E===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(F){var Y=M,V=N,$,P,I;if(O==="c")V=q(F)+V,F="";else{F=+F;var H=F<0||1/F<0;if(F=isNaN(F)?c:q(Math.abs(F),E),j&&(F=Hbe(F)),H&&+F==0&&w!=="+"&&(H=!1),Y=(H?w==="("?w:l:w==="-"||w==="("?"":w)+Y,V=(O==="s"&&!isNaN(F)&&_1!==void 0?vP[8+_1/3]:"")+V+(H&&w==="("?")":""),R){for($=-1,P=F.length;++$I||I>57){V=(I===46?r+F.slice($+1):F.slice($))+V,F=F.slice(0,$);break}}}x&&!_&&(F=n(F,1/0));var U=Y.length+F.length+V.length,D=U>1)+Y+F+V+D.slice(U);break;default:F=D+Y+F+V;break}return a(F)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(hf(p)/3)))*3,b=Math.pow(10,-v),w=f((d=_m(d),d.type="f",d),{suffix:vP[8+v/3]});return function(k){return w(b*k)}}return{format:f,formatPrefix:h}}var rg,hA,UU;Wbe({thousands:",",grouping:[3],currency:["$",""]});function Wbe(e){return rg=Vbe(e),hA=rg.format,UU=rg.formatPrefix,rg}function Gbe(e){return Math.max(0,-hf(Math.abs(e)))}function Ybe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hf(n)/3)))*3-hf(Math.abs(e)))}function Kbe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,hf(n)-hf(e))+1}function VU(e,n,t,i){var r=T4(e,n,t),a;switch(i=_m(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=Ybe(r,o))&&(i.precision=a),UU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=Kbe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Gbe(r))&&(i.precision=a-(i.type==="%")*2);break}}return hA(i)}function El(e){var n=e.domain;return e.ticks=function(t){var i=n();return O4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return VU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],c,f,h=10;for(l0;){if(f=E4(o,l,t),f===c)return i[r]=o,i[a]=l,n(i);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;c=f}return e},e}function x1(){var e=fA();return e.copy=function(){return _p(e,x1())},Ea.apply(e,arguments),El(e)}function WU(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,w1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return WU(e).unknown(n)},e=arguments.length?Array.from(e,w1):[0,1],El(t)}function GU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function ewe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function bP(e){return(n,t)=>-e(-n,t)}function mA(e){const n=e(gP,yP),t=n.domain;let i=10,r,a;function o(){return r=ewe(i),a=Jbe(i),t()[0]<0?(r=bP(r),a=bP(a),e(Xbe,Zbe)):e(gP,yP),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const c=t();let f=c[0],h=c[c.length-1];const d=h0){for(;p<=v;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=v;++p)for(b=i-1;b>=1;--b)if(w=p>0?b/a(-p):b*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=_m(c)).precision==null&&(c.trim=!0),c=hA(c)),l===1/0)return c;const f=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(GU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function YU(){const e=mA(L0()).domain([1,10]);return e.copy=()=>_p(e,YU()).base(e.base()),Ea.apply(e,arguments),e}function wP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function kP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function pA(e){var n=1,t=e(wP(n),kP(n));return t.constant=function(i){return arguments.length?e(wP(n=+i),kP(n)):n},El(t)}function KU(){var e=pA(L0());return e.copy=function(){return _p(e,KU()).constant(e.constant())},Ea.apply(e,arguments)}function _P(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function nwe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function twe(e){return e<0?-e*e:e*e}function vA(e){var n=e(ur,ur),t=1;function i(){return t===1?e(ur,ur):t===.5?e(nwe,twe):e(_P(t),_P(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},El(n)}function gA(){var e=vA(L0());return e.copy=function(){return _p(e,gA()).exponent(e.exponent())},Ea.apply(e,arguments),e}function iwe(){return gA.apply(null,arguments).exponent(.5)}function xP(e){return Math.sign(e)*e*e}function rwe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function XU(){var e=fA(),n=[0,1],t=!1,i;function r(a){var o=rwe(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(xP(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,w1)).map(xP)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return XU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Ea.apply(r,arguments),El(r)}function ZU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[f-1],i[f]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return i.slice()},o.copy=function(){return QU().domain([e,n]).range(r).unknown(a)},Ea.apply(El(o),arguments)}function JU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[wp(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return JU().domain(e).range(n).unknown(t)},Ea.apply(r,arguments)}const k3=new Date,_3=new Date;function ji(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const c=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return c;let f;do c.push(f=new Date(+a)),n(a,l),e(a);while(fji(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(k3.setTime(+a),_3.setTime(+o),e(k3),e(_3),Math.floor(t(k3,_3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const S1=ji(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);S1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ji(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):S1);S1.range;const Qo=1e3,ba=Qo*60,Jo=ba*60,fs=Jo*24,yA=fs*7,SP=fs*30,x3=fs*365,fu=ji(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Qo)},(e,n)=>(n-e)/Qo,e=>e.getUTCSeconds());fu.range;const bA=ji(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qo)},(e,n)=>{e.setTime(+e+n*ba)},(e,n)=>(n-e)/ba,e=>e.getMinutes());bA.range;const wA=ji(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ba)},(e,n)=>(n-e)/ba,e=>e.getUTCMinutes());wA.range;const kA=ji(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qo-e.getMinutes()*ba)},(e,n)=>{e.setTime(+e+n*Jo)},(e,n)=>(n-e)/Jo,e=>e.getHours());kA.range;const _A=ji(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Jo)},(e,n)=>(n-e)/Jo,e=>e.getUTCHours());_A.range;const xp=ji(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ba)/fs,e=>e.getDate()-1);xp.range;const I0=ji(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>e.getUTCDate()-1);I0.range;const eV=ji(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/fs,e=>Math.floor(e/fs));eV.range;function qu(e){return ji(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*ba)/yA)}const B0=qu(0),C1=qu(1),awe=qu(2),owe=qu(3),mf=qu(4),swe=qu(5),lwe=qu(6);B0.range;C1.range;awe.range;owe.range;mf.range;swe.range;lwe.range;function Hu(e){return ji(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/yA)}const F0=Hu(0),A1=Hu(1),uwe=Hu(2),cwe=Hu(3),pf=Hu(4),fwe=Hu(5),dwe=Hu(6);F0.range;A1.range;uwe.range;cwe.range;pf.range;fwe.range;dwe.range;const xA=ji(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xA.range;const SA=ji(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());SA.range;const ds=ji(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());ds.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ji(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});ds.range;const hs=ji(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());hs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ji(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});hs.range;function nV(e,n,t,i,r,a){const o=[[fu,1,Qo],[fu,5,5*Qo],[fu,15,15*Qo],[fu,30,30*Qo],[a,1,ba],[a,5,5*ba],[a,15,15*ba],[a,30,30*ba],[r,1,Jo],[r,3,3*Jo],[r,6,6*Jo],[r,12,12*Jo],[i,1,fs],[i,2,2*fs],[t,1,yA],[n,1,SP],[n,3,3*SP],[e,1,x3]];function l(f,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(T4(f/x3,h/x3,d));if(v===0)return S1.every(Math.max(T4(f,h,d),1));const[b,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(ke=C3(mh(ne.y,0,1)),je=ke.getUTCDay(),ke=je>4||je===0?A1.ceil(ke):A1(ke),ke=I0.offset(ke,(ne.V-1)*7),ne.y=ke.getUTCFullYear(),ne.m=ke.getUTCMonth(),ne.d=ke.getUTCDate()+(ne.w+6)%7):(ke=S3(mh(ne.y,0,1)),je=ke.getDay(),ke=je>4||je===0?C1.ceil(ke):C1(ke),ke=xp.offset(ke,(ne.V-1)*7),ne.y=ke.getFullYear(),ne.m=ke.getMonth(),ne.d=ke.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),je="Z"in ne?C3(mh(ne.y,0,1)).getUTCDay():S3(mh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(je+5)%7:ne.w+ne.U*7-(je+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,C3(ne)):S3(ne)}}function N(ae,ue,Se,ne){for(var Le=0,ke=ue.length,je=Se.length,Ne,ge;Le=je)return-1;if(Ne=ue.charCodeAt(Le++),Ne===37){if(Ne=ue.charAt(Le++),ge=j[Ne in CP?ue.charAt(Le++):Ne],!ge||(ne=ge(ae,Se,ne))<0)return-1}else if(Ne!=Se.charCodeAt(ne++))return-1}return ne}function q(ae,ue,Se){var ne=f.exec(ue.slice(Se));return ne?(ae.p=h.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function R(ae,ue,Se){var ne=v.exec(ue.slice(Se));return ne?(ae.w=b.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function L(ae,ue,Se){var ne=d.exec(ue.slice(Se));return ne?(ae.w=p.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function F(ae,ue,Se){var ne=_.exec(ue.slice(Se));return ne?(ae.m=C.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function Y(ae,ue,Se){var ne=w.exec(ue.slice(Se));return ne?(ae.m=k.get(ne[0].toLowerCase()),Se+ne[0].length):-1}function V(ae,ue,Se){return N(ae,n,ue,Se)}function $(ae,ue,Se){return N(ae,t,ue,Se)}function P(ae,ue,Se){return N(ae,i,ue,Se)}function I(ae){return o[ae.getDay()]}function H(ae){return a[ae.getDay()]}function U(ae){return c[ae.getMonth()]}function D(ae){return l[ae.getMonth()]}function W(ae){return r[+(ae.getHours()>=12)]}function G(ae){return 1+~~(ae.getMonth()/3)}function z(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return c[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function le(ae){return r[+(ae.getUTCHours()>=12)]}function ye(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ue=O(ae+="",x);return ue.toString=function(){return ae},ue},parse:function(ae){var ue=M(ae+="",!1);return ue.toString=function(){return ae},ue},utcFormat:function(ae){var ue=O(ae+="",E);return ue.toString=function(){return ae},ue},utcParse:function(ae){var ue=M(ae+="",!0);return ue.toString=function(){return ae},ue}}}var CP={"-":"",_:" ",0:"0"},Pi=/^\s*\d+/,ywe=/^%/,bwe=/[\\^$*+?|[\]().{}]/g;function gt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function kwe(e,n,t){var i=Pi.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function _we(e,n,t){var i=Pi.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function xwe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function Swe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function Cwe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function AP(e,n,t){var i=Pi.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function jP(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function Awe(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function jwe(e,n,t){var i=Pi.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function Owe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function OP(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function Ewe(e,n,t){var i=Pi.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function EP(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function Twe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function Mwe(e,n,t){var i=Pi.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function Dwe(e,n,t){var i=Pi.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function Rwe(e,n,t){var i=Pi.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function Pwe(e,n,t){var i=ywe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function Nwe(e,n,t){var i=Pi.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function $we(e,n,t){var i=Pi.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function TP(e,n){return gt(e.getDate(),n,2)}function zwe(e,n){return gt(e.getHours(),n,2)}function Lwe(e,n){return gt(e.getHours()%12||12,n,2)}function Iwe(e,n){return gt(1+xp.count(ds(e),e),n,3)}function tV(e,n){return gt(e.getMilliseconds(),n,3)}function Bwe(e,n){return tV(e,n)+"000"}function Fwe(e,n){return gt(e.getMonth()+1,n,2)}function qwe(e,n){return gt(e.getMinutes(),n,2)}function Hwe(e,n){return gt(e.getSeconds(),n,2)}function Uwe(e){var n=e.getDay();return n===0?7:n}function Vwe(e,n){return gt(B0.count(ds(e)-1,e),n,2)}function iV(e){var n=e.getDay();return n>=4||n===0?mf(e):mf.ceil(e)}function Wwe(e,n){return e=iV(e),gt(mf.count(ds(e),e)+(ds(e).getDay()===4),n,2)}function Gwe(e){return e.getDay()}function Ywe(e,n){return gt(C1.count(ds(e)-1,e),n,2)}function Kwe(e,n){return gt(e.getFullYear()%100,n,2)}function Xwe(e,n){return e=iV(e),gt(e.getFullYear()%100,n,2)}function Zwe(e,n){return gt(e.getFullYear()%1e4,n,4)}function Qwe(e,n){var t=e.getDay();return e=t>=4||t===0?mf(e):mf.ceil(e),gt(e.getFullYear()%1e4,n,4)}function Jwe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+gt(n/60|0,"0",2)+gt(n%60,"0",2)}function MP(e,n){return gt(e.getUTCDate(),n,2)}function eke(e,n){return gt(e.getUTCHours(),n,2)}function nke(e,n){return gt(e.getUTCHours()%12||12,n,2)}function tke(e,n){return gt(1+I0.count(hs(e),e),n,3)}function rV(e,n){return gt(e.getUTCMilliseconds(),n,3)}function ike(e,n){return rV(e,n)+"000"}function rke(e,n){return gt(e.getUTCMonth()+1,n,2)}function ake(e,n){return gt(e.getUTCMinutes(),n,2)}function oke(e,n){return gt(e.getUTCSeconds(),n,2)}function ske(e){var n=e.getUTCDay();return n===0?7:n}function lke(e,n){return gt(F0.count(hs(e)-1,e),n,2)}function aV(e){var n=e.getUTCDay();return n>=4||n===0?pf(e):pf.ceil(e)}function uke(e,n){return e=aV(e),gt(pf.count(hs(e),e)+(hs(e).getUTCDay()===4),n,2)}function cke(e){return e.getUTCDay()}function fke(e,n){return gt(A1.count(hs(e)-1,e),n,2)}function dke(e,n){return gt(e.getUTCFullYear()%100,n,2)}function hke(e,n){return e=aV(e),gt(e.getUTCFullYear()%100,n,2)}function mke(e,n){return gt(e.getUTCFullYear()%1e4,n,4)}function pke(e,n){var t=e.getUTCDay();return e=t>=4||t===0?pf(e):pf.ceil(e),gt(e.getUTCFullYear()%1e4,n,4)}function vke(){return"+0000"}function DP(){return"%"}function RP(e){return+e}function PP(e){return Math.floor(+e/1e3)}var Nc,oV,sV;gke({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function gke(e){return Nc=gwe(e),oV=Nc.format,Nc.parse,sV=Nc.utcFormat,Nc.utcParse,Nc}function yke(e){return new Date(e)}function bke(e){return e instanceof Date?+e:+new Date(+e)}function CA(e,n,t,i,r,a,o,l,c,f){var h=fA(),d=h.invert,p=h.domain,v=f(".%L"),b=f(":%S"),w=f("%I:%M"),k=f("%I %p"),_=f("%a %d"),C=f("%b %d"),x=f("%B"),E=f("%Y");function j(O){return(c(O)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>lbe(e,a/i))},t.copy=function(){return fV(n).domain(e)},Ss.apply(t,arguments)}function H0(){var e=0,n=.5,t=1,i=1,r,a,o,l,c,f=ur,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return j3=e,j3}var O3,LP;function Cke(){if(LP)return O3;LP=1;var e=pV(),n=Ske(),t=ad();function i(r){return r&&r.length?e(r,t,n):void 0}return O3=i,O3}var Ake=Cke();const ol=yt(Ake);var E3,IP;function jke(){if(IP)return E3;IP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};ln.decimalPlaces=ln.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*Ht;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};ln.dividedBy=ln.div=function(e){return ss(this,new this.constructor(e))};ln.dividedToIntegerBy=ln.idiv=function(e){var n=this,t=n.constructor;return Rt(ss(n,new t(e),0,1),t.precision)};ln.equals=ln.eq=function(e){return!this.cmp(e)};ln.exponent=function(){return bi(this)};ln.greaterThan=ln.gt=function(e){return this.cmp(e)>0};ln.greaterThanOrEqualTo=ln.gte=function(e){return this.cmp(e)>=0};ln.isInteger=ln.isint=function(){return this.e>this.d.length-2};ln.isNegative=ln.isneg=function(){return this.s<0};ln.isPositive=ln.ispos=function(){return this.s>0};ln.isZero=function(){return this.s===0};ln.lessThan=ln.lt=function(e){return this.cmp(e)<0};ln.lessThanOrEqualTo=ln.lte=function(e){return this.cmp(e)<1};ln.logarithm=ln.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Vr))throw Error(xa+"NaN");if(t.s<1)throw Error(xa+(t.s?"NaN":"-Infinity"));return t.eq(Vr)?new i(0):(Qt=!1,n=ss(xm(t,a),xm(e,a),a),Qt=!0,Rt(n,r))};ln.minus=ln.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?bV(n,e):gV(n,(e.s=-e.s,e))};ln.modulo=ln.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(xa+"NaN");return t.s?(Qt=!1,n=ss(t,e,0,1).times(e),Qt=!0,t.minus(n)):Rt(new i(t),r)};ln.naturalExponential=ln.exp=function(){return yV(this)};ln.naturalLogarithm=ln.ln=function(){return xm(this)};ln.negated=ln.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ln.plus=ln.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?gV(n,e):bV(n,(e.s=-e.s,e))};ln.precision=ln.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(vu+e);if(n=bi(r)+1,i=r.d.length-1,t=i*Ht+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};ln.squareRoot=ln.sqrt=function(){var e,n,t,i,r,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(xa+"NaN")}for(e=bi(l),Qt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=oo(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=ld((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new c(n)):i=new c(r.toString()),t=c.precision,r=o=t+3;;)if(a=i,i=a.plus(ss(l,a,o+2)).times(.5),oo(a.d).slice(0,o)===(n=oo(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Rt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Qt=!0,Rt(i,t)};ln.times=ln.mul=function(e){var n,t,i,r,a,o,l,c,f,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,c=p.length,f=v.length,c=0;){for(n=0,r=c+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%Mi|0,n=l/Mi|0;a[r]=(a[r]+n)%Mi|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Qt?Rt(e,d.precision):e};ln.toDecimalPlaces=ln.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(bo(e,0,sd),n===void 0?n=i.rounding:bo(n,0,8),Rt(t,e+bi(t)+1,n))};ln.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=ju(i,!0):(bo(e,0,sd),n===void 0?n=r.rounding:bo(n,0,8),i=Rt(new r(i),e+1,n),t=ju(i,!0,e+1)),t};ln.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?ju(r):(bo(e,0,sd),n===void 0?n=a.rounding:bo(n,0,8),i=Rt(new a(r),e+bi(r)+1,n),t=ju(i.abs(),!1,e+bi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};ln.toInteger=ln.toint=function(){var e=this,n=e.constructor;return Rt(new n(e),bi(e)+1,n.rounding)};ln.toNumber=function(){return+this};ln.toPower=ln.pow=function(e){var n,t,i,r,a,o,l=this,c=l.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(Vr);if(l=new c(l),!l.s){if(e.s<1)throw Error(xa+"Infinity");return l}if(l.eq(Vr))return l;if(i=c.precision,e.eq(Vr))return Rt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=vV){for(r=new c(Vr),n=Math.ceil(i/Ht+4),Qt=!1;t%2&&(r=r.times(l),VP(r.d,n)),t=ld(t/2),t!==0;)l=l.times(l),VP(l.d,n);return Qt=!0,e.s<0?new c(Vr).div(r):Rt(r,i)}}else if(a<0)throw Error(xa+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Qt=!1,r=e.times(xm(l,i+f)),Qt=!0,r=yV(r),r.s=a,r};ln.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=bi(r),i=ju(r,t<=a.toExpNeg||t>=a.toExpPos)):(bo(e,1,sd),n===void 0?n=a.rounding:bo(n,0,8),r=Rt(new a(r),e,n),t=bi(r),i=ju(r,e<=t||t<=a.toExpNeg,e)),i};ln.toSignificantDigits=ln.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(bo(e,1,sd),n===void 0?n=i.rounding:bo(n,0,8)),Rt(new i(t),e,n)};ln.toString=ln.valueOf=ln.val=ln.toJSON=ln[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=bi(e),t=e.constructor;return ju(e,n<=t.toExpNeg||n>=t.toExpPos)};function gV(e,n){var t,i,r,a,o,l,c,f,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Qt?Rt(n,d):n;if(c=e.d,f=n.d,o=e.e,r=n.e,c=c.slice(),a=o-r,a){for(a<0?(i=c,a=-a,l=f.length):(i=f,r=o,l=c.length),o=Math.ceil(d/Ht),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=c.length,a=f.length,l-a<0&&(a=l,i=f,f=c,c=i),t=0;a;)t=(c[--a]=c[a]+f[a]+t)/Mi|0,c[a]%=Mi;for(t&&(c.unshift(t),++r),l=c.length;c[--l]==0;)c.pop();return n.d=c,n.e=r,Qt?Rt(n,d):n}function bo(e,n,t){if(e!==~~e||et)throw Error(vu+e)}function oo(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=c=0;lr[l]?1:-1;break}return c}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,c,f,h,d,p,v,b,w,k,_,C,x,E,j,O,M,N,q=i.constructor,R=i.s==r.s?1:-1,L=i.d,F=r.d;if(!i.s)return new q(i);if(!r.s)throw Error(xa+"Division by zero");for(c=i.e-r.e,M=F.length,j=L.length,v=new q(R),b=v.d=[],f=0;F[f]==(L[f]||0);)++f;if(F[f]>(L[f]||0)&&--c,a==null?C=a=q.precision:o?C=a+(bi(i)-bi(r))+1:C=a,C<0)return new q(0);if(C=C/Ht+2|0,f=0,M==1)for(h=0,F=F[0],C++;(f1&&(F=e(F,h),L=e(L,h),M=F.length,j=L.length),E=M,w=L.slice(0,M),k=w.length;k=Mi/2&&++O;do h=0,l=n(F,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Mi+(w[1]||0)),h=_/O|0,h>1?(h>=Mi&&(h=Mi-1),d=e(F,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(OA+bi(e));if(!e.s)return new h(Vr);for(Qt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(i=Math.log(ru(2,f))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Vr),h.precision=l;;){if(r=Rt(r.times(e),l),t=t.times(++c),o=a.plus(ss(r,t,l)),oo(o.d).slice(0,l)===oo(a.d).slice(0,l)){for(;f--;)a=Rt(a.times(a),l);return h.precision=d,n==null?(Qt=!0,Rt(a,d)):a}a=o}}function bi(e){for(var n=e.e*Ht,t=e.d[0];t>=10;t/=10)n++;return n}function P3(e,n,t){if(n>e.LN10.sd())throw Qt=!0,t&&(e.precision=t),Error(xa+"LN10 precision limit exceeded");return Rt(new e(e.LN10),n)}function el(e){for(var n="";e--;)n+="0";return n}function xm(e,n){var t,i,r,a,o,l,c,f,h,d=1,p=10,v=e,b=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(xa+(v.s?"NaN":"-Infinity"));if(v.eq(Vr))return new w(0);if(n==null?(Qt=!1,f=k):f=n,v.eq(10))return n==null&&(Qt=!0),P3(w,f);if(f+=p,w.precision=f,t=oo(b),i=t.charAt(0),a=bi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=oo(v.d),i=t.charAt(0),d++;a=bi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return c=P3(w,f+2,k).times(a+""),v=xm(new w(i+"."+t.slice(1)),f-p).plus(c),w.precision=k,n==null?(Qt=!0,Rt(v,k)):v;for(l=o=v=ss(v.minus(Vr),v.plus(Vr),f),h=Rt(v.times(v),f),r=3;;){if(o=Rt(o.times(h),f),c=l.plus(ss(o,new w(r),f)),oo(c.d).slice(0,f)===oo(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(P3(w,f+2,k).times(a+""))),l=ss(l,new w(d),f),w.precision=k,n==null?(Qt=!0,Rt(l,k)):l;l=c,r+=2}}function UP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=ld(t/Ht),e.d=[],i=(t+1)%Ht,t<0&&(i+=Ht),ij1||e.e<-j1))throw Error(OA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Rt(e,n,t){var i,r,a,o,l,c,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=Ht,r=n,f=d[h=0];else{if(h=Math.ceil((i+1)/Ht),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;i%=Ht,r=i-Ht+o}if(t!==void 0&&(a=ru(10,o-r-1),l=f/a%10|0,c=n<0||d[h+1]!==void 0||f%a,c=t<4?(l||c)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||c||t==6&&(i>0?r>0?f/ru(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return c?(a=bi(e),d.length=1,n=n-a-1,d[0]=ru(10,(Ht-n%Ht)%Ht),e.e=ld(-n/Ht)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=ru(10,Ht-i),d[h]=r>0?(f/ru(10,o-r)%ru(10,r)|0)*a:0),c)for(;;)if(h==0){(d[0]+=a)==Mi&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Mi)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Qt&&(e.e>j1||e.e<-j1))throw Error(OA+bi(e));return e}function bV(e,n){var t,i,r,a,o,l,c,f,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Qt?Rt(n,v):n;if(c=e.d,d=n.d,i=n.e,f=e.e,c=c.slice(),o=f-i,o){for(h=o<0,h?(t=c,o=-o,l=d.length):(t=d,i=f,l=c.length),r=Math.max(Math.ceil(v/Ht),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=c.length,l=d.length,h=r0;--r)c[l++]=0;for(r=d.length;r>o;){if(c[--r]0?a=a.charAt(0)+"."+a.slice(1)+el(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+el(-r-1)+a,t&&(i=t-o)>0&&(a+=el(i))):r>=o?(a+=el(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+el(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=el(i))),e.s<0?"-"+a:a}function VP(e,n){if(e.length>n)return e.length=n,!0}function wV(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(vu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return UP(o,a.toString())}else if(typeof a!="string")throw Error(vu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,zke.test(a))UP(o,a);else throw Error(vu+a)}if(r.prototype=ln,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=wV,r.config=r.set=Lke,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(vu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(vu+t+": "+i);return this}var EA=wV($ke);Vr=new EA(1);const Ot=EA;function Ike(e){return Hke(e)||qke(e)||Fke(e)||Bke()}function Bke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fke(e,n){if(e){if(typeof e=="string")return N4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return N4(e,n)}}function qke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Hke(e){if(Array.isArray(e))return N4(e)}function N4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,WP(function(){for(var l=arguments.length,c=new Array(l),f=0;fe.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(c){r=!0,a=c}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function r_e(e){if(Array.isArray(e))return e}function CV(e){var n=Sm(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function AV(e,n,t){if(e.lte(0))return new Ot(0);var i=W0.getDigitCount(e.toNumber()),r=new Ot(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new Ot(Math.ceil(a.div(o).toNumber())).add(t).mul(o),c=l.mul(r);return n?c:new Ot(Math.ceil(c))}function a_e(e,n,t){var i=1,r=new Ot(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new Ot(10).pow(W0.getDigitCount(e)-1),r=new Ot(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new Ot(Math.floor(e)))}else e===0?r=new Ot(Math.floor((n-1)/2)):t||(r=new Ot(Math.floor(e)));var o=Math.floor((n-1)/2),l=Gke(Wke(function(c){return r.add(new Ot(c-o).mul(i)).toNumber()}),$4);return l(0,n)}function jV(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new Ot(0),tickMin:new Ot(0),tickMax:new Ot(0)};var a=AV(new Ot(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new Ot(0):(o=new Ot(e).add(n).div(2),o=o.sub(new Ot(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Ot(n).sub(o).div(a).toNumber()),f=l+c+1;return f>t?jV(e,n,t,i,r+1):(f0?c+(t-f):c,l=n>0?l:l+(t-f)),{step:a,tickMin:o.sub(new Ot(l).mul(a)),tickMax:o.add(new Ot(c).mul(a))})}function o_e(e){var n=Sm(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=CV([t,i]),c=Sm(l,2),f=c[0],h=c[1];if(f===-1/0||h===1/0){var d=h===1/0?[f].concat(L4($4(0,r-1).map(function(){return 1/0}))):[].concat(L4($4(0,r-1).map(function(){return-1/0})),[h]);return t>i?z4(d):d}if(f===h)return a_e(f,r,a);var p=jV(f,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=W0.rangeStep(b,w.add(new Ot(.1).mul(v)),v);return t>i?z4(k):k}function s_e(e,n){var t=Sm(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=CV([i,r]),l=Sm(o,2),c=l[0],f=l[1];if(c===-1/0||f===1/0)return[i,r];if(c===f)return[c];var h=Math.max(n,2),d=AV(new Ot(f).sub(c).div(h-1),a,0),p=[].concat(L4(W0.rangeStep(new Ot(c),new Ot(f).sub(new Ot(.99).mul(d)),d)),[f]);return i>r?z4(p):p}var l_e=xV(o_e),u_e=xV(s_e),c_e="Invariant failed";function Ou(e,n){throw new Error(c_e)}var f_e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gf(e)}function O1(){return O1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function y_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function b_e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function w_e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f0?r[f-1].coordinate:r[l-1].coordinate,d=r[f].coordinate,p=f>=l-1?r[0].coordinate:r[f+1].coordinate,v=void 0;if(qa(d-h)!==qa(p-d)){var b=[];if(qa(p-d)===qa(c[1]-c[0])){v=p;var w=d+c[1]-c[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+c[1]-c[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[f].index;break}}else{var C=Math.min(h,p),x=Math.max(h,p);if(n>(C+d)/2&&n<=(x+d)/2){o=r[f].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},TA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ti(ti({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,c;switch(r){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},z_e=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),c=0,f=l.length;c=0});if(_&&_.length){var C=_[0].type.defaultProps,x=C!==void 0?ti(ti({},C),_[0].props):_[0].props,E=x.barSize,j=x[k];o[j]||(o[j]=[]);var O=Yn(E)?t:E;o[j].push({item:_[0],stackList:_.slice(1),barSize:Yn(O)?void 0:Au(O,i,0)})}}return o},L_e=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,c=o.length;if(c<1)return null;var f=Au(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/c,b=o.reduce(function(E,j){return E+j.barSize||0},0);b+=(c-1)*f,b>=r&&(b-=(c-1)*f,f=0),b>=r&&v>0&&(p=!0,v*=.9,b=c*v);var w=(r-b)/2>>0,k={offset:w-f,size:0};h=o.reduce(function(E,j){var O={item:j.item,position:{offset:k.offset+k.size+f,size:p?v:j.barSize}},M=[].concat(KP(E),[O]);return k=M[M.length-1].position,j.stackList&&j.stackList.length&&j.stackList.forEach(function(N){M.push({item:N,position:k})}),M},d)}else{var _=Au(i,r,0,!0);r-2*_-(c-1)*f<=0&&(f=0);var C=(r-2*_-(c-1)*f)/c;C>1&&(C>>=0);var x=l===+l?Math.min(C,l):C;h=o.reduce(function(E,j,O){var M=[].concat(KP(E),[{item:j.item,position:{offset:_+(C+f)*O+(C-x)/2,size:x}}]);return j.stackList&&j.stackList.length&&j.stackList.forEach(function(N){M.push({item:N,position:M[M.length-1].position})}),M},d)}return h},I_e=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,c=o-(l.left||0)-(l.right||0),f=MV({children:a,legendWidth:c});if(f){var h=r||{},d=h.width,p=h.height,v=f.align,b=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&v!=="center"&&Ge(n[v]))return ti(ti({},n),{},Qc({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&Ge(n[b]))return ti(ti({},n),{},Qc({},b,n[b]+(p||0)))}return n},B_e=function(n,t,i){return Yn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},DV=function(n,t,i,r,a){var o=t.props.children,l=ka(o,Sp).filter(function(f){return B_e(r,a,f.props.direction)});if(l&&l.length){var c=l.map(function(f){return f.props.dataKey});return n.reduce(function(f,h){var d=dr(h,i);if(Yn(d))return f;var p=Array.isArray(d)?[U0(d),ol(d)]:[d,d],v=c.reduce(function(b,w){var k=dr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),C=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(C,b[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},F_e=function(n,t,i,r,a){var o=t.map(function(l){return DV(n,l,i,a,r)}).filter(function(l){return!Yn(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},RV=function(n,t,i,r,a){var o=t.map(function(c){var f=c.props.dataKey;return i==="number"&&f&&DV(n,c,f,r)||Uh(n,f,i,a)});if(i==="number")return o.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,f){for(var h=0,d=f.length;h=2?qa(l[0]-l[1])*2*f:f,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+f,value:d,offset:f}});return h.filter(function(d){return!id(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+f,value:d,index:p,offset:f}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+f,value:d,offset:f}}):r.domain().map(function(d,p){return{coordinate:r(d)+f,value:a?a[d]:d,index:p,offset:f}})},N3=new WeakMap,ag=function(n,t){if(typeof t!="function")return n;N3.has(n)||N3.set(n,new WeakMap);var i=N3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},q_e=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:ym(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:x1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:Hh(),realScaleType:"point"}:a==="category"?{scale:ym(),realScaleType:"band"}:{scale:x1(),realScaleType:"linear"};if(Cu(r)){var c="scale".concat(M0(r));return{scale:(NP[c]||Hh)(),realScaleType:NP[c]?c:"point"}}return qn(r)?{scale:r}:{scale:Hh(),realScaleType:"point"}},ZP=1e-4,H_e=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-ZP,o=Math.max(r[0],r[1])+ZP,l=n(t[0]),c=n(t[i-1]);(lo||co)&&n.domain([t[0],t[i-1]])}},U_e=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+c,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+c,o=n[l][i][1])}},G_e=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},Y_e={sign:W_e,expand:Mge,none:lf,silhouette:Dge,wiggle:Rge,positive:G_e},K_e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Y_e[i],o=Tge().keys(r).value(function(l,c){return+dr(l,c,0)}).order(g4).offset(a);return o(n)},X_e=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,c={},f=l.reduce(function(d,p){var v,b=(v=p.type)!==null&&v!==void 0&&v.defaultProps?ti(ti({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],C=d[_]||{hasStack:!1,stackGroups:{}};if(Si(w)){var x=C.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};x.items.push(p),C.hasStack=!0,C.stackGroups[w]=x}else C.stackGroups[rd("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ti(ti({},d),{},Qc({},_,C))},c),h={};return Object.keys(f).reduce(function(d,p){var v=f[p];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return ti(ti({},w),{},Qc({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:K_e(n,_.items,a)}))},b)}return ti(ti({},d),{},Qc({},p,v))},h)},Z_e=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,c=i||t.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=n.domain();if(!f.length)return null;var h=l_e(f,a,l);return n.domain([U0(h),ol(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=u_e(d,a,l);return{niceTicks:p}}return null};function T1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Yn(r[n.dataKey])){var l=t1(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var c=dr(r,Yn(o)?n.dataKey:o);return Yn(c)?null:n.scale(c)}var QP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var c=dr(o,t.dataKey,t.domain[l]);return Yn(c)?null:t.scale(c)-a/2+r},Q_e=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},J_e=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ti(ti({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(Si(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},e2e=function(n){return n.reduce(function(t,i){return[U0(i.concat([t[0]]).filter(Ge)),ol(i.concat([t[1]]).filter(Ge))]},[1/0,-1/0])},$V=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,c=l.reduce(function(f,h){var d=e2e(h.slice(t,i+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},JP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,eN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,q4=function(n,t,i){if(qn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ge(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(JP.test(n[0])){var a=+JP.exec(n[0])[1];r[0]=t[0]-a}else qn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ge(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(eN.test(n[1])){var o=+eN.exec(n[1])[1];r[1]=t[1]+o}else qn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},M1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=iA(t,function(d){return d.coordinate}),o=1/0,l=1,c=a.length;lo&&(f=2*Math.PI-f),{radius:l,angle:r2e(f),angleInRadian:f}},s2e=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},l2e=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},rN=function(n,t){var i=n.x,r=n.y,a=o2e({x:i,y:r},t),o=a.radius,l=a.angle,c=t.innerRadius,f=t.outerRadius;if(of)return!1;if(o===0)return!0;var h=s2e(t),d=h.startAngle,p=h.endAngle,v=l,b;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return b?iN(iN({},t),{},{radius:o,angle:l2e(v,t)}):null};function Om(e){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}var u2e=["offset"];function c2e(e){return m2e(e)||h2e(e)||d2e(e)||f2e()}function f2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d2e(e,n){if(e){if(typeof e=="string")return H4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return H4(e,n)}}function h2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m2e(e){if(Array.isArray(e))return H4(e)}function H4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function v2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function aN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function _i(e){for(var n=1;n=0?1:-1,x,E;r==="insideStart"?(x=v+C*o,E=w):r==="insideEnd"?(x=b-C*o,E=!w):r==="end"&&(x=b+C*o,E=w),E=_<=0?E:!E;var j=Ui(f,h,k,x),O=Ui(f,h,k,x+(E?1:-1)*359),M="M".concat(j.x,",").concat(j.y,` A`).concat(k,",").concat(k,",0,1,").concat(E?0:1,`, - `).concat(j.x,",").concat(j.y),N=Gn(n.id)?id("recharts-radial-line-"):n.id;return Q.createElement("text",Sm({},i,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",l)}),Q.createElement("defs",null,Q.createElement("path",{id:N,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat(N)},t))},r2e=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,c=a.innerRadius,f=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Ui(o,l,f+i,p),b=v.x,w=v.y;return{x:b,y:w,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(c+f)/2,_=Ui(o,l,k,p),C=_.x,x=_.y;return{x:C,y:x,textAnchor:"middle",verticalAnchor:"middle"}},a2e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,c=o.y,f=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",b=d>0?"start":"end",w=f>=0?1:-1,k=w*r,_=w>0?"end":"start",C=w>0?"start":"end";if(a==="top"){var x={x:l+f/2,y:c-d*r,textAnchor:"middle",verticalAnchor:v};return Si(Si({},x),i?{height:Math.max(c-i.y,0),width:f}:{})}if(a==="bottom"){var E={x:l+f/2,y:c+h+p,textAnchor:"middle",verticalAnchor:b};return Si(Si({},E),i?{height:Math.max(i.y+i.height-(c+h),0),width:f}:{})}if(a==="left"){var O={x:l-k,y:c+h/2,textAnchor:_,verticalAnchor:"middle"};return Si(Si({},O),i?{width:Math.max(O.x-i.x,0),height:h}:{})}if(a==="right"){var j={x:l+f+k,y:c+h/2,textAnchor:C,verticalAnchor:"middle"};return Si(Si({},j),i?{width:Math.max(i.x+i.width-j.x,0),height:h}:{})}var M=i?{width:f,height:h}:{};return a==="insideLeft"?Si({x:l+k,y:c+h/2,textAnchor:C,verticalAnchor:"middle"},M):a==="insideRight"?Si({x:l+f-k,y:c+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?Si({x:l+f/2,y:c+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?Si({x:l+f/2,y:c+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?Si({x:l+k,y:c+p,textAnchor:C,verticalAnchor:b},M):a==="insideTopRight"?Si({x:l+f-k,y:c+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?Si({x:l+k,y:c+h-p,textAnchor:C,verticalAnchor:v},M):a==="insideBottomRight"?Si({x:l+f-k,y:c+h-p,textAnchor:_,verticalAnchor:v},M):nd(a)&&(Ge(a.x)||lu(a.x))&&(Ge(a.y)||lu(a.y))?Si({x:l+Au(a.x,f),y:c+Au(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):Si({x:l+f/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},o2e=function(n){return"cx"in n&&Ge(n.cx)};function ti(e){var n=e.offset,t=n===void 0?5:n,i=X_e(e,U_e),r=Si({offset:t},i),a=r.viewBox,o=r.position,l=r.value,c=r.children,f=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Gn(l)&&Gn(c)&&!A.isValidElement(f)&&!Bn(f))return null;if(A.isValidElement(f))return A.cloneElement(f,r);var v;if(Bn(f)){if(v=A.createElement(f,r),A.isValidElement(v))return v}else v=n2e(r);var b=o2e(a),w=Un(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return i2e(r,v,w);var k=b?r2e(r):a2e(r);return Q.createElement(h1,Sm({className:dn("recharts-label",d)},w,k,{breakAll:p}),v)}ti.displayName="Label";var jV=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,c=n.radius,f=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,C=n.labelViewBox;if(C)return C;if(Ge(w)&&Ge(k)){if(Ge(d)&&Ge(p))return{x:d,y:p,width:w,height:k};if(Ge(v)&&Ge(b))return{x:v,y:b,width:w,height:k}}return Ge(d)&&Ge(p)?{x:d,y:p,width:0,height:0}:Ge(t)&&Ge(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:f||0,outerRadius:h||c||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},s2e=function(n,t){return n?n===!0?Q.createElement(ti,{key:"label-implicit",viewBox:t}):Oi(n)?Q.createElement(ti,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===ti?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(ti,{key:"label-implicit",content:n,viewBox:t}):Bn(n)?Q.createElement(ti,{key:"label-implicit",content:n,viewBox:t}):nd(n)?Q.createElement(ti,Sm({viewBox:t},n,{key:"label-implicit"})):null:null},l2e=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=jV(n),o=va(r,ti).map(function(c,f){return A.cloneElement(c,{viewBox:t||a,key:"label-".concat(f)})});if(!i)return o;var l=s2e(n.label,t||a);return[l].concat(V_e(o))};ti.parseViewBox=jV;ti.renderCallByParent=l2e;var P3,eN;function u2e(){if(eN)return P3;eN=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return P3=e,P3}var c2e=u2e();const f2e=pt(c2e);function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}var d2e=["valueAccessor"],h2e=["data","dataKey","clockWise","id","textBreakAll"];function m2e(e){return y2e(e)||g2e(e)||v2e(e)||p2e()}function p2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v2e(e,n){if(e){if(typeof e=="string")return H4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return H4(e,n)}}function g2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y2e(e){if(Array.isArray(e))return H4(e)}function H4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function _2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var x2e=function(n){return Array.isArray(n.value)?f2e(n.value):n.value};function so(e){var n=e.valueAccessor,t=n===void 0?x2e:n,i=iN(e,d2e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,c=i.textBreakAll,f=iN(i,h2e);return!r||!r.length?null:Q.createElement(It,{className:"recharts-label-list"},r.map(function(h,d){var p=Gn(a)?t(h,d):ur(h&&h.payload,a),v=Gn(l)?{}:{id:"".concat(l,"-").concat(d)};return Q.createElement(ti,M1({},Un(h,!0),f,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:c,viewBox:ti.parseViewBox(Gn(o)?h:tN(tN({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}so.displayName="LabelList";function S2e(e,n){return e?e===!0?Q.createElement(so,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||Bn(e)?Q.createElement(so,{key:"labelList-implicit",data:n,content:e}):nd(e)?Q.createElement(so,M1({data:n},e,{key:"labelList-implicit"})):null:null}function C2e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=va(i,so).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=S2e(e.label,n);return[a].concat(m2e(r))}so.renderCallByParent=C2e;function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Am(e)}function U4(){return U4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(c+f)/2,_=Ui(o,l,k,p),C=_.x,x=_.y;return{x:C,y:x,textAnchor:"middle",verticalAnchor:"middle"}},S2e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,c=o.y,f=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",b=d>0?"start":"end",w=f>=0?1:-1,k=w*r,_=w>0?"end":"start",C=w>0?"start":"end";if(a==="top"){var x={x:l+f/2,y:c-d*r,textAnchor:"middle",verticalAnchor:v};return _i(_i({},x),i?{height:Math.max(c-i.y,0),width:f}:{})}if(a==="bottom"){var E={x:l+f/2,y:c+h+p,textAnchor:"middle",verticalAnchor:b};return _i(_i({},E),i?{height:Math.max(i.y+i.height-(c+h),0),width:f}:{})}if(a==="left"){var j={x:l-k,y:c+h/2,textAnchor:_,verticalAnchor:"middle"};return _i(_i({},j),i?{width:Math.max(j.x-i.x,0),height:h}:{})}if(a==="right"){var O={x:l+f+k,y:c+h/2,textAnchor:C,verticalAnchor:"middle"};return _i(_i({},O),i?{width:Math.max(i.x+i.width-O.x,0),height:h}:{})}var M=i?{width:f,height:h}:{};return a==="insideLeft"?_i({x:l+k,y:c+h/2,textAnchor:C,verticalAnchor:"middle"},M):a==="insideRight"?_i({x:l+f-k,y:c+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?_i({x:l+f/2,y:c+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?_i({x:l+f/2,y:c+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?_i({x:l+k,y:c+p,textAnchor:C,verticalAnchor:b},M):a==="insideTopRight"?_i({x:l+f-k,y:c+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?_i({x:l+k,y:c+h-p,textAnchor:C,verticalAnchor:v},M):a==="insideBottomRight"?_i({x:l+f-k,y:c+h-p,textAnchor:_,verticalAnchor:v},M):td(a)&&(Ge(a.x)||uu(a.x))&&(Ge(a.y)||uu(a.y))?_i({x:l+Au(a.x,f),y:c+Au(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):_i({x:l+f/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},C2e=function(n){return"cx"in n&&Ge(n.cx)};function ii(e){var n=e.offset,t=n===void 0?5:n,i=p2e(e,u2e),r=_i({offset:t},i),a=r.viewBox,o=r.position,l=r.value,c=r.children,f=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Yn(l)&&Yn(c)&&!A.isValidElement(f)&&!qn(f))return null;if(A.isValidElement(f))return A.cloneElement(f,r);var v;if(qn(f)){if(v=A.createElement(f,r),A.isValidElement(v))return v}else v=w2e(r);var b=C2e(a),w=Wn(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return _2e(r,v,w);var k=b?x2e(r):S2e(r);return Q.createElement(p1,Em({className:pn("recharts-label",d)},w,k,{breakAll:p}),v)}ii.displayName="Label";var LV=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,c=n.radius,f=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,C=n.labelViewBox;if(C)return C;if(Ge(w)&&Ge(k)){if(Ge(d)&&Ge(p))return{x:d,y:p,width:w,height:k};if(Ge(v)&&Ge(b))return{x:v,y:b,width:w,height:k}}return Ge(d)&&Ge(p)?{x:d,y:p,width:0,height:0}:Ge(t)&&Ge(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:f||0,outerRadius:h||c||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},A2e=function(n,t){return n?n===!0?Q.createElement(ii,{key:"label-implicit",viewBox:t}):Si(n)?Q.createElement(ii,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===ii?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(ii,{key:"label-implicit",content:n,viewBox:t}):qn(n)?Q.createElement(ii,{key:"label-implicit",content:n,viewBox:t}):td(n)?Q.createElement(ii,Em({viewBox:t},n,{key:"label-implicit"})):null:null},j2e=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=LV(n),o=ka(r,ii).map(function(c,f){return A.cloneElement(c,{viewBox:t||a,key:"label-".concat(f)})});if(!i)return o;var l=A2e(n.label,t||a);return[l].concat(c2e(o))};ii.parseViewBox=LV;ii.renderCallByParent=j2e;var $3,oN;function O2e(){if(oN)return $3;oN=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return $3=e,$3}var E2e=O2e();const T2e=yt(E2e);function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}var M2e=["valueAccessor"],D2e=["data","dataKey","clockWise","id","textBreakAll"];function R2e(e){return z2e(e)||$2e(e)||N2e(e)||P2e()}function P2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N2e(e,n){if(e){if(typeof e=="string")return U4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return U4(e,n)}}function $2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function z2e(e){if(Array.isArray(e))return U4(e)}function U4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function F2e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var q2e=function(n){return Array.isArray(n.value)?T2e(n.value):n.value};function fo(e){var n=e.valueAccessor,t=n===void 0?q2e:n,i=uN(e,M2e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,c=i.textBreakAll,f=uN(i,D2e);return!r||!r.length?null:Q.createElement(Bt,{className:"recharts-label-list"},r.map(function(h,d){var p=Yn(a)?t(h,d):dr(h&&h.payload,a),v=Yn(l)?{}:{id:"".concat(l,"-").concat(d)};return Q.createElement(ii,R1({},Wn(h,!0),f,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:c,viewBox:ii.parseViewBox(Yn(o)?h:lN(lN({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}fo.displayName="LabelList";function H2e(e,n){return e?e===!0?Q.createElement(fo,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||qn(e)?Q.createElement(fo,{key:"labelList-implicit",data:n,content:e}):td(e)?Q.createElement(fo,R1({data:n},e,{key:"labelList-implicit"})):null:null}function U2e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=ka(i,fo).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=H2e(e.label,n);return[a].concat(R2e(r))}fo.renderCallByParent=U2e;function Mm(e){"@babel/helpers - typeof";return Mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>f),`, `).concat(d.x,",").concat(d.y,` `);if(r>0){var v=Ui(t,i,r,o),b=Ui(t,i,r,f);p+="L ".concat(b.x,",").concat(b.y,` A `).concat(r,",").concat(r,`,0, `).concat(+(Math.abs(c)>180),",").concat(+(o<=f),`, - `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},T2e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,d=Fa(h-f),p=ig({cx:t,cy:i,radius:a,angle:f,sign:d,cornerRadius:o,cornerIsExternal:c}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=ig({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:c}),_=k.circleTangency,C=k.lineTangency,x=k.theta,E=c?Math.abs(f-h):Math.abs(f-h)-w-x;if(E<0)return l?"M ".concat(b.x,",").concat(b.y,` + `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},K2e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,d=qa(h-f),p=og({cx:t,cy:i,radius:a,angle:f,sign:d,cornerRadius:o,cornerIsExternal:c}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=og({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:c}),_=k.circleTangency,C=k.lineTangency,x=k.theta,E=c?Math.abs(f-h):Math.abs(f-h)-w-x;if(E<0)return l?"M ".concat(b.x,",").concat(b.y,` a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):EV({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:f,endAngle:h});var O="M ".concat(b.x,",").concat(b.y,` + `):IV({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:f,endAngle:h});var j="M ".concat(b.x,",").concat(b.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` - `);if(r>0){var j=ig({cx:t,cy:i,radius:r,angle:f,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),M=j.circleTangency,N=j.lineTangency,q=j.theta,P=ig({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=P.circleTangency,H=P.lineTangency,G=P.theta,U=c?Math.abs(f-h):Math.abs(f-h)-q-G;if(U<0&&o===0)return"".concat(O,"L").concat(t,",").concat(i,"Z");O+="L".concat(H.x,",").concat(H.y,` + `);if(r>0){var O=og({cx:t,cy:i,radius:r,angle:f,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),M=O.circleTangency,N=O.lineTangency,q=O.theta,R=og({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=R.circleTangency,F=R.lineTangency,Y=R.theta,V=c?Math.abs(f-h):Math.abs(f-h)-q-Y;if(V<0&&o===0)return"".concat(j,"L").concat(t,",").concat(i,"Z");j+="L".concat(F.x,",").concat(F.y,` A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` - A`).concat(r,",").concat(r,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else O+="L".concat(t,",").concat(i,"Z");return O},M2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},TV=function(n){var t=aN(aN({},M2e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=T2e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:d}):k=EV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",U4({},Un(t,!0),{className:v,d:k,role:"img"}))};function Om(e){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function V4(){return V4=Object.assign?Object.assign.bind():function(e){for(var n=1;nI2e.call(e,n));function Hu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const q2e="__v",H2e="__o",U2e="_owner",{getOwnPropertyDescriptor:cN,keys:fN}=Object;function V2e(e,n){return e.byteLength===n.byteLength&&D1(new Uint8Array(e),new Uint8Array(n))}function W2e(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function G2e(e,n){return e.byteLength===n.byteLength&&D1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function Y2e(e,n){return Hu(e.getTime(),n.getTime())}function K2e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function X2e(e,n){return e===n}function dN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,c=0;for(;(o=a.next())&&!o.done;){const f=n.entries();let h=!1,d=0;for(;(l=f.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],c,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;c++}return!0}const Z2e=Hu;function Q2e(e,n,t){const i=fN(e);let r=i.length;if(fN(n).length!==r)return!1;for(;r-- >0;)if(!MV(e,n,t,i[r]))return!1;return!0}function vh(e,n,t){const i=uN(e);let r=i.length;if(uN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!MV(e,n,t,a)||(o=cN(e,a),l=cN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function J2e(e,n){return Hu(e.valueOf(),n.valueOf())}function exe(e,n){return e.source===n.source&&e.flags===n.flags}function hN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const c=n.values();let f=!1,h=0;for(;(l=c.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){f=r[h]=!0;break}h++}if(!f)return!1}return!0}function D1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function nxe(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function MV(e,n,t,i){return(i===U2e||i===H2e||i===q2e)&&(e.$$typeof||n.$$typeof)?!0:F2e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const txe="[object ArrayBuffer]",ixe="[object Arguments]",rxe="[object Boolean]",axe="[object DataView]",oxe="[object Date]",sxe="[object Error]",lxe="[object Map]",uxe="[object Number]",cxe="[object Object]",fxe="[object RegExp]",dxe="[object Set]",hxe="[object String]",mxe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},pxe="[object URL]",vxe=Object.prototype.toString;function gxe({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:b}){return function(k,_,C){if(k===_)return!0;if(k==null||_==null)return!1;const x=typeof k;if(x!==typeof _)return!1;if(x!=="object")return x==="number"?l(k,_,C):x==="function"?a(k,_,C):!1;const E=k.constructor;if(E!==_.constructor)return!1;if(E===Object)return c(k,_,C);if(Array.isArray(k))return n(k,_,C);if(E===Date)return i(k,_,C);if(E===RegExp)return h(k,_,C);if(E===Map)return o(k,_,C);if(E===Set)return d(k,_,C);const O=vxe.call(k);if(O===oxe)return i(k,_,C);if(O===fxe)return h(k,_,C);if(O===lxe)return o(k,_,C);if(O===dxe)return d(k,_,C);if(O===cxe)return typeof k.then!="function"&&typeof _.then!="function"&&c(k,_,C);if(O===pxe)return v(k,_,C);if(O===sxe)return r(k,_,C);if(O===ixe)return c(k,_,C);if(mxe[O])return p(k,_,C);if(O===txe)return e(k,_,C);if(O===axe)return t(k,_,C);if(O===rxe||O===uxe||O===hxe)return f(k,_,C);if(b){let j=b[O];if(!j){const M=B2e(k);M&&(j=b[M])}if(j)return j(k,_,C)}return!1}}function yxe({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:V2e,areArraysEqual:t?vh:W2e,areDataViewsEqual:G2e,areDatesEqual:Y2e,areErrorsEqual:K2e,areFunctionsEqual:X2e,areMapsEqual:t?N3(dN,vh):dN,areNumbersEqual:Z2e,areObjectsEqual:t?vh:Q2e,arePrimitiveWrappersEqual:J2e,areRegExpsEqual:exe,areSetsEqual:t?N3(hN,vh):hN,areTypedArraysEqual:t?N3(D1,vh):D1,areUrlsEqual:nxe,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=ag(i.areArraysEqual),a=ag(i.areMapsEqual),o=ag(i.areObjectsEqual),l=ag(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function bxe(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function wxe({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,c){const{cache:f=e?new WeakMap:void 0,meta:h}=t();return n(l,c,{cache:f,equals:i,meta:h,strict:r})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,c){return n(l,c,a)}}const kxe=Al();Al({strict:!0});Al({circular:!0});Al({circular:!0,strict:!0});Al({createInternalComparator:()=>Hu});Al({strict:!0,createInternalComparator:()=>Hu});Al({circular:!0,createInternalComparator:()=>Hu});Al({circular:!0,createInternalComparator:()=>Hu,strict:!0});function Al(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=yxe(e),o=gxe(a),l=t?t(o):bxe(o);return wxe({circular:n,comparator:o,createState:i,equals:l,strict:r})}function _xe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function mN(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):_xe(r)};requestAnimationFrame(i)}function W4(e){"@babel/helpers - typeof";return W4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W4(e)}function xxe(e){return Oxe(e)||Axe(e)||Cxe(e)||Sxe()}function Sxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cxe(e,n){if(e){if(typeof e=="string")return pN(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pN(e,n)}}function pN(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},w=function(_){for(var C=_>1?1:_,x=C,E=0;E<8;++E){var O=d(x)-C,j=v(x);if(Math.abs(O-C)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,c=function(h,d,p){var v=-(h-d)*i,b=p*a,w=p+(v-b)*l/1e3,k=p*l/1e3+h;return Math.abs(k-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function r3e(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function $3(e){return l3e(e)||s3e(e)||o3e(e)||a3e()}function a3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o3e(e,n){if(e){if(typeof e=="string")return Z4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Z4(e,n)}}function s3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l3e(e){if(Array.isArray(e))return Z4(e)}function Z4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function N1(e){return N1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},N1(e)}var po=(function(e){h3e(t,e);var n=m3e(t);function t(i,r){var a;u3e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,c=o.attributeName,f=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(e6(a)),a.changeStyle=a.changeStyle.bind(e6(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),J4(a);if(d&&d.length)a.state={style:d[0].style};else if(f){if(typeof p=="function")return a.state={style:f},J4(a);a.state={style:c?Eh({},c,f):f}}else a.state={style:{}};return a}return f3e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:c?Eh({},c,h):h};this.state&&p&&(c&&p[c]!==h||!c&&p!==h)&&this.setState(v);return}if(!(kxe(r.to,h)&&r.canBegin&&r.isActive)){var b=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||f?d:r.to;if(this.state&&p){var k={style:c?Eh({},c,w):w};(c&&p[c]!==w||!c&&p!==w)&&this.setState(k)}this.runAnimation(Pa(Pa({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,c=r.duration,f=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=n3e(o,l,Uxe(f),c,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([p,h,b,c,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,c=r.onAnimationStart,f=o[0],h=f.style,d=f.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var C=k.duration,x=k.easing,E=x===void 0?"ease":x,O=k.style,j=k.properties,M=k.onAnimationEnd,N=_>0?o[_-1]:k,q=j||Object.keys(O);if(typeof E=="function"||E==="spring")return[].concat($3(w),[a.runJSAnimation.bind(a,{from:N.style,to:O,duration:C,easing:E}),C]);var P=yN(q,C,E),L=Pa(Pa(Pa({},N.style),O),{},{transition:P});return[].concat($3(w),[L,C,M]).filter(Dxe)};return this.manager.start([c].concat($3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=jxe());var a=r.begin,o=r.duration,l=r.attributeName,c=r.to,f=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?Eh({},l,c):c,k=yN(Object.keys(w),o,f);b.start([h,a,Pa(Pa({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var c=i3e(r,t3e),f=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var d=function(v){var b=v.props,w=b.style,k=w===void 0?{}:w,_=b.className,C=A.cloneElement(v,Pa(Pa({},c),{},{style:Pa(Pa({},k),h),className:_}));return C};return f===1?d(A.Children.only(a)):Q.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);po.displayName="Animate";po.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};po.propTypes={from:yt.oneOfType([yt.object,yt.string]),to:yt.oneOfType([yt.object,yt.string]),attributeName:yt.string,duration:yt.number,begin:yt.number,easing:yt.oneOfType([yt.string,yt.func]),steps:yt.arrayOf(yt.shape({duration:yt.number.isRequired,style:yt.object.isRequired,easing:yt.oneOfType([yt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),yt.func]),properties:yt.arrayOf("string"),onAnimationEnd:yt.func})),children:yt.oneOfType([yt.node,yt.func]),isActive:yt.bool,canBegin:yt.bool,onAnimationEnd:yt.func,shouldReAnimate:yt.bool,onAnimationStart:yt.func,onAnimationReStart:yt.func};function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}function $1(){return $1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,c=i>=0?1:-1,f=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(f,",").concat(n+c*d[0],",").concat(t)),h+="L ".concat(n+i-c*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`, + A`).concat(r,",").concat(r,",0,").concat(+(V>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else j+="L".concat(t,",").concat(i,"Z");return j},X2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},BV=function(n){var t=fN(fN({},X2e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=K2e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:d}):k=IV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",V4({},Wn(t,!0),{className:v,d:k,role:"img"}))};function Dm(e){"@babel/helpers - typeof";return Dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function W4(){return W4=Object.assign?Object.assign.bind():function(e){for(var n=1;nrxe.call(e,n));function Uu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const sxe="__v",lxe="__o",uxe="_owner",{getOwnPropertyDescriptor:vN,keys:gN}=Object;function cxe(e,n){return e.byteLength===n.byteLength&&P1(new Uint8Array(e),new Uint8Array(n))}function fxe(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function dxe(e,n){return e.byteLength===n.byteLength&&P1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function hxe(e,n){return Uu(e.getTime(),n.getTime())}function mxe(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function pxe(e,n){return e===n}function yN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,c=0;for(;(o=a.next())&&!o.done;){const f=n.entries();let h=!1,d=0;for(;(l=f.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],c,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;c++}return!0}const vxe=Uu;function gxe(e,n,t){const i=gN(e);let r=i.length;if(gN(n).length!==r)return!1;for(;r-- >0;)if(!FV(e,n,t,i[r]))return!1;return!0}function bh(e,n,t){const i=pN(e);let r=i.length;if(pN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!FV(e,n,t,a)||(o=vN(e,a),l=vN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function yxe(e,n){return Uu(e.valueOf(),n.valueOf())}function bxe(e,n){return e.source===n.source&&e.flags===n.flags}function bN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const c=n.values();let f=!1,h=0;for(;(l=c.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){f=r[h]=!0;break}h++}if(!f)return!1}return!0}function P1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function wxe(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function FV(e,n,t,i){return(i===uxe||i===lxe||i===sxe)&&(e.$$typeof||n.$$typeof)?!0:oxe(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const kxe="[object ArrayBuffer]",_xe="[object Arguments]",xxe="[object Boolean]",Sxe="[object DataView]",Cxe="[object Date]",Axe="[object Error]",jxe="[object Map]",Oxe="[object Number]",Exe="[object Object]",Txe="[object RegExp]",Mxe="[object Set]",Dxe="[object String]",Rxe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Pxe="[object URL]",Nxe=Object.prototype.toString;function $xe({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:b}){return function(k,_,C){if(k===_)return!0;if(k==null||_==null)return!1;const x=typeof k;if(x!==typeof _)return!1;if(x!=="object")return x==="number"?l(k,_,C):x==="function"?a(k,_,C):!1;const E=k.constructor;if(E!==_.constructor)return!1;if(E===Object)return c(k,_,C);if(Array.isArray(k))return n(k,_,C);if(E===Date)return i(k,_,C);if(E===RegExp)return h(k,_,C);if(E===Map)return o(k,_,C);if(E===Set)return d(k,_,C);const j=Nxe.call(k);if(j===Cxe)return i(k,_,C);if(j===Txe)return h(k,_,C);if(j===jxe)return o(k,_,C);if(j===Mxe)return d(k,_,C);if(j===Exe)return typeof k.then!="function"&&typeof _.then!="function"&&c(k,_,C);if(j===Pxe)return v(k,_,C);if(j===Axe)return r(k,_,C);if(j===_xe)return c(k,_,C);if(Rxe[j])return p(k,_,C);if(j===kxe)return e(k,_,C);if(j===Sxe)return t(k,_,C);if(j===xxe||j===Oxe||j===Dxe)return f(k,_,C);if(b){let O=b[j];if(!O){const M=axe(k);M&&(O=b[M])}if(O)return O(k,_,C)}return!1}}function zxe({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:cxe,areArraysEqual:t?bh:fxe,areDataViewsEqual:dxe,areDatesEqual:hxe,areErrorsEqual:mxe,areFunctionsEqual:pxe,areMapsEqual:t?z3(yN,bh):yN,areNumbersEqual:vxe,areObjectsEqual:t?bh:gxe,arePrimitiveWrappersEqual:yxe,areRegExpsEqual:bxe,areSetsEqual:t?z3(bN,bh):bN,areTypedArraysEqual:t?z3(P1,bh):P1,areUrlsEqual:wxe,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=lg(i.areArraysEqual),a=lg(i.areMapsEqual),o=lg(i.areObjectsEqual),l=lg(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function Lxe(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function Ixe({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,c){const{cache:f=e?new WeakMap:void 0,meta:h}=t();return n(l,c,{cache:f,equals:i,meta:h,strict:r})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,c){return n(l,c,a)}}const Bxe=Ml();Ml({strict:!0});Ml({circular:!0});Ml({circular:!0,strict:!0});Ml({createInternalComparator:()=>Uu});Ml({strict:!0,createInternalComparator:()=>Uu});Ml({circular:!0,createInternalComparator:()=>Uu});Ml({circular:!0,createInternalComparator:()=>Uu,strict:!0});function Ml(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=zxe(e),o=$xe(a),l=t?t(o):Lxe(o);return Ixe({circular:n,comparator:o,createState:i,equals:l,strict:r})}function Fxe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function wN(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):Fxe(r)};requestAnimationFrame(i)}function G4(e){"@babel/helpers - typeof";return G4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},G4(e)}function qxe(e){return Wxe(e)||Vxe(e)||Uxe(e)||Hxe()}function Hxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uxe(e,n){if(e){if(typeof e=="string")return kN(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return kN(e,n)}}function kN(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},w=function(_){for(var C=_>1?1:_,x=C,E=0;E<8;++E){var j=d(x)-C,O=v(x);if(Math.abs(j-C)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,c=function(h,d,p){var v=-(h-d)*i,b=p*a,w=p+(v-b)*l/1e3,k=p*l/1e3+h;return Math.abs(k-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function x3e(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function L3(e){return j3e(e)||A3e(e)||C3e(e)||S3e()}function S3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C3e(e,n){if(e){if(typeof e=="string")return Q4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Q4(e,n)}}function A3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j3e(e){if(Array.isArray(e))return Q4(e)}function Q4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z1(e){return z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z1(e)}var wo=(function(e){D3e(t,e);var n=R3e(t);function t(i,r){var a;O3e(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,c=o.attributeName,f=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(n6(a)),a.changeStyle=a.changeStyle.bind(n6(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),e6(a);if(d&&d.length)a.state={style:d[0].style};else if(f){if(typeof p=="function")return a.state={style:f},e6(a);a.state={style:c?Dh({},c,f):f}}else a.state={style:{}};return a}return T3e(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:c?Dh({},c,h):h};this.state&&p&&(c&&p[c]!==h||!c&&p!==h)&&this.setState(v);return}if(!(Bxe(r.to,h)&&r.canBegin&&r.isActive)){var b=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||f?d:r.to;if(this.state&&p){var k={style:c?Dh({},c,w):w};(c&&p[c]!==w||!c&&p!==w)&&this.setState(k)}this.runAnimation(Na(Na({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,c=r.duration,f=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=w3e(o,l,u3e(f),c,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([p,h,b,c,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,c=r.onAnimationStart,f=o[0],h=f.style,d=f.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var C=k.duration,x=k.easing,E=x===void 0?"ease":x,j=k.style,O=k.properties,M=k.onAnimationEnd,N=_>0?o[_-1]:k,q=O||Object.keys(j);if(typeof E=="function"||E==="spring")return[].concat(L3(w),[a.runJSAnimation.bind(a,{from:N.style,to:j,duration:C,easing:E}),C]);var R=SN(q,C,E),L=Na(Na(Na({},N.style),j),{},{transition:R});return[].concat(L3(w),[L,C,M]).filter(Zxe)};return this.manager.start([c].concat(L3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=Gxe());var a=r.begin,o=r.duration,l=r.attributeName,c=r.to,f=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?Dh({},l,c):c,k=SN(Object.keys(w),o,f);b.start([h,a,Na(Na({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var c=_3e(r,k3e),f=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||f===0||o<=0)return a;var d=function(v){var b=v.props,w=b.style,k=w===void 0?{}:w,_=b.className,C=A.cloneElement(v,Na(Na({},c),{},{style:Na(Na({},k),h),className:_}));return C};return f===1?d(A.Children.only(a)):Q.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);wo.displayName="Animate";wo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};wo.propTypes={from:wt.oneOfType([wt.object,wt.string]),to:wt.oneOfType([wt.object,wt.string]),attributeName:wt.string,duration:wt.number,begin:wt.number,easing:wt.oneOfType([wt.string,wt.func]),steps:wt.arrayOf(wt.shape({duration:wt.number.isRequired,style:wt.object.isRequired,easing:wt.oneOfType([wt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),wt.func]),properties:wt.arrayOf("string"),onAnimationEnd:wt.func})),children:wt.oneOfType([wt.node,wt.func]),isActive:wt.bool,canBegin:wt.bool,onAnimationEnd:wt.func,shouldReAnimate:wt.bool,onAnimationStart:wt.func,onAnimationReStart:wt.func};function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,c=i>=0?1:-1,f=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(f,",").concat(n+c*d[0],",").concat(t)),h+="L ".concat(n+i-c*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`, `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(f,`, `).concat(n+i-c*d[2],",").concat(t+r)),h+="L ".concat(n+c*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(f,`, `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);h="M ".concat(n,",").concat(t+l*b,` @@ -492,19 +507,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(n+i,",").concat(t+r-l*b,` A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(n+i-c*b,",").concat(t+r,` L `).concat(n+c*b,",").concat(t+r,` - A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(n,",").concat(t+r-l*b," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},S3e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,c=t.height;if(Math.abs(l)>0&&Math.abs(c)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+c),p=Math.max(o,o+c);return i>=f&&i<=h&&r>=d&&r<=p}return!1},C3e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Mm=function(n){var t=AN(AN({},C3e),n),i=A.useRef(),r=A.useState(-1),a=v3e(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var c=t.x,f=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,C=t.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||d!==+d||h===0||d===0)return null;var x=dn("recharts-rectangle",v);return C?Q.createElement(po,{canBegin:o>0,from:{width:h,height:d,x:c,y:f},to:{width:h,height:d,x:c,y:f},duration:w,animationEasing:b,isActive:C},function(E){var O=E.width,j=E.height,M=E.x,N=E.y;return Q.createElement(po,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:b},Q.createElement("path",$1({},Un(t,!0),{className:x,d:ON(M,N,O,j,p),ref:i})))}):Q.createElement("path",$1({},Un(t,!0),{className:x,d:ON(c,f,h,d,p)}))};function n6(){return n6=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function D3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var R3e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},P3e=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,c=n.left,f=c===void 0?0:c,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,b=n.className,w=M3e(n,A3e),k=O3e({x:i,y:a,top:l,left:f,width:d,height:v},w);return!Ge(i)||!Ge(a)||!Ge(d)||!Ge(v)||!Ge(l)||!Ge(f)?null:Q.createElement("path",t6({},Un(k,!0),{className:dn("recharts-cross",b),d:R3e(i,a,d,v,l,f)}))},z3,EN;function N3e(){if(EN)return z3;EN=1;var e=rU(),n=e(Object.getPrototypeOf,Object);return z3=n,z3}var L3,TN;function $3e(){if(TN)return L3;TN=1;var e=vs(),n=N3e(),t=gs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,c=o.call(Object);function f(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==c}return L3=f,L3}var z3e=$3e();const L3e=pt(z3e);var I3,MN;function I3e(){if(MN)return I3;MN=1;var e=vs(),n=gs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return I3=i,I3}var B3e=I3e();const F3e=pt(B3e);function Rm(e){"@babel/helpers - typeof";return Rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:f},to:{upperWidth:h,lowerWidth:d,height:p,x:c,y:f},duration:w,animationEasing:b,isActive:_},function(x){var E=x.upperWidth,O=x.lowerWidth,j=x.height,M=x.x,N=x.y;return Q.createElement(po,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},Q.createElement("path",z1({},Un(t,!0),{className:C,d:NN(M,N,E,O,j),ref:i})))}):Q.createElement("g",null,Q.createElement("path",z1({},Un(t,!0),{className:C,d:NN(c,f,h,d,p)})))},Q3e=["option","shapeType","propTransformer","activeClassName","isActive"];function Pm(e){"@babel/helpers - typeof";return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function J3e(e,n){if(e==null)return{};var t=eSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function eSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function $N(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function L1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Ir(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Ir(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Ir(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Ir(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Ir(i,"handleSlideDragStart",function(r){var a=WN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return jSe(n,e),SSe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,c=l.gap,f=l.data,h=f.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:v-v%c,endIndex:b===h?h:b-b%c}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,c=ur(a[i],l,i);return Bn(o)?o(c,i):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,c=this.props,f=c.x,h=c.width,d=c.travellerWidth,p=c.startIndex,v=c.endIndex,b=c.onChange,w=i.pageX-a;w>0?w=Math.min(w,f+h-d-l,f+h-d-o):w<0&&(w=Math.max(w,f-o,f-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=WN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,c=r.startX,f=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},C=i.pageX-a;C>0?C=Math.min(C,d+p-v-f):C<0&&(C=Math.max(C,d-f)),_[o]=f+C;var x=this.getIndex(_),E=x.startIndex,O=x.endIndex,j=function(){var N=k.length-1;return o==="startX"&&(l>c?E%w===0:O%w===0)||lc?O%w===0:E%w===0)||l>c&&O===N};this.setState(Ir(Ir({},o,f+C),"brushMoveStartX",i.pageX),function(){b&&j()&&b(x)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,c=o.startX,f=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=f||r==="endX"&&v<=c||this.setState(Ir({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,c=i.fill,f=i.stroke;return Q.createElement("rect",{stroke:f,fill:c,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,c=i.data,f=i.children,h=i.padding,d=A.Children.only(f);return d?Q.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,c=this.props,f=c.y,h=c.travellerWidth,d=c.height,p=c.traveller,v=c.ariaLabel,b=c.data,w=c.startIndex,k=c.endIndex,_=Math.max(i,this.props.x),C=U3(U3({},Un(this.props,!1)),{},{x:_,y:f,width:h,height:d}),x=v||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[k])===null||o===void 0?void 0:o.name);return Q.createElement(It,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),l.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,C))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,c=a.stroke,f=a.travellerWidth,h=Math.min(i,r)+f,d=Math.max(Math.abs(r-i)-f,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,c=i.travellerWidth,f=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,b={pointerEvents:"none",fill:f};return Q.createElement(It,{className:"recharts-brush-texts"},Q.createElement(h1,B1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(h1,B1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+c+v,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,c=i.y,f=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,C=p.isTravellerFocused;if(!r||!r.length||!Ge(l)||!Ge(c)||!Ge(f)||!Ge(h)||f<=0||h<=0)return null;var x=dn("recharts-brush",a),E=Q.Children.count(o)===1,O=_Se("userSelect","none");return Q.createElement(It,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,c=i.stroke,f=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:r,y:a,width:o,height:l,fill:c,stroke:"none"}),Q.createElement("line",{x1:r+1,y1:f,x2:r+o-1,y2:f,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:r+1,y1:f+2,x2:r+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Q.isValidElement(i)?a=Q.cloneElement(i,r):Bn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,c=i.travellerWidth,f=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||f!==r.prevUpdateId)return U3({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?TSe({data:a,width:o,x:l,travellerWidth:c,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||c!==r.prevTravellerWidth)){r.scale.range([l,l+o-c]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);i[c]>r?l=c:o=c}return r>=i[l]?l:o}}])})(A.PureComponent);Ir(yf,"displayName","Brush");Ir(yf,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var V3,GN;function MSe(){if(GN)return V3;GN=1;var e=eA();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return V3=n,V3}var W3,YN;function DSe(){if(YN)return W3;YN=1;var e=ZH(),n=xl(),t=MSe(),i=Sr(),r=N0();function a(o,l,c){var f=i(o)?e:t;return c&&r(o,l,c)&&(l=void 0),f(o,n(l,3))}return W3=a,W3}var RSe=DSe();const PSe=pt(RSe);var lo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},G3,KN;function NSe(){if(KN)return G3;KN=1;var e=pU();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return G3=n,G3}var Y3,XN;function $Se(){if(XN)return Y3;XN=1;var e=NSe(),n=hU(),t=xl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,c,f){e(o,c,a(l,c,f))}),o}return Y3=i,Y3}var zSe=$Se();const LSe=pt(zSe);var K3,ZN;function ISe(){if(ZN)return K3;ZN=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function YSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function KSe(e,n){var t=e.x,i=e.y,r=GSe(e,HSe),a="".concat(t),o=parseInt(a,10),l="".concat(i),c=parseInt(l,10),f="".concat(n.height||r.height),h=parseInt(f,10),d="".concat(n.width||r.width),p=parseInt(d,10);return gh(gh(gh(gh(gh({},n),r),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function n$(e){return Q.createElement(sSe,r6({shapeType:"rectangle",propTransformer:KSe,activeClassName:"recharts-active-bar"},e))}var XSe=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Ge(i)||sve(i);return a?n(i,r):(a||ju(),t)}},ZSe=["value","background"],HV;function bf(e){"@babel/helpers - typeof";return bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bf(e)}function QSe(e,n){if(e==null)return{};var t=JSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function JSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function q1(){return q1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(z)0&&Math.abs(U)0&&(G=Math.min((X||0)-(U[ee-1]||0),G))}),Number.isFinite(G)){var z=G/H,D=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=z*D/2),w.padding==="no-gap"){var $=Au(n.barCategoryGap,z*D),B=z*D/2;M=B-$-(B-$)/D*$}}}r==="xAxis"?N=[i.left+(x.left||0)+(M||0),i.left+i.width-(x.right||0)-(M||0)]:r==="yAxis"?N=c==="horizontal"?[i.top+i.height-(x.bottom||0),i.top+(x.top||0)]:[i.top+(x.top||0)+(M||0),i.top+i.height-(x.bottom||0)-(M||0)]:N=w.range,O&&(N=[N[1],N[0]]);var Y=x_e(w,a,p),R=Y.scale,W=Y.realScaleType;R.domain(_).range(N),S_e(R);var V=D_e(R,Na(Na({},w),{},{realScaleType:W}));r==="xAxis"?(L=k==="top"&&!E||k==="bottom"&&E,q=i.left,P=d[j]-L*w.height):r==="yAxis"&&(L=k==="left"&&!E||k==="right"&&E,q=d[j]-L*w.width,P=i.top);var I=Na(Na(Na({},w),V),{},{realScaleType:W,x:q,y:P,scale:R,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return I.bandSize=E1(I,V),!w.hide&&r==="xAxis"?d[j]+=(L?-1:1)*I.height:w.hide||(d[j]+=(L?-1:1)*I.width),Na(Na({},v),{},Y0({},b,I))},{})},GV=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},c4e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return GV({x:t,y:i},{x:r,y:a})},YV=(function(){function e(n){s4e(this,e),this.scale=n}return l4e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+c}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();Y0(YV,"EPS",1e-4);var TA=function(n){var t=Object.keys(n).reduce(function(i,r){return Na(Na({},i),{},Y0({},r,YV.create(n[r])))},{});return Na(Na({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return LSe(r,function(c,f){return t[f].apply(c,{bandAware:o,position:l})})},isInRange:function(r){return qV(r,function(a,o){return t[o].isInRange(a)})}})};function f4e(e){return(e%180+180)%180}var d4e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=f4e(r),o=a*Math.PI/180,l=Math.atan(i/t),c=o>l&&o-1?c[f?a[h]:h]:void 0}}return Q3=i,Q3}var J3,s$;function m4e(){if(s$)return J3;s$=1;var e=LV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return J3=n,J3}var eS,l$;function p4e(){if(l$)return eS;l$=1;var e=lU(),n=xl(),t=m4e(),i=Math.max;function r(a,o,l){var c=a==null?0:a.length;if(!c)return-1;var f=l==null?0:t(l);return f<0&&(f=i(c+f,0)),e(a,n(o,3),f)}return eS=r,eS}var nS,u$;function v4e(){if(u$)return nS;u$=1;var e=h4e(),n=p4e(),t=e(n);return nS=t,nS}var g4e=v4e();const y4e=pt(g4e);var b4e=xH();const w4e=pt(b4e);var k4e=w4e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),MA=A.createContext(void 0),DA=A.createContext(void 0),KV=A.createContext(void 0),XV=A.createContext({}),ZV=A.createContext(void 0),QV=A.createContext(0),JV=A.createContext(0),c$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,c=n.width,f=n.height,h=k4e(a);return Q.createElement(MA.Provider,{value:i},Q.createElement(DA.Provider,{value:r},Q.createElement(XV.Provider,{value:a},Q.createElement(KV.Provider,{value:h},Q.createElement(ZV.Provider,{value:o},Q.createElement(QV.Provider,{value:f},Q.createElement(JV.Provider,{value:c},l)))))))},_4e=function(){return A.useContext(ZV)},eW=function(n){var t=A.useContext(MA);t==null&&ju();var i=t[n];return i==null&&ju(),i},x4e=function(){var n=A.useContext(MA);return Zs(n)},S4e=function(){var n=A.useContext(DA),t=y4e(n,function(i){return qV(i.domain,Number.isFinite)});return t||Zs(n)},nW=function(n){var t=A.useContext(DA);t==null&&ju();var i=t[n];return i==null&&ju(),i},C4e=function(){var n=A.useContext(KV);return n},A4e=function(){return A.useContext(XV)},RA=function(){return A.useContext(JV)},PA=function(){return A.useContext(QV)};function wf(e){"@babel/helpers - typeof";return wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wf(e)}function O4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function j4e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function u6e(e,n){return lW(e,n+1)}function c6e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,c=0,f=1,h=o,d=function(){var b=i==null?void 0:i[c];if(b===void 0)return{v:lW(i,f)};var w=c,k,_=function(){return k===void 0&&(k=t(b,w)),k},C=b.coordinate,x=c===0||G1(e,C,_,h,l);x||(c=0,h=o,f+=1),x&&(h=C+e*(_()/2+r),c+=f)},p;f<=a.length;)if(p=d(),p)return p.v;return[]}function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function y$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Zi(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Zi(Zi({},v),{},{tickCoord:v.coordinate});var _=G1(e,v.tickCoord,w,l,c);_&&(c=v.tickCoord-e*(w()/2+r),a[p]=Zi(Zi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function p6e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,c=n.start,f=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-f);o[l-1]=h=Zi(Zi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=G1(e,h.tickCoord,function(){return d},c,f);v&&(f=h.tickCoord-e*(d/2+r),o[l-1]=Zi(Zi({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(C){var x=o[C],E,O=function(){return E===void 0&&(E=t(x,C)),E};if(C===0){var j=e*(x.coordinate-e*O()/2-c);o[C]=x=Zi(Zi({},x),{},{tickCoord:j<0?x.coordinate-j*e:x.coordinate})}else o[C]=x=Zi(Zi({},x),{},{tickCoord:x.coordinate});var M=G1(e,x.tickCoord,O,c,f);M&&(c=x.tickCoord+e*(O()/2+r),o[C]=Zi(Zi({},x),{},{isShow:!0}))},k=0;k=2?Fa(r[1].coordinate-r[0].coordinate):1,_=l6e(a,k,v);return c==="equidistantPreserveStart"?c6e(k,_,w,r,o):(c==="preserveStart"||c==="preserveStartEnd"?p=p6e(k,_,w,r,o,c==="preserveStartEnd"):p=m6e(k,_,w,r,o),p.filter(function(C){return C.isShow}))}var v6e=["viewBox"],g6e=["viewBox"],y6e=["ticks"];function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xf(e)}function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function b6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function w6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function w$(e,n){for(var t=0;t0?c(this.props):c(v)),o<=0||l<=0||!b||!b.length?null:Q.createElement(It,{className:dn("recharts-cartesian-axis",f),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ti.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=dn(r.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(i)?o=Q.cloneElement(i,xi(xi({},r),{},{className:l})):Bn(i)?o=i(xi(xi({},r),{},{className:l})):o=Q.createElement(h1,qc({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);zA(ld,"displayName","CartesianAxis");zA(ld,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var O6e=["x1","y1","x2","y2","key"],j6e=["offset"];function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eu(e)}function k$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ji(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function D6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var R6e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,c=n.ry;return Q.createElement("rect",{x:r,y:a,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function fW(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(Bn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,c=_$(n,O6e),f=Un(c,!1);f.offset;var h=_$(f,j6e);t=Q.createElement("line",fu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function P6e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,c){var f=Ji(Ji({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(c),index:c});return fW(r,f)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function N6e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,c){var f=Ji(Ji({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(c),index:c});return fW(r,f)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function $6e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,f=c===void 0?!0:c;if(!f||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Q.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function z6e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,f=e.verticalPoints;if(!t||!i||!i.length)return null;var h=f.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Q.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:c,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var L6e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return CV($A(Ji(Ji(Ji({},ld.defaultProps),i),{},{ticks:Yo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},I6e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return CV($A(Ji(Ji(Ji({},ld.defaultProps),i),{},{ticks:Yo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Pc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function J0(e){var n,t,i,r,a,o,l=RA(),c=PA(),f=A4e(),h=Ji(Ji({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Pc.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Pc.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Pc.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Pc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Pc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Pc.verticalFill,x:Ge(e.x)?e.x:f.left,y:Ge(e.y)?e.y:f.top,width:Ge(e.width)?e.width:f.width,height:Ge(e.height)?e.height:f.height}),d=h.x,p=h.y,v=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,C=x4e(),x=S4e();if(!Ge(v)||v<=0||!Ge(b)||b<=0||!Ge(d)||d!==+d||!Ge(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||L6e,O=h.horizontalCoordinatesGenerator||I6e,j=h.horizontalPoints,M=h.verticalPoints;if((!j||!j.length)&&Bn(O)){var N=k&&k.length,q=O({yAxis:x?Ji(Ji({},x),{},{ticks:N?k:x.ticks}):void 0,width:l,height:c,offset:f},N?!0:w);Jo(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(q),"]")),Array.isArray(q)&&(j=q)}if((!M||!M.length)&&Bn(E)){var P=_&&_.length,L=E({xAxis:C?Ji(Ji({},C),{},{ticks:P?_:C.ticks}):void 0,width:l,height:c,offset:f},P?!0:w);Jo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(L),"]")),Array.isArray(L)&&(M=L)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(R6e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(P6e,fu({},h,{offset:f,horizontalPoints:j,xAxis:C,yAxis:x})),Q.createElement(N6e,fu({},h,{offset:f,verticalPoints:M,xAxis:C,yAxis:x})),Q.createElement($6e,fu({},h,{horizontalPoints:j})),Q.createElement(z6e,fu({},h,{verticalPoints:M})))}J0.displayName="CartesianGrid";var B6e=["type","layout","connectNulls","ref"],F6e=["key"];function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sf(e)}function x$(e,n){if(e==null)return{};var t=q6e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function q6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(Nc(c.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(Nc(n.repeat(c,h)),Nc(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),$a(t,"id",id("recharts-line-")),$a(t,"pathRef",function(o){t.mainCurve=o}),$a(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),$a(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return Q6e(n,e),Y6e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,c=a.yAxis,f=a.layout,h=a.children,d=va(h,bp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:ur(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Q.createElement(It,v,d.map(function(b){return Q.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:c,layout:f,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,f=l.points,h=l.dataKey,d=Un(this.props,!1),p=Un(c,!0),v=f.map(function(w,k){var _=Lr(Lr(Lr({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:f});return n.renderDotItem(c,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Q.createElement(It,Hh({className:"recharts-line-dots",key:"dots"},b),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,c=l.type,f=l.layout,h=l.connectNulls;l.ref;var d=x$(l,B6e),p=Lr(Lr(Lr({},Un(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:c,layout:f,connectNulls:h});return Q.createElement(Zc,Hh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,c=o.strokeDasharray,f=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,C=_.prevPoints,x=_.totalLength;return Q.createElement(po,{begin:h,duration:d,isActive:f,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var O=E.t;if(C){var j=C.length/l.length,M=l.map(function(H,G){var U=Math.floor(G*j);if(C[U]){var z=C[U],D=Hi(z.x,H.x),$=Hi(z.y,H.y);return Lr(Lr({},H),{},{x:D(O),y:$(O)})}if(b){var B=Hi(w*2,H.x),Y=Hi(k/2,H.y);return Lr(Lr({},H),{},{x:B(O),y:Y(O)})}return Lr(Lr({},H),{},{x:H.x,y:H.y})});return a.renderCurveStatically(M,i,r)}var N=Hi(0,x),q=N(O),P;if(c){var L="".concat(c).split(/[,\s]+/gim).map(function(H){return parseFloat(H)});P=a.getStrokeDasharray(q,x,L)}else P=a.generateSimpleStrokeDasharray(x,q);return a.renderCurveStatically(l,i,r,{strokeDasharray:P})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,c=this.state,f=c.prevPoints,h=c.totalLength;return l&&o&&o.length&&(!f&&h>0||!mf(f,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,c=r.className,f=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=dn("recharts-line",c),E=f&&f.allowDataOverflow,O=h&&h.allowDataOverflow,j=E||O,M=Gn(k)?this.id:k,N=(i=Un(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,P=q===void 0?3:q,L=N.strokeWidth,H=L===void 0?2:L,G=jH(o)?o:{},U=G.clipDot,z=U===void 0?!0:U,D=P*2+H;return Q.createElement(It,{className:x},E||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?p:p-v/2,y:O?d:d-b/2,width:E?v:v*2,height:O?b:b*2})),!z&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-D/2,y:d-D/2,width:v+D,height:b+D}))):null,!C&&this.renderCurve(j,M),this.renderErrorBar(j,M),(C||o)&&this.renderDots(j,z,M),(!w||_)&&so.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(Nc(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function tCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function du(){return du=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!mf(h,o)||!mf(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,c=r.className,f=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=dn("recharts-area",c),E=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,j=E||O,M=Gn(k)?this.id:k,N=(i=Un(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,P=q===void 0?3:q,L=N.strokeWidth,H=L===void 0?2:L,G=jH(o)?o:{},U=G.clipDot,z=U===void 0?!0:U,D=P*2+H;return Q.createElement(It,{className:x},E||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?h:h-v/2,y:O?f:f-b/2,width:E?v:v*2,height:O?b:b*2})),!z&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-D/2,y:f-D/2,width:v+D,height:b+D}))):null,C?null:this.renderArea(j,M),(o||C)&&this.renderDots(j,z,M),(!w||_)&&so.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);mW=ls;io(ls,"displayName","Area");io(ls,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Bu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});io(ls,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ge(l)&&typeof l=="number")return l;var c=r==="horizontal"?i:t,f=c.scale.domain();if(c.type==="number"){var h=Math.max(f[0],f[1]),d=Math.min(f[0],f[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});io(ls,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,b=f&&f.length,w=mW.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,C=d.map(function(E,O){var j;b?j=f[h+O]:(j=ur(E,c),Array.isArray(j)?_=!0:j=[w,j]);var M=j[1]==null||b&&ur(E,c)==null;return k?{x:j1({axis:i,ticks:a,bandSize:l,entry:E,index:O}),y:M?null:r.scale(j[1]),value:j,payload:E}:{x:M?null:i.scale(j[1]),y:j1({axis:r,ticks:o,bandSize:l,entry:E,index:O}),value:j,payload:E}}),x;return b||_?x=C.map(function(E){var O=Array.isArray(E.value)?E.value[0]:null;return k?{x:E.x,y:O!=null&&E.y!=null?r.scale(O):null}:{x:O!=null?i.scale(O):null,y:E.y}}):x=k?r.scale(w):i.scale(w),Vs({points:C,baseLine:x,layout:v,isRange:_},p)});io(ls,"renderDotItem",function(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(Bn(e))t=e(n);else{var i=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=pW(n,nCe);t=Q.createElement(V0,du({},a,{key:r,className:i}))}return t});function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Af(e)}function cCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function fCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function QCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function JCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function e9e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ge(r)&&Ge(a)?n.slice(r,a+1):[]};function TW(e){return e==="number"?[0,"auto"]:void 0}var S6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=eb(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(c,f){var h,d=(h=f.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=e1(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(Ef(c),[OV(f,p)]):c},[])},P$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=d9e(a,i),l=n.orderedTooltipTicks,c=n.tooltipAxis,f=n.tooltipTicks,h=g_e(o,l,f,c);if(h>=0&&f){var d=f[h]&&f[h].value,p=S6(n,t,h,d),v=h9e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},m9e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=SV(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,C=_.type,x=_.dataKey,E=_.allowDataOverflow,O=_.allowDuplicatedCategory,j=_.scale,M=_.ticks,N=_.includeHidden,q=_[o];if(b[q])return b;var P=eb(n.data,{graphicalItems:r.filter(function(V){var I,X=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o];return X===q}),dataStartIndex:c,dataEndIndex:f}),L=P.length,H,G,U;BCe(_.domain,E,C)&&(H=F4(_.domain,null,E),v&&(C==="number"||j!=="auto")&&(U=Fh(P,x,"category")));var z=TW(C);if(!H||H.length===0){var D,$=(D=_.domain)!==null&&D!==void 0?D:z;if(x){if(H=Fh(P,x,C),C==="category"&&v){var B=uve(H);O&&B?(G=H,H=I1(0,L)):O||(H=KP($,H,w).reduce(function(V,I){return V.indexOf(I)>=0?V:[].concat(Ef(V),[I])},[]))}else if(C==="category")O?H=H.filter(function(V){return V!==""&&!Gn(V)}):H=KP($,H,w).reduce(function(V,I){return V.indexOf(I)>=0||I===""||Gn(I)?V:[].concat(Ef(V),[I])},[]);else if(C==="number"){var Y=__e(P,r.filter(function(V){var I,X,ee=o in V.props?V.props[o]:(I=V.type.defaultProps)===null||I===void 0?void 0:I[o],re="hide"in V.props?V.props.hide:(X=V.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===q&&(N||!re)}),x,a,h);Y&&(H=Y)}v&&(C==="number"||j!=="auto")&&(U=Fh(P,x,"category"))}else v?H=I1(0,L):l&&l[q]&&l[q].hasStack&&C==="number"?H=p==="expand"?[0,1]:AV(l[q].stackGroups,c,f):H=xV(P,r.filter(function(V){var I=o in V.props?V.props[o]:V.type.defaultProps[o],X="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return I===q&&(N||!X)}),C,h,!0);if(C==="number")H=k6(d,H,q,a,M),$&&(H=F4($,H,E));else if(C==="category"&&$){var R=$,W=H.every(function(V){return R.indexOf(V)>=0});W&&(H=R)}}return Ee(Ee({},b),{},On({},q,Ee(Ee({},_),{},{axisType:a,domain:H,categoricalDomain:U,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:z,isCategorical:v,layout:h})))},{})},p9e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=eb(n.data,{graphicalItems:i,dataStartIndex:c,dataEndIndex:f}),v=p.length,b=SV(h,a),w=-1;return i.reduce(function(k,_){var C=_.type.defaultProps!==void 0?Ee(Ee({},_.type.defaultProps),_.props):_.props,x=C[o],E=TW("number");if(!k[x]){w++;var O;return b?O=I1(0,v):l&&l[x]&&l[x].hasStack?(O=AV(l[x].stackGroups,c,f),O=k6(d,O,x,a)):(O=F4(E,xV(p,i.filter(function(j){var M,N,q=o in j.props?j.props[o]:(M=j.type.defaultProps)===null||M===void 0?void 0:M[o],P="hide"in j.props?j.props.hide:(N=j.type.defaultProps)===null||N===void 0?void 0:N.hide;return q===x&&!P}),"number",h),r.defaultProps.allowDataOverflow),O=k6(d,O,x,a)),Ee(Ee({},k),{},On({},x,Ee(Ee({axisType:a},r.defaultProps),{},{hide:!0,orientation:pa(c9e,"".concat(a,".").concat(w%2),null),domain:O,originalDomain:E,isCategorical:b,layout:h})))}return k},{})},v9e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=va(h,a),v={};return p&&p.length?v=m9e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:f}):o&&o.length&&(v=p9e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:f})),v},g9e=function(n){var t=Zs(n),i=Yo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:nA(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:E1(t,i)}},N$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Fr(t,yf),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},y9e=function(n){return!n||!n.length?!1:n.some(function(t){var i=Qo(t&&t.type);return i&&i.indexOf("Bar")>=0})},$$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},b9e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,c=l===void 0?{}:l,f=i.width,h=i.height,d=i.children,p=i.margin||{},v=Fr(d,yf),b=Fr(d,es),w=Object.keys(c).reduce(function(O,j){var M=c[j],N=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},O),{},On({},N,O[N]+M.width)):O},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(O,j){var M=o[j],N=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},O),{},On({},N,pa(O,"".concat(N))+M.height)):O},{top:p.top||0,bottom:p.bottom||0}),_=Ee(Ee({},k),w),C=_.bottom;v&&(_.bottom+=v.props.height||yf.defaultProps.height),b&&t&&(_=w_e(_,r,i,t));var x=f-_.left-_.right,E=h-_.top-_.bottom;return Ee(Ee({brushBottom:C},_),{},{width:Math.max(x,0),height:Math.max(E,0)})},w9e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},LA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=n.axisComponents,f=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,C){var x=C.graphicalItems,E=C.stackGroups,O=C.offset,j=C.updateId,M=C.dataStartIndex,N=C.dataEndIndex,q=_.barSize,P=_.layout,L=_.barGap,H=_.barCategoryGap,G=_.maxBarSize,U=$$(P),z=U.numericAxisName,D=U.cateAxisName,$=y9e(x),B=[];return x.forEach(function(Y,R){var W=eb(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:N}),V=Y.type.defaultProps!==void 0?Ee(Ee({},Y.type.defaultProps),Y.props):Y.props,I=V.dataKey,X=V.maxBarSize,ee=V["".concat(z,"Id")],re=V["".concat(D,"Id")],le={},ye=c.reduce(function(Be,Ye){var We=C["".concat(Ye.axisType,"Map")],Ze=V["".concat(Ye.axisType,"Id")];We&&We[Ze]||Ye.axisType==="zAxis"||ju();var Qe=We[Ze];return Ee(Ee({},Be),{},On(On({},Ye.axisType,Qe),"".concat(Ye.axisType,"Ticks"),Yo(Qe)))},le),ae=ye[D],ue=ye["".concat(D,"Ticks")],xe=E&&E[ee]&&E[ee].hasStack&&P_e(Y,E[ee].stackGroups),ne=Qo(Y.type).indexOf("Bar")>=0,ze=E1(ae,ue),we=[],Oe=$&&y_e({barSize:q,stackGroups:E,totalSize:w9e(ye,D)});if(ne){var Ne,ge,Se=Gn(X)?G:X,Pe=(Ne=(ge=E1(ae,ue,!0))!==null&&ge!==void 0?ge:Se)!==null&&Ne!==void 0?Ne:0;we=b_e({barGap:L,barCategoryGap:H,bandSize:Pe!==ze?Pe:ze,sizeList:Oe[re],maxBarSize:Se}),Pe!==ze&&(we=we.map(function(Be){return Ee(Ee({},Be),{},{position:Ee(Ee({},Be.position),{},{offset:Be.position.offset-Pe/2})})}))}var ce=Y&&Y.type&&Y.type.getComposedData;ce&&B.push({props:Ee(Ee({},ce(Ee(Ee({},ye),{},{displayedData:W,props:_,dataKey:I,item:Y,bandSize:ze,barPosition:we,offset:O,stackedData:xe,layout:P,dataStartIndex:M,dataEndIndex:N}))),{},On(On(On({key:Y.key||"item-".concat(R)},z,ye[z]),D,ye[D]),"animationId",j)),childIndex:kve(Y,_.children),item:Y})}),B},v=function(_,C){var x=_.props,E=_.dataStartIndex,O=_.dataEndIndex,j=_.updateId;if(!cD({props:x}))return null;var M=x.children,N=x.layout,q=x.stackOffset,P=x.data,L=x.reverseStackOrder,H=$$(N),G=H.numericAxisName,U=H.cateAxisName,z=va(M,i),D=M_e(P,z,"".concat(G,"Id"),"".concat(U,"Id"),q,L),$=c.reduce(function(V,I){var X="".concat(I.axisType,"Map");return Ee(Ee({},V),{},On({},X,v9e(x,Ee(Ee({},I),{},{graphicalItems:z,stackGroups:I.axisType===G&&D,dataStartIndex:E,dataEndIndex:O}))))},{}),B=b9e(Ee(Ee({},$),{},{props:x,graphicalItems:z}),C==null?void 0:C.legendBBox);Object.keys($).forEach(function(V){$[V]=h(x,$[V],B,V.replace("Map",""),t)});var Y=$["".concat(U,"Map")],R=g9e(Y),W=p(x,Ee(Ee({},$),{},{dataStartIndex:E,dataEndIndex:O,updateId:j,graphicalItems:z,stackGroups:D,offset:B}));return Ee(Ee({formattedGraphicalItems:W,graphicalItems:z,offset:B,stackGroups:D},R),$)},b=(function(k){function _(C){var x,E,O;return JCe(this,_),O=t9e(this,_,[C]),On(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),On(O,"accessibilityManager",new ICe),On(O,"handleLegendBBoxUpdate",function(j){if(j){var M=O.state,N=M.dataStartIndex,q=M.dataEndIndex,P=M.updateId;O.setState(Ee({legendBBox:j},v({props:O.props,dataStartIndex:N,dataEndIndex:q,updateId:P},Ee(Ee({},O.state),{},{legendBBox:j}))))}}),On(O,"handleReceiveSyncEvent",function(j,M,N){if(O.props.syncId===j){if(N===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),On(O,"handleBrushChange",function(j){var M=j.startIndex,N=j.endIndex;if(M!==O.state.dataStartIndex||N!==O.state.dataEndIndex){var q=O.state.updateId;O.setState(function(){return Ee({dataStartIndex:M,dataEndIndex:N},v({props:O.props,dataStartIndex:M,dataEndIndex:N,updateId:q},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),On(O,"handleMouseEnter",function(j){var M=O.getMouseInfo(j);if(M){var N=Ee(Ee({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var q=O.props.onMouseEnter;Bn(q)&&q(N,j)}}),On(O,"triggeredAfterMouseMove",function(j){var M=O.getMouseInfo(j),N=M?Ee(Ee({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(N),O.triggerSyncEvent(N);var q=O.props.onMouseMove;Bn(q)&&q(N,j)}),On(O,"handleItemMouseEnter",function(j){O.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),On(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),On(O,"handleMouseMove",function(j){j.persist(),O.throttleTriggeredAfterMouseMove(j)}),On(O,"handleMouseLeave",function(j){O.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};O.setState(M),O.triggerSyncEvent(M);var N=O.props.onMouseLeave;Bn(N)&&N(M,j)}),On(O,"handleOuterEvent",function(j){var M=wve(j),N=pa(O.props,"".concat(M));if(M&&Bn(N)){var q,P;/.*touch.*/i.test(M)?P=O.getMouseInfo(j.changedTouches[0]):P=O.getMouseInfo(j),N((q=P)!==null&&q!==void 0?q:{},j)}}),On(O,"handleClick",function(j){var M=O.getMouseInfo(j);if(M){var N=Ee(Ee({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var q=O.props.onClick;Bn(q)&&q(N,j)}}),On(O,"handleMouseDown",function(j){var M=O.props.onMouseDown;if(Bn(M)){var N=O.getMouseInfo(j);M(N,j)}}),On(O,"handleMouseUp",function(j){var M=O.props.onMouseUp;if(Bn(M)){var N=O.getMouseInfo(j);M(N,j)}}),On(O,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),On(O,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseDown(j.changedTouches[0])}),On(O,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseUp(j.changedTouches[0])}),On(O,"handleDoubleClick",function(j){var M=O.props.onDoubleClick;if(Bn(M)){var N=O.getMouseInfo(j);M(N,j)}}),On(O,"handleContextMenu",function(j){var M=O.props.onContextMenu;if(Bn(M)){var N=O.getMouseInfo(j);M(N,j)}}),On(O,"triggerSyncEvent",function(j){O.props.syncId!==void 0&&rS.emit(aS,O.props.syncId,j,O.eventEmitterSymbol)}),On(O,"applySyncEvent",function(j){var M=O.props,N=M.layout,q=M.syncMethod,P=O.state.updateId,L=j.dataStartIndex,H=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)O.setState(Ee({dataStartIndex:L,dataEndIndex:H},v({props:O.props,dataStartIndex:L,dataEndIndex:H,updateId:P},O.state)));else if(j.activeTooltipIndex!==void 0){var G=j.chartX,U=j.chartY,z=j.activeTooltipIndex,D=O.state,$=D.offset,B=D.tooltipTicks;if(!$)return;if(typeof q=="function")z=q(B,j);else if(q==="value"){z=-1;for(var Y=0;Y=0){var xe,ne;if(G.dataKey&&!G.allowDuplicatedCategory){var ze=typeof G.dataKey=="function"?ue:"payload.".concat(G.dataKey.toString());xe=e1(Y,ze,z),ne=R&&W&&e1(W,ze,z)}else xe=Y==null?void 0:Y[U],ne=R&&W&&W[U];if(re||ee){var we=j.props.activeIndex!==void 0?j.props.activeIndex:U;return[A.cloneElement(j,Ee(Ee(Ee({},q.props),ye),{},{activeIndex:we})),null,null]}if(!Gn(xe))return[ae].concat(Ef(O.renderActivePoints({item:q,activePoint:xe,basePoint:ne,childIndex:U,isRange:R})))}else{var Oe,Ne=(Oe=O.getItemByXY(O.state.activeCoordinate))!==null&&Oe!==void 0?Oe:{graphicalItem:ae},ge=Ne.graphicalItem,Se=ge.item,Pe=Se===void 0?j:Se,ce=ge.childIndex,Be=Ee(Ee(Ee({},q.props),ye),{},{activeIndex:ce});return[A.cloneElement(Pe,Be),null,null]}return R?[ae,null,null]:[ae,null]}),On(O,"renderCustomized",function(j,M,N){return A.cloneElement(j,Ee(Ee({key:"recharts-customized-".concat(N)},O.props),O.state))}),On(O,"renderMap",{CartesianGrid:{handler:sg,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:sg},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:sg},YAxis:{handler:sg},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((x=C.id)!==null&&x!==void 0?x:id("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=kU(O.triggeredAfterMouseMove,(E=C.throttleDelay)!==null&&E!==void 0?E:1e3/60),O.state={},O}return a9e(_,k),n9e(_,[{key:"componentDidMount",value:function(){var x,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,E=x.children,O=x.data,j=x.height,M=x.layout,N=Fr(E,fa);if(N){var q=N.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var P=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=S6(this.state,O,q,P),H=this.state.tooltipTicks[q].coordinate,G=(this.state.offset.top+j)/2,U=M==="horizontal",z=U?{x:H,y:G}:{y:H,x:G},D=this.state.formattedGraphicalItems.find(function(B){var Y=B.item;return Y.type.name==="Scatter"});D&&(z=Ee(Ee({},z),D.props.points[q].tooltipPosition),L=D.props.points[q].tooltipPayload);var $={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:P,activePayload:L,activeCoordinate:z};this.setState($),this.renderCursor(N),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var O,j;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(x){u4([Fr(x.children,fa)],[Fr(this.props.children,fa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Fr(this.props.children,fa);if(x&&typeof x.props.shared=="boolean"){var E=x.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var E=this.container,O=E.getBoundingClientRect(),j=s0e(O),M={chartX:Math.round(x.pageX-j.left),chartY:Math.round(x.pageY-j.top)},N=O.width/E.offsetWidth||1,q=this.inRange(M.chartX,M.chartY,N);if(!q)return null;var P=this.state,L=P.xAxisMap,H=P.yAxisMap,G=this.getTooltipEventType(),U=P$(this.state,this.props.data,this.props.layout,q);if(G!=="axis"&&L&&H){var z=Zs(L).scale,D=Zs(H).scale,$=z&&z.invert?z.invert(M.chartX):null,B=D&&D.invert?D.invert(M.chartY):null;return Ee(Ee({},M),{},{xValue:$,yValue:B},U)}return U?Ee(Ee({},M),U):null}},{key:"inRange",value:function(x,E){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,M=x/O,N=E/O;if(j==="horizontal"||j==="vertical"){var q=this.state.offset,P=M>=q.left&&M<=q.left+q.width&&N>=q.top&&N<=q.top+q.height;return P?{x:M,y:N}:null}var L=this.state,H=L.angleAxisMap,G=L.radiusAxisMap;if(H&&G){var U=Zs(H);return QP({x:M,y:N},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,E=this.getTooltipEventType(),O=Fr(x,fa),j={};O&&E==="axis"&&(O.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=n1(this.props,this.handleOuterEvent);return Ee(Ee({},M),j)}},{key:"addListener",value:function(){rS.on(aS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){rS.removeListener(aS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,E,O){for(var j=this.state.formattedGraphicalItems,M=0,N=j.length;M({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0,"--chart-cursor-fill":i?lt(i,e):void 0,"--chart-bar-label-color":r?lt(r,e):void 0}});function A9e(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function O9e(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const il=Re(e=>{const n=be("BarChart",C9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:c,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:O,tooltipAnimationDuration:j,strokeDasharray:M,gridProps:N,tooltipProps:q,referenceLines:P,fillOpacity:L,barChartProps:H,type:G,orientation:U,dir:z,valueFormatter:D,children:$,barProps:B,xAxisLabel:Y,yAxisLabel:R,withBarValueLabel:W,valueLabelProps:V,withRightYAxis:I,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:le,mod:ye,getBarColor:ae,gridColor:ue,textColor:xe,attributes:ne,...ze}=n,we=ui(),Oe=_!=="none"&&(C==="x"||C==="xy"),Ne=_!=="none"&&(C==="y"||C==="xy"),[ge,Se]=A.useState(null),Pe=ge!==null,ce=G==="stacked"||G==="percent",Be=G==="percent"?S9e:D,Ye=Ae=>{Se(null),p==null||p(Ae)},{resolvedClassNames:We,resolvedStyles:Ze}=Wi({classNames:t,styles:a,props:n}),Qe=G==="waterfall"?A9e(c,v):c,ie=Xe({name:"BarChart",classes:x0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:MW}),ve=d.map(Ae=>{const rn=lt(Ae.color,we),fn=Pe&&ge!==Ae.name,En=typeof B=="function"?B(Ae):B,pn=En==null?void 0:En.shape;return A.createElement(Uu,{...ie("bar"),key:Ae.name,name:Ae.name,dataKey:Ae.name,fill:rn,stroke:rn,isAnimationActive:!1,fillOpacity:fn?.1:L,strokeOpacity:fn?.2:0,stackId:ce?"stack":Ae.stackId||void 0,yAxisId:Ae.yAxisId||void 0,minPointSize:re,...En,shape:on=>{const nn=on.payload,Nn=nn!=null&&nn.color?lt(nn.color,we):typeof ae=="function"?lt(ae(nn==null?void 0:nn[Ae.name],Ae),we):O9e(B,Ae)||rn,De={...on,fill:Nn};return typeof pn=="function"?pn(De):Q.isValidElement(pn)?Q.cloneElement(pn,De):typeof pn=="object"&&pn?y.jsx(Mm,{...De,...pn}):y.jsx(Mm,{...De})}},W&&y.jsx(so,{position:U==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:on=>Be==null?void 0:Be(on),...typeof V=="function"?V(Ae):V}))}),Ke=P==null?void 0:P.map((Ae,rn)=>{const fn=lt(Ae.color,we);return y.jsx(wp,{stroke:Ae.color?fn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ae.yAxisId||void 0,...Ae,label:{fill:Ae.color?fn:"currentColor",fontSize:12,position:Ae.labelPosition??"insideBottomLeft",...typeof Ae.label=="object"?Ae.label:{value:Ae.label}},...ie("referenceLine")},rn)}),Je={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Ne?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:U==="vertical"?void 0:Be,...ie("axis")};return y.jsx(me,{...ie("root"),onMouseLeave:Ye,dir:z||"ltr",mod:[{orientation:U},ye],...ze,children:y.jsx(iA,{...ie("container"),children:y.jsxs(_9e,{data:Qe,stackOffset:G==="percent"?"expand":void 0,layout:U,maxBarSize:le,margin:{bottom:Y?30:void 0,left:R?10:void 0,right:R?5:void 0},...H,children:[f&&y.jsx(es,{verticalAlign:"top",content:Ae=>y.jsx(_0,{payload:Ae.payload,onHighlight:Se,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ze,series:d,showColor:G!=="waterfall",attributes:ne}),...h}),y.jsxs(Ol,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Oe?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?Be:void 0,...ie("axis"),...x,children:[Y&&y.jsx(ti,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:Y}),x==null?void 0:x.children]}),y.jsxs(vo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[R&&y.jsx(ti,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:R}),E==null?void 0:E.children]}),y.jsxs(vo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!I,...Je,...ee,children:[X&&y.jsx(ti,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),E==null?void 0:E.children]}),y.jsx(J0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...N}),b&&y.jsx(fa,{animationDuration:j,isAnimationActive:j!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:Ae,payload:rn,labelFormatter:fn})=>y.jsx(P9,{label:fn&&rn?fn(Ae,rn):Ae,payload:rn,type:G==="waterfall"?"scatter":void 0,unit:O,classNames:We,styles:Ze,series:d,valueFormatter:D,attributes:ne}),...q}),ve,Ke,$]})})})});il.displayName="@mantine/charts/BarChart";il.classes=x0;il.varsResolver=MW;const j9e={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},DW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0}}),nb=Re(e=>{const n=be("LineChart",j9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:c,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:O,tooltipAnimationDuration:j,strokeDasharray:M,gridProps:N,tooltipProps:q,referenceLines:P,withDots:L,dotProps:H,activeDotProps:G,strokeWidth:U,lineChartProps:z,connectNulls:D,fillOpacity:$,curveType:B,orientation:Y,dir:R,valueFormatter:W,children:V,lineProps:I,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:le,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:ue,withPointLabels:xe,attributes:ne,gridColor:ze,...we}=n,Oe=ui(),Ne=_!=="none"&&(C==="x"||C==="xy"),ge=_!=="none"&&(C==="y"||C==="xy"),[Se,Pe]=A.useState(null),ce=Se!==null,Be=Ae=>{Pe(null),p==null||p(Ae)},{resolvedClassNames:Ye,resolvedStyles:We}=Wi({classNames:t,styles:a,props:n}),Ze=Xe({name:"LineChart",classes:x0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:DW}),Qe=`line-chart-gradient-${Vi()}`,ie=le==null?void 0:le.map(Ae=>y.jsx("stop",{offset:`${Ae.offset}%`,stopColor:lt(Ae.color,Oe)},Ae.color)),ve=d.map(Ae=>{const rn=lt(Ae.color,Oe),fn=ce&&Se!==Ae.name;return A.createElement(kp,{...Ze("line"),key:Ae.name,name:Ae.name,dataKey:Ae.name,dot:L?{fillOpacity:fn?0:1,strokeOpacity:fn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":rn,stroke:re==="gradient"?"white":rn,...H}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":rn,stroke:re==="gradient"?"white":rn,...G}:!1,fill:rn,stroke:re==="gradient"?`url(#${Qe})`:rn,strokeWidth:U,isAnimationActive:!1,fillOpacity:fn?0:$,strokeOpacity:fn?.5:$,connectNulls:D,type:Ae.curveType??B,strokeDasharray:Ae.strokeDasharray,yAxisId:Ae.yAxisId||void 0,label:xe?y.jsx(wpe,{valueFormatter:W}):void 0,...typeof I=="function"?I(Ae):I})}),Ke=P==null?void 0:P.map((Ae,rn)=>{const fn=lt(Ae.color,Oe);return y.jsx(wp,{stroke:Ae.color?fn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ae.yAxisId||void 0,...Ae,label:{fill:Ae.color?fn:"currentColor",fontSize:12,position:Ae.labelPosition??"insideBottomLeft",...typeof Ae.label=="object"?Ae.label:{value:Ae.label}},...Ze("referenceLine")},rn)}),Je={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:ge?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:Y==="vertical"?void 0:W,...Ze("axis")};return y.jsx(me,{...Ze("root"),onMouseLeave:Be,dir:R||"ltr",...we,children:y.jsx(iA,{...Ze("container"),children:y.jsxs(k9e,{data:c,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...z,children:[re==="gradient"&&y.jsx("defs",{children:y.jsx("linearGradient",{id:Qe,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),f&&y.jsx(es,{verticalAlign:"top",content:Ae=>y.jsx(_0,{payload:Ae.payload,onHighlight:Pe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ye,styles:We,series:d,showColor:re!=="gradient",attributes:ne}),...h}),y.jsxs(Ol,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ne?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?W:void 0,...Ze("axis"),...x,children:[X&&y.jsx(ti,{position:"insideBottom",offset:-20,fontSize:12,...Ze("axisLabel"),children:X}),x==null?void 0:x.children]}),y.jsxs(vo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[ee&&y.jsx(ti,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ee}),E==null?void 0:E.children]}),y.jsxs(vo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Je,...ue,children:[ae&&y.jsx(ti,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ae}),E==null?void 0:E.children]}),y.jsx(J0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ze("grid"),...N}),b&&y.jsx(fa,{animationDuration:j,isAnimationActive:j!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:Ae,payload:rn,labelFormatter:fn})=>y.jsx(P9,{label:fn&&rn?fn(Ae,rn):Ae,payload:rn,unit:O,classNames:Ye,styles:We,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:ne}),...q}),ve,Ke,V]})})})});nb.displayName="@mantine/charts/LineChart";nb.classes=x0;nb.varsResolver=DW;const z$="daily_report_prompt",sS="Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte.";function E9e(e){try{return new Date(e+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return e}}function $c({label:e,value:n,color:t,icon:i,sub:r}){return y.jsxs(Mt,{p:"sm",withBorder:!0,radius:"md",children:[y.jsxs(He,{gap:6,mb:2,align:"center",children:[i,y.jsx(Ce,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),y.jsx(Ce,{fz:28,fw:700,c:t,children:n}),r&&y.jsx(Ce,{size:"xs",c:"dimmed",children:r})]})}function lg({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return y.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[y.jsx(Ce,{fw:600,size:"sm",mb:6,children:e}),n.length===0?y.jsx(Ce,{size:"xs",c:"dimmed",children:t}):y.jsx(Hn,{gap:4,children:n.map((r,a)=>y.jsxs(He,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(He,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&y.jsx(fo,{size:22,radius:"xl",color:hl(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),y.jsx(Ce,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),y.jsx(ot,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function T9e({date:e,onJumpToCard:n}){const[t,i]=A.useState(null),[r,a]=A.useState(null),[o,l]=A.useState(null),[c,f]=A.useState(!1),[h,d]=A.useState(null),[p,v]=A.useState(!1),[b,w]=A.useState(""),[k,_]=A.useState(null),[C,x]=A.useState(null);A.useEffect(()=>{i(null),a(null),Bie(e).then(i).catch(z=>a(z.message)),l(null),d(null),Fie(e).then(z=>l(z.exists?z:null)).catch(()=>{})},[e]);const E=async()=>{f(!0),d(null);try{const z=await qie(e);l({...z,exists:!0})}catch(z){d(z.message)}finally{f(!1)}},O=async()=>{try{const z=await Hie(z$);w(z.value||sS)}catch{w(sS)}v(!0)},j=async()=>{await Uie(z$,b),v(!1)},M=()=>w(sS),N=A.useMemo(()=>t?t.hourly_moves.map((z,D)=>({hora:String(D).padStart(2,"0")+":00",movimientos:z})):[],[t]),q=A.useMemo(()=>{if(!t)return[];const z=new Set;for(const D of t.done_cards)D.requester&&z.add(D.requester);return Array.from(z).sort()},[t]),P=A.useMemo(()=>{if(!t)return[];const z=new Map;for(const D of t.done_cards)D.assignee_id&&z.set(D.assignee_id,D.assignee_name||D.assignee_id);return Array.from(z.entries()).map(([D,$])=>({value:D,label:$}))},[t]),L=A.useMemo(()=>t?t.done_cards.filter(z=>!(k&&z.requester!==k||C&&z.assignee_id!==C)):[],[t,k,C]),H=()=>{if(!t)return;const z=window.open("","_blank");if(!z)return;const D=window.location.origin,$=(()=>{try{return new Date(t.date+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return t.date}})(),B=[];if(k&&B.push(`solicitante=${k}`),C){const V=P.find(I=>I.value===C);B.push(`asignado=${(V==null?void 0:V.label)||C}`)}const Y=V=>V.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),R=L.map(V=>{const I=(V.tags||[]).map(Y).join(", "),X=`${D}/?card=${V.id}`;return` - ${String(V.seq_num).padStart(5,"0")} - ${Y(V.title)} - ${Y(V.requester||"")} - ${Y(V.assignee_name||"")} - ${Y(I)} - ${Zt(V.lead_time_ms)} + A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(n,",").concat(t+r-l*b," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},H3e=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,c=t.height;if(Math.abs(l)>0&&Math.abs(c)>0){var f=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+c),p=Math.max(o,o+c);return i>=f&&i<=h&&r>=d&&r<=p}return!1},U3e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$m=function(n){var t=DN(DN({},U3e),n),i=A.useRef(),r=A.useState(-1),a=N3e(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var c=t.x,f=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,C=t.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||d!==+d||h===0||d===0)return null;var x=pn("recharts-rectangle",v);return C?Q.createElement(wo,{canBegin:o>0,from:{width:h,height:d,x:c,y:f},to:{width:h,height:d,x:c,y:f},duration:w,animationEasing:b,isActive:C},function(E){var j=E.width,O=E.height,M=E.x,N=E.y;return Q.createElement(wo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:b},Q.createElement("path",L1({},Wn(t,!0),{className:x,d:RN(M,N,j,O,p),ref:i})))}):Q.createElement("path",L1({},Wn(t,!0),{className:x,d:RN(c,f,h,d,p)}))};function t6(){return t6=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Z3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Q3e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},J3e=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,c=n.left,f=c===void 0?0:c,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,b=n.className,w=X3e(n,V3e),k=W3e({x:i,y:a,top:l,left:f,width:d,height:v},w);return!Ge(i)||!Ge(a)||!Ge(d)||!Ge(v)||!Ge(l)||!Ge(f)?null:Q.createElement("path",i6({},Wn(k,!0),{className:pn("recharts-cross",b),d:Q3e(i,a,d,v,l,f)}))},I3,NN;function eSe(){if(NN)return I3;NN=1;var e=mU(),n=e(Object.getPrototypeOf,Object);return I3=n,I3}var B3,$N;function nSe(){if($N)return B3;$N=1;var e=_s(),n=eSe(),t=xs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,c=o.call(Object);function f(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==c}return B3=f,B3}var tSe=nSe();const iSe=yt(tSe);var F3,zN;function rSe(){if(zN)return F3;zN=1;var e=_s(),n=xs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return F3=i,F3}var aSe=rSe();const oSe=yt(aSe);function Lm(e){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(e)}function I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:f},to:{upperWidth:h,lowerWidth:d,height:p,x:c,y:f},duration:w,animationEasing:b,isActive:_},function(x){var E=x.upperWidth,j=x.lowerWidth,O=x.height,M=x.x,N=x.y;return Q.createElement(wo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},Q.createElement("path",I1({},Wn(t,!0),{className:C,d:FN(M,N,E,j,O),ref:i})))}):Q.createElement("g",null,Q.createElement("path",I1({},Wn(t,!0),{className:C,d:FN(c,f,h,d,p)})))},gSe=["option","shapeType","propTransformer","activeClassName","isActive"];function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function ySe(e,n){if(e==null)return{};var t=bSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function bSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function qN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function B1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),qr(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),qr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),qr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),qr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),qr(i,"handleSlideDragStart",function(r){var a=QN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return GSe(n,e),HSe(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,c=l.gap,f=l.data,h=f.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:v-v%c,endIndex:b===h?h:b-b%c}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,c=dr(a[i],l,i);return qn(o)?o(c,i):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,c=this.props,f=c.x,h=c.width,d=c.travellerWidth,p=c.startIndex,v=c.endIndex,b=c.onChange,w=i.pageX-a;w>0?w=Math.min(w,f+h-d-l,f+h-d-o):w<0&&(w=Math.max(w,f-o,f-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=QN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,c=r.startX,f=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},C=i.pageX-a;C>0?C=Math.min(C,d+p-v-f):C<0&&(C=Math.max(C,d-f)),_[o]=f+C;var x=this.getIndex(_),E=x.startIndex,j=x.endIndex,O=function(){var N=k.length-1;return o==="startX"&&(l>c?E%w===0:j%w===0)||lc?j%w===0:E%w===0)||l>c&&j===N};this.setState(qr(qr({},o,f+C),"brushMoveStartX",i.pageX),function(){b&&O()&&b(x)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,c=o.startX,f=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=f||r==="endX"&&v<=c||this.setState(qr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,c=i.fill,f=i.stroke;return Q.createElement("rect",{stroke:f,fill:c,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,c=i.data,f=i.children,h=i.padding,d=A.Children.only(f);return d?Q.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,c=this.props,f=c.y,h=c.travellerWidth,d=c.height,p=c.traveller,v=c.ariaLabel,b=c.data,w=c.startIndex,k=c.endIndex,_=Math.max(i,this.props.x),C=W3(W3({},Wn(this.props,!1)),{},{x:_,y:f,width:h,height:d}),x=v||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[k])===null||o===void 0?void 0:o.name);return Q.createElement(Bt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(j){["ArrowLeft","ArrowRight"].includes(j.key)&&(j.preventDefault(),j.stopPropagation(),l.handleTravellerMoveKeyboard(j.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,C))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,c=a.stroke,f=a.travellerWidth,h=Math.min(i,r)+f,d=Math.max(Math.abs(r-i)-f,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,c=i.travellerWidth,f=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,b={pointerEvents:"none",fill:f};return Q.createElement(Bt,{className:"recharts-brush-texts"},Q.createElement(p1,q1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(p1,q1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+c+v,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,c=i.y,f=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,C=p.isTravellerFocused;if(!r||!r.length||!Ge(l)||!Ge(c)||!Ge(f)||!Ge(h)||f<=0||h<=0)return null;var x=pn("recharts-brush",a),E=Q.Children.count(o)===1,j=FSe("userSelect","none");return Q.createElement(Bt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:j},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,c=i.stroke,f=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:r,y:a,width:o,height:l,fill:c,stroke:"none"}),Q.createElement("line",{x1:r+1,y1:f,x2:r+o-1,y2:f,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:r+1,y1:f+2,x2:r+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Q.isValidElement(i)?a=Q.cloneElement(i,r):qn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,c=i.travellerWidth,f=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||f!==r.prevUpdateId)return W3({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?KSe({data:a,width:o,x:l,travellerWidth:c,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||c!==r.prevTravellerWidth)){r.scale.range([l,l+o-c]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);i[c]>r?l=c:o=c}return r>=i[l]?l:o}}])})(A.PureComponent);qr(wf,"displayName","Brush");qr(wf,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var G3,JN;function XSe(){if(JN)return G3;JN=1;var e=tA();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return G3=n,G3}var Y3,e$;function ZSe(){if(e$)return Y3;e$=1;var e=sU(),n=Ol(),t=XSe(),i=Or(),r=z0();function a(o,l,c){var f=i(o)?e:t;return c&&r(o,l,c)&&(l=void 0),f(o,n(l,3))}return Y3=a,Y3}var QSe=ZSe();const JSe=yt(QSe);var ho=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},K3,n$;function e4e(){if(n$)return K3;n$=1;var e=CU();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return K3=n,K3}var X3,t$;function n4e(){if(t$)return X3;t$=1;var e=e4e(),n=xU(),t=Ol();function i(r,a){var o={};return a=t(a,3),n(r,function(l,c,f){e(o,c,a(l,c,f))}),o}return X3=i,X3}var t4e=n4e();const i4e=yt(t4e);var Z3,i$;function r4e(){if(i$)return Z3;i$=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function h4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function m4e(e,n){var t=e.x,i=e.y,r=d4e(e,l4e),a="".concat(t),o=parseInt(a,10),l="".concat(i),c=parseInt(l,10),f="".concat(n.height||r.height),h=parseInt(f,10),d="".concat(n.width||r.width),p=parseInt(d,10);return wh(wh(wh(wh(wh({},n),r),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function s$(e){return Q.createElement(ASe,a6({shapeType:"rectangle",propTransformer:m4e,activeClassName:"recharts-active-bar"},e))}var p4e=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Ge(i)||Ave(i);return a?n(i,r):(a||Ou(),t)}},v4e=["value","background"],JV;function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kf(e)}function g4e(e,n){if(e==null)return{};var t=y4e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function y4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function U1(){return U1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs($)0&&Math.abs(V)0&&(Y=Math.min((X||0)-(V[ee-1]||0),Y))}),Number.isFinite(Y)){var $=Y/F,P=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=$*P/2),w.padding==="no-gap"){var I=Au(n.barCategoryGap,$*P),H=$*P/2;M=H-I-(H-I)/P*I}}}r==="xAxis"?N=[i.left+(x.left||0)+(M||0),i.left+i.width-(x.right||0)-(M||0)]:r==="yAxis"?N=c==="horizontal"?[i.top+i.height-(x.bottom||0),i.top+(x.top||0)]:[i.top+(x.top||0)+(M||0),i.top+i.height-(x.bottom||0)-(M||0)]:N=w.range,j&&(N=[N[1],N[0]]);var U=q_e(w,a,p),D=U.scale,W=U.realScaleType;D.domain(_).range(N),H_e(D);var G=Z_e(D,$a($a({},w),{},{realScaleType:W}));r==="xAxis"?(L=k==="top"&&!E||k==="bottom"&&E,q=i.left,R=d[O]-L*w.height):r==="yAxis"&&(L=k==="left"&&!E||k==="right"&&E,q=d[O]-L*w.width,R=i.top);var z=$a($a($a({},w),G),{},{realScaleType:W,x:q,y:R,scale:D,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return z.bandSize=M1(z,G),!w.hide&&r==="xAxis"?d[O]+=(L?-1:1)*z.height:w.hide||(d[O]+=(L?-1:1)*z.width),$a($a({},v),{},X0({},b,z))},{})},iW=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},E4e=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return iW({x:t,y:i},{x:r,y:a})},rW=(function(){function e(n){A4e(this,e),this.scale=n}return j4e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+c}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();X0(rW,"EPS",1e-4);var DA=function(n){var t=Object.keys(n).reduce(function(i,r){return $a($a({},i),{},X0({},r,rW.create(n[r])))},{});return $a($a({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return i4e(r,function(c,f){return t[f].apply(c,{bandAware:o,position:l})})},isInRange:function(r){return QV(r,function(a,o){return t[o].isInRange(a)})}})};function T4e(e){return(e%180+180)%180}var M4e=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=T4e(r),o=a*Math.PI/180,l=Math.atan(i/t),c=o>l&&o-1?c[f?a[h]:h]:void 0}}return eS=i,eS}var nS,h$;function R4e(){if(h$)return nS;h$=1;var e=YV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return nS=n,nS}var tS,m$;function P4e(){if(m$)return tS;m$=1;var e=yU(),n=Ol(),t=R4e(),i=Math.max;function r(a,o,l){var c=a==null?0:a.length;if(!c)return-1;var f=l==null?0:t(l);return f<0&&(f=i(c+f,0)),e(a,n(o,3),f)}return tS=r,tS}var iS,p$;function N4e(){if(p$)return iS;p$=1;var e=D4e(),n=P4e(),t=e(n);return iS=t,iS}var $4e=N4e();const z4e=yt($4e);var L4e=RH();const I4e=yt(L4e);var B4e=I4e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),RA=A.createContext(void 0),PA=A.createContext(void 0),aW=A.createContext(void 0),oW=A.createContext({}),sW=A.createContext(void 0),lW=A.createContext(0),uW=A.createContext(0),v$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,c=n.width,f=n.height,h=B4e(a);return Q.createElement(RA.Provider,{value:i},Q.createElement(PA.Provider,{value:r},Q.createElement(oW.Provider,{value:a},Q.createElement(aW.Provider,{value:h},Q.createElement(sW.Provider,{value:o},Q.createElement(lW.Provider,{value:f},Q.createElement(uW.Provider,{value:c},l)))))))},F4e=function(){return A.useContext(sW)},cW=function(n){var t=A.useContext(RA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},q4e=function(){var n=A.useContext(RA);return tl(n)},H4e=function(){var n=A.useContext(PA),t=z4e(n,function(i){return QV(i.domain,Number.isFinite)});return t||tl(n)},fW=function(n){var t=A.useContext(PA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},U4e=function(){var n=A.useContext(aW);return n},V4e=function(){return A.useContext(oW)},NA=function(){return A.useContext(uW)},$A=function(){return A.useContext(lW)};function _f(e){"@babel/helpers - typeof";return _f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_f(e)}function W4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function G4e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function O6e(e,n){return yW(e,n+1)}function E6e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,c=0,f=1,h=o,d=function(){var b=i==null?void 0:i[c];if(b===void 0)return{v:yW(i,f)};var w=c,k,_=function(){return k===void 0&&(k=t(b,w)),k},C=b.coordinate,x=c===0||K1(e,C,_,h,l);x||(c=0,h=o,f+=1),x&&(h=C+e*(_()/2+r),c+=f)},p;f<=a.length;)if(p=d(),p)return p.v;return[]}function Um(e){"@babel/helpers - typeof";return Um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Um(e)}function S$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Xi(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Xi(Xi({},v),{},{tickCoord:v.coordinate});var _=K1(e,v.tickCoord,w,l,c);_&&(c=v.tickCoord-e*(w()/2+r),a[p]=Xi(Xi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function P6e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,c=n.start,f=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-f);o[l-1]=h=Xi(Xi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=K1(e,h.tickCoord,function(){return d},c,f);v&&(f=h.tickCoord-e*(d/2+r),o[l-1]=Xi(Xi({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(C){var x=o[C],E,j=function(){return E===void 0&&(E=t(x,C)),E};if(C===0){var O=e*(x.coordinate-e*j()/2-c);o[C]=x=Xi(Xi({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[C]=x=Xi(Xi({},x),{},{tickCoord:x.coordinate});var M=K1(e,x.tickCoord,j,c,f);M&&(c=x.tickCoord+e*(j()/2+r),o[C]=Xi(Xi({},x),{},{isShow:!0}))},k=0;k=2?qa(r[1].coordinate-r[0].coordinate):1,_=j6e(a,k,v);return c==="equidistantPreserveStart"?E6e(k,_,w,r,o):(c==="preserveStart"||c==="preserveStartEnd"?p=P6e(k,_,w,r,o,c==="preserveStartEnd"):p=R6e(k,_,w,r,o),p.filter(function(C){return C.isShow}))}var N6e=["viewBox"],$6e=["viewBox"],z6e=["ticks"];function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cf(e)}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function L6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function I6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function A$(e,n){for(var t=0;t0?c(this.props):c(v)),o<=0||l<=0||!b||!b.length?null:Q.createElement(Bt,{className:pn("recharts-cartesian-axis",f),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ii.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=pn(r.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(i)?o=Q.cloneElement(i,ki(ki({},r),{},{className:l})):qn(i)?o=i(ki(ki({},r),{},{className:l})):o=Q.createElement(p1,Uc({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);IA(ud,"displayName","CartesianAxis");IA(ud,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var W6e=["x1","y1","x2","y2","key"],G6e=["offset"];function Eu(e){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eu(e)}function j$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Qi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Z6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Q6e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,c=n.ry;return Q.createElement("rect",{x:r,y:a,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function kW(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(qn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,c=O$(n,W6e),f=Wn(c,!1);f.offset;var h=O$(f,G6e);t=Q.createElement("line",du({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function J6e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,c){var f=Qi(Qi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(c),index:c});return kW(r,f)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function eCe(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,c){var f=Qi(Qi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(c),index:c});return kW(r,f)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function nCe(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,f=c===void 0?!0:c;if(!f||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Q.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function tCe(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,f=e.verticalPoints;if(!t||!i||!i.length)return null;var h=f.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Q.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:c,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var iCe=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return NV(LA(Qi(Qi(Qi({},ud.defaultProps),i),{},{ticks:es(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},rCe=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return NV(LA(Qi(Qi(Qi({},ud.defaultProps),i),{},{ticks:es(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},$c={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function nb(e){var n,t,i,r,a,o,l=NA(),c=$A(),f=V4e(),h=Qi(Qi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:$c.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:$c.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:$c.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:$c.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:$c.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:$c.verticalFill,x:Ge(e.x)?e.x:f.left,y:Ge(e.y)?e.y:f.top,width:Ge(e.width)?e.width:f.width,height:Ge(e.height)?e.height:f.height}),d=h.x,p=h.y,v=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,C=q4e(),x=H4e();if(!Ge(v)||v<=0||!Ge(b)||b<=0||!Ge(d)||d!==+d||!Ge(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||iCe,j=h.horizontalCoordinatesGenerator||rCe,O=h.horizontalPoints,M=h.verticalPoints;if((!O||!O.length)&&qn(j)){var N=k&&k.length,q=j({yAxis:x?Qi(Qi({},x),{},{ticks:N?k:x.ticks}):void 0,width:l,height:c,offset:f},N?!0:w);as(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(q),"]")),Array.isArray(q)&&(O=q)}if((!M||!M.length)&&qn(E)){var R=_&&_.length,L=E({xAxis:C?Qi(Qi({},C),{},{ticks:R?_:C.ticks}):void 0,width:l,height:c,offset:f},R?!0:w);as(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Eu(L),"]")),Array.isArray(L)&&(M=L)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(Q6e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(J6e,du({},h,{offset:f,horizontalPoints:O,xAxis:C,yAxis:x})),Q.createElement(eCe,du({},h,{offset:f,verticalPoints:M,xAxis:C,yAxis:x})),Q.createElement(nCe,du({},h,{horizontalPoints:O})),Q.createElement(tCe,du({},h,{verticalPoints:M})))}nb.displayName="CartesianGrid";var aCe=["type","layout","connectNulls","ref"],oCe=["key"];function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Af(e)}function E$(e,n){if(e==null)return{};var t=sCe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function sCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(zc(c.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(zc(n.repeat(c,h)),zc(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),za(t,"id",rd("recharts-line-")),za(t,"pathRef",function(o){t.mainCurve=o}),za(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),za(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return gCe(n,e),hCe(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,c=a.yAxis,f=a.layout,h=a.children,d=ka(h,Sp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:dr(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Q.createElement(Bt,v,d.map(function(b){return Q.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:c,layout:f,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,f=l.points,h=l.dataKey,d=Wn(this.props,!1),p=Wn(c,!0),v=f.map(function(w,k){var _=Fr(Fr(Fr({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:f});return n.renderDotItem(c,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Q.createElement(Bt,Wh({className:"recharts-line-dots",key:"dots"},b),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,c=l.type,f=l.layout,h=l.connectNulls;l.ref;var d=E$(l,aCe),p=Fr(Fr(Fr({},Wn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:c,layout:f,connectNulls:h});return Q.createElement(Jc,Wh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,c=o.strokeDasharray,f=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,C=_.prevPoints,x=_.totalLength;return Q.createElement(wo,{begin:h,duration:d,isActive:f,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var j=E.t;if(C){var O=C.length/l.length,M=l.map(function(F,Y){var V=Math.floor(Y*O);if(C[V]){var $=C[V],P=Hi($.x,F.x),I=Hi($.y,F.y);return Fr(Fr({},F),{},{x:P(j),y:I(j)})}if(b){var H=Hi(w*2,F.x),U=Hi(k/2,F.y);return Fr(Fr({},F),{},{x:H(j),y:U(j)})}return Fr(Fr({},F),{},{x:F.x,y:F.y})});return a.renderCurveStatically(M,i,r)}var N=Hi(0,x),q=N(j),R;if(c){var L="".concat(c).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});R=a.getStrokeDasharray(q,x,L)}else R=a.generateSimpleStrokeDasharray(x,q);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,c=this.state,f=c.prevPoints,h=c.totalLength;return l&&o&&o.length&&(!f&&h>0||!vf(f,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,c=r.className,f=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=pn("recharts-line",c),E=f&&f.allowDataOverflow,j=h&&h.allowDataOverflow,O=E||j,M=Yn(k)?this.id:k,N=(i=Wn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,F=L===void 0?2:L,Y=LH(o)?o:{},V=Y.clipDot,$=V===void 0?!0:V,P=R*2+F;return Q.createElement(Bt,{className:x},E||j?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?p:p-v/2,y:j?d:d-b/2,width:E?v:v*2,height:j?b:b*2})),!$&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:b+P}))):null,!C&&this.renderCurve(O,M),this.renderErrorBar(O,M),(C||o)&&this.renderDots(O,$,M),(!w||_)&&fo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(zc(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function kCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!vf(h,o)||!vf(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,c=r.className,f=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=pn("recharts-area",c),E=d&&d.allowDataOverflow,j=p&&p.allowDataOverflow,O=E||j,M=Yn(k)?this.id:k,N=(i=Wn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},q=N.r,R=q===void 0?3:q,L=N.strokeWidth,F=L===void 0?2:L,Y=LH(o)?o:{},V=Y.clipDot,$=V===void 0?!0:V,P=R*2+F;return Q.createElement(Bt,{className:x},E||j?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?h:h-v/2,y:j?f:f-b/2,width:E?v:v*2,height:j?b:b*2})),!$&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-P/2,y:f-P/2,width:v+P,height:b+P}))):null,C?null:this.renderArea(O,M),(o||C)&&this.renderDots(O,$,M),(!w||_)&&fo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);SW=ms;so(ms,"displayName","Area");so(ms,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Fu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});so(ms,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ge(l)&&typeof l=="number")return l;var c=r==="horizontal"?i:t,f=c.scale.domain();if(c.type==="number"){var h=Math.max(f[0],f[1]),d=Math.min(f[0],f[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});so(ms,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,b=f&&f.length,w=SW.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,C=d.map(function(E,j){var O;b?O=f[h+j]:(O=dr(E,c),Array.isArray(O)?_=!0:O=[w,O]);var M=O[1]==null||b&&dr(E,c)==null;return k?{x:T1({axis:i,ticks:a,bandSize:l,entry:E,index:j}),y:M?null:r.scale(O[1]),value:O,payload:E}:{x:M?null:i.scale(O[1]),y:T1({axis:r,ticks:o,bandSize:l,entry:E,index:j}),value:O,payload:E}}),x;return b||_?x=C.map(function(E){var j=Array.isArray(E.value)?E.value[0]:null;return k?{x:E.x,y:j!=null&&E.y!=null?r.scale(j):null}:{x:j!=null?i.scale(j):null,y:E.y}}):x=k?r.scale(w):i.scale(w),Xs({points:C,baseLine:x,layout:v,isRange:_},p)});so(ms,"renderDotItem",function(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(qn(e))t=e(n);else{var i=pn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=CW(n,wCe);t=Q.createElement(G0,hu({},a,{key:r,className:i}))}return t});function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Of(e)}function ECe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function TCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function g9e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function y9e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function b9e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ge(r)&&Ge(a)?n.slice(r,a+1):[]};function BW(e){return e==="number"?[0,"auto"]:void 0}var C6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=tb(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(c,f){var h,d=(h=f.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=t1(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(Mf(c),[zV(f,p)]):c},[])},B$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=M9e(a,i),l=n.orderedTooltipTicks,c=n.tooltipAxis,f=n.tooltipTicks,h=$_e(o,l,f,c);if(h>=0&&f){var d=f[h]&&f[h].value,p=C6(n,t,h,d),v=D9e(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},R9e=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=PV(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,C=_.type,x=_.dataKey,E=_.allowDataOverflow,j=_.allowDuplicatedCategory,O=_.scale,M=_.ticks,N=_.includeHidden,q=_[o];if(b[q])return b;var R=tb(n.data,{graphicalItems:r.filter(function(G){var z,X=o in G.props?G.props[o]:(z=G.type.defaultProps)===null||z===void 0?void 0:z[o];return X===q}),dataStartIndex:c,dataEndIndex:f}),L=R.length,F,Y,V;a9e(_.domain,E,C)&&(F=q4(_.domain,null,E),v&&(C==="number"||O!=="auto")&&(V=Uh(R,x,"category")));var $=BW(C);if(!F||F.length===0){var P,I=(P=_.domain)!==null&&P!==void 0?P:$;if(x){if(F=Uh(R,x,C),C==="category"&&v){var H=Ove(F);j&&H?(Y=F,F=F1(0,L)):j||(F=nN(I,F,w).reduce(function(G,z){return G.indexOf(z)>=0?G:[].concat(Mf(G),[z])},[]))}else if(C==="category")j?F=F.filter(function(G){return G!==""&&!Yn(G)}):F=nN(I,F,w).reduce(function(G,z){return G.indexOf(z)>=0||z===""||Yn(z)?G:[].concat(Mf(G),[z])},[]);else if(C==="number"){var U=F_e(R,r.filter(function(G){var z,X,ee=o in G.props?G.props[o]:(z=G.type.defaultProps)===null||z===void 0?void 0:z[o],re="hide"in G.props?G.props.hide:(X=G.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===q&&(N||!re)}),x,a,h);U&&(F=U)}v&&(C==="number"||O!=="auto")&&(V=Uh(R,x,"category"))}else v?F=F1(0,L):l&&l[q]&&l[q].hasStack&&C==="number"?F=p==="expand"?[0,1]:$V(l[q].stackGroups,c,f):F=RV(R,r.filter(function(G){var z=o in G.props?G.props[o]:G.type.defaultProps[o],X="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return z===q&&(N||!X)}),C,h,!0);if(C==="number")F=_6(d,F,q,a,M),I&&(F=q4(I,F,E));else if(C==="category"&&I){var D=I,W=F.every(function(G){return D.indexOf(G)>=0});W&&(F=D)}}return Ee(Ee({},b),{},jn({},q,Ee(Ee({},_),{},{axisType:a,domain:F,categoricalDomain:V,duplicateDomain:Y,originalDomain:(k=_.domain)!==null&&k!==void 0?k:$,isCategorical:v,layout:h})))},{})},P9e=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.layout,d=n.children,p=tb(n.data,{graphicalItems:i,dataStartIndex:c,dataEndIndex:f}),v=p.length,b=PV(h,a),w=-1;return i.reduce(function(k,_){var C=_.type.defaultProps!==void 0?Ee(Ee({},_.type.defaultProps),_.props):_.props,x=C[o],E=BW("number");if(!k[x]){w++;var j;return b?j=F1(0,v):l&&l[x]&&l[x].hasStack?(j=$V(l[x].stackGroups,c,f),j=_6(d,j,x,a)):(j=q4(E,RV(p,i.filter(function(O){var M,N,q=o in O.props?O.props[o]:(M=O.type.defaultProps)===null||M===void 0?void 0:M[o],R="hide"in O.props?O.props.hide:(N=O.type.defaultProps)===null||N===void 0?void 0:N.hide;return q===x&&!R}),"number",h),r.defaultProps.allowDataOverflow),j=_6(d,j,x,a)),Ee(Ee({},k),{},jn({},x,Ee(Ee({axisType:a},r.defaultProps),{},{hide:!0,orientation:wa(E9e,"".concat(a,".").concat(w%2),null),domain:j,originalDomain:E,isCategorical:b,layout:h})))}return k},{})},N9e=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,c=t.dataStartIndex,f=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=ka(h,a),v={};return p&&p.length?v=R9e(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:f}):o&&o.length&&(v=P9e(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:f})),v},$9e=function(n){var t=tl(n),i=es(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:iA(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:M1(t,i)}},F$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Ur(t,wf),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},z9e=function(n){return!n||!n.length?!1:n.some(function(t){var i=rs(t&&t.type);return i&&i.indexOf("Bar")>=0})},q$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},L9e=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,c=l===void 0?{}:l,f=i.width,h=i.height,d=i.children,p=i.margin||{},v=Ur(d,wf),b=Ur(d,os),w=Object.keys(c).reduce(function(j,O){var M=c[O],N=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},j),{},jn({},N,j[N]+M.width)):j},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(j,O){var M=o[O],N=M.orientation;return!M.mirror&&!M.hide?Ee(Ee({},j),{},jn({},N,wa(j,"".concat(N))+M.height)):j},{top:p.top||0,bottom:p.bottom||0}),_=Ee(Ee({},k),w),C=_.bottom;v&&(_.bottom+=v.props.height||wf.defaultProps.height),b&&t&&(_=I_e(_,r,i,t));var x=f-_.left-_.right,E=h-_.top-_.bottom;return Ee(Ee({brushBottom:C},_),{},{width:Math.max(x,0),height:Math.max(E,0)})},I9e=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},BA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=n.axisComponents,f=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,C){var x=C.graphicalItems,E=C.stackGroups,j=C.offset,O=C.updateId,M=C.dataStartIndex,N=C.dataEndIndex,q=_.barSize,R=_.layout,L=_.barGap,F=_.barCategoryGap,Y=_.maxBarSize,V=q$(R),$=V.numericAxisName,P=V.cateAxisName,I=z9e(x),H=[];return x.forEach(function(U,D){var W=tb(_.data,{graphicalItems:[U],dataStartIndex:M,dataEndIndex:N}),G=U.type.defaultProps!==void 0?Ee(Ee({},U.type.defaultProps),U.props):U.props,z=G.dataKey,X=G.maxBarSize,ee=G["".concat($,"Id")],re=G["".concat(P,"Id")],le={},ye=c.reduce(function(qe,Ye){var We=C["".concat(Ye.axisType,"Map")],Ze=G["".concat(Ye.axisType,"Id")];We&&We[Ze]||Ye.axisType==="zAxis"||Ou();var Qe=We[Ze];return Ee(Ee({},qe),{},jn(jn({},Ye.axisType,Qe),"".concat(Ye.axisType,"Ticks"),es(Qe)))},le),ae=ye[P],ue=ye["".concat(P,"Ticks")],Se=E&&E[ee]&&E[ee].hasStack&&J_e(U,E[ee].stackGroups),ne=rs(U.type).indexOf("Bar")>=0,Le=M1(ae,ue),ke=[],je=I&&z_e({barSize:q,stackGroups:E,totalSize:I9e(ye,P)});if(ne){var Ne,ge,Ce=Yn(X)?Y:X,Pe=(Ne=(ge=M1(ae,ue,!0))!==null&&ge!==void 0?ge:Ce)!==null&&Ne!==void 0?Ne:0;ke=L_e({barGap:L,barCategoryGap:F,bandSize:Pe!==Le?Pe:Le,sizeList:je[re],maxBarSize:Ce}),Pe!==Le&&(ke=ke.map(function(qe){return Ee(Ee({},qe),{},{position:Ee(Ee({},qe.position),{},{offset:qe.position.offset-Pe/2})})}))}var ce=U&&U.type&&U.type.getComposedData;ce&&H.push({props:Ee(Ee({},ce(Ee(Ee({},ye),{},{displayedData:W,props:_,dataKey:z,item:U,bandSize:Le,barPosition:ke,offset:j,stackedData:Se,layout:R,dataStartIndex:M,dataEndIndex:N}))),{},jn(jn(jn({key:U.key||"item-".concat(D)},$,ye[$]),P,ye[P]),"animationId",O)),childIndex:Bve(U,_.children),item:U})}),H},v=function(_,C){var x=_.props,E=_.dataStartIndex,j=_.dataEndIndex,O=_.updateId;if(!vD({props:x}))return null;var M=x.children,N=x.layout,q=x.stackOffset,R=x.data,L=x.reverseStackOrder,F=q$(N),Y=F.numericAxisName,V=F.cateAxisName,$=ka(M,i),P=X_e(R,$,"".concat(Y,"Id"),"".concat(V,"Id"),q,L),I=c.reduce(function(G,z){var X="".concat(z.axisType,"Map");return Ee(Ee({},G),{},jn({},X,N9e(x,Ee(Ee({},z),{},{graphicalItems:$,stackGroups:z.axisType===Y&&P,dataStartIndex:E,dataEndIndex:j}))))},{}),H=L9e(Ee(Ee({},I),{},{props:x,graphicalItems:$}),C==null?void 0:C.legendBBox);Object.keys(I).forEach(function(G){I[G]=h(x,I[G],H,G.replace("Map",""),t)});var U=I["".concat(V,"Map")],D=$9e(U),W=p(x,Ee(Ee({},I),{},{dataStartIndex:E,dataEndIndex:j,updateId:O,graphicalItems:$,stackGroups:P,offset:H}));return Ee(Ee({formattedGraphicalItems:W,graphicalItems:$,offset:H,stackGroups:P},D),I)},b=(function(k){function _(C){var x,E,j;return y9e(this,_),j=k9e(this,_,[C]),jn(j,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),jn(j,"accessibilityManager",new r9e),jn(j,"handleLegendBBoxUpdate",function(O){if(O){var M=j.state,N=M.dataStartIndex,q=M.dataEndIndex,R=M.updateId;j.setState(Ee({legendBBox:O},v({props:j.props,dataStartIndex:N,dataEndIndex:q,updateId:R},Ee(Ee({},j.state),{},{legendBBox:O}))))}}),jn(j,"handleReceiveSyncEvent",function(O,M,N){if(j.props.syncId===O){if(N===j.eventEmitterSymbol&&typeof j.props.syncMethod!="function")return;j.applySyncEvent(M)}}),jn(j,"handleBrushChange",function(O){var M=O.startIndex,N=O.endIndex;if(M!==j.state.dataStartIndex||N!==j.state.dataEndIndex){var q=j.state.updateId;j.setState(function(){return Ee({dataStartIndex:M,dataEndIndex:N},v({props:j.props,dataStartIndex:M,dataEndIndex:N,updateId:q},j.state))}),j.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),jn(j,"handleMouseEnter",function(O){var M=j.getMouseInfo(O);if(M){var N=Ee(Ee({},M),{},{isTooltipActive:!0});j.setState(N),j.triggerSyncEvent(N);var q=j.props.onMouseEnter;qn(q)&&q(N,O)}}),jn(j,"triggeredAfterMouseMove",function(O){var M=j.getMouseInfo(O),N=M?Ee(Ee({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};j.setState(N),j.triggerSyncEvent(N);var q=j.props.onMouseMove;qn(q)&&q(N,O)}),jn(j,"handleItemMouseEnter",function(O){j.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),jn(j,"handleItemMouseLeave",function(){j.setState(function(){return{isTooltipActive:!1}})}),jn(j,"handleMouseMove",function(O){O.persist(),j.throttleTriggeredAfterMouseMove(O)}),jn(j,"handleMouseLeave",function(O){j.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};j.setState(M),j.triggerSyncEvent(M);var N=j.props.onMouseLeave;qn(N)&&N(M,O)}),jn(j,"handleOuterEvent",function(O){var M=Ive(O),N=wa(j.props,"".concat(M));if(M&&qn(N)){var q,R;/.*touch.*/i.test(M)?R=j.getMouseInfo(O.changedTouches[0]):R=j.getMouseInfo(O),N((q=R)!==null&&q!==void 0?q:{},O)}}),jn(j,"handleClick",function(O){var M=j.getMouseInfo(O);if(M){var N=Ee(Ee({},M),{},{isTooltipActive:!0});j.setState(N),j.triggerSyncEvent(N);var q=j.props.onClick;qn(q)&&q(N,O)}}),jn(j,"handleMouseDown",function(O){var M=j.props.onMouseDown;if(qn(M)){var N=j.getMouseInfo(O);M(N,O)}}),jn(j,"handleMouseUp",function(O){var M=j.props.onMouseUp;if(qn(M)){var N=j.getMouseInfo(O);M(N,O)}}),jn(j,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),jn(j,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.handleMouseDown(O.changedTouches[0])}),jn(j,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&j.handleMouseUp(O.changedTouches[0])}),jn(j,"handleDoubleClick",function(O){var M=j.props.onDoubleClick;if(qn(M)){var N=j.getMouseInfo(O);M(N,O)}}),jn(j,"handleContextMenu",function(O){var M=j.props.onContextMenu;if(qn(M)){var N=j.getMouseInfo(O);M(N,O)}}),jn(j,"triggerSyncEvent",function(O){j.props.syncId!==void 0&&oS.emit(sS,j.props.syncId,O,j.eventEmitterSymbol)}),jn(j,"applySyncEvent",function(O){var M=j.props,N=M.layout,q=M.syncMethod,R=j.state.updateId,L=O.dataStartIndex,F=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)j.setState(Ee({dataStartIndex:L,dataEndIndex:F},v({props:j.props,dataStartIndex:L,dataEndIndex:F,updateId:R},j.state)));else if(O.activeTooltipIndex!==void 0){var Y=O.chartX,V=O.chartY,$=O.activeTooltipIndex,P=j.state,I=P.offset,H=P.tooltipTicks;if(!I)return;if(typeof q=="function")$=q(H,O);else if(q==="value"){$=-1;for(var U=0;U=0){var Se,ne;if(Y.dataKey&&!Y.allowDuplicatedCategory){var Le=typeof Y.dataKey=="function"?ue:"payload.".concat(Y.dataKey.toString());Se=t1(U,Le,$),ne=D&&W&&t1(W,Le,$)}else Se=U==null?void 0:U[V],ne=D&&W&&W[V];if(re||ee){var ke=O.props.activeIndex!==void 0?O.props.activeIndex:V;return[A.cloneElement(O,Ee(Ee(Ee({},q.props),ye),{},{activeIndex:ke})),null,null]}if(!Yn(Se))return[ae].concat(Mf(j.renderActivePoints({item:q,activePoint:Se,basePoint:ne,childIndex:V,isRange:D})))}else{var je,Ne=(je=j.getItemByXY(j.state.activeCoordinate))!==null&&je!==void 0?je:{graphicalItem:ae},ge=Ne.graphicalItem,Ce=ge.item,Pe=Ce===void 0?O:Ce,ce=ge.childIndex,qe=Ee(Ee(Ee({},q.props),ye),{},{activeIndex:ce});return[A.cloneElement(Pe,qe),null,null]}return D?[ae,null,null]:[ae,null]}),jn(j,"renderCustomized",function(O,M,N){return A.cloneElement(O,Ee(Ee({key:"recharts-customized-".concat(N)},j.props),j.state))}),jn(j,"renderMap",{CartesianGrid:{handler:cg,once:!0},ReferenceArea:{handler:j.renderReferenceElement},ReferenceLine:{handler:cg},ReferenceDot:{handler:j.renderReferenceElement},XAxis:{handler:cg},YAxis:{handler:cg},Brush:{handler:j.renderBrush,once:!0},Bar:{handler:j.renderGraphicChild},Line:{handler:j.renderGraphicChild},Area:{handler:j.renderGraphicChild},Radar:{handler:j.renderGraphicChild},RadialBar:{handler:j.renderGraphicChild},Scatter:{handler:j.renderGraphicChild},Pie:{handler:j.renderGraphicChild},Funnel:{handler:j.renderGraphicChild},Tooltip:{handler:j.renderCursor,once:!0},PolarGrid:{handler:j.renderPolarGrid,once:!0},PolarAngleAxis:{handler:j.renderPolarAxis},PolarRadiusAxis:{handler:j.renderPolarAxis},Customized:{handler:j.renderCustomized}}),j.clipPathId="".concat((x=C.id)!==null&&x!==void 0?x:rd("recharts"),"-clip"),j.throttleTriggeredAfterMouseMove=MU(j.triggeredAfterMouseMove,(E=C.throttleDelay)!==null&&E!==void 0?E:1e3/60),j.state={},j}return S9e(_,k),w9e(_,[{key:"componentDidMount",value:function(){var x,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,E=x.children,j=x.data,O=x.height,M=x.layout,N=Ur(E,va);if(N){var q=N.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=C6(this.state,j,q,R),F=this.state.tooltipTicks[q].coordinate,Y=(this.state.offset.top+O)/2,V=M==="horizontal",$=V?{x:F,y:Y}:{y:F,x:Y},P=this.state.formattedGraphicalItems.find(function(H){var U=H.item;return U.type.name==="Scatter"});P&&($=Ee(Ee({},$),P.props.points[q].tooltipPosition),L=P.props.points[q].tooltipPayload);var I={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:$};this.setState(I),this.renderCursor(N),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var j,O;this.accessibilityManager.setDetails({offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){c4([Ur(x.children,va)],[Ur(this.props.children,va)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Ur(this.props.children,va);if(x&&typeof x.props.shared=="boolean"){var E=x.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var E=this.container,j=E.getBoundingClientRect(),O=A0e(j),M={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},N=j.width/E.offsetWidth||1,q=this.inRange(M.chartX,M.chartY,N);if(!q)return null;var R=this.state,L=R.xAxisMap,F=R.yAxisMap,Y=this.getTooltipEventType(),V=B$(this.state,this.props.data,this.props.layout,q);if(Y!=="axis"&&L&&F){var $=tl(L).scale,P=tl(F).scale,I=$&&$.invert?$.invert(M.chartX):null,H=P&&P.invert?P.invert(M.chartY):null;return Ee(Ee({},M),{},{xValue:I,yValue:H},V)}return V?Ee(Ee({},M),V):null}},{key:"inRange",value:function(x,E){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,M=x/j,N=E/j;if(O==="horizontal"||O==="vertical"){var q=this.state.offset,R=M>=q.left&&M<=q.left+q.width&&N>=q.top&&N<=q.top+q.height;return R?{x:M,y:N}:null}var L=this.state,F=L.angleAxisMap,Y=L.radiusAxisMap;if(F&&Y){var V=tl(F);return rN({x:M,y:N},V)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,E=this.getTooltipEventType(),j=Ur(x,va),O={};j&&E==="axis"&&(j.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=i1(this.props,this.handleOuterEvent);return Ee(Ee({},M),O)}},{key:"addListener",value:function(){oS.on(sS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){oS.removeListener(sS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,E,j){for(var O=this.state.formattedGraphicalItems,M=0,N=O.length;M({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0,"--chart-cursor-fill":i?lt(i,e):void 0,"--chart-bar-label-color":r?lt(r,e):void 0}});function V9e(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function W9e(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const ll=De(e=>{const n=be("BarChart",U9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:c,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:j,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:N,tooltipProps:q,referenceLines:R,fillOpacity:L,barChartProps:F,type:Y,orientation:V,dir:$,valueFormatter:P,children:I,barProps:H,xAxisLabel:U,yAxisLabel:D,withBarValueLabel:W,valueLabelProps:G,withRightYAxis:z,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:le,mod:ye,getBarColor:ae,gridColor:ue,textColor:Se,attributes:ne,...Le}=n,ke=ui(),je=_!=="none"&&(C==="x"||C==="xy"),Ne=_!=="none"&&(C==="y"||C==="xy"),[ge,Ce]=A.useState(null),Pe=ge!==null,ce=Y==="stacked"||Y==="percent",qe=Y==="percent"?H9e:P,Ye=Ae=>{Ce(null),p==null||p(Ae)},{resolvedClassNames:We,resolvedStyles:Ze}=Wi({classNames:t,styles:a,props:n}),Qe=Y==="waterfall"?V9e(c,v):c,ie=Xe({name:"BarChart",classes:C0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:FW}),ve=d.map(Ae=>{const an=lt(Ae.color,ke),mn=Pe&&ge!==Ae.name,En=typeof H=="function"?H(Ae):H,vn=En==null?void 0:En.shape;return A.createElement(Vu,{...ie("bar"),key:Ae.name,name:Ae.name,dataKey:Ae.name,fill:an,stroke:an,isAnimationActive:!1,fillOpacity:mn?.1:L,strokeOpacity:mn?.2:0,stackId:ce?"stack":Ae.stackId||void 0,yAxisId:Ae.yAxisId||void 0,minPointSize:re,...En,shape:sn=>{const en=sn.payload,zn=en!=null&&en.color?lt(en.color,ke):typeof ae=="function"?lt(ae(en==null?void 0:en[Ae.name],Ae),ke):W9e(H,Ae)||an,Re={...sn,fill:zn};return typeof vn=="function"?vn(Re):Q.isValidElement(vn)?Q.cloneElement(vn,Re):typeof vn=="object"&&vn?g.jsx($m,{...Re,...vn}):g.jsx($m,{...Re})}},W&&g.jsx(fo,{position:V==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:sn=>qe==null?void 0:qe(sn),...typeof G=="function"?G(Ae):G}))}),Ke=R==null?void 0:R.map((Ae,an)=>{const mn=lt(Ae.color,ke);return g.jsx(Cp,{stroke:Ae.color?mn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ae.yAxisId||void 0,...Ae,label:{fill:Ae.color?mn:"currentColor",fontSize:12,position:Ae.labelPosition??"insideBottomLeft",...typeof Ae.label=="object"?Ae.label:{value:Ae.label}},...ie("referenceLine")},an)}),Je={axisLine:!1,...V==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Ne?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:j,tickFormatter:V==="vertical"?void 0:qe,...ie("axis")};return g.jsx(he,{...ie("root"),onMouseLeave:Ye,dir:$||"ltr",mod:[{orientation:V},ye],...Le,children:g.jsx(aA,{...ie("container"),children:g.jsxs(F9e,{data:Qe,stackOffset:Y==="percent"?"expand":void 0,layout:V,maxBarSize:le,margin:{bottom:U?30:void 0,left:D?10:void 0,right:D?5:void 0},...F,children:[f&&g.jsx(os,{verticalAlign:"top",content:Ae=>g.jsx(S0,{payload:Ae.payload,onHighlight:Ce,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ze,series:d,showColor:Y!=="waterfall",attributes:ne}),...h}),g.jsxs(Dl,{hide:!w,...V==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:je?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:V==="vertical"?qe:void 0,...ie("axis"),...x,children:[U&&g.jsx(ii,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:U}),x==null?void 0:x.children]}),g.jsxs(ko,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[D&&g.jsx(ii,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:D}),E==null?void 0:E.children]}),g.jsxs(ko,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!z,...Je,...ee,children:[X&&g.jsx(ii,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),E==null?void 0:E.children]}),g.jsx(nb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...N}),b&&g.jsx(va,{animationDuration:O,isAnimationActive:O!==0,position:V==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:Ae,payload:an,labelFormatter:mn})=>g.jsx($9,{label:mn&&an?mn(Ae,an):Ae,payload:an,type:Y==="waterfall"?"scatter":void 0,unit:j,classNames:We,styles:Ze,series:d,valueFormatter:P,attributes:ne}),...q}),ve,Ke,I]})})})});ll.displayName="@mantine/charts/BarChart";ll.classes=C0;ll.varsResolver=FW;const G9e={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},qW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0}}),ib=De(e=>{const n=be("LineChart",G9e,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:c,withLegend:f,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:j,tooltipAnimationDuration:O,strokeDasharray:M,gridProps:N,tooltipProps:q,referenceLines:R,withDots:L,dotProps:F,activeDotProps:Y,strokeWidth:V,lineChartProps:$,connectNulls:P,fillOpacity:I,curveType:H,orientation:U,dir:D,valueFormatter:W,children:G,lineProps:z,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:le,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:ue,withPointLabels:Se,attributes:ne,gridColor:Le,...ke}=n,je=ui(),Ne=_!=="none"&&(C==="x"||C==="xy"),ge=_!=="none"&&(C==="y"||C==="xy"),[Ce,Pe]=A.useState(null),ce=Ce!==null,qe=Ae=>{Pe(null),p==null||p(Ae)},{resolvedClassNames:Ye,resolvedStyles:We}=Wi({classNames:t,styles:a,props:n}),Ze=Xe({name:"LineChart",classes:C0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:qW}),Qe=`line-chart-gradient-${Vi()}`,ie=le==null?void 0:le.map(Ae=>g.jsx("stop",{offset:`${Ae.offset}%`,stopColor:lt(Ae.color,je)},Ae.color)),ve=d.map(Ae=>{const an=lt(Ae.color,je),mn=ce&&Ce!==Ae.name;return A.createElement(Ap,{...Ze("line"),key:Ae.name,name:Ae.name,dataKey:Ae.name,dot:L?{fillOpacity:mn?0:1,strokeOpacity:mn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...F}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":an,stroke:re==="gradient"?"white":an,...Y}:!1,fill:an,stroke:re==="gradient"?`url(#${Qe})`:an,strokeWidth:V,isAnimationActive:!1,fillOpacity:mn?0:I,strokeOpacity:mn?.5:I,connectNulls:P,type:Ae.curveType??H,strokeDasharray:Ae.strokeDasharray,yAxisId:Ae.yAxisId||void 0,label:Se?g.jsx(Ipe,{valueFormatter:W}):void 0,...typeof z=="function"?z(Ae):z})}),Ke=R==null?void 0:R.map((Ae,an)=>{const mn=lt(Ae.color,je);return g.jsx(Cp,{stroke:Ae.color?mn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Ae.yAxisId||void 0,...Ae,label:{fill:Ae.color?mn:"currentColor",fontSize:12,position:Ae.labelPosition??"insideBottomLeft",...typeof Ae.label=="object"?Ae.label:{value:Ae.label}},...Ze("referenceLine")},an)}),Je={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:ge?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:j,tickFormatter:U==="vertical"?void 0:W,...Ze("axis")};return g.jsx(he,{...Ze("root"),onMouseLeave:qe,dir:D||"ltr",...ke,children:g.jsx(aA,{...Ze("container"),children:g.jsxs(B9e,{data:c,layout:U,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...$,children:[re==="gradient"&&g.jsx("defs",{children:g.jsx("linearGradient",{id:Qe,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),f&&g.jsx(os,{verticalAlign:"top",content:Ae=>g.jsx(S0,{payload:Ae.payload,onHighlight:Pe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ye,styles:We,series:d,showColor:re!=="gradient",attributes:ne}),...h}),g.jsxs(Dl,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ne?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?W:void 0,...Ze("axis"),...x,children:[X&&g.jsx(ii,{position:"insideBottom",offset:-20,fontSize:12,...Ze("axisLabel"),children:X}),x==null?void 0:x.children]}),g.jsxs(ko,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[ee&&g.jsx(ii,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ee}),E==null?void 0:E.children]}),g.jsxs(ko,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Je,...ue,children:[ae&&g.jsx(ii,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ze("axisLabel"),children:ae}),E==null?void 0:E.children]}),g.jsx(nb,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ze("grid"),...N}),b&&g.jsx(va,{animationDuration:O,isAnimationActive:O!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:Ae,payload:an,labelFormatter:mn})=>g.jsx($9,{label:mn&&an?mn(Ae,an):Ae,payload:an,unit:j,classNames:Ye,styles:We,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:ne}),...q}),ve,Ke,G]})})})});ib.displayName="@mantine/charts/LineChart";ib.classes=C0;ib.varsResolver=qW;const H$="daily_report_prompt",uS="Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte.";function Y9e(e){try{return new Date(e+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return e}}function Lc({label:e,value:n,color:t,icon:i,sub:r}){return g.jsxs(Dt,{p:"sm",withBorder:!0,radius:"md",children:[g.jsxs(ze,{gap:6,mb:2,align:"center",children:[i,g.jsx(xe,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),g.jsx(xe,{fz:28,fw:700,c:t,children:n}),r&&g.jsx(xe,{size:"xs",c:"dimmed",children:r})]})}function fg({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return g.jsxs(La,{withBorder:!0,radius:"md",p:"sm",children:[g.jsx(xe,{fw:600,size:"sm",mb:6,children:e}),n.length===0?g.jsx(xe,{size:"xs",c:"dimmed",children:t}):g.jsx($n,{gap:4,children:n.map((r,a)=>g.jsxs(ze,{gap:6,wrap:"nowrap",justify:"space-between",children:[g.jsxs(ze,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&g.jsx(go,{size:22,radius:"xl",color:yl(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),g.jsx(xe,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),g.jsx(it,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function K9e({date:e,onJumpToCard:n}){const[t,i]=A.useState(null),[r,a]=A.useState(null),[o,l]=A.useState(null),[c,f]=A.useState(!1),[h,d]=A.useState(null),[p,v]=A.useState(!1),[b,w]=A.useState(""),[k,_]=A.useState(null),[C,x]=A.useState(null);A.useEffect(()=>{i(null),a(null),Kie(e).then(i).catch($=>a($.message)),l(null),d(null),Xie(e).then($=>l($.exists?$:null)).catch(()=>{})},[e]);const E=async()=>{f(!0),d(null);try{const $=await Zie(e);l({...$,exists:!0})}catch($){d($.message)}finally{f(!1)}},j=async()=>{try{const $=await Qie(H$);w($.value||uS)}catch{w(uS)}v(!0)},O=async()=>{await Jie(H$,b),v(!1)},M=()=>w(uS),N=A.useMemo(()=>t?t.hourly_moves.map(($,P)=>({hora:String(P).padStart(2,"0")+":00",movimientos:$})):[],[t]),q=A.useMemo(()=>{if(!t)return[];const $=new Set;for(const P of t.done_cards)P.requester&&$.add(P.requester);return Array.from($).sort()},[t]),R=A.useMemo(()=>{if(!t)return[];const $=new Map;for(const P of t.done_cards)P.assignee_id&&$.set(P.assignee_id,P.assignee_name||P.assignee_id);return Array.from($.entries()).map(([P,I])=>({value:P,label:I}))},[t]),L=A.useMemo(()=>t?t.done_cards.filter($=>!(k&&$.requester!==k||C&&$.assignee_id!==C)):[],[t,k,C]),F=()=>{if(!t)return;const $=window.open("","_blank");if(!$)return;const P=window.location.origin,I=(()=>{try{return new Date(t.date+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return t.date}})(),H=[];if(k&&H.push(`solicitante=${k}`),C){const G=R.find(z=>z.value===C);H.push(`asignado=${(G==null?void 0:G.label)||C}`)}const U=G=>G.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),D=L.map(G=>{const z=(G.tags||[]).map(U).join(", "),X=`${P}/?card=${G.id}`;return` + ${String(G.seq_num).padStart(5,"0")} + ${U(G.title)} + ${U(G.requester||"")} + ${U(G.assignee_name||"")} + ${U(z)} + ${Jt(G.lead_time_ms)} `}).join(""),W=` Reporte ${t.date} @@ -525,15 +540,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho a:hover { text-decoration: underline; } footer { margin-top: 20px; font-size: 8pt; color: #888; } -

Reporte diario · ${Y($)}

-
${Y(t.date)} · ${Y(t.tz)}${B.length?" · filtros: "+B.map(Y).join(", "):""}
+

Reporte diario · ${U(I)}

+
${U(t.date)} · ${U(t.tz)}${H.length?" · filtros: "+H.map(U).join(", "):""}
Hechas
${L.length}
-
Lead time avg
${Zt(t.lead_time.avg_ms)}
+
Lead time avg
${Jt(t.lead_time.avg_ms)}
Deadlines on-time
${t.deadlines.met}/${t.deadlines.met+t.deadlines.missed}
Reabiertas
${t.kpis.reopened}
-${o!=null&&o.summary?`

${Y(o.summary)}

`:""} +${o!=null&&o.summary?`

${U(o.summary)}

`:""} @@ -543,11 +558,11 @@ ${o!=null&&o.summary?`

Lead time

- ${R||''} + ${D||''}
#
Sin tareas que cumplan el filtro.
Sin tareas que cumplan el filtro.
-
Generado por kanban · ${Y(D)}
+
Generado por kanban · ${U(P)}
+ diff --git a/backend/handlers.go b/backend/handlers.go index 65f5928..5995716 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -622,7 +622,7 @@ func handlePurgeCard(db *DB, hub *EventHub) http.HandlerFunc { } } -func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken string, flags *FeatureFlags, hub *EventHub) []infra.Route { +func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken string, flags *FeatureFlags, hub *EventHub, dispatcher *Dispatcher) []infra.Route { return []infra.Route{ {Method: "GET", Path: "/api/flags", Handler: handleListFlags(flags)}, {Method: "GET", Path: "/api/version", Handler: handleVersion()}, @@ -670,6 +670,12 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken str {Method: "GET", Path: "/api/notifications/unread-count", Handler: handleUnreadCount(db)}, {Method: "POST", Path: "/api/notifications/{id}/read", Handler: handleMarkNotificationRead(db, hub)}, {Method: "POST", Path: "/api/notifications/read-all", Handler: handleMarkAllNotificationsRead(db, hub)}, + {Method: "GET", Path: "/api/modules", Handler: handleListModules(db)}, + {Method: "POST", Path: "/api/modules", Handler: handleCreateModule(db)}, + {Method: "PATCH", Path: "/api/modules/{id}", Handler: handleUpdateModule(db)}, + {Method: "DELETE", Path: "/api/modules/{id}", Handler: handleDeleteModule(db)}, + {Method: "GET", Path: "/api/modules/{id}/logs", Handler: handleModuleLogs(db)}, + {Method: "POST", Path: "/api/modules/{id}/test", Handler: handleTestModule(db, dispatcher)}, } } diff --git a/backend/main.go b/backend/main.go index 28831d3..4f8ce7b 100644 --- a/backend/main.go +++ b/backend/main.go @@ -69,7 +69,10 @@ func main() { logger := newChatLogger(filepath.Join(wd, "chat.log")) log.Printf("chat tool log: %s", logger.path) hub := NewEventHub() - mux := infra.HTTPRouter(apiRoutes(db, wd, logger, internalToken, &featureFlags, hub)) + dispatcher := NewDispatcher(db, hub) + dispatcher.Start() + defer dispatcher.Stop() + mux := infra.HTTPRouter(apiRoutes(db, wd, logger, internalToken, &featureFlags, hub, dispatcher)) feHandler := frontendHandler() if feHandler != nil { @@ -169,5 +172,28 @@ func frontendHandler() http.Handler { if len(entries) == 0 { return nil } - return infra.SPAHandler(sub, "index.html") + return cacheHeadersMiddleware(infra.SPAHandler(sub, "index.html")) +} + +// cacheHeadersMiddleware ensures the SPA shell is never cached while the +// hashed assets (which are content-addressed by Vite) are cached for a long +// time. Without this, browsers happily reuse an old index.html — pinned to a +// stale /assets/index-.js URL — and never pick up new releases. +// +// Policy: +// +// /assets/* → public, max-age=1y, immutable (filename changes per build) +// everything else → no-store, must-revalidate (forces revalidation on every +// navigation so the latest hash is always discovered) +func cacheHeadersMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.HasPrefix(r.URL.Path, "/assets/") { + w.Header().Set("Cache-Control", "public, max-age=31536000, immutable") + } else { + w.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate") + w.Header().Set("Pragma", "no-cache") + w.Header().Set("Expires", "0") + } + next.ServeHTTP(w, r) + }) } diff --git a/backend/migrations/015_modules.sql b/backend/migrations/015_modules.sql new file mode 100644 index 0000000..2baef59 --- /dev/null +++ b/backend/migrations/015_modules.sql @@ -0,0 +1,45 @@ +-- Outbound modules (integrations): kanban events → external systems. +-- +-- A module is a configured subscription. The dispatcher (modules.go) +-- subscribes to the EventHub and, for each event whose type matches the +-- module's event_filter, calls the kind-specific handler with the +-- decrypted config. +-- +-- Tokens / secrets are encrypted with AES-GCM at rest. The key is derived +-- from the KANBAN_MODULE_KEY environment variable (sha256 of the value). + +CREATE TABLE IF NOT EXISTS modules ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + kind TEXT NOT NULL, -- 'jira' | 'webhook' | … + enabled INTEGER NOT NULL DEFAULT 1, + event_filter TEXT NOT NULL, -- comma-separated event types + config_cipher BLOB NOT NULL, -- AES-GCM ciphertext of JSON + config_nonce BLOB NOT NULL, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL +); + +CREATE TABLE IF NOT EXISTS module_logs ( + id TEXT PRIMARY KEY, + module_id TEXT NOT NULL, + event_type TEXT NOT NULL, + card_id TEXT, + status INTEGER, -- HTTP status or 0 if pre-flight + duration_ms INTEGER, + error TEXT, + created_at TEXT NOT NULL +); + +CREATE INDEX IF NOT EXISTS idx_module_logs_module_created + ON module_logs(module_id, created_at DESC); + +-- jira_key: 1:1 link between a kanban card and its Jira issue. Empty +-- string when the card has not yet been synced to Jira. +ALTER TABLE cards ADD COLUMN jira_key TEXT NOT NULL DEFAULT ''; + +-- is_admin: gates /api/modules access and the Modulos menu item. +-- Bootstrap: egutierrez (the initial admin) is marked admin so the +-- feature is reachable on first deploy. Other users start as non-admin. +ALTER TABLE users ADD COLUMN is_admin INTEGER NOT NULL DEFAULT 0; +UPDATE users SET is_admin = 1 WHERE username = 'egutierrez'; diff --git a/backend/modules.go b/backend/modules.go new file mode 100644 index 0000000..3c5d124 --- /dev/null +++ b/backend/modules.go @@ -0,0 +1,725 @@ +package main + +import ( + "bytes" + "context" + "database/sql" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "log" + "net/http" + "strings" + "time" +) + +// ============================================================================= +// Module model +// ============================================================================= + +type Module struct { + ID string `json:"id"` + Name string `json:"name"` + Kind string `json:"kind"` + Enabled bool `json:"enabled"` + EventFilter []string `json:"event_filter"` + Config JSONValue `json:"config"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` +} + +// JSONValue is an arbitrary JSON object decoded into a generic map. We do not +// model per-kind config in Go types because the set of kinds grows over time +// and the dispatcher only inspects fields it knows. +type JSONValue map[string]interface{} + +type ModuleLog struct { + ID string `json:"id"` + ModuleID string `json:"module_id"` + EventType string `json:"event_type"` + CardID string `json:"card_id"` + Status int `json:"status"` + DurationMs int `json:"duration_ms"` + Error string `json:"error"` + CreatedAt string `json:"created_at"` +} + +// ============================================================================= +// DB helpers (modules + logs) +// ============================================================================= + +// listModulesEnabled returns all enabled modules with their config decrypted. +// Disabled modules are silently skipped — callers iterate the result without +// further filtering. +func (db *DB) listModulesEnabled() ([]Module, error) { + return db.listModulesWhere("WHERE enabled = 1") +} + +func (db *DB) listModulesAll() ([]Module, error) { + return db.listModulesWhere("") +} + +func (db *DB) listModulesWhere(filter string) ([]Module, error) { + q := `SELECT id, name, kind, enabled, event_filter, config_cipher, config_nonce, created_at, updated_at FROM modules ` + filter + ` ORDER BY created_at` + rows, err := db.conn.Query(q) + if err != nil { + return nil, err + } + defer rows.Close() + out := []Module{} + for rows.Next() { + var m Module + var enabled int + var filter, createdAt, updatedAt string + var cipherBlob, nonce []byte + if err := rows.Scan(&m.ID, &m.Name, &m.Kind, &enabled, &filter, &cipherBlob, &nonce, &createdAt, &updatedAt); err != nil { + return nil, err + } + m.Enabled = enabled == 1 + m.EventFilter = splitCSV(filter) + m.CreatedAt = createdAt + m.UpdatedAt = updatedAt + cfg, err := decryptConfig(cipherBlob, nonce) + if err != nil { + // Surface the decrypt failure so the operator notices but + // avoid dropping the module from the list entirely. + log.Printf("module %s: decrypt config: %v", m.ID, err) + m.Config = JSONValue{"_decrypt_error": err.Error()} + } else { + _ = json.Unmarshal(cfg, &m.Config) + } + out = append(out, m) + } + return out, rows.Err() +} + +func (db *DB) getModule(id string) (*Module, error) { + mods, err := db.listModulesWhere(`WHERE id = '` + escapeSQL(id) + `'`) + if err != nil || len(mods) == 0 { + if err == nil { + err = sql.ErrNoRows + } + return nil, err + } + return &mods[0], nil +} + +func escapeSQL(s string) string { + return strings.ReplaceAll(s, "'", "''") +} + +func (db *DB) saveModule(m *Module) error { + cfgJSON, err := json.Marshal(m.Config) + if err != nil { + return err + } + cipherBlob, nonce, err := encryptConfig(cfgJSON) + if err != nil { + return err + } + now := nowRFC3339() + if m.ID == "" { + m.ID = newID() + m.CreatedAt = now + m.UpdatedAt = now + _, err = db.conn.Exec( + `INSERT INTO modules (id, name, kind, enabled, event_filter, config_cipher, config_nonce, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`, + m.ID, m.Name, m.Kind, boolInt(m.Enabled), strings.Join(m.EventFilter, ","), + cipherBlob, nonce, m.CreatedAt, m.UpdatedAt, + ) + return err + } + m.UpdatedAt = now + _, err = db.conn.Exec( + `UPDATE modules SET name=?, kind=?, enabled=?, event_filter=?, config_cipher=?, config_nonce=?, updated_at=? WHERE id=?`, + m.Name, m.Kind, boolInt(m.Enabled), strings.Join(m.EventFilter, ","), + cipherBlob, nonce, m.UpdatedAt, m.ID, + ) + return err +} + +func (db *DB) deleteModule(id string) error { + _, err := db.conn.Exec(`DELETE FROM modules WHERE id=?`, id) + return err +} + +func (db *DB) appendModuleLog(l ModuleLog) error { + if l.ID == "" { + l.ID = newID() + } + if l.CreatedAt == "" { + l.CreatedAt = nowRFC3339() + } + _, err := db.conn.Exec( + `INSERT INTO module_logs (id, module_id, event_type, card_id, status, duration_ms, error, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`, + l.ID, l.ModuleID, l.EventType, l.CardID, l.Status, l.DurationMs, l.Error, l.CreatedAt, + ) + return err +} + +func (db *DB) listModuleLogs(moduleID string, limit int) ([]ModuleLog, error) { + if limit <= 0 { + limit = 100 + } + rows, err := db.conn.Query( + `SELECT id, module_id, event_type, card_id, status, duration_ms, error, created_at + FROM module_logs WHERE module_id = ? ORDER BY created_at DESC LIMIT ?`, + moduleID, limit, + ) + if err != nil { + return nil, err + } + defer rows.Close() + out := []ModuleLog{} + for rows.Next() { + var l ModuleLog + var cardID sql.NullString + if err := rows.Scan(&l.ID, &l.ModuleID, &l.EventType, &cardID, &l.Status, &l.DurationMs, &l.Error, &l.CreatedAt); err != nil { + return nil, err + } + if cardID.Valid { + l.CardID = cardID.String + } + out = append(out, l) + } + return out, rows.Err() +} + +// setCardJiraKey stores the Jira issue key for a card after a successful +// create call. We skip the regular UpdateCard path to avoid emitting a +// `card.updated` event (which would loop us back through the dispatcher). +func (db *DB) setCardJiraKey(cardID, jiraKey string) error { + _, err := db.conn.Exec(`UPDATE cards SET jira_key=? WHERE id=?`, jiraKey, cardID) + return err +} + +func (db *DB) getCardForJira(cardID string) (*cardForJira, error) { + var c cardForJira + var assignee, deadline, jiraKey sql.NullString + var tagsJSON string + err := db.conn.QueryRow( + `SELECT c.id, c.title, c.description, c.requester, c.column_id, c.assignee_id, + c.deadline, c.tags, c.jira_key, c.created_at, col.name + FROM cards c JOIN columns col ON col.id = c.column_id WHERE c.id = ?`, + cardID, + ).Scan(&c.ID, &c.Title, &c.Description, &c.Requester, &c.ColumnID, &assignee, + &deadline, &tagsJSON, &jiraKey, &c.CreatedAt, &c.ColumnName) + if err != nil { + return nil, err + } + if assignee.Valid { + c.AssigneeID = assignee.String + } + if deadline.Valid { + c.Deadline = deadline.String + } + if jiraKey.Valid { + c.JiraKey = jiraKey.String + } + _ = json.Unmarshal([]byte(tagsJSON), &c.Tags) + return &c, nil +} + +type cardForJira struct { + ID string + Title string + Description string + Requester string + ColumnID string + ColumnName string + AssigneeID string + Deadline string + Tags []string + JiraKey string + CreatedAt string +} + +func (c *cardForJira) hasTag(name string) bool { + name = strings.ToLower(name) + for _, t := range c.Tags { + if strings.ToLower(t) == name { + return true + } + } + return false +} + +func splitCSV(s string) []string { + if s == "" { + return nil + } + parts := strings.Split(s, ",") + out := make([]string, 0, len(parts)) + for _, p := range parts { + p = strings.TrimSpace(p) + if p != "" { + out = append(out, p) + } + } + return out +} + +func boolInt(b bool) int { + if b { + return 1 + } + return 0 +} + +// ============================================================================= +// Dispatcher +// ============================================================================= + +const ( + moduleRetries = 3 + moduleRetryDelay1 = 1 * time.Second + moduleRetryDelay2 = 5 * time.Second + moduleRetryDelay3 = 30 * time.Second + moduleHTTPTimeout = 15 * time.Second + moduleOptOutTag = "nojira" + moduleDispatchQueue = 256 +) + +// Dispatcher fans events from the EventHub into per-module handlers. +// +// Lifecycle: +// - Start() spawns a single subscriber goroutine on the hub plus a +// bounded worker pool. +// - Stop() cancels the context and waits for in-flight requests to drain. +// +// Handlers receive a decrypted Module copy + the Event; they own the HTTP +// call to the target system. The dispatcher logs every attempt. +type Dispatcher struct { + db *DB + hub *EventHub + handlers map[string]Handler + queue chan dispatchTask + ctx context.Context + cancel context.CancelFunc + enabled bool +} + +type dispatchTask struct { + module Module + event Event +} + +type Handler interface { + Handle(ctx context.Context, db *DB, m Module, ev Event) (status int, err error) + TestConnection(ctx context.Context, m Module) (status int, err error) +} + +func NewDispatcher(db *DB, hub *EventHub) *Dispatcher { + _, hasKey := moduleKey() + return &Dispatcher{ + db: db, + hub: hub, + handlers: map[string]Handler{"jira": &jiraHandler{}}, + queue: make(chan dispatchTask, moduleDispatchQueue), + enabled: hasKey, + } +} + +func (d *Dispatcher) Start() { + if !d.enabled { + log.Printf("module dispatcher disabled (%s not set)", moduleKeyEnv) + return + } + d.ctx, d.cancel = context.WithCancel(context.Background()) + // Subscribe under a synthetic user so the hub treats us as a normal + // recipient of broadcast events. Private user-targeted events are + // uninteresting for outbound sync. + go d.run() + for i := 0; i < 4; i++ { + go d.worker(i) + } + log.Printf("module dispatcher started") +} + +func (d *Dispatcher) Stop() { + if d.cancel != nil { + d.cancel() + } +} + +func (d *Dispatcher) run() { + ch := d.hub.SubscribeUser("__module_dispatcher__") + defer d.hub.UnsubscribeUser("__module_dispatcher__", ch) + for { + select { + case <-d.ctx.Done(): + return + case ev, ok := <-ch: + if !ok { + return + } + d.fanout(ev) + } + } +} + +func (d *Dispatcher) fanout(ev Event) { + mods, err := d.db.listModulesEnabled() + if err != nil { + log.Printf("dispatcher: listModulesEnabled: %v", err) + return + } + for _, m := range mods { + if !filterMatches(m.EventFilter, ev.Type) { + continue + } + if !cutoffOK(d.db, m, ev) { + continue + } + if ev.CardID != "" { + c, err := d.db.getCardForJira(ev.CardID) + if err == nil && c.hasTag(moduleOptOutTag) { + continue + } + } + select { + case d.queue <- dispatchTask{module: m, event: ev}: + default: + log.Printf("dispatcher: queue full, dropping event %s for module %s", ev.Type, m.ID) + } + } +} + +func (d *Dispatcher) worker(id int) { + for { + select { + case <-d.ctx.Done(): + return + case task, ok := <-d.queue: + if !ok { + return + } + d.dispatch(task) + } + } +} + +// dispatch runs the handler with up to moduleRetries attempts using a +// fixed back-off schedule (1s, 5s, 30s). Each attempt creates a log row; +// the final outcome is the one returned to the caller. +func (d *Dispatcher) dispatch(t dispatchTask) { + h, ok := d.handlers[t.module.Kind] + if !ok { + _ = d.db.appendModuleLog(ModuleLog{ + ModuleID: t.module.ID, EventType: t.event.Type, CardID: t.event.CardID, + Error: "unknown module kind: " + t.module.Kind, + }) + return + } + delays := []time.Duration{0, moduleRetryDelay1, moduleRetryDelay2, moduleRetryDelay3} + for attempt := 0; attempt < moduleRetries; attempt++ { + if delays[attempt] > 0 { + select { + case <-d.ctx.Done(): + return + case <-time.After(delays[attempt]): + } + } + ctx, cancel := context.WithTimeout(d.ctx, moduleHTTPTimeout) + start := time.Now() + status, err := h.Handle(ctx, d.db, t.module, t.event) + cancel() + ml := ModuleLog{ + ModuleID: t.module.ID, EventType: t.event.Type, CardID: t.event.CardID, + Status: status, DurationMs: int(time.Since(start).Milliseconds()), + } + if err != nil { + ml.Error = err.Error() + } + _ = d.db.appendModuleLog(ml) + if err == nil { + return + } + // 4xx client errors are not worth retrying. + if status >= 400 && status < 500 { + return + } + } +} + +// ============================================================================= +// Helpers +// ============================================================================= + +func filterMatches(filter []string, eventType string) bool { + for _, f := range filter { + if f == eventType || f == "*" { + return true + } + } + return false +} + +// cutoffOK applies the "module only sees events posterior to its creation" +// rule. Cards that were already linked to Jira (jira_key != "") are always +// eligible regardless of timestamps. +func cutoffOK(db *DB, m Module, ev Event) bool { + if ev.CardID == "" { + return true + } + c, err := db.getCardForJira(ev.CardID) + if err != nil { + return false + } + if c.JiraKey != "" { + return true + } + return c.CreatedAt >= m.CreatedAt +} + +// ============================================================================= +// Jira handler +// ============================================================================= + +type jiraHandler struct{} + +type jiraConfig struct { + BaseURL string `json:"base_url"` + Email string `json:"email"` + APIToken string `json:"api_token"` + ProjectKey string `json:"project_key"` + StatusMap map[string]string `json:"status_map"` +} + +func parseJiraConfig(m Module) (jiraConfig, error) { + b, err := json.Marshal(m.Config) + if err != nil { + return jiraConfig{}, err + } + var c jiraConfig + if err := json.Unmarshal(b, &c); err != nil { + return jiraConfig{}, err + } + c.BaseURL = strings.TrimRight(c.BaseURL, "/") + if c.BaseURL == "" { + return c, fmt.Errorf("base_url required") + } + return c, nil +} + +func (h *jiraHandler) jiraRequest(ctx context.Context, c jiraConfig, method, path string, body interface{}) (int, []byte, error) { + var rdr io.Reader + if body != nil { + b, err := json.Marshal(body) + if err != nil { + return 0, nil, err + } + rdr = bytes.NewReader(b) + } + req, err := http.NewRequestWithContext(ctx, method, c.BaseURL+path, rdr) + if err != nil { + return 0, nil, err + } + req.Header.Set("Accept", "application/json") + if body != nil { + req.Header.Set("Content-Type", "application/json") + } + if c.Email != "" && c.APIToken != "" { + basic := base64.StdEncoding.EncodeToString([]byte(c.Email + ":" + c.APIToken)) + req.Header.Set("Authorization", "Basic "+basic) + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return 0, nil, err + } + defer resp.Body.Close() + respBody, _ := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) + if resp.StatusCode >= 400 { + return resp.StatusCode, respBody, fmt.Errorf("jira %s %s: %d %s", method, path, resp.StatusCode, truncate(respBody, 240)) + } + return resp.StatusCode, respBody, nil +} + +func truncate(b []byte, n int) string { + if len(b) <= n { + return string(b) + } + return string(b[:n]) + "…" +} + +func (h *jiraHandler) TestConnection(ctx context.Context, m Module) (int, error) { + c, err := parseJiraConfig(m) + if err != nil { + return 0, err + } + status, _, err := h.jiraRequest(ctx, c, http.MethodGet, "/rest/api/3/myself", nil) + return status, err +} + +func (h *jiraHandler) Handle(ctx context.Context, db *DB, m Module, ev Event) (int, error) { + c, err := parseJiraConfig(m) + if err != nil { + return 0, err + } + switch ev.Type { + case "card.created": + return h.create(ctx, db, c, ev) + case "card.updated", "board.invalidated": + return h.update(ctx, db, c, ev) + case "card.moved": + return h.transition(ctx, db, c, ev) + case "message.created": + return h.comment(ctx, db, c, ev) + default: + // Silently ignore unhandled event types so the dispatcher does not + // retry on irrelevant traffic. + return 200, nil + } +} + +func (h *jiraHandler) create(ctx context.Context, db *DB, c jiraConfig, ev Event) (int, error) { + if ev.CardID == "" { + return 0, nil + } + card, err := db.getCardForJira(ev.CardID) + if err != nil { + return 0, err + } + if card.JiraKey != "" { + // Idempotent: card already linked to Jira; treat as update. + return h.update(ctx, db, c, ev) + } + if c.ProjectKey == "" { + return 0, fmt.Errorf("project_key required for create") + } + body := map[string]interface{}{ + "fields": map[string]interface{}{ + "project": map[string]string{"key": c.ProjectKey}, + "summary": card.Title, + "description": adfText(card.Description), + "issuetype": map[string]string{"name": "Task"}, + }, + } + status, resp, err := h.jiraRequest(ctx, c, http.MethodPost, "/rest/api/3/issue", body) + if err != nil { + return status, err + } + var parsed struct { + Key string `json:"key"` + } + _ = json.Unmarshal(resp, &parsed) + if parsed.Key != "" { + if err := db.setCardJiraKey(card.ID, parsed.Key); err != nil { + return status, fmt.Errorf("link jira key: %w", err) + } + } + return status, nil +} + +func (h *jiraHandler) update(ctx context.Context, db *DB, c jiraConfig, ev Event) (int, error) { + if ev.CardID == "" { + return 0, nil + } + card, err := db.getCardForJira(ev.CardID) + if err != nil { + return 0, err + } + if card.JiraKey == "" { + // Card not yet linked — bootstrap by creating it. + return h.create(ctx, db, c, ev) + } + body := map[string]interface{}{ + "fields": map[string]interface{}{ + "summary": card.Title, + "description": adfText(card.Description), + }, + } + status, _, err := h.jiraRequest(ctx, c, http.MethodPut, "/rest/api/3/issue/"+card.JiraKey, body) + return status, err +} + +// transition uses the configured status_map to translate the kanban column +// to a Jira transition name. We list available transitions, find the one +// whose target status name matches, and POST it. Kanban remains the source +// of truth even if Jira's current state differs. +func (h *jiraHandler) transition(ctx context.Context, db *DB, c jiraConfig, ev Event) (int, error) { + if ev.CardID == "" { + return 0, nil + } + card, err := db.getCardForJira(ev.CardID) + if err != nil { + return 0, err + } + if card.JiraKey == "" { + return h.create(ctx, db, c, ev) + } + target, ok := c.StatusMap[card.ColumnName] + if !ok || target == "" { + return 0, fmt.Errorf("no status_map entry for column %q", card.ColumnName) + } + status, body, err := h.jiraRequest(ctx, c, http.MethodGet, "/rest/api/3/issue/"+card.JiraKey+"/transitions", nil) + if err != nil { + return status, err + } + var available struct { + Transitions []struct { + ID string `json:"id"` + Name string `json:"name"` + To struct { + Name string `json:"name"` + } `json:"to"` + } `json:"transitions"` + } + if err := json.Unmarshal(body, &available); err != nil { + return status, fmt.Errorf("decode transitions: %w", err) + } + var tID string + for _, t := range available.Transitions { + if strings.EqualFold(t.To.Name, target) || strings.EqualFold(t.Name, target) { + tID = t.ID + break + } + } + if tID == "" { + return 0, fmt.Errorf("transition %q not available for %s", target, card.JiraKey) + } + req := map[string]interface{}{"transition": map[string]string{"id": tID}} + status, _, err = h.jiraRequest(ctx, c, http.MethodPost, "/rest/api/3/issue/"+card.JiraKey+"/transitions", req) + return status, err +} + +func (h *jiraHandler) comment(ctx context.Context, db *DB, c jiraConfig, ev Event) (int, error) { + if ev.CardID == "" { + return 0, nil + } + card, err := db.getCardForJira(ev.CardID) + if err != nil { + return 0, err + } + if card.JiraKey == "" { + // Cannot comment on a card not yet synced; skip. + return 0, nil + } + var payload struct { + Body string `json:"body"` + } + _ = json.Unmarshal(ev.Payload, &payload) + if payload.Body == "" { + return 0, nil + } + body := map[string]interface{}{"body": adfText(payload.Body)} + status, _, err := h.jiraRequest(ctx, c, http.MethodPost, "/rest/api/3/issue/"+card.JiraKey+"/comment", body) + return status, err +} + +// adfText wraps a plain string into the minimal Atlassian Document Format +// fragment Jira Cloud requires for description / comment bodies. +func adfText(s string) map[string]interface{} { + return map[string]interface{}{ + "type": "doc", + "version": 1, + "content": []map[string]interface{}{{ + "type": "paragraph", + "content": []map[string]interface{}{{ + "type": "text", + "text": s, + }}, + }}, + } +} diff --git a/backend/modules_crypto.go b/backend/modules_crypto.go new file mode 100644 index 0000000..3a41367 --- /dev/null +++ b/backend/modules_crypto.go @@ -0,0 +1,68 @@ +package main + +import ( + "crypto/aes" + "crypto/cipher" + "crypto/rand" + "crypto/sha256" + "errors" + "fmt" + "io" + "os" +) + +const moduleKeyEnv = "KANBAN_MODULE_KEY" + +// moduleKey derives a 32-byte AES key from the KANBAN_MODULE_KEY env var. +// Returns (key, true) when present; (zero, false) when missing — callers +// must treat that as "module dispatcher disabled". +func moduleKey() ([32]byte, bool) { + v := os.Getenv(moduleKeyEnv) + if v == "" { + return [32]byte{}, false + } + return sha256.Sum256([]byte(v)), true +} + +// encryptConfig encrypts a JSON config blob with AES-GCM. Returns the +// ciphertext and the 12-byte nonce. Caller persists both columns. +func encryptConfig(plain []byte) (cipherOut, nonce []byte, err error) { + key, ok := moduleKey() + if !ok { + return nil, nil, fmt.Errorf("%s not set; cannot encrypt module config", moduleKeyEnv) + } + block, err := aes.NewCipher(key[:]) + if err != nil { + return nil, nil, err + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, nil, err + } + nonce = make([]byte, gcm.NonceSize()) + if _, err := io.ReadFull(rand.Reader, nonce); err != nil { + return nil, nil, err + } + cipherOut = gcm.Seal(nil, nonce, plain, nil) + return cipherOut, nonce, nil +} + +// decryptConfig is the inverse of encryptConfig. +func decryptConfig(cipherIn, nonce []byte) ([]byte, error) { + key, ok := moduleKey() + if !ok { + return nil, fmt.Errorf("%s not set; cannot decrypt module config", moduleKeyEnv) + } + if len(nonce) == 0 { + return nil, errors.New("nonce empty") + } + block, err := aes.NewCipher(key[:]) + if err != nil { + return nil, err + } + gcm, err := cipher.NewGCM(block) + if err != nil { + return nil, err + } + return gcm.Open(nil, nonce, cipherIn, nil) +} diff --git a/backend/modules_handlers.go b/backend/modules_handlers.go new file mode 100644 index 0000000..8d5f6cc --- /dev/null +++ b/backend/modules_handlers.go @@ -0,0 +1,226 @@ +package main + +import ( + "context" + "encoding/json" + "net/http" + "strconv" + "strings" + "time" + + "fn-registry/functions/infra" +) + +// requireAdmin gates a handler so only users with users.is_admin = 1 can +// reach it. Non-admins get a 403. Anonymous callers get a 401. +func requireAdmin(db *DB, next http.HandlerFunc) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + uid, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + if uid == "" { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusUnauthorized, Code: "unauthorized", Message: "session required"}) + return + } + ok, err := db.IsAdmin(uid) + if err != nil { + serverError(w, err) + return + } + if !ok { + infra.HTTPErrorResponse(w, infra.HTTPError{Status: http.StatusForbidden, Code: "forbidden", Message: "admin required"}) + return + } + next(w, r) + } +} + +// publicModule strips secrets out of the config before responding. The +// API token is never returned to the client after it has been stored. +func publicModule(m Module) Module { + clone := m + if clone.Config != nil { + cleaned := JSONValue{} + for k, v := range clone.Config { + if strings.Contains(strings.ToLower(k), "token") || strings.Contains(strings.ToLower(k), "password") || strings.Contains(strings.ToLower(k), "secret") { + cleaned[k] = "***" + } else { + cleaned[k] = v + } + } + clone.Config = cleaned + } + return clone +} + +func handleListModules(db *DB) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + mods, err := db.listModulesAll() + if err != nil { + serverError(w, err) + return + } + out := make([]Module, 0, len(mods)) + for _, m := range mods { + out = append(out, publicModule(m)) + } + infra.HTTPJSONResponse(w, http.StatusOK, out) + }) +} + +type modulePayload struct { + Name string `json:"name"` + Kind string `json:"kind"` + Enabled bool `json:"enabled"` + EventFilter []string `json:"event_filter"` + Config JSONValue `json:"config"` +} + +func handleCreateModule(db *DB) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + var body modulePayload + if err := infra.HTTPParseBody(r, &body, maxBodyBytes); err != nil { + badRequest(w, err.Error()) + return + } + if body.Name == "" || body.Kind == "" { + badRequest(w, "name and kind required") + return + } + m := &Module{ + Name: body.Name, Kind: body.Kind, Enabled: body.Enabled, + EventFilter: body.EventFilter, Config: body.Config, + } + if err := db.saveModule(m); err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusCreated, publicModule(*m)) + }) +} + +func handleUpdateModule(db *DB) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + existing, err := db.getModule(id) + if err != nil { + notFound(w, "module not found") + return + } + // Partial body: preserve fields the client did not include. We rely + // on a generic map to detect omitted vs explicit-null because PATCH + // callers do not always send the full record. + var raw map[string]json.RawMessage + if err := infra.HTTPParseBody(r, &raw, maxBodyBytes); err != nil { + badRequest(w, err.Error()) + return + } + decode := func(key string, into interface{}) { + if v, ok := raw[key]; ok { + _ = json.Unmarshal(v, into) + } + } + decode("name", &existing.Name) + decode("kind", &existing.Kind) + decode("enabled", &existing.Enabled) + if v, ok := raw["event_filter"]; ok { + _ = json.Unmarshal(v, &existing.EventFilter) + } + if v, ok := raw["config"]; ok { + var cfg JSONValue + _ = json.Unmarshal(v, &cfg) + // Re-inject masked fields the UI left as "***" so a partial + // edit does not nuke stored secrets. + merged := JSONValue{} + for k, val := range existing.Config { + merged[k] = val + } + for k, val := range cfg { + if s, isStr := val.(string); isStr && s == "***" { + continue + } + merged[k] = val + } + existing.Config = merged + } + if err := db.saveModule(existing); err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, publicModule(*existing)) + }) +} + +func handleDeleteModule(db *DB) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + if err := db.deleteModule(id); err != nil { + serverError(w, err) + return + } + w.WriteHeader(http.StatusNoContent) + }) +} + +func handleModuleLogs(db *DB) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + limit := 100 + if v := r.URL.Query().Get("limit"); v != "" { + if n, err := strconv.Atoi(v); err == nil && n > 0 && n <= 1000 { + limit = n + } + } + out, err := db.listModuleLogs(id, limit) + if err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, out) + }) +} + +// handleTestModule executes the kind-specific test_connection probe with +// the *current stored config* (or with an incoming config payload, for +// pre-save validation). Returns {ok, status, error} regardless of outcome +// so the UI can show a useful message. +func handleTestModule(db *DB, dispatcher *Dispatcher) http.HandlerFunc { + return requireAdmin(db, func(w http.ResponseWriter, r *http.Request) { + id := r.PathValue("id") + var m *Module + if id == "draft" { + // Pre-save test path: caller supplies a full module payload. + var body modulePayload + if err := infra.HTTPParseBody(r, &body, maxBodyBytes); err != nil { + badRequest(w, err.Error()) + return + } + m = &Module{Kind: body.Kind, Config: body.Config} + } else { + got, err := db.getModule(id) + if err != nil { + notFound(w, "module not found") + return + } + m = got + } + h, ok := dispatcher.handlers[m.Kind] + if !ok { + infra.HTTPJSONResponse(w, http.StatusOK, map[string]interface{}{ + "ok": false, "status": 0, "error": "unknown kind: " + m.Kind, + }) + return + } + ctx, cancel := context.WithTimeout(r.Context(), moduleHTTPTimeout) + defer cancel() + start := time.Now() + status, err := h.TestConnection(ctx, *m) + resp := map[string]interface{}{ + "ok": err == nil, + "status": status, + "duration_ms": int(time.Since(start).Milliseconds()), + } + if err != nil { + resp["error"] = err.Error() + } + infra.HTTPJSONResponse(w, http.StatusOK, resp) + }) +} diff --git a/backend/modules_test.go b/backend/modules_test.go new file mode 100644 index 0000000..3ac8d24 --- /dev/null +++ b/backend/modules_test.go @@ -0,0 +1,227 @@ +package main + +import ( + "context" + "encoding/json" + "io" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + "time" +) + +// withModuleKey sets KANBAN_MODULE_KEY for the duration of a test and +// restores the previous value afterwards. +func withModuleKey(t *testing.T, value string) { + t.Helper() + prev := os.Getenv(moduleKeyEnv) + t.Setenv(moduleKeyEnv, value) + t.Cleanup(func() { _ = os.Setenv(moduleKeyEnv, prev) }) +} + +func TestCryptoRoundTrip(t *testing.T) { + withModuleKey(t, "test-passphrase") + plain := []byte(`{"hello":"world"}`) + cipherBlob, nonce, err := encryptConfig(plain) + if err != nil { + t.Fatalf("encrypt: %v", err) + } + got, err := decryptConfig(cipherBlob, nonce) + if err != nil { + t.Fatalf("decrypt: %v", err) + } + if string(got) != string(plain) { + t.Fatalf("roundtrip mismatch: got %q want %q", got, plain) + } +} + +func TestCryptoMissingKey(t *testing.T) { + t.Setenv(moduleKeyEnv, "") + if _, _, err := encryptConfig([]byte("x")); err == nil { + t.Fatal("expected error when KANBAN_MODULE_KEY unset") + } +} + +func TestSaveAndLoadModule(t *testing.T) { + withModuleKey(t, "test-passphrase") + db := setupTestDB(t) + m := &Module{ + Name: "jira-test", Kind: "jira", Enabled: true, + EventFilter: []string{"card.created", "card.moved"}, + Config: JSONValue{ + "base_url": "https://example.atlassian.net", + "email": "x@y.z", + "api_token": "secret-123", + }, + } + if err := db.saveModule(m); err != nil { + t.Fatalf("save: %v", err) + } + if m.ID == "" { + t.Fatal("ID not assigned on insert") + } + got, err := db.getModule(m.ID) + if err != nil { + t.Fatalf("get: %v", err) + } + if got.Config["api_token"] != "secret-123" { + t.Fatalf("token roundtrip failed: %v", got.Config["api_token"]) + } +} + +func TestFilterMatches(t *testing.T) { + if !filterMatches([]string{"card.created"}, "card.created") { + t.Fatal("exact match") + } + if !filterMatches([]string{"*"}, "anything") { + t.Fatal("wildcard") + } + if filterMatches([]string{"card.created"}, "card.moved") { + t.Fatal("non-match should be false") + } +} + +func TestCardOptOutTag(t *testing.T) { + c := cardForJira{Tags: []string{"foo", "NoJira", "bar"}} + if !c.hasTag("nojira") { + t.Fatal("nojira (case-insensitive) not detected") + } + if c.hasTag("missing") { + t.Fatal("missing tag returned true") + } +} + +func TestJiraHandler_TransitionMappingMissing(t *testing.T) { + withModuleKey(t, "k") + db := setupTestDB(t) + col, _ := db.CreateColumn("Backlog") + card, _ := db.CreateCard(col.ID, "req", "t", "d", "") + // Link the card so the create-fallback path is skipped. + _ = db.setCardJiraKey(card.ID, "KAN-1") + h := &jiraHandler{} + _, err := h.transition(context.Background(), db, jiraConfig{BaseURL: "http://x"}, Event{Type: "card.moved", CardID: card.ID}) + if err == nil || !strings.Contains(err.Error(), "status_map") { + t.Fatalf("expected status_map error, got %v", err) + } +} + +func TestJiraHandler_TestConnectionHitsMyself(t *testing.T) { + var path string + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + path = r.URL.Path + w.WriteHeader(http.StatusOK) + _, _ = io.WriteString(w, `{"accountId":"abc"}`) + })) + defer srv.Close() + h := &jiraHandler{} + m := Module{Kind: "jira", Config: JSONValue{ + "base_url": srv.URL, + "email": "x@y.z", + "api_token": "tok", + }} + status, err := h.TestConnection(context.Background(), m) + if err != nil { + t.Fatalf("TestConnection: %v", err) + } + if status != 200 { + t.Fatalf("status = %d, want 200", status) + } + if path != "/rest/api/3/myself" { + t.Fatalf("path = %q, want /rest/api/3/myself", path) + } +} + +func TestJiraHandler_CreateLinksCardKey(t *testing.T) { + withModuleKey(t, "test-passphrase") + db := setupTestDB(t) + user, _ := db.CreateUser("alice", "passw", "Alice") + col, _ := db.CreateColumn("Todo") + card, _ := db.CreateCard(col.ID, "req", "Buy bread", "desc", user.ID) + + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodPost && r.URL.Path == "/rest/api/3/issue" { + b, _ := io.ReadAll(r.Body) + var p struct { + Fields struct { + Summary string `json:"summary"` + } `json:"fields"` + } + _ = json.Unmarshal(b, &p) + if p.Fields.Summary != "Buy bread" { + t.Errorf("summary = %q", p.Fields.Summary) + } + w.WriteHeader(http.StatusCreated) + _, _ = io.WriteString(w, `{"id":"10000","key":"KAN-1"}`) + return + } + w.WriteHeader(http.StatusNotFound) + })) + defer srv.Close() + + h := &jiraHandler{} + mod := Module{Kind: "jira", Config: JSONValue{ + "base_url": srv.URL, + "email": "x@y.z", + "api_token": "tok", + "project_key": "KAN", + "status_map": map[string]interface{}{"Todo": "To Do"}, + }} + status, err := h.Handle(context.Background(), db, mod, Event{Type: "card.created", CardID: card.ID}) + if err != nil { + t.Fatalf("Handle: %v", err) + } + if status != http.StatusCreated { + t.Fatalf("status = %d, want 201", status) + } + again, err := db.getCardForJira(card.ID) + if err != nil { + t.Fatalf("get card: %v", err) + } + if again.JiraKey != "KAN-1" { + t.Fatalf("jira_key = %q, want KAN-1", again.JiraKey) + } +} + +func TestDispatcher_Cutoff(t *testing.T) { + withModuleKey(t, "k") + db := setupTestDB(t) + col, _ := db.CreateColumn("Todo") + // Create card BEFORE the module so cutoffOK rejects it. + card, _ := db.CreateCard(col.ID, "req", "t", "d", "") + time.Sleep(20 * time.Millisecond) + mod := Module{ID: "m", CreatedAt: nowRFC3339()} + if cutoffOK(db, mod, Event{CardID: card.ID}) { + t.Fatal("card pre-dating module should be filtered out") + } + // Once linked, cutoff should allow it. + _ = db.setCardJiraKey(card.ID, "KAN-9") + if !cutoffOK(db, mod, Event{CardID: card.ID}) { + t.Fatal("linked card must pass cutoff even if older") + } +} + +func TestIsAdmin(t *testing.T) { + db := setupTestDB(t) + u, _ := db.CreateUser("egutierrez", "passw", "Egu") + // Migration 015 marks egutierrez admin via UPDATE WHERE username, but + // that only takes effect when the row already exists. In production + // the migration runs against an existing user list; in tests we create + // users after migration, so simulate the same outcome explicitly. + if _, err := db.conn.Exec(`UPDATE users SET is_admin = 1 WHERE username = ?`, "egutierrez"); err != nil { + t.Fatalf("seed admin: %v", err) + } + ok, err := db.IsAdmin(u.ID) + if err != nil { + t.Fatalf("IsAdmin: %v", err) + } + if !ok { + t.Fatal("egutierrez must be admin after seed") + } + other, _ := db.CreateUser("alice", "passw", "Alice") + ok, _ = db.IsAdmin(other.ID) + if ok { + t.Fatal("alice must not be admin by default") + } +} diff --git a/backend/users.go b/backend/users.go index b6b49ce..4cf9247 100644 --- a/backend/users.go +++ b/backend/users.go @@ -14,6 +14,7 @@ type User struct { Username string `json:"username"` DisplayName string `json:"display_name"` Color string `json:"color"` + IsAdmin bool `json:"is_admin"` CreatedAt string `json:"created_at"` } @@ -51,36 +52,52 @@ func (db *DB) CreateUser(username, password, displayName string) (*User, error) func (db *DB) GetUserByID(id string) (*User, error) { var u User + var isAdmin int err := db.conn.QueryRow( - `SELECT id, username, display_name, color, created_at FROM users WHERE id=?`, id, - ).Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &u.CreatedAt) + `SELECT id, username, display_name, color, is_admin, created_at FROM users WHERE id=?`, id, + ).Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &isAdmin, &u.CreatedAt) if errors.Is(err, sql.ErrNoRows) { return nil, errUserNotFound } if err != nil { return nil, err } + u.IsAdmin = isAdmin == 1 return &u, nil } +func (db *DB) IsAdmin(userID string) (bool, error) { + if userID == "" { + return false, nil + } + var n int + err := db.conn.QueryRow(`SELECT COALESCE(is_admin, 0) FROM users WHERE id=?`, userID).Scan(&n) + if errors.Is(err, sql.ErrNoRows) { + return false, nil + } + return n == 1, err +} + func (db *DB) GetUserByUsername(username string) (*User, string, error) { username = strings.TrimSpace(strings.ToLower(username)) var u User var hash string + var isAdmin int err := db.conn.QueryRow( - `SELECT id, username, display_name, color, created_at, password_hash FROM users WHERE username=?`, username, - ).Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &u.CreatedAt, &hash) + `SELECT id, username, display_name, color, is_admin, created_at, password_hash FROM users WHERE username=?`, username, + ).Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &isAdmin, &u.CreatedAt, &hash) if errors.Is(err, sql.ErrNoRows) { return nil, "", errUserNotFound } if err != nil { return nil, "", err } + u.IsAdmin = isAdmin == 1 return &u, hash, nil } func (db *DB) ListUsers() ([]User, error) { - rows, err := db.conn.Query(`SELECT id, username, display_name, color, created_at FROM users ORDER BY username`) + rows, err := db.conn.Query(`SELECT id, username, display_name, color, is_admin, created_at FROM users ORDER BY username`) if err != nil { return nil, err } @@ -88,9 +105,11 @@ func (db *DB) ListUsers() ([]User, error) { out := []User{} for rows.Next() { var u User - if err := rows.Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &u.CreatedAt); err != nil { + var isAdmin int + if err := rows.Scan(&u.ID, &u.Username, &u.DisplayName, &u.Color, &isAdmin, &u.CreatedAt); err != nil { return nil, err } + u.IsAdmin = isAdmin == 1 out = append(out, u) } return out, rows.Err() diff --git a/control.sh b/control.sh new file mode 100755 index 0000000..fb0fe0d --- /dev/null +++ b/control.sh @@ -0,0 +1,248 @@ +#!/usr/bin/env bash +# Kanban control TUI — gestiona backend (WSL) + frontend Vite (Windows) desde WSL. +# Lanzamientos fire-and-forget; status panel auto-refresca cada 2s. +# Lanzar: ./control.sh +set -u + +BACKEND_PORT=8095 +FRONTEND_PORT=5180 +APP_DIR="/home/egutierrez/fn_registry/apps/kanban" +BACKEND_LOG="/tmp/kanban.log" +BUILD_LOG="/tmp/kanban_build.log" +MSG_FILE="/tmp/kanban_control.msg" +WIN_FRONT_DIR='C:\Users\egutierrez\fn_apps\kanban\frontend' + +RED=$'\033[31m'; GRN=$'\033[32m'; YLW=$'\033[33m'; CYN=$'\033[36m'; BLD=$'\033[1m'; RST=$'\033[0m' + +msg() { printf '%s\n' "$*" > "$MSG_FILE"; } + +wsl_pid_on_port() { + local port=$1 + ss -ltnp 2>/dev/null | awk -v p=":$port\$" '$4 ~ p {print $0}' \ + | grep -oP 'pid=\K[0-9]+' | head -1 +} + +win_pid_on_port() { + local port=$1 + netstat.exe -ano 2>/dev/null | tr -d '\r' \ + | awk -v p=":$port\$" '$2 ~ p && $4 == "LISTENING" {print $5; exit}' +} + +backend_building() { + [[ -f /tmp/kanban_build.pid ]] && kill -0 "$(cat /tmp/kanban_build.pid 2>/dev/null)" 2>/dev/null +} + +# Build + launch en background — retorna inmediatamente +start_backend() { + if [[ -n $(wsl_pid_on_port "$BACKEND_PORT") ]]; then + msg "${YLW}backend ya corriendo${RST}"; return 0 + fi + if backend_building; then + msg "${YLW}backend ya esta compilando, espera${RST}"; return 0 + fi + local version + version=$(awk -F': ' '/^version:/ {print $2; exit}' "$APP_DIR/app.md" 2>/dev/null || echo dev) + msg "${CYN}lanzando backend en background (version=$version)...${RST}" + ( + cd "$APP_DIR/backend" || exit 1 + # Rebuild si: binario no existe, .go/.sql mas nuevos, app.md mas nuevo (bump de version) + if [[ ! -x kanban ]] \ + || [[ -n $(find . -maxdepth 3 \( -name '*.go' -o -name '*.sql' \) -newer kanban 2>/dev/null) ]] \ + || [[ "$APP_DIR/app.md" -nt kanban ]]; then + CGO_ENABLED=1 go build -tags fts5 \ + -ldflags="-X main.Version=$version" \ + -o kanban . > "$BUILD_LOG" 2>&1 || { + printf 'build failed — ver %s\n' "$BUILD_LOG" > "$MSG_FILE" + exit 1 + } + fi + cd "$APP_DIR" || exit 1 + KANBAN_CLAUDE_BIN=/home/egutierrez/.local/bin/claude \ + setsid nohup ./backend/kanban --port "$BACKEND_PORT" --db ./operations.db \ + > "$BACKEND_LOG" 2>&1 < /dev/null & + disown + ) & + echo $! > /tmp/kanban_build.pid + disown +} + +stop_backend() { + local pid + pid=$(wsl_pid_on_port "$BACKEND_PORT") + if [[ -z $pid ]]; then + msg "${YLW}backend ya parado${RST}"; return 0 + fi + kill "$pid" 2>/dev/null + ( sleep 1; kill -0 "$pid" 2>/dev/null && kill -9 "$pid" 2>/dev/null ) & + disown + msg "${GRN}backend stopped (pid $pid)${RST}" +} + +wsl_ip() { hostname -I | awk '{print $1}'; } + +# WSL frontend → Windows frontend (excluye node_modules, dist, .vite) +sync_frontend() { + local src="$APP_DIR/frontend/" + local dst="/mnt/c/Users/egutierrez/fn_apps/kanban/frontend/" + if [[ ! -d $dst ]]; then + msg "${RED}no existe $dst${RST}"; return 1 + fi + rsync -a --delete \ + --exclude node_modules --exclude dist --exclude .vite \ + --exclude .cache --exclude tsconfig.tsbuildinfo \ + "$src" "$dst" 2>&1 | tail -3 + # pnpm install si package.json cambio + if ! cmp -s "$src/package.json" "$dst/package.json" 2>/dev/null \ + || [[ ! -d "$dst/node_modules" ]]; then + msg "${CYN}deps cambiaron, lanza pnpm install en Windows...${RST}" + cmd.exe /c start "" cmd /c "cd /d $WIN_FRONT_DIR && pnpm install" >/dev/null 2>&1 & + disown + fi +} + +# Lanza ventana cmd Windows con pnpm dev — no bloquea +# Inyecta VITE_API_TARGET con IP WSL real porque localhost forwarding Win→WSL no es fiable +start_vite() { + if [[ -n $(win_pid_on_port "$FRONTEND_PORT") ]]; then + msg "${YLW}vite ya corriendo${RST}"; return 0 + fi + sync_frontend + local ip target + ip=$(wsl_ip) + target="http://${ip}:${BACKEND_PORT}" + cmd.exe /c start "" cmd /c "cd /d $WIN_FRONT_DIR && set VITE_API_TARGET=$target && pnpm dev --port $FRONTEND_PORT --strictPort --host" >/dev/null 2>&1 & + disown + msg "${CYN}vite lanzado, proxy → $target${RST}" +} + +stop_vite() { + local pid + pid=$(win_pid_on_port "$FRONTEND_PORT") + if [[ -z $pid ]]; then + msg "${YLW}vite ya parado${RST}"; return 0 + fi + taskkill.exe /F /T /PID "$pid" >/dev/null 2>&1 & + disown + msg "${GRN}taskkill enviado a vite pid $pid${RST}" +} + +kill_stale() { + local found=0 out="" + for pid in $(pgrep -f "backend/kanban --port" 2>/dev/null); do + local cmdl + cmdl=$(tr '\0' ' ' < /proc/$pid/cmdline 2>/dev/null) + if ! grep -q -- "--port $BACKEND_PORT" <<<"$cmdl"; then + kill -9 "$pid" 2>/dev/null + out+="killed wsl pid $pid ($cmdl); " + found=1 + fi + done + [[ $found -eq 0 ]] && msg "${GRN}sin huerfanos WSL${RST}" || msg "${GRN}${out}${RST}" +} + +_prev_frame="" +build_frame() { + local bpid vpid hc others + bpid=$(wsl_pid_on_port "$BACKEND_PORT") + vpid=$(win_pid_on_port "$FRONTEND_PORT") + local out="" + out+=$(printf '%s=== Kanban control ===%s' "$BLD" "$RST")$'\n\n' + if [[ -n $bpid ]]; then + local rv av + rv=$(curl -s -m 1 "http://127.0.0.1:$BACKEND_PORT/api/version" | grep -oP '"version":"\K[^"]+' || echo "?") + av=$(awk -F': ' '/^version:/ {print $2; exit}' "$APP_DIR/app.md" 2>/dev/null || echo "?") + if [[ "$rv" == "$av" ]]; then + hc="${GRN}v$rv${RST}" + else + hc="${YLW}running=v$rv app.md=v$av (rebuild)${RST}" + fi + out+=$(printf ' backend (WSL :%s) %sUP%s pid %s %s' \ + "$BACKEND_PORT" "$GRN" "$RST" "$bpid" "$hc")$'\n' + elif backend_building; then + out+=$(printf ' backend (WSL :%s) %sBUILDING/STARTING%s tail %s' \ + "$BACKEND_PORT" "$YLW" "$RST" "$BUILD_LOG")$'\n' + else + out+=$(printf ' backend (WSL :%s) %sDOWN%s' "$BACKEND_PORT" "$RED" "$RST")$'\n' + fi + # frontend version + drift WSL↔Win + local fv drift + fv=$(grep -oP '"version":\s*"\K[^"]+' "$APP_DIR/frontend/package.json" 2>/dev/null || echo "?") + drift=$(diff -rq "$APP_DIR/frontend/src" "/mnt/c/Users/egutierrez/fn_apps/kanban/frontend/src" 2>/dev/null \ + | grep -c -E "^(Files|Only)" || true) + local dlbl + if [[ ${drift:-0} -eq 0 ]]; then + dlbl="${GRN}sync${RST}" + else + dlbl="${YLW}drift=$drift (sync al start)${RST}" + fi + if [[ -n $vpid ]]; then + out+=$(printf ' vite (WIN :%s) %sUP%s pid %s v%s %s' "$FRONTEND_PORT" "$GRN" "$RST" "$vpid" "$fv" "$dlbl")$'\n' + else + out+=$(printf ' vite (WIN :%s) %sDOWN%s v%s %s' "$FRONTEND_PORT" "$RED" "$RST" "$fv" "$dlbl")$'\n' + fi + others=$(pgrep -af "backend/kanban --port" 2>/dev/null | grep -v -- "--port $BACKEND_PORT" || true) + if [[ -n $others ]]; then + out+=$(printf ' %sOTROS kanban backends WSL:%s' "$YLW" "$RST")$'\n' + out+=$(echo "$others" | sed 's/^/ /')$'\n' + fi + out+=$'\n' + out+=$(printf '%sUltimo evento:%s %s' "$CYN" "$RST" "$(tail -1 "$MSG_FILE" 2>/dev/null || echo '-')")$'\n\n' + out+="${BLD}Acciones${RST} (auto-refresh 2s, tecla suelta):"$'\n' + out+=" 1) Start backend 5) Start TODO"$'\n' + out+=" 2) Stop backend 6) Stop TODO"$'\n' + out+=" 3) Start vite 7) Mata kanban huerfanos"$'\n' + out+=" 4) Stop vite 8) Tail backend log"$'\n' + out+=" 9) Refrescar 0) Salir"$'\n' + out+="> " + printf '%s' "$out" +} + +draw_status() { + local frame + frame=$(build_frame) + if [[ $frame == "$_prev_frame" ]]; then + return 0 + fi + _prev_frame=$frame + # cursor home + frame + erase-to-end-of-display (limpia lineas residuales) + printf '\033[H%s\033[J' "$frame" +} + +tail_log() { + clear + printf '%stail -f %s (Ctrl-C vuelve al menu)%s\n' "$CYN" "$BACKEND_LOG" "$RST" + trap 'trap - INT; return 0' INT + tail -f "$BACKEND_LOG" 2>/dev/null + trap - INT +} + +menu() { + : > "$MSG_FILE" + # limpia pantalla una sola vez; redraw posterior usa cursor-home + printf '\033[2J\033[H' + trap 'printf "\033[?25h\n"; exit 0' EXIT INT TERM + printf '\033[?25l' # oculta cursor mientras dibujamos + while true; do + draw_status + # read con timeout 2s — refresco automatico si no hay tecla + local choice="" + if read -rsn1 -t 2 choice; then + case "$choice" in + 1) start_backend ;; + 2) stop_backend ;; + 3) start_vite ;; + 4) stop_vite ;; + 5) start_backend; start_vite ;; + 6) stop_vite; stop_backend ;; + 7) kill_stale ;; + 8) printf '\033[?25h'; tail_log; printf '\033[?25l'; _prev_frame=""; printf '\033[2J\033[H' ;; + 9) : ;; + 0|q|Q) printf '\033[?25h'; clear; exit 0 ;; + $'\n'|"") : ;; + *) msg "${RED}opcion invalida: $choice${RST}" ;; + esac + fi + done +} + +menu diff --git a/e2e/smoke_live.sh b/e2e/smoke_live.sh index 228ce74..65c5770 100755 --- a/e2e/smoke_live.sh +++ b/e2e/smoke_live.sh @@ -17,7 +17,7 @@ set -uo pipefail BACKEND="${BACKEND:-http://127.0.0.1:8095}" PROXY="${PROXY:-http://127.0.0.1:5180}" -EXPECTED_VERSION="${EXPECTED_VERSION:-0.2.0}" +EXPECTED_VERSION="${EXPECTED_VERSION:-0.3.0}" fail() { echo "FAIL: $*" >&2; exit 1; } ok() { echo "OK $*"; } @@ -72,5 +72,20 @@ code=$(curl -sS -o /dev/null -w '%{http_code}' -m 5 \ [[ "$code" != "404" ]] || ok "card chat ws path resolved ($code)" ok "card chat WS route present (status $code)" +# 7. /api/modules — admin gated (401 unauthenticated). +code=$(curl -sS -o /dev/null -w '%{http_code}' -m 5 "$BACKEND/api/modules") +[[ "$code" == "401" ]] || fail "/api/modules returned $code, want 401" +ok "modules CRUD gated 401" + +# 8. /api/modules/__nope__/test — exists (401 anonymous). +code=$(curl -sS -o /dev/null -w '%{http_code}' -m 5 -X POST "$BACKEND/api/modules/__nope__/test") +[[ "$code" == "401" ]] || fail "module test returned $code, want 401" +ok "modules test endpoint present" + +# 9. bundle ships modules UI. +for needle in "/modules" "/modules/__draft__/test" "ModulesModal" "is_admin" "jira"; do + grep -q "$needle" "$js_tmp" && ok "bundle has '$needle'" || true +done + echo -echo "PASS — kanban $EXPECTED_VERSION serving notifications/streaming UI" +echo "PASS — kanban $EXPECTED_VERSION serving notifications + streaming + modules UI" diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 983e50c..15630ee 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -55,6 +55,7 @@ import { IconChevronRight, IconLayoutKanban, IconLogout, + IconPlug, IconMenu2, IconMessageChatbot, IconMoodSmile, @@ -82,6 +83,7 @@ import { ColorPickerGrid, CustomColorModal } from "./components/ColorPickerGrid" import { AVATAR_COLORS } from "./components/colors"; import { colorBg, colorBorder } from "./components/colors"; import { NotificationsBell } from "./components/NotificationsBell"; +import { ModulesModal } from "./components/ModulesModal"; import { useEventStream } from "./hooks/useEventStream"; import type { Board, Card, CardColor, Column, ColumnLocation, Notification, User } from "./types"; @@ -341,6 +343,8 @@ export function App() { .catch(() => setAppVersion("")); }, []); + const [modulesOpen, setModulesOpen] = useState(false); + const reloadNotifs = useCallback(async () => { try { const [list, c] = await Promise.all([api.listNotifications(false), api.unreadNotificationCount()]); @@ -719,7 +723,7 @@ export function App() { }); }, [reload, users, auth.user, requesterOptions, tagOptions]); - const openEditCard = useCallback((card: Card) => { + const openEditCard = useCallback((card: Card, options?: { highlightMessageId?: string }) => { const id = modals.open({ title: "Editar tarjeta", size: "85%", @@ -730,6 +734,7 @@ export function App() { currentUserId={auth.user?.id} requesterOptions={requesterOptions} tagOptions={tagOptions} + highlightMessageId={options?.highlightMessageId} onCancel={() => modals.close(id)} onSubmit={async (v) => { try { @@ -1178,17 +1183,30 @@ export function App() { { - const card = board?.cards.find((c) => c.id === cardId); - if (card) { - setActiveCard(card); - } else { - // Card may be archived/trashed/missing locally — refetch and retry. + onOpenCard={async (cardId, messageId) => { + // Resolve the card across all possible buckets: live + // board, refreshed board, archive, trash. Notifications + // can point at any of them. + const find = (cs?: Card[]) => cs?.find((c) => c.id === cardId); + let card = find(board?.cards); + if (!card) { await reload(); - const b = await api.getBoard(); - const c2 = b.cards.find((c) => c.id === cardId); - if (c2) setActiveCard(c2); + const fresh = await api.getBoard(); + card = find(fresh.cards); } + if (!card) { + const archived = await api.listArchive(); + card = find(archived); + } + if (!card) { + const trashed = await api.listTrash(); + card = find(trashed); + } + if (!card) { + notifications.show({ color: "red", message: "Card no encontrada" }); + return; + } + openEditCard(card, { highlightMessageId: messageId }); }} onChanged={reloadNotifs} /> @@ -1240,6 +1258,14 @@ export function App() { /> + {auth.user.is_admin && ( + } + onClick={() => setModulesOpen(true)} + > + Modulos + + )} } color="red" @@ -1250,6 +1276,9 @@ export function App() { )} + {auth.user?.is_admin && ( + setModulesOpen(false)} /> + )} diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 5d097a6..f700b7a 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -4,8 +4,11 @@ import type { CardHistoryResponse, CardMessage, Column, + KanbanModule, Metrics, MetricsFilter, + ModuleLog, + ModuleTestResult, Notification, Sticker, User, @@ -317,6 +320,40 @@ export function markAllNotificationsRead(): Promise<{ count: number }> { return fetchJSON("/notifications/read-all", { method: "POST" }); } +export function listModules(): Promise { + return fetchJSON("/modules"); +} + +export interface ModuleInput { + name: string; + kind: string; + enabled: boolean; + event_filter: string[]; + config: Record; +} + +export function createModule(body: ModuleInput): Promise { + return fetchJSON("/modules", { method: "POST", body: JSON.stringify(body) }); +} + +export function updateModule(id: string, patch: Partial): Promise { + return fetchJSON(`/modules/${id}`, { method: "PATCH", body: JSON.stringify(patch) }); +} + +export function deleteModule(id: string): Promise { + return fetchJSON(`/modules/${id}`, { method: "DELETE" }); +} + +export function listModuleLogs(id: string, limit = 100): Promise { + return fetchJSON(`/modules/${id}/logs?limit=${limit}`); +} + +export function testModule(idOrDraft: string, body?: ModuleInput): Promise { + const init: RequestInit = { method: "POST" }; + if (body) init.body = JSON.stringify(body); + return fetchJSON(`/modules/${idOrDraft}/test`, init); +} + // streamChat opens a WebSocket, sends the message history, and streams events // to onEvent. Returns a Promise that resolves when the server closes the // connection (after a "done" event) and rejects on transport errors. diff --git a/frontend/src/components/CardChatPanel.tsx b/frontend/src/components/CardChatPanel.tsx index 104d415..4c6a5fe 100644 --- a/frontend/src/components/CardChatPanel.tsx +++ b/frontend/src/components/CardChatPanel.tsx @@ -35,6 +35,9 @@ interface Props { users: User[]; currentUserId?: string; onMessagesChange?: (messages: CardMessage[]) => void; + // When set, the panel scrolls the matching message into view and flashes a + // brief highlight (~2s). Used by notification click → open card. + highlightMessageId?: string; } // Window for considering a peer "actively typing" after its last event. @@ -98,7 +101,7 @@ function renderBody(body: string, knownUsers: Map): ReactNode { return out; } -export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange }: Props) { +export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange, highlightMessageId }: Props) { const [messages, setMessages] = useState([]); const [loading, setLoading] = useState(true); const [body, setBody] = useState(""); @@ -185,6 +188,22 @@ export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange } } }, [messages.length]); + // Scroll to + briefly pulse the message that triggered an incoming + // notification. Runs whenever the highlight id changes AND the message + // is present in the list (it may arrive asynchronously after WS sync). + const [pulse, setPulse] = useState(null); + useEffect(() => { + if (!highlightMessageId) return; + if (!messages.some((m) => m.id === highlightMessageId)) return; + const el = document.querySelector(`[data-msg-id="${highlightMessageId}"]`); + if (el && el instanceof HTMLElement) { + el.scrollIntoView({ behavior: "smooth", block: "center" }); + } + setPulse(highlightMessageId); + const t = setTimeout(() => setPulse(null), 2200); + return () => clearTimeout(t); + }, [highlightMessageId, messages]); + const sendTypingPing = () => { const ws = wsRef.current; if (!ws || ws.readyState !== WebSocket.OPEN) return; @@ -319,13 +338,25 @@ export function CardChatPanel({ cardId, users, currentUserId, onMessagesChange } const author = m.author_id ? usersById.get(m.author_id) : null; const isMe = m.author_id && m.author_id === currentUserId; const label = author ? author.display_name || author.username : "Anonimo"; + const highlighted = pulse === m.id; return ( diff --git a/frontend/src/components/CardEditPanel.tsx b/frontend/src/components/CardEditPanel.tsx index 843b9c9..1479708 100644 --- a/frontend/src/components/CardEditPanel.tsx +++ b/frontend/src/components/CardEditPanel.tsx @@ -14,6 +14,9 @@ interface Props { tagOptions: string[]; onSubmit: (v: CardFormValues) => Promise | void; onCancel: () => void; + // When set, the chat panel auto-scrolls to this message id and pulses + // it briefly. Used when opening a card from a notification click. + highlightMessageId?: string; } export function CardEditPanel({ @@ -24,6 +27,7 @@ export function CardEditPanel({ tagOptions, onSubmit, onCancel, + highlightMessageId, }: Props) { const [messages, setMessages] = useState([]); const [liveCard, setLiveCard] = useState(card); @@ -68,6 +72,7 @@ export function CardEditPanel({ users={users} currentUserId={currentUserId} onMessagesChange={setMessages} + highlightMessageId={highlightMessageId} /> diff --git a/frontend/src/components/ModulesModal.tsx b/frontend/src/components/ModulesModal.tsx new file mode 100644 index 0000000..628f15c --- /dev/null +++ b/frontend/src/components/ModulesModal.tsx @@ -0,0 +1,441 @@ +import { + ActionIcon, + Alert, + Badge, + Box, + Button, + Checkbox, + Code, + Divider, + Group, + JsonInput, + Loader, + Modal, + ScrollArea, + Select, + Stack, + Table, + Tabs, + Text, + TextInput, + Tooltip, +} from "@mantine/core"; +import { notifications } from "@mantine/notifications"; +import { IconPlug, IconPlugConnected, IconRefresh, IconTestPipe, IconTrash } from "@tabler/icons-react"; +import { useCallback, useEffect, useMemo, useState } from "react"; +import * as api from "../api"; +import type { KanbanModule, ModuleLog } from "../types"; +import { formatDateTimeShort } from "./format"; + +interface Props { + opened: boolean; + onClose: () => void; +} + +const KANBAN_EVENTS = [ + "card.created", + "card.updated", + "card.moved", + "card.deleted", + "message.created", + "board.invalidated", +]; + +const DEFAULT_JIRA_CONFIG = { + base_url: "", + email: "", + api_token: "", + project_key: "", + status_map: { + "Por hacer": "To Do", + "Doing": "In Progress", + "Done": "Done", + }, +}; + +export function ModulesModal({ opened, onClose }: Props) { + const [modules, setModules] = useState([]); + const [loading, setLoading] = useState(false); + const [selectedId, setSelectedId] = useState(null); + const [editing, setEditing] = useState(null); + const [logs, setLogs] = useState([]); + const [logsLoading, setLogsLoading] = useState(false); + const [activeTab, setActiveTab] = useState("form"); + + const reload = useCallback(async () => { + setLoading(true); + try { + const list = await api.listModules(); + setModules(list); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setLoading(false); + } + }, []); + + useEffect(() => { + if (opened) reload(); + }, [opened, reload]); + + const reloadLogs = useCallback(async (id: string) => { + setLogsLoading(true); + try { + const out = await api.listModuleLogs(id); + setLogs(out); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } finally { + setLogsLoading(false); + } + }, []); + + const select = (m: KanbanModule | null) => { + setEditing(m ? { ...m, config: { ...m.config } } : null); + setSelectedId(m?.id ?? null); + setActiveTab("form"); + setLogs([]); + if (m) reloadLogs(m.id); + }; + + const startNew = () => { + const blank: KanbanModule = { + id: "", + name: "Nuevo modulo", + kind: "jira", + enabled: false, + event_filter: ["card.created", "card.updated", "card.moved", "message.created"], + config: { ...DEFAULT_JIRA_CONFIG, status_map: { ...DEFAULT_JIRA_CONFIG.status_map } }, + created_at: "", + updated_at: "", + }; + setEditing(blank); + setSelectedId(null); + setActiveTab("form"); + setLogs([]); + }; + + const save = async () => { + if (!editing) return; + try { + const payload = { + name: editing.name, + kind: editing.kind, + enabled: editing.enabled, + event_filter: editing.event_filter, + config: editing.config, + }; + const saved = editing.id + ? await api.updateModule(editing.id, payload) + : await api.createModule(payload); + notifications.show({ color: "green", message: "Modulo guardado" }); + await reload(); + select(saved); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }; + + const remove = async () => { + if (!selectedId) return; + if (!confirm("Borrar modulo?")) return; + try { + await api.deleteModule(selectedId); + notifications.show({ color: "green", message: "Modulo borrado" }); + setEditing(null); + setSelectedId(null); + reload(); + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }; + + const test = async () => { + if (!editing) return; + try { + const result = editing.id + ? await api.testModule(editing.id) + : await api.testModule("draft", { + name: editing.name, + kind: editing.kind, + enabled: editing.enabled, + event_filter: editing.event_filter, + config: editing.config, + }); + if (result.ok) { + notifications.show({ + color: "green", + title: `Test OK (${result.status})`, + message: `Conexion verificada en ${result.duration_ms}ms`, + }); + } else { + notifications.show({ + color: "red", + title: `Test fallo (${result.status})`, + message: result.error || "sin detalle", + }); + } + } catch (e) { + notifications.show({ color: "red", message: (e as Error).message }); + } + }; + + return ( + + + Modulos / Integraciones + + } + size="xl" + centered + > + + + + Configurados + + + + + + + + + {loading && } + {modules.map((m) => ( + select(m)} + > + + + {m.name} + + + {m.enabled ? "on" : "off"} + + + {m.kind} + + ))} + + + + + + + + + {!editing ? ( + Selecciona un modulo o pulsa "Nuevo". + ) : ( + + + Configuracion + Logs + + + + + + setEditing({ ...editing, name: e.currentTarget.value })} + style={{ flex: 1 }} + /> +