var K7=Object.defineProperty;var Y7=(t,e,n)=>e in t?K7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Pe=(t,e,n)=>(Y7(t,typeof e!="symbol"?e+"":e,n),n);function q7(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var ir="top",Wr="bottom",Ur="right",ar="left",T0="auto",rd=[ir,Wr,Ur,ar],Vl="start",Cu="end",WN="clippingParents",iC="viewport",zc="popper",UN="reference",_x=rd.reduce(function(t,e){return t.concat([e+"-"+Vl,e+"-"+Cu])},[]),aC=[].concat(rd,[T0]).reduce(function(t,e){return t.concat([e,e+"-"+Vl,e+"-"+Cu])},[]),GN="beforeRead",KN="read",YN="afterRead",qN="beforeMain",XN="main",JN="afterMain",QN="beforeWrite",ZN="write",eL="afterWrite",tL=[GN,KN,YN,qN,XN,JN,QN,ZN,eL];function Is(t){return t?(t.nodeName||"").toLowerCase():null}function Gr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Hl(t){var e=Gr(t).Element;return t instanceof e||t instanceof Element}function vo(t){var e=Gr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function lC(t){if(typeof ShadowRoot>"u")return!1;var e=Gr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function X7(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},s=e.elements[n];!vo(s)||!Is(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var a=o[i];a===!1?s.removeAttribute(i):s.setAttribute(i,a===!0?"":a)}))})}function J7(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],s=e.attributes[r]||{},i=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=i.reduce(function(l,c){return l[c]="",l},{});!vo(o)||!Is(o)||(Object.assign(o.style,a),Object.keys(s).forEach(function(l){o.removeAttribute(l)}))})}}const cC={name:"applyStyles",enabled:!0,phase:"write",fn:X7,effect:J7,requires:["computeStyles"]};function Rs(t){return t.split("-")[0]}var Ol=Math.max,Lg=Math.min,ku=Math.round;function Cx(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nL(){return!/^((?!chrome|android).)*safari/i.test(Cx())}function Eu(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,s=1;e&&vo(t)&&(o=t.offsetWidth>0&&ku(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&ku(r.height)/t.offsetHeight||1);var i=Hl(t)?Gr(t):window,a=i.visualViewport,l=!nL()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/o,u=(r.top+(l&&a?a.offsetTop:0))/s,d=r.width/o,f=r.height/s;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function uC(t){var e=Eu(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function rL(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&lC(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function di(t){return Gr(t).getComputedStyle(t)}function Q7(t){return["table","td","th"].indexOf(Is(t))>=0}function Aa(t){return((Hl(t)?t.ownerDocument:t.document)||window.document).documentElement}function R0(t){return Is(t)==="html"?t:t.assignedSlot||t.parentNode||(lC(t)?t.host:null)||Aa(t)}function WT(t){return!vo(t)||di(t).position==="fixed"?null:t.offsetParent}function Z7(t){var e=/firefox/i.test(Cx()),n=/Trident/i.test(Cx());if(n&&vo(t)){var r=di(t);if(r.position==="fixed")return null}var o=R0(t);for(lC(o)&&(o=o.host);vo(o)&&["html","body"].indexOf(Is(o))<0;){var s=di(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Hh(t){for(var e=Gr(t),n=WT(t);n&&Q7(n)&&di(n).position==="static";)n=WT(n);return n&&(Is(n)==="html"||Is(n)==="body"&&di(n).position==="static")?e:n||Z7(t)||e}function dC(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wf(t,e,n){return Ol(t,Lg(e,n))}function e9(t,e,n){var r=wf(t,e,n);return r>n?n:r}function oL(){return{top:0,right:0,bottom:0,left:0}}function sL(t){return Object.assign({},oL(),t)}function iL(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var t9=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,sL(typeof e!="number"?e:iL(e,rd))};function n9(t){var e,n=t.state,r=t.name,o=t.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,a=Rs(n.placement),l=dC(a),c=[ar,Ur].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!i)){var d=t9(o.padding,n),f=uC(s),h=l==="y"?ir:ar,p=l==="y"?Wr:Ur,m=n.rects.reference[u]+n.rects.reference[l]-i[l]-n.rects.popper[u],v=i[l]-n.rects.reference[l],y=Hh(s),b=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=m/2-v/2,S=d[h],_=b-f[u]-d[p],k=b/2-f[u]/2+w,M=wf(S,k,_),T=l;n.modifiersData[r]=(e={},e[T]=M,e.centerOffset=M-k,e)}}function r9(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||rL(e.elements.popper,o)&&(e.elements.arrow=o))}const aL={name:"arrow",enabled:!0,phase:"main",fn:n9,effect:r9,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mu(t){return t.split("-")[1]}var o9={top:"auto",right:"auto",bottom:"auto",left:"auto"};function s9(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:ku(n*o)/o||0,y:ku(r*o)/o||0}}function UT(t){var e,n=t.popper,r=t.popperRect,o=t.placement,s=t.variation,i=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=i.x,h=f===void 0?0:f,p=i.y,m=p===void 0?0:p,v=typeof u=="function"?u({x:h,y:m}):{x:h,y:m};h=v.x,m=v.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),w=ar,S=ir,_=window;if(c){var k=Hh(n),M="clientHeight",T="clientWidth";if(k===Gr(n)&&(k=Aa(n),di(k).position!=="static"&&a==="absolute"&&(M="scrollHeight",T="scrollWidth")),k=k,o===ir||(o===ar||o===Ur)&&s===Cu){S=Wr;var P=d&&k===_&&_.visualViewport?_.visualViewport.height:k[M];m-=P-r.height,m*=l?1:-1}if(o===ar||(o===ir||o===Wr)&&s===Cu){w=Ur;var A=d&&k===_&&_.visualViewport?_.visualViewport.width:k[T];h-=A-r.width,h*=l?1:-1}}var L=Object.assign({position:a},c&&o9),V=u===!0?s9({x:h,y:m},Gr(n)):{x:h,y:m};if(h=V.x,m=V.y,l){var H;return Object.assign({},L,(H={},H[S]=b?"0":"",H[w]=y?"0":"",H.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",H))}return Object.assign({},L,(e={},e[S]=b?m+"px":"",e[w]=y?h+"px":"",e.transform="",e))}function i9(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Rs(e.placement),variation:Mu(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,UT(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,UT(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const fC={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:i9,data:{}};var Np={passive:!0};function a9(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,a=i===void 0?!0:i,l=Gr(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,Np)}),a&&l.addEventListener("resize",n.update,Np),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Np)}),a&&l.removeEventListener("resize",n.update,Np)}}const hC={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:a9,data:{}};var l9={left:"right",right:"left",bottom:"top",top:"bottom"};function eg(t){return t.replace(/left|right|bottom|top/g,function(e){return l9[e]})}var c9={start:"end",end:"start"};function GT(t){return t.replace(/start|end/g,function(e){return c9[e]})}function pC(t){var e=Gr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function mC(t){return Eu(Aa(t)).left+pC(t).scrollLeft}function u9(t,e){var n=Gr(t),r=Aa(t),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;var c=nL();(c||!c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a+mC(t),y:l}}function d9(t){var e,n=Aa(t),r=pC(t),o=(e=t.ownerDocument)==null?void 0:e.body,s=Ol(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Ol(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+mC(t),l=-r.scrollTop;return di(o||n).direction==="rtl"&&(a+=Ol(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:l}}function gC(t){var e=di(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function lL(t){return["html","body","#document"].indexOf(Is(t))>=0?t.ownerDocument.body:vo(t)&&gC(t)?t:lL(R0(t))}function xf(t,e){var n;e===void 0&&(e=[]);var r=lL(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),s=Gr(r),i=o?[s].concat(s.visualViewport||[],gC(r)?r:[]):r,a=e.concat(i);return o?a:a.concat(xf(R0(i)))}function kx(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function f9(t,e){var n=Eu(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function KT(t,e,n){return e===iC?kx(u9(t,n)):Hl(e)?f9(e,n):kx(d9(Aa(t)))}function h9(t){var e=xf(R0(t)),n=["absolute","fixed"].indexOf(di(t).position)>=0,r=n&&vo(t)?Hh(t):t;return Hl(r)?e.filter(function(o){return Hl(o)&&rL(o,r)&&Is(o)!=="body"}):[]}function p9(t,e,n,r){var o=e==="clippingParents"?h9(t):[].concat(e),s=[].concat(o,[n]),i=s[0],a=s.reduce(function(l,c){var u=KT(t,c,r);return l.top=Ol(u.top,l.top),l.right=Lg(u.right,l.right),l.bottom=Lg(u.bottom,l.bottom),l.left=Ol(u.left,l.left),l},KT(t,i,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function cL(t){var e=t.reference,n=t.element,r=t.placement,o=r?Rs(r):null,s=r?Mu(r):null,i=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case ir:l={x:i,y:e.y-n.height};break;case Wr:l={x:i,y:e.y+e.height};break;case Ur:l={x:e.x+e.width,y:a};break;case ar:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=o?dC(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Vl:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Cu:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Tu(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,s=n.strategy,i=s===void 0?t.strategy:s,a=n.boundary,l=a===void 0?WN:a,c=n.rootBoundary,u=c===void 0?iC:c,d=n.elementContext,f=d===void 0?zc:d,h=n.altBoundary,p=h===void 0?!1:h,m=n.padding,v=m===void 0?0:m,y=sL(typeof v!="number"?v:iL(v,rd)),b=f===zc?UN:zc,w=t.rects.popper,S=t.elements[p?b:f],_=p9(Hl(S)?S:S.contextElement||Aa(t.elements.popper),l,u,i),k=Eu(t.elements.reference),M=cL({reference:k,element:w,strategy:"absolute",placement:o}),T=kx(Object.assign({},w,M)),P=f===zc?T:k,A={top:_.top-P.top+y.top,bottom:P.bottom-_.bottom+y.bottom,left:_.left-P.left+y.left,right:P.right-_.right+y.right},L=t.modifiersData.offset;if(f===zc&&L){var V=L[o];Object.keys(A).forEach(function(H){var z=[Ur,Wr].indexOf(H)>=0?1:-1,N=[ir,Wr].indexOf(H)>=0?"y":"x";A[H]+=V[N]*z})}return A}function m9(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?aC:l,u=Mu(r),d=u?a?_x:_x.filter(function(p){return Mu(p)===u}):rd,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d);var h=f.reduce(function(p,m){return p[m]=Tu(t,{placement:m,boundary:o,rootBoundary:s,padding:i})[Rs(m)],p},{});return Object.keys(h).sort(function(p,m){return h[p]-h[m]})}function g9(t){if(Rs(t)===T0)return[];var e=eg(t);return[GT(t),e,GT(e)]}function v9(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,a=i===void 0?!0:i,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,m=n.allowedAutoPlacements,v=e.options.placement,y=Rs(v),b=y===v,w=l||(b||!p?[eg(v)]:g9(v)),S=[v].concat(w).reduce(function(q,B){return q.concat(Rs(B)===T0?m9(e,{placement:B,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):B)},[]),_=e.rects.reference,k=e.rects.popper,M=new Map,T=!0,P=S[0],A=0;A<S.length;A++){var L=S[A],V=Rs(L),H=Mu(L)===Vl,z=[ir,Wr].indexOf(V)>=0,N=z?"width":"height",D=Tu(e,{placement:L,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),F=z?H?Ur:ar:H?Wr:ir;_[N]>k[N]&&(F=eg(F));var I=eg(F),$=[];if(s&&$.push(D[V]<=0),a&&$.push(D[F]<=0,D[I]<=0),$.every(function(q){return q})){P=L,T=!1;break}M.set(L,$)}if(T)for(var j=p?3:1,W=function(B){var Q=S.find(function(Z){var oe=M.get(Z);if(oe)return oe.slice(0,B).every(function(te){return te})});if(Q)return P=Q,"break"},G=j;G>0;G--){var X=W(G);if(X==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}const uL={name:"flip",enabled:!0,phase:"main",fn:v9,requiresIfExists:["offset"],data:{_skip:!1}};function YT(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function qT(t){return[ir,Ur,Wr,ar].some(function(e){return t[e]>=0})}function y9(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,i=Tu(e,{elementContext:"reference"}),a=Tu(e,{altBoundary:!0}),l=YT(i,r),c=YT(a,o,s),u=qT(l),d=qT(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const dL={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:y9};function b9(t,e,n){var r=Rs(t),o=[ar,ir].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[ar,Ur].indexOf(r)>=0?{x:a,y:i}:{x:i,y:a}}function w9(t){var e=t.state,n=t.options,r=t.name,o=n.offset,s=o===void 0?[0,0]:o,i=aC.reduce(function(u,d){return u[d]=b9(d,e.rects,s),u},{}),a=i[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=i}const fL={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:w9};function x9(t){var e=t.state,n=t.name;e.modifiersData[n]=cL({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const vC={name:"popperOffsets",enabled:!0,phase:"read",fn:x9,data:{}};function S9(t){return t==="x"?"y":"x"}function _9(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,a=i===void 0?!1:i,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,p=n.tetherOffset,m=p===void 0?0:p,v=Tu(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=Rs(e.placement),b=Mu(e.placement),w=!b,S=dC(y),_=S9(S),k=e.modifiersData.popperOffsets,M=e.rects.reference,T=e.rects.popper,P=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,V={x:0,y:0};if(k){if(s){var H,z=S==="y"?ir:ar,N=S==="y"?Wr:Ur,D=S==="y"?"height":"width",F=k[S],I=F+v[z],$=F-v[N],j=h?-T[D]/2:0,W=b===Vl?M[D]:T[D],G=b===Vl?-T[D]:-M[D],X=e.elements.arrow,q=h&&X?uC(X):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:oL(),Q=B[z],Z=B[N],oe=wf(0,M[D],q[D]),te=w?M[D]/2-j-oe-Q-A.mainAxis:W-oe-Q-A.mainAxis,ne=w?-M[D]/2+j+oe+Z+A.mainAxis:G+oe+Z+A.mainAxis,pe=e.elements.arrow&&Hh(e.elements.arrow),ie=pe?S==="y"?pe.clientTop||0:pe.clientLeft||0:0,le=(H=L==null?void 0:L[S])!=null?H:0,ce=F+te-le-ie,ye=F+ne-le,xe=wf(h?Lg(I,ce):I,F,h?Ol($,ye):$);k[S]=xe,V[S]=xe-F}if(a){var Ce,se=S==="x"?ir:ar,ue=S==="x"?Wr:Ur,ve=k[_],Oe=_==="y"?"height":"width",fe=ve+v[se],Me=ve-v[ue],Ie=[ir,ar].indexOf(y)!==-1,Be=(Ce=L==null?void 0:L[_])!=null?Ce:0,et=Ie?fe:ve-M[Oe]-T[Oe]-Be+A.altAxis,mt=Ie?ve+M[Oe]+T[Oe]-Be-A.altAxis:Me,Ue=h&&Ie?e9(et,ve,mt):wf(h?et:fe,ve,h?mt:Me);k[_]=Ue,V[_]=Ue-ve}e.modifiersData[r]=V}}const hL={name:"preventOverflow",enabled:!0,phase:"main",fn:_9,requiresIfExists:["offset"]};function C9(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function k9(t){return t===Gr(t)||!vo(t)?pC(t):C9(t)}function E9(t){var e=t.getBoundingClientRect(),n=ku(e.width)/t.offsetWidth||1,r=ku(e.height)/t.offsetHeight||1;return n!==1||r!==1}function M9(t,e,n){n===void 0&&(n=!1);var r=vo(e),o=vo(e)&&E9(e),s=Aa(e),i=Eu(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Is(e)!=="body"||gC(s))&&(a=k9(e)),vo(e)?(l=Eu(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=mC(s))),{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function T9(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&o(l)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||o(s)}),r}function R9(t){var e=T9(t);return tL.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function O9(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function P9(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var XT={placement:"bottom",modifiers:[],strategy:"absolute"};function JT(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function O0(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,s=o===void 0?XT:o;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},XT,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(y){var b=typeof y=="function"?y(u.options):y;m(),u.options=Object.assign({},s,u.options,b),u.scrollParents={reference:Hl(a)?xf(a):a.contextElement?xf(a.contextElement):[],popper:xf(l)};var w=R9(P9([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(S){return S.enabled}),p(),h.update()},forceUpdate:function(){if(!f){var y=u.elements,b=y.reference,w=y.popper;if(JT(b,w)){u.rects={reference:M9(b,Hh(w),u.options.strategy==="fixed"),popper:uC(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var _=u.orderedModifiers[S],k=_.fn,M=_.options,T=M===void 0?{}:M,P=_.name;typeof k=="function"&&(u=k({state:u,options:T,name:P,instance:h})||u)}}}},update:O9(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){m(),f=!0}};if(!JT(a,l))return h;h.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function p(){u.orderedModifiers.forEach(function(v){var y=v.name,b=v.options,w=b===void 0?{}:b,S=v.effect;if(typeof S=="function"){var _=S({state:u,name:y,instance:h,options:w}),k=function(){};d.push(_||k)}})}function m(){d.forEach(function(v){return v()}),d=[]}return h}}var A9=O0(),D9=[hC,vC,fC,cC],I9=O0({defaultModifiers:D9}),N9=[hC,vC,fC,cC,fL,uL,hL,aL,dL],yC=O0({defaultModifiers:N9});const pL=Object.freeze(Object.defineProperty({__proto__:null,afterMain:JN,afterRead:YN,afterWrite:eL,applyStyles:cC,arrow:aL,auto:T0,basePlacements:rd,beforeMain:qN,beforeRead:GN,beforeWrite:QN,bottom:Wr,clippingParents:WN,computeStyles:fC,createPopper:yC,createPopperBase:A9,createPopperLite:I9,detectOverflow:Tu,end:Cu,eventListeners:hC,flip:uL,hide:dL,left:ar,main:XN,modifierPhases:tL,offset:fL,placements:aC,popper:zc,popperGenerator:O0,popperOffsets:vC,preventOverflow:hL,read:KN,reference:UN,right:Ur,start:Vl,top:ir,variationPlacements:_x,viewport:iC,write:ZN},Symbol.toStringTag,{value:"Module"}));/*!
  * Bootstrap v5.3.2 (https://getbootstrap.com/)
  * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */const Oi=new Map,Kb={set(t,e,n){Oi.has(t)||Oi.set(t,new Map);const r=Oi.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,n)},get(t,e){return Oi.has(t)&&Oi.get(t).get(e)||null},remove(t,e){if(!Oi.has(t))return;const n=Oi.get(t);n.delete(e),n.size===0&&Oi.delete(t)}},L9=1e6,j9=1e3,Ex="transitionend",mL=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,n)=>`#${CSS.escape(n)}`)),t),$9=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),F9=t=>{do t+=Math.floor(Math.random()*L9);while(document.getElementById(t));return t},z9=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),o=Number.parseFloat(n);return!r&&!o?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*j9)},gL=t=>{t.dispatchEvent(new Event(Ex))},ri=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),ya=t=>ri(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(mL(t)):null,od=t=>{if(!ri(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const r=t.closest("summary");if(r&&r.parentNode!==n||r===null)return!1}return e},ba=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",vL=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?vL(t.parentNode):null},jg=()=>{},Wh=t=>{t.offsetHeight},yL=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Yb=[],B9=t=>{document.readyState==="loading"?(Yb.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Yb)e()}),Yb.push(t)):t()},So=()=>document.documentElement.dir==="rtl",Eo=t=>{B9(()=>{const e=yL();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},_r=(t,e=[],n=t)=>typeof t=="function"?t(...e):n,bL=(t,e,n=!0)=>{if(!n){_r(t);return}const o=z9(e)+5;let s=!1;const i=({target:a})=>{a===e&&(s=!0,e.removeEventListener(Ex,i),_r(t))};e.addEventListener(Ex,i),setTimeout(()=>{s||gL(e)},o)},bC=(t,e,n,r)=>{const o=t.length;let s=t.indexOf(e);return s===-1?!n&&r?t[o-1]:t[0]:(s+=n?1:-1,r&&(s=(s+o)%o),t[Math.max(0,Math.min(s,o-1))])},V9=/[^.]*(?=\..*)\.|.*/,H9=/\..*/,W9=/::\d+$/,qb={};let QT=1;const wL={mouseenter:"mouseover",mouseleave:"mouseout"},U9=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function xL(t,e){return e&&`${e}::${QT++}`||t.uidEvent||QT++}function SL(t){const e=xL(t);return t.uidEvent=e,qb[e]=qb[e]||{},qb[e]}function G9(t,e){return function n(r){return wC(r,{delegateTarget:t}),n.oneOff&&de.off(t,r.type,e),e.apply(t,[r])}}function K9(t,e,n){return function r(o){const s=t.querySelectorAll(e);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(const a of s)if(a===i)return wC(o,{delegateTarget:i}),r.oneOff&&de.off(t,o.type,e,n),n.apply(i,[o])}}function _L(t,e,n=null){return Object.values(t).find(r=>r.callable===e&&r.delegationSelector===n)}function CL(t,e,n){const r=typeof e=="string",o=r?n:e||n;let s=kL(t);return U9.has(s)||(s=t),[r,o,s]}function ZT(t,e,n,r,o){if(typeof e!="string"||!t)return;let[s,i,a]=CL(e,n,r);e in wL&&(i=(p=>function(m){if(!m.relatedTarget||m.relatedTarget!==m.delegateTarget&&!m.delegateTarget.contains(m.relatedTarget))return p.call(this,m)})(i));const l=SL(t),c=l[a]||(l[a]={}),u=_L(c,i,s?n:null);if(u){u.oneOff=u.oneOff&&o;return}const d=xL(i,e.replace(V9,"")),f=s?K9(t,n,i):G9(t,i);f.delegationSelector=s?n:null,f.callable=i,f.oneOff=o,f.uidEvent=d,c[d]=f,t.addEventListener(a,f,s)}function Mx(t,e,n,r,o){const s=_L(e[n],r,o);s&&(t.removeEventListener(n,s,!!o),delete e[n][s.uidEvent])}function Y9(t,e,n,r){const o=e[n]||{};for(const[s,i]of Object.entries(o))s.includes(r)&&Mx(t,e,n,i.callable,i.delegationSelector)}function kL(t){return t=t.replace(H9,""),wL[t]||t}const de={on(t,e,n,r){ZT(t,e,n,r,!1)},one(t,e,n,r){ZT(t,e,n,r,!0)},off(t,e,n,r){if(typeof e!="string"||!t)return;const[o,s,i]=CL(e,n,r),a=i!==e,l=SL(t),c=l[i]||{},u=e.startsWith(".");if(typeof s<"u"){if(!Object.keys(c).length)return;Mx(t,l,i,s,o?n:null);return}if(u)for(const d of Object.keys(l))Y9(t,l,d,e.slice(1));for(const[d,f]of Object.entries(c)){const h=d.replace(W9,"");(!a||e.includes(h))&&Mx(t,l,i,f.callable,f.delegationSelector)}},trigger(t,e,n){if(typeof e!="string"||!t)return null;const r=yL(),o=kL(e),s=e!==o;let i=null,a=!0,l=!0,c=!1;s&&r&&(i=r.Event(e,n),r(t).trigger(i),a=!i.isPropagationStopped(),l=!i.isImmediatePropagationStopped(),c=i.isDefaultPrevented());const u=wC(new Event(e,{bubbles:a,cancelable:!0}),n);return c&&u.preventDefault(),l&&t.dispatchEvent(u),u.defaultPrevented&&i&&i.preventDefault(),u}};function wC(t,e={}){for(const[n,r]of Object.entries(e))try{t[n]=r}catch{Object.defineProperty(t,n,{configurable:!0,get(){return r}})}return t}function eR(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function Xb(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const oi={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${Xb(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Xb(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of n){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),e[o]=eR(t.dataset[r])}return e},getDataAttribute(t,e){return eR(t.getAttribute(`data-bs-${Xb(e)}`))}};let Uh=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,n){const r=ri(n)?oi.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...ri(n)?oi.getDataAttributes(n):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,n=this.constructor.DefaultType){for(const[r,o]of Object.entries(n)){const s=e[r],i=ri(s)?"element":$9(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${i}" but expected type "${o}".`)}}};const q9="5.3.2";class ns extends Uh{constructor(e,n){super(),e=ya(e),e&&(this._element=e,this._config=this._getConfig(n),Kb.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Kb.remove(this._element,this.constructor.DATA_KEY),de.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,n,r=!0){bL(e,n,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Kb.get(ya(e),this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return q9}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Jb=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?mL(n.trim()):null}return e},Fe={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(n=>n.matches(e))},parents(t,e){const n=[];let r=t.parentNode.closest(e);for(;r;)n.push(r),r=r.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(n=>!ba(n)&&od(n))},getSelectorFromElement(t){const e=Jb(t);return e&&Fe.findOne(e)?e:null},getElementFromSelector(t){const e=Jb(t);return e?Fe.findOne(e):null},getMultipleElementsFromSelector(t){const e=Jb(t);return e?Fe.find(e):[]}},P0=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;de.on(document,n,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),ba(this))return;const s=Fe.getElementFromSelector(this)||this.closest(`.${r}`);t.getOrCreateInstance(s)[e]()})},X9="alert",J9="bs.alert",EL=`.${J9}`,Q9=`close${EL}`,Z9=`closed${EL}`,eW="fade",tW="show";let ML=class TL extends ns{static get NAME(){return X9}close(){if(de.trigger(this._element,Q9).defaultPrevented)return;this._element.classList.remove(tW);const n=this._element.classList.contains(eW);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),de.trigger(this._element,Z9),this.dispose()}static jQueryInterface(e){return this.each(function(){const n=TL.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}};P0(ML,"close");Eo(ML);const nW="button",rW="bs.button",oW=`.${rW}`,sW=".data-api",iW="active",tR='[data-bs-toggle="button"]',aW=`click${oW}${sW}`;let RL=class OL extends ns{static get NAME(){return nW}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(iW))}static jQueryInterface(e){return this.each(function(){const n=OL.getOrCreateInstance(this);e==="toggle"&&n[e]()})}};de.on(document,aW,tR,t=>{t.preventDefault();const e=t.target.closest(tR);RL.getOrCreateInstance(e).toggle()});Eo(RL);const lW="swipe",sd=".bs.swipe",cW=`touchstart${sd}`,uW=`touchmove${sd}`,dW=`touchend${sd}`,fW=`pointerdown${sd}`,hW=`pointerup${sd}`,pW="touch",mW="pen",gW="pointer-event",vW=40,yW={endCallback:null,leftCallback:null,rightCallback:null},bW={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class $g extends Uh{constructor(e,n){super(),this._element=e,!(!e||!$g.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return yW}static get DefaultType(){return bW}static get NAME(){return lW}dispose(){de.off(this._element,sd)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),_r(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=vW)return;const n=e/this._deltaX;this._deltaX=0,n&&_r(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(de.on(this._element,fW,e=>this._start(e)),de.on(this._element,hW,e=>this._end(e)),this._element.classList.add(gW)):(de.on(this._element,cW,e=>this._start(e)),de.on(this._element,uW,e=>this._move(e)),de.on(this._element,dW,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===mW||e.pointerType===pW)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const wW="carousel",xW="bs.carousel",Da=`.${xW}`,PL=".data-api",SW="ArrowLeft",_W="ArrowRight",CW=500,Ad="next",Cc="prev",Bc="left",tg="right",kW=`slide${Da}`,Qb=`slid${Da}`,EW=`keydown${Da}`,MW=`mouseenter${Da}`,TW=`mouseleave${Da}`,RW=`dragstart${Da}`,OW=`load${Da}${PL}`,PW=`click${Da}${PL}`,AL="carousel",Lp="active",AW="slide",DW="carousel-item-end",IW="carousel-item-start",NW="carousel-item-next",LW="carousel-item-prev",DL=".active",IL=".carousel-item",jW=DL+IL,$W=".carousel-item img",FW=".carousel-indicators",zW="[data-bs-slide], [data-bs-slide-to]",BW='[data-bs-ride="carousel"]',VW={[SW]:tg,[_W]:Bc},HW={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},WW={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Gh extends ns{constructor(e,n){super(e,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Fe.findOne(FW,this._element),this._addEventListeners(),this._config.ride===AL&&this.cycle()}static get Default(){return HW}static get DefaultType(){return WW}static get NAME(){return wW}next(){this._slide(Ad)}nextWhenVisible(){!document.hidden&&od(this._element)&&this.next()}prev(){this._slide(Cc)}pause(){this._isSliding&&gL(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){de.one(this._element,Qb,()=>this.cycle());return}this.cycle()}}to(e){const n=this._getItems();if(e>n.length-1||e<0)return;if(this._isSliding){de.one(this._element,Qb,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?Ad:Cc;this._slide(o,n[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&de.on(this._element,EW,e=>this._keydown(e)),this._config.pause==="hover"&&(de.on(this._element,MW,()=>this.pause()),de.on(this._element,TW,()=>this._maybeEnableCycle())),this._config.touch&&$g.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Fe.find($W,this._element))de.on(r,RW,o=>o.preventDefault());const n={leftCallback:()=>this._slide(this._directionToOrder(Bc)),rightCallback:()=>this._slide(this._directionToOrder(tg)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),CW+this._config.interval))}};this._swipeHelper=new $g(this._element,n)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const n=VW[e.key];n&&(e.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const n=Fe.findOne(DL,this._indicatorsElement);n.classList.remove(Lp),n.removeAttribute("aria-current");const r=Fe.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(Lp),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const n=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(e,n=null){if(this._isSliding)return;const r=this._getActive(),o=e===Ad,s=n||bC(this._getItems(),r,o,this._config.wrap);if(s===r)return;const i=this._getItemIndex(s),a=h=>de.trigger(this._element,h,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:i});if(a(kW).defaultPrevented||!r||!s)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(i),this._activeElement=s;const u=o?IW:DW,d=o?NW:LW;s.classList.add(d),Wh(s),r.classList.add(u),s.classList.add(u);const f=()=>{s.classList.remove(u,d),s.classList.add(Lp),r.classList.remove(Lp,d,u),this._isSliding=!1,a(Qb)};this._queueCallback(f,r,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains(AW)}_getActive(){return Fe.findOne(jW,this._element)}_getItems(){return Fe.find(IL,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return So()?e===Bc?Cc:Ad:e===Bc?Ad:Cc}_orderToDirection(e){return So()?e===Cc?Bc:tg:e===Cc?tg:Bc}static jQueryInterface(e){return this.each(function(){const n=Gh.getOrCreateInstance(this,e);if(typeof e=="number"){n.to(e);return}if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,PW,zW,function(t){const e=Fe.getElementFromSelector(this);if(!e||!e.classList.contains(AL))return;t.preventDefault();const n=Gh.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){n.to(r),n._maybeEnableCycle();return}if(oi.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()});de.on(window,OW,()=>{const t=Fe.find(BW);for(const e of t)Gh.getOrCreateInstance(e)});Eo(Gh);const UW="collapse",GW="bs.collapse",Kh=`.${GW}`,KW=".data-api",YW=`show${Kh}`,qW=`shown${Kh}`,XW=`hide${Kh}`,JW=`hidden${Kh}`,QW=`click${Kh}${KW}`,Zb="show",Yc="collapse",jp="collapsing",ZW="collapsed",eU=`:scope .${Yc} .${Yc}`,tU="collapse-horizontal",nU="width",rU="height",oU=".collapse.show, .collapse.collapsing",Tx='[data-bs-toggle="collapse"]',sU={parent:null,toggle:!0},iU={parent:"(null|element)",toggle:"boolean"};let NL=class Rx extends ns{constructor(e,n){super(e,n),this._isTransitioning=!1,this._triggerArray=[];const r=Fe.find(Tx);for(const o of r){const s=Fe.getSelectorFromElement(o),i=Fe.find(s).filter(a=>a===this._element);s!==null&&i.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return sU}static get DefaultType(){return iU}static get NAME(){return UW}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(oU).filter(a=>a!==this._element).map(a=>Rx.getOrCreateInstance(a,{toggle:!1}))),e.length&&e[0]._isTransitioning||de.trigger(this._element,YW).defaultPrevented)return;for(const a of e)a.hide();const r=this._getDimension();this._element.classList.remove(Yc),this._element.classList.add(jp),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(jp),this._element.classList.add(Yc,Zb),this._element.style[r]="",de.trigger(this._element,qW)},i=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||de.trigger(this._element,XW).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,Wh(this._element),this._element.classList.add(jp),this._element.classList.remove(Yc,Zb);for(const o of this._triggerArray){const s=Fe.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(jp),this._element.classList.add(Yc),de.trigger(this._element,JW)};this._element.style[n]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Zb)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=ya(e.parent),e}_getDimension(){return this._element.classList.contains(tU)?nU:rU}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Tx);for(const n of e){const r=Fe.getElementFromSelector(n);r&&this._addAriaAndCollapsedClass([n],this._isShown(r))}}_getFirstLevelChildren(e){const n=Fe.find(eU,this._config.parent);return Fe.find(e,this._config.parent).filter(r=>!n.includes(r))}_addAriaAndCollapsedClass(e,n){if(e.length)for(const r of e)r.classList.toggle(ZW,!n),r.setAttribute("aria-expanded",n)}static jQueryInterface(e){const n={};return typeof e=="string"&&/show|hide/.test(e)&&(n.toggle=!1),this.each(function(){const r=Rx.getOrCreateInstance(this,n);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}};de.on(document,QW,Tx,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of Fe.getMultipleElementsFromSelector(this))NL.getOrCreateInstance(e,{toggle:!1}).toggle()});Eo(NL);const nR="dropdown",aU="bs.dropdown",sc=`.${aU}`,xC=".data-api",lU="Escape",rR="Tab",cU="ArrowUp",oR="ArrowDown",uU=2,dU=`hide${sc}`,fU=`hidden${sc}`,hU=`show${sc}`,pU=`shown${sc}`,LL=`click${sc}${xC}`,jL=`keydown${sc}${xC}`,mU=`keyup${sc}${xC}`,Vc="show",gU="dropup",vU="dropend",yU="dropstart",bU="dropup-center",wU="dropdown-center",yl='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',xU=`${yl}.${Vc}`,ng=".dropdown-menu",SU=".navbar",_U=".navbar-nav",CU=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",kU=So()?"top-end":"top-start",EU=So()?"top-start":"top-end",MU=So()?"bottom-end":"bottom-start",TU=So()?"bottom-start":"bottom-end",RU=So()?"left-start":"right-start",OU=So()?"right-start":"left-start",PU="top",AU="bottom",DU={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},IU={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Os extends ns{constructor(e,n){super(e,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Fe.next(this._element,ng)[0]||Fe.prev(this._element,ng)[0]||Fe.findOne(ng,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return DU}static get DefaultType(){return IU}static get NAME(){return nR}toggle(){return this._isShown()?this.hide():this.show()}show(){if(ba(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!de.trigger(this._element,hU,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(_U))for(const r of[].concat(...document.body.children))de.on(r,"mouseover",jg);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Vc),this._element.classList.add(Vc),de.trigger(this._element,pU,e)}}hide(){if(ba(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!de.trigger(this._element,dU,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))de.off(r,"mouseover",jg);this._popper&&this._popper.destroy(),this._menu.classList.remove(Vc),this._element.classList.remove(Vc),this._element.setAttribute("aria-expanded","false"),oi.removeDataAttribute(this._menu,"popper"),de.trigger(this._element,fU,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!ri(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${nR.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof pL>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:ri(this._config.reference)?e=ya(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=yC(e,this._menu,n)}_isShown(){return this._menu.classList.contains(Vc)}_getPlacement(){const e=this._parent;if(e.classList.contains(vU))return RU;if(e.classList.contains(yU))return OU;if(e.classList.contains(bU))return PU;if(e.classList.contains(wU))return AU;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(gU)?n?EU:kU:n?TU:MU}_detectNavbar(){return this._element.closest(SU)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(oi.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..._r(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:n}){const r=Fe.find(CU,this._menu).filter(o=>od(o));r.length&&bC(r,n,e===oR,!r.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const n=Os.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}static clearMenus(e){if(e.button===uU||e.type==="keyup"&&e.key!==rR)return;const n=Fe.find(xU);for(const r of n){const o=Os.getInstance(r);if(!o||o._config.autoClose===!1)continue;const s=e.composedPath(),i=s.includes(o._menu);if(s.includes(o._element)||o._config.autoClose==="inside"&&!i||o._config.autoClose==="outside"&&i||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===rR||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const a={relatedTarget:o._element};e.type==="click"&&(a.clickEvent=e),o._completeHide(a)}}static dataApiKeydownHandler(e){const n=/input|textarea/i.test(e.target.tagName),r=e.key===lU,o=[cU,oR].includes(e.key);if(!o&&!r||n&&!r)return;e.preventDefault();const s=this.matches(yl)?this:Fe.prev(this,yl)[0]||Fe.next(this,yl)[0]||Fe.findOne(yl,e.delegateTarget.parentNode),i=Os.getOrCreateInstance(s);if(o){e.stopPropagation(),i.show(),i._selectMenuItem(e);return}i._isShown()&&(e.stopPropagation(),i.hide(),s.focus())}}de.on(document,jL,yl,Os.dataApiKeydownHandler);de.on(document,jL,ng,Os.dataApiKeydownHandler);de.on(document,LL,Os.clearMenus);de.on(document,mU,Os.clearMenus);de.on(document,LL,yl,function(t){t.preventDefault(),Os.getOrCreateInstance(this).toggle()});Eo(Os);const $L="backdrop",NU="fade",sR="show",iR=`mousedown.bs.${$L}`,LU={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},jU={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class FL extends Uh{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return LU}static get DefaultType(){return jU}static get NAME(){return $L}show(e){if(!this._config.isVisible){_r(e);return}this._append();const n=this._getElement();this._config.isAnimated&&Wh(n),n.classList.add(sR),this._emulateAnimation(()=>{_r(e)})}hide(e){if(!this._config.isVisible){_r(e);return}this._getElement().classList.remove(sR),this._emulateAnimation(()=>{this.dispose(),_r(e)})}dispose(){this._isAppended&&(de.off(this._element,iR),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(NU),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=ya(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),de.on(e,iR,()=>{_r(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){bL(e,this._getElement(),this._config.isAnimated)}}const $U="focustrap",FU="bs.focustrap",Fg=`.${FU}`,zU=`focusin${Fg}`,BU=`keydown.tab${Fg}`,VU="Tab",HU="forward",aR="backward",WU={autofocus:!0,trapElement:null},UU={autofocus:"boolean",trapElement:"element"};let zL=class extends Uh{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return WU}static get DefaultType(){return UU}static get NAME(){return $U}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),de.off(document,Fg),de.on(document,zU,e=>this._handleFocusin(e)),de.on(document,BU,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,de.off(document,Fg))}_handleFocusin(e){const{trapElement:n}=this._config;if(e.target===document||e.target===n||n.contains(e.target))return;const r=Fe.focusableChildren(n);r.length===0?n.focus():this._lastTabNavDirection===aR?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===VU&&(this._lastTabNavDirection=e.shiftKey?aR:HU)}};const lR=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cR=".sticky-top",$p="padding-right",uR="margin-right";class Ox{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,$p,n=>n+e),this._setElementAttributes(lR,$p,n=>n+e),this._setElementAttributes(cR,uR,n=>n-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,$p),this._resetElementAttributes(lR,$p),this._resetElementAttributes(cR,uR)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,r){const o=this.getWidth(),s=i=>{if(i!==this._element&&window.innerWidth>i.clientWidth+o)return;this._saveInitialAttribute(i,n);const a=window.getComputedStyle(i).getPropertyValue(n);i.style.setProperty(n,`${r(Number.parseFloat(a))}px`)};this._applyManipulationCallback(e,s)}_saveInitialAttribute(e,n){const r=e.style.getPropertyValue(n);r&&oi.setDataAttribute(e,n,r)}_resetElementAttributes(e,n){const r=o=>{const s=oi.getDataAttribute(o,n);if(s===null){o.style.removeProperty(n);return}oi.removeDataAttribute(o,n),o.style.setProperty(n,s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,n){if(ri(e)){n(e);return}for(const r of Fe.find(e,this._element))n(r)}}const GU="modal",KU="bs.modal",_o=`.${KU}`,YU=".data-api",qU="Escape",XU=`hide${_o}`,JU=`hidePrevented${_o}`,BL=`hidden${_o}`,VL=`show${_o}`,QU=`shown${_o}`,ZU=`resize${_o}`,eG=`click.dismiss${_o}`,tG=`mousedown.dismiss${_o}`,nG=`keydown.dismiss${_o}`,rG=`click${_o}${YU}`,dR="modal-open",oG="fade",fR="show",e1="modal-static",sG=".modal.show",iG=".modal-dialog",aG=".modal-body",lG='[data-bs-toggle="modal"]',cG={backdrop:!0,focus:!0,keyboard:!0},uG={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let zg=class HL extends ns{constructor(e,n){super(e,n),this._dialog=Fe.findOne(iG,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ox,this._addEventListeners()}static get Default(){return cG}static get DefaultType(){return uG}static get NAME(){return GU}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||de.trigger(this._element,VL,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(dR),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||de.trigger(this._element,XU).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(fR),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){de.off(window,_o),de.off(this._dialog,_o),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new FL({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new zL({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Fe.findOne(aG,this._dialog);n&&(n.scrollTop=0),Wh(this._element),this._element.classList.add(fR);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,de.trigger(this._element,QU,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){de.on(this._element,nG,e=>{if(e.key===qU){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),de.on(window,ZU,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),de.on(this._element,tG,e=>{de.one(this._element,eG,n=>{if(!(this._element!==e.target||this._element!==n.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(dR),this._resetAdjustments(),this._scrollBar.reset(),de.trigger(this._element,BL)})}_isAnimated(){return this._element.classList.contains(oG)}_triggerBackdropTransition(){if(de.trigger(this._element,JU).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(e1)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(e1),this._queueCallback(()=>{this._element.classList.remove(e1),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),r=n>0;if(r&&!e){const o=So()?"paddingLeft":"paddingRight";this._element.style[o]=`${n}px`}if(!r&&e){const o=So()?"paddingRight":"paddingLeft";this._element.style[o]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){const r=HL.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](n)}})}};de.on(document,rG,lG,function(t){const e=Fe.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),de.one(e,VL,o=>{o.defaultPrevented||de.one(e,BL,()=>{od(this)&&this.focus()})});const n=Fe.findOne(sG);n&&zg.getInstance(n).hide(),zg.getOrCreateInstance(e).toggle(this)});P0(zg);Eo(zg);const dG="offcanvas",fG="bs.offcanvas",yi=`.${fG}`,WL=".data-api",hG=`load${yi}${WL}`,pG="Escape",hR="show",pR="showing",mR="hiding",mG="offcanvas-backdrop",UL=".offcanvas.show",gG=`show${yi}`,vG=`shown${yi}`,yG=`hide${yi}`,gR=`hidePrevented${yi}`,GL=`hidden${yi}`,bG=`resize${yi}`,wG=`click${yi}${WL}`,xG=`keydown.dismiss${yi}`,SG='[data-bs-toggle="offcanvas"]',_G={backdrop:!0,keyboard:!0,scroll:!1},CG={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class wa extends ns{constructor(e,n){super(e,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return _G}static get DefaultType(){return CG}static get NAME(){return dG}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||de.trigger(this._element,gG,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Ox().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(pR);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(hR),this._element.classList.remove(pR),de.trigger(this._element,vG,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||de.trigger(this._element,yG).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(mR),this._backdrop.hide();const n=()=>{this._element.classList.remove(hR,mR),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Ox().reset(),de.trigger(this._element,GL)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){de.trigger(this._element,gR);return}this.hide()},n=!!this._config.backdrop;return new FL({className:mG,isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?e:null})}_initializeFocusTrap(){return new zL({trapElement:this._element})}_addEventListeners(){de.on(this._element,xG,e=>{if(e.key===pG){if(this._config.keyboard){this.hide();return}de.trigger(this._element,gR)}})}static jQueryInterface(e){return this.each(function(){const n=wa.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}de.on(document,wG,SG,function(t){const e=Fe.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),ba(this))return;de.one(e,GL,()=>{od(this)&&this.focus()});const n=Fe.findOne(UL);n&&n!==e&&wa.getInstance(n).hide(),wa.getOrCreateInstance(e).toggle(this)});de.on(window,hG,()=>{for(const t of Fe.find(UL))wa.getOrCreateInstance(t).show()});de.on(window,bG,()=>{for(const t of Fe.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&wa.getOrCreateInstance(t).hide()});P0(wa);Eo(wa);const kG=/^aria-[\w-]*$/i,KL={"*":["class","dir","id","lang","role",kG],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},EG=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),MG=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,TG=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?EG.has(n)?!!MG.test(t.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(n))};function RG(t,e,n){if(!t.length)return t;if(n&&typeof n=="function")return n(t);const o=new window.DOMParser().parseFromString(t,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(const i of s){const a=i.nodeName.toLowerCase();if(!Object.keys(e).includes(a)){i.remove();continue}const l=[].concat(...i.attributes),c=[].concat(e["*"]||[],e[a]||[]);for(const u of l)TG(u,c)||i.removeAttribute(u.nodeName)}return o.body.innerHTML}const OG="TemplateFactory",PG={allowList:KL,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},AG={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},DG={entry:"(string|element|function|null)",selector:"(string|element)"};class IG extends Uh{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return PG}static get DefaultType(){return AG}static get NAME(){return OG}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[o,s]of Object.entries(this._config.content))this._setContent(e,s,o);const n=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&n.classList.add(...r.split(" ")),n}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[n,r]of Object.entries(e))super._typeCheckConfig({selector:n,entry:r},DG)}_setContent(e,n,r){const o=Fe.findOne(r,e);if(o){if(n=this._resolvePossibleFunction(n),!n){o.remove();return}if(ri(n)){this._putElementInTemplate(ya(n),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(n);return}o.textContent=n}}_maybeSanitize(e){return this._config.sanitize?RG(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return _r(e,[this])}_putElementInTemplate(e,n){if(this._config.html){n.innerHTML="",n.append(e);return}n.textContent=e.textContent}}const NG="tooltip",LG=new Set(["sanitize","allowList","sanitizeFn"]),t1="fade",jG="modal",Fp="show",$G=".tooltip-inner",vR=`.${jG}`,yR="hide.bs.modal",Dd="hover",n1="focus",FG="click",zG="manual",BG="hide",VG="hidden",HG="show",WG="shown",UG="inserted",GG="click",KG="focusin",YG="focusout",qG="mouseenter",XG="mouseleave",JG={AUTO:"auto",TOP:"top",RIGHT:So()?"left":"right",BOTTOM:"bottom",LEFT:So()?"right":"left"},QG={allowList:KL,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ZG={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let A0=class YL extends ns{constructor(e,n){if(typeof pL>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return QG}static get DefaultType(){return ZG}static get NAME(){return NG}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),de.off(this._element.closest(vR),yR,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=de.trigger(this._element,this.constructor.eventName(HG)),r=(vL(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),de.trigger(this._element,this.constructor.eventName(UG))),this._popper=this._createPopper(o),o.classList.add(Fp),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))de.on(a,"mouseover",jg);const i=()=>{de.trigger(this._element,this.constructor.eventName(WG)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||de.trigger(this._element,this.constructor.eventName(BG)).defaultPrevented)return;if(this._getTipElement().classList.remove(Fp),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))de.off(o,"mouseover",jg);this._activeTrigger[FG]=!1,this._activeTrigger[n1]=!1,this._activeTrigger[Dd]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),de.trigger(this._element,this.constructor.eventName(VG)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const n=this._getTemplateFactory(e).toHtml();if(!n)return null;n.classList.remove(t1,Fp),n.classList.add(`bs-${this.constructor.NAME}-auto`);const r=F9(this.constructor.NAME).toString();return n.setAttribute("id",r),this._isAnimated()&&n.classList.add(t1),n}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new IG({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[$G]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(t1)}_isShown(){return this.tip&&this.tip.classList.contains(Fp)}_createPopper(e){const n=_r(this._config.placement,[this,e,this._element]),r=JG[n.toUpperCase()];return yC(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_resolvePossibleFunction(e){return _r(e,[this._element])}_getPopperConfig(e){const n={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...n,..._r(this._config.popperConfig,[n])}}_setListeners(){const e=this._config.trigger.split(" ");for(const n of e)if(n==="click")de.on(this._element,this.constructor.eventName(GG),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(n!==zG){const r=n===Dd?this.constructor.eventName(qG):this.constructor.eventName(KG),o=n===Dd?this.constructor.eventName(XG):this.constructor.eventName(YG);de.on(this._element,r,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?n1:Dd]=!0,i._enter()}),de.on(this._element,o,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?n1:Dd]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},de.on(this._element.closest(vR),yR,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,n){clearTimeout(this._timeout),this._timeout=setTimeout(e,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const n=oi.getDataAttributes(this._element);for(const r of Object.keys(n))LG.has(r)&&delete n[r];return e={...n,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:ya(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[n,r]of Object.entries(this._config))this.constructor.Default[n]!==r&&(e[n]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const n=YL.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}};Eo(A0);const eK="popover",tK=".popover-header",nK=".popover-body",rK={...A0.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},oK={...A0.DefaultType,content:"(null|string|element|function)"};let sK=class qL extends A0{static get Default(){return rK}static get DefaultType(){return oK}static get NAME(){return eK}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[tK]:this._getTitle(),[nK]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const n=qL.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}};Eo(sK);const iK="scrollspy",aK="bs.scrollspy",SC=`.${aK}`,lK=".data-api",cK=`activate${SC}`,bR=`click${SC}`,uK=`load${SC}${lK}`,dK="dropdown-item",kc="active",fK='[data-bs-spy="scroll"]',r1="[href]",hK=".nav, .list-group",wR=".nav-link",pK=".nav-item",mK=".list-group-item",gK=`${wR}, ${pK} > ${wR}, ${mK}`,vK=".dropdown",yK=".dropdown-toggle",bK={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},wK={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class D0 extends ns{constructor(e,n){super(e,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return bK}static get DefaultType(){return wK}static get NAME(){return iK}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=ya(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(n=>Number.parseFloat(n))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(de.off(this._config.target,bR),de.on(this._config.target,bR,r1,e=>{const n=this._observableSections.get(e.target.hash);if(n){e.preventDefault();const r=this._rootElement||window,o=n.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:o,behavior:"smooth"});return}r.scrollTop=o}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),e)}_observerCallback(e){const n=i=>this._targetLinks.get(`#${i.target.id}`),r=i=>{this._previousScrollData.visibleEntryTop=i.target.offsetTop,this._process(n(i))},o=(this._rootElement||document.documentElement).scrollTop,s=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const i of e){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(i));continue}const a=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&a){if(r(i),!o)return;continue}!s&&!a&&r(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Fe.find(r1,this._config.target);for(const n of e){if(!n.hash||ba(n))continue;const r=Fe.findOne(decodeURI(n.hash),this._element);od(r)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(kc),this._activateParents(e),de.trigger(this._element,cK,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(dK)){Fe.findOne(yK,e.closest(vK)).classList.add(kc);return}for(const n of Fe.parents(e,hK))for(const r of Fe.prev(n,gK))r.classList.add(kc)}_clearActiveClass(e){e.classList.remove(kc);const n=Fe.find(`${r1}.${kc}`,e);for(const r of n)r.classList.remove(kc)}static jQueryInterface(e){return this.each(function(){const n=D0.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(window,uK,()=>{for(const t of Fe.find(fK))D0.getOrCreateInstance(t)});Eo(D0);const xK="tab",SK="bs.tab",ic=`.${SK}`,_K=`hide${ic}`,CK=`hidden${ic}`,kK=`show${ic}`,EK=`shown${ic}`,MK=`click${ic}`,TK=`keydown${ic}`,RK=`load${ic}`,OK="ArrowLeft",xR="ArrowRight",PK="ArrowUp",SR="ArrowDown",o1="Home",_R="End",bl="active",CR="fade",s1="show",AK="dropdown",XL=".dropdown-toggle",DK=".dropdown-menu",i1=`:not(${XL})`,IK='.list-group, .nav, [role="tablist"]',NK=".nav-item, .list-group-item",LK=`.nav-link${i1}, .list-group-item${i1}, [role="tab"]${i1}`,JL='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',a1=`${LK}, ${JL}`,jK=`.${bl}[data-bs-toggle="tab"], .${bl}[data-bs-toggle="pill"], .${bl}[data-bs-toggle="list"]`;class Ru extends ns{constructor(e){super(e),this._parent=this._element.closest(IK),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),de.on(this._element,TK,n=>this._keydown(n)))}static get NAME(){return xK}show(){const e=this._element;if(this._elemIsActive(e))return;const n=this._getActiveElem(),r=n?de.trigger(n,_K,{relatedTarget:e}):null;de.trigger(e,kK,{relatedTarget:n}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(n,e),this._activate(e,n))}_activate(e,n){if(!e)return;e.classList.add(bl),this._activate(Fe.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(s1);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),de.trigger(e,EK,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(CR))}_deactivate(e,n){if(!e)return;e.classList.remove(bl),e.blur(),this._deactivate(Fe.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(s1);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),de.trigger(e,CK,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(CR))}_keydown(e){if(![OK,xR,PK,SR,o1,_R].includes(e.key))return;e.stopPropagation(),e.preventDefault();const n=this._getChildren().filter(o=>!ba(o));let r;if([o1,_R].includes(e.key))r=n[e.key===o1?0:n.length-1];else{const o=[xR,SR].includes(e.key);r=bC(n,e.target,o,!0)}r&&(r.focus({preventScroll:!0}),Ru.getOrCreateInstance(r).show())}_getChildren(){return Fe.find(a1,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,n){this._setAttributeIfNotExists(e,"role","tablist");for(const r of n)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const n=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",n),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),n||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const n=Fe.getElementFromSelector(e);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,n){const r=this._getOuterElement(e);if(!r.classList.contains(AK))return;const o=(s,i)=>{const a=Fe.findOne(s,r);a&&a.classList.toggle(i,n)};o(XL,bl),o(DK,s1),r.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(e,n,r){e.hasAttribute(n)||e.setAttribute(n,r)}_elemIsActive(e){return e.classList.contains(bl)}_getInnerElement(e){return e.matches(a1)?e:Fe.findOne(a1,e)}_getOuterElement(e){return e.closest(NK)||e}static jQueryInterface(e){return this.each(function(){const n=Ru.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,MK,JL,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!ba(this)&&Ru.getOrCreateInstance(this).show()});de.on(window,RK,()=>{for(const t of Fe.find(jK))Ru.getOrCreateInstance(t)});Eo(Ru);const $K="toast",FK="bs.toast",Ia=`.${FK}`,zK=`mouseover${Ia}`,BK=`mouseout${Ia}`,VK=`focusin${Ia}`,HK=`focusout${Ia}`,WK=`hide${Ia}`,UK=`hidden${Ia}`,GK=`show${Ia}`,KK=`shown${Ia}`,YK="fade",kR="hide",zp="show",Bp="showing",qK={animation:"boolean",autohide:"boolean",delay:"number"},XK={animation:!0,autohide:!0,delay:5e3};class I0 extends ns{constructor(e,n){super(e,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return XK}static get DefaultType(){return qK}static get NAME(){return $K}show(){if(de.trigger(this._element,GK).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(YK);const n=()=>{this._element.classList.remove(Bp),de.trigger(this._element,KK),this._maybeScheduleHide()};this._element.classList.remove(kR),Wh(this._element),this._element.classList.add(zp,Bp),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown()||de.trigger(this._element,WK).defaultPrevented)return;const n=()=>{this._element.classList.add(kR),this._element.classList.remove(Bp,zp),de.trigger(this._element,UK)};this._element.classList.add(Bp),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(zp),super.dispose()}isShown(){return this._element.classList.contains(zp)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=n;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=n;break}}if(n){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){de.on(this._element,zK,e=>this._onInteraction(e,!0)),de.on(this._element,BK,e=>this._onInteraction(e,!1)),de.on(this._element,VK,e=>this._onInteraction(e,!0)),de.on(this._element,HK,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const n=I0.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}P0(I0);Eo(I0);function QL(t,e){return function(){return t.apply(e,arguments)}}const{toString:JK}=Object.prototype,{getPrototypeOf:_C}=Object,N0=(t=>e=>{const n=JK.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$s=t=>(t=t.toLowerCase(),e=>N0(e)===t),L0=t=>e=>typeof e===t,{isArray:id}=Array,Gf=L0("undefined");function QK(t){return t!==null&&!Gf(t)&&t.constructor!==null&&!Gf(t.constructor)&&yo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ZL=$s("ArrayBuffer");function ZK(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ZL(t.buffer),e}const eY=L0("string"),yo=L0("function"),ej=L0("number"),j0=t=>t!==null&&typeof t=="object",tY=t=>t===!0||t===!1,rg=t=>{if(N0(t)!=="object")return!1;const e=_C(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},nY=$s("Date"),rY=$s("File"),oY=$s("Blob"),sY=$s("FileList"),iY=t=>j0(t)&&yo(t.pipe),aY=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||yo(t.append)&&((e=N0(t))==="formdata"||e==="object"&&yo(t.toString)&&t.toString()==="[object FormData]"))},lY=$s("URLSearchParams"),cY=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yh(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),id(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let a;for(r=0;r<i;r++)a=s[r],e.call(null,t[a],a,t)}}function tj(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const nj=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rj=t=>!Gf(t)&&t!==nj;function Px(){const{caseless:t}=rj(this)&&this||{},e={},n=(r,o)=>{const s=t&&tj(e,o)||o;rg(e[s])&&rg(r)?e[s]=Px(e[s],r):rg(r)?e[s]=Px({},r):id(r)?e[s]=r.slice():e[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Yh(arguments[r],n);return e}const uY=(t,e,n,{allOwnKeys:r}={})=>(Yh(e,(o,s)=>{n&&yo(o)?t[s]=QL(o,n):t[s]=o},{allOwnKeys:r}),t),dY=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fY=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},hY=(t,e,n,r)=>{let o,s,i;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&_C(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},pY=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},mY=t=>{if(!t)return null;if(id(t))return t;let e=t.length;if(!ej(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},gY=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&_C(Uint8Array)),vY=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},yY=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},bY=$s("HTMLFormElement"),wY=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),ER=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),xY=$s("RegExp"),oj=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Yh(n,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(r[s]=i||o)}),Object.defineProperties(t,r)},SY=t=>{oj(t,(e,n)=>{if(yo(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(yo(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_Y=(t,e)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return id(t)?r(t):r(String(t).split(e)),n},CY=()=>{},kY=(t,e)=>(t=+t,Number.isFinite(t)?t:e),l1="abcdefghijklmnopqrstuvwxyz",MR="0123456789",sj={DIGIT:MR,ALPHA:l1,ALPHA_DIGIT:l1+l1.toUpperCase()+MR},EY=(t=16,e=sj.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function MY(t){return!!(t&&yo(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const TY=t=>{const e=new Array(10),n=(r,o)=>{if(j0(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const s=id(r)?[]:{};return Yh(r,(i,a)=>{const l=n(i,o+1);!Gf(l)&&(s[a]=l)}),e[o]=void 0,s}}return r};return n(t,0)},RY=$s("AsyncFunction"),OY=t=>t&&(j0(t)||yo(t))&&yo(t.then)&&yo(t.catch),ae={isArray:id,isArrayBuffer:ZL,isBuffer:QK,isFormData:aY,isArrayBufferView:ZK,isString:eY,isNumber:ej,isBoolean:tY,isObject:j0,isPlainObject:rg,isUndefined:Gf,isDate:nY,isFile:rY,isBlob:oY,isRegExp:xY,isFunction:yo,isStream:iY,isURLSearchParams:lY,isTypedArray:gY,isFileList:sY,forEach:Yh,merge:Px,extend:uY,trim:cY,stripBOM:dY,inherits:fY,toFlatObject:hY,kindOf:N0,kindOfTest:$s,endsWith:pY,toArray:mY,forEachEntry:vY,matchAll:yY,isHTMLForm:bY,hasOwnProperty:ER,hasOwnProp:ER,reduceDescriptors:oj,freezeMethods:SY,toObjectSet:_Y,toCamelCase:wY,noop:CY,toFiniteNumber:kY,findKey:tj,global:nj,isContextDefined:rj,ALPHABET:sj,generateString:EY,isSpecCompliantForm:MY,toJSONObject:TY,isAsyncFn:RY,isThenable:OY};function st(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ae.inherits(st,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ij=st.prototype,aj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{aj[t]={value:t}});Object.defineProperties(st,aj);Object.defineProperty(ij,"isAxiosError",{value:!0});st.from=(t,e,n,r,o,s)=>{const i=Object.create(ij);return ae.toFlatObject(t,i,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),st.call(i,t.message,e,n,r,o),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const PY=null;function Ax(t){return ae.isPlainObject(t)||ae.isArray(t)}function lj(t){return ae.endsWith(t,"[]")?t.slice(0,-2):t}function TR(t,e,n){return t?t.concat(e).map(function(o,s){return o=lj(o),!n&&s?"["+o+"]":o}).join(n?".":""):e}function AY(t){return ae.isArray(t)&&!t.some(Ax)}const DY=ae.toFlatObject(ae,{},null,function(e){return/^is[A-Z]/.test(e)});function $0(t,e,n){if(!ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!ae.isUndefined(v[m])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(e);if(!ae.isFunction(o))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(ae.isDate(p))return p.toISOString();if(!l&&ae.isBlob(p))throw new st("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(p)||ae.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,v){let y=p;if(p&&!v&&typeof p=="object"){if(ae.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(ae.isArray(p)&&AY(p)||(ae.isFileList(p)||ae.endsWith(m,"[]"))&&(y=ae.toArray(p)))return m=lj(m),y.forEach(function(w,S){!(ae.isUndefined(w)||w===null)&&e.append(i===!0?TR([m],S,s):i===null?m:m+"[]",c(w))}),!1}return Ax(p)?!0:(e.append(TR(v,m,s),c(p)),!1)}const d=[],f=Object.assign(DY,{defaultVisitor:u,convertValue:c,isVisitable:Ax});function h(p,m){if(!ae.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),ae.forEach(p,function(y,b){(!(ae.isUndefined(y)||y===null)&&o.call(e,y,ae.isString(b)?b.trim():b,m,f))===!0&&h(y,m?m.concat(b):[b])}),d.pop()}}if(!ae.isObject(t))throw new TypeError("data must be an object");return h(t),e}function RR(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function CC(t,e){this._pairs=[],t&&$0(t,this,e)}const cj=CC.prototype;cj.append=function(e,n){this._pairs.push([e,n])};cj.toString=function(e){const n=e?function(r){return e.call(this,r,RR)}:RR;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function IY(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uj(t,e,n){if(!e)return t;const r=n&&n.encode||IY,o=n&&n.serialize;let s;if(o?s=o(e,n):s=ae.isURLSearchParams(e)?e.toString():new CC(e,n).toString(r),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class OR{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ae.forEach(this.handlers,function(r){r!==null&&e(r)})}}const dj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},NY=typeof URLSearchParams<"u"?URLSearchParams:CC,LY=typeof FormData<"u"?FormData:null,jY=typeof Blob<"u"?Blob:null,$Y={isBrowser:!0,classes:{URLSearchParams:NY,FormData:LY,Blob:jY},protocols:["http","https","file","blob","url","data"]},fj=typeof window<"u"&&typeof document<"u",FY=(t=>fj&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),zY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",BY=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fj,hasStandardBrowserEnv:FY,hasStandardBrowserWebWorkerEnv:zY},Symbol.toStringTag,{value:"Module"})),Es={...BY,...$Y};function VY(t,e){return $0(t,new Es.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return Es.isNode&&ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function HY(t){return ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function WY(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],e[s]=t[s];return e}function hj(t){function e(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=s>=n.length;return i=!i&&ae.isArray(o)?o.length:i,l?(ae.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!ae.isObject(o[i]))&&(o[i]=[]),e(n,r,o[i],s)&&ae.isArray(o[i])&&(o[i]=WY(o[i])),!a)}if(ae.isFormData(t)&&ae.isFunction(t.entries)){const n={};return ae.forEachEntry(t,(r,o)=>{e(HY(r),o,n,0)}),n}return null}function UY(t,e,n){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const kC={transitional:dj,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=ae.isObject(e);if(s&&ae.isHTMLForm(e)&&(e=new FormData(e)),ae.isFormData(e))return o?JSON.stringify(hj(e)):e;if(ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e))return e;if(ae.isArrayBufferView(e))return e.buffer;if(ae.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return VY(e,this.formSerializer).toString();if((a=ae.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return $0(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),UY(e)):e}],transformResponse:[function(e){const n=this.transitional||kC.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&ae.isString(e)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?st.from(a,st.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Es.classes.FormData,Blob:Es.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],t=>{kC.headers[t]={}});const EC=kC,GY=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),KY=t=>{const e={};let n,r,o;return t&&t.split(`
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||e[n]&&GY[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},PR=Symbol("internals");function Id(t){return t&&String(t).trim().toLowerCase()}function og(t){return t===!1||t==null?t:ae.isArray(t)?t.map(og):String(t)}function YY(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const qY=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function c1(t,e,n,r,o){if(ae.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!ae.isString(e)){if(ae.isString(r))return e.indexOf(r)!==-1;if(ae.isRegExp(r))return r.test(e)}}function XY(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function JY(t,e){const n=ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,s,i){return this[r].call(this,e,o,s,i)},configurable:!0})})}class F0{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function s(a,l,c){const u=Id(l);if(!u)throw new Error("header name must be a non-empty string");const d=ae.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=og(a))}const i=(a,l)=>ae.forEach(a,(c,u)=>s(c,u,l));return ae.isPlainObject(e)||e instanceof this.constructor?i(e,n):ae.isString(e)&&(e=e.trim())&&!qY(e)?i(KY(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=Id(e),e){const r=ae.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return YY(o);if(ae.isFunction(n))return n.call(this,o,r);if(ae.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Id(e),e){const r=ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||c1(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function s(i){if(i=Id(i),i){const a=ae.findKey(r,i);a&&(!n||c1(r,r[a],a,n))&&(delete r[a],o=!0)}}return ae.isArray(e)?e.forEach(s):s(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!e||c1(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const n=this,r={};return ae.forEach(this,(o,s)=>{const i=ae.findKey(r,s);if(i){n[i]=og(o),delete n[s];return}const a=e?XY(s):String(s).trim();a!==s&&delete n[s],n[a]=og(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ae.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[PR]=this[PR]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Id(i);r[a]||(JY(o,i),r[a]=!0)}return ae.isArray(e)?e.forEach(s):s(e),this}}F0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(F0.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ae.freezeMethods(F0);const si=F0;function u1(t,e){const n=this||EC,r=e||n,o=si.from(r.headers);let s=r.data;return ae.forEach(t,function(a){s=a.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function pj(t){return!!(t&&t.__CANCEL__)}function qh(t,e,n){st.call(this,t??"canceled",st.ERR_CANCELED,e,n),this.name="CanceledError"}ae.inherits(qh,st,{__CANCEL__:!0});function QY(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new st("Request failed with status code "+n.status,[st.ERR_BAD_REQUEST,st.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ZY=Es.hasStandardBrowserEnv?{write(t,e,n,r,o,s){const i=[t+"="+encodeURIComponent(e)];ae.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),ae.isString(r)&&i.push("path="+r),ae.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function eq(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function tq(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mj(t,e){return t&&!eq(e)?tq(t,e):e}const nq=Es.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const a=ae.isString(i)?o(i):i;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function rq(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function oq(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[s];i||(i=c),n[o]=l,r[o]=c;let d=s,f=0;for(;d!==o;)f+=n[d++],d=d%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(f*1e3/h):void 0}}function AR(t,e){let n=0;const r=oq(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,l=r(a),c=s<=i;n=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&c?(i-s)/l:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const sq=typeof XMLHttpRequest<"u",iq=sq&&function(t){return new Promise(function(n,r){let o=t.data;const s=si.from(t.headers).normalize();let{responseType:i,withXSRFToken:a}=t,l;function c(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let u;if(ae.isFormData(o)){if(Es.hasStandardBrowserEnv||Es.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((u=s.getContentType())!==!1){const[m,...v]=u?u.split(";").map(y=>y.trim()).filter(Boolean):[];s.setContentType([m||"multipart/form-data",...v].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(m+":"+v))}const f=mj(t.baseURL,t.url);d.open(t.method.toUpperCase(),uj(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function h(){if(!d)return;const m=si.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!i||i==="text"||i==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:t,request:d};QY(function(w){n(w),c()},function(w){r(w),c()},y),d=null}if("onloadend"in d?d.onloadend=h:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(h)},d.onabort=function(){d&&(r(new st("Request aborted",st.ECONNABORTED,t,d)),d=null)},d.onerror=function(){r(new st("Network Error",st.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let v=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const y=t.transitional||dj;t.timeoutErrorMessage&&(v=t.timeoutErrorMessage),r(new st(v,y.clarifyTimeoutError?st.ETIMEDOUT:st.ECONNABORTED,t,d)),d=null},Es.hasStandardBrowserEnv&&(a&&ae.isFunction(a)&&(a=a(t)),a||a!==!1&&nq(f))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&ZY.read(t.xsrfCookieName);m&&s.set(t.xsrfHeaderName,m)}o===void 0&&s.setContentType(null),"setRequestHeader"in d&&ae.forEach(s.toJSON(),function(v,y){d.setRequestHeader(y,v)}),ae.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),i&&i!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",AR(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",AR(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{d&&(r(!m||m.type?new qh(null,t,d):m),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=rq(f);if(p&&Es.protocols.indexOf(p)===-1){r(new st("Unsupported protocol "+p+":",st.ERR_BAD_REQUEST,t));return}d.send(o||null)})},Dx={http:PY,xhr:iq};ae.forEach(Dx,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const DR=t=>`- ${t}`,aq=t=>ae.isFunction(t)||t===null||t===!1,gj={getAdapter:t=>{t=ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let s=0;s<e;s++){n=t[s];let i;if(r=n,!aq(n)&&(r=Dx[(i=String(n)).toLowerCase()],r===void 0))throw new st(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=e?s.length>1?`since :
`+s.map(DR).join(`
`):" "+DR(s[0]):"as no adapter specified";throw new st("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Dx};function d1(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qh(null,t)}function IR(t){return d1(t),t.headers=si.from(t.headers),t.data=u1.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),gj.getAdapter(t.adapter||EC.adapter)(t).then(function(r){return d1(t),r.data=u1.call(t,t.transformResponse,r),r.headers=si.from(r.headers),r},function(r){return pj(r)||(d1(t),r&&r.response&&(r.response.data=u1.call(t,t.transformResponse,r.response),r.response.headers=si.from(r.response.headers))),Promise.reject(r)})}const NR=t=>t instanceof si?t.toJSON():t;function Ou(t,e){e=e||{};const n={};function r(c,u,d){return ae.isPlainObject(c)&&ae.isPlainObject(u)?ae.merge.call({caseless:d},c,u):ae.isPlainObject(u)?ae.merge({},u):ae.isArray(u)?u.slice():u}function o(c,u,d){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function s(c,u){if(!ae.isUndefined(u))return r(void 0,u)}function i(c,u){if(ae.isUndefined(u)){if(!ae.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in e)return r(c,u);if(d in t)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,u)=>o(NR(c),NR(u),!0)};return ae.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=l[u]||o,f=d(t[u],e[u],u);ae.isUndefined(f)&&d!==a||(n[u]=f)}),n}const vj="1.6.7",MC={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{MC[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const LR={};MC.transitional=function(e,n,r){function o(s,i){return"[Axios v"+vj+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(e===!1)throw new st(o(i," has been removed"+(n?" in "+n:"")),st.ERR_DEPRECATED);return n&&!LR[i]&&(LR[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,i,a):!0}};function lq(t,e,n){if(typeof t!="object")throw new st("options must be an object",st.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],i=e[s];if(i){const a=t[s],l=a===void 0||i(a,s,t);if(l!==!0)throw new st("option "+s+" must be "+l,st.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new st("Unknown option "+s,st.ERR_BAD_OPTION)}}const Ix={assertOptions:lq,validators:MC},Pi=Ix.validators;class Bg{constructor(e){this.defaults=e,this.interceptors={request:new OR,response:new OR}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ou(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ix.assertOptions(r,{silentJSONParsing:Pi.transitional(Pi.boolean),forcedJSONParsing:Pi.transitional(Pi.boolean),clarifyTimeoutError:Pi.transitional(Pi.boolean)},!1),o!=null&&(ae.isFunction(o)?n.paramsSerializer={serialize:o}:Ix.assertOptions(o,{encode:Pi.function,serialize:Pi.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&ae.merge(s.common,s[n.method]);s&&ae.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=si.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const p=[IR.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),f=p.length,u=Promise.resolve(n);d<f;)u=u.then(p[d++],p[d++]);return u}f=a.length;let h=n;for(d=0;d<f;){const p=a[d++],m=a[d++];try{h=p(h)}catch(v){m.call(this,v);break}}try{u=IR.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(e){e=Ou(this.defaults,e);const n=mj(e.baseURL,e.url);return uj(n,e.params,e.paramsSerializer)}}ae.forEach(["delete","get","head","options"],function(e){Bg.prototype[e]=function(n,r){return this.request(Ou(r||{},{method:e,url:n,data:(r||{}).data}))}});ae.forEach(["post","put","patch"],function(e){function n(r){return function(s,i,a){return this.request(Ou(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Bg.prototype[e]=n(),Bg.prototype[e+"Form"]=n(!0)});const sg=Bg;class TC{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},e(function(s,i,a){r.reason||(r.reason=new qh(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new TC(function(o){e=o}),cancel:e}}}const cq=TC;function uq(t){return function(n){return t.apply(null,n)}}function dq(t){return ae.isObject(t)&&t.isAxiosError===!0}const Nx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nx).forEach(([t,e])=>{Nx[e]=t});const fq=Nx;function yj(t){const e=new sg(t),n=QL(sg.prototype.request,e);return ae.extend(n,sg.prototype,e,{allOwnKeys:!0}),ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return yj(Ou(t,o))},n}const dn=yj(EC);dn.Axios=sg;dn.CanceledError=qh;dn.CancelToken=cq;dn.isCancel=pj;dn.VERSION=vj;dn.toFormData=$0;dn.AxiosError=st;dn.Cancel=dn.CanceledError;dn.all=function(e){return Promise.all(e)};dn.spread=uq;dn.isAxiosError=dq;dn.mergeConfig=Ou;dn.AxiosHeaders=si;dn.formToJSON=t=>hj(ae.isHTMLForm(t)?new FormData(t):t);dn.getAdapter=gj.getAdapter;dn.HttpStatusCode=fq;dn.default=dn;const D2e=dn;var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bj={exports:{}},z0={},wj={exports:{}},rt={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Xh=Symbol.for("react.element"),hq=Symbol.for("react.portal"),pq=Symbol.for("react.fragment"),mq=Symbol.for("react.strict_mode"),gq=Symbol.for("react.profiler"),vq=Symbol.for("react.provider"),yq=Symbol.for("react.context"),bq=Symbol.for("react.forward_ref"),wq=Symbol.for("react.suspense"),xq=Symbol.for("react.memo"),Sq=Symbol.for("react.lazy"),jR=Symbol.iterator;function _q(t){return t===null||typeof t!="object"?null:(t=jR&&t[jR]||t["@@iterator"],typeof t=="function"?t:null)}var xj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sj=Object.assign,_j={};function ad(t,e,n){this.props=t,this.context=e,this.refs=_j,this.updater=n||xj}ad.prototype.isReactComponent={};ad.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ad.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Cj(){}Cj.prototype=ad.prototype;function RC(t,e,n){this.props=t,this.context=e,this.refs=_j,this.updater=n||xj}var OC=RC.prototype=new Cj;OC.constructor=RC;Sj(OC,ad.prototype);OC.isPureReactComponent=!0;var $R=Array.isArray,kj=Object.prototype.hasOwnProperty,PC={current:null},Ej={key:!0,ref:!0,__self:!0,__source:!0};function Mj(t,e,n){var r,o={},s=null,i=null;if(e!=null)for(r in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(s=""+e.key),e)kj.call(e,r)&&!Ej.hasOwnProperty(r)&&(o[r]=e[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Xh,type:t,key:s,ref:i,props:o,_owner:PC.current}}function Cq(t,e){return{$$typeof:Xh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function AC(t){return typeof t=="object"&&t!==null&&t.$$typeof===Xh}function kq(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var FR=/\/+/g;function f1(t,e){return typeof t=="object"&&t!==null&&t.key!=null?kq(""+t.key):e.toString(36)}function ig(t,e,n,r,o){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Xh:case hq:i=!0}}if(i)return i=t,o=o(i),t=r===""?"."+f1(i,0):r,$R(o)?(n="",t!=null&&(n=t.replace(FR,"$&/")+"/"),ig(o,e,n,"",function(c){return c})):o!=null&&(AC(o)&&(o=Cq(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(FR,"$&/")+"/")+t)),e.push(o)),1;if(i=0,r=r===""?".":r+":",$R(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+f1(s,a);i+=ig(s,e,n,l,o)}else if(l=_q(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+f1(s,a++),i+=ig(s,e,n,l,o);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return i}function Vp(t,e,n){if(t==null)return t;var r=[],o=0;return ig(t,r,"","",function(s){return e.call(n,s,o++)}),r}function Eq(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var hr={current:null},ag={transition:null},Mq={ReactCurrentDispatcher:hr,ReactCurrentBatchConfig:ag,ReactCurrentOwner:PC};rt.Children={map:Vp,forEach:function(t,e,n){Vp(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Vp(t,function(){e++}),e},toArray:function(t){return Vp(t,function(e){return e})||[]},only:function(t){if(!AC(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};rt.Component=ad;rt.Fragment=pq;rt.Profiler=gq;rt.PureComponent=RC;rt.StrictMode=mq;rt.Suspense=wq;rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mq;rt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Sj({},t.props),o=t.key,s=t.ref,i=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,i=PC.current),e.key!==void 0&&(o=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)kj.call(e,l)&&!Ej.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Xh,type:t.type,key:o,ref:s,props:r,_owner:i}};rt.createContext=function(t){return t={$$typeof:yq,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:vq,_context:t},t.Consumer=t};rt.createElement=Mj;rt.createFactory=function(t){var e=Mj.bind(null,t);return e.type=t,e};rt.createRef=function(){return{current:null}};rt.forwardRef=function(t){return{$$typeof:bq,render:t}};rt.isValidElement=AC;rt.lazy=function(t){return{$$typeof:Sq,_payload:{_status:-1,_result:t},_init:Eq}};rt.memo=function(t,e){return{$$typeof:xq,type:t,compare:e===void 0?null:e}};rt.startTransition=function(t){var e=ag.transition;ag.transition={};try{t()}finally{ag.transition=e}};rt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};rt.useCallback=function(t,e){return hr.current.useCallback(t,e)};rt.useContext=function(t){return hr.current.useContext(t)};rt.useDebugValue=function(){};rt.useDeferredValue=function(t){return hr.current.useDeferredValue(t)};rt.useEffect=function(t,e){return hr.current.useEffect(t,e)};rt.useId=function(){return hr.current.useId()};rt.useImperativeHandle=function(t,e,n){return hr.current.useImperativeHandle(t,e,n)};rt.useInsertionEffect=function(t,e){return hr.current.useInsertionEffect(t,e)};rt.useLayoutEffect=function(t,e){return hr.current.useLayoutEffect(t,e)};rt.useMemo=function(t,e){return hr.current.useMemo(t,e)};rt.useReducer=function(t,e,n){return hr.current.useReducer(t,e,n)};rt.useRef=function(t){return hr.current.useRef(t)};rt.useState=function(t){return hr.current.useState(t)};rt.useSyncExternalStore=function(t,e,n){return hr.current.useSyncExternalStore(t,e,n)};rt.useTransition=function(){return hr.current.useTransition()};rt.version="18.2.0";wj.exports=rt;var C=wj.exports;const $t=bi(C),Kf=q7({__proto__:null,default:$t},[C]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Tq=C,Rq=Symbol.for("react.element"),Oq=Symbol.for("react.fragment"),Pq=Object.prototype.hasOwnProperty,Aq=Tq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Dq={key:!0,ref:!0,__self:!0,__source:!0};function Tj(t,e,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)Pq.call(e,r)&&!Dq.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:Rq,type:t,key:s,ref:i,props:o,_owner:Aq.current}}z0.Fragment=Oq;z0.jsx=Tj;z0.jsxs=Tj;bj.exports=z0;var g=bj.exports,zR={},Rj={exports:{}},to={},Oj={exports:{}},Pj={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(t){function e(I,$){var j=I.length;I.push($);e:for(;0<j;){var W=j-1>>>1,G=I[W];if(0<o(G,$))I[W]=$,I[j]=G,j=W;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var $=I[0],j=I.pop();if(j!==$){I[0]=j;e:for(var W=0,G=I.length,X=G>>>1;W<X;){var q=2*(W+1)-1,B=I[q],Q=q+1,Z=I[Q];if(0>o(B,j))Q<G&&0>o(Z,B)?(I[W]=Z,I[Q]=j,W=Q):(I[W]=B,I[q]=j,W=q);else if(Q<G&&0>o(Z,j))I[W]=Z,I[Q]=j,W=Q;else break e}}return $}function o(I,$){var j=I.sortIndex-$.sortIndex;return j!==0?j:I.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();t.unstable_now=function(){return i.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(I){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=I)r(c),$.sortIndex=$.expirationTime,e(l,$);else break;$=n(c)}}function S(I){if(m=!1,w(I),!p)if(n(l)!==null)p=!0,D(_);else{var $=n(c);$!==null&&F(S,$.startTime-I)}}function _(I,$){p=!1,m&&(m=!1,y(T),T=-1),h=!0;var j=f;try{for(w($),d=n(l);d!==null&&(!(d.expirationTime>$)||I&&!L());){var W=d.callback;if(typeof W=="function"){d.callback=null,f=d.priorityLevel;var G=W(d.expirationTime<=$);$=t.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),w($)}else r(l);d=n(l)}if(d!==null)var X=!0;else{var q=n(c);q!==null&&F(S,q.startTime-$),X=!1}return X}finally{d=null,f=j,h=!1}}var k=!1,M=null,T=-1,P=5,A=-1;function L(){return!(t.unstable_now()-A<P)}function V(){if(M!==null){var I=t.unstable_now();A=I;var $=!0;try{$=M(!0,I)}finally{$?H():(k=!1,M=null)}}else k=!1}var H;if(typeof b=="function")H=function(){b(V)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,N=z.port2;z.port1.onmessage=V,H=function(){N.postMessage(null)}}else H=function(){v(V,0)};function D(I){M=I,k||(k=!0,H())}function F(I,$){T=v(function(){I(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(I){I.callback=null},t.unstable_continueExecution=function(){p||h||(p=!0,D(_))},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(I){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var j=f;f=$;try{return I()}finally{f=j}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(I,$){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var j=f;f=I;try{return $()}finally{f=j}},t.unstable_scheduleCallback=function(I,$,j){var W=t.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?W+j:W):j=W,I){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=j+G,I={id:u++,callback:$,priorityLevel:I,startTime:j,expirationTime:G,sortIndex:-1},j>W?(I.sortIndex=j,e(c,I),n(l)===null&&I===n(c)&&(m?(y(T),T=-1):m=!0,F(S,j-W))):(I.sortIndex=G,e(l,I),p||h||(p=!0,D(_))),I},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(I){var $=f;return function(){var j=f;f=$;try{return I.apply(this,arguments)}finally{f=j}}}})(Pj);Oj.exports=Pj;var Iq=Oj.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Aj=C,Kr=Iq;function me(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Dj=new Set,Yf={};function ac(t,e){Pu(t,e),Pu(t+"Capture",e)}function Pu(t,e){for(Yf[t]=e,t=0;t<e.length;t++)Dj.add(e[t])}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lx=Object.prototype.hasOwnProperty,Nq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,BR={},VR={};function Lq(t){return Lx.call(VR,t)?!0:Lx.call(BR,t)?!1:Nq.test(t)?VR[t]=!0:(BR[t]=!0,!1)}function jq(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function $q(t,e,n,r){if(e===null||typeof e>"u"||jq(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function pr(t,e,n,r,o,s,i){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=i}var zn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){zn[t]=new pr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];zn[e]=new pr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){zn[t]=new pr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){zn[t]=new pr(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){zn[t]=new pr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){zn[t]=new pr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){zn[t]=new pr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){zn[t]=new pr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){zn[t]=new pr(t,5,!1,t.toLowerCase(),null,!1,!1)});var DC=/[\-:]([a-z])/g;function IC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(DC,IC);zn[e]=new pr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(DC,IC);zn[e]=new pr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(DC,IC);zn[e]=new pr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){zn[t]=new pr(t,1,!1,t.toLowerCase(),null,!1,!1)});zn.xlinkHref=new pr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){zn[t]=new pr(t,1,!1,t.toLowerCase(),null,!0,!0)});function NC(t,e,n,r){var o=zn.hasOwnProperty(e)?zn[e]:null;(o!==null?o.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&($q(e,n,o,r)&&(n=null),r||o===null?Lq(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):o.mustUseProperty?t[o.propertyName]=n===null?o.type===3?!1:"":n:(e=o.attributeName,r=o.attributeNamespace,n===null?t.removeAttribute(e):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var wi=Aj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hp=Symbol.for("react.element"),qc=Symbol.for("react.portal"),Xc=Symbol.for("react.fragment"),LC=Symbol.for("react.strict_mode"),jx=Symbol.for("react.profiler"),Ij=Symbol.for("react.provider"),Nj=Symbol.for("react.context"),jC=Symbol.for("react.forward_ref"),$x=Symbol.for("react.suspense"),Fx=Symbol.for("react.suspense_list"),$C=Symbol.for("react.memo"),zi=Symbol.for("react.lazy"),Lj=Symbol.for("react.offscreen"),HR=Symbol.iterator;function Nd(t){return t===null||typeof t!="object"?null:(t=HR&&t[HR]||t["@@iterator"],typeof t=="function"?t:null)}var Vt=Object.assign,h1;function sf(t){if(h1===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);h1=e&&e[1]||""}return`
`+h1+t}var p1=!1;function m1(t,e){if(!t||p1)return"";p1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
`),s=r.stack.split(`
`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
`+o[i].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=i&&0<=a);break}}}finally{p1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?sf(t):""}function Fq(t){switch(t.tag){case 5:return sf(t.type);case 16:return sf("Lazy");case 13:return sf("Suspense");case 19:return sf("SuspenseList");case 0:case 2:case 15:return t=m1(t.type,!1),t;case 11:return t=m1(t.type.render,!1),t;case 1:return t=m1(t.type,!0),t;default:return""}}function zx(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Xc:return"Fragment";case qc:return"Portal";case jx:return"Profiler";case LC:return"StrictMode";case $x:return"Suspense";case Fx:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Nj:return(t.displayName||"Context")+".Consumer";case Ij:return(t._context.displayName||"Context")+".Provider";case jC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case $C:return e=t.displayName||null,e!==null?e:zx(t.type)||"Memo";case zi:e=t._payload,t=t._init;try{return zx(t(e))}catch{}}return null}function zq(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zx(e);case 8:return e===LC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function xa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function jj(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Bq(t){var e=jj(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Wp(t){t._valueTracker||(t._valueTracker=Bq(t))}function $j(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=jj(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Vg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Bx(t,e){var n=e.checked;return Vt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function WR(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=xa(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Fj(t,e){e=e.checked,e!=null&&NC(t,"checked",e,!1)}function Vx(t,e){Fj(t,e);var n=xa(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Hx(t,e.type,n):e.hasOwnProperty("defaultValue")&&Hx(t,e.type,xa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function UR(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Hx(t,e,n){(e!=="number"||Vg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var af=Array.isArray;function uu(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&r&&(t[n].defaultSelected=!0)}else{for(n=""+xa(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,r&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}e!==null&&(e.selected=!0)}}function Wx(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(me(91));return Vt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function GR(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(me(92));if(af(n)){if(1<n.length)throw Error(me(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:xa(n)}}function zj(t,e){var n=xa(e.value),r=xa(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function KR(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Bj(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ux(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Bj(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Up,Vj=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Up=Up||document.createElement("div"),Up.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Up.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function qf(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Sf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vq=["Webkit","ms","Moz","O"];Object.keys(Sf).forEach(function(t){Vq.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Sf[e]=Sf[t]})});function Hj(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Sf.hasOwnProperty(t)&&Sf[t]?(""+e).trim():e+"px"}function Wj(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Hj(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}var Hq=Vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Gx(t,e){if(e){if(Hq[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(me(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(me(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(me(61))}if(e.style!=null&&typeof e.style!="object")throw Error(me(62))}}function Kx(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yx=null;function FC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qx=null,du=null,fu=null;function YR(t){if(t=Zh(t)){if(typeof qx!="function")throw Error(me(280));var e=t.stateNode;e&&(e=U0(e),qx(t.stateNode,t.type,e))}}function Uj(t){du?fu?fu.push(t):fu=[t]:du=t}function Gj(){if(du){var t=du,e=fu;if(fu=du=null,YR(t),e)for(t=0;t<e.length;t++)YR(e[t])}}function Kj(t,e){return t(e)}function Yj(){}var g1=!1;function qj(t,e,n){if(g1)return t(e,n);g1=!0;try{return Kj(t,e,n)}finally{g1=!1,(du!==null||fu!==null)&&(Yj(),Gj())}}function Xf(t,e){var n=t.stateNode;if(n===null)return null;var r=U0(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(me(231,e,typeof n));return n}var Xx=!1;if(fi)try{var Ld={};Object.defineProperty(Ld,"passive",{get:function(){Xx=!0}}),window.addEventListener("test",Ld,Ld),window.removeEventListener("test",Ld,Ld)}catch{Xx=!1}function Wq(t,e,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var _f=!1,Hg=null,Wg=!1,Jx=null,Uq={onError:function(t){_f=!0,Hg=t}};function Gq(t,e,n,r,o,s,i,a,l){_f=!1,Hg=null,Wq.apply(Uq,arguments)}function Kq(t,e,n,r,o,s,i,a,l){if(Gq.apply(this,arguments),_f){if(_f){var c=Hg;_f=!1,Hg=null}else throw Error(me(198));Wg||(Wg=!0,Jx=c)}}function lc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Xj(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qR(t){if(lc(t)!==t)throw Error(me(188))}function Yq(t){var e=t.alternate;if(!e){if(e=lc(t),e===null)throw Error(me(188));return e!==t?null:t}for(var n=t,r=e;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return qR(o),t;if(s===r)return qR(o),e;s=s.sibling}throw Error(me(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(me(189))}}if(n.alternate!==r)throw Error(me(190))}if(n.tag!==3)throw Error(me(188));return n.stateNode.current===n?t:e}function Jj(t){return t=Yq(t),t!==null?Qj(t):null}function Qj(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Qj(t);if(e!==null)return e;t=t.sibling}return null}var Zj=Kr.unstable_scheduleCallback,XR=Kr.unstable_cancelCallback,qq=Kr.unstable_shouldYield,Xq=Kr.unstable_requestPaint,Zt=Kr.unstable_now,Jq=Kr.unstable_getCurrentPriorityLevel,zC=Kr.unstable_ImmediatePriority,e$=Kr.unstable_UserBlockingPriority,Ug=Kr.unstable_NormalPriority,Qq=Kr.unstable_LowPriority,t$=Kr.unstable_IdlePriority,B0=null,Ps=null;function Zq(t){if(Ps&&typeof Ps.onCommitFiberRoot=="function")try{Ps.onCommitFiberRoot(B0,t,void 0,(t.current.flags&128)===128)}catch{}}var Go=Math.clz32?Math.clz32:nX,eX=Math.log,tX=Math.LN2;function nX(t){return t>>>=0,t===0?32:31-(eX(t)/tX|0)|0}var Gp=64,Kp=4194304;function lf(t){switch(t&-t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Gg(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,o=t.suspendedLanes,s=t.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=lf(a):(s&=i,s!==0&&(r=lf(s)))}else i=n&~o,i!==0?r=lf(i):s!==0&&(r=lf(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&o)&&(o=r&-r,s=e&-e,o>=s||o===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Go(e),o=1<<n,r|=t[n],e&=~o;return r}function rX(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oX(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,o=t.expirationTimes,s=t.pendingLanes;0<s;){var i=31-Go(s),a=1<<i,l=o[i];l===-1?(!(a&n)||a&r)&&(o[i]=rX(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Qx(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function n$(){var t=Gp;return Gp<<=1,!(Gp&4194240)&&(Gp=64),t}function v1(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Jh(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Go(e),t[e]=n}function sX(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var o=31-Go(n),s=1<<o;e[o]=0,r[o]=-1,t[o]=-1,n&=~s}}function BC(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Go(n),o=1<<r;o&e|t[r]&e&&(t[r]|=e),n&=~o}}var vt=0;function r$(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var o$,VC,s$,i$,a$,Zx=!1,Yp=[],sa=null,ia=null,aa=null,Jf=new Map,Qf=new Map,Ui=[],iX="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function JR(t,e){switch(t){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":ia=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":Jf.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qf.delete(e.pointerId)}}function jd(t,e,n,r,o,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},e!==null&&(e=Zh(e),e!==null&&VC(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function aX(t,e,n,r,o){switch(e){case"focusin":return sa=jd(sa,t,e,n,r,o),!0;case"dragenter":return ia=jd(ia,t,e,n,r,o),!0;case"mouseover":return aa=jd(aa,t,e,n,r,o),!0;case"pointerover":var s=o.pointerId;return Jf.set(s,jd(Jf.get(s)||null,t,e,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Qf.set(s,jd(Qf.get(s)||null,t,e,n,r,o)),!0}return!1}function l$(t){var e=wl(t.target);if(e!==null){var n=lc(e);if(n!==null){if(e=n.tag,e===13){if(e=Xj(n),e!==null){t.blockedOn=e,a$(t.priority,function(){s$(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function lg(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=eS(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Yx=r,n.target.dispatchEvent(r),Yx=null}else return e=Zh(n),e!==null&&VC(e),t.blockedOn=n,!1;e.shift()}return!0}function QR(t,e,n){lg(t)&&n.delete(e)}function lX(){Zx=!1,sa!==null&&lg(sa)&&(sa=null),ia!==null&&lg(ia)&&(ia=null),aa!==null&&lg(aa)&&(aa=null),Jf.forEach(QR),Qf.forEach(QR)}function $d(t,e){t.blockedOn===e&&(t.blockedOn=null,Zx||(Zx=!0,Kr.unstable_scheduleCallback(Kr.unstable_NormalPriority,lX)))}function Zf(t){function e(o){return $d(o,t)}if(0<Yp.length){$d(Yp[0],t);for(var n=1;n<Yp.length;n++){var r=Yp[n];r.blockedOn===t&&(r.blockedOn=null)}}for(sa!==null&&$d(sa,t),ia!==null&&$d(ia,t),aa!==null&&$d(aa,t),Jf.forEach(e),Qf.forEach(e),n=0;n<Ui.length;n++)r=Ui[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Ui.length&&(n=Ui[0],n.blockedOn===null);)l$(n),n.blockedOn===null&&Ui.shift()}var hu=wi.ReactCurrentBatchConfig,Kg=!0;function cX(t,e,n,r){var o=vt,s=hu.transition;hu.transition=null;try{vt=1,HC(t,e,n,r)}finally{vt=o,hu.transition=s}}function uX(t,e,n,r){var o=vt,s=hu.transition;hu.transition=null;try{vt=4,HC(t,e,n,r)}finally{vt=o,hu.transition=s}}function HC(t,e,n,r){if(Kg){var o=eS(t,e,n,r);if(o===null)M1(t,e,r,Yg,n),JR(t,r);else if(aX(o,t,e,n,r))r.stopPropagation();else if(JR(t,r),e&4&&-1<iX.indexOf(t)){for(;o!==null;){var s=Zh(o);if(s!==null&&o$(s),s=eS(t,e,n,r),s===null&&M1(t,e,r,Yg,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else M1(t,e,r,null,n)}}var Yg=null;function eS(t,e,n,r){if(Yg=null,t=FC(r),t=wl(t),t!==null)if(e=lc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Xj(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Yg=t,null}function c$(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Jq()){case zC:return 1;case e$:return 4;case Ug:case Qq:return 16;case t$:return 536870912;default:return 16}default:return 16}}var qi=null,WC=null,cg=null;function u$(){if(cg)return cg;var t,e=WC,n=e.length,r,o="value"in qi?qi.value:qi.textContent,s=o.length;for(t=0;t<n&&e[t]===o[t];t++);var i=n-t;for(r=1;r<=i&&e[n-r]===o[s-r];r++);return cg=o.slice(t,1<r?1-r:void 0)}function ug(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function qp(){return!0}function ZR(){return!1}function no(t){function e(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?qp:ZR,this.isPropagationStopped=ZR,this}return Vt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qp)},persist:function(){},isPersistent:qp}),e}var ld={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},UC=no(ld),Qh=Vt({},ld,{view:0,detail:0}),dX=no(Qh),y1,b1,Fd,V0=Vt({},Qh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:GC,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Fd&&(Fd&&t.type==="mousemove"?(y1=t.screenX-Fd.screenX,b1=t.screenY-Fd.screenY):b1=y1=0,Fd=t),y1)},movementY:function(t){return"movementY"in t?t.movementY:b1}}),eO=no(V0),fX=Vt({},V0,{dataTransfer:0}),hX=no(fX),pX=Vt({},Qh,{relatedTarget:0}),w1=no(pX),mX=Vt({},ld,{animationName:0,elapsedTime:0,pseudoElement:0}),gX=no(mX),vX=Vt({},ld,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),yX=no(vX),bX=Vt({},ld,{data:0}),tO=no(bX),wX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xX={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},SX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _X(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=SX[t])?!!e[t]:!1}function GC(){return _X}var CX=Vt({},Qh,{key:function(t){if(t.key){var e=wX[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ug(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?xX[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:GC,charCode:function(t){return t.type==="keypress"?ug(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ug(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),kX=no(CX),EX=Vt({},V0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nO=no(EX),MX=Vt({},Qh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:GC}),TX=no(MX),RX=Vt({},ld,{propertyName:0,elapsedTime:0,pseudoElement:0}),OX=no(RX),PX=Vt({},V0,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),AX=no(PX),DX=[9,13,27,32],KC=fi&&"CompositionEvent"in window,Cf=null;fi&&"documentMode"in document&&(Cf=document.documentMode);var IX=fi&&"TextEvent"in window&&!Cf,d$=fi&&(!KC||Cf&&8<Cf&&11>=Cf),rO=" ",oO=!1;function f$(t,e){switch(t){case"keyup":return DX.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function h$(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Jc=!1;function NX(t,e){switch(t){case"compositionend":return h$(e);case"keypress":return e.which!==32?null:(oO=!0,rO);case"textInput":return t=e.data,t===rO&&oO?null:t;default:return null}}function LX(t,e){if(Jc)return t==="compositionend"||!KC&&f$(t,e)?(t=u$(),cg=WC=qi=null,Jc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return d$&&e.locale!=="ko"?null:e.data;default:return null}}var jX={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!jX[t.type]:e==="textarea"}function p$(t,e,n,r){Uj(r),e=qg(e,"onChange"),0<e.length&&(n=new UC("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var kf=null,eh=null;function $X(t){k$(t,0)}function H0(t){var e=eu(t);if($j(e))return t}function FX(t,e){if(t==="change")return e}var m$=!1;if(fi){var x1;if(fi){var S1="oninput"in document;if(!S1){var iO=document.createElement("div");iO.setAttribute("oninput","return;"),S1=typeof iO.oninput=="function"}x1=S1}else x1=!1;m$=x1&&(!document.documentMode||9<document.documentMode)}function aO(){kf&&(kf.detachEvent("onpropertychange",g$),eh=kf=null)}function g$(t){if(t.propertyName==="value"&&H0(eh)){var e=[];p$(e,eh,t,FC(t)),qj($X,e)}}function zX(t,e,n){t==="focusin"?(aO(),kf=e,eh=n,kf.attachEvent("onpropertychange",g$)):t==="focusout"&&aO()}function BX(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return H0(eh)}function VX(t,e){if(t==="click")return H0(e)}function HX(t,e){if(t==="input"||t==="change")return H0(e)}function WX(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Jo=typeof Object.is=="function"?Object.is:WX;function th(t,e){if(Jo(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Lx.call(e,o)||!Jo(t[o],e[o]))return!1}return!0}function lO(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function cO(t,e){var n=lO(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lO(n)}}function v$(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?v$(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function y$(){for(var t=window,e=Vg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Vg(t.document)}return e}function YC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function UX(t){var e=y$(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&v$(n.ownerDocument.documentElement,n)){if(r!==null&&YC(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!t.extend&&s>r&&(o=r,r=s,s=o),o=cO(n,s);var i=cO(n,r);o&&i&&(t.rangeCount!==1||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)&&(e=e.createRange(),e.setStart(o.node,o.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(i.node,i.offset)):(e.setEnd(i.node,i.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var GX=fi&&"documentMode"in document&&11>=document.documentMode,Qc=null,tS=null,Ef=null,nS=!1;function uO(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nS||Qc==null||Qc!==Vg(r)||(r=Qc,"selectionStart"in r&&YC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ef&&th(Ef,r)||(Ef=r,r=qg(tS,"onSelect"),0<r.length&&(e=new UC("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Qc)))}function Xp(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Zc={animationend:Xp("Animation","AnimationEnd"),animationiteration:Xp("Animation","AnimationIteration"),animationstart:Xp("Animation","AnimationStart"),transitionend:Xp("Transition","TransitionEnd")},_1={},b$={};fi&&(b$=document.createElement("div").style,"AnimationEvent"in window||(delete Zc.animationend.animation,delete Zc.animationiteration.animation,delete Zc.animationstart.animation),"TransitionEvent"in window||delete Zc.transitionend.transition);function W0(t){if(_1[t])return _1[t];if(!Zc[t])return t;var e=Zc[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in b$)return _1[t]=e[n];return t}var w$=W0("animationend"),x$=W0("animationiteration"),S$=W0("animationstart"),_$=W0("transitionend"),C$=new Map,dO="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Na(t,e){C$.set(t,e),ac(e,[t])}for(var C1=0;C1<dO.length;C1++){var k1=dO[C1],KX=k1.toLowerCase(),YX=k1[0].toUpperCase()+k1.slice(1);Na(KX,"on"+YX)}Na(w$,"onAnimationEnd");Na(x$,"onAnimationIteration");Na(S$,"onAnimationStart");Na("dblclick","onDoubleClick");Na("focusin","onFocus");Na("focusout","onBlur");Na(_$,"onTransitionEnd");Pu("onMouseEnter",["mouseout","mouseover"]);Pu("onMouseLeave",["mouseout","mouseover"]);Pu("onPointerEnter",["pointerout","pointerover"]);Pu("onPointerLeave",["pointerout","pointerover"]);ac("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ac("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ac("onBeforeInput",["compositionend","keypress","textInput","paste"]);ac("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ac("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ac("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qX=new Set("cancel close invalid load scroll toggle".split(" ").concat(cf));function fO(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Kq(r,e,void 0,t),t.currentTarget=null}function k$(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],o=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;fO(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;fO(o,a,c),s=l}}}if(Wg)throw t=Jx,Wg=!1,Jx=null,t}function Tt(t,e){var n=e[aS];n===void 0&&(n=e[aS]=new Set);var r=t+"__bubble";n.has(r)||(E$(e,t,2,!1),n.add(r))}function E1(t,e,n){var r=0;e&&(r|=4),E$(n,t,r,e)}var Jp="_reactListening"+Math.random().toString(36).slice(2);function nh(t){if(!t[Jp]){t[Jp]=!0,Dj.forEach(function(n){n!=="selectionchange"&&(qX.has(n)||E1(n,!1,t),E1(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Jp]||(e[Jp]=!0,E1("selectionchange",!1,e))}}function E$(t,e,n,r){switch(c$(e)){case 1:var o=cX;break;case 4:o=uX;break;default:o=HC}n=o.bind(null,e,n,t),o=void 0,!Xx||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),r?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function M1(t,e,n,r,o){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=wl(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}qj(function(){var c=s,u=FC(n),d=[];e:{var f=C$.get(t);if(f!==void 0){var h=UC,p=t;switch(t){case"keypress":if(ug(n)===0)break e;case"keydown":case"keyup":h=kX;break;case"focusin":p="focus",h=w1;break;case"focusout":p="blur",h=w1;break;case"beforeblur":case"afterblur":h=w1;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=eO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=hX;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=TX;break;case w$:case x$:case S$:h=gX;break;case _$:h=OX;break;case"scroll":h=dX;break;case"wheel":h=AX;break;case"copy":case"cut":case"paste":h=yX;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=nO}var m=(e&4)!==0,v=!m&&t==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var b=c,w;b!==null;){w=b;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,y!==null&&(S=Xf(b,y),S!=null&&m.push(rh(b,S,w)))),v)break;b=b.return}0<m.length&&(f=new h(f,p,null,n,u),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==Yx&&(p=n.relatedTarget||n.fromElement)&&(wl(p)||p[hi]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?wl(p):null,p!==null&&(v=lc(p),p!==v||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(m=eO,S="onMouseLeave",y="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(m=nO,S="onPointerLeave",y="onPointerEnter",b="pointer"),v=h==null?f:eu(h),w=p==null?f:eu(p),f=new m(S,b+"leave",h,n,u),f.target=v,f.relatedTarget=w,S=null,wl(u)===c&&(m=new m(y,b+"enter",p,n,u),m.target=w,m.relatedTarget=v,S=m),v=S,h&&p)t:{for(m=h,y=p,b=0,w=m;w;w=Ec(w))b++;for(w=0,S=y;S;S=Ec(S))w++;for(;0<b-w;)m=Ec(m),b--;for(;0<w-b;)y=Ec(y),w--;for(;b--;){if(m===y||y!==null&&m===y.alternate)break t;m=Ec(m),y=Ec(y)}m=null}else m=null;h!==null&&hO(d,f,h,m,!1),p!==null&&v!==null&&hO(d,v,p,m,!0)}}e:{if(f=c?eu(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=FX;else if(sO(f))if(m$)_=HX;else{_=BX;var k=zX}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=VX);if(_&&(_=_(t,c))){p$(d,_,n,u);break e}k&&k(t,f,c),t==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Hx(f,"number",f.value)}switch(k=c?eu(c):window,t){case"focusin":(sO(k)||k.contentEditable==="true")&&(Qc=k,tS=c,Ef=null);break;case"focusout":Ef=tS=Qc=null;break;case"mousedown":nS=!0;break;case"contextmenu":case"mouseup":case"dragend":nS=!1,uO(d,n,u);break;case"selectionchange":if(GX)break;case"keydown":case"keyup":uO(d,n,u)}var M;if(KC)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Jc?f$(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(d$&&n.locale!=="ko"&&(Jc||T!=="onCompositionStart"?T==="onCompositionEnd"&&Jc&&(M=u$()):(qi=u,WC="value"in qi?qi.value:qi.textContent,Jc=!0)),k=qg(c,T),0<k.length&&(T=new tO(T,t,null,n,u),d.push({event:T,listeners:k}),M?T.data=M:(M=h$(n),M!==null&&(T.data=M)))),(M=IX?NX(t,n):LX(t,n))&&(c=qg(c,"onBeforeInput"),0<c.length&&(u=new tO("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=M))}k$(d,e)})}function rh(t,e,n){return{instance:t,listener:e,currentTarget:n}}function qg(t,e){for(var n=e+"Capture",r=[];t!==null;){var o=t,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Xf(t,n),s!=null&&r.unshift(rh(t,s,o)),s=Xf(t,e),s!=null&&r.push(rh(t,s,o))),t=t.return}return r}function Ec(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function hO(t,e,n,r,o){for(var s=e._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=Xf(n,s),l!=null&&i.unshift(rh(n,l,a))):o||(l=Xf(n,s),l!=null&&i.push(rh(n,l,a)))),n=n.return}i.length!==0&&t.push({event:e,listeners:i})}var XX=/\r\n?/g,JX=/\u0000|\uFFFD/g;function pO(t){return(typeof t=="string"?t:""+t).replace(XX,`
`).replace(JX,"")}function Qp(t,e,n){if(e=pO(e),pO(t)!==e&&n)throw Error(me(425))}function Xg(){}var rS=null,oS=null;function sS(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var iS=typeof setTimeout=="function"?setTimeout:void 0,QX=typeof clearTimeout=="function"?clearTimeout:void 0,mO=typeof Promise=="function"?Promise:void 0,ZX=typeof queueMicrotask=="function"?queueMicrotask:typeof mO<"u"?function(t){return mO.resolve(null).then(t).catch(eJ)}:iS;function eJ(t){setTimeout(function(){throw t})}function T1(t,e){var n=e,r=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){t.removeChild(o),Zf(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Zf(e)}function la(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function gO(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var cd=Math.random().toString(36).slice(2),Ss="__reactFiber$"+cd,oh="__reactProps$"+cd,hi="__reactContainer$"+cd,aS="__reactEvents$"+cd,tJ="__reactListeners$"+cd,nJ="__reactHandles$"+cd;function wl(t){var e=t[Ss];if(e)return e;for(var n=t.parentNode;n;){if(e=n[hi]||n[Ss]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=gO(t);t!==null;){if(n=t[Ss])return n;t=gO(t)}return e}t=n,n=t.parentNode}return null}function Zh(t){return t=t[Ss]||t[hi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function eu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(me(33))}function U0(t){return t[oh]||null}var lS=[],tu=-1;function La(t){return{current:t}}function Rt(t){0>tu||(t.current=lS[tu],lS[tu]=null,tu--)}function Et(t,e){tu++,lS[tu]=t.current,t.current=e}var Sa={},Jn=La(Sa),Mr=La(!1),Wl=Sa;function Au(t,e){var n=t.type.contextTypes;if(!n)return Sa;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function Tr(t){return t=t.childContextTypes,t!=null}function Jg(){Rt(Mr),Rt(Jn)}function vO(t,e,n){if(Jn.current!==Sa)throw Error(me(168));Et(Jn,e),Et(Mr,n)}function M$(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(me(108,zq(t)||"Unknown",o));return Vt({},n,r)}function Qg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Sa,Wl=Jn.current,Et(Jn,t),Et(Mr,Mr.current),!0}function yO(t,e,n){var r=t.stateNode;if(!r)throw Error(me(169));n?(t=M$(t,e,Wl),r.__reactInternalMemoizedMergedChildContext=t,Rt(Mr),Rt(Jn),Et(Jn,t)):Rt(Mr),Et(Mr,n)}var qs=null,G0=!1,R1=!1;function T$(t){qs===null?qs=[t]:qs.push(t)}function rJ(t){G0=!0,T$(t)}function ja(){if(!R1&&qs!==null){R1=!0;var t=0,e=vt;try{var n=qs;for(vt=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}qs=null,G0=!1}catch(o){throw qs!==null&&(qs=qs.slice(t+1)),Zj(zC,ja),o}finally{vt=e,R1=!1}}return null}var nu=[],ru=0,Zg=null,ev=0,uo=[],fo=0,Ul=null,Qs=1,Zs="";function cl(t,e){nu[ru++]=ev,nu[ru++]=Zg,Zg=t,ev=e}function R$(t,e,n){uo[fo++]=Qs,uo[fo++]=Zs,uo[fo++]=Ul,Ul=t;var r=Qs;t=Zs;var o=32-Go(r)-1;r&=~(1<<o),n+=1;var s=32-Go(e)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Qs=1<<32-Go(e)+o|n<<o|r,Zs=s+t}else Qs=1<<s|n<<o|r,Zs=t}function qC(t){t.return!==null&&(cl(t,1),R$(t,1,0))}function XC(t){for(;t===Zg;)Zg=nu[--ru],nu[ru]=null,ev=nu[--ru],nu[ru]=null;for(;t===Ul;)Ul=uo[--fo],uo[fo]=null,Zs=uo[--fo],uo[fo]=null,Qs=uo[--fo],uo[fo]=null}var Hr=null,zr=null,At=!1,Fo=null;function O$(t,e){var n=ho(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function bO(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Hr=t,zr=la(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Hr=t,zr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Ul!==null?{id:Qs,overflow:Zs}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ho(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Hr=t,zr=null,!0):!1;default:return!1}}function cS(t){return(t.mode&1)!==0&&(t.flags&128)===0}function uS(t){if(At){var e=zr;if(e){var n=e;if(!bO(t,e)){if(cS(t))throw Error(me(418));e=la(n.nextSibling);var r=Hr;e&&bO(t,e)?O$(r,n):(t.flags=t.flags&-4097|2,At=!1,Hr=t)}}else{if(cS(t))throw Error(me(418));t.flags=t.flags&-4097|2,At=!1,Hr=t}}}function wO(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Hr=t}function Zp(t){if(t!==Hr)return!1;if(!At)return wO(t),At=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!sS(t.type,t.memoizedProps)),e&&(e=zr)){if(cS(t))throw P$(),Error(me(418));for(;e;)O$(t,e),e=la(e.nextSibling)}if(wO(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(me(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){zr=la(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}zr=null}}else zr=Hr?la(t.stateNode.nextSibling):null;return!0}function P$(){for(var t=zr;t;)t=la(t.nextSibling)}function Du(){zr=Hr=null,At=!1}function JC(t){Fo===null?Fo=[t]:Fo.push(t)}var oJ=wi.ReactCurrentBatchConfig;function jo(t,e){if(t&&t.defaultProps){e=Vt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var tv=La(null),nv=null,ou=null,QC=null;function ZC(){QC=ou=nv=null}function ek(t){var e=tv.current;Rt(tv),t._currentValue=e}function dS(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function pu(t,e){nv=t,QC=ou=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(kr=!0),t.firstContext=null)}function Co(t){var e=t._currentValue;if(QC!==t)if(t={context:t,memoizedValue:e,next:null},ou===null){if(nv===null)throw Error(me(308));ou=t,nv.dependencies={lanes:0,firstContext:t}}else ou=ou.next=t;return e}var xl=null;function tk(t){xl===null?xl=[t]:xl.push(t)}function A$(t,e,n,r){var o=e.interleaved;return o===null?(n.next=n,tk(e)):(n.next=o.next,o.next=n),e.interleaved=n,pi(t,r)}function pi(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Bi=!1;function nk(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function D$(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ii(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ca(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,at&2){var o=r.pending;return o===null?e.next=e:(e.next=o.next,o.next=e),r.pending=e,pi(t,n)}return o=r.interleaved,o===null?(e.next=e,tk(r)):(e.next=o.next,o.next=e),r.interleaved=e,pi(t,n)}function dg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,BC(t,n)}}function xO(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=e:s=s.next=e}else o=s=e;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function rv(t,e,n,r){var o=t.updateQueue;Bi=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=t,m=a;switch(f=e,h=n,m.tag){case 1:if(p=m.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=Vt({},d,f);break e;case 2:Bi=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,i|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,e=o.shared.interleaved,e!==null){o=e;do i|=o.lane,o=o.next;while(o!==e)}else s===null&&(o.shared.lanes=0);Kl|=i,t.lanes=i,t.memoizedState=d}}function SO(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(me(191,o));o.call(r)}}}var I$=new Aj.Component().refs;function fS(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Vt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var K0={isMounted:function(t){return(t=t._reactInternals)?lc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=lr(),o=da(t),s=ii(r,o);s.payload=e,n!=null&&(s.callback=n),e=ca(t,s,o),e!==null&&(Ko(e,t,o,r),dg(e,t,o))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=lr(),o=da(t),s=ii(r,o);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=ca(t,s,o),e!==null&&(Ko(e,t,o,r),dg(e,t,o))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=lr(),r=da(t),o=ii(n,r);o.tag=2,e!=null&&(o.callback=e),e=ca(t,o,r),e!==null&&(Ko(e,t,r,n),dg(e,t,r))}};function _O(t,e,n,r,o,s,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,i):e.prototype&&e.prototype.isPureReactComponent?!th(n,r)||!th(o,s):!0}function N$(t,e,n){var r=!1,o=Sa,s=e.contextType;return typeof s=="object"&&s!==null?s=Co(s):(o=Tr(e)?Wl:Jn.current,r=e.contextTypes,s=(r=r!=null)?Au(t,o):Sa),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=K0,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=s),e}function CO(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&K0.enqueueReplaceState(e,e.state,null)}function hS(t,e,n,r){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs=I$,nk(t);var s=e.contextType;typeof s=="object"&&s!==null?o.context=Co(s):(s=Tr(e)?Wl:Jn.current,o.context=Au(t,s)),o.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(fS(t,e,s,n),o.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(e=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),e!==o.state&&K0.enqueueReplaceState(o,o.state,null),rv(t,n,o,r),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308)}function zd(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(me(309));var r=n.stateNode}if(!r)throw Error(me(147,t));var o=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(i){var a=o.refs;a===I$&&(a=o.refs={}),i===null?delete a[s]:a[s]=i},e._stringRef=s,e)}if(typeof t!="string")throw Error(me(284));if(!n._owner)throw Error(me(290,t))}return t}function em(t,e){throw t=Object.prototype.toString.call(e),Error(me(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function kO(t){var e=t._init;return e(t._payload)}function L$(t){function e(y,b){if(t){var w=y.deletions;w===null?(y.deletions=[b],y.flags|=16):w.push(b)}}function n(y,b){if(!t)return null;for(;b!==null;)e(y,b),b=b.sibling;return null}function r(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function o(y,b){return y=fa(y,b),y.index=0,y.sibling=null,y}function s(y,b,w){return y.index=w,t?(w=y.alternate,w!==null?(w=w.index,w<b?(y.flags|=2,b):w):(y.flags|=2,b)):(y.flags|=1048576,b)}function i(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,b,w,S){return b===null||b.tag!==6?(b=L1(w,y.mode,S),b.return=y,b):(b=o(b,w),b.return=y,b)}function l(y,b,w,S){var _=w.type;return _===Xc?u(y,b,w.props.children,S,w.key):b!==null&&(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===zi&&kO(_)===b.type)?(S=o(b,w.props),S.ref=zd(y,b,w),S.return=y,S):(S=vg(w.type,w.key,w.props,null,y.mode,S),S.ref=zd(y,b,w),S.return=y,S)}function c(y,b,w,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==w.containerInfo||b.stateNode.implementation!==w.implementation?(b=j1(w,y.mode,S),b.return=y,b):(b=o(b,w.children||[]),b.return=y,b)}function u(y,b,w,S,_){return b===null||b.tag!==7?(b=Al(w,y.mode,S,_),b.return=y,b):(b=o(b,w),b.return=y,b)}function d(y,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return b=L1(""+b,y.mode,w),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Hp:return w=vg(b.type,b.key,b.props,null,y.mode,w),w.ref=zd(y,null,b),w.return=y,w;case qc:return b=j1(b,y.mode,w),b.return=y,b;case zi:var S=b._init;return d(y,S(b._payload),w)}if(af(b)||Nd(b))return b=Al(b,y.mode,w,null),b.return=y,b;em(y,b)}return null}function f(y,b,w,S){var _=b!==null?b.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return _!==null?null:a(y,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Hp:return w.key===_?l(y,b,w,S):null;case qc:return w.key===_?c(y,b,w,S):null;case zi:return _=w._init,f(y,b,_(w._payload),S)}if(af(w)||Nd(w))return _!==null?null:u(y,b,w,S,null);em(y,w)}return null}function h(y,b,w,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(w)||null,a(b,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Hp:return y=y.get(S.key===null?w:S.key)||null,l(b,y,S,_);case qc:return y=y.get(S.key===null?w:S.key)||null,c(b,y,S,_);case zi:var k=S._init;return h(y,b,w,k(S._payload),_)}if(af(S)||Nd(S))return y=y.get(w)||null,u(b,y,S,_,null);em(b,S)}return null}function p(y,b,w,S){for(var _=null,k=null,M=b,T=b=0,P=null;M!==null&&T<w.length;T++){M.index>T?(P=M,M=null):P=M.sibling;var A=f(y,M,w[T],S);if(A===null){M===null&&(M=P);break}t&&M&&A.alternate===null&&e(y,M),b=s(A,b,T),k===null?_=A:k.sibling=A,k=A,M=P}if(T===w.length)return n(y,M),At&&cl(y,T),_;if(M===null){for(;T<w.length;T++)M=d(y,w[T],S),M!==null&&(b=s(M,b,T),k===null?_=M:k.sibling=M,k=M);return At&&cl(y,T),_}for(M=r(y,M);T<w.length;T++)P=h(M,y,T,w[T],S),P!==null&&(t&&P.alternate!==null&&M.delete(P.key===null?T:P.key),b=s(P,b,T),k===null?_=P:k.sibling=P,k=P);return t&&M.forEach(function(L){return e(y,L)}),At&&cl(y,T),_}function m(y,b,w,S){var _=Nd(w);if(typeof _!="function")throw Error(me(150));if(w=_.call(w),w==null)throw Error(me(151));for(var k=_=null,M=b,T=b=0,P=null,A=w.next();M!==null&&!A.done;T++,A=w.next()){M.index>T?(P=M,M=null):P=M.sibling;var L=f(y,M,A.value,S);if(L===null){M===null&&(M=P);break}t&&M&&L.alternate===null&&e(y,M),b=s(L,b,T),k===null?_=L:k.sibling=L,k=L,M=P}if(A.done)return n(y,M),At&&cl(y,T),_;if(M===null){for(;!A.done;T++,A=w.next())A=d(y,A.value,S),A!==null&&(b=s(A,b,T),k===null?_=A:k.sibling=A,k=A);return At&&cl(y,T),_}for(M=r(y,M);!A.done;T++,A=w.next())A=h(M,y,T,A.value,S),A!==null&&(t&&A.alternate!==null&&M.delete(A.key===null?T:A.key),b=s(A,b,T),k===null?_=A:k.sibling=A,k=A);return t&&M.forEach(function(V){return e(y,V)}),At&&cl(y,T),_}function v(y,b,w,S){if(typeof w=="object"&&w!==null&&w.type===Xc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Hp:e:{for(var _=w.key,k=b;k!==null;){if(k.key===_){if(_=w.type,_===Xc){if(k.tag===7){n(y,k.sibling),b=o(k,w.props.children),b.return=y,y=b;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===zi&&kO(_)===k.type){n(y,k.sibling),b=o(k,w.props),b.ref=zd(y,k,w),b.return=y,y=b;break e}n(y,k);break}else e(y,k);k=k.sibling}w.type===Xc?(b=Al(w.props.children,y.mode,S,w.key),b.return=y,y=b):(S=vg(w.type,w.key,w.props,null,y.mode,S),S.ref=zd(y,b,w),S.return=y,y=S)}return i(y);case qc:e:{for(k=w.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===w.containerInfo&&b.stateNode.implementation===w.implementation){n(y,b.sibling),b=o(b,w.children||[]),b.return=y,y=b;break e}else{n(y,b);break}else e(y,b);b=b.sibling}b=j1(w,y.mode,S),b.return=y,y=b}return i(y);case zi:return k=w._init,v(y,b,k(w._payload),S)}if(af(w))return p(y,b,w,S);if(Nd(w))return m(y,b,w,S);em(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,b!==null&&b.tag===6?(n(y,b.sibling),b=o(b,w),b.return=y,y=b):(n(y,b),b=L1(w,y.mode,S),b.return=y,y=b),i(y)):n(y,b)}return v}var Iu=L$(!0),j$=L$(!1),ep={},As=La(ep),sh=La(ep),ih=La(ep);function Sl(t){if(t===ep)throw Error(me(174));return t}function rk(t,e){switch(Et(ih,e),Et(sh,t),Et(As,ep),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ux(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ux(e,t)}Rt(As),Et(As,e)}function Nu(){Rt(As),Rt(sh),Rt(ih)}function $$(t){Sl(ih.current);var e=Sl(As.current),n=Ux(e,t.type);e!==n&&(Et(sh,t),Et(As,n))}function ok(t){sh.current===t&&(Rt(As),Rt(sh))}var jt=La(0);function ov(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var O1=[];function sk(){for(var t=0;t<O1.length;t++)O1[t]._workInProgressVersionPrimary=null;O1.length=0}var fg=wi.ReactCurrentDispatcher,P1=wi.ReactCurrentBatchConfig,Gl=0,Bt=null,hn=null,Sn=null,sv=!1,Mf=!1,ah=0,sJ=0;function Hn(){throw Error(me(321))}function ik(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Jo(t[n],e[n]))return!1;return!0}function ak(t,e,n,r,o,s){if(Gl=s,Bt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,fg.current=t===null||t.memoizedState===null?cJ:uJ,t=n(r,o),Mf){s=0;do{if(Mf=!1,ah=0,25<=s)throw Error(me(301));s+=1,Sn=hn=null,e.updateQueue=null,fg.current=dJ,t=n(r,o)}while(Mf)}if(fg.current=iv,e=hn!==null&&hn.next!==null,Gl=0,Sn=hn=Bt=null,sv=!1,e)throw Error(me(300));return t}function lk(){var t=ah!==0;return ah=0,t}function hs(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Bt.memoizedState=Sn=t:Sn=Sn.next=t,Sn}function ko(){if(hn===null){var t=Bt.alternate;t=t!==null?t.memoizedState:null}else t=hn.next;var e=Sn===null?Bt.memoizedState:Sn.next;if(e!==null)Sn=e,hn=t;else{if(t===null)throw Error(me(310));hn=t,t={memoizedState:hn.memoizedState,baseState:hn.baseState,baseQueue:hn.baseQueue,queue:hn.queue,next:null},Sn===null?Bt.memoizedState=Sn=t:Sn=Sn.next=t}return Sn}function lh(t,e){return typeof e=="function"?e(t):e}function A1(t){var e=ko(),n=e.queue;if(n===null)throw Error(me(311));n.lastRenderedReducer=t;var r=hn,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Gl&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=r):l=l.next=d,Bt.lanes|=u,Kl|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Jo(r,e.memoizedState)||(kr=!0),e.memoizedState=r,e.baseState=i,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){o=t;do s=o.lane,Bt.lanes|=s,Kl|=s,o=o.next;while(o!==t)}else o===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function D1(t){var e=ko(),n=e.queue;if(n===null)throw Error(me(311));n.lastRenderedReducer=t;var r=n.dispatch,o=n.pending,s=e.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=t(s,i.action),i=i.next;while(i!==o);Jo(s,e.memoizedState)||(kr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function F$(){}function z$(t,e){var n=Bt,r=ko(),o=e(),s=!Jo(r.memoizedState,o);if(s&&(r.memoizedState=o,kr=!0),r=r.queue,ck(H$.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Sn!==null&&Sn.memoizedState.tag&1){if(n.flags|=2048,ch(9,V$.bind(null,n,r,o,e),void 0,null),Cn===null)throw Error(me(349));Gl&30||B$(n,e,o)}return o}function B$(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Bt.updateQueue,e===null?(e={lastEffect:null,stores:null},Bt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function V$(t,e,n,r){e.value=n,e.getSnapshot=r,W$(e)&&U$(t)}function H$(t,e,n){return n(function(){W$(e)&&U$(t)})}function W$(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Jo(t,n)}catch{return!0}}function U$(t){var e=pi(t,1);e!==null&&Ko(e,t,1,-1)}function EO(t){var e=hs();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lh,lastRenderedState:t},e.queue=t,t=t.dispatch=lJ.bind(null,Bt,t),[e.memoizedState,t]}function ch(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Bt.updateQueue,e===null?(e={lastEffect:null,stores:null},Bt.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function G$(){return ko().memoizedState}function hg(t,e,n,r){var o=hs();Bt.flags|=t,o.memoizedState=ch(1|e,n,void 0,r===void 0?null:r)}function Y0(t,e,n,r){var o=ko();r=r===void 0?null:r;var s=void 0;if(hn!==null){var i=hn.memoizedState;if(s=i.destroy,r!==null&&ik(r,i.deps)){o.memoizedState=ch(e,n,s,r);return}}Bt.flags|=t,o.memoizedState=ch(1|e,n,s,r)}function MO(t,e){return hg(8390656,8,t,e)}function ck(t,e){return Y0(2048,8,t,e)}function K$(t,e){return Y0(4,2,t,e)}function Y$(t,e){return Y0(4,4,t,e)}function q$(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function X$(t,e,n){return n=n!=null?n.concat([t]):null,Y0(4,4,q$.bind(null,e,t),n)}function uk(){}function J$(t,e){var n=ko();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&ik(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Q$(t,e){var n=ko();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&ik(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Z$(t,e,n){return Gl&21?(Jo(n,e)||(n=n$(),Bt.lanes|=n,Kl|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,kr=!0),t.memoizedState=n)}function iJ(t,e){var n=vt;vt=n!==0&&4>n?n:4,t(!0);var r=P1.transition;P1.transition={};try{t(!1),e()}finally{vt=n,P1.transition=r}}function e5(){return ko().memoizedState}function aJ(t,e,n){var r=da(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},t5(t))n5(e,n);else if(n=A$(t,e,n,r),n!==null){var o=lr();Ko(n,t,r,o),r5(n,e,r)}}function lJ(t,e,n){var r=da(t),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(t5(t))n5(e,o);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var i=e.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Jo(a,i)){var l=e.interleaved;l===null?(o.next=o,tk(e)):(o.next=l.next,l.next=o),e.interleaved=o;return}}catch{}finally{}n=A$(t,e,o,r),n!==null&&(o=lr(),Ko(n,t,r,o),r5(n,e,r))}}function t5(t){var e=t.alternate;return t===Bt||e!==null&&e===Bt}function n5(t,e){Mf=sv=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function r5(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,BC(t,n)}}var iv={readContext:Co,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},cJ={readContext:Co,useCallback:function(t,e){return hs().memoizedState=[t,e===void 0?null:e],t},useContext:Co,useEffect:MO,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,hg(4194308,4,q$.bind(null,e,t),n)},useLayoutEffect:function(t,e){return hg(4194308,4,t,e)},useInsertionEffect:function(t,e){return hg(4,2,t,e)},useMemo:function(t,e){var n=hs();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=hs();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=aJ.bind(null,Bt,t),[r.memoizedState,t]},useRef:function(t){var e=hs();return t={current:t},e.memoizedState=t},useState:EO,useDebugValue:uk,useDeferredValue:function(t){return hs().memoizedState=t},useTransition:function(){var t=EO(!1),e=t[0];return t=iJ.bind(null,t[1]),hs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Bt,o=hs();if(At){if(n===void 0)throw Error(me(407));n=n()}else{if(n=e(),Cn===null)throw Error(me(349));Gl&30||B$(r,e,n)}o.memoizedState=n;var s={value:n,getSnapshot:e};return o.queue=s,MO(H$.bind(null,r,s,t),[t]),r.flags|=2048,ch(9,V$.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=hs(),e=Cn.identifierPrefix;if(At){var n=Zs,r=Qs;n=(r&~(1<<32-Go(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ah++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=sJ++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},uJ={readContext:Co,useCallback:J$,useContext:Co,useEffect:ck,useImperativeHandle:X$,useInsertionEffect:K$,useLayoutEffect:Y$,useMemo:Q$,useReducer:A1,useRef:G$,useState:function(){return A1(lh)},useDebugValue:uk,useDeferredValue:function(t){var e=ko();return Z$(e,hn.memoizedState,t)},useTransition:function(){var t=A1(lh)[0],e=ko().memoizedState;return[t,e]},useMutableSource:F$,useSyncExternalStore:z$,useId:e5,unstable_isNewReconciler:!1},dJ={readContext:Co,useCallback:J$,useContext:Co,useEffect:ck,useImperativeHandle:X$,useInsertionEffect:K$,useLayoutEffect:Y$,useMemo:Q$,useReducer:D1,useRef:G$,useState:function(){return D1(lh)},useDebugValue:uk,useDeferredValue:function(t){var e=ko();return hn===null?e.memoizedState=t:Z$(e,hn.memoizedState,t)},useTransition:function(){var t=D1(lh)[0],e=ko().memoizedState;return[t,e]},useMutableSource:F$,useSyncExternalStore:z$,useId:e5,unstable_isNewReconciler:!1};function Lu(t,e){try{var n="",r=e;do n+=Fq(r),r=r.return;while(r);var o=n}catch(s){o=`
Error generating stack: `+s.message+`
`+s.stack}return{value:t,source:e,stack:o,digest:null}}function I1(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function pS(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var fJ=typeof WeakMap=="function"?WeakMap:Map;function o5(t,e,n){n=ii(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){lv||(lv=!0,CS=r),pS(t,e)},n}function s5(t,e,n){n=ii(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var o=e.value;n.payload=function(){return r(o)},n.callback=function(){pS(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){pS(t,e),typeof r!="function"&&(ua===null?ua=new Set([this]):ua.add(this));var i=e.stack;this.componentDidCatch(e.value,{componentStack:i!==null?i:""})}),n}function TO(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new fJ;var o=new Set;r.set(e,o)}else o=r.get(e),o===void 0&&(o=new Set,r.set(e,o));o.has(n)||(o.add(n),t=EJ.bind(null,t,e,n),e.then(t,t))}function RO(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function OO(t,e,n,r,o){return t.mode&1?(t.flags|=65536,t.lanes=o,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ii(-1,1),e.tag=2,ca(n,e,1))),n.lanes|=1),t)}var hJ=wi.ReactCurrentOwner,kr=!1;function rr(t,e,n,r){e.child=t===null?j$(e,null,n,r):Iu(e,t.child,n,r)}function PO(t,e,n,r,o){n=n.render;var s=e.ref;return pu(e,o),r=ak(t,e,n,r,s,o),n=lk(),t!==null&&!kr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~o,mi(t,e,o)):(At&&n&&qC(e),e.flags|=1,rr(t,e,r,o),e.child)}function AO(t,e,n,r,o){if(t===null){var s=n.type;return typeof s=="function"&&!yk(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,i5(t,e,s,r,o)):(t=vg(n.type,null,r,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:th,n(i,r)&&t.ref===e.ref)return mi(t,e,o)}return e.flags|=1,t=fa(s,r),t.ref=e.ref,t.return=e,e.child=t}function i5(t,e,n,r,o){if(t!==null){var s=t.memoizedProps;if(th(s,r)&&t.ref===e.ref)if(kr=!1,e.pendingProps=r=s,(t.lanes&o)!==0)t.flags&131072&&(kr=!0);else return e.lanes=t.lanes,mi(t,e,o)}return mS(t,e,n,r,o)}function a5(t,e,n){var r=e.pendingProps,o=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(iu,$r),$r|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Et(iu,$r),$r|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Et(iu,$r),$r|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Et(iu,$r),$r|=r;return rr(t,e,o,n),e.child}function l5(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function mS(t,e,n,r,o){var s=Tr(n)?Wl:Jn.current;return s=Au(e,s),pu(e,o),n=ak(t,e,n,r,s,o),r=lk(),t!==null&&!kr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~o,mi(t,e,o)):(At&&r&&qC(e),e.flags|=1,rr(t,e,n,o),e.child)}function DO(t,e,n,r,o){if(Tr(n)){var s=!0;Qg(e)}else s=!1;if(pu(e,o),e.stateNode===null)pg(t,e),N$(e,n,r),hS(e,n,r,o),r=!0;else if(t===null){var i=e.stateNode,a=e.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Co(c):(c=Tr(n)?Wl:Jn.current,c=Au(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&CO(e,i,r,c),Bi=!1;var f=e.memoizedState;i.state=f,rv(e,r,i,o),l=e.memoizedState,a!==r||f!==l||Mr.current||Bi?(typeof u=="function"&&(fS(e,n,u,r),l=e.memoizedState),(a=Bi||_O(e,n,a,r,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{i=e.stateNode,D$(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:jo(e.type,a),i.props=c,d=e.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Co(l):(l=Tr(n)?Wl:Jn.current,l=Au(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&CO(e,i,r,l),Bi=!1,f=e.memoizedState,i.state=f,rv(e,r,i,o);var p=e.memoizedState;a!==d||f!==p||Mr.current||Bi?(typeof h=="function"&&(fS(e,n,h,r),p=e.memoizedState),(c=Bi||_O(e,n,c,r,f,p,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,p,l)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),i.props=r,i.state=p,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return gS(t,e,n,r,s,o)}function gS(t,e,n,r,o,s){l5(t,e);var i=(e.flags&128)!==0;if(!r&&!i)return o&&yO(e,n,!1),mi(t,e,s);r=e.stateNode,hJ.current=e;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&i?(e.child=Iu(e,t.child,null,s),e.child=Iu(e,null,a,s)):rr(t,e,a,s),e.memoizedState=r.state,o&&yO(e,n,!0),e.child}function c5(t){var e=t.stateNode;e.pendingContext?vO(t,e.pendingContext,e.pendingContext!==e.context):e.context&&vO(t,e.context,!1),rk(t,e.containerInfo)}function IO(t,e,n,r,o){return Du(),JC(o),e.flags|=256,rr(t,e,n,r),e.child}var vS={dehydrated:null,treeContext:null,retryLane:0};function yS(t){return{baseLanes:t,cachePool:null,transitions:null}}function u5(t,e,n){var r=e.pendingProps,o=jt.current,s=!1,i=(e.flags&128)!==0,a;if((a=i)||(a=t!==null&&t.memoizedState===null?!1:(o&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(o|=1),Et(jt,o&1),t===null)return uS(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(i=r.children,t=r.fallback,s?(r=e.mode,s=e.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=J0(i,r,0,null),t=Al(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=yS(n),e.memoizedState=vS,t):dk(e,i));if(o=t.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return pJ(t,e,i,r,a,o,n);if(s){s=r.fallback,i=e.mode,o=t.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&e.child!==o?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=fa(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=fa(a,s):(s=Al(s,i,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,i=t.child.memoizedState,i=i===null?yS(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=t.childLanes&~n,e.memoizedState=vS,r}return s=t.child,t=s.sibling,r=fa(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function dk(t,e){return e=J0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function tm(t,e,n,r){return r!==null&&JC(r),Iu(e,t.child,null,n),t=dk(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function pJ(t,e,n,r,o,s,i){if(n)return e.flags&256?(e.flags&=-257,r=I1(Error(me(422))),tm(t,e,i,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,o=e.mode,r=J0({mode:"visible",children:r.children},o,0,null),s=Al(s,o,i,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Iu(e,t.child,null,i),e.child.memoizedState=yS(i),e.memoizedState=vS,s);if(!(e.mode&1))return tm(t,e,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(me(419)),r=I1(s,r,void 0),tm(t,e,i,r)}if(a=(i&t.childLanes)!==0,kr||a){if(r=Cn,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,pi(t,o),Ko(r,t,o,-1))}return vk(),r=I1(Error(me(421))),tm(t,e,i,r)}return o.data==="$?"?(e.flags|=128,e.child=t.child,e=MJ.bind(null,t),o._reactRetry=e,null):(t=s.treeContext,zr=la(o.nextSibling),Hr=e,At=!0,Fo=null,t!==null&&(uo[fo++]=Qs,uo[fo++]=Zs,uo[fo++]=Ul,Qs=t.id,Zs=t.overflow,Ul=e),e=dk(e,r.children),e.flags|=4096,e)}function NO(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),dS(t.return,e,n)}function N1(t,e,n,r,o){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function d5(t,e,n){var r=e.pendingProps,o=r.revealOrder,s=r.tail;if(rr(t,e,r.children,n),r=jt.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&NO(t,n,e);else if(t.tag===19)NO(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Et(jt,r),!(e.mode&1))e.memoizedState=null;else switch(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&ov(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),N1(e,!1,o,n,s);break;case"backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&ov(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}N1(e,!0,n,null,s);break;case"together":N1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function pg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function mi(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Kl|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(me(153));if(e.child!==null){for(t=e.child,n=fa(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=fa(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function mJ(t,e,n){switch(e.tag){case 3:c5(e),Du();break;case 5:$$(e);break;case 1:Tr(e.type)&&Qg(e);break;case 4:rk(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,o=e.memoizedProps.value;Et(tv,r._currentValue),r._currentValue=o;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Et(jt,jt.current&1),e.flags|=128,null):n&e.child.childLanes?u5(t,e,n):(Et(jt,jt.current&1),t=mi(t,e,n),t!==null?t.sibling:null);Et(jt,jt.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return d5(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Et(jt,jt.current),r)break;return null;case 22:case 23:return e.lanes=0,a5(t,e,n)}return mi(t,e,n)}var f5,bS,h5,p5;f5=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bS=function(){};h5=function(t,e,n,r){var o=t.memoizedProps;if(o!==r){t=e.stateNode,Sl(As.current);var s=null;switch(n){case"input":o=Bx(t,o),r=Bx(t,r),s=[];break;case"select":o=Vt({},o,{value:void 0}),r=Vt({},r,{value:void 0}),s=[];break;case"textarea":o=Wx(t,o),r=Wx(t,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Xg)}Gx(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Yf.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Yf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Tt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};p5=function(t,e,n,r){n!==r&&(e.flags|=4)};function Bd(t,e){if(!At)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Wn(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var o=t.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function gJ(t,e,n){var r=e.pendingProps;switch(XC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wn(e),null;case 1:return Tr(e.type)&&Jg(),Wn(e),null;case 3:return r=e.stateNode,Nu(),Rt(Mr),Rt(Jn),sk(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Zp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Fo!==null&&(MS(Fo),Fo=null))),bS(t,e),Wn(e),null;case 5:ok(e);var o=Sl(ih.current);if(n=e.type,t!==null&&e.stateNode!=null)h5(t,e,n,r,o),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(me(166));return Wn(e),null}if(t=Sl(As.current),Zp(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Ss]=e,r[oh]=s,t=(e.mode&1)!==0,n){case"dialog":Tt("cancel",r),Tt("close",r);break;case"iframe":case"object":case"embed":Tt("load",r);break;case"video":case"audio":for(o=0;o<cf.length;o++)Tt(cf[o],r);break;case"source":Tt("error",r);break;case"img":case"image":case"link":Tt("error",r),Tt("load",r);break;case"details":Tt("toggle",r);break;case"input":WR(r,s),Tt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Tt("invalid",r);break;case"textarea":GR(r,s),Tt("invalid",r)}Gx(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Qp(r.textContent,a,t),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Qp(r.textContent,a,t),o=["children",""+a]):Yf.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Tt("scroll",r)}switch(n){case"input":Wp(r),UR(r,s,!0);break;case"textarea":Wp(r),KR(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Xg)}r=o,e.updateQueue=r,r!==null&&(e.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Bj(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=i.createElement(n,{is:r.is}):(t=i.createElement(n),n==="select"&&(i=t,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):t=i.createElementNS(t,n),t[Ss]=e,t[oh]=r,f5(t,e,!1,!1),e.stateNode=t;e:{switch(i=Kx(n,r),n){case"dialog":Tt("cancel",t),Tt("close",t),o=r;break;case"iframe":case"object":case"embed":Tt("load",t),o=r;break;case"video":case"audio":for(o=0;o<cf.length;o++)Tt(cf[o],t);o=r;break;case"source":Tt("error",t),o=r;break;case"img":case"image":case"link":Tt("error",t),Tt("load",t),o=r;break;case"details":Tt("toggle",t),o=r;break;case"input":WR(t,r),o=Bx(t,r),Tt("invalid",t);break;case"option":o=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},o=Vt({},r,{value:void 0}),Tt("invalid",t);break;case"textarea":GR(t,r),o=Wx(t,r),Tt("invalid",t);break;default:o=r}Gx(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Wj(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vj(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&qf(t,l):typeof l=="number"&&qf(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Yf.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Tt("scroll",t):l!=null&&NC(t,s,l,i))}switch(n){case"input":Wp(t),UR(t,r,!1);break;case"textarea":Wp(t),KR(t);break;case"option":r.value!=null&&t.setAttribute("value",""+xa(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?uu(t,!!r.multiple,s,!1):r.defaultValue!=null&&uu(t,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(t.onclick=Xg)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Wn(e),null;case 6:if(t&&e.stateNode!=null)p5(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(me(166));if(n=Sl(ih.current),Sl(As.current),Zp(e)){if(r=e.stateNode,n=e.memoizedProps,r[Ss]=e,(s=r.nodeValue!==n)&&(t=Hr,t!==null))switch(t.tag){case 3:Qp(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Qp(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ss]=e,e.stateNode=r}return Wn(e),null;case 13:if(Rt(jt),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(At&&zr!==null&&e.mode&1&&!(e.flags&128))P$(),Du(),e.flags|=98560,s=!1;else if(s=Zp(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(me(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(me(317));s[Ss]=e}else Du(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Wn(e),s=!1}else Fo!==null&&(MS(Fo),Fo=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||jt.current&1?mn===0&&(mn=3):vk())),e.updateQueue!==null&&(e.flags|=4),Wn(e),null);case 4:return Nu(),bS(t,e),t===null&&nh(e.stateNode.containerInfo),Wn(e),null;case 10:return ek(e.type._context),Wn(e),null;case 17:return Tr(e.type)&&Jg(),Wn(e),null;case 19:if(Rt(jt),s=e.memoizedState,s===null)return Wn(e),null;if(r=(e.flags&128)!==0,i=s.rendering,i===null)if(r)Bd(s,!1);else{if(mn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(i=ov(t),i!==null){for(e.flags|=128,Bd(s,!1),r=i.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,t=i.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Et(jt,jt.current&1|2),e.child}t=t.sibling}s.tail!==null&&Zt()>ju&&(e.flags|=128,r=!0,Bd(s,!1),e.lanes=4194304)}else{if(!r)if(t=ov(i),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Bd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!At)return Wn(e),null}else 2*Zt()-s.renderingStartTime>ju&&n!==1073741824&&(e.flags|=128,r=!0,Bd(s,!1),e.lanes=4194304);s.isBackwards?(i.sibling=e.child,e.child=i):(n=s.last,n!==null?n.sibling=i:e.child=i,s.last=i)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Zt(),e.sibling=null,n=jt.current,Et(jt,r?n&1|2:n&1),e):(Wn(e),null);case 22:case 23:return gk(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?$r&1073741824&&(Wn(e),e.subtreeFlags&6&&(e.flags|=8192)):Wn(e),null;case 24:return null;case 25:return null}throw Error(me(156,e.tag))}function vJ(t,e){switch(XC(e),e.tag){case 1:return Tr(e.type)&&Jg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Nu(),Rt(Mr),Rt(Jn),sk(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ok(e),null;case 13:if(Rt(jt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(me(340));Du()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Rt(jt),null;case 4:return Nu(),null;case 10:return ek(e.type._context),null;case 22:case 23:return gk(),null;case 24:return null;default:return null}}var nm=!1,Yn=!1,yJ=typeof WeakSet=="function"?WeakSet:Set,Re=null;function su(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Gt(t,e,r)}else n.current=null}function wS(t,e,n){try{n()}catch(r){Gt(t,e,r)}}var LO=!1;function bJ(t,e){if(rS=Kg,t=y$(),YC(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++c===o&&(a=i),f===s&&++u===r&&(l=i),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(oS={focusedElem:t,selectionRange:n},Kg=!1,Re=e;Re!==null;)if(e=Re,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Re=t;else for(;Re!==null;){e=Re;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,v=p.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:jo(e.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(S){Gt(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,Re=t;break}Re=e.return}return p=LO,LO=!1,p}function Tf(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var s=o.destroy;o.destroy=void 0,s!==void 0&&wS(e,n,s)}o=o.next}while(o!==r)}}function q0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function xS(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function m5(t){var e=t.alternate;e!==null&&(t.alternate=null,m5(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Ss],delete e[oh],delete e[aS],delete e[tJ],delete e[nJ])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function g5(t){return t.tag===5||t.tag===3||t.tag===4}function jO(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||g5(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function SS(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Xg));else if(r!==4&&(t=t.child,t!==null))for(SS(t,e,n),t=t.sibling;t!==null;)SS(t,e,n),t=t.sibling}function _S(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(_S(t,e,n),t=t.sibling;t!==null;)_S(t,e,n),t=t.sibling}var In=null,$o=!1;function Ai(t,e,n){for(n=n.child;n!==null;)v5(t,e,n),n=n.sibling}function v5(t,e,n){if(Ps&&typeof Ps.onCommitFiberUnmount=="function")try{Ps.onCommitFiberUnmount(B0,n)}catch{}switch(n.tag){case 5:Yn||su(n,e);case 6:var r=In,o=$o;In=null,Ai(t,e,n),In=r,$o=o,In!==null&&($o?(t=In,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):In.removeChild(n.stateNode));break;case 18:In!==null&&($o?(t=In,n=n.stateNode,t.nodeType===8?T1(t.parentNode,n):t.nodeType===1&&T1(t,n),Zf(t)):T1(In,n.stateNode));break;case 4:r=In,o=$o,In=n.stateNode.containerInfo,$o=!0,Ai(t,e,n),In=r,$o=o;break;case 0:case 11:case 14:case 15:if(!Yn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&wS(n,e,i),o=o.next}while(o!==r)}Ai(t,e,n);break;case 1:if(!Yn&&(su(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Gt(n,e,a)}Ai(t,e,n);break;case 21:Ai(t,e,n);break;case 22:n.mode&1?(Yn=(r=Yn)||n.memoizedState!==null,Ai(t,e,n),Yn=r):Ai(t,e,n);break;default:Ai(t,e,n)}}function $O(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new yJ),e.forEach(function(r){var o=TJ.bind(null,t,r);n.has(r)||(n.add(r),r.then(o,o))})}}function No(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=t,i=e,a=i;e:for(;a!==null;){switch(a.tag){case 5:In=a.stateNode,$o=!1;break e;case 3:In=a.stateNode.containerInfo,$o=!0;break e;case 4:In=a.stateNode.containerInfo,$o=!0;break e}a=a.return}if(In===null)throw Error(me(160));v5(s,i,o),In=null,$o=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Gt(o,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)y5(e,t),e=e.sibling}function y5(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(No(e,t),us(t),r&4){try{Tf(3,t,t.return),q0(3,t)}catch(m){Gt(t,t.return,m)}try{Tf(5,t,t.return)}catch(m){Gt(t,t.return,m)}}break;case 1:No(e,t),us(t),r&512&&n!==null&&su(n,n.return);break;case 5:if(No(e,t),us(t),r&512&&n!==null&&su(n,n.return),t.flags&32){var o=t.stateNode;try{qf(o,"")}catch(m){Gt(t,t.return,m)}}if(r&4&&(o=t.stateNode,o!=null)){var s=t.memoizedProps,i=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Fj(o,s),Kx(a,i);var c=Kx(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?Wj(o,d):u==="dangerouslySetInnerHTML"?Vj(o,d):u==="children"?qf(o,d):NC(o,u,d,c)}switch(a){case"input":Vx(o,s);break;case"textarea":zj(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?uu(o,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?uu(o,!!s.multiple,s.defaultValue,!0):uu(o,!!s.multiple,s.multiple?[]:"",!1))}o[oh]=s}catch(m){Gt(t,t.return,m)}}break;case 6:if(No(e,t),us(t),r&4){if(t.stateNode===null)throw Error(me(162));o=t.stateNode,s=t.memoizedProps;try{o.nodeValue=s}catch(m){Gt(t,t.return,m)}}break;case 3:if(No(e,t),us(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zf(e.containerInfo)}catch(m){Gt(t,t.return,m)}break;case 4:No(e,t),us(t);break;case 13:No(e,t),us(t),o=t.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(pk=Zt())),r&4&&$O(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Yn=(c=Yn)||u,No(e,t),Yn=c):No(e,t),us(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Re=t,u=t.child;u!==null;){for(d=Re=u;Re!==null;){switch(f=Re,h=f.child,f.tag){case 0:case 11:case 14:case 15:Tf(4,f,f.return);break;case 1:su(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(m){Gt(r,n,m)}}break;case 5:su(f,f.return);break;case 22:if(f.memoizedState!==null){zO(d);continue}}h!==null?(h.return=f,Re=h):zO(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Hj("display",i))}catch(m){Gt(t,t.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Gt(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:No(e,t),us(t),r&4&&$O(t);break;case 21:break;default:No(e,t),us(t)}}function us(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(g5(n)){var r=n;break e}n=n.return}throw Error(me(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(qf(o,""),r.flags&=-33);var s=jO(t);_S(t,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=jO(t);SS(t,a,i);break;default:throw Error(me(161))}}catch(l){Gt(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function wJ(t,e,n){Re=t,b5(t)}function b5(t,e,n){for(var r=(t.mode&1)!==0;Re!==null;){var o=Re,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||nm;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Yn;a=nm;var c=Yn;if(nm=i,(Yn=l)&&!c)for(Re=o;Re!==null;)i=Re,l=i.child,i.tag===22&&i.memoizedState!==null?BO(o):l!==null?(l.return=i,Re=l):BO(o);for(;s!==null;)Re=s,b5(s),s=s.sibling;Re=o,nm=a,Yn=c}FO(t)}else o.subtreeFlags&8772&&s!==null?(s.return=o,Re=s):FO(t)}}function FO(t){for(;Re!==null;){var e=Re;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Yn||q0(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Yn)if(n===null)r.componentDidMount();else{var o=e.elementType===e.type?n.memoizedProps:jo(e.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&SO(e,s,r);break;case 3:var i=e.updateQueue;if(i!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}SO(e,i,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Zf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(me(163))}Yn||e.flags&512&&xS(e)}catch(f){Gt(e,e.return,f)}}if(e===t){Re=null;break}if(n=e.sibling,n!==null){n.return=e.return,Re=n;break}Re=e.return}}function zO(t){for(;Re!==null;){var e=Re;if(e===t){Re=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Re=n;break}Re=e.return}}function BO(t){for(;Re!==null;){var e=Re;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{q0(4,e)}catch(l){Gt(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var o=e.return;try{r.componentDidMount()}catch(l){Gt(e,o,l)}}var s=e.return;try{xS(e)}catch(l){Gt(e,s,l)}break;case 5:var i=e.return;try{xS(e)}catch(l){Gt(e,i,l)}}}catch(l){Gt(e,e.return,l)}if(e===t){Re=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Re=a;break}Re=e.return}}var xJ=Math.ceil,av=wi.ReactCurrentDispatcher,fk=wi.ReactCurrentOwner,bo=wi.ReactCurrentBatchConfig,at=0,Cn=null,ln=null,Fn=0,$r=0,iu=La(0),mn=0,uh=null,Kl=0,X0=0,hk=0,Rf=null,wr=null,pk=0,ju=1/0,Ks=null,lv=!1,CS=null,ua=null,rm=!1,Xi=null,cv=0,Of=0,kS=null,mg=-1,gg=0;function lr(){return at&6?Zt():mg!==-1?mg:mg=Zt()}function da(t){return t.mode&1?at&2&&Fn!==0?Fn&-Fn:oJ.transition!==null?(gg===0&&(gg=n$()),gg):(t=vt,t!==0||(t=window.event,t=t===void 0?16:c$(t.type)),t):1}function Ko(t,e,n,r){if(50<Of)throw Of=0,kS=null,Error(me(185));Jh(t,n,r),(!(at&2)||t!==Cn)&&(t===Cn&&(!(at&2)&&(X0|=n),mn===4&&Gi(t,Fn)),Rr(t,r),n===1&&at===0&&!(e.mode&1)&&(ju=Zt()+500,G0&&ja()))}function Rr(t,e){var n=t.callbackNode;oX(t,e);var r=Gg(t,t===Cn?Fn:0);if(r===0)n!==null&&XR(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&XR(n),e===1)t.tag===0?rJ(VO.bind(null,t)):T$(VO.bind(null,t)),ZX(function(){!(at&6)&&ja()}),n=null;else{switch(r$(r)){case 1:n=zC;break;case 4:n=e$;break;case 16:n=Ug;break;case 536870912:n=t$;break;default:n=Ug}n=M5(n,w5.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function w5(t,e){if(mg=-1,gg=0,at&6)throw Error(me(327));var n=t.callbackNode;if(mu()&&t.callbackNode!==n)return null;var r=Gg(t,t===Cn?Fn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=uv(t,r);else{e=r;var o=at;at|=2;var s=S5();(Cn!==t||Fn!==e)&&(Ks=null,ju=Zt()+500,Pl(t,e));do try{CJ();break}catch(a){x5(t,a)}while(!0);ZC(),av.current=s,at=o,ln!==null?e=0:(Cn=null,Fn=0,e=mn)}if(e!==0){if(e===2&&(o=Qx(t),o!==0&&(r=o,e=ES(t,o))),e===1)throw n=uh,Pl(t,0),Gi(t,r),Rr(t,Zt()),n;if(e===6)Gi(t,r);else{if(o=t.current.alternate,!(r&30)&&!SJ(o)&&(e=uv(t,r),e===2&&(s=Qx(t),s!==0&&(r=s,e=ES(t,s))),e===1))throw n=uh,Pl(t,0),Gi(t,r),Rr(t,Zt()),n;switch(t.finishedWork=o,t.finishedLanes=r,e){case 0:case 1:throw Error(me(345));case 2:ul(t,wr,Ks);break;case 3:if(Gi(t,r),(r&130023424)===r&&(e=pk+500-Zt(),10<e)){if(Gg(t,0)!==0)break;if(o=t.suspendedLanes,(o&r)!==r){lr(),t.pingedLanes|=t.suspendedLanes&o;break}t.timeoutHandle=iS(ul.bind(null,t,wr,Ks),e);break}ul(t,wr,Ks);break;case 4:if(Gi(t,r),(r&4194240)===r)break;for(e=t.eventTimes,o=-1;0<r;){var i=31-Go(r);s=1<<i,i=e[i],i>o&&(o=i),r&=~s}if(r=o,r=Zt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xJ(r/1960))-r,10<r){t.timeoutHandle=iS(ul.bind(null,t,wr,Ks),r);break}ul(t,wr,Ks);break;case 5:ul(t,wr,Ks);break;default:throw Error(me(329))}}}return Rr(t,Zt()),t.callbackNode===n?w5.bind(null,t):null}function ES(t,e){var n=Rf;return t.current.memoizedState.isDehydrated&&(Pl(t,e).flags|=256),t=uv(t,e),t!==2&&(e=wr,wr=n,e!==null&&MS(e)),t}function MS(t){wr===null?wr=t:wr.push.apply(wr,t)}function SJ(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Jo(s(),o))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Gi(t,e){for(e&=~hk,e&=~X0,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Go(e),r=1<<n;t[n]=-1,e&=~r}}function VO(t){if(at&6)throw Error(me(327));mu();var e=Gg(t,0);if(!(e&1))return Rr(t,Zt()),null;var n=uv(t,e);if(t.tag!==0&&n===2){var r=Qx(t);r!==0&&(e=r,n=ES(t,r))}if(n===1)throw n=uh,Pl(t,0),Gi(t,e),Rr(t,Zt()),n;if(n===6)throw Error(me(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ul(t,wr,Ks),Rr(t,Zt()),null}function mk(t,e){var n=at;at|=1;try{return t(e)}finally{at=n,at===0&&(ju=Zt()+500,G0&&ja())}}function Yl(t){Xi!==null&&Xi.tag===0&&!(at&6)&&mu();var e=at;at|=1;var n=bo.transition,r=vt;try{if(bo.transition=null,vt=1,t)return t()}finally{vt=r,bo.transition=n,at=e,!(at&6)&&ja()}}function gk(){$r=iu.current,Rt(iu)}function Pl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,QX(n)),ln!==null)for(n=ln.return;n!==null;){var r=n;switch(XC(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jg();break;case 3:Nu(),Rt(Mr),Rt(Jn),sk();break;case 5:ok(r);break;case 4:Nu();break;case 13:Rt(jt);break;case 19:Rt(jt);break;case 10:ek(r.type._context);break;case 22:case 23:gk()}n=n.return}if(Cn=t,ln=t=fa(t.current,null),Fn=$r=e,mn=0,uh=null,hk=X0=Kl=0,wr=Rf=null,xl!==null){for(e=0;e<xl.length;e++)if(n=xl[e],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}xl=null}return t}function x5(t,e){do{var n=ln;try{if(ZC(),fg.current=iv,sv){for(var r=Bt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}sv=!1}if(Gl=0,Sn=hn=Bt=null,Mf=!1,ah=0,fk.current=null,n===null||n.return===null){mn=1,uh=e,ln=null;break}e:{var s=t,i=n.return,a=n,l=e;if(e=Fn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=RO(i);if(h!==null){h.flags&=-257,OO(h,i,a,s,e),h.mode&1&&TO(s,c,e),e=h,l=c;var p=e.updateQueue;if(p===null){var m=new Set;m.add(l),e.updateQueue=m}else p.add(l);break e}else{if(!(e&1)){TO(s,c,e),vk();break e}l=Error(me(426))}}else if(At&&a.mode&1){var v=RO(i);if(v!==null){!(v.flags&65536)&&(v.flags|=256),OO(v,i,a,s,e),JC(Lu(l,a));break e}}s=l=Lu(l,a),mn!==4&&(mn=2),Rf===null?Rf=[s]:Rf.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var y=o5(s,l,e);xO(s,y);break e;case 1:a=l;var b=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ua===null||!ua.has(w)))){s.flags|=65536,e&=-e,s.lanes|=e;var S=s5(s,a,e);xO(s,S);break e}}s=s.return}while(s!==null)}C5(n)}catch(_){e=_,ln===n&&n!==null&&(ln=n=n.return);continue}break}while(!0)}function S5(){var t=av.current;return av.current=iv,t===null?iv:t}function vk(){(mn===0||mn===3||mn===2)&&(mn=4),Cn===null||!(Kl&268435455)&&!(X0&268435455)||Gi(Cn,Fn)}function uv(t,e){var n=at;at|=2;var r=S5();(Cn!==t||Fn!==e)&&(Ks=null,Pl(t,e));do try{_J();break}catch(o){x5(t,o)}while(!0);if(ZC(),at=n,av.current=r,ln!==null)throw Error(me(261));return Cn=null,Fn=0,mn}function _J(){for(;ln!==null;)_5(ln)}function CJ(){for(;ln!==null&&!qq();)_5(ln)}function _5(t){var e=E5(t.alternate,t,$r);t.memoizedProps=t.pendingProps,e===null?C5(t):ln=e,fk.current=null}function C5(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=vJ(n,e),n!==null){n.flags&=32767,ln=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{mn=6,ln=null;return}}else if(n=gJ(n,e,$r),n!==null){ln=n;return}if(e=e.sibling,e!==null){ln=e;return}ln=e=t}while(e!==null);mn===0&&(mn=5)}function ul(t,e,n){var r=vt,o=bo.transition;try{bo.transition=null,vt=1,kJ(t,e,n,r)}finally{bo.transition=o,vt=r}return null}function kJ(t,e,n,r){do mu();while(Xi!==null);if(at&6)throw Error(me(327));n=t.finishedWork;var o=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(me(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(sX(t,s),t===Cn&&(ln=Cn=null,Fn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||rm||(rm=!0,M5(Ug,function(){return mu(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=bo.transition,bo.transition=null;var i=vt;vt=1;var a=at;at|=4,fk.current=null,bJ(t,n),y5(n,t),UX(oS),Kg=!!rS,oS=rS=null,t.current=n,wJ(n),Xq(),at=a,vt=i,bo.transition=s}else t.current=n;if(rm&&(rm=!1,Xi=t,cv=o),s=t.pendingLanes,s===0&&(ua=null),Zq(n.stateNode),Rr(t,Zt()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)o=e[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(lv)throw lv=!1,t=CS,CS=null,t;return cv&1&&t.tag!==0&&mu(),s=t.pendingLanes,s&1?t===kS?Of++:(Of=0,kS=t):Of=0,ja(),null}function mu(){if(Xi!==null){var t=r$(cv),e=bo.transition,n=vt;try{if(bo.transition=null,vt=16>t?16:t,Xi===null)var r=!1;else{if(t=Xi,Xi=null,cv=0,at&6)throw Error(me(331));var o=at;for(at|=4,Re=t.current;Re!==null;){var s=Re,i=s.child;if(Re.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Re=c;Re!==null;){var u=Re;switch(u.tag){case 0:case 11:case 15:Tf(8,u,s)}var d=u.child;if(d!==null)d.return=u,Re=d;else for(;Re!==null;){u=Re;var f=u.sibling,h=u.return;if(m5(u),u===c){Re=null;break}if(f!==null){f.return=h,Re=f;break}Re=h}}}var p=s.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(m!==null)}}Re=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,Re=i;else e:for(;Re!==null;){if(s=Re,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Tf(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,Re=y;break e}Re=s.return}}var b=t.current;for(Re=b;Re!==null;){i=Re;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,Re=w;else e:for(i=b;Re!==null;){if(a=Re,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:q0(9,a)}}catch(_){Gt(a,a.return,_)}if(a===i){Re=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,Re=S;break e}Re=a.return}}if(at=o,ja(),Ps&&typeof Ps.onPostCommitFiberRoot=="function")try{Ps.onPostCommitFiberRoot(B0,t)}catch{}r=!0}return r}finally{vt=n,bo.transition=e}}return!1}function HO(t,e,n){e=Lu(n,e),e=o5(t,e,1),t=ca(t,e,1),e=lr(),t!==null&&(Jh(t,1,e),Rr(t,e))}function Gt(t,e,n){if(t.tag===3)HO(t,t,n);else for(;e!==null;){if(e.tag===3){HO(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ua===null||!ua.has(r))){t=Lu(n,t),t=s5(e,t,1),e=ca(e,t,1),t=lr(),e!==null&&(Jh(e,1,t),Rr(e,t));break}}e=e.return}}function EJ(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=lr(),t.pingedLanes|=t.suspendedLanes&n,Cn===t&&(Fn&n)===n&&(mn===4||mn===3&&(Fn&130023424)===Fn&&500>Zt()-pk?Pl(t,0):hk|=n),Rr(t,e)}function k5(t,e){e===0&&(t.mode&1?(e=Kp,Kp<<=1,!(Kp&130023424)&&(Kp=4194304)):e=1);var n=lr();t=pi(t,e),t!==null&&(Jh(t,e,n),Rr(t,n))}function MJ(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),k5(t,n)}function TJ(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(me(314))}r!==null&&r.delete(e),k5(t,n)}var E5;E5=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Mr.current)kr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return kr=!1,mJ(t,e,n);kr=!!(t.flags&131072)}else kr=!1,At&&e.flags&1048576&&R$(e,ev,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;pg(t,e),t=e.pendingProps;var o=Au(e,Jn.current);pu(e,n),o=ak(null,e,r,t,o,n);var s=lk();return e.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Tr(r)?(s=!0,Qg(e)):s=!1,e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,nk(e),o.updater=K0,e.stateNode=o,o._reactInternals=e,hS(e,r,t,n),e=gS(null,e,r,!0,s,n)):(e.tag=0,At&&s&&qC(e),rr(null,e,o,n),e=e.child),e;case 16:r=e.elementType;e:{switch(pg(t,e),t=e.pendingProps,o=r._init,r=o(r._payload),e.type=r,o=e.tag=OJ(r),t=jo(r,t),o){case 0:e=mS(null,e,r,t,n);break e;case 1:e=DO(null,e,r,t,n);break e;case 11:e=PO(null,e,r,t,n);break e;case 14:e=AO(null,e,r,jo(r.type,t),n);break e}throw Error(me(306,r,""))}return e;case 0:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:jo(r,o),mS(t,e,r,o,n);case 1:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:jo(r,o),DO(t,e,r,o,n);case 3:e:{if(c5(e),t===null)throw Error(me(387));r=e.pendingProps,s=e.memoizedState,o=s.element,D$(t,e),rv(e,r,null,n);var i=e.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){o=Lu(Error(me(423)),e),e=IO(t,e,r,n,o);break e}else if(r!==o){o=Lu(Error(me(424)),e),e=IO(t,e,r,n,o);break e}else for(zr=la(e.stateNode.containerInfo.firstChild),Hr=e,At=!0,Fo=null,n=j$(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Du(),r===o){e=mi(t,e,n);break e}rr(t,e,r,n)}e=e.child}return e;case 5:return $$(e),t===null&&uS(e),r=e.type,o=e.pendingProps,s=t!==null?t.memoizedProps:null,i=o.children,sS(r,o)?i=null:s!==null&&sS(r,s)&&(e.flags|=32),l5(t,e),rr(t,e,i,n),e.child;case 6:return t===null&&uS(e),null;case 13:return u5(t,e,n);case 4:return rk(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Iu(e,null,r,n):rr(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:jo(r,o),PO(t,e,r,o,n);case 7:return rr(t,e,e.pendingProps,n),e.child;case 8:return rr(t,e,e.pendingProps.children,n),e.child;case 12:return rr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,o=e.pendingProps,s=e.memoizedProps,i=o.value,Et(tv,r._currentValue),r._currentValue=i,s!==null)if(Jo(s.value,i)){if(s.children===o.children&&!Mr.current){e=mi(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=ii(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),dS(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===e.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(me(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),dS(i,n,e),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===e){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}rr(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=e.pendingProps.children,pu(e,n),o=Co(o),r=r(o),e.flags|=1,rr(t,e,r,n),e.child;case 14:return r=e.type,o=jo(r,e.pendingProps),o=jo(r.type,o),AO(t,e,r,o,n);case 15:return i5(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:jo(r,o),pg(t,e),e.tag=1,Tr(r)?(t=!0,Qg(e)):t=!1,pu(e,n),N$(e,r,o),hS(e,r,o,n),gS(null,e,r,!0,t,n);case 19:return d5(t,e,n);case 22:return a5(t,e,n)}throw Error(me(156,e.tag))};function M5(t,e){return Zj(t,e)}function RJ(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ho(t,e,n,r){return new RJ(t,e,n,r)}function yk(t){return t=t.prototype,!(!t||!t.isReactComponent)}function OJ(t){if(typeof t=="function")return yk(t)?1:0;if(t!=null){if(t=t.$$typeof,t===jC)return 11;if(t===$C)return 14}return 2}function fa(t,e){var n=t.alternate;return n===null?(n=ho(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function vg(t,e,n,r,o,s){var i=2;if(r=t,typeof t=="function")yk(t)&&(i=1);else if(typeof t=="string")i=5;else e:switch(t){case Xc:return Al(n.children,o,s,e);case LC:i=8,o|=8;break;case jx:return t=ho(12,n,e,o|2),t.elementType=jx,t.lanes=s,t;case $x:return t=ho(13,n,e,o),t.elementType=$x,t.lanes=s,t;case Fx:return t=ho(19,n,e,o),t.elementType=Fx,t.lanes=s,t;case Lj:return J0(n,o,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ij:i=10;break e;case Nj:i=9;break e;case jC:i=11;break e;case $C:i=14;break e;case zi:i=16,r=null;break e}throw Error(me(130,t==null?t:typeof t,""))}return e=ho(i,n,e,o),e.elementType=t,e.type=r,e.lanes=s,e}function Al(t,e,n,r){return t=ho(7,t,r,e),t.lanes=n,t}function J0(t,e,n,r){return t=ho(22,t,r,e),t.elementType=Lj,t.lanes=n,t.stateNode={isHidden:!1},t}function L1(t,e,n){return t=ho(6,t,null,e),t.lanes=n,t}function j1(t,e,n){return e=ho(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function PJ(t,e,n,r,o){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=v1(0),this.expirationTimes=v1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=v1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function bk(t,e,n,r,o,s,i,a,l){return t=new PJ(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ho(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nk(s),t}function AJ(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:qc,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function T5(t){if(!t)return Sa;t=t._reactInternals;e:{if(lc(t)!==t||t.tag!==1)throw Error(me(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Tr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(me(171))}if(t.tag===1){var n=t.type;if(Tr(n))return M$(t,n,e)}return e}function R5(t,e,n,r,o,s,i,a,l){return t=bk(n,r,!0,t,o,s,i,a,l),t.context=T5(null),n=t.current,r=lr(),o=da(n),s=ii(r,o),s.callback=e??null,ca(n,s,o),t.current.lanes=o,Jh(t,o,r),Rr(t,r),t}function Q0(t,e,n,r){var o=e.current,s=lr(),i=da(o);return n=T5(n),e.context===null?e.context=n:e.pendingContext=n,e=ii(s,i),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=ca(o,e,i),t!==null&&(Ko(t,o,i,s),dg(t,o,i)),i}function dv(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function WO(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function wk(t,e){WO(t,e),(t=t.alternate)&&WO(t,e)}function DJ(){return null}var O5=typeof reportError=="function"?reportError:function(t){console.error(t)};function xk(t){this._internalRoot=t}Z0.prototype.render=xk.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(me(409));Q0(t,e,null,null)};Z0.prototype.unmount=xk.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Yl(function(){Q0(null,t,null,null)}),e[hi]=null}};function Z0(t){this._internalRoot=t}Z0.prototype.unstable_scheduleHydration=function(t){if(t){var e=i$();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ui.length&&e!==0&&e<Ui[n].priority;n++);Ui.splice(n,0,t),n===0&&l$(t)}};function Sk(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ey(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function UO(){}function IJ(t,e,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=dv(i);s.call(c)}}var i=R5(e,r,t,0,null,!1,!1,"",UO);return t._reactRootContainer=i,t[hi]=i.current,nh(t.nodeType===8?t.parentNode:t),Yl(),i}for(;o=t.lastChild;)t.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=dv(l);a.call(c)}}var l=bk(t,0,!1,null,null,!1,!1,"",UO);return t._reactRootContainer=l,t[hi]=l.current,nh(t.nodeType===8?t.parentNode:t),Yl(function(){Q0(e,l,n,r)}),l}function ty(t,e,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=dv(i);a.call(l)}}Q0(e,i,t,o)}else i=IJ(n,e,t,o,r);return dv(i)}o$=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=lf(e.pendingLanes);n!==0&&(BC(e,n|1),Rr(e,Zt()),!(at&6)&&(ju=Zt()+500,ja()))}break;case 13:Yl(function(){var r=pi(t,1);if(r!==null){var o=lr();Ko(r,t,1,o)}}),wk(t,1)}};VC=function(t){if(t.tag===13){var e=pi(t,134217728);if(e!==null){var n=lr();Ko(e,t,134217728,n)}wk(t,134217728)}};s$=function(t){if(t.tag===13){var e=da(t),n=pi(t,e);if(n!==null){var r=lr();Ko(n,t,e,r)}wk(t,e)}};i$=function(){return vt};a$=function(t,e){var n=vt;try{return vt=t,e()}finally{vt=n}};qx=function(t,e,n){switch(e){case"input":if(Vx(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var o=U0(r);if(!o)throw Error(me(90));$j(r),Vx(r,o)}}}break;case"textarea":zj(t,n);break;case"select":e=n.value,e!=null&&uu(t,!!n.multiple,e,!1)}};Kj=mk;Yj=Yl;var NJ={usingClientEntryPoint:!1,Events:[Zh,eu,U0,Uj,Gj,mk]},Vd={findFiberByHostInstance:wl,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},LJ={bundleType:Vd.bundleType,version:Vd.version,rendererPackageName:Vd.rendererPackageName,rendererConfig:Vd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wi.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Jj(t),t===null?null:t.stateNode},findFiberByHostInstance:Vd.findFiberByHostInstance||DJ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var om=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!om.isDisabled&&om.supportsFiber)try{B0=om.inject(LJ),Ps=om}catch{}}to.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NJ;to.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sk(e))throw Error(me(200));return AJ(t,e,null,n)};to.createRoot=function(t,e){if(!Sk(t))throw Error(me(299));var n=!1,r="",o=O5;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=bk(t,1,!1,null,null,n,!1,r,o),t[hi]=e.current,nh(t.nodeType===8?t.parentNode:t),new xk(e)};to.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(me(188)):(t=Object.keys(t).join(","),Error(me(268,t)));return t=Jj(e),t=t===null?null:t.stateNode,t};to.flushSync=function(t){return Yl(t)};to.hydrate=function(t,e,n){if(!ey(e))throw Error(me(200));return ty(null,t,e,!0,n)};to.hydrateRoot=function(t,e,n){if(!Sk(t))throw Error(me(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=O5;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),e=R5(e,null,t,1,n??null,o,!1,s,i),t[hi]=e.current,nh(t),r)for(t=0;t<r.length;t++)n=r[t],o=n._getVersion,o=o(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,o]:e.mutableSourceEagerHydrationData.push(n,o);return new Z0(e)};to.render=function(t,e,n){if(!ey(e))throw Error(me(200));return ty(null,t,e,!1,n)};to.unmountComponentAtNode=function(t){if(!ey(t))throw Error(me(40));return t._reactRootContainer?(Yl(function(){ty(null,null,t,!1,function(){t._reactRootContainer=null,t[hi]=null})}),!0):!1};to.unstable_batchedUpdates=mk;to.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!ey(n))throw Error(me(200));if(t==null||t._reactInternals===void 0)throw Error(me(38));return ty(t,e,n,!1,r)};to.version="18.2.0-next-9e3b772b8-20220608";function P5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P5)}catch(t){console.error(t)}}P5(),Rj.exports=to;var cc=Rj.exports;const A5=bi(cc);var GO=cc;zR.createRoot=GO.createRoot,zR.hydrateRoot=GO.hydrateRoot;var _s=function(){return _s=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_s.apply(this,arguments)};function D5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function jJ(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,s;r<o;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var yg="right-scroll-bar-position",bg="width-before-scroll-bar",$J="with-scroll-bars-hidden",FJ="--removed-body-scroll-bar-size";function $1(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function zJ(t,e){var n=C.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}var KO=new WeakMap;function BJ(t,e){var n=zJ(e||null,function(r){return t.forEach(function(o){return $1(o,r)})});return C.useLayoutEffect(function(){var r=KO.get(n);if(r){var o=new Set(r),s=new Set(t),i=n.current;o.forEach(function(a){s.has(a)||$1(a,null)}),s.forEach(function(a){o.has(a)||$1(a,i)})}KO.set(n,t)},[t]),n}function VJ(t){return t}function HJ(t,e){e===void 0&&(e=VJ);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var i=e(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function WJ(t){t===void 0&&(t={});var e=HJ(null);return e.options=_s({async:!0,ssr:!1},t),e}var I5=function(t){var e=t.sideCar,n=D5(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,_s({},n))};I5.isSideCarExport=!0;function UJ(t,e){return t.useMedium(e),I5}var N5=WJ(),F1=function(){},ny=C.forwardRef(function(t,e){var n=C.useRef(null),r=C.useState({onScrollCapture:F1,onWheelCapture:F1,onTouchMoveCapture:F1}),o=r[0],s=r[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noIsolation,p=t.inert,m=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,b=t.gapMode,w=D5(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,_=BJ([n,e]),k=_s(_s({},w),o);return C.createElement(C.Fragment,null,u&&C.createElement(S,{sideCar:N5,removeScrollBar:c,shards:d,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?C.cloneElement(C.Children.only(a),_s(_s({},k),{ref:_})):C.createElement(y,_s({},k,{className:l,ref:_}),a))});ny.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ny.classNames={fullWidth:bg,zeroRight:yg};var GJ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KJ(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=GJ();return e&&t.setAttribute("nonce",e),t}function YJ(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function qJ(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var XJ=function(){var t=0,e=null;return{add:function(n){t==0&&(e=KJ())&&(YJ(e,n),qJ(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},JJ=function(){var t=XJ();return function(e,n){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},L5=function(){var t=JJ(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e},QJ={left:0,top:0,right:0,gap:0},z1=function(t){return parseInt(t||"",10)||0},ZJ=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[z1(n),z1(r),z1(o)]},eQ=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return QJ;var e=ZJ(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},tQ=L5(),nQ=function(t,e,n,r){var o=t.left,s=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat($J,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(i,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(yg,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(bg,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(yg," .").concat(yg,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(bg," .").concat(bg,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body {
    `).concat(FJ,": ").concat(a,`px;
  }
`)},rQ=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,o=r===void 0?"margin":r,s=C.useMemo(function(){return eQ(o)},[o]);return C.createElement(tQ,{styles:nQ(s,!e,o,n?"":"!important")})},TS=!1;if(typeof window<"u")try{var sm=Object.defineProperty({},"passive",{get:function(){return TS=!0,!0}});window.addEventListener("test",sm,sm),window.removeEventListener("test",sm,sm)}catch{TS=!1}var Mc=TS?{passive:!1}:!1,oQ=function(t){return t.tagName==="TEXTAREA"},j5=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!oQ(t)&&n[e]==="visible")},sQ=function(t){return j5(t,"overflowY")},iQ=function(t){return j5(t,"overflowX")},YO=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=$5(t,r);if(o){var s=F5(t,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},aQ=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},lQ=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},$5=function(t,e){return t==="v"?sQ(e):iQ(e)},F5=function(t,e){return t==="v"?aQ(e):lQ(e)},cQ=function(t,e){return t==="h"&&e==="rtl"?-1:1},uQ=function(t,e,n,r,o){var s=cQ(t,window.getComputedStyle(e).direction),i=s*r,a=n.target,l=e.contains(a),c=!1,u=i>0,d=0,f=0;do{var h=F5(t,a),p=h[0],m=h[1],v=h[2],y=m-v-s*p;(p||y)&&$5(t,a)&&(d+=y,f+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c},im=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},qO=function(t){return[t.deltaX,t.deltaY]},XO=function(t){return t&&"current"in t?t.current:t},dQ=function(t,e){return t[0]===e[0]&&t[1]===e[1]},fQ=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},hQ=0,Tc=[];function pQ(t){var e=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(hQ++)[0],s=C.useState(L5)[0],i=C.useRef(t);C.useEffect(function(){i.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var m=jJ([t.lockRef.current],(t.shards||[]).map(XO),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=C.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!i.current.allowPinchZoom;var y=im(m),b=n.current,w="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],_,k=m.target,M=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in m&&M==="h"&&k.type==="range")return!1;var T=YO(M,k);if(!T)return!0;if(T?_=M:(_=M==="v"?"h":"v",T=YO(M,k)),!T)return!1;if(!r.current&&"changedTouches"in m&&(w||S)&&(r.current=_),!_)return!0;var P=r.current||_;return uQ(P,v,m,P==="h"?w:S,!0)},[]),l=C.useCallback(function(m){var v=m;if(!(!Tc.length||Tc[Tc.length-1]!==s)){var y="deltaY"in v?qO(v):im(v),b=e.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&dQ(_.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(XO).filter(Boolean).filter(function(_){return _.contains(v.target)}),S=w.length>0?a(v,w[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),c=C.useCallback(function(m,v,y,b){var w={name:m,delta:v,target:y,should:b,shadowParent:mQ(y)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),u=C.useCallback(function(m){n.current=im(m),r.current=void 0},[]),d=C.useCallback(function(m){c(m.type,qO(m),m.target,a(m,t.lockRef.current))},[]),f=C.useCallback(function(m){c(m.type,im(m),m.target,a(m,t.lockRef.current))},[]);C.useEffect(function(){return Tc.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Mc),document.addEventListener("touchmove",l,Mc),document.addEventListener("touchstart",u,Mc),function(){Tc=Tc.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Mc),document.removeEventListener("touchmove",l,Mc),document.removeEventListener("touchstart",u,Mc)}},[]);var h=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:fQ(o)}):null,h?C.createElement(rQ,{gapMode:t.gapMode}):null)}function mQ(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const gQ=UJ(N5,pQ);var ry=C.forwardRef(function(t,e){return C.createElement(ny,_s({},t,{ref:e,sideCar:gQ}))});ry.classNames=ny.classNames;function St(t){return Object.keys(t)}function B1(t){return t&&typeof t=="object"&&!Array.isArray(t)}function _k(t,e){const n={...t},r=e;return B1(t)&&B1(e)&&Object.keys(e).forEach(o=>{B1(r[o])&&o in t?n[o]=_k(n[o],r[o]):n[o]=r[o]}),n}function vQ(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function yQ(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function dh(t){const e=yQ(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function V1(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function z5(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const o=`${r/16}${t}`;return e?V1(o):o}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(s=>n(s)).join(",");if(r.includes(" "))return r.split(" ").map(s=>n(s)).join(" ");if(r.includes(t))return e?V1(r):r;const o=r.replace("px","");if(!Number.isNaN(Number(o))){const s=`${Number(o)/16}${t}`;return e?V1(s):s}}return r}return n}const Y=z5("rem",{shouldScale:!0}),fv=z5("em");function $a(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function B5(t){return typeof t=="number"?!0:typeof t=="string"?t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!==""?!0:/[0-9]/.test(t.trim().replace("-","")[0]):!1}function Fa(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==C.Fragment:!1}function bn(t){const e=C.createContext(null);return[({children:o,value:s})=>g.jsx(e.Provider,{value:s,children:o}),()=>{const o=C.useContext(e);if(o===null)throw new Error(t);return o}]}function uc(t=null){const e=C.createContext(t);return[({children:o,value:s})=>g.jsx(e.Provider,{value:s,children:o}),()=>C.useContext(e)]}function JO(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function hv(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function bQ(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function wQ(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function xQ(t,e,n){return hv(t,n)===hv(e,n)}function V5({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:o=!1,dir:s="rtl",orientation:i}){return a=>{var p;n==null||n(a);const l=Array.from(((p=hv(a.currentTarget,t))==null?void 0:p.querySelectorAll(e))||[]).filter(m=>xQ(a.currentTarget,m,t)),c=l.findIndex(m=>a.currentTarget===m),u=wQ(c,l,r),d=bQ(c,l,r),f=s==="rtl"?d:u,h=s==="rtl"?u:d;switch(a.key){case"ArrowRight":{i==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[f].focus(),o&&l[f].click());break}case"ArrowLeft":{i==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[h].focus(),o&&l[h].click());break}case"ArrowUp":{i==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[d].focus(),o&&l[d].click());break}case"ArrowDown":{i==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[u].focus(),o&&l[u].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const m=l.length-1;!l[m].disabled&&l[m].focus();break}}}}const SQ={app:100,modal:200,popover:300,overlay:400,max:9999};function rs(t){return SQ[t]}const _Q=()=>{};function CQ(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||_Q:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function $e(t,e="size",n=!0){if(t!==void 0)return B5(t)?n?Y(t):t:`var(--${e}-${t})`}function Dt(t){return $e(t,"mantine-spacing")}function dt(t){return t===void 0?"var(--mantine-radius-default)":$e(t,"mantine-radius")}function vn(t){return $e(t,"mantine-font-size")}function H5(t){return $e(t,"mantine-line-height",!1)}function Ck(t){if(t)return $e(t,"mantine-shadow",!1)}function Br(t,e){return n=>{t==null||t(n),e==null||e(n)}}function kk(t,e){return t in e.breakpoints?dh(e.breakpoints[t]):dh(t)}function fh(t,e){const n=t.map(r=>({value:r,px:kk(r,e)}));return n.sort((r,o)=>r.px-o.px),n}function Ho(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function kQ(t,e,n){var r;return n?Array.from(((r=hv(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(o=>o===n):null}function EQ(){const[t,e]=C.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function hh(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function W5(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function pl(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function oy(t,e){const n=pl(t),r=C.useRef(0);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),C.useCallback((...o)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...o),e)},[n,e])}const QO=["mousedown","touchstart"];function MQ(t,e,n){const r=C.useRef();return C.useEffect(()=>{const o=s=>{const{target:i}=s??{};if(Array.isArray(n)){const a=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";n.every(c=>!!c&&!s.composedPath().includes(c))&&!a&&t()}else r.current&&!r.current.contains(i)&&t()};return(e||QO).forEach(s=>document.addEventListener(s,o)),()=>{(e||QO).forEach(s=>document.removeEventListener(s,o))}},[r,t,n]),r}function TQ({timeout:t=2e3}={}){const[e,n]=C.useState(null),[r,o]=C.useState(!1),[s,i]=C.useState(null),a=u=>{window.clearTimeout(s),i(window.setTimeout(()=>o(!1),t)),o(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>a(!0)).catch(d=>n(d)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),n(null),window.clearTimeout(s)},error:e,copied:r}}function RQ(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function OQ(t,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function ph(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=C.useState(n?e:OQ(t)),s=C.useRef();return C.useEffect(()=>{if("matchMedia"in window)return s.current=window.matchMedia(t),o(s.current.matches),RQ(s.current,i=>o(i.matches))},[t]),r}function U5(t,e){return ph("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}function G5(t,e,n={leading:!1}){const[r,o]=C.useState(t),s=C.useRef(!1),i=C.useRef(null),a=C.useRef(!1),l=()=>window.clearTimeout(i.current);return C.useEffect(()=>{s.current&&(!a.current&&n.leading?(a.current=!0,o(t)):(l(),i.current=window.setTimeout(()=>{a.current=!1,o(t)},e)))},[t,n.leading,e]),C.useEffect(()=>(s.current=!0,l),[]),[r,l]}const dc=typeof document<"u"?C.useLayoutEffect:C.useEffect;function I2e(t){dc(()=>{typeof t=="string"&&t.trim().length>0&&(document.title=t.trim())},[t])}function cr(t,e){const n=C.useRef(!1);C.useEffect(()=>()=>{n.current=!1},[]),C.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function K5({opened:t,shouldReturnFocus:e=!0}){const n=C.useRef(),r=()=>{var o;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((o=n.current)==null||o.focus({preventScroll:!0}))};return cr(()=>{let o=-1;const s=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",s),t?n.current=document.activeElement:e&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",s)}},[t,e]),r}function PQ(t,e="body > :not(script)"){const n=W5(),r=Array.from(document.querySelectorAll(e)).map(o=>{var l;if((l=o==null?void 0:o.shadowRoot)!=null&&l.contains(t)||o.contains(t))return;const s=o.getAttribute("aria-hidden"),i=o.getAttribute("data-hidden"),a=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",n),s===null||s==="false"?o.setAttribute("aria-hidden","true"):!i&&!a&&o.setAttribute("data-hidden",s),{node:o,ariaHidden:i||null}});return()=>{r.forEach(o=>{!o||n!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}const AQ=/input|select|textarea|button|object/,Y5="a, input, select, textarea, button, object, [tabindex]";function DQ(t){return t.style.display==="none"}function IQ(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(DQ(n))return!1;n=n.parentNode}return!0}function q5(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function RS(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(q5(t));return(AQ.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&IQ(t)}function X5(t){const e=q5(t);return(Number.isNaN(e)||e>=0)&&RS(t)}function NQ(t){return Array.from(t.querySelectorAll(Y5)).filter(X5)}function LQ(t,e){const n=NQ(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],o=t.getRootNode();let s=r===o.activeElement||t===o.activeElement;const i=o.activeElement;if(i.tagName==="INPUT"&&i.getAttribute("type")==="radio"&&(s=n.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===i.getAttribute("name")).includes(r)),!s)return;e.preventDefault();const l=n[e.shiftKey?n.length-1:0];l&&l.focus()}function jQ(t=!0){const e=C.useRef(),n=C.useRef(null),r=s=>{let i=s.querySelector("[data-autofocus]");if(!i){const a=Array.from(s.querySelectorAll(Y5));i=a.find(X5)||a.find(RS)||null,!i&&RS(s)&&(i=s)}i&&i.focus({preventScroll:!0})},o=C.useCallback(s=>{if(t){if(s===null){n.current&&(n.current(),n.current=null);return}n.current=PQ(s),e.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&r(s)}),e.current=s):e.current=null)}},[t]);return C.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>r(e.current));const s=i=>{i.key==="Tab"&&e.current&&LQ(e.current,i)};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s),n.current&&n.current()}},[t]),o}const $Q=$t.useId||(()=>{});function FQ(){const t=$Q();return t?`mantine-${t.replace(/:/g,"")}`:""}function mr(t){const e=FQ(),[n,r]=C.useState(e);return dc(()=>{r(W5())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function Ek(t,e,n){C.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function J5(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function Q5(...t){return e=>{t.forEach(n=>J5(n,e))}}function wn(...t){return C.useCallback(Q5(...t),t)}function Z5(t){return{x:hh(t.x,0,1),y:hh(t.y,0,1)}}function Mk(t,e,n="ltr"){const r=C.useRef(null),o=C.useRef(!1),s=C.useRef(!1),i=C.useRef(0),[a,l]=C.useState(!1);return C.useEffect(()=>{o.current=!0},[]),C.useEffect(()=>{var b,w;const c=({x:S,y:_})=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{if(o.current&&r.current){r.current.style.userSelect="none";const k=r.current.getBoundingClientRect();if(k.width&&k.height){const M=hh((S-k.left)/k.width,0,1);t({x:n==="ltr"?M:1-M,y:hh((_-k.top)/k.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",h),document.addEventListener("touchmove",y),document.addEventListener("touchend",h)},d=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",h)},f=()=>{!s.current&&o.current&&(s.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),l(!0),u())},h=()=>{s.current&&o.current&&(s.current=!1,l(!1),d(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},p=S=>{f(),S.preventDefault(),m(S)},m=S=>c({x:S.clientX,y:S.clientY}),v=S=>{S.cancelable&&S.preventDefault(),f(),y(S)},y=S=>{S.cancelable&&S.preventDefault(),c({x:S.changedTouches[0].clientX,y:S.changedTouches[0].clientY})};return(b=r.current)==null||b.addEventListener("mousedown",p),(w=r.current)==null||w.addEventListener("touchstart",v,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",p),r.current.removeEventListener("touchstart",v))}},[n,t]),{ref:r,active:a}}function yn({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[o,s]=C.useState(e!==void 0?e:n),i=(a,...l)=>{s(a),r==null||r(a,...l)};return t!==void 0?[t,r,!0]:[o,i,!1]}function Di(t,e){const n=e-t+1;return Array.from({length:n},(r,o)=>o+t)}const am="dots";function zQ({total:t,siblings:e=1,boundaries:n=1,page:r,initialPage:o=1,onChange:s}){const i=Math.max(Math.trunc(t),0),[a,l]=yn({value:r,onChange:s,defaultValue:o,finalValue:o}),c=m=>{m<=0?l(1):m>i?l(i):l(m)},u=()=>c(a+1),d=()=>c(a-1),f=()=>c(1),h=()=>c(i);return{range:C.useMemo(()=>{if(e*2+3+n*2>=i)return Di(1,i);const v=Math.max(a-e,n),y=Math.min(a+e,i-n),b=v>n+2,w=y<i-(n+1);if(!b&&w){const S=e*2+n+2;return[...Di(1,S),am,...Di(i-(n-1),i)]}if(b&&!w){const S=n+1+2*e;return[...Di(1,n),am,...Di(i-S,i)]}return[...Di(1,n),am,...Di(v,y),am,...Di(i-n+1,i)]},[i,e,a]),active:a,setPage:c,next:u,previous:d,first:f,last:h}}function Tk(t,e){return ph("(prefers-reduced-motion: reduce)",t,e)}function BQ(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n.type==="checkbox"?t(n.checked):t(n.value)}else t(e)}}function VQ(t){const[e,n]=C.useState(t);return[e,BQ(n)]}function sy(t=!1,e){const{onOpen:n,onClose:r}=e||{},[o,s]=C.useState(t),i=C.useCallback(()=>{s(c=>c||(n==null||n(),!0))},[n]),a=C.useCallback(()=>{s(c=>c&&(r==null||r(),!1))},[r]),l=C.useCallback(()=>{o?a():i()},[a,i,o]);return[o,{open:i,close:a,toggle:l}]}function HQ(t){const e=C.useRef();return C.useEffect(()=>{e.current=t},[t]),e.current}var WQ={};function UQ(){return typeof process<"u"&&WQ?"production":"development"}function e3(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=e3(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function rn(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=e3(t))&&(r&&(r+=" "),r+=e);return r}const GQ={};function KQ(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,o])=>{e[r]?e[r]=rn(e[r],o):e[r]=o})}),e}function iy({theme:t,classNames:e,props:n,stylesCtx:r}){const s=(Array.isArray(e)?e:[e]).map(i=>typeof i=="function"?i(t,n,r):i||GQ);return KQ(s)}function pv({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((s,i)=>typeof i=="function"?{...s,...i(t,n,r)}:{...s,...i},{})}const Rk=C.createContext(null);function za(){const t=C.useContext(Rk);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function YQ(){return za().cssVariablesResolver}function qQ(){return za().classNamesPrefix}function ay(){return za().getStyleNonce}function XQ(){return za().withStaticClasses}function JQ(){return za().headless}function QQ(){var t;return(t=za().stylesTransform)==null?void 0:t.sx}function ZQ(){var t;return(t=za().stylesTransform)==null?void 0:t.styles}function eZ(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function tZ(t){let e=t.replace("#","");if(e.length===3){const i=e.split("");e=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(e.length===8){const i=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:i}}const n=parseInt(e,16),r=n>>16&255,o=n>>8&255,s=n&255;return{r,g:o,b:s,a:1}}function nZ(t){const[e,n,r,o]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:o||1}}function rZ(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),o=parseInt(n[2],10)/100,s=parseInt(n[3],10)/100,i=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*s-1))*o,l=r/60,c=a*(1-Math.abs(l%2-1)),u=s-a/2;let d,f,h;return l>=0&&l<1?(d=a,f=c,h=0):l>=1&&l<2?(d=c,f=a,h=0):l>=2&&l<3?(d=0,f=a,h=c):l>=3&&l<4?(d=0,f=c,h=a):l>=4&&l<5?(d=c,f=0,h=a):(d=a,f=0,h=c),{r:Math.round((d+u)*255),g:Math.round((f+u)*255),b:Math.round((h+u)*255),a:i||1}}function ly(t){return eZ(t)?tZ(t):t.startsWith("rgb")?nZ(t):t.startsWith("hsl")?rZ(t):{r:0,g:0,b:0,a:1}}function uf(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:o,a:s}=ly(t),i=1-e,a=l=>Math.round(l*i);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${s})`}function mh(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function H1(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function oZ(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function sZ(t){if(t.startsWith("oklch("))return(oZ(t)||0)/100;const{r:e,g:n,b:r}=ly(t),o=e/255,s=n/255,i=r/255,a=H1(o),l=H1(s),c=H1(i);return .2126*a+.7152*l+.0722*c}function Hd(t,e=.179){return t.startsWith("var(")?!1:sZ(t)>e}function ss({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Hd(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Hd(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:Hd(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,o]=t.split("."),s=o?Number(o):void 0,i=r in e.colors;if(i){const a=s!==void 0?e.colors[r][s]:e.colors[r][mh(e,n||"light")];return{color:r,value:a,shade:s,isThemeColor:i,isLight:Hd(a,e.luminanceThreshold),variable:o?`--mantine-color-${r}-${s}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:i,isLight:Hd(t,e.luminanceThreshold),shade:s,variable:void 0}}function yt(t,e){const n=ss({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function OS(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)||e.defaultGradient.deg||0},r=yt(n.from,e),o=yt(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${o} 100%)`}function ps(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const s=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${s}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:o}=ly(t);return`rgba(${n}, ${r}, ${o}, ${e})`}const Rc=ps,iZ=({color:t,theme:e,variant:n,gradient:r,autoContrast:o})=>{const s=ss({color:t,theme:e}),i=typeof o=="boolean"?o:e.autoContrast;if(n==="filled"){const a=i&&s.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return s.isThemeColor?s.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:a,border:`${Y(1)} solid transparent`}:{background:`var(--mantine-color-${s.color}-${s.shade})`,hover:`var(--mantine-color-${s.color}-${s.shade===9?8:s.shade+1})`,color:a,border:`${Y(1)} solid transparent`}:{background:t,hover:uf(t,.1),color:a,border:`${Y(1)} solid transparent`}}if(n==="light"){if(s.isThemeColor){if(s.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Y(1)} solid transparent`};const a=e.colors[s.color][s.shade];return{background:ps(a,.1),hover:ps(a,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Y(1)} solid transparent`}}return{background:ps(t,.1),hover:ps(t,.12),color:t,border:`${Y(1)} solid transparent`}}if(n==="outline")return s.isThemeColor?s.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Y(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:ps(e.colors[s.color][s.shade],.05),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${Y(1)} solid var(--mantine-color-${s.color}-${s.shade})`}:{background:"transparent",hover:ps(t,.05),color:t,border:`${Y(1)} solid ${t}`};if(n==="subtle"){if(s.isThemeColor){if(s.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Y(1)} solid transparent`};const a=e.colors[s.color][s.shade];return{background:"transparent",hover:ps(a,.12),color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Y(1)} solid transparent`}}return{background:"transparent",hover:ps(t,.12),color:t,border:`${Y(1)} solid transparent`}}return n==="transparent"?s.isThemeColor?s.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Y(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${s.color}-${Math.min(s.shade,6)})`,border:`${Y(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Y(1)} solid transparent`}:n==="white"?s.isThemeColor?s.shade===void 0?{background:"var(--mantine-color-white)",hover:uf(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Y(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:uf(e.white,.01),color:`var(--mantine-color-${s.color}-${s.shade})`,border:`${Y(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:uf(e.white,.01),color:t,border:`${Y(1)} solid transparent`}:n==="gradient"?{background:OS(r,e),hover:OS(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Y(1)} solid var(--mantine-color-default-border)`}:{}},aZ={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"]},ZO="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Ok={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:aZ,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:iZ,autoContrast:!1,luminanceThreshold:.3,fontFamily:ZO,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:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:ZO,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Y(34),lineHeight:"1.3"},h2:{fontSize:Y(26),lineHeight:"1.35"},h3:{fontSize:Y(22),lineHeight:"1.4"},h4:{fontSize:Y(18),lineHeight:"1.45"},h5:{fontSize:Y(16),lineHeight:"1.5"},h6:{fontSize:Y(14),lineHeight:"1.5"}}},fontSizes:{xs:Y(12),sm:Y(14),md:Y(16),lg:Y(18),xl:Y(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Y(2),sm:Y(4),md:Y(8),lg:Y(16),xl:Y(32)},spacing:{xs:Y(10),sm:Y(12),md:Y(16),lg:Y(20),xl:Y(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), 0 ${Y(1)} ${Y(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(10)} ${Y(15)} ${Y(-5)}, rgba(0, 0, 0, 0.04) 0 ${Y(7)} ${Y(7)} ${Y(-5)}`,md:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(20)} ${Y(25)} ${Y(-5)}, rgba(0, 0, 0, 0.04) 0 ${Y(10)} ${Y(10)} ${Y(-5)}`,lg:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(28)} ${Y(23)} ${Y(-7)}, rgba(0, 0, 0, 0.04) 0 ${Y(12)} ${Y(12)} ${Y(-7)}`,xl:`0 ${Y(1)} ${Y(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Y(36)} ${Y(28)} ${Y(-7)}, rgba(0, 0, 0, 0.04) 0 ${Y(17)} ${Y(17)} ${Y(-7)}`},other:{},components:{}};function eP(t){return t==="auto"||t==="dark"||t==="light"}function lZ({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return eP(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&eP(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const cZ="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",tP="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function W1(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function nP(t){if(!(t.primaryColor in t.colors))throw new Error(cZ);if(typeof t.primaryShade=="object"&&(!W1(t.primaryShade.dark)||!W1(t.primaryShade.light)))throw new Error(tP);if(typeof t.primaryShade=="number"&&!W1(t.primaryShade))throw new Error(tP)}function uZ(t,e){var r;if(!e)return nP(t),t;const n=_k(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),nP(n),n}const Pk=C.createContext(null),dZ=()=>C.useContext(Pk)||Ok;function Xt(){const t=C.useContext(Pk);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function t3({theme:t,children:e,inherit:n=!0}){const r=dZ(),o=C.useMemo(()=>uZ(n?r:Ok,t),[t,r,n]);return g.jsx(Pk.Provider,{value:o,children:e})}t3.displayName="@mantine/core/MantineThemeProvider";function fZ(){const t=Xt(),e=ay(),n=St(t.breakpoints).reduce((r,o)=>{const s=t.breakpoints[o].includes("px"),i=dh(t.breakpoints[o]),a=s?`${i-.1}px`:fv(i-.1),l=s?`${i}px`:fv(i);return`${r}@media (max-width: ${a}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return g.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function U1(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function Wd(t,e){return(Array.isArray(t)?t:[t]).reduce((r,o)=>`${o}{${r}}`,e)}function hZ(t,e){const n=U1(t.variables),r=n?Wd(e,n):"",o=U1(t.dark),s=U1(t.light),i=o?Wd(e===":host"?`${e}([data-mantine-color-scheme="dark"])`:`${e}[data-mantine-color-scheme="dark"]`,o):"",a=s?Wd(e===":host"?`${e}([data-mantine-color-scheme="light"])`:`${e}[data-mantine-color-scheme="light"]`,s):"";return`${r}${i}${a}`}function Fs({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&ss({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function rP(t,e){return Fs({color:t.colors[t.primaryColor][mh(t,e)],theme:t,autoContrast:null})}function lm({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:o=!0}){if(!t.colors[e])return{};if(n==="light"){const a=mh(t,"light"),l={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Rc(t.colors[e][a],.1),[`--mantine-color-${r}-light-hover`]:Rc(t.colors[e][a],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline-hover`]:Rc(t.colors[e][a],.05)};return o?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...l}:l}const s=mh(t,"dark"),i={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:Rc(t.colors[e][Math.max(0,s-2)],.15),[`--mantine-color-${r}-light-hover`]:Rc(t.colors[e][Math.max(0,s-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(s-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:Rc(t.colors[e][Math.max(s-4,0)],.05)};return o?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...i}:i}function pZ(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Oc(t,e,n){St(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const n3=t=>{const e=mh(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Y(t.defaultRadius),r={variables:{"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":rP(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--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)"},dark:{"--mantine-primary-color-contrast":rP(t,"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-${t.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)"}};Oc(r.variables,t.breakpoints,"breakpoint"),Oc(r.variables,t.spacing,"spacing"),Oc(r.variables,t.fontSizes,"font-size"),Oc(r.variables,t.lineHeights,"line-height"),Oc(r.variables,t.shadows,"shadow"),Oc(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((s,i)=>{r.variables[`--mantine-primary-color-${i}`]=`var(--mantine-color-${t.primaryColor}-${i})`}),St(t.colors).forEach(s=>{const i=t.colors[s];if(pZ(i)){Object.assign(r.light,lm({theme:t,name:i.name,color:i.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,lm({theme:t,name:i.name,color:i.dark,colorScheme:"dark",withColorValues:!0}));return}i.forEach((a,l)=>{r.variables[`--mantine-color-${s}-${l}`]=a}),Object.assign(r.light,lm({theme:t,color:s,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,lm({theme:t,color:s,colorScheme:"dark",withColorValues:!1}))});const o=t.headings.sizes;return St(o).forEach(s=>{r.variables[`--mantine-${s}-font-size`]=o[s].fontSize,r.variables[`--mantine-${s}-line-height`]=o[s].lineHeight,r.variables[`--mantine-${s}-font-weight`]=o[s].fontWeight||t.headings.fontWeight}),r};function mZ({theme:t,generator:e}){const n=n3(t),r=e==null?void 0:e(t);return r?_k(n,r):n}const G1=n3(Ok);function gZ(t){const e={variables:{},light:{},dark:{}};return St(t.variables).forEach(n=>{G1.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),St(t.light).forEach(n=>{G1.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),St(t.dark).forEach(n=>{G1.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function vZ(t){return`
  ${t}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
  ${t}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
`}function r3({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=Xt(),r=ay(),o=YQ(),s=mZ({theme:n,generator:o}),i=t===":root"&&e,a=i?gZ(s):s,l=hZ(a,t);return l?g.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${l}${i?"":vZ(t)}`}}):null}r3.displayName="@mantine/CssVariables";function yZ(){const t=console.error;console.error=(...e)=>{e.length>1&&typeof e[0]=="string"&&e[0].toLowerCase().includes("extra attributes from the server")&&typeof e[1]=="string"&&e[1].toLowerCase().includes("data-mantine-color-scheme")||t(...e)}}function Pc(t,e){var r;const n=t!=="auto"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(r=e())==null||r.setAttribute("data-mantine-color-scheme",n)}function bZ({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const o=C.useRef(),[s,i]=C.useState(()=>t.get(e)),a=r||s,l=C.useCallback(u=>{r||(Pc(u,n),i(u),t.set(u))},[t.set,a,r]),c=C.useCallback(()=>{i(e),Pc(e,n),t.clear()},[t.clear,e]);return C.useEffect(()=>(t.subscribe(l),t.unsubscribe),[t.subscribe,t.unsubscribe]),dc(()=>{Pc(t.get(e),n)},[]),C.useEffect(()=>{var d;if(r)return Pc(r,n),()=>{};r===void 0&&Pc(s,n),o.current=window.matchMedia("(prefers-color-scheme: dark)");const u=f=>{s==="auto"&&Pc(f.matches?"dark":"light",n)};return(d=o.current)==null||d.addEventListener("change",u),()=>{var f;return(f=o.current)==null?void 0:f.removeEventListener("change",u)}},[s,r]),{colorScheme:a,setColorScheme:l,clearColorScheme:c}}function wZ({respectReducedMotion:t,getRootElement:e}){dc(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}yZ();function xZ({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:o=!0,deduplicateCssVariables:s=!0,withCssVariables:i=!0,cssVariablesSelector:a=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=lZ(),defaultColorScheme:u="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:h,stylesTransform:p}){const{colorScheme:m,setColorScheme:v,clearColorScheme:y}=bZ({defaultColorScheme:u,forceColorScheme:h,manager:c,getRootElement:d});return wZ({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:d}),g.jsx(Rk.Provider,{value:{colorScheme:m,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:l,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:a,withStaticClasses:r,stylesTransform:p},children:g.jsxs(t3,{theme:t,children:[i&&g.jsx(r3,{cssVariablesSelector:a,deduplicateCssVariables:s}),o&&g.jsx(fZ,{}),e]})})}xZ.displayName="@mantine/core/MantineProvider";function Nr({classNames:t,styles:e,props:n,stylesCtx:r}){const o=Xt();return{resolvedClassNames:iy({theme:o,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:pv({theme:o,styles:e,props:n,stylesCtx:r||void 0})}}const SZ={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function _Z({theme:t,options:e,unstyled:n}){return rn((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||SZ[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function CZ({selector:t,stylesCtx:e,options:n,props:r,theme:o}){return iy({theme:o,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function oP({selector:t,stylesCtx:e,theme:n,classNames:r,props:o}){return iy({theme:n,classNames:r,props:o,stylesCtx:e})[t]}function kZ({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function EZ({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function MZ({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(o=>`${e}-${o}-${n}`)}function TZ({themeName:t,theme:e,selector:n,props:r,stylesCtx:o}){return t.map(s=>{var i,a;return(a=iy({theme:e,classNames:(i=e.components[s])==null?void 0:i.classNames,props:r,stylesCtx:o}))==null?void 0:a[n]})}function RZ({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function OZ({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:o,classNames:s,classes:i,unstyled:a,className:l,rootSelector:c,props:u,stylesCtx:d,withStaticClasses:f,headless:h,transformedStyles:p}){return rn(_Z({theme:t,options:e,unstyled:a||h}),TZ({theme:t,themeName:n,selector:r,props:u,stylesCtx:d}),RZ({options:e,classes:i,selector:r,unstyled:a}),oP({selector:r,stylesCtx:d,theme:t,classNames:s,props:u}),oP({selector:r,stylesCtx:d,theme:t,classNames:p,props:u}),CZ({selector:r,stylesCtx:d,options:e,props:u,theme:t}),kZ({rootSelector:c,selector:r,className:l}),EZ({selector:r,classes:i,unstyled:a||h}),f&&!h&&MZ({themeName:n,classNamesPrefix:o,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function PZ({theme:t,themeName:e,props:n,stylesCtx:r,selector:o}){return e.map(s=>{var i;return pv({theme:t,styles:(i=t.components[s])==null?void 0:i.styles,props:n,stylesCtx:r})[o]}).reduce((s,i)=>({...s,...i}),{})}function PS({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...PS({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function AZ(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...$a(n[r])}}),e),{})}function DZ({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:o,selector:s,themeName:i,headless:a}){var l;return(l=AZ([a?{}:e==null?void 0:e(n,r,o),...i.map(c=>{var u,d,f;return(f=(d=(u=n.components)==null?void 0:u[c])==null?void 0:d.vars)==null?void 0:f.call(d,n,r,o)}),t==null?void 0:t(n,r,o)]))==null?void 0:l[s]}function IZ({theme:t,themeName:e,selector:n,options:r,props:o,stylesCtx:s,rootSelector:i,styles:a,style:l,vars:c,varsResolver:u,headless:d,withStylesTransform:f}){return{...!f&&PZ({theme:t,themeName:e,props:o,stylesCtx:s,selector:n}),...!f&&pv({theme:t,styles:a,props:o,stylesCtx:s})[n],...!f&&pv({theme:t,styles:r==null?void 0:r.styles,props:(r==null?void 0:r.props)||o,stylesCtx:s})[n],...DZ({theme:t,props:o,stylesCtx:s,vars:c,varsResolver:u,selector:n,themeName:e,headless:d}),...i===n?PS({style:l,theme:t}):null,...PS({style:r==null?void 0:r.style,theme:t})}}function NZ({props:t,stylesCtx:e,themeName:n}){var i;const r=Xt(),o=(i=ZQ())==null?void 0:i();return{getTransformedStyles:a=>o?[...a.map(c=>o(c,{props:t,theme:r,ctx:e})),...n.map(c=>{var u;return o((u=r.components[c])==null?void 0:u.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!o}}function be({name:t,classes:e,props:n,stylesCtx:r,className:o,style:s,rootSelector:i="root",unstyled:a,classNames:l,styles:c,vars:u,varsResolver:d}){const f=Xt(),h=qQ(),p=XQ(),m=JQ(),v=(Array.isArray(t)?t:[t]).filter(w=>w),{withStylesTransform:y,getTransformedStyles:b}=NZ({props:n,stylesCtx:r,themeName:v});return(w,S)=>({className:OZ({theme:f,options:S,themeName:v,selector:w,classNamesPrefix:h,classNames:l,classes:e,unstyled:a,className:o,rootSelector:i,props:n,stylesCtx:r,withStaticClasses:p,headless:m,transformedStyles:b([S==null?void 0:S.styles,c])}),style:IZ({theme:f,themeName:v,selector:w,options:S,props:n,stylesCtx:r,rootSelector:i,styles:c,style:s,vars:u,varsResolver:d,headless:m,withStylesTransform:y})})}function LZ(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, white ${e*100}%)`;const{r:n,g:r,b:o,a:s}=ly(t),i=a=>Math.round(a+(255-a)*e);return`rgba(${i(n)}, ${i(r)}, ${i(o)}, ${s})`}function xi(t,e){return typeof t=="boolean"?t:e.autoContrast}function sP(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function o3({keepTransitions:t}={}){const e=C.useRef(),n=C.useRef(),r=C.useContext(Rk),o=ay(),s=C.useRef(o==null?void 0:o());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const i=d=>{r.setColorScheme(d),e.current=t?()=>{}:sP(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var f;(f=e.current)==null||f.call(e)},10)},a=()=>{r.clearColorScheme(),e.current=t?()=>{}:sP(s.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var d;(d=e.current)==null||d.call(e)},10)},l=U5("light",{getInitialValueInEffect:!1}),c=r.colorScheme==="auto"?l:r.colorScheme,u=C.useCallback(()=>i(c==="light"?"dark":"light"),[i,c]);return C.useEffect(()=>()=>{var d;(d=e.current)==null||d.call(e),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:i,clearColorScheme:a,toggleColorScheme:u}}function N2e(t,e={getInitialValueInEffect:!0}){const n=U5(t,e),{colorScheme:r}=o3();return r==="auto"?n:r}function K(t,e,n){var i;const r=Xt(),o=(i=r.components[t])==null?void 0:i.defaultProps,s=typeof o=="function"?o(r):o;return{...e,...s,...$a(n)}}function L2e(t){return t}function K1(t){return St(t).reduce((e,n)=>t[n]!==void 0?`${e}${vQ(n)}:${t[n]};`:e,"").trim()}function jZ({selector:t,styles:e,media:n,container:r}){const o=e?K1(e):"",s=Array.isArray(n)?n.map(a=>`@media${a.query}{${t}{${K1(a.styles)}}}`):[],i=Array.isArray(r)?r.map(a=>`@container ${a.query}{${t}{${K1(a.styles)}}}`):[];return`${o?`${t}{${o}}`:""}${s.join("")}${i.join("")}`.trim()}function fc(t){const e=ay();return g.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:jZ(t)}})}function Ba(t){const{m:e,mx:n,my:r,mt:o,mb:s,ml:i,mr:a,me:l,ms:c,p:u,px:d,py:f,pt:h,pb:p,pl:m,pr:v,pe:y,ps:b,bd:w,bg:S,c:_,opacity:k,ff:M,fz:T,fw:P,lts:A,ta:L,lh:V,fs:H,tt:z,td:N,w:D,miw:F,maw:I,h:$,mih:j,mah:W,bgsz:G,bgp:X,bgr:q,bga:B,pos:Q,top:Z,left:oe,bottom:te,right:ne,inset:pe,display:ie,flex:le,hiddenFrom:ce,visibleFrom:ye,lightHidden:xe,darkHidden:Ce,sx:se,...ue}=t;return{styleProps:$a({m:e,mx:n,my:r,mt:o,mb:s,ml:i,mr:a,me:l,ms:c,p:u,px:d,py:f,pt:h,pb:p,pl:m,pr:v,pe:y,ps:b,bd:w,bg:S,c:_,opacity:k,ff:M,fz:T,fw:P,lts:A,ta:L,lh:V,fs:H,tt:z,td:N,w:D,miw:F,maw:I,h:$,mih:j,mah:W,bgsz:G,bgp:X,bgr:q,bga:B,pos:Q,top:Z,left:oe,bottom:te,right:ne,inset:pe,display:ie,flex:le,hiddenFrom:ce,visibleFrom:ye,lightHidden:xe,darkHidden:Ce,sx:se}),rest:ue}}const $Z={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"},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"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},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:"identity",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 Ak(t,e){const n=ss({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function FZ(t,e){const n=ss({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Ak(t,e)}function zZ(t,e){if(typeof t=="number")return Y(t);if(typeof t=="string"){const[n,r,...o]=t.split(" ").filter(i=>i.trim()!=="");let s=`${Y(n)}`;return r&&(s+=` ${r}`),o.length>0&&(s+=` ${Ak(o.join(" "),e)}`),s.trim()}return t}const iP={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 BZ(t){return typeof t=="string"&&t in iP?iP[t]:t}const VZ=["h1","h2","h3","h4","h5","h6"];function HZ(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&VZ.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?Y(t):t}function WZ(t){return t}const UZ=["h1","h2","h3","h4","h5","h6"];function GZ(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&UZ.includes(t)?`var(--mantine-${t}-line-height)`:t}function KZ(t){return typeof t=="number"?Y(t):t}function YZ(t,e){if(typeof t=="number")return Y(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return Y(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const Y1={color:Ak,textColor:FZ,fontSize:HZ,spacing:YZ,identity:WZ,size:KZ,lineHeight:GZ,fontFamily:BZ,border:zZ};function aP(t){return t.replace("(min-width: ","").replace("em)","")}function qZ({media:t,...e}){const r=Object.keys(t).sort((o,s)=>Number(aP(o))-Number(aP(s))).map(o=>({query:o,styles:t[o]}));return{...e,media:r}}function XZ(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function JZ(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function QZ(t){return typeof t=="object"&&t!==null?St(t).filter(e=>e!=="base"):[]}function ZZ(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function s3({styleProps:t,data:e,theme:n}){return qZ(St(t).reduce((r,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return r;const s=e[o],i=Array.isArray(s.property)?s.property:[s.property],a=JZ(t[o]);if(!XZ(t[o]))return i.forEach(c=>{r.inlineStyles[c]=Y1[s.type](a,n)}),r;r.hasResponsiveStyles=!0;const l=QZ(t[o]);return i.forEach(c=>{a&&(r.styles[c]=Y1[s.type](a,n)),l.forEach(u=>{const d=`(min-width: ${n.breakpoints[u]})`;r.media[d]={...r.media[d],[c]:Y1[s.type](ZZ(t[o],u),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function tp(){return`__m__-${C.useId().replace(/:/g,"")}`}function Dk(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...Dk(r,e)}),{}):typeof t=="function"?t(e):t??{}}function i3(t){return t.startsWith("data-")?t:`data-${t}`}function eee(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[i3(n)]=t[n]),e},{})}function a3(t){return t?typeof t=="string"?{[i3(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...a3(n)}),{}):eee(t):null}function AS(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...AS(r,e)}),{}):typeof t=="function"?t(e):t??{}}function tee({theme:t,style:e,vars:n,styleProps:r}){const o=AS(e,t),s=AS(n,t);return{...o,...s,...r}}const l3=C.forwardRef(({component:t,style:e,__vars:n,className:r,variant:o,mod:s,size:i,hiddenFrom:a,visibleFrom:l,lightHidden:c,darkHidden:u,renderRoot:d,__size:f,...h},p)=>{var T;const m=Xt(),v=t||"div",{styleProps:y,rest:b}=Ba(h),w=QQ(),S=(T=w==null?void 0:w())==null?void 0:T(y.sx),_=tp(),k=s3({styleProps:y,theme:m,data:$Z}),M={ref:p,style:tee({theme:m,style:e,vars:n,styleProps:k.inlineStyles}),className:rn(r,S,{[_]:k.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":u,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${l}`]:l}),"data-variant":o,"data-size":B5(i)?void 0:i||void 0,size:f,...a3(s),...b};return g.jsxs(g.Fragment,{children:[k.hasResponsiveStyles&&g.jsx(fc,{selector:`.${_}`,styles:k.styles,media:k.media}),typeof d=="function"?d(M):g.jsx(v,{...M})]})});l3.displayName="@mantine/core/Box";const J=l3;function c3(t){return t}function ee(t){const e=C.forwardRef(t);return e.extend=c3,e.withProps=n=>{const r=C.forwardRef((o,s)=>g.jsx(e,{...n,...o,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function on(t){const e=C.forwardRef(t);return e.withProps=n=>{const r=C.forwardRef((o,s)=>g.jsx(e,{...n,...o,ref:s}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=c3,e}const nee=C.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Lr(){return C.useContext(nee)}function ree(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function q1(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const Ud=typeof window<"u"&&window.requestAnimationFrame;function oee({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r}){const o=C.useRef(null),s=0,i={display:"none",height:0,overflow:"hidden"},[a,l]=C.useState(r?{}:i),c=p=>{cc.flushSync(()=>l(p))},u=p=>{c(m=>({...m,...p}))};function d(p){const m=t||ree(p);return{transition:`height ${m}ms ${e}, opacity ${m}ms ${e}`}}cr(()=>{typeof Ud=="function"&&Ud(r?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),Ud(()=>{const p=q1(o);u({...d(p),height:p})})}:()=>{const p=q1(o);u({...d(p),willChange:"height",height:p}),Ud(()=>u({height:s,overflow:"hidden"}))})},[r]);const f=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(r){const m=q1(o);m===a.height?c({}):u({height:m}),n()}else a.height===s&&(c(i),n())};function h({style:p={},refKey:m="ref",...v}={}){const y=v[m];return{"aria-hidden":!r,...v,[m]:Q5(o,y),onTransitionEnd:f,style:{boxSizing:"border-box",...p,...a}}}return h}const see={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},ud=ee((t,e)=>{const{children:n,in:r,transitionDuration:o,transitionTimingFunction:s,style:i,onTransitionEnd:a,animateOpacity:l,...c}=K("Collapse",see,t),u=Xt(),d=Tk(),h=(u.respectReducedMotion?d:!1)?0:o,p=oee({opened:r,transitionDuration:h,transitionTimingFunction:s,onTransitionEnd:a});return h===0?r?g.jsx(J,{...c,children:n}):null:g.jsx(J,{...p({style:{opacity:r||!l?1:0,transition:l?`opacity ${h}ms ${s}`:"none",...Dk(i,u)},ref:e,...c}),children:n})});ud.displayName="@mantine/core/Collapse";const[iee,Mo]=bn("ScrollArea.Root component was not found in tree");function $u(t,e){const n=pl(e);dc(()=>{let r=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(r),o.unobserve(t)}}},[t,n])}const aee=C.forwardRef((t,e)=>{const{style:n,...r}=t,o=Mo(),[s,i]=C.useState(0),[a,l]=C.useState(0),c=!!(s&&a);return $u(o.scrollbarX,()=>{var d;const u=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),$u(o.scrollbarY,()=>{var d;const u=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(u),i(u)}),c?g.jsx("div",{...r,ref:e,style:{...n,width:s,height:a}}):null}),lee=C.forwardRef((t,e)=>{const n=Mo(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?g.jsx(aee,{...t,ref:e}):null}),cee={scrollHideDelay:1e3,type:"hover"},u3=C.forwardRef((t,e)=>{const n=K("ScrollAreaRoot",cee,t),{type:r,scrollHideDelay:o,scrollbars:s,...i}=n,[a,l]=C.useState(null),[c,u]=C.useState(null),[d,f]=C.useState(null),[h,p]=C.useState(null),[m,v]=C.useState(null),[y,b]=C.useState(0),[w,S]=C.useState(0),[_,k]=C.useState(!1),[M,T]=C.useState(!1),P=wn(e,A=>l(A));return g.jsx(iee,{value:{type:r,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:_,onScrollbarXEnabledChange:k,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:M,onScrollbarYEnabledChange:T,onCornerWidthChange:b,onCornerHeightChange:S},children:g.jsx(J,{...i,ref:P,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${y}px`,"--sa-corner-height":s!=="xy"?"0px":`${w}px`}})})});u3.displayName="@mantine/core/ScrollAreaRoot";function d3(t,e){const n=t/e;return Number.isNaN(n)?0:n}function cy(t){const e=d3(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function f3(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function uee(t,[e,n]){return Math.min(n,Math.max(e,t))}function lP(t,e,n="ltr"){const r=cy(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-o,i=e.content-e.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],c=uee(t,l);return f3([0,i],[0,a])(c)}function dee(t,e,n,r="ltr"){const o=cy(n),s=o/2,i=e||s,a=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return f3([l,c],d)(t)}function h3(t,e){return t>0&&t<e}function mv(t){return t?parseInt(t,10):0}function Dl(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t==null||t(r),(n===!1||!r.defaultPrevented)&&(e==null||e(r))}}const[fee,p3]=bn("ScrollAreaScrollbar was not found in tree"),m3=C.forwardRef((t,e)=>{const{sizes:n,hasThumb:r,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:a,onDragScroll:l,onWheelScroll:c,onResize:u,...d}=t,f=Mo(),[h,p]=C.useState(null),m=wn(e,T=>p(T)),v=C.useRef(null),y=C.useRef(""),{viewport:b}=f,w=n.content-n.viewport,S=pl(c),_=pl(a),k=oy(u,10),M=T=>{if(v.current){const P=T.clientX-v.current.left,A=T.clientY-v.current.top;l({x:P,y:A})}};return C.useEffect(()=>{const T=P=>{const A=P.target;(h==null?void 0:h.contains(A))&&S(P,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[b,h,w,S]),C.useEffect(_,[n,_]),$u(h,k),$u(f.content,k),g.jsx(fee,{value:{scrollbar:h,hasThumb:r,onThumbChange:pl(o),onThumbPointerUp:pl(s),onThumbPositionChange:_,onThumbPointerDown:pl(i)},children:g.jsx("div",{...d,ref:m,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:Dl(t.onPointerDown,T=>{T.preventDefault(),T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",document.body.style.pointerEvents="none",M(T))}),onPointerMove:Dl(t.onPointerMove,M),onPointerUp:Dl(t.onPointerUp,T=>{T.preventDefault();const P=T.target;P.hasPointerCapture(T.pointerId)&&P.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=y.current,document.body.style.pointerEvents="auto",v.current=null})})})}),hee=C.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:o,...s}=t,i=Mo(),[a,l]=C.useState(),c=C.useRef(null),u=wn(e,c,i.onScrollbarXChange);return C.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),g.jsx(m3,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{...o,"--sa-thumb-width":`${cy(n)}px`},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;t.onWheelScroll(h),h3(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:mv(a.paddingLeft),paddingEnd:mv(a.paddingRight)}})}})}),pee=C.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:o,...s}=t,i=Mo(),[a,l]=C.useState(),c=C.useRef(null),u=wn(e,c,i.onScrollbarYChange);return C.useEffect(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),g.jsx(m3,{...s,"data-orientation":"vertical",ref:u,sizes:n,style:{"--sa-thumb-height":`${cy(n)}px`,...o},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;t.onWheelScroll(h),h3(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:mv(a.paddingTop),paddingEnd:mv(a.paddingBottom)}})}})}),Ik=C.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,{dir:o}=Lr(),s=Mo(),i=C.useRef(null),a=C.useRef(0),[l,c]=C.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=d3(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>{i.current=h},onThumbPointerUp:()=>{a.current=0},onThumbPointerDown:h=>{a.current=h}},f=(h,p)=>dee(h,a.current,l,p);return n==="horizontal"?g.jsx(hee,{...d,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollLeft,p=lP(h,l,o);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,o))}}):n==="vertical"?g.jsx(pee,{...d,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollTop,p=lP(h,l);l.scrollbar.size===0?i.current.style.opacity="0":i.current.style.opacity="1",i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),g3=C.forwardRef((t,e)=>{const n=Mo(),{forceMount:r,...o}=t,[s,i]=C.useState(!1),a=t.orientation==="horizontal",l=oy(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?c:u)}},10);return $u(n.viewport,l),$u(n.content,l),r||s?g.jsx(Ik,{"data-state":s?"visible":"hidden",...o,ref:e}):null}),mee=C.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Mo(),[s,i]=C.useState(!1);return C.useEffect(()=>{const{scrollArea:a}=o;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),n||s?g.jsx(g3,{"data-state":s?"visible":"hidden",...r,ref:e}):null}),gee=C.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Mo(),s=t.orientation==="horizontal",[i,a]=C.useState("hidden"),l=oy(()=>a("idle"),100);return C.useEffect(()=>{if(i==="idle"){const c=window.setTimeout(()=>a("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[i,o.scrollHideDelay]),C.useEffect(()=>{const{viewport:c}=o,u=s?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(a("scrolling"),l()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,s,l]),n||i!=="hidden"?g.jsx(Ik,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:Dl(t.onPointerEnter,()=>a("interacting")),onPointerLeave:Dl(t.onPointerLeave,()=>a("idle"))}):null}),cP=C.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=Mo(),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=t.orientation==="horizontal";return C.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?g.jsx(mee,{...r,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(gee,{...r,ref:e,forceMount:n}):o.type==="auto"?g.jsx(g3,{...r,ref:e,forceMount:n}):o.type==="always"?g.jsx(Ik,{...r,ref:e}):null});function vee(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function o(){const s={left:t.scrollLeft,top:t.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&e(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)}const yee=C.forwardRef((t,e)=>{const{style:n,...r}=t,o=Mo(),s=p3(),{onThumbPositionChange:i}=s,a=wn(e,u=>s.onThumbChange(u)),l=C.useRef(),c=oy(()=>{l.current&&(l.current(),l.current=void 0)},100);return C.useEffect(()=>{const{viewport:u}=o;if(u){const d=()=>{if(c(),!l.current){const f=vee(u,i);l.current=f,i()}};return i(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[o.viewport,c,i]),g.jsx("div",{"data-state":s.hasThumb?"visible":"hidden",...r,ref:a,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:Dl(t.onPointerDownCapture,u=>{const f=u.target.getBoundingClientRect(),h=u.clientX-f.left,p=u.clientY-f.top;s.onThumbPointerDown({x:h,y:p})}),onPointerUp:Dl(t.onPointerUp,s.onThumbPointerUp)})}),uP=C.forwardRef((t,e)=>{const{forceMount:n,...r}=t,o=p3();return n||o.hasThumb?g.jsx(yee,{ref:e,...r}):null}),v3=C.forwardRef(({children:t,style:e,...n},r)=>{const o=Mo(),s=wn(r,o.onViewportChange);return g.jsx(J,{...n,ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e},children:g.jsx("div",{style:{minWidth:"100%",display:"table"},ref:o.onContentChange,children:t})})});v3.displayName="@mantine/core/ScrollAreaViewport";var Nk={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const y3={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},bee=(t,{scrollbarSize:e})=>({root:{"--scrollarea-scrollbar-size":Y(e)}}),dd=ee((t,e)=>{const n=K("ScrollArea",y3,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,scrollbarSize:l,vars:c,type:u,scrollHideDelay:d,viewportProps:f,viewportRef:h,onScrollPositionChange:p,children:m,offsetScrollbars:v,scrollbars:y,...b}=n,[w,S]=C.useState(!1),_=be({name:"ScrollArea",props:n,classes:Nk,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:c,varsResolver:bee});return g.jsxs(u3,{type:u==="never"?"always":u,scrollHideDelay:d,ref:e,scrollbars:y,..._("root"),...b,children:[g.jsx(v3,{...f,..._("viewport",{style:f==null?void 0:f.style}),ref:h,"data-offset-scrollbars":v===!0?"xy":v||void 0,"data-scrollbars":y||void 0,onScroll:k=>{var M;(M=f==null?void 0:f.onScroll)==null||M.call(f,k),p==null||p({x:k.currentTarget.scrollLeft,y:k.currentTarget.scrollTop})},children:m}),(y==="xy"||y==="x")&&g.jsx(cP,{..._("scrollbar"),orientation:"horizontal","data-hidden":u==="never"||void 0,forceMount:!0,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:g.jsx(uP,{..._("thumb")})}),(y==="xy"||y==="y")&&g.jsx(cP,{..._("scrollbar"),orientation:"vertical","data-hidden":u==="never"||void 0,forceMount:!0,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:g.jsx(uP,{..._("thumb")})}),g.jsx(lee,{..._("corner"),"data-hovered":w||void 0,"data-hidden":u==="never"||void 0})]})});dd.displayName="@mantine/core/ScrollArea";const Lk=ee((t,e)=>{const{children:n,classNames:r,styles:o,scrollbarSize:s,scrollHideDelay:i,type:a,dir:l,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:h,viewportProps:p,scrollbars:m,style:v,vars:y,...b}=K("ScrollAreaAutosize",y3,t);return g.jsx(J,{...b,ref:e,style:[{display:"flex",overflow:"auto"},v],children:g.jsx(J,{style:{display:"flex",flexDirection:"column",flex:1},children:g.jsx(dd,{classNames:r,styles:o,scrollHideDelay:i,scrollbarSize:s,type:a,dir:l,offsetScrollbars:c,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:h,viewportProps:p,vars:y,scrollbars:m,children:n})})})});dd.classes=Nk;Lk.displayName="@mantine/core/ScrollAreaAutosize";Lk.classes=Nk;dd.Autosize=Lk;var b3={root:"m_87cf2631"};const wee={__staticSelector:"UnstyledButton"},un=on((t,e)=>{const n=K("UnstyledButton",wee,t),{className:r,component:o="button",__staticSelector:s,unstyled:i,classNames:a,styles:l,style:c,...u}=n,d=be({name:s,props:n,classes:b3,className:r,style:c,classNames:a,styles:l,unstyled:i});return g.jsx(J,{...d("root",{focusable:!0}),component:o,ref:e,type:o==="button"?"button":void 0,...u})});un.classes=b3;un.displayName="@mantine/core/UnstyledButton";var w3={root:"m_515a97f8"};const xee={},jk=ee((t,e)=>{const n=K("VisuallyHidden",xee,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,...c}=n,u=be({name:"VisuallyHidden",classes:w3,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a});return g.jsx(J,{component:"span",ref:e,...u("root"),...c})});jk.classes=w3;jk.displayName="@mantine/core/VisuallyHidden";var x3={root:"m_1b7284a3"};const See={},_ee=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:dt(e),"--paper-shadow":Ck(n)}}),np=on((t,e)=>{const n=K("Paper",See,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,withBorder:l,vars:c,radius:u,shadow:d,variant:f,mod:h,...p}=n,m=be({name:"Paper",props:n,classes:x3,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:c,varsResolver:_ee});return g.jsx(J,{ref:e,mod:[{"data-with-border":l},h],...m("root"),variant:f,...p})});np.classes=x3;np.displayName="@mantine/core/Paper";function _a(t){return S3(t)?(t.nodeName||"").toLowerCase():"#document"}function Or(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Si(t){var e;return(e=(S3(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function S3(t){return t instanceof Node||t instanceof Or(t).Node}function Ft(t){return t instanceof Element||t instanceof Or(t).Element}function Yr(t){return t instanceof HTMLElement||t instanceof Or(t).HTMLElement}function DS(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Or(t).ShadowRoot}function rp(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=qr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function Cee(t){return["table","td","th"].includes(_a(t))}function $k(t){const e=Fk(),n=qr(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function kee(t){let e=ql(t);for(;Yr(e)&&!Fu(e);){if($k(e))return e;e=ql(e)}return null}function Fk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fu(t){return["html","body","#document"].includes(_a(t))}function qr(t){return Or(t).getComputedStyle(t)}function uy(t){return Ft(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ql(t){if(_a(t)==="html")return t;const e=t.assignedSlot||t.parentNode||DS(t)&&t.host||Si(t);return DS(e)?e.host:e}function _3(t){const e=ql(t);return Fu(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yr(e)&&rp(e)?e:_3(e)}function ai(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=_3(t),s=o===((r=t.ownerDocument)==null?void 0:r.body),i=Or(o);return s?e.concat(i,i.visualViewport||[],rp(o)?o:[],i.frameElement&&n?ai(i.frameElement):[]):e.concat(o,ai(o,[],n))}function dP(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function gh(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&DS(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function C3(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function k3(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Eee(t){return Ree()?!1:!fP()&&t.width===0&&t.height===0||fP()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function Mee(){return/apple/i.test(navigator.vendor)}function fP(){const t=/android/i;return t.test(C3())||t.test(k3())}function Tee(){return C3().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ree(){return k3().includes("jsdom/")}function E3(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function Oee(t){return"nativeEvent"in t}function Pee(t){return t.matches("html,body")}function _l(t){return(t==null?void 0:t.ownerDocument)||document}function X1(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function Hc(t){return"composedPath"in t?t.composedPath()[0]:t.target}const Aee="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Dee(t){return Yr(t)&&t.matches(Aee)}const Qo=Math.min,qn=Math.max,gv=Math.round,cm=Math.floor,Ca=t=>({x:t,y:t}),Iee={left:"right",right:"left",bottom:"top",top:"bottom"},Nee={start:"end",end:"start"};function IS(t,e,n){return qn(t,Qo(e,n))}function gi(t,e){return typeof t=="function"?t(e):t}function Zo(t){return t.split("-")[0]}function fd(t){return t.split("-")[1]}function zk(t){return t==="x"?"y":"x"}function Bk(t){return t==="y"?"height":"width"}function hc(t){return["top","bottom"].includes(Zo(t))?"y":"x"}function Vk(t){return zk(hc(t))}function Lee(t,e,n){n===void 0&&(n=!1);const r=fd(t),o=Vk(t),s=Bk(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=vv(i)),[i,vv(i)]}function jee(t){const e=vv(t);return[NS(t),e,NS(e)]}function NS(t){return t.replace(/start|end/g,e=>Nee[e])}function $ee(t,e,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?s:i;default:return[]}}function Fee(t,e,n,r){const o=fd(t);let s=$ee(Zo(t),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),e&&(s=s.concat(s.map(NS)))),s}function vv(t){return t.replace(/left|right|bottom|top/g,e=>Iee[e])}function zee(t){return{top:0,right:0,bottom:0,left:0,...t}}function Hk(t){return typeof t!="number"?zee(t):{top:t,right:t,bottom:t,left:t}}function zu(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function hP(t,e,n){let{reference:r,floating:o}=t;const s=hc(e),i=Vk(e),a=Bk(i),l=Zo(e),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(fd(e)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const Bee=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:d}=hP(c,r,l),f=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:v,fn:y}=a[m],{x:b,y:w,data:S,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:t,floating:e}});u=b??u,d=w??d,h={...h,[v]:{...h[v],...S}},_&&p<=50&&(p++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:o}):_.rects),{x:u,y:d}=hP(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Wk(t,e){var n;e===void 0&&(e={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=gi(e,t),p=Hk(h),v=a[f?d==="floating"?"reference":"floating":d],y=zu(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{...i.floating,x:r,y:o}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},_=zu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:l}):b);return{top:(y.top-_.top+p.top)/S.y,bottom:(_.bottom-y.bottom+p.bottom)/S.y,left:(y.left-_.left+p.left)/S.x,right:(_.right-y.right+p.right)/S.x}}const Vee=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=gi(t,e)||{};if(c==null)return{};const d=Hk(u),f={x:n,y:r},h=Vk(o),p=Bk(h),m=await i.getDimensions(c),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-f[h]-s.floating[p],_=f[h]-s.reference[h],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let M=k?k[w]:0;(!M||!await(i.isElement==null?void 0:i.isElement(k)))&&(M=a.floating[w]||s.floating[p]);const T=S/2-_/2,P=M/2-m[p]/2-1,A=Qo(d[y],P),L=Qo(d[b],P),V=A,H=M-m[p]-L,z=M/2-m[p]/2+T,N=IS(V,z,H),D=!l.arrow&&fd(o)!=null&&z!==N&&s.reference[p]/2-(z<V?A:L)-m[p]/2<0,F=D?z<V?z-V:z-H:0;return{[h]:f[h]+F,data:{[h]:N,centerOffset:z-N-F,...D&&{alignmentOffset:F}},reset:D}}}),Hee=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=gi(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Zo(o),b=Zo(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(b||!m?[vv(a)]:jee(a));!f&&p!=="none"&&S.push(...Fee(a,m,p,w));const _=[a,...S],k=await Wk(e,v),M=[];let T=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&M.push(k[y]),d){const V=Lee(o,i,w);M.push(k[V[0]],k[V[1]])}if(T=[...T,{placement:o,overflows:M}],!M.every(V=>V<=0)){var P,A;const V=(((P=s.flip)==null?void 0:P.index)||0)+1,H=_[V];if(H)return{data:{index:V,overflows:T},reset:{placement:H}};let z=(A=T.filter(N=>N.overflows[0]<=0).sort((N,D)=>N.overflows[1]-D.overflows[1])[0])==null?void 0:A.placement;if(!z)switch(h){case"bestFit":{var L;const N=(L=T.map(D=>[D.placement,D.overflows.filter(F=>F>0).reduce((F,I)=>F+I,0)]).sort((D,F)=>D[1]-F[1])[0])==null?void 0:L[0];N&&(z=N);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function M3(t){const e=Qo(...t.map(s=>s.left)),n=Qo(...t.map(s=>s.top)),r=qn(...t.map(s=>s.right)),o=qn(...t.map(s=>s.bottom));return{x:e,y:n,width:r-e,height:o-n}}function Wee(t){const e=t.slice().sort((o,s)=>o.y-s.y),n=[];let r=null;for(let o=0;o<e.length;o++){const s=e[o];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(o=>zu(M3(o)))}const Uee=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:s,strategy:i}=e,{padding:a=2,x:l,y:c}=gi(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),d=Wee(u),f=zu(M3(u)),h=Hk(a);function p(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&c!=null)return d.find(v=>l>v.left-h.left&&l<v.right+h.right&&c>v.top-h.top&&c<v.bottom+h.bottom)||f;if(d.length>=2){if(hc(n)==="y"){const A=d[0],L=d[d.length-1],V=Zo(n)==="top",H=A.top,z=L.bottom,N=V?A.left:L.left,D=V?A.right:L.right,F=D-N,I=z-H;return{top:H,bottom:z,left:N,right:D,width:F,height:I,x:N,y:H}}const v=Zo(n)==="left",y=qn(...d.map(A=>A.right)),b=Qo(...d.map(A=>A.left)),w=d.filter(A=>v?A.left===b:A.right===y),S=w[0].top,_=w[w.length-1].bottom,k=b,M=y,T=M-k,P=_-S;return{top:S,bottom:_,left:k,right:M,width:T,height:P,x:k,y:S}}return f}const m=await s.getElementRects({reference:{getBoundingClientRect:p},floating:r.floating,strategy:i});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};async function Gee(t,e){const{placement:n,platform:r,elements:o}=t,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Zo(n),a=fd(n),l=hc(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=gi(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const T3=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=e,l=await Gee(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Kee=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:y,y:b}=v;return{x:y,y:b}}},...l}=gi(t,e),c={x:n,y:r},u=await Wk(e,l),d=hc(Zo(o)),f=zk(d);let h=c[f],p=c[d];if(s){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=h+u[v],w=h-u[y];h=IS(b,h,w)}if(i){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=p+u[v],w=p-u[y];p=IS(b,p,w)}const m=a.fn({...e,[f]:h,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Yee=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=gi(t,e),u={x:n,y:r},d=hc(o),f=zk(d);let h=u[f],p=u[d];const m=gi(a,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",S=s.reference[f]-s.floating[w]+v.mainAxis,_=s.reference[f]+s.reference[w]-v.mainAxis;h<S?h=S:h>_&&(h=_)}if(c){var y,b;const w=f==="y"?"width":"height",S=["top","left"].includes(Zo(o)),_=s.reference[d]-s.floating[w]+(S&&((y=i.offset)==null?void 0:y[d])||0)+(S?0:v.crossAxis),k=s.reference[d]+s.reference[w]+(S?0:((b=i.offset)==null?void 0:b[d])||0)-(S?v.crossAxis:0);p<_?p=_:p>k&&(p=k)}return{[f]:h,[d]:p}}}},qee=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:s}=e,{apply:i=()=>{},...a}=gi(t,e),l=await Wk(e,a),c=Zo(n),u=fd(n),d=hc(n)==="y",{width:f,height:h}=r.floating;let p,m;c==="top"||c==="bottom"?(p=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,p=u==="end"?"top":"bottom");const v=h-l[p],y=f-l[m],b=!e.middlewareData.shift;let w=v,S=y;if(d){const k=f-l.left-l.right;S=u||b?Qo(y,k):k}else{const k=h-l.top-l.bottom;w=u||b?Qo(v,k):k}if(b&&!u){const k=qn(l.left,0),M=qn(l.right,0),T=qn(l.top,0),P=qn(l.bottom,0);d?S=f-2*(k!==0||M!==0?k+M:qn(l.left,l.right)):w=h-2*(T!==0||P!==0?T+P:qn(l.top,l.bottom))}await i({...e,availableWidth:S,availableHeight:w});const _=await o.getDimensions(s.floating);return f!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function R3(t){const e=qr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=Yr(t),s=o?t.offsetWidth:n,i=o?t.offsetHeight:r,a=gv(n)!==s||gv(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Uk(t){return Ft(t)?t:t.contextElement}function gu(t){const e=Uk(t);if(!Yr(e))return Ca(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:s}=R3(e);let i=(s?gv(n.width):n.width)/r,a=(s?gv(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Xee=Ca(0);function O3(t){const e=Or(t);return!Fk()||!e.visualViewport?Xee:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Jee(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Or(t)?!1:e}function Xl(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),s=Uk(t);let i=Ca(1);e&&(r?Ft(r)&&(i=gu(r)):i=gu(t));const a=Jee(s,n,r)?O3(s):Ca(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const f=Or(s),h=r&&Ft(r)?Or(r):r;let p=f,m=p.frameElement;for(;m&&r&&h!==p;){const v=gu(m),y=m.getBoundingClientRect(),b=qr(m),w=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=w,c+=S,p=Or(m),m=p.frameElement}}return zu({width:u,height:d,x:l,y:c})}const Qee=[":popover-open",":modal"];function P3(t){return Qee.some(e=>{try{return t.matches(e)}catch{return!1}})}function Zee(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const s=o==="fixed",i=Si(r),a=e?P3(e.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ca(1);const u=Ca(0),d=Yr(r);if((d||!d&&!s)&&((_a(r)!=="body"||rp(i))&&(l=uy(r)),Yr(r))){const f=Xl(r);c=gu(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function ete(t){return Array.from(t.getClientRects())}function A3(t){return Xl(Si(t)).left+uy(t).scrollLeft}function tte(t){const e=Si(t),n=uy(t),r=t.ownerDocument.body,o=qn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=qn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+A3(t);const a=-n.scrollTop;return qr(r).direction==="rtl"&&(i+=qn(e.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function nte(t,e){const n=Or(t),r=Si(t),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Fk();(!c||c&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function rte(t,e){const n=Xl(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,s=Yr(t)?gu(t):Ca(1),i=t.clientWidth*s.x,a=t.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function pP(t,e,n){let r;if(e==="viewport")r=nte(t,n);else if(e==="document")r=tte(Si(t));else if(Ft(e))r=rte(e,n);else{const o=O3(t);r={...e,x:e.x-o.x,y:e.y-o.y}}return zu(r)}function D3(t,e){const n=ql(t);return n===e||!Ft(n)||Fu(n)?!1:qr(n).position==="fixed"||D3(n,e)}function ote(t,e){const n=e.get(t);if(n)return n;let r=ai(t,[],!1).filter(a=>Ft(a)&&_a(a)!=="body"),o=null;const s=qr(t).position==="fixed";let i=s?ql(t):t;for(;Ft(i)&&!Fu(i);){const a=qr(i),l=$k(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||rp(i)&&!l&&D3(t,i))?r=r.filter(u=>u!==i):o=a,i=ql(i)}return e.set(t,r),r}function ste(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[...n==="clippingAncestors"?ote(e,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=pP(e,u,o);return c.top=qn(d.top,c.top),c.right=Qo(d.right,c.right),c.bottom=Qo(d.bottom,c.bottom),c.left=qn(d.left,c.left),c},pP(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ite(t){const{width:e,height:n}=R3(t);return{width:e,height:n}}function ate(t,e,n){const r=Yr(e),o=Si(e),s=n==="fixed",i=Xl(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Ca(0);if(r||!r&&!s)if((_a(e)!=="body"||rp(o))&&(a=uy(e)),r){const d=Xl(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else o&&(l.x=A3(o));const c=i.left+a.scrollLeft-l.x,u=i.top+a.scrollTop-l.y;return{x:c,y:u,width:i.width,height:i.height}}function mP(t,e){return!Yr(t)||qr(t).position==="fixed"?null:e?e(t):t.offsetParent}function I3(t,e){const n=Or(t);if(!Yr(t)||P3(t))return n;let r=mP(t,e);for(;r&&Cee(r)&&qr(r).position==="static";)r=mP(r,e);return r&&(_a(r)==="html"||_a(r)==="body"&&qr(r).position==="static"&&!$k(r))?n:r||kee(t)||n}const lte=async function(t){const e=this.getOffsetParent||I3,n=this.getDimensions;return{reference:ate(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function cte(t){return qr(t).direction==="rtl"}const ute={convertOffsetParentRelativeRectToViewportRelativeRect:Zee,getDocumentElement:Si,getClippingRect:ste,getOffsetParent:I3,getElementRects:lte,getClientRects:ete,getDimensions:ite,getScale:gu,isElement:Ft,isRTL:cte};function dte(t,e){let n=null,r;const o=Si(t);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=t.getBoundingClientRect();if(a||e(),!d||!f)return;const h=cm(u),p=cm(o.clientWidth-(c+d)),m=cm(o.clientHeight-(u+f)),v=cm(c),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:qn(0,Qo(1,l))||1};let w=!0;function S(_){const k=_[0].intersectionRatio;if(k!==l){if(!w)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(t)}return i(!0),s}function fte(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Uk(t),u=o||s?[...c?ai(c):[],...ai(e)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=c&&a?dte(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Xl(t):null;l&&v();function v(){const y=Xl(t);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Gk=Kee,LS=Hee,hte=qee,gP=Vee,jS=Uee,vP=Yee,pte=(t,e,n)=>{const r=new Map,o={platform:ute,...n},s={...o.platform,_c:r};return Bee(t,e,{...o,platform:s})},N3=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?gP({element:r.current,padding:o}).fn(n):{}:r?gP({element:r,padding:o}).fn(n):{}}}};var wg=typeof document<"u"?C.useLayoutEffect:C.useEffect;function yv(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!yv(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&t.$$typeof)&&!yv(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function L3(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yP(t,e){const n=L3(t);return Math.round(e*n)/n}function bP(t){const e=C.useRef(t);return wg(()=>{e.current=t}),e}function mte(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=C.useState(r);yv(f,r)||h(r);const[p,m]=C.useState(null),[v,y]=C.useState(null),b=C.useCallback(F=>{F!==k.current&&(k.current=F,m(F))},[]),w=C.useCallback(F=>{F!==M.current&&(M.current=F,y(F))},[]),S=s||p,_=i||v,k=C.useRef(null),M=C.useRef(null),T=C.useRef(u),P=l!=null,A=bP(l),L=bP(o),V=C.useCallback(()=>{if(!k.current||!M.current)return;const F={placement:e,strategy:n,middleware:f};L.current&&(F.platform=L.current),pte(k.current,M.current,F).then(I=>{const $={...I,isPositioned:!0};H.current&&!yv(T.current,$)&&(T.current=$,cc.flushSync(()=>{d($)}))})},[f,e,n,L]);wg(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[c]);const H=C.useRef(!1);wg(()=>(H.current=!0,()=>{H.current=!1}),[]),wg(()=>{if(S&&(k.current=S),_&&(M.current=_),S&&_){if(A.current)return A.current(S,_,V);V()}},[S,_,V,A,P]);const z=C.useMemo(()=>({reference:k,floating:M,setReference:b,setFloating:w}),[b,w]),N=C.useMemo(()=>({reference:S,floating:_}),[S,_]),D=C.useMemo(()=>{const F={position:n,left:0,top:0};if(!N.floating)return F;const I=yP(N.floating,u.x),$=yP(N.floating,u.y);return a?{...F,transform:"translate("+I+"px, "+$+"px)",...L3(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:$}},[n,a,N.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:V,refs:z,elements:N,floatingStyles:D}),[u,V,z,N,D])}const gte=Kf.useInsertionEffect,vte=gte||(t=>t());function Wc(t){const e=C.useRef(()=>{});return vte(()=>{e.current=t}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}var li=typeof document<"u"?C.useLayoutEffect:C.useEffect;let J1=!1,yte=0;const wP=()=>"floating-ui-"+yte++;function bte(){const[t,e]=C.useState(()=>J1?wP():void 0);return li(()=>{t==null&&e(wP())},[]),C.useEffect(()=>{J1||(J1=!0)},[]),t}const wte=Kf.useId,j3=wte||bte;function xte(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,((r=t.get(e))==null?void 0:r.filter(o=>o!==n))||[])}}}const Ste=C.createContext(null),_te=C.createContext(null),Kk=()=>{var t;return((t=C.useContext(Ste))==null?void 0:t.id)||null},Yk=()=>C.useContext(_te);function qk(t){return"data-floating-ui-"+t}function xP(t){const e=C.useRef(t);return li(()=>{e.current=t}),e}const SP=qk("safe-polygon");function xg(t,e,n){return n&&!E3(n)?0:typeof t=="number"?t:t==null?void 0:t[e]}function Cte(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,events:s,elements:{domReference:i,floating:a},refs:l}=t,{enabled:c=!0,delay:u=0,handleClose:d=null,mouseOnly:f=!1,restMs:h=0,move:p=!0}=e,m=Yk(),v=Kk(),y=xP(d),b=xP(u),w=C.useRef(),S=C.useRef(),_=C.useRef(),k=C.useRef(),M=C.useRef(!0),T=C.useRef(!1),P=C.useRef(()=>{}),A=C.useCallback(()=>{var z;const N=(z=o.current.openEvent)==null?void 0:z.type;return(N==null?void 0:N.includes("mouse"))&&N!=="mousedown"},[o]);C.useEffect(()=>{if(!c)return;function z(N){let{open:D}=N;D||(clearTimeout(S.current),clearTimeout(k.current),M.current=!0)}return s.on("openchange",z),()=>{s.off("openchange",z)}},[c,s]),C.useEffect(()=>{if(!c||!y.current||!n)return;function z(D){A()&&r(!1,D,"hover")}const N=_l(a).documentElement;return N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",z)}},[a,n,r,c,y,A]);const L=C.useCallback(function(z,N,D){N===void 0&&(N=!0),D===void 0&&(D="hover");const F=xg(b.current,"close",w.current);F&&!_.current?(clearTimeout(S.current),S.current=setTimeout(()=>r(!1,z,D),F)):N&&(clearTimeout(S.current),r(!1,z,D))},[b,r]),V=C.useCallback(()=>{P.current(),_.current=void 0},[]),H=C.useCallback(()=>{if(T.current){const z=_l(l.floating.current).body;z.style.pointerEvents="",z.removeAttribute(SP),T.current=!1}},[l]);return C.useEffect(()=>{if(!c)return;function z(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function N(I){if(clearTimeout(S.current),M.current=!1,f&&!E3(w.current)||h>0&&xg(b.current,"open")===0)return;const $=xg(b.current,"open",w.current);$?S.current=setTimeout(()=>{r(!0,I,"hover")},$):r(!0,I,"hover")}function D(I){if(z())return;P.current();const $=_l(a);if(clearTimeout(k.current),y.current){n||clearTimeout(S.current),_.current=y.current({...t,tree:m,x:I.clientX,y:I.clientY,onClose(){H(),V(),L(I,!0,"safe-polygon")}});const W=_.current;$.addEventListener("mousemove",W),P.current=()=>{$.removeEventListener("mousemove",W)};return}(w.current==="touch"?!gh(a,I.relatedTarget):!0)&&L(I)}function F(I){z()||y.current==null||y.current({...t,tree:m,x:I.clientX,y:I.clientY,onClose(){H(),V(),L(I)}})(I)}if(Ft(i)){const I=i;return n&&I.addEventListener("mouseleave",F),a==null||a.addEventListener("mouseleave",F),p&&I.addEventListener("mousemove",N,{once:!0}),I.addEventListener("mouseenter",N),I.addEventListener("mouseleave",D),()=>{n&&I.removeEventListener("mouseleave",F),a==null||a.removeEventListener("mouseleave",F),p&&I.removeEventListener("mousemove",N),I.removeEventListener("mouseenter",N),I.removeEventListener("mouseleave",D)}}},[i,a,c,t,f,h,p,L,V,H,r,n,m,b,y,o]),li(()=>{var z;if(c&&n&&(z=y.current)!=null&&z.__options.blockPointerEvents&&A()){const D=_l(a).body;if(D.setAttribute(SP,""),D.style.pointerEvents="none",T.current=!0,Ft(i)&&a){var N;const F=i,I=m==null||(N=m.nodesRef.current.find($=>$.id===v))==null||(N=N.context)==null?void 0:N.elements.floating;return I&&(I.style.pointerEvents=""),F.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{F.style.pointerEvents="",a.style.pointerEvents=""}}}},[c,n,v,a,i,m,y,A]),li(()=>{n||(w.current=void 0,V(),H())},[n,V,H]),C.useEffect(()=>()=>{V(),clearTimeout(S.current),clearTimeout(k.current),H()},[c,i,V,H]),C.useMemo(()=>{if(!c)return{};function z(N){w.current=N.pointerType}return{reference:{onPointerDown:z,onPointerEnter:z,onMouseMove(N){n||h===0||(clearTimeout(k.current),k.current=setTimeout(()=>{M.current||r(!0,N.nativeEvent,"hover")},h))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(N){L(N.nativeEvent,!1)}}}},[c,h,n,r,L])}const $3=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),F3=()=>C.useContext($3),kte=t=>{let{children:e,delay:n,timeoutMs:r=0}=t;const[o,s]=C.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),i=C.useRef(null),a=C.useCallback(l=>{s({currentId:l})},[]);return li(()=>{o.currentId?i.current===null?i.current=o.currentId:s({isInstantPhase:!0}):(s({isInstantPhase:!1}),i.current=null)},[o.currentId]),C.createElement($3.Provider,{value:C.useMemo(()=>({...o,setState:s,setCurrentId:a}),[o,a])},e)},Ete=(t,e)=>{let{open:n,onOpenChange:r}=t,{id:o}=e;const{currentId:s,setCurrentId:i,initialDelay:a,setState:l,timeoutMs:c}=F3();li(()=>{s&&(l({delay:{open:1,close:xg(a,"close")}}),s!==o&&r(!1))},[o,r,l,s,a]),li(()=>{function u(){r(!1),l({delay:a,currentId:null})}if(!n&&s===o){if(c){const d=window.setTimeout(u,c);return()=>{clearTimeout(d)}}u()}},[n,l,s,o,r,a,c]),li(()=>{n&&i(o)},[n,i,o])};function Q1(t,e){let n=t.filter(o=>{var s;return o.parentId===e&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=t.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}const Mte={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Tte={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},_P=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function Rte(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,nodeId:o,elements:{reference:s,domReference:i,floating:a},dataRef:l}=t,{enabled:c=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:y}=e,b=Yk(),w=Wc(typeof d=="function"?d:()=>!1),S=typeof d=="function"?w:d,_=C.useRef(!1),k=C.useRef(!1),{escapeKey:M,outsidePress:T}=_P(v),{escapeKey:P,outsidePress:A}=_P(y),L=Wc(N=>{if(!n||!c||!u||N.key!=="Escape")return;const D=b?Q1(b.nodesRef.current,o):[];if(!M&&(N.stopPropagation(),D.length>0)){let F=!0;if(D.forEach(I=>{var $;if(($=I.context)!=null&&$.open&&!I.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,Oee(N)?N.nativeEvent:N,"escape-key")}),V=Wc(N=>{var D;const F=()=>{var I;L(N),(I=Hc(N))==null||I.removeEventListener("keydown",F)};(D=Hc(N))==null||D.addEventListener("keydown",F)}),H=Wc(N=>{const D=_.current;_.current=!1;const F=k.current;if(k.current=!1,f==="click"&&F||D||typeof S=="function"&&!S(N))return;const I=Hc(N),$="["+qk("inert")+"]",j=_l(a).querySelectorAll($);let W=Ft(I)?I:null;for(;W&&!Fu(W);){const q=ql(W);if(Fu(q)||!Ft(q))break;W=q}if(j.length&&Ft(I)&&!Pee(I)&&!gh(I,a)&&Array.from(j).every(q=>!gh(W,q)))return;if(Yr(I)&&a){const q=I.clientWidth>0&&I.scrollWidth>I.clientWidth,B=I.clientHeight>0&&I.scrollHeight>I.clientHeight;let Q=B&&N.offsetX>I.clientWidth;if(B&&qr(I).direction==="rtl"&&(Q=N.offsetX<=I.offsetWidth-I.clientWidth),Q||q&&N.offsetY>I.clientHeight)return}const G=b&&Q1(b.nodesRef.current,o).some(q=>{var B;return X1(N,(B=q.context)==null?void 0:B.elements.floating)});if(X1(N,a)||X1(N,i)||G)return;const X=b?Q1(b.nodesRef.current,o):[];if(X.length>0){let q=!0;if(X.forEach(B=>{var Q;if((Q=B.context)!=null&&Q.open&&!B.context.dataRef.current.__outsidePressBubbles){q=!1;return}}),!q)return}r(!1,N,"outside-press")}),z=Wc(N=>{var D;const F=()=>{var I;H(N),(I=Hc(N))==null||I.removeEventListener(f,F)};(D=Hc(N))==null||D.addEventListener(f,F)});return C.useEffect(()=>{if(!n||!c)return;l.current.__escapeKeyBubbles=M,l.current.__outsidePressBubbles=T;function N(I){r(!1,I,"ancestor-scroll")}const D=_l(a);u&&D.addEventListener("keydown",P?V:L,P),S&&D.addEventListener(f,A?z:H,A);let F=[];return m&&(Ft(i)&&(F=ai(i)),Ft(a)&&(F=F.concat(ai(a))),!Ft(s)&&s&&s.contextElement&&(F=F.concat(ai(s.contextElement)))),F=F.filter(I=>{var $;return I!==(($=D.defaultView)==null?void 0:$.visualViewport)}),F.forEach(I=>{I.addEventListener("scroll",N,{passive:!0})}),()=>{u&&D.removeEventListener("keydown",P?V:L,P),S&&D.removeEventListener(f,A?z:H,A),F.forEach(I=>{I.removeEventListener("scroll",N)})}},[l,a,i,s,u,S,f,n,r,m,c,M,T,L,P,V,H,A,z]),C.useEffect(()=>{_.current=!1},[S,f]),C.useMemo(()=>c?{reference:{onKeyDown:L,[Mte[p]]:N=>{h&&r(!1,N.nativeEvent,"reference-press")}},floating:{onKeyDown:L,onMouseDown(){k.current=!0},onMouseUp(){k.current=!0},[Tte[f]]:()=>{_.current=!0}}}:{},[c,h,f,p,r,L])}function Xk(t){var e;t===void 0&&(t={});const{open:n=!1,onOpenChange:r,nodeId:o}=t,[s,i]=C.useState(null),a=((e=t.elements)==null?void 0:e.reference)||s,l=mte(t),c=Yk(),u=Kk()!=null,d=Wc((_,k,M)=>{_&&(h.current.openEvent=k),p.emit("openchange",{open:_,event:k,reason:M,nested:u}),r==null||r(_,k,M)}),f=C.useRef(null),h=C.useRef({}),p=C.useState(()=>xte())[0],m=j3(),v=C.useCallback(_=>{const k=Ft(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l.refs.setReference(k)},[l.refs]),y=C.useCallback(_=>{(Ft(_)||_===null)&&(f.current=_,i(_)),(Ft(l.refs.reference.current)||l.refs.reference.current===null||_!==null&&!Ft(_))&&l.refs.setReference(_)},[l.refs]),b=C.useMemo(()=>({...l.refs,setReference:y,setPositionReference:v,domReference:f}),[l.refs,y,v]),w=C.useMemo(()=>({...l.elements,domReference:a}),[l.elements,a]),S=C.useMemo(()=>({...l,refs:b,elements:w,dataRef:h,nodeId:o,floatingId:m,events:p,open:n,onOpenChange:d}),[l,o,m,p,n,d,b,w]);return li(()=>{const _=c==null?void 0:c.nodesRef.current.find(k=>k.id===o);_&&(_.context=S)}),C.useMemo(()=>({...l,context:S,refs:b,elements:w}),[l,b,w,S])}function Ote(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:o,refs:s,elements:{domReference:i}}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=C.useRef(!1),u=C.useRef(),d=C.useRef(!0);return C.useEffect(()=>{if(!a)return;const f=Or(i);function h(){!n&&Yr(i)&&i===dP(_l(i))&&(c.current=!0)}function p(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",p,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",p,!0)}},[i,n,a]),C.useEffect(()=>{if(!a)return;function f(h){let{reason:p}=h;(p==="reference-press"||p==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,a]),C.useEffect(()=>()=>{clearTimeout(u.current)},[]),C.useMemo(()=>a?{reference:{onPointerDown(f){Eee(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const h=Hc(f.nativeEvent);if(l&&Ft(h))try{if(Mee()&&Tee())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Dee(h))return}r(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const h=f.relatedTarget,p=Ft(h)&&h.hasAttribute(qk("focus-guard"))&&h.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{const m=dP(i?i.ownerDocument:document);!h&&m===i||gh(s.floating.current,m)||gh(i,m)||p||r(!1,f.nativeEvent,"focus")})}}}:{},[a,l,i,s,r])}const CP="active",kP="selected";function Z1(t,e,n){const r=new Map,o=n==="item";let s=t;if(o&&t){const{[CP]:i,[kP]:a,...l}=t;s=l}return{...n==="floating"&&{tabIndex:-1},...s,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[CP,kP].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),i[c]=function(){for(var f,h=arguments.length,p=new Array(h),m=0;m<h;m++)p[m]=arguments[m];return(f=r.get(c))==null?void 0:f.map(v=>v(...p)).find(v=>v!==void 0)}}}else i[c]=u}),i),{})}}function Pte(t){t===void 0&&(t=[]);const e=t,n=C.useCallback(s=>Z1(s,t,"reference"),e),r=C.useCallback(s=>Z1(s,t,"floating"),e),o=C.useCallback(s=>Z1(s,t,"item"),t.map(s=>s==null?void 0:s.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}const Ate=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Dte(t,e){var n;e===void 0&&(e={});const{open:r,floatingId:o}=t,{enabled:s=!0,role:i="dialog"}=e,a=(n=Ate.get(i))!=null?n:i,l=j3(),u=Kk()!=null;return C.useMemo(()=>{if(!s)return{};const d={id:o,...a&&{role:a}};return a==="tooltip"||i==="label"?{reference:{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0},floating:d}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},floating:{...d,...a==="menu"&&{"aria-labelledby":l}},item(f){let{active:h,selected:p}=f;const m={role:"option",...h&&{id:o+"-option"}};switch(i){case"select":return{...m,"aria-selected":h&&p};case"combobox":return{...m,...h&&{"aria-selected":!0}}}return{}}}},[s,i,a,r,o,l,u])}function z3(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return e}function EP(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function MP(t,e,n,r,o){return t==="center"||r==="center"?{left:e}:t==="end"?{[o==="ltr"?"right":"left"]:n}:t==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const Ite={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Nte({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:s,arrowY:i,dir:a}){const[l,c="center"]=t.split("-"),u={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[Ite[l]]:r},d=-e/2;return l==="left"?{...u,...EP(c,i,n,o),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}:l==="right"?{...u,...EP(c,i,n,o),left:d,borderRightColor:"transparent",borderTopColor:"transparent"}:l==="top"?{...u,...MP(c,s,n,o,a),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}:l==="bottom"?{...u,...MP(c,s,n,o,a),top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}:{}}const Jk=C.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:o,visible:s,arrowX:i,arrowY:a,style:l,...c},u)=>{const{dir:d}=Lr();return s?g.jsx("div",{...c,ref:u,style:{...l,...Nte({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:o,dir:d,arrowX:i,arrowY:a})}}):null});Jk.displayName="@mantine/core/FloatingArrow";const[Lte,B3]=bn("Popover component was not found in the tree");function dy({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const o=jQ(e),s=wn(o,r);return Fa(t)?C.cloneElement(t,{[n]:s}):t}function V3(t){return g.jsx(jk,{tabIndex:-1,"data-autofocus":!0,...t})}dy.displayName="@mantine/core/FocusTrap";V3.displayName="@mantine/core/FocusTrapInitialFocus";dy.InitialFocus=V3;function jte(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}const $te={},H3=C.forwardRef((t,e)=>{const{children:n,target:r,...o}=K("Portal",$te,t),[s,i]=C.useState(!1),a=C.useRef(null);return dc(()=>(i(!0),a.current=r?typeof r=="string"?document.querySelector(r):r:jte(o),J5(e,a.current),!r&&a.current&&document.body.appendChild(a.current),()=>{!r&&a.current&&document.body.removeChild(a.current)}),[r]),!s||!a.current?null:cc.createPortal(g.jsx(g.Fragment,{children:n}),a.current)});H3.displayName="@mantine/core/Portal";function op({withinPortal:t=!0,children:e,...n}){return t?g.jsx(H3,{...n,children:e}):g.jsx(g.Fragment,{children:e})}op.displayName="@mantine/core/OptionalPortal";const Gd=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${Y(t==="bottom"?10:-10)})`},transitionProperty:"transform, opacity"}),um={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:`translateY(${Y(30)}`},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:`translateY(${Y(-30)}`},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:`translateX(${Y(30)}`},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:`translateX(${Y(-30)}`},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(${Y(-20)}) 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(${Y(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Y(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${Y(20)}) 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:{...Gd("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Gd("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Gd("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Gd("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Gd("top"),common:{transformOrigin:"top right"}}},TP={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Fte({transition:t,state:e,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in um?{transitionProperty:um[t].transitionProperty,...o,...um[t].common,...um[t][TP[e]]}:{}:{transitionProperty:t.transitionProperty,...o,...t.common,...t[TP[e]]}}function zte({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:o,onExit:s,onEntered:i,onExited:a,enterDelay:l,exitDelay:c}){const u=Xt(),d=Tk(),f=u.respectReducedMotion?d:!1,[h,p]=C.useState(f?0:t),[m,v]=C.useState(r?"entered":"exited"),y=C.useRef(-1),b=C.useRef(-1),w=C.useRef(-1),S=k=>{const M=k?o:s,T=k?i:a;window.clearTimeout(y.current);const P=f?0:k?t:e;p(P),P===0?(typeof M=="function"&&M(),typeof T=="function"&&T(),v(k?"entered":"exited")):w.current=requestAnimationFrame(()=>{A5.flushSync(()=>{v(k?"pre-entering":"pre-exiting")}),w.current=requestAnimationFrame(()=>{typeof M=="function"&&M(),v(k?"entering":"exiting"),y.current=window.setTimeout(()=>{typeof T=="function"&&T(),v(k?"entered":"exited")},P)})})},_=k=>{if(window.clearTimeout(b.current),typeof(k?l:c)!="number"){S(k);return}b.current=window.setTimeout(()=>{S(k)},k?l:c)};return cr(()=>{_(r)},[r]),C.useEffect(()=>()=>{window.clearTimeout(y.current),cancelAnimationFrame(w.current)},[]),{transitionDuration:h,transitionStatus:m,transitionTimingFunction:n||"ease"}}function To({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:o,children:s,timingFunction:i="ease",onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:d,exitDelay:f}){const{transitionDuration:h,transitionStatus:p,transitionTimingFunction:m}=zte({mounted:o,exitDuration:r,duration:n,timingFunction:i,onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:d,exitDelay:f});return h===0?o?g.jsx(g.Fragment,{children:s({})}):t?s({display:"none"}):null:p==="exited"?t?s({display:"none"}):null:g.jsx(g.Fragment,{children:s(Fte({transition:e,duration:h,state:p,timingFunction:m}))})}To.displayName="@mantine/core/Transition";var W3={dropdown:"m_38a85659",arrow:"m_a31dc6c1"};const Bte={},Qk=ee((t,e)=>{var v,y,b,w;const n=K("PopoverDropdown",Bte,t),{className:r,style:o,vars:s,children:i,onKeyDownCapture:a,variant:l,classNames:c,styles:u,...d}=n,f=B3(),h=K5({opened:f.opened,shouldReturnFocus:f.returnFocus}),p=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},m=wn(e,f.floating);return f.disabled?null:g.jsx(op,{...f.portalProps,withinPortal:f.withinPortal,children:g.jsx(To,{mounted:f.opened,...f.transitionProps,transition:((v=f.transitionProps)==null?void 0:v.transition)||"fade",duration:((y=f.transitionProps)==null?void 0:y.duration)??150,keepMounted:f.keepMounted,exitDuration:typeof((b=f.transitionProps)==null?void 0:b.exitDuration)=="number"?f.transitionProps.exitDuration:(w=f.transitionProps)==null?void 0:w.duration,children:S=>g.jsx(dy,{active:f.trapFocus,innerRef:m,children:g.jsxs(J,{...p,...d,variant:l,onKeyDownCapture:CQ(f.onClose,{active:f.closeOnEscape,onTrigger:h,onKeyDown:a}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:r,props:n,classNames:c,styles:u,style:[{...S,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:Y(f.width)},o]}),children:[i,g.jsx(Jk,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:n,classNames:c,styles:u})})]})})})})});Qk.classes=W3;Qk.displayName="@mantine/core/PopoverDropdown";const Vte={refProp:"ref",popupType:"dialog"},U3=ee((t,e)=>{const{children:n,refProp:r,popupType:o,...s}=K("PopoverTarget",Vte,t);if(!Fa(n))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 i=s,a=B3(),l=wn(a.reference,n.ref,e),c=a.withRoles?{"aria-haspopup":o,"aria-expanded":a.opened,"aria-controls":a.getDropdownId(),id:a.getTargetId()}:{};return C.cloneElement(n,{...i,...c,...a.targetProps,className:rn(a.targetProps.className,i.className,n.props.className),[r]:l,...a.controlled?null:{onClick:a.onToggle}})});U3.displayName="@mantine/core/PopoverTarget";function G3({opened:t,floating:e,position:n,positionDependencies:r}){const[o,s]=C.useState(0);C.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return fte(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,o,n]),cr(()=>{e.update()},r),cr(()=>{s(i=>i+1)},[t])}function Hte(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function Wte(t,e){const n=Hte(t.middlewares),r=[T3(t.offset)];return n.shift&&r.push(Gk(typeof n.shift=="boolean"?{limiter:vP(),padding:5}:{limiter:vP(),padding:5,...n.shift})),n.flip&&r.push(typeof n.flip=="boolean"?LS():LS(n.flip)),n.inline&&r.push(typeof n.inline=="boolean"?jS():jS(n.inline)),r.push(N3({element:t.arrowRef,padding:t.arrowOffset})),(n.size||t.width==="target")&&r.push(hte({...typeof n.size=="boolean"?{}:n.size,apply({rects:o,availableWidth:s,availableHeight:i}){var c;const l=((c=e().refs.floating.current)==null?void 0:c.style)??{};n.size&&Object.assign(l,{maxWidth:`${s}px`,maxHeight:`${i}px`}),t.width==="target"&&Object.assign(l,{width:`${o.reference.width}px`})}})),r}function Ute(t){const[e,n]=yn({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),r=()=>{var i;e&&((i=t.onClose)==null||i.call(t),n(!1))},o=()=>{var i,a;e?((i=t.onClose)==null||i.call(t),n(!1)):((a=t.onOpen)==null||a.call(t),n(!0))},s=Xk({strategy:t.strategy,placement:t.position,middleware:Wte(t,()=>s)});return G3({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies||[],floating:s}),cr(()=>{var i;(i=t.onPositionChange)==null||i.call(t,s.placement)},[s.placement]),cr(()=>{var i,a;t.opened?(a=t.onOpen)==null||a.call(t):(i=t.onClose)==null||i.call(t)},[t.opened]),{floating:s,controlled:typeof t.opened=="boolean",opened:e,onClose:r,onToggle:o}}const Gte={position:"bottom",offset:8,positionDependencies:[],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,clickOutsideEvents:["mousedown","touchstart"],zIndex:rs("popover"),__staticSelector:"Popover",width:"max-content"},Kte=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:dt(e),"--popover-shadow":Ck(n)}});function Mt(t){var Ce,se,ue,ve,Oe,fe;const e=K("Popover",Gte,t),{children:n,position:r,offset:o,onPositionChange:s,positionDependencies:i,opened:a,transitionProps:l,width:c,middlewares:u,withArrow:d,arrowSize:f,arrowOffset:h,arrowRadius:p,arrowPosition:m,unstyled:v,classNames:y,styles:b,closeOnClickOutside:w,withinPortal:S,portalProps:_,closeOnEscape:k,clickOutsideEvents:M,trapFocus:T,onClose:P,onOpen:A,onChange:L,zIndex:V,radius:H,shadow:z,id:N,defaultOpened:D,__staticSelector:F,withRoles:I,disabled:$,returnFocus:j,variant:W,keepMounted:G,vars:X,floatingStrategy:q,...B}=e,Q=be({name:F,props:e,classes:W3,classNames:y,styles:b,unstyled:v,rootSelector:"dropdown",vars:X,varsResolver:Kte}),Z=C.useRef(null),[oe,te]=C.useState(null),[ne,pe]=C.useState(null),{dir:ie}=Lr(),le=mr(N),ce=Ute({middlewares:u,width:c,position:z3(ie,r),offset:typeof o=="number"?o+(d?f/2:0):o,arrowRef:Z,arrowOffset:h,onPositionChange:s,positionDependencies:i,opened:a,defaultOpened:D,onChange:L,onOpen:A,onClose:P,strategy:q});MQ(()=>w&&ce.onClose(),M,[oe,ne]);const ye=C.useCallback(Me=>{te(Me),ce.floating.refs.setReference(Me)},[ce.floating.refs.setReference]),xe=C.useCallback(Me=>{pe(Me),ce.floating.refs.setFloating(Me)},[ce.floating.refs.setFloating]);return g.jsx(Lte,{value:{returnFocus:j,disabled:$,controlled:ce.controlled,reference:ye,floating:xe,x:ce.floating.x,y:ce.floating.y,arrowX:(ue=(se=(Ce=ce.floating)==null?void 0:Ce.middlewareData)==null?void 0:se.arrow)==null?void 0:ue.x,arrowY:(fe=(Oe=(ve=ce.floating)==null?void 0:ve.middlewareData)==null?void 0:Oe.arrow)==null?void 0:fe.y,opened:ce.opened,arrowRef:Z,transitionProps:l,width:c,withArrow:d,arrowSize:f,arrowOffset:h,arrowRadius:p,arrowPosition:m,placement:ce.floating.placement,trapFocus:T,withinPortal:S,portalProps:_,zIndex:V,radius:H,shadow:z,closeOnEscape:k,onClose:ce.onClose,onToggle:ce.onToggle,getTargetId:()=>`${le}-target`,getDropdownId:()=>`${le}-dropdown`,withRoles:I,targetProps:B,__staticSelector:F,classNames:y,styles:b,unstyled:v,variant:W,keepMounted:G,getStyles:Q,floatingStrategy:q},children:n})}Mt.Target=U3;Mt.Dropdown=Qk;Mt.displayName="@mantine/core/Popover";Mt.extend=t=>t;var Wo={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 Yte=C.forwardRef(({className:t,...e},n)=>g.jsxs(J,{component:"span",className:rn(Wo.barsLoader,t),...e,ref:n,children:[g.jsx("span",{className:Wo.bar}),g.jsx("span",{className:Wo.bar}),g.jsx("span",{className:Wo.bar})]})),qte=C.forwardRef(({className:t,...e},n)=>g.jsxs(J,{component:"span",className:rn(Wo.dotsLoader,t),...e,ref:n,children:[g.jsx("span",{className:Wo.dot}),g.jsx("span",{className:Wo.dot}),g.jsx("span",{className:Wo.dot})]})),Xte=C.forwardRef(({className:t,...e},n)=>g.jsx(J,{component:"span",className:rn(Wo.ovalLoader,t),...e,ref:n})),K3={bars:Yte,oval:Xte,dots:qte},Jte={loaders:K3,type:"oval"},Qte=(t,{size:e,color:n})=>({root:{"--loader-size":$e(e,"loader-size"),"--loader-color":n?yt(n,t):void 0}}),ka=ee((t,e)=>{const n=K("Loader",Jte,t),{size:r,color:o,type:s,vars:i,className:a,style:l,classNames:c,styles:u,unstyled:d,loaders:f,variant:h,children:p,...m}=n,v=be({name:"Loader",props:n,classes:Wo,className:a,style:l,classNames:c,styles:u,unstyled:d,vars:i,varsResolver:Qte});return p?g.jsx(J,{...v("root"),ref:e,...m,children:p}):g.jsx(J,{...v("root"),ref:e,component:f[s],variant:h,size:r,...m})});ka.defaultLoaders=K3;ka.classes=Wo;ka.displayName="@mantine/core/Loader";var fy={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21"};const RP={orientation:"horizontal"},Zte=(t,{borderWidth:e})=>({group:{"--ai-border-width":Y(e)}}),Zk=ee((t,e)=>{const n=K("ActionIconGroup",RP,t),{className:r,style:o,classNames:s,styles:i,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:d,mod:f,...h}=K("ActionIconGroup",RP,t),p=be({name:"ActionIconGroup",props:n,classes:fy,className:r,style:o,classNames:s,styles:i,unstyled:a,vars:c,varsResolver:Zte,rootSelector:"group"});return g.jsx(J,{...p("group"),ref:e,variant:d,mod:[{"data-orientation":l},f],role:"group",...h})});Zk.classes=fy;Zk.displayName="@mantine/core/ActionIconGroup";const ene={},tne=(t,{size:e,radius:n,variant:r,gradient:o,color:s,autoContrast:i})=>{const a=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:o,variant:r||"filled",autoContrast:i});return{root:{"--ai-size":$e(e,"ai-size"),"--ai-radius":n===void 0?void 0:dt(n),"--ai-bg":s||r?a.background:void 0,"--ai-hover":s||r?a.hover:void 0,"--ai-hover-color":s||r?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":s||r?a.border:void 0}}},Ze=on((t,e)=>{const n=K("ActionIcon",ene,t),{className:r,unstyled:o,variant:s,classNames:i,styles:a,style:l,loading:c,loaderProps:u,size:d,color:f,radius:h,__staticSelector:p,gradient:m,vars:v,children:y,disabled:b,"data-disabled":w,autoContrast:S,mod:_,...k}=n,M=be({name:["ActionIcon",p],props:n,className:r,style:l,classes:fy,classNames:i,styles:a,unstyled:o,vars:v,varsResolver:tne});return g.jsxs(un,{...M("root",{active:!b&&!c&&!w}),...k,unstyled:o,variant:s,size:d,disabled:b||c,ref:e,mod:[{loading:c,disabled:b||w},_],children:[g.jsx(To,{mounted:!!c,transition:"slide-down",duration:150,children:T=>g.jsx(J,{component:"span",...M("loader",{style:T}),"aria-hidden":!0,children:g.jsx(ka,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...u})})}),g.jsx(J,{component:"span",mod:{loading:c},...M("icon"),children:y})]})});Ze.classes=fy;Ze.displayName="@mantine/core/ActionIcon";Ze.Group=Zk;const Y3=C.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},r)=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:r,...n,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"})}));Y3.displayName="@mantine/core/CloseIcon";var q3={root:"m_86a44da5","root--subtle":"m_220c80f2"};const nne={variant:"subtle"},rne=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":$e(e,"cb-size"),"--cb-radius":n===void 0?void 0:dt(n),"--cb-icon-size":Y(r)}}),Va=on((t,e)=>{const n=K("CloseButton",nne,t),{iconSize:r,children:o,vars:s,radius:i,className:a,classNames:l,style:c,styles:u,unstyled:d,"data-disabled":f,disabled:h,variant:p,icon:m,mod:v,...y}=n,b=be({name:"CloseButton",props:n,className:a,style:c,classes:q3,classNames:l,styles:u,unstyled:d,vars:s,varsResolver:rne});return g.jsxs(un,{ref:e,...y,unstyled:d,variant:p,disabled:h,mod:[{disabled:h||f},v],...b("root",{variant:p,active:!h&&!f}),children:[m||g.jsx(Y3,{}),o]})});Va.classes=q3;Va.displayName="@mantine/core/CloseButton";function one(t){return C.Children.toArray(t).filter(Boolean)}var X3={root:"m_4081bf90"};const sne={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},ine=(t,{grow:e,preventGrowOverflow:n,gap:r,align:o,justify:s,wrap:i},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":Dt(r),"--group-align":o,"--group-justify":s,"--group-wrap":i}}),Bu=ee((t,e)=>{const n=K("Group",sne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,children:l,gap:c,align:u,justify:d,wrap:f,grow:h,preventGrowOverflow:p,vars:m,variant:v,__size:y,mod:b,...w}=n,S=one(l),_=S.length,k=Dt(c??"md"),T={childWidth:`calc(${100/_}% - (${k} - ${k} / ${_}))`},P=be({name:"Group",props:n,stylesCtx:T,className:o,style:s,classes:X3,classNames:r,styles:i,unstyled:a,vars:m,varsResolver:ine});return g.jsx(J,{...P("root"),ref:e,variant:v,mod:[{grow:h},b],size:y,...w,children:S})});Bu.classes=X3;Bu.displayName="@mantine/core/Group";var J3={root:"m_9814e45f"};const ane={zIndex:rs("modal")},lne=(t,{gradient:e,color:n,backgroundOpacity:r,blur:o,radius:s,zIndex:i})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&ps(n||"#000",r??.6)||void 0,"--overlay-filter":o?`blur(${Y(o)})`:void 0,"--overlay-radius":s===void 0?void 0:dt(s),"--overlay-z-index":i==null?void 0:i.toString()}}),vh=on((t,e)=>{const n=K("Overlay",ane,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,fixed:c,center:u,children:d,radius:f,zIndex:h,gradient:p,blur:m,color:v,backgroundOpacity:y,mod:b,...w}=n,S=be({name:"Overlay",props:n,classes:J3,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:lne});return g.jsx(J,{ref:e,...S("root"),mod:[{center:u,fixed:c},b],...w,children:d})});vh.classes=J3;vh.displayName="@mantine/core/Overlay";const[cne,_i]=bn("ModalBase component was not found in tree");function une({opened:t,transitionDuration:e}){const[n,r]=C.useState(t),o=C.useRef(),i=Tk()?0:e;return C.useEffect(()=>(t?(r(!0),window.clearTimeout(o.current)):i===0?r(!1):o.current=window.setTimeout(()=>r(!1),i),()=>window.clearTimeout(o.current)),[t,i]),n}function dne({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:o,onClose:s,returnFocus:i}){const a=mr(t),[l,c]=C.useState(!1),[u,d]=C.useState(!1),f=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,h=une({opened:n,transitionDuration:f});return Ek("keydown",p=>{var m;p.key==="Escape"&&o&&n&&((m=p.target)==null?void 0:m.getAttribute("data-mantine-stop-propagation"))!=="true"&&s()},{capture:!0}),K5({opened:n,shouldReturnFocus:r&&i}),{_id:a,titleMounted:l,bodyMounted:u,shouldLockScroll:h,setTitleMounted:c,setBodyMounted:d}}const Q3=C.forwardRef(({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:o,trapFocus:s,closeOnEscape:i,returnFocus:a,closeOnClickOutside:l,withinPortal:c,portalProps:u,lockScroll:d,children:f,zIndex:h,shadow:p,padding:m,__vars:v,unstyled:y,removeScrollProps:b,...w},S)=>{const{_id:_,titleMounted:k,bodyMounted:M,shouldLockScroll:T,setTitleMounted:P,setBodyMounted:A}=dne({id:r,transitionProps:o,opened:e,trapFocus:s,closeOnEscape:i,onClose:n,returnFocus:a}),{key:L,...V}=b||{};return g.jsx(op,{...u,withinPortal:c,children:g.jsx(cne,{value:{opened:e,onClose:n,closeOnClickOutside:l,transitionProps:{...o,keepMounted:t},getTitleId:()=>`${_}-title`,getBodyId:()=>`${_}-body`,titleMounted:k,bodyMounted:M,setTitleMounted:P,setBodyMounted:A,trapFocus:s,closeOnEscape:i,zIndex:h,unstyled:y},children:g.jsx(ry,{enabled:T&&d,...V,children:g.jsx(J,{ref:S,...w,__vars:{...v,"--mb-z-index":(h||rs("modal")).toString(),"--mb-shadow":Ck(p),"--mb-padding":Dt(m)},children:f})},L)})})});function fne(){const t=_i();return C.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}var Vu={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const e2=C.forwardRef(({className:t,...e},n)=>{const r=fne(),o=_i();return g.jsx(J,{ref:n,...e,id:r,className:rn({[Vu.body]:!o.unstyled},t)})});e2.displayName="@mantine/core/ModalBaseBody";const t2=C.forwardRef(({className:t,onClick:e,...n},r)=>{const o=_i();return g.jsx(Va,{ref:r,...n,onClick:s=>{o.onClose(),e==null||e(s)},className:rn({[Vu.close]:!o.unstyled},t),unstyled:o.unstyled})});t2.displayName="@mantine/core/ModalBaseCloseButton";const Z3=C.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:o,...s},i)=>{const a=_i();return g.jsx(To,{mounted:a.opened,transition:"pop",...a.transitionProps,...t,children:l=>g.jsx("div",{...n,className:rn({[Vu.inner]:!a.unstyled},n.className),children:g.jsx(dy,{active:a.opened&&a.trapFocus,innerRef:i,children:g.jsx(np,{...s,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":a.bodyMounted?a.getBodyId():void 0,"aria-labelledby":a.titleMounted?a.getTitleId():void 0,style:[o,l],className:rn({[Vu.content]:!a.unstyled},e),unstyled:a.unstyled,children:s.children})})})})}),n2=C.forwardRef(({className:t,...e},n)=>{const r=_i();return g.jsx(J,{component:"header",ref:n,className:rn({[Vu.header]:!r.unstyled},t),...e})});n2.displayName="@mantine/core/ModalBaseHeader";const hne={duration:200,timingFunction:"ease",transition:"fade"};function pne(t){const e=_i();return{...hne,...e.transitionProps,...t}}const r2=C.forwardRef(({onClick:t,transitionProps:e,style:n,...r},o)=>{const s=_i(),i=pne(e);return g.jsx(To,{mounted:s.opened,...i,transition:"fade",children:a=>g.jsx(vh,{ref:o,fixed:!0,style:[n,a],zIndex:s.zIndex,unstyled:s.unstyled,onClick:l=>{t==null||t(l),s.closeOnClickOutside&&s.onClose()},...r})})});r2.displayName="@mantine/core/ModalBaseOverlay";function mne(){const t=_i();return C.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const o2=C.forwardRef(({className:t,...e},n)=>{const r=mne(),o=_i();return g.jsx(J,{component:"h2",ref:n,className:rn({[Vu.title]:!o.unstyled},t),...e,id:r})});o2.displayName="@mantine/core/ModalBaseTitle";function eF({children:t}){return g.jsx(g.Fragment,{children:t})}const[gne,hd]=uc({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Ro={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 OP={},vne=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${vn(e)} - ${Y(2)})`}}),hy=ee((t,e)=>{const n=K("InputDescription",OP,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,size:c,__staticSelector:u,__inheritStyles:d=!0,variant:f,...h}=K("InputDescription",OP,n),p=hd(),m=be({name:["InputWrapper",u],props:n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"description",vars:l,varsResolver:vne}),v=d&&(p==null?void 0:p.getStyles)||m;return g.jsx(J,{component:"p",ref:e,variant:f,size:c,...v("description",p!=null&&p.getStyles?{className:o,style:s}:void 0),...h})});hy.classes=Ro;hy.displayName="@mantine/core/InputDescription";const yne={},bne=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${vn(e)} - ${Y(2)})`}}),py=ee((t,e)=>{const n=K("InputError",yne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,size:c,__staticSelector:u,__inheritStyles:d=!0,variant:f,...h}=n,p=be({name:["InputWrapper",u],props:n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"error",vars:l,varsResolver:bne}),m=hd(),v=d&&(m==null?void 0:m.getStyles)||p;return g.jsx(J,{component:"p",ref:e,variant:f,size:c,...v("error",m!=null&&m.getStyles?{className:o,style:s}:void 0),...h})});py.classes=Ro;py.displayName="@mantine/core/InputError";const PP={labelElement:"label"},wne=(t,{size:e})=>({label:{"--input-label-size":vn(e),"--input-asterisk-color":void 0}}),my=ee((t,e)=>{const n=K("InputLabel",PP,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,labelElement:c,size:u,required:d,htmlFor:f,onMouseDown:h,children:p,__staticSelector:m,variant:v,mod:y,...b}=K("InputLabel",PP,n),w=be({name:["InputWrapper",m],props:n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"label",vars:l,varsResolver:wne}),S=hd(),_=(S==null?void 0:S.getStyles)||w;return g.jsxs(J,{..._("label",S!=null&&S.getStyles?{className:o,style:s}:void 0),component:c,variant:v,size:u,ref:e,htmlFor:c==="label"?f:void 0,mod:[{required:d},y],onMouseDown:k=>{h==null||h(k),!k.defaultPrevented&&k.detail>1&&k.preventDefault()},...b,children:[p,d&&g.jsx("span",{..._("required"),"aria-hidden":!0,children:" *"})]})});my.classes=Ro;my.displayName="@mantine/core/InputLabel";const AP={},s2=ee((t,e)=>{const n=K("InputPlaceholder",AP,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,__staticSelector:c,variant:u,error:d,mod:f,...h}=K("InputPlaceholder",AP,n),p=be({name:["InputPlaceholder",c],props:n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"placeholder"});return g.jsx(J,{...p("placeholder"),mod:[{error:!!d},f],component:"span",variant:u,ref:e,...h})});s2.classes=Ro;s2.displayName="@mantine/core/InputPlaceholder";function xne(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),o=t.slice(0,r),s=t.slice(r+1),i=e&&o.includes("description")||n&&o.includes("error");return{offsetBottom:e&&s.includes("description")||n&&s.includes("error"),offsetTop:i}}const Sne={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},_ne=(t,{size:e})=>({label:{"--input-label-size":vn(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${vn(e)} - ${Y(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${vn(e)} - ${Y(2)})`}}),i2=ee((t,e)=>{const n=K("InputWrapper",Sne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,size:c,variant:u,__staticSelector:d,inputContainer:f,inputWrapperOrder:h,label:p,error:m,description:v,labelProps:y,descriptionProps:b,errorProps:w,labelElement:S,children:_,withAsterisk:k,id:M,required:T,__stylesApiProps:P,mod:A,...L}=n,V=be({name:["InputWrapper",d],props:P||n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:_ne}),H={size:c,variant:u,__staticSelector:d},z=mr(M),N=typeof k=="boolean"?k:T,D=(w==null?void 0:w.id)||`${z}-error`,F=(b==null?void 0:b.id)||`${z}-description`,I=z,$=!!m&&typeof m!="boolean",j=!!v,W=`${$?D:""} ${j?F:""}`,G=W.trim().length>0?W.trim():void 0,X=(y==null?void 0:y.id)||`${z}-label`,q=p&&g.jsx(my,{labelElement:S,id:X,htmlFor:I,required:N,...H,...y,children:p},"label"),B=j&&g.jsx(hy,{...b,...H,size:(b==null?void 0:b.size)||H.size,id:(b==null?void 0:b.id)||F,children:v},"description"),Q=g.jsx(C.Fragment,{children:f(_)},"input"),Z=$&&C.createElement(py,{...w,...H,size:(w==null?void 0:w.size)||H.size,key:"error",id:(w==null?void 0:w.id)||D},m),oe=h.map(te=>{switch(te){case"label":return q;case"input":return Q;case"description":return B;case"error":return Z;default:return null}});return g.jsx(gne,{value:{getStyles:V,describedBy:G,inputId:I,labelId:X,...xne(h,{hasDescription:j,hasError:$})},children:g.jsx(J,{ref:e,variant:u,size:c,mod:[{error:!!m},A],...V("root"),...L,children:oe})})});i2.classes=Ro;i2.displayName="@mantine/core/InputWrapper";const Cne={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},kne=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":$e(e.size,"input-height"),"--input-fz":vn(e.size),"--input-radius":e.radius===void 0?void 0:dt(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Y(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Y(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?$e(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),wt=on((t,e)=>{const n=K("Input",Cne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,required:l,__staticSelector:c,__stylesApiProps:u,size:d,wrapperProps:f,error:h,disabled:p,leftSection:m,leftSectionProps:v,leftSectionWidth:y,rightSection:b,rightSectionProps:w,rightSectionWidth:S,rightSectionPointerEvents:_,leftSectionPointerEvents:k,variant:M,vars:T,pointer:P,multiline:A,radius:L,id:V,withAria:H,withErrorStyles:z,mod:N,inputSize:D,...F}=n,{styleProps:I,rest:$}=Ba(F),j=hd(),W={offsetBottom:j==null?void 0:j.offsetBottom,offsetTop:j==null?void 0:j.offsetTop},G=be({name:["Input",c],props:u||n,classes:Ro,className:o,style:s,classNames:r,styles:i,unstyled:a,stylesCtx:W,rootSelector:"wrapper",vars:T,varsResolver:kne}),X=H?{required:l,disabled:p,"aria-invalid":!!h,"aria-describedby":j==null?void 0:j.describedBy,id:(j==null?void 0:j.inputId)||V}:{};return g.jsxs(J,{...G("wrapper"),...I,...f,mod:[{error:!!h&&z,pointer:P,disabled:p,multiline:A,"data-with-right-section":!!b,"data-with-left-section":!!m},N],variant:M,size:d,children:[m&&g.jsx("div",{...v,"data-position":"left",...G("section",{className:v==null?void 0:v.className,style:v==null?void 0:v.style}),children:m}),g.jsx(J,{component:"input",...$,...X,ref:e,required:l,mod:{disabled:p,error:!!h&&z},variant:M,__size:D,...G("input")}),b&&g.jsx("div",{...w,"data-position":"right",...G("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:b})]})});wt.classes=Ro;wt.Wrapper=i2;wt.Label=my;wt.Error=py;wt.Description=hy;wt.Placeholder=s2;wt.displayName="@mantine/core/Input";function a2(t,e,n){const r=K(t,e,n),{label:o,description:s,error:i,required:a,classNames:l,styles:c,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:h,errorProps:p,labelProps:m,descriptionProps:v,wrapperProps:y,id:b,size:w,style:S,inputContainer:_,inputWrapperOrder:k,withAsterisk:M,variant:T,vars:P,mod:A,...L}=r,{styleProps:V,rest:H}=Ba(L),z={label:o,description:s,error:i,required:a,classNames:l,className:u,__staticSelector:f,__stylesApiProps:h||r,errorProps:p,labelProps:m,descriptionProps:v,unstyled:d,styles:c,size:w,style:S,inputContainer:_,inputWrapperOrder:k,withAsterisk:M,variant:T,id:b,mod:A,...y};return{...H,classNames:l,styles:c,unstyled:d,wrapperProps:{...z,...V},inputProps:{required:a,classNames:l,styles:c,unstyled:d,size:w,__staticSelector:f,__stylesApiProps:h||r,error:i,variant:T,id:b}}}const Ene={__staticSelector:"InputBase",withAria:!0},gr=on((t,e)=>{const{inputProps:n,wrapperProps:r,...o}=a2("InputBase",Ene,t);return g.jsx(wt.Wrapper,{...r,children:g.jsx(wt,{...n,...o,ref:e})})});gr.classes={...wt.classes,...wt.Wrapper.classes};gr.displayName="@mantine/core/InputBase";const Mne={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var tF={root:"m_8bffd616"};const Tne={},tn=on((t,e)=>{const n=K("Flex",Tne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,gap:c,rowGap:u,columnGap:d,align:f,justify:h,wrap:p,direction:m,...v}=n,y=be({name:"Flex",classes:tF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l}),b=Xt(),w=tp(),S=s3({styleProps:{gap:c,rowGap:u,columnGap:d,align:f,justify:h,wrap:p,direction:m},theme:b,data:Mne});return g.jsxs(g.Fragment,{children:[S.hasResponsiveStyles&&g.jsx(fc,{selector:`.${w}`,styles:S.styles,media:S.media}),g.jsx(J,{ref:e,...y("root",{className:w,style:$a(S.inlineStyles)}),...v})]})});tn.classes=tF;tn.displayName="@mantine/core/Flex";function $S({style:t,size:e=16,...n}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:Y(e),height:Y(e),display:"block"},...n,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"})})}$S.displayName="@mantine/core/AccordionChevron";var nF={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 Rne={},One=(t,{radius:e,color:n,variant:r,autoContrast:o})=>{const s=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:r||"light",autoContrast:o});return{root:{"--alert-radius":e===void 0?void 0:dt(e),"--alert-bg":n||r?s.background:void 0,"--alert-color":s.color,"--alert-bd":n||r?s.border:void 0}}},l2=ee((t,e)=>{const n=K("Alert",Rne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,radius:c,color:u,title:d,children:f,id:h,icon:p,withCloseButton:m,onClose:v,closeButtonLabel:y,variant:b,autoContrast:w,...S}=n,_=be({name:"Alert",classes:nF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:One}),k=mr(h),M=d&&`${k}-title`||void 0,T=`${k}-body`;return g.jsx(J,{id:k,..._("root",{variant:b}),variant:b,ref:e,...S,role:"alert","aria-describedby":T,"aria-labelledby":M,children:g.jsxs("div",{..._("wrapper"),children:[p&&g.jsx("div",{..._("icon"),children:p}),g.jsxs("div",{..._("body"),children:[d&&g.jsx("div",{..._("title"),"data-with-close-button":m||void 0,children:g.jsx("span",{id:M,..._("label"),children:d})}),f&&g.jsx("div",{id:T,..._("message"),"data-variant":b,children:f})]}),m&&g.jsx(Va,{..._("closeButton"),onClick:v,variant:"transparent",size:16,iconSize:16,"aria-label":y,unstyled:a})]})})});l2.classes=nF;l2.displayName="@mantine/core/Alert";var rF={root:"m_b6d8b162"};function Pne(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const Ane={inherit:!1},Dne=(t,{variant:e,lineClamp:n,gradient:r,size:o,color:s})=>({root:{"--text-fz":vn(o),"--text-lh":H5(o),"--text-gradient":e==="gradient"?OS(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":s?yt(s,t):void 0}}),es=on((t,e)=>{const n=K("Text",Ane,t),{lineClamp:r,truncate:o,inline:s,inherit:i,gradient:a,span:l,__staticSelector:c,vars:u,className:d,style:f,classNames:h,styles:p,unstyled:m,variant:v,mod:y,size:b,...w}=n,S=be({name:["Text",c],props:n,classes:rF,className:d,style:f,classNames:h,styles:p,unstyled:m,vars:u,varsResolver:Dne});return g.jsx(J,{...S("root",{focusable:!0}),ref:e,component:l?"span":"p",variant:v,mod:[{"data-truncate":Pne(o),"data-line-clamp":typeof r=="number","data-inline":s,"data-inherit":i},y],size:b,...w})});es.classes=rF;es.displayName="@mantine/core/Text";var oF={root:"m_849cf0da"};const Ine={underline:"hover"},sF=on((t,e)=>{const{underline:n,className:r,unstyled:o,mod:s,...i}=K("Anchor",Ine,t);return g.jsx(es,{component:"a",ref:e,className:rn({[oF.root]:!o},r),...i,mod:[{underline:n},s],__staticSelector:"Anchor",unstyled:o})});sF.classes=oF;sF.displayName="@mantine/core/Anchor";const[Nne,pd]=bn("AppShell was not found in tree");var Ha={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const Lne={},c2=ee((t,e)=>{const n=K("AppShellAside",Lne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,withBorder:c,zIndex:u,mod:d,...f}=n,h=pd();return h.disabled?null:g.jsx(J,{component:"aside",ref:e,mod:[{"with-border":c??h.withBorder},d],...h.getStyles("aside",{className:o,classNames:r,styles:i,style:s}),...f,__vars:{"--app-shell-aside-z-index":`calc(${u??h.zIndex} + 1)`}})});c2.classes=Ha;c2.displayName="@mantine/core/AppShellAside";const jne={},u2=ee((t,e)=>{var p;const n=K("AppShellFooter",jne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,withBorder:c,zIndex:u,mod:d,...f}=n,h=pd();return h.disabled?null:g.jsx(J,{component:"footer",ref:e,mod:[{"with-border":c??h.withBorder},d],...h.getStyles("footer",{className:rn({[ry.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:i,style:s}),...f,__vars:{"--app-shell-footer-z-index":(p=u??h.zIndex)==null?void 0:p.toString()}})});u2.classes=Ha;u2.displayName="@mantine/core/AppShellFooter";const $ne={},d2=ee((t,e)=>{var p;const n=K("AppShellHeader",$ne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,withBorder:c,zIndex:u,mod:d,...f}=n,h=pd();return h.disabled?null:g.jsx(J,{component:"header",ref:e,mod:[{"with-border":c??h.withBorder},d],...h.getStyles("header",{className:rn({[ry.classNames.zeroRight]:h.offsetScrollbars},o),classNames:r,styles:i,style:s}),...f,__vars:{"--app-shell-header-z-index":(p=u??h.zIndex)==null?void 0:p.toString()}})});d2.classes=Ha;d2.displayName="@mantine/core/AppShellHeader";const Fne={},f2=ee((t,e)=>{const n=K("AppShellMain",Fne,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=pd();return g.jsx(J,{component:"main",ref:e,...c.getStyles("main",{className:o,style:s,classNames:r,styles:i}),...l})});f2.classes=Ha;f2.displayName="@mantine/core/AppShellMain";function sp(t){return typeof t=="object"?t.base:t}function ip(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function ap(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function zne({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:o}){var l,c,u;const s=r==null?void 0:r.width,i="translateX(var(--app-shell-aside-width))",a="translateX(calc(var(--app-shell-aside-width) * -1))";if(r!=null&&r.breakpoint&&!((l=r==null?void 0:r.collapsed)!=null&&l.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px"),ip(s)){const d=Y(sp(s));t["--app-shell-aside-width"]=d,t["--app-shell-aside-offset"]=d}if(ap(s)&&(typeof s.base<"u"&&(t["--app-shell-aside-width"]=Y(s.base),t["--app-shell-aside-offset"]=Y(s.base)),St(s).forEach(d=>{d!=="base"&&(e[d]=e[d]||{},e[d]["--app-shell-aside-width"]=Y(s[d]),e[d]["--app-shell-aside-offset"]=Y(s[d]))})),(c=r==null?void 0:r.collapsed)!=null&&c.desktop){const d=r.breakpoint;e[d]=e[d]||{},e[d]["--app-shell-aside-transform"]=i,e[d]["--app-shell-aside-transform-rtl"]=a,e[d]["--app-shell-aside-offset"]="0px !important"}if((u=r==null?void 0:r.collapsed)!=null&&u.mobile){const d=kk(r.breakpoint,o)-.1;n[d]=n[d]||{},n[d]["--app-shell-aside-width"]="100%",n[d]["--app-shell-aside-offset"]="0px",n[d]["--app-shell-aside-transform"]=i,n[d]["--app-shell-aside-transform-rtl"]=a}}function Bne({baseStyles:t,minMediaStyles:e,footer:n}){const r=n==null?void 0:n.height,o="translateY(var(--app-shell-footer-height))",s=(n==null?void 0:n.offset)??!0;if(ip(r)){const i=Y(sp(r));t["--app-shell-footer-height"]=i,s&&(t["--app-shell-footer-offset"]=i)}ap(r)&&(typeof r.base<"u"&&(t["--app-shell-footer-height"]=Y(r.base),s&&(t["--app-shell-footer-offset"]=Y(r.base))),St(r).forEach(i=>{i!=="base"&&(e[i]=e[i]||{},e[i]["--app-shell-footer-height"]=Y(r[i]),s&&(e[i]["--app-shell-footer-offset"]=Y(r[i])))})),n!=null&&n.collapsed&&(t["--app-shell-footer-transform"]=o,t["--app-shell-footer-offset"]="0px !important")}function Vne({baseStyles:t,minMediaStyles:e,header:n}){const r=n==null?void 0:n.height,o="translateY(calc(var(--app-shell-header-height) * -1))",s=(n==null?void 0:n.offset)??!0;if(ip(r)){const i=Y(sp(r));t["--app-shell-header-height"]=i,s&&(t["--app-shell-header-offset"]=i)}ap(r)&&(typeof r.base<"u"&&(t["--app-shell-header-height"]=Y(r.base),s&&(t["--app-shell-header-offset"]=Y(r.base))),St(r).forEach(i=>{i!=="base"&&(e[i]=e[i]||{},e[i]["--app-shell-header-height"]=Y(r[i]),s&&(e[i]["--app-shell-header-offset"]=Y(r[i])))})),n!=null&&n.collapsed&&(t["--app-shell-header-transform"]=o,t["--app-shell-header-offset"]="0px !important")}function Hne({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:o}){var l,c,u;const s=r==null?void 0:r.width,i="translateX(calc(var(--app-shell-navbar-width) * -1))",a="translateX(var(--app-shell-navbar-width))";if(r!=null&&r.breakpoint&&!((l=r==null?void 0:r.collapsed)!=null&&l.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-navbar-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-navbar-offset"]="0px"),ip(s)){const d=Y(sp(s));t["--app-shell-navbar-width"]=d,t["--app-shell-navbar-offset"]=d}if(ap(s)&&(typeof s.base<"u"&&(t["--app-shell-navbar-width"]=Y(s.base),t["--app-shell-navbar-offset"]=Y(s.base)),St(s).forEach(d=>{d!=="base"&&(e[d]=e[d]||{},e[d]["--app-shell-navbar-width"]=Y(s[d]),e[d]["--app-shell-navbar-offset"]=Y(s[d]))})),(c=r==null?void 0:r.collapsed)!=null&&c.desktop){const d=r.breakpoint;e[d]=e[d]||{},e[d]["--app-shell-navbar-transform"]=i,e[d]["--app-shell-navbar-transform-rtl"]=a,e[d]["--app-shell-navbar-offset"]="0px !important"}if((u=r==null?void 0:r.collapsed)!=null&&u.mobile){const d=kk(r.breakpoint,o)-.1;n[d]=n[d]||{},n[d]["--app-shell-navbar-width"]="100%",n[d]["--app-shell-navbar-offset"]="0px",n[d]["--app-shell-navbar-transform"]=i,n[d]["--app-shell-navbar-transform-rtl"]=a}}function ew(t){return Number(t)===0?"0px":Dt(t)}function Wne({padding:t,baseStyles:e,minMediaStyles:n}){ip(t)&&(e["--app-shell-padding"]=ew(sp(t))),ap(t)&&(t.base&&(e["--app-shell-padding"]=ew(t.base)),St(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=ew(t[r]))}))}function Une({navbar:t,header:e,footer:n,aside:r,padding:o,theme:s}){const i={},a={},l={};Hne({baseStyles:l,minMediaStyles:i,maxMediaStyles:a,navbar:t,theme:s}),zne({baseStyles:l,minMediaStyles:i,maxMediaStyles:a,aside:r,theme:s}),Vne({baseStyles:l,minMediaStyles:i,header:e}),Bne({baseStyles:l,minMediaStyles:i,footer:n}),Wne({baseStyles:l,minMediaStyles:i,padding:o});const c=fh(St(i),s).map(f=>({query:`(min-width: ${fv(f.px)})`,styles:i[f.value]})),u=fh(St(a),s).map(f=>({query:`(max-width: ${fv(f.px)})`,styles:a[f.value]})),d=[...c,...u];return{baseStyles:l,media:d}}function Gne({navbar:t,header:e,aside:n,footer:r,padding:o}){const s=Xt(),i=za(),{media:a,baseStyles:l}=Une({navbar:t,header:e,footer:r,aside:n,padding:o,theme:s});return g.jsx(fc,{media:a,styles:l,selector:i.cssVariablesSelector})}const Kne={},h2=ee((t,e)=>{const n=K("AppShellNavbar",Kne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,withBorder:c,zIndex:u,mod:d,...f}=n,h=pd();return h.disabled?null:g.jsx(J,{component:"nav",ref:e,mod:[{"with-border":c??h.withBorder},d],...h.getStyles("navbar",{className:o,classNames:r,styles:i,style:s}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${u??h.zIndex} + 1)`}})});h2.classes=Ha;h2.displayName="@mantine/core/AppShellNavbar";const Yne={},p2=on((t,e)=>{const n=K("AppShellSection",Yne,t),{classNames:r,className:o,style:s,styles:i,vars:a,grow:l,mod:c,...u}=n,d=pd();return g.jsx(J,{ref:e,mod:[{grow:l},c],...d.getStyles("section",{className:o,style:s,classNames:r,styles:i}),...u})});p2.classes=Ha;p2.displayName="@mantine/core/AppShellSection";function qne({transitionDuration:t,disabled:e}){const[n,r]=C.useState(!0),o=C.useRef(),s=C.useRef();return Ek("resize",()=>{r(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>r(!1),200)}),dc(()=>{C.startTransition(()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>r(!1),t||0)})},[e,t]),n}const Xne={withBorder:!0,offsetScrollbars:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:rs("app")},Jne=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),Wa=ee((t,e)=>{const n=K("AppShell",Xne,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,navbar:c,withBorder:u,padding:d,transitionDuration:f,transitionTimingFunction:h,header:p,zIndex:m,layout:v,disabled:y,aside:b,footer:w,offsetScrollbars:S,mod:_,...k}=n,M=be({name:"AppShell",classes:Ha,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Jne}),T=qne({disabled:y,transitionDuration:f});return g.jsxs(Nne,{value:{getStyles:M,withBorder:u,zIndex:m,disabled:y,offsetScrollbars:S},children:[g.jsx(Gne,{navbar:c,header:p,aside:b,footer:w,padding:d}),g.jsx(J,{ref:e,...M("root"),mod:[{resizing:T,layout:v,disabled:y},_],...k})]})});Wa.classes=Ha;Wa.displayName="@mantine/core/AppShell";Wa.Navbar=h2;Wa.Header=d2;Wa.Main=f2;Wa.Aside=c2;Wa.Footer=u2;Wa.Section=p2;function iF(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>iF(e))}:t}function m2(t){return t?t.map(e=>iF(e)):[]}function gy(t){return t.reduce((e,n)=>"group"in n?{...e,...gy(n.items)}:(e[n.value]=n,e),{})}var Dr={dropdown:"m_88b62a41",options:"m_b2821a6e",option:"m_92253aa5",search:"m_985517d8",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const Qne={error:null},Zne=(t,{size:e})=>({chevron:{"--combobox-chevron-size":$e(e,"combobox-chevron-size")}}),g2=ee((t,e)=>{const n=K("ComboboxChevron",Qne,t),{size:r,error:o,style:s,className:i,classNames:a,styles:l,unstyled:c,vars:u,mod:d,...f}=n,h=be({name:"ComboboxChevron",classes:Dr,props:n,style:s,className:i,classNames:a,styles:l,unstyled:c,vars:u,varsResolver:Zne,rootSelector:"chevron"});return g.jsx(J,{component:"svg",...f,...h("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},d],ref:e,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"})})});g2.classes=Dr;g2.displayName="@mantine/core/ComboboxChevron";const[ere,Oo]=bn("Combobox component was not found in tree"),aF=C.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:r,...o},s)=>g.jsx(Va,{ref:s,size:t||"sm",variant:"transparent",tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:i=>{i.preventDefault(),e==null||e(i)},onClick:i=>{r(),n==null||n(i)}}));aF.displayName="@mantine/core/ComboboxClearButton";const tre={},v2=ee((t,e)=>{const{classNames:n,styles:r,className:o,style:s,hidden:i,...a}=K("ComboboxDropdown",tre,t),l=Oo();return g.jsx(Mt.Dropdown,{...a,ref:e,role:"presentation","data-hidden":i||void 0,...l.getStyles("dropdown",{className:o,style:s,classNames:n,styles:r})})});v2.classes=Dr;v2.displayName="@mantine/core/ComboboxDropdown";const nre={refProp:"ref"},lF=ee((t,e)=>{const{children:n,refProp:r}=K("ComboboxDropdownTarget",nre,t);if(Oo(),!Fa(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(Mt.Target,{ref:e,refProp:r,children:n})});lF.displayName="@mantine/core/ComboboxDropdownTarget";const rre={},y2=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("ComboboxEmpty",rre,t),l=Oo();return g.jsx(J,{ref:e,...l.getStyles("empty",{className:r,classNames:n,styles:s,style:o}),...a})});y2.classes=Dr;y2.displayName="@mantine/core/ComboboxEmpty";function b2({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:r,targetType:o,autoComplete:s}){const i=Oo(),[a,l]=C.useState(null),c=d=>{if(t==null||t(d),!i.readOnly&&e){if(d.nativeEvent.isComposing)return;if(d.nativeEvent.code==="ArrowDown"&&(d.preventDefault(),i.store.dropdownOpened?l(i.store.selectNextOption()):(i.store.openDropdown("keyboard"),l(i.store.selectActiveOption()))),d.nativeEvent.code==="ArrowUp"&&(d.preventDefault(),i.store.dropdownOpened?l(i.store.selectPreviousOption()):(i.store.openDropdown("keyboard"),l(i.store.selectActiveOption()))),d.nativeEvent.code==="Enter"||d.nativeEvent.code==="NumpadEnter"){if(d.nativeEvent.keyCode===229)return;const f=i.store.getSelectedOptionIndex();i.store.dropdownOpened&&f!==-1?(d.preventDefault(),i.store.clickSelectedOption()):o==="button"&&(d.preventDefault(),i.store.openDropdown("keyboard"))}d.nativeEvent.code==="Escape"&&i.store.closeDropdown("keyboard"),d.nativeEvent.code==="Space"&&o==="button"&&(d.preventDefault(),i.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r&&!!(i.store.listId&&i.store.dropdownOpened)||void 0,"aria-controls":i.store.listId,"aria-activedescendant":i.store.dropdownOpened&&a||void 0,autoComplete:s,"data-expanded":i.store.dropdownOpened||void 0,"data-mantine-stop-propagation":i.store.dropdownOpened||void 0}:{},onKeyDown:c}}const ore={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},cF=ee((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:i,targetType:a,autoComplete:l,...c}=K("ComboboxEventsTarget",ore,t);if(!Fa(n))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 u=Oo(),d=b2({targetType:a,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:i,onKeyDown:n.props.onKeyDown,autoComplete:l});return C.cloneElement(n,{...d,...c,[r]:wn(e,u.store.targetRef,n==null?void 0:n.ref)})});cF.displayName="@mantine/core/ComboboxEventsTarget";const sre={},w2=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("ComboboxFooter",sre,t),l=Oo();return g.jsx(J,{ref:e,...l.getStyles("footer",{className:r,classNames:n,style:o,styles:s}),...a,onMouseDown:c=>{c.preventDefault()}})});w2.classes=Dr;w2.displayName="@mantine/core/ComboboxFooter";const ire={},x2=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,children:a,label:l,...c}=K("ComboboxGroup",ire,t),u=Oo();return g.jsxs(J,{ref:e,...u.getStyles("group",{className:r,classNames:n,style:o,styles:s}),...c,children:[l&&g.jsx("div",{...u.getStyles("groupLabel",{classNames:n,styles:s}),children:l}),a]})});x2.classes=Dr;x2.displayName="@mantine/core/ComboboxGroup";const are={},S2=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("ComboboxHeader",are,t),l=Oo();return g.jsx(J,{ref:e,...l.getStyles("header",{className:r,classNames:n,style:o,styles:s}),...a,onMouseDown:c=>{c.preventDefault()}})});S2.classes=Dr;S2.displayName="@mantine/core/ComboboxHeader";function uF({value:t,valuesDivider:e=",",...n}){return g.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}uF.displayName="@mantine/core/ComboboxHiddenInput";const lre={},_2=ee((t,e)=>{const n=K("ComboboxOption",lre,t),{classNames:r,className:o,style:s,styles:i,vars:a,onClick:l,id:c,active:u,onMouseDown:d,onMouseOver:f,disabled:h,selected:p,mod:m,...v}=n,y=Oo(),b=C.useId(),w=c||b;return g.jsx(J,{...y.getStyles("option",{className:o,classNames:r,styles:i,style:s}),...v,ref:e,id:w,mod:["combobox-option",{"combobox-active":u,"combobox-disabled":h,"combobox-selected":p},m],role:"option",onClick:S=>{var _;h?S.preventDefault():((_=y.onOptionSubmit)==null||_.call(y,n.value,n),l==null||l(S))},onMouseDown:S=>{S.preventDefault(),d==null||d(S)},onMouseOver:S=>{y.resetSelectionOnOptionHover&&y.store.resetSelectedOption(),f==null||f(S)}})});_2.classes=Dr;_2.displayName="@mantine/core/ComboboxOption";const cre={},C2=ee((t,e)=>{const n=K("ComboboxOptions",cre,t),{classNames:r,className:o,style:s,styles:i,id:a,onMouseDown:l,labelledBy:c,...u}=n,d=Oo(),f=mr(a);return C.useEffect(()=>{d.store.setListId(f)},[f]),g.jsx(J,{ref:e,...d.getStyles("options",{className:o,style:s,classNames:r,styles:i}),...u,id:f,role:"listbox","aria-labelledby":c,onMouseDown:h=>{h.preventDefault(),l==null||l(h)}})});C2.classes=Dr;C2.displayName="@mantine/core/ComboboxOptions";const ure={withAriaAttributes:!0,withKeyboardNavigation:!0},k2=ee((t,e)=>{const n=K("ComboboxSearch",ure,t),{classNames:r,styles:o,unstyled:s,vars:i,withAriaAttributes:a,onKeyDown:l,withKeyboardNavigation:c,size:u,...d}=n,f=Oo(),h=f.getStyles("search"),p=b2({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return g.jsx(wt,{ref:wn(e,f.store.searchRef),classNames:[{input:h.className},r],styles:[{input:h.style},o],size:u||f.size,...p,...d,__staticSelector:"Combobox"})});k2.classes=Dr;k2.displayName="@mantine/core/ComboboxSearch";const dre={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},dF=ee((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:o,withAriaAttributes:s,withExpandedAttribute:i,targetType:a,autoComplete:l,...c}=K("ComboboxTarget",dre,t);if(!Fa(n))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 u=Oo(),d=b2({targetType:a,withAriaAttributes:s,withKeyboardNavigation:o,withExpandedAttribute:i,onKeyDown:n.props.onKeyDown,autoComplete:l}),f=C.cloneElement(n,{...d,...c});return g.jsx(Mt.Target,{ref:wn(e,u.store.targetRef),children:f})});dF.displayName="@mantine/core/ComboboxTarget";function fre(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function hre(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function pre(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function vy({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:o,loop:s=!0,scrollBehavior:i="instant"}={}){const[a,l]=yn({value:e,defaultValue:t,finalValue:!1,onChange:n}),c=C.useRef(null),u=C.useRef(-1),d=C.useRef(null),f=C.useRef(null),h=C.useRef(-1),p=C.useRef(-1),m=C.useRef(-1),v=C.useCallback((D="unknown")=>{a||(l(!0),o==null||o(D))},[l,o,a]),y=C.useCallback((D="unknown")=>{a&&(l(!1),r==null||r(D))},[l,r,a]),b=C.useCallback((D="unknown")=>{a?y(D):v(D)},[y,v,a]),w=C.useCallback(()=>{const D=document.querySelector(`#${c.current} [data-combobox-selected]`);D==null||D.removeAttribute("data-combobox-selected"),D==null||D.removeAttribute("aria-selected")},[]),S=C.useCallback(D=>{const F=document.getElementById(c.current),I=F==null?void 0:F.querySelectorAll("[data-combobox-option]");if(!I)return null;const $=D>=I.length?0:D<0?I.length-1:D;return u.current=$,I!=null&&I[$]&&!I[$].hasAttribute("data-combobox-disabled")?(w(),I[$].setAttribute("data-combobox-selected","true"),I[$].setAttribute("aria-selected","true"),I[$].scrollIntoView({block:"nearest",behavior:i}),I[$].id):null},[i,w]),_=C.useCallback(()=>{const D=document.querySelector(`#${c.current} [data-combobox-active]`);if(D){const F=document.querySelectorAll(`#${c.current} [data-combobox-option]`),I=Array.from(F).findIndex($=>$===D);return S(I)}return S(0)},[S]),k=C.useCallback(()=>S(hre(u.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),s)),[S,s]),M=C.useCallback(()=>S(fre(u.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),s)),[S,s]),T=C.useCallback(()=>S(pre(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[S]),P=C.useCallback((D="selected",F)=>{m.current=window.setTimeout(()=>{var j;const I=document.querySelectorAll(`#${c.current} [data-combobox-option]`),$=Array.from(I).findIndex(W=>W.hasAttribute(`data-combobox-${D}`));u.current=$,F!=null&&F.scrollIntoView&&((j=I[$])==null||j.scrollIntoView({block:"nearest",behavior:i}))},0)},[]),A=C.useCallback(()=>{u.current=-1,w()},[w]),L=C.useCallback(()=>{const D=document.querySelectorAll(`#${c.current} [data-combobox-option]`),F=D==null?void 0:D[u.current];F==null||F.click()},[]),V=C.useCallback(D=>{c.current=D},[]),H=C.useCallback(()=>{h.current=window.setTimeout(()=>d.current.focus(),0)},[]),z=C.useCallback(()=>{p.current=window.setTimeout(()=>f.current.focus(),0)},[]),N=C.useCallback(()=>u.current,[]);return C.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(p.current),window.clearTimeout(m.current)},[]),{dropdownOpened:a,openDropdown:v,closeDropdown:y,toggleDropdown:b,selectedOptionIndex:u.current,getSelectedOptionIndex:N,selectOption:S,selectFirstOption:T,selectActiveOption:_,selectNextOption:k,selectPreviousOption:M,resetSelectedOption:A,updateSelectedOptionIndex:P,listId:c.current,setListId:V,clickSelectedOption:L,searchRef:d,focusSearchInput:H,targetRef:f,focusTarget:z}}const mre={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},gre=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":vn(e),"--combobox-option-padding":$e(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:Y(n),"--combobox-option-fz":vn(e),"--combobox-option-padding":$e(e,"combobox-option-padding")}});function Qe(t){const e=K("Combobox",mre,t),{classNames:n,styles:r,unstyled:o,children:s,store:i,vars:a,onOptionSubmit:l,onClose:c,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:h,readOnly:p,...m}=e,v=vy(),y=i||v,b=be({name:h||"Combobox",classes:Dr,props:e,classNames:n,styles:r,unstyled:o,vars:a,varsResolver:gre}),w=()=>{c==null||c(),y.closeDropdown()};return g.jsx(ere,{value:{getStyles:b,store:y,onOptionSubmit:l,size:u,resetSelectionOnOptionHover:f,readOnly:p},children:g.jsx(Mt,{opened:y.dropdownOpened,...m,onClose:w,withRoles:!1,unstyled:o,children:s})})}const vre=t=>t;Qe.extend=vre;Qe.classes=Dr;Qe.displayName="@mantine/core/Combobox";Qe.Target=dF;Qe.Dropdown=v2;Qe.Options=C2;Qe.Option=_2;Qe.Search=k2;Qe.Empty=y2;Qe.Chevron=g2;Qe.Footer=w2;Qe.Header=S2;Qe.EventsTarget=cF;Qe.DropdownTarget=lF;Qe.Group=x2;Qe.ClearButton=aF;Qe.HiddenInput=uF;var fF={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const hF=fF,yy=C.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:o,unstyled:s,children:i,label:a,description:l,id:c,disabled:u,error:d,size:f,labelPosition:h="left",bodyElement:p="div",labelElement:m="label",variant:v,style:y,vars:b,mod:w,...S},_)=>{const k=be({name:t,props:e,className:n,style:y,classes:fF,classNames:r,styles:o,unstyled:s});return g.jsx(J,{...k("root"),ref:_,__vars:{"--label-fz":vn(f),"--label-lh":$e(f,"label-lh")},mod:[{"label-position":h},w],variant:v,size:f,...S,children:g.jsxs(J,{component:p,htmlFor:p==="label"?c:void 0,...k("body"),children:[i,g.jsxs("div",{...k("labelWrapper"),"data-disabled":u||void 0,children:[a&&g.jsx(J,{component:m,htmlFor:m==="label"?c:void 0,...k("label"),"data-disabled":u||void 0,children:a}),l&&g.jsx(wt.Description,{size:f,__inheritStyles:!1,...k("description"),children:l}),d&&typeof d!="boolean"&&g.jsx(wt.Error,{size:f,__inheritStyles:!1,...k("error"),children:d})]})]})})});yy.displayName="@mantine/core/InlineInput";const pF=C.createContext(null),yre=pF.Provider,mF=()=>C.useContext(pF),[bre,wre]=uc();var gF={card:"m_26775b0a"};const xre={withBorder:!0},Sre=(t,{radius:e})=>({card:{"--card-radius":dt(e)}}),E2=ee((t,e)=>{const n=K("CheckboxCard",xre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,checked:c,mod:u,withBorder:d,value:f,onClick:h,...p}=n,m=be({name:"CheckboxCard",classes:gF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Sre,rootSelector:"card"}),v=mF(),y=typeof c=="boolean"?c:(v==null?void 0:v.value.includes(f||""))||!1;return g.jsx(bre,{value:{checked:y},children:g.jsx(un,{ref:e,mod:[{"with-border":d,checked:y},u],...m("card"),...p,role:"checkbox","aria-checked":y,onClick:b=>{h==null||h(b),v==null||v.onChange(f||"")}})})});E2.displayName="@mantine/core/CheckboxCard";E2.classes=gF;function M2({children:t,role:e}){const n=hd();return n?g.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):g.jsx(g.Fragment,{children:t})}const _re={},T2=ee((t,e)=>{const{value:n,defaultValue:r,onChange:o,size:s,wrapperProps:i,children:a,readOnly:l,...c}=K("CheckboxGroup",_re,t),[u,d]=yn({value:n,defaultValue:r,finalValue:[],onChange:o}),f=h=>{const p=typeof h=="string"?h:h.currentTarget.value;!l&&d(u.includes(p)?u.filter(m=>m!==p):[...u,p])};return g.jsx(yre,{value:{value:u,onChange:f,size:s},children:g.jsx(wt.Wrapper,{size:s,ref:e,...i,...c,labelElement:"div",__staticSelector:"CheckboxGroup",children:g.jsx(M2,{role:"group",children:a})})})});T2.classes=wt.Wrapper.classes;T2.displayName="@mantine/core/CheckboxGroup";function by({size:t,style:e,...n}){const r=t!==void 0?{width:Y(t),height:Y(t),...e}:e;return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,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 vF({indeterminate:t,...e}){return t?g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:g.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):g.jsx(by,{...e})}var yF={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Cre={icon:vF},kre=(t,{radius:e,color:n,size:r,iconColor:o,variant:s,autoContrast:i})=>{const a=ss({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--checkbox-size":$e(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:dt(e),"--checkbox-color":s==="outline"?l:yt(n,t),"--checkbox-icon-color":o?yt(o,t):xi(i,t)?Fs({color:n,theme:t,autoContrast:i}):void 0}}},R2=ee((t,e)=>{const n=K("CheckboxIndicator",Cre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,icon:c,indeterminate:u,radius:d,color:f,iconColor:h,autoContrast:p,checked:m,mod:v,variant:y,disabled:b,...w}=n,S=c,_=be({name:"CheckboxIndicator",classes:yF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:kre,rootSelector:"indicator"}),k=wre(),M=typeof m=="boolean"||typeof u=="boolean"?m||u:(k==null?void 0:k.checked)||!1;return g.jsx(J,{ref:e,..._("indicator",{variant:y}),variant:y,mod:[{checked:M,disabled:b},v],...w,children:g.jsx(S,{indeterminate:u,..._("icon")})})});R2.displayName="@mantine/core/CheckboxIndicator";R2.classes=yF;var bF={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Ere={labelPosition:"right",icon:vF},Mre=(t,{radius:e,color:n,size:r,iconColor:o,variant:s,autoContrast:i})=>{const a=ss({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--checkbox-size":$e(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:dt(e),"--checkbox-color":s==="outline"?l:yt(n,t),"--checkbox-icon-color":o?yt(o,t):xi(i,t)?Fs({color:n,theme:t,autoContrast:i}):void 0}}},pc=ee((t,e)=>{const n=K("Checkbox",Ere,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,color:c,label:u,id:d,size:f,radius:h,wrapperProps:p,children:m,checked:v,labelPosition:y,description:b,error:w,disabled:S,variant:_,indeterminate:k,icon:M,rootRef:T,iconColor:P,onChange:A,autoContrast:L,mod:V,...H}=n,z=mF(),N=f||(z==null?void 0:z.size),D=M,F=be({name:"Checkbox",props:n,classes:bF,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Mre}),{styleProps:I,rest:$}=Ba(H),j=mr(d),W=z?{checked:z.value.includes($.value),onChange:G=>{z.onChange(G),A==null||A(G)}}:{};return g.jsx(yy,{...F("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:j,size:N,labelPosition:y,label:u,description:b,error:w,disabled:S,classNames:r,styles:i,unstyled:a,"data-checked":W.checked||v||void 0,variant:_,ref:T,mod:V,...I,...p,children:g.jsxs(J,{...F("inner"),mod:{"data-label-position":y},children:[g.jsx(J,{component:"input",id:j,ref:e,checked:v,disabled:S,mod:{error:!!w,indeterminate:k},...F("input",{focusable:!0,variant:_}),onChange:A,...$,...W,type:"checkbox"}),g.jsx(D,{indeterminate:k,...F("icon")})]})})});pc.classes={...bF,...hF};pc.displayName="@mantine/core/Checkbox";pc.Group=T2;pc.Indicator=R2;pc.Card=E2;function Hu(t){return"group"in t}function wF({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),o=[];for(let s=0;s<t.length;s+=1){const i=t[s];if(o.length===n)return o;Hu(i)&&o.push({group:i.group,items:wF({options:i.items,search:e,limit:n-o.length})}),Hu(i)||i.label.toLowerCase().includes(r)&&o.push(i)}return o}function Tre(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function xF(t,e=new Set){if(Array.isArray(t))for(const n of t)if(Hu(n))xF(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function Rre(t,e){return Array.isArray(t)?t.includes(e):t===e}function SF({data:t,withCheckIcon:e,value:n,checkIconPosition:r,unstyled:o,renderOption:s}){if(!Hu(t)){const a=Rre(n,t.value),l=e&&a&&g.jsx(by,{className:Dr.optionsDropdownCheckIcon}),c=g.jsxs(g.Fragment,{children:[r==="left"&&l,g.jsx("span",{children:t.label}),r==="right"&&l]});return g.jsx(Qe.Option,{value:t.value,disabled:t.disabled,className:rn({[Dr.optionsDropdownOption]:!o}),"data-reverse":r==="right"||void 0,"data-checked":a||void 0,"aria-selected":a,active:a,children:typeof s=="function"?s({option:t,checked:a}):c})}const i=t.items.map(a=>g.jsx(SF,{data:a,value:n,unstyled:o,withCheckIcon:e,checkIconPosition:r,renderOption:s},a.value));return g.jsx(Qe.Group,{label:t.group,children:i})}function O2({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:o,limit:s,maxDropdownHeight:i,withScrollArea:a=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:u,checkIconPosition:d,nothingFoundMessage:f,unstyled:h,labelId:p,renderOption:m,scrollAreaProps:v,"aria-label":y}){xF(t);const w=typeof o=="string"?(r||wF)({options:t,search:l?o:"",limit:s??1/0}):t,S=Tre(w),_=w.map(k=>g.jsx(SF,{data:k,withCheckIcon:c,value:u,checkIconPosition:d,unstyled:h,renderOption:m},Hu(k)?k.group:k.value));return g.jsx(Qe.Dropdown,{hidden:e||n&&S,children:g.jsxs(Qe.Options,{labelledBy:p,"aria-label":y,children:[a?g.jsx(dd.Autosize,{mah:i??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...v,children:_}):_,S&&f&&g.jsx(Qe.Empty,{children:f})]})})}const Ore={},P2=ee((t,e)=>{const n=K("Autocomplete",Ore,t),{classNames:r,styles:o,unstyled:s,vars:i,dropdownOpened:a,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:h,onChange:p,data:m,value:v,defaultValue:y,selectFirstOptionOnChange:b,onOptionSubmit:w,comboboxProps:S,readOnly:_,disabled:k,filter:M,limit:T,withScrollArea:P,maxDropdownHeight:A,size:L,id:V,renderOption:H,autoComplete:z,scrollAreaProps:N,...D}=n,F=mr(V),I=m2(m),$=gy(I),[j,W]=yn({value:v,defaultValue:y,finalValue:"",onChange:p}),G=vy({opened:a,defaultOpened:l,onDropdownOpen:u,onDropdownClose:()=>{c==null||c(),G.resetSelectedOption()}}),{resolvedClassNames:X,resolvedStyles:q}=Nr({props:n,styles:o,classNames:r});return C.useEffect(()=>{b&&G.selectFirstOption()},[b,j]),g.jsxs(Qe,{store:G,__staticSelector:"Autocomplete",classNames:X,styles:q,unstyled:s,readOnly:_,onOptionSubmit:B=>{w==null||w(B),W($[B].label),G.closeDropdown()},size:L,...S,children:[g.jsx(Qe.Target,{autoComplete:z,children:g.jsx(gr,{ref:e,...D,size:L,__staticSelector:"Autocomplete",disabled:k,readOnly:_,value:j,onChange:B=>{W(B.currentTarget.value),G.openDropdown(),b&&G.selectFirstOption()},onFocus:B=>{G.openDropdown(),d==null||d(B)},onBlur:B=>{G.closeDropdown(),f==null||f(B)},onClick:B=>{G.openDropdown(),h==null||h(B)},classNames:X,styles:q,unstyled:s,id:F})}),g.jsx(O2,{data:I,hidden:_||k,filter:M,search:j,limit:T,hiddenWhenEmpty:!0,withScrollArea:P,maxDropdownHeight:A,unstyled:s,labelId:D.label?`${F}-label`:void 0,"aria-label":D.label?void 0:D["aria-label"],renderOption:H,scrollAreaProps:N})]})});P2.classes={...gr.classes,...Qe.classes};P2.displayName="@mantine/core/Autocomplete";const _F=C.createContext(null),Pre=_F.Provider;function Are(){return{withinGroup:!!C.useContext(_F)}}var wy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const Dre={},Ire=(t,{spacing:e})=>({group:{"--ag-spacing":Dt(e)}}),A2=ee((t,e)=>{const n=K("AvatarGroup",Dre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,spacing:c,...u}=n,d=be({name:"AvatarGroup",classes:wy,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Ire,rootSelector:"group"});return g.jsx(Pre,{value:!0,children:g.jsx(J,{ref:e,...d("group"),...u})})});A2.classes=wy;A2.displayName="@mantine/core/AvatarGroup";function Nre(t){return g.jsx("svg",{...t,"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 CF(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(r=>r[0]).slice(0,e).join("").toUpperCase()}function Lre(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}const jre=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function $re(t,e=jre){const n=Lre(CF(t)),r=Math.abs(n)%e.length;return e[r]}const Fre={},zre=(t,{size:e,radius:n,variant:r,gradient:o,color:s,autoContrast:i,name:a,allowedInitialsColors:l})=>{const c=s==="initials"&&typeof a=="string"?$re(a,l):s,u=t.variantColorResolver({color:c||"gray",theme:t,gradient:o,variant:r||"light",autoContrast:i});return{root:{"--avatar-size":$e(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:dt(n),"--avatar-bg":c||r?u.background:void 0,"--avatar-color":c||r?u.color:void 0,"--avatar-bd":c||r?u.border:void 0}}},D2=on((t,e)=>{const n=K("Avatar",Fre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,src:c,alt:u,radius:d,color:f,gradient:h,imageProps:p,children:m,autoContrast:v,mod:y,name:b,allowedInitialsColors:w,...S}=n,_=Are(),[k,M]=C.useState(!c),T=be({name:"Avatar",props:n,classes:wy,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:zre});return C.useEffect(()=>M(!c),[c]),g.jsx(J,{...T("root"),mod:[{"within-group":_.withinGroup},y],ref:e,...S,children:k?g.jsx("span",{...T("placeholder"),title:u,children:m||typeof b=="string"&&CF(b)||g.jsx(Nre,{})}):g.jsx("img",{...p,...T("image"),src:c,alt:u,onError:P=>{var A;M(!0),(A=p==null?void 0:p.onError)==null||A.call(p,P)}})})});D2.classes=wy;D2.displayName="@mantine/core/Avatar";D2.Group=A2;var kF={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const Bre={},Vre=(t,{radius:e,color:n,gradient:r,variant:o,size:s,autoContrast:i})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:o||"filled",autoContrast:i});return{root:{"--badge-height":$e(s,"badge-height"),"--badge-padding-x":$e(s,"badge-padding-x"),"--badge-fz":$e(s,"badge-fz"),"--badge-radius":e===void 0?void 0:dt(e),"--badge-bg":n||o?a.background:void 0,"--badge-color":n||o?a.color:void 0,"--badge-bd":n||o?a.border:void 0,"--badge-dot-color":o==="dot"?yt(n,t):void 0}}},xy=on((t,e)=>{const n=K("Badge",Bre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,radius:c,color:u,gradient:d,leftSection:f,rightSection:h,children:p,variant:m,fullWidth:v,autoContrast:y,circle:b,mod:w,...S}=n,_=be({name:"Badge",props:n,classes:kF,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Vre});return g.jsxs(J,{variant:m,mod:[{block:v,circle:b},w],..._("root",{variant:m}),ref:e,...S,children:[f&&g.jsx("span",{..._("section"),"data-position":"left",children:f}),g.jsx("span",{..._("label"),children:p}),h&&g.jsx("span",{..._("section"),"data-position":"right",children:h})]})});xy.classes=kF;xy.displayName="@mantine/core/Badge";var EF={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const Hre={},Wre=(t,{color:e,size:n,lineSize:r,transitionDuration:o,transitionTimingFunction:s})=>({root:{"--burger-color":e?yt(e,t):void 0,"--burger-size":$e(n,"burger-size"),"--burger-line-size":r?Y(r):void 0,"--burger-transition-duration":o===void 0?void 0:`${o}ms`,"--burger-transition-timing-function":s}}),MF=ee((t,e)=>{const n=K("Burger",Hre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,opened:c,children:u,transitionDuration:d,transitionTimingFunction:f,lineSize:h,...p}=n,m=be({name:"Burger",classes:EF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Wre});return g.jsxs(un,{...m("root"),ref:e,...p,children:[g.jsx(J,{mod:["reduce-motion",{opened:c}],...m("burger")}),u]})});MF.classes=EF;MF.displayName="@mantine/core/Burger";var Sy={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844"};const DP={orientation:"horizontal"},Ure=(t,{borderWidth:e})=>({group:{"--button-border-width":Y(e)}}),I2=ee((t,e)=>{const n=K("ButtonGroup",DP,t),{className:r,style:o,classNames:s,styles:i,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:d,mod:f,...h}=K("ButtonGroup",DP,t),p=be({name:"ButtonGroup",props:n,classes:Sy,className:r,style:o,classNames:s,styles:i,unstyled:a,vars:c,varsResolver:Ure,rootSelector:"group"});return g.jsx(J,{...p("group"),ref:e,variant:d,mod:[{"data-orientation":l},f],role:"group",...h})});I2.classes=Sy;I2.displayName="@mantine/core/ButtonGroup";const Gre={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Y(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Kre={},Yre=(t,{radius:e,color:n,gradient:r,variant:o,size:s,justify:i,autoContrast:a})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:o||"filled",autoContrast:a});return{root:{"--button-justify":i,"--button-height":$e(s,"button-height"),"--button-padding-x":$e(s,"button-padding-x"),"--button-fz":s!=null&&s.includes("compact")?vn(s.replace("compact-","")):vn(s),"--button-radius":e===void 0?void 0:dt(e),"--button-bg":n||o?l.background:void 0,"--button-hover":n||o?l.hover:void 0,"--button-color":l.color,"--button-bd":n||o?l.border:void 0,"--button-hover-color":n||o?l.hoverColor:void 0}}},Uo=on((t,e)=>{const n=K("Button",Kre,t),{style:r,vars:o,className:s,color:i,disabled:a,children:l,leftSection:c,rightSection:u,fullWidth:d,variant:f,radius:h,loading:p,loaderProps:m,gradient:v,classNames:y,styles:b,unstyled:w,"data-disabled":S,autoContrast:_,mod:k,...M}=n,T=be({name:"Button",props:n,classes:Sy,className:s,style:r,classNames:y,styles:b,unstyled:w,vars:o,varsResolver:Yre}),P=!!c,A=!!u;return g.jsxs(un,{ref:e,...T("root",{active:!a&&!p&&!S}),unstyled:w,variant:f,disabled:a||p,mod:[{disabled:a||S,loading:p,block:d,"with-left-section":P,"with-right-section":A},k],...M,children:[g.jsx(To,{mounted:!!p,transition:Gre,duration:150,children:L=>g.jsx(J,{component:"span",...T("loader",{style:L}),"aria-hidden":!0,children:g.jsx(ka,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...m})})}),g.jsxs("span",{...T("inner"),children:[c&&g.jsx(J,{component:"span",...T("section"),mod:{position:"left"},children:c}),g.jsx(J,{component:"span",mod:{loading:p},...T("label"),children:l}),u&&g.jsx(J,{component:"span",...T("section"),mod:{position:"right"},children:u})]})]})});Uo.classes=Sy;Uo.displayName="@mantine/core/Button";Uo.Group=I2;const[qre,Xre]=bn("Card component was not found in tree");var N2={root:"m_e615b15f",section:"m_599a2148"};const Jre={},_y=on((t,e)=>{const n=K("CardSection",Jre,t),{classNames:r,className:o,style:s,styles:i,vars:a,withBorder:l,inheritPadding:c,mod:u,...d}=n,f=Xre();return g.jsx(J,{ref:e,mod:[{"with-border":l,"inherit-padding":c},u],...f.getStyles("section",{className:o,style:s,styles:i,classNames:r}),...d})});_y.classes=N2;_y.displayName="@mantine/core/CardSection";const Qre={},Zre=(t,{padding:e})=>({root:{"--card-padding":Dt(e)}}),L2=on((t,e)=>{const n=K("Card",Qre,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,children:c,padding:u,...d}=n,f=be({name:"Card",props:n,classes:N2,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Zre}),h=C.Children.toArray(c),p=h.map((m,v)=>typeof m=="object"&&m&&"type"in m&&m.type===_y?C.cloneElement(m,{"data-first-section":v===0||void 0,"data-last-section":v===h.length-1||void 0}):m);return g.jsx(qre,{value:{getStyles:f},children:g.jsx(np,{ref:e,unstyled:a,...f("root"),...d,children:p})})});L2.classes=N2;L2.displayName="@mantine/core/Card";L2.Section=_y;var TF={root:"m_4451eb3a"};const eoe={},RF=on((t,e)=>{const n=K("Center",eoe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,inline:c,mod:u,...d}=n,f=be({name:"Center",props:n,classes:TF,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l});return g.jsx(J,{ref:e,mod:[{inline:c},u],...f("root"),...d})});RF.classes=TF;RF.displayName="@mantine/core/Center";var OF={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const IP={withShadow:!0},toe=(t,{radius:e,size:n})=>({root:{"--cs-radius":e===void 0?void 0:dt(e),"--cs-size":Y(n)}}),Jl=on((t,e)=>{const n=K("ColorSwatch",IP,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,color:c,size:u,radius:d,withShadow:f,children:h,variant:p,...m}=K("ColorSwatch",IP,n),v=be({name:"ColorSwatch",props:n,classes:OF,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:toe});return g.jsxs(J,{ref:e,variant:p,size:u,...v("root",{focusable:!0}),...m,children:[g.jsx("span",{...v("alphaOverlay")}),f&&g.jsx("span",{...v("shadowOverlay")}),g.jsx("span",{...v("colorOverlay",{style:{backgroundColor:c}})}),g.jsx("span",{...v("childrenOverlay"),children:h})]})});Jl.classes=OF;Jl.displayName="@mantine/core/ColorSwatch";const[noe,j2]=uc(null),$2=C.forwardRef(({position:t,...e},n)=>g.jsx(J,{ref:n,__vars:{"--thumb-y-offset":`${t.y*100}%`,"--thumb-x-offset":`${t.x*100}%`},...e}));$2.displayName="@mantine/core/ColorPickerThumb";var F2={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 roe={},z2=ee((t,e)=>{var I;const n=K("ColorSlider",roe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,onChange:c,onChangeEnd:u,maxValue:d,round:f,size:h="md",focusable:p=!0,value:m,overlays:v,thumbColor:y="transparent",onScrubStart:b,onScrubEnd:w,__staticSelector:S="ColorPicker",..._}=n,k=be({name:S,classes:F2,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a}),T=((I=j2())==null?void 0:I.getStyles)||k,P=Xt(),[A,L]=C.useState({y:0,x:m/d}),V=C.useRef(A),H=$=>f?Math.round($*d):$*d,{ref:z}=Mk(({x:$,y:j})=>{V.current={x:$,y:j},c==null||c(H($))},{onScrubEnd:()=>{const{x:$}=V.current;u==null||u(H($)),w==null||w()},onScrubStart:b});cr(()=>{L({y:0,x:m/d})},[m]);const N=($,j)=>{$.preventDefault();const W=Z5(j);c==null||c(H(W.x)),u==null||u(H(W.x))},D=$=>{switch($.key){case"ArrowRight":{N($,{x:A.x+.05,y:A.y});break}case"ArrowLeft":{N($,{x:A.x-.05,y:A.y});break}}},F=v.map(($,j)=>C.createElement("div",{...T("sliderOverlay"),style:$,key:j}));return g.jsxs(J,{..._,ref:wn(z,e),...T("slider"),role:"slider","aria-valuenow":m,"aria-valuemax":d,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:D,"data-focus-ring":P.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${h})`},children:[F,g.jsx($2,{position:A,...T("thumb",{style:{top:Y(1),background:y}})})]})});z2.displayName="@mantine/core/ColorSlider";function po(t,e=0,n=10**e){return Math.round(n*t)/n}function ooe({h:t,s:e,l:n,a:r}){const o=e*((n<50?n:100-n)/100);return{h:t,s:o>0?2*o/(n+o)*100:0,v:n+o,a:r}}const soe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function ioe(t,e="deg"){return Number(t)*(soe[e]||1)}const aoe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function NP(t){const e=aoe.exec(t);return e?ooe({h:ioe(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function FS({r:t,g:e,b:n,a:r}){const o=Math.max(t,e,n),s=o-Math.min(t,e,n),i=s?o===t?(e-n)/s:o===e?2+(n-t)/s:4+(t-e)/s:0;return{h:po(60*(i<0?i+6:i),3),s:po(o?s/o*100:0,3),v:po(o/255*100,3),a:r}}function zS(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?FS({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):FS({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function loe(t){const e=t[0]==="#"?t.slice(1):t,n=i=>po(parseInt(i,16)/255,3);if(e.length===4){const i=e.slice(0,3),a=n(e[3]+e[3]);return{...zS(i),a}}const r=e.slice(0,6),o=n(e.slice(6,8));return{...zS(r),a:o}}const coe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function LP(t){const e=coe.exec(t);return e?FS({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const PF={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},uoe={hex:zS,hexa:loe,rgb:LP,rgba:LP,hsl:NP,hsla:NP};function doe(t){for(const[,e]of Object.entries(PF))if(e.test(t))return!0;return!1}function dm(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(PF))if(r.test(e))return uoe[n](e);return{h:0,s:0,v:0,a:1}}const foe={},AF=C.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:o,color:s,...i}=K("AlphaSlider",foe,t);return g.jsx(z2,{...i,ref:e,value:n,onChange:a=>r==null?void 0:r(po(a,2)),onChangeEnd:a=>o==null?void 0:o(po(a,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:`${Y(8)} ${Y(8)}`,backgroundPosition:`0 0, 0 ${Y(4)}, ${Y(4)} ${Y(-4)}, ${Y(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Y(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Y(4)} inset`}]})});AF.displayName="@mantine/core/AlphaSlider";function DF({h:t,s:e,v:n,a:r}){const o=t/360*6,s=e/100,i=n/100,a=Math.floor(o),l=i*(1-s),c=i*(1-(o-a)*s),u=i*(1-(1-o+a)*s),d=a%6;return{r:po([i,c,l,l,u,i][d]*255),g:po([u,i,i,c,l,l][d]*255),b:po([l,l,u,i,i,c][d]*255),a:po(r,2)}}function jP(t,e){const{r:n,g:r,b:o,a:s}=DF(t);return e?`rgba(${n}, ${r}, ${o}, ${po(s,2)})`:`rgb(${n}, ${r}, ${o})`}function $P({h:t,s:e,v:n,a:r},o){const s=(200-e)*n/100,i={h:Math.round(t),s:Math.round(s>0&&s<200?e*n/100/(s<=100?s:200-s)*100:0),l:Math.round(s/2)};return o?`hsla(${i.h}, ${i.s}%, ${i.l}%, ${po(r,2)})`:`hsl(${i.h}, ${i.s}%, ${i.l}%)`}function Sg(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function IF(t){const{r:e,g:n,b:r}=DF(t);return`#${Sg(e)}${Sg(n)}${Sg(r)}`}function hoe(t){const e=Math.round(t.a*255);return`${IF(t)}${Sg(e)}`}const tw={hex:IF,hexa:t=>hoe(t),rgb:t=>jP(t,!1),rgba:t=>jP(t,!0),hsl:t=>$P(t,!1),hsla:t=>$P(t,!0)};function $i(t,e){return e?t in tw?tw[t](e):tw.hex(e):"#000000"}const NF=C.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:o,color:s,...i}=K("HueSlider",{},t);return g.jsx(z2,{...i,ref:e,value:n,onChange:r,onChangeEnd:o,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 ${Y(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Y(4)} inset`}]})});NF.displayName="@mantine/core/HueSlider";function LF({className:t,onChange:e,onChangeEnd:n,value:r,saturationLabel:o,focusable:s=!0,size:i,color:a,onScrubStart:l,onScrubEnd:c,...u}){const{getStyles:d}=j2(),[f,h]=C.useState({x:r.s/100,y:1-r.v/100}),p=C.useRef(f),{ref:m}=Mk(({x:b,y:w})=>{p.current={x:b,y:w},e({s:Math.round(b*100),v:Math.round((1-w)*100)})},{onScrubEnd:()=>{const{x:b,y:w}=p.current;n({s:Math.round(b*100),v:Math.round((1-w)*100)}),c==null||c()},onScrubStart:l});C.useEffect(()=>{h({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const v=(b,w)=>{b.preventDefault();const S=Z5(w);e({s:Math.round(S.x*100),v:Math.round((1-S.y)*100)}),n({s:Math.round(S.x*100),v:Math.round((1-S.y)*100)})},y=b=>{switch(b.key){case"ArrowUp":{v(b,{y:f.y-.05,x:f.x});break}case"ArrowDown":{v(b,{y:f.y+.05,x:f.x});break}case"ArrowRight":{v(b,{x:f.x+.05,y:f.y});break}case"ArrowLeft":{v(b,{x:f.x-.05,y:f.y});break}}};return g.jsxs(J,{...d("saturation"),ref:m,...u,role:"slider","aria-label":o,"aria-valuenow":f.x,"aria-valuetext":$i("rgba",r),tabIndex:s?0:-1,onKeyDown:y,children:[g.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${r.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($2,{position:f,...d("thumb",{style:{backgroundColor:a}})})]})}LF.displayName="@mantine/core/Saturation";const jF=C.forwardRef(({className:t,datatype:e,setValue:n,onChangeEnd:r,size:o,focusable:s,data:i,swatchesPerRow:a,...l},c)=>{const u=j2(),d=i.map((f,h)=>C.createElement(Jl,{...u.getStyles("swatch"),unstyled:u.unstyled,component:"button",type:"button",color:f,key:h,radius:"sm",onClick:()=>{n(f),r==null||r(f)},"aria-label":f,tabIndex:s?0:-1,"data-swatch":!0}));return g.jsx(J,{...u.getStyles("swatches"),ref:c,...l,children:d})});jF.displayName="@mantine/core/Swatches";const poe={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},moe=(t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":$e(e,"cp-preview-size"),"--cp-width":$e(e,"cp-width"),"--cp-body-spacing":Dt(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":$e(e,"cp-thumb-size"),"--cp-saturation-height":$e(e,"cp-saturation-height")}}),B2=ee((t,e)=>{const n=K("ColorPicker",poe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,format:c,value:u,defaultValue:d,onChange:f,onChangeEnd:h,withPicker:p,size:m,saturationLabel:v,hueLabel:y,alphaLabel:b,focusable:w,swatches:S,swatchesPerRow:_,fullWidth:k,onColorSwatchClick:M,__staticSelector:T,mod:P,...A}=n,L=be({name:T,props:n,classes:F2,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"wrapper",vars:l,varsResolver:moe}),V=C.useRef(c),H=C.useRef(),z=C.useRef(-1),N=C.useRef(!1),D=c==="hexa"||c==="rgba"||c==="hsla",[F,I,$]=yn({value:u,defaultValue:d,finalValue:"#FFFFFF",onChange:f}),[j,W]=C.useState(dm(F)),G=()=>{window.clearTimeout(z.current),N.current=!0},X=()=>{window.clearTimeout(z.current),z.current=window.setTimeout(()=>{N.current=!1},200)},q=B=>{W(Q=>{const Z={...Q,...B};return H.current=$i(V.current,Z),Z}),I(H.current)};return cr(()=>{doe(u)&&!N.current&&W(dm(u))},[u]),cr(()=>{V.current=c,I($i(c,j))},[c]),g.jsx(noe,{value:{getStyles:L,unstyled:a},children:g.jsxs(J,{ref:e,...L("wrapper"),size:m,mod:[{"full-width":k},P],...A,children:[p&&g.jsxs(g.Fragment,{children:[g.jsx(LF,{value:j,onChange:q,onChangeEnd:({s:B,v:Q})=>h==null?void 0:h($i(V.current,{...j,s:B,v:Q})),color:F,size:m,focusable:w,saturationLabel:v,onScrubStart:G,onScrubEnd:X}),g.jsxs("div",{...L("body"),children:[g.jsxs("div",{...L("sliders"),children:[g.jsx(NF,{value:j.h,onChange:B=>q({h:B}),onChangeEnd:B=>h==null?void 0:h($i(V.current,{...j,h:B})),size:m,focusable:w,"aria-label":y,onScrubStart:G,onScrubEnd:X}),D&&g.jsx(AF,{value:j.a,onChange:B=>q({a:B}),onChangeEnd:B=>{h==null||h($i(V.current,{...j,a:B}))},size:m,color:$i("hex",j),focusable:w,"aria-label":b,onScrubStart:G,onScrubEnd:X})]}),D&&g.jsx(Jl,{color:F,radius:"sm",size:"var(--cp-preview-size)",...L("preview")})]})]}),Array.isArray(S)&&g.jsx(jF,{data:S,swatchesPerRow:_,focusable:w,setValue:I,onChangeEnd:B=>{const Q=$i(c,dm(B));M==null||M(Q),h==null||h(Q),$||W(dm(B))}})]})})});B2.classes=F2;B2.displayName="@mantine/core/ColorPicker";var $F={root:"m_7485cace"};const goe={},voe=(t,{size:e,fluid:n})=>({root:{"--container-size":n?void 0:$e(e,"container-size")}}),FF=ee((t,e)=>{const n=K("Container",goe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,fluid:c,mod:u,...d}=n,f=be({name:"Container",classes:$F,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:voe});return g.jsx(J,{ref:e,mod:[{fluid:c},u],...f("root"),...d})});FF.classes=$F;FF.displayName="@mantine/core/Container";const yoe={timeout:1e3};function zF(t){const{children:e,timeout:n,value:r,...o}=K("CopyButton",yoe,t),s=TQ({timeout:n}),i=()=>s.copy(r);return g.jsx(g.Fragment,{children:e({copy:i,copied:s.copied,...o})})}zF.displayName="@mantine/core/CopyButton";var BF={root:"m_3eebeb36",label:"m_9e365f20"};const boe={orientation:"horizontal"},woe=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?yt(e,t):void 0,"--divider-border-style":n,"--divider-size":$e(r,"divider-size")}}),V2=ee((t,e)=>{const n=K("Divider",boe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,color:c,orientation:u,label:d,labelPosition:f,mod:h,...p}=n,m=be({name:"Divider",classes:BF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:woe});return g.jsx(J,{ref:e,mod:[{orientation:u,"with-label":!!d},h],...m("root"),...p,role:"separator",children:d&&g.jsx(J,{component:"span",mod:{position:f},...m("label"),children:d})})});V2.classes=BF;V2.displayName="@mantine/core/Divider";const[xoe,md]=bn("Drawer component was not found in tree");var Ci={root:"m_f11b401e",header:"m_5a7c2c9",content:"m_b8a05bbd",inner:"m_31cd769a"};const Soe={},Cy=ee((t,e)=>{const n=K("DrawerBody",Soe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=md();return g.jsx(e2,{ref:e,...c.getStyles("body",{classNames:r,style:s,styles:i,className:o}),...l})});Cy.classes=Ci;Cy.displayName="@mantine/core/DrawerBody";const _oe={},ky=ee((t,e)=>{const n=K("DrawerCloseButton",_oe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=md();return g.jsx(t2,{ref:e,...c.getStyles("close",{classNames:r,style:s,styles:i,className:o}),...l})});ky.classes=Ci;ky.displayName="@mantine/core/DrawerCloseButton";const Coe={},Ey=ee((t,e)=>{const n=K("DrawerContent",Coe,t),{classNames:r,className:o,style:s,styles:i,vars:a,children:l,radius:c,...u}=n,d=md(),f=d.scrollAreaComponent||eF;return g.jsx(Z3,{...d.getStyles("content",{className:o,style:s,styles:i,classNames:r}),innerProps:d.getStyles("inner",{className:o,style:s,styles:i,classNames:r}),ref:e,...u,radius:c||d.radius||0,children:g.jsx(f,{style:{height:"calc(100vh - var(--drawer-offset) * 2)"},children:l})})});Ey.classes=Ci;Ey.displayName="@mantine/core/DrawerContent";const koe={},My=ee((t,e)=>{const n=K("DrawerHeader",koe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=md();return g.jsx(n2,{ref:e,...c.getStyles("header",{classNames:r,style:s,styles:i,className:o}),...l})});My.classes=Ci;My.displayName="@mantine/core/DrawerHeader";const Eoe={},Ty=ee((t,e)=>{const n=K("DrawerOverlay",Eoe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=md();return g.jsx(r2,{ref:e,...c.getStyles("overlay",{classNames:r,style:s,styles:i,className:o}),...l})});Ty.classes=Ci;Ty.displayName="@mantine/core/DrawerOverlay";function Moe(t){switch(t){case"top":return"flex-start";case"bottom":return"flex-end";default:return}}function Toe(t){if(t==="top"||t==="bottom")return"0 0 calc(100% - var(--drawer-offset, 0rem) * 2)"}const Roe={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},Ooe={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Poe={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:rs("modal"),position:"left"},Aoe=(t,{position:e,size:n,offset:r})=>({root:{"--drawer-size":$e(n,"drawer-size"),"--drawer-flex":Toe(e),"--drawer-height":e==="left"||e==="right"?void 0:"var(--drawer-size)","--drawer-align":Moe(e),"--drawer-justify":e==="right"?"flex-end":void 0,"--drawer-offset":Y(r)}}),Ry=ee((t,e)=>{const n=K("DrawerRoot",Poe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,scrollAreaComponent:c,position:u,transitionProps:d,radius:f,...h}=n,{dir:p}=Lr(),m=be({name:"Drawer",classes:Ci,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Aoe}),v=(p==="rtl"?Ooe:Roe)[u];return g.jsx(xoe,{value:{scrollAreaComponent:c,getStyles:m,radius:f},children:g.jsx(Q3,{ref:e,...m("root"),transitionProps:{transition:v,...d},unstyled:a,...h})})});Ry.classes=Ci;Ry.displayName="@mantine/core/DrawerRoot";const Doe={},Oy=ee((t,e)=>{const n=K("DrawerTitle",Doe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=md();return g.jsx(o2,{ref:e,...c.getStyles("title",{classNames:r,style:s,styles:i,className:o}),...l})});Oy.classes=Ci;Oy.displayName="@mantine/core/DrawerTitle";const Ioe={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:rs("modal"),withOverlay:!0,withCloseButton:!0},ki=ee((t,e)=>{const{title:n,withOverlay:r,overlayProps:o,withCloseButton:s,closeButtonProps:i,children:a,...l}=K("Drawer",Ioe,t),c=!!n||s;return g.jsxs(Ry,{ref:e,...l,children:[r&&g.jsx(Ty,{...o}),g.jsxs(Ey,{children:[c&&g.jsxs(My,{children:[n&&g.jsx(Oy,{children:n}),s&&g.jsx(ky,{...i})]}),g.jsx(Cy,{children:a})]})]})});ki.classes=Ci;ki.displayName="@mantine/core/Drawer";ki.Root=Ry;ki.Overlay=Ty;ki.Content=Ey;ki.Body=Cy;ki.Header=My;ki.Title=Oy;ki.CloseButton=ky;var VF={root:"m_e9408a47","root--default":"m_84c9523a","root--filled":"m_ef274e49","root--unstyled":"m_eda993d3",legend:"m_90794832","legend--unstyled":"m_74ca27fe"};const Noe={variant:"default"},Loe=(t,{radius:e})=>({root:{"--fieldset-radius":e===void 0?void 0:dt(e)}}),HF=ee((t,e)=>{const n=K("Fieldset",Noe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,legend:c,variant:u,children:d,...f}=n,h=be({name:"Fieldset",classes:VF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Loe});return g.jsxs(J,{component:"fieldset",ref:e,variant:u,...h("root",{variant:u}),...f,children:[c&&g.jsx("legend",{...h("legend",{variant:u}),children:c}),d]})});HF.classes=VF;HF.displayName="@mantine/core/Fieldset";function joe({open:t,close:e,openDelay:n,closeDelay:r}){const o=C.useRef(-1),s=C.useRef(-1),i=()=>{window.clearTimeout(o.current),window.clearTimeout(s.current)},a=()=>{i(),n===0||n===void 0?t():o.current=window.setTimeout(t,n)},l=()=>{i(),r===0||r===void 0?e():s.current=window.setTimeout(e,r)};return C.useEffect(()=>i,[]),{openDropdown:a,closeDropdown:l}}const[$oe,WF]=bn("Grid component was not found in tree"),BS=(t,e)=>t==="content"?"auto":t==="auto"?"0rem":t?`${100/(e/t)}%`:void 0,FP=(t,e,n)=>n||t==="auto"?"100%":t==="content"?"unset":BS(t,e),zP=(t,e)=>{if(t)return t==="auto"||e?"1":"auto"},BP=(t,e)=>t===0?"0":t?`${100/(e/t)}%`:void 0;function Foe({span:t,order:e,offset:n,selector:r}){var f;const o=Xt(),s=WF(),a=Ho(t)===void 0?12:Ho(t),l=$a({"--col-order":(f=Ho(e))==null?void 0:f.toString(),"--col-flex-grow":zP(a,s.grow),"--col-flex-basis":BS(a,s.columns),"--col-width":a==="content"?"auto":void 0,"--col-max-width":FP(a,s.columns,s.grow),"--col-offset":BP(Ho(n),s.columns)}),c=St(o.breakpoints).reduce((h,p)=>{var m;return h[p]||(h[p]={}),typeof e=="object"&&e[p]!==void 0&&(h[p]["--col-order"]=(m=e[p])==null?void 0:m.toString()),typeof t=="object"&&t[p]!==void 0&&(h[p]["--col-flex-grow"]=zP(t[p],s.grow),h[p]["--col-flex-basis"]=BS(t[p],s.columns),h[p]["--col-width"]=t[p]==="content"?"auto":void 0,h[p]["--col-max-width"]=FP(t[p],s.columns,s.grow)),typeof n=="object"&&n[p]!==void 0&&(h[p]["--col-offset"]=BP(n[p],s.columns)),h},{}),d=fh(St(c),o).filter(h=>St(c[h.value]).length>0).map(h=>({query:`(min-width: ${o.breakpoints[h.value]})`,styles:c[h.value]}));return g.jsx(fc,{styles:l,media:d,selector:r})}var H2={root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const zoe={span:12},W2=ee((t,e)=>{const n=K("GridCol",zoe,t),{classNames:r,className:o,style:s,styles:i,vars:a,span:l,order:c,offset:u,...d}=n,f=WF(),h=tp();return g.jsxs(g.Fragment,{children:[g.jsx(Foe,{selector:`.${h}`,span:l,order:c,offset:u}),g.jsx(J,{ref:e,...f.getStyles("col",{className:rn(o,h),style:s,classNames:r,styles:i}),...d})]})});W2.classes=H2;W2.displayName="@mantine/core/GridCol";function Boe({gutter:t,selector:e}){const n=Xt(),r=$a({"--grid-gutter":Dt(Ho(t))}),o=St(n.breakpoints).reduce((a,l)=>(a[l]||(a[l]={}),typeof t=="object"&&t[l]!==void 0&&(a[l]["--grid-gutter"]=Dt(t[l])),a),{}),i=fh(St(o),n).filter(a=>St(o[a.value]).length>0).map(a=>({query:`(min-width: ${n.breakpoints[a.value]})`,styles:o[a.value]}));return g.jsx(fc,{styles:r,media:i,selector:e})}const Voe={gutter:"md",grow:!1,columns:12},Hoe=(t,{justify:e,align:n,overflow:r})=>({root:{"--grid-justify":e,"--grid-align":n,"--grid-overflow":r}}),U2=ee((t,e)=>{const n=K("Grid",Voe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,grow:c,gutter:u,columns:d,align:f,justify:h,children:p,...m}=n,v=be({name:"Grid",classes:H2,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Hoe}),y=tp();return g.jsxs($oe,{value:{getStyles:v,grow:c,columns:d},children:[g.jsx(Boe,{selector:`.${y}`,...n}),g.jsx(J,{ref:e,...v("root",{className:y}),...m,children:g.jsx("div",{...v("inner"),children:p})})]})});U2.classes=H2;U2.displayName="@mantine/core/Grid";U2.Col=W2;function VP({color:t,theme:e,defaultShade:n}){const r=ss({color:t,theme:e});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:t}var UF={root:"m_bcb3f3c2"};const Woe={color:"yellow"},Uoe=(t,{color:e})=>({root:{"--mark-bg-dark":VP({color:e,theme:t,defaultShade:5}),"--mark-bg-light":VP({color:e,theme:t,defaultShade:2})}}),G2=ee((t,e)=>{const n=K("Mark",Woe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,color:c,variant:u,...d}=n,f=be({name:"Mark",props:n,className:o,style:s,classes:UF,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Uoe});return g.jsx(J,{component:"mark",ref:e,variant:u,...f("root"),...d})});G2.classes=UF;G2.displayName="@mantine/core/Mark";function HP(t){return t.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function Goe(t,e){if(e==null)return[{chunk:t,highlighted:!1}];const n=Array.isArray(e)?e.map(HP):HP(e);if(!(Array.isArray(n)?n.filter(a=>a.trim().length>0).length>0:n.trim()!==""))return[{chunk:t,highlighted:!1}];const o=typeof n=="string"?n.trim():n.filter(a=>a.trim().length!==0).map(a=>a.trim()).sort((a,l)=>l.length-a.length).join("|"),s=new RegExp(`(${o})`,"gi");return t.split(s).map(a=>({chunk:a,highlighted:s.test(a)})).filter(({chunk:a})=>a)}const Koe={},K2=on((t,e)=>{const{unstyled:n,children:r,highlight:o,highlightStyles:s,color:i,...a}=K("Highlight",Koe,t),l=Goe(r,o);return g.jsx(es,{unstyled:n,ref:e,...a,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:u},d)=>u?g.jsx(G2,{unstyled:n,color:i,style:s,"data-highlight":c,children:c},d):g.jsx("span",{children:c},d))})});K2.classes=es.classes;K2.displayName="@mantine/core/Highlight";var GF={root:"m_9e117634"};const Yoe={},qoe=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:dt(e),"--image-object-fit":n}}),KF=on((t,e)=>{const n=K("Image",Yoe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,onError:c,src:u,radius:d,fit:f,fallbackSrc:h,mod:p,...m}=n,[v,y]=C.useState(!u);C.useEffect(()=>y(!u),[u]);const b=be({name:"Image",classes:GF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:qoe});return v&&h?g.jsx(J,{component:"img",ref:e,src:h,...b("root"),onError:c,mod:["fallback",p],...m}):g.jsx(J,{component:"img",ref:e,...b("root"),src:u,onError:w=>{c==null||c(w),y(!0)},mod:p,...m})});KF.classes=GF;KF.displayName="@mantine/core/Image";function Xoe(t="top-end",e=0){const n={"--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},r=Y(e),[o,s]=t.split("-");return o==="top"&&(n["--indicator-top"]=r,n["--indicator-translate-y"]="-50%"),o==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),o==="bottom"&&(n["--indicator-bottom"]=r,n["--indicator-translate-y"]="50%"),s==="start"&&(n["--indicator-left"]=r,n["--indicator-translate-x"]="-50%"),s==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),s==="end"&&(n["--indicator-right"]=r,n["--indicator-translate-x"]="50%"),n}var YF={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const Joe={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1},Qoe=(t,{color:e,position:n,offset:r,size:o,radius:s,zIndex:i,autoContrast:a})=>({root:{"--indicator-color":e?yt(e,t):void 0,"--indicator-text-color":xi(a,t)?Fs({color:e,theme:t,autoContrast:a}):void 0,"--indicator-size":Y(o),"--indicator-radius":s===void 0?void 0:dt(s),"--indicator-z-index":i==null?void 0:i.toString(),...Xoe(n,r)}}),Y2=ee((t,e)=>{const n=K("Indicator",Joe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,children:c,position:u,offset:d,inline:f,label:h,radius:p,color:m,withBorder:v,disabled:y,processing:b,zIndex:w,autoContrast:S,mod:_,...k}=n,M=be({name:"Indicator",classes:YF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Qoe});return g.jsxs(J,{ref:e,...M("root"),mod:[{inline:f},_],...k,children:[!y&&g.jsx(g.Fragment,{children:g.jsx(J,{mod:{"with-label":!!h,"with-border":v,processing:b},...M("indicator"),children:h})}),c]})});Y2.classes=YF;Y2.displayName="@mantine/core/Indicator";function VS(){return VS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},VS.apply(this,arguments)}function Zoe(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}var ese=C.useLayoutEffect,tse=function(e){var n=C.useRef(e);return ese(function(){n.current=e}),n},WP=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},nse=function(e,n){var r=C.useRef();return C.useCallback(function(o){e.current=o,r.current&&WP(r.current,null),r.current=n,n&&WP(n,o)},[n])},UP={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},rse=function(e){Object.keys(UP).forEach(function(n){e.style.setProperty(n,UP[n],"important")})},GP=rse,nr=null,KP=function(e,n){var r=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function ose(t,e,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),nr||(nr=document.createElement("textarea"),nr.setAttribute("tabindex","-1"),nr.setAttribute("aria-hidden","true"),GP(nr)),nr.parentNode===null&&document.body.appendChild(nr);var o=t.paddingSize,s=t.borderSize,i=t.sizingStyle,a=i.boxSizing;Object.keys(i).forEach(function(f){var h=f;nr.style[h]=i[h]}),GP(nr),nr.value=e;var l=KP(nr,t);nr.value=e,l=KP(nr,t),nr.value="x";var c=nr.scrollHeight-o,u=c*n;a==="border-box"&&(u=u+o+s),l=Math.max(u,l);var d=c*r;return a==="border-box"&&(d=d+o+s),l=Math.min(d,l),[l,c]}var YP=function(){},sse=function(e,n){return e.reduce(function(r,o){return r[o]=n[o],r},{})},ise=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],ase=!!document.documentElement.currentStyle,lse=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var r=sse(ise,n),o=r.boxSizing;if(o==="")return null;ase&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),i=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:i}},cse=lse;function qF(t,e,n){var r=tse(n);C.useLayoutEffect(function(){var o=function(i){return r.current(i)};if(t)return t.addEventListener(e,o),function(){return t.removeEventListener(e,o)}},[])}var use=function(e){qF(window,"resize",e)},dse=function(e){qF(document.fonts,"loadingdone",e)},fse=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],hse=function(e,n){var r=e.cacheMeasurements,o=e.maxRows,s=e.minRows,i=e.onChange,a=i===void 0?YP:i,l=e.onHeightChange,c=l===void 0?YP:l,u=Zoe(e,fse),d=u.value!==void 0,f=C.useRef(null),h=nse(f,n),p=C.useRef(0),m=C.useRef(),v=function(){var w=f.current,S=r&&m.current?m.current:cse(w);if(S){m.current=S;var _=ose(S,w.value||w.placeholder||"x",s,o),k=_[0],M=_[1];p.current!==k&&(p.current=k,w.style.setProperty("height",k+"px","important"),c(k,{rowHeight:M}))}},y=function(w){d||v(),a(w)};return C.useLayoutEffect(v),use(v),dse(v),C.createElement("textarea",VS({},u,{onChange:y,ref:h}))},pse=C.forwardRef(hse);const mse={},XF=ee((t,e)=>{const{autosize:n,maxRows:r,minRows:o,__staticSelector:s,resize:i,...a}=K("Textarea",mse,t),l=n&&UQ()!=="test",c=l?{maxRows:r,minRows:o}:{};return g.jsx(gr,{component:l?pse:"textarea",ref:e,...a,__staticSelector:s||"Textarea",multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":i},...c})});XF.classes=gr.classes;XF.displayName="@mantine/core/Textarea";const[gse,vse]=bn("List component was not found in tree");var q2={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const yse={},X2=ee((t,e)=>{const n=K("ListItem",yse,t),{classNames:r,className:o,style:s,styles:i,vars:a,icon:l,children:c,mod:u,...d}=n,f=vse(),h=l||f.icon,p={classNames:r,styles:i};return g.jsx(J,{...f.getStyles("item",{...p,className:o,style:s}),component:"li",mod:[{"with-icon":!!h,centered:f.center},u],ref:e,...d,children:g.jsxs("div",{...f.getStyles("itemWrapper",p),children:[h&&g.jsx("span",{...f.getStyles("itemIcon",p),children:h}),g.jsx("span",{...f.getStyles("itemLabel",p),children:c})]})})});X2.classes=q2;X2.displayName="@mantine/core/ListItem";const bse={type:"unordered"},wse=(t,{size:e,spacing:n})=>({root:{"--list-fz":vn(e),"--list-lh":H5(e),"--list-spacing":Dt(n)}}),J2=ee((t,e)=>{const n=K("List",bse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,children:c,type:u,withPadding:d,icon:f,spacing:h,center:p,listStyleType:m,mod:v,...y}=n,b=be({name:"List",classes:q2,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:wse});return g.jsx(gse,{value:{center:p,icon:f,getStyles:b},children:g.jsx(J,{...b("root",{style:{listStyleType:m}}),component:u==="unordered"?"ul":"ol",mod:[{"with-padding":d},v],ref:e,...y,children:c})})});J2.classes=q2;J2.displayName="@mantine/core/List";J2.Item=X2;var JF={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const qP={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:rs("overlay")},xse=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),Q2=ee((t,e)=>{const n=K("LoadingOverlay",qP,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,transitionProps:c,loaderProps:u,overlayProps:d,visible:f,zIndex:h,...p}=n,m=Xt(),v=be({name:"LoadingOverlay",classes:JF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:xse}),y={...qP.overlayProps,...d};return g.jsx(To,{transition:"fade",...c,mounted:!!f,children:b=>g.jsxs(J,{...v("root",{style:b}),ref:e,...p,children:[g.jsx(ka,{...v("loader"),unstyled:a,...u}),g.jsx(vh,{...y,...v("overlay"),darkHidden:!0,unstyled:a,color:(d==null?void 0:d.color)||m.white}),g.jsx(vh,{...y,...v("overlay"),lightHidden:!0,unstyled:a,color:(d==null?void 0:d.color)||m.colors.dark[5]})]})})});Q2.classes=JF;Q2.displayName="@mantine/core/LoadingOverlay";const[Sse,lp]=bn("Menu component was not found in the tree");var gd={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};const _se={},Z2=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("MenuDivider",_se,t),l=lp();return g.jsx(J,{ref:e,...l.getStyles("divider",{className:r,style:o,styles:s,classNames:n}),...a})});Z2.classes=gd;Z2.displayName="@mantine/core/MenuDivider";const Cse={},eE=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,onMouseEnter:a,onMouseLeave:l,children:c,...u}=K("MenuDropdown",Cse,t),d=C.useRef(null),f=lp(),h=v=>{var y,b;(v.key==="ArrowUp"||v.key==="ArrowDown")&&(v.preventDefault(),(b=(y=d.current)==null?void 0:y.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||b.focus())},p=Br(a,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.openDropdown()),m=Br(l,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.closeDropdown());return g.jsxs(Mt.Dropdown,{...u,onMouseEnter:p,onMouseLeave:m,role:"menu","aria-orientation":"vertical",ref:wn(e,d),...f.getStyles("dropdown",{className:r,style:o,styles:s,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[g.jsx("div",{tabIndex:-1,"data-autofocus":!0,"aria-hidden":!0,style:{outline:0}}),c]})});eE.classes=gd;eE.displayName="@mantine/core/MenuDropdown";const kse={},tE=on((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,color:a,closeMenuOnClick:l,leftSection:c,rightSection:u,children:d,disabled:f,...h}=K("MenuItem",kse,t),p=lp(),m=Xt(),{dir:v}=Lr(),y=C.useRef(),b=p.getItemIndex(y.current),w=h,S=Br(w.onMouseLeave,()=>p.setHovered(-1)),_=Br(w.onMouseEnter,()=>p.setHovered(p.getItemIndex(y.current))),k=Br(w.onClick,()=>{typeof l=="boolean"?l&&p.closeDropdownImmediately():p.closeOnItemClick&&p.closeDropdownImmediately()}),M=Br(w.onFocus,()=>p.setHovered(p.getItemIndex(y.current))),T=a?m.variantColorResolver({color:a,theme:m,variant:"light"}):void 0,P=a?ss({color:a,theme:m}):null;return g.jsxs(un,{...h,unstyled:p.unstyled,tabIndex:p.menuItemTabIndex,onFocus:M,...p.getStyles("item",{className:r,style:o,styles:s,classNames:n}),ref:wn(y,e),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||void 0,"data-hovered":p.hovered===b?!0:void 0,onMouseEnter:_,onMouseLeave:S,onClick:k,onKeyDown:V5({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:p.loop,dir:v,orientation:"vertical",onKeyDown:w.onKeydown}),__vars:{"--menu-item-color":P!=null&&P.isThemeColor&&(P==null?void 0:P.shade)===void 0?`var(--mantine-color-${P.color}-6)`:T==null?void 0:T.color,"--menu-item-hover":T==null?void 0:T.hover},children:[c&&g.jsx("div",{...p.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"left",children:c}),d&&g.jsx("div",{...p.getStyles("itemLabel",{styles:s,classNames:n}),children:d}),u&&g.jsx("div",{...p.getStyles("itemSection",{styles:s,classNames:n}),"data-position":"right",children:u})]})});tE.classes=gd;tE.displayName="@mantine/core/MenuItem";const Ese={},nE=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("MenuLabel",Ese,t),l=lp();return g.jsx(J,{ref:e,...l.getStyles("label",{className:r,style:o,styles:s,classNames:n}),...a})});nE.classes=gd;nE.displayName="@mantine/core/MenuLabel";const Mse={refProp:"ref"},QF=C.forwardRef((t,e)=>{const{children:n,refProp:r,...o}=K("MenuTarget",Mse,t);if(!Fa(n))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 s=lp(),i=Br(n.props.onClick,()=>{s.trigger==="click"?s.toggleDropdown():s.trigger==="click-hover"&&(s.setOpenedViaClick(!0),s.opened||s.openDropdown())}),a=Br(n.props.onMouseEnter,()=>(s.trigger==="hover"||s.trigger==="click-hover")&&s.openDropdown()),l=Br(n.props.onMouseLeave,()=>{(s.trigger==="hover"||s.trigger==="click-hover"&&!s.openedViaClick)&&s.closeDropdown()});return g.jsx(Mt.Target,{refProp:r,popupType:"menu",ref:e,...o,children:C.cloneElement(n,{onClick:i,onMouseEnter:a,onMouseLeave:l,"data-expanded":s.opened?!0:void 0})})});QF.displayName="@mantine/core/MenuTarget";const Tse={trapFocus:!0,closeOnItemClick:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function We(t){const e=K("Menu",Tse,t),{children:n,onOpen:r,onClose:o,opened:s,defaultOpened:i,trapFocus:a,onChange:l,closeOnItemClick:c,loop:u,closeOnEscape:d,trigger:f,openDelay:h,closeDelay:p,classNames:m,styles:v,unstyled:y,variant:b,vars:w,menuItemTabIndex:S,keepMounted:_,...k}=e,M=be({name:"Menu",classes:gd,props:e,classNames:m,styles:v,unstyled:y}),[T,{setHovered:P,resetHovered:A}]=EQ(),[L,V]=yn({value:s,defaultValue:i,finalValue:!1,onChange:l}),[H,z]=C.useState(!1),N=()=>{V(!1),z(!1),L&&(o==null||o())},D=()=>{V(!0),!L&&(r==null||r())},F=()=>{L?N():D()},{openDropdown:I,closeDropdown:$}=joe({open:D,close:N,closeDelay:p,openDelay:h}),j=X=>kQ("[data-menu-item]","[data-menu-dropdown]",X),{resolvedClassNames:W,resolvedStyles:G}=Nr({classNames:m,styles:v,props:e});return cr(()=>{A()},[L]),g.jsx(Sse,{value:{getStyles:M,opened:L,toggleDropdown:F,getItemIndex:j,hovered:T,setHovered:P,openedViaClick:H,setOpenedViaClick:z,closeOnItemClick:c,closeDropdown:f==="click"?N:$,openDropdown:f==="click"?D:I,closeDropdownImmediately:N,loop:u,trigger:f,unstyled:y,menuItemTabIndex:S},children:g.jsx(Mt,{...k,opened:L,onChange:F,defaultOpened:i,trapFocus:_?!1:a,closeOnEscape:d,__staticSelector:"Menu",classNames:W,styles:G,unstyled:y,variant:b,keepMounted:_,children:n})})}We.extend=t=>t;We.classes=gd;We.displayName="@mantine/core/Menu";We.Item=tE;We.Label=nE;We.Dropdown=eE;We.Target=QF;We.Divider=Z2;const[Rse,vd]=bn("Modal component was not found in tree");var Ei={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Ose={},Py=ee((t,e)=>{const n=K("ModalBody",Ose,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=vd();return g.jsx(e2,{ref:e,...c.getStyles("body",{classNames:r,style:s,styles:i,className:o}),...l})});Py.classes=Ei;Py.displayName="@mantine/core/ModalBody";const Pse={},Ay=ee((t,e)=>{const n=K("ModalCloseButton",Pse,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=vd();return g.jsx(t2,{ref:e,...c.getStyles("close",{classNames:r,style:s,styles:i,className:o}),...l})});Ay.classes=Ei;Ay.displayName="@mantine/core/ModalCloseButton";const Ase={},Dy=ee((t,e)=>{const n=K("ModalContent",Ase,t),{classNames:r,className:o,style:s,styles:i,vars:a,children:l,...c}=n,u=vd(),d=u.scrollAreaComponent||eF;return g.jsx(Z3,{...u.getStyles("content",{className:o,style:s,styles:i,classNames:r}),innerProps:u.getStyles("inner",{className:o,style:s,styles:i,classNames:r}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,ref:e,...c,children:g.jsx(d,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${Y(u.yOffset)} * 2))`},children:l})})});Dy.classes=Ei;Dy.displayName="@mantine/core/ModalContent";const Dse={},Iy=ee((t,e)=>{const n=K("ModalHeader",Dse,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=vd();return g.jsx(n2,{ref:e,...c.getStyles("header",{classNames:r,style:s,styles:i,className:o}),...l})});Iy.classes=Ei;Iy.displayName="@mantine/core/ModalHeader";const Ise={},Ny=ee((t,e)=>{const n=K("ModalOverlay",Ise,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=vd();return g.jsx(r2,{ref:e,...c.getStyles("overlay",{classNames:r,style:s,styles:i,className:o}),...l})});Ny.classes=Ei;Ny.displayName="@mantine/core/ModalOverlay";const Nse={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:rs("modal"),transitionProps:{duration:200,transition:"pop"},yOffset:"5dvh"},Lse=(t,{radius:e,size:n,yOffset:r,xOffset:o})=>({root:{"--modal-radius":e===void 0?void 0:dt(e),"--modal-size":$e(n,"modal-size"),"--modal-y-offset":Y(r),"--modal-x-offset":Y(o)}}),Ly=ee((t,e)=>{const n=K("ModalRoot",Nse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,yOffset:c,scrollAreaComponent:u,radius:d,fullScreen:f,centered:h,xOffset:p,__staticSelector:m,...v}=n,y=be({name:m,classes:Ei,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Lse});return g.jsx(Rse,{value:{yOffset:c,scrollAreaComponent:u,getStyles:y,fullScreen:f},children:g.jsx(Q3,{ref:e,...y("root"),"data-full-screen":f||void 0,"data-centered":h||void 0,unstyled:a,...v})})});Ly.classes=Ei;Ly.displayName="@mantine/core/ModalRoot";const jse={},jy=ee((t,e)=>{const n=K("ModalTitle",jse,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=vd();return g.jsx(o2,{ref:e,...c.getStyles("title",{classNames:r,style:s,styles:i,className:o}),...l})});jy.classes=Ei;jy.displayName="@mantine/core/ModalTitle";const $se={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:rs("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},is=ee((t,e)=>{const{title:n,withOverlay:r,overlayProps:o,withCloseButton:s,closeButtonProps:i,children:a,radius:l,...c}=K("Modal",$se,t),u=!!n||s;return g.jsxs(Ly,{ref:e,radius:l,...c,children:[r&&g.jsx(Ny,{...o}),g.jsxs(Dy,{radius:l,children:[u&&g.jsxs(Iy,{children:[n&&g.jsx(jy,{children:n}),s&&g.jsx(Ay,{...i})]}),g.jsx(Py,{children:a})]})]})});is.classes=Ei;is.displayName="@mantine/core/Modal";is.Root=Ly;is.Overlay=Ny;is.Content=Dy;is.Body=Py;is.Header=Iy;is.Title=jy;is.CloseButton=Ay;const[Fse,rE]=uc(),[zse,Bse]=uc();var $y={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const Vse={},Hse=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?$e(e):$e(n,"pg-gap")}}),oE=ee((t,e)=>{const n=K("PillGroup",Vse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,size:c,disabled:u,...d}=n,f=rE(),h=(f==null?void 0:f.size)||c||void 0,p=be({name:"PillGroup",classes:$y,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Hse,stylesCtx:{size:h},rootSelector:"group"});return g.jsx(zse,{value:{size:h,disabled:u},children:g.jsx(J,{ref:e,size:h,...p("group"),...d})})});oE.classes=$y;oE.displayName="@mantine/core/PillGroup";const Wse={variant:"default"},Use=(t,{radius:e},{size:n})=>({root:{"--pill-fz":$e(n,"pill-fz"),"--pill-height":$e(n,"pill-height"),"--pill-radius":e===void 0?void 0:dt(e)}}),yh=ee((t,e)=>{const n=K("Pill",Wse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,variant:c,children:u,withRemoveButton:d,onRemove:f,removeButtonProps:h,radius:p,size:m,disabled:v,mod:y,...b}=n,w=Bse(),S=rE(),_=m||(w==null?void 0:w.size)||void 0,k=(S==null?void 0:S.variant)==="filled"?"contrast":c||"default",M=be({name:"Pill",classes:$y,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Use,stylesCtx:{size:_}});return g.jsxs(J,{component:"span",ref:e,variant:k,size:_,...M("root",{variant:k}),mod:[{"with-remove":d&&!v,disabled:v||(w==null?void 0:w.disabled)},y],...b,children:[g.jsx("span",{...M("label"),children:u}),d&&g.jsx(Va,{variant:"transparent",radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:a,...h,...M("remove",{className:h==null?void 0:h.className,style:h==null?void 0:h.style}),onMouseDown:T=>{var P;T.preventDefault(),T.stopPropagation(),(P=h==null?void 0:h.onMouseDown)==null||P.call(h,T)},onClick:T=>{var P;T.stopPropagation(),f==null||f(),(P=h==null?void 0:h.onClick)==null||P.call(h,T)}})]})});yh.classes=$y;yh.displayName="@mantine/core/Pill";yh.Group=oE;var ZF={field:"m_45c4369d"};const Gse={type:"visible"},sE=ee((t,e)=>{const n=K("PillsInputField",Gse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,type:c,disabled:u,id:d,pointer:f,mod:h,...p}=n,m=rE(),v=hd(),y=be({name:"PillsInputField",classes:ZF,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,rootSelector:"field"}),b=u||(m==null?void 0:m.disabled);return g.jsx(J,{component:"input",ref:wn(e,m==null?void 0:m.fieldRef),"data-type":c,disabled:b,mod:[{disabled:b,pointer:f},h],...y("field"),...p,id:(v==null?void 0:v.inputId)||d,"aria-invalid":m==null?void 0:m.hasError,"aria-describedby":v==null?void 0:v.describedBy,type:"text",onMouseDown:w=>!f&&w.stopPropagation()})});sE.classes=ZF;sE.displayName="@mantine/core/PillsInputField";const Kse={},bv=ee((t,e)=>{const n=K("PillsInput",Kse,t),{children:r,onMouseDown:o,onClick:s,size:i,disabled:a,__staticSelector:l,error:c,variant:u,...d}=n,f=C.useRef();return g.jsx(Fse,{value:{fieldRef:f,size:i,disabled:a,hasError:!!c,variant:u},children:g.jsx(gr,{size:i,error:c,variant:u,component:"div",ref:e,onMouseDown:h=>{var p;h.preventDefault(),o==null||o(h),(p=f.current)==null||p.focus()},onClick:h=>{var p;h.preventDefault(),s==null||s(h),(p=f.current)==null||p.focus()},...d,multiline:!0,disabled:a,__staticSelector:l||"PillsInput",withAria:!1,children:r})})});bv.displayName="@mantine/core/PillsInput";bv.Field=sE;function Yse({data:t,value:e}){const n=e.map(o=>o.trim().toLowerCase());return t.reduce((o,s)=>(Hu(s)?o.push({group:s.group,items:s.items.filter(i=>n.indexOf(i.value.toLowerCase().trim())===-1)}):n.indexOf(s.value.toLowerCase().trim())===-1&&o.push(s),o),[])}const qse={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},iE=ee((t,e)=>{const n=K("MultiSelect",qse,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,size:c,value:u,defaultValue:d,onChange:f,onKeyDown:h,variant:p,data:m,dropdownOpened:v,defaultDropdownOpened:y,onDropdownOpen:b,onDropdownClose:w,selectFirstOptionOnChange:S,onOptionSubmit:_,comboboxProps:k,filter:M,limit:T,withScrollArea:P,maxDropdownHeight:A,searchValue:L,defaultSearchValue:V,onSearchChange:H,readOnly:z,disabled:N,onFocus:D,onBlur:F,onPaste:I,radius:$,rightSection:j,rightSectionWidth:W,rightSectionPointerEvents:G,rightSectionProps:X,leftSection:q,leftSectionWidth:B,leftSectionPointerEvents:Q,leftSectionProps:Z,inputContainer:oe,inputWrapperOrder:te,withAsterisk:ne,labelProps:pe,descriptionProps:ie,errorProps:le,wrapperProps:ce,description:ye,label:xe,error:Ce,maxValues:se,searchable:ue,nothingFoundMessage:ve,withCheckIcon:Oe,checkIconPosition:fe,hidePickedOptions:Me,withErrorStyles:Ie,name:Be,form:et,id:mt,clearable:Ue,clearButtonProps:lt,hiddenInputProps:sn,placeholder:an,hiddenInputValuesDivider:tr,required:Za,mod:Tn,renderOption:fn,onRemove:Bn,onClear:oo,scrollAreaProps:Bs,...Ti}=n,Ao=mr(mt),Do=m2(m),it=gy(Do),Wt=vy({opened:v,defaultOpened:y,onDropdownOpen:b,onDropdownClose:()=>{w==null||w(),Wt.resetSelectedOption()}}),{styleProps:Rn,rest:{type:so,autoComplete:Md,...Vn}}=Ba(Ti),[ke,Io]=yn({value:u,defaultValue:d,finalValue:[],onChange:f}),[_t,Ne]=yn({value:L,defaultValue:V,finalValue:"",onChange:H}),Ct=be({name:"MultiSelect",classes:{},props:n,classNames:r,styles:i,unstyled:a}),{resolvedClassNames:It,resolvedStyles:Nt}=Nr({props:n,styles:i,classNames:r}),Ot=gt=>{h==null||h(gt),gt.key===" "&&!ue&&(gt.preventDefault(),Wt.toggleDropdown()),gt.key==="Backspace"&&_t.length===0&&ke.length>0&&(Bn==null||Bn(ke[ke.length-1]),Io(ke.slice(0,ke.length-1)))},xn=ke.map((gt,On)=>{var Mp,Td;return g.jsx(yh,{withRemoveButton:!z&&!((Mp=it[gt])!=null&&Mp.disabled),onRemove:()=>{Io(ke.filter(Tp=>gt!==Tp)),Bn==null||Bn(gt)},unstyled:a,disabled:N,...Ct("pill"),children:((Td=it[gt])==null?void 0:Td.label)||gt},`${gt}-${On}`)});C.useEffect(()=>{S&&Wt.selectFirstOption()},[S,ke]);const el=Ue&&ke.length>0&&!N&&!z&&g.jsx(Qe.ClearButton,{size:c,...lt,onClear:()=>{oo==null||oo(),Io([]),Ne("")}}),Ep=Yse({data:Do,value:ke});return g.jsxs(g.Fragment,{children:[g.jsxs(Qe,{store:Wt,classNames:It,styles:Nt,unstyled:a,size:c,readOnly:z,__staticSelector:"MultiSelect",onOptionSubmit:gt=>{_==null||_(gt),Ne(""),Wt.updateSelectedOptionIndex("selected"),ke.includes(it[gt].value)?(Io(ke.filter(On=>On!==it[gt].value)),Bn==null||Bn(it[gt].value)):ke.length<se&&Io([...ke,it[gt].value])},...k,children:[g.jsx(Qe.DropdownTarget,{children:g.jsx(bv,{...Rn,__staticSelector:"MultiSelect",classNames:It,styles:Nt,unstyled:a,size:c,className:o,style:s,variant:p,disabled:N,radius:$,rightSection:j||el||g.jsx(Qe.Chevron,{size:c,error:Ce,unstyled:a}),rightSectionPointerEvents:G||(el?"all":"none"),rightSectionWidth:W,rightSectionProps:X,leftSection:q,leftSectionWidth:B,leftSectionPointerEvents:Q,leftSectionProps:Z,inputContainer:oe,inputWrapperOrder:te,withAsterisk:ne,labelProps:pe,descriptionProps:ie,errorProps:le,wrapperProps:ce,description:ye,label:xe,error:Ce,multiline:!0,withErrorStyles:Ie,__stylesApiProps:{...n,rightSectionPointerEvents:G||(el?"all":"none"),multiline:!0},pointer:!ue,onClick:()=>ue?Wt.openDropdown():Wt.toggleDropdown(),"data-expanded":Wt.dropdownOpened||void 0,id:Ao,required:Za,mod:Tn,children:g.jsxs(yh.Group,{disabled:N,unstyled:a,...Ct("pillsList"),children:[xn,g.jsx(Qe.EventsTarget,{autoComplete:Md,children:g.jsx(bv.Field,{...Vn,ref:e,id:Ao,placeholder:an,type:!ue&&!an?"hidden":"visible",...Ct("inputField"),unstyled:a,onFocus:gt=>{D==null||D(gt),ue&&Wt.openDropdown()},onBlur:gt=>{F==null||F(gt),Wt.closeDropdown(),Ne("")},onKeyDown:Ot,value:_t,onChange:gt=>{Ne(gt.currentTarget.value),ue&&Wt.openDropdown(),S&&Wt.selectFirstOption()},disabled:N,readOnly:z||!ue,pointer:!ue})})]})})}),g.jsx(O2,{data:Me?Ep:Do,hidden:z||N,filter:M,search:_t,limit:T,hiddenWhenEmpty:!ve,withScrollArea:P,maxDropdownHeight:A,filterOptions:ue,value:ke,checkIconPosition:fe,withCheckIcon:Oe,nothingFoundMessage:ve,unstyled:a,labelId:xe?`${Ao}-label`:void 0,"aria-label":xe?void 0:Ti["aria-label"],renderOption:fn,scrollAreaProps:Bs})]}),g.jsx(Qe.HiddenInput,{name:Be,valuesDivider:tr,value:ke,form:et,disabled:N,...sn})]})});iE.classes={...gr.classes,...Qe.classes};iE.displayName="@mantine/core/MultiSelect";const[Xse,Fy]=bn("Pagination.Root component was not found in tree");var cp={root:"m_4addd315",control:"m_326d024a",dots:"m_4ad7767d"};const Jse={withPadding:!0},up=ee((t,e)=>{const n=K("PaginationControl",Jse,t),{classNames:r,className:o,style:s,styles:i,vars:a,active:l,disabled:c,withPadding:u,mod:d,...f}=n,h=Fy(),p=c||h.disabled;return g.jsx(un,{ref:e,disabled:p,mod:[{active:l,disabled:p,"with-padding":u},d],...h.getStyles("control",{className:o,style:s,classNames:r,styles:i,active:!p}),...f})});up.classes=cp;up.displayName="@mantine/core/PaginationControl";function dp({style:t,children:e,path:n,...r}){return g.jsx("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)",...t},...r,children:g.jsx("path",{d:n,fill:"currentColor"})})}const Qse=t=>g.jsx(dp,{...t,path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"}),Zse=t=>g.jsx(dp,{...t,path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"}),eie=t=>g.jsx(dp,{...t,path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"}),tie=t=>g.jsx(dp,{...t,path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"}),nie=t=>g.jsx(dp,{...t,path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}),rie={icon:nie},zy=ee((t,e)=>{const n=K("PaginationDots",rie,t),{classNames:r,className:o,style:s,styles:i,vars:a,icon:l,...c}=n,u=Fy(),d=l;return g.jsx(J,{ref:e,...u.getStyles("dots",{className:o,style:s,styles:i,classNames:r}),...c,children:g.jsx(d,{style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});zy.classes=cp;zy.displayName="@mantine/core/PaginationDots";function By({icon:t,name:e,action:n,type:r}){const o={icon:t},s=C.forwardRef((i,a)=>{const{icon:l,...c}=K(e,o,i),u=l,d=Fy(),f=r==="next"?d.active===d.total:d.active===1;return g.jsx(up,{disabled:d.disabled||f,ref:a,onClick:d[n],withPadding:!1,...c,children:g.jsx(u,{className:"mantine-rotate-rtl",style:{width:"calc(var(--pagination-control-size) / 1.8)",height:"calc(var(--pagination-control-size) / 1.8)"}})})});return s.displayName=`@mantine/core/${e}`,s}const e4=By({icon:Qse,name:"PaginationNext",action:"onNext",type:"next"}),t4=By({icon:Zse,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),n4=By({icon:eie,name:"PaginationFirst",action:"onFirst",type:"previous"}),r4=By({icon:tie,name:"PaginationLast",action:"onLast",type:"next"});function aE({dotsIcon:t}){const e=Fy(),n=e.range.map((r,o)=>{var s;return r==="dots"?g.jsx(zy,{icon:t},o):g.jsx(up,{active:r===e.active,"aria-current":r===e.active?"page":void 0,onClick:()=>e.onChange(r),disabled:e.disabled,...(s=e.getItemProps)==null?void 0:s.call(e,r),children:r},o)});return g.jsx(g.Fragment,{children:n})}aE.displayName="@mantine/core/PaginationItems";const oie={siblings:1,boundaries:1},sie=(t,{size:e,radius:n,color:r,autoContrast:o})=>({root:{"--pagination-control-radius":n===void 0?void 0:dt(n),"--pagination-control-size":$e(e,"pagination-control-size"),"--pagination-control-fz":vn(e),"--pagination-active-bg":r?yt(r,t):void 0,"--pagination-active-color":xi(o,t)?Fs({color:r,theme:t,autoContrast:o}):void 0}}),Vy=ee((t,e)=>{const n=K("PaginationRoot",oie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,total:c,value:u,defaultValue:d,onChange:f,disabled:h,siblings:p,boundaries:m,color:v,radius:y,onNextPage:b,onPreviousPage:w,onFirstPage:S,onLastPage:_,getItemProps:k,autoContrast:M,...T}=n,P=be({name:"Pagination",classes:cp,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:sie}),{range:A,setPage:L,next:V,previous:H,active:z,first:N,last:D}=zQ({page:u,initialPage:d,onChange:f,total:c,siblings:p,boundaries:m}),F=Br(b,V),I=Br(w,H),$=Br(S,N),j=Br(_,D);return g.jsx(Xse,{value:{total:c,range:A,active:z,disabled:h,getItemProps:k,onChange:L,onNext:F,onPrevious:I,onFirst:$,onLast:j,getStyles:P},children:g.jsx(J,{ref:e,...P("root"),...T})})});Vy.classes=cp;Vy.displayName="@mantine/core/PaginationRoot";const iie={withControls:!0,siblings:1,boundaries:1,gap:8},as=ee((t,e)=>{const n=K("Pagination",iie,t),{withEdges:r,withControls:o,getControlProps:s,nextIcon:i,previousIcon:a,lastIcon:l,firstIcon:c,dotsIcon:u,total:d,gap:f,hideWithOnePage:h,...p}=n;return d<=0||h&&d===1?null:g.jsx(Vy,{ref:e,total:d,...p,children:g.jsxs(Bu,{gap:f,children:[r&&g.jsx(n4,{icon:c,...s==null?void 0:s("first")}),o&&g.jsx(t4,{icon:a,...s==null?void 0:s("previous")}),g.jsx(aE,{dotsIcon:u}),o&&g.jsx(e4,{icon:i,...s==null?void 0:s("next")}),r&&g.jsx(r4,{icon:l,...s==null?void 0:s("last")})]})})});as.classes=cp;as.displayName="@mantine/core/Pagination";as.Root=Vy;as.Control=up;as.Dots=zy;as.First=n4;as.Last=r4;as.Next=e4;as.Previous=t4;as.Items=aE;const aie=({reveal:t})=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:g.jsx("path",{d:t?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var HS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const lie={visibilityToggleIcon:aie},cie=(t,{size:e})=>({root:{"--psi-icon-size":$e(e,"psi-icon-size"),"--psi-button-size":$e(e,"psi-button-size")}}),o4=ee((t,e)=>{const n=K("PasswordInput",lie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,required:c,error:u,leftSection:d,disabled:f,id:h,variant:p,inputContainer:m,description:v,label:y,size:b,errorProps:w,descriptionProps:S,labelProps:_,withAsterisk:k,inputWrapperOrder:M,wrapperProps:T,radius:P,rightSection:A,rightSectionWidth:L,rightSectionPointerEvents:V,leftSectionWidth:H,visible:z,defaultVisible:N,onVisibilityChange:D,visibilityToggleIcon:F,visibilityToggleButtonProps:I,rightSectionProps:$,leftSectionProps:j,leftSectionPointerEvents:W,withErrorStyles:G,mod:X,...q}=n,B=mr(h),[Q,Z]=yn({value:z,defaultValue:N,finalValue:!1,onChange:D}),oe=()=>Z(!Q),te=be({name:"PasswordInput",classes:HS,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:cie}),{resolvedClassNames:ne,resolvedStyles:pe}=Nr({classNames:r,styles:i,props:n}),{styleProps:ie,rest:le}=Ba(q),ce=F,ye=g.jsx(Ze,{...te("visibilityToggle"),disabled:f,radius:P,"aria-hidden":!I,tabIndex:-1,...I,variant:"subtle",color:"gray",unstyled:a,onMouseDown:xe=>{var Ce;xe.preventDefault(),(Ce=I==null?void 0:I.onMouseDown)==null||Ce.call(I,xe),oe()},onKeyDown:xe=>{var Ce;(Ce=I==null?void 0:I.onKeyDown)==null||Ce.call(I,xe),xe.key===" "&&(xe.preventDefault(),oe())},children:g.jsx(ce,{reveal:Q})});return g.jsx(wt.Wrapper,{required:c,id:B,label:y,error:u,description:v,size:b,classNames:ne,styles:pe,__staticSelector:"PasswordInput",errorProps:w,descriptionProps:S,unstyled:a,withAsterisk:k,inputWrapperOrder:M,inputContainer:m,variant:p,labelProps:{..._,htmlFor:B},mod:X,...te("root"),...ie,...T,children:g.jsx(wt,{component:"div",error:u,leftSection:d,size:b,classNames:{...ne,input:rn(HS.input,ne.input)},styles:pe,radius:P,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:L,rightSection:A??ye,variant:p,unstyled:a,leftSectionWidth:H,rightSectionPointerEvents:V||"all",rightSectionProps:$,leftSectionProps:j,leftSectionPointerEvents:W,withAria:!1,withErrorStyles:G,children:g.jsx("input",{required:c,"data-invalid":!!u||void 0,"data-with-left-section":!!d||void 0,...te("innerInput"),disabled:f,id:B,ref:e,...le,autoComplete:le.autoComplete||"off",type:Q?"text":"password"})})})});o4.classes={...gr.classes,...HS};o4.displayName="@mantine/core/PasswordInput";const[uie,s4]=bn("Progress.Root component was not found in tree");var fp={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};const die={},lE=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,...a}=K("ProgressLabel",die,t),l=s4();return g.jsx(J,{ref:e,...l.getStyles("label",{className:r,style:o,classNames:n,styles:s}),...a})});lE.classes=fp;lE.displayName="@mantine/core/ProgressLabel";const fie={},hie=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":$e(e,"progress-size"),"--progress-radius":n===void 0?void 0:dt(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),Hy=ee((t,e)=>{const n=K("ProgressRoot",fie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,autoContrast:c,transitionDuration:u,...d}=n,f=be({name:"Progress",classes:fp,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:hie});return g.jsx(uie,{value:{getStyles:f,autoContrast:c},children:g.jsx(J,{ref:e,...f("root"),...d})})});Hy.classes=fp;Hy.displayName="@mantine/core/ProgressRoot";const pie={withAria:!0},Wy=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,value:a,withAria:l,color:c,striped:u,animated:d,mod:f,...h}=K("ProgressSection",pie,t),p=s4(),m=Xt(),v=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,"aria-valuetext":`${a}%`}:{};return g.jsx(J,{ref:e,...p.getStyles("section",{className:r,classNames:n,styles:s,style:o}),...h,...v,mod:[{striped:u||d,animated:d},f],__vars:{"--progress-section-width":`${a}%`,"--progress-section-color":yt(c,m),"--progress-label-color":xi(p.autoContrast,m)?Fs({color:c,theme:m,autoContrast:p.autoContrast}):void 0}})});Wy.classes=fp;Wy.displayName="@mantine/core/ProgressSection";const mie={},yd=ee((t,e)=>{const n=K("Progress",mie,t),{value:r,classNames:o,styles:s,vars:i,color:a,striped:l,animated:c,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:h}=Nr({classNames:o,styles:s,props:n});return g.jsx(Hy,{ref:e,classNames:f,styles:h,vars:i,...d,children:g.jsx(Wy,{value:r,color:a,striped:l,animated:c,"aria-label":u})})});yd.classes=fp;yd.displayName="@mantine/core/Progress";yd.Section=Wy;yd.Root=Hy;yd.Label=lE;const[gie,i4]=uc(),[vie,yie]=uc();var a4={card:"m_9dc8ae12"};const bie={withBorder:!0},wie=(t,{radius:e})=>({card:{"--card-radius":dt(e)}}),cE=ee((t,e)=>{const n=K("RadioCard",bie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,checked:c,mod:u,withBorder:d,value:f,onClick:h,name:p,onKeyDown:m,...v}=n,y=be({name:"RadioCard",classes:a4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:wie,rootSelector:"card"}),{dir:b}=Lr(),w=i4(),S=typeof c=="boolean"?c:(w==null?void 0:w.value)===f||!1,_=p||(w==null?void 0:w.name),k=M=>{if(m==null||m(M),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(M.nativeEvent.code)){M.preventDefault();const T=Array.from(document.querySelectorAll(`[role="radio"][name="${_||"__mantine"}"]`)),P=T.findIndex(V=>V===M.target),A=P+1>=T.length?0:P+1,L=P-1<0?T.length-1:P-1;M.nativeEvent.code==="ArrowDown"&&(T[A].focus(),T[A].click()),M.nativeEvent.code==="ArrowUp"&&(T[L].focus(),T[L].click()),M.nativeEvent.code==="ArrowLeft"&&(T[b==="ltr"?L:A].focus(),T[b==="ltr"?L:A].click()),M.nativeEvent.code==="ArrowRight"&&(T[b==="ltr"?A:L].focus(),T[b==="ltr"?A:L].click())}};return g.jsx(vie,{value:{checked:S},children:g.jsx(un,{ref:e,mod:[{"with-border":d,checked:S},u],...y("card"),...v,role:"radio","aria-checked":S,name:_,onClick:M=>{h==null||h(M),w==null||w.onChange(f||"")},onKeyDown:k})})});cE.displayName="@mantine/core/RadioCard";cE.classes=a4;const xie={},uE=ee((t,e)=>{const{value:n,defaultValue:r,onChange:o,size:s,wrapperProps:i,children:a,name:l,readOnly:c,...u}=K("RadioGroup",xie,t),d=mr(l),[f,h]=yn({value:n,defaultValue:r,finalValue:"",onChange:o}),p=m=>!c&&h(typeof m=="string"?m:m.currentTarget.value);return g.jsx(gie,{value:{value:f,onChange:p,size:s,name:d},children:g.jsx(wt.Wrapper,{size:s,ref:e,...i,...u,labelElement:"div",__staticSelector:"RadioGroup",children:g.jsx(M2,{role:"radiogroup",children:a})})})});uE.classes=wt.Wrapper.classes;uE.displayName="@mantine/core/RadioGroup";function l4({size:t,style:e,...n}){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Y(t),height:Y(t),...e},"aria-hidden":!0,...n,children:g.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var c4={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};const Sie={icon:l4},_ie=(t,{radius:e,color:n,size:r,iconColor:o,variant:s,autoContrast:i})=>{const a=ss({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--radio-size":$e(r,"radio-size"),"--radio-radius":e===void 0?void 0:dt(e),"--radio-color":s==="outline"?l:yt(n,t),"--radio-icon-size":$e(r,"radio-icon-size"),"--radio-icon-color":o?yt(o,t):xi(i,t)?Fs({color:n,theme:t,autoContrast:i}):void 0}}},dE=ee((t,e)=>{const n=K("RadioIndicator",Sie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,icon:c,radius:u,color:d,iconColor:f,autoContrast:h,checked:p,mod:m,variant:v,disabled:y,...b}=n,w=c,S=be({name:"RadioIndicator",classes:c4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:_ie,rootSelector:"indicator"}),_=yie(),k=typeof p=="boolean"?p:(_==null?void 0:_.checked)||!1;return g.jsx(J,{ref:e,...S("indicator",{variant:v}),variant:v,mod:[{checked:k,disabled:y},m],...b,children:g.jsx(w,{...S("icon")})})});dE.displayName="@mantine/core/RadioIndicator";dE.classes=c4;var u4={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};const Cie={labelPosition:"right"},kie=(t,{size:e,radius:n,color:r,iconColor:o,variant:s,autoContrast:i})=>{const a=ss({color:r||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--radio-size":$e(e,"radio-size"),"--radio-radius":n===void 0?void 0:dt(n),"--radio-color":s==="outline"?l:yt(r,t),"--radio-icon-color":o?yt(o,t):xi(i,t)?Fs({color:r,theme:t,autoContrast:i}):void 0,"--radio-icon-size":$e(e,"radio-icon-size")}}},bd=ee((t,e)=>{const n=K("Radio",Cie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,id:c,size:u,label:d,labelPosition:f,description:h,error:p,radius:m,color:v,variant:y,disabled:b,wrapperProps:w,icon:S=l4,rootRef:_,iconColor:k,onChange:M,mod:T,...P}=n,A=be({name:"Radio",classes:u4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:kie}),L=i4(),V=(L==null?void 0:L.size)??u,H=n.size?u:V,{styleProps:z,rest:N}=Ba(P),D=mr(c),F=L?{checked:L.value===N.value,name:N.name??L.name,onChange:I=>{L.onChange(I),M==null||M(I)}}:{};return g.jsx(yy,{...A("root"),__staticSelector:"Radio",__stylesApiProps:n,id:D,size:H,labelPosition:f,label:d,description:h,error:p,disabled:b,classNames:r,styles:i,unstyled:a,"data-checked":F.checked||void 0,variant:y,ref:_,mod:T,...z,...w,children:g.jsxs(J,{...A("inner"),mod:{"label-position":f},children:[g.jsx(J,{...A("radio",{focusable:!0,variant:y}),onChange:M,...N,...F,component:"input",mod:{error:!!p},ref:e,id:D,disabled:b,type:"radio"}),g.jsx(S,{...A("icon"),"aria-hidden":!0})]})})});bd.classes=u4;bd.displayName="@mantine/core/Radio";bd.Group=uE;bd.Card=cE;bd.Indicator=dE;const Eie={duration:100,transition:"fade"};function Mie(t,e){return{...Eie,...e,...t}}function Tie({offset:t,position:e,defaultOpened:n}){const[r,o]=C.useState(n),s=C.useRef(),{x:i,y:a,elements:l,refs:c,update:u,placement:d}=Xk({placement:e,middleware:[Gk({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=d.includes("right")?t:e.includes("left")?t*-1:0,h=d.includes("bottom")?t:e.includes("top")?t*-1:0,p=C.useCallback(({clientX:m,clientY:v})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:m,y:v,left:m+f,top:v+h,right:m,bottom:v}}})},[l.reference]);return C.useEffect(()=>{if(c.floating.current){const m=s.current;m.addEventListener("mousemove",p);const v=ai(c.floating.current);return v.forEach(y=>{y.addEventListener("scroll",u)}),()=>{m.removeEventListener("mousemove",p),v.forEach(y=>{y.removeEventListener("scroll",u)})}}},[l.reference,c.floating.current,u,p,r]),{handleMouseMove:p,x:i,y:a,opened:r,setOpened:o,boundaryRef:s,floating:c.setFloating}}var Uy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Rie={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:rs("popover")},Oie=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:dt(e),"--tooltip-bg":n?yt(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),fE=ee((t,e)=>{const n=K("TooltipFloating",Rie,t),{children:r,refProp:o,withinPortal:s,style:i,className:a,classNames:l,styles:c,unstyled:u,radius:d,color:f,label:h,offset:p,position:m,multiline:v,zIndex:y,disabled:b,defaultOpened:w,variant:S,vars:_,portalProps:k,...M}=n,T=Xt(),P=be({name:"TooltipFloating",props:n,classes:Uy,className:a,style:i,classNames:l,styles:c,unstyled:u,rootSelector:"tooltip",vars:_,varsResolver:Oie}),{handleMouseMove:A,x:L,y:V,opened:H,boundaryRef:z,floating:N,setOpened:D}=Tie({offset:p,position:m,defaultOpened:w});if(!Fa(r))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 F=wn(z,r.ref,e),I=j=>{var W,G;(G=(W=r.props).onMouseEnter)==null||G.call(W,j),A(j),D(!0)},$=j=>{var W,G;(G=(W=r.props).onMouseLeave)==null||G.call(W,j),D(!1)};return g.jsxs(g.Fragment,{children:[g.jsx(op,{...k,withinPortal:s,children:g.jsx(J,{...M,...P("tooltip",{style:{...Dk(i,T),zIndex:y,display:!b&&H?"block":"none",top:(V&&Math.round(V))??"",left:(L&&Math.round(L))??""}}),variant:S,ref:N,mod:{multiline:v},children:h})}),C.cloneElement(r,{...r.props,[o]:F,onMouseEnter:I,onMouseLeave:$})]})});fE.classes=Uy;fE.displayName="@mantine/core/TooltipFloating";const d4=C.createContext(!1),Pie=d4.Provider,Aie=()=>C.useContext(d4),Die={openDelay:0,closeDelay:0};function f4(t){const{openDelay:e,closeDelay:n,children:r}=K("TooltipGroup",Die,t);return g.jsx(Pie,{value:!0,children:g.jsx(kte,{delay:{open:e,close:n},children:r})})}f4.displayName="@mantine/core/TooltipGroup";function Iie(t){var k,M,T;const[e,n]=C.useState(t.defaultOpened),o=typeof t.opened=="boolean"?t.opened:e,s=Aie(),i=mr(),{delay:a,currentId:l,setCurrentId:c}=F3(),u=C.useCallback(P=>{n(P),P&&c(i)},[c,i]),{x:d,y:f,context:h,refs:p,update:m,placement:v,middlewareData:{arrow:{x:y,y:b}={}}}=Xk({strategy:t.strategy,placement:t.position,open:o,onOpenChange:u,middleware:[T3(t.offset),Gk({padding:8}),LS(),N3({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[jS()]:[]]}),{getReferenceProps:w,getFloatingProps:S}=Pte([Cte(h,{enabled:(k=t.events)==null?void 0:k.hover,delay:s?a:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((M=t.events)!=null&&M.touch)}),Ote(h,{enabled:(T=t.events)==null?void 0:T.focus,visibleOnly:!0}),Dte(h,{role:"tooltip"}),Rte(h,{enabled:typeof t.opened>"u"}),Ete(h,{id:i})]);G3({opened:o,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:p,update:m}}),cr(()=>{var P;(P=t.onPositionChange)==null||P.call(t,v)},[v]);const _=o&&l&&l!==i;return{x:d,y:f,arrowX:y,arrowY:b,reference:p.setReference,floating:p.setFloating,getFloatingProps:S,getReferenceProps:w,isGroupPhase:_,opened:o,placement:v}}const XP={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:rs("popover"),positionDependencies:[]},Nie=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:dt(e),"--tooltip-bg":n?yt(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),ut=ee((t,e)=>{const n=K("Tooltip",XP,t),{children:r,position:o,refProp:s,label:i,openDelay:a,closeDelay:l,onPositionChange:c,opened:u,defaultOpened:d,withinPortal:f,radius:h,color:p,classNames:m,styles:v,unstyled:y,style:b,className:w,withArrow:S,arrowSize:_,arrowOffset:k,arrowRadius:M,arrowPosition:T,offset:P,transitionProps:A,multiline:L,events:V,zIndex:H,disabled:z,positionDependencies:N,onClick:D,onMouseEnter:F,onMouseLeave:I,inline:$,variant:j,keepMounted:W,vars:G,portalProps:X,mod:q,floatingStrategy:B,...Q}=K("Tooltip",XP,n),{dir:Z}=Lr(),oe=C.useRef(null),te=Iie({position:z3(Z,o),closeDelay:l,openDelay:a,onPositionChange:c,opened:u,defaultOpened:d,events:V,arrowRef:oe,arrowOffset:k,offset:typeof P=="number"?P+(S?_/2:0):P,positionDependencies:[...N,r],inline:$,strategy:B}),ne=be({name:"Tooltip",props:n,classes:Uy,className:w,style:b,classNames:m,styles:v,unstyled:y,rootSelector:"tooltip",vars:G,varsResolver:Nie});if(!Fa(r))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 pe=wn(te.reference,r.ref,e),ie=Mie(A,{duration:100,transition:"fade"});return g.jsxs(g.Fragment,{children:[g.jsx(op,{...X,withinPortal:f,children:g.jsx(To,{...ie,keepMounted:W,mounted:!z&&!!te.opened,duration:te.isGroupPhase?10:ie.duration,children:le=>g.jsxs(J,{...Q,"data-fixed":B==="fixed"||void 0,variant:j,mod:[{multiline:L},q],...te.getFloatingProps({ref:te.floating,className:ne("tooltip").className,style:{...ne("tooltip").style,...le,zIndex:H,top:te.y??0,left:te.x??0}}),children:[i,g.jsx(Jk,{ref:oe,arrowX:te.arrowX,arrowY:te.arrowY,visible:S,position:te.placement,arrowSize:_,arrowOffset:k,arrowRadius:M,arrowPosition:T,...ne("arrow")})]})})}),C.cloneElement(r,te.getReferenceProps({onClick:D,onMouseEnter:F,onMouseLeave:I,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,[s]:pe,className:rn(w,r.props.className),...r.props}))]})});ut.classes=Uy;ut.displayName="@mantine/core/Tooltip";ut.Floating=fE;ut.Group=f4;const Lie={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},hp=ee((t,e)=>{const n=K("Select",Lie,t),{classNames:r,styles:o,unstyled:s,vars:i,dropdownOpened:a,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:h,onChange:p,data:m,value:v,defaultValue:y,selectFirstOptionOnChange:b,onOptionSubmit:w,comboboxProps:S,readOnly:_,disabled:k,filter:M,limit:T,withScrollArea:P,maxDropdownHeight:A,size:L,searchable:V,rightSection:H,checkIconPosition:z,withCheckIcon:N,nothingFoundMessage:D,name:F,form:I,searchValue:$,defaultSearchValue:j,onSearchChange:W,allowDeselect:G,error:X,rightSectionPointerEvents:q,id:B,clearable:Q,clearButtonProps:Z,hiddenInputProps:oe,renderOption:te,onClear:ne,autoComplete:pe,scrollAreaProps:ie,...le}=n,ce=C.useMemo(()=>m2(m),[m]),ye=C.useMemo(()=>gy(ce),[ce]),xe=mr(B),[Ce,se,ue]=yn({value:v,defaultValue:y,finalValue:null,onChange:p}),ve=typeof Ce=="string"?ye[Ce]:void 0,Oe=HQ(ve),[fe,Me]=yn({value:$,defaultValue:j,finalValue:ve?ve.label:"",onChange:W}),Ie=vy({opened:a,defaultOpened:l,onDropdownOpen:()=>{u==null||u(),Ie.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),Ie.resetSelectedOption()}}),{resolvedClassNames:Be,resolvedStyles:et}=Nr({props:n,styles:o,classNames:r});C.useEffect(()=>{b&&Ie.selectFirstOption()},[b,Ce]),C.useEffect(()=>{v===null&&Me(""),typeof v=="string"&&ve&&((Oe==null?void 0:Oe.value)!==ve.value||(Oe==null?void 0:Oe.label)!==ve.label)&&Me(ve.label)},[v,ve]);const mt=Q&&!!Ce&&!k&&!_&&g.jsx(Qe.ClearButton,{size:L,...Z,onClear:()=>{se(null,null),Me(""),ne==null||ne()}});return g.jsxs(g.Fragment,{children:[g.jsxs(Qe,{store:Ie,__staticSelector:"Select",classNames:Be,styles:et,unstyled:s,readOnly:_,onOptionSubmit:Ue=>{w==null||w(Ue);const lt=G&&ye[Ue].value===Ce?null:ye[Ue],sn=lt?lt.value:null;sn!==Ce&&se(sn,lt),!ue&&Me(typeof sn=="string"&&(lt==null?void 0:lt.label)||""),Ie.closeDropdown()},size:L,...S,children:[g.jsx(Qe.Target,{targetType:V?"input":"button",autoComplete:pe,children:g.jsx(gr,{id:xe,ref:e,rightSection:H||mt||g.jsx(Qe.Chevron,{size:L,error:X,unstyled:s}),rightSectionPointerEvents:q||(mt?"all":"none"),...le,size:L,__staticSelector:"Select",disabled:k,readOnly:_||!V,value:fe,onChange:Ue=>{Me(Ue.currentTarget.value),Ie.openDropdown(),b&&Ie.selectFirstOption()},onFocus:Ue=>{V&&Ie.openDropdown(),d==null||d(Ue)},onBlur:Ue=>{var lt;V&&Ie.closeDropdown(),Me(Ce!=null&&((lt=ye[Ce])==null?void 0:lt.label)||""),f==null||f(Ue)},onClick:Ue=>{V?Ie.openDropdown():Ie.toggleDropdown(),h==null||h(Ue)},classNames:Be,styles:et,unstyled:s,pointer:!V,error:X})}),g.jsx(O2,{data:ce,hidden:_||k,filter:M,search:fe,limit:T,hiddenWhenEmpty:!D,withScrollArea:P,maxDropdownHeight:A,filterOptions:V&&(ve==null?void 0:ve.label)!==fe,value:Ce,checkIconPosition:z,withCheckIcon:N,nothingFoundMessage:D,unstyled:s,labelId:le.label?`${xe}-label`:void 0,"aria-label":le.label?void 0:le["aria-label"],renderOption:te,scrollAreaProps:ie})]}),g.jsx(Qe.HiddenInput,{value:Ce,name:F,form:I,disabled:k,...oe})]})});hp.classes={...gr.classes,...Qe.classes};hp.displayName="@mantine/core/Select";function jie({spacing:t,verticalSpacing:e,cols:n,selector:r}){var u;const o=Xt(),s=e===void 0?t:e,i=$a({"--sg-spacing-x":Dt(Ho(t)),"--sg-spacing-y":Dt(Ho(s)),"--sg-cols":(u=Ho(n))==null?void 0:u.toString()}),a=St(o.breakpoints).reduce((d,f)=>(d[f]||(d[f]={}),typeof t=="object"&&t[f]!==void 0&&(d[f]["--sg-spacing-x"]=Dt(t[f])),typeof s=="object"&&s[f]!==void 0&&(d[f]["--sg-spacing-y"]=Dt(s[f])),typeof n=="object"&&n[f]!==void 0&&(d[f]["--sg-cols"]=n[f]),d),{}),c=fh(St(a),o).filter(d=>St(a[d.value]).length>0).map(d=>({query:`(min-width: ${o.breakpoints[d.value]})`,styles:a[d.value]}));return g.jsx(fc,{styles:i,media:c,selector:r})}function nw(t){return typeof t=="object"&&t!==null?St(t):[]}function $ie(t){return t.sort((e,n)=>dh(e)-dh(n))}function Fie({spacing:t,verticalSpacing:e,cols:n}){const r=Array.from(new Set([...nw(t),...nw(e),...nw(n)]));return $ie(r)}function zie({spacing:t,verticalSpacing:e,cols:n,selector:r}){var c;const o=e===void 0?t:e,s=$a({"--sg-spacing-x":Dt(Ho(t)),"--sg-spacing-y":Dt(Ho(o)),"--sg-cols":(c=Ho(n))==null?void 0:c.toString()}),i=Fie({spacing:t,verticalSpacing:e,cols:n}),a=i.reduce((u,d)=>(u[d]||(u[d]={}),typeof t=="object"&&t[d]!==void 0&&(u[d]["--sg-spacing-x"]=Dt(t[d])),typeof o=="object"&&o[d]!==void 0&&(u[d]["--sg-spacing-y"]=Dt(o[d])),typeof n=="object"&&n[d]!==void 0&&(u[d]["--sg-cols"]=n[d]),u),{}),l=i.map(u=>({query:`simple-grid (min-width: ${u})`,styles:a[u]}));return g.jsx(fc,{styles:s,container:l,selector:r})}var h4={container:"m_925c2d2c",root:"m_2415a157"};const Bie={cols:1,spacing:"md",type:"media"},hE=ee((t,e)=>{const n=K("SimpleGrid",Bie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,cols:c,verticalSpacing:u,spacing:d,type:f,...h}=n,p=be({name:"SimpleGrid",classes:h4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l}),m=tp();return f==="container"?g.jsxs(g.Fragment,{children:[g.jsx(zie,{...n,selector:`.${m}`}),g.jsx("div",{...p("container"),children:g.jsx(J,{ref:e,...p("root",{className:m}),...h})})]}):g.jsxs(g.Fragment,{children:[g.jsx(jie,{...n,selector:`.${m}`}),g.jsx(J,{ref:e,...p("root",{className:m}),...h})]})});hE.classes=h4;hE.displayName="@mantine/core/SimpleGrid";var p4={root:"m_18320242","skeleton-fade":"m_299c329c"};const Vie={visible:!0,animate:!0},Hie=(t,{width:e,height:n,radius:r,circle:o})=>({root:{"--skeleton-height":Y(n),"--skeleton-width":Y(o?n:e),"--skeleton-radius":o?"1000px":r===void 0?void 0:dt(r)}}),pE=ee((t,e)=>{const n=K("Skeleton",Vie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,width:c,height:u,circle:d,visible:f,radius:h,animate:p,mod:m,...v}=n,y=be({name:"Skeleton",classes:p4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Hie});return g.jsx(J,{ref:e,...y("root"),mod:[{visible:f,animate:p},m],...v})});pE.classes=p4;pE.displayName="@mantine/core/Skeleton";const[Wie,Gy]=bn("SliderProvider was not found in tree"),m4=C.forwardRef(({size:t,disabled:e,variant:n,color:r,thumbSize:o,radius:s,...i},a)=>{const{getStyles:l}=Gy();return g.jsx(J,{tabIndex:-1,variant:n,size:t,ref:a,...l("root"),...i})});m4.displayName="@mantine/core/SliderRoot";const WS=C.forwardRef(({max:t,min:e,value:n,position:r,label:o,dragging:s,onMouseDown:i,onKeyDownCapture:a,labelTransitionProps:l,labelAlwaysOn:c,thumbLabel:u,onFocus:d,onBlur:f,showLabelOnHover:h,isHovered:p,children:m=null,disabled:v},y)=>{const{getStyles:b}=Gy(),[w,S]=C.useState(!1),_=c||s||w||h&&p;return g.jsxs(J,{tabIndex:0,role:"slider","aria-label":u,"aria-valuemax":t,"aria-valuemin":e,"aria-valuenow":n,ref:y,__vars:{"--slider-thumb-offset":`${r}%`},...b("thumb",{focusable:!0}),mod:{dragging:s,disabled:v},onFocus:()=>{S(!0),typeof d=="function"&&d()},onBlur:()=>{S(!1),typeof f=="function"&&f()},onTouchStart:i,onMouseDown:i,onKeyDownCapture:a,onClick:k=>k.stopPropagation(),children:[m,g.jsx(To,{mounted:o!=null&&!!_,transition:"fade",duration:0,...l,children:k=>g.jsx("div",{...b("label",{style:k}),children:o})})]})});WS.displayName="@mantine/core/SliderThumb";function US({value:t,min:e,max:n}){const r=(t-e)/(n-e)*100;return Math.min(Math.max(r,0),100)}function Uie({mark:t,offset:e,value:n,inverted:r=!1}){return r?typeof e=="number"&&t.value<=e||t.value>=n:typeof e=="number"?t.value>=e&&t.value<=n:t.value<=n}function g4({marks:t,min:e,max:n,disabled:r,value:o,offset:s,inverted:i}){const{getStyles:a}=Gy();if(!t)return null;const l=t.map((c,u)=>C.createElement(J,{...a("markWrapper"),__vars:{"--mark-offset":`${US({value:c.value,min:e,max:n})}%`},key:u},g.jsx(J,{...a("mark"),mod:{filled:Uie({mark:c,value:o,offset:s,inverted:i}),disabled:r}}),c.label&&g.jsx("div",{...a("markLabel"),children:c.label})));return g.jsx("div",{children:l})}g4.displayName="@mantine/core/SliderMarks";function v4({filled:t,children:e,offset:n,disabled:r,marksOffset:o,inverted:s,containerProps:i,...a}){const{getStyles:l}=Gy();return g.jsx(g.Fragment,{children:g.jsx(J,{...l("trackContainer"),mod:{disabled:r},...i,children:g.jsxs(J,{...l("track"),mod:{inverted:s,disabled:r},children:[g.jsx(J,{mod:{inverted:s,disabled:r},__vars:{"--slider-bar-width":`calc(${t}% + var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...l("bar")}),e,g.jsx(g4,{...a,offset:o,disabled:r,inverted:s})]})})})}v4.displayName="@mantine/core/SliderTrack";function JP({value:t,containerWidth:e,min:n,max:r,step:o,precision:s}){const a=(e?Math.min(Math.max(t,0),e)/e:t)*(r-n),l=(a!==0?Math.round(a/o)*o:0)+n,c=Math.max(l,n);return s!==void 0?Number(c.toFixed(s)):c}function Ii(t,e){return parseFloat(t.toFixed(e))}function Gie(t){if(!t)return 0;const e=t.toString().split(".");return e.length>1?e[1].length:0}var y4={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};function Kie(t){return"TouchEvent"in window&&t instanceof window.TouchEvent?t.touches[0].clientX:t.clientX}const Yie=(t,{size:e,color:n,thumbSize:r,radius:o})=>({root:{"--slider-size":$e(e,"slider-size"),"--slider-color":n?yt(n,t):void 0,"--slider-radius":o===void 0?void 0:dt(o),"--slider-thumb-size":r!==void 0?Y(r):"calc(var(--slider-size) * 2)"}}),qie={min:0,max:100,minRange:10,step:1,marks:[],label:t=>t,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,showLabelOnHover:!0,disabled:!1,scale:t=>t},mE=ee((t,e)=>{const n=K("RangeSlider",qie,t),{classNames:r,styles:o,value:s,onChange:i,onChangeEnd:a,size:l,min:c,max:u,minRange:d,maxRange:f,step:h,precision:p,defaultValue:m,name:v,marks:y,label:b,labelTransitionProps:w,labelAlwaysOn:S,thumbFromLabel:_,thumbToLabel:k,showLabelOnHover:M,thumbChildren:T,disabled:P,unstyled:A,scale:L,inverted:V,className:H,style:z,vars:N,hiddenInputProps:D,...F}=n,I=be({name:"Slider",props:n,classes:y4,classNames:r,className:H,styles:o,style:z,vars:N,varsResolver:Yie,unstyled:A}),{dir:$}=Lr(),[j,W]=C.useState(-1),[G,X]=C.useState(!1),[q,B]=yn({value:s,defaultValue:m,finalValue:[c,u],onChange:i}),Q=C.useRef(q),Z=C.useRef([]),oe=C.useRef(void 0),te=[US({value:q[0],min:c,max:u}),US({value:q[1],min:c,max:u})],ne=p??Gie(h),pe=fe=>{B(fe),Q.current=fe};C.useEffect(()=>{Array.isArray(s)&&(Q.current=s)},Array.isArray(s)?[s[0],s[1]]:[null,null]);const ie=(fe,Me,Ie)=>{const Be=[...Q.current];Be[Me]=fe,Me===0&&(fe>Be[1]-(d-1e-9)&&(Be[1]=Math.min(fe+d,u)),fe>(u-(d-1e-9)||c)&&(Be[Me]=Q.current[Me]),Be[1]-fe>f&&(Be[1]=fe+f)),Me===1&&(fe<Be[0]+d&&(Be[0]=Math.max(fe-d,c)),fe<Be[0]+d&&(Be[Me]=Q.current[Me]),fe-Be[0]>f&&(Be[0]=fe-f)),Be[0]=Ii(Be[0],ne),Be[1]=Ii(Be[1],ne),pe(Be),Ie&&(a==null||a(Q.current))},le=fe=>{if(!P){const Me=JP({value:fe,min:c,max:u,step:h,precision:ne});ie(Me,oe.current,!1)}},{ref:ce,active:ye}=Mk(({x:fe})=>le(fe),{onScrubEnd:()=>a==null?void 0:a(Q.current)},$);function xe(fe){oe.current=fe}const Ce=fe=>{ce.current.focus();const Me=ce.current.getBoundingClientRect(),Ie=Kie(fe.nativeEvent),Be=JP({value:Ie-Me.left,max:u,min:c,step:h,containerWidth:Me.width}),et=Math.abs(q[0]-Be)>Math.abs(q[1]-Be)?1:0,mt=$==="ltr"?et:et===1?0:1;oe.current=mt},se=()=>j!==1&&j!==0?(W(0),0):j,ue=fe=>{if(!P)switch(fe.key){case"ArrowUp":{fe.preventDefault();const Me=se();Z.current[Me].focus(),ie(Ii(Math.min(Math.max(Q.current[Me]+h,c),u),ne),Me,!0);break}case"ArrowRight":{fe.preventDefault();const Me=se();Z.current[Me].focus(),ie(Ii(Math.min(Math.max($==="rtl"?Q.current[Me]-h:Q.current[Me]+h,c),u),ne),Me,!0);break}case"ArrowDown":{fe.preventDefault();const Me=se();Z.current[Me].focus(),ie(Ii(Math.min(Math.max(Q.current[Me]-h,c),u),ne),Me,!0);break}case"ArrowLeft":{fe.preventDefault();const Me=se();Z.current[Me].focus(),ie(Ii(Math.min(Math.max($==="rtl"?Q.current[Me]+h:Q.current[Me]-h,c),u),ne),Me,!0);break}}},ve={max:u,min:c,size:l,labelTransitionProps:w,labelAlwaysOn:S,onBlur:()=>W(-1)},Oe=Array.isArray(T);return g.jsx(Wie,{value:{getStyles:I},children:g.jsxs(m4,{...F,size:l,ref:e,disabled:P,children:[g.jsxs(v4,{offset:te[0],marksOffset:q[0],filled:te[1]-te[0],marks:y,inverted:V,min:c,max:u,value:q[1],disabled:P,containerProps:{ref:ce,onMouseEnter:M?()=>X(!0):void 0,onMouseLeave:M?()=>X(!1):void 0,onTouchStartCapture:Ce,onTouchEndCapture:()=>{oe.current=-1},onMouseDownCapture:Ce,onMouseUpCapture:()=>{oe.current=-1},onKeyDownCapture:ue},children:[g.jsx(WS,{...ve,value:L(q[0]),position:te[0],dragging:ye,label:typeof b=="function"?b(Ii(L(q[0]),ne)):b,ref:fe=>{Z.current[0]=fe},thumbLabel:_,onMouseDown:()=>xe(0),onFocus:()=>W(0),showLabelOnHover:M,isHovered:G,disabled:P,children:Oe?T[0]:T}),g.jsx(WS,{...ve,thumbLabel:k,value:L(q[1]),position:te[1],dragging:ye,label:typeof b=="function"?b(Ii(L(q[1]),ne)):b,ref:fe=>{Z.current[1]=fe},onMouseDown:()=>xe(1),onFocus:()=>W(1),showLabelOnHover:M,isHovered:G,disabled:P,children:Oe?T[1]:T})]}),g.jsx("input",{type:"hidden",name:`${v}_from`,value:q[0],...D}),g.jsx("input",{type:"hidden",name:`${v}_to`,value:q[1],...D})]})})});mE.classes=y4;mE.displayName="@mantine/core/RangeSlider";var b4={root:"m_6d731127"};const Xie={gap:"md",align:"stretch",justify:"flex-start"},Jie=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":Dt(e),"--stack-align":n,"--stack-justify":r}}),Ky=ee((t,e)=>{const n=K("Stack",Xie,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,align:c,justify:u,gap:d,variant:f,...h}=n,p=be({name:"Stack",props:n,classes:b4,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Jie});return g.jsx(J,{ref:e,...p("root"),variant:f,...h})});Ky.classes=b4;Ky.displayName="@mantine/core/Stack";const[Qie,Zie]=bn("Stepper component was not found in tree"),wv=()=>null;wv.displayName="@mantine/core/StepperCompleted";var gE={root:"m_cbb4ea7e",steps:"m_aaf89d0b",separator:"m_2a371ac9",content:"m_78da155d",step:"m_cbb57068","step--horizontal":"m_f56b1e2c","step--vertical":"m_833edb7e",verticalSeparator:"m_6496b3f3",stepWrapper:"m_818e70b",stepIcon:"m_1959ad01",stepCompletedIcon:"m_a79331dc",stepBody:"m_1956aa2a",stepLabel:"m_12051f6c",stepDescription:"m_164eea74"};const fm=(t,e)=>typeof t=="function"?g.jsx(t,{step:e||0}):t,eae={withIcon:!0,allowStepClick:!0,iconPosition:"left"},vE=ee((t,e)=>{const{classNames:n,className:r,style:o,styles:s,vars:i,step:a,state:l,color:c,icon:u,completedIcon:d,progressIcon:f,label:h,description:p,withIcon:m,iconSize:v,loading:y,allowStepClick:b,allowStepSelect:w,iconPosition:S,orientation:_,mod:k,...M}=K("StepperStep",eae,t),T=Zie(),P=Xt(),A={classNames:n,styles:s},L=l==="stepCompleted"?null:l==="stepProgress"?f:u,V={"data-progress":l==="stepProgress"||void 0,"data-completed":l==="stepCompleted"||void 0};return g.jsxs(un,{...T.getStyles("step",{className:r,style:o,variant:T.orientation,...A}),mod:[{"icon-position":S||T.iconPosition,"allow-click":b},k],ref:e,...V,...M,__vars:{"--step-color":c?yt(c,P):void 0},tabIndex:b?0:-1,children:[m&&g.jsxs("span",{...T.getStyles("stepWrapper",A),children:[g.jsxs("span",{...T.getStyles("stepIcon",A),...V,children:[g.jsx(To,{mounted:l==="stepCompleted",transition:"pop",duration:200,children:H=>g.jsx("span",{...T.getStyles("stepCompletedIcon",{style:H,...A}),children:y?g.jsx(ka,{color:"var(--mantine-color-white)",size:"calc(var(--stepper-icon-size) / 2)",...T.getStyles("stepLoader",A)}):fm(d,a)||g.jsx(by,{size:"60%"})})}),l!=="stepCompleted"?y?g.jsx(ka,{...T.getStyles("stepLoader",A),size:"calc(var(--stepper-icon-size) / 2)",color:c}):fm(L||u,a):null]}),_==="vertical"&&g.jsx("span",{...T.getStyles("verticalSeparator",A),"data-active":l==="stepCompleted"||void 0})]}),(h||p)&&g.jsxs("span",{...T.getStyles("stepBody",A),"data-orientation":T.orientation,"data-icon-position":S||T.iconPosition,children:[h&&g.jsx("span",{...T.getStyles("stepLabel",A),children:fm(h,a)}),p&&g.jsx("span",{...T.getStyles("stepDescription",A),children:fm(p,a)})]})]})});vE.classes=gE;vE.displayName="@mantine/core/StepperStep";const tae={orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0,wrap:!0},nae=(t,{color:e,iconSize:n,size:r,contentPadding:o,radius:s,autoContrast:i})=>({root:{"--stepper-color":e?yt(e,t):void 0,"--stepper-icon-color":xi(i,t)?Fs({color:e,theme:t,autoContrast:i}):void 0,"--stepper-icon-size":n===void 0?$e(r,"stepper-icon-size"):Y(n),"--stepper-content-padding":Dt(o),"--stepper-radius":s===void 0?void 0:dt(s),"--stepper-fz":vn(r),"--stepper-spacing":Dt(r)}}),Yy=ee((t,e)=>{var I,$,j;const n=K("Stepper",tae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,children:c,onStepClick:u,active:d,icon:f,completedIcon:h,progressIcon:p,color:m,iconSize:v,contentPadding:y,orientation:b,iconPosition:w,size:S,radius:_,allowNextStepsSelect:k,wrap:M,autoContrast:T,...P}=n,A=be({name:"Stepper",classes:gE,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:nae}),L=C.Children.toArray(c),V=L.filter(W=>W.type!==wv),H=L.find(W=>W.type===wv),z=V.reduce((W,G,X)=>{const q=d===X?"stepProgress":d>X?"stepCompleted":"stepInactive",Q=typeof u!="function"?!1:typeof G.props.allowStepSelect=="boolean"?G.props.allowStepSelect:q==="stepCompleted"||k;return W.push(C.cloneElement(G,{icon:G.props.icon||f||X+1,key:X,step:X,state:q,onClick:()=>Q&&(u==null?void 0:u(X)),allowStepClick:Q,completedIcon:G.props.completedIcon||h,progressIcon:G.props.progressIcon||p,color:G.props.color||m,iconSize:v,radius:_,iconPosition:G.props.iconPosition||w,orientation:b,unstyled:a})),b==="horizontal"&&X!==V.length-1&&W.push(C.createElement("div",{...A("separator"),"data-active":X<d||void 0,"data-orientation":b,key:`separator-${X}`})),W},[]),N=($=(I=V[d])==null?void 0:I.props)==null?void 0:$.children,D=(j=H==null?void 0:H.props)==null?void 0:j.children,F=d>V.length-1?D:N;return g.jsx(Qie,{value:{getStyles:A,orientation:b,iconPosition:w},children:g.jsxs(J,{...A("root"),ref:e,size:S,...P,children:[g.jsx(J,{...A("steps"),mod:{orientation:b,"icon-position":w,wrap:M&&b!=="vertical"},children:z}),F&&g.jsx("div",{...A("content"),children:F})]})})});Yy.classes=gE;Yy.displayName="@mantine/core/Stepper";Yy.Completed=wv;Yy.Step=vE;const w4=C.createContext(null),rae=w4.Provider,oae=()=>C.useContext(w4),sae={},yE=ee((t,e)=>{const{value:n,defaultValue:r,onChange:o,size:s,wrapperProps:i,children:a,readOnly:l,...c}=K("SwitchGroup",sae,t),[u,d]=yn({value:n,defaultValue:r,finalValue:[],onChange:o}),f=h=>{const p=h.currentTarget.value;!l&&d(u.includes(p)?u.filter(m=>m!==p):[...u,p])};return g.jsx(rae,{value:{value:u,onChange:f,size:s},children:g.jsx(wt.Wrapper,{size:s,ref:e,...i,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:g.jsx(M2,{role:"group",children:a})})})});yE.classes=wt.Wrapper.classes;yE.displayName="@mantine/core/SwitchGroup";var x4={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const iae={labelPosition:"right"},aae=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:dt(e),"--switch-height":$e(r,"switch-height"),"--switch-width":$e(r,"switch-width"),"--switch-thumb-size":$e(r,"switch-thumb-size"),"--switch-label-font-size":$e(r,"switch-label-font-size"),"--switch-track-label-padding":$e(r,"switch-track-label-padding"),"--switch-color":n?yt(n,t):void 0}}),pp=ee((t,e)=>{const n=K("Switch",iae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,color:c,label:u,offLabel:d,onLabel:f,id:h,size:p,radius:m,wrapperProps:v,children:y,thumbIcon:b,checked:w,defaultChecked:S,onChange:_,labelPosition:k,description:M,error:T,disabled:P,variant:A,rootRef:L,mod:V,...H}=n,z=oae(),N=p||(z==null?void 0:z.size),D=be({name:"Switch",props:n,classes:x4,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:aae}),{styleProps:F,rest:I}=Ba(H),$=mr(h),j=z?{checked:z.value.includes(I.value),onChange:z.onChange}:{},[W,G]=yn({value:j.checked??w,defaultValue:S,finalValue:!1});return g.jsxs(yy,{...D("root"),__staticSelector:"Switch",__stylesApiProps:n,id:$,size:N,labelPosition:k,label:u,description:M,error:T,disabled:P,bodyElement:"label",labelElement:"span",classNames:r,styles:i,unstyled:a,"data-checked":j.checked||void 0,variant:A,ref:L,mod:V,...F,...v,children:[g.jsx("input",{...I,disabled:P,checked:W,onChange:X=>{var q;z?(q=j.onChange)==null||q.call(j,X):_==null||_(X),G(X.currentTarget.checked)},id:$,ref:e,type:"checkbox",role:"switch",...D("input")}),g.jsxs(J,{"aria-hidden":"true",mod:{error:T,"label-position":k},...D("track"),children:[g.jsx(J,{component:"span",mod:"reduce-motion",...D("thumb"),children:b}),g.jsx("span",{...D("trackLabel"),children:W?f:d})]})]})});pp.classes={...x4,...hF};pp.displayName="@mantine/core/Switch";pp.Group=yE;const[lae,cae]=bn("Table component was not found in the tree");var mp={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 uae(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function mc(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=ee((o,s)=>{const i=K(n,{},o),{classNames:a,className:l,style:c,styles:u,...d}=i,f=cae();return g.jsx(J,{component:t,ref:s,...uae(f,e),...f.getStyles(t,{className:l,classNames:a,style:c,styles:u,props:i}),...d})});return r.displayName=`@mantine/core/${n}`,r.classes=mp,r}const Wu=mc("th",{columnBorder:!0}),qy=mc("td",{columnBorder:!0}),ci=mc("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),bE=mc("thead",{stickyHeader:!0}),Pf=mc("tbody"),wE=mc("tfoot"),S4=mc("caption",{captionSide:!0});function xE({data:t}){return g.jsxs(g.Fragment,{children:[t.caption&&g.jsx(S4,{children:t.caption}),t.head&&g.jsx(bE,{children:g.jsx(ci,{children:t.head.map((e,n)=>g.jsx(Wu,{children:e},n))})}),t.body&&g.jsx(Pf,{children:t.body.map((e,n)=>g.jsx(ci,{children:e.map((r,o)=>g.jsx(qy,{children:r},o))},n))}),t.foot&&g.jsx(wE,{children:g.jsx(ci,{children:t.foot.map((e,n)=>g.jsx(Wu,{children:e},n))})})]})}xE.displayName="@mantine/core/TableDataRenderer";const dae={type:"scrollarea"},fae=(t,{minWidth:e,type:n})=>({scrollContainer:{"--table-min-width":Y(e),"--table-overflow":n==="native"?"auto":void 0}}),SE=ee((t,e)=>{const n=K("TableScrollContainer",dae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,children:c,minWidth:u,type:d,...f}=n,h=be({name:"TableScrollContainer",classes:mp,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:fae,rootSelector:"scrollContainer"});return g.jsx(J,{component:d==="scrollarea"?dd:"div",...d==="scrollarea"?{offsetScrollbars:"x"}:{},ref:e,...h("scrollContainer"),...f,children:g.jsx("div",{...h("scrollContainerInner"),children:c})})});SE.classes=mp;SE.displayName="@mantine/core/TableScrollContainer";const hae={withRowBorders:!0,verticalSpacing:7},pae=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:o,borderColor:s,stripedColor:i,highlightOnHoverColor:a,striped:l,highlightOnHover:c,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":Dt(r),"--table-vertical-spacing":Dt(o),"--table-border-color":s?yt(s,t):void 0,"--table-striped-color":l&&i?yt(i,t):void 0,"--table-highlight-on-hover-color":c&&a?yt(a,t):void 0,"--table-sticky-header-offset":d?Y(u):void 0}}),Po=ee((t,e)=>{const n=K("Table",hae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,horizontalSpacing:c,verticalSpacing:u,captionSide:d,stripedColor:f,highlightOnHoverColor:h,striped:p,highlightOnHover:m,withColumnBorders:v,withRowBorders:y,withTableBorder:b,borderColor:w,layout:S,variant:_,data:k,children:M,stickyHeader:T,stickyHeaderOffset:P,mod:A,...L}=n,V=be({name:"Table",props:n,className:o,style:s,classes:mp,classNames:r,styles:i,unstyled:a,rootSelector:"table",vars:l,varsResolver:pae});return g.jsx(lae,{value:{getStyles:V,stickyHeader:T,striped:p===!0?"odd":p||void 0,highlightOnHover:m,withColumnBorders:v,withRowBorders:y,captionSide:d||"bottom"},children:g.jsx(J,{component:"table",variant:_,ref:e,mod:[{"data-with-table-border":b},A],...V("table"),...L,children:M||!!k&&g.jsx(xE,{data:k})})})});Po.classes=mp;Po.displayName="@mantine/core/Table";Po.Td=qy;Po.Th=Wu;Po.Tr=ci;Po.Thead=bE;Po.Tbody=Pf;Po.Tfoot=wE;Po.Caption=S4;Po.ScrollContainer=SE;Po.DataRenderer=xE;const[mae,_E]=bn("Tabs component was not found in the tree");var gp={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",panel:"m_b0c91715",tab:"m_4ec4dce6",tabSection:"m_fc420b1f","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const gae={},CE=ee((t,e)=>{const n=K("TabsList",gae,t),{children:r,className:o,grow:s,justify:i,classNames:a,styles:l,style:c,mod:u,...d}=n,f=_E();return g.jsx(J,{...d,...f.getStyles("list",{className:o,style:c,classNames:a,styles:l,props:n,variant:f.variant}),ref:e,role:"tablist",variant:f.variant,mod:[{grow:s,orientation:f.orientation,placement:f.orientation==="vertical"&&f.placement,inverted:f.inverted},u],"aria-orientation":f.orientation,__vars:{"--tabs-justify":i},children:r})});CE.classes=gp;CE.displayName="@mantine/core/TabsList";const vae={},kE=ee((t,e)=>{const n=K("TabsPanel",vae,t),{children:r,className:o,value:s,classNames:i,styles:a,style:l,mod:c,...u}=n,d=_E(),f=d.value===s,h=d.keepMounted||n.keepMounted||f?r:null;return g.jsx(J,{...u,...d.getStyles("panel",{className:o,classNames:i,styles:a,style:[l,f?void 0:{display:"none"}],props:n}),ref:e,mod:[{orientation:d.orientation},c],role:"tabpanel",id:d.getPanelId(s),"aria-labelledby":d.getTabId(s),children:h})});kE.classes=gp;kE.displayName="@mantine/core/TabsPanel";const yae={},EE=ee((t,e)=>{const n=K("TabsTab",yae,t),{className:r,children:o,rightSection:s,leftSection:i,value:a,onClick:l,onKeyDown:c,disabled:u,color:d,style:f,classNames:h,styles:p,vars:m,mod:v,...y}=n,b=Xt(),{dir:w}=Lr(),S=_E(),_=a===S.value,k=T=>{S.onChange(S.allowTabDeactivation&&a===S.value?null:a),l==null||l(T)},M={classNames:h,styles:p,props:n};return g.jsxs(un,{...y,...S.getStyles("tab",{className:r,style:f,variant:S.variant,...M}),disabled:u,unstyled:S.unstyled,variant:S.variant,mod:[{active:_,disabled:u,orientation:S.orientation,inverted:S.inverted,placement:S.orientation==="vertical"&&S.placement},v],ref:e,role:"tab",id:S.getTabId(a),"aria-selected":_,tabIndex:_||S.value===null?0:-1,"aria-controls":S.getPanelId(a),onClick:k,__vars:{"--tabs-color":d?yt(d,b):void 0},onKeyDown:V5({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:S.activateTabWithKeyboard,loop:S.loop,orientation:S.orientation||"horizontal",dir:w,onKeyDown:c}),children:[i&&g.jsx("span",{...S.getStyles("tabSection",M),"data-position":"left",children:i}),o&&g.jsx("span",{...S.getStyles("tabLabel",M),children:o}),s&&g.jsx("span",{...S.getStyles("tabSection",M),"data-position":"right",children:s})]})});EE.classes=gp;EE.displayName="@mantine/core/TabsTab";const QP="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",bae={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},wae=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":dt(e),"--tabs-color":yt(n,t),"--tabs-text-color":xi(r,t)?Fs({color:n,theme:t,autoContrast:r}):void 0}}),vp=ee((t,e)=>{const n=K("Tabs",bae,t),{defaultValue:r,value:o,onChange:s,orientation:i,children:a,loop:l,id:c,activateTabWithKeyboard:u,allowTabDeactivation:d,variant:f,color:h,radius:p,inverted:m,placement:v,keepMounted:y,classNames:b,styles:w,unstyled:S,className:_,style:k,vars:M,autoContrast:T,mod:P,...A}=n,L=mr(c),[V,H]=yn({value:o,defaultValue:r,finalValue:null,onChange:s}),z=be({name:"Tabs",props:n,classes:gp,className:_,style:k,classNames:b,styles:w,unstyled:S,vars:M,varsResolver:wae});return g.jsx(mae,{value:{placement:v,value:V,orientation:i,id:L,loop:l,activateTabWithKeyboard:u,getTabId:JO(`${L}-tab`,QP),getPanelId:JO(`${L}-panel`,QP),onChange:H,allowTabDeactivation:d,variant:f,color:h,radius:p,inverted:m,keepMounted:y,unstyled:S,getStyles:z},children:g.jsx(J,{ref:e,id:L,variant:f,mod:[{orientation:i,inverted:i==="horizontal"&&m,placement:i==="vertical"&&v},P],...z("root"),...A,children:a})})});vp.classes=gp;vp.displayName="@mantine/core/Tabs";vp.Tab=EE;vp.Panel=kE;vp.List=CE;const xae={},wd=ee((t,e)=>{const n=K("TextInput",xae,t);return g.jsx(gr,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});wd.classes=gr.classes;wd.displayName="@mantine/core/TextInput";var _4={root:"m_7341320d"};const Sae={},_ae=(t,{size:e,radius:n,variant:r,gradient:o,color:s,autoContrast:i})=>{const a=t.variantColorResolver({color:s||t.primaryColor,theme:t,gradient:o,variant:r||"filled",autoContrast:i});return{root:{"--ti-size":$e(e,"ti-size"),"--ti-radius":n===void 0?void 0:dt(n),"--ti-bg":s||r?a.background:void 0,"--ti-color":s||r?a.color:void 0,"--ti-bd":s||r?a.border:void 0}}},C4=ee((t,e)=>{const n=K("ThemeIcon",Sae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,autoContrast:c,...u}=n,d=be({name:"ThemeIcon",classes:_4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:_ae});return g.jsx(J,{ref:e,...d("root"),...u})});C4.classes=_4;C4.displayName="@mantine/core/ThemeIcon";const Cae=["h1","h2","h3","h4","h5","h6"];function kae(t,e){const n=e!==void 0?e:`h${t}`;return Cae.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:{fontSize:Y(n),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var k4={root:"m_8a5d1357"};const Eae={order:1},Mae=(t,{order:e,size:n,lineClamp:r,textWrap:o})=>{const s=kae(e,n);return{root:{"--title-fw":s.fontWeight,"--title-lh":s.lineHeight,"--title-fz":s.fontSize,"--title-line-clamp":typeof r=="number"?r.toString():void 0,"--title-text-wrap":o}}},E4=ee((t,e)=>{const n=K("Title",Eae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,order:l,vars:c,size:u,variant:d,lineClamp:f,textWrap:h,mod:p,...m}=n,v=be({name:"Title",props:n,classes:k4,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:c,varsResolver:Mae});return[1,2,3,4,5,6].includes(l)?g.jsx(J,{...v("root"),component:`h${l}`,variant:d,ref:e,mod:[{order:l,"data-line-clamp":typeof f=="number"},p],size:u,...m}):null});E4.classes=k4;E4.displayName="@mantine/core/Title";var M4={root:"m_d6493fad"};const Tae={},ME=ee((t,e)=>{const n=K("TypographyStylesProvider",Tae,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,...l}=n,c=be({name:"TypographyStylesProvider",classes:M4,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a});return g.jsx(J,{ref:e,...c("root"),...l})});ME.classes=M4;ME.displayName="@mantine/core/TypographyStylesProvider";var T4={exports:{}},R4={};/**
 * @license React
 * use-sync-external-store-with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var yp=C;function Rae(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Oae=typeof Object.is=="function"?Object.is:Rae,Pae=yp.useSyncExternalStore,Aae=yp.useRef,Dae=yp.useEffect,Iae=yp.useMemo,Nae=yp.useDebugValue;R4.useSyncExternalStoreWithSelector=function(t,e,n,r,o){var s=Aae(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=Iae(function(){function l(h){if(!c){if(c=!0,u=h,h=r(h),o!==void 0&&i.hasValue){var p=i.value;if(o(p,h))return d=p}return d=h}if(p=d,Oae(u,h))return p;var m=r(h);return o!==void 0&&o(p,m)?p:(u=h,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,o]);var a=Pae(t,s[0],s[1]);return Dae(function(){i.hasValue=!0,i.value=a},[a]),Nae(a),a};T4.exports=R4;var Lae=T4.exports,Vr="default"in Kf?$t:Kf,ZP=Symbol.for("react-redux-context"),eA=typeof globalThis<"u"?globalThis:{};function jae(){if(!Vr.createContext)return{};const t=eA[ZP]??(eA[ZP]=new Map);let e=t.get(Vr.createContext);return e||(e=Vr.createContext(null),t.set(Vr.createContext,e)),e}var Ea=jae(),$ae=()=>{throw new Error("uSES not initialized!")};function TE(t=Ea){return function(){return Vr.useContext(t)}}var O4=TE(),P4=$ae,Fae=t=>{P4=t},zae=(t,e)=>t===e;function Bae(t=Ea){const e=t===Ea?O4:TE(t),n=(r,o={})=>{const{equalityFn:s=zae,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:a,subscription:l,getServerState:c,stabilityCheck:u,identityFunctionCheck:d}=e();Vr.useRef(!0);const f=Vr.useCallback({[r.name](p){return r(p)}}[r.name],[r,u,i.stabilityCheck]),h=P4(l.addNestedSub,a.getState,c||a.getState,f,s);return Vr.useDebugValue(h),h};return Object.assign(n,{withTypes:()=>n}),n}var j2e=Bae();function Vae(t){t()}function Hae(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Vae(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=e={callback:n,next:null,prev:e};return o.prev?o.prev.next=o:t=o,function(){!r||t===null||(r=!1,o.next?o.next.prev=o.prev:e=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var tA={notify(){},get:()=>[]};function Wae(t,e){let n,r=tA,o=0,s=!1;function i(m){u();const v=r.subscribe(m);let y=!1;return()=>{y||(y=!0,v(),d())}}function a(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function c(){return s}function u(){o++,n||(n=e?e.addNestedSub(l):t.subscribe(l),r=Hae())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=tA)}function f(){s||(s=!0,u())}function h(){s&&(s=!1,d())}const p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>r};return p}var Uae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gae=typeof navigator<"u"&&navigator.product==="ReactNative",Kae=Uae||Gae?Vr.useLayoutEffect:Vr.useEffect;function Yae({store:t,context:e,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=Vr.useMemo(()=>{const c=Wae(t);return{store:t,subscription:c,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[t,r,o,s]),a=Vr.useMemo(()=>t.getState(),[t]);Kae(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==t.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,a]);const l=e||Ea;return Vr.createElement(l.Provider,{value:i},n)}var $2e=Yae;function A4(t=Ea){const e=t===Ea?O4:TE(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var qae=A4();function Xae(t=Ea){const e=t===Ea?qae:A4(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var F2e=Xae();Fae(Lae.useSyncExternalStoreWithSelector);/**
 * @remix-run/router v1.15.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function bh(){return bh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bh.apply(this,arguments)}var Ji;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Ji||(Ji={}));const nA="popstate";function Jae(t){t===void 0&&(t={});function e(r,o){let{pathname:s,search:i,hash:a}=r.location;return GS("",{pathname:s,search:i,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:xv(o)}return Zae(e,n,null,t)}function nn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function RE(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Qae(){return Math.random().toString(36).substr(2,8)}function rA(t,e){return{usr:t.state,key:t.key,idx:e}}function GS(t,e,n,r){return n===void 0&&(n=null),bh({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?xd(e):e,{state:n,key:e&&e.key||r||Qae()})}function xv(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function xd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function Zae(t,e,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,a=Ji.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(bh({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}function d(){a=Ji.Pop;let v=u(),y=v==null?null:v-c;c=v,l&&l({action:a,location:m.location,delta:y})}function f(v,y){a=Ji.Push;let b=GS(m.location,v,y);n&&n(b,v),c=u()+1;let w=rA(b,c),S=m.createHref(b);try{i.pushState(w,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(v,y){a=Ji.Replace;let b=GS(m.location,v,y);n&&n(b,v),c=u();let w=rA(b,c),S=m.createHref(b);i.replaceState(w,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function p(v){let y=o.location.origin!=="null"?o.location.origin:o.location.href,b=typeof v=="string"?v:xv(v);return nn(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return a},get location(){return t(o,i)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(nA,d),l=v,()=>{o.removeEventListener(nA,d),l=null}},createHref(v){return e(o,v)},createURL:p,encodeLocation(v){let y=p(v);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(v){return i.go(v)}};return m}var oA;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(oA||(oA={}));function ele(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?xd(e):e,o=OE(r.pathname||"/",n);if(o==null)return null;let s=D4(t);tle(s);let i=null;for(let a=0;i==null&&a<s.length;++a)i=ule(s[a],hle(o));return i}function D4(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(s,i,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(nn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ha([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(nn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),D4(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:lle(c,s.index),routesMeta:u})};return t.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let l of I4(s.path))o(s,i,l)}),e}function I4(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=I4(r.join("/")),a=[];return a.push(...i.map(l=>l===""?s:[s,l].join("/"))),o&&a.push(...i),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function tle(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:cle(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nle=/^:[\w-]+$/,rle=3,ole=2,sle=1,ile=10,ale=-2,sA=t=>t==="*";function lle(t,e){let n=t.split("/"),r=n.length;return n.some(sA)&&(r+=ale),e&&(r+=ole),n.filter(o=>!sA(o)).reduce((o,s)=>o+(nle.test(s)?rle:s===""?sle:ile),r)}function cle(t,e){return t.length===e.length&&t.slice(0,-1).every((r,o)=>r===e[o])?t[t.length-1]-e[e.length-1]:0}function ule(t,e){let{routesMeta:n}=t,r={},o="/",s=[];for(let i=0;i<n.length;++i){let a=n[i],l=i===n.length-1,c=o==="/"?e:e.slice(o.length)||"/",u=dle({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!u)return null;Object.assign(r,u.params);let d=a.route;s.push({params:r,pathname:ha([o,u.pathname]),pathnameBase:yle(ha([o,u.pathnameBase])),route:d}),u.pathnameBase!=="/"&&(o=ha([o,u.pathnameBase]))}return s}function dle(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=fle(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let m=a[d]||"";i=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return h&&!p?c[f]=void 0:c[f]=ple(p||"",f),c},{}),pathname:s,pathnameBase:i,pattern:t}}function fle(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),RE(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),r]}function hle(t){try{return decodeURI(t)}catch(e){return RE(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function ple(t,e){try{return decodeURIComponent(t)}catch(n){return RE(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function OE(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function mle(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:o=""}=typeof t=="string"?xd(t):t;return{pathname:n?n.startsWith("/")?n:gle(n,e):e,search:ble(r),hash:wle(o)}}function gle(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function rw(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function vle(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function PE(t,e){let n=vle(t);return e?n.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function AE(t,e,n,r){r===void 0&&(r=!1);let o;typeof t=="string"?o=xd(t):(o=bh({},t),nn(!o.pathname||!o.pathname.includes("?"),rw("?","pathname","search",o)),nn(!o.pathname||!o.pathname.includes("#"),rw("#","pathname","hash",o)),nn(!o.search||!o.search.includes("#"),rw("#","search","hash",o)));let s=t===""||o.pathname==="",i=s?"/":o.pathname,a;if(i==null)a=n;else{let d=e.length-1;if(!r&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=mle(o,a),c=i&&i!=="/"&&i.endsWith("/"),u=(s||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ha=t=>t.join("/").replace(/\/\/+/g,"/"),yle=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),ble=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wle=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function xle(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const N4=["post","put","patch","delete"];new Set(N4);const Sle=["get",...N4];new Set(Sle);/**
 * React Router v6.22.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function wh(){return wh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},wh.apply(this,arguments)}const DE=C.createContext(null),_le=C.createContext(null),Ua=C.createContext(null),Xy=C.createContext(null),zs=C.createContext({outlet:null,matches:[],isDataRoute:!1}),L4=C.createContext(null);function Cle(t,e){let{relative:n}=e===void 0?{}:e;Sd()||nn(!1);let{basename:r,navigator:o}=C.useContext(Ua),{hash:s,pathname:i,search:a}=F4(t,{relative:n}),l=i;return r!=="/"&&(l=i==="/"?r:ha([r,i])),o.createHref({pathname:l,search:a,hash:s})}function Sd(){return C.useContext(Xy)!=null}function bp(){return Sd()||nn(!1),C.useContext(Xy).location}function j4(t){C.useContext(Ua).static||C.useLayoutEffect(t)}function $4(){let{isDataRoute:t}=C.useContext(zs);return t?Fle():kle()}function kle(){Sd()||nn(!1);let t=C.useContext(DE),{basename:e,future:n,navigator:r}=C.useContext(Ua),{matches:o}=C.useContext(zs),{pathname:s}=bp(),i=JSON.stringify(PE(o,n.v7_relativeSplatPath)),a=C.useRef(!1);return j4(()=>{a.current=!0}),C.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=AE(c,JSON.parse(i),s,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:ha([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,i,s,t])}const Ele=C.createContext(null);function Mle(t){let e=C.useContext(zs).outlet;return e&&C.createElement(Ele.Provider,{value:t},e)}function z2e(){let{matches:t}=C.useContext(zs),e=t[t.length-1];return e?e.params:{}}function F4(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=C.useContext(Ua),{matches:o}=C.useContext(zs),{pathname:s}=bp(),i=JSON.stringify(PE(o,r.v7_relativeSplatPath));return C.useMemo(()=>AE(t,JSON.parse(i),s,n==="path"),[t,i,s,n])}function Tle(t,e){return Rle(t,e)}function Rle(t,e,n,r){Sd()||nn(!1);let{navigator:o}=C.useContext(Ua),{matches:s}=C.useContext(zs),i=s[s.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=bp(),u;if(e){var d;let v=typeof e=="string"?xd(e):e;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||nn(!1),u=v}else u=c;let f=u.pathname||"/",h=l==="/"?f:f.slice(l.length)||"/",p=ele(t,{pathname:h}),m=Ile(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:ha([l,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:ha([l,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,n,r);return e&&m?C.createElement(Xy.Provider,{value:{location:wh({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ji.Pop}},m):m}function Ole(){let t=$le(),e=xle(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:o},n):null,null)}const Ple=C.createElement(Ole,null);class Ale extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?C.createElement(zs.Provider,{value:this.props.routeContext},C.createElement(L4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dle(t){let{routeContext:e,match:n,children:r}=t,o=C.useContext(DE);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(zs.Provider,{value:e},r)}function Ile(t,e,n,r){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if((s=n)!=null&&s.errors)t=n.matches;else return null}let i=t,a=(o=n)==null?void 0:o.errors;if(a!=null){let u=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id]));u>=0||nn(!1),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<i.length;u++){let d=i[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=n,p=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||p){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((u,d,f)=>{let h,p=!1,m=null,v=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||Ple,l&&(c<0&&f===0?(zle("route-fallback",!1),p=!0,v=null):c===f&&(p=!0,v=d.route.hydrateFallbackElement||null)));let y=e.concat(i.slice(0,f+1)),b=()=>{let w;return h?w=m:p?w=v:d.route.Component?w=C.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=u,C.createElement(Dle,{match:d,routeContext:{outlet:u,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?C.createElement(Ale,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var z4=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(z4||{}),Sv=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Sv||{});function Nle(t){let e=C.useContext(DE);return e||nn(!1),e}function Lle(t){let e=C.useContext(_le);return e||nn(!1),e}function jle(t){let e=C.useContext(zs);return e||nn(!1),e}function B4(t){let e=jle(),n=e.matches[e.matches.length-1];return n.route.id||nn(!1),n.route.id}function $le(){var t;let e=C.useContext(L4),n=Lle(Sv.UseRouteError),r=B4(Sv.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Fle(){let{router:t}=Nle(z4.UseNavigateStable),e=B4(Sv.UseNavigateStable),n=C.useRef(!1);return j4(()=>{n.current=!0}),C.useCallback(function(o,s){s===void 0&&(s={}),n.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,wh({fromRouteId:e},s)))},[t,e])}const iA={};function zle(t,e,n){!e&&!iA[t]&&(iA[t]=!0)}function B2e(t){let{to:e,replace:n,state:r,relative:o}=t;Sd()||nn(!1);let{future:s,static:i}=C.useContext(Ua),{matches:a}=C.useContext(zs),{pathname:l}=bp(),c=$4(),u=AE(e,PE(a,s.v7_relativeSplatPath),l,o==="path"),d=JSON.stringify(u);return C.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:o}),[c,d,o,n,r]),null}function V2e(t){return Mle(t.context)}function Ble(t){nn(!1)}function Vle(t){let{basename:e="/",children:n=null,location:r,navigationType:o=Ji.Pop,navigator:s,static:i=!1,future:a}=t;Sd()&&nn(!1);let l=e.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:l,navigator:s,static:i,future:wh({v7_relativeSplatPath:!1},a)}),[l,a,s,i]);typeof r=="string"&&(r=xd(r));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,m=C.useMemo(()=>{let v=OE(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:h,key:p},navigationType:o}},[l,u,d,f,h,p,o]);return m==null?null:C.createElement(Ua.Provider,{value:c},C.createElement(Xy.Provider,{children:n,value:m}))}function H2e(t){let{children:e,location:n}=t;return Tle(KS(e),n)}new Promise(()=>{});function KS(t,e){e===void 0&&(e=[]);let n=[];return C.Children.forEach(t,(r,o)=>{if(!C.isValidElement(r))return;let s=[...e,o];if(r.type===C.Fragment){n.push.apply(n,KS(r.props.children,s));return}r.type!==Ble&&nn(!1),!r.props.index||!r.props.children||nn(!1);let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=KS(r.props.children,s)),n.push(i)}),n}/**
 * React Router DOM v6.22.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function YS(){return YS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},YS.apply(this,arguments)}function Hle(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Wle(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ule(t,e){return t.button===0&&(!e||e==="_self")&&!Wle(t)}const Gle=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Kle="6";try{window.__reactRouterVersion=Kle}catch{}const Yle="startTransition",aA=Kf[Yle];function W2e(t){let{basename:e,children:n,future:r,window:o}=t,s=C.useRef();s.current==null&&(s.current=Jae({window:o,v5Compat:!0}));let i=s.current,[a,l]=C.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},u=C.useCallback(d=>{c&&aA?aA(()=>l(d)):l(d)},[l,c]);return C.useLayoutEffect(()=>i.listen(u),[i,u]),C.createElement(Vle,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}const qle=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xle=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U2e=C.forwardRef(function(e,n){let{onClick:r,relative:o,reloadDocument:s,replace:i,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=e,f=Hle(e,Gle),{basename:h}=C.useContext(Ua),p,m=!1;if(typeof c=="string"&&Xle.test(c)&&(p=c,qle))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),_=OE(S.pathname,h);S.origin===w.origin&&_!=null?c=_+S.search+S.hash:m=!0}catch{}let v=Cle(c,{relative:o}),y=Jle(c,{replace:i,state:a,target:l,preventScrollReset:u,relative:o,unstable_viewTransition:d});function b(w){r&&r(w),w.defaultPrevented||y(w)}return C.createElement("a",YS({},f,{href:p||v,onClick:m||s?r:b,ref:n,target:l}))});var lA;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(lA||(lA={}));var cA;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(cA||(cA={}));function Jle(t,e){let{target:n,replace:r,state:o,preventScrollReset:s,relative:i,unstable_viewTransition:a}=e===void 0?{}:e,l=$4(),c=bp(),u=F4(t,{relative:i});return C.useCallback(d=>{if(Ule(d,n)){d.preventDefault();let f=r!==void 0?r:xv(c)===xv(u);l(t,{replace:f,state:o,preventScrollReset:s,relative:i,unstable_viewTransition:a})}},[c,l,u,r,o,n,t,s,i,a])}function Dn(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Qle=typeof Symbol=="function"&&Symbol.observable||"@@observable",uA=Qle,ow=()=>Math.random().toString(36).substring(7).split("").join("."),Zle={INIT:`@@redux/INIT${ow()}`,REPLACE:`@@redux/REPLACE${ow()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ow()}`},_v=Zle;function IE(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function V4(t,e,n){if(typeof t!="function")throw new Error(Dn(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Dn(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Dn(1));return n(V4)(t,e)}let r=t,o=e,s=new Map,i=s,a=0,l=!1;function c(){i===s&&(i=new Map,s.forEach((v,y)=>{i.set(y,v)}))}function u(){if(l)throw new Error(Dn(3));return o}function d(v){if(typeof v!="function")throw new Error(Dn(4));if(l)throw new Error(Dn(5));let y=!0;c();const b=a++;return i.set(b,v),function(){if(y){if(l)throw new Error(Dn(6));y=!1,c(),i.delete(b),s=null}}}function f(v){if(!IE(v))throw new Error(Dn(7));if(typeof v.type>"u")throw new Error(Dn(8));if(typeof v.type!="string")throw new Error(Dn(17));if(l)throw new Error(Dn(9));try{l=!0,o=r(o,v)}finally{l=!1}return(s=i).forEach(b=>{b()}),v}function h(v){if(typeof v!="function")throw new Error(Dn(10));r=v,f({type:_v.REPLACE})}function p(){const v=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Dn(11));function b(){const S=y;S.next&&S.next(u())}return b(),{unsubscribe:v(b)}},[uA](){return this}}}return f({type:_v.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[uA]:p}}function ece(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:_v.INIT})>"u")throw new Error(Dn(12));if(typeof n(void 0,{type:_v.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Dn(13))})}function tce(t){const e=Object.keys(t),n={};for(let s=0;s<e.length;s++){const i=e[s];typeof t[i]=="function"&&(n[i]=t[i])}const r=Object.keys(n);let o;try{ece(n)}catch(s){o=s}return function(i={},a){if(o)throw o;let l=!1;const c={};for(let u=0;u<r.length;u++){const d=r[u],f=n[d],h=i[d],p=f(h,a);if(typeof p>"u")throw a&&a.type,new Error(Dn(14));c[d]=p,l=l||p!==h}return l=l||r.length!==Object.keys(i).length,l?c:i}}function Cv(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function nce(...t){return e=>(n,r)=>{const o=e(n,r);let s=()=>{throw new Error(Dn(15))};const i={getState:o.getState,dispatch:(l,...c)=>s(l,...c)},a=t.map(l=>l(i));return s=Cv(...a)(o.dispatch),{...o,dispatch:s}}}function rce(t){return IE(t)&&"type"in t&&typeof t.type=="string"}var H4=Symbol.for("immer-nothing"),dA=Symbol.for("immer-draftable"),Xr=Symbol.for("immer-state");function Bo(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Uu=Object.getPrototypeOf;function Ma(t){return!!t&&!!t[Xr]}function vi(t){var e;return t?W4(t)||Array.isArray(t)||!!t[dA]||!!((e=t.constructor)!=null&&e[dA])||Qy(t)||Zy(t):!1}var oce=Object.prototype.constructor.toString();function W4(t){if(!t||typeof t!="object")return!1;const e=Uu(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===oce}function xh(t,e){Jy(t)===0?Object.entries(t).forEach(([n,r])=>{e(n,r,t)}):t.forEach((n,r)=>e(r,n,t))}function Jy(t){const e=t[Xr];return e?e.type_:Array.isArray(t)?1:Qy(t)?2:Zy(t)?3:0}function qS(t,e){return Jy(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function U4(t,e,n){const r=Jy(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function sce(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Qy(t){return t instanceof Map}function Zy(t){return t instanceof Set}function dl(t){return t.copy_||t.base_}function XS(t,e){if(Qy(t))return new Map(t);if(Zy(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);if(!e&&W4(t))return Uu(t)?{...t}:Object.assign(Object.create(null),t);const n=Object.getOwnPropertyDescriptors(t);delete n[Xr];let r=Reflect.ownKeys(n);for(let o=0;o<r.length;o++){const s=r[o],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[s]})}return Object.create(Uu(t),n)}function NE(t,e=!1){return eb(t)||Ma(t)||!vi(t)||(Jy(t)>1&&(t.set=t.add=t.clear=t.delete=ice),Object.freeze(t),e&&xh(t,(n,r)=>NE(r,!0))),t}function ice(){Bo(2)}function eb(t){return Object.isFrozen(t)}var ace={};function Ql(t){const e=ace[t];return e||Bo(0,t),e}var Sh;function G4(){return Sh}function lce(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function fA(t,e){e&&(Ql("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function JS(t){QS(t),t.drafts_.forEach(cce),t.drafts_=null}function QS(t){t===Sh&&(Sh=t.parent_)}function hA(t){return Sh=lce(Sh,t)}function cce(t){const e=t[Xr];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function pA(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Xr].modified_&&(JS(e),Bo(4)),vi(t)&&(t=kv(e,t),e.parent_||Ev(e,t)),e.patches_&&Ql("Patches").generateReplacementPatches_(n[Xr].base_,t,e.patches_,e.inversePatches_)):t=kv(e,n,[]),JS(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==H4?t:void 0}function kv(t,e,n){if(eb(e))return e;const r=e[Xr];if(!r)return xh(e,(o,s)=>mA(t,r,e,o,s,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Ev(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),xh(s,(a,l)=>mA(t,r,o,a,l,n,i)),Ev(t,o,!1),n&&t.patches_&&Ql("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function mA(t,e,n,r,o,s,i){if(Ma(o)){const a=s&&e&&e.type_!==3&&!qS(e.assigned_,r)?s.concat(r):void 0,l=kv(t,o,a);if(U4(n,r,l),Ma(l))t.canAutoFreeze_=!1;else return}else i&&n.add(o);if(vi(o)&&!eb(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;kv(t,o),(!e||!e.scope_.parent_)&&Ev(t,o)}}function Ev(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&NE(e,n)}function uce(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:G4(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=LE;n&&(o=[r],s=_h);const{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var LE={get(t,e){if(e===Xr)return t;const n=dl(t);if(!qS(n,e))return dce(t,n,e);const r=n[e];return t.finalized_||!vi(r)?r:r===sw(t.base_,e)?(iw(t),t.copy_[e]=e_(r,t)):r},has(t,e){return e in dl(t)},ownKeys(t){return Reflect.ownKeys(dl(t))},set(t,e,n){const r=K4(dl(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const o=sw(dl(t),e),s=o==null?void 0:o[Xr];if(s&&s.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(sce(n,o)&&(n!==void 0||qS(t.base_,e)))return!0;iw(t),ZS(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return sw(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,iw(t),ZS(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=dl(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Bo(11)},getPrototypeOf(t){return Uu(t.base_)},setPrototypeOf(){Bo(12)}},_h={};xh(LE,(t,e)=>{_h[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});_h.deleteProperty=function(t,e){return _h.set.call(this,t,e,void 0)};_h.set=function(t,e,n){return LE.set.call(this,t[0],e,n,t[0])};function sw(t,e){const n=t[Xr];return(n?dl(n):t)[e]}function dce(t,e,n){var o;const r=K4(e,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(t.draft_):void 0}function K4(t,e){if(!(e in t))return;let n=Uu(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Uu(n)}}function ZS(t){t.modified_||(t.modified_=!0,t.parent_&&ZS(t.parent_))}function iw(t){t.copy_||(t.copy_=XS(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var fce=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const s=n;n=e;const i=this;return function(l=s,...c){return i.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Bo(6),r!==void 0&&typeof r!="function"&&Bo(7);let o;if(vi(e)){const s=hA(this),i=e_(e,void 0);let a=!0;try{o=n(i),a=!1}finally{a?JS(s):QS(s)}return fA(s,r),pA(o,s)}else if(!e||typeof e!="object"){if(o=n(e),o===void 0&&(o=e),o===H4&&(o=void 0),this.autoFreeze_&&NE(o,!0),r){const s=[],i=[];Ql("Patches").generateReplacementPatches_(e,o,s,i),r(s,i)}return o}else Bo(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(i,...a)=>this.produceWithPatches(i,l=>e(l,...a));let r,o;return[this.produce(e,n,(i,a)=>{r=i,o=a}),r,o]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){vi(t)||Bo(8),Ma(t)&&(t=Y4(t));const e=hA(this),n=e_(t,void 0);return n[Xr].isManual_=!0,QS(e),n}finishDraft(t,e){const n=t&&t[Xr];(!n||!n.isManual_)&&Bo(9);const{scope_:r}=n;return fA(r,e),pA(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const o=e[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(e=e.slice(n+1));const r=Ql("Patches").applyPatches_;return Ma(t)?r(t,e):this.produce(t,o=>r(o,e))}};function e_(t,e){const n=Qy(t)?Ql("MapSet").proxyMap_(t,e):Zy(t)?Ql("MapSet").proxySet_(t,e):uce(t,e);return(e?e.scope_:G4()).drafts_.push(n),n}function Y4(t){return Ma(t)||Bo(10,t),q4(t)}function q4(t){if(!vi(t)||eb(t))return t;const e=t[Xr];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=XS(t,e.scope_.immer_.useStrictShallowCopy_)}else n=XS(t,!0);return xh(n,(r,o)=>{U4(n,r,q4(o))}),e&&(e.finalized_=!1),n}var Jr=new fce,X4=Jr.produce;Jr.produceWithPatches.bind(Jr);Jr.setAutoFreeze.bind(Jr);Jr.setUseStrictShallowCopy.bind(Jr);Jr.applyPatches.bind(Jr);Jr.createDraft.bind(Jr);Jr.finishDraft.bind(Jr);function hce(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function pce(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function mce(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var gA=t=>Array.isArray(t)?t:[t];function gce(t){const e=Array.isArray(t[0])?t[0]:t;return mce(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function vce(t,e){const n=[],{length:r}=t;for(let o=0;o<r;o++)n.push(t[o].apply(null,e));return n}var yce=class{constructor(t){this.value=t}deref(){return this.value}},bce=typeof WeakRef<"u"?WeakRef:yce,wce=0,vA=1;function hm(){return{s:wce,v:void 0,o:null,p:null}}function jE(t,e={}){let n=hm();const{resultEqualityCheck:r}=e;let o,s=0;function i(){var d;let a=n;const{length:l}=arguments;for(let f=0,h=l;f<h;f++){const p=arguments[f];if(typeof p=="function"||typeof p=="object"&&p!==null){let m=a.o;m===null&&(a.o=m=new WeakMap);const v=m.get(p);v===void 0?(a=hm(),m.set(p,a)):a=v}else{let m=a.p;m===null&&(a.p=m=new Map);const v=m.get(p);v===void 0?(a=hm(),m.set(p,a)):a=v}}const c=a;let u;if(a.s===vA)u=a.v;else if(u=t.apply(null,arguments),s++,r){const f=((d=o==null?void 0:o.deref)==null?void 0:d.call(o))??o;f!=null&&r(f,u)&&(u=f,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new bce(u):u}return c.s=vA,c.v=u,u}return i.clearCache=()=>{n=hm(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function J4(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...o)=>{let s=0,i=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),hce(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=jE,argsMemoizeOptions:p=[],devModeChecks:m={}}=u,v=gA(f),y=gA(p),b=gce(o),w=d(function(){return s++,c.apply(null,arguments)},...v),S=h(function(){i++;const k=vce(b,arguments);return a=w.apply(null,k),a},...y);return Object.assign(S,{resultFunc:c,memoizedResultFunc:w,dependencies:b,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var xce=J4(jE),Sce=Object.assign((t,e=xce)=>{pce(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(s=>t[s]);return e(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>Sce});function Q4(t){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,t):o(s)}var _ce=Q4(),Cce=Q4,kce=(...t)=>{const e=J4(...t),n=Object.assign((...r)=>{const o=e(...r),s=(i,...a)=>o(Ma(i)?Y4(i):i,...a);return Object.assign(s,o),s},{withTypes:()=>n});return n};kce(jE);var Ece=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Cv:Cv.apply(null,arguments)};function Gu(t,e){function n(...r){if(e){let o=e(...r);if(!o)throw new Error(Pr(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>rce(r)&&r.type===t,n}var Z4=class df extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,df.prototype)}static get[Symbol.species](){return df}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new df(...e[0].concat(this)):new df(...e.concat(this))}};function yA(t){return vi(t)?X4(t,()=>{}):t}function bA(t,e,n){if(t.has(e)){let o=t.get(e);return n.update&&(o=n.update(o,e,t),t.set(e,o)),o}if(!n.insert)throw new Error(Pr(10));const r=n.insert(e,t);return t.set(e,r),r}function Mce(t){return typeof t=="boolean"}var Tce=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=e??{};let i=new Z4;return n&&(Mce(n)?i.push(_ce):i.push(Cce(n.extraArgument))),i},Rce="RTK_autoBatch",ez=t=>e=>{setTimeout(e,t)},Oce=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ez(10),Pce=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let o=!0,s=!1,i=!1;const a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?Oce:t.type==="callback"?t.queueNotification:ez(t.timeout),c=()=>{i=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[Rce]),s=!o,s&&(i||(i=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},Ace=t=>function(n){const{autoBatch:r=!0}=n??{};let o=new Z4(t);return r&&o.push(Pce(typeof r=="object"?r:void 0)),o},Dce=!0;function G2e(t){const e=Tce(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=t||{};let a;if(typeof n=="function")a=n;else if(IE(n))a=tce(n);else throw new Error(Pr(1));let l;typeof r=="function"?l=r(e):l=e();let c=Cv;o&&(c=Ece({trace:!Dce,...typeof o=="object"&&o}));const u=nce(...l),d=Ace(u);let f=typeof i=="function"?i(d):d();const h=c(...f);return V4(a,s,h)}function tz(t){const e={},n=[];let r;const o={addCase(s,i){const a=typeof s=="string"?s:s.type;if(!a)throw new Error(Pr(28));if(a in e)throw new Error(Pr(29));return e[a]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return t(o),[e,n,r]}function Ice(t){return typeof t=="function"}function Nce(t,e){let[n,r,o]=tz(e),s;if(Ice(t))s=()=>yA(t());else{const a=yA(t);s=()=>a}function i(a=s(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(Ma(u)){const h=d(u,l);return h===void 0?u:h}else{if(vi(u))return X4(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw new Error(Pr(9))}return f}}return u},a)}return i.getInitialState=s,i}var Lce="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jce=(t=21)=>{let e="",n=t;for(;n--;)e+=Lce[Math.random()*64|0];return e},$ce=Symbol.for("rtk-slice-createasyncthunk");function Fce(t,e){return`${t}/${e}`}function zce({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[$ce];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(Pr(11));typeof process<"u";const a=(typeof o.reducers=="function"?o.reducers(Vce()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(w,S){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(Pr(12));if(_ in c.sliceCaseReducersByType)throw new Error(Pr(13));return c.sliceCaseReducersByType[_]=S,u},addMatcher(w,S){return c.sliceMatchers.push({matcher:w,reducer:S}),u},exposeAction(w,S){return c.actionCreators[w]=S,u},exposeCaseReducer(w,S){return c.sliceCaseReducersByName[w]=S,u}};l.forEach(w=>{const S=a[w],_={reducerName:w,type:Fce(s,w),createNotation:typeof o.reducers=="function"};Wce(S)?Gce(_,S,u,e):Hce(_,S,u)});function d(){const[w={},S=[],_=void 0]=typeof o.extraReducers=="function"?tz(o.extraReducers):[o.extraReducers],k={...w,...c.sliceCaseReducersByType};return Nce(o.initialState,M=>{for(let T in k)M.addCase(T,k[T]);for(let T of c.sliceMatchers)M.addMatcher(T.matcher,T.reducer);for(let T of S)M.addMatcher(T.matcher,T.reducer);_&&M.addDefaultCase(_)})}const f=w=>w,h=new Map;let p;function m(w,S){return p||(p=d()),p(w,S)}function v(){return p||(p=d()),p.getInitialState()}function y(w,S=!1){function _(M){let T=M[w];return typeof T>"u"&&S&&(T=v()),T}function k(M=f){const T=bA(h,S,{insert:()=>new WeakMap});return bA(T,M,{insert:()=>{const P={};for(const[A,L]of Object.entries(o.selectors??{}))P[A]=Bce(L,M,v,S);return P}})}return{reducerPath:w,getSelectors:k,get selectors(){return k(_)},selectSlice:_}}const b={name:s,reducer:m,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...y(i),injectInto(w,{reducerPath:S,..._}={}){const k=S??i;return w.inject({reducerPath:k,reducer:m},_),{...b,...y(k,!0)}}};return b}}function Bce(t,e,n,r){function o(s,...i){let a=e(s);return typeof a>"u"&&r&&(a=n()),t(a,...i)}return o.unwrapped=t,o}var K2e=zce();function Vce(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function Hce({type:t,reducerName:e,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!Uce(r))throw new Error(Pr(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(t,s).exposeCaseReducer(e,s).exposeAction(e,i?Gu(t,i):Gu(t))}function Wce(t){return t._reducerDefinitionType==="asyncThunk"}function Uce(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Gce({type:t,reducerName:e},n,r,o){if(!o)throw new Error(Pr(18));const{payloadCreator:s,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,d=o(t,s,u);r.exposeAction(e,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(e,{fulfilled:i||pm,pending:a||pm,rejected:l||pm,settled:c||pm})}function pm(){}var Kce=(t,e)=>{if(typeof t!="function")throw new Error(Pr(32))},$E="listenerMiddleware",Yce=t=>{let{type:e,actionCreator:n,matcher:r,predicate:o,effect:s}=t;if(e)o=Gu(e).match;else if(n)e=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Pr(21));return Kce(s),{predicate:o,type:e,effect:s}},qce=Object.assign(t=>{const{type:e,predicate:n,effect:r}=Yce(t);return{id:jce(),effect:r,type:e,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Pr(22))}}},{withTypes:()=>qce}),Xce=Object.assign(Gu(`${$E}/add`),{withTypes:()=>Xce});Gu(`${$E}/removeAll`);var Jce=Object.assign(Gu(`${$E}/remove`),{withTypes:()=>Jce});function Pr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var nz={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(jr,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",p="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var N=["th","st","nd","rd"],D=z%100;return"["+z+(N[(D-20)%10]||N[D]||N[0])+"]"}},w=function(z,N,D){var F=String(z);return!F||F.length>=N?z:""+Array(N+1-F.length).join(D)+z},S={s:w,z:function(z){var N=-z.utcOffset(),D=Math.abs(N),F=Math.floor(D/60),I=D%60;return(N<=0?"+":"-")+w(F,2,"0")+":"+w(I,2,"0")},m:function z(N,D){if(N.date()<D.date())return-z(D,N);var F=12*(D.year()-N.year())+(D.month()-N.month()),I=N.clone().add(F,d),$=D-I<0,j=N.clone().add(F+($?-1:1),d);return+(-(F+(D-I)/($?I-j:j-I))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:d,y:h,w:u,d:c,D:p,h:l,m:a,s:i,ms:s,Q:f}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},_="en",k={};k[_]=b;var M="$isDayjsObject",T=function(z){return z instanceof V||!(!z||!z[M])},P=function z(N,D,F){var I;if(!N)return _;if(typeof N=="string"){var $=N.toLowerCase();k[$]&&(I=$),D&&(k[$]=D,I=$);var j=N.split("-");if(!I&&j.length>1)return z(j[0])}else{var W=N.name;k[W]=N,I=W}return!F&&I&&(_=I),I||!F&&_},A=function(z,N){if(T(z))return z.clone();var D=typeof N=="object"?N:{};return D.date=z,D.args=arguments,new V(D)},L=S;L.l=P,L.i=T,L.w=function(z,N){return A(z,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var V=function(){function z(D){this.$L=P(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[M]=!0}var N=z.prototype;return N.parse=function(D){this.$d=function(F){var I=F.date,$=F.utc;if(I===null)return new Date(NaN);if(L.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var j=I.match(v);if(j){var W=j[2]-1||0,G=(j[7]||"0").substring(0,3);return $?new Date(Date.UTC(j[1],W,j[3]||1,j[4]||0,j[5]||0,j[6]||0,G)):new Date(j[1],W,j[3]||1,j[4]||0,j[5]||0,j[6]||0,G)}}return new Date(I)}(D),this.init()},N.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()},N.$utils=function(){return L},N.isValid=function(){return this.$d.toString()!==m},N.isSame=function(D,F){var I=A(D);return this.startOf(F)<=I&&I<=this.endOf(F)},N.isAfter=function(D,F){return A(D)<this.startOf(F)},N.isBefore=function(D,F){return this.endOf(F)<A(D)},N.$g=function(D,F,I){return L.u(D)?this[F]:this.set(I,D)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(D,F){var I=this,$=!!L.u(F)||F,j=L.p(D),W=function(te,ne){var pe=L.w(I.$u?Date.UTC(I.$y,ne,te):new Date(I.$y,ne,te),I);return $?pe:pe.endOf(c)},G=function(te,ne){return L.w(I.toDate()[te].apply(I.toDate("s"),($?[0,0,0,0]:[23,59,59,999]).slice(ne)),I)},X=this.$W,q=this.$M,B=this.$D,Q="set"+(this.$u?"UTC":"");switch(j){case h:return $?W(1,0):W(31,11);case d:return $?W(1,q):W(0,q+1);case u:var Z=this.$locale().weekStart||0,oe=(X<Z?X+7:X)-Z;return W($?B-oe:B+(6-oe),q);case c:case p:return G(Q+"Hours",0);case l:return G(Q+"Minutes",1);case a:return G(Q+"Seconds",2);case i:return G(Q+"Milliseconds",3);default:return this.clone()}},N.endOf=function(D){return this.startOf(D,!1)},N.$set=function(D,F){var I,$=L.p(D),j="set"+(this.$u?"UTC":""),W=(I={},I[c]=j+"Date",I[p]=j+"Date",I[d]=j+"Month",I[h]=j+"FullYear",I[l]=j+"Hours",I[a]=j+"Minutes",I[i]=j+"Seconds",I[s]=j+"Milliseconds",I)[$],G=$===c?this.$D+(F-this.$W):F;if($===d||$===h){var X=this.clone().set(p,1);X.$d[W](G),X.init(),this.$d=X.set(p,Math.min(this.$D,X.daysInMonth())).$d}else W&&this.$d[W](G);return this.init(),this},N.set=function(D,F){return this.clone().$set(D,F)},N.get=function(D){return this[L.p(D)]()},N.add=function(D,F){var I,$=this;D=Number(D);var j=L.p(F),W=function(q){var B=A($);return L.w(B.date(B.date()+Math.round(q*D)),$)};if(j===d)return this.set(d,this.$M+D);if(j===h)return this.set(h,this.$y+D);if(j===c)return W(1);if(j===u)return W(7);var G=(I={},I[a]=r,I[l]=o,I[i]=n,I)[j]||1,X=this.$d.getTime()+D*G;return L.w(X,this)},N.subtract=function(D,F){return this.add(-1*D,F)},N.format=function(D){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||m;var $=D||"YYYY-MM-DDTHH:mm:ssZ",j=L.z(this),W=this.$H,G=this.$m,X=this.$M,q=I.weekdays,B=I.months,Q=I.meridiem,Z=function(ne,pe,ie,le){return ne&&(ne[pe]||ne(F,$))||ie[pe].slice(0,le)},oe=function(ne){return L.s(W%12||12,ne,"0")},te=Q||function(ne,pe,ie){var le=ne<12?"AM":"PM";return ie?le.toLowerCase():le};return $.replace(y,function(ne,pe){return pe||function(ie){switch(ie){case"YY":return String(F.$y).slice(-2);case"YYYY":return L.s(F.$y,4,"0");case"M":return X+1;case"MM":return L.s(X+1,2,"0");case"MMM":return Z(I.monthsShort,X,B,3);case"MMMM":return Z(B,X);case"D":return F.$D;case"DD":return L.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Z(I.weekdaysMin,F.$W,q,2);case"ddd":return Z(I.weekdaysShort,F.$W,q,3);case"dddd":return q[F.$W];case"H":return String(W);case"HH":return L.s(W,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return te(W,G,!0);case"A":return te(W,G,!1);case"m":return String(G);case"mm":return L.s(G,2,"0");case"s":return String(F.$s);case"ss":return L.s(F.$s,2,"0");case"SSS":return L.s(F.$ms,3,"0");case"Z":return j}return null}(ne)||j.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(D,F,I){var $,j=this,W=L.p(F),G=A(D),X=(G.utcOffset()-this.utcOffset())*r,q=this-G,B=function(){return L.m(j,G)};switch(W){case h:$=B()/12;break;case d:$=B();break;case f:$=B()/3;break;case u:$=(q-X)/6048e5;break;case c:$=(q-X)/864e5;break;case l:$=q/o;break;case a:$=q/r;break;case i:$=q/n;break;default:$=q}return I?$:L.a($)},N.daysInMonth=function(){return this.endOf(d).$D},N.$locale=function(){return k[this.$L]},N.locale=function(D,F){if(!D)return this.$L;var I=this.clone(),$=P(D,F,!0);return $&&(I.$L=$),I},N.clone=function(){return L.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},z}(),H=V.prototype;return A.prototype=H,[["$ms",s],["$s",i],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",p]].forEach(function(z){H[z[1]]=function(N){return this.$g(N,z[0],z[1])}}),A.extend=function(z,N){return z.$i||(z(N,V,A),z.$i=!0),A},A.locale=P,A.isDayjs=T,A.unix=function(z){return A(1e3*z)},A.en=k[_],A.Ls=k,A.p={},A})})(nz);var rz=nz.exports;const _e=bi(rz);function Qce(t){if(!/^[0-9a-zA-Z-]+$/.test(t))throw new Error(`[@mantine/use-form] Form name "${t}" is invalid, it should contain only letters, numbers and dashes`)}const Zce=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Pn(t,e){Zce(()=>{if(t)return window.addEventListener(t,e),()=>window.removeEventListener(t,e)},[t])}function eue(t,e){t&&Qce(t),Pn(`mantine-form:${t}:set-field-value`,n=>e.setFieldValue(n.detail.path,n.detail.value)),Pn(`mantine-form:${t}:set-values`,n=>e.setValues(n.detail)),Pn(`mantine-form:${t}:set-initial-values`,n=>e.setInitialValues(n.detail)),Pn(`mantine-form:${t}:set-errors`,n=>e.setErrors(n.detail)),Pn(`mantine-form:${t}:set-field-error`,n=>e.setFieldError(n.detail.path,n.detail.error)),Pn(`mantine-form:${t}:clear-field-error`,n=>e.clearFieldError(n.detail)),Pn(`mantine-form:${t}:clear-errors`,e.clearErrors),Pn(`mantine-form:${t}:reset`,e.reset),Pn(`mantine-form:${t}:validate`,e.validate),Pn(`mantine-form:${t}:validate-field`,n=>e.validateField(n.detail)),Pn(`mantine-form:${t}:reorder-list-item`,n=>e.reorderListItem(n.detail.path,n.detail.payload)),Pn(`mantine-form:${t}:remove-list-item`,n=>e.removeListItem(n.detail.path,n.detail.index)),Pn(`mantine-form:${t}:insert-list-item`,n=>e.insertListItem(n.detail.path,n.detail.item,n.detail.index)),Pn(`mantine-form:${t}:set-dirty`,n=>e.setDirty(n.detail)),Pn(`mantine-form:${t}:set-touched`,n=>e.setTouched(n.detail)),Pn(`mantine-form:${t}:reset-dirty`,n=>e.resetDirty(n.detail)),Pn(`mantine-form:${t}:reset-touched`,e.resetTouched)}function tue(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n instanceof HTMLInputElement?n.type==="checkbox"?t(n.checked):t(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&t(n.value)}else t(e)}}function t_(t){return t===null||typeof t!="object"?{}:Object.keys(t).reduce((e,n)=>{const r=t[n];return r!=null&&r!==!1&&(e[n]=r),e},{})}function nue(t){const[e,n]=C.useState(t_(t)),r=C.useRef(e),o=C.useCallback(l=>{n(c=>{const u=t_(typeof l=="function"?l(c):l);return r.current=u,u})},[]),s=C.useCallback(()=>o({}),[]),i=C.useCallback(l=>{r.current[l]!==void 0&&o(c=>{const u={...c};return delete u[l],u})},[e]),a=C.useCallback((l,c)=>{c==null||c===!1?i(l):r.current[l]!==c&&o(u=>({...u,[l]:c}))},[e]);return{errorsState:e,setErrors:o,clearErrors:s,setFieldError:a,clearFieldError:i}}function oz(t,e){if(e===null||typeof e!="object")return{};const n={...e};return Object.keys(e).forEach(r=>{r.includes(`${String(t)}.`)&&delete n[r]}),n}function wA(t,e){const n=t.substring(e.length+1).split(".")[0];return parseInt(n,10)}function xA(t,e,n,r){if(e===void 0)return n;const o=`${String(t)}`;let s=n;r===-1&&(s=oz(`${o}.${e}`,s));const i={...s},a=new Set;return Object.entries(s).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;const c=wA(l,o);return Number.isNaN(c)?!1:c>=e}).forEach(([l,c])=>{const u=wA(l,o),d=l.replace(`${o}.${u}`,`${o}.${u+r}`);i[d]=c,a.add(d),a.has(l)||delete i[l]}),i}function rue(t,{from:e,to:n},r){const o=`${t}.${e}`,s=`${t}.${n}`,i={...r};return Object.keys(r).every(a=>{let l,c;if(a.startsWith(o)&&(l=a,c=a.replace(o,s)),a.startsWith(s)&&(l=a.replace(s,o),c=a),l&&c){const u=i[l],d=i[c];return d===void 0?delete i[l]:i[l]=d,u===void 0?delete i[c]:i[c]=u,!1}return!0}),i}function SA(t,e,n){typeof n.value=="object"&&(n.value=au(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function au(t){if(typeof t!="object")return t;var e=0,n,r,o,s=Object.prototype.toString.call(t);if(s==="[object Object]"?o=Object.create(t.__proto__||null):s==="[object Array]"?o=Array(t.length):s==="[object Set]"?(o=new Set,t.forEach(function(i){o.add(au(i))})):s==="[object Map]"?(o=new Map,t.forEach(function(i,a){o.set(au(a),au(i))})):s==="[object Date]"?o=new Date(+t):s==="[object RegExp]"?o=new RegExp(t.source,t.flags):s==="[object DataView]"?o=new t.constructor(au(t.buffer)):s==="[object ArrayBuffer]"?o=t.slice(0):s.slice(-6)==="Array]"&&(o=new t.constructor(t)),o){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)SA(o,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(o,n=r[e])&&o[n]===t[n]||SA(o,n,Object.getOwnPropertyDescriptor(t,n))}return o||t}function sz(t){return typeof t!="string"?[]:t.split(".")}function Er(t,e){const n=sz(t);if(n.length===0||typeof e!="object"||e===null)return;let r=e[n[0]];for(let o=1;o<n.length&&r!==void 0;o+=1)r=r[n[o]];return r}function tb(t,e,n){const r=sz(t);if(r.length===0)return n;const o=au(n);if(r.length===1)return o[r[0]]=e,o;let s=o[r[0]];for(let i=1;i<r.length-1;i+=1){if(s===void 0)return o;s=s[r[i]]}return s[r[r.length-1]]=e,o}function oue(t,{from:e,to:n},r){const o=Er(t,r);if(!Array.isArray(o))return r;const s=[...o],i=o[e];return s.splice(e,1),s.splice(n,0,i),tb(t,s,r)}function sue(t,e,n,r){const o=Er(t,r);if(!Array.isArray(o))return r;const s=[...o];return s.splice(typeof n=="number"?n:s.length,0,e),tb(t,s,r)}function iue(t,e,n){const r=Er(t,n);return Array.isArray(r)?tb(t,r.filter((o,s)=>s!==e),n):n}function aue({$values:t,$errors:e,$status:n}){const r=C.useCallback((i,a)=>{n.clearFieldDirty(i),e.setErrors(l=>rue(i,a,l)),t.setValues({values:oue(i,a,t.refValues.current),updateState:!0})},[]),o=C.useCallback((i,a)=>{n.clearFieldDirty(i),e.setErrors(l=>xA(i,a,l,-1)),t.setValues({values:iue(i,a,t.refValues.current),updateState:!0})},[]),s=C.useCallback((i,a,l)=>{n.clearFieldDirty(i),e.setErrors(c=>xA(i,l,c,1)),t.setValues({values:sue(i,a,l,t.refValues.current),updateState:!0})},[]);return{reorderListItem:r,removeListItem:o,insertListItem:s}}var lue=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n};const aw=bi(lue);function mm(t,e){const n=Object.keys(t);if(typeof e=="string"){const r=n.filter(o=>o.startsWith(`${e}.`));return t[e]||r.some(o=>t[o])||!1}return n.some(r=>t[r])}function cue({initialDirty:t,initialTouched:e,mode:n,$values:r}){const[o,s]=C.useState(e),[i,a]=C.useState(t),l=C.useRef(e),c=C.useRef(t),u=C.useCallback(_=>{const k=typeof _=="function"?_(l.current):_;l.current=k,n==="controlled"&&s(k)},[]),d=C.useCallback(_=>{const k=typeof _=="function"?_(c.current):_;c.current=k,n==="controlled"&&a(k)},[]),f=C.useCallback(()=>u({}),[]),h=_=>{const k=_?{..._,...r.refValues.current}:r.refValues.current;r.setValuesSnapshot(k),d({})},p=C.useCallback((_,k)=>{u(M=>mm(M,_)===k?M:{...M,[_]:k})},[]),m=C.useCallback((_,k)=>{d(M=>mm(M,_)===k?M:{...M,[_]:k})},[]),v=C.useCallback(_=>mm(l.current,_),[]),y=C.useCallback(_=>d(k=>{if(typeof _!="string")return k;const M=oz(_,k);return delete M[_],aw(M,k)?k:M}),[]),b=C.useCallback(_=>{if(_){const M=Er(_,c.current);if(typeof M=="boolean")return M;const T=Er(_,r.refValues.current),P=Er(_,r.valuesSnapshot.current);return!aw(T,P)}return Object.keys(c.current).length>0?mm(c.current):!aw(r.refValues.current,r.valuesSnapshot.current)},[]),w=C.useCallback(()=>c.current,[]),S=C.useCallback(()=>l.current,[]);return{touchedState:o,dirtyState:i,touchedRef:l,dirtyRef:c,setTouched:u,setDirty:d,resetDirty:h,resetTouched:f,isTouched:v,setFieldTouched:p,setFieldDirty:m,setTouchedState:s,setDirtyState:a,clearFieldDirty:y,isDirty:b,getDirty:w,getTouched:S}}function uue({initialValues:t,onValuesChange:e,mode:n}){const r=C.useRef(!1),[o,s]=C.useState(t||{}),i=C.useRef(o),a=C.useRef(o),l=C.useCallback(({values:p,subscribers:m,updateState:v=!0,mergeWithPreviousValues:y=!0})=>{const b=i.current,w=p instanceof Function?p(i.current):p,S=y?{...b,...w}:w;i.current=S,v&&s(S),e==null||e(S,b),m==null||m.filter(Boolean).forEach(_=>_({updatedValues:S,previousValues:b}))},[e]),c=C.useCallback(p=>{var y;const m=Er(p.path,i.current),v=p.value instanceof Function?p.value(m):p.value;if(m!==v){const b=i.current,w=tb(p.path,v,i.current);l({values:w,updateState:p.updateState}),(y=p.subscribers)==null||y.filter(Boolean).forEach(S=>S({path:p.path,updatedValues:w,previousValues:b}))}},[l]),u=C.useCallback(p=>{a.current=p},[]),d=C.useCallback((p,m)=>{r.current||(r.current=!0,l({values:p,updateState:n==="controlled"}),u(p),m())},[l]),f=C.useCallback(()=>{l({values:a.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),h=C.useCallback(()=>i.current,[]);return{initialized:r,stateValues:o,refValues:i,valuesSnapshot:a,setValues:l,setFieldValue:c,resetValues:f,setValuesSnapshot:u,initialize:d,getValues:h}}function due({$status:t}){const e=C.useRef({}),n=C.useCallback((o,s)=>{C.useEffect(()=>(e.current[o]=e.current[o]||[],e.current[o].push(s),()=>{e.current[o]=e.current[o].filter(i=>i!==s)}),[s])},[]),r=C.useCallback(o=>e.current[o]?e.current[o].map(s=>i=>s({previousValue:Er(o,i.previousValues),value:Er(o,i.updatedValues),touched:t.isTouched(o),dirty:t.isDirty(o)})):[],[]);return{subscribers:e,watch:n,getFieldSubscribers:r}}function _A(t,e){return t?`${t}-${e.toString()}`:e.toString()}function CA(t){const e=t_(t);return{hasErrors:Object.keys(e).length>0,errors:e}}function n_(t,e,n="",r={}){return typeof t!="object"||t===null?r:Object.keys(t).reduce((o,s)=>{const i=t[s],a=`${n===""?"":`${n}.`}${s}`,l=Er(a,e);let c=!1;return typeof i=="function"&&(o[a]=i(l,e,a)),typeof i=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,d)=>n_(i,e,`${a}.${d}`,o))),typeof i=="object"&&typeof l=="object"&&l!==null&&(c||n_(i,e,a,o)),o},r)}function r_(t,e){return CA(typeof t=="function"?t(e):n_(t,e))}function gm(t,e,n){if(typeof t!="string")return{hasError:!1,error:null};const r=r_(e,n),o=Object.keys(r.errors).find(s=>t.split(".").every((i,a)=>i===s.split(".")[a]));return{hasError:!!o,error:o?r.errors[o]:null}}const fue="__MANTINE_FORM_INDEX__";function kA(t,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(t.replace(/[.][0-9]/g,`.${fue}`)):!1:!1}function Y2e({name:t,mode:e="controlled",initialValues:n,initialErrors:r={},initialDirty:o={},initialTouched:s={},clearInputErrorOnChange:i=!0,validateInputOnChange:a=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:u=h=>h,enhanceGetInputProps:d,validate:f}={}){const h=nue(r),p=uue({initialValues:n,onValuesChange:c,mode:e}),m=cue({initialDirty:o,initialTouched:s,$values:p,mode:e}),v=aue({$values:p,$errors:h,$status:m}),y=due({$status:m}),[b,w]=C.useState(0),[S,_]=C.useState({}),k=C.useCallback(()=>{p.resetValues(),h.clearErrors(),m.resetDirty(),m.resetTouched(),e==="uncontrolled"&&w(j=>j+1)},[]),M=C.useCallback(j=>{p.initialize(j,()=>e==="uncontrolled"&&w(W=>W+1))},[]),T=C.useCallback((j,W,G)=>{const X=kA(j,a);m.clearFieldDirty(j),m.setFieldTouched(j,!0),!X&&i&&h.clearFieldError(j),p.setFieldValue({path:j,value:W,updateState:e==="controlled",subscribers:[...y.getFieldSubscribers(j),X?q=>{const B=gm(j,f,q.updatedValues);B.hasError?h.setFieldError(j,B.error):h.clearFieldError(j)}:null,(G==null?void 0:G.forceUpdate)!==!1&&e!=="controlled"?()=>_(q=>({...q,[j]:(q[j]||0)+1})):null]})},[c,f]),P=C.useCallback(j=>{const W=p.refValues.current;p.setValues({values:j,updateState:e==="controlled"}),i&&h.clearErrors(),e==="uncontrolled"&&w(G=>G+1),Object.keys(y.subscribers.current).forEach(G=>{const X=Er(G,p.refValues.current),q=Er(G,W);X!==q&&y.getFieldSubscribers(G).forEach(B=>B({previousValues:W,updatedValues:p.refValues.current}))})},[c,i]),A=C.useCallback(()=>{const j=r_(f,p.refValues.current);return h.setErrors(j.errors),j},[f]),L=C.useCallback(j=>{const W=gm(j,f,p.refValues.current);return W.hasError?h.setFieldError(j,W.error):h.clearFieldError(j),W},[f]),V=(j,{type:W="input",withError:G=!0,withFocus:X=!0,...q}={})=>{const Q={onChange:tue(Z=>T(j,Z,{forceUpdate:!1})),"data-path":_A(t,j)};return G&&(Q.error=h.errorsState[j]),W==="checkbox"?Q[e==="controlled"?"checked":"defaultChecked"]=Er(j,p.refValues.current):Q[e==="controlled"?"value":"defaultValue"]=Er(j,p.refValues.current),X&&(Q.onFocus=()=>m.setFieldTouched(j,!0),Q.onBlur=()=>{if(kA(j,l)){const Z=gm(j,f,p.refValues.current);Z.hasError?h.setFieldError(j,Z.error):h.clearFieldError(j)}}),Object.assign(Q,d==null?void 0:d({inputProps:Q,field:j,options:{type:W,withError:G,withFocus:X,...q},form:$}))},H=(j,W)=>G=>{G==null||G.preventDefault();const X=A();X.hasErrors?W==null||W(X.errors,p.refValues.current,G):j==null||j(u(p.refValues.current),G)},z=j=>u(j||p.refValues.current),N=C.useCallback(j=>{j.preventDefault(),k()},[]),D=C.useCallback(j=>j?!gm(j,f,p.refValues.current).hasError:!r_(f,p.refValues.current).hasErrors,[f]),F=j=>`${b}-${j}-${S[j]||0}`,I=C.useCallback(j=>document.querySelector(`[data-path="${_A(t,j)}"]`),[]),$={watch:y.watch,initialized:p.initialized.current,values:p.stateValues,getValues:p.getValues,setInitialValues:p.setValuesSnapshot,initialize:M,setValues:P,setFieldValue:T,errors:h.errorsState,setErrors:h.setErrors,setFieldError:h.setFieldError,clearFieldError:h.clearFieldError,clearErrors:h.clearErrors,resetDirty:m.resetDirty,setTouched:m.setTouched,setDirty:m.setDirty,isTouched:m.isTouched,resetTouched:m.resetTouched,isDirty:m.isDirty,getTouched:m.getTouched,getDirty:m.getDirty,reorderListItem:v.reorderListItem,insertListItem:v.insertListItem,removeListItem:v.removeListItem,reset:k,validate:A,validateField:L,getInputProps:V,onSubmit:H,onReset:N,isValid:D,getTransformedValues:z,key:F,getInputNode:I};return eue(t,$),$}function q2e(t){const e=t||!0;return n=>typeof n=="string"?n.trim().length>0?null:e:Array.isArray(n)?n.length>0?null:e:n==null||n===!1?e:null}function hue(t,e){const n=e||!0;return r=>typeof r!="string"?n:t.test(r)?null:n}function X2e(t){return hue(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,t)}function EA(t,e){if(typeof t=="number")return e.length===t;const{max:n,min:r}=t;let o=!0;return typeof n=="number"&&e.length>n&&(o=!1),typeof r=="number"&&e.length<r&&(o=!1),o}function J2e(t,e){const n=e||!0;return r=>typeof r=="string"?EA(t,r.trim())?null:n:typeof r=="object"&&r!==null&&"length"in r&&EA(t,r)?null:n}/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var pue={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.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ge=(t,e,n,r)=>{const o=C.forwardRef(({color:s="currentColor",size:i=24,stroke:a=2,title:l,className:c,children:u,...d},f)=>C.createElement("svg",{ref:f,...pue[t],width:i,height:i,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:s}:{strokeWidth:a,stroke:s},...d},[l&&C.createElement("title",{key:"svg-title"},l),...r.map(([h,p])=>C.createElement(h,p)),...Array.isArray(u)?u:[u]]));return o.displayName=`${n}`,o};/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Q2e=ge("outline","alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var mue=ge("outline","arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Z2e=ge("outline","arrow-left","IconArrowLeft",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var gue=ge("outline","arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var eEe=ge("outline","arrows-up-down","IconArrowsUpDown",[["path",{d:"M7 3l0 18",key:"svg-0"}],["path",{d:"M10 6l-3 -3l-3 3",key:"svg-1"}],["path",{d:"M20 18l-3 3l-3 -3",key:"svg-2"}],["path",{d:"M17 21l0 -18",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var tEe=ge("outline","at","IconAt",[["path",{d:"M12 12m-4 0a4 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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var nEe=ge("outline","ban","IconBan",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M5.7 5.7l12.6 12.6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vue=ge("outline","baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var yue=ge("outline","baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var bue=ge("outline","baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var rEe=ge("outline","bell-ringing-2","IconBellRinging2",[["path",{d:"M19.364 4.636a2 2 0 0 1 0 2.828a7 7 0 0 1 -1.414 7.072l-2.122 2.12a4 4 0 0 0 -.707 3.536l-11.313 -11.312a4 4 0 0 0 3.535 -.707l2.121 -2.123a7 7 0 0 1 7.072 -1.414a2 2 0 0 1 2.828 0z",key:"svg-0"}],["path",{d:"M7.343 12.414l-.707 .707a3 3 0 0 0 4.243 4.243l.707 -.707",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wue=ge("outline","box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var oEe=ge("outline","brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var sEe=ge("outline","building-bank","IconBuildingBank",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M5 6l7 -3l7 3",key:"svg-2"}],["path",{d:"M4 10l0 11",key:"svg-3"}],["path",{d:"M20 10l0 11",key:"svg-4"}],["path",{d:"M8 14l0 3",key:"svg-5"}],["path",{d:"M12 14l0 3",key:"svg-6"}],["path",{d:"M16 14l0 3",key:"svg-7"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var iEe=ge("outline","calendar-month","IconCalendarMonth",[["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-12z",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:"M7 14h.013",key:"svg-4"}],["path",{d:"M10.01 14h.005",key:"svg-5"}],["path",{d:"M13.01 14h.005",key:"svg-6"}],["path",{d:"M16.015 14h.005",key:"svg-7"}],["path",{d:"M13.015 17h.005",key:"svg-8"}],["path",{d:"M7.01 17h.005",key:"svg-9"}],["path",{d:"M10.01 17h.005",key:"svg-10"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var aEe=ge("outline","category","IconCategory",[["path",{d:"M4 4h6v6h-6z",key:"svg-0"}],["path",{d:"M14 4h6v6h-6z",key:"svg-1"}],["path",{d:"M4 14h6v6h-6z",key:"svg-2"}],["path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var lEe=ge("outline","chart-pie","IconChartPie",[["path",{d:"M10 3.2a9 9 0 1 0 10.8 10.8a1 1 0 0 0 -1 -1h-6.8a2 2 0 0 1 -2 -2v-7a.9 .9 0 0 0 -1 -.8",key:"svg-0"}],["path",{d:"M15 3.5a9 9 0 0 1 5.5 5.5h-4.5a1 1 0 0 1 -1 -1v-4.5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var cEe=ge("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var uEe=ge("outline","checks","IconChecks",[["path",{d:"M7 12l5 5l10 -10",key:"svg-0"}],["path",{d:"M2 12l5 5m5 -5l5 -5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var xue=ge("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Sue=ge("outline","chevron-left-pipe","IconChevronLeftPipe",[["path",{d:"M7 6v12",key:"svg-0"}],["path",{d:"M18 6l-6 6l6 6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var _ue=ge("outline","chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Cue=ge("outline","chevron-right-pipe","IconChevronRightPipe",[["path",{d:"M6 6l6 6l-6 6",key:"svg-0"}],["path",{d:"M17 5v13",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var kue=ge("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Eue=ge("outline","chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var dEe=ge("outline","chevrons-right","IconChevronsRight",[["path",{d:"M7 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M13 7l5 5l-5 5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Mue=ge("outline","circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Tue=ge("outline","clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var fEe=ge("outline","clock","IconClock",[["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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Rue=ge("outline","columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var hEe=ge("outline","dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var pEe=ge("outline","database","IconDatabase",[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Oue=ge("outline","device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var mEe=ge("outline","device-imac-exclamation","IconDeviceImacExclamation",[["path",{d:"M15 17h-11a1 1 0 0 1 -1 -1v-12a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v8.5",key:"svg-0"}],["path",{d:"M3 13h13",key:"svg-1"}],["path",{d:"M8 21h7",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M14 17l.5 4",key:"svg-4"}],["path",{d:"M19 16v3",key:"svg-5"}],["path",{d:"M19 22v.01",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var gEe=ge("outline","device-imac-off","IconDeviceImacOff",[["path",{d:"M7 3h13a1 1 0 0 1 1 1v12c0 .28 -.115 .532 -.3 .713m-3.7 .287h-13a1 1 0 0 1 -1 -1v-12c0 -.276 .112 -.526 .293 -.707",key:"svg-0"}],["path",{d:"M3 13h10m4 0h4",key:"svg-1"}],["path",{d:"M8 21h8",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M14 17l.5 4",key:"svg-4"}],["path",{d:"M3 3l18 18",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vEe=ge("outline","device-imac-pause","IconDeviceImacPause",[["path",{d:"M13 17h-9a1 1 0 0 1 -1 -1v-12a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v9",key:"svg-0"}],["path",{d:"M3 13h18",key:"svg-1"}],["path",{d:"M8 21h5",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M17 17v5",key:"svg-4"}],["path",{d:"M21 17v5",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var yEe=ge("outline","device-imac-share","IconDeviceImacShare",[["path",{d:"M12.5 17h-8.5a1 1 0 0 1 -1 -1v-12a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v9",key:"svg-0"}],["path",{d:"M3 13h18",key:"svg-1"}],["path",{d:"M8 21h4",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M16 22l5 -5",key:"svg-4"}],["path",{d:"M21 21.5v-4.5h-4.5",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var bEe=ge("outline","device-imac-up","IconDeviceImacUp",[["path",{d:"M12.5 17h-8.5a1 1 0 0 1 -1 -1v-12a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v8.5",key:"svg-0"}],["path",{d:"M3 13h13",key:"svg-1"}],["path",{d:"M8 21h4.5",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M19 22v-6",key:"svg-4"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wEe=ge("outline","device-imac","IconDeviceImac",[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-12z",key:"svg-0"}],["path",{d:"M3 13h18",key:"svg-1"}],["path",{d:"M8 21h8",key:"svg-2"}],["path",{d:"M10 17l-.5 4",key:"svg-3"}],["path",{d:"M14 17l.5 4",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Pue=ge("outline","dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Aue=ge("outline","dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var xEe=ge("outline","edit-circle","IconEditCircle",[["path",{d:"M12 15l8.385 -8.415a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3z",key:"svg-0"}],["path",{d:"M16 5l3 3",key:"svg-1"}],["path",{d:"M9 7.07a7 7 0 0 0 1 13.93a7 7 0 0 0 6.929 -6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Due=ge("outline","edit","IconEdit",[["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.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Iue=ge("outline","eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var SEe=ge("outline","file-symlink","IconFileSymlink",[["path",{d:"M4 21v-4a3 3 0 0 1 3 -3h5",key:"svg-0"}],["path",{d:"M9 17l3 -3l-3 -3",key:"svg-1"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-2"}],["path",{d:"M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var _Ee=ge("outline","file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var CEe=ge("outline","file-type-pdf","IconFileTypePdf",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6",key:"svg-2"}],["path",{d:"M17 18h2",key:"svg-3"}],["path",{d:"M20 15h-3v6",key:"svg-4"}],["path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Nue=ge("outline","filter-cog","IconFilterCog",[["path",{d:"M12 20l-3 1v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M19.001 15.5v1.5",key:"svg-2"}],["path",{d:"M19.001 21v1.5",key:"svg-3"}],["path",{d:"M22.032 17.25l-1.299 .75",key:"svg-4"}],["path",{d:"M17.27 20l-1.3 .75",key:"svg-5"}],["path",{d:"M15.97 17.25l1.3 .75",key:"svg-6"}],["path",{d:"M20.733 20l1.3 .75",key:"svg-7"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Lue=ge("outline","filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var jue=ge("outline","filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var kEe=ge("outline","fingerprint-scan","IconFingerprintScan",[["path",{d:"M9 11a3 3 0 0 1 6 0c0 1.657 .612 3.082 1 4",key:"svg-0"}],["path",{d:"M12 11v1.75c-.001 1.11 .661 2.206 1 3.25",key:"svg-1"}],["path",{d:"M9 14.25c.068 .58 .358 1.186 .5 1.75",key:"svg-2"}],["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-3"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-4"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-5"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var EEe=ge("outline","fingerprint","IconFingerprint",[["path",{d:"M18.9 7a8 8 0 0 1 1.1 5v1a6 6 0 0 0 .8 3",key:"svg-0"}],["path",{d:"M8 11a4 4 0 0 1 8 0v1a10 10 0 0 0 2 6",key:"svg-1"}],["path",{d:"M12 11v2a14 14 0 0 0 2.5 8",key:"svg-2"}],["path",{d:"M8 15a18 18 0 0 0 1.8 6",key:"svg-3"}],["path",{d:"M4.9 19a22 22 0 0 1 -.9 -7v-1a8 8 0 0 1 12 -6.95",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $ue=ge("outline","grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var MEe=ge("outline","home","IconHome",[["path",{d:"M5 12l-2 0l9 -9l9 9l-2 0",key:"svg-0"}],["path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7",key:"svg-1"}],["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var TEe=ge("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var REe=ge("outline","license","IconLicense",[["path",{d:"M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11",key:"svg-0"}],["path",{d:"M9 7l4 0",key:"svg-1"}],["path",{d:"M9 11l4 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var OEe=ge("outline","list-check","IconListCheck",[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var PEe=ge("outline","list-details","IconListDetails",[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var AEe=ge("outline","logout","IconLogout",[["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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var DEe=ge("outline","mail-fast","IconMailFast",[["path",{d:"M3 7h3",key:"svg-0"}],["path",{d:"M3 11h2",key:"svg-1"}],["path",{d:"M9.02 8.801l-.6 6a2 2 0 0 0 1.99 2.199h7.98a2 2 0 0 0 1.99 -1.801l.6 -6a2 2 0 0 0 -1.99 -2.199h-7.98a2 2 0 0 0 -1.99 1.801z",key:"svg-2"}],["path",{d:"M9.8 7.5l2.982 3.28a3 3 0 0 0 4.238 .202l3.28 -2.982",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Fue=ge("outline","maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var IEe=ge("outline","message-up","IconMessageUp",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M11.99 18.606l-3.99 2.394v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5",key:"svg-2"}],["path",{d:"M19 22v-6",key:"svg-3"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var zue=ge("outline","minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var NEe=ge("outline","moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var LEe=ge("outline","pencil-plus","IconPencilPlus",[["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"}],["path",{d:"M16 19h6",key:"svg-2"}],["path",{d:"M19 16v6",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var jEe=ge("outline","phone","IconPhone",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $Ee=ge("outline","pin-end","IconPinEnd",[["path",{d:"M21 11v-5a1 1 0 0 0 -1 -1h-16a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h9",key:"svg-0"}],["path",{d:"M19 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M10 13v-4h4",key:"svg-2"}],["path",{d:"M14 13l-4 -4",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Bue=ge("outline","pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Vue=ge("outline","pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var FEe=ge("outline","printer","IconPrinter",[["path",{d:"M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2",key:"svg-0"}],["path",{d:"M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4",key:"svg-1"}],["path",{d:"M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var zEe=ge("outline","progress-x","IconProgressX",[["path",{d:"M10 20.777a8.942 8.942 0 0 1 -2.48 -.969",key:"svg-0"}],["path",{d:"M14 3.223a9.003 9.003 0 0 1 0 17.554",key:"svg-1"}],["path",{d:"M4.579 17.093a8.961 8.961 0 0 1 -1.227 -2.592",key:"svg-2"}],["path",{d:"M3.124 10.5c.16 -.95 .468 -1.85 .9 -2.675l.169 -.305",key:"svg-3"}],["path",{d:"M6.907 4.579a8.954 8.954 0 0 1 3.093 -1.356",key:"svg-4"}],["path",{d:"M14 14l-4 -4",key:"svg-5"}],["path",{d:"M10 14l4 -4",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var BEe=ge("outline","rotate","IconRotate",[["path",{d:"M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Hue=ge("outline","search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Wue=ge("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var VEe=ge("outline","send","IconSend",[["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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var HEe=ge("outline","settings","IconSettings",[["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.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Uue=ge("outline","sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Gue=ge("outline","sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var WEe=ge("outline","sun-high","IconSunHigh",[["path",{d:"M14.828 14.828a4 4 0 1 0 -5.656 -5.656a4 4 0 0 0 5.656 5.656z",key:"svg-0"}],["path",{d:"M6.343 17.657l-1.414 1.414",key:"svg-1"}],["path",{d:"M6.343 6.343l-1.414 -1.414",key:"svg-2"}],["path",{d:"M17.657 6.343l1.414 -1.414",key:"svg-3"}],["path",{d:"M17.657 17.657l1.414 1.414",key:"svg-4"}],["path",{d:"M4 12h-2",key:"svg-5"}],["path",{d:"M12 4v-2",key:"svg-6"}],["path",{d:"M20 12h2",key:"svg-7"}],["path",{d:"M12 20v2",key:"svg-8"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var UEe=ge("outline","sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var GEe=ge("outline","thumb-down","IconThumbDown",[["path",{d:"M7 13v-8a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v7a1 1 0 0 0 1 1h3a4 4 0 0 1 4 4v1a2 2 0 0 0 4 0v-5h3a2 2 0 0 0 2 -2l-1 -5a2 3 0 0 0 -2 -2h-7a3 3 0 0 0 -3 3",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var KEe=ge("outline","thumb-up","IconThumbUp",[["path",{d:"M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var YEe=ge("outline","transfer-in","IconTransferIn",[["path",{d:"M4 18v3h16v-14l-8 -4l-8 4v3",key:"svg-0"}],["path",{d:"M4 14h9",key:"svg-1"}],["path",{d:"M10 11l3 3l-3 3",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var qEe=ge("outline","trash","IconTrash",[["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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var XEe=ge("outline","user-bolt","IconUserBolt",[["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.267 0 .529 .026 .781 .076",key:"svg-1"}],["path",{d:"M19 16l-2 3h4l-2 3",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var JEe=ge("outline","user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 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"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var QEe=ge("outline","user-hexagon","IconUserHexagon",[["path",{d:"M12 13a3 3 0 1 0 0 -6a3 3 0 0 0 0 6z",key:"svg-0"}],["path",{d:"M6.201 18.744a4 4 0 0 1 3.799 -2.744h4a4 4 0 0 1 3.798 2.741",key:"svg-1"}],["path",{d:"M19.875 6.27c.7 .398 1.13 1.143 1.125 1.948v7.284c0 .809 -.443 1.555 -1.158 1.948l-6.75 4.27a2.269 2.269 0 0 1 -2.184 0l-6.75 -4.27a2.225 2.225 0 0 1 -1.158 -1.948v-7.285c0 -.809 .443 -1.554 1.158 -1.947l6.75 -3.98a2.33 2.33 0 0 1 2.25 0l6.75 3.98h-.033z",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var ZEe=ge("outline","user-scan","IconUserScan",[["path",{d:"M10 9a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-1"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-2"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-3"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-4"}],["path",{d:"M8 16a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2",key:"svg-5"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var eMe=ge("outline","user-share","IconUserShare",[["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 -4h3",key:"svg-1"}],["path",{d:"M16 22l5 -5",key:"svg-2"}],["path",{d:"M21 21.5v-4.5h-4.5",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var tMe=ge("outline","user-shield","IconUserShield",[["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h2",key:"svg-0"}],["path",{d:"M22 16c0 4 -2.5 6 -3.5 6s-3.5 -2 -3.5 -6c1 0 2.5 -.5 3.5 -1.5c1 1 2.5 1.5 3.5 1.5z",key:"svg-1"}],["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Kue=ge("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var nMe=ge("filled","alert-circle-filled","IconAlertCircleFilled",[["path",{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm.01 13l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.11.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var rMe=ge("filled","rosette-discount-check-filled","IconRosetteDiscountCheckFilled",[["path",{d:"M12.01 2.011a3.2 3.2 0 0 1 2.113 .797l.154 .145l.698 .698a1.2 1.2 0 0 0 .71 .341l.135 .008h1a3.2 3.2 0 0 1 3.195 3.018l.005 .182v1c0 .27 .092 .533 .258 .743l.09 .1l.697 .698a3.2 3.2 0 0 1 .147 4.382l-.145 .154l-.698 .698a1.2 1.2 0 0 0 -.341 .71l-.008 .135v1a3.2 3.2 0 0 1 -3.018 3.195l-.182 .005h-1a1.2 1.2 0 0 0 -.743 .258l-.1 .09l-.698 .697a3.2 3.2 0 0 1 -4.382 .147l-.154 -.145l-.698 -.698a1.2 1.2 0 0 0 -.71 -.341l-.135 -.008h-1a3.2 3.2 0 0 1 -3.195 -3.018l-.005 -.182v-1a1.2 1.2 0 0 0 -.258 -.743l-.09 -.1l-.697 -.698a3.2 3.2 0 0 1 -.147 -4.382l.145 -.154l.698 -.698a1.2 1.2 0 0 0 .341 -.71l.008 -.135v-1l.005 -.182a3.2 3.2 0 0 1 3.013 -3.013l.182 -.005h1a1.2 1.2 0 0 0 .743 -.258l.1 -.09l.698 -.697a3.2 3.2 0 0 1 2.269 -.944zm3.697 7.282a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z",key:"svg-0"}]]);function iz(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=iz(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function De(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=iz(t))&&(r&&(r+=" "),r+=e);return r}/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function wp(t){return t+.5|0}const Qi=(t,e,n)=>Math.max(Math.min(t,n),e);function ff(t){return Qi(wp(t*2.55),0,255)}function pa(t){return Qi(wp(t*255),0,255)}function Xs(t){return Qi(wp(t/2.55)/100,0,1)}function MA(t){return Qi(wp(t*100),0,100)}const io={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},o_=[..."0123456789ABCDEF"],Yue=t=>o_[t&15],que=t=>o_[(t&240)>>4]+o_[t&15],vm=t=>(t&240)>>4===(t&15),Xue=t=>vm(t.r)&&vm(t.g)&&vm(t.b)&&vm(t.a);function Jue(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&io[t[1]]*17,g:255&io[t[2]]*17,b:255&io[t[3]]*17,a:e===5?io[t[4]]*17:255}:(e===7||e===9)&&(n={r:io[t[1]]<<4|io[t[2]],g:io[t[3]]<<4|io[t[4]],b:io[t[5]]<<4|io[t[6]],a:e===9?io[t[7]]<<4|io[t[8]]:255})),n}const Que=(t,e)=>t<255?e(t):"";function Zue(t){var e=Xue(t)?Yue:que;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Que(t.a,e):void 0}const ede=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function az(t,e,n){const r=e*Math.min(n,1-n),o=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[o(0),o(8),o(4)]}function tde(t,e,n){const r=(o,s=(o+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function nde(t,e,n){const r=az(t,1,.5);let o;for(e+n>1&&(o=1/(e+n),e*=o,n*=o),o=0;o<3;o++)r[o]*=1-e-n,r[o]+=e;return r}function rde(t,e,n,r,o){return t===o?(e-n)/r+(e<n?6:0):e===o?(n-t)/r+2:(t-e)/r+4}function FE(t){const n=t.r/255,r=t.g/255,o=t.b/255,s=Math.max(n,r,o),i=Math.min(n,r,o),a=(s+i)/2;let l,c,u;return s!==i&&(u=s-i,c=a>.5?u/(2-s-i):u/(s+i),l=rde(n,r,o,u,s),l=l*60+.5),[l|0,c||0,a]}function zE(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(pa)}function BE(t,e,n){return zE(az,t,e,n)}function ode(t,e,n){return zE(nde,t,e,n)}function sde(t,e,n){return zE(tde,t,e,n)}function lz(t){return(t%360+360)%360}function ide(t){const e=ede.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ff(+e[5]):pa(+e[5]));const o=lz(+e[2]),s=+e[3]/100,i=+e[4]/100;return e[1]==="hwb"?r=ode(o,s,i):e[1]==="hsv"?r=sde(o,s,i):r=BE(o,s,i),{r:r[0],g:r[1],b:r[2],a:n}}function ade(t,e){var n=FE(t);n[0]=lz(n[0]+e),n=BE(n),t.r=n[0],t.g=n[1],t.b=n[2]}function lde(t){if(!t)return;const e=FE(t),n=e[0],r=MA(e[1]),o=MA(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${Xs(t.a)})`:`hsl(${n}, ${r}%, ${o}%)`}const TA={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},RA={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function cde(){const t={},e=Object.keys(RA),n=Object.keys(TA);let r,o,s,i,a;for(r=0;r<e.length;r++){for(i=a=e[r],o=0;o<n.length;o++)s=n[o],a=a.replace(s,TA[s]);s=parseInt(RA[i],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let ym;function ude(t){ym||(ym=cde(),ym.transparent=[0,0,0,0]);const e=ym[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const dde=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function fde(t){const e=dde.exec(t);let n=255,r,o,s;if(e){if(e[7]!==r){const i=+e[7];n=e[8]?ff(i):Qi(i*255,0,255)}return r=+e[1],o=+e[3],s=+e[5],r=255&(e[2]?ff(r):Qi(r,0,255)),o=255&(e[4]?ff(o):Qi(o,0,255)),s=255&(e[6]?ff(s):Qi(s,0,255)),{r,g:o,b:s,a:n}}}function hde(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Xs(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const lw=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Ac=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function pde(t,e,n){const r=Ac(Xs(t.r)),o=Ac(Xs(t.g)),s=Ac(Xs(t.b));return{r:pa(lw(r+n*(Ac(Xs(e.r))-r))),g:pa(lw(o+n*(Ac(Xs(e.g))-o))),b:pa(lw(s+n*(Ac(Xs(e.b))-s))),a:t.a+n*(e.a-t.a)}}function bm(t,e,n){if(t){let r=FE(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=BE(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function cz(t,e){return t&&Object.assign(e||{},t)}function OA(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=pa(t[3]))):(e=cz(t,{r:0,g:0,b:0,a:1}),e.a=pa(e.a)),e}function mde(t){return t.charAt(0)==="r"?fde(t):ide(t)}class Ch{constructor(e){if(e instanceof Ch)return e;const n=typeof e;let r;n==="object"?r=OA(e):n==="string"&&(r=Jue(e)||ude(e)||mde(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=cz(this._rgb);return e&&(e.a=Xs(e.a)),e}set rgb(e){this._rgb=OA(e)}rgbString(){return this._valid?hde(this._rgb):void 0}hexString(){return this._valid?Zue(this._rgb):void 0}hslString(){return this._valid?lde(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,o=e.rgb;let s;const i=n===s?.5:n,a=2*i-1,l=r.a-o.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,r.r=255&c*r.r+s*o.r+.5,r.g=255&c*r.g+s*o.g+.5,r.b=255&c*r.b+s*o.b+.5,r.a=i*r.a+(1-i)*o.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=pde(this._rgb,e._rgb,n)),this}clone(){return new Ch(this.rgb)}alpha(e){return this._rgb.a=pa(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=wp(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return bm(this._rgb,2,e),this}darken(e){return bm(this._rgb,2,-e),this}saturate(e){return bm(this._rgb,1,e),this}desaturate(e){return bm(this._rgb,1,-e),this}rotate(e){return ade(this._rgb,e),this}}/*!
 * Chart.js v4.4.1
 * https://www.chartjs.org
 * (c) 2023 Chart.js Contributors
 * Released under the MIT License
 */function Vs(){}const gde=(()=>{let t=0;return()=>t++})();function ft(t){return t===null||typeof t>"u"}function en(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function nt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Qn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function ds(t,e){return Qn(t)?t:e}function qe(t,e){return typeof t>"u"?e:t}const vde=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,uz=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function xt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function pt(t,e,n,r){let o,s,i;if(en(t))if(s=t.length,r)for(o=s-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o<s;o++)e.call(n,t[o],o);else if(nt(t))for(i=Object.keys(t),s=i.length,o=0;o<s;o++)e.call(n,t[i[o]],i[o])}function Mv(t,e){let n,r,o,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(o=t[n],s=e[n],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function Tv(t){if(en(t))return t.map(Tv);if(nt(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let o=0;for(;o<r;++o)e[n[o]]=Tv(t[n[o]]);return e}return t}function dz(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function yde(t,e,n,r){if(!dz(t))return;const o=e[t],s=n[t];nt(o)&&nt(s)?Ns(o,s,r):e[t]=Tv(s)}function Ns(t,e,n){const r=en(e)?e:[e],o=r.length;if(!nt(t))return t;n=n||{};const s=n.merger||yde;let i;for(let a=0;a<o;++a){if(i=r[a],!nt(i))continue;const l=Object.keys(i);for(let c=0,u=l.length;c<u;++c)s(l[c],t,i,n)}return t}function Af(t,e){return Ns(t,e,{merger:bde})}function bde(t,e,n){if(!dz(t))return;const r=e[t],o=n[t];nt(r)&&nt(o)?Af(r,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Tv(o))}const PA={"":t=>t,x:t=>t.x,y:t=>t.y};function wde(t){const e=t.split("."),n=[];let r="";for(const o of e)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function xde(t){const e=wde(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function Zl(t,e){return(PA[e]||(PA[e]=xde(e)))(t)}function VE(t){return t.charAt(0).toUpperCase()+t.slice(1)}const kh=t=>typeof t<"u",Ta=t=>typeof t=="function",AA=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Sde(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const qt=Math.PI,zt=2*qt,_de=zt+qt,Rv=Number.POSITIVE_INFINITY,Cde=qt/180,gn=qt/2,ol=qt/4,DA=qt*2/3,s_=Math.log10,Ds=Math.sign;function Df(t,e,n){return Math.abs(t-e)<n}function IA(t){const e=Math.round(t);t=Df(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(s_(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function kde(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((o,s)=>o-s).pop(),e}function Eh(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ede(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Mde(t,e,n){let r,o,s;for(r=0,o=t.length;r<o;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function ei(t){return t*(qt/180)}function Tde(t){return t*(180/qt)}function NA(t){if(!Qn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function fz(t,e){const n=e.x-t.x,r=e.y-t.y,o=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*qt&&(s+=zt),{angle:s,distance:o}}function i_(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Rde(t,e){return(t-e+_de)%zt-qt}function ws(t){return(t%zt+zt)%zt}function Mh(t,e,n,r){const o=ws(t),s=ws(e),i=ws(n),a=ws(s-o),l=ws(i-o),c=ws(o-s),u=ws(o-i);return o===s||o===i||r&&s===i||a>l&&c<u}function Xn(t,e,n){return Math.max(e,Math.min(n,t))}function Ode(t){return Xn(t,-32768,32767)}function ti(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function HE(t,e,n){n=n||(i=>t[i]<e);let r=t.length-1,o=0,s;for(;r-o>1;)s=o+r>>1,n(s)?o=s:r=s;return{lo:o,hi:r}}const Cl=(t,e,n,r)=>HE(t,n,r?o=>{const s=t[o][e];return s<n||s===n&&t[o+1][e]===n}:o=>t[o][e]<n),Pde=(t,e,n)=>HE(t,n,r=>t[r][e]>=n);function Ade(t,e,n){let r=0,o=t.length;for(;r<o&&t[r]<e;)r++;for(;o>r&&t[o-1]>n;)o--;return r>0||o<t.length?t.slice(r,o):t}const hz=["push","pop","shift","splice","unshift"];function Dde(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),hz.forEach(n=>{const r="_onData"+VE(n),o=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const i=o.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),i}})})}function LA(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,o=r.indexOf(e);o!==-1&&r.splice(o,1),!(r.length>0)&&(hz.forEach(s=>{delete t[s]}),delete t._chartjs)}function pz(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const mz=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function gz(t,e){let n=[],r=!1;return function(...o){n=o,r||(r=!0,mz.call(window,()=>{r=!1,t.apply(e,n)}))}}function Ide(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const WE=t=>t==="start"?"left":t==="end"?"right":"center",Gn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Nde=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function Lde(t,e,n){const r=e.length;let o=0,s=r;if(t._sorted){const{iScale:i,_parsed:a}=t,l=i.axis,{min:c,max:u,minDefined:d,maxDefined:f}=i.getUserBounds();d&&(o=Xn(Math.min(Cl(a,l,c).lo,n?r:Cl(e,l,i.getPixelForValue(c)).lo),0,r-1)),f?s=Xn(Math.max(Cl(a,i.axis,u,!0).hi+1,n?0:Cl(e,l,i.getPixelForValue(u),!0).hi+1),o,r)-o:s=r-o}return{start:o,count:s}}function jde(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,o={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=o,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,o),s}const wm=t=>t===0||t===1,jA=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*zt/n)),$A=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*zt/n)+1,If={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*gn)+1,easeOutSine:t=>Math.sin(t*gn),easeInOutSine:t=>-.5*(Math.cos(qt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>wm(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>wm(t)?t:jA(t,.075,.3),easeOutElastic:t=>wm(t)?t:$A(t,.075,.3),easeInOutElastic(t){return wm(t)?t:t<.5?.5*jA(t*2,.1125,.45):.5+.5*$A(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-If.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?If.easeInBounce(t*2)*.5:If.easeOutBounce(t*2-1)*.5+.5};function UE(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function FA(t){return UE(t)?t:new Ch(t)}function cw(t){return UE(t)?t:new Ch(t).saturate(.5).darken(.1).hexString()}const $de=["x","y","borderWidth","radius","tension"],Fde=["color","borderColor","backgroundColor"];function zde(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Fde},numbers:{type:"number",properties:$de}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Bde(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const zA=new Map;function Vde(t,e){e=e||{};const n=t+JSON.stringify(e);let r=zA.get(n);return r||(r=new Intl.NumberFormat(t,e),zA.set(n,r)),r}function GE(t,e,n){return Vde(e,n).format(t)}const vz={values(t){return en(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let o,s=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(o="scientific"),s=Hde(t,n)}const i=s_(Math.abs(s)),a=isNaN(i)?1:Math.max(Math.min(-1*Math.floor(i),20),0),l={notation:o,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),GE(t,r,l)},logarithmic(t,e,n){if(t===0)return"0";const r=n[e].significand||t/Math.pow(10,Math.floor(s_(t)));return[1,2,3,5,10,15].includes(r)||e>.8*n.length?vz.numeric.call(this,t,e,n):""}};function Hde(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var yz={formatters:vz};function Wde(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:yz.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const ec=Object.create(null),a_=Object.create(null);function Nf(t,e){if(!e)return t;const n=e.split(".");for(let r=0,o=n.length;r<o;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function uw(t,e,n){return typeof e=="string"?Ns(Nf(t,e),n):Ns(Nf(t,""),e)}class Ude{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,o)=>cw(o.backgroundColor),this.hoverBorderColor=(r,o)=>cw(o.borderColor),this.hoverColor=(r,o)=>cw(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return uw(this,e,n)}get(e){return Nf(this,e)}describe(e,n){return uw(a_,e,n)}override(e,n){return uw(ec,e,n)}route(e,n,r,o){const s=Nf(this,e),i=Nf(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=i[o];return nt(l)?Object.assign({},c,l):qe(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var Yt=new Ude({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zde,Bde,Wde]);function Gde(t){return!t||ft(t.size)||ft(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function BA(t,e,n,r,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,n.push(o)),s>r&&(r=s),r}function sl(t,e,n){const r=t.currentDevicePixelRatio,o=n!==0?Math.max(n/2,.5):0;return Math.round((e-o)*r)/r+o}function VA(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function l_(t,e,n,r){bz(t,e,n,r,null)}function bz(t,e,n,r,o){let s,i,a,l,c,u,d,f;const h=e.pointStyle,p=e.rotation,m=e.radius;let v=(p||0)*Cde;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(v),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:o?t.ellipse(n,r,o/2,m,0,0,zt):t.arc(n,r,m,0,zt),t.closePath();break;case"triangle":u=o?o/2:m,t.moveTo(n+Math.sin(v)*u,r-Math.cos(v)*m),v+=DA,t.lineTo(n+Math.sin(v)*u,r-Math.cos(v)*m),v+=DA,t.lineTo(n+Math.sin(v)*u,r-Math.cos(v)*m),t.closePath();break;case"rectRounded":c=m*.516,l=m-c,i=Math.cos(v+ol)*l,d=Math.cos(v+ol)*(o?o/2-c:l),a=Math.sin(v+ol)*l,f=Math.sin(v+ol)*(o?o/2-c:l),t.arc(n-d,r-a,c,v-qt,v-gn),t.arc(n+f,r-i,c,v-gn,v),t.arc(n+d,r+a,c,v,v+gn),t.arc(n-f,r+i,c,v+gn,v+qt),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,u=o?o/2:l,t.rect(n-u,r-l,2*u,2*l);break}v+=ol;case"rectRot":d=Math.cos(v)*(o?o/2:m),i=Math.cos(v)*m,a=Math.sin(v)*m,f=Math.sin(v)*(o?o/2:m),t.moveTo(n-d,r-a),t.lineTo(n+f,r-i),t.lineTo(n+d,r+a),t.lineTo(n-f,r+i),t.closePath();break;case"crossRot":v+=ol;case"cross":d=Math.cos(v)*(o?o/2:m),i=Math.cos(v)*m,a=Math.sin(v)*m,f=Math.sin(v)*(o?o/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-i),t.lineTo(n-f,r+i);break;case"star":d=Math.cos(v)*(o?o/2:m),i=Math.cos(v)*m,a=Math.sin(v)*m,f=Math.sin(v)*(o?o/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-i),t.lineTo(n-f,r+i),v+=ol,d=Math.cos(v)*(o?o/2:m),i=Math.cos(v)*m,a=Math.sin(v)*m,f=Math.sin(v)*(o?o/2:m),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-i),t.lineTo(n-f,r+i);break;case"line":i=o?o/2:Math.cos(v)*m,a=Math.sin(v)*m,t.moveTo(n-i,r-a),t.lineTo(n+i,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(v)*(o?o/2:m),r+Math.sin(v)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Th(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function nb(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function rb(t){t.restore()}function Kde(t,e,n,r,o){if(!e)return t.lineTo(n.x,n.y);if(o==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else o==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Yde(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function qde(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ft(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Xde(t,e,n,r,o){if(o.strikethrough||o.underline){const s=t.measureText(r),i=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(i,u),t.lineTo(a,u),t.stroke()}}function Jde(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Rh(t,e,n,r,o,s={}){const i=en(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(t.save(),t.font=o.string,qde(t,s),l=0;l<i.length;++l)c=i[l],s.backdrop&&Jde(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ft(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,r,s.maxWidth)),t.fillText(c,n,r,s.maxWidth),Xde(t,n,r,c,s),r+=Number(o.lineHeight);t.restore()}function Ov(t,e){const{x:n,y:r,w:o,h:s,radius:i}=e;t.arc(n+i.topLeft,r+i.topLeft,i.topLeft,1.5*qt,qt,!0),t.lineTo(n,r+s-i.bottomLeft),t.arc(n+i.bottomLeft,r+s-i.bottomLeft,i.bottomLeft,qt,gn,!0),t.lineTo(n+o-i.bottomRight,r+s),t.arc(n+o-i.bottomRight,r+s-i.bottomRight,i.bottomRight,gn,0,!0),t.lineTo(n+o,r+i.topRight),t.arc(n+o-i.topRight,r+i.topRight,i.topRight,0,-gn,!0),t.lineTo(n+i.topLeft,r)}const Qde=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Zde=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function efe(t,e){const n=(""+t).match(Qde);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const tfe=t=>+t||0;function KE(t,e){const n={},r=nt(e),o=r?Object.keys(e):e,s=nt(t)?r?i=>qe(t[i],t[e[i]]):i=>t[i]:()=>t;for(const i of o)n[i]=tfe(s(i));return n}function wz(t){return KE(t,{top:"y",right:"x",bottom:"y",left:"x"})}function vu(t){return KE(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Qr(t){const e=wz(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function $n(t,e){t=t||{},e=e||Yt.font;let n=qe(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=qe(t.style,e.style);r&&!(""+r).match(Zde)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const o={family:qe(t.family,e.family),lineHeight:efe(qe(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:qe(t.weight,e.weight),string:""};return o.string=Gde(o),o}function Pt(t,e,n,r){let o=!0,s,i,a;for(s=0,i=t.length;s<i;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),o=!1),n!==void 0&&en(a)&&(a=a[n%a.length],o=!1),a!==void 0))return r&&!o&&(r.cacheable=!1),a}function nfe(t,e,n){const{min:r,max:o}=t,s=uz(e,(o-r)/2),i=(a,l)=>n&&a===0?0:a+l;return{min:i(r,-Math.abs(s)),max:i(o,s)}}function gc(t,e){return Object.assign(Object.create(t),e)}function YE(t,e=[""],n,r,o=()=>t[0]){const s=n||t;typeof r>"u"&&(r=Cz("_fallback",t));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:o,override:a=>YE([a,...t],e,s,r)};return new Proxy(i,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Sz(a,l,()=>ufe(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return WA(a).includes(l)},ownKeys(a){return WA(a)},set(a,l,c){const u=a._storage||(a._storage=o());return a[l]=u[l]=c,delete a._keys,!0}})}function Ku(t,e,n,r){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:xz(t,r),setContext:s=>Ku(t,s,n,r),override:s=>Ku(t.override(s),e,n,r)};return new Proxy(o,{deleteProperty(s,i){return delete s[i],delete t[i],!0},get(s,i,a){return Sz(s,i,()=>ofe(s,i,a))},getOwnPropertyDescriptor(s,i){return s._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(s,i,a){return t[i]=a,delete s[i],!0}})}function xz(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:Ta(n)?n:()=>n,isIndexable:Ta(r)?r:()=>r}}const rfe=(t,e)=>t?t+VE(e):e,qE=(t,e)=>nt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Sz(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const r=n();return t[e]=r,r}function ofe(t,e,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:i}=t;let a=r[e];return Ta(a)&&i.isScriptable(e)&&(a=sfe(e,a,t,n)),en(a)&&a.length&&(a=ife(e,a,t,i.isIndexable)),qE(e,a)&&(a=Ku(a,o,s&&s[e],i)),a}function sfe(t,e,n,r){const{_proxy:o,_context:s,_subProxy:i,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,i||r);return a.delete(t),qE(t,l)&&(l=XE(o._scopes,o,t,l)),l}function ife(t,e,n,r){const{_proxy:o,_context:s,_subProxy:i,_descriptors:a}=n;if(typeof s.index<"u"&&r(t))return e[s.index%e.length];if(nt(e[0])){const l=e,c=o._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=XE(c,o,t,u);e.push(Ku(d,s,i&&i[t],a))}}return e}function _z(t,e,n){return Ta(t)?t(e,n):t}const afe=(t,e)=>t===!0?e:typeof t=="string"?Zl(e,t):void 0;function lfe(t,e,n,r,o){for(const s of e){const i=afe(n,s);if(i){t.add(i);const a=_z(i._fallback,n,o);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(i===!1&&typeof r<"u"&&n!==r)return null}return!1}function XE(t,e,n,r){const o=e._rootScopes,s=_z(e._fallback,n,r),i=[...t,...o],a=new Set;a.add(r);let l=HA(a,i,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=HA(a,i,s,l,r),l===null)?!1:YE(Array.from(a),[""],o,s,()=>cfe(e,n,r))}function HA(t,e,n,r,o){for(;n;)n=lfe(t,e,n,r,o);return n}function cfe(t,e,n){const r=t._getTarget();e in r||(r[e]={});const o=r[e];return en(o)&&nt(n)?n:o||{}}function ufe(t,e,n,r){let o;for(const s of e)if(o=Cz(rfe(s,t),n),typeof o<"u")return qE(t,o)?XE(n,r,t,o):o}function Cz(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function WA(t){let e=t._keys;return e||(e=t._keys=dfe(t._scopes)),e}function dfe(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(o=>!o.startsWith("_")))e.add(r);return Array.from(e)}const ffe=Number.EPSILON||1e-14,Yu=(t,e)=>e<t.length&&!t[e].skip&&t[e],kz=t=>t==="x"?"y":"x";function hfe(t,e,n,r){const o=t.skip?e:t,s=e,i=n.skip?e:n,a=i_(s,o),l=i_(i,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:s.x-d*(i.x-o.x),y:s.y-d*(i.y-o.y)},next:{x:s.x+f*(i.x-o.x),y:s.y+f*(i.y-o.y)}}}function pfe(t,e,n){const r=t.length;let o,s,i,a,l,c=Yu(t,0);for(let u=0;u<r-1;++u)if(l=c,c=Yu(t,u+1),!(!l||!c)){if(Df(e[u],0,ffe)){n[u]=n[u+1]=0;continue}o=n[u]/e[u],s=n[u+1]/e[u],a=Math.pow(o,2)+Math.pow(s,2),!(a<=9)&&(i=3/Math.sqrt(a),n[u]=o*i*e[u],n[u+1]=s*i*e[u])}}function mfe(t,e,n="x"){const r=kz(n),o=t.length;let s,i,a,l=Yu(t,0);for(let c=0;c<o;++c){if(i=a,a=l,l=Yu(t,c+1),!a)continue;const u=a[n],d=a[r];i&&(s=(u-i[n])/3,a[`cp1${n}`]=u-s,a[`cp1${r}`]=d-s*e[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${r}`]=d+s*e[c])}}function gfe(t,e="x"){const n=kz(e),r=t.length,o=Array(r).fill(0),s=Array(r);let i,a,l,c=Yu(t,0);for(i=0;i<r;++i)if(a=l,l=c,c=Yu(t,i+1),!!l){if(c){const u=c[e]-l[e];o[i]=u!==0?(c[n]-l[n])/u:0}s[i]=a?c?Ds(o[i-1])!==Ds(o[i])?0:(o[i-1]+o[i])/2:o[i-1]:o[i]}pfe(t,o,s),mfe(t,s,e)}function xm(t,e,n){return Math.max(Math.min(t,n),e)}function vfe(t,e){let n,r,o,s,i,a=Th(t[0],e);for(n=0,r=t.length;n<r;++n)i=s,s=a,a=n<r-1&&Th(t[n+1],e),s&&(o=t[n],i&&(o.cp1x=xm(o.cp1x,e.left,e.right),o.cp1y=xm(o.cp1y,e.top,e.bottom)),a&&(o.cp2x=xm(o.cp2x,e.left,e.right),o.cp2y=xm(o.cp2y,e.top,e.bottom)))}function yfe(t,e,n,r,o){let s,i,a,l;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")gfe(t,o);else{let c=r?t[t.length-1]:t[0];for(s=0,i=t.length;s<i;++s)a=t[s],l=hfe(c,a,t[Math.min(s+1,i-(r?0:1))%i],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}e.capBezierPoints&&vfe(t,n)}function JE(){return typeof window<"u"&&typeof document<"u"}function QE(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Pv(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const ob=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function bfe(t,e){return ob(t).getPropertyValue(e)}const wfe=["top","right","bottom","left"];function Il(t,e,n){const r={};n=n?"-"+n:"";for(let o=0;o<4;o++){const s=wfe[o];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const xfe=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Sfe(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:o,offsetY:s}=r;let i=!1,a,l;if(xfe(o,s,t.target))a=o,l=s;else{const c=e.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,i=!0}return{x:a,y:l,box:i}}function fl(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,o=ob(n),s=o.boxSizing==="border-box",i=Il(o,"padding"),a=Il(o,"border","width"),{x:l,y:c,box:u}=Sfe(t,n),d=i.left+(u&&a.left),f=i.top+(u&&a.top);let{width:h,height:p}=e;return s&&(h-=i.width+a.width,p-=i.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/p*n.height/r)}}function _fe(t,e,n){let r,o;if(e===void 0||n===void 0){const s=QE(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const i=s.getBoundingClientRect(),a=ob(s),l=Il(a,"border","width"),c=Il(a,"padding");e=i.width-c.width-l.width,n=i.height-c.height-l.height,r=Pv(a.maxWidth,s,"clientWidth"),o=Pv(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||Rv,maxHeight:o||Rv}}const Sm=t=>Math.round(t*10)/10;function Cfe(t,e,n,r){const o=ob(t),s=Il(o,"margin"),i=Pv(o.maxWidth,t,"clientWidth")||Rv,a=Pv(o.maxHeight,t,"clientHeight")||Rv,l=_fe(t,e,n);let{width:c,height:u}=l;if(o.boxSizing==="content-box"){const f=Il(o,"border","width"),h=Il(o,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-s.width),u=Math.max(0,r?c/r:u-s.height),c=Sm(Math.min(c,i,l.maxWidth)),u=Sm(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Sm(c/2)),(e!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Sm(Math.floor(u*r))),{width:c,height:u}}function UA(t,e,n){const r=e||1,o=Math.floor(t.height*r),s=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const i=t.canvas;return i.style&&(n||!i.style.height&&!i.style.width)&&(i.style.height=`${t.height}px`,i.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||i.height!==o||i.width!==s?(t.currentDevicePixelRatio=r,i.height=o,i.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const kfe=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};JE()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function GA(t,e){const n=bfe(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function hl(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Efe(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Mfe(t,e,n,r){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},i=hl(t,o,n),a=hl(o,s,n),l=hl(s,e,n),c=hl(i,a,n),u=hl(a,l,n);return hl(c,u,n)}const Tfe=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Rfe=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function yu(t,e,n){return t?Tfe(e,n):Rfe()}function Ez(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function Mz(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Tz(t){return t==="angle"?{between:Mh,compare:Rde,normalize:ws}:{between:ti,compare:(e,n)=>e-n,normalize:e=>e}}function KA({start:t,end:e,count:n,loop:r,style:o}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:o}}function Ofe(t,e,n){const{property:r,start:o,end:s}=n,{between:i,normalize:a}=Tz(r),l=e.length;let{start:c,end:u,loop:d}=t,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&i(a(e[c%l][r]),o,s);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:t.style}}function Rz(t,e,n){if(!n)return[t];const{property:r,start:o,end:s}=n,i=e.length,{compare:a,between:l,normalize:c}=Tz(r),{start:u,end:d,loop:f,style:h}=Ofe(t,e,n),p=[];let m=!1,v=null,y,b,w;const S=()=>l(o,w,y)&&a(o,w)!==0,_=()=>a(s,y)===0||l(s,w,y),k=()=>m||S(),M=()=>!m||_();for(let T=u,P=u;T<=d;++T)b=e[T%i],!b.skip&&(y=c(b[r]),y!==w&&(m=l(y,o,s),v===null&&k()&&(v=a(y,o)===0?T:P),v!==null&&M()&&(p.push(KA({start:v,end:T,loop:f,count:i,style:h})),v=null),P=T,w=y));return v!==null&&p.push(KA({start:v,end:d,loop:f,count:i,style:h})),p}function Oz(t,e){const n=[],r=t.segments;for(let o=0;o<r.length;o++){const s=Rz(r[o],t.points,e);s.length&&n.push(...s)}return n}function Pfe(t,e,n,r){let o=0,s=e-1;if(n&&!r)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,n&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}function Afe(t,e,n,r){const o=t.length,s=[];let i=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%o];c.skip||c.stop?a.skip||(r=!1,s.push({start:e%o,end:(l-1)%o,loop:r}),e=i=c.stop?l:null):(i=l,a.skip&&(e=l)),a=c}return i!==null&&s.push({start:e%o,end:i%o,loop:r}),s}function Dfe(t,e){const n=t.points,r=t.options.spanGaps,o=n.length;if(!o)return[];const s=!!t._loop,{start:i,end:a}=Pfe(n,o,s,r);if(r===!0)return YA(t,[{start:i,end:a,loop:s}],n,e);const l=a<i?a+o:a,c=!!t._fullLoop&&i===0&&a===o-1;return YA(t,Afe(n,i,l,c),n,e)}function YA(t,e,n,r){return!r||!r.setContext||!n?e:Ife(t,e,n,r)}function Ife(t,e,n,r){const o=t._chart.getContext(),s=qA(t.options),{_datasetIndex:i,options:{spanGaps:a}}=t,l=n.length,c=[];let u=s,d=e[0].start,f=d;function h(p,m,v,y){const b=a?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=b;for(;n[m%l].skip;)m+=b;p%l!==m%l&&(c.push({start:p%l,end:m%l,loop:v,style:y}),u=y,d=m%l)}}for(const p of e){d=a?d:p.start;let m=n[d%l],v;for(f=d+1;f<=p.end;f++){const y=n[f%l];v=qA(r.setContext(gc(o,{type:"segment",p0:m,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:i}))),Nfe(v,u)&&h(d,f-1,p.loop,u),m=y,u=v}d<f-1&&h(d,f-1,p.loop,u)}return c}function qA(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Nfe(t,e){if(!e)return!1;const n=[],r=function(o,s){return UE(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}/*!
 * Chart.js v4.4.1
 * https://www.chartjs.org
 * (c) 2023 Chart.js Contributors
 * Released under the MIT License
 */class Lfe{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,o){const s=n.listeners[o],i=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=mz.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,o)=>{if(!r.running||!r.items.length)return;const s=r.items;let i=s.length-1,a=!1,l;for(;i>=0;--i)l=s[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(s[i]=s[s.length-1],s.pop());a&&(o.draw(),this._notify(o,r,e,"progress")),s.length||(r.running=!1,this._notify(o,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,o)=>Math.max(r,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let o=r.length-1;for(;o>=0;--o)r[o].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Ws=new Lfe;const XA="transparent",jfe={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=FA(t||XA),o=r.valid&&FA(e||XA);return o&&o.valid?o.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class $fe{constructor(e,n,r,o){const s=n[r];o=Pt([e.to,o,s,e.from]);const i=Pt([e.from,s,o]);this._active=!0,this._fn=e.fn||jfe[e.type||typeof i],this._easing=If[e.easing]||If.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=i,this._to=o,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const o=this._target[this._prop],s=r-this._start,i=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Pt([e.to,n,o,e.from]),this._from=Pt([e.from,o,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,o=this._prop,s=this._from,i=this._loop,a=this._to;let l;if(this._active=s!==a&&(i||n<r),!this._active){this._target[o]=a,this._notify(!0);return}if(n<0){this._target[o]=s;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[o]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let o=0;o<r.length;o++)r[o][n]()}}class Pz{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!nt(e))return;const n=Object.keys(Yt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{const s=e[o];if(!nt(s))return;const i={};for(const a of n)i[a]=s[a];(en(s.properties)&&s.properties||[o]).forEach(a=>{(a===o||!r.has(a))&&r.set(a,i)})})}_animateOptions(e,n){const r=n.options,o=zfe(e,r);if(!o)return[];const s=this._createAnimations(o,r);return r.$shared&&Ffe(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,o=[],s=e.$animations||(e.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){o.push(...this._animateOptions(e,n));continue}const u=n[c];let d=s[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){e[c]=u;continue}s[c]=d=new $fe(f,e,c,u),o.push(d)}return o}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Ws.add(this._chart,r),!0}}function Ffe(t,e){const n=[],r=Object.keys(e);for(let o=0;o<r.length;o++){const s=t[r[o]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function zfe(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function JA(t,e){const n=t&&t.options||{},r=n.reverse,o=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:o,end:r?o:s}}function Bfe(t,e,n){if(n===!1)return!1;const r=JA(t,n),o=JA(e,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function Vfe(t){let e,n,r,o;return nt(t)?(e=t.top,n=t.right,r=t.bottom,o=t.left):e=n=r=o=t,{top:e,right:n,bottom:r,left:o,disabled:t===!1}}function Az(t,e){const n=[],r=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=r.length;o<s;++o)n.push(r[o].index);return n}function QA(t,e,n,r={}){const o=t.keys,s=r.mode==="single";let i,a,l,c;if(e!==null){for(i=0,a=o.length;i<a;++i){if(l=+o[i],l===n){if(r.all)continue;break}c=t.values[l],Qn(c)&&(s||e===0||Ds(e)===Ds(c))&&(e+=c)}return e}}function Hfe(t){const e=Object.keys(t),n=new Array(e.length);let r,o,s;for(r=0,o=e.length;r<o;++r)s=e[r],n[r]={x:s,y:t[s]};return n}function ZA(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Wfe(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Ufe(t){const{min:e,max:n,minDefined:r,maxDefined:o}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}function Gfe(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function eD(t,e,n,r){for(const o of e.getMatchingVisibleMetas(r).reverse()){const s=t[o.index];if(n&&s>0||!n&&s<0)return o.index}return null}function tD(t,e){const{chart:n,_cachedMeta:r}=t,o=n._stacks||(n._stacks={}),{iScale:s,vScale:i,index:a}=r,l=s.axis,c=i.axis,u=Wfe(s,i,r),d=e.length;let f;for(let h=0;h<d;++h){const p=e[h],{[l]:m,[c]:v}=p,y=p._stacks||(p._stacks={});f=y[c]=Gfe(o,u,m),f[a]=v,f._top=eD(f,i,!0,r.type),f._bottom=eD(f,i,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=v}}function dw(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function Kfe(t,e){return gc(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Yfe(t,e,n){return gc(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Kd(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const o of e){const s=o._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const fw=t=>t==="reset"||t==="none",nD=(t,e)=>e?t:Object.assign({},t),qfe=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Az(n,!0),values:null};class Nl{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ZA(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Kd(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(d,f,h,p)=>d==="x"?f:d==="r"?p:h,s=n.xAxisID=qe(r.xAxisID,dw(e,"x")),i=n.yAxisID=qe(r.yAxisID,dw(e,"y")),a=n.rAxisID=qe(r.rAxisID,dw(e,"r")),l=n.indexAxis,c=n.iAxisID=o(l,s,i,a),u=n.vAxisID=o(l,i,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(i),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&LA(this._data,this),e._stacked&&Kd(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(nt(n))this._data=Hfe(n);else if(r!==n){if(r){LA(r,this);const o=this._cachedMeta;Kd(o),o._parsed=[]}n&&Object.isExtensible(n)&&Dde(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let o=!1;this._dataCheck();const s=n._stacked;n._stacked=ZA(n.vScale,n),n.stack!==r.stack&&(o=!0,Kd(n),n.stack=r.stack),this._resyncElements(e),(o||s!==n._stacked)&&tD(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:o}=this,{iScale:s,_stacked:i}=r,a=s.axis;let l=e===0&&n===o.length?!0:r._sorted,c=e>0&&r._parsed[e-1],u,d,f;if(this._parsing===!1)r._parsed=o,r._sorted=!0,f=o;else{en(o[e])?f=this.parseArrayData(r,o,e,n):nt(o[e])?f=this.parseObjectData(r,o,e,n):f=this.parsePrimitiveData(r,o,e,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+e]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}i&&tD(this,f)}parsePrimitiveData(e,n,r,o){const{iScale:s,vScale:i}=e,a=s.axis,l=i.axis,c=s.getLabels(),u=s===i,d=new Array(o);let f,h,p;for(f=0,h=o;f<h;++f)p=f+r,d[f]={[a]:u||s.parse(c[p],p),[l]:i.parse(n[p],p)};return d}parseArrayData(e,n,r,o){const{xScale:s,yScale:i}=e,a=new Array(o);let l,c,u,d;for(l=0,c=o;l<c;++l)u=l+r,d=n[u],a[l]={x:s.parse(d[0],u),y:i.parse(d[1],u)};return a}parseObjectData(e,n,r,o){const{xScale:s,yScale:i}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(o);let u,d,f,h;for(u=0,d=o;u<d;++u)f=u+r,h=n[f],c[u]={x:s.parse(Zl(h,a),f),y:i.parse(Zl(h,l),f)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const o=this.chart,s=this._cachedMeta,i=n[e.axis],a={keys:Az(o,!0),values:n._stacks[e.axis]._visualValues};return QA(a,i,s.index,{mode:r})}updateRangeFromParsed(e,n,r,o){const s=r[n.axis];let i=s===null?NaN:s;const a=o&&r._stacks[n.axis];o&&a&&(o.values=a,i=QA(o,s,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,n){const r=this._cachedMeta,o=r._parsed,s=r._sorted&&e===r.iScale,i=o.length,a=this._getOtherScale(e),l=qfe(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Ufe(a);let f,h;function p(){h=o[f];const m=h[a.axis];return!Qn(h[e.axis])||u>m||d<m}for(f=0;f<i&&!(!p()&&(this.updateRangeFromParsed(c,e,h,l),s));++f);if(s){for(f=i-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(c,e,h,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let o,s,i;for(o=0,s=n.length;o<s;++o)i=n[o][e.axis],Qn(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,o=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:o?""+o.getLabelForValue(s[o.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Vfe(qe(this.options.clip,Bfe(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],s=n.chartArea,i=[],a=this._drawStart||0,l=this._drawCount||o.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(e,s,a,l),u=a;u<a+l;++u){const d=o[u];d.hidden||(d.active&&c?i.push(d):d.draw(e,s))}for(u=0;u<i.length;++u)i[u].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const o=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const i=this._cachedMeta.data[e];s=i.$context||(i.$context=Yfe(this.getContext(),e,i)),s.parsed=this.getParsed(e),s.raw=o.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Kfe(this.chart.getContext(),this.index)),s.dataset=o,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const o=n==="active",s=this._cachedDataOpts,i=e+"-"+n,a=s[i],l=this.enableOptionSharing&&kh(r);if(a)return nD(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),d=o?[`${e}Hover`,"hover",e,""]:[e,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(Yt.elements[e]),p=()=>this.getContext(r,o,n),m=c.resolveNamedOptions(f,h,p,d);return m.$shared&&(m.$shared=l,s[i]=Object.freeze(nD(m,l))),m}_resolveAnimations(e,n,r){const o=this.chart,s=this._cachedDataOpts,i=`animation-${n}`,a=s[i];if(a)return a;let l;if(o.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(e,r,n))}const c=new Pz(o,l&&l.animations);return l&&l._cacheable&&(s[i]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||fw(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),o=this._sharedOptions,s=this.getSharedOptions(r),i=this.includeOptions(n,s)||s!==o;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:i}}updateElement(e,n,r,o){fw(o)?Object.assign(e,r):this._resolveAnimations(n,o).update(e,r)}updateSharedOptions(e,n,r){e&&!fw(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,o){e.active=o;const s=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(e,{options:!o&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const o=r.length,s=n.length,i=Math.min(s,o);i&&this.parse(0,i),s>o?this._insertElements(o,s-o,e):s<o&&this._removeElements(s,o-s)}_insertElements(e,n,r=!0){const o=this._cachedMeta,s=o.data,i=e+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=i;a--)c[a]=c[a-n]};for(l(s),a=e;a<i;++a)s[a]=new this.dataElementType;this._parsing&&l(o._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,o){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const o=r._parsed.splice(e,n);r._stacked&&Kd(r,o)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,o]=e;this[n](r,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Pe(Nl,"defaults",{}),Pe(Nl,"datasetElementType",null),Pe(Nl,"dataElementType",null);function Xfe(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let o=0,s=n.length;o<s;o++)r=r.concat(n[o].controller.getAllParsedValues(t));t._cache.$bar=pz(r.sort((o,s)=>o-s))}return t._cache.$bar}function Jfe(t){const e=t.iScale,n=Xfe(e,t.type);let r=e._length,o,s,i,a;const l=()=>{i===32767||i===-32768||(kh(a)&&(r=Math.min(r,Math.abs(i-a)||r)),a=i)};for(o=0,s=n.length;o<s;++o)i=e.getPixelForValue(n[o]),l();for(a=void 0,o=0,s=e.ticks.length;o<s;++o)i=e.getPixelForTick(o),l();return r}function Qfe(t,e,n,r){const o=n.barThickness;let s,i;return ft(o)?(s=e.min*n.categoryPercentage,i=n.barPercentage):(s=o*r,i=1),{chunk:s/r,ratio:i,start:e.pixels[t]-s/2}}function Zfe(t,e,n,r){const o=e.pixels,s=o[t];let i=t>0?o[t-1]:null,a=t<o.length-1?o[t+1]:null;const l=n.categoryPercentage;i===null&&(i=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-i);const c=s-(s-Math.min(i,a))/2*l;return{chunk:Math.abs(a-i)/2*l/r,ratio:n.barPercentage,start:c}}function ehe(t,e,n,r){const o=n.parse(t[0],r),s=n.parse(t[1],r),i=Math.min(o,s),a=Math.max(o,s);let l=i,c=a;Math.abs(i)>Math.abs(a)&&(l=a,c=i),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:i,max:a}}function Dz(t,e,n,r){return en(t)?ehe(t,e,n,r):e[n.axis]=n.parse(t,r),e}function rD(t,e,n,r){const o=t.iScale,s=t.vScale,i=o.getLabels(),a=o===s,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=e[c],d={},d[o.axis]=a||o.parse(i[c],c),l.push(Dz(f,d,s,c));return l}function hw(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function the(t,e,n){return t!==0?Ds(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function nhe(t){let e,n,r,o,s;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(o="end",s="start"):(o="start",s="end"),{start:n,end:r,reverse:e,top:o,bottom:s}}function rhe(t,e,n,r){let o=e.borderSkipped;const s={};if(!o){t.borderSkipped=s;return}if(o===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:a,reverse:l,top:c,bottom:u}=nhe(t);o==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?o=c:(n._bottom||0)===r?o=u:(s[oD(u,i,a,l)]=!0,o=c)),s[oD(o,i,a,l)]=!0,t.borderSkipped=s}function oD(t,e,n,r){return r?(t=ohe(t,e,n),t=sD(t,n,e)):t=sD(t,e,n),t}function ohe(t,e,n){return t===e?n:t===n?e:t}function sD(t,e,n){return t==="start"?e:t==="end"?n:t}function she(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class _g extends Nl{parsePrimitiveData(e,n,r,o){return rD(e,n,r,o)}parseArrayData(e,n,r,o){return rD(e,n,r,o)}parseObjectData(e,n,r,o){const{iScale:s,vScale:i}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=s.axis==="x"?a:l,u=i.axis==="x"?a:l,d=[];let f,h,p,m;for(f=r,h=r+o;f<h;++f)m=n[f],p={},p[s.axis]=s.parse(Zl(m,c),f),d.push(Dz(Zl(m,u),p,i,f));return d}updateRangeFromParsed(e,n,r,o){super.updateRangeFromParsed(e,n,r,o);const s=r._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:o}=n,s=this.getParsed(e),i=s._custom,a=hw(i)?"["+i.start+", "+i.end+"]":""+o.getLabelForValue(s[o.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,o){const s=o==="reset",{index:i,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,o);for(let h=n;h<n+r;h++){const p=this.getParsed(h),m=s||ft(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),v=this._calculateBarIndexPixels(h,u),y=(p._stacks||{})[a.axis],b={horizontal:c,base:m.base,enableBorderRadius:!y||hw(p._custom)||i===y._top||i===y._bottom,x:c?m.head:v.center,y:c?v.center:m.head,height:c?v.size:Math.abs(m.size),width:c?Math.abs(m.size):v.size};f&&(b.options=d||this.resolveDataElementOptions(h,e[h].active?"active":o));const w=b.options||e[h].options;rhe(b,w,y,i),she(b,w,u.ratio),this.updateElement(e[h],h,b,o)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,o=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),s=r.options.stacked,i=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(ft(u)||isNaN(u))return!0};for(const l of o)if(!(n!==void 0&&a(l))&&((s===!1||i.indexOf(l.stack)===-1||s===void 0&&l.stack===void 0)&&i.push(l.stack),l.index===e))break;return i.length||i.push(void 0),i}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,r){const o=this._getStacks(e,r),s=n!==void 0?o.indexOf(n):-1;return s===-1?o.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,o=[];let s,i;for(s=0,i=n.data.length;s<i;++s)o.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=e.barThickness;return{min:a||Jfe(n),pixels:o,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:o},options:{base:s,minBarLength:i}}=this,a=s||0,l=this.getParsed(e),c=l._custom,u=hw(c);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,p,m;h!==d&&(f=h-d,h=d),u&&(d=c.barStart,h=c.barEnd-c.barStart,d!==0&&Ds(d)!==Ds(c.barEnd)&&(f=0),f+=d);const v=!ft(s)&&!u?s:f;let y=n.getPixelForValue(v);if(this.chart.getDataVisibility(e)?p=n.getPixelForValue(f+h):p=y,m=p-y,Math.abs(m)<i){m=the(m,n,a)*i,d===a&&(y-=m/2);const b=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),S=Math.min(b,w),_=Math.max(b,w);y=Math.max(Math.min(y,_),S),p=y+m,r&&!u&&(l._stacks[n.axis]._visualValues[o]=n.getValueForPixel(p)-n.getValueForPixel(y))}if(y===n.getPixelForValue(a)){const b=Ds(m)*n.getLineWidthForValue(a)/2;y+=b,m-=b}return{size:m,base:y,head:p,center:p+m/2}}_calculateBarIndexPixels(e,n){const r=n.scale,o=this.options,s=o.skipNull,i=qe(o.maxBarThickness,1/0);let a,l;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=o.barThickness==="flex"?Zfe(e,n,o,c):Qfe(e,n,o,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(i,u.chunk*u.ratio)}else a=r.getPixelForValue(this.getParsed(e)[r.axis],e),l=Math.min(i,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,o=r.length;let s=0;for(;s<o;++s)this.getParsed(s)[n.axis]!==null&&r[s].draw(this._ctx)}}Pe(_g,"id","bar"),Pe(_g,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Pe(_g,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function ihe(t,e,n){let r=1,o=1,s=0,i=0;if(e<zt){const a=t,l=a+e,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),f=Math.sin(l),h=(w,S,_)=>Mh(w,a,l,!0)?1:Math.max(S,S*n,_,_*n),p=(w,S,_)=>Mh(w,a,l,!0)?-1:Math.min(S,S*n,_,_*n),m=h(0,c,d),v=h(gn,u,f),y=p(qt,c,d),b=p(qt+gn,u,f);r=(m-y)/2,o=(v-b)/2,s=-(m+y)/2,i=-(v+b)/2}return{ratioX:r,ratioY:o,offsetX:s,offsetY:i}}class hf extends Nl{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let s=l=>+r[l];if(nt(r[e])){const{key:l="value"}=this._parsing;s=c=>+Zl(r[c],l)}let i,a;for(i=e,a=e+n;i<a;++i)o._parsed[i]=s(i)}}_getRotation(){return ei(this.options.rotation-90)}_getCircumference(){return ei(this.options.circumference)}_getRotationExtents(){let e=zt,n=-zt;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const o=this.chart.getDatasetMeta(r).controller,s=o._getRotation(),i=o._getCircumference();e=Math.min(e,s),n=Math.max(n,s+i)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,o=this._cachedMeta,s=o.data,i=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-i)/2,0),l=Math.min(vde(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:p,offsetY:m}=ihe(d,u,l),v=(r.width-i)/f,y=(r.height-i)/h,b=Math.max(Math.min(v,y)/2,0),w=uz(this.options.radius,b),S=Math.max(w*l,0),_=(w-S)/this._getVisibleDatasetWeightTotal();this.offsetX=p*w,this.offsetY=m*w,o.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const r=this.options,o=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*s/zt)}updateElements(e,n,r,o){const s=o==="reset",i=this.chart,a=i.chartArea,c=i.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=s&&c.animateScale,h=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:v}=this._getSharedOptions(n,o);let y=this._getRotation(),b;for(b=0;b<n;++b)y+=this._circumference(b,s);for(b=n;b<n+r;++b){const w=this._circumference(b,s),S=e[b],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:p,innerRadius:h};v&&(_.options=m||this.resolveDataElementOptions(b,S.active?"active":o)),y+=w,this.updateElement(S,b,_,o)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,o;for(o=0;o<n.length;o++){const s=e._parsed[o];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?zt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,o=r.data.labels||[],s=GE(n._parsed[e],r.options.locale);return{label:o[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const r=this.chart;let o,s,i,a,l;if(!e){for(o=0,s=r.data.datasets.length;o<s;++o)if(r.isDatasetVisible(o)){i=r.getDatasetMeta(o),e=i.data,a=i.controller;break}}if(!e)return 0;for(o=0,s=e.length;o<s;++o)l=a.resolveDataElementOptions(o),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,o=e.length;r<o;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(qe(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Pe(hf,"id","doughnut"),Pe(hf,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),Pe(hf,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),Pe(hf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:o}}=e.legend.options;return n.labels.map((s,i)=>{const l=e.getDatasetMeta(0).controller.getStyle(i);return{text:s,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:o,lineWidth:l.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Cg extends Nl{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:o=[],_dataset:s}=n,i=this.chart._animationsDisabled;let{start:a,count:l}=Lde(n,o,i);this._drawStart=a,this._drawCount=l,jde(n)&&(a=0,l=o.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=o;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:c},e),this.updateElements(o,a,l,e)}updateElements(e,n,r,o){const s=o==="reset",{iScale:i,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,o),f=i.axis,h=a.axis,{spanGaps:p,segment:m}=this.options,v=Eh(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||s||o==="none",b=n+r,w=e.length;let S=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const k=e[_],M=y?k:{};if(_<n||_>=b){M.skip=!0;continue}const T=this.getParsed(_),P=ft(T[h]),A=M[f]=i.getPixelForValue(T[f],_),L=M[h]=s||P?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[h],_);M.skip=isNaN(A)||isNaN(L)||P,M.stop=_>0&&Math.abs(T[f]-S[f])>v,m&&(M.parsed=T,M.raw=c.data[_]),d&&(M.options=u||this.resolveDataElementOptions(_,k.active?"active":o)),y||this.updateElement(k,_,M,o),S=T}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,o=e.data||[];if(!o.length)return r;const s=o[0].size(this.resolveDataElementOptions(0)),i=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(r,s,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Pe(Cg,"id","line"),Pe(Cg,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Pe(Cg,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class c_ extends hf{}Pe(c_,"id","pie"),Pe(c_,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function il(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ZE{constructor(e){Pe(this,"options");this.options=e||{}}static override(e){Object.assign(ZE.prototype,e)}init(){}formats(){return il()}parse(){return il()}format(){return il()}add(){return il()}diff(){return il()}startOf(){return il()}endOf(){return il()}}var ahe={_date:ZE};function lhe(t,e,n,r){const{controller:o,data:s,_sorted:i}=t,a=o._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&i&&s.length){const l=a._reversePixels?Pde:Cl;if(r){if(o._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(s,e,n-u),f=l(s,e,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(s,e,n)}return{lo:0,hi:s.length-1}}function xp(t,e,n,r,o){const s=t.getSortedVisibleDatasetMetas(),i=n[e];for(let a=0,l=s.length;a<l;++a){const{index:c,data:u}=s[a],{lo:d,hi:f}=lhe(s[a],e,i,o);for(let h=d;h<=f;++h){const p=u[h];p.skip||r(p,c,h)}}}function che(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,o){const s=e?Math.abs(r.x-o.x):0,i=n?Math.abs(r.y-o.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(i,2))}}function pw(t,e,n,r,o){const s=[];return!o&&!t.isPointInArea(e)||xp(t,n,e,function(a,l,c){!o&&!Th(a,t.chartArea,0)||a.inRange(e.x,e.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function uhe(t,e,n,r){let o=[];function s(i,a,l){const{startAngle:c,endAngle:u}=i.getProps(["startAngle","endAngle"],r),{angle:d}=fz(i,{x:e.x,y:e.y});Mh(d,c,u)&&o.push({element:i,datasetIndex:a,index:l})}return xp(t,n,e,s),o}function dhe(t,e,n,r,o,s){let i=[];const a=che(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(e.x,e.y,o);if(r&&!h)return;const p=u.getCenterPoint(o);if(!(!!s||t.isPointInArea(p))&&!h)return;const v=a(e,p);v<l?(i=[{element:u,datasetIndex:d,index:f}],l=v):v===l&&i.push({element:u,datasetIndex:d,index:f})}return xp(t,n,e,c),i}function mw(t,e,n,r,o,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?uhe(t,e,n,o):dhe(t,e,n,r,o,s)}function iD(t,e,n,r,o){const s=[],i=n==="x"?"inXRange":"inYRange";let a=!1;return xp(t,n,e,(l,c,u)=>{l[i](e[n],o)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,o))}),r&&!a?[]:s}var fhe={evaluateInteractionItems:xp,modes:{index(t,e,n,r){const o=fl(e,t),s=n.axis||"x",i=n.includeInvisible||!1,a=n.intersect?pw(t,o,s,r,i):mw(t,o,s,!1,r,i),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,r){const o=fl(e,t),s=n.axis||"xy",i=n.includeInvisible||!1;let a=n.intersect?pw(t,o,s,r,i):mw(t,o,s,!1,r,i);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(t,e,n,r){const o=fl(e,t),s=n.axis||"xy",i=n.includeInvisible||!1;return pw(t,o,s,r,i)},nearest(t,e,n,r){const o=fl(e,t),s=n.axis||"xy",i=n.includeInvisible||!1;return mw(t,o,s,n.intersect,r,i)},x(t,e,n,r){const o=fl(e,t);return iD(t,o,"x",n.intersect,r)},y(t,e,n,r){const o=fl(e,t);return iD(t,o,"y",n.intersect,r)}}};const Iz=["left","top","right","bottom"];function Yd(t,e){return t.filter(n=>n.pos===e)}function aD(t,e){return t.filter(n=>Iz.indexOf(n.pos)===-1&&n.box.axis===e)}function qd(t,e){return t.sort((n,r)=>{const o=e?r:n,s=e?n:r;return o.weight===s.weight?o.index-s.index:o.weight-s.weight})}function hhe(t){const e=[];let n,r,o,s,i,a;for(n=0,r=(t||[]).length;n<r;++n)o=t[n],{position:s,options:{stack:i,stackWeight:a=1}}=o,e.push({index:n,box:o,pos:s,horizontal:o.isHorizontal(),weight:o.weight,stack:i&&s+i,stackWeight:a});return e}function phe(t){const e={};for(const n of t){const{stack:r,pos:o,stackWeight:s}=n;if(!r||!Iz.includes(o))continue;const i=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=s}return e}function mhe(t,e){const n=phe(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e;let s,i,a;for(s=0,i=t.length;s<i;++s){a=t[s];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&e.availableWidth,a.height=o):(a.width=r,a.height=u?u*o:l&&e.availableHeight)}return n}function ghe(t){const e=hhe(t),n=qd(e.filter(c=>c.box.fullSize),!0),r=qd(Yd(e,"left"),!0),o=qd(Yd(e,"right")),s=qd(Yd(e,"top"),!0),i=qd(Yd(e,"bottom")),a=aD(e,"x"),l=aD(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:o.concat(l).concat(i).concat(a),chartArea:Yd(e,"chartArea"),vertical:r.concat(o).concat(l),horizontal:s.concat(i).concat(a)}}function lD(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Nz(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function vhe(t,e,n,r){const{pos:o,box:s}=n,i=t.maxPadding;if(!nt(o)){n.size&&(t[o]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,t[o]+=n.size}s.getPadding&&Nz(i,s.getPadding());const a=Math.max(0,e.outerWidth-lD(i,t,"left","right")),l=Math.max(0,e.outerHeight-lD(i,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function yhe(t){const e=t.maxPadding;function n(r){const o=Math.max(e[r]-t[r],0);return t[r]+=o,o}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function bhe(t,e){const n=e.maxPadding;function r(o){const s={left:0,top:0,right:0,bottom:0};return o.forEach(i=>{s[i]=Math.max(e[i],n[i])}),s}return r(t?["left","right"]:["top","bottom"])}function pf(t,e,n,r){const o=[];let s,i,a,l,c,u;for(s=0,i=t.length,c=0;s<i;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,bhe(a.horizontal,e));const{same:d,other:f}=vhe(e,n,a,r);c|=d&&o.length,u=u||f,l.fullSize||o.push(a)}return c&&pf(o,e,n,r)||u}function _m(t,e,n,r,o){t.top=n,t.left=e,t.right=e+r,t.bottom=n+o,t.width=r,t.height=o}function cD(t,e,n,r){const o=n.padding;let{x:s,y:i}=e;for(const a of t){const l=a.box,c=r[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*u,f=c.size||l.height;kh(c.start)&&(i=c.start),l.fullSize?_m(l,o.left,i,n.outerWidth-o.right-o.left,f):_m(l,e.left+c.placed,i,d,f),c.start=i,c.placed+=d,i=l.bottom}else{const d=e.h*u,f=c.size||l.width;kh(c.start)&&(s=c.start),l.fullSize?_m(l,s,o.top,f,n.outerHeight-o.bottom-o.top):_m(l,s,e.top+c.placed,f,d),c.start=s,c.placed+=d,s=l.right}}e.x=s,e.y=i}var mo={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const o=Qr(t.options.layout.padding),s=Math.max(e-o.width,0),i=Math.max(n-o.height,0),a=ghe(t.boxes),l=a.vertical,c=a.horizontal;pt(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,v)=>v.box.options&&v.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:s,availableHeight:i,vBoxMaxWidth:s/2/u,hBoxMaxHeight:i/2}),f=Object.assign({},o);Nz(f,Qr(r));const h=Object.assign({maxPadding:f,w:s,h:i,x:o.left,y:o.top},o),p=mhe(l.concat(c),d);pf(a.fullSize,h,d,p),pf(l,h,d,p),pf(c,h,d,p)&&pf(l,h,d,p),yhe(h),cD(a.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,cD(a.rightAndBottom,h,d,p),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},pt(a.chartArea,m=>{const v=m.box;Object.assign(v,t.chartArea),v.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Lz{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,o){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,o?Math.floor(n/o):r)}}isAttached(e){return!0}updateConfig(e){}}class whe extends Lz{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const kg="$chartjs",xhe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},uD=t=>t===null||t==="";function She(t,e){const n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[kg]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",uD(o)){const s=GA(t,"width");s!==void 0&&(t.width=s)}if(uD(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=GA(t,"height");s!==void 0&&(t.height=s)}return t}const jz=kfe?{passive:!0}:!1;function _he(t,e,n){t.addEventListener(e,n,jz)}function Che(t,e,n){t.canvas.removeEventListener(e,n,jz)}function khe(t,e){const n=xhe[t.type]||t.type,{x:r,y:o}=fl(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:o!==void 0?o:null}}function Av(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Ehe(t,e,n){const r=t.canvas,o=new MutationObserver(s=>{let i=!1;for(const a of s)i=i||Av(a.addedNodes,r),i=i&&!Av(a.removedNodes,r);i&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function Mhe(t,e,n){const r=t.canvas,o=new MutationObserver(s=>{let i=!1;for(const a of s)i=i||Av(a.removedNodes,r),i=i&&!Av(a.addedNodes,r);i&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}const Oh=new Map;let dD=0;function $z(){const t=window.devicePixelRatio;t!==dD&&(dD=t,Oh.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function The(t,e){Oh.size||window.addEventListener("resize",$z),Oh.set(t,e)}function Rhe(t){Oh.delete(t),Oh.size||window.removeEventListener("resize",$z)}function Ohe(t,e,n){const r=t.canvas,o=r&&QE(r);if(!o)return;const s=gz((a,l)=>{const c=o.clientWidth;n(a,l),c<o.clientWidth&&n()},window),i=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return i.observe(o),The(t,s),i}function gw(t,e,n){n&&n.disconnect(),e==="resize"&&Rhe(t)}function Phe(t,e,n){const r=t.canvas,o=gz(s=>{t.ctx!==null&&n(khe(s,t))},t);return _he(r,e,o),o}class Ahe extends Lz{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(She(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[kg])return!1;const r=n[kg].initial;["height","width"].forEach(s=>{const i=r[s];ft(i)?n.removeAttribute(s):n.setAttribute(s,i)});const o=r.style||{};return Object.keys(o).forEach(s=>{n.style[s]=o[s]}),n.width=n.width,delete n[kg],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const o=e.$proxies||(e.$proxies={}),i={attach:Ehe,detach:Mhe,resize:Ohe}[n]||Phe;o[n]=i(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),o=r[n];if(!o)return;({attach:gw,detach:gw,resize:gw}[n]||Che)(e,n,o),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,o){return Cfe(e,n,r,o)}isAttached(e){const n=QE(e);return!!(n&&n.isConnected)}}function Dhe(t){return!JE()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?whe:Ahe}var Zm;let Mi=(Zm=class{constructor(){Pe(this,"x");Pe(this,"y");Pe(this,"active",!1);Pe(this,"options");Pe(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return Eh(this.x)&&Eh(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const o={};return e.forEach(s=>{o[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),o}},Pe(Zm,"defaults",{}),Pe(Zm,"defaultRoutes"),Zm);function Ihe(t,e){const n=t.options.ticks,r=Nhe(t),o=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?jhe(e):[],i=s.length,a=s[0],l=s[i-1],c=[];if(i>o)return $he(e,c,s,i/o),c;const u=Lhe(s,e,o);if(i>0){let d,f;const h=i>1?Math.round((l-a)/(i-1)):null;for(Cm(e,c,u,ft(h)?0:a-h,a),d=0,f=i-1;d<f;d++)Cm(e,c,u,s[d],s[d+1]);return Cm(e,c,u,l,ft(h)?e.length:l+h),c}return Cm(e,c,u),c}function Nhe(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),o=t._maxLength/n;return Math.floor(Math.min(r,o))}function Lhe(t,e,n){const r=Fhe(t),o=e.length/n;if(!r)return Math.max(o,1);const s=kde(r);for(let i=0,a=s.length-1;i<a;i++){const l=s[i];if(l>o)return l}return Math.max(o,1)}function jhe(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function $he(t,e,n,r){let o=0,s=n[0],i;for(r=Math.ceil(r),i=0;i<t.length;i++)i===s&&(e.push(t[i]),o++,s=n[o*r])}function Cm(t,e,n,r,o){const s=qe(r,0),i=Math.min(qe(o,t.length),t.length);let a=0,l,c,u;for(n=Math.ceil(n),o&&(l=o-r,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<i;c++)c===u&&(e.push(t[c]),a++,u=Math.round(s+a*n))}function Fhe(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const zhe=t=>t==="left"?"right":t==="right"?"left":t,fD=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,hD=(t,e)=>Math.min(e||t,t);function pD(t,e){const n=[],r=t.length/e,o=t.length;let s=0;for(;s<o;s+=r)n.push(t[Math.floor(s)]);return n}function Bhe(t,e,n){const r=t.ticks.length,o=Math.min(e,r-1),s=t._startPixel,i=t._endPixel,a=1e-6;let l=t.getPixelForTick(o),c;if(!(n&&(r===1?c=Math.max(l-s,i-l):e===0?c=(t.getPixelForTick(1)-l)/2:c=(l-t.getPixelForTick(o-1))/2,l+=o<e?c:-c,l<s-a||l>i+a)))return l}function Vhe(t,e){pt(t,n=>{const r=n.gc,o=r.length/2;let s;if(o>e){for(s=0;s<o;++s)delete n.data[r[s]];r.splice(0,o)}})}function Xd(t){return t.drawTicks?t.tickLength:0}function mD(t,e){if(!t.display)return 0;const n=$n(t.font,e),r=Qr(t.padding);return(en(t.text)?t.text.length:1)*n.lineHeight+r.height}function Hhe(t,e){return gc(t,{scale:e,type:"scale"})}function Whe(t,e,n){return gc(t,{tick:n,index:e,type:"tick"})}function Uhe(t,e,n){let r=WE(t);return(n&&e!=="right"||!n&&e==="right")&&(r=zhe(r)),r}function Ghe(t,e,n,r){const{top:o,left:s,bottom:i,right:a,chart:l}=t,{chartArea:c,scales:u}=l;let d=0,f,h,p;const m=i-o,v=a-s;if(t.isHorizontal()){if(h=Gn(r,s,a),nt(n)){const y=Object.keys(n)[0],b=n[y];p=u[y].getPixelForValue(b)+m-e}else n==="center"?p=(c.bottom+c.top)/2+m-e:p=fD(t,n,e);f=a-s}else{if(nt(n)){const y=Object.keys(n)[0],b=n[y];h=u[y].getPixelForValue(b)-v+e}else n==="center"?h=(c.left+c.right)/2-v+e:h=fD(t,n,e);p=Gn(r,i,o),d=n==="left"?-gn:gn}return{titleX:h,titleY:p,maxWidth:f,rotation:d}}class _d extends Mi{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:o}=this;return e=ds(e,Number.POSITIVE_INFINITY),n=ds(n,Number.NEGATIVE_INFINITY),r=ds(r,Number.POSITIVE_INFINITY),o=ds(o,Number.NEGATIVE_INFINITY),{min:ds(e,r),max:ds(n,o),minDefined:Qn(e),maxDefined:Qn(n)}}getMinMax(e){let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds(),i;if(o&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)i=a[l].controller.getMinMax(this,e),o||(n=Math.min(n,i.min)),s||(r=Math.max(r,i.max));return n=s&&n>r?r:n,r=o&&n>r?n:r,{min:ds(n,ds(r,n)),max:ds(r,ds(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){xt(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:o,grace:s,ticks:i}=this.options,a=i.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nfe(this,s,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?pD(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=Ihe(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){xt(this.options.afterUpdate,[this])}beforeSetDimensions(){xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){xt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),xt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,o,s;for(r=0,o=e.length;r<o;r++)s=e[r],s.label=xt(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=hD(this.ticks.length,e.ticks.maxTicksLimit),o=n.minRotation||0,s=n.maxRotation;let i=o,a,l,c;if(!this._isVisible()||!n.display||o>=s||r<=1||!this.isHorizontal()){this.labelRotation=o;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=Xn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(e.offset?.5:1)),l=this.maxHeight-Xd(e.grid)-n.padding-mD(e.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),i=Tde(Math.min(Math.asin(Xn((u.highest.height+6)/a,-1,1)),Math.asin(Xn(l/c,-1,1))-Math.asin(Xn(f/c,-1,1)))),i=Math.max(o,Math.min(s,i))),this.labelRotation=i}afterCalculateLabelRotation(){xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){xt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:o,grid:s}}=this,i=this._isVisible(),a=this.isHorizontal();if(i){const l=mD(o,n.options.font);if(a?(e.width=this.maxWidth,e.height=Xd(s)+l):(e.height=this.maxHeight,e.width=Xd(s)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,p=ei(this.labelRotation),m=Math.cos(p),v=Math.sin(p);if(a){const y=r.mirror?0:v*d.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=r.mirror?0:m*d.width+v*f.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(c,u,v,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,o){const{ticks:{align:s,padding:i},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=o*e.width,h=r*n.height):(f=r*e.height,h=o*n.width):s==="start"?h=n.width:s==="end"?f=e.width:s!=="inner"&&(f=e.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+i)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+i)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;s==="start"?(u=0,d=e.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+i,this.paddingBottom=d+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){xt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)ft(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=pD(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:o,_longestTextCache:s}=this,i=[],a=[],l=Math.floor(n/hD(n,r));let c=0,u=0,d,f,h,p,m,v,y,b,w,S,_;for(d=0;d<n;d+=l){if(p=e[d].label,m=this._resolveTickFontOptions(d),o.font=v=m.string,y=s[v]=s[v]||{data:{},gc:[]},b=m.lineHeight,w=S=0,!ft(p)&&!en(p))w=BA(o,y.data,y.gc,w,p),S=b;else if(en(p))for(f=0,h=p.length;f<h;++f)_=p[f],!ft(_)&&!en(_)&&(w=BA(o,y.data,y.gc,w,_),S+=b);i.push(w),a.push(S),c=Math.max(w,c),u=Math.max(S,u)}Vhe(s,n);const k=i.indexOf(c),M=a.indexOf(u),T=P=>({width:i[P]||0,height:a[P]||0});return{first:T(0),last:T(n-1),widest:T(k),highest:T(M),widths:i,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Ode(this._alignToPixels?sl(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=Whe(this.getContext(),e,r))}return this.$context||(this.$context=Hhe(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=ei(this.labelRotation),r=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),s=this._getLabelSizes(),i=e.autoSkipPadding||0,a=s?s.widest.width+i:0,l=s?s.highest.height+i:0;return this.isHorizontal()?l*r>a*o?a/r:l/o:l*o<a*r?l/r:a/o}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,o=this.options,{grid:s,position:i,border:a}=o,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Xd(s),h=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,v=m/2,y=function(D){return sl(r,D,m)};let b,w,S,_,k,M,T,P,A,L,V,H;if(i==="top")b=y(this.bottom),M=this.bottom-f,P=b-v,L=y(e.top)+v,H=e.bottom;else if(i==="bottom")b=y(this.top),L=e.top,H=y(e.bottom)-v,M=b+v,P=this.top+f;else if(i==="left")b=y(this.right),k=this.right-f,T=b-v,A=y(e.left)+v,V=e.right;else if(i==="right")b=y(this.left),A=e.left,V=y(e.right)-v,k=b+v,T=this.left+f;else if(n==="x"){if(i==="center")b=y((e.top+e.bottom)/2+.5);else if(nt(i)){const D=Object.keys(i)[0],F=i[D];b=y(this.chart.scales[D].getPixelForValue(F))}L=e.top,H=e.bottom,M=b+v,P=M+f}else if(n==="y"){if(i==="center")b=y((e.left+e.right)/2);else if(nt(i)){const D=Object.keys(i)[0],F=i[D];b=y(this.chart.scales[D].getPixelForValue(F))}k=b-v,T=k-f,A=e.left,V=e.right}const z=qe(o.ticks.maxTicksLimit,d),N=Math.max(1,Math.ceil(d/z));for(w=0;w<d;w+=N){const D=this.getContext(w),F=s.setContext(D),I=a.setContext(D),$=F.lineWidth,j=F.color,W=I.dash||[],G=I.dashOffset,X=F.tickWidth,q=F.tickColor,B=F.tickBorderDash||[],Q=F.tickBorderDashOffset;S=Bhe(this,w,l),S!==void 0&&(_=sl(r,S,$),c?k=T=A=V=_:M=P=L=H=_,h.push({tx1:k,ty1:M,tx2:T,ty2:P,x1:A,y1:L,x2:V,y2:H,width:$,color:j,borderDash:W,borderDashOffset:G,tickWidth:X,tickColor:q,tickBorderDash:B,tickBorderDashOffset:Q}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(e){const n=this.axis,r=this.options,{position:o,ticks:s}=r,i=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,f=Xd(r.grid),h=f+u,p=d?-u:h,m=-ei(this.labelRotation),v=[];let y,b,w,S,_,k,M,T,P,A,L,V,H="middle";if(o==="top")k=this.bottom-p,M=this._getXAxisLabelAlignment();else if(o==="bottom")k=this.top+p,M=this._getXAxisLabelAlignment();else if(o==="left"){const N=this._getYAxisLabelAlignment(f);M=N.textAlign,_=N.x}else if(o==="right"){const N=this._getYAxisLabelAlignment(f);M=N.textAlign,_=N.x}else if(n==="x"){if(o==="center")k=(e.top+e.bottom)/2+h;else if(nt(o)){const N=Object.keys(o)[0],D=o[N];k=this.chart.scales[N].getPixelForValue(D)+h}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(o==="center")_=(e.left+e.right)/2-h;else if(nt(o)){const N=Object.keys(o)[0],D=o[N];_=this.chart.scales[N].getPixelForValue(D)}M=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?H="top":l==="end"&&(H="bottom"));const z=this._getLabelSizes();for(y=0,b=a.length;y<b;++y){w=a[y],S=w.label;const N=s.setContext(this.getContext(y));T=this.getPixelForTick(y)+s.labelOffset,P=this._resolveTickFontOptions(y),A=P.lineHeight,L=en(S)?S.length:1;const D=L/2,F=N.color,I=N.textStrokeColor,$=N.textStrokeWidth;let j=M;i?(_=T,M==="inner"&&(y===b-1?j=this.options.reverse?"left":"right":y===0?j=this.options.reverse?"right":"left":j="center"),o==="top"?c==="near"||m!==0?V=-L*A+A/2:c==="center"?V=-z.highest.height/2-D*A+A:V=-z.highest.height+A/2:c==="near"||m!==0?V=A/2:c==="center"?V=z.highest.height/2-D*A:V=z.highest.height-L*A,d&&(V*=-1),m!==0&&!N.showLabelBackdrop&&(_+=A/2*Math.sin(m))):(k=T,V=(1-L)*A/2);let W;if(N.showLabelBackdrop){const G=Qr(N.backdropPadding),X=z.heights[y],q=z.widths[y];let B=V-G.top,Q=0-G.left;switch(H){case"middle":B-=X/2;break;case"bottom":B-=X;break}switch(M){case"center":Q-=q/2;break;case"right":Q-=q;break;case"inner":y===b-1?Q-=q:y>0&&(Q-=q/2);break}W={left:Q,top:B,width:q+G.width,height:X+G.height,color:N.backdropColor}}v.push({label:S,font:P,textOffset:V,options:{rotation:m,color:F,strokeColor:I,strokeWidth:$,textAlign:j,textBaseline:H,translation:[_,k],backdrop:W}})}return v}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-ei(this.labelRotation))return e==="top"?"left":"right";let o="center";return n.align==="start"?o="left":n.align==="end"?o="right":n.align==="inner"&&(o="inner"),o}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:o,padding:s}}=this.options,i=this._getLabelSizes(),a=e+s,l=i.widest.width;let c,u;return n==="left"?o?(u=this.right+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?o?(u=this.left+s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:o,width:s,height:i}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,o,s,i),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const o=this.ticks.findIndex(s=>s.value===e);return o>=0?n.setContext(this.getContext(o)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,i;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,i=o.length;s<i;++s){const l=o[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:o}}=this,s=r.setContext(this.getContext()),i=r.display?s.width:0;if(!i)return;const a=o.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=sl(e,this.left,i)-i/2,u=sl(e,this.right,a)+a/2,d=f=l):(d=sl(e,this.top,i)-i/2,f=sl(e,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,o=this._computeLabelArea();o&&nb(r,o);const s=this.getLabelItems(e);for(const i of s){const a=i.options,l=i.font,c=i.label,u=i.textOffset;Rh(r,c,0,u,l,a)}o&&rb(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:o}}=this;if(!r.display)return;const s=$n(r.font),i=Qr(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||nt(n)?(l+=i.bottom,en(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=i.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=Ghe(this,l,n,a);Rh(e,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:Uhe(a,n,o),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=qe(e.grid&&e.grid.z,-1),o=qe(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==_d.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",o=[];let s,i;for(s=0,i=n.length;s<i;++s){const a=n[s];a[r]===this.id&&(!e||a.type===e)&&o.push(a)}return o}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $n(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class km{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;qhe(n)&&(r=this.register(n));const o=this.items,s=e.id,i=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in o||(o[s]=e,Khe(e,i,r),this.override&&Yt.override(e.id,e.overrides)),i}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,o=this.scope;r in n&&delete n[r],o&&r in Yt[o]&&(delete Yt[o][r],this.override&&delete ec[r])}}function Khe(t,e,n){const r=Ns(Object.create(null),[n?Yt.get(n):{},Yt.get(e),t.defaults]);Yt.set(e,r),t.defaultRoutes&&Yhe(e,t.defaultRoutes),t.descriptors&&Yt.describe(e,t.descriptors)}function Yhe(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),o=r.pop(),s=[t].concat(r).join("."),i=e[n].split("."),a=i.pop(),l=i.join(".");Yt.route(s,o,l,a)})}function qhe(t){return"id"in t&&"defaults"in t}class Xhe{constructor(){this.controllers=new km(Nl,"datasets",!0),this.elements=new km(Mi,"elements"),this.plugins=new km(Object,"plugins"),this.scales=new km(_d,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(o=>{const s=r||this._getRegistryForType(o);r||s.isForType(o)||s===this.plugins&&o.id?this._exec(e,s,o):pt(o,i=>{const a=r||this._getRegistryForType(i);this._exec(e,a,i)})})}_exec(e,n,r){const o=VE(e);xt(r["before"+o],[],r),n[e](r),xt(r["after"+o],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const o=n.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return o}}var ms=new Xhe;class Jhe{constructor(){this._init=[]}notify(e,n,r,o){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=o?this._descriptors(e).filter(o):this._descriptors(e),i=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,n,r,o){o=o||{};for(const s of e){const i=s.plugin,a=i[r],l=[n,o,s.options];if(xt(a,l,i)===!1&&o.cancelable)return!1}return!0}invalidate(){ft(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,o=qe(r.options&&r.options.plugins,{}),s=Qhe(r);return o===!1&&!n?[]:epe(e,s,o,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,o=(s,i)=>s.filter(a=>!i.some(l=>a.plugin.id===l.plugin.id));this._notify(o(n,r),e,"stop"),this._notify(o(r,n),e,"start")}}function Qhe(t){const e={},n=[],r=Object.keys(ms.plugins.items);for(let s=0;s<r.length;s++)n.push(ms.getPlugin(r[s]));const o=t.plugins||[];for(let s=0;s<o.length;s++){const i=o[s];n.indexOf(i)===-1&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}function Zhe(t,e){return!e&&t===!1?null:t===!0?{}:t}function epe(t,{plugins:e,localIds:n},r,o){const s=[],i=t.getContext();for(const a of e){const l=a.id,c=Zhe(r[l],o);c!==null&&s.push({plugin:a,options:tpe(t.config,{plugin:a,local:n[l]},c,i)})}return s}function tpe(t,{plugin:e,local:n},r,o){const s=t.pluginScopeKeys(e),i=t.getOptionScopes(r,s);return n&&e.defaults&&i.push(e.defaults),t.createResolver(i,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function u_(t,e){const n=Yt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function npe(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function rpe(t,e){return t===e?"_index_":"_value_"}function gD(t){if(t==="x"||t==="y"||t==="r")return t}function ope(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function d_(t,...e){if(gD(t))return t;for(const n of e){const r=n.axis||ope(n.position)||t.length>1&&gD(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function vD(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function spe(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return vD(t,"x",n[0])||vD(t,"y",n[0])}return{}}function ipe(t,e){const n=ec[t.type]||{scales:{}},r=e.scales||{},o=u_(t.type,e),s=Object.create(null);return Object.keys(r).forEach(i=>{const a=r[i];if(!nt(a))return console.error(`Invalid scale configuration for scale: ${i}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const l=d_(i,a,spe(i,t),Yt.scales[a.type]),c=rpe(l,o),u=n.scales||{};s[i]=Af(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(i=>{const a=i.type||t.type,l=i.indexAxis||u_(a,e),u=(ec[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=npe(d,l),h=i[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Af(s[h],[{axis:f},r[h],u[d]])})}),Object.keys(s).forEach(i=>{const a=s[i];Af(a,[Yt.scales[a.type],Yt.scale])}),s}function Fz(t){const e=t.options||(t.options={});e.plugins=qe(e.plugins,{}),e.scales=ipe(t,e)}function zz(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function ape(t){return t=t||{},t.data=zz(t.data),Fz(t),t}const yD=new Map,Bz=new Set;function Em(t,e){let n=yD.get(t);return n||(n=e(),yD.set(t,n),Bz.add(n)),n}const Jd=(t,e,n)=>{const r=Zl(e,n);r!==void 0&&t.add(r)};class lpe{constructor(e){this._config=ape(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=zz(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Fz(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Em(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Em(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Em(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Em(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let o=r.get(e);return(!o||n)&&(o=new Map,r.set(e,o)),o}getOptionScopes(e,n,r){const{options:o,type:s}=this,i=this._cachedScopes(e,r),a=i.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>Jd(l,e,d))),u.forEach(d=>Jd(l,o,d)),u.forEach(d=>Jd(l,ec[s]||{},d)),u.forEach(d=>Jd(l,Yt,d)),u.forEach(d=>Jd(l,a_,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Bz.has(n)&&i.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,ec[n]||{},Yt.datasets[n]||{},{type:n},Yt,a_]}resolveNamedOptions(e,n,r,o=[""]){const s={$shared:!0},{resolver:i,subPrefixes:a}=bD(this._resolverCache,e,o);let l=i;if(upe(i,n)){s.$shared=!1,r=Ta(r)?r():r;const c=this.createResolver(e,r,a);l=Ku(i,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(e,n,r=[""],o){const{resolver:s}=bD(this._resolverCache,e,r);return nt(n)?Ku(s,n,void 0,o):s}}function bD(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=n.join();let s=r.get(o);return s||(s={resolver:YE(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(o,s)),s}const cpe=t=>nt(t)&&Object.getOwnPropertyNames(t).some(e=>Ta(t[e]));function upe(t,e){const{isScriptable:n,isIndexable:r}=xz(t);for(const o of e){const s=n(o),i=r(o),a=(i||s)&&t[o];if(s&&(Ta(a)||cpe(a))||i&&en(a))return!0}return!1}var dpe="4.4.1";const fpe=["top","bottom","left","right","chartArea"];function wD(t,e){return t==="top"||t==="bottom"||fpe.indexOf(t)===-1&&e==="x"}function xD(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function SD(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),xt(n&&n.onComplete,[t],e)}function hpe(t){const e=t.chart,n=e.options.animation;xt(n&&n.onProgress,[t],e)}function Vz(t){return JE()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Eg={},_D=t=>{const e=Vz(t);return Object.values(Eg).filter(n=>n.canvas===e).pop()};function ppe(t,e,n){const r=Object.keys(t);for(const o of r){const s=+o;if(s>=e){const i=t[o];delete t[o],(n>0||s>e)&&(t[s+n]=i)}}}function mpe(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function Mm(t,e,n){return t.options.clip?t[n]:e[n]}function gpe(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Mm(n,e,"left"),right:Mm(n,e,"right"),top:Mm(r,e,"top"),bottom:Mm(r,e,"bottom")}:e}var ji;let eM=(ji=class{static register(...e){ms.add(...e),CD()}static unregister(...e){ms.remove(...e),CD()}constructor(e,n){const r=this.config=new lpe(n),o=Vz(e),s=_D(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Dhe(o)),this.platform.updateConfig(r);const a=this.platform.acquireContext(o,i.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=gde(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Jhe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ide(d=>this.update(d),i.resizeDelay||0),this._dataChanges=[],Eg[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ws.listen(this,"complete",SD),Ws.listen(this,"progress",hpe),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:o,_aspectRatio:s}=this;return ft(e)?n&&s?s:o?r/o:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ms}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():UA(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return VA(this.canvas,this.ctx),this}stop(){return Ws.stop(this),this}resize(e,n){Ws.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,o=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(o,e,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,UA(this,a,!0)&&(this.notifyPlugins("resize",{size:i}),xt(r.onResize,[this,i],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};pt(n,(r,o)=>{r.id=o})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,o=Object.keys(r).reduce((i,a)=>(i[a]=!1,i),{});let s=[];n&&(s=s.concat(Object.keys(n).map(i=>{const a=n[i],l=d_(i,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),pt(s,i=>{const a=i.options,l=a.id,c=d_(l,a),u=qe(a.type,i.dtype);(a.position===void 0||wD(a.position,c)!==wD(i.dposition))&&(a.position=i.dposition),o[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=ms.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,e)}),pt(o,(i,a)=>{i||delete r[a]}),pt(r,i=>{mo.configure(this,i,i.options),mo.addBox(this,i)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((o,s)=>o.index-s.index),r>n){for(let o=n;o<r;++o)this._destroyDatasetMeta(o);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(xD("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,o)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,o;for(this._removeUnreferencedMetasets(),r=0,o=n.length;r<o;r++){const s=n[r];let i=this.getDatasetMeta(r);const a=s.type||this.config.type;if(i.type&&i.type!==a&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=a,i.indexAxis=s.indexAxis||u_(a,this.options),i.order=s.order||0,i.index=r,i.label=""+s.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const l=ms.getController(a),{datasetElementType:c,dataElementType:u}=Yt.datasets[a];Object.assign(l,{dataElementType:ms.getElement(u),datasetElementType:c&&ms.getElement(c)}),i.controller=new l(this,r),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){pt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!o&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),i=Math.max(+d.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),o||pt(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(xD("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){pt(this.scales,e=>{mo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!AA(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:o,count:s}of n){const i=r==="_removeElements"?-s:s;ppe(e,o,i)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(i=>i[0]===s).map((i,a)=>a+","+i.splice(1).join(","))),o=r(0);for(let s=1;s<n;s++)if(!AA(o,r(s)))return;return Array.from(o).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;mo.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],pt(this.boxes,o=>{r&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,s)=>{o._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Ta(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),o={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(r.controller._update(n),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ws.has(this)?this.attached&&!Ws.running(this)&&Ws.start(this):(this.draw(),SD({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:o}=this._resizeBeforeDraw;this._resize(r,o),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let o,s;for(o=0,s=n.length;o<s;++o){const i=n[o];(!e||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r=e._clip,o=!r.disabled,s=gpe(e,this.chartArea),i={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(o&&nb(n,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),e.controller.draw(),o&&rb(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Th(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,o){const s=fhe.modes[n];return typeof s=="function"?s(this,e,r,o):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let o=r.filter(s=>s&&s._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(o)),o}getContext(){return this.$context||(this.$context=gc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const o=r?"show":"hide",s=this.getDatasetMeta(e),i=s.controller._resolveAnimations(void 0,o);kh(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),i.update(s,{visible:r}),this.update(a=>a.datasetIndex===e?o:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Ws.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),VA(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Eg[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(s,i)=>{n.addEventListener(this,s,i),e[s]=i},o=(s,i,a)=>{s.offsetX=i,s.offsetY=a,this._eventHandler(s)};pt(this.options.events,s=>r(s,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},o=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let i;const a=()=>{o("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",i)};i=()=>{this.attached=!1,o("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():i()}unbindEvents(){pt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},pt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const o=r?"set":"remove";let s,i,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+o+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){i=e[a];const c=i&&this.getDatasetMeta(i.datasetIndex).controller;c&&c[o+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:i})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[i],index:i}});!Mv(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const o=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),i=s(n,e),a=r?e:s(e,n);i.length&&this.updateHoverStyle(i,o.mode,!1),a.length&&o.mode&&this.updateHoverStyle(a,o.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},o=i=>(i.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,o)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,o),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:o=[],options:s}=this,i=n,a=this._getActiveElements(e,o,r,i),l=Sde(e),c=mpe(e,this._lastEvent,r,l);r&&(this._lastEvent=null,xt(s.onHover,[e,a,this],this),l&&xt(s.onClick,[e,a,this],this));const u=!Mv(a,o);return(u||n)&&(this._active=a,this._updateHoverStyles(a,o,n)),this._lastEvent=c,u}_getActiveElements(e,n,r,o){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,o)}},Pe(ji,"defaults",Yt),Pe(ji,"instances",Eg),Pe(ji,"overrides",ec),Pe(ji,"registry",ms),Pe(ji,"version",dpe),Pe(ji,"getChart",_D),ji);function CD(){return pt(eM.instances,t=>t._plugins.invalidate())}function vpe(t,e,n){const{startAngle:r,pixelMargin:o,x:s,y:i,outerRadius:a,innerRadius:l}=e;let c=o/a;t.beginPath(),t.arc(s,i,a,r-c,n+c),l>o?(c=o/l,t.arc(s,i,l,n+c,r-c,!0)):t.arc(s,i,o,n+gn,r-gn),t.closePath(),t.clip()}function ype(t){return KE(t,["outerStart","outerEnd","innerStart","innerEnd"])}function bpe(t,e,n,r){const o=ype(t.options.borderRadius),s=(n-e)/2,i=Math.min(s,r*e/2),a=l=>{const c=(n-Math.min(s,l))*r/2;return Xn(l,0,Math.min(s,c))};return{outerStart:a(o.outerStart),outerEnd:a(o.outerEnd),innerStart:Xn(o.innerStart,0,i),innerEnd:Xn(o.innerEnd,0,i)}}function Dc(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function Dv(t,e,n,r,o,s){const{x:i,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let h=0;const p=o-l;if(r){const N=u>0?u-r:0,D=d>0?d-r:0,F=(N+D)/2,I=F!==0?p*F/(F+r):p;h=(p-I)/2}const m=Math.max(.001,p*d-n/qt)/d,v=(p-m)/2,y=l+v+h,b=o-v-h,{outerStart:w,outerEnd:S,innerStart:_,innerEnd:k}=bpe(e,f,d,b-y),M=d-w,T=d-S,P=y+w/M,A=b-S/T,L=f+_,V=f+k,H=y+_/L,z=b-k/V;if(t.beginPath(),s){const N=(P+A)/2;if(t.arc(i,a,d,P,N),t.arc(i,a,d,N,A),S>0){const $=Dc(T,A,i,a);t.arc($.x,$.y,S,A,b+gn)}const D=Dc(V,b,i,a);if(t.lineTo(D.x,D.y),k>0){const $=Dc(V,z,i,a);t.arc($.x,$.y,k,b+gn,z+Math.PI)}const F=(b-k/f+(y+_/f))/2;if(t.arc(i,a,f,b-k/f,F,!0),t.arc(i,a,f,F,y+_/f,!0),_>0){const $=Dc(L,H,i,a);t.arc($.x,$.y,_,H+Math.PI,y-gn)}const I=Dc(M,y,i,a);if(t.lineTo(I.x,I.y),w>0){const $=Dc(M,P,i,a);t.arc($.x,$.y,w,y-gn,P)}}else{t.moveTo(i,a);const N=Math.cos(P)*d+i,D=Math.sin(P)*d+a;t.lineTo(N,D);const F=Math.cos(A)*d+i,I=Math.sin(A)*d+a;t.lineTo(F,I)}t.closePath()}function wpe(t,e,n,r,o){const{fullCircles:s,startAngle:i,circumference:a}=e;let l=e.endAngle;if(s){Dv(t,e,n,r,l,o);for(let c=0;c<s;++c)t.fill();isNaN(a)||(l=i+(a%zt||zt))}return Dv(t,e,n,r,l,o),t.fill(),l}function xpe(t,e,n,r,o){const{fullCircles:s,startAngle:i,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=f,h?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let p=e.endAngle;if(s){Dv(t,e,n,r,p,o);for(let m=0;m<s;++m)t.stroke();isNaN(a)||(p=i+(a%zt||zt))}h&&vpe(t,e,p),s||(Dv(t,e,n,r,p,o),t.stroke())}class mf extends Mi{constructor(n){super();Pe(this,"circumference");Pe(this,"endAngle");Pe(this,"fullCircles");Pe(this,"innerRadius");Pe(this,"outerRadius");Pe(this,"pixelMargin");Pe(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,o){const s=this.getProps(["x","y"],o),{angle:i,distance:a}=fz(s,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],o),h=(this.options.spacing+this.options.borderWidth)/2,m=qe(f,c-l)>=zt||Mh(i,l,c),v=ti(a,u+h,d+h);return m&&v}getCenterPoint(n){const{x:r,y:o,startAngle:s,endAngle:i,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(s+i)/2,f=(a+l+u+c)/2;return{x:r+Math.cos(d)*f,y:o+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:o}=this,s=(r.offset||0)/4,i=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=o>zt?Math.floor(o/zt):0,o===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const c=1-Math.sin(Math.min(qt,o||0)),u=s*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,wpe(n,this,u,i,a),xpe(n,this,u,i,a),n.restore()}}Pe(mf,"id","arc"),Pe(mf,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),Pe(mf,"defaultRoutes",{backgroundColor:"backgroundColor"}),Pe(mf,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Hz(t,e,n=e){t.lineCap=qe(n.borderCapStyle,e.borderCapStyle),t.setLineDash(qe(n.borderDash,e.borderDash)),t.lineDashOffset=qe(n.borderDashOffset,e.borderDashOffset),t.lineJoin=qe(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=qe(n.borderWidth,e.borderWidth),t.strokeStyle=qe(n.borderColor,e.borderColor)}function Spe(t,e,n){t.lineTo(n.x,n.y)}function _pe(t){return t.stepped?Kde:t.tension||t.cubicInterpolationMode==="monotone"?Yde:Spe}function Wz(t,e,n={}){const r=t.length,{start:o=0,end:s=r-1}=n,{start:i,end:a}=e,l=Math.max(o,i),c=Math.min(s,a),u=o<i&&s<i||o>a&&s>a;return{count:r,start:l,loop:e.loop,ilen:c<l&&!u?r+c-l:c-l}}function Cpe(t,e,n,r){const{points:o,options:s}=e,{count:i,start:a,loop:l,ilen:c}=Wz(o,n,r),u=_pe(s);let{move:d=!0,reverse:f}=r||{},h,p,m;for(h=0;h<=c;++h)p=o[(a+(f?c-h:h))%i],!p.skip&&(d?(t.moveTo(p.x,p.y),d=!1):u(t,m,p,f,s.stepped),m=p);return l&&(p=o[(a+(f?c:0))%i],u(t,m,p,f,s.stepped)),!!l}function kpe(t,e,n,r){const o=e.points,{count:s,start:i,ilen:a}=Wz(o,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,p,m,v,y;const b=S=>(i+(c?a-S:S))%s,w=()=>{m!==v&&(t.lineTo(u,v),t.lineTo(u,m),t.lineTo(u,y))};for(l&&(h=o[b(0)],t.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=o[b(f)],h.skip)continue;const S=h.x,_=h.y,k=S|0;k===p?(_<m?m=_:_>v&&(v=_),u=(d*u+S)/++d):(w(),t.lineTo(S,_),p=k,d=0,m=v=_),y=_}w()}function f_(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?kpe:Cpe}function Epe(t){return t.stepped?Efe:t.tension||t.cubicInterpolationMode==="monotone"?Mfe:hl}function Mpe(t,e,n,r){let o=e._path;o||(o=e._path=new Path2D,e.path(o,n,r)&&o.closePath()),Hz(t,e.options),t.stroke(o)}function Tpe(t,e,n,r){const{segments:o,options:s}=e,i=f_(e);for(const a of o)Hz(t,s,a.style),t.beginPath(),i(t,e,a,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const Rpe=typeof Path2D=="function";function Ope(t,e,n,r){Rpe&&!e.options.segment?Mpe(t,e,n,r):Tpe(t,e,n,r)}class kl extends Mi{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const o=r.spanGaps?this._loop:this._fullLoop;yfe(this._points,r,e,o,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Dfe(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,o=e[n],s=this.points,i=Oz(this,{property:n,start:o,end:o});if(!i.length)return;const a=[],l=Epe(r);let c,u;for(c=0,u=i.length;c<u;++c){const{start:d,end:f}=i[c],h=s[d],p=s[f];if(h===p){a.push(h);continue}const m=Math.abs((o-h[n])/(p[n]-h[n])),v=l(h,p,m,r.stepped);v[n]=e[n],a.push(v)}return a.length===1?a[0]:a}pathSegment(e,n,r){return f_(this)(e,this,n,r)}path(e,n,r){const o=this.segments,s=f_(this);let i=this._loop;n=n||0,r=r||this.points.length-n;for(const a of o)i&=s(e,this,a,{start:n,end:n+r-1});return!!i}draw(e,n,r,o){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),Ope(e,this,r,o),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Pe(kl,"id","line"),Pe(kl,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Pe(kl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Pe(kl,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function kD(t,e,n,r){const o=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<o.radius+o.hitRadius}class Mg extends Mi{constructor(n){super();Pe(this,"parsed");Pe(this,"skip");Pe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,o){const s=this.options,{x:i,y:a}=this.getProps(["x","y"],o);return Math.pow(n-i,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return kD(this,n,"x",r)}inYRange(n,r){return kD(this,n,"y",r)}getCenterPoint(n){const{x:r,y:o}=this.getProps(["x","y"],n);return{x:r,y:o}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const o=r&&n.borderWidth||0;return(r+o)*2}draw(n,r){const o=this.options;this.skip||o.radius<.1||!Th(this,r,this.size(o)/2)||(n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.fillStyle=o.backgroundColor,l_(n,o,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Pe(Mg,"id","point"),Pe(Mg,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Pe(Mg,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Uz(t,e){const{x:n,y:r,base:o,width:s,height:i}=t.getProps(["x","y","base","width","height"],e);let a,l,c,u,d;return t.horizontal?(d=i/2,a=Math.min(n,o),l=Math.max(n,o),c=r-d,u=r+d):(d=s/2,a=n-d,l=n+d,c=Math.min(r,o),u=Math.max(r,o)),{left:a,top:c,right:l,bottom:u}}function Zi(t,e,n,r){return t?0:Xn(e,n,r)}function Ppe(t,e,n){const r=t.options.borderWidth,o=t.borderSkipped,s=wz(r);return{t:Zi(o.top,s.top,0,n),r:Zi(o.right,s.right,0,e),b:Zi(o.bottom,s.bottom,0,n),l:Zi(o.left,s.left,0,e)}}function Ape(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=vu(o),i=Math.min(e,n),a=t.borderSkipped,l=r||nt(o);return{topLeft:Zi(!l||a.top||a.left,s.topLeft,0,i),topRight:Zi(!l||a.top||a.right,s.topRight,0,i),bottomLeft:Zi(!l||a.bottom||a.left,s.bottomLeft,0,i),bottomRight:Zi(!l||a.bottom||a.right,s.bottomRight,0,i)}}function Dpe(t){const e=Uz(t),n=e.right-e.left,r=e.bottom-e.top,o=Ppe(t,n/2,r/2),s=Ape(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function vw(t,e,n,r){const o=e===null,s=n===null,a=t&&!(o&&s)&&Uz(t,r);return a&&(o||ti(e,a.left,a.right))&&(s||ti(n,a.top,a.bottom))}function Ipe(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Npe(t,e){t.rect(e.x,e.y,e.w,e.h)}function yw(t,e,n={}){const r=t.x!==n.x?-e:0,o=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-r,i=(t.y+t.h!==n.y+n.h?e:0)-o;return{x:t.x+r,y:t.y+o,w:t.w+s,h:t.h+i,radius:t.radius}}class Tg extends Mi{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:o}}=this,{inner:s,outer:i}=Dpe(this),a=Ipe(i.radius)?Ov:Npe;e.save(),(i.w!==s.w||i.h!==s.h)&&(e.beginPath(),a(e,yw(i,n,s)),e.clip(),a(e,yw(s,-n,i)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),a(e,yw(s,n)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,n,r){return vw(this,e,n,r)}inXRange(e,n){return vw(this,e,null,n)}inYRange(e,n){return vw(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:o,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+o)/2:n,y:s?r:(r+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}Pe(Tg,"id","bar"),Pe(Tg,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Pe(Tg,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Lpe(t,e,n){const r=t.segments,o=t.points,s=e.points,i=[];for(const a of r){let{start:l,end:c}=a;c=tM(l,c,o);const u=h_(n,o[l],o[c],a.loop);if(!e.segments){i.push({source:a,target:u,start:o[l],end:o[c]});continue}const d=Oz(e,u);for(const f of d){const h=h_(n,s[f.start],s[f.end],f.loop),p=Rz(a,o,h);for(const m of p)i.push({source:m,target:f,start:{[n]:ED(u,h,"start",Math.max)},end:{[n]:ED(u,h,"end",Math.min)}})}}return i}function h_(t,e,n,r){if(r)return;let o=e[t],s=n[t];return t==="angle"&&(o=ws(o),s=ws(s)),{property:t,start:o,end:s}}function jpe(t,e){const{x:n=null,y:r=null}=t||{},o=e.points,s=[];return e.segments.forEach(({start:i,end:a})=>{a=tM(i,a,o);const l=o[i],c=o[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function tM(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function ED(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Gz(t,e){let n=[],r=!1;return en(t)?(r=!0,n=t):n=jpe(t,e),n.length?new kl({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function MD(t){return t&&t.fill!==!1}function $pe(t,e,n){let o=t[e].fill;const s=[e];let i;if(!n)return o;for(;o!==!1&&s.indexOf(o)===-1;){if(!Qn(o))return o;if(i=t[o],!i)return!1;if(i.visible)return o;s.push(o),o=i.fill}return!1}function Fpe(t,e,n){const r=Hpe(t);if(nt(r))return isNaN(r.value)?!1:r;let o=parseFloat(r);return Qn(o)&&Math.floor(o)===o?zpe(r[0],e,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function zpe(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function Bpe(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:nt(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Vpe(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:nt(t)?r=t.value:r=e.getBaseValue(),r}function Hpe(t){const e=t.options,n=e.fill;let r=qe(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Wpe(t){const{scale:e,index:n,line:r}=t,o=[],s=r.segments,i=r.points,a=Upe(e,n);a.push(Gz({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let u=c.start;u<=c.end;u++)Gpe(o,i[u],a)}return new kl({points:o,options:{}})}function Upe(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let o=0;o<r.length;o++){const s=r[o];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Gpe(t,e,n){const r=[];for(let o=0;o<n.length;o++){const s=n[o],{first:i,last:a,point:l}=Kpe(s,e,"x");if(!(!l||i&&a)){if(i)r.unshift(l);else if(t.push(l),!a)break}}t.push(...r)}function Kpe(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const o=r[n],s=t.segments,i=t.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const u=s[c],d=i[u.start][n],f=i[u.end][n];if(ti(o,d,f)){a=o===d,l=o===f;break}}return{first:a,last:l,point:r}}class Kz{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:o,y:s,radius:i}=this;return n=n||{start:0,end:zt},e.arc(o,s,i,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:o}=this,s=e.angle;return{x:n+Math.cos(s)*o,y:r+Math.sin(s)*o,angle:s}}}function Ype(t){const{chart:e,fill:n,line:r}=t;if(Qn(n))return qpe(e,n);if(n==="stack")return Wpe(t);if(n==="shape")return!0;const o=Xpe(t);return o instanceof Kz?o:Gz(o,r)}function qpe(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function Xpe(t){return(t.scale||{}).getPointPositionForValue?Qpe(t):Jpe(t)}function Jpe(t){const{scale:e={},fill:n}=t,r=Bpe(n,e);if(Qn(r)){const o=e.isHorizontal();return{x:o?r:null,y:o?null:r}}return null}function Qpe(t){const{scale:e,fill:n}=t,r=e.options,o=e.getLabels().length,s=r.reverse?e.max:e.min,i=Vpe(n,e,s),a=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new Kz({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(i)})}for(let l=0;l<o;++l)a.push(e.getPointPositionForValue(l,i));return a}function bw(t,e,n){const r=Ype(e),{line:o,scale:s,axis:i}=e,a=o.options,l=a.fill,c=a.backgroundColor,{above:u=c,below:d=c}=l||{};r&&o.points.length&&(nb(t,n),Zpe(t,{line:o,target:r,above:u,below:d,area:n,scale:s,axis:i}),rb(t))}function Zpe(t,e){const{line:n,target:r,above:o,below:s,area:i,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),l==="x"&&s!==o&&(TD(t,r,i.top),RD(t,{line:n,target:r,color:o,scale:a,property:l}),t.restore(),t.save(),TD(t,r,i.bottom)),RD(t,{line:n,target:r,color:s,scale:a,property:l}),t.restore()}function TD(t,e,n){const{segments:r,points:o}=e;let s=!0,i=!1;t.beginPath();for(const a of r){const{start:l,end:c}=a,u=o[l],d=o[tM(l,c,o)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),i=!!e.pathSegment(t,a,{move:i}),i?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function RD(t,e){const{line:n,target:r,property:o,color:s,scale:i}=e,a=Lpe(n,r,o);for(const{source:l,target:c,start:u,end:d}of a){const{style:{backgroundColor:f=s}={}}=l,h=r!==!0;t.save(),t.fillStyle=f,eme(t,i,h&&h_(o,u,d)),t.beginPath();const p=!!n.pathSegment(t,l);let m;if(h){p?t.closePath():OD(t,r,d,o);const v=!!r.pathSegment(t,c,{move:p,reverse:!0});m=p&&v,m||OD(t,r,u,o)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function eme(t,e,n){const{top:r,bottom:o}=e.chart.chartArea,{property:s,start:i,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(i,r,a-i,o-r),t.clip())}function OD(t,e,n,r){const o=e.interpolate(n,r);o&&t.lineTo(o.x,o.y)}var iMe={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,o=[];let s,i,a,l;for(i=0;i<r;++i)s=t.getDatasetMeta(i),a=s.dataset,l=null,a&&a.options&&a instanceof kl&&(l={visible:t.isDatasetVisible(i),index:i,fill:Fpe(a,i,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,o.push(l);for(i=0;i<r;++i)l=o[i],!(!l||l.fill===!1)&&(l.fill=$pe(o,i,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let i=o.length-1;i>=0;--i){const a=o[i].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&bw(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let o=r.length-1;o>=0;--o){const s=r[o].$filler;MD(s)&&bw(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!MD(r)||n.drawTime!=="beforeDatasetDraw"||bw(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const PD=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},tme=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class AD extends Mi{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=xt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,o)=>e.sort(r,o,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,o=$n(r.font),s=o.size,i=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=PD(r,s);let c,u;n.font=o.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(i,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(i,o,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,o){const{ctx:s,maxWidth:i,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=o+a;let d=e;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((p,m)=>{const v=r+n/2+s.measureText(p.text).width;(m===0||c[c.length-1]+v+2*a>i)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:v,height:o},c[c.length-1]+=v+a}),d}_fitCols(e,n,r,o){const{ctx:s,maxHeight:i,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=i-e;let d=a,f=0,h=0,p=0,m=0;return this.legendItems.forEach((v,y)=>{const{itemWidth:b,itemHeight:w}=nme(r,n,s,v,o);y>0&&h+w+2*a>u&&(d+=f+a,c.push({width:f,height:h}),p+=f+a,m++,f=h=0),l[y]={left:p,top:h,col:m,width:b,height:w},f=Math.max(f,b),h+=w+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:o},rtl:s}}=this,i=yu(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=Gn(r,this.left+o,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Gn(r,this.left+o,this.right-this.lineWidths[a])),c.top+=this.top+e+o,c.left=i.leftForLtr(i.x(l),c.width),l+=c.width+o}else{let a=0,l=Gn(r,this.top+e+o,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Gn(r,this.top+e+o,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+o,c.left=i.leftForLtr(i.x(c.left),c.width),l+=c.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;nb(e,this),this._draw(),rb(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:o}=this,{align:s,labels:i}=e,a=Yt.color,l=yu(e.rtl,this.left,this.width),c=$n(i.font),{padding:u}=i,d=c.size,f=d/2;let h;this.drawTitle(),o.textAlign=l.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:v}=PD(i,d),y=function(k,M,T){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;o.save();const P=qe(T.lineWidth,1);if(o.fillStyle=qe(T.fillStyle,a),o.lineCap=qe(T.lineCap,"butt"),o.lineDashOffset=qe(T.lineDashOffset,0),o.lineJoin=qe(T.lineJoin,"miter"),o.lineWidth=P,o.strokeStyle=qe(T.strokeStyle,a),o.setLineDash(qe(T.lineDash,[])),i.usePointStyle){const A={radius:m*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:P},L=l.xPlus(k,p/2),V=M+f;bz(o,A,L,V,i.pointStyleWidth&&p)}else{const A=M+Math.max((d-m)/2,0),L=l.leftForLtr(k,p),V=vu(T.borderRadius);o.beginPath(),Object.values(V).some(H=>H!==0)?Ov(o,{x:L,y:A,w:p,h:m,radius:V}):o.rect(L,A,p,m),o.fill(),P!==0&&o.stroke()}o.restore()},b=function(k,M,T){Rh(o,T.text,k,M+v/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},w=this.isHorizontal(),S=this._computeTitleHeight();w?h={x:Gn(s,this.left+u,this.right-r[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:Gn(s,this.top+S+u,this.bottom-n[0].height),line:0},Ez(this.ctx,e.textDirection);const _=v+u;this.legendItems.forEach((k,M)=>{o.strokeStyle=k.fontColor,o.fillStyle=k.fontColor;const T=o.measureText(k.text).width,P=l.textAlign(k.textAlign||(k.textAlign=i.textAlign)),A=p+f+T;let L=h.x,V=h.y;l.setWidth(this.width),w?M>0&&L+A+u>this.right&&(V=h.y+=_,h.line++,L=h.x=Gn(s,this.left+u,this.right-r[h.line])):M>0&&V+_>this.bottom&&(L=h.x=L+n[h.line].width+u,h.line++,V=h.y=Gn(s,this.top+S+u,this.bottom-n[h.line].height));const H=l.x(L);if(y(H,V,k),L=Nde(P,L+p+f,w?L+A:this.right,e.rtl),b(l.x(L),V,k),w)h.x+=A+u;else if(typeof k.text!="string"){const z=c.lineHeight;h.y+=Yz(k,z)+u}else h.y+=_}),Mz(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=$n(n.font),o=Qr(n.padding);if(!n.display)return;const s=yu(e.rtl,this.left,this.width),i=this.ctx,a=n.position,l=r.size/2,c=o.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=Gn(e.align,d,this.right-f);else{const p=this.columnSizes.reduce((m,v)=>Math.max(m,v.height),0);u=c+Gn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const h=Gn(a,d,d+f);i.textAlign=s.textAlign(WE(a)),i.textBaseline="middle",i.strokeStyle=n.color,i.fillStyle=n.color,i.font=r.string,Rh(i,n.text,h,u,r)}_computeTitleHeight(){const e=this.options.title,n=$n(e.font),r=Qr(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,o,s;if(ti(e,this.left,this.right)&&ti(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(o=s[r],ti(e,o.left,o.left+o.width)&&ti(n,o.top,o.top+o.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!sme(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const o=this._hoveredItem,s=tme(o,r);o&&!s&&xt(n.onLeave,[e,o,this],this),this._hoveredItem=r,r&&!s&&xt(n.onHover,[e,r,this],this)}else r&&xt(n.onClick,[e,r,this],this)}}function nme(t,e,n,r,o){const s=rme(r,t,e,n),i=ome(o,r,e.lineHeight);return{itemWidth:s,itemHeight:i}}function rme(t,e,n,r){let o=t.text;return o&&typeof o!="string"&&(o=o.reduce((s,i)=>s.length>i.length?s:i)),e+n.size/2+r.measureText(o).width}function ome(t,e,n){let r=t;return typeof e.text!="string"&&(r=Yz(e,n)),r}function Yz(t,e){const n=t.text?t.text.length:0;return e*n}function sme(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var aMe={id:"legend",_element:AD,start(t,e,n){const r=t.legend=new AD({ctx:t.ctx,options:n,chart:t});mo.configure(t,r,n),mo.addBox(t,r)},stop(t){mo.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;mo.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),e.hidden=!0):(o.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:s,useBorderRadius:i,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Qr(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:i&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class qz extends Mi{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const o=en(r.text)?r.text.length:1;this._padding=Qr(r.padding);const s=o*$n(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:o,right:s,options:i}=this,a=i.align;let l=0,c,u,d;return this.isHorizontal()?(u=Gn(a,r,s),d=n+e,c=s-r):(i.position==="left"?(u=r+e,d=Gn(a,o,n),l=qt*-.5):(u=s-e,d=Gn(a,n,o),l=qt*.5),c=o-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=$n(n.font),s=r.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Rh(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:WE(n.align),textBaseline:"middle",translation:[i,a]})}}function ime(t,e){const n=new qz({ctx:t.ctx,options:e,chart:t});mo.configure(t,n,e),mo.addBox(t,n),t.titleBlock=n}var lMe={id:"title",_element:qz,start(t,e,n){ime(t,n)},stop(t){const e=t.titleBlock;mo.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;mo.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const gf={average(t){if(!t.length)return!1;let e,n,r=0,o=0,s=0;for(e=0,n=t.length;e<n;++e){const i=t[e].element;if(i&&i.hasValue()){const a=i.tooltipPosition();r+=a.x,o+=a.y,++s}}return{x:r/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,o=Number.POSITIVE_INFINITY,s,i,a;for(s=0,i=t.length;s<i;++s){const l=t[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=i_(e,c);u<o&&(o=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function fs(t,e){return e&&(en(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Us(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
`)>-1?t.split(`
`):t}function ame(t,e){const{element:n,datasetIndex:r,index:o}=e,s=t.getDatasetMeta(r).controller,{label:i,value:a}=s.getLabelAndValue(o);return{chart:t,label:i,parsed:s.getParsed(o),raw:t.data.datasets[r].data[o],formattedValue:a,dataset:s.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function DD(t,e){const n=t.chart.ctx,{body:r,footer:o,title:s}=t,{boxWidth:i,boxHeight:a}=e,l=$n(e.bodyFont),c=$n(e.titleFont),u=$n(e.footerFont),d=s.length,f=o.length,h=r.length,p=Qr(e.padding);let m=p.height,v=0,y=r.reduce((S,_)=>S+_.before.length+_.lines.length+_.after.length,0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const S=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*S+(y-h)*l.lineHeight+(y-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let b=0;const w=function(S){v=Math.max(v,n.measureText(S).width+b)};return n.save(),n.font=c.string,pt(t.title,w),n.font=l.string,pt(t.beforeBody.concat(t.afterBody),w),b=e.displayColors?i+2+e.boxPadding:0,pt(r,S=>{pt(S.before,w),pt(S.lines,w),pt(S.after,w)}),b=0,n.font=u.string,pt(t.footer,w),n.restore(),v+=p.width,{width:v,height:m}}function lme(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function cme(t,e,n,r){const{x:o,width:s}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&o+s+i>e.width||t==="right"&&o-s-i<0)return!0}function ume(t,e,n,r){const{x:o,width:s}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=o<=(a+l)/2?"left":"right":o<=s/2?c="left":o>=i-s/2&&(c="right"),cme(c,t,e,n)&&(c="center"),c}function ID(t,e,n){const r=n.yAlign||e.yAlign||lme(t,n);return{xAlign:n.xAlign||e.xAlign||ume(t,e,n,r),yAlign:r}}function dme(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function fme(t,e,n){let{y:r,height:o}=t;return e==="top"?r+=n:e==="bottom"?r-=o+n:r-=o/2,r}function ND(t,e,n,r){const{caretSize:o,caretPadding:s,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=o+s,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=vu(i);let p=dme(e,a);const m=fme(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,f)+o:a==="right"&&(p+=Math.max(d,h)+o),{x:Xn(p,0,r.width-e.width),y:Xn(m,0,r.height-e.height)}}function Tm(t,e,n){const r=Qr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function LD(t){return fs([],Us(t))}function hme(t,e,n){return gc(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function jD(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Xz={beforeTitle:Vs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Vs,beforeBody:Vs,beforeLabel:Vs,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ft(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Vs,afterBody:Vs,beforeFooter:Vs,footer:Vs,afterFooter:Vs};function yr(t,e,n,r){const o=t[e].call(n,r);return typeof o>"u"?Xz[e].call(n,r):o}class p_ extends Mi{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),o=r.enabled&&n.options.animation&&r.animations,s=new Pz(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=hme(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,o=yr(r,"beforeTitle",this,e),s=yr(r,"title",this,e),i=yr(r,"afterTitle",this,e);let a=[];return a=fs(a,Us(o)),a=fs(a,Us(s)),a=fs(a,Us(i)),a}getBeforeBody(e,n){return LD(yr(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,o=[];return pt(e,s=>{const i={before:[],lines:[],after:[]},a=jD(r,s);fs(i.before,Us(yr(a,"beforeLabel",this,s))),fs(i.lines,yr(a,"label",this,s)),fs(i.after,Us(yr(a,"afterLabel",this,s))),o.push(i)}),o}getAfterBody(e,n){return LD(yr(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,o=yr(r,"beforeFooter",this,e),s=yr(r,"footer",this,e),i=yr(r,"afterFooter",this,e);let a=[];return a=fs(a,Us(o)),a=fs(a,Us(s)),a=fs(a,Us(i)),a}_createItems(e){const n=this._active,r=this.chart.data,o=[],s=[],i=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(ame(this.chart,n[l]));return e.filter&&(a=a.filter((u,d,f)=>e.filter(u,d,f,r))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,r))),pt(a,u=>{const d=jD(e.callbacks,u);o.push(yr(d,"labelColor",this,u)),s.push(yr(d,"labelPointStyle",this,u)),i.push(yr(d,"labelTextColor",this,u))}),this.labelColors=o,this.labelPointStyles=s,this.labelTextColors=i,this.dataPoints=a,a}update(e,n){const r=this.options.setContext(this.getContext()),o=this._active;let s,i=[];if(!o.length)this.opacity!==0&&(s={opacity:0});else{const a=gf[r.position].call(this,o,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const l=this._size=DD(this,r),c=Object.assign({},a,l),u=ID(this.chart,r,c),d=ND(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=i,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,o){const s=this.getCaretPosition(e,r,o);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,r){const{xAlign:o,yAlign:s}=this,{caretSize:i,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=vu(a),{x:f,y:h}=e,{width:p,height:m}=n;let v,y,b,w,S,_;return s==="center"?(S=h+m/2,o==="left"?(v=f,y=v-i,w=S+i,_=S-i):(v=f+p,y=v+i,w=S-i,_=S+i),b=v):(o==="left"?y=f+Math.max(l,u)+i:o==="right"?y=f+p-Math.max(c,d)-i:y=this.caretX,s==="top"?(w=h,S=w-i,v=y-i,b=y+i):(w=h+m,S=w+i,v=y+i,b=y-i),_=w),{x1:v,x2:y,x3:b,y1:w,y2:S,y3:_}}drawTitle(e,n,r){const o=this.title,s=o.length;let i,a,l;if(s){const c=yu(r.rtl,this.x,this.width);for(e.x=Tm(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",i=$n(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=i.string,l=0;l<s;++l)n.fillText(o[l],c.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+a,l+1===s&&(e.y+=r.titleMarginBottom-a)}}_drawColorBox(e,n,r,o,s){const i=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,u=$n(s.bodyFont),d=Tm(this,"left",s),f=o.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+h;if(s.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=o.leftForLtr(f,c)+c/2,y=p+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,l_(e,m,v,y),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,l_(e,m,v,y)}else{e.lineWidth=nt(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;const m=o.leftForLtr(f,c),v=o.leftForLtr(o.xPlus(f,1),c-2),y=vu(i.borderRadius);Object.values(y).some(b=>b!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Ov(e,{x:m,y:p,w:c,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),Ov(e,{x:v,y:p+1,w:c-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=i.backgroundColor,e.fillRect(v,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:o}=this,{bodySpacing:s,bodyAlign:i,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=$n(r.bodyFont);let f=d.lineHeight,h=0;const p=yu(r.rtl,this.x,this.width),m=function(T){n.fillText(T,p.x(e.x+h),e.y+f/2),e.y+=f+s},v=p.textAlign(i);let y,b,w,S,_,k,M;for(n.textAlign=i,n.textBaseline="middle",n.font=d.string,e.x=Tm(this,v,r),n.fillStyle=r.bodyColor,pt(this.beforeBody,m),h=a&&v!=="right"?i==="center"?c/2+u:c+2+u:0,S=0,k=o.length;S<k;++S){for(y=o[S],b=this.labelTextColors[S],n.fillStyle=b,pt(y.before,m),w=y.lines,a&&w.length&&(this._drawColorBox(n,e,S,p,r),f=Math.max(d.lineHeight,l)),_=0,M=w.length;_<M;++_)m(w[_]),f=d.lineHeight;pt(y.after,m)}h=0,f=d.lineHeight,pt(this.afterBody,m),e.y-=s}drawFooter(e,n,r){const o=this.footer,s=o.length;let i,a;if(s){const l=yu(r.rtl,this.x,this.width);for(e.x=Tm(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",i=$n(r.footerFont),n.fillStyle=r.footerColor,n.font=i.string,a=0;a<s;++a)n.fillText(o[a],l.x(e.x),e.y+i.lineHeight/2),e.y+=i.lineHeight+r.footerSpacing}}drawBackground(e,n,r,o){const{xAlign:s,yAlign:i}=this,{x:a,y:l}=e,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:p}=vu(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(a+d,l),i==="top"&&this.drawCaret(e,n,r,o),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),i==="center"&&s==="right"&&this.drawCaret(e,n,r,o),n.lineTo(a+c,l+u-p),n.quadraticCurveTo(a+c,l+u,a+c-p,l+u),i==="bottom"&&this.drawCaret(e,n,r,o),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),i==="center"&&s==="left"&&this.drawCaret(e,n,r,o),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,o=r&&r.x,s=r&&r.y;if(o||s){const i=gf[e.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=DD(this,e),l=Object.assign({},i,this._size),c=ID(n,e,l),u=ND(e,l,c,n);(o._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const o={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=Qr(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(s,e,o,n),Ez(e,n.textDirection),s.y+=i.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Mz(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,o=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Mv(r,o),i=this._positionChanged(o,n);(s||i)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,s=this._active||[],i=this._getActiveElements(e,s,n,r),a=this._positionChanged(i,e),l=n||!Mv(i,s)||a;return l&&(this._active=i,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,o){const s=this.options;if(e.type==="mouseout")return[];if(!o)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const i=this.chart.getElementsAtEventForMode(e,s.mode,s,r);return s.reverse&&i.reverse(),i}_positionChanged(e,n){const{caretX:r,caretY:o,options:s}=this,i=gf[s.position].call(this,e,n);return i!==!1&&(r!==i.x||o!==i.y)}}Pe(p_,"positioners",gf);var cMe={id:"tooltip",_element:p_,positioners:gf,afterInit(t,e,n){n&&(t.tooltip=new p_({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Xz},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const pme=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function mme(t,e,n,r){const o=t.indexOf(e);if(o===-1)return pme(t,e,n,r);const s=t.lastIndexOf(e);return o!==s?n:o}const gme=(t,e)=>t===null?null:Xn(Math.round(t),0,e);function $D(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class FD extends _d{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:o,label:s}of n)r[o]===s&&r.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ft(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:mme(r,e,qe(n,e),this._addedLabels),gme(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(o=this.getLabels().length-1)),this.min=r,this.max=o}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,o=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=e;i<=n;i++)o.push({value:i});return o}getLabelForValue(e){return $D.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}Pe(FD,"id","category"),Pe(FD,"defaults",{ticks:{callback:$D}});function vme(t,e){const n=[],{bounds:o,step:s,min:i,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=t,h=s||1,p=u-1,{min:m,max:v}=e,y=!ft(i),b=!ft(a),w=!ft(c),S=(v-m)/(d+1);let _=IA((v-m)/p/h)*h,k,M,T,P;if(_<1e-14&&!y&&!b)return[{value:m},{value:v}];P=Math.ceil(v/_)-Math.floor(m/_),P>p&&(_=IA(P*_/p/h)*h),ft(l)||(k=Math.pow(10,l),_=Math.ceil(_*k)/k),o==="ticks"?(M=Math.floor(m/_)*_,T=Math.ceil(v/_)*_):(M=m,T=v),y&&b&&s&&Ede((a-i)/s,_/1e3)?(P=Math.round(Math.min((a-i)/_,u)),_=(a-i)/P,M=i,T=a):w?(M=y?i:M,T=b?a:T,P=c-1,_=(T-M)/P):(P=(T-M)/_,Df(P,Math.round(P),_/1e3)?P=Math.round(P):P=Math.ceil(P));const A=Math.max(NA(_),NA(M));k=Math.pow(10,ft(l)?A:l),M=Math.round(M*k)/k,T=Math.round(T*k)/k;let L=0;for(y&&(f&&M!==i?(n.push({value:i}),M<i&&L++,Df(Math.round((M+L*_)*k)/k,i,zD(i,S,t))&&L++):M<i&&L++);L<P;++L){const V=Math.round((M+L*_)*k)/k;if(b&&V>a)break;n.push({value:V})}return b&&f&&T!==a?n.length&&Df(n[n.length-1].value,a,zD(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!b||T===a)&&n.push({value:T}),n}function zD(t,e,{horizontal:n,minRotation:r}){const o=ei(r),s=(n?Math.sin(o):Math.cos(o))||.001,i=.75*e*(""+t).length;return Math.min(e/s,i)}class yme extends _d{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ft(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:o,max:s}=this;const i=l=>o=n?o:l,a=l=>s=r?s:l;if(e){const l=Ds(o),c=Ds(s);l<0&&c<0?a(0):l>0&&c>0&&i(0)}if(o===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||i(o-l)}this.min=o,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,o;return r?(o=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),n=n||11),n&&(o=Math.min(n,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const o={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,i=vme(o,s);return e.bounds==="ticks"&&Mde(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const o=(r-n)/Math.max(e.length-1,1)/2;n-=o,r+=o}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return GE(e,this.chart.options.locale,this.options.ticks.format)}}class BD extends yme{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Qn(e)?e:0,this.max=Qn(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=ei(this.options.ticks.minRotation),o=(e?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Pe(BD,"id","linear"),Pe(BD,"defaults",{ticks:{callback:yz.formatters.numeric}});const sb={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Cr=Object.keys(sb);function VD(t,e){return t-e}function HD(t,e){if(ft(e))return null;const n=t._adapter,{parser:r,round:o,isoWeekday:s}=t._parseOpts;let i=e;return typeof r=="function"&&(i=r(i)),Qn(i)||(i=typeof r=="string"?n.parse(i,r):n.parse(i)),i===null?null:(o&&(i=o==="week"&&(Eh(s)||s===!0)?n.startOf(i,"isoWeek",s):n.startOf(i,o)),+i)}function WD(t,e,n,r){const o=Cr.length;for(let s=Cr.indexOf(t);s<o-1;++s){const i=sb[Cr[s]],a=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((n-e)/(a*i.size))<=r)return Cr[s]}return Cr[o-1]}function bme(t,e,n,r,o){for(let s=Cr.length-1;s>=Cr.indexOf(n);s--){const i=Cr[s];if(sb[i].common&&t._adapter.diff(o,r,i)>=e-1)return i}return Cr[n?Cr.indexOf(n):0]}function wme(t){for(let e=Cr.indexOf(t)+1,n=Cr.length;e<n;++e)if(sb[Cr[e]].common)return Cr[e]}function UD(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:o}=HE(n,e),s=n[r]>=e?n[r]:n[o];t[s]=!0}}function xme(t,e,n,r){const o=t._adapter,s=+o.startOf(e[0].value,r),i=e[e.length-1].value;let a,l;for(a=s;a<=i;a=+o.add(a,1,r))l=n[a],l>=0&&(e[l].major=!0);return e}function GD(t,e,n){const r=[],o={},s=e.length;let i,a;for(i=0;i<s;++i)a=e[i],o[a]=i,r.push({value:a,major:!1});return s===0||!n?r:xme(t,r,o,n)}class Iv extends _d{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),o=this._adapter=new ahe._date(e.adapters.date);o.init(n),Af(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:HD(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:o,max:s,minDefined:i,maxDefined:a}=this.getUserBounds();function l(c){!i&&!isNaN(c.min)&&(o=Math.min(o,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!i||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),o=Qn(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),s=Qn(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,s-1),this.max=Math.max(o+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const s=this.min,i=this.max,a=Ade(o,s,i);return this._unit=n.unit||(r.autoSkip?WD(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):bme(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:wme(this._unit),this.initOffsets(o),e.reverse&&a.reverse(),GD(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,o,s;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?n=1-o:n=(this.getDecimalForValue(e[1])-o)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?r=s:r=(s-this.getDecimalForValue(e[e.length-2]))/2);const i=e.length<3?.5:.25;n=Xn(n,0,i),r=Xn(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,o=this.options,s=o.time,i=s.unit||WD(s.minUnit,n,r,this._getLabelCapacity(n)),a=qe(o.ticks.stepSize,1),l=i==="week"?s.isoWeekday:!1,c=Eh(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":i),e.diff(r,n,i)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+i);const p=o.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+e.add(f,a,i),h++)UD(u,f,p);return(f===r||o.bounds==="ticks"||h===1)&&UD(u,f,p),Object.keys(u).sort(VD).map(m=>+m)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const o=this.options.time.displayFormats,s=this._unit,i=n||o[s];return this._adapter.format(e,i)}_tickFormatFunction(e,n,r,o){const s=this.options,i=s.ticks.callback;if(i)return xt(i,[e,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(e,o||(h?d:u))}generateTickLabels(e){let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],o.label=this._tickFormatFunction(o.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,o=ei(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(o),i=Math.sin(o),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*i,h:r*i+a*s}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,s=this._tickFormatFunction(e,0,GD(this,[e],this._majorUnit),o),i=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)e=e.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const o=this.getLabels();for(n=0,r=o.length;n<r;++n)e.push(HD(this,o[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return pz(e.sort(VD))}}Pe(Iv,"id","time"),Pe(Iv,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Rm(t,e,n){let r=0,o=t.length-1,s,i,a,l;n?(e>=t[r].pos&&e<=t[o].pos&&({lo:r,hi:o}=Cl(t,"pos",e)),{pos:s,time:a}=t[r],{pos:i,time:l}=t[o]):(e>=t[r].time&&e<=t[o].time&&({lo:r,hi:o}=Cl(t,"time",e)),{time:s,pos:a}=t[r],{time:i,pos:l}=t[o]);const c=i-s;return c?a+(l-a)*(e-s)/c:a}class KD extends Iv{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Rm(n,this.min),this._tableRange=Rm(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,o=[],s=[];let i,a,l,c,u;for(i=0,a=e.length;i<a;++i)c=e[i],c>=n&&c<=r&&o.push(c);if(o.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(i=0,a=o.length;i<a;++i)u=o[i+1],l=o[i-1],c=o[i],Math.round((u+l)/2)!==c&&s.push({time:c,pos:i/(a-1)});return s}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((o,s)=>o-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Rm(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Rm(this._table,r*this._tableRange+this._minPos,!0)}}Pe(KD,"id","timeseries"),Pe(KD,"defaults",Iv.defaults);const Jz="label";function YD(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Sme(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Qz(t,e){t.labels=e}function Zz(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jz;const r=[];t.datasets=e.map(o=>{const s=t.datasets.find(i=>i[n]===o[n]);return!s||!o.data||r.includes(s)?{...o}:(r.push(s),Object.assign(s,o),s)})}function _me(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jz;const n={labels:[],datasets:[]};return Qz(n,t.labels),Zz(n,t.datasets,e),n}function Cme(t,e){const{height:n=150,width:r=300,redraw:o=!1,datasetIdKey:s,type:i,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=t,h=C.useRef(null),p=C.useRef(),m=()=>{h.current&&(p.current=new eM(h.current,{type:i,data:_me(a,s),options:l&&{...l},plugins:c}),YD(e,p.current))},v=()=>{YD(e,null),p.current&&(p.current.destroy(),p.current=null)};return C.useEffect(()=>{!o&&p.current&&l&&Sme(p.current,l)},[o,l]),C.useEffect(()=>{!o&&p.current&&Qz(p.current.config.data,a.labels)},[o,a.labels]),C.useEffect(()=>{!o&&p.current&&a.datasets&&Zz(p.current.config.data,a.datasets,s)},[o,a.datasets]),C.useEffect(()=>{p.current&&(o?(v(),setTimeout(m)):p.current.update(d))},[o,l,a.labels,a.datasets,d]),C.useEffect(()=>{p.current&&(v(),setTimeout(m))},[i]),C.useEffect(()=>(m(),()=>v()),[]),$t.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:r},f),u)}const kme=C.forwardRef(Cme);function nM(t,e){return eM.register(e),C.forwardRef((n,r)=>$t.createElement(kme,Object.assign({},n,{ref:r,type:t})))}const uMe=nM("line",Cg),dMe=nM("bar",_g),fMe=nM("pie",c_);/*!
 * chartjs-plugin-datalabels v2.2.0
 * https://chartjs-plugin-datalabels.netlify.app
 * (c) 2017-2022 chartjs-plugin-datalabels contributors
 * Released under the MIT license
 */var qD=function(){if(typeof window<"u"){if(window.devicePixelRatio)return window.devicePixelRatio;var t=window.screen;if(t)return(t.deviceXDPI||1)/(t.logicalXDPI||1)}return 1}(),Lf={toTextLines:function(t){var e=[],n;for(t=[].concat(t);t.length;)n=t.pop(),typeof n=="string"?e.unshift.apply(e,n.split(`
`)):Array.isArray(n)?t.push.apply(t,n):ft(t)||e.unshift(""+n);return e},textSize:function(t,e,n){var r=[].concat(e),o=r.length,s=t.font,i=0,a;for(t.font=n.string,a=0;a<o;++a)i=Math.max(t.measureText(r[a]).width,i);return t.font=s,{height:o*n.lineHeight,width:i}},bound:function(t,e,n){return Math.max(t,Math.min(e,n))},arrayDiff:function(t,e){var n=t.slice(),r=[],o,s,i,a;for(o=0,i=e.length;o<i;++o)a=e[o],s=n.indexOf(a),s===-1?r.push([a,1]):n.splice(s,1);for(o=0,i=n.length;o<i;++o)r.push([n[o],-1]);return r},rasterize:function(t){return Math.round(t*qD)/qD}};function ww(t,e){var n=e.x,r=e.y;if(n===null)return{x:0,y:-1};if(r===null)return{x:1,y:0};var o=t.x-n,s=t.y-r,i=Math.sqrt(o*o+s*s);return{x:i?o/i:0,y:i?s/i:-1}}function Eme(t,e,n,r,o){switch(o){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:o*=Math.PI/180,n=Math.cos(o),r=Math.sin(o);break}return{x:t,y:e,vx:n,vy:r}}var Mme=0,eB=1,tB=2,nB=4,rB=8;function Om(t,e,n){var r=Mme;return t<n.left?r|=eB:t>n.right&&(r|=tB),e<n.top?r|=rB:e>n.bottom&&(r|=nB),r}function Tme(t,e){for(var n=t.x0,r=t.y0,o=t.x1,s=t.y1,i=Om(n,r,e),a=Om(o,s,e),l,c,u;!(!(i|a)||i&a);)l=i||a,l&rB?(c=n+(o-n)*(e.top-r)/(s-r),u=e.top):l&nB?(c=n+(o-n)*(e.bottom-r)/(s-r),u=e.bottom):l&tB?(u=r+(s-r)*(e.right-n)/(o-n),c=e.right):l&eB&&(u=r+(s-r)*(e.left-n)/(o-n),c=e.left),l===i?(n=c,r=u,i=Om(n,r,e)):(o=c,s=u,a=Om(o,s,e));return{x0:n,x1:o,y0:r,y1:s}}function Pm(t,e){var n=e.anchor,r=t,o,s;return e.clamp&&(r=Tme(r,e.area)),n==="start"?(o=r.x0,s=r.y0):n==="end"?(o=r.x1,s=r.y1):(o=(r.x0+r.x1)/2,s=(r.y0+r.y1)/2),Eme(o,s,t.vx,t.vy,e.align)}var Am={arc:function(t,e){var n=(t.startAngle+t.endAngle)/2,r=Math.cos(n),o=Math.sin(n),s=t.innerRadius,i=t.outerRadius;return Pm({x0:t.x+r*s,y0:t.y+o*s,x1:t.x+r*i,y1:t.y+o*i,vx:r,vy:o},e)},point:function(t,e){var n=ww(t,e.origin),r=n.x*t.options.radius,o=n.y*t.options.radius;return Pm({x0:t.x-r,y0:t.y-o,x1:t.x+r,y1:t.y+o,vx:n.x,vy:n.y},e)},bar:function(t,e){var n=ww(t,e.origin),r=t.x,o=t.y,s=0,i=0;return t.horizontal?(r=Math.min(t.x,t.base),s=Math.abs(t.base-t.x)):(o=Math.min(t.y,t.base),i=Math.abs(t.base-t.y)),Pm({x0:r,y0:o+i,x1:r+s,y1:o,vx:n.x,vy:n.y},e)},fallback:function(t,e){var n=ww(t,e.origin);return Pm({x0:t.x,y0:t.y,x1:t.x+(t.width||0),y1:t.y+(t.height||0),vx:n.x,vy:n.y},e)}},ni=Lf.rasterize;function Rme(t){var e=t.borderWidth||0,n=t.padding,r=t.size.height,o=t.size.width,s=-o/2,i=-r/2;return{frame:{x:s-n.left-e,y:i-n.top-e,w:o+n.width+e*2,h:r+n.height+e*2},text:{x:s,y:i,w:o,h:r}}}function Ome(t,e){var n=e.chart.getDatasetMeta(e.datasetIndex).vScale;if(!n)return null;if(n.xCenter!==void 0&&n.yCenter!==void 0)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return t.horizontal?{x:r,y:null}:{x:null,y:r}}function Pme(t){return t instanceof mf?Am.arc:t instanceof Mg?Am.point:t instanceof Tg?Am.bar:Am.fallback}function Ame(t,e,n,r,o,s){var i=Math.PI/2;if(s){var a=Math.min(s,o/2,r/2),l=e+a,c=n+a,u=e+r-a,d=n+o-a;t.moveTo(e,c),l<u&&c<d?(t.arc(l,c,a,-Math.PI,-i),t.arc(u,c,a,-i,0),t.arc(u,d,a,0,i),t.arc(l,d,a,i,Math.PI)):l<u?(t.moveTo(l,n),t.arc(u,c,a,-i,i),t.arc(l,c,a,i,Math.PI+i)):c<d?(t.arc(l,c,a,-Math.PI,0),t.arc(l,d,a,0,Math.PI)):t.arc(l,c,a,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,r,o)}function Dme(t,e,n){var r=n.backgroundColor,o=n.borderColor,s=n.borderWidth;!r&&(!o||!s)||(t.beginPath(),Ame(t,ni(e.x)+s/2,ni(e.y)+s/2,ni(e.w)-s,ni(e.h)-s,n.borderRadius),t.closePath(),r&&(t.fillStyle=r,t.fill()),o&&s&&(t.strokeStyle=o,t.lineWidth=s,t.lineJoin="miter",t.stroke()))}function Ime(t,e,n){var r=n.lineHeight,o=t.w,s=t.x,i=t.y+r/2;return e==="center"?s+=o/2:(e==="end"||e==="right")&&(s+=o),{h:r,w:o,x:s,y:i}}function Nme(t,e,n){var r=t.shadowBlur,o=n.stroked,s=ni(n.x),i=ni(n.y),a=ni(n.w);o&&t.strokeText(e,s,i,a),n.filled&&(r&&o&&(t.shadowBlur=0),t.fillText(e,s,i,a),r&&o&&(t.shadowBlur=r))}function Lme(t,e,n,r){var o=r.textAlign,s=r.color,i=!!s,a=r.font,l=e.length,c=r.textStrokeColor,u=r.textStrokeWidth,d=c&&u,f;if(!(!l||!i&&!d))for(n=Ime(n,o,a),t.font=a.string,t.textAlign=o,t.textBaseline="middle",t.shadowBlur=r.textShadowBlur,t.shadowColor=r.textShadowColor,i&&(t.fillStyle=s),d&&(t.lineJoin="round",t.lineWidth=u,t.strokeStyle=c),f=0,l=e.length;f<l;++f)Nme(t,e[f],{stroked:d,filled:i,w:n.w,x:n.x,y:n.y+n.h*f})}var oB=function(t,e,n,r){var o=this;o._config=t,o._index=r,o._model=null,o._rects=null,o._ctx=e,o._el=n};Ns(oB.prototype,{_modelize:function(t,e,n,r){var o=this,s=o._index,i=$n(Pt([n.font,{}],r,s)),a=Pt([n.color,Yt.color],r,s);return{align:Pt([n.align,"center"],r,s),anchor:Pt([n.anchor,"center"],r,s),area:r.chart.chartArea,backgroundColor:Pt([n.backgroundColor,null],r,s),borderColor:Pt([n.borderColor,null],r,s),borderRadius:Pt([n.borderRadius,0],r,s),borderWidth:Pt([n.borderWidth,0],r,s),clamp:Pt([n.clamp,!1],r,s),clip:Pt([n.clip,!1],r,s),color:a,display:t,font:i,lines:e,offset:Pt([n.offset,4],r,s),opacity:Pt([n.opacity,1],r,s),origin:Ome(o._el,r),padding:Qr(Pt([n.padding,4],r,s)),positioner:Pme(o._el),rotation:Pt([n.rotation,0],r,s)*(Math.PI/180),size:Lf.textSize(o._ctx,e,i),textAlign:Pt([n.textAlign,"start"],r,s),textShadowBlur:Pt([n.textShadowBlur,0],r,s),textShadowColor:Pt([n.textShadowColor,a],r,s),textStrokeColor:Pt([n.textStrokeColor,a],r,s),textStrokeWidth:Pt([n.textStrokeWidth,0],r,s)}},update:function(t){var e=this,n=null,r=null,o=e._index,s=e._config,i,a,l,c=Pt([s.display,!0],t,o);c&&(i=t.dataset.data[o],a=qe(xt(s.formatter,[i,t]),i),l=ft(a)?[]:Lf.toTextLines(a),l.length&&(n=e._modelize(c,l,s,t),r=Rme(n))),e._model=n,e._rects=r},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(t,e){var n=this,r=t.ctx,o=n._model,s=n._rects,i;this.visible()&&(r.save(),o.clip&&(i=o.area,r.beginPath(),r.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),r.clip()),r.globalAlpha=Lf.bound(0,o.opacity,1),r.translate(ni(e.x),ni(e.y)),r.rotate(o.rotation),Dme(r,s.frame,o),Lme(r,o.lines,s.text,o),r.restore())}});var jme=Number.MIN_SAFE_INTEGER||-9007199254740991,$me=Number.MAX_SAFE_INTEGER||9007199254740991;function Qd(t,e,n){var r=Math.cos(n),o=Math.sin(n),s=e.x,i=e.y;return{x:s+r*(t.x-s)-o*(t.y-i),y:i+o*(t.x-s)+r*(t.y-i)}}function XD(t,e){var n=$me,r=jme,o=e.origin,s,i,a,l,c;for(s=0;s<t.length;++s)i=t[s],a=i.x-o.x,l=i.y-o.y,c=e.vx*a+e.vy*l,n=Math.min(n,c),r=Math.max(r,c);return{min:n,max:r}}function Dm(t,e){var n=e.x-t.x,r=e.y-t.y,o=Math.sqrt(n*n+r*r);return{vx:(e.x-t.x)/o,vy:(e.y-t.y)/o,origin:t,ln:o}}var sB=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Ns(sB.prototype,{center:function(){var t=this._rect;return{x:t.x+t.w/2,y:t.y+t.h/2}},update:function(t,e,n){this._rotation=n,this._rect={x:e.x+t.x,y:e.y+t.y,w:e.w,h:e.h}},contains:function(t){var e=this,n=1,r=e._rect;return t=Qd(t,e.center(),-e._rotation),!(t.x<r.x-n||t.y<r.y-n||t.x>r.x+r.w+n*2||t.y>r.y+r.h+n*2)},intersects:function(t){var e=this._points(),n=t._points(),r=[Dm(e[0],e[1]),Dm(e[0],e[3])],o,s,i;for(this._rotation!==t._rotation&&r.push(Dm(n[0],n[1]),Dm(n[0],n[3])),o=0;o<r.length;++o)if(s=XD(e,r[o]),i=XD(n,r[o]),s.max<i.min||i.max<s.min)return!1;return!0},_points:function(){var t=this,e=t._rect,n=t._rotation,r=t.center();return[Qd({x:e.x,y:e.y},r,n),Qd({x:e.x+e.w,y:e.y},r,n),Qd({x:e.x+e.w,y:e.y+e.h},r,n),Qd({x:e.x,y:e.y+e.h},r,n)]}});function iB(t,e,n){var r=e.positioner(t,e),o=r.vx,s=r.vy;if(!o&&!s)return{x:r.x,y:r.y};var i=n.w,a=n.h,l=e.rotation,c=Math.abs(i/2*Math.cos(l))+Math.abs(a/2*Math.sin(l)),u=Math.abs(i/2*Math.sin(l))+Math.abs(a/2*Math.cos(l)),d=1/Math.max(Math.abs(o),Math.abs(s));return c*=o*d,u*=s*d,c+=e.offset*o,u+=e.offset*s,{x:r.x+c,y:r.y+u}}function Fme(t,e){var n,r,o,s;for(n=t.length-1;n>=0;--n)for(o=t[n].$layout,r=n-1;r>=0&&o._visible;--r)s=t[r].$layout,s._visible&&o._box.intersects(s._box)&&e(o,s);return t}function zme(t){var e,n,r,o,s,i,a;for(e=0,n=t.length;e<n;++e)r=t[e],o=r.$layout,o._visible&&(a=new Proxy(r._el,{get:(l,c)=>l.getProps([c],!0)[c]}),s=r.geometry(),i=iB(a,r.model(),s),o._box.update(i,s,r.rotation()));return Fme(t,function(l,c){var u=l._hidable,d=c._hidable;u&&d||d?c._visible=!1:u&&(l._visible=!1)})}var jf={prepare:function(t){var e=[],n,r,o,s,i;for(n=0,o=t.length;n<o;++n)for(r=0,s=t[n].length;r<s;++r)i=t[n][r],e.push(i),i.$layout={_box:new sB,_hidable:!1,_visible:!0,_set:n,_idx:i._index};return e.sort(function(a,l){var c=a.$layout,u=l.$layout;return c._idx===u._idx?u._set-c._set:u._idx-c._idx}),this.update(e),e},update:function(t){var e=!1,n,r,o,s,i;for(n=0,r=t.length;n<r;++n)o=t[n],s=o.model(),i=o.$layout,i._hidable=s&&s.display==="auto",i._visible=o.visible(),e|=i._hidable;e&&zme(t)},lookup:function(t,e){var n,r;for(n=t.length-1;n>=0;--n)if(r=t[n].$layout,r&&r._visible&&r._box.contains(e))return t[n];return null},draw:function(t,e){var n,r,o,s,i,a;for(n=0,r=e.length;n<r;++n)o=e[n],s=o.$layout,s._visible&&(i=o.geometry(),a=iB(o._el,o.model(),i),s._box.update(a,i,o.rotation()),o.draw(t,a))}},Bme=function(t){if(ft(t))return null;var e=t,n,r,o;if(nt(t))if(!ft(t.label))e=t.label;else if(!ft(t.r))e=t.r;else for(e="",n=Object.keys(t),o=0,r=n.length;o<r;++o)e+=(o!==0?", ":"")+n[o]+": "+t[n[o]];return""+e},Vme={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,clamp:!1,clip:!1,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},formatter:Bme,labels:void 0,listeners:{},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,textShadowBlur:0,textShadowColor:void 0},br="$datalabels",aB="$default";function Hme(t,e){var n=t.datalabels,r={},o=[],s,i;return n===!1?null:(n===!0&&(n={}),e=Ns({},[e,n]),s=e.labels||{},i=Object.keys(s),delete e.labels,i.length?i.forEach(function(a){s[a]&&o.push(Ns({},[e,s[a],{_key:a}]))}):o.push(e),r=o.reduce(function(a,l){return pt(l.listeners||{},function(c,u){a[u]=a[u]||{},a[u][l._key||aB]=c}),delete l.listeners,a},{}),{labels:o,listeners:r})}function m_(t,e,n,r){if(e){var o=n.$context,s=n.$groups,i;e[s._set]&&(i=e[s._set][s._key],i&&xt(i,[o,r])===!0&&(t[br]._dirty=!0,n.update(o)))}}function Wme(t,e,n,r,o){var s,i;!n&&!r||(n?r?n!==r&&(i=s=!0):i=!0:s=!0,i&&m_(t,e.leave,n,o),s&&m_(t,e.enter,r,o))}function Ume(t,e){var n=t[br],r=n._listeners,o,s;if(!(!r.enter&&!r.leave)){if(e.type==="mousemove")s=jf.lookup(n._labels,e);else if(e.type!=="mouseout")return;o=n._hovered,n._hovered=s,Wme(t,r,o,s,e)}}function Gme(t,e){var n=t[br],r=n._listeners.click,o=r&&jf.lookup(n._labels,e);o&&m_(t,r,o,e)}var hMe={id:"datalabels",defaults:Vme,beforeInit:function(t){t[br]={_actives:[]}},beforeUpdate:function(t){var e=t[br];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,n){var r=e.index,o=t[br],s=o._datasets[r]=[],i=t.isDatasetVisible(r),a=t.data.datasets[r],l=Hme(a,n),c=e.meta.data||[],u=t.ctx,d,f,h,p,m,v,y,b;for(u.save(),d=0,h=c.length;d<h;++d)if(y=c[d],y[br]=[],i&&y&&t.getDataVisibility(d)&&!y.skip)for(f=0,p=l.labels.length;f<p;++f)m=l.labels[f],v=m._key,b=new oB(m,u,y,d),b.$groups={_set:r,_key:v||aB},b.$context={active:!1,chart:t,dataIndex:d,dataset:a,datasetIndex:r},b.update(b.$context),y[br].push(b),s.push(b);u.restore(),Ns(o._listeners,l.listeners,{merger:function(w,S,_){S[w]=S[w]||{},S[w][e.index]=_[w],o._listened=!0}})},afterUpdate:function(t){t[br]._labels=jf.prepare(t[br]._datasets)},afterDatasetsDraw:function(t){jf.draw(t,t[br]._labels)},beforeEvent:function(t,e){if(t[br]._listened){var n=e.event;switch(n.type){case"mousemove":case"mouseout":Ume(t,n);break;case"click":Gme(t,n);break}}},afterEvent:function(t){var e=t[br],n=e._actives,r=e._actives=t.getActiveElements(),o=Lf.arrayDiff(n,r),s,i,a,l,c,u,d;for(s=0,i=o.length;s<i;++s)if(c=o[s],c[1])for(d=c[0].element[br]||[],a=0,l=d.length;a<l;++a)u=d[a],u.$context.active=c[1]===1,u.update(u.$context);(e._dirty||o.length)&&(jf.update(e._labels),t.render()),delete e._dirty}};/**
   * table-core
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function ea(t,e){return typeof t=="function"?t(e):t}function Zr(t,e){return n=>{e.setState(r=>({...r,[t]:ea(n,r[t])}))}}function ib(t){return t instanceof Function}function Kme(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function lB(t,e){const n=[],r=o=>{o.forEach(s=>{n.push(s);const i=e(s);i!=null&&i.length&&r(i)})};return r(t),n}function Le(t,e,n){let r=[],o;return s=>{let i;n.key&&n.debug&&(i=Date.now());const a=t(s);if(!(a.length!==r.length||a.some((u,d)=>r[d]!==u)))return o;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),o=e(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function je(t,e,n,r){return{debug:()=>{var o;return(o=t==null?void 0:t.debugAll)!=null?o:t[e]},key:!1,onChange:r}}function Yme(t,e,n,r){const o=()=>{var i;return(i=s.getValue())!=null?i:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(r),renderValue:o,getContext:Le(()=>[t,n,e,s],(i,a,l,c)=>({table:i,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),je(t.options,"debugCells"))};return t._features.forEach(i=>{i.createCell==null||i.createCell(s,n,e,t)},{}),s}function qme(t,e,n,r){var o,s;const a={...t._getDefaultColumnDef(),...e},l=a.accessorKey;let c=(o=(s=a.id)!=null?s:l?l.replace(".","_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const m of l.split(".")){var p;h=(p=h)==null?void 0:p[m]}return h}:u=f=>f[a.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Le(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},je(t.options,"debugColumns")),getLeafColumns:Le(()=>[t._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(m=>m.getLeafColumns());return f(p)}return[d]},je(t.options,"debugColumns"))};for(const f of t._features)f.createColumn==null||f.createColumn(d,t);return d}const Un="debugHeaders";function JD(t,e,n){var r;let s={id:(r=n.id)!=null?r:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),i.push(l)};return a(s),i},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(i=>{i.createHeader==null||i.createHeader(s,t)}),s}const Xme={createTable:t=>{t.getHeaderGroups=Le(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,o)=>{var s,i;const a=(s=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],l=(i=o==null?void 0:o.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?i:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Im(e,[...a,...c,...l],t)},je(t.options,Un)),t.getCenterHeaderGroups=Le(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,o)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(o!=null&&o.includes(s.id))),Im(e,n,t,"center")),je(t.options,Un)),t.getLeftHeaderGroups=Le(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,r)=>{var o;const s=(o=r==null?void 0:r.map(i=>n.find(a=>a.id===i)).filter(Boolean))!=null?o:[];return Im(e,s,t,"left")},je(t.options,Un)),t.getRightHeaderGroups=Le(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,r)=>{var o;const s=(o=r==null?void 0:r.map(i=>n.find(a=>a.id===i)).filter(Boolean))!=null?o:[];return Im(e,s,t,"right")},je(t.options,Un)),t.getFooterGroups=Le(()=>[t.getHeaderGroups()],e=>[...e].reverse(),je(t.options,Un)),t.getLeftFooterGroups=Le(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),je(t.options,Un)),t.getCenterFooterGroups=Le(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),je(t.options,Un)),t.getRightFooterGroups=Le(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),je(t.options,Un)),t.getFlatHeaders=Le(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),je(t.options,Un)),t.getLeftFlatHeaders=Le(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),je(t.options,Un)),t.getCenterFlatHeaders=Le(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),je(t.options,Un)),t.getRightFlatHeaders=Le(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),je(t.options,Un)),t.getCenterLeafHeaders=Le(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),je(t.options,Un)),t.getLeftLeafHeaders=Le(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),je(t.options,Un)),t.getRightLeafHeaders=Le(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),je(t.options,Un)),t.getLeafHeaders=Le(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,r)=>{var o,s,i,a,l,c;return[...(o=(s=e[0])==null?void 0:s.headers)!=null?o:[],...(i=(a=n[0])==null?void 0:a.headers)!=null?i:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},je(t.options,Un))}};function Im(t,e,n,r){var o,s;let i=0;const a=function(f,h){h===void 0&&(h=1),i=Math.max(i,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&a(p.columns,h+1)},0)};a(t);let l=[];const c=(f,h)=>{const p={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(v=>{const y=[...m].reverse()[0],b=v.column.depth===p.depth;let w,S=!1;if(b&&v.column.parent?w=v.column.parent:(w=v.column,S=!0),y&&(y==null?void 0:y.column)===w)y.subHeaders.push(v);else{const _=JD(n,w,{id:[r,h,w.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${m.filter(k=>k.column===w).length}`:void 0,depth:h,index:m.length});_.subHeaders.push(v),m.push(_)}p.headers.push(v),v.headerGroup=p}),l.push(p),h>0&&c(m,h-1)},u=e.map((f,h)=>JD(n,f,{depth:i,index:h}));c(u,i-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,v=0,y=[0];p.subHeaders&&p.subHeaders.length?(y=[],d(p.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:_}=w;m+=S,y.push(_)})):m=1;const b=Math.min(...y);return v=v+b,p.colSpan=m,p.rowSpan=v,{colSpan:m,rowSpan:v}});return d((o=(s=l[0])==null?void 0:s.headers)!=null?o:[]),l}const Sp=(t,e,n,r,o,s,i)=>{let a={id:e,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>lB(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Le(()=>[t.getAllLeafColumns()],l=>l.map(c=>Yme(t,a,c,c.id)),je(t.options,"debugRows")),_getAllCellsByColumnId:Le(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),je(t.options,"debugRows"))};for(let l=0;l<t._features.length;l++){const c=t._features[l];c==null||c.createRow==null||c.createRow(a,t)}return a},Jme={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},cB=(t,e,n)=>{var r;const o=n.toLowerCase();return!!(!((r=t.getValue(e))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};cB.autoRemove=t=>Yo(t);const uB=(t,e,n)=>{var r;return!!(!((r=t.getValue(e))==null||(r=r.toString())==null)&&r.includes(n))};uB.autoRemove=t=>Yo(t);const dB=(t,e,n)=>{var r;return((r=t.getValue(e))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};dB.autoRemove=t=>Yo(t);const fB=(t,e,n)=>{var r;return(r=t.getValue(e))==null?void 0:r.includes(n)};fB.autoRemove=t=>Yo(t)||!(t!=null&&t.length);const hB=(t,e,n)=>!n.some(r=>{var o;return!((o=t.getValue(e))!=null&&o.includes(r))});hB.autoRemove=t=>Yo(t)||!(t!=null&&t.length);const pB=(t,e,n)=>n.some(r=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(r)});pB.autoRemove=t=>Yo(t)||!(t!=null&&t.length);const mB=(t,e,n)=>t.getValue(e)===n;mB.autoRemove=t=>Yo(t);const gB=(t,e,n)=>t.getValue(e)==n;gB.autoRemove=t=>Yo(t);const rM=(t,e,n)=>{let[r,o]=n;const s=t.getValue(e);return s>=r&&s<=o};rM.resolveFilterValue=t=>{let[e,n]=t,r=typeof e!="number"?parseFloat(e):e,o=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(s>i){const a=s;s=i,i=a}return[s,i]};rM.autoRemove=t=>Yo(t)||Yo(t[0])&&Yo(t[1]);const xs={includesString:cB,includesStringSensitive:uB,equalsString:dB,arrIncludes:fB,arrIncludesAll:hB,arrIncludesSome:pB,equals:mB,weakEquals:gB,inNumberRange:rM};function Yo(t){return t==null||t===""}const Qme={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Zr("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(t.id);return typeof r=="string"?xs.includesString:typeof r=="number"?xs.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?xs.equals:Array.isArray(r)?xs.arrIncludes:xs.weakEquals},t.getFilterFn=()=>{var n,r;return ib(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(r=e.options.filterFns)==null?void 0:r[t.columnDef.filterFn])!=null?n:xs[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,r,o;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((r=e.options.enableColumnFilters)!=null?r:!0)&&((o=e.options.enableFilters)!=null?o:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(r=>r.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,r;return(n=(r=e.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(r=>{const o=t.getFilterFn(),s=r==null?void 0:r.find(u=>u.id===t.id),i=ea(n,s?s.value:void 0);if(QD(o,i,t)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==t.id))!=null?a:[]}const l={id:t.id,value:i};if(s){var c;return(c=r==null?void 0:r.map(u=>u.id===t.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),r=o=>{var s;return(s=ea(e,o))==null?void 0:s.filter(i=>{const a=n.find(l=>l.id===i.id);if(a){const l=a.getFilterFn();if(QD(l,i.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(r)},t.resetColumnFilters=e=>{var n,r;t.setColumnFilters(e?[]:(n=(r=t.initialState)==null?void 0:r.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function QD(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Zme=(t,e,n)=>n.reduce((r,o)=>{const s=o.getValue(t);return r+(typeof s=="number"?s:0)},0),ege=(t,e,n)=>{let r;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},tge=(t,e,n)=>{let r;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},nge=(t,e,n)=>{let r,o;return n.forEach(s=>{const i=s.getValue(t);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},rge=(t,e)=>{let n=0,r=0;if(e.forEach(o=>{let s=o.getValue(t);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},oge=(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Kme(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((s,i)=>s-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},sge=(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),ige=(t,e)=>new Set(e.map(n=>n.getValue(t))).size,age=(t,e)=>e.length,Rg={sum:Zme,min:ege,max:tge,extent:nge,mean:rge,median:oge,unique:sge,uniqueCount:ige,count:age},lge={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Zr("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(r=>r!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,r,o,s;return(n=(r=(o=(s=t.columnDef.enableGrouping)!=null?s:!0)!=null?o:e.options.enableGrouping)!=null?r:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(t.id);if(typeof r=="number")return Rg.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Rg.extent},t.getAggregationFn=()=>{var n,r;if(!t)throw new Error;return ib(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(r=e.options.aggregationFns)==null?void 0:r[t.columnDef.aggregationFn])!=null?n:Rg[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,r;t.setGrouping(e?[]:(n=(r=t.initialState)==null?void 0:r.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const r=e.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(t._groupingValuesCache[n]=r.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,r)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var o;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function cge(t,e,n){if(!(e!=null&&e.length)||!n)return t;const r=t.filter(s=>!e.includes(s.id));return n==="remove"?r:[...e.map(s=>t.find(i=>i.id===s)).filter(Boolean),...r]}const uge={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Zr("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=Le(n=>[$f(e,n)],n=>n.findIndex(r=>r.id===t.id),je(e.options,"debugColumns")),t.getIsFirstColumn=n=>{var r;return((r=$f(e,n)[0])==null?void 0:r.id)===t.id},t.getIsLastColumn=n=>{var r;const o=$f(e,n);return((r=o[o.length-1])==null?void 0:r.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=Le(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,r)=>o=>{let s=[];if(!(e!=null&&e.length))s=o;else{const i=[...e],a=[...o];for(;a.length&&i.length;){const l=i.shift(),c=a.findIndex(u=>u.id===l);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return cge(s,n,r)},je(t.options,"debugTable"))}},xw=()=>({left:[],right:[]}),dge={getInitialState:t=>({columnPinning:xw(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Zr("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const r=t.getLeafColumns().map(o=>o.id).filter(Boolean);e.setColumnPinning(o=>{var s,i;if(n==="right"){var a,l;return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=o==null?void 0:o.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d)))}})},t.getCanPin=()=>t.getLeafColumns().some(r=>{var o,s,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((s=(i=e.options.enableColumnPinning)!=null?i:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:r,right:o}=e.getState().columnPinning,s=n.some(a=>r==null?void 0:r.includes(a)),i=n.some(a=>o==null?void 0:o.includes(a));return s?"left":i?"right":!1},t.getPinnedIndex=()=>{var n,r;const o=t.getIsPinned();return o?(n=(r=e.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=Le(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,r,o)=>{const s=[...r??[],...o??[]];return n.filter(i=>!s.includes(i.column.id))},je(e.options,"debugRows")),t.getLeftVisibleCells=Le(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),je(e.options,"debugRows")),t.getRightVisibleCells=Le(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),je(e.options,"debugRows"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,r;return t.setColumnPinning(e?xw():(n=(r=t.initialState)==null?void 0:r.columnPinning)!=null?n:xw())},t.getIsSomeColumnsPinned=e=>{var n;const r=t.getState().columnPinning;if(!e){var o,s;return!!((o=r.left)!=null&&o.length||(s=r.right)!=null&&s.length)}return!!((n=r[e])!=null&&n.length)},t.getLeftLeafColumns=Le(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(r=>e.find(o=>o.id===r)).filter(Boolean),je(t.options,"debugColumns")),t.getRightLeafColumns=Le(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(r=>e.find(o=>o.id===r)).filter(Boolean),je(t.options,"debugColumns")),t.getCenterLeafColumns=Le(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r)=>{const o=[...n??[],...r??[]];return e.filter(s=>!o.includes(s.id))},je(t.options,"debugColumns"))}},Nm={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Sw=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),fge={getDefaultColumnDef:()=>Nm,getInitialState:t=>({columnSizing:{},columnSizingInfo:Sw(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Zr("columnSizing",t),onColumnSizingInfoChange:Zr("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,r,o;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:Nm.minSize,(r=s??t.columnDef.size)!=null?r:Nm.size),(o=t.columnDef.maxSize)!=null?o:Nm.maxSize)},t.getStart=Le(n=>[n,$f(e,n),e.getState().columnSizing],(n,r)=>r.slice(0,t.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),je(e.options,"debugColumns")),t.getAfter=Le(n=>[n,$f(e,n),e.getState().columnSizing],(n,r)=>r.slice(t.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),je(e.options,"debugColumns")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:r,...o}=n;return o})},t.getCanResize=()=>{var n,r;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((r=e.options.enableColumnResizing)!=null?r:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return r(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const r=e.getColumn(t.column.id),o=r==null?void 0:r.getCanResize();return s=>{if(!r||!o||(s.persist==null||s.persist(),_w(s)&&s.touches&&s.touches.length>1))return;const i=t.getSize(),a=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[r.id,r.getSize()]],l=_w(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(y,b)=>{typeof b=="number"&&(e.setColumnSizingInfo(w=>{var S,_;const k=e.options.columnResizeDirection==="rtl"?-1:1,M=(b-((S=w==null?void 0:w.startOffset)!=null?S:0))*k,T=Math.max(M/((_=w==null?void 0:w.startSize)!=null?_:0),-.999999);return w.columnSizingStart.forEach(P=>{let[A,L]=P;c[A]=Math.round(Math.max(L+L*T,0)*100)/100}),{...w,deltaOffset:M,deltaPercentage:T}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(w=>({...w,...c})))},d=y=>u("move",y),f=y=>{u("end",y),e.setColumnSizingInfo(b=>({...b,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||typeof document<"u"?document:null,p={moveHandler:y=>d(y.clientX),upHandler:y=>{h==null||h.removeEventListener("mousemove",p.moveHandler),h==null||h.removeEventListener("mouseup",p.upHandler),f(y.clientX)}},m={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),d(y.touches[0].clientX),!1),upHandler:y=>{var b;h==null||h.removeEventListener("touchmove",m.moveHandler),h==null||h.removeEventListener("touchend",m.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),f((b=y.touches[0])==null?void 0:b.clientX)}},v=hge()?{passive:!1}:!1;_w(s)?(h==null||h.addEventListener("touchmove",m.moveHandler,v),h==null||h.addEventListener("touchend",m.upHandler,v)):(h==null||h.addEventListener("mousemove",p.moveHandler,v),h==null||h.addEventListener("mouseup",p.upHandler,v)),e.setColumnSizingInfo(y=>({...y,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?Sw():(n=t.initialState.columnSizingInfo)!=null?n:Sw())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?e:0}}};let Lm=null;function hge(){if(typeof Lm=="boolean")return Lm;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return Lm=t,Lm}function _w(t){return t.type==="touchstart"}const pge={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Zr("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(r=>({...r,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,r;const o=t.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(r=e.getState().columnVisibility)==null?void 0:r[t.id])!=null?n:!0},t.getCanHide=()=>{var n,r;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((r=e.options.enableHiding)!=null?r:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=Le(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),je(e.options,"debugRows")),t.getVisibleCells=Le(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],je(e.options,"debugRows"))},createTable:t=>{const e=(n,r)=>Le(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),je(t.options,"debugColumns"));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var r;t.setColumnVisibility(n?{}:(r=t.initialState.columnVisibility)!=null?r:{})},t.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;t.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function $f(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const mge={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Zr("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const r=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,r,o,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=e.options.enableGlobalFilter)!=null?r:!0)&&((o=e.options.enableFilters)!=null?o:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>xs.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:r}=t.options;return ib(r)?r:r==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[r])!=null?e:xs[r]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},gge={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Zr("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var r,o;if(!e){t._queue(()=>{e=!0});return}if((r=(o=t.options.autoResetAll)!=null?o:t.options.autoResetExpanded)!=null?r:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=r=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(r),t.toggleAllRowsExpanded=r=>{r??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=r=>{var o,s;t.setExpanded(r?{}:(o=(s=t.initialState)==null?void 0:s.expanded)!=null?o:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const r=t.getState().expanded;return r===!0||Object.values(r).some(Boolean)},t.getIsAllRowsExpanded=()=>{const r=t.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||t.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},t.getExpandedDepth=()=>{let r=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const i=s.split(".");r=Math.max(r,i.length)}),r},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(r=>{var o;const s=r===!0?!0:!!(r!=null&&r[t.id]);let i={};if(r===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{i[a]=!0}):i=r,n=(o=n)!=null?o:!s,!s&&n)return{...i,[t.id]:!0};if(s&&!n){const{[t.id]:a,...l}=i;return l}return r})},t.getIsExpanded=()=>{var n;const r=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:r===!0||r!=null&&r[t.id])},t.getCanExpand=()=>{var n,r,o;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((r=e.options.enableExpanding)!=null?r:!0)&&!!((o=t.subRows)!=null&&o.length)},t.getIsAllParentsExpanded=()=>{let n=!0,r=t;for(;n&&r.parentId;)r=e.getRow(r.parentId,!0),n=r.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},g_=0,v_=10,Cw=()=>({pageIndex:g_,pageSize:v_}),vge={getInitialState:t=>({...t,pagination:{...Cw(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Zr("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var r,o;if(!e){t._queue(()=>{e=!0});return}if((r=(o=t.options.autoResetAll)!=null?o:t.options.autoResetPageIndex)!=null?r:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=r=>{const o=s=>ea(r,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(o)},t.resetPagination=r=>{var o;t.setPagination(r?Cw():(o=t.initialState.pagination)!=null?o:Cw())},t.setPageIndex=r=>{t.setPagination(o=>{let s=ea(r,o.pageIndex);const i=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...o,pageIndex:s}})},t.resetPageIndex=r=>{var o,s;t.setPageIndex(r?g_:(o=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:g_)},t.resetPageSize=r=>{var o,s;t.setPageSize(r?v_:(o=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:v_)},t.setPageSize=r=>{t.setPagination(o=>{const s=Math.max(1,ea(r,o.pageSize)),i=o.pageSize*o.pageIndex,a=Math.floor(i/s);return{...o,pageIndex:a,pageSize:s}})},t.setPageCount=r=>t.setPagination(o=>{var s;let i=ea(r,(s=t.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),t.getPageOptions=Le(()=>[t.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((s,i)=>i)),o},je(t.options,"debugTable")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:r}=t.getState().pagination,o=t.getPageCount();return o===-1?!0:o===0?!1:r<o-1},t.previousPage=()=>t.setPageIndex(r=>r-1),t.nextPage=()=>t.setPageIndex(r=>r+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var r;return(r=t.options.pageCount)!=null?r:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var r;return(r=t.options.rowCount)!=null?r:t.getPrePaginationRowModel().rows.length}}},kw=()=>({top:[],bottom:[]}),yge={getInitialState:t=>({rowPinning:kw(),...t}),getDefaultOptions:t=>({onRowPinningChange:Zr("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,r,o)=>{const s=r?t.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?t.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...i,t.id,...s]);e.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(m=>!(a!=null&&a.has(m)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=e.options;return typeof r=="function"?r(t):(n=r??o)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:r,bottom:o}=e.getState().rowPinning,s=n.some(a=>r==null?void 0:r.includes(a)),i=n.some(a=>o==null?void 0:o.includes(a));return s?"top":i?"bottom":!1},t.getPinnedIndex=()=>{var n,r;const o=t.getIsPinned();if(!o)return-1;const s=(n=e._getPinnedRows(o))==null?void 0:n.map(i=>{let{id:a}=i;return a});return(r=s==null?void 0:s.indexOf(t.id))!=null?r:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,r;return t.setRowPinning(e?kw():(n=(r=t.initialState)==null?void 0:r.rowPinning)!=null?n:kw())},t.getIsSomeRowsPinned=e=>{var n;const r=t.getState().rowPinning;if(!e){var o,s;return!!((o=r.top)!=null&&o.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[e])!=null&&n.length)},t._getPinnedRows=Le(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,r)=>{var o;return((o=t.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const a=t.getRow(i,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(i=>e.find(a=>a.id===i))).filter(Boolean).map(i=>({...i,position:r}))},je(t.options,"debugRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=Le(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,r)=>{const o=new Set([...n??[],...r??[]]);return e.filter(s=>!o.has(s.id))},je(t.options,"debugRows"))}},bge={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Zr("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const r={...n},o=t.getPreGroupedRowModel().flatRows;return e?o.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):o.forEach(s=>{delete r[s.id]}),r})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const r=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),o={...n};return t.getRowModel().rows.forEach(s=>{y_(o,s.id,r,!0,t)}),o}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=Le(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Ew(t,n):{rows:[],flatRows:[],rowsById:{}},je(t.options,"debugTable")),t.getFilteredSelectedRowModel=Le(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Ew(t,n):{rows:[],flatRows:[],rowsById:{}},je(t.options,"debugTable")),t.getGroupedSelectedRowModel=Le(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Ew(t,n):{rows:[],flatRows:[],rowsById:{}},je(t.options,"debugTable")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let r=!!(e.length&&Object.keys(n).length);return r&&e.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=t.getState();let r=!!e.length;return r&&e.some(o=>!n[o.id])&&(r=!1),r},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,r)=>{const o=t.getIsSelected();e.setRowSelection(s=>{var i;if(n=typeof n<"u"?n:!o,t.getCanSelect()&&o===n)return s;const a={...s};return y_(a,t.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return oM(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return b_(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return b_(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return r=>{var o;n&&t.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},y_=(t,e,n,r,o)=>{var s;const i=o.getRow(e,!0);n?(i.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),i.getCanSelect()&&(t[e]=!0)):delete t[e],r&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(a=>y_(t,a.id,n,r,o))};function Ew(t,e){const n=t.getState().rowSelection,r=[],o={},s=function(i,a){return i.map(l=>{var c;const u=oM(l,n);if(u&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:s(l.subRows)}),u)return l}).filter(Boolean)};return{rows:s(e.rows),flatRows:r,rowsById:o}}function oM(t,e){var n;return(n=e[t.id])!=null?n:!1}function b_(t,e,n){var r;if(!((r=t.subRows)!=null&&r.length))return!1;let o=!0,s=!1;return t.subRows.forEach(i=>{if(!(s&&!o)&&(i.getCanSelect()&&(oM(i,e)?s=!0:o=!1),i.subRows&&i.subRows.length)){const a=b_(i,e);a==="all"?s=!0:(a==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const w_=/([0-9]+)/gm,wge=(t,e,n)=>vB(Ra(t.getValue(n)).toLowerCase(),Ra(e.getValue(n)).toLowerCase()),xge=(t,e,n)=>vB(Ra(t.getValue(n)),Ra(e.getValue(n))),Sge=(t,e,n)=>sM(Ra(t.getValue(n)).toLowerCase(),Ra(e.getValue(n)).toLowerCase()),_ge=(t,e,n)=>sM(Ra(t.getValue(n)),Ra(e.getValue(n))),Cge=(t,e,n)=>{const r=t.getValue(n),o=e.getValue(n);return r>o?1:r<o?-1:0},kge=(t,e,n)=>sM(t.getValue(n),e.getValue(n));function sM(t,e){return t===e?0:t>e?1:-1}function Ra(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function vB(t,e){const n=t.split(w_).filter(Boolean),r=e.split(w_).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),s=r.shift(),i=parseInt(o,10),a=parseInt(s,10),l=[i,a].sort();if(isNaN(l[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}const ml={alphanumeric:wge,alphanumericCaseSensitive:xge,text:Sge,textCaseSensitive:_ge,datetime:Cge,basic:kge},Ege={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Zr("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const s=o==null?void 0:o.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return ml.datetime;if(typeof s=="string"&&(r=!0,s.split(w_).length>1))return ml.alphanumeric}return r?ml.text:ml.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,r;if(!t)throw new Error;return ib(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(r=e.options.sortingFns)==null?void 0:r[t.columnDef.sortingFn])!=null?n:ml[t.columnDef.sortingFn]},t.toggleSorting=(n,r)=>{const o=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(i=>{const a=i==null?void 0:i.find(h=>h.id===t.id),l=i==null?void 0:i.findIndex(h=>h.id===t.id);let c=[],u,d=s?n:o==="desc";if(i!=null&&i.length&&t.getCanMultiSort()&&r?a?u="toggle":u="add":i!=null&&i.length&&l!==i.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||o||(u="remove")),u==="add"){var f;c=[...i,{id:t.id,desc:d}],c.splice(0,c.length-((f=e.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=i.map(h=>h.id===t.id?{...h,desc:d}:h):u==="remove"?c=i.filter(h=>h.id!==t.id):c=[{id:t.id,desc:d}];return c})},t.getFirstSortDir=()=>{var n,r;return((n=(r=t.columnDef.sortDescFirst)!=null?r:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var r,o;const s=t.getFirstSortDir(),i=t.getIsSorted();return i?i!==s&&((r=e.options.enableSortingRemoval)==null||r)&&(!(n&&(o=e.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,r;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((r=e.options.enableSorting)!=null?r:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,r;return(n=(r=t.columnDef.enableMultiSort)!=null?r:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const r=(n=e.getState().sorting)==null?void 0:n.find(o=>o.id===t.id);return r?r.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,r;return(n=(r=e.getState().sorting)==null?void 0:r.findIndex(o=>o.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return r=>{n&&(r.persist==null||r.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(r):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,r;t.setSorting(e?[]:(n=(r=t.initialState)==null?void 0:r.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},Mge=[Xme,pge,uge,dge,Jme,Qme,mge,Ege,lge,gge,vge,yge,bge,fge];function Tge(t){var e,n;const r=[...Mge,...(e=t._features)!=null?e:[]];let o={_features:r};const s=o._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),i=f=>o.options.mergeOptions?o.options.mergeOptions(s,f):{...s,...f};let l={...{},...(n=t.initialState)!=null?n:{}};o._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:r,options:{...s,...t},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const h=ea(f,o.options);o.options=i(h)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,h,p)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(f,h,p))!=null?m:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!p&&(p=o.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:Le(()=>[o.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,v;return(m=(v=p.renderValue())==null||v.toString==null?void 0:v.toString())!=null?m:null},...o._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},je(t,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Le(()=>[o._getColumnDefs()],f=>{const h=function(p,m,v){return v===void 0&&(v=0),p.map(y=>{const b=qme(o,y,v,m),w=y;return b.columns=w.columns?h(w.columns,b,v+1):[],b})};return h(f)},je(t,"debugColumns")),getAllFlatColumns:Le(()=>[o.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),je(t,"debugColumns")),_getAllFlatColumnsById:Le(()=>[o.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),je(t,"debugColumns")),getAllLeafColumns:Le(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(m=>m.getLeafColumns());return h(p)},je(t,"debugColumns")),getColumn:f=>o._getAllFlatColumnsById()[f]};Object.assign(o,d);for(let f=0;f<o._features.length;f++){const h=o._features[f];h==null||h.createTable==null||h.createTable(o)}return o}function Rge(){return t=>Le(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,s,i){s===void 0&&(s=0);const a=[];for(let c=0;c<o.length;c++){const u=Sp(t,t._getRowId(o[c],c,i),o[c],c,s,void 0,i==null?void 0:i.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var l;u.originalSubRows=t.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,s+1,u))}}return a};return n.rows=r(e),n},je(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function Oge(){return t=>Le(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,r)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!r?n:yB(n),je(t.options,"debugTable"))}function yB(t){const e=[],n=r=>{var o;e.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function Pge(){return(t,e)=>Le(()=>{var n;return[(n=t.getColumn(e))==null?void 0:n.getFacetedRowModel()]},n=>{var r;if(!n)return;const o=(r=n.flatRows[0])==null?void 0:r.getUniqueValues(e);if(typeof o>"u")return;let s=[o,o];for(let i=0;i<n.flatRows.length;i++){const a=n.flatRows[i].getUniqueValues(e);for(let l=0;l<a.length;l++){const c=a[l];c<s[0]?s[0]=c:c>s[1]&&(s[1]=c)}}return s},je(t.options,"debugTable"))}function bB(t,e,n){return n.options.filterFromLeafRows?Age(t,e,n):Dge(t,e,n)}function Age(t,e,n){var r;const o=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){var d;let h=l[f];const p=Sp(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(p.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&c<i){if(p.subRows=a(h.subRows,c+1),h=p,e(h)&&!p.subRows.length){u.push(h),s[h.id]=h,o.push(h);continue}if(e(h)||p.subRows.length){u.push(h),s[h.id]=h,o.push(h);continue}}else h=p,e(h)&&(u.push(h),s[h.id]=h,o.push(h))}return u};return{rows:a(t),flatRows:o,rowsById:s}}function Dge(t,e,n){var r;const o=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){let h=l[f];if(e(h)){var d;if((d=h.subRows)!=null&&d.length&&c<i){const m=Sp(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);m.subRows=a(h.subRows,c+1),h=m}u.push(h),o.push(h),s[h.id]=h}}return u};return{rows:a(t),flatRows:o,rowsById:s}}function Ige(){return(t,e)=>Le(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter,t.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const s=[...r.map(a=>a.id).filter(a=>a!==e),o?"__global__":void 0].filter(Boolean),i=a=>{for(let l=0;l<s.length;l++)if(a.columnFilters[s[l]]===!1)return!1;return!0};return bB(n.rows,i,t)},je(t.options,"debugTable"))}function Nge(){return(t,e)=>Le(()=>{var n;return[(n=t.getColumn(e))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let s=0;s<n.flatRows.length;s++){const i=n.flatRows[s].getUniqueValues(e);for(let a=0;a<i.length;a++){const l=i[a];if(r.has(l)){var o;r.set(l,((o=r.get(l))!=null?o:0)+1)}else r.set(l,1)}}return r},je(t.options,"debugTable"))}function Lge(){return t=>Le(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,r)=>{if(!e.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f<e.flatRows.length;f++)e.flatRows[f].columnFilters={},e.flatRows[f].columnFiltersMeta={};return e}const o=[],s=[];(n??[]).forEach(f=>{var h;const p=t.getColumn(f.id);if(!p)return;const m=p.getFilterFn();m&&o.push({id:f.id,filterFn:m,resolvedValue:(h=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?h:f.value})});const i=n.map(f=>f.id),a=t.getGlobalFilterFn(),l=t.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&a&&l.length&&(i.push("__global__"),l.forEach(f=>{var h;s.push({id:f.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(r))!=null?h:r})}));let c,u;for(let f=0;f<e.flatRows.length;f++){const h=e.flatRows[f];if(h.columnFilters={},o.length)for(let p=0;p<o.length;p++){c=o[p];const m=c.id;h.columnFilters[m]=c.filterFn(h,m,c.resolvedValue,v=>{h.columnFiltersMeta[m]=v})}if(s.length){for(let p=0;p<s.length;p++){u=s[p];const m=u.id;if(u.filterFn(h,m,u.resolvedValue,v=>{h.columnFiltersMeta[m]=v})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=f=>{for(let h=0;h<i.length;h++)if(f.columnFilters[i[h]]===!1)return!1;return!0};return bB(e.rows,d,t)},je(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function jge(){return t=>Le(()=>[t.getState().grouping,t.getPreGroupedRowModel()],(e,n)=>{if(!n.rows.length||!e.length)return n;const r=e.filter(l=>t.getColumn(l)),o=[],s={},i=function(l,c,u){if(c===void 0&&(c=0),c>=r.length)return l.map(p=>(p.depth=c,o.push(p),s[p.id]=p,p.subRows&&(p.subRows=i(p.subRows,c+1,p.id)),p));const d=r[c],f=$ge(l,d);return Array.from(f.entries()).map((p,m)=>{let[v,y]=p,b=`${d}:${v}`;b=u?`${u}>${b}`:b;const w=i(y,c+1,b),S=c?lB(y,k=>k.subRows):y,_=Sp(t,b,S[0].original,m,c,void 0,u);return Object.assign(_,{groupingColumnId:d,groupingValue:v,subRows:w,leafRows:S,getValue:k=>{if(r.includes(k)){if(_._valuesCache.hasOwnProperty(k))return _._valuesCache[k];if(y[0]){var M;_._valuesCache[k]=(M=y[0].getValue(k))!=null?M:void 0}return _._valuesCache[k]}if(_._groupingValuesCache.hasOwnProperty(k))return _._groupingValuesCache[k];const T=t.getColumn(k),P=T==null?void 0:T.getAggregationFn();if(P)return _._groupingValuesCache[k]=P(k,S,y),_._groupingValuesCache[k]}}),w.forEach(k=>{o.push(k),s[k.id]=k}),_})},a=i(n.rows,0);return a.forEach(l=>{o.push(l),s[l.id]=l}),{rows:a,flatRows:o,rowsById:s}},je(t.options,"debugTable","getGroupedRowModel",()=>{t._queue(()=>{t._autoResetExpanded(),t._autoResetPageIndex()})}))}function $ge(t,e){const n=new Map;return t.reduce((r,o)=>{const s=`${o.getGroupingValue(e)}`,i=r.get(s);return i?i.push(o):r.set(s,[o]),r},n)}function Fge(t){return e=>Le(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:s}=n;let{rows:i,flatRows:a,rowsById:l}=r;const c=o*s,u=c+o;i=i.slice(c,u);let d;e.options.paginateExpandedRows?d={rows:i,flatRows:a,rowsById:l}:d=yB({rows:i,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},je(e.options,"debugTable"))}function zge(){return t=>Le(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const r=t.getState().sorting,o=[],s=r.filter(l=>{var c;return(c=t.getColumn(l.id))==null?void 0:c.getCanSort()}),i={};s.forEach(l=>{const c=t.getColumn(l.id);c&&(i[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<s.length;h+=1){var f;const p=s[h],m=i[p.id],v=(f=p==null?void 0:p.desc)!=null?f:!1;let y=0;if(m.sortUndefined){const b=u.getValue(p.id),w=d.getValue(p.id),S=b===void 0,_=w===void 0;(S||_)&&(y=S&&_?0:S?m.sortUndefined:-m.sortUndefined)}if(y===0&&(y=m.sortingFn(u,d,p.id)),y!==0)return v&&(y*=-1),m.invertSorting&&(y*=-1),y}return u.index-d.index}),c.forEach(u=>{var d;o.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}},je(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */function Bge(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[n]=C.useState(()=>({current:Tge(e)})),[r,o]=C.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...t,state:{...r,...t.state},onStateChange:i=>{o(i),t.onStateChange==null||t.onStateChange(i)}})),n.current}/**
   * match-sorter-utils
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */const wB={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",Ĳ:"IJ",ĳ:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ŉ:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},Vge=Object.keys(wB).join("|"),Hge=new RegExp(Vge,"g");function Wge(t){return t.replace(Hge,e=>wB[e])}/**
 * @name match-sorter
 * @license MIT license.
 * @copyright (c) 2099 Kent C. Dodds
 * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
 */const or={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Uge(t,e,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:or.MATCHES,!n.accessors){const i=ZD(t,e,n);return{rankedValue:t,rank:i,accessorIndex:-1,accessorThreshold:n.threshold,passed:i>=n.threshold}}const o=Xge(t,n.accessors),s={rankedValue:t,rank:or.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let i=0;i<o.length;i++){const a=o[i];let l=ZD(a.itemValue,e,n);const{minRanking:c,maxRanking:u,threshold:d=n.threshold}=a.attributes;l<c&&l>=or.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=i,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function ZD(t,e,n){return t=eI(t,n),e=eI(e,n),e.length>t.length?or.NO_MATCH:t===e?or.CASE_SENSITIVE_EQUAL:(t=t.toLowerCase(),e=e.toLowerCase(),t===e?or.EQUAL:t.startsWith(e)?or.STARTS_WITH:t.includes(` ${e}`)?or.WORD_STARTS_WITH:t.includes(e)?or.CONTAINS:e.length===1?or.NO_MATCH:Gge(t).includes(e)?or.ACRONYM:Kge(t,e))}function Gge(t){let e="";return t.split(" ").forEach(r=>{r.split("-").forEach(s=>{e+=s.substr(0,1)})}),e}function Kge(t,e){let n=0,r=0;function o(l,c,u){for(let d=u,f=c.length;d<f;d++)if(c[d]===l)return n+=1,d+1;return-1}function s(l){const c=1/l,u=n/e.length;return or.MATCHES+u*c}const i=o(e[0],t,0);if(i<0)return or.NO_MATCH;r=i;for(let l=1,c=e.length;l<c;l++){const u=e[l];if(r=o(u,t,r),!(r>-1))return or.NO_MATCH}const a=r-i;return s(a)}function Yge(t,e){return t.rank===e.rank?0:t.rank>e.rank?-1:1}function eI(t,e){let{keepDiacritics:n}=e;return t=`${t}`,n||(t=Wge(t)),t}function qge(t,e){let n=e;typeof e=="object"&&(n=e.accessor);const r=n(t);return r==null?[]:Array.isArray(r)?r:[String(r)]}function Xge(t,e){const n=[];for(let r=0,o=e.length;r<o;r++){const s=e[r],i=Jge(s),a=qge(t,s);for(let l=0,c=a.length;l<c;l++)n.push({itemValue:a[l],attributes:i})}return n}const tI={maxRanking:1/0,minRanking:-1/0};function Jge(t){return typeof t=="function"?tI:{...tI,...t}}function Ic(t,e,n){let r=n.initialDeps??[],o;return()=>{var s,i,a,l;let c;n.key&&((s=n.debug)!=null&&s.call(n))&&(c=Date.now());const u=t();if(!(u.length!==r.length||u.some((h,p)=>r[p]!==h)))return o;r=u;let f;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(f=Date.now()),o=e(...u),n.key&&((a=n.debug)!=null&&a.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-f)*100)/100,m=p/16,v=(y,b)=>{for(y=String(y);y.length<b;)y=" "+y;return y};console.info(`%c⏱ ${v(p,5)} /${v(h,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(l=n==null?void 0:n.onChange)==null||l.call(n,o),o}}function Mw(t,e){if(t===void 0)throw new Error(`Unexpected undefined${e?`: ${e}`:""}`);return t}const Qge=(t,e)=>Math.abs(t-e)<1,Zge=t=>t,xB=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let o=e;o<=n;o++)r.push(o);return r},eve=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=s=>{const{width:i,height:a}=s;e({width:Math.round(i),height:Math.round(a)})};if(r(n.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const o=new ResizeObserver(s=>{const i=s[0];if(i!=null&&i.borderBoxSize){const a=i.borderBoxSize[0];if(a){r({width:a.inlineSize,height:a.blockSize});return}}r(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},tve=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=()=>{e(n[t.options.horizontal?"scrollLeft":"scrollTop"])};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>{n.removeEventListener("scroll",r)}},nve=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},rve=(t,{adjustments:e=0,behavior:n},r)=>{var o,s;const i=t+e;(s=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class ove{constructor(e){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(typeof ResizeObserver<"u"?n=new ResizeObserver(o=>{o.forEach(s=>{this._measureElement(s.target,s)})}):null);return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var s;return(s=r())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=r())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zge,rangeExtractor:xB,onChange:()=>{},measureElement:nve,initialRect:{width:0,height:0},scrollMargin:0,gap:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Ic(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,r=>{this.scrollAdjustments=0,this.scrollOffset!==r&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<r?"forward":"backward",this.scrollOffset=r,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout(()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=Ic(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,r,o,s)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:s}),{key:!1}),this.getFurthestMeasurement=(n,r)=>{const o=new Map,s=new Map;for(let i=r-1;i>=0;i--){const a=n[i];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((i,a)=>i.end===a.end?i.index-a.index:i.end-a.end)[0]:void 0},this.getMeasurements=Ic(()=>[this.memoOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:s},i)=>{const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const l=this.measurementsCache.slice(0,a);for(let c=a;c<n;c++){const u=s(c),d=this.options.lanes===1?l[c-1]:this.getFurthestMeasurement(l,c),f=d?d.end+this.options.gap:r+o,h=i.get(u),p=typeof h=="number"?h:this.options.estimateSize(c),m=f+p,v=d?d.lane:c%this.options.lanes;l[c]={index:c,start:f,size:p,end:m,key:u,lane:v}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ic(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,r,o)=>this.range=n.length>0&&r>0?sve({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Ic(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,s)=>r===null?[]:n({...r,overscan:o,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.measurementsCache[this.indexFromElement(n)];if(!o||!n.isConnected){this.measureElementCache.forEach((a,l)=>{a===n&&(this.observer.unobserve(n),this.measureElementCache.delete(l))});return}const s=this.measureElementCache.get(o.key);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.measureElementCache.set(o.key,n));const i=this.options.measureElement(n,r,this);this.resizeItem(o,i)},this.resizeItem=(n,r)=>{const o=this.itemSizeCache.get(n.key)??n.size,s=r-o;s!==0&&(n.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,r)),this.notify(!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Ic(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let s=0,i=n.length;s<i;s++){const a=n[s],l=r[a];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();return Mw(r[SB(0,r.length-1,o=>Mw(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize();r==="auto"&&(n<=this.scrollOffset?r="start":n>=this.scrollOffset+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const s=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-this.getSize();return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=Mw(this.getMeasurements()[n]);if(r==="auto")if(o.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)r="end";else if(o.start<=this.scrollOffset+this.options.scrollPaddingStart)r="start";else return[this.scrollOffset,r];const s=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,r),r]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[s,i]=this.getOffsetForIndex(n,r);this._scrollToOffset(s,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[l]=this.getOffsetForIndex(n,i);Qge(l,this.scrollOffset)||this.scrollToIndex(n,{align:i,behavior:o})}else this.scrollToIndex(n,{align:i,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.maybeNotify()}}const SB=(t,e,n,r)=>{for(;t<=e;){const o=(t+e)/2|0,s=n(o);if(s<r)t=o+1;else if(s>r)e=o-1;else return o}return t>0?t-1:0};function sve({measurements:t,outerSize:e,scrollOffset:n}){const r=t.length-1,s=SB(0,r,a=>t[a].start,n);let i=s;for(;i<r&&t[i].end<n+e;)i++;return{startIndex:s,endIndex:i}}const ive=typeof document<"u"?C.useLayoutEffect:C.useEffect;function ave(t){const e=C.useReducer(()=>({}),{})[1],n={...t,onChange:(o,s)=>{var i;s?cc.flushSync(e):e(),(i=t.onChange)==null||i.call(t,o,s)}},[r]=C.useState(()=>new ove(n));return r.setOptions(n),C.useEffect(()=>r._didMount(),[]),ive(()=>r._willUpdate()),r}function _B(t){return ave({observeElementRect:eve,observeElementOffset:tve,scrollToFn:rve,...t})}function lve({type:t,date:e,locale:n,format:r,labelSeparator:o}){const s=i=>_e(i).locale(n).format(r);return t==="default"?e===null?"":s(e):t==="multiple"?e.map(s).join(", "):t==="range"&&Array.isArray(e)?e[0]&&e[1]?`${s(e[0])} ${o} ${s(e[1])}`:e[0]?`${s(e[0])} ${o} `:"":""}function cve({formatter:t,...e}){return(t||lve)(e)}function uve({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:o}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=o[e-1][o[e-1].length-1]-1?o[e-1].length-1:o[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===o[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===o[e].length-2&&r>=o[e][o[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:o[e-1].length-1,cellIndex:o[e-1][o[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:o[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===o[e].length-1&&r===o[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===o[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function CB({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:o,size:s}){var l,c,u;const i=uve({direction:e,size:s,rowIndex:r,cellIndex:o,levelIndex:n});if(!i)return;const a=(u=(c=(l=t.current)==null?void 0:l[i.levelIndex])==null?void 0:c[i.rowIndex])==null?void 0:u[i.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?CB({controlsRef:t,direction:e,levelIndex:i.levelIndex,cellIndex:i.cellIndex,rowIndex:i.rowIndex,size:s}):a.focus())}function dve(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function fve(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(r=>r.length))}function iM({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:o}){const s=dve(o.key);if(s){o.preventDefault();const i=fve(t);CB({controlsRef:t,direction:s,levelIndex:e,rowIndex:n,cellIndex:r,size:i})}}function x_(t,e){if(!t||!e)return e;const n=t.getHours(),r=t.getMinutes(),o=t.getSeconds(),s=t.getMilliseconds(),i=new Date(e);return i.setHours(n),i.setMinutes(r),i.setSeconds(o),i.setMilliseconds(s),i}var kB={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(jr,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(o,s,i){var a,l=function(f,h,p){p===void 0&&(p={});var m=new Date(f),v=function(y,b){b===void 0&&(b={});var w=b.timeZoneName||"short",S=y+"|"+w,_=r[S];return _||(_=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:y,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:w}),r[S]=_),_}(h,p);return v.formatToParts(m)},c=function(f,h){for(var p=l(f,h),m=[],v=0;v<p.length;v+=1){var y=p[v],b=y.type,w=y.value,S=n[b];S>=0&&(m[S]=parseInt(w,10))}var _=m[3],k=_===24?0:_,M=m[0]+"-"+m[1]+"-"+m[2]+" "+k+":"+m[4]+":"+m[5]+":000",T=+f;return(i.utc(M).valueOf()-(T-=T%1e3))/6e4},u=s.prototype;u.tz=function(f,h){f===void 0&&(f=a);var p=this.utcOffset(),m=this.toDate(),v=m.toLocaleString("en-US",{timeZone:f}),y=Math.round((m-new Date(v))/1e3/60),b=i(v,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(m.getTimezoneOffset()/15)-y,!0);if(h){var w=b.utcOffset();b=b.add(p-w,"minute")}return b.$x.$timezone=f,b},u.offsetName=function(f){var h=this.$x.$timezone||i.tz.guess(),p=l(this.valueOf(),h,{timeZoneName:f}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var d=u.startOf;u.startOf=function(f,h){if(!this.$x||!this.$x.$timezone)return d.call(this,f,h);var p=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return d.call(p,f,h).tz(this.$x.$timezone,!0)},i.tz=function(f,h,p){var m=p&&h,v=p||h||a,y=c(+i(),v);if(typeof f!="string")return i(f).tz(v);var b=function(k,M,T){var P=k-60*M*1e3,A=c(P,T);if(M===A)return[P,M];var L=c(P-=60*(A-M)*1e3,T);return A===L?[P,A]:[k-60*Math.min(A,L)*1e3,Math.max(A,L)]}(i.utc(f,m).valueOf(),y,v),w=b[0],S=b[1],_=i(w).utcOffset(S);return _.$x.$timezone=v,_},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(f){a=f}}})})(kB);var hve=kB.exports;const pve=bi(hve);var EB={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(jr,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,i,a){var l=i.prototype;a.utc=function(m){var v={date:m,utc:!0,args:arguments};return new i(v)},l.utc=function(m){var v=a(this.toDate(),{locale:this.$L,utc:!0});return m?v.add(this.utcOffset(),n):v},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var d=l.utcOffset;l.utcOffset=function(m,v){var y=this.$utils().u;if(y(m))return this.$u?0:y(this.$offset)?d.call(this):this.$offset;if(typeof m=="string"&&(m=function(_){_===void 0&&(_="");var k=_.match(r);if(!k)return null;var M=(""+k[0]).match(o)||["-",0,0],T=M[0],P=60*+M[1]+ +M[2];return P===0?0:T==="+"?P:-P}(m),m===null))return this;var b=Math.abs(m)<=16?60*m:m,w=this;if(v)return w.$offset=b,w.$u=m===0,w;if(m!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(b+S,n)).$offset=b,w.$x.$localOffset=S}else w=this.utc();return w};var f=l.format;l.format=function(m){var v=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,v)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var h=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var p=l.diff;l.diff=function(m,v,y){if(m&&this.$u===m.$u)return p.call(this,m,v,y);var b=this.local(),w=a(m).local();return p.call(b,w,v,y)}}})})(EB);var mve=EB.exports;const gve=bi(mve);_e.extend(gve);_e.extend(pve);function vve(t,e){return e?_e(t).tz(e).utcOffset()+t.getTimezoneOffset():0}const nI=(t,e,n)=>{if(!t)return null;if(!e)return t;let r=vve(t,e);return n==="remove"&&(r*=-1),_e(t).add(r,"minutes").toDate()};function wo(t,e,n,r){return r||!e?e:Array.isArray(e)?e.map(o=>nI(o,n,t)):nI(e,n,t)}function rI({minDate:t,maxDate:e,timezone:n}){const r=wo("add",new Date,n);return!t&&!e?r:t&&_e(r).isBefore(t)?t:e&&_e(r).isAfter(e)?e:r}const yve={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},bve=C.createContext(yve);function Zn(){const t=C.useContext(bve),e=C.useCallback(i=>i||t.locale,[t.locale]),n=C.useCallback(i=>i||t.timezone||void 0,[t.timezone]),r=C.useCallback(i=>typeof i=="number"?i:t.firstDayOfWeek,[t.firstDayOfWeek]),o=C.useCallback(i=>Array.isArray(i)?i:t.weekendDays,[t.weekendDays]),s=C.useCallback(i=>typeof i=="string"?i:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getTimezone:n,getFirstDayOfWeek:r,getWeekendDays:o,getLabelSeparator:s}}function wve(t,e){if(e==="range"&&Array.isArray(t)){const[n,r]=t;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(n=>n==null?void 0:n.toISOString()).filter(Boolean).join(", "):!Array.isArray(t)&&t?t.toISOString():""}function aM({value:t,type:e,name:n,form:r}){return g.jsx("input",{type:"hidden",value:wve(t,e),name:n,form:r})}aM.displayName="@mantine/dates/HiddenDatesInput";function MB(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=MB(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function TB(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=MB(t))&&(r&&(r+=" "),r+=e);return r}var xve={input:"m_468e7eda"};const Sve={},lM=ee((t,e)=>{const n=K("TimeInput",Sve,t),{classNames:r,styles:o,unstyled:s,vars:i,withSeconds:a,minTime:l,maxTime:c,value:u,onChange:d,...f}=n,{resolvedClassNames:h,resolvedStyles:p}=Nr({classNames:r,styles:o,props:n}),m=y=>{if(l!==void 0||c!==void 0){const[b,w,S]=y.split(":").map(Number);if(l){const[_,k,M]=l.split(":").map(Number);if(b<_||b===_&&w<k||a&&b===_&&w===k&&S<M)return-1}if(c){const[_,k,M]=c.split(":").map(Number);if(b>_||b===_&&w>k||a&&b===_&&w===k&&S>M)return 1}}return 0},v=y=>{var b,w,S;if((b=n.onBlur)==null||b.call(n,y),l!==void 0||c!==void 0){const _=y.currentTarget.value;if(_){const k=m(_);k===1?(y.currentTarget.value=c,(w=n.onChange)==null||w.call(n,y)):k===-1&&(y.currentTarget.value=l,(S=n.onChange)==null||S.call(n,y))}}};return g.jsx(gr,{classNames:{...h,input:TB(xve.input,h==null?void 0:h.input)},styles:p,unstyled:s,ref:e,value:u,...f,step:a?1:60,onChange:d,onBlur:v,type:"time",__staticSelector:"TimeInput"})});lM.classes=gr.classes;lM.displayName="@mantine/dates/TimeInput";var RB={day:"m_396ce5cb"};const _ve={},Cve=(t,{size:e})=>({day:{"--day-size":$e(e,"day-size")}}),cM=ee((t,e)=>{const n=K("Day",_ve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,date:c,disabled:u,__staticSelector:d,weekend:f,outside:h,selected:p,renderDay:m,inRange:v,firstInRange:y,lastInRange:b,hidden:w,static:S,highlightToday:_,...k}=n,M=be({name:d||"Day",classes:RB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Cve,rootSelector:"day"}),T=Zn();return g.jsx(un,{...M("day",{style:w?{display:"none"}:void 0}),component:S?"div":"button",ref:e,disabled:u,"data-today":_e(c).isSame(wo("add",new Date,T.getTimezone()),"day")||void 0,"data-hidden":w||void 0,"data-highlight-today":_||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!h&&f||void 0,"data-outside":!u&&h||void 0,"data-selected":!u&&p||void 0,"data-in-range":v&&!u||void 0,"data-first-in-range":y&&!u||void 0,"data-last-in-range":b&&!u||void 0,"data-static":S||void 0,unstyled:a,...k,children:(m==null?void 0:m(c))||c.getDate()})});cM.classes=RB;cM.displayName="@mantine/dates/Day";function kve({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=_e().day(n),o=[];for(let s=0;s<7;s+=1)typeof e=="string"?o.push(_e(r).add(s,"days").locale(t).format(e)):o.push(e(_e(r).add(s,"days").toDate()));return o}var OB={weekday:"m_18a3eca"};const Eve={},Mve=(t,{size:e})=>({weekdaysRow:{"--wr-fz":vn(e),"--wr-spacing":Dt(e)}}),uM=ee((t,e)=>{const n=K("WeekdaysRow",Eve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,locale:c,firstDayOfWeek:u,weekdayFormat:d,cellComponent:f="th",__staticSelector:h,...p}=n,m=be({name:h||"WeekdaysRow",classes:OB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Mve,rootSelector:"weekdaysRow"}),v=Zn(),y=kve({locale:v.getLocale(c),format:d,firstDayOfWeek:v.getFirstDayOfWeek(u)}).map((b,w)=>g.jsx(f,{...m("weekday"),children:b},w));return g.jsx(J,{component:"tr",ref:e,...m("weekdaysRow"),...p,children:y})});uM.classes=OB;uM.displayName="@mantine/dates/WeekdaysRow";function Tve(t,e=1){const n=new Date(t),r=e===0?6:e-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function Rve(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function Ove({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const r=t.getMonth(),o=new Date(t.getFullYear(),r,1),s=new Date(t.getFullYear(),t.getMonth()+1,0),i=Tve(s,e),a=Rve(o,e),l=[];for(;a<=i;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(a)),a.setDate(a.getDate()+1);l.push(c)}if(n&&l.length<6){const c=l[l.length-1],u=c[c.length-1],d=new Date(u);for(d.setDate(d.getDate()+1);l.length<6;){const f=[];for(let h=0;h<7;h+=1)f.push(new Date(d)),d.setDate(d.getDate()+1);l.push(f)}}return l}function PB(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function AB(t,e){return e instanceof Date?_e(t).isAfter(_e(e).subtract(1,"day"),"day"):!0}function DB(t,e){return e instanceof Date?_e(t).isBefore(_e(e).add(1,"day"),"day"):!0}function Pve(t,e,n,r,o,s,i){const a=t.flat().filter(u=>{var d;return DB(u,n)&&AB(u,e)&&!(o!=null&&o(u))&&!((d=r==null?void 0:r(u))!=null&&d.disabled)&&(!s||PB(u,i))}),l=a.find(u=>{var d;return(d=r==null?void 0:r(u))==null?void 0:d.selected});if(l)return l;const c=a.find(u=>_e().isSame(u,"date"));return c||a[0]}var IB={month:"m_cc9820d3",monthCell:"m_8f457cd5"};const Ave={withCellSpacing:!0},ab=ee((t,e)=>{const n=K("Month",Ave,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,__staticSelector:c,locale:u,firstDayOfWeek:d,weekdayFormat:f,month:h,weekendDays:p,getDayProps:m,excludeDate:v,minDate:y,maxDate:b,renderDay:w,hideOutsideDates:S,hideWeekdays:_,getDayAriaLabel:k,static:M,__getDayRef:T,__onDayKeyDown:P,__onDayClick:A,__onDayMouseEnter:L,__preventFocus:V,__stopPropagation:H,withCellSpacing:z,size:N,highlightToday:D,...F}=n,I=be({name:c||"Month",classes:IB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,rootSelector:"month"}),$=Zn(),j=Ove({month:h,firstDayOfWeek:$.getFirstDayOfWeek(d),consistentWeeks:$.consistentWeeks}),W=Pve(j,y,b,m,v,S,h),{resolvedClassNames:G,resolvedStyles:X}=Nr({classNames:r,styles:i,props:n}),q=j.map((B,Q)=>{const Z=B.map((oe,te)=>{const ne=!PB(oe,h),pe=(k==null?void 0:k(oe))||_e(oe).locale(u||$.locale).format("D MMMM YYYY"),ie=m==null?void 0:m(oe),le=_e(oe).isSame(W,"date");return g.jsx("td",{...I("monthCell"),"data-with-spacing":z||void 0,children:g.jsx(cM,{__staticSelector:c||"Month",classNames:G,styles:X,unstyled:a,"data-mantine-stop-propagation":H||void 0,highlightToday:D,renderDay:w,date:oe,size:N,weekend:$.getWeekendDays(p).includes(oe.getDay()),outside:ne,hidden:S?ne:!1,"aria-label":pe,static:M,disabled:(v==null?void 0:v(oe))||!DB(oe,b)||!AB(oe,y),ref:ce=>T==null?void 0:T(Q,te,ce),...ie,onKeyDown:ce=>{var ye;(ye=ie==null?void 0:ie.onKeyDown)==null||ye.call(ie,ce),P==null||P(ce,{rowIndex:Q,cellIndex:te,date:oe})},onMouseEnter:ce=>{var ye;(ye=ie==null?void 0:ie.onMouseEnter)==null||ye.call(ie,ce),L==null||L(ce,oe)},onClick:ce=>{var ye;(ye=ie==null?void 0:ie.onClick)==null||ye.call(ie,ce),A==null||A(ce,oe)},onMouseDown:ce=>{var ye;(ye=ie==null?void 0:ie.onMouseDown)==null||ye.call(ie,ce),V&&ce.preventDefault()},tabIndex:V||!le?-1:0})},oe.toString())});return g.jsx("tr",{...I("monthRow"),children:Z},Q)});return g.jsxs(J,{component:"table",...I("month"),size:N,ref:e,...F,children:[!_&&g.jsx("thead",{...I("monthThead"),children:g.jsx(uM,{__staticSelector:c||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:f,size:N,classNames:G,styles:X,unstyled:a})}),g.jsx("tbody",{...I("monthTbody"),children:q})]})});ab.classes=IB;ab.displayName="@mantine/dates/Month";var NB={pickerControl:"m_dc6a3c71"};const Dve={},Ive=(t,{size:e})=>({pickerControl:{"--dpc-fz":vn(e),"--dpc-size":$e(e,"dpc-size")}}),lb=ee((t,e)=>{const n=K("PickerControl",Dve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,firstInRange:c,lastInRange:u,inRange:d,__staticSelector:f,selected:h,disabled:p,...m}=n,v=be({name:f||"PickerControl",classes:NB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Ive,rootSelector:"pickerControl"});return g.jsx(un,{...v("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":h&&!p||void 0,"data-disabled":p||void 0,"data-in-range":d&&!p&&!h||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":u&&!p||void 0,disabled:p,...m})});lb.classes=NB;lb.displayName="@mantine/dates/PickerControl";function LB(t,e,n){return!e&&!n?!1:!!(e&&_e(t).isBefore(e,"year")||n&&_e(t).isAfter(n,"year"))}function Nve(t,e,n,r){const o=t.flat().filter(a=>{var l;return!LB(a,e,n)&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),s=o.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(s)return s;const i=o.find(a=>_e().isSame(a,"year"));return i||o[0]}function jB(t){const e=t.getFullYear(),n=e-e%10;let r=0;const o=[[],[],[],[]];for(let s=0;s<4;s+=1){const i=s===3?1:3;for(let a=0;a<i;a+=1)o[s].push(new Date(n+r,0)),r+=1}return o}var $B={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const Lve={yearsListFormat:"YYYY",withCellSpacing:!0},cb=ee((t,e)=>{const n=K("YearsList",Lve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,decade:c,yearsListFormat:u,locale:d,minDate:f,maxDate:h,getYearControlProps:p,__staticSelector:m,__getControlRef:v,__onControlKeyDown:y,__onControlClick:b,__onControlMouseEnter:w,__preventFocus:S,__stopPropagation:_,withCellSpacing:k,size:M,...T}=n,P=be({name:m||"YearsList",classes:$B,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,rootSelector:"yearsList"}),A=Zn(),L=jB(c),V=Nve(L,f,h,p),H=L.map((z,N)=>{const D=z.map((F,I)=>{const $=p==null?void 0:p(F),j=_e(F).isSame(V,"year");return g.jsx("td",{...P("yearsListCell"),"data-with-spacing":k||void 0,children:g.jsx(lb,{...P("yearsListControl"),size:M,unstyled:a,"data-mantine-stop-propagation":_||void 0,disabled:LB(F,f,h),ref:W=>v==null?void 0:v(N,I,W),...$,onKeyDown:W=>{var G;(G=$==null?void 0:$.onKeyDown)==null||G.call($,W),y==null||y(W,{rowIndex:N,cellIndex:I,date:F})},onClick:W=>{var G;(G=$==null?void 0:$.onClick)==null||G.call($,W),b==null||b(W,F)},onMouseEnter:W=>{var G;(G=$==null?void 0:$.onMouseEnter)==null||G.call($,W),w==null||w(W,F)},onMouseDown:W=>{var G;(G=$==null?void 0:$.onMouseDown)==null||G.call($,W),S&&W.preventDefault()},tabIndex:S||!j?-1:0,children:_e(F).locale(A.getLocale(d)).format(u)})},I)});return g.jsx("tr",{...P("yearsListRow"),children:D},N)});return g.jsx(J,{component:"table",ref:e,size:M,...P("yearsList"),...T,children:g.jsx("tbody",{children:H})})});cb.classes=$B;cb.displayName="@mantine/dates/YearsList";function FB(t,e,n){return!e&&!n?!1:!!(e&&_e(t).isBefore(e,"month")||n&&_e(t).isAfter(n,"month"))}function jve(t,e,n,r){const o=t.flat().filter(a=>{var l;return!FB(a,e,n)&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),s=o.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(s)return s;const i=o.find(a=>_e().isSame(a,"month"));return i||o[0]}function $ve(t){const e=_e(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let s=0;s<3;s+=1)n[o].push(_e(e).add(r,"months").toDate()),r+=1;return n}var zB={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Fve={monthsListFormat:"MMM",withCellSpacing:!0},ub=ee((t,e)=>{const n=K("MonthsList",Fve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,__staticSelector:c,year:u,monthsListFormat:d,locale:f,minDate:h,maxDate:p,getMonthControlProps:m,__getControlRef:v,__onControlKeyDown:y,__onControlClick:b,__onControlMouseEnter:w,__preventFocus:S,__stopPropagation:_,withCellSpacing:k,size:M,...T}=n,P=be({name:c||"MonthsList",classes:zB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,rootSelector:"monthsList"}),A=Zn(),L=$ve(u),V=jve(L,h,p,m),H=L.map((z,N)=>{const D=z.map((F,I)=>{const $=m==null?void 0:m(F),j=_e(F).isSame(V,"month");return g.jsx("td",{...P("monthsListCell"),"data-with-spacing":k||void 0,children:g.jsx(lb,{...P("monthsListControl"),size:M,unstyled:a,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":_||void 0,disabled:FB(F,h,p),ref:W=>v==null?void 0:v(N,I,W),...$,onKeyDown:W=>{var G;(G=$==null?void 0:$.onKeyDown)==null||G.call($,W),y==null||y(W,{rowIndex:N,cellIndex:I,date:F})},onClick:W=>{var G;(G=$==null?void 0:$.onClick)==null||G.call($,W),b==null||b(W,F)},onMouseEnter:W=>{var G;(G=$==null?void 0:$.onMouseEnter)==null||G.call($,W),w==null||w(W,F)},onMouseDown:W=>{var G;(G=$==null?void 0:$.onMouseDown)==null||G.call($,W),S&&W.preventDefault()},tabIndex:S||!j?-1:0,children:_e(F).locale(A.getLocale(f)).format(d)})},I)});return g.jsx("tr",{...P("monthsListRow"),children:D},N)});return g.jsx(J,{component:"table",ref:e,size:M,...P("monthsList"),...T,children:g.jsx("tbody",{children:H})})});ub.classes=zB;ub.displayName="@mantine/dates/MonthsList";var BB={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const zve={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},Bve=(t,{size:e})=>({calendarHeader:{"--dch-control-size":$e(e,"dch-control-size"),"--dch-fz":vn(e)}}),Ga=ee((t,e)=>{const n=K("CalendarHeader",zve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,nextIcon:c,previousIcon:u,nextLabel:d,previousLabel:f,onNext:h,onPrevious:p,onLevelClick:m,label:v,nextDisabled:y,previousDisabled:b,hasNextLevel:w,levelControlAriaLabel:S,withNext:_,withPrevious:k,__staticSelector:M,__preventFocus:T,__stopPropagation:P,...A}=n,L=be({name:M||"CalendarHeader",classes:BB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:Bve,rootSelector:"calendarHeader"}),V=T?H=>H.preventDefault():void 0;return g.jsxs(J,{...L("calendarHeader"),ref:e,...A,children:[k&&g.jsx(un,{...L("calendarHeaderControl"),"data-direction":"previous","aria-label":f,onClick:p,unstyled:a,onMouseDown:V,disabled:b,"data-disabled":b||void 0,tabIndex:T||b?-1:0,"data-mantine-stop-propagation":P||void 0,children:u||g.jsx($S,{...L("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),g.jsx(un,{component:w?"button":"div",...L("calendarHeaderLevel"),onClick:w?m:void 0,unstyled:a,onMouseDown:w?V:void 0,disabled:!w,"data-static":!w||void 0,"aria-label":S,tabIndex:T||!w?-1:0,"data-mantine-stop-propagation":P||void 0,children:v}),_&&g.jsx(un,{...L("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:h,unstyled:a,onMouseDown:V,disabled:y,"data-disabled":y||void 0,tabIndex:T||y?-1:0,"data-mantine-stop-propagation":P||void 0,children:c||g.jsx($S,{...L("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});Ga.classes=BB;Ga.displayName="@mantine/dates/CalendarHeader";function Vve(t){const e=jB(t);return[e[0][0],e[3][0]]}const Hve={decadeLabelFormat:"YYYY"},db=ee((t,e)=>{const n=K("DecadeLevel",Hve,t),{decade:r,locale:o,minDate:s,maxDate:i,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:p,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:b,onNext:w,onPrevious:S,nextDisabled:_,previousDisabled:k,levelControlAriaLabel:M,withNext:T,withPrevious:P,decadeLabelFormat:A,classNames:L,styles:V,unstyled:H,__staticSelector:z,__stopPropagation:N,size:D,...F}=n,I=Zn(),[$,j]=Vve(r),W={__staticSelector:z||"DecadeLevel",classNames:L,styles:V,unstyled:H,size:D},G=typeof _=="boolean"?_:i?!_e(j).endOf("year").isBefore(i):!1,X=typeof k=="boolean"?k:s?!_e($).startOf("year").isAfter(s):!1,q=(B,Q)=>_e(B).locale(o||I.locale).format(Q);return g.jsxs(J,{"data-decade-level":!0,size:D,ref:e,...F,children:[g.jsx(Ga,{label:typeof A=="function"?A($,j):`${q($,A)} – ${q(j,A)}`,__preventFocus:p,__stopPropagation:N,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:b,onNext:w,onPrevious:S,nextDisabled:G,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:M,withNext:T,withPrevious:P,...W}),g.jsx(cb,{decade:r,locale:o,minDate:s,maxDate:i,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:p,__stopPropagation:N,withCellSpacing:h,...W})]})});db.classes={...cb.classes,...Ga.classes};db.displayName="@mantine/dates/DecadeLevel";const Wve={yearLabelFormat:"YYYY"},fb=ee((t,e)=>{const n=K("YearLevel",Wve,t),{year:r,locale:o,minDate:s,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:p,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:b,onNext:w,onPrevious:S,onLevelClick:_,nextDisabled:k,previousDisabled:M,hasNextLevel:T,levelControlAriaLabel:P,withNext:A,withPrevious:L,yearLabelFormat:V,__staticSelector:H,__stopPropagation:z,size:N,classNames:D,styles:F,unstyled:I,...$}=n,j=Zn(),W={__staticSelector:H||"YearLevel",classNames:D,styles:F,unstyled:I,size:N},G=typeof k=="boolean"?k:i?!_e(r).endOf("year").isBefore(i):!1,X=typeof M=="boolean"?M:s?!_e(r).startOf("year").isAfter(s):!1;return g.jsxs(J,{"data-year-level":!0,size:N,ref:e,...$,children:[g.jsx(Ga,{label:typeof V=="function"?V(r):_e(r).locale(o||j.locale).format(V),__preventFocus:p,__stopPropagation:z,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:b,onNext:w,onPrevious:S,onLevelClick:_,nextDisabled:G,previousDisabled:X,hasNextLevel:T,levelControlAriaLabel:P,withNext:A,withPrevious:L,...W}),g.jsx(ub,{year:r,locale:o,minDate:s,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:p,__stopPropagation:z,withCellSpacing:h,...W})]})});fb.classes={...Ga.classes,...ub.classes};fb.displayName="@mantine/dates/YearLevel";const Uve={monthLabelFormat:"MMMM YYYY"},hb=ee((t,e)=>{const n=K("MonthLevel",Uve,t),{month:r,locale:o,firstDayOfWeek:s,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:v,__onDayKeyDown:y,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:S,highlightToday:_,__preventFocus:k,__stopPropagation:M,nextIcon:T,previousIcon:P,nextLabel:A,previousLabel:L,onNext:V,onPrevious:H,onLevelClick:z,nextDisabled:N,previousDisabled:D,hasNextLevel:F,levelControlAriaLabel:I,withNext:$,withPrevious:j,monthLabelFormat:W,classNames:G,styles:X,unstyled:q,__staticSelector:B,size:Q,static:Z,...oe}=n,te=Zn(),ne={__staticSelector:B||"MonthLevel",classNames:G,styles:X,unstyled:q,size:Q},pe=typeof N=="boolean"?N:d?!_e(r).endOf("month").isBefore(d):!1,ie=typeof D=="boolean"?D:u?!_e(r).startOf("month").isAfter(u):!1;return g.jsxs(J,{"data-month-level":!0,size:Q,ref:e,...oe,children:[g.jsx(Ga,{label:typeof W=="function"?W(r):_e(r).locale(o||te.locale).format(W),__preventFocus:k,__stopPropagation:M,nextIcon:T,previousIcon:P,nextLabel:A,previousLabel:L,onNext:V,onPrevious:H,onLevelClick:z,nextDisabled:pe,previousDisabled:ie,hasNextLevel:F,levelControlAriaLabel:I,withNext:$,withPrevious:j,...ne}),g.jsx(ab,{month:r,locale:o,firstDayOfWeek:s,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:p,getDayAriaLabel:m,__getDayRef:v,__onDayKeyDown:y,__onDayClick:b,__onDayMouseEnter:w,__preventFocus:k,__stopPropagation:M,static:Z,withCellSpacing:S,highlightToday:_,...ne})]})});hb.classes={...ab.classes,...Ga.classes};hb.displayName="@mantine/dates/MonthLevel";var VB={levelsGroup:"m_30b26e33"};const Gve={},Ka=ee((t,e)=>{const n=K("LevelsGroup",Gve,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,__staticSelector:c,...u}=n,d=be({name:c||"LevelsGroup",classes:VB,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l,rootSelector:"levelsGroup"});return g.jsx(J,{ref:e,...d("levelsGroup"),...u})});Ka.classes=VB;Ka.displayName="@mantine/dates/LevelsGroup";const Kve={numberOfColumns:1},pb=ee((t,e)=>{const n=K("DecadeLevelGroup",Kve,t),{decade:r,locale:o,minDate:s,maxDate:i,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:p,nextLabel:m,previousLabel:v,onNext:y,onPrevious:b,nextDisabled:w,previousDisabled:S,classNames:_,styles:k,unstyled:M,__staticSelector:T,__stopPropagation:P,numberOfColumns:A,levelControlAriaLabel:L,decadeLabelFormat:V,size:H,vars:z,...N}=n,D=C.useRef([]),F=Array(A).fill(0).map((I,$)=>{const j=_e(r).add($*10,"years").toDate();return g.jsx(db,{size:H,yearsListFormat:a,decade:j,withNext:$===A-1,withPrevious:$===0,decadeLabelFormat:V,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(W,G)=>iM({levelIndex:$,rowIndex:G.rowIndex,cellIndex:G.cellIndex,event:W,controlsRef:D}),__getControlRef:(W,G,X)=>{Array.isArray(D.current[$])||(D.current[$]=[]),Array.isArray(D.current[$][W])||(D.current[$][W]=[]),D.current[$][W][G]=X},levelControlAriaLabel:typeof L=="function"?L(j):L,locale:o,minDate:s,maxDate:i,__preventFocus:f,__stopPropagation:P,nextIcon:h,previousIcon:p,nextLabel:m,previousLabel:v,onNext:y,onPrevious:b,nextDisabled:w,previousDisabled:S,getYearControlProps:l,__staticSelector:T||"DecadeLevelGroup",classNames:_,styles:k,unstyled:M,withCellSpacing:d},$)});return g.jsx(Ka,{classNames:_,styles:k,__staticSelector:T||"DecadeLevelGroup",ref:e,size:H,unstyled:M,...N,children:F})});pb.classes={...Ka.classes,...db.classes};pb.displayName="@mantine/dates/DecadeLevelGroup";const Yve={numberOfColumns:1},mb=ee((t,e)=>{const n=K("YearLevelGroup",Yve,t),{year:r,locale:o,minDate:s,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:p,nextLabel:m,previousLabel:v,onNext:y,onPrevious:b,onLevelClick:w,nextDisabled:S,previousDisabled:_,hasNextLevel:k,classNames:M,styles:T,unstyled:P,__staticSelector:A,__stopPropagation:L,numberOfColumns:V,levelControlAriaLabel:H,yearLabelFormat:z,size:N,vars:D,...F}=n,I=C.useRef([]),$=Array(V).fill(0).map((j,W)=>{const G=_e(r).add(W,"years").toDate();return g.jsx(fb,{size:N,monthsListFormat:a,year:G,withNext:W===V-1,withPrevious:W===0,yearLabelFormat:z,__stopPropagation:L,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(X,q)=>iM({levelIndex:W,rowIndex:q.rowIndex,cellIndex:q.cellIndex,event:X,controlsRef:I}),__getControlRef:(X,q,B)=>{Array.isArray(I.current[W])||(I.current[W]=[]),Array.isArray(I.current[W][X])||(I.current[W][X]=[]),I.current[W][X][q]=B},levelControlAriaLabel:typeof H=="function"?H(G):H,locale:o,minDate:s,maxDate:i,__preventFocus:f,nextIcon:h,previousIcon:p,nextLabel:m,previousLabel:v,onNext:y,onPrevious:b,onLevelClick:w,nextDisabled:S,previousDisabled:_,hasNextLevel:k,getMonthControlProps:l,classNames:M,styles:T,unstyled:P,__staticSelector:A||"YearLevelGroup",withCellSpacing:d},W)});return g.jsx(Ka,{classNames:M,styles:T,__staticSelector:A||"YearLevelGroup",ref:e,size:N,unstyled:P,...F,children:$})});mb.classes={...fb.classes,...Ka.classes};mb.displayName="@mantine/dates/YearLevelGroup";const qve={numberOfColumns:1},gb=ee((t,e)=>{const n=K("MonthLevelGroup",qve,t),{month:r,locale:o,firstDayOfWeek:s,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:p,getDayAriaLabel:m,__onDayClick:v,__onDayMouseEnter:y,withCellSpacing:b,highlightToday:w,__preventFocus:S,nextIcon:_,previousIcon:k,nextLabel:M,previousLabel:T,onNext:P,onPrevious:A,onLevelClick:L,nextDisabled:V,previousDisabled:H,hasNextLevel:z,classNames:N,styles:D,unstyled:F,numberOfColumns:I,levelControlAriaLabel:$,monthLabelFormat:j,__staticSelector:W,__stopPropagation:G,size:X,static:q,vars:B,...Q}=n,Z=C.useRef([]),oe=Array(I).fill(0).map((te,ne)=>{const pe=_e(r).add(ne,"months").toDate();return g.jsx(hb,{month:pe,withNext:ne===I-1,withPrevious:ne===0,monthLabelFormat:j,__stopPropagation:G,__onDayClick:v,__onDayMouseEnter:y,__onDayKeyDown:(ie,le)=>iM({levelIndex:ne,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ie,controlsRef:Z}),__getDayRef:(ie,le,ce)=>{Array.isArray(Z.current[ne])||(Z.current[ne]=[]),Array.isArray(Z.current[ne][ie])||(Z.current[ne][ie]=[]),Z.current[ne][ie][le]=ce},levelControlAriaLabel:typeof $=="function"?$(pe):$,locale:o,firstDayOfWeek:s,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:p,getDayAriaLabel:m,__preventFocus:S,nextIcon:_,previousIcon:k,nextLabel:M,previousLabel:T,onNext:P,onPrevious:A,onLevelClick:L,nextDisabled:V,previousDisabled:H,hasNextLevel:z,classNames:N,styles:D,unstyled:F,__staticSelector:W||"MonthLevelGroup",size:X,static:q,withCellSpacing:b,highlightToday:w},ne)});return g.jsx(Ka,{classNames:N,styles:D,__staticSelector:W||"MonthLevelGroup",ref:e,size:X,...Q,children:oe})});gb.classes={...Ka.classes,...hb.classes};gb.displayName="@mantine/dates/MonthLevelGroup";var HB={input:"m_6fa5e2aa"};const Xve={},Cd=ee((t,e)=>{const{inputProps:n,wrapperProps:r,placeholder:o,classNames:s,styles:i,unstyled:a,popoverProps:l,modalProps:c,dropdownType:u,children:d,formattedValue:f,dropdownHandlers:h,dropdownOpened:p,onClick:m,clearable:v,onClear:y,clearButtonProps:b,rightSection:w,shouldClear:S,readOnly:_,disabled:k,value:M,name:T,form:P,type:A,...L}=a2("PickerInputBase",Xve,t),V=w||(v&&S&&!_&&!k?g.jsx(Va,{variant:"transparent",onClick:y,unstyled:a,size:n.size||"sm",...b}):null),H=()=>{A==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&y(),h.close()};return g.jsxs(g.Fragment,{children:[u==="modal"&&!_&&g.jsx(is,{opened:p,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...c,children:d}),g.jsx(wt.Wrapper,{...r,children:g.jsxs(Mt,{position:"bottom-start",opened:p,trapFocus:!0,returnFocus:!0,unstyled:a,...l,disabled:(l==null?void 0:l.disabled)||u==="modal"||_,onClose:()=>{var z;(z=l==null?void 0:l.onClose)==null||z.call(l),H()},children:[g.jsx(Mt.Target,{children:g.jsx(wt,{"aria-label":f||o,"data-dates-input":!0,"data-read-only":_||void 0,disabled:k,component:"button",type:"button",multiline:!0,onClick:z=>{m==null||m(z),h.toggle()},rightSection:V,...n,ref:e,classNames:{...s,input:TB(HB.input,s==null?void 0:s.input)},...L,children:f||g.jsx(wt.Placeholder,{error:n.error,unstyled:a,className:s==null?void 0:s.placeholder,style:i==null?void 0:i.placeholder,children:o})})}),g.jsx(Mt.Dropdown,{"data-dates-dropdown":!0,children:d})]})}),g.jsx(aM,{value:M,name:T,form:P,type:A})]})});Cd.classes=HB;Cd.displayName="@mantine/dates/PickerInputBase";const oI=t=>t==="range"?[null,null]:t==="multiple"?[]:null;function qu({type:t,value:e,defaultValue:n,onChange:r,applyTimezone:o=!0}){const s=C.useRef(t),i=Zn(),[a,l,c]=yn({value:wo("add",e,i.getTimezone(),!o),defaultValue:wo("add",n,i.getTimezone(),!o),finalValue:oI(t),onChange:d=>{r==null||r(wo("remove",d,i.getTimezone(),!o))}});let u=a;return s.current!==t&&(s.current=t,e===void 0&&(u=n!==void 0?n:oI(t),l(u))),[u,l,c]}function Tw(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function Jve(t){return t===0?"month":t===1?"year":"decade"}function Zd(t,e,n){return Jve(hh(Tw(t,0),Tw(e,0),Tw(n,2)))}const Qve={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Ya=ee((t,e)=>{const n=K("Calendar",Qve,t),{vars:r,maxLevel:o,minLevel:s,defaultLevel:i,level:a,onLevelChange:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:p,onYearSelect:m,onMonthSelect:v,onYearMouseEnter:y,onMonthMouseEnter:b,__updateDateOnYearSelect:w,__updateDateOnMonthSelect:S,firstDayOfWeek:_,weekdayFormat:k,weekendDays:M,getDayProps:T,excludeDate:P,renderDay:A,hideOutsideDates:L,hideWeekdays:V,getDayAriaLabel:H,monthLabelFormat:z,nextIcon:N,previousIcon:D,__onDayClick:F,__onDayMouseEnter:I,withCellSpacing:$,highlightToday:j,monthsListFormat:W,getMonthControlProps:G,yearLabelFormat:X,yearsListFormat:q,getYearControlProps:B,decadeLabelFormat:Q,classNames:Z,styles:oe,unstyled:te,minDate:ne,maxDate:pe,locale:ie,__staticSelector:le,size:ce,__preventFocus:ye,__stopPropagation:xe,onNextDecade:Ce,onPreviousDecade:se,onNextYear:ue,onPreviousYear:ve,onNextMonth:Oe,onPreviousMonth:fe,static:Me,__timezoneApplied:Ie,...Be}=n,{resolvedClassNames:et,resolvedStyles:mt}=Nr({classNames:Z,styles:oe,props:n}),[Ue,lt]=yn({value:a?Zd(a,s,o):void 0,defaultValue:i?Zd(i,s,o):void 0,finalValue:Zd(void 0,s,o),onChange:l}),[sn,an]=qu({type:"default",value:c,defaultValue:u,onChange:d,applyTimezone:!Ie}),tr={__staticSelector:le||"Calendar",styles:mt,classNames:et,unstyled:te,size:ce},Za=Zn(),Tn=h||f||1,fn=sn||wo("add",new Date,Za.getTimezone()),Bn=()=>{const it=_e(fn).add(Tn,"month").toDate();Oe==null||Oe(it),an(it)},oo=()=>{const it=_e(fn).subtract(Tn,"month").toDate();fe==null||fe(it),an(it)},Bs=()=>{const it=_e(fn).add(Tn,"year").toDate();ue==null||ue(it),an(it)},Ti=()=>{const it=_e(fn).subtract(Tn,"year").toDate();ve==null||ve(it),an(it)},Ao=()=>{const it=_e(fn).add(10*Tn,"year").toDate();Ce==null||Ce(it),an(it)},Do=()=>{const it=_e(fn).subtract(10*Tn,"year").toDate();se==null||se(it),an(it)};return g.jsxs(J,{ref:e,size:ce,"data-calendar":!0,...Be,children:[Ue==="month"&&g.jsx(gb,{month:fn,minDate:ne,maxDate:pe,firstDayOfWeek:_,weekdayFormat:k,weekendDays:M,getDayProps:T,excludeDate:P,renderDay:A,hideOutsideDates:L,hideWeekdays:V,getDayAriaLabel:H,onNext:Bn,onPrevious:oo,hasNextLevel:o!=="month",onLevelClick:()=>lt("year"),numberOfColumns:f,locale:ie,levelControlAriaLabel:p==null?void 0:p.monthLevelControl,nextLabel:p==null?void 0:p.nextMonth,nextIcon:N,previousLabel:p==null?void 0:p.previousMonth,previousIcon:D,monthLabelFormat:z,__onDayClick:F,__onDayMouseEnter:I,__preventFocus:ye,__stopPropagation:xe,static:Me,withCellSpacing:$,highlightToday:j,...tr}),Ue==="year"&&g.jsx(mb,{year:fn,numberOfColumns:f,minDate:ne,maxDate:pe,monthsListFormat:W,getMonthControlProps:G,locale:ie,onNext:Bs,onPrevious:Ti,hasNextLevel:o!=="month"&&o!=="year",onLevelClick:()=>lt("decade"),levelControlAriaLabel:p==null?void 0:p.yearLevelControl,nextLabel:p==null?void 0:p.nextYear,nextIcon:N,previousLabel:p==null?void 0:p.previousYear,previousIcon:D,yearLabelFormat:X,__onControlMouseEnter:b,__onControlClick:(it,Wt)=>{S&&an(Wt),lt(Zd("month",s,o)),v==null||v(Wt)},__preventFocus:ye,__stopPropagation:xe,withCellSpacing:$,...tr}),Ue==="decade"&&g.jsx(pb,{decade:fn,minDate:ne,maxDate:pe,yearsListFormat:q,getYearControlProps:B,locale:ie,onNext:Ao,onPrevious:Do,numberOfColumns:f,nextLabel:p==null?void 0:p.nextDecade,nextIcon:N,previousLabel:p==null?void 0:p.previousDecade,previousIcon:D,decadeLabelFormat:Q,__onControlMouseEnter:y,__onControlClick:(it,Wt)=>{w&&an(Wt),lt(Zd("year",s,o)),m==null||m(Wt)},__preventFocus:ye,__stopPropagation:xe,withCellSpacing:$,...tr})]})});Ya.classes={...pb.classes,...mb.classes,...gb.classes};Ya.displayName="@mantine/dates/Calendar";function dM(t){const{maxLevel:e,minLevel:n,defaultLevel:r,level:o,onLevelChange:s,nextIcon:i,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:h,onYearSelect:p,onMonthSelect:m,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:w,onNextYear:S,onPreviousYear:_,onNextDecade:k,onPreviousDecade:M,withCellSpacing:T,highlightToday:P,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:L,firstDayOfWeek:V,weekdayFormat:H,weekendDays:z,getDayProps:N,excludeDate:D,renderDay:F,hideOutsideDates:I,hideWeekdays:$,getDayAriaLabel:j,monthLabelFormat:W,monthsListFormat:G,getMonthControlProps:X,yearLabelFormat:q,yearsListFormat:B,getYearControlProps:Q,decadeLabelFormat:Z,allowSingleDateInRange:oe,allowDeselect:te,minDate:ne,maxDate:pe,locale:ie,...le}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:r,level:o,onLevelChange:s,nextIcon:i,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:h,onYearSelect:p,onMonthSelect:m,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:w,onNextYear:S,onPreviousYear:_,onNextDecade:k,onPreviousDecade:M,withCellSpacing:T,highlightToday:P,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:L,firstDayOfWeek:V,weekdayFormat:H,weekendDays:z,getDayProps:N,excludeDate:D,renderDay:F,hideOutsideDates:I,hideWeekdays:$,getDayAriaLabel:j,monthLabelFormat:W,monthsListFormat:G,getMonthControlProps:X,yearLabelFormat:q,yearsListFormat:B,getYearControlProps:Q,decadeLabelFormat:Z,allowSingleDateInRange:oe,allowDeselect:te,minDate:ne,maxDate:pe,locale:ie},others:le}}function sI(t,e){const n=[...e].sort((r,o)=>r.getTime()-o.getTime());return _e(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&_e(n[1]).endOf("day").add(1,"ms").isAfter(t)}function WB({type:t,level:e,value:n,defaultValue:r,onChange:o,allowSingleDateInRange:s,allowDeselect:i,onMouseLeave:a,applyTimezone:l=!0}){const[c,u]=qu({type:t,value:n,defaultValue:r,onChange:o,applyTimezone:l}),[d,f]=C.useState(t==="range"&&c[0]&&!c[1]?c[0]:null),[h,p]=C.useState(null),m=k=>{if(t==="range"){if(d instanceof Date&&!c[1]){if(_e(k).isSame(d,e)&&!s){f(null),p(null),u([null,null]);return}const M=[k,d];M.sort((T,P)=>T.getTime()-P.getTime()),u(M),p(null),f(null);return}if(c[0]&&!c[1]&&_e(k).isSame(c[0],e)&&!s){f(null),p(null),u([null,null]);return}u([k,null]),p(null),f(k);return}if(t==="multiple"){c.some(M=>_e(M).isSame(k,e))?u(c.filter(M=>!_e(M).isSame(k,e))):u([...c,k]);return}c&&i&&_e(k).isSame(c,e)?u(null):u(k)},v=k=>d instanceof Date&&h instanceof Date?sI(k,[h,d]):c[0]instanceof Date&&c[1]instanceof Date?sI(k,c):!1,y=t==="range"?k=>{a==null||a(k),p(null)}:a,b=k=>c[0]instanceof Date&&_e(k).isSame(c[0],e)?!(h&&_e(h).isBefore(c[0])):!1,w=k=>c[1]instanceof Date?_e(k).isSame(c[1],e):!(c[0]instanceof Date)||!h?!1:_e(h).isBefore(c[0])&&_e(k).isSame(c[0],e),S=k=>{if(t==="range")return{selected:c.some(T=>T&&_e(T).isSame(k,e)),inRange:v(k),firstInRange:b(k),lastInRange:w(k),"data-autofocus":!!c[0]&&_e(c[0]).isSame(k,e)||void 0};if(t==="multiple")return{selected:c.some(T=>T&&_e(T).isSame(k,e)),"data-autofocus":!!c[0]&&_e(c[0]).isSame(k,e)||void 0};const M=_e(c).isSame(k,e);return{selected:M,"data-autofocus":M||void 0}},_=t==="range"&&d?p:()=>{};return C.useEffect(()=>{t==="range"&&!c[0]&&!c[1]&&f(null)},[n]),{onDateChange:m,onRootMouseLeave:y,onHoveredDateChange:_,getControlProps:S,_value:c,setValue:u}}const Zve={type:"default"},vb=ee((t,e)=>{const n=K("YearPicker",Zve,t),{classNames:r,styles:o,vars:s,type:i,defaultValue:a,value:l,onChange:c,__staticSelector:u,getYearControlProps:d,allowSingleDateInRange:f,allowDeselect:h,onMouseLeave:p,onYearSelect:m,__updateDateOnYearSelect:v,__timezoneApplied:y,...b}=n,{onDateChange:w,onRootMouseLeave:S,onHoveredDateChange:_,getControlProps:k}=WB({type:i,level:"year",allowDeselect:h,allowSingleDateInRange:f,value:l,defaultValue:a,onChange:c,onMouseLeave:p,applyTimezone:!y}),{resolvedClassNames:M,resolvedStyles:T}=Nr({classNames:r,styles:o,props:n}),P=Zn();return g.jsx(Ya,{ref:e,minLevel:"decade",__updateDateOnYearSelect:v??!1,__staticSelector:u||"YearPicker",onMouseLeave:S,onYearMouseEnter:(A,L)=>_(L),onYearSelect:A=>{w(A),m==null||m(A)},getYearControlProps:A=>({...k(A),...d==null?void 0:d(A)}),classNames:M,styles:T,...b,date:wo("add",b.date,P.getTimezone(),y),__timezoneApplied:!0})});vb.classes=Ya.classes;vb.displayName="@mantine/dates/YearPicker";const e0e={type:"default",defaultLevel:"month",numberOfColumns:1},yb=ee((t,e)=>{const n=K("DatePicker",e0e,t),{classNames:r,styles:o,vars:s,type:i,defaultValue:a,value:l,onChange:c,__staticSelector:u,getDayProps:d,allowSingleDateInRange:f,allowDeselect:h,onMouseLeave:p,numberOfColumns:m,hideOutsideDates:v,__onDayMouseEnter:y,__onDayClick:b,__timezoneApplied:w,...S}=n,{onDateChange:_,onRootMouseLeave:k,onHoveredDateChange:M,getControlProps:T}=WB({type:i,level:"day",allowDeselect:h,allowSingleDateInRange:f,value:l,defaultValue:a,onChange:c,onMouseLeave:p,applyTimezone:!w}),{resolvedClassNames:P,resolvedStyles:A}=Nr({classNames:r,styles:o,props:n}),L=Zn();return g.jsx(Ya,{ref:e,minLevel:"month",classNames:P,styles:A,__staticSelector:u||"DatePicker",onMouseLeave:k,numberOfColumns:m,hideOutsideDates:v??m!==1,__onDayMouseEnter:(V,H)=>{M(H),y==null||y(V,H)},__onDayClick:(V,H)=>{_(H),b==null||b(V,H)},getDayProps:V=>({...T(V),...d==null?void 0:d(V)}),...S,date:wo("add",S.date,L.getTimezone(),w),__timezoneApplied:!0})});yb.classes=Ya.classes;yb.displayName="@mantine/dates/DatePicker";function t0e(t,e){if(t===null)return null;const n=wo("add",new Date(t),e);return Number.isNaN(n.getTime())||!t?null:n}function n0e({date:t,maxDate:e,minDate:n}){return!(t==null||Number.isNaN(t.getTime())||e&&_e(t).isAfter(e,"date")||n&&_e(t).isBefore(n,"date"))}const r0e={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},fM=ee((t,e)=>{const n=a2("DateInput",r0e,t),{inputProps:r,wrapperProps:o,value:s,defaultValue:i,onChange:a,clearable:l,clearButtonProps:c,popoverProps:u,getDayProps:d,locale:f,valueFormat:h,dateParser:p,minDate:m,maxDate:v,fixOnBlur:y,onFocus:b,onBlur:w,onClick:S,readOnly:_,name:k,form:M,rightSection:T,unstyled:P,classNames:A,styles:L,allowDeselect:V,preserveTime:H,date:z,defaultDate:N,onDateChange:D,...F}=n,[I,$]=C.useState(!1),{calendarProps:j,others:W}=dM(F),G=Zn(),q=p||(ve=>{const Oe=_e(ve,h,G.getLocale(f)).toDate();return Number.isNaN(Oe.getTime())?t0e(ve,G.getTimezone()):Oe}),B=V!==void 0?V:l,Q=ve=>ve?_e(ve).locale(G.getLocale(f)).format(h):"",[Z,oe,te]=qu({type:"default",value:s,defaultValue:i,onChange:a}),[ne,pe]=qu({type:"default",value:z,defaultValue:i||N,onChange:D});C.useEffect(()=>{te&&pe(s)},[te,s]);const[ie,le]=C.useState(Q(Z));C.useEffect(()=>{le(Q(Z))},[G.getLocale(f)]);const ce=ve=>{const Oe=ve.currentTarget.value;if(le(Oe),$(!0),Oe.trim()===""&&l)oe(null);else{const fe=q(Oe);n0e({date:fe,minDate:m,maxDate:v})&&(oe(fe),pe(fe))}},ye=ve=>{w==null||w(ve),$(!1),y&&le(Q(Z))},xe=ve=>{b==null||b(ve),$(!0)},Ce=ve=>{S==null||S(ve),$(!0)},se=ve=>({...d==null?void 0:d(ve),selected:_e(Z).isSame(ve,"day"),onClick:()=>{const Oe=H?x_(Z,ve):ve,fe=l&&B&&_e(Z).isSame(ve,"day")?null:Oe;oe(fe),!te&&le(Q(fe)),$(!1)}}),ue=T||(l&&Z&&!_?g.jsx(Va,{variant:"transparent",onMouseDown:ve=>ve.preventDefault(),tabIndex:-1,onClick:()=>{oe(null),!te&&le(""),$(!1)},unstyled:P,size:r.size||"sm",...c}):null);return cr(()=>{Z!==void 0&&!I&&le(Q(Z))},[Z]),g.jsxs(g.Fragment,{children:[g.jsx(wt.Wrapper,{...o,__staticSelector:"DateInput",children:g.jsxs(Mt,{opened:I,trapFocus:!1,position:"bottom-start",disabled:_,withRoles:!1,unstyled:P,...u,children:[g.jsx(Mt.Target,{children:g.jsx(wt,{"data-dates-input":!0,"data-read-only":_||void 0,autoComplete:"off",ref:e,value:ie,onChange:ce,onBlur:ye,onFocus:xe,onClick:Ce,readOnly:_,rightSection:ue,...r,...W,__staticSelector:"DateInput"})}),g.jsx(Mt.Dropdown,{onMouseDown:ve=>ve.preventDefault(),"data-dates-dropdown":!0,children:g.jsx(Ya,{__staticSelector:"DateInput",__timezoneApplied:!0,...j,classNames:A,styles:L,unstyled:P,__preventFocus:!0,minDate:m,maxDate:v,locale:f,getDayProps:se,size:r.size,date:ne,onDateChange:pe})})]})}),g.jsx(aM,{name:k,form:M,value:Z,type:"default"})]})});fM.classes={...wt.classes,...Ya.classes};fM.displayName="@mantine/dates/DateInput";var UB={timeWrapper:"m_208d2562",timeInput:"m_62ee059"};const o0e={dropdownType:"popover"},GB=ee((t,e)=>{const n=K("DateTimePicker",o0e,t),{value:r,defaultValue:o,onChange:s,valueFormat:i,locale:a,classNames:l,styles:c,unstyled:u,timeInputProps:d,submitButtonProps:f,withSeconds:h,level:p,defaultLevel:m,size:v,variant:y,dropdownType:b,vars:w,minDate:S,maxDate:_,...k}=n,M=be({name:"DateTimePicker",classes:UB,props:n,classNames:l,styles:c,unstyled:u,vars:w}),{resolvedClassNames:T,resolvedStyles:P}=Nr({classNames:l,styles:c,props:n}),A=i||(h?"DD/MM/YYYY HH:mm:ss":"DD/MM/YYYY HH:mm"),L=C.useRef(),V=wn(L,d==null?void 0:d.ref),{calendarProps:{allowSingleDateInRange:H,...z},others:N}=dM(k),D=Zn(),[F,I]=qu({type:"default",value:r,defaultValue:o,onChange:s}),$=le=>le?_e(le).format(h?"HH:mm:ss":"HH:mm"):"",[j,W]=C.useState($(F)),[G,X]=C.useState(p||m||"month"),[q,B]=sy(!1),Q=F?_e(F).locale(D.getLocale(a)).format(A):"",Z=le=>{var ye;(ye=d==null?void 0:d.onChange)==null||ye.call(d,le);const ce=le.currentTarget.value;if(W(ce),ce){const[xe,Ce,se]=ce.split(":").map(Number),ue=wo("add",new Date,D.getTimezone());ue.setHours(xe),ue.setMinutes(Ce),ue.setSeconds(se||0),I(x_(ue,F||wo("add",new Date,D.getTimezone())))}},oe=le=>{var ce;le&&I(x_(F,le)),(ce=L.current)==null||ce.focus()},te=le=>{var ce;(ce=d==null?void 0:d.onKeyDown)==null||ce.call(d,le),le.key==="Enter"&&(le.preventDefault(),B.close())};cr(()=>{q||W($(F))},[F,q]),cr(()=>{q&&X("month")},[q]);const ne=S?_e(S).format("HH:mm:ss"):null,pe=_?_e(_).format("HH:mm:ss"):null,ie=b==="popover";return g.jsxs(Cd,{formattedValue:Q,dropdownOpened:q,dropdownHandlers:B,classNames:T,styles:P,unstyled:u,ref:e,onClear:()=>I(null),shouldClear:!!F,value:F,size:v,variant:y,dropdownType:b,...N,type:"default",__staticSelector:"DateTimePicker",children:[g.jsx(yb,{...z,maxDate:_,minDate:S,size:v,variant:y,type:"default",value:F,defaultDate:F,onChange:oe,locale:a,classNames:T,styles:P,unstyled:u,__staticSelector:"DateTimePicker",__stopPropagation:ie,level:p,defaultLevel:m,onLevelChange:le=>{var ce;X(le),(ce=z.onLevelChange)==null||ce.call(z,le)},__timezoneApplied:!0}),G==="month"&&g.jsxs("div",{...M("timeWrapper"),children:[g.jsx(lM,{value:j,withSeconds:h,ref:V,unstyled:u,minTime:F&&S&&F.toDateString()===S.toDateString()?ne??void 0:void 0,maxTime:F&&_&&F.toDateString()===_.toDateString()?pe??void 0:void 0,...d,...M("timeInput",{className:d==null?void 0:d.className,style:d==null?void 0:d.style}),onChange:Z,onKeyDown:te,size:v,"data-mantine-stop-propagation":ie||void 0}),g.jsx(Ze,{variant:"default",size:`input-${v||"sm"}`,...M("submitButton",{className:f==null?void 0:f.className,style:f==null?void 0:f.style}),unstyled:u,"data-mantine-stop-propagation":ie||void 0,children:g.jsx(by,{size:"30%"}),...f,onClick:le=>{var ce;(ce=f==null?void 0:f.onClick)==null||ce.call(f,le),B.close()}})]})]})});GB.classes={...UB,...Cd.classes,...yb.classes};GB.displayName="@mantine/dates/DateTimePicker";function s0e({type:t,value:e,defaultValue:n,onChange:r,locale:o,format:s,closeOnChange:i,sortDates:a,labelSeparator:l,valueFormatter:c}){const u=Zn(),[d,f]=sy(!1),[h,p]=qu({type:t,value:e,defaultValue:n,onChange:r}),m=cve({type:t,date:h,locale:u.getLocale(o),format:s,labelSeparator:u.getLabelSeparator(l),formatter:c}),v=w=>{i&&(t==="default"&&f.close(),t==="range"&&w[0]&&w[1]&&f.close()),p(a&&t==="multiple"?[...w].sort((S,_)=>S.getTime()-_.getTime()):w)},y=()=>v(t==="range"?[null,null]:t==="multiple"?[]:null),b=t==="range"?!!h[0]:t==="multiple"?h.length>0:h!==null;return{_value:h,setValue:v,onClear:y,shouldClear:b,formattedValue:m,dropdownOpened:d,dropdownHandlers:f}}const i0e={type:"default",valueFormat:"YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},KB=ee((t,e)=>{const n=K("YearPickerInput",i0e,t),{type:r,value:o,defaultValue:s,onChange:i,valueFormat:a,labelSeparator:l,locale:c,classNames:u,styles:d,unstyled:f,closeOnChange:h,size:p,variant:m,dropdownType:v,sortDates:y,minDate:b,maxDate:w,vars:S,valueFormatter:_,...k}=n,{resolvedClassNames:M,resolvedStyles:T}=Nr({classNames:u,styles:d,props:n}),{calendarProps:P,others:A}=dM(k),L=Zn(),{_value:V,setValue:H,formattedValue:z,dropdownHandlers:N,dropdownOpened:D,onClear:F,shouldClear:I}=s0e({type:r,value:o,defaultValue:s,onChange:i,locale:c,format:a,labelSeparator:l,closeOnChange:h,sortDates:y,valueFormatter:_});return g.jsx(Cd,{formattedValue:z,dropdownOpened:D,dropdownHandlers:N,classNames:M,styles:T,unstyled:f,ref:e,onClear:F,shouldClear:I,value:V,size:p,variant:m,dropdownType:v,...A,type:r,__staticSelector:"YearPickerInput",children:g.jsx(vb,{...P,size:p,variant:m,type:r,value:V,defaultDate:Array.isArray(V)?V[0]||rI({maxDate:w,minDate:b,timezone:L.getTimezone()}):V||rI({maxDate:w,minDate:b,timezone:L.getTimezone()}),onChange:H,locale:c,classNames:M,styles:T,unstyled:f,__staticSelector:"YearPickerInput",__stopPropagation:v==="popover",minDate:b,maxDate:w,date:wo("add",P.date,L.getTimezone()),__timezoneApplied:!0})})});KB.classes={...Cd.classes,...vb.classes};KB.displayName="@mantine/dates/YearPickerInput";const bu=t=>{var e,n,r,o;return(o=(e=t.id)!==null&&e!==void 0?e:(r=(n=t.accessorKey)===null||n===void 0?void 0:n.toString)===null||r===void 0?void 0:r.call(n))!==null&&o!==void 0?o:t.header},Nv=t=>{const e=[],n=r=>{r.forEach(o=>{o.columns?n(o.columns):e.push(o)})};return n(t),e},YB=({columnDefs:t,tableOptions:e})=>{const{aggregationFns:n={},defaultDisplayColumn:r,filterFns:o={},sortingFns:s={},state:{columnFilterFns:i={}}={}}=e;return t.map(a=>{var l,c;if(a.id||(a.id=bu(a)),a.columnDefType||(a.columnDefType="data"),!((l=a.columns)===null||l===void 0)&&l.length)a.columnDefType="group",a.columns=YB({columnDefs:a.columns,tableOptions:e});else if(a.columnDefType==="data"){if(Array.isArray(a.aggregationFn)){const u=a.aggregationFn;a.aggregationFn=(d,f,h)=>u.map(p=>{var m;return(m=n[p])===null||m===void 0?void 0:m.call(n,d,f,h)})}Object.keys(o).includes(i[a.id])&&(a.filterFn=(c=o[i[a.id]])!==null&&c!==void 0?c:o.fuzzy,a._filterFn=i[a.id]),Object.keys(s).includes(a.sortingFn)&&(a.sortingFn=s[a.sortingFn])}else a.columnDefType==="display"&&(a=Object.assign(Object.assign({},r),a));return a})},qB=(t,e,n)=>{t.getCanPin()&&t.pin(e.getIsPinned());const r=[...n];return r.splice(r.indexOf(e.id),0,r.splice(r.indexOf(t.id),1)[0]),r},a0e=t=>{const{filterVariant:e}=t;return e==="multi-select"?"arrIncludesSome":e!=null&&e.includes("range")?"betweenInclusive":["checkbox","date","select"].includes(e||"")?"equals":"fuzzy"},l0e=(t,e,n=-1,r=0,o,s)=>Sp(t,"mrt-row-create",e??Object.assign({},...Nv(t.options.columns).map(i=>({[bu(i)]:""}))),n,r,o,s);function vc({header:t,id:e,size:n,tableOptions:r}){const{defaultDisplayColumn:o,displayColumnDefOptions:s,localization:i}=r;return Object.assign(Object.assign(Object.assign(Object.assign({},o),{header:t?i[t]:"",size:n}),s==null?void 0:s[e]),{id:e})}const XB=t=>{const{enableRowPinning:e,rowPinningDisplayMode:n}=t;return!!(e&&!(n!=null&&n.startsWith("select")))},JB=t=>{const{enableRowDragging:e,enableRowOrdering:n}=t;return!!(e||n)},hM=t=>{const{enableExpanding:e,enableGrouping:n,renderDetailPanel:r,state:{grouping:o}}=t;return!!(e||n&&(o!=null&&o.length)||r)},pM=t=>{const{createDisplayMode:e,editDisplayMode:n,enableEditing:r,enableRowActions:o,state:{creatingRow:s}}=t;return!!(o||s&&e==="row"||r&&["modal","row"].includes(n??""))},QB=t=>!!t.enableRowSelection,ZB=t=>!!t.enableRowNumbers,e6=t=>t.layoutMode==="grid-no-grow",c0e=t=>[XB(t)&&"mrt-row-pin",JB(t)&&"mrt-row-drag",t.positionActionsColumn==="first"&&pM(t)&&"mrt-row-actions",t.positionExpandColumn==="first"&&hM(t)&&"mrt-row-expand",QB(t)&&"mrt-row-select",ZB(t)&&"mrt-row-numbers"].filter(Boolean),u0e=t=>[t.positionActionsColumn==="last"&&pM(t)&&"mrt-row-actions",t.positionExpandColumn==="last"&&hM(t)&&"mrt-row-expand",e6(t)&&"mrt-row-spacer"].filter(Boolean),mM=(t,e=!1)=>{const{state:{columnOrder:n=[]}}=t,r=c0e(t),o=u0e(t),s=Nv(t.columns).map(a=>bu(a));let i=e?s:Array.from(new Set([...n,...s]));return i=i.filter(a=>!r.includes(a)&&!o.includes(a)),[...r,...i,...o]},d0e=(t,e,n)=>{let r=0;return t.columnFiltersMeta[n]&&(r=Yge(t.columnFiltersMeta[n],e.columnFiltersMeta[n])),r===0?ml.alphanumeric(t,e,n):r},f0e=Object.assign(Object.assign({},ml),{fuzzy:d0e}),h0e=(t,e)=>Math.max(...Object.values(e.columnFiltersMeta).map(n=>n.rank))-Math.max(...Object.values(t.columnFiltersMeta).map(n=>n.rank)),Se=(t,e)=>t instanceof Function?t(e):t,t6=(t,e)=>{const{getCenterRows:n,getPrePaginationRowModel:r,getRowModel:o,getState:s,getTopRows:i,options:{createDisplayMode:a,enablePagination:l,enableRowPinning:c,manualPagination:u,positionCreatingRow:d,rowPinningDisplayMode:f}}=t,{creatingRow:h,pagination:p}=s(),m=p0e(t);let v=[];if(!m)v=!c||f!=null&&f.includes("sticky")?e?r().rows:o().rows:n();else{if(v=r().rows.sort((y,b)=>h0e(y,b)),l&&!u&&!e){const y=p.pageIndex*p.pageSize;v=v.slice(y,y+p.pageSize)}c&&!(f!=null&&f.includes("sticky"))&&(v=v.filter(y=>!y.getIsPinned()))}if(c&&(f!=null&&f.includes("sticky"))){const y=v.filter(b=>b.getIsPinned()).map(b=>b.id);v=[...i().filter(b=>!y.includes(b.id)),...v]}if(d!==void 0&&h&&a==="row"){const y=isNaN(+d)?d==="top"?0:v.length:+d;v=[...v.slice(0,y),h,...v.slice(y)]}return v},n6=t=>{const{getState:e,options:{enableGlobalFilterRankedResults:n,manualExpanding:r,manualFiltering:o,manualGrouping:s,manualSorting:i}}=t,{expanded:a,globalFilterFn:l}=e();return!r&&!o&&!s&&!i&&n&&l==="fuzzy"&&a!==!0&&!Object.values(a).some(Boolean)},p0e=t=>{const{globalFilter:e,sorting:n}=t.getState();return n6(t)&&e&&!Object.values(n).some(Boolean)},Lv=({row:t,table:e})=>{const{options:{enableRowSelection:n}}=e;return t.getIsSelected()||Se(n,t)&&t.getCanSelectSubRows()&&t.getIsAllSubRowsSelected()},m0e=({renderedRowIndex:t=0,row:e,table:n})=>(r,o)=>{var s;const{getState:i,options:{enableBatchRowSelection:a,enableMultiRowSelection:l,enableRowPinning:c,manualPagination:u,rowPinningDisplayMode:d},refs:{lastSelectedRowId:f}}=n,{pagination:{pageIndex:h,pageSize:p}}=i(),m=u?0:p*h,v=Lv({row:e,table:n});e.toggleSelected(o??!v);const y=new Set([e.id]);if(a&&l&&r.nativeEvent.shiftKey&&f.current!==null){const b=t6(n,!0),w=b.findIndex(S=>S.id===f.current);if(w!==-1){const S=Lv({row:b==null?void 0:b[w],table:n}),_=t+m,[k,M]=w<_?[w,_]:[_,w];if(v!==S)for(let T=k;T<=M;T++)b[T].toggleSelected(!v),y.add(b[T].id)}}f.current=e.id,e.getCanSelectSubRows()&&e.getIsAllSubRowsSelected()&&((s=e.subRows)===null||s===void 0||s.forEach(b=>b.toggleSelected(!1))),c&&(d!=null&&d.includes("select"))&&y.forEach(b=>{n.getRow(b).pin(v?!1:d!=null&&d.includes("bottom")?"bottom":"top")})},r6=({table:t})=>(e,n,r)=>{const{options:{enableRowPinning:o,rowPinningDisplayMode:s,selectAllMode:i},refs:{lastSelectedRowId:a}}=t;i==="all"||r?t.toggleAllRowsSelected(n??e.target.checked):t.toggleAllPageRowsSelected(n??e.target.checked),o&&(s!=null&&s.includes("select"))&&t.setRowPinning({bottom:[],top:[]}),a.current=null},qo=t=>t.replace(/[^a-zA-Z0-9]/g,"_"),g0e=t=>{var e,n;return typeof t.primaryShade=="number"?t.primaryShade:(n=(e=t.primaryShade)===null||e===void 0?void 0:e.dark)!==null&&n!==void 0?n:7},v0e=(t,e)=>t.colors[t.primaryColor][e??g0e(t)];function jv(t,e){const n=`data-${t}`;switch(typeof e){case"boolean":return e?{[n]:""}:null;case"number":return{[n]:`${e}`};case"string":return{[n]:e};default:return null}}const y0e=Object.assign({},Rg),o6=(t,e,n,r)=>{const o=Uge(t.getValue(e),n,{threshold:or.MATCHES});return r(o),o.passed};o6.autoRemove=t=>!t;const s6=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().includes(n.toString().toLowerCase().trim());s6.autoRemove=t=>!t;const i6=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().startsWith(n.toString().toLowerCase().trim());i6.autoRemove=t=>!t;const a6=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().endsWith(n.toString().toLowerCase().trim());a6.autoRemove=t=>!t;const bb=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim()===(n==null?void 0:n.toString().toLowerCase().trim());bb.autoRemove=t=>!t;const l6=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim()!==n.toString().toLowerCase().trim();l6.autoRemove=t=>!t;const wb=(t,e,n)=>!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)>+n:t.getValue(e).toString().toLowerCase().trim()>(n==null?void 0:n.toString().toLowerCase().trim());wb.autoRemove=t=>!t;const gM=(t,e,n)=>bb(t,e,n)||wb(t,e,n);gM.autoRemove=t=>!t;const xb=(t,e,n)=>!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)<+n:t.getValue(e).toString().toLowerCase().trim()<(n==null?void 0:n.toString().toLowerCase().trim());xb.autoRemove=t=>!t;const vM=(t,e,n)=>bb(t,e,n)||xb(t,e,n);vM.autoRemove=t=>!t;const c6=(t,e,n)=>(["",void 0].includes(n[0])||wb(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||xb(t,e,n[1]));c6.autoRemove=t=>!t;const u6=(t,e,n)=>(["",void 0].includes(n[0])||gM(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||vM(t,e,n[1]));u6.autoRemove=t=>!t;const d6=(t,e,n)=>!t.getValue(e).toString().trim();d6.autoRemove=t=>!t;const f6=(t,e,n)=>!!t.getValue(e).toString().trim();f6.autoRemove=t=>!t;const b0e=Object.assign(Object.assign({},xs),{between:c6,betweenInclusive:u6,contains:s6,empty:d6,endsWith:a6,equals:bb,fuzzy:o6,greaterThan:wb,greaterThanOrEqualTo:gM,lessThan:xb,lessThanOrEqualTo:vM,notEmpty:f6,notEquals:l6,startsWith:i6});function yM(t,e){var n;if(!e)return"";const r=`filter${e[0].toUpperCase()}${e.slice(1)}`;return(n=t[r])!==null&&n!==void 0?n:""}function Ve(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}var w0e={root:"MRT_EditActionButtons-module_root__BfxVZ"};const h6=t=>{var{row:e,table:n,variant:r="icon"}=t,o=Ve(t,["row","table","variant"]);const{getState:s,options:{icons:{IconCircleX:i,IconDeviceFloppy:a},localization:l,onCreatingRowCancel:c,onCreatingRowSave:u,onEditingRowCancel:d,onEditingRowSave:f},refs:{editInputRefs:h},setCreatingRow:p,setEditingRow:m}=n,{creatingRow:v,editingRow:y,isSaving:b}=s(),w=(v==null?void 0:v.id)===e.id,S=(y==null?void 0:y.id)===e.id,_=()=>{w?(c==null||c({row:e,table:n}),p(null)):S&&(d==null||d({row:e,table:n}),m(null)),e._valuesCache={}},k=()=>{var M;(M=Object.values(h==null?void 0:h.current).filter(T=>{var P,A;return e.id===((A=(P=T==null?void 0:T.name)===null||P===void 0?void 0:P.split("_"))===null||A===void 0?void 0:A[0])}))===null||M===void 0||M.forEach(T=>{T.value!==void 0&&Object.hasOwn(e==null?void 0:e._valuesCache,T.name)&&(e._valuesCache[T.name]=T.value)}),w?u==null||u({exitCreatingMode:()=>p(null),row:e,table:n,values:e._valuesCache}):S&&(f==null||f({exitEditingMode:()=>m(null),row:e,table:n,values:e==null?void 0:e._valuesCache}))};return g.jsx(J,Object.assign({className:De("mrt-edit-action-buttons",w0e.root),onClick:M=>M.stopPropagation()},o,{children:r==="icon"?g.jsxs(g.Fragment,{children:[g.jsx(ut,{label:l.cancel,withinPortal:!0,children:g.jsx(Ze,{"aria-label":l.cancel,color:"red",onClick:_,variant:"subtle",children:g.jsx(i,{})})}),g.jsx(ut,{label:l.save,withinPortal:!0,children:g.jsx(Ze,{"aria-label":l.save,color:"blue",loading:b,onClick:k,variant:"subtle",children:g.jsx(a,{})})})]}):g.jsxs(g.Fragment,{children:[g.jsx(Uo,{onClick:_,variant:"subtle",children:l.cancel}),g.jsx(Uo,{loading:b,onClick:k,variant:"filled",children:l.save})]})}))},x0e=t=>{var{handleEdit:e,row:n,table:r}=t,o=Ve(t,["handleEdit","row","table"]);const{options:{editDisplayMode:s,enableEditing:i,icons:{IconDots:a,IconEdit:l},localization:c,positionActionsColumn:u,renderRowActionMenuItems:d}}=r;return g.jsxs(We,{closeOnItemClick:!0,position:u==="first"?"bottom-start":u==="last"?"bottom-end":void 0,withinPortal:!0,children:[g.jsx(ut,{label:c.rowActions,openDelay:1e3,withinPortal:!0,children:g.jsx(We.Target,{children:g.jsx(Ze,Object.assign({"aria-label":c.rowActions,color:"gray",onClick:f=>f.stopPropagation(),size:"sm",variant:"subtle"},o,{children:g.jsx(a,{})}))})}),g.jsxs(We.Dropdown,{onClick:f=>f.stopPropagation(),children:[i&&s!=="table"&&g.jsx(We.Item,{leftSection:g.jsx(l,{}),onClick:e,children:c.edit}),d==null?void 0:d({row:n,table:r})]})]})},S0e=({cell:t,row:e,table:n})=>{const{getState:r,options:{createDisplayMode:o,editDisplayMode:s,enableEditing:i,icons:{IconEdit:a},localization:{edit:l},renderRowActionMenuItems:c,renderRowActions:u},setEditingRow:d}=n,{creatingRow:f,editingRow:h}=r(),p=(f==null?void 0:f.id)===e.id,m=(h==null?void 0:h.id)===e.id,v=b=>{b.stopPropagation(),d(Object.assign({},e))},y=p&&o==="row"||m&&s==="row";return g.jsx(g.Fragment,{children:u&&!y?u({cell:t,row:e,table:n}):y?g.jsx(h6,{row:e,table:n}):!c&&Se(i,e)?g.jsx(ut,{label:l,openDelay:1e3,position:"right",withinPortal:!0,children:g.jsx(Ze,{"aria-label":l,color:"gray",disabled:!!h&&h.id!==e.id,onClick:v,size:"md",variant:"subtle",children:g.jsx(a,{})})}):c?g.jsx(x0e,{handleEdit:v,row:e,table:n}):null})},_0e=t=>Object.assign({Cell:({cell:e,row:n,table:r})=>g.jsx(S0e,{cell:e,row:n,table:r})},vc({header:"actions",id:"mrt-row-actions",size:70,tableOptions:t}));var C0e={"grab-icon":"MRT_GrabHandleButton-module_grab-icon__mQimy"};const bM=({actionIconProps:t,onDragEnd:e,onDragStart:n,table:{options:{icons:{IconGripHorizontal:r},localization:{move:o}}}})=>{var s,i;return g.jsx(ut,{label:(s=t==null?void 0:t.title)!==null&&s!==void 0?s:o,openDelay:1e3,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":(i=t==null?void 0:t.title)!==null&&i!==void 0?i:o,draggable:!0},t,{className:De("mrt-grab-handle-button",C0e["grab-icon"],t==null?void 0:t.className),color:"gray",onClick:a=>{var l;a.stopPropagation(),(l=t==null?void 0:t.onClick)===null||l===void 0||l.call(t,a)},onDragEnd:e,onDragStart:n,title:void 0,variant:"transparent",children:g.jsx(r,{})}))})},k0e=t=>{var{row:e,rowRef:n,table:r}=t,o=Ve(t,["row","rowRef","table"]);const{options:{mantineRowDragHandleProps:s}}=r,i=Object.assign(Object.assign({},Se(s,{row:e,table:r})),o),a=c=>{var u;(u=i==null?void 0:i.onDragStart)===null||u===void 0||u.call(i,c),c.dataTransfer.setDragImage(n.current,0,0),r.setDraggingRow(e)},l=c=>{var u;(u=i==null?void 0:i.onDragEnd)===null||u===void 0||u.call(i,c),r.setDraggingRow(null),r.setHoveredRow(null)};return g.jsx(bM,{actionIconProps:i,onDragEnd:l,onDragStart:a,table:r})},E0e=t=>Object.assign({Cell:({row:e,rowRef:n,table:r})=>g.jsx(k0e,{row:e,rowRef:n,table:r}),grow:!1},vc({header:"move",id:"mrt-row-drag",size:60,tableOptions:t}));var jm={root:"MRT_ExpandAllButton-module_root__gkBZD",chevron:"MRT_ExpandAllButton-module_chevron__Iep0j",up:"MRT_ExpandAllButton-module_up__Xth3U",right:"MRT_ExpandAllButton-module_right__bS4L-"};const M0e=t=>{var e,n,{table:r}=t,o=Ve(t,["table"]);const{getCanSomeRowsExpand:s,getIsAllRowsExpanded:i,getIsSomeRowsExpanded:a,getState:l,options:{icons:{IconChevronsDown:c},localization:u,mantineExpandAllButtonProps:d,renderDetailPanel:f},toggleAllRowsExpanded:h}=r,{density:p,isLoading:m}=l(),v=Object.assign(Object.assign({},Se(d,{table:r})),o),y=i();return g.jsx(ut,{label:((e=v==null?void 0:v.title)!==null&&e!==void 0?e:y)?u.collapseAll:u.expandAll,openDelay:1e3,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":u.expandAll,color:"gray",variant:"subtle"},v,{className:De("mrt-expand-all-button",jm.root,v==null?void 0:v.className,p),disabled:m||!f&&!s(),onClick:()=>h(!y),title:void 0,children:(n=v==null?void 0:v.children)!==null&&n!==void 0?n:g.jsx(c,{className:De(jm.chevron,y?jm.up:a()?jm.right:void 0)})}))})};var ef={root:"MRT_ExpandButton-module_root__IFYio","root-ltr":"MRT_ExpandButton-module_root-ltr__FHNnp",chevron:"MRT_ExpandButton-module_chevron__XzC5P",right:"MRT_ExpandButton-module_right__-pC-A",up:"MRT_ExpandButton-module_up__TZGBo","root-rtl":"MRT_ExpandButton-module_root-rtl__zoudS"};const iI=t=>{var e,n,{row:r,table:o}=t,s=Ve(t,["row","table"]);const i=Lr(),{options:{icons:{IconChevronDown:a},localization:l,mantineExpandButtonProps:c,positionExpandColumn:u,renderDetailPanel:d}}=o,f=Object.assign(Object.assign({},Se(c,{row:r,table:o})),s),h=r.getCanExpand(),p=r.getIsExpanded(),m=!!(d!=null&&d({row:r,table:o})),v=b=>{var w;b.stopPropagation(),r.toggleExpanded(),(w=f==null?void 0:f.onClick)===null||w===void 0||w.call(f,b)},y=i.dir==="rtl"||u==="last";return g.jsx(ut,{disabled:!h&&!m,label:((e=f==null?void 0:f.title)!==null&&e!==void 0?e:p)?l.collapse:l.expand,openDelay:1e3,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":l.expand,color:"gray",disabled:!h&&!m,variant:"subtle"},f,{__vars:{"--mrt-row-depth":`${r.depth}`},className:De("mrt-expand-button",ef.root,ef[`root-${y?"rtl":"ltr"}`],f==null?void 0:f.className),onClick:v,title:void 0,children:(n=f==null?void 0:f.children)!==null&&n!==void 0?n:g.jsx(a,{className:De("mrt-expand-button-chevron",ef.chevron,!h&&!d?ef.right:p?ef.up:void 0)})}))})},T0e=t=>{var e;const{defaultColumn:n,enableExpandAll:r,groupedColumnMode:o,positionExpandColumn:s,renderDetailPanel:i,state:{grouping:a}}=t,l=s==="last"?{align:"right"}:void 0;return Object.assign({Cell:({cell:c,column:u,row:d,table:f})=>{var h,p,m;const v={row:d,table:f},y=(h=d.subRows)===null||h===void 0?void 0:h.length;return t.groupedColumnMode==="remove"&&d.groupingColumnId?g.jsxs(tn,{align:"center",gap:"0.25rem",children:[g.jsx(iI,Object.assign({},v)),g.jsx(ut,{label:f.getColumn(d.groupingColumnId).columnDef.header,openDelay:1e3,position:"right",children:g.jsx("span",{children:d.groupingValue})}),!!y&&g.jsxs("span",{children:["(",y,")"]})]}):g.jsxs(g.Fragment,{children:[g.jsx(iI,Object.assign({},v)),(m=(p=u.columnDef).GroupedCell)===null||m===void 0?void 0:m.call(p,{cell:c,column:u,row:d,table:f})]})},Header:r?({table:c})=>{var u;return g.jsxs(tn,{align:"center",children:[g.jsx(M0e,{table:c}),o==="remove"&&((u=a==null?void 0:a.map(d=>c.getColumn(d).columnDef.header))===null||u===void 0?void 0:u.join(", "))]})}:void 0,mantineTableBodyCellProps:l,mantineTableHeadCellProps:l},vc({header:"expand",id:"mrt-row-expand",size:o==="remove"?(e=n==null?void 0:n.size)!==null&&e!==void 0?e:180:i?r?60:70:100,tableOptions:t}))},R0e=t=>{const{localization:e,rowNumberDisplayMode:n}=t,{pagination:{pageIndex:r,pageSize:o}}=t.state;return Object.assign({Cell:({renderedRowIndex:s=0,row:i})=>{var a;return((a=n==="static"?s+o*r:i.index)!==null&&a!==void 0?a:0)+1},Header:()=>e.rowNumber,grow:!1},vc({header:"rowNumbers",id:"mrt-row-numbers",size:50,tableOptions:t}))},Rw=t=>{var{pinningPosition:e,row:n,table:r}=t,o=Ve(t,["pinningPosition","row","table"]);const{options:{icons:{IconPinned:s,IconX:i},localization:a,rowPinningDisplayMode:l}}=r,c=n.getIsPinned(),[u,d]=C.useState(!1),f=h=>{d(!1),h.stopPropagation(),n.pin(c?!1:e)};return g.jsx(ut,{label:c?a.unpin:a.pin,openDelay:1e3,opened:u,children:g.jsx(Ze,Object.assign({"aria-label":a.pin,color:"gray",onClick:f,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),size:"xs",style:{height:"24px",width:"24px"},variant:"subtle"},o,{children:c?g.jsx(i,{}):g.jsx(s,{fontSize:"small",style:{transform:`rotate(${l==="sticky"?135:e==="top"?180:0}deg)`}})}))})},O0e=t=>{var{row:e,table:n}=t,r=Ve(t,["row","table"]);const{getState:o,options:{enableRowPinning:s,rowPinningDisplayMode:i}}=n,{density:a}=o();if(!Se(s,e))return null;const c=Object.assign({row:e,table:n},r);return i==="top-and-bottom"&&!e.getIsPinned()?g.jsxs(J,{style:{display:"flex",flexDirection:a==="xs"?"row":"column"},children:[g.jsx(Rw,Object.assign({pinningPosition:"top"},c)),g.jsx(Rw,Object.assign({pinningPosition:"bottom"},c))]}):g.jsx(Rw,Object.assign({pinningPosition:i==="bottom"?"bottom":"top"},c))},P0e=t=>Object.assign({Cell:({row:e,table:n})=>g.jsx(O0e,{row:e,table:n}),grow:!1},vc({header:"pin",id:"mrt-row-pin",size:60,tableOptions:t})),S_=t=>{var e,{renderedRowIndex:n=0,row:r,table:o}=t,s=Ve(t,["renderedRowIndex","row","table"]);const{getState:i,options:{enableMultiRowSelection:a,localization:l,mantineSelectAllCheckboxProps:c,mantineSelectCheckboxProps:u,selectAllMode:d,selectDisplayMode:f}}=o,{density:h,isLoading:p}=i(),m=!r,v=m?d==="page"?o.getIsAllPageRowsSelected():o.getIsAllRowsSelected():void 0,y=m?v:Lv({row:r,table:o}),b=Object.assign(Object.assign({},m?Se(c,{table:o}):Se(u,{row:r,table:o})),s),w=r?m0e({renderedRowIndex:n,row:r,table:o}):void 0,S=r6({table:o}),_=Object.assign(Object.assign({"aria-label":m?l.toggleSelectAll:l.toggleSelectRow,checked:y,disabled:p||r&&!r.getCanSelect()||(r==null?void 0:r.id)==="mrt-row-create",onChange:k=>{k.stopPropagation(),m?S(k):w(k)},size:h==="xs"?"sm":"md"},b),{onClick:k=>{var M;k.stopPropagation(),(M=b==null?void 0:b.onClick)===null||M===void 0||M.call(b,k)},title:void 0});return g.jsx(ut,{label:(e=b==null?void 0:b.title)!==null&&e!==void 0?e:m?l.toggleSelectAll:l.toggleSelectRow,openDelay:1e3,withinPortal:!0,children:g.jsx("span",{children:f==="switch"?g.jsx(pp,Object.assign({},_)):f==="radio"||a===!1?g.jsx(bd,Object.assign({},_)):g.jsx(pc,Object.assign({indeterminate:!y&&m?o.getIsSomeRowsSelected():(r==null?void 0:r.getIsSomeSelected())&&r.getCanSelectSubRows()},_))})})},A0e=t=>{const{enableMultiRowSelection:e,enableSelectAll:n}=t;return Object.assign({Cell:({renderedRowIndex:r,row:o,table:s})=>g.jsx(S_,{renderedRowIndex:r,row:o,table:s}),Header:n&&e?({table:r})=>g.jsx(S_,{table:r}):void 0,grow:!1},vc({header:"select",id:"mrt-row-select",size:n?60:70,tableOptions:t}))},D0e={IconArrowAutofitContent:mue,IconArrowsSort:gue,IconBaselineDensityLarge:vue,IconBaselineDensityMedium:yue,IconBaselineDensitySmall:bue,IconBoxMultiple:wue,IconChevronDown:xue,IconChevronLeft:_ue,IconChevronLeftPipe:Sue,IconChevronRight:kue,IconChevronRightPipe:Cue,IconChevronsDown:Eue,IconCircleX:Mue,IconClearAll:Tue,IconColumns:Rue,IconDeviceFloppy:Oue,IconDots:Aue,IconDotsVertical:Pue,IconEdit:Due,IconEyeOff:Iue,IconFilter:jue,IconFilterCog:Nue,IconFilterOff:Lue,IconGripHorizontal:$ue,IconMaximize:Fue,IconMinimize:zue,IconPinned:Vue,IconPinnedOff:Bue,IconSearch:Wue,IconSearchOff:Hue,IconSortAscending:Uue,IconSortDescending:Gue,IconX:Kue},I0e={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSelection:"Clear selection",clearSort:"Clear sort",clickToCopy:"Click to copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pin:"Pin",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all"},N0e={filterVariant:"text",maxSize:1e3,minSize:40,size:180},p6={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},L0e=t=>{var e,{aggregationFns:n,autoResetExpanded:r=!1,columnFilterDisplayMode:o="subheader",columnResizeDirection:s,columnResizeMode:i="onChange",createDisplayMode:a="modal",defaultColumn:l,defaultDisplayColumn:c,editDisplayMode:u="modal",enableBatchRowSelection:d=!0,enableBottomToolbar:f=!0,enableColumnActions:h=!0,enableColumnFilters:p=!0,enableColumnOrdering:m=!1,enableColumnPinning:v=!1,enableColumnResizing:y=!1,enableColumnVirtualization:b,enableDensityToggle:w=!0,enableExpandAll:S=!0,enableExpanding:_,enableFacetedValues:k=!1,enableFilterMatchHighlighting:M=!0,enableFilters:T=!0,enableFullScreenToggle:P=!0,enableGlobalFilter:A=!0,enableGlobalFilterRankedResults:L=!0,enableGrouping:V=!1,enableHiding:H=!0,enableMultiRowSelection:z=!0,enableMultiSort:N=!0,enablePagination:D=!0,enableRowPinning:F=!1,enableRowSelection:I=!1,enableRowVirtualization:$,enableSelectAll:j=!0,enableSorting:W=!0,enableStickyHeader:G=!1,enableTableFooter:X=!0,enableTableHead:q=!0,enableToolbarInternalActions:B=!0,enableTopToolbar:Q=!0,filterFns:Z,icons:oe,layoutMode:te,localization:ne,manualFiltering:pe,manualGrouping:ie,manualPagination:le,manualSorting:ce,paginationDisplayMode:ye="default",positionActionsColumn:xe="first",positionCreatingRow:Ce="top",positionExpandColumn:se="first",positionGlobalFilter:ue="right",positionPagination:ve="bottom",positionToolbarAlertBanner:Oe="top",positionToolbarDropZone:fe="top",rowNumberDisplayMode:Me="static",rowPinningDisplayMode:Ie="sticky",selectAllMode:Be="page",sortingFns:et}=t,mt=Ve(t,["aggregationFns","autoResetExpanded","columnFilterDisplayMode","columnResizeDirection","columnResizeMode","createDisplayMode","defaultColumn","defaultDisplayColumn","editDisplayMode","enableBatchRowSelection","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnPinning","enableColumnResizing","enableColumnVirtualization","enableDensityToggle","enableExpandAll","enableExpanding","enableFacetedValues","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enableRowPinning","enableRowSelection","enableRowVirtualization","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","paginationDisplayMode","positionActionsColumn","positionCreatingRow","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberDisplayMode","rowPinningDisplayMode","selectAllMode","sortingFns"]);const Ue=Lr();return oe=C.useMemo(()=>Object.assign(Object.assign({},D0e),oe),[oe]),ne=C.useMemo(()=>Object.assign(Object.assign({},I0e),ne),[ne]),n=C.useMemo(()=>Object.assign(Object.assign({},y0e),n),[]),Z=C.useMemo(()=>Object.assign(Object.assign({},b0e),Z),[]),et=C.useMemo(()=>Object.assign(Object.assign({},f0e),et),[]),l=C.useMemo(()=>Object.assign(Object.assign({},N0e),l),[l]),c=C.useMemo(()=>Object.assign(Object.assign({},p6),c),[c]),[b,$]=C.useMemo(()=>[b,$],[]),s||(s=Ue.dir||"ltr"),te=te||(y?"grid-no-grow":"semantic"),te==="semantic"&&($||b)&&(te="grid"),$&&(G=!0),D===!1&&le===void 0&&(le=!0),!((e=mt.data)===null||e===void 0)&&e.length||(pe=!0,ie=!0,le=!0,ce=!0),Object.assign({aggregationFns:n,autoResetExpanded:r,columnFilterDisplayMode:o,columnResizeDirection:s,columnResizeMode:i,createDisplayMode:a,defaultColumn:l,defaultDisplayColumn:c,editDisplayMode:u,enableBatchRowSelection:d,enableBottomToolbar:f,enableColumnActions:h,enableColumnFilters:p,enableColumnOrdering:m,enableColumnPinning:v,enableColumnResizing:y,enableColumnVirtualization:b,enableDensityToggle:w,enableExpandAll:S,enableExpanding:_,enableFacetedValues:k,enableFilterMatchHighlighting:M,enableFilters:T,enableFullScreenToggle:P,enableGlobalFilter:A,enableGlobalFilterRankedResults:L,enableGrouping:V,enableHiding:H,enableMultiRowSelection:z,enableMultiSort:N,enablePagination:D,enableRowPinning:F,enableRowSelection:I,enableRowVirtualization:$,enableSelectAll:j,enableSorting:W,enableStickyHeader:G,enableTableFooter:X,enableTableHead:q,enableToolbarInternalActions:B,enableTopToolbar:Q,filterFns:Z,getCoreRowModel:Rge(),getExpandedRowModel:_||V?Oge():void 0,getFacetedMinMaxValues:k?Pge():void 0,getFacetedRowModel:k?Ige():void 0,getFacetedUniqueValues:k?Nge():void 0,getFilteredRowModel:p||A||T?Lge():void 0,getGroupedRowModel:V?jge():void 0,getPaginationRowModel:D?Fge():void 0,getSortedRowModel:W?zge():void 0,getSubRows:lt=>lt==null?void 0:lt.subRows,icons:oe,layoutMode:te,localization:ne,manualFiltering:pe,manualGrouping:ie,manualPagination:le,manualSorting:ce,paginationDisplayMode:ye,positionActionsColumn:xe,positionCreatingRow:Ce,positionExpandColumn:se,positionGlobalFilter:ue,positionPagination:ve,positionToolbarAlertBanner:Oe,positionToolbarDropZone:fe,rowNumberDisplayMode:Me,rowPinningDisplayMode:Ie,selectAllMode:Be,sortingFns:et},mt)},Ow={children:null,style:{minWidth:0,padding:0,width:0}},j0e=t=>Object.assign(Object.assign(Object.assign(Object.assign({},vc({id:"mrt-row-spacer",size:0,tableOptions:t})),{grow:!0}),p6),{mantineTableBodyCellProps:Ow,mantineTableFooterCellProps:Ow,mantineTableHeadCellProps:Ow}),$0e=t=>{const{getIsSomeRowsPinned:e,getPrePaginationRowModel:n,getState:r,options:{enablePagination:o,enableRowPinning:s,rowCount:i}}=t,{columnOrder:a,density:l,globalFilter:c,isFullScreen:u,isLoading:d,pagination:f,showSkeletons:h,sorting:p}=r(),m=t.options.columns.length,v=i??n().rows.length,y=C.useReducer(()=>({}),{})[1],b=C.useRef(),w=C.useRef();C.useEffect(()=>{typeof window<"u"&&(b.current=document.body.style.height)},[]),C.useEffect(()=>{if(typeof window<"u")if(u)w.current=document.body.getBoundingClientRect().top,document.body.style.height="100dvh";else{if(document.body.style.height=b.current,!w.current)return;window.scrollTo({behavior:"instant",top:-1*w.current})}},[u]),C.useEffect(()=>{m!==a.length&&t.setColumnOrder(mM(t.options))},[m]),C.useEffect(()=>{if(!o||d||h)return;const{pageIndex:_,pageSize:k}=f;_*k>=v&&t.setPageIndex(Math.ceil(v/k)-1)},[v]);const S=C.useRef(p);C.useEffect(()=>{p.length&&(S.current=p)},[p]),C.useEffect(()=>{n6(t)&&(c?t.setSorting([]):t.setSorting(()=>S.current||[]))},[c]),C.useEffect(()=>{s&&e()&&setTimeout(()=>{y()},150)},[l])},F0e=t=>{var e,n,r,o,s,i,a,l,c,u,d,f,h,p,m,v,y,b,w,S,_,k,M,T,P,A,L,V,H,z,N,D,F;const I=C.useRef(null),$=C.useRef(null),j=C.useRef({}),W=C.useRef({}),G=C.useRef(null),X=C.useRef(null),q=C.useRef({}),B=C.useRef(null),Q=C.useRef(null),Z=C.useRef(null),oe=C.useRef(null),te=C.useMemo(()=>{var Ne,Ct,It;const Nt=(Ne=t.initialState)!==null&&Ne!==void 0?Ne:{};return Nt.columnOrder=(Ct=Nt.columnOrder)!==null&&Ct!==void 0?Ct:mM(Object.assign(Object.assign({},t),{state:Object.assign(Object.assign({},t.initialState),t.state)})),Nt.globalFilterFn=(It=t.globalFilterFn)!==null&&It!==void 0?It:"fuzzy",Nt},[]);t.initialState=te;const[ne,pe]=C.useState((e=te.creatingRow)!==null&&e!==void 0?e:null),[ie,le]=C.useState(()=>Object.assign({},...Nv(t.columns).map(Ne=>{var Ct,It,Nt,Ot;return{[bu(Ne)]:Ne.filterFn instanceof Function?(Ct=Ne.filterFn.name)!==null&&Ct!==void 0?Ct:"custom":(Ot=(It=Ne.filterFn)!==null&&It!==void 0?It:(Nt=te==null?void 0:te.columnFilterFns)===null||Nt===void 0?void 0:Nt[bu(Ne)])!==null&&Ot!==void 0?Ot:a0e(Ne)}}))),[ce,ye]=C.useState((n=te.columnOrder)!==null&&n!==void 0?n:[]),[xe,Ce]=C.useState((r=te.columnSizingInfo)!==null&&r!==void 0?r:{}),[se,ue]=C.useState((o=te==null?void 0:te.density)!==null&&o!==void 0?o:"md"),[ve,Oe]=C.useState((s=te.draggingColumn)!==null&&s!==void 0?s:null),[fe,Me]=C.useState((i=te.draggingRow)!==null&&i!==void 0?i:null),[Ie,Be]=C.useState((a=te.editingCell)!==null&&a!==void 0?a:null),[et,mt]=C.useState((l=te.editingRow)!==null&&l!==void 0?l:null),[Ue,lt]=C.useState((c=te.globalFilterFn)!==null&&c!==void 0?c:"fuzzy"),[sn,an]=C.useState((u=te.grouping)!==null&&u!==void 0?u:[]),[tr,Za]=C.useState((d=te.hoveredColumn)!==null&&d!==void 0?d:null),[Tn,fn]=C.useState((f=te.hoveredRow)!==null&&f!==void 0?f:null),[Bn,oo]=C.useState((h=te==null?void 0:te.isFullScreen)!==null&&h!==void 0?h:!1),[Bs,Ti]=C.useState((p=te==null?void 0:te.pagination)!==null&&p!==void 0?p:{pageIndex:0,pageSize:10}),[Ao,Do]=C.useState((m=te==null?void 0:te.showAlertBanner)!==null&&m!==void 0?m:!1),[it,Wt]=C.useState((v=te==null?void 0:te.showColumnFilters)!==null&&v!==void 0?v:!1),[Rn,so]=C.useState((y=te==null?void 0:te.showGlobalFilter)!==null&&y!==void 0?y:!1),[Md,Vn]=C.useState((b=te==null?void 0:te.showToolbarDropZone)!==null&&b!==void 0?b:!1);t.state=Object.assign({columnFilterFns:ie,columnOrder:ce,columnSizingInfo:xe,creatingRow:ne,density:se,draggingColumn:ve,draggingRow:fe,editingCell:Ie,editingRow:et,globalFilterFn:Ue,grouping:sn,hoveredColumn:tr,hoveredRow:Tn,isFullScreen:Bn,pagination:Bs,showAlertBanner:Ao,showColumnFilters:it,showGlobalFilter:Rn,showToolbarDropZone:Md},t.state);const ke=t,Io=C.useRef([]);ke.columns=ke.state.columnSizingInfo.isResizingColumn||ke.state.draggingColumn||ke.state.draggingRow?Io.current:YB({columnDefs:[...[XB(ke)&&P0e(ke),JB(ke)&&E0e(ke),pM(ke)&&_0e(ke),hM(ke)&&T0e(ke),QB(ke)&&A0e(ke),ZB(ke)&&R0e(ke)].filter(Boolean),...ke.columns,...[e6(ke)&&j0e(ke)].filter(Boolean)],tableOptions:ke}),Io.current=ke.columns,ke.data=C.useMemo(()=>(ke.state.isLoading||ke.state.showSkeletons)&&!ke.data.length?[...Array(Math.min(ke.state.pagination.pageSize,20)).fill(null)].map(()=>Object.assign({},...Nv(ke.columns).map(Ne=>({[bu(Ne)]:null})))):ke.data,[ke.data,ke.state.isLoading,ke.state.showSkeletons]);const _t=Bge(Object.assign(Object.assign({onColumnOrderChange:ye,onColumnSizingInfoChange:Ce,onGroupingChange:an,onPaginationChange:Ti},ke),{globalFilterFn:(w=ke.filterFns)===null||w===void 0?void 0:w[Ue??"fuzzy"]}));return _t.refs={bottomToolbarRef:$,editInputRefs:j,filterInputRefs:W,lastSelectedRowId:I,searchInputRef:G,tableContainerRef:X,tableFooterRef:oe,tableHeadCellRefs:q,tableHeadRef:Z,tablePaperRef:B,topToolbarRef:Q},_t.setCreatingRow=Ne=>{var Ct,It;let Nt=Ne;Ne===!0&&(Nt=l0e(_t)),(It=(Ct=ke==null?void 0:ke.onCreatingRowChange)===null||Ct===void 0?void 0:Ct.call(ke,Nt))!==null&&It!==void 0||pe(Nt)},_t.setColumnFilterFns=(S=ke.onColumnFilterFnsChange)!==null&&S!==void 0?S:le,_t.setDensity=(_=ke.onDensityChange)!==null&&_!==void 0?_:ue,_t.setDraggingColumn=(k=ke.onDraggingColumnChange)!==null&&k!==void 0?k:Oe,_t.setDraggingRow=(M=ke.onDraggingRowChange)!==null&&M!==void 0?M:Me,_t.setEditingCell=(T=ke.onEditingCellChange)!==null&&T!==void 0?T:Be,_t.setEditingRow=(P=ke.onEditingRowChange)!==null&&P!==void 0?P:mt,_t.setGlobalFilterFn=(A=ke.onGlobalFilterFnChange)!==null&&A!==void 0?A:lt,_t.setHoveredColumn=(L=ke.onHoveredColumnChange)!==null&&L!==void 0?L:Za,_t.setHoveredRow=(V=ke.onHoveredRowChange)!==null&&V!==void 0?V:fn,_t.setIsFullScreen=(H=ke.onIsFullScreenChange)!==null&&H!==void 0?H:oo,_t.setShowAlertBanner=(z=ke.onShowAlertBannerChange)!==null&&z!==void 0?z:Do,_t.setShowColumnFilters=(N=ke.onShowColumnFiltersChange)!==null&&N!==void 0?N:Wt,_t.setShowGlobalFilter=(D=ke.onShowGlobalFilterChange)!==null&&D!==void 0?D:so,_t.setShowToolbarDropZone=(F=ke.onShowToolbarDropZoneChange)!==null&&F!==void 0?F:Vn,$0e(_t),_t},z0e=t=>F0e(L0e(t)),m6=(t,e)=>{const n=xB(t);return e===void 0||(e>=0&&e<Math.max(t.startIndex-t.overscan,0)&&n.unshift(e),e>=0&&e>t.endIndex+t.overscan&&n.push(e)),n},B0e=t=>{var e,n,r,o;const{getLeftLeafColumns:s,getRightLeafColumns:i,getState:a,getVisibleLeafColumns:l,options:{columnVirtualizerInstanceRef:c,columnVirtualizerOptions:u,enableColumnPinning:d,enableColumnVirtualization:f},refs:{tableContainerRef:h}}=t,{columnPinning:p,draggingColumn:m}=a();if(!f)return;const v=Se(u,{table:t}),y=l(),[b,w]=C.useMemo(()=>d?[s().map(A=>A.getPinnedIndex()),i().map(A=>y.length-A.getPinnedIndex()-1).sort((A,L)=>A-L)]:[[],[]],[p,d]),S=b.length,_=w.length,k=C.useMemo(()=>m!=null&&m.id?y.findIndex(A=>A.id===(m==null?void 0:m.id)):void 0,[m==null?void 0:m.id]),M=_B(Object.assign({count:y.length,estimateSize:A=>y[A].getSize(),getScrollElement:()=>h.current,horizontal:!0,overscan:3,rangeExtractor:C.useCallback(A=>{const L=m6(A,k);return!S&&!_?L:[...new Set([...b,...L,...w])]},[b,w,k])},v)),T=M.getVirtualItems();M.virtualColumns=T;const P=T.length;if(P){const A=M.getTotalSize(),L=((e=T[S])===null||e===void 0?void 0:e.start)||0,V=((n=T[b.length-1])===null||n===void 0?void 0:n.end)||0,H=((r=T[P-_])===null||r===void 0?void 0:r.start)||0,z=((o=T[P-_-1])===null||o===void 0?void 0:o.end)||0;M.virtualPaddingLeft=L-V,M.virtualPaddingRight=A-z-(_?A-H:0)}return c&&(c.current=M),M},V0e=(t,e)=>{var n;const{getRowModel:r,getState:o,options:{enableRowVirtualization:s,renderDetailPanel:i,rowVirtualizerInstanceRef:a,rowVirtualizerOptions:l},refs:{tableContainerRef:c}}=t,{density:u,draggingRow:d,expanded:f}=o();if(!s)return;const h=Se(l,{table:t}),p=(n=e==null?void 0:e.length)!==null&&n!==void 0?n:r().rows.length,m=u==="xs"?42.7:u==="md"?54.7:70.7,v=_B(Object.assign({count:i?p*2:p,estimateSize:y=>i&&y%2===1?f===!0?100:0:m,getScrollElement:()=>c.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?y=>y==null?void 0:y.getBoundingClientRect().height:void 0,overscan:4,rangeExtractor:C.useCallback(y=>{var b;return m6(y,(b=d==null?void 0:d.index)!==null&&b!==void 0?b:0)},[d])},h));return v.virtualRows=v.getVirtualItems(),a&&(a.current=v),v},H0e=t=>{const{getRowModel:e,getState:n,options:{data:r,enableGlobalFilterRankedResults:o,positionCreatingRow:s}}=t,{creatingRow:i,expanded:a,globalFilter:l,pagination:c,rowPinning:u,sorting:d}=n();return C.useMemo(()=>t6(t),[i,r,o,a,e().rows,l,c.pageIndex,c.pageSize,s,u,d])};var W0e={root:"MRT_TablePaper-module_root__q0v5L"},Pw={root:"MRT_TableContainer-module_root__JIsGB","root-sticky":"MRT_TableContainer-module_root-sticky__uC4qx","root-fullscreen":"MRT_TableContainer-module_root-fullscreen__aM8Jg"},aI={root:"MRT_Table-module_root__ms2uS","root-grid":"MRT_Table-module_root-grid__2Pynz"},Lo={root:"MRT_TableBody-module_root__kGhRy","root-grid":"MRT_TableBody-module_root-grid__WdOGg","root-no-rows":"MRT_TableBody-module_root-no-rows__iyi9K","root-virtualized":"MRT_TableBody-module_root-virtualized__TxPAi","empty-row-tr-grid":"MRT_TableBody-module_empty-row-tr-grid__LTgxw","empty-row-td-grid":"MRT_TableBody-module_empty-row-td-grid__pzlgG","empty-row-td-content":"MRT_TableBody-module_empty-row-td-content__Cc2XW",pinned:"MRT_TableBody-module_pinned__XHpcs"},Aw={root:"MRT_TableBodyRow-module_root__2c3D4","root-grid":"MRT_TableBodyRow-module_root-grid__AwXTe","root-virtualized":"MRT_TableBodyRow-module_root-virtualized__zYgxq"},al={root:"MRT_TableBodyCell-module_root__Wf-zi","root-grid":"MRT_TableBodyCell-module_root-grid__zIuC-","root-virtualized":"MRT_TableBodyCell-module_root-virtualized__jLl8R","root-data-col":"MRT_TableBodyCell-module_root-data-col__HHcxc","root-nowrap":"MRT_TableBodyCell-module_root-nowrap__-k1Jo","root-cursor-pointer":"MRT_TableBodyCell-module_root-cursor-pointer__4kw7J","root-editable-hover":"MRT_TableBodyCell-module_root-editable-hover__2DKSa"};const Dw=["string","number"],U0e=["text","autocomplete"],lI=({cell:t,renderedColumnIndex:e=0,renderedRowIndex:n=0,table:r})=>{var o,s;const{getState:i,options:{enableFilterMatchHighlighting:a,mantineHighlightProps:l}}=r,{column:c,row:u}=t,{columnDef:d}=c,{globalFilter:f,globalFilterFn:h}=i(),p=c.getFilterValue(),m=Se(l,{cell:t,column:c,row:u,table:r});let v=t.getIsAggregated()&&d.AggregatedCell?d.AggregatedCell({cell:t,column:c,row:u,table:r}):u.getIsGrouped()&&!t.getIsGrouped()?null:t.getIsGrouped()&&d.GroupedCell?d.GroupedCell({cell:t,column:c,row:u,table:r}):void 0;const y=v!==void 0;if(y||(v=t.renderValue()),a&&d.enableFilterMatchHighlighting!==!1&&v&&Dw.includes(typeof v)&&(p&&Dw.includes(typeof p)&&U0e.includes(d.filterVariant)||f&&Dw.includes(typeof f)&&c.getCanGlobalFilter())){let b=((s=(o=c.getFilterValue())!==null&&o!==void 0?o:f)!==null&&s!==void 0?s:"").toString();(p?d._filterFn:h)==="fuzzy"&&(b=b.split(" ")),v=g.jsx(K2,Object.assign({color:"yellow.3",highlight:b},m,{children:v==null?void 0:v.toString()}))}return d.Cell&&!y&&(v=d.Cell({cell:t,column:c,renderedCellValue:v,renderedColumnIndex:e,renderedRowIndex:n,row:u,table:r})),v};var G0e={root:"MRT_CopyButton-module_root__mkXy4"};const K0e=t=>{var{cell:e,children:n,table:r}=t,o=Ve(t,["cell","children","table"]);const{options:{localization:{clickToCopy:s,copiedToClipboard:i},mantineCopyButtonProps:a}}=r,{column:l,row:c}=e,{columnDef:u}=l,d={cell:e,column:l,row:c,table:r},f=Object.assign(Object.assign(Object.assign({},Se(a,d)),Se(u.mantineCopyButtonProps,d)),o);return g.jsx(zF,{value:e.getValue(),children:({copied:h,copy:p})=>{var m;return g.jsx(ut,{color:h?"green":void 0,label:(m=f==null?void 0:f.title)!==null&&m!==void 0?m:h?i:s,openDelay:1e3,withinPortal:!0,children:g.jsx(un,Object.assign({},f,{className:De("mrt-copy-button",G0e.root,f==null?void 0:f.className),onClick:v=>{v.stopPropagation(),p()},role:"presentation",title:void 0,children:n}))})}})},g6=t=>{var e,{cell:n,table:r}=t,o=Ve(t,["cell","table"]);const{getState:s,options:{createDisplayMode:i,editDisplayMode:a,mantineEditSelectProps:l,mantineEditTextInputProps:c},refs:{editInputRefs:u},setCreatingRow:d,setEditingCell:f,setEditingRow:h}=r,{column:p,row:m}=n,{columnDef:v}=p,{creatingRow:y,editingRow:b}=s(),w=(y==null?void 0:y.id)===m.id,S=(b==null?void 0:b.id)===m.id,_=v.editVariant==="select",[k,M]=C.useState(()=>n.getValue()),T={cell:n,column:p,row:m,table:r},P=Object.assign(Object.assign(Object.assign({},Se(c,T)),Se(v.mantineEditTextInputProps,T)),o),A=Object.assign(Object.assign(Object.assign({},Se(l,T)),Se(v.mantineEditSelectProps,T)),o),L=N=>{m._valuesCache[p.id]=N,w?d(m):S&&h(m)},V=N=>{var D;(D=P.onBlur)===null||D===void 0||D.call(P,N),L(k),f(null)},H=N=>{var D,F;(D=P.onKeyDown)===null||D===void 0||D.call(P,N),N.key==="Enter"&&((F=u.current[n.id])===null||F===void 0||F.blur())};if(v.Edit)return(e=v.Edit)===null||e===void 0?void 0:e.call(v,{cell:n,column:p,row:m,table:r});const z={disabled:Se(v.enableEditing,m)===!1,label:["custom","modal"].includes(w?i:a)?p.columnDef.header:void 0,name:n.id,onClick:N=>{var D;N.stopPropagation(),(D=P==null?void 0:P.onClick)===null||D===void 0||D.call(P,N)},placeholder:["custom","modal"].includes(w?i:a)?void 0:v.header,value:k,variant:a==="table"?"unstyled":"default"};return _?g.jsx(hp,Object.assign({},z,{searchable:!0,value:k},A,{onBlur:V,onChange:N=>{var D;(D=A.onChange)===null||D===void 0||D.call(A,N),M(N)},onClick:N=>{var D;N.stopPropagation(),(D=A==null?void 0:A.onClick)===null||D===void 0||D.call(A,N)},ref:N=>{N&&(u.current[n.id]=N,A.ref&&(A.ref.current=N))}})):g.jsx(wd,Object.assign({},z,{onKeyDown:H,value:k??""},P,{onBlur:V,onChange:N=>{var D;(D=P.onChange)===null||D===void 0||D.call(P,N),M(N.target.value)},onClick:N=>{var D;N.stopPropagation(),(D=P==null?void 0:P.onClick)===null||D===void 0||D.call(P,N)},ref:N=>{N&&(u.current[n.id]=N,P.ref&&(P.ref.current=N))}}))},v6=t=>{var e,n,r,o,s,i,a,{cell:l,numRows:c=1,renderedColumnIndex:u=0,renderedRowIndex:d=0,rowRef:f,table:h,virtualCell:p}=t,m=Ve(t,["cell","numRows","renderedColumnIndex","renderedRowIndex","rowRef","table","virtualCell"]);const v=Lr(),{getState:y,options:{columnResizeDirection:b,columnResizeMode:w,createDisplayMode:S,editDisplayMode:_,enableClickToCopy:k,enableColumnOrdering:M,enableColumnPinning:T,enableEditing:P,enableGrouping:A,layoutMode:L,mantineSkeletonProps:V,mantineTableBodyCellProps:H},refs:{editInputRefs:z},setEditingCell:N,setHoveredColumn:D}=h,{columnSizingInfo:F,creatingRow:I,density:$,draggingColumn:j,editingCell:W,editingRow:G,hoveredColumn:X,isLoading:q,showSkeletons:B}=y(),{column:Q,row:Z}=l,{columnDef:oe}=Q,{columnDefType:te}=oe,ne={cell:l,column:Q,renderedColumnIndex:u,renderedRowIndex:d,row:Z,table:h},pe=Object.assign(Object.assign(Object.assign({},Se(H,ne)),Se(oe.mantineTableBodyCellProps,ne)),m),ie=Se(V,ne),[le,ce]=C.useState(100);C.useEffect(()=>{if(!q&&!B||le!==100)return;const et=Q.getSize();ce(te==="display"?et/2:Math.round(Math.random()*(et-et/3)+et/3))},[q,B]);const ye={minWidth:`max(calc(var(--col-${qo(Q==null?void 0:Q.id)}-size) * 1px), ${(e=oe.minSize)!==null&&e!==void 0?e:30}px)`,width:`calc(var(--col-${qo(Q.id)}-size) * 1px)`};L==="grid"?ye.flex=`${[0,!1].includes(oe.grow)?0:`var(--col-${qo(Q.id)}-size)`} 0 auto`:L==="grid-no-grow"&&(ye.flex=`${+(oe.grow||0)} 0 auto`);const xe=(j==null?void 0:j.id)===Q.id,Ce=(X==null?void 0:X.id)===Q.id,se=T&&oe.columnDefType!=="group"&&Q.getIsPinned(),ue=!l.getIsPlaceholder()&&(Se(P,Z)&&Se(oe.enableEditing,Z))!==!1,ve=ue&&!["custom","modal"].includes(_)&&(_==="table"||(G==null?void 0:G.id)===Z.id||(W==null?void 0:W.id)===l.id)&&!Z.getIsGrouped(),Oe=ue&&S==="row"&&(I==null?void 0:I.id)===Z.id,fe=Se(k,l)||Se(oe.enableClickToCopy,l)&&Se(oe.enableClickToCopy,l)!==!1,Me=et=>{var mt;(mt=pe==null?void 0:pe.onDoubleClick)===null||mt===void 0||mt.call(pe,et),ue&&_==="cell"&&(N(l),setTimeout(()=>{var Ue;const lt=z.current[l.id];lt&&(lt.focus(),(Ue=lt.select)===null||Ue===void 0||Ue.call(lt))},100))},Ie=et=>{var mt;(mt=pe==null?void 0:pe.onDragEnter)===null||mt===void 0||mt.call(pe,et),A&&(X==null?void 0:X.id)==="drop-zone"&&D(null),M&&j&&D(oe.enableColumnOrdering!==!1?Q:null)},Be={cell:l,renderedColumnIndex:u,renderedRowIndex:d,table:h};return g.jsx(qy,Object.assign({"data-column-pinned":se||void 0,"data-dragging-column":xe||void 0,"data-first-right-pinned":se==="right"&&Q.getIsLastColumn(se)||void 0,"data-hovered-column-target":Ce||void 0,"data-index":u,"data-last-left-pinned":se==="left"&&Q.getIsLastColumn(se)||void 0,"data-last-row":d===c-1||void 0,"data-resizing":w==="onChange"&&(F==null?void 0:F.isResizingColumn)===Q.id&&b||void 0},pe,{__vars:Object.assign({"--mrt-cell-align":(n=pe.align)!==null&&n!==void 0?n:v.dir==="rtl"?"right":"left","--mrt-table-cell-left":se==="left"?`${Q.getStart(se)}`:void 0,"--mrt-table-cell-right":se==="right"?`${Q.getAfter(se)}`:void 0},pe.__vars),className:De(al.root,(L==null?void 0:L.startsWith("grid"))&&al["root-grid"],p&&al["root-virtualized"],ue&&_==="cell"&&al["root-cursor-pointer"],ue&&["cell","table"].includes(_??"")&&te!=="display"&&al["root-editable-hover"],te==="data"&&al["root-data-col"],$==="xs"&&al["root-nowrap"],pe==null?void 0:pe.className),onDoubleClick:Me,onDragEnter:Ie,style:et=>Object.assign(Object.assign({},ye),Se(pe.style,et)),children:(r=pe.children)!==null&&r!==void 0?r:g.jsxs(g.Fragment,{children:[l.getIsPlaceholder()?(s=(o=oe.PlaceholderCell)===null||o===void 0?void 0:o.call(oe,{cell:l,column:Q,row:Z,table:h}))!==null&&s!==void 0?s:null:B!==!1&&(q||B)?g.jsx(pE,Object.assign({height:20,width:le},ie)):te==="display"&&(["mrt-row-expand","mrt-row-numbers","mrt-row-select"].includes(Q.id)||!Z.getIsGrouped())?(i=oe.Cell)===null||i===void 0?void 0:i.call(oe,Object.assign({column:Q,renderedCellValue:l.renderValue(),row:Z,rowRef:f},Be)):Oe||ve?g.jsx(g6,{cell:l,table:h}):fe&&oe.enableClickToCopy!==!1?g.jsx(K0e,{cell:l,table:h,children:g.jsx(lI,Object.assign({},Be))}):g.jsx(lI,Object.assign({},Be)),l.getIsGrouped()&&!oe.GroupedCell&&g.jsxs(g.Fragment,{children:[" (",(a=Z.subRows)===null||a===void 0?void 0:a.length,")"]})]})}))},Y0e=C.memo(v6,(t,e)=>e.cell===t.cell);var ll={root:"MRT_TableDetailPanel-module_root__vQAlM","root-grid":"MRT_TableDetailPanel-module_root-grid__7UMC6","root-virtual-row":"MRT_TableDetailPanel-module_root-virtual-row__r-X4Z",inner:"MRT_TableDetailPanel-module_inner__o-Fk-","inner-grid":"MRT_TableDetailPanel-module_inner-grid__WLZgF","inner-expanded":"MRT_TableDetailPanel-module_inner-expanded__6tg9T","inner-virtual":"MRT_TableDetailPanel-module_inner-virtual__TItRy"};const q0e=t=>{var e,n,{parentRowRef:r,renderedRowIndex:o=0,row:s,rowVirtualizer:i,striped:a,table:l,virtualRow:c}=t,u=Ve(t,["parentRowRef","renderedRowIndex","row","rowVirtualizer","striped","table","virtualRow"]);const{getState:d,getVisibleLeafColumns:f,options:{layoutMode:h,mantineDetailPanelProps:p,mantineTableBodyRowProps:m,renderDetailPanel:v}}=l,{isLoading:y}=d(),b=Se(m,{isDetailPanel:!0,row:s,table:l}),w=Object.assign(Object.assign({},Se(p,{row:s,table:l})),u),S=!y&&s.getIsExpanded()&&(v==null?void 0:v({row:s,table:l}));return g.jsx(ci,Object.assign({"data-index":v?o*2+1:o,"data-striped":a,ref:_=>{var k;_&&((k=i==null?void 0:i.measureElement)===null||k===void 0||k.call(i,_))}},b,{__vars:Object.assign({"--mrt-parent-row-height":c?`${(n=(e=r.current)===null||e===void 0?void 0:e.getBoundingClientRect())===null||n===void 0?void 0:n.height}px`:void 0,"--mrt-virtual-row-start":c?`${c.start}px`:void 0},b==null?void 0:b.__vars),className:De("mantine-Table-tr-detail-panel",ll.root,(h==null?void 0:h.startsWith("grid"))&&ll["root-grid"],c&&ll["root-virtual-row"],b==null?void 0:b.className),children:g.jsx(qy,Object.assign({colSpan:f().length,component:"td"},w,{__vars:{"--mrt-inner-width":`${l.getTotalSize()}px`},className:De("mantine-Table-td-detail-panel",ll.inner,(h==null?void 0:h.startsWith("grid"))&&ll["inner-grid"],s.getIsExpanded()&&ll["inner-expanded"],c&&ll["inner-virtual"]),p:s.getIsExpanded()&&S?"md":0,children:i?s.getIsExpanded()&&S:g.jsx(ud,{in:s.getIsExpanded(),children:S})}))}))},Og=t=>{var e,n,r,{columnVirtualizer:o,numRows:s,pinnedRowIds:i,renderedRowIndex:a=0,row:l,rowVirtualizer:c,table:u,tableProps:d,virtualRow:f}=t,h=Ve(t,["columnVirtualizer","numRows","pinnedRowIds","renderedRowIndex","row","rowVirtualizer","table","tableProps","virtualRow"]);const{getState:p,options:{enableRowOrdering:m,enableRowPinning:v,enableStickyFooter:y,enableStickyHeader:b,layoutMode:w,mantineTableBodyRowProps:S,memoMode:_,renderDetailPanel:k,rowPinningDisplayMode:M},refs:{tableFooterRef:T,tableHeadRef:P},setHoveredRow:A}=u,{density:L,draggingColumn:V,draggingRow:H,editingCell:z,editingRow:N,hoveredRow:D,isFullScreen:F,rowPinning:I}=p(),$=l.getVisibleCells(),{virtualColumns:j,virtualPaddingLeft:W,virtualPaddingRight:G}=o??{},X=Lv({row:l,table:u}),q=v&&l.getIsPinned(),B=q&&(M==null?void 0:M.includes("sticky"))&&"sticky",Q=(H==null?void 0:H.id)===l.id,Z=(D==null?void 0:D.id)===l.id,oe=Object.assign(Object.assign({},Se(S,{renderedRowIndex:a,row:l,table:u})),h),[te,ne]=C.useMemo(()=>!v||!B||!i||!l.getIsPinned()?[]:[[...i].reverse().indexOf(l.id),i.indexOf(l.id)],[i,I]),pe=(b||F)&&((e=P.current)===null||e===void 0?void 0:e.clientHeight)||0,ie=y&&((n=T.current)===null||n===void 0?void 0:n.clientHeight)||0,le=parseInt((r=oe==null?void 0:oe.style)===null||r===void 0?void 0:r.height,10)||(L==="xs"?37:L==="md"?53:69),ce=Ce=>{m&&H&&A(l)},ye=C.useRef(null);let xe=d.striped;return xe&&(xe===!0&&(xe="odd"),xe==="odd"&&a%2!==0&&(xe=!1),xe==="even"&&a%2===0&&(xe=!1)),g.jsxs(g.Fragment,{children:[g.jsxs(ci,Object.assign({"data-dragging-row":Q||void 0,"data-hovered-row-target":Z||void 0,"data-index":k?a*2:a,"data-row-pinned":B||q||void 0,"data-selected":X||void 0,"data-striped":xe,onDragEnter:ce,ref:Ce=>{Ce&&(ye.current=Ce,c==null||c.measureElement(Ce))}},oe,{__vars:Object.assign(Object.assign({},oe==null?void 0:oe.__vars),{"--mrt-pinned-row-bottom":!f&&te!==void 0&&q?`${te*le+(y?ie-1:0)}`:void 0,"--mrt-pinned-row-top":f?void 0:ne!==void 0&&q?`${ne*le+(b||F?pe-1:0)}`:void 0,"--mrt-virtual-row-start":f?`${f.start}`:void 0}),className:De(Aw.root,(w==null?void 0:w.startsWith("grid"))&&Aw["root-grid"],f&&Aw["root-virtualized"],oe==null?void 0:oe.className),children:[W?g.jsx(J,{component:"td",display:"flex",w:W}):null,(j??l.getVisibleCells()).map((Ce,se)=>{let ue=Ce;o&&(se=Ce.index,ue=$[se]);const ve={cell:ue,numRows:s,renderedColumnIndex:se,renderedRowIndex:a,rowRef:ye,table:u,virtualCell:o?Ce:void 0};return _==="cells"&&ue.column.columnDef.columnDefType==="data"&&!V&&!H&&(z==null?void 0:z.id)!==ue.id&&(N==null?void 0:N.id)!==l.id?g.jsx(Y0e,Object.assign({},ve),ue.id):g.jsx(v6,Object.assign({},ve),ue.id)}),G?g.jsx(J,{component:"td",display:"flex",w:G}):null]})),k&&!l.getIsGrouped()&&g.jsx(q0e,{parentRowRef:ye,renderedRowIndex:a,row:l,rowVirtualizer:c,striped:xe,table:u,virtualRow:f})]})},Iw=C.memo(Og,(t,e)=>t.row===e.row),y6=t=>{var e,n,r,o,s,{columnVirtualizer:i,table:a,tableProps:l}=t,c=Ve(t,["columnVirtualizer","table","tableProps"]);const{getBottomRows:u,getIsSomeRowsPinned:d,getRowModel:f,getState:h,getTopRows:p,options:{enableStickyFooter:m,enableStickyHeader:v,layoutMode:y,localization:b,mantineTableBodyProps:w,memoMode:S,renderDetailPanel:_,renderEmptyRowsFallback:k,rowPinningDisplayMode:M},refs:{tableFooterRef:T,tableHeadRef:P,tablePaperRef:A}}=a,{columnFilters:L,globalFilter:V,isFullScreen:H,rowPinning:z}=h(),N=Object.assign(Object.assign({},Se(w,{table:a})),c),D=(v||H)&&((e=P.current)===null||e===void 0?void 0:e.clientHeight)||0,F=m&&((n=T.current)===null||n===void 0?void 0:n.clientHeight)||0,I=C.useMemo(()=>{var X,q;return!(!((X=z.bottom)===null||X===void 0)&&X.length)&&!(!((q=z.top)===null||q===void 0)&&q.length)?[]:f().rows.filter(B=>B.getIsPinned()).map(B=>B.id)},[z,f().rows]),$=H0e(a),j=V0e(a,$),{virtualRows:W}=j??{},G={columnVirtualizer:i,numRows:$.length,table:a,tableProps:l};return g.jsxs(g.Fragment,{children:[!(M!=null&&M.includes("sticky"))&&d("top")&&g.jsx(Pf,Object.assign({},N,{__vars:Object.assign({"--mrt-table-head-height":`${D}`},N==null?void 0:N.__vars),className:De(Lo.pinned,(y==null?void 0:y.startsWith("grid"))&&Lo["root-grid"],N==null?void 0:N.className),children:p().map((X,q)=>{const B=Object.assign(Object.assign({},G),{renderedRowIndex:q,row:X});return S==="rows"?g.jsx(Iw,Object.assign({},B),X.id):g.jsx(Og,Object.assign({},B),X.id)})})),g.jsx(Pf,Object.assign({},N,{__vars:Object.assign({"--mrt-table-body-height":j?`${j.getTotalSize()}px`:void 0},N==null?void 0:N.__vars),className:De(Lo.root,(y==null?void 0:y.startsWith("grid"))&&Lo["root-grid"],!$.length&&Lo["root-no-rows"],j&&Lo["root-virtualized"],N==null?void 0:N.className),children:(r=N==null?void 0:N.children)!==null&&r!==void 0?r:$.length?g.jsx(g.Fragment,{children:(W??$).map((X,q)=>{if(j)if(_){if(X.index%2===1)return null;q=X.index/2}else q=X.index;const B=j?$[q]:X,Q=Object.assign(Object.assign({},G),{pinnedRowIds:I,renderedRowIndex:q,row:B,rowVirtualizer:j,virtualRow:j?X:void 0}),Z=`${B.id}-${B.index}`;return S==="rows"?g.jsx(Iw,Object.assign({},Q),Z):g.jsx(Og,Object.assign({},Q),Z)})}):g.jsx("tr",{className:De("mrt-table-body-row",(y==null?void 0:y.startsWith("grid"))&&Lo["empty-row-tr-grid"]),children:g.jsx("td",{className:De("mrt-table-body-cell",(y==null?void 0:y.startsWith("grid"))&&Lo["empty-row-td-grid"]),colSpan:a.getVisibleLeafColumns().length,children:(o=k==null?void 0:k({table:a}))!==null&&o!==void 0?o:g.jsx(es,{__vars:{"--mrt-paper-width":`${(s=A.current)===null||s===void 0?void 0:s.clientWidth}`},className:De(Lo["empty-row-td-content"]),children:V||L.length?b.noResultsFound:b.noRecordsToDisplay})})})})),!(M!=null&&M.includes("sticky"))&&d("bottom")&&g.jsx(Pf,Object.assign({},N,{__vars:Object.assign({"--mrt-table-footer-height":`${F}`},N==null?void 0:N.__vars),className:De(Lo.pinned,(y==null?void 0:y.startsWith("grid"))&&Lo["root-grid"],N==null?void 0:N.className),children:u().map((X,q)=>{const B=Object.assign(Object.assign({},G),{renderedRowIndex:q,row:X});return S==="rows"?g.jsx(Iw,Object.assign({},B),X.id):g.jsx(Og,Object.assign({},B),X.id)})}))]})},X0e=C.memo(y6,(t,e)=>t.table.options.data===e.table.options.data);var Nw={root:"MRT_TableFooter-module_root__-JXpw",grid:"MRT_TableFooter-module_grid__J3Ga-",sticky:"MRT_TableFooter-module_sticky__GcoK6"},cI={root:"MRT_TableFooterRow-module_root__EuoPr","layout-mode-grid":"MRT_TableFooterRow-module_layout-mode-grid__dUEMF"},Lw={root:"MRT_TableFooterCell-module_root__d8Scs",grid:"MRT_TableFooterCell-module_grid__H9jLk",group:"MRT_TableFooterCell-module_group__l3-p-"};const J0e=t=>{var e,n,r,o,s,{footer:i,renderedColumnIndex:a,table:l}=t,c=Ve(t,["footer","renderedColumnIndex","table"]);const u=Lr(),{options:{enableColumnPinning:d,layoutMode:f,mantineTableFooterCellProps:h}}=l,{column:p}=i,{columnDef:m}=p,{columnDefType:v}=m,y=d&&m.columnDefType!=="group"&&p.getIsPinned(),b={column:p,table:l},w=Object.assign(Object.assign(Object.assign({},Se(h,b)),Se(m.mantineTableFooterCellProps,b)),c),S={minWidth:`max(calc(var(--header-${qo(i==null?void 0:i.id)}-size) * 1px), ${(e=m.minSize)!==null&&e!==void 0?e:30}px)`,width:`calc(var(--header-${qo(i.id)}-size) * 1px)`};return f==="grid"?S.flex=`${[0,!1].includes(m.grow)?0:`var(--header-${qo(i.id)}-size)`} 0 auto`:f==="grid-no-grow"&&(S.flex=`${+(m.grow||0)} 0 auto`),g.jsx(Wu,Object.assign({colSpan:i.colSpan,"data-column-pinned":y||void 0,"data-first-right-pinned":y==="right"&&p.getIsLastColumn(y)||void 0,"data-index":a,"data-last-left-pinned":y==="left"&&p.getIsLastColumn(y)||void 0},w,{__vars:Object.assign({"--mrt-cell-align":(n=w.align)!==null&&n!==void 0?n:v==="group"?"center":u.dir==="rtl"?"right":"left","--mrt-table-cell-left":y==="left"?`${p.getStart(y)}`:void 0,"--mrt-table-cell-right":y==="right"?`${p.getAfter(y)}`:void 0},w==null?void 0:w.__vars),className:De(Lw.root,(f==null?void 0:f.startsWith("grid"))&&Lw.grid,v==="group"&&Lw.group,w==null?void 0:w.className),style:_=>Object.assign(Object.assign({},S),Se(w.style,_)),children:(r=w.children)!==null&&r!==void 0?r:i.isPlaceholder?null:(s=(o=Se(m.Footer,{column:p,footer:i,table:l}))!==null&&o!==void 0?o:m.footer)!==null&&s!==void 0?s:null}))},Q0e=t=>{var e,{columnVirtualizer:n,footerGroup:r,table:o}=t,s=Ve(t,["columnVirtualizer","footerGroup","table"]);const{options:{layoutMode:i,mantineTableFooterRowProps:a}}=o,{virtualColumns:l,virtualPaddingLeft:c,virtualPaddingRight:u}=n??{};if(!(!((e=r.headers)===null||e===void 0)&&e.some(f=>typeof f.column.columnDef.footer=="string"&&!!f.column.columnDef.footer||f.column.columnDef.Footer)))return null;const d=Object.assign(Object.assign({},Se(a,{footerGroup:r,table:o})),s);return g.jsxs(ci,Object.assign({className:De(cI.root,(i==null?void 0:i.startsWith("grid"))&&cI["layout-mode-grid"])},d,{children:[c?g.jsx(J,{component:"th",display:"flex",w:c}):null,(l??r.headers).map((f,h)=>{let p=f;return n&&(h=f.index,p=r.headers[h]),g.jsx(J0e,{footer:p,renderedColumnIndex:h,table:o},p.id)}),u?g.jsx(J,{component:"th",display:"flex",w:u}):null]}))},Z0e=t=>{var{columnVirtualizer:e,table:n}=t,r=Ve(t,["columnVirtualizer","table"]);const{getFooterGroups:o,getState:s,options:{enableStickyFooter:i,layoutMode:a,mantineTableFooterProps:l},refs:{tableFooterRef:c}}=n,{isFullScreen:u}=s(),d=Object.assign(Object.assign({},Se(l,{table:n})),r),f=(u||i)&&i!==!1;return g.jsx(wE,Object.assign({},d,{className:De(Nw.root,d==null?void 0:d.className,f&&Nw.sticky,(a==null?void 0:a.startsWith("grid"))&&Nw.grid),ref:h=>{c.current=h,d!=null&&d.ref&&(d.ref.current=h)},children:o().map(h=>g.jsx(Q0e,{columnVirtualizer:e,footerGroup:h,table:n},h.id))}))};var Ni={root:"MRT_TableHead-module_root__j9NkO","root-grid":"MRT_TableHead-module_root-grid__c3aGl","root-table-row-group":"MRT_TableHead-module_root-table-row-group__d9FO4","root-sticky":"MRT_TableHead-module_root-sticky__0kuDE","banner-tr":"MRT_TableHead-module_banner-tr__EhT-x","banner-th":"MRT_TableHead-module_banner-th__KwM5a",grid:"MRT_TableHead-module_grid__OJ-td"},jw={root:"MRT_TableHeadRow-module_root__hUKv4","layout-mode-grid":"MRT_TableHeadRow-module_layout-mode-grid__4ZGri",sticky:"MRT_TableHeadRow-module_sticky__Ej7Ax"},An={root:"MRT_TableHeadCell-module_root__6y50a","root-grid":"MRT_TableHeadCell-module_root-grid__bAf1d","root-virtualized":"MRT_TableHeadCell-module_root-virtualized__CWLit","root-no-select":"MRT_TableHeadCell-module_root-no-select__BEOVU",content:"MRT_TableHeadCell-module_content__-pzSK","content-spaced":"MRT_TableHeadCell-module_content-spaced__S85Aa","content-center":"MRT_TableHeadCell-module_content-center__c-17L","content-right":"MRT_TableHeadCell-module_content-right__NSRZU","content-wrapper":"MRT_TableHeadCell-module_content-wrapper__py6aJ","content-wrapper-hidden-overflow":"MRT_TableHeadCell-module_content-wrapper-hidden-overflow__QY40r","content-wrapper-nowrap":"MRT_TableHeadCell-module_content-wrapper-nowrap__-4aIg",labels:"MRT_TableHeadCell-module_labels__oiMSr","labels-right":"MRT_TableHeadCell-module_labels-right__6ZJp-","labels-center":"MRT_TableHeadCell-module_labels-center__MM9q8","labels-sortable":"MRT_TableHeadCell-module_labels-sortable__tyuLr","labels-data":"MRT_TableHeadCell-module_labels-data__PvFGO","content-actions":"MRT_TableHeadCell-module_content-actions__utxbm"},eye={"filter-mode-label":"MRT_TableHeadCellFilterContainer-module_filter-mode-label__8reK-"},tye={root:"MRT_FilterCheckBox-module_root__59h9r"};const nye=t=>{var e,n,r,{column:o,table:s}=t,i=Ve(t,["column","table"]);const{getState:a,options:{localization:l,mantineFilterCheckboxProps:c}}=s,{density:u}=a(),{columnDef:d}=o,f={column:o,table:s},h=Object.assign(Object.assign(Object.assign({},Se(c,f)),Se(d.mantineFilterCheckboxProps,f)),i),p=(e=l.filterByColumn)===null||e===void 0?void 0:e.replace("{column}",d.header),m=o.getFilterValue();return g.jsx(ut,{label:(n=h==null?void 0:h.title)!==null&&n!==void 0?n:p,openDelay:1e3,withinPortal:!0,children:g.jsx(pc,Object.assign({checked:m==="true",className:De("mrt-filter-checkbox",tye.root),indeterminate:m===void 0,label:(r=h.title)!==null&&r!==void 0?r:p,size:u==="xs"?"sm":"md"},h,{onChange:v=>{var y;o.setFilterValue(o.getFilterValue()===void 0?"true":o.getFilterValue()==="true"?"false":void 0),(y=h==null?void 0:h.onChange)===null||y===void 0||y.call(h,v)},onClick:v=>{var y;v.stopPropagation(),(y=h==null?void 0:h.onClick)===null||y===void 0||y.call(h,v)},title:void 0}))})};var rye={root:"MRT_FilterRangeFields-module_root__KfCcg"},tf={root:"MRT_FilterTextInput-module_root__Ss8Ql","date-filter":"MRT_FilterTextInput-module_date-filter__jOBLB","range-filter":"MRT_FilterTextInput-module_range-filter__JQHAL","not-filter-chip":"MRT_FilterTextInput-module_not-filter-chip__u8b1y","filter-chip-badge":"MRT_FilterTextInput-module_filter-chip-badge__Sel2k"};const __=t=>{var e,n,r,o,s,i,a,l,{header:c,rangeFilterIndex:u,table:d}=t,f=Ve(t,["header","rangeFilterIndex","table"]);const{options:{columnFilterDisplayMode:h,columnFilterModeOptions:p,icons:{IconX:m},localization:v,mantineFilterAutocompleteProps:y,mantineFilterDateInputProps:b,mantineFilterMultiSelectProps:w,mantineFilterSelectProps:S,mantineFilterTextInputProps:_,manualFiltering:k},refs:{filterInputRefs:M},setColumnFilterFns:T}=d,{column:P}=c,{columnDef:A}=P,L={column:P,rangeFilterIndex:u,table:d},V=Object.assign(Object.assign(Object.assign({},Se(_,L)),Se(A.mantineFilterTextInputProps,L)),f),H=Object.assign(Object.assign({},Se(S,L)),Se(A.mantineFilterSelectProps,L)),z=Object.assign(Object.assign({},Se(w,L)),Se(A.mantineFilterMultiSelectProps,L)),N=Object.assign(Object.assign({},Se(b,L)),Se(A.mantineFilterDateInputProps,L)),D=Object.assign(Object.assign({},Se(y,L)),Se(A.mantineFilterAutocompleteProps,L)),F=A.filterVariant==="range"||A.filterVariant==="date-range"||u!==void 0,I=A.filterVariant==="select",$=A.filterVariant==="multi-select",j=A.filterVariant==="date"||A.filterVariant==="date-range",W=A.filterVariant==="autocomplete",G=(e=A==null?void 0:A.columnFilterModeOptions)!==null&&e!==void 0?e:p,X=A._filterFn,q=["empty","notEmpty"].includes(X)?yM(v,X):"",B=F?u===0?v.min:u===1?v.max:"":(n=V==null?void 0:V.placeholder)!==null&&n!==void 0?n:(r=v.filterByColumn)===null||r===void 0?void 0:r.replace("{column}",String(A.header)),Q=P.getFacetedUniqueValues(),Z=C.useMemo(()=>{var se,ue,ve;return((ve=(ue=(se=D==null?void 0:D.data)!==null&&se!==void 0?se:H==null?void 0:H.data)!==null&&ue!==void 0?ue:z==null?void 0:z.data)!==null&&ve!==void 0?ve:(W||I||$)&&Q?Array.from(Q.keys()).sort((Oe,fe)=>Oe.localeCompare(fe)):[]).filter(Oe=>Oe!=null)},[D==null?void 0:D.data,Q,W,$,I,z==null?void 0:z.data,H==null?void 0:H.data]),oe=C.useRef(!1),[te,ne]=C.useState(()=>{var se,ue;return $?P.getFilterValue()||[]:F?((se=P.getFilterValue())===null||se===void 0?void 0:se[u])||"":(ue=P.getFilterValue())!==null&&ue!==void 0?ue:""}),[pe]=G5(te,k?400:200);C.useEffect(()=>{oe.current&&(F?P.setFilterValue(se=>{const ue=Array.isArray(se)?se:["",""];return ue[u]=pe,ue}):P.setFilterValue(pe??void 0))},[pe]),C.useEffect(()=>{if(!oe.current){oe.current=!0;return}const se=P.getFilterValue();se===void 0?ie():ne(F&&u!==void 0?(se??["",""])[u]:se??"")},[P.getFilterValue()]);const ie=()=>{$?(ne([]),P.setFilterValue([])):F?(ne(""),P.setFilterValue(se=>{const ue=Array.isArray(se)?se:["",""];return ue[u]=void 0,ue})):(ne(""),P.setFilterValue(void 0))};if(A.Filter)return g.jsx(g.Fragment,{children:(o=A.Filter)===null||o===void 0?void 0:o.call(A,{column:P,header:c,rangeFilterIndex:u,table:d})});const le=()=>{ne(""),P.setFilterValue(void 0),T(se=>{var ue;return Object.assign(Object.assign({},se),{[c.id]:(ue=G==null?void 0:G[0])!==null&&ue!==void 0?ue:"fuzzy"})})},ce={"aria-label":B,className:De("mrt-filter-text-input",tf.root,j?tf["date-filter"]:F?tf["range-filter"]:!q&&tf["not-filter-chip"]),disabled:!!q,onChange:ne,onClick:se=>se.stopPropagation(),placeholder:B,style:Object.assign({},$?z==null?void 0:z.style:I?H==null?void 0:H.style:j?N==null?void 0:N.style:V==null?void 0:V.style),title:B,value:te,variant:"unstyled"},{className:ye}=ce,xe=Ve(ce,["className"]),Ce=te?g.jsx(Ze,{"aria-label":v.clearFilter,color:"var(--mantine-color-gray-7)",onClick:ie,size:"sm",title:(s=v.clearFilter)!==null&&s!==void 0?s:"",variant:"transparent",children:g.jsx(m,{})}):null;return q?g.jsx(J,{style:xe.style,children:g.jsx(xy,{className:tf["filter-chip-badge"],onClick:le,rightSection:Ce,size:"lg",children:q})}):$?g.jsx(iE,Object.assign({},xe,{searchable:!0},z,{className:De(ye,z.className),data:Z,onChange:se=>ne(se),ref:se=>{se&&(M.current[`${P.id}-${u??0}`]=se,z.ref&&(z.ref.current=se))},rightSection:!((i=te==null?void 0:te.toString())===null||i===void 0)&&i.length?Ce:void 0,style:xe.style})):I?g.jsx(hp,Object.assign({},xe,{clearable:!0,searchable:!0},H,{className:De(ye,H.className),clearButtonProps:{size:"md"},data:Z,ref:se=>{se&&(M.current[`${P.id}-${u??0}`]=se,H.ref&&(H.ref.current=se))},style:xe.style})):j?g.jsx(fM,Object.assign({},xe,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:h!=="popover"}},N,{className:De(ye,N.className),ref:se=>{se&&(M.current[`${P.id}-${u??0}`]=se,N.ref&&(N.ref.current=se))},style:xe.style})):W?g.jsx(P2,Object.assign({},xe,{onChange:se=>ne(se),rightSection:!((a=te==null?void 0:te.toString())===null||a===void 0)&&a.length?Ce:void 0},D,{className:De(ye,D.className),data:Z,ref:se=>{se&&(M.current[`${P.id}-${u??0}`]=se,D.ref&&(D.ref.current=se))},style:xe.style})):g.jsx(wd,Object.assign({},xe,{onChange:se=>ne(se.target.value),rightSection:!((l=te==null?void 0:te.toString())===null||l===void 0)&&l.length?Ce:void 0},V,{className:De(ye,V.className),mt:0,ref:se=>{se&&(M.current[`${P.id}-${u??0}`]=se,V.ref&&(V.ref.current=se))},style:xe.style}))},oye=t=>{var{header:e,table:n}=t,r=Ve(t,["header","table"]);return g.jsxs(J,Object.assign({},r,{className:De("mrt-filter-range-fields",rye.root,r.className),children:[g.jsx(__,{header:e,rangeFilterIndex:0,table:n}),g.jsx(__,{header:e,rangeFilterIndex:1,table:n})]}))};var sye={root:"MRT_FilterRangeSlider-module_root__uwYEk"};const iye=t=>{var e,{header:n,table:r}=t,o=Ve(t,["header","table"]);const{options:{mantineFilterRangeSliderProps:s},refs:{filterInputRefs:i}}=r,{column:a}=n,{columnDef:l}=a,c={column:a,table:r},u=Object.assign(Object.assign(Object.assign({},Se(s,c)),Se(l.mantineFilterRangeSliderProps,c)),o);let[d,f]=u.min!==void 0&&u.max!==void 0?[u.min,u.max]:(e=a.getFacetedMinMaxValues())!==null&&e!==void 0?e:[0,1];Array.isArray(d)&&(d=d[0]),Array.isArray(f)&&(f=f[0]),d===null&&(d=0),f===null&&(f=1);const[h,p]=C.useState([d,f]),m=a.getFilterValue(),v=C.useRef(!1);return C.useEffect(()=>{v.current&&(m===void 0?p([d,f]):Array.isArray(m)&&p(m)),v.current=!0},[m,d,f]),g.jsx(mE,Object.assign({className:De("mrt-filter-range-slider",sye.root),max:f,min:d,onChange:y=>{p(y)},onChangeEnd:y=>{Array.isArray(y)&&(y[0]<=d&&y[1]>=f?a.setFilterValue(void 0):a.setFilterValue(y))},value:h},u,{ref:y=>{y&&(i.current[`${a.id}-0`]=y,u!=null&&u.ref&&(u.ref=y))}}))};var aye={symbol:"MRT_FilterOptionMenu-module_symbol__a1Bsy"};const lye=t=>[{divider:!1,label:t.filterFuzzy,option:"fuzzy",symbol:"≈"},{divider:!1,label:t.filterContains,option:"contains",symbol:"*"},{divider:!1,label:t.filterStartsWith,option:"startsWith",symbol:"a"},{divider:!0,label:t.filterEndsWith,option:"endsWith",symbol:"z"},{divider:!1,label:t.filterEquals,option:"equals",symbol:"="},{divider:!0,label:t.filterNotEquals,option:"notEquals",symbol:"≠"},{divider:!1,label:t.filterBetween,option:"between",symbol:"⇿"},{divider:!0,label:t.filterBetweenInclusive,option:"betweenInclusive",symbol:"⬌"},{divider:!1,label:t.filterGreaterThan,option:"greaterThan",symbol:">"},{divider:!1,label:t.filterGreaterThanOrEqualTo,option:"greaterThanOrEqualTo",symbol:"≥"},{divider:!1,label:t.filterLessThan,option:"lessThan",symbol:"<"},{divider:!0,label:t.filterLessThanOrEqualTo,option:"lessThanOrEqualTo",symbol:"≤"},{divider:!1,label:t.filterEmpty,option:"empty",symbol:"∅"},{divider:!1,label:t.filterNotEmpty,option:"notEmpty",symbol:"!∅"}],$m=["between","betweenInclusive","inNumberRange"],$w=["empty","notEmpty"],cye=["arrIncludesSome","arrIncludesAll","arrIncludes"],uI=["range-slider","date-range","range"],b6=({header:t,onSelect:e,table:n})=>{var r,o,s,i;const{getState:a,options:{columnFilterModeOptions:l,globalFilterModeOptions:c,localization:u,renderColumnFilterModeMenuItems:d,renderGlobalFilterModeMenuItems:f},setColumnFilterFns:h,setGlobalFilterFn:p}=n,{globalFilterFn:m}=a(),{column:v}=t??{},{columnDef:y}=v??{},b=v==null?void 0:v.getFilterValue();let w=(r=y==null?void 0:y.columnFilterModeOptions)!==null&&r!==void 0?r:l;uI.includes(y==null?void 0:y.filterVariant)&&(w=[...$m,...w??[]].filter(M=>$m.includes(M)));const S=C.useMemo(()=>lye(u).filter(M=>y?w===void 0||(w==null?void 0:w.includes(M.option)):(!c||c.includes(M.option))&&["contains","fuzzy","startsWith"].includes(M.option)),[]),_=M=>{var T;const P=(T=y==null?void 0:y._filterFn)!==null&&T!==void 0?T:"";!t||!v?p(M):M!==P&&(h(A=>Object.assign(Object.assign({},A),{[t.id]:M})),$w.includes(M)?b!==" "&&!$w.includes(P)?v.setFilterValue(" "):b&&v.setFilterValue(b):(y==null?void 0:y.filterVariant)==="multi-select"||cye.includes(M)?b instanceof String||b!=null&&b.length?v.setFilterValue([]):b&&v.setFilterValue(b):uI.includes(y==null?void 0:y.filterVariant)||$m.includes(M)?!Array.isArray(b)||!(b!=null&&b.every(A=>A===""))&&!$m.includes(P)?v.setFilterValue(["",""]):v.setFilterValue(b):Array.isArray(b)?v.setFilterValue(""):b===" "&&$w.includes(P)?v.setFilterValue(void 0):v.setFilterValue(b)),e==null||e()},k=t&&y?y._filterFn:m;return g.jsx(We.Dropdown,{children:(i=t&&v&&y?(s=(o=y.renderColumnFilterModeMenuItems)===null||o===void 0?void 0:o.call(y,{column:v,internalFilterOptions:S,onSelectFilterMode:_,table:n}))!==null&&s!==void 0?s:d==null?void 0:d({column:v,internalFilterOptions:S,onSelectFilterMode:_,table:n}):f==null?void 0:f({internalFilterOptions:S,onSelectFilterMode:_,table:n}))!==null&&i!==void 0?i:S.map(({divider:M,label:T,option:P,symbol:A},L)=>g.jsxs(C.Fragment,{children:[g.jsx(We.Item,{color:P===k?"blue":void 0,leftSection:g.jsx("span",{className:aye.symbol,children:A}),onClick:()=>_(P),value:P,children:T}),M&&g.jsx(We.Divider,{})]},L))})},w6=t=>{var e,n,{header:r,table:o}=t,s=Ve(t,["header","table"]);const{getState:i,options:{columnFilterDisplayMode:a,columnFilterModeOptions:l,enableColumnFilterModes:c,icons:{IconFilterCog:u},localization:d},refs:{filterInputRefs:f}}=o,{showColumnFilters:h}=i(),{column:p}=r,{columnDef:m}=p,v=m._filterFn,y=(e=m==null?void 0:m.columnFilterModeOptions)!==null&&e!==void 0?e:l,b=c&&m.enableColumnFilterModes!==!1&&(y===void 0||!!(y!=null&&y.length));return g.jsx(ud,{in:h||a==="popover",children:g.jsxs(tn,Object.assign({direction:"column"},s,{children:[g.jsxs(tn,{align:"flex-end",children:[m.filterVariant==="checkbox"?g.jsx(nye,{column:p,table:o}):m.filterVariant==="range-slider"?g.jsx(iye,{header:r,table:o}):["date-range","range"].includes((n=m.filterVariant)!==null&&n!==void 0?n:"")||["between","betweenInclusive","inNumberRange"].includes(m._filterFn)?g.jsx(oye,{header:r,table:o}):g.jsx(__,{header:r,table:o}),b&&g.jsxs(We,{withinPortal:a!=="popover",children:[g.jsx(ut,{label:d.changeFilterMode,position:"bottom-start",withinPortal:!0,children:g.jsx(We.Target,{children:g.jsx(Ze,{"aria-label":d.changeFilterMode,color:"gray",size:"md",variant:"subtle",children:g.jsx(u,{})})})}),g.jsx(b6,{header:r,onSelect:()=>setTimeout(()=>{var w;return(w=f.current[`${p.id}-0`])===null||w===void 0?void 0:w.focus()},100),table:o})]})]}),b?g.jsx(es,{c:"dimmed",className:eye["filter-mode-label"],component:"label",children:d.filterMode.replace("{filterType}",yM(d,v))}):null]}))})};var uye={root:"MRT_TableHeadCellFilterLabel-module_root__Rur2R"};const dye=t=>{var e,n,r,{header:o,table:s}=t,i=Ve(t,["header","table"]);const{options:{columnFilterDisplayMode:a,icons:{IconFilter:l},localization:c},refs:{filterInputRefs:u},setShowColumnFilters:d}=s,{column:f}=o,{columnDef:h}=f,p=f.getFilterValue(),[m,v]=C.useState(!1),y=Array.isArray(p)&&p.some(Boolean)||!!p&&!Array.isArray(p),b=h.filterVariant==="range"||["between","betweenInclusive","inNumberRange"].includes(h._filterFn),w=h._filterFn,S=a==="popover"&&!y?(e=c.filterByColumn)===null||e===void 0?void 0:e.replace("{column}",String(h.header)):c.filteringByColumn.replace("{column}",String(h.header)).replace("{filterType}",yM(c,w)).replace("{filterValue}",`"${Array.isArray(f.getFilterValue())?f.getFilterValue().join(`" ${b?c.and:c.or} "`):f.getFilterValue()}"`).replace('" "',"");return g.jsx(g.Fragment,{children:g.jsxs(Mt,{keepMounted:h.filterVariant==="range-slider",onClose:()=>v(!1),opened:m,position:"top",shadow:"xl",width:360,withinPortal:!0,children:[g.jsx(To,{mounted:a==="popover"||!!f.getFilterValue()&&!b||b&&(!!(!((n=f.getFilterValue())===null||n===void 0)&&n[0])||!!(!((r=f.getFilterValue())===null||r===void 0)&&r[1])),transition:"scale",children:()=>g.jsx(Mt.Target,{children:g.jsx(ut,{disabled:m,label:S,multiline:!0,w:S.length>40?300:void 0,withinPortal:!0,children:g.jsx(Ze,Object.assign({className:De("mrt-table-head-cell-filter-label-icon",uye.root),size:18},jv("active",y),{onClick:_=>{_.stopPropagation(),a==="popover"?v(k=>!k):d(!0),setTimeout(()=>{const k=u.current[`${f.id}-0`];k==null||k.focus(),k==null||k.select()},100)}},i,{children:g.jsx(l,{size:"100%"})}))})})}),a==="popover"&&g.jsx(Mt.Dropdown,{onClick:_=>_.stopPropagation(),onKeyDown:_=>_.key==="Enter"&&v(!1),children:g.jsx(w6,{header:o,table:s})})]})})},fye=t=>{var{column:e,table:n,tableHeadCellRef:r}=t,o=Ve(t,["column","table","tableHeadCellRef"]);const{getState:s,options:{enableColumnOrdering:i,mantineColumnDragHandleProps:a},setColumnOrder:l,setDraggingColumn:c,setHoveredColumn:u}=n,{columnDef:d}=e,{columnOrder:f,draggingColumn:h,hoveredColumn:p}=s(),m={column:e,table:n},v=Object.assign(Object.assign(Object.assign({},Se(a,m)),Se(d.mantineColumnDragHandleProps,m)),o),y=w=>{var S;(S=v==null?void 0:v.onDragStart)===null||S===void 0||S.call(v,w),c(e),w.dataTransfer.setDragImage(r.current,0,0)},b=w=>{var S;(S=v==null?void 0:v.onDragEnd)===null||S===void 0||S.call(v,w),(p==null?void 0:p.id)==="drop-zone"?e.toggleGrouping():i&&p&&(p==null?void 0:p.id)!==(h==null?void 0:h.id)&&l(qB(e,p,f)),c(null),u(null)};return g.jsx(bM,{actionIconProps:v,onDragEnd:b,onDragStart:y,table:n})};var Fw={root:"MRT_TableHeadCellResizeHandle-module_root__paufe","root-ltr":"MRT_TableHeadCellResizeHandle-module_root-ltr__652AZ","root-rtl":"MRT_TableHeadCellResizeHandle-module_root-rtl__5VlSo","root-hide":"MRT_TableHeadCellResizeHandle-module_root-hide__-ILlD"};const hye=t=>{var e,{header:n,table:r}=t,o=Ve(t,["header","table"]);const{getState:s,options:{columnResizeDirection:i,columnResizeMode:a},setColumnSizingInfo:l}=r,{density:c}=s(),{column:u}=n,d=n.getResizeHandler(),f=u.getIsResizing()&&a==="onEnd"?`translateX(${(i==="rtl"?-1:1)*((e=s().columnSizingInfo.deltaOffset)!==null&&e!==void 0?e:0)}px)`:void 0;return g.jsx(J,Object.assign({onDoubleClick:()=>{l(h=>Object.assign(Object.assign({},h),{isResizingColumn:!1})),u.resetSize()},onMouseDown:d,onTouchStart:d,role:"separator"},o,{__vars:Object.assign({"--mrt-transform":f},o.__vars),className:De("mrt-table-head-cell-resize-handle",Fw.root,Fw[`root-${i}`],!n.subHeaders.length&&a==="onChange"&&Fw["root-hide"],c,o.className)}))};var dI={"sort-icon":"MRT_TableHeadCellSortLabel-module_sort-icon__zs1xA","multi-sort-indicator":"MRT_TableHeadCellSortLabel-module_multi-sort-indicator__MGBj2"};const pye=t=>{var{header:e,table:n}=t,r=Ve(t,["header","table"]);const{getState:o,options:{icons:{IconArrowsSort:s,IconSortAscending:i,IconSortDescending:a},localization:l}}=n,c=e.column,{columnDef:u}=c,{sorting:d}=o(),f=c.getIsSorted(),h=c.getSortIndex(),p=f?f==="desc"?l.sortedByColumnDesc.replace("{column}",u.header):l.sortedByColumnAsc.replace("{column}",u.header):c.getNextSortingOrder()==="desc"?l.sortByColumnDesc.replace("{column}",u.header):l.sortByColumnAsc.replace("{column}",u.header),m=g.jsx(Ze,Object.assign({"aria-label":p},jv("sorted",f),r,{className:De("mrt-table-head-sort-button",dI["sort-icon"],r.className),children:f==="desc"?g.jsx(a,{size:"100%"}):f==="asc"?g.jsx(i,{size:"100%"}):g.jsx(s,{size:"100%"})}));return g.jsx(ut,{label:p,openDelay:1e3,withinPortal:!0,children:d.length<2||h===-1?m:g.jsx(Y2,{className:De("mrt-table-head-multi-sort-indicator",dI["multi-sort-indicator"]),inline:!0,label:h+1,offset:4,children:m})})};var fI={left:"MRT_ColumnActionMenu-module_left__cfNmY",right:"MRT_ColumnActionMenu-module_right__-nK56"};const mye=t=>{var e,n,r,o,s,i,a,l,c,u,{header:d,table:f}=t,h=Ve(t,["header","table"]);const{getState:p,options:{columnFilterDisplayMode:m,enableColumnFilters:v,enableColumnPinning:y,enableColumnResizing:b,enableGrouping:w,enableHiding:S,enableSorting:_,enableSortingRemoval:k,icons:{IconArrowAutofitContent:M,IconBoxMultiple:T,IconClearAll:P,IconColumns:A,IconDotsVertical:L,IconEyeOff:V,IconFilter:H,IconFilterOff:z,IconPinned:N,IconPinnedOff:D,IconSortAscending:F,IconSortDescending:I},localization:$,mantineColumnActionsButtonProps:j,renderColumnActionsMenuItems:W},refs:{filterInputRefs:G},setColumnOrder:X,setColumnSizingInfo:q,setShowColumnFilters:B,toggleAllColumnsVisible:Q}=f,{column:Z}=d,{columnDef:oe}=Z,{columnSizing:te,columnVisibility:ne}=p(),pe={column:Z,table:f},ie=Object.assign(Object.assign({},Se(j,pe)),Se(oe.mantineColumnActionsButtonProps,pe)),le=()=>{Z.clearSorting()},ce=()=>{Z.toggleSorting(!1)},ye=()=>{Z.toggleSorting(!0)},xe=()=>{q(Ie=>Object.assign(Object.assign({},Ie),{isResizingColumn:!1})),Z.resetSize()},Ce=()=>{Z.toggleVisibility(!1)},se=Ie=>{Z.pin(Ie)},ue=()=>{Z.toggleGrouping(),X(Ie=>["mrt-row-expand",...Ie])},ve=()=>{Z.setFilterValue("")},Oe=()=>{B(!0),setTimeout(()=>{var Ie;return(Ie=G.current[`${Z.id}-0`])===null||Ie===void 0?void 0:Ie.focus()},100)},fe=()=>{Q(!0)},Me=g.jsxs(g.Fragment,{children:[_&&Z.getCanSort()&&g.jsxs(g.Fragment,{children:[k!==!1&&g.jsx(We.Item,{disabled:!Z.getIsSorted(),leftSection:g.jsx(P,{}),onClick:le,children:$.clearSort}),g.jsx(We.Item,{disabled:Z.getIsSorted()==="asc",leftSection:g.jsx(F,{}),onClick:ce,children:(e=$.sortByColumnAsc)===null||e===void 0?void 0:e.replace("{column}",String(oe.header))}),g.jsx(We.Item,{disabled:Z.getIsSorted()==="desc",leftSection:g.jsx(I,{}),onClick:ye,children:(n=$.sortByColumnDesc)===null||n===void 0?void 0:n.replace("{column}",String(oe.header))}),(v||w||S)&&g.jsx(We.Divider,{},3)]}),v&&m!=="popover"&&Z.getCanFilter()&&g.jsxs(g.Fragment,{children:[g.jsx(We.Item,{disabled:!Z.getFilterValue(),leftSection:g.jsx(z,{}),onClick:ve,children:$.clearFilter}),g.jsx(We.Item,{leftSection:g.jsx(H,{}),onClick:Oe,children:(r=$.filterByColumn)===null||r===void 0?void 0:r.replace("{column}",String(oe.header))}),(w||S)&&g.jsx(We.Divider,{},2)]}),w&&Z.getCanGroup()&&g.jsxs(g.Fragment,{children:[g.jsx(We.Item,{leftSection:g.jsx(T,{}),onClick:ue,children:(o=$[Z.getIsGrouped()?"ungroupByColumn":"groupByColumn"])===null||o===void 0?void 0:o.replace("{column}",String(oe.header))}),y&&g.jsx(We.Divider,{})]}),y&&Z.getCanPin()&&g.jsxs(g.Fragment,{children:[g.jsx(We.Item,{disabled:Z.getIsPinned()==="left"||!Z.getCanPin(),leftSection:g.jsx(N,{className:fI.left}),onClick:()=>se("left"),children:$.pinToLeft}),g.jsx(We.Item,{disabled:Z.getIsPinned()==="right"||!Z.getCanPin(),leftSection:g.jsx(N,{className:fI.right}),onClick:()=>se("right"),children:$.pinToRight}),g.jsx(We.Item,{disabled:!Z.getIsPinned(),leftSection:g.jsx(D,{}),onClick:()=>se(!1),children:$.unpin}),S&&g.jsx(We.Divider,{})]}),b&&Z.getCanResize()&&g.jsx(We.Item,{disabled:!te[Z.id],leftSection:g.jsx(M,{}),onClick:xe,children:$.resetColumnSize},0),S&&g.jsxs(g.Fragment,{children:[g.jsx(We.Item,{disabled:!Z.getCanHide(),leftSection:g.jsx(V,{}),onClick:Ce,children:(s=$.hideColumn)===null||s===void 0?void 0:s.replace("{column}",String(oe.header))},0),g.jsx(We.Item,{disabled:!Object.values(ne).filter(Ie=>!Ie).length,leftSection:g.jsx(A,{}),onClick:fe,children:(i=$.showAllColumns)===null||i===void 0?void 0:i.replace("{column}",String(oe.header))},1)]})]});return g.jsxs(We,Object.assign({closeOnItemClick:!0,position:"bottom-start",withinPortal:!0},h,{children:[g.jsx(ut,{label:(a=ie==null?void 0:ie.title)!==null&&a!==void 0?a:$.columnActions,openDelay:1e3,withinPortal:!0,children:g.jsx(We.Target,{children:g.jsx(Ze,Object.assign({"aria-label":$.columnActions,color:"gray",size:"sm",variant:"subtle"},ie,{children:g.jsx(L,{size:"100%"})}))})}),g.jsx(We.Dropdown,{children:(u=(c=(l=oe.renderColumnActionsMenuItems)===null||l===void 0?void 0:l.call(oe,{column:Z,internalColumnMenuItems:Me,table:f}))!==null&&c!==void 0?c:W==null?void 0:W({column:Z,internalColumnMenuItems:Me,table:f}))!==null&&u!==void 0?u:Me})]}))},gye=t=>{var e,n,r,o,s,i,{columnVirtualizer:a,header:l,renderedHeaderIndex:c=0,table:u}=t,d=Ve(t,["columnVirtualizer","header","renderedHeaderIndex","table"]);const f=Lr(),{getState:h,options:{columnFilterDisplayMode:p,columnResizeDirection:m,columnResizeMode:v,enableColumnActions:y,enableColumnDragging:b,enableColumnOrdering:w,enableColumnPinning:S,enableGrouping:_,enableMultiSort:k,layoutMode:M,mantineTableHeadCellProps:T},refs:{tableHeadCellRefs:P},setHoveredColumn:A}=u,{columnSizingInfo:L,density:V,draggingColumn:H,grouping:z,hoveredColumn:N}=h(),{column:D}=l,{columnDef:F}=D,{columnDefType:I}=F,$={column:D,table:u},j=Object.assign(Object.assign(Object.assign({},Se(T,$)),Se(F.mantineTableHeadCellProps,$)),d),W={minWidth:`max(calc(var(--header-${qo(l==null?void 0:l.id)}-size) * 1px), ${(e=F.minSize)!==null&&e!==void 0?e:30}px)`,width:`calc(var(--header-${qo(l.id)}-size) * 1px)`};M==="grid"?W.flex=`${[0,!1].includes(F.grow)?0:`var(--header-${qo(l.id)}-size)`} 0 auto`:M==="grid-no-grow"&&(W.flex=`${+(F.grow||0)} 0 auto`);const G=S&&F.columnDefType!=="group"&&D.getIsPinned(),X=(H==null?void 0:H.id)===D.id,q=(N==null?void 0:N.id)===D.id,B=(y||F.enableColumnActions)&&F.enableColumnActions!==!1,Q=b!==!1&&F.enableColumnDragging!==!1&&(b||w&&F.enableColumnOrdering!==!1||_&&F.enableGrouping!==!1&&!z.includes(D.id)),Z=C.useMemo(()=>{let ne=0;return D.getCanSort()&&ne++,B&&(ne+=1.75),Q&&(ne+=1.25),ne},[B,Q]),oe=ne=>{_&&(N==null?void 0:N.id)==="drop-zone"&&A(null),w&&H&&I!=="group"&&A(F.enableColumnOrdering!==!1?D:null)},te=(F==null?void 0:F.Header)instanceof Function?(n=F==null?void 0:F.Header)===null||n===void 0?void 0:n.call(F,{column:D,header:l,table:u}):(r=F==null?void 0:F.Header)!==null&&r!==void 0?r:F.header;return g.jsxs(Wu,Object.assign({colSpan:l.colSpan,"data-column-pinned":G||void 0,"data-dragging-column":X||void 0,"data-first-right-pinned":G==="right"&&D.getIsLastColumn(G)||void 0,"data-hovered-column-target":q||void 0,"data-index":c,"data-last-left-pinned":G==="left"&&D.getIsLastColumn(G)||void 0,"data-resizing":v==="onChange"&&(L==null?void 0:L.isResizingColumn)===D.id&&m||void 0},j,{__vars:{"--mrt-table-cell-left":G==="left"?`${D.getStart(G)}`:void 0,"--mrt-table-cell-right":G==="right"?`${D.getAfter(G)}`:void 0,"--mrt-table-head-cell-padding":V==="xl"?"23":V==="md"?"16":"10"},align:I==="group"?"center":f.dir==="rtl"?"right":"left",className:De(An.root,(M==null?void 0:M.startsWith("grid"))&&An["root-grid"],k&&D.getCanSort()&&An["root-no-select"],a&&An["root-virtualized"],j==null?void 0:j.className),onDragEnter:oe,ref:ne=>{var pe;ne&&(P.current[D.id]=ne,I!=="group"&&((pe=a==null?void 0:a.measureElement)===null||pe===void 0||pe.call(a,ne)))},style:ne=>Object.assign(Object.assign({},W),Se(j==null?void 0:j.style,ne)),children:[l.isPlaceholder?null:(o=j.children)!==null&&o!==void 0?o:g.jsxs(tn,{className:De("mrt-table-head-cell-content",An.content,(I==="group"||(j==null?void 0:j.align)==="center")&&An["content-center"],(j==null?void 0:j.align)==="right"&&An["content-right"],D.getCanResize()&&An["content-spaced"]),children:[g.jsxs(tn,{__vars:{"--mrt-table-head-cell-labels-padding-left":`${Z}`},className:De("mrt-table-head-cell-labels",An.labels,D.getCanSort()&&I!=="group"&&An["labels-sortable"],(j==null?void 0:j.align)==="right"?An["labels-right"]:(j==null?void 0:j.align)==="center"&&An["labels-center"],I==="data"&&An["labels-data"]),onClick:D.getToggleSortingHandler(),children:[g.jsx(tn,{className:De("mrt-table-head-cell-content-wrapper",An["content-wrapper"],I==="data"&&An["content-wrapper-hidden-overflow"],((i=(s=F.header)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)<20&&An["content-wrapper-nowrap"]),children:te}),D.getCanFilter()&&g.jsx(dye,{header:l,table:u}),D.getCanSort()&&g.jsx(pye,{header:l,table:u})]}),I!=="group"&&g.jsxs(tn,{className:De("mrt-table-head-cell-content-actions",An["content-actions"]),children:[Q&&g.jsx(fye,{column:D,table:u,tableHeadCellRef:{current:P.current[D.id]}}),B&&g.jsx(mye,{header:l,table:u})]}),D.getCanResize()&&g.jsx(hye,{header:l,table:u})]}),p==="subheader"&&D.getCanFilter()&&g.jsx(w6,{header:l,table:u})]}))},vye=t=>{var{columnVirtualizer:e,headerGroup:n,table:r}=t,o=Ve(t,["columnVirtualizer","headerGroup","table"]);const{getState:s,options:{enableStickyHeader:i,layoutMode:a,mantineTableHeadRowProps:l}}=r,{isFullScreen:c}=s(),{virtualColumns:u,virtualPaddingLeft:d,virtualPaddingRight:f}=e??{},h=Object.assign(Object.assign({},Se(l,{headerGroup:n,table:r})),o);return g.jsxs(ci,Object.assign({},h,{className:De(jw.root,(i||c)&&jw.sticky,(a==null?void 0:a.startsWith("grid"))&&jw["layout-mode-grid"],h==null?void 0:h.className),children:[d?g.jsx(J,{component:"th",display:"flex",w:d}):null,(u??n.headers).map((p,m)=>{let v=p;return e&&(m=p.index,v=n.headers[m]),g.jsx(gye,{columnVirtualizer:e,header:v,renderedHeaderIndex:m,table:r},v.id)}),f?g.jsx(J,{component:"th",display:"flex",w:f}):null]}))};var Nc={alert:"MRT_ToolbarAlertBanner-module_alert__PAhUK","alert-stacked":"MRT_ToolbarAlertBanner-module_alert-stacked__HR7Nq","alert-bottom":"MRT_ToolbarAlertBanner-module_alert-bottom__u9L-S","alert-badge":"MRT_ToolbarAlertBanner-module_alert-badge__GwDmX","toolbar-alert":"MRT_ToolbarAlertBanner-module_toolbar-alert__3sJGU","head-overlay":"MRT_ToolbarAlertBanner-module_head-overlay__Hw7jK"};const wM=t=>{var e,n,r,{stackAlertBanner:o,table:s}=t,i=Ve(t,["stackAlertBanner","table"]);const{getFilteredSelectedRowModel:a,getPrePaginationRowModel:l,getState:c,options:{enableRowSelection:u,enableSelectAll:d,icons:{IconX:f},localization:h,mantineToolbarAlertBannerBadgeProps:p,mantineToolbarAlertBannerProps:m,manualPagination:v,positionToolbarAlertBanner:y,renderToolbarAlertBannerContent:b,rowCount:w}}=s,{density:S,grouping:_,rowSelection:k,showAlertBanner:M}=c(),T=Object.assign(Object.assign({},Se(m,{table:s})),i),P=Se(p,{table:s}),A=w??l().flatRows.length,L=C.useMemo(()=>v?Object.values(k).filter(Boolean).length:a().rows.length,[k,A,v]),V=L?g.jsxs(tn,{align:"center",gap:"sm",children:[(n=(e=h.selectedCountOfRowCountRowsSelected)===null||e===void 0?void 0:e.replace("{selectedCount}",L.toString()))===null||n===void 0?void 0:n.replace("{rowCount}",A.toString()),g.jsx(Uo,{onClick:z=>r6({table:s})(z,!1,!0),size:"compact-xs",variant:"subtle",children:h.clearSelection})]}):null,H=_.length>0?g.jsxs(tn,{children:[h.groupedBy," ",_.map((z,N)=>g.jsxs(C.Fragment,{children:[N>0?h.thenBy:"",g.jsxs(xy,Object.assign({className:Nc["alert-badge"],rightSection:g.jsx(Ze,{color:"white",onClick:()=>s.getColumn(z).toggleGrouping(),size:"xs",variant:"subtle",children:g.jsx(f,{style:{transform:"scale(0.8)"}})}),variant:"filled"},P,{children:[s.getColumn(z).columnDef.header," "]}))]},`${N}-${z}`))]}):null;return g.jsx(ud,{in:M||!!V||!!H,transitionDuration:o?200:0,children:g.jsx(l2,Object.assign({color:"blue",icon:!1},T,{className:De(Nc.alert,o&&!y&&Nc["alert-stacked"],!o&&y==="bottom"&&Nc["alert-bottom"],T==null?void 0:T.className),children:(r=b==null?void 0:b({groupedAlert:H,selectedAlert:V,table:s}))!==null&&r!==void 0?r:g.jsxs(tn,{className:De(Nc["toolbar-alert"],y==="head-overlay"&&Nc["head-overlay"],S),children:[u&&d&&y==="head-overlay"&&g.jsx(S_,{table:s}),g.jsxs(Ky,{children:[T==null?void 0:T.children,V,H]})]})}))})},yye=t=>{var{columnVirtualizer:e,table:n}=t,r=Ve(t,["columnVirtualizer","table"]);const{getHeaderGroups:o,getSelectedRowModel:s,getState:i,options:{enableStickyHeader:a,layoutMode:l,mantineTableHeadProps:c,positionToolbarAlertBanner:u},refs:{tableHeadRef:d}}=n,{isFullScreen:f,showAlertBanner:h}=i(),p=Object.assign(Object.assign({},Se(c,{table:n})),r),m=a||f;return g.jsx(bE,Object.assign({},p,{className:De(Ni.root,l!=null&&l.startsWith("grid")?Ni["root-grid"]:Ni["root-table-row-group"],m&&Ni["root-sticky"],p==null?void 0:p.className),pos:m&&(l!=null&&l.startsWith("grid"))?"sticky":"relative",ref:v=>{d.current=v,p!=null&&p.ref&&(p.ref.current=v)},children:u==="head-overlay"&&(h||s().rows.length>0)?g.jsx(ci,{className:De(Ni["banner-tr"],(l==null?void 0:l.startsWith("grid"))&&Ni.grid),children:g.jsx(Wu,{className:De(Ni["banner-th"],(l==null?void 0:l.startsWith("grid"))&&Ni.grid),colSpan:n.getVisibleLeafColumns().length,children:g.jsx(wM,{table:n})})}):o().map(v=>g.jsx(vye,{columnVirtualizer:e,headerGroup:v,table:n},v.id))}))},bye=t=>{var{table:e}=t,n=Ve(t,["table"]);const{getFlatHeaders:r,getState:o,options:{columns:s,enableTableFooter:i,enableTableHead:a,layoutMode:l,mantineTableProps:c,memoMode:u}}=e,{columnSizing:d,columnSizingInfo:f,columnVisibility:h,density:p}=o(),m=Object.assign(Object.assign({highlightOnHover:!0,horizontalSpacing:p,verticalSpacing:p},Se(c,{table:e})),n),v=C.useMemo(()=>{const _=r(),k={};for(let M=0;M<_.length;M++){const T=_[M],P=T.getSize();k[`--header-${qo(T.id)}-size`]=P,k[`--col-${qo(T.column.id)}-size`]=P}return k},[s,d,f,h]),b={columnVirtualizer:B0e(e),table:e},{colorScheme:w}=o3(),{stripedColor:S}=m;return g.jsxs(Po,Object.assign({className:De("mrt-table",aI.root,(l==null?void 0:l.startsWith("grid"))&&aI["root-grid"],m.className)},m,{__vars:Object.assign(Object.assign(Object.assign({},v),{"--mrt-striped-row-background-color":S,"--mrt-striped-row-hover-background-color":S?w==="dark"?LZ(S,.08):uf(S,.12):void 0}),m.__vars),children:[a&&g.jsx(yye,Object.assign({},b)),u==="table-body"||f.isResizingColumn?g.jsx(X0e,Object.assign({},b,{tableProps:m})):g.jsx(y6,Object.assign({},b,{tableProps:m})),i&&g.jsx(Z0e,Object.assign({},b))]}))},wye=t=>{var e,{open:n,table:r}=t,o=Ve(t,["open","table"]);const{getState:s,options:{mantineCreateRowModalProps:i,mantineEditRowModalProps:a,onCreatingRowCancel:l,onEditingRowCancel:c,renderCreateRowModalContent:u,renderEditRowModalContent:d},setCreatingRow:f,setEditingRow:h}=r,{creatingRow:p,editingRow:m}=s(),v=p??m,y={row:v,table:r},b=Object.assign(Object.assign(Object.assign({},Se(a,y)),p&&Se(i,y)),o),w=v.getAllCells().filter(_=>_.column.columnDef.columnDefType==="data").map(_=>g.jsx(g6,{cell:_,table:r},_.id)),S=()=>{var _;p?(l==null||l({row:v,table:r}),f(null)):(c==null||c({row:v,table:r}),h(null)),v._valuesCache={},(_=b.onClose)===null||_===void 0||_.call(b)};return C.createElement(is,Object.assign({opened:n,withCloseButton:!1},b,{key:v.id,onClose:S}),(e=p&&(u==null?void 0:u({internalEditComponents:w,row:v,table:r}))||(d==null?void 0:d({internalEditComponents:w,row:v,table:r})))!==null&&e!==void 0?e:g.jsxs(g.Fragment,{children:[g.jsx("form",{onSubmit:_=>_.preventDefault(),children:g.jsx(Ky,{gap:"lg",pb:24,pt:16,children:w})}),g.jsx(tn,{justify:"flex-end",children:g.jsx(h6,{row:v,table:r,variant:"text"})})]}))},xye=typeof window<"u"?C.useLayoutEffect:C.useEffect,Sye=t=>{var{table:e}=t,n=Ve(t,["table"]);const{getState:r,options:{createDisplayMode:o,editDisplayMode:s,enableStickyHeader:i,mantineLoadingOverlayProps:a,mantineTableContainerProps:l},refs:{bottomToolbarRef:c,tableContainerRef:u,topToolbarRef:d}}=e,{creatingRow:f,editingRow:h,isFullScreen:p,isLoading:m,showLoadingOverlay:v}=r(),[y,b]=C.useState(0),w=Object.assign(Object.assign({},Se(l,{table:e})),n),S=Se(a,{table:e});xye(()=>{var M,T,P,A;const L=typeof document<"u"&&(T=(M=d.current)===null||M===void 0?void 0:M.offsetHeight)!==null&&T!==void 0?T:0,V=typeof document<"u"&&(A=(P=c==null?void 0:c.current)===null||P===void 0?void 0:P.offsetHeight)!==null&&A!==void 0?A:0;b(L+V)});const _=o==="modal"&&f,k=s==="modal"&&h;return g.jsxs(J,Object.assign({},w,{__vars:Object.assign({"--mrt-top-toolbar-height":`${y}`},w==null?void 0:w.__vars),className:De("mrt-table-container",Pw.root,i&&Pw["root-sticky"],p&&Pw["root-fullscreen"],w==null?void 0:w.className),ref:M=>{M&&(u.current=M,w!=null&&w.ref&&(w.ref.current=M))},children:[g.jsx(Q2,Object.assign({visible:m||v,zIndex:2},S)),g.jsx(bye,{table:e}),(_||k)&&g.jsx(wye,{open:!0,table:e})]}))};var nf={root:"MRT_BottomToolbar-module_root__VDeWo","root-fullscreen":"MRT_BottomToolbar-module_root-fullscreen__esE15","custom-toolbar-container":"MRT_BottomToolbar-module_custom-toolbar-container__XcDRF","paginator-container":"MRT_BottomToolbar-module_paginator-container__A3eWY","paginator-container-alert-banner":"MRT_BottomToolbar-module_paginator-container-alert-banner__gyqtO"},x6={"common-toolbar-styles":"common-styles-module_common-toolbar-styles__DnjR8"},hI={collapse:"MRT_ProgressBar-module_collapse__rOLJH","collapse-top":"MRT_ProgressBar-module_collapse-top__oCi0h"};const S6=t=>{var{isTopToolbar:e,table:n}=t,r=Ve(t,["isTopToolbar","table"]);const{getState:o,options:{mantineProgressProps:s}}=n,{isSaving:i,showProgressBars:a}=o(),l=Object.assign(Object.assign({},Se(s,{isTopToolbar:e,table:n})),r);return g.jsx(ud,{className:De(hI.collapse,e&&hI["collapse-top"]),in:i||a,children:g.jsx(yd,Object.assign({animated:!0,"aria-busy":"true","aria-label":"Loading",radius:0,value:100},l))})};var zw={root:"MRT_TablePagination-module_root__yZ8pm",pagesize:"MRT_TablePagination-module_pagesize__-vmTn","with-top-margin":"MRT_TablePagination-module_with-top-margin__aM5-m"};const pI=[5,10,15,20,25,30,50,100].map(t=>t.toString()),_6=t=>{var e,{position:n="bottom",table:r}=t,o=Ve(t,["position","table"]);const{getPrePaginationRowModel:s,getState:i,options:{enableToolbarInternalActions:a,icons:{IconChevronLeft:l,IconChevronLeftPipe:c,IconChevronRight:u,IconChevronRightPipe:d},localization:f,mantinePaginationProps:h,paginationDisplayMode:p,rowCount:m},setPageIndex:v,setPageSize:y}=r,{pagination:{pageIndex:b=0,pageSize:w=10},showGlobalFilter:S}=i(),_=Object.assign(Object.assign({},Se(h,{table:r})),o),k=m??s().rows.length,M=Math.ceil(k/w),T=M>2,P=b*w,A=Math.min(b*w+w,k),L=_??{},{rowsPerPageOptions:V=pI,showRowsPerPage:H=!0,withEdges:z=T}=L,N=Ve(L,["rowsPerPageOptions","showRowsPerPage","withEdges"]),D=n==="top"&&a&&!S;return g.jsxs(J,{className:De("mrt-table-pagination",zw.root,D&&zw["with-top-margin"]),children:[(_==null?void 0:_.showRowsPerPage)!==!1&&g.jsxs(Bu,{gap:"xs",children:[g.jsx(es,{id:"rpp-label",children:f.rowsPerPage}),g.jsx(hp,{allowDeselect:!1,"aria-labelledby":"rpp-label",className:zw.pagesize,data:(e=_==null?void 0:_.rowsPerPageOptions)!==null&&e!==void 0?e:pI,onChange:F=>y(+F),value:w.toString()})]}),p==="pages"?g.jsx(as,Object.assign({firstIcon:c,lastIcon:d,nextIcon:u,onChange:F=>v(F-1),previousIcon:l,total:M,value:b+1,withEdges:z},N)):p==="default"?g.jsxs(g.Fragment,{children:[g.jsx(es,{children:`${A===0?0:(P+1).toLocaleString()}-${A.toLocaleString()} ${f.of} ${k.toLocaleString()}`}),g.jsxs(Bu,{gap:6,children:[z&&g.jsx(Ze,{"aria-label":f.goToFirstPage,color:"gray",disabled:b<=0,onClick:()=>v(0),variant:"subtle",children:g.jsx(c,{})}),g.jsx(Ze,{"aria-label":f.goToPreviousPage,color:"gray",disabled:b<=0,onClick:()=>v(b-1),variant:"subtle",children:g.jsx(l,{})}),g.jsx(Ze,{"aria-label":f.goToNextPage,color:"gray",disabled:A>=k,onClick:()=>v(b+1),variant:"subtle",children:g.jsx(u,{})}),z&&g.jsx(Ze,{"aria-label":f.goToLastPage,color:"gray",disabled:A>=k,onClick:()=>v(M-1),variant:"subtle",children:g.jsx(d,{})})]})]}):null]})};var mI={root:"MRT_ToolbarDropZone-module_root__eGTXb",hovered:"MRT_ToolbarDropZone-module_hovered__g7PeJ"};const C6=t=>{var{table:e}=t,n=Ve(t,["table"]);const{getState:r,options:{enableGrouping:o,localization:s},setHoveredColumn:i,setShowToolbarDropZone:a}=e,{draggingColumn:l,grouping:c,hoveredColumn:u,showToolbarDropZone:d}=r(),f=h=>{i({id:"drop-zone"})};return C.useEffect(()=>{var h;((h=e.options.state)===null||h===void 0?void 0:h.showToolbarDropZone)!==void 0&&a(!!o&&!!l&&l.columnDef.enableGrouping!==!1&&!c.includes(l.id))},[o,l,c]),g.jsx(To,{mounted:d,transition:"fade",children:()=>{var h,p;return g.jsx(tn,Object.assign({className:De("mrt-toolbar-dropzone",mI.root,(u==null?void 0:u.id)==="drop-zone"&&mI.hovered),onDragEnter:f},n,{children:g.jsx(es,{children:s.dropToGroupBy.replace("{column}",(p=(h=l==null?void 0:l.columnDef)===null||h===void 0?void 0:h.header)!==null&&p!==void 0?p:"")})}))}})},_ye=t=>{var{table:e}=t,n=Ve(t,["table"]);const{getState:r,options:{enablePagination:o,mantineBottomToolbarProps:s,positionPagination:i,positionToolbarAlertBanner:a,positionToolbarDropZone:l,renderBottomToolbarCustomActions:c},refs:{bottomToolbarRef:u}}=e,{isFullScreen:d}=r(),f=ph("(max-width: 720px)"),h=Object.assign(Object.assign({},Se(s,{table:e})),n),p=f||!!c;return g.jsxs(J,Object.assign({},h,{className:De("mrt-bottom-toolbar",nf.root,x6["common-toolbar-styles"],d&&nf["root-fullscreen"],h==null?void 0:h.className),ref:m=>{m&&(u.current=m,h!=null&&h.ref&&(h.ref.current=m))},children:[g.jsx(S6,{isTopToolbar:!1,table:e}),a==="bottom"&&g.jsx(wM,{stackAlertBanner:p,table:e}),["both","bottom"].includes(l??"")&&g.jsx(C6,{table:e}),g.jsxs(J,{className:nf["custom-toolbar-container"],children:[c?c({table:e}):g.jsx("span",{}),g.jsx(J,{className:De(nf["paginator-container"],p&&nf["paginator-container-alert-banner"]),children:o&&["both","bottom"].includes(i??"")&&g.jsx(_6,{position:"bottom",table:e})})]})]}))};var Fm={root:"MRT_TopToolbar-module_root__r4-V9","root-fullscreen":"MRT_TopToolbar-module_root-fullscreen__3itT8","actions-container":"MRT_TopToolbar-module_actions-container__-uL0u","actions-container-stack-alert":"MRT_TopToolbar-module_actions-container-stack-alert__OYDL6"},Cye={root:"MRT_ToolbarInternalButtons-module_root__NKoUG"},gI={root:"MRT_ShowHideColumnsMenu-module_root__2UWak",content:"MRT_ShowHideColumnsMenu-module_content__ehkWQ"},Lc={root:"MRT_ShowHideColumnsMenuItems-module_root__wYgv-",menu:"MRT_ShowHideColumnsMenuItems-module_menu__CeATR",grab:"MRT_ShowHideColumnsMenuItems-module_grab__a-d-y",pin:"MRT_ShowHideColumnsMenuItems-module_pin__P437b",switch:"MRT_ShowHideColumnsMenuItems-module_switch__tMsdt",header:"MRT_ShowHideColumnsMenuItems-module_header__xVkKb"},Bw={root:"MRT_ColumnPinningButtons-module_root__scTtW",left:"MRT_ColumnPinningButtons-module_left__W6Aog",right:"MRT_ColumnPinningButtons-module_right__7AJE3"};const kye=({column:t,table:e})=>{const{options:{icons:{IconPinned:n,IconPinnedOff:r},localization:o}}=e;return g.jsx(tn,{className:De("mrt-column-pinning-buttons",Bw.root),children:t.getIsPinned()?g.jsx(ut,{label:o.unpin,withinPortal:!0,children:g.jsx(Ze,{color:"gray",onClick:()=>t.pin(!1),size:"md",variant:"subtle",children:g.jsx(r,{})})}):g.jsxs(g.Fragment,{children:[g.jsx(ut,{label:o.pinToLeft,withinPortal:!0,children:g.jsx(Ze,{color:"gray",onClick:()=>t.pin("left"),size:"md",variant:"subtle",children:g.jsx(n,{className:Bw.left})})}),g.jsx(ut,{label:o.pinToRight,withinPortal:!0,children:g.jsx(Ze,{color:"gray",onClick:()=>t.pin("right"),size:"md",variant:"subtle",children:g.jsx(n,{className:Bw.right})})})]})})},k6=({allColumns:t,column:e,hoveredColumn:n,setHoveredColumn:r,table:o})=>{var s;const i=Xt(),{getState:a,options:{enableColumnOrdering:l,enableColumnPinning:c,enableHiding:u,localization:d},setColumnOrder:f}=o,{columnOrder:h}=a(),{columnDef:p}=e,{columnDefType:m}=p,v=m!=="group"&&e.getIsVisible()||m==="group"&&e.getLeafColumns().some(T=>T.getIsVisible()),y=T=>{var P,A;m==="group"?(A=(P=T==null?void 0:T.columns)===null||P===void 0?void 0:P.forEach)===null||A===void 0||A.call(P,L=>{L.toggleVisibility(!v)}):T.toggleVisibility()},b=C.useRef(null),[w,S]=C.useState(!1),_=T=>{S(!0),T.dataTransfer.setDragImage(b.current,0,0)},k=T=>{S(!1),r(null),n&&f(qB(e,n,h))},M=T=>{!w&&p.enableColumnOrdering!==!1&&r(e)};return!p.header||p.visibleInShowHideMenu===!1?null:g.jsxs(g.Fragment,{children:[g.jsx(We.Item,Object.assign({className:Lc.root,component:"span",onDragEnter:M,ref:b,style:{"--_column-depth":`${(e.depth+.5)*2}rem`,"--_hover-color":v0e(i)}},jv("dragging",w),jv("order-hovered",(n==null?void 0:n.id)===e.id),{children:g.jsxs(J,{className:Lc.menu,children:[m!=="group"&&l&&!t.some(T=>T.columnDef.columnDefType==="group")&&(p.enableColumnOrdering!==!1?g.jsx(bM,{onDragEnd:k,onDragStart:_,table:o}):g.jsx(J,{className:Lc.grab})),c&&(e.getCanPin()?g.jsx(kye,{column:e,table:o}):g.jsx(J,{className:Lc.pin})),u?g.jsx(ut,{label:d.toggleVisibility,openDelay:1e3,withinPortal:!0,children:g.jsx(pp,{checked:v,className:Lc.switch,disabled:!e.getCanHide(),label:p.header,onChange:()=>y(e)})}):g.jsx(es,{className:Lc.header,children:p.header})]})})),(s=e.columns)===null||s===void 0?void 0:s.map((T,P)=>g.jsx(k6,{allColumns:t,column:T,hoveredColumn:n,setHoveredColumn:r,table:o},`${P}-${T.id}`))]})},Eye=({table:t})=>{const{getAllColumns:e,getAllLeafColumns:n,getCenterLeafColumns:r,getIsAllColumnsVisible:o,getIsSomeColumnsPinned:s,getIsSomeColumnsVisible:i,getLeftLeafColumns:a,getRightLeafColumns:l,getState:c,options:{enableColumnOrdering:u,enableColumnPinning:d,enableHiding:f,localization:h}}=t,{columnOrder:p,columnPinning:m}=c(),v=S=>{n().filter(_=>_.columnDef.enableHiding!==!1).forEach(_=>_.toggleVisibility(S))},y=C.useMemo(()=>{const S=e();return p.length>0&&!S.some(_=>_.columnDef.columnDefType==="group")?[...a(),...Array.from(new Set(p)).map(_=>r().find(k=>(k==null?void 0:k.id)===_)),...l()].filter(Boolean):S},[p,m,e(),r(),a(),l()]),[b,w]=C.useState(null);return g.jsxs(We.Dropdown,{className:De("mrt-show-hide-columns-menu",gI.root),children:[g.jsxs(tn,{className:gI.content,children:[f&&g.jsx(Uo,{disabled:!i(),onClick:()=>v(!1),variant:"subtle",children:h.hideAll}),u&&g.jsx(Uo,{onClick:()=>t.setColumnOrder(mM(t.options)),variant:"subtle",children:h.resetOrder}),d&&g.jsx(Uo,{disabled:!s(),onClick:()=>t.resetColumnPinning(!0),variant:"subtle",children:h.unpinAll}),f&&g.jsx(Uo,{disabled:o(),onClick:()=>v(!0),variant:"subtle",children:h.showAll})]}),g.jsx(V2,{}),y.map((S,_)=>g.jsx(k6,{allColumns:y,column:S,hoveredColumn:b,setHoveredColumn:w,table:t},`${_}-${S.id}`))]})},Mye=t=>{var{table:e,title:n}=t,r=Ve(t,["table","title"]);const{icons:{IconColumns:o},localization:{showHideColumns:s}}=e.options;return g.jsxs(We,{closeOnItemClick:!1,withinPortal:!0,children:[g.jsx(ut,{label:n??s,withinPortal:!0,children:g.jsx(We.Target,{children:g.jsx(Ze,Object.assign({"aria-label":n??s,color:"gray",size:"lg",variant:"subtle"},r,{children:g.jsx(o,{})}))})}),g.jsx(Eye,{table:e})]})},Tye={md:"xs",xl:"md",xs:"xl"},Rye=t=>{var{table:{getState:e,options:{icons:{IconBaselineDensityLarge:n,IconBaselineDensityMedium:r,IconBaselineDensitySmall:o},localization:{toggleDensity:s}},setDensity:i},title:a}=t,l=Ve(t,["table","title"]);const{density:c}=e();return g.jsx(ut,{label:a??s,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":a??s,color:"gray",onClick:()=>i(u=>Tye[u]),size:"lg",variant:"subtle"},l,{children:c==="xs"?g.jsx(o,{}):c==="md"?g.jsx(r,{}):g.jsx(n,{})}))})},Oye=t=>{var{table:{getState:e,options:{icons:{IconFilter:n,IconFilterOff:r},localization:{showHideFilters:o}},setShowColumnFilters:s},title:i}=t,a=Ve(t,["table","title"]);const{showColumnFilters:l}=e();return g.jsx(ut,{label:i??o,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":i??o,color:"gray",onClick:()=>s(c=>!c),size:"lg",variant:"subtle"},a,{children:l?g.jsx(r,{}):g.jsx(n,{})}))})},Pye=t=>{var{table:{getState:e,options:{icons:{IconMaximize:n,IconMinimize:r},localization:{toggleFullScreen:o}},setIsFullScreen:s},title:i}=t,a=Ve(t,["table","title"]);const{isFullScreen:l}=e(),[c,u]=C.useState(!1),d=()=>{u(!1),s(f=>!f)};return g.jsx(ut,{label:i??o,opened:c,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":i??o,color:"gray",onClick:d,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),size:"lg",variant:"subtle"},a,{children:l?g.jsx(r,{}):g.jsx(n,{})}))})},Aye=t=>{var{table:{getState:e,options:{icons:{IconSearch:n,IconSearchOff:r},localization:{showHideSearch:o}},refs:{searchInputRef:s},setShowGlobalFilter:i},title:a}=t,l=Ve(t,["table","title"]);const{globalFilter:c,showGlobalFilter:u}=e(),d=()=>{i(!u),setTimeout(()=>{var f;return(f=s.current)===null||f===void 0?void 0:f.focus()},100)};return g.jsx(ut,{label:a??o,withinPortal:!0,children:g.jsx(Ze,Object.assign({"aria-label":a??o,color:"gray",disabled:!!c,onClick:d,size:"lg",variant:"subtle"},l,{children:u?g.jsx(r,{}):g.jsx(n,{})}))})},Dye=t=>{var e,{table:n}=t,r=Ve(t,["table"]);const{options:{columnFilterDisplayMode:o,enableColumnFilters:s,enableColumnOrdering:i,enableColumnPinning:a,enableDensityToggle:l,enableFilters:c,enableFullScreenToggle:u,enableGlobalFilter:d,enableHiding:f,initialState:h,renderToolbarInternalActions:p}}=n;return g.jsx(tn,Object.assign({},r,{className:De("mrt-toolbar-internal-buttons",Cye.root,r==null?void 0:r.className),children:(e=p==null?void 0:p({table:n}))!==null&&e!==void 0?e:g.jsxs(g.Fragment,{children:[c&&d&&!(h!=null&&h.showGlobalFilter)&&g.jsx(Aye,{table:n}),c&&s&&o!=="popover"&&g.jsx(Oye,{table:n}),(f||i||a)&&g.jsx(Mye,{table:n}),l&&g.jsx(Rye,{table:n}),u&&g.jsx(Pye,{table:n})]})}))};var vI={root:"MRT_GlobalFilterTextInput-module_root__Xmcpv",collapse:"MRT_GlobalFilterTextInput-module_collapse__v311d"};const Vw=t=>{var{table:e}=t,n=Ve(t,["table"]);const{getState:r,options:{enableGlobalFilterModes:o,icons:{IconSearch:s,IconX:i},localization:a,mantineSearchTextInputProps:l,manualFiltering:c},refs:{searchInputRef:u},setGlobalFilter:d}=e,{globalFilter:f,showGlobalFilter:h}=r(),p=Object.assign(Object.assign({},Se(l,{table:e})),n),m=C.useRef(!1),[v,y]=C.useState(f??""),[b]=G5(v,c?500:250);C.useEffect(()=>{d(b||void 0)},[b]);const w=()=>{y(""),d(void 0)};return C.useEffect(()=>{m.current&&(f===void 0?w():y(f)),m.current=!0},[f]),g.jsxs(ud,{className:vI.collapse,in:h,children:[o&&g.jsxs(We,{withinPortal:!0,children:[g.jsx(We.Target,{children:g.jsx(Ze,{"aria-label":a.changeSearchMode,color:"gray",size:"sm",variant:"transparent",children:g.jsx(s,{})})}),g.jsx(b6,{onSelect:w,table:e})]}),g.jsx(wd,Object.assign({leftSection:!o&&g.jsx(s,{}),mt:0,mx:"sm",onChange:S=>y(S.target.value),placeholder:a.search,rightSection:v?g.jsx(Ze,{"aria-label":a.clearSearch,color:"gray",disabled:!(v!=null&&v.length),onClick:w,size:"sm",variant:"transparent",children:g.jsx(ut,{label:a.clearSearch,withinPortal:!0,children:g.jsx(i,{})})}):null,value:v??"",variant:"filled"},p,{className:De("mrt-global-filter-text-input",vI.root,p==null?void 0:p.className),ref:S=>{S&&(u.current=S,p!=null&&p.ref&&(p.ref=S))}}))]})},Iye=t=>{var e,{table:n}=t,r=Ve(t,["table"]);const{getState:o,options:{enableGlobalFilter:s,enablePagination:i,enableToolbarInternalActions:a,mantineTopToolbarProps:l,positionGlobalFilter:c,positionPagination:u,positionToolbarAlertBanner:d,positionToolbarDropZone:f,renderTopToolbarCustomActions:h},refs:{topToolbarRef:p}}=n,{isFullScreen:m,showGlobalFilter:v}=o(),y=ph("(max-width:720px)"),b=ph("(max-width:1024px)"),w=Object.assign(Object.assign({},Se(l,{table:n})),r),S=y||!!h||v&&b,_={style:b?void 0:{zIndex:3},table:n};return g.jsxs(J,Object.assign({},w,{className:De(x6["common-toolbar-styles"],Fm.root,m&&Fm["root-fullscreen"],w==null?void 0:w.className),ref:k=>{k&&(p.current=k,w!=null&&w.ref&&(w.ref.current=k))},children:[d==="top"&&g.jsx(wM,{stackAlertBanner:S,table:n}),["both","top"].includes(f??"")&&g.jsx(C6,{table:n}),g.jsxs(tn,{className:De(Fm["actions-container"],S&&Fm["actions-container-stack-alert"]),children:[s&&c==="left"&&g.jsx(Vw,Object.assign({},_)),(e=h==null?void 0:h({table:n}))!==null&&e!==void 0?e:g.jsx("span",{}),a?g.jsxs(tn,{justify:"end",wrap:"wrap-reverse",children:[s&&c==="right"&&g.jsx(Vw,Object.assign({},_)),g.jsx(Dye,{table:n})]}):s&&c==="right"&&g.jsx(Vw,Object.assign({},_))]}),i&&["both","top"].includes(u??"")&&g.jsx(tn,{justify:"end",children:g.jsx(_6,{position:"top",table:n})}),g.jsx(S6,{isTopToolbar:!0,table:n})]}))},Nye=t=>{var e,n,{table:r}=t,o=Ve(t,["table"]);const{getState:s,options:{enableBottomToolbar:i,enableTopToolbar:a,mantinePaperProps:l,renderBottomToolbar:c,renderTopToolbar:u},refs:{tablePaperRef:d}}=r,{isFullScreen:f}=s(),h=Object.assign(Object.assign({},Se(l,{table:r})),o);return g.jsxs(np,Object.assign({shadow:"xs",withBorder:!0},h,{className:De("mrt-table-paper",W0e.root,f&&"mrt-table-paper-fullscreen",h==null?void 0:h.className),ref:p=>{d.current=p,h!=null&&h.ref&&(h.ref.current=p)},style:p=>Object.assign(Object.assign({zIndex:f?200:void 0},Se(h==null?void 0:h.style,p)),f?{bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw"}:null),children:[a&&((e=Se(u,{table:r}))!==null&&e!==void 0?e:g.jsx(Iye,{table:r})),g.jsx(Sye,{table:r}),i&&((n=Se(c,{table:r}))!==null&&n!==void 0?n:g.jsx(_ye,{table:r}))]}))},Lye=t=>t.table!==void 0,pMe=t=>{let e;return Lye(t)?e=t.table:e=z0e(t),g.jsx(Nye,{table:e})};var E6={exports:{}};/*!
* sweetalert2 v11.10.5
* Released under the MIT License.
*/(function(t,e){(function(n,r){t.exports=r()})(jr,function(){function n(O,x,E){return x=h(x),v(O,o()?Reflect.construct(x,E||[],h(O).constructor):x.apply(O,E))}function r(O,x,E){if(o())return Reflect.construct.apply(null,arguments);var R=[null];R.push.apply(R,x);var U=new(O.bind.apply(O,R));return E&&p(U,E.prototype),U}function o(){try{var O=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(o=function(){return!!O})()}function s(O,x){var E=O==null?null:typeof Symbol<"u"&&O[Symbol.iterator]||O["@@iterator"];if(E!=null){var R,U,re,Te,Xe=[],tt=!0,Ut=!1;try{if(re=(E=E.call(O)).next,x===0){if(Object(E)!==E)return;tt=!1}else for(;!(tt=(R=re.call(E)).done)&&(Xe.push(R.value),Xe.length!==x);tt=!0);}catch(Pd){Ut=!0,U=Pd}finally{try{if(!tt&&E.return!=null&&(Te=E.return(),Object(Te)!==Te))return}finally{if(Ut)throw U}}return Xe}}function i(O,x){if(typeof O!="object"||!O)return O;var E=O[Symbol.toPrimitive];if(E!==void 0){var R=E.call(O,x||"default");if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(O)}function a(O){var x=i(O,"string");return typeof x=="symbol"?x:String(x)}function l(O){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(x){return typeof x}:function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},l(O)}function c(O,x){if(!(O instanceof x))throw new TypeError("Cannot call a class as a function")}function u(O,x){for(var E=0;E<x.length;E++){var R=x[E];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,a(R.key),R)}}function d(O,x,E){return x&&u(O.prototype,x),E&&u(O,E),Object.defineProperty(O,"prototype",{writable:!1}),O}function f(O,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(x&&x.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Object.defineProperty(O,"prototype",{writable:!1}),x&&p(O,x)}function h(O){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},h(O)}function p(O,x){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,U){return R.__proto__=U,R},p(O,x)}function m(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function v(O,x){if(x&&(typeof x=="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(O)}function y(O,x){for(;!Object.prototype.hasOwnProperty.call(O,x)&&(O=h(O),O!==null););return O}function b(){return typeof Reflect<"u"&&Reflect.get?b=Reflect.get.bind():b=function(x,E,R){var U=y(x,E);if(U){var re=Object.getOwnPropertyDescriptor(U,E);return re.get?re.get.call(arguments.length<3?x:R):re.value}},b.apply(this,arguments)}function w(O,x){return k(O)||s(O,x)||T(O,x)||L()}function S(O){return _(O)||M(O)||T(O)||A()}function _(O){if(Array.isArray(O))return P(O)}function k(O){if(Array.isArray(O))return O}function M(O){if(typeof Symbol<"u"&&O[Symbol.iterator]!=null||O["@@iterator"]!=null)return Array.from(O)}function T(O,x){if(O){if(typeof O=="string")return P(O,x);var E=Object.prototype.toString.call(O).slice(8,-1);if(E==="Object"&&O.constructor&&(E=O.constructor.name),E==="Map"||E==="Set")return Array.from(O);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return P(O,x)}}function P(O,x){(x==null||x>O.length)&&(x=O.length);for(var E=0,R=new Array(x);E<x;E++)R[E]=O[E];return R}function A(){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 L(){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 V(O,x){var E=z(O,x,"get");return N(O,E)}function H(O,x,E){var R=z(O,x,"set");return D(O,R,E),E}function z(O,x,E){if(!x.has(O))throw new TypeError("attempted to "+E+" private field on non-instance");return x.get(O)}function N(O,x){return x.get?x.get.call(O):x.value}function D(O,x,E){if(x.set)x.set.call(O,E);else{if(!x.writable)throw new TypeError("attempted to set read only private field");x.value=E}}function F(O,x){if(x.has(O))throw new TypeError("Cannot initialize the same private elements twice on an object")}function I(O,x,E){F(O,x),x.set(O,E)}var $=100,j={},W=function(){j.previousActiveElement instanceof HTMLElement?(j.previousActiveElement.focus(),j.previousActiveElement=null):document.body&&document.body.focus()},G=function(x){return new Promise(function(E){if(!x)return E();var R=window.scrollX,U=window.scrollY;j.restoreFocusTimeout=setTimeout(function(){W(),E()},$),window.scrollTo(R,U)})},X="swal2-",q=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"],B=q.reduce(function(O,x){return O[x]=X+x,O},{}),Q=["success","warning","info","question","error"],Z=Q.reduce(function(O,x){return O[x]=X+x,O},{}),oe="SweetAlert2:",te=function(x){return x.charAt(0).toUpperCase()+x.slice(1)},ne=function(x){console.warn("".concat(oe," ").concat(l(x)==="object"?x.join(" "):x))},pe=function(x){console.error("".concat(oe," ").concat(x))},ie=[],le=function(x){ie.includes(x)||(ie.push(x),ne(x))},ce=function(x,E){le('"'.concat(x,'" is deprecated and will be removed in the next major release. Please use "').concat(E,'" instead.'))},ye=function(x){return typeof x=="function"?x():x},xe=function(x){return x&&typeof x.toPromise=="function"},Ce=function(x){return xe(x)?x.toPromise():Promise.resolve(x)},se=function(x){return x&&Promise.resolve(x)===x},ue=function(){return document.body.querySelector(".".concat(B.container))},ve=function(x){var E=ue();return E?E.querySelector(x):null},Oe=function(x){return ve(".".concat(x))},fe=function(){return Oe(B.popup)},Me=function(){return Oe(B.icon)},Ie=function(){return Oe(B["icon-content"])},Be=function(){return Oe(B.title)},et=function(){return Oe(B["html-container"])},mt=function(){return Oe(B.image)},Ue=function(){return Oe(B["progress-steps"])},lt=function(){return Oe(B["validation-message"])},sn=function(){return ve(".".concat(B.actions," .").concat(B.confirm))},an=function(){return ve(".".concat(B.actions," .").concat(B.cancel))},tr=function(){return ve(".".concat(B.actions," .").concat(B.deny))},Za=function(){return Oe(B["input-label"])},Tn=function(){return ve(".".concat(B.loader))},fn=function(){return Oe(B.actions)},Bn=function(){return Oe(B.footer)},oo=function(){return Oe(B["timer-progress-bar"])},Bs=function(){return Oe(B.close)},Ti=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,
  [tabindex="0"],
  [contenteditable],
  audio[controls],
  video[controls],
  summary
`,Ao=function(){var x=fe();if(!x)return[];var E=x.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),R=Array.from(E).sort(function(Te,Xe){var tt=parseInt(Te.getAttribute("tabindex")||"0"),Ut=parseInt(Xe.getAttribute("tabindex")||"0");return tt>Ut?1:tt<Ut?-1:0}),U=x.querySelectorAll(Ti),re=Array.from(U).filter(function(Te){return Te.getAttribute("tabindex")!=="-1"});return S(new Set(R.concat(re))).filter(function(Te){return On(Te)})},Do=function(){return so(document.body,B.shown)&&!so(document.body,B["toast-shown"])&&!so(document.body,B["no-backdrop"])},it=function(){var x=fe();return x?so(x,B.toast):!1},Wt=function(){var x=fe();return x?x.hasAttribute("data-loading"):!1},Rn=function(x,E){if(x.textContent="",E){var R=new DOMParser,U=R.parseFromString(E,"text/html"),re=U.querySelector("head");re&&Array.from(re.childNodes).forEach(function(Xe){x.appendChild(Xe)});var Te=U.querySelector("body");Te&&Array.from(Te.childNodes).forEach(function(Xe){Xe instanceof HTMLVideoElement||Xe instanceof HTMLAudioElement?x.appendChild(Xe.cloneNode(!0)):x.appendChild(Xe)})}},so=function(x,E){if(!E)return!1;for(var R=E.split(/\s+/),U=0;U<R.length;U++)if(!x.classList.contains(R[U]))return!1;return!0},Md=function(x,E){Array.from(x.classList).forEach(function(R){!Object.values(B).includes(R)&&!Object.values(Z).includes(R)&&!Object.values(E.showClass||{}).includes(R)&&x.classList.remove(R)})},Vn=function(x,E,R){if(Md(x,E),E.customClass&&E.customClass[R]){if(typeof E.customClass[R]!="string"&&!E.customClass[R].forEach){ne("Invalid type of customClass.".concat(R,'! Expected string or iterable object, got "').concat(l(E.customClass[R]),'"'));return}Ne(x,E.customClass[R])}},ke=function(x,E){if(!E)return null;switch(E){case"select":case"textarea":case"file":return x.querySelector(".".concat(B.popup," > .").concat(B[E]));case"checkbox":return x.querySelector(".".concat(B.popup," > .").concat(B.checkbox," input"));case"radio":return x.querySelector(".".concat(B.popup," > .").concat(B.radio," input:checked"))||x.querySelector(".".concat(B.popup," > .").concat(B.radio," input:first-child"));case"range":return x.querySelector(".".concat(B.popup," > .").concat(B.range," input"));default:return x.querySelector(".".concat(B.popup," > .").concat(B.input))}},Io=function(x){if(x.focus(),x.type!=="file"){var E=x.value;x.value="",x.value=E}},_t=function(x,E,R){!x||!E||(typeof E=="string"&&(E=E.split(/\s+/).filter(Boolean)),E.forEach(function(U){Array.isArray(x)?x.forEach(function(re){R?re.classList.add(U):re.classList.remove(U)}):R?x.classList.add(U):x.classList.remove(U)}))},Ne=function(x,E){_t(x,E,!0)},Ct=function(x,E){_t(x,E,!1)},It=function(x,E){for(var R=Array.from(x.children),U=0;U<R.length;U++){var re=R[U];if(re instanceof HTMLElement&&so(re,E))return re}},Nt=function(x,E,R){R==="".concat(parseInt(R))&&(R=parseInt(R)),R||parseInt(R)===0?x.style.setProperty(E,typeof R=="number"?"".concat(R,"px"):R):x.style.removeProperty(E)},Ot=function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";x&&(x.style.display=E)},xn=function(x){x&&(x.style.display="none")},el=function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";x&&new MutationObserver(function(){gt(x,x.innerHTML,E)}).observe(x,{childList:!0,subtree:!0})},Ep=function(x,E,R,U){var re=x.querySelector(E);re&&re.style.setProperty(R,U)},gt=function(x,E){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";E?Ot(x,R):xn(x)},On=function(x){return!!(x&&(x.offsetWidth||x.offsetHeight||x.getClientRects().length))},Mp=function(){return!On(sn())&&!On(tr())&&!On(an())},Td=function(x){return x.scrollHeight>x.clientHeight},Tp=function(x){var E=window.getComputedStyle(x),R=parseFloat(E.getPropertyValue("animation-duration")||"0"),U=parseFloat(E.getPropertyValue("transition-duration")||"0");return R>0||U>0},$b=function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,R=oo();R&&On(R)&&(E&&(R.style.transition="none",R.style.width="100%"),setTimeout(function(){R.style.transition="width ".concat(x/1e3,"s linear"),R.style.width="0%"},10))},k8=function(){var x=oo();if(x){var E=parseInt(window.getComputedStyle(x).width);x.style.removeProperty("transition"),x.style.width="100%";var R=parseInt(window.getComputedStyle(x).width),U=E/R*100;x.style.width="".concat(U,"%")}},tT=function(){return typeof window>"u"||typeof document>"u"},E8=`
 <div aria-labelledby="`.concat(B.title,'" aria-describedby="').concat(B["html-container"],'" class="').concat(B.popup,`" tabindex="-1">
   <button type="button" class="`).concat(B.close,`"></button>
   <ul class="`).concat(B["progress-steps"],`"></ul>
   <div class="`).concat(B.icon,`"></div>
   <img class="`).concat(B.image,`" />
   <h2 class="`).concat(B.title,'" id="').concat(B.title,`"></h2>
   <div class="`).concat(B["html-container"],'" id="').concat(B["html-container"],`"></div>
   <input class="`).concat(B.input,'" id="').concat(B.input,`" />
   <input type="file" class="`).concat(B.file,`" />
   <div class="`).concat(B.range,`">
     <input type="range" />
     <output></output>
   </div>
   <select class="`).concat(B.select,'" id="').concat(B.select,`"></select>
   <div class="`).concat(B.radio,`"></div>
   <label class="`).concat(B.checkbox,`">
     <input type="checkbox" id="`).concat(B.checkbox,`" />
     <span class="`).concat(B.label,`"></span>
   </label>
   <textarea class="`).concat(B.textarea,'" id="').concat(B.textarea,`"></textarea>
   <div class="`).concat(B["validation-message"],'" id="').concat(B["validation-message"],`"></div>
   <div class="`).concat(B.actions,`">
     <div class="`).concat(B.loader,`"></div>
     <button type="button" class="`).concat(B.confirm,`"></button>
     <button type="button" class="`).concat(B.deny,`"></button>
     <button type="button" class="`).concat(B.cancel,`"></button>
   </div>
   <div class="`).concat(B.footer,`"></div>
   <div class="`).concat(B["timer-progress-bar-container"],`">
     <div class="`).concat(B["timer-progress-bar"],`"></div>
   </div>
 </div>
`).replace(/(^|\n)\s*/g,""),M8=function(){var x=ue();return x?(x.remove(),Ct([document.documentElement,document.body],[B["no-backdrop"],B["toast-shown"],B["has-column"]]),!0):!1},tl=function(){j.currentInstance.resetValidationMessage()},T8=function(){var x=fe(),E=It(x,B.input),R=It(x,B.file),U=x.querySelector(".".concat(B.range," input")),re=x.querySelector(".".concat(B.range," output")),Te=It(x,B.select),Xe=x.querySelector(".".concat(B.checkbox," input")),tt=It(x,B.textarea);E.oninput=tl,R.onchange=tl,Te.onchange=tl,Xe.onchange=tl,tt.oninput=tl,U.oninput=function(){tl(),re.value=U.value},U.onchange=function(){tl(),re.value=U.value}},R8=function(x){return typeof x=="string"?document.querySelector(x):x},O8=function(x){var E=fe();E.setAttribute("role",x.toast?"alert":"dialog"),E.setAttribute("aria-live",x.toast?"polite":"assertive"),x.toast||E.setAttribute("aria-modal","true")},P8=function(x){window.getComputedStyle(x).direction==="rtl"&&Ne(ue(),B.rtl)},A8=function(x){var E=M8();if(tT()){pe("SweetAlert2 requires document to initialize");return}var R=document.createElement("div");R.className=B.container,E&&Ne(R,B["no-transition"]),Rn(R,E8);var U=R8(x.target);U.appendChild(R),O8(x),P8(U),T8()},Fb=function(x,E){x instanceof HTMLElement?E.appendChild(x):l(x)==="object"?D8(x,E):x&&Rn(E,x)},D8=function(x,E){x.jquery?I8(E,x):Rn(E,x.toString())},I8=function(x,E){if(x.textContent="",0 in E)for(var R=0;R in E;R++)x.appendChild(E[R].cloneNode(!0));else x.appendChild(E.cloneNode(!0))},nl=function(){if(tT())return!1;var O=document.createElement("div");return typeof O.style.webkitAnimation<"u"?"webkitAnimationEnd":typeof O.style.animation<"u"?"animationend":!1}(),N8=function(x,E){var R=fn(),U=Tn();!R||!U||(!E.showConfirmButton&&!E.showDenyButton&&!E.showCancelButton?xn(R):Ot(R),Vn(R,E,"actions"),L8(R,U,E),Rn(U,E.loaderHtml||""),Vn(U,E,"loader"))};function L8(O,x,E){var R=sn(),U=tr(),re=an();!R||!U||!re||(zb(R,"confirm",E),zb(U,"deny",E),zb(re,"cancel",E),j8(R,U,re,E),E.reverseButtons&&(E.toast?(O.insertBefore(re,R),O.insertBefore(U,R)):(O.insertBefore(re,x),O.insertBefore(U,x),O.insertBefore(R,x))))}function j8(O,x,E,R){if(!R.buttonsStyling){Ct([O,x,E],B.styled);return}Ne([O,x,E],B.styled),R.confirmButtonColor&&(O.style.backgroundColor=R.confirmButtonColor,Ne(O,B["default-outline"])),R.denyButtonColor&&(x.style.backgroundColor=R.denyButtonColor,Ne(x,B["default-outline"])),R.cancelButtonColor&&(E.style.backgroundColor=R.cancelButtonColor,Ne(E,B["default-outline"]))}function zb(O,x,E){var R=te(x);gt(O,E["show".concat(R,"Button")],"inline-block"),Rn(O,E["".concat(x,"ButtonText")]||""),O.setAttribute("aria-label",E["".concat(x,"ButtonAriaLabel")]||""),O.className=B[x],Vn(O,E,"".concat(x,"Button"))}var $8=function(x,E){var R=Bs();R&&(Rn(R,E.closeButtonHtml||""),Vn(R,E,"closeButton"),gt(R,E.showCloseButton),R.setAttribute("aria-label",E.closeButtonAriaLabel||""))},F8=function(x,E){var R=ue();R&&(z8(R,E.backdrop),B8(R,E.position),V8(R,E.grow),Vn(R,E,"container"))};function z8(O,x){typeof x=="string"?O.style.background=x:x||Ne([document.documentElement,document.body],B["no-backdrop"])}function B8(O,x){x&&(x in B?Ne(O,B[x]):(ne('The "position" parameter is not valid, defaulting to "center"'),Ne(O,B.center)))}function V8(O,x){x&&Ne(O,B["grow-".concat(x)])}var kt={innerParams:new WeakMap,domCache:new WeakMap},H8=["input","file","range","select","radio","checkbox","textarea"],W8=function(x,E){var R=fe();if(R){var U=kt.innerParams.get(x),re=!U||E.input!==U.input;H8.forEach(function(Te){var Xe=It(R,B[Te]);Xe&&(K8(Te,E.inputAttributes),Xe.className=B[Te],re&&xn(Xe))}),E.input&&(re&&U8(E),Y8(E))}},U8=function(x){if(x.input){if(!Jt[x.input]){pe("Unexpected type of input! Expected ".concat(Object.keys(Jt).join(" | "),', got "').concat(x.input,'"'));return}var E=nT(x.input),R=Jt[x.input](E,x);Ot(E),x.inputAutoFocus&&setTimeout(function(){Io(R)})}},G8=function(x){for(var E=0;E<x.attributes.length;E++){var R=x.attributes[E].name;["id","type","value","style"].includes(R)||x.removeAttribute(R)}},K8=function(x,E){var R=ke(fe(),x);if(R){G8(R);for(var U in E)R.setAttribute(U,E[U])}},Y8=function(x){var E=nT(x.input);l(x.customClass)==="object"&&Ne(E,x.customClass.input)},Bb=function(x,E){(!x.placeholder||E.inputPlaceholder)&&(x.placeholder=E.inputPlaceholder)},Rd=function(x,E,R){if(R.inputLabel){var U=document.createElement("label"),re=B["input-label"];U.setAttribute("for",x.id),U.className=re,l(R.customClass)==="object"&&Ne(U,R.customClass.inputLabel),U.innerText=R.inputLabel,E.insertAdjacentElement("beforebegin",U)}},nT=function(x){return It(fe(),B[x]||B.input)},Rp=function(x,E){["string","number"].includes(l(E))?x.value="".concat(E):se(E)||ne('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(l(E),'"'))},Jt={};Jt.text=Jt.email=Jt.password=Jt.number=Jt.tel=Jt.url=Jt.search=Jt.date=Jt["datetime-local"]=Jt.time=Jt.week=Jt.month=function(O,x){return Rp(O,x.inputValue),Rd(O,O,x),Bb(O,x),O.type=x.input,O},Jt.file=function(O,x){return Rd(O,O,x),Bb(O,x),O},Jt.range=function(O,x){var E=O.querySelector("input"),R=O.querySelector("output");return Rp(E,x.inputValue),E.type=x.input,Rp(R,x.inputValue),Rd(E,O,x),O},Jt.select=function(O,x){if(O.textContent="",x.inputPlaceholder){var E=document.createElement("option");Rn(E,x.inputPlaceholder),E.value="",E.disabled=!0,E.selected=!0,O.appendChild(E)}return Rd(O,O,x),O},Jt.radio=function(O){return O.textContent="",O},Jt.checkbox=function(O,x){var E=ke(fe(),"checkbox");E.value="1",E.checked=!!x.inputValue;var R=O.querySelector("span");return Rn(R,x.inputPlaceholder),E},Jt.textarea=function(O,x){Rp(O,x.inputValue),Bb(O,x),Rd(O,O,x);var E=function(U){return parseInt(window.getComputedStyle(U).marginLeft)+parseInt(window.getComputedStyle(U).marginRight)};return setTimeout(function(){if("MutationObserver"in window){var R=parseInt(window.getComputedStyle(fe()).width),U=function(){if(document.body.contains(O)){var Te=O.offsetWidth+E(O);Te>R?fe().style.width="".concat(Te,"px"):Nt(fe(),"width",x.width)}};new MutationObserver(U).observe(O,{attributes:!0,attributeFilter:["style"]})}}),O};var q8=function(x,E){var R=et();R&&(el(R),Vn(R,E,"htmlContainer"),E.html?(Fb(E.html,R),Ot(R,"block")):E.text?(R.textContent=E.text,Ot(R,"block")):xn(R),W8(x,E))},X8=function(x,E){var R=Bn();R&&(el(R),gt(R,E.footer,"block"),E.footer&&Fb(E.footer,R),Vn(R,E,"footer"))},J8=function(x,E){var R=kt.innerParams.get(x),U=Me();if(U){if(R&&E.icon===R.icon){oT(U,E),rT(U,E);return}if(!E.icon&&!E.iconHtml){xn(U);return}if(E.icon&&Object.keys(Z).indexOf(E.icon)===-1){pe('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(E.icon,'"')),xn(U);return}Ot(U),oT(U,E),rT(U,E),Ne(U,E.showClass&&E.showClass.icon)}},rT=function(x,E){for(var R=0,U=Object.entries(Z);R<U.length;R++){var re=w(U[R],2),Te=re[0],Xe=re[1];E.icon!==Te&&Ct(x,Xe)}Ne(x,E.icon&&Z[E.icon]),tH(x,E),Q8(),Vn(x,E,"icon")},Q8=function(){var x=fe();if(x)for(var E=window.getComputedStyle(x).getPropertyValue("background-color"),R=x.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),U=0;U<R.length;U++)R[U].style.backgroundColor=E},Z8=`
  <div class="swal2-success-circular-line-left"></div>
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
  <div class="swal2-success-circular-line-right"></div>
`,eH=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,oT=function(x,E){if(!(!E.icon&&!E.iconHtml)){var R=x.innerHTML,U="";if(E.iconHtml)U=sT(E.iconHtml);else if(E.icon==="success")U=Z8,R=R.replace(/ style=".*?"/g,"");else if(E.icon==="error")U=eH;else if(E.icon){var re={question:"?",warning:"!",info:"i"};U=sT(re[E.icon])}R.trim()!==U.trim()&&Rn(x,U)}},tH=function(x,E){if(E.iconColor){x.style.color=E.iconColor,x.style.borderColor=E.iconColor;for(var R=0,U=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];R<U.length;R++){var re=U[R];Ep(x,re,"background-color",E.iconColor)}Ep(x,".swal2-success-ring","border-color",E.iconColor)}},sT=function(x){return'<div class="'.concat(B["icon-content"],'">').concat(x,"</div>")},nH=function(x,E){var R=mt();if(R){if(!E.imageUrl){xn(R);return}Ot(R,""),R.setAttribute("src",E.imageUrl),R.setAttribute("alt",E.imageAlt||""),Nt(R,"width",E.imageWidth),Nt(R,"height",E.imageHeight),R.className=B.image,Vn(R,E,"image")}},rH=function(x,E){var R=ue(),U=fe();if(!(!R||!U)){if(E.toast){Nt(R,"width",E.width),U.style.width="100%";var re=Tn();re&&U.insertBefore(re,Me())}else Nt(U,"width",E.width);Nt(U,"padding",E.padding),E.color&&(U.style.color=E.color),E.background&&(U.style.background=E.background),xn(lt()),oH(U,E)}},oH=function(x,E){var R=E.showClass||{};x.className="".concat(B.popup," ").concat(On(x)?R.popup:""),E.toast?(Ne([document.documentElement,document.body],B["toast-shown"]),Ne(x,B.toast)):Ne(x,B.modal),Vn(x,E,"popup"),typeof E.customClass=="string"&&Ne(x,E.customClass),E.icon&&Ne(x,B["icon-".concat(E.icon)])},sH=function(x,E){var R=Ue();if(R){var U=E.progressSteps,re=E.currentProgressStep;if(!U||U.length===0||re===void 0){xn(R);return}Ot(R),R.textContent="",re>=U.length&&ne("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),U.forEach(function(Te,Xe){var tt=iH(Te);if(R.appendChild(tt),Xe===re&&Ne(tt,B["active-progress-step"]),Xe!==U.length-1){var Ut=aH(E);R.appendChild(Ut)}})}},iH=function(x){var E=document.createElement("li");return Ne(E,B["progress-step"]),Rn(E,x),E},aH=function(x){var E=document.createElement("li");return Ne(E,B["progress-step-line"]),x.progressStepsDistance&&Nt(E,"width",x.progressStepsDistance),E},lH=function(x,E){var R=Be();R&&(el(R),gt(R,E.title||E.titleText,"block"),E.title&&Fb(E.title,R),E.titleText&&(R.innerText=E.titleText),Vn(R,E,"title"))},iT=function(x,E){rH(x,E),F8(x,E),sH(x,E),J8(x,E),nH(x,E),lH(x,E),$8(x,E),q8(x,E),N8(x,E),X8(x,E);var R=fe();typeof E.didRender=="function"&&R&&E.didRender(R)},cH=function(){return On(fe())},aT=function(){var x;return(x=sn())===null||x===void 0?void 0:x.click()},uH=function(){var x;return(x=tr())===null||x===void 0?void 0:x.click()},dH=function(){var x;return(x=an())===null||x===void 0?void 0:x.click()},bc=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),lT=function(x){x.keydownTarget&&x.keydownHandlerAdded&&(x.keydownTarget.removeEventListener("keydown",x.keydownHandler,{capture:x.keydownListenerCapture}),x.keydownHandlerAdded=!1)},fH=function(x,E,R){lT(x),E.toast||(x.keydownHandler=function(U){return pH(E,U,R)},x.keydownTarget=E.keydownListenerCapture?window:fe(),x.keydownListenerCapture=E.keydownListenerCapture,x.keydownTarget.addEventListener("keydown",x.keydownHandler,{capture:x.keydownListenerCapture}),x.keydownHandlerAdded=!0)},Vb=function(x,E){var R,U=Ao();if(U.length){x=x+E,x===U.length?x=0:x===-1&&(x=U.length-1),U[x].focus();return}(R=fe())===null||R===void 0||R.focus()},cT=["ArrowRight","ArrowDown"],hH=["ArrowLeft","ArrowUp"],pH=function(x,E,R){x&&(E.isComposing||E.keyCode===229||(x.stopKeydownPropagation&&E.stopPropagation(),E.key==="Enter"?mH(E,x):E.key==="Tab"?gH(E):[].concat(cT,hH).includes(E.key)?vH(E.key):E.key==="Escape"&&yH(E,x,R)))},mH=function(x,E){if(ye(E.allowEnterKey)){var R=ke(fe(),E.input);if(x.target&&R&&x.target instanceof HTMLElement&&x.target.outerHTML===R.outerHTML){if(["textarea","file"].includes(E.input))return;aT(),x.preventDefault()}}},gH=function(x){for(var E=x.target,R=Ao(),U=-1,re=0;re<R.length;re++)if(E===R[re]){U=re;break}x.shiftKey?Vb(U,-1):Vb(U,1),x.stopPropagation(),x.preventDefault()},vH=function(x){var E=fn(),R=sn(),U=tr(),re=an();if(!(!E||!R||!U||!re)){var Te=[R,U,re];if(!(document.activeElement instanceof HTMLElement&&!Te.includes(document.activeElement))){var Xe=cT.includes(x)?"nextElementSibling":"previousElementSibling",tt=document.activeElement;if(tt){for(var Ut=0;Ut<E.children.length;Ut++){if(tt=tt[Xe],!tt)return;if(tt instanceof HTMLButtonElement&&On(tt))break}tt instanceof HTMLButtonElement&&tt.focus()}}}},yH=function(x,E,R){ye(E.allowEscapeKey)&&(x.preventDefault(),R(bc.esc))},wc={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},bH=function(){var x=Array.from(document.body.children);x.forEach(function(E){E===ue()||E.contains(ue())||(E.hasAttribute("aria-hidden")&&E.setAttribute("data-previous-aria-hidden",E.getAttribute("aria-hidden")||""),E.setAttribute("aria-hidden","true"))})},uT=function(){var x=Array.from(document.body.children);x.forEach(function(E){E.hasAttribute("data-previous-aria-hidden")?(E.setAttribute("aria-hidden",E.getAttribute("data-previous-aria-hidden")||""),E.removeAttribute("data-previous-aria-hidden")):E.removeAttribute("aria-hidden")})},dT=typeof window<"u"&&!!window.GestureEvent,wH=function(){if(dT&&!so(document.body,B.iosfix)){var x=document.body.scrollTop;document.body.style.top="".concat(x*-1,"px"),Ne(document.body,B.iosfix),xH()}},xH=function(){var x=ue();if(x){var E;x.ontouchstart=function(R){E=SH(R)},x.ontouchmove=function(R){E&&(R.preventDefault(),R.stopPropagation())}}},SH=function(x){var E=x.target,R=ue(),U=et();return!R||!U||_H(x)||CH(x)?!1:E===R||!Td(R)&&E instanceof HTMLElement&&E.tagName!=="INPUT"&&E.tagName!=="TEXTAREA"&&!(Td(U)&&U.contains(E))},_H=function(x){return x.touches&&x.touches.length&&x.touches[0].touchType==="stylus"},CH=function(x){return x.touches&&x.touches.length>1},kH=function(){if(so(document.body,B.iosfix)){var x=parseInt(document.body.style.top,10);Ct(document.body,B.iosfix),document.body.style.top="",document.body.scrollTop=x*-1}},EH=function(){var x=document.createElement("div");x.className=B["scrollbar-measure"],document.body.appendChild(x);var E=x.getBoundingClientRect().width-x.clientWidth;return document.body.removeChild(x),E},xc=null,MH=function(x){xc===null&&(document.body.scrollHeight>window.innerHeight||x==="scroll")&&(xc=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(xc+EH(),"px"))},TH=function(){xc!==null&&(document.body.style.paddingRight="".concat(xc,"px"),xc=null)};function fT(O,x,E,R){it()?pT(O,R):(G(E).then(function(){return pT(O,R)}),lT(j)),dT?(x.setAttribute("style","display:none !important"),x.removeAttribute("class"),x.innerHTML=""):x.remove(),Do()&&(TH(),kH(),uT()),RH()}function RH(){Ct([document.documentElement,document.body],[B.shown,B["height-auto"],B["no-backdrop"],B["toast-shown"]])}function Ri(O){O=PH(O);var x=wc.swalPromiseResolve.get(this),E=OH(this);this.isAwaitingPromise?O.isDismissed||(Od(this),x(O)):E&&x(O)}var OH=function(x){var E=fe();if(!E)return!1;var R=kt.innerParams.get(x);if(!R||so(E,R.hideClass.popup))return!1;Ct(E,R.showClass.popup),Ne(E,R.hideClass.popup);var U=ue();return Ct(U,R.showClass.backdrop),Ne(U,R.hideClass.backdrop),AH(x,E,R),!0};function hT(O){var x=wc.swalPromiseReject.get(this);Od(this),x&&x(O)}var Od=function(x){x.isAwaitingPromise&&(delete x.isAwaitingPromise,kt.innerParams.get(x)||x._destroy())},PH=function(x){return typeof x>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},x)},AH=function(x,E,R){var U=ue(),re=nl&&Tp(E);typeof R.willClose=="function"&&R.willClose(E),re?DH(x,E,U,R.returnFocus,R.didClose):fT(x,U,R.returnFocus,R.didClose)},DH=function(x,E,R,U,re){nl&&(j.swalCloseEventFinishedCallback=fT.bind(null,x,R,U,re),E.addEventListener(nl,function(Te){Te.target===E&&(j.swalCloseEventFinishedCallback(),delete j.swalCloseEventFinishedCallback)}))},pT=function(x,E){setTimeout(function(){typeof E=="function"&&E.bind(x.params)(),x._destroy&&x._destroy()})},Sc=function(x){var E=fe();if(E||new Ip,E=fe(),!!E){var R=Tn();it()?xn(Me()):IH(E,x),Ot(R),E.setAttribute("data-loading","true"),E.setAttribute("aria-busy","true"),E.focus()}},IH=function(x,E){var R=fn(),U=Tn();!R||!U||(!E&&On(sn())&&(E=sn()),Ot(R),E&&(xn(E),U.setAttribute("data-button-to-replace",E.className),R.insertBefore(U,E)),Ne([x,R],B.loading))},NH=function(x,E){E.input==="select"||E.input==="radio"?zH(x,E):["text","email","number","tel","textarea"].some(function(R){return R===E.input})&&(xe(E.inputValue)||se(E.inputValue))&&(Sc(sn()),BH(x,E))},LH=function(x,E){var R=x.getInput();if(!R)return null;switch(E.input){case"checkbox":return jH(R);case"radio":return $H(R);case"file":return FH(R);default:return E.inputAutoTrim?R.value.trim():R.value}},jH=function(x){return x.checked?1:0},$H=function(x){return x.checked?x.value:null},FH=function(x){return x.files&&x.files.length?x.getAttribute("multiple")!==null?x.files:x.files[0]:null},zH=function(x,E){var R=fe();if(R){var U=function(Te){E.input==="select"?VH(R,mT(Te),E):E.input==="radio"&&HH(R,mT(Te),E)};xe(E.inputOptions)||se(E.inputOptions)?(Sc(sn()),Ce(E.inputOptions).then(function(re){x.hideLoading(),U(re)})):l(E.inputOptions)==="object"?U(E.inputOptions):pe("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(l(E.inputOptions)))}},BH=function(x,E){var R=x.getInput();R&&(xn(R),Ce(E.inputValue).then(function(U){R.value=E.input==="number"?"".concat(parseFloat(U)||0):"".concat(U),Ot(R),R.focus(),x.hideLoading()}).catch(function(U){pe("Error in inputValue promise: ".concat(U)),R.value="",Ot(R),R.focus(),x.hideLoading()}))};function VH(O,x,E){var R=It(O,B.select);if(R){var U=function(Te,Xe,tt){var Ut=document.createElement("option");Ut.value=tt,Rn(Ut,Xe),Ut.selected=gT(tt,E.inputValue),Te.appendChild(Ut)};x.forEach(function(re){var Te=re[0],Xe=re[1];if(Array.isArray(Xe)){var tt=document.createElement("optgroup");tt.label=Te,tt.disabled=!1,R.appendChild(tt),Xe.forEach(function(Ut){return U(tt,Ut[1],Ut[0])})}else U(R,Xe,Te)}),R.focus()}}function HH(O,x,E){var R=It(O,B.radio);if(R){x.forEach(function(re){var Te=re[0],Xe=re[1],tt=document.createElement("input"),Ut=document.createElement("label");tt.type="radio",tt.name=B.radio,tt.value=Te,gT(Te,E.inputValue)&&(tt.checked=!0);var Pd=document.createElement("span");Rn(Pd,Xe),Pd.className=B.label,Ut.appendChild(tt),Ut.appendChild(Pd),R.appendChild(Ut)});var U=R.querySelectorAll("input");U.length&&U[0].focus()}}var mT=function O(x){var E=[];return x instanceof Map?x.forEach(function(R,U){var re=R;l(re)==="object"&&(re=O(re)),E.push([U,re])}):Object.keys(x).forEach(function(R){var U=x[R];l(U)==="object"&&(U=O(U)),E.push([R,U])}),E},gT=function(x,E){return!!E&&E.toString()===x.toString()},Op=void 0,WH=function(x){var E=kt.innerParams.get(x);x.disableButtons(),E.input?vT(x,"confirm"):Wb(x,!0)},UH=function(x){var E=kt.innerParams.get(x);x.disableButtons(),E.returnInputValueOnDeny?vT(x,"deny"):Hb(x,!1)},GH=function(x,E){x.disableButtons(),E(bc.cancel)},vT=function(x,E){var R=kt.innerParams.get(x);if(!R.input){pe('The "input" parameter is needed to be set when using returnInputValueOn'.concat(te(E)));return}var U=x.getInput(),re=LH(x,R);R.inputValidator?KH(x,re,E):U&&!U.checkValidity()?(x.enableButtons(),x.showValidationMessage(R.validationMessage||U.validationMessage)):E==="deny"?Hb(x,re):Wb(x,re)},KH=function(x,E,R){var U=kt.innerParams.get(x);x.disableInput();var re=Promise.resolve().then(function(){return Ce(U.inputValidator(E,U.validationMessage))});re.then(function(Te){x.enableButtons(),x.enableInput(),Te?x.showValidationMessage(Te):R==="deny"?Hb(x,E):Wb(x,E)})},Hb=function(x,E){var R=kt.innerParams.get(x||Op);if(R.showLoaderOnDeny&&Sc(tr()),R.preDeny){x.isAwaitingPromise=!0;var U=Promise.resolve().then(function(){return Ce(R.preDeny(E,R.validationMessage))});U.then(function(re){re===!1?(x.hideLoading(),Od(x)):x.close({isDenied:!0,value:typeof re>"u"?E:re})}).catch(function(re){return bT(x||Op,re)})}else x.close({isDenied:!0,value:E})},yT=function(x,E){x.close({isConfirmed:!0,value:E})},bT=function(x,E){x.rejectPromise(E)},Wb=function(x,E){var R=kt.innerParams.get(x||Op);if(R.showLoaderOnConfirm&&Sc(),R.preConfirm){x.resetValidationMessage(),x.isAwaitingPromise=!0;var U=Promise.resolve().then(function(){return Ce(R.preConfirm(E,R.validationMessage))});U.then(function(re){On(lt())||re===!1?(x.hideLoading(),Od(x)):yT(x,typeof re>"u"?E:re)}).catch(function(re){return bT(x||Op,re)})}else yT(x,E)};function Pp(){var O=kt.innerParams.get(this);if(O){var x=kt.domCache.get(this);xn(x.loader),it()?O.icon&&Ot(Me()):YH(x),Ct([x.popup,x.actions],B.loading),x.popup.removeAttribute("aria-busy"),x.popup.removeAttribute("data-loading"),x.confirmButton.disabled=!1,x.denyButton.disabled=!1,x.cancelButton.disabled=!1}}var YH=function(x){var E=x.popup.getElementsByClassName(x.loader.getAttribute("data-button-to-replace"));E.length?Ot(E[0],"inline-block"):Mp()&&xn(x.actions)};function wT(){var O=kt.innerParams.get(this),x=kt.domCache.get(this);return x?ke(x.popup,O.input):null}function xT(O,x,E){var R=kt.domCache.get(O);x.forEach(function(U){R[U].disabled=E})}function ST(O,x){var E=fe();if(!(!E||!O))if(O.type==="radio")for(var R=E.querySelectorAll('[name="'.concat(B.radio,'"]')),U=0;U<R.length;U++)R[U].disabled=x;else O.disabled=x}function _T(){xT(this,["confirmButton","denyButton","cancelButton"],!1)}function CT(){xT(this,["confirmButton","denyButton","cancelButton"],!0)}function kT(){ST(this.getInput(),!1)}function ET(){ST(this.getInput(),!0)}function MT(O){var x=kt.domCache.get(this),E=kt.innerParams.get(this);Rn(x.validationMessage,O),x.validationMessage.className=B["validation-message"],E.customClass&&E.customClass.validationMessage&&Ne(x.validationMessage,E.customClass.validationMessage),Ot(x.validationMessage);var R=this.getInput();R&&(R.setAttribute("aria-invalid","true"),R.setAttribute("aria-describedby",B["validation-message"]),Io(R),Ne(R,B.inputerror))}function TT(){var O=kt.domCache.get(this);O.validationMessage&&xn(O.validationMessage);var x=this.getInput();x&&(x.removeAttribute("aria-invalid"),x.removeAttribute("aria-describedby"),Ct(x,B.inputerror))}var _c={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},qH=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],XH={},JH=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],RT=function(x){return Object.prototype.hasOwnProperty.call(_c,x)},OT=function(x){return qH.indexOf(x)!==-1},PT=function(x){return XH[x]},QH=function(x){RT(x)||ne('Unknown parameter "'.concat(x,'"'))},ZH=function(x){JH.includes(x)&&ne('The parameter "'.concat(x,'" is incompatible with toasts'))},e7=function(x){var E=PT(x);E&&ce(x,E)},t7=function(x){x.backdrop===!1&&x.allowOutsideClick&&ne('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(var E in x)QH(E),x.toast&&ZH(E),e7(E)};function AT(O){var x=fe(),E=kt.innerParams.get(this);if(!x||so(x,E.hideClass.popup)){ne("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}var R=n7(O),U=Object.assign({},E,R);iT(this,U),kt.innerParams.set(this,U),Object.defineProperties(this,{params:{value:Object.assign({},this.params,O),writable:!1,enumerable:!0}})}var n7=function(x){var E={};return Object.keys(x).forEach(function(R){OT(R)?E[R]=x[R]:ne("Invalid parameter to update: ".concat(R))}),E};function DT(){var O=kt.domCache.get(this),x=kt.innerParams.get(this);if(!x){IT(this);return}O.popup&&j.swalCloseEventFinishedCallback&&(j.swalCloseEventFinishedCallback(),delete j.swalCloseEventFinishedCallback),typeof x.didDestroy=="function"&&x.didDestroy(),r7(this)}var r7=function(x){IT(x),delete x.params,delete j.keydownHandler,delete j.keydownTarget,delete j.currentInstance},IT=function(x){x.isAwaitingPromise?(Ub(kt,x),x.isAwaitingPromise=!0):(Ub(wc,x),Ub(kt,x),delete x.isAwaitingPromise,delete x.disableButtons,delete x.enableButtons,delete x.getInput,delete x.disableInput,delete x.enableInput,delete x.hideLoading,delete x.disableLoading,delete x.showValidationMessage,delete x.resetValidationMessage,delete x.close,delete x.closePopup,delete x.closeModal,delete x.closeToast,delete x.rejectPromise,delete x.update,delete x._destroy)},Ub=function(x,E){for(var R in x)x[R].delete(E)},o7=Object.freeze({__proto__:null,_destroy:DT,close:Ri,closeModal:Ri,closePopup:Ri,closeToast:Ri,disableButtons:CT,disableInput:ET,disableLoading:Pp,enableButtons:_T,enableInput:kT,getInput:wT,handleAwaitingPromise:Od,hideLoading:Pp,rejectPromise:hT,resetValidationMessage:TT,showValidationMessage:MT,update:AT}),s7=function(x,E,R){x.toast?i7(x,E,R):(l7(E),c7(E),u7(x,E,R))},i7=function(x,E,R){E.popup.onclick=function(){x&&(a7(x)||x.timer||x.input)||R(bc.close)}},a7=function(x){return!!(x.showConfirmButton||x.showDenyButton||x.showCancelButton||x.showCloseButton)},Ap=!1,l7=function(x){x.popup.onmousedown=function(){x.container.onmouseup=function(E){x.container.onmouseup=function(){},E.target===x.container&&(Ap=!0)}}},c7=function(x){x.container.onmousedown=function(){x.popup.onmouseup=function(E){x.popup.onmouseup=function(){},(E.target===x.popup||E.target instanceof HTMLElement&&x.popup.contains(E.target))&&(Ap=!0)}}},u7=function(x,E,R){E.container.onclick=function(U){if(Ap){Ap=!1;return}U.target===E.container&&ye(x.allowOutsideClick)&&R(bc.backdrop)}},d7=function(x){return l(x)==="object"&&x.jquery},NT=function(x){return x instanceof Element||d7(x)},f7=function(x){var E={};return l(x[0])==="object"&&!NT(x[0])?Object.assign(E,x[0]):["title","html","icon"].forEach(function(R,U){var re=x[U];typeof re=="string"||NT(re)?E[R]=re:re!==void 0&&pe("Unexpected type of ".concat(R,'! Expected "string" or "Element", got ').concat(l(re)))}),E};function h7(){for(var O=this,x=arguments.length,E=new Array(x),R=0;R<x;R++)E[R]=arguments[R];return r(O,E)}function p7(O){var x=function(E){f(R,E);function R(){return c(this,R),n(this,R,arguments)}return d(R,[{key:"_main",value:function(re,Te){return b(h(R.prototype),"_main",this).call(this,re,Object.assign({},O,Te))}}]),R}(this);return x}var m7=function(){return j.timeout&&j.timeout.getTimerLeft()},LT=function(){if(j.timeout)return k8(),j.timeout.stop()},jT=function(){if(j.timeout){var x=j.timeout.start();return $b(x),x}},g7=function(){var x=j.timeout;return x&&(x.running?LT():jT())},v7=function(x){if(j.timeout){var E=j.timeout.increase(x);return $b(E,!0),E}},y7=function(){return!!(j.timeout&&j.timeout.isRunning())},$T=!1,Gb={};function b7(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Gb[O]=this,$T||(document.body.addEventListener("click",w7),$T=!0)}var w7=function(x){for(var E=x.target;E&&E!==document;E=E.parentNode)for(var R in Gb){var U=E.getAttribute(R);if(U){Gb[R].fire({template:U});return}}},x7=Object.freeze({__proto__:null,argsToParams:f7,bindClickHandler:b7,clickCancel:dH,clickConfirm:aT,clickDeny:uH,enableLoading:Sc,fire:h7,getActions:fn,getCancelButton:an,getCloseButton:Bs,getConfirmButton:sn,getContainer:ue,getDenyButton:tr,getFocusableElements:Ao,getFooter:Bn,getHtmlContainer:et,getIcon:Me,getIconContent:Ie,getImage:mt,getInputLabel:Za,getLoader:Tn,getPopup:fe,getProgressSteps:Ue,getTimerLeft:m7,getTimerProgressBar:oo,getTitle:Be,getValidationMessage:lt,increaseTimer:v7,isDeprecatedParameter:PT,isLoading:Wt,isTimerRunning:y7,isUpdatableParameter:OT,isValidParameter:RT,isVisible:cH,mixin:p7,resumeTimer:jT,showLoading:Sc,stopTimer:LT,toggleTimer:g7}),S7=function(){function O(x,E){c(this,O),this.callback=x,this.remaining=E,this.running=!1,this.start()}return d(O,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(E){var R=this.running;return R&&this.stop(),this.remaining+=E,R&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),O}(),FT=["swal-title","swal-html","swal-footer"],_7=function(x){var E=typeof x.template=="string"?document.querySelector(x.template):x.template;if(!E)return{};var R=E.content;P7(R);var U=Object.assign(C7(R),k7(R),E7(R),M7(R),T7(R),R7(R),O7(R,FT));return U},C7=function(x){var E={},R=Array.from(x.querySelectorAll("swal-param"));return R.forEach(function(U){rl(U,["name","value"]);var re=U.getAttribute("name"),Te=U.getAttribute("value");typeof _c[re]=="boolean"?E[re]=Te!=="false":l(_c[re])==="object"?E[re]=JSON.parse(Te):E[re]=Te}),E},k7=function(x){var E={},R=Array.from(x.querySelectorAll("swal-function-param"));return R.forEach(function(U){var re=U.getAttribute("name"),Te=U.getAttribute("value");E[re]=new Function("return ".concat(Te))()}),E},E7=function(x){var E={},R=Array.from(x.querySelectorAll("swal-button"));return R.forEach(function(U){rl(U,["type","color","aria-label"]);var re=U.getAttribute("type");E["".concat(re,"ButtonText")]=U.innerHTML,E["show".concat(te(re),"Button")]=!0,U.hasAttribute("color")&&(E["".concat(re,"ButtonColor")]=U.getAttribute("color")),U.hasAttribute("aria-label")&&(E["".concat(re,"ButtonAriaLabel")]=U.getAttribute("aria-label"))}),E},M7=function(x){var E={},R=x.querySelector("swal-image");return R&&(rl(R,["src","width","height","alt"]),R.hasAttribute("src")&&(E.imageUrl=R.getAttribute("src")),R.hasAttribute("width")&&(E.imageWidth=R.getAttribute("width")),R.hasAttribute("height")&&(E.imageHeight=R.getAttribute("height")),R.hasAttribute("alt")&&(E.imageAlt=R.getAttribute("alt"))),E},T7=function(x){var E={},R=x.querySelector("swal-icon");return R&&(rl(R,["type","color"]),R.hasAttribute("type")&&(E.icon=R.getAttribute("type")),R.hasAttribute("color")&&(E.iconColor=R.getAttribute("color")),E.iconHtml=R.innerHTML),E},R7=function(x){var E={},R=x.querySelector("swal-input");R&&(rl(R,["type","label","placeholder","value"]),E.input=R.getAttribute("type")||"text",R.hasAttribute("label")&&(E.inputLabel=R.getAttribute("label")),R.hasAttribute("placeholder")&&(E.inputPlaceholder=R.getAttribute("placeholder")),R.hasAttribute("value")&&(E.inputValue=R.getAttribute("value")));var U=Array.from(x.querySelectorAll("swal-input-option"));return U.length&&(E.inputOptions={},U.forEach(function(re){rl(re,["value"]);var Te=re.getAttribute("value"),Xe=re.innerHTML;E.inputOptions[Te]=Xe})),E},O7=function(x,E){var R={};for(var U in E){var re=E[U],Te=x.querySelector(re);Te&&(rl(Te,[]),R[re.replace(/^swal-/,"")]=Te.innerHTML.trim())}return R},P7=function(x){var E=FT.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(x.children).forEach(function(R){var U=R.tagName.toLowerCase();E.includes(U)||ne("Unrecognized element <".concat(U,">"))})},rl=function(x,E){Array.from(x.attributes).forEach(function(R){E.indexOf(R.name)===-1&&ne(['Unrecognized attribute "'.concat(R.name,'" on <').concat(x.tagName.toLowerCase(),">."),"".concat(E.length?"Allowed attributes are: ".concat(E.join(", ")):"To set the value, use HTML within the element.")])})},zT=10,A7=function(x){var E=ue(),R=fe();typeof x.willOpen=="function"&&x.willOpen(R);var U=window.getComputedStyle(document.body),re=U.overflowY;L7(E,R,x),setTimeout(function(){I7(E,R)},zT),Do()&&(N7(E,x.scrollbarPadding,re),bH()),!it()&&!j.previousActiveElement&&(j.previousActiveElement=document.activeElement),typeof x.didOpen=="function"&&setTimeout(function(){return x.didOpen(R)}),Ct(E,B["no-transition"])},D7=function O(x){var E=fe();if(!(x.target!==E||!nl)){var R=ue();E.removeEventListener(nl,O),R.style.overflowY="auto"}},I7=function(x,E){nl&&Tp(E)?(x.style.overflowY="hidden",E.addEventListener(nl,D7)):x.style.overflowY="auto"},N7=function(x,E,R){wH(),E&&R!=="hidden"&&MH(R),setTimeout(function(){x.scrollTop=0})},L7=function(x,E,R){Ne(x,R.showClass.backdrop),R.animation?(E.style.setProperty("opacity","0","important"),Ot(E,"grid"),setTimeout(function(){Ne(E,R.showClass.popup),E.style.removeProperty("opacity")},zT)):Ot(E,"grid"),Ne([document.documentElement,document.body],B.shown),R.heightAuto&&R.backdrop&&!R.toast&&Ne([document.documentElement,document.body],B["height-auto"])},BT={email:function(x,E){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(x)?Promise.resolve():Promise.resolve(E||"Invalid email address")},url:function(x,E){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(x)?Promise.resolve():Promise.resolve(E||"Invalid URL")}};function j7(O){O.inputValidator||(O.input==="email"&&(O.inputValidator=BT.email),O.input==="url"&&(O.inputValidator=BT.url))}function $7(O){(!O.target||typeof O.target=="string"&&!document.querySelector(O.target)||typeof O.target!="string"&&!O.target.appendChild)&&(ne('Target parameter is not valid, defaulting to "body"'),O.target="body")}function F7(O){j7(O),O.showLoaderOnConfirm&&!O.preConfirm&&ne(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),$7(O),typeof O.title=="string"&&(O.title=O.title.split(`
`).join("<br />")),A8(O)}var cs,Dp=new WeakMap,Qt=function(){function O(){if(c(this,O),I(this,Dp,{writable:!0,value:void 0}),!(typeof window>"u")){cs=this;for(var x=arguments.length,E=new Array(x),R=0;R<x;R++)E[R]=arguments[R];var U=Object.freeze(this.constructor.argsToParams(E));this.params=U,this.isAwaitingPromise=!1,H(this,Dp,this._main(cs.params))}}return d(O,[{key:"_main",value:function(E){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t7(Object.assign({},R,E)),j.currentInstance){var U=wc.swalPromiseResolve.get(j.currentInstance),re=j.currentInstance.isAwaitingPromise;j.currentInstance._destroy(),re||U({isDismissed:!0}),Do()&&uT()}j.currentInstance=cs;var Te=B7(E,R);F7(Te),Object.freeze(Te),j.timeout&&(j.timeout.stop(),delete j.timeout),clearTimeout(j.restoreFocusTimeout);var Xe=V7(cs);return iT(cs,Te),kt.innerParams.set(cs,Te),z7(cs,Xe,Te)}},{key:"then",value:function(E){return V(this,Dp).then(E)}},{key:"finally",value:function(E){return V(this,Dp).finally(E)}}]),O}(),z7=function(x,E,R){return new Promise(function(U,re){var Te=function(tt){x.close({isDismissed:!0,dismiss:tt})};wc.swalPromiseResolve.set(x,U),wc.swalPromiseReject.set(x,re),E.confirmButton.onclick=function(){WH(x)},E.denyButton.onclick=function(){UH(x)},E.cancelButton.onclick=function(){GH(x,Te)},E.closeButton.onclick=function(){Te(bc.close)},s7(R,E,Te),fH(j,R,Te),NH(x,R),A7(R),H7(j,R,Te),W7(E,R),setTimeout(function(){E.container.scrollTop=0})})},B7=function(x,E){var R=_7(x),U=Object.assign({},_c,E,R,x);return U.showClass=Object.assign({},_c.showClass,U.showClass),U.hideClass=Object.assign({},_c.hideClass,U.hideClass),U.animation===!1&&(U.showClass={backdrop:"swal2-noanimation"},U.hideClass={}),U},V7=function(x){var E={popup:fe(),container:ue(),actions:fn(),confirmButton:sn(),denyButton:tr(),cancelButton:an(),loader:Tn(),closeButton:Bs(),validationMessage:lt(),progressSteps:Ue()};return kt.domCache.set(x,E),E},H7=function(x,E,R){var U=oo();xn(U),E.timer&&(x.timeout=new S7(function(){R("timer"),delete x.timeout},E.timer),E.timerProgressBar&&(Ot(U),Vn(U,E,"timerProgressBar"),setTimeout(function(){x.timeout&&x.timeout.running&&$b(E.timer)})))},W7=function(x,E){if(!E.toast){if(!ye(E.allowEnterKey)){G7();return}U7(x,E)||Vb(-1,1)}},U7=function(x,E){return E.focusDeny&&On(x.denyButton)?(x.denyButton.focus(),!0):E.focusCancel&&On(x.cancelButton)?(x.cancelButton.focus(),!0):E.focusConfirm&&On(x.confirmButton)?(x.confirmButton.focus(),!0):!1},G7=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var VT=new Date,HT=localStorage.getItem("swal-initiation");HT?(VT.getTime()-Date.parse(HT))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var O=document.createElement("audio");O.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",O.loop=!0,document.body.appendChild(O),setTimeout(function(){O.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(VT))}Qt.prototype.disableButtons=CT,Qt.prototype.enableButtons=_T,Qt.prototype.getInput=wT,Qt.prototype.disableInput=ET,Qt.prototype.enableInput=kT,Qt.prototype.hideLoading=Pp,Qt.prototype.disableLoading=Pp,Qt.prototype.showValidationMessage=MT,Qt.prototype.resetValidationMessage=TT,Qt.prototype.close=Ri,Qt.prototype.closePopup=Ri,Qt.prototype.closeModal=Ri,Qt.prototype.closeToast=Ri,Qt.prototype.rejectPromise=hT,Qt.prototype.update=AT,Qt.prototype._destroy=DT,Object.assign(Qt,x7),Object.keys(o7).forEach(function(O){Qt[O]=function(){if(cs&&cs[O]){var x;return(x=cs)[O].apply(x,arguments)}return null}}),Qt.DismissReason=bc,Qt.version="11.10.5";var Ip=Qt;return Ip.default=Ip,Ip}),typeof jr<"u"&&jr.Sweetalert2&&(jr.swal=jr.sweetAlert=jr.Swal=jr.SweetAlert=jr.Sweetalert2),typeof document<"u"&&function(n,r){var o=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=r);else try{o.innerHTML=r}catch{o.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(E6);var jye=E6.exports;const mMe=bi(jye);var M6={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(jr,function(){return function(n,r,o){n=n||{};var s=r.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(c,u,d,f){return s.fromToBase(c,u,d,f)}o.en.relativeTime=i,s.fromToBase=function(c,u,d,f,h){for(var p,m,v,y=d.$locale().relativeTime||i,b=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],w=b.length,S=0;S<w;S+=1){var _=b[S];_.d&&(p=f?o(c).diff(d,_.d,!0):d.diff(c,_.d,!0));var k=(n.rounding||Math.round)(Math.abs(p));if(v=p>0,k<=_.r||!_.r){k<=1&&S>0&&(_=b[S-1]);var M=y[_.l];h&&(k=h(""+k)),m=typeof M=="string"?M.replace("%d",k):M(k,u,_.l,v);break}}if(u)return m;var T=v?y.future:y.past;return typeof T=="function"?T(m):T.replace("%s",m)},s.to=function(c,u){return a(c,u,this,!0)},s.from=function(c,u){return a(c,u,this)};var l=function(c){return c.$u?o.utc():o()};s.toNow=function(c){return this.to(l(this),c)},s.fromNow=function(c){return this.from(l(this),c)}}})})(M6);var $ye=M6.exports;const gMe=bi($ye);var T6={exports:{}};(function(t,e){(function(n,r){t.exports=r(rz)})(jr,function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var o=r(n),s={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(i){return i+"º"}};return o.default.locale(s,null,!0),s})})(T6);var Fye=T6.exports;const vMe=bi(Fye);function Nn(t){this.content=t}Nn.prototype={constructor:Nn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),s=r.content.slice();return o==-1?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new Nn(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Nn(n)},addToStart:function(t,e){return new Nn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Nn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),s=r.find(t);return o.splice(s==-1?o.length:s,0,e,n),new Nn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Nn.from(t),t.size?new Nn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Nn.from(t),t.size?new Nn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Nn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Nn.from=function(t){if(t instanceof Nn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Nn(e)};function R6(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)n++;return n}if(o.content.size||s.content.size){let i=R6(o.content,s.content,n+1);if(i!=null)return i}n+=o.nodeSize}}function O6(t,e,n,r){for(let o=t.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:n,b:r};let i=t.child(--o),a=e.child(--s),l=i.nodeSize;if(i==a){n-=l,r-=l;continue}if(!i.sameMarkup(a))return{a:n,b:r};if(i.isText&&i.text!=a.text){let c=0,u=Math.min(i.text.length,a.text.length);for(;c<u&&i.text[i.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(i.content.size||a.content.size){let c=O6(i.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class he{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,s){for(let i=0,a=0;a<n;i++){let l=this.content[i],c=a+l.nodeSize;if(c>e&&r(l,o+a,s||null,i)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let s="",i=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(i?i=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new he(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let s=0,i=0;i<n;s++){let a=this.content[s],l=i+a.nodeSize;l>e&&((i<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-i),Math.min(a.text.length,n-i)):a=a.cut(Math.max(0,e-i-1),Math.min(a.content.size,n-i-1))),r.push(a),o+=a.nodeSize),i=l}return new he(r,o)}cutByIndex(e,n){return e==n?he.empty:e==0&&n==this.content.length?this:new he(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new he(o,s)}addToStart(e){return new he([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new he(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return R6(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return O6(this,e,n,r)}findIndex(e,n=-1){if(e==0)return zm(0,e);if(e==this.size)return zm(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),i=o+s.nodeSize;if(i>=e)return i==e||n>0?zm(r+1,i):zm(r,o);o=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return he.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new he(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return he.empty;let n,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(n||(n=e.slice(0,o)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new he(n||e,r)}static from(e){if(!e)return he.empty;if(e instanceof he)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new he([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}he.empty=new he([],0);const Hw={index:0,offset:0};function zm(t,e){return Hw.index=t,Hw.offset=e,Hw}function $v(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!$v(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!$v(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let bt=class C_{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$v(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return C_.none;if(e instanceof C_)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};bt.none=[];class Fv extends Error{}class Ee{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=A6(this.content,e+this.openStart,n);return r&&new Ee(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ee(P6(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ee.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ee(he.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new Ee(e,r,o)}}Ee.empty=new Ee(he.empty,0,0);function P6(t,e,n){let{index:r,offset:o}=t.findIndex(e),s=t.maybeChild(r),{index:i,offset:a}=t.findIndex(n);if(o==e||s.isText){if(a!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(P6(s.content,e-o-1,n-o-1)))}function A6(t,e,n,r){let{index:o,offset:s}=t.findIndex(e),i=t.maybeChild(o);if(s==e||i.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=A6(i.content,e-s-1,n);return a&&t.replaceChild(o,i.copy(a))}function zye(t,e,n){if(n.openStart>t.depth)throw new Fv("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Fv("Inconsistent open depths");return D6(t,e,n,0)}function D6(t,e,n,r){let o=t.index(r),s=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let i=D6(t,e,n,r+1);return s.copy(s.content.replaceChild(o,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,a=i.content;return jl(i,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:i,end:a}=Bye(n,t);return jl(s,N6(t,i,a,e,r))}else return jl(s,zv(t,e,r))}function I6(t,e){if(!e.type.compatibleContent(t.type))throw new Fv("Cannot join "+e.type.name+" onto "+t.type.name)}function k_(t,e,n){let r=t.node(n);return I6(r,e.node(n)),r}function Ll(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ff(t,e,n,r){let o=(e||t).node(n),s=0,i=e?e.index(n):o.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(Ll(t.nodeAfter,r),s++));for(let a=s;a<i;a++)Ll(o.child(a),r);e&&e.depth==n&&e.textOffset&&Ll(e.nodeBefore,r)}function jl(t,e){return t.type.checkContent(e),t.copy(e)}function N6(t,e,n,r,o){let s=t.depth>o&&k_(t,e,o+1),i=r.depth>o&&k_(n,r,o+1),a=[];return Ff(null,t,o,a),s&&i&&e.index(o)==n.index(o)?(I6(s,i),Ll(jl(s,N6(t,e,n,r,o+1)),a)):(s&&Ll(jl(s,zv(t,e,o+1)),a),Ff(e,n,o,a),i&&Ll(jl(i,zv(n,r,o+1)),a)),Ff(r,null,o,a),new he(a)}function zv(t,e,n){let r=[];if(Ff(null,t,n,r),t.depth>n){let o=k_(t,e,n+1);Ll(jl(o,zv(t,e,n+1)),r)}return Ff(e,null,n,r),new he(r)}function Bye(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)o=e.node(s).copy(he.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class Ph{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return bt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let s=r.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!o||!s[i].isInSet(o.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Bv(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,s=n;for(let i=e;;){let{index:a,offset:l}=i.content.findIndex(s),c=s-l;if(r.push(i,a,o+l),!c||(i=i.child(a),i.isText))break;s=c-1,o+=l+1}return new Ph(n,r,s)}static resolveCached(e,n){for(let o=0;o<Ww.length;o++){let s=Ww[o];if(s.pos==n&&s.doc==e)return s}let r=Ww[Uw]=Ph.resolve(e,n);return Uw=(Uw+1)%Vye,r}}let Ww=[],Uw=0,Vye=12;class Bv{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Hye=Object.create(null);let $l=class E_{constructor(e,n,r,o=bt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||he.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&$v(this.attrs,n||e.defaultAttrs||Hye)&&bt.sameSet(this.marks,r||bt.none)}copy(e=null){return e==this.content?this:new E_(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new E_(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Ee.empty;let o=this.resolve(e),s=this.resolve(n),i=r?0:o.sharedDepth(n),a=o.start(i),c=o.node(i).content.cut(o.pos-a,s.pos-a);return new Ee(c,o.depth-i,s.depth-i)}replace(e,n,r){return zye(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return Ph.resolveCached(this,e)}resolveNoCache(e){return Ph.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),L6(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=he.empty,o=0,s=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,o,s),a=i&&i.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),i=s&&s.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=bt.none;for(let n=0;n<this.marks.length;n++)e=this.marks[n].addToSet(e);if(!bt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=he.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,o,r)}};$l.prototype.text=void 0;class Vv extends $l{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):L6(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Vv(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Vv(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function L6(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class tc{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Wye(e,n);if(r.next==null)return tc.empty;let o=j6(r);r.next&&r.err("Unexpected trailing text");let s=Jye(Xye(o));return Qye(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let s=n;o&&s<r;s++)o=o.matchType(e.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function s(i,a){let l=i.matchFragment(e,r);if(l&&(!n||l.validEnd))return he.from(a.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=s(d,a.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let i=[];for(let a=o;a.type;a=a.via)i.push(a.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:a,next:l}=s.next[i];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)s+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return s}).join(`
`)}}tc.empty=new tc(!0);class Wye{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function j6(t){let e=[];do e.push(Uye(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Uye(t){let e=[];do e.push(Gye(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Gye(t){let e=qye(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Kye(t,e);else break;return e}function yI(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Kye(t,e){let n=yI(t),r=n;return t.eat(",")&&(t.next!="}"?r=yI(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Yye(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let s in n){let i=n[s];i.groups.indexOf(e)>-1&&o.push(i)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function qye(t){if(t.eat("(")){let e=j6(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Yye(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Xye(t){let e=[[]];return o(s(t,0),n()),e;function n(){return e.push([])-1}function r(i,a,l){let c={term:l,to:a};return e[i].push(c),c}function o(i,a){i.forEach(l=>l.to=a)}function s(i,a){if(i.type=="choice")return i.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(i.type=="seq")for(let l=0;;l++){let c=s(i.exprs[l],a);if(l==i.exprs.length-1)return c;o(c,a=n())}else if(i.type=="star"){let l=n();return r(a,l),o(s(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return o(s(i.expr,a),l),o(s(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(a)].concat(s(i.expr,a));if(i.type=="range"){let l=a;for(let c=0;c<i.min;c++){let u=n();o(s(i.expr,l),u),l=u}if(i.max==-1)o(s(i.expr,l),l);else for(let c=i.min;c<i.max;c++){let u=n();r(l,u),o(s(i.expr,l),u),l=u}return[r(l)]}else{if(i.type=="name")return[r(a,void 0,i.value)];throw new Error("Unknown expr type")}}}}function $6(t,e){return e-t}function bI(t,e){let n=[];return r(e),n.sort($6);function r(o){let s=t[o];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(o);for(let i=0;i<s.length;i++){let{term:a,to:l}=s[i];!a&&n.indexOf(l)==-1&&r(l)}}}function Jye(t){let e=Object.create(null);return n(bI(t,0));function n(r){let o=[];r.forEach(i=>{t[i].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<o.length;u++)o[u][0]==a&&(c=o[u][1]);bI(t,l).forEach(u=>{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new tc(r.indexOf(t.length-1)>-1);for(let i=0;i<o.length;i++){let a=o[i][1].sort($6);s.next.push({type:o[i][0],next:e[a.join(",")]||n(a)})}return s}}function Qye(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],s=!o.validEnd,i=[];for(let a=0;a<o.next.length;a++){let{type:l,next:c}=o.next[a];i.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function F6(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function z6(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let s=t[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function B6(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new Zye(t[n]);return e}let wI=class V6{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=B6(r.attrs),this.defaultAttrs=F6(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==tc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:z6(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $l(this,this.computeAttrs(e),he.from(n),bt.setFrom(r))}createChecked(e=null,n,r){return n=he.from(n),this.checkContent(n),new $l(this,this.computeAttrs(e),n,bt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=he.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let o=this.contentMatch.matchFragment(n),s=o&&o.fillBefore(he.empty,!0);return s?new $l(this,e,n.append(s),bt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:bt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,i)=>r[s]=new V6(s,n,i));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Zye{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Sb{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=B6(o.attrs),this.excluded=null;let s=F6(this.attrs);this.instance=s?new bt(this,s):null}create(e=null){return!e&&this.instance?this.instance:new bt(this,z6(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new Sb(s,o++,n,i)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}excludes(e){return this.excluded.indexOf(e)>-1}}class H6{constructor(e){this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Nn.from(e.nodes),n.marks=Nn.from(e.marks||{}),this.nodes=wI.compile(this.spec.nodes,this),this.marks=Sb.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],i=s.spec.content||"",a=s.spec.marks;s.contentMatch=r[i]||(r[i]=tc.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=a=="_"?null:a?xI(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:xI(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof wI){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Vv(r,r.defaultAttrs,e,bt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return $l.fromJSON(this,e)}markFromJSON(e){return bt.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function xI(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],s=t.marks[o],i=s;if(s)n.push(s);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}let xM=class M_{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new _I(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new _I(this,n,!0);return r.addAll(e,n.from,n.to),Ee.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(nbe(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,n,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],a=i.style;if(!(a.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(e){let n=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<n.length;i++){let a=n[i];if((a.priority==null?50:a.priority)<s)break}n.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=CI(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=CI(i)),i.node||i.ignore||i.mark||(i.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new M_(e,M_.schemaRules(e)))}};const W6={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ebe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U6={ol:!0,ul:!0},Hv=1,Wv=2,zf=4;function SI(t,e,n){return e!=null?(e?Hv:0)|(e==="full"?Wv:0):t&&t.whitespace=="pre"?Hv|Wv:n&~zf}class Bm{constructor(e,n,r,o,s,i,a){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=s,this.options=a,this.content=[],this.activeMarks=bt.none,this.stashMarks=[],this.match=i||(a&zf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(he.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Hv)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let n=he.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(he.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;n<r.length;n++){let o=r[n];(this.type?this.type.allowsMarkType(o.type):obe(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!W6.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class _I{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0;let o=n.topNode,s,i=SI(null,n.preserveWhitespace,0)|(r?zf:0);o?s=new Bm(o.type,o.attrs,bt.none,bt.none,!0,n.topMatch||o.type.contentMatch,i):r?s=new Bm(null,null,bt.none,bt.none,!0,null,i):s=new Bm(e.schema.topNodeType,null,bt.none,bt.none,!0,null,i),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,n){let r=e.getAttribute("style");if(!r)return n();let o=this.readStyles(rbe(r));if(!o)return;let[s,i]=o,a=this.top;for(let l=0;l<i.length;l++)this.removePendingMark(i[l],a);for(let l=0;l<s.length;l++)this.addPendingMark(s[l]);n();for(let l=0;l<s.length;l++)this.removePendingMark(s[l],a);for(let l=0;l<i.length;l++)this.addPendingMark(i[l])}addTextNode(e){let n=e.nodeValue,r=this.top;if(r.options&Wv||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Hv)r.options&Wv?n=n.replace(/\r\n?/g,`
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(e)}else this.findInside(e)}addElement(e,n){let r=e.nodeName.toLowerCase(),o;U6.hasOwnProperty(r)&&this.parser.normalizeLists&&tbe(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));if(s?s.ignore:ebe.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let i,a=this.top,l=this.needsBlock;if(W6.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),i&&this.sync(a),this.needsBlock=l}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=bt.none,r=bt.none;for(let o=0;o<e.length;o+=2)for(let s=void 0;;){let i=this.parser.matchStyle(e[o],e[o+1],this,s);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(a=>{i.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(n),i.consuming===!1)s=i;else break}return[n,r]}addElementByRule(e,n,r){let o,s,i;n.node?(s=this.parser.schema.nodes[n.node],s.isLeaf?this.insertNode(s.create(n.attrs))||this.leafFallback(e):o=this.enter(s,n.attrs||null,n.preserveWhitespace)):(i=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(i));let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l)}o&&this.sync(a)&&this.open--,i&&this.removePendingMark(i,a)}addAll(e,n,r){let o=n||0;for(let s=n?e.childNodes[n]:e.firstChild,i=r==null?null:e.childNodes[r];s!=i;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s);this.findAtPoint(e,o)}findPlace(e){let n,r;for(let o=this.open;o>=0;o--){let s=this.nodes[o],i=s.findWrapping(e);if(i&&(!n||n.length>i.length)&&(n=i,r=s,!i.length)||s.solid)break}if(!n)return!1;this.sync(r);for(let o=0;o<n.length;o++)this.enterInner(n[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(e)){this.closeExtra();let n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));let r=n.activeMarks;for(let o=0;o<e.marks.length;o++)(!n.type||n.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}enter(e,n,r){let o=this.findPlace(e.create(n));return o&&this.enterInner(e,n,!0,r),o}enterInner(e,n=null,r=!1,o){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let i=SI(e,o,s.options);s.options&zf&&s.content.length==0&&(i|=zf),this.nodes.push(new Bm(e,n,s.activeMarks,s.pendingMarks,r,null,i)),this.open++}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(i(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let n=sbe(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let i=o.popFromStashMark(e);i&&o.type&&o.type.allowsMarkType(i.type)&&(o.activeMarks=i.addToSet(o.activeMarks))}if(o==n)break}}}function tbe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&U6.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function nbe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function rbe(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}function CI(t){let e={};for(let n in t)e[n]=t[n];return e}function obe(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let s=[],i=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||s.indexOf(u)<0&&i(u))return!0}};if(i(o.contentMatch))return!0}}function sbe(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}class Ms{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Gw(n).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let a=0,l=0;for(;a<s.length&&l<i.marks.length;){let c=i.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)o=s.pop()[1];for(;l<i.marks.length;){let c=i.marks[l++],u=this.serializeMark(c,i.isInline,n);u&&(s.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Ms.renderSpec(Gw(n),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ms.renderSpec(Gw(r),o(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let i,a=r?e.createElementNS(r,o):e.createElement(o),l=n[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;u<n.length;u++){let d=n[u];if(d===0){if(u<n.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:h}=Ms.renderSpec(e,d,r);if(a.appendChild(f),h){if(i)throw new RangeError("Multiple content holes");i=h}}}return{dom:a,contentDOM:i}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ms(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=kI(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return kI(e.marks)}}function kI(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Gw(t){return t.document||window.document}const G6=65535,K6=Math.pow(2,16);function ibe(t,e){return t+e*K6}function EI(t){return t&G6}function abe(t){return(t-(t&G6))/K6}const Y6=1,q6=2,Pg=4,X6=8;class T_{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&X6)>0}get deletedBefore(){return(this.delInfo&(Y6|Pg))>0}get deletedAfter(){return(this.delInfo&(q6|Pg))>0}get deletedAcross(){return(this.delInfo&Pg)>0}}class Fr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Fr.empty)return Fr.empty}recover(e){let n=0,r=EI(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+abe(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+i],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,h=l+o+(f<0?0:u);if(r)return h;let p=e==(n<0?l:d)?null:ibe(a/3,e-l),m=e==l?q6:e==d?Y6:Pg;return(n<0?e!=l:e!=d)&&(m|=X6),new T_(h,m,p)}o+=u-c}return r?e+o:new T_(e+o,0,null)}touches(e,n){let r=0,o=EI(n),s=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=l+c;if(e<=u&&a==o*3)return!0;r+=this.ranges[a+i]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],a=i-(this.inverted?s:0),l=i+(this.inverted?0:s),c=this.ranges[o+n],u=this.ranges[o+r];e(a,a+c,l,l+u),s+=u-c}}invert(){return new Fr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Fr.empty:new Fr(e<0?[0,-e,0]:[0,0,e])}}Fr.empty=new Fr([]);class wu{constructor(e=[],n,r=0,o=e.length){this.maps=e,this.mirror=n,this.from=r,this.to=o}slice(e=0,n=this.maps.length){return new wu(this.maps,this.mirror,e,n)}copy(){return new wu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,r=this.maps.length;n<e.maps.length;n++){let o=e.getMirror(n);this.appendMap(e.maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this.maps.length+e.maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new wu;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],a=i.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this.maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new T_(e,o,null)}}const Kw=Object.create(null);class er{getMap(){return Fr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Kw[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Kw)throw new RangeError("Duplicate use of step JSON ID "+e);return Kw[e]=n,n.prototype.jsonID=e,n}}class cn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new cn(e,null)}static fail(e){return new cn(null,e)}static fromReplace(e,n,r,o){try{return cn.ok(e.replace(n,r,o))}catch(s){if(s instanceof Fv)return cn.fail(s.message);throw s}}}function SM(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let s=t.child(o);s.content.size&&(s=s.copy(SM(s.content,e,s))),s.isInline&&(s=e(s,n,o)),r.push(s)}return he.fromArray(r)}class ta extends er{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new Ee(SM(n.content,(i,a)=>!i.isAtom||!a.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),n.openStart,n.openEnd);return cn.fromReplace(e,this.from,this.to,s)}invert(){return new Ts(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ta(n.pos,r.pos,this.mark)}merge(e){return e instanceof ta&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ta(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ta(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("addMark",ta);class Ts extends er{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Ee(SM(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return cn.fromReplace(e,this.from,this.to,r)}invert(){return new ta(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ts(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ts&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ts(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ts(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("removeMark",Ts);class na extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return cn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return cn.fromReplace(e,this.pos,this.pos+1,new Ee(he.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new na(this.pos,n.marks[o]);return new na(this.pos,this.mark)}}return new Xu(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new na(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new na(n.pos,e.markFromJSON(n.mark))}}er.jsonID("addNodeMark",na);class Xu extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return cn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return cn.fromReplace(e,this.pos,this.pos+1,new Ee(he.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new na(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Xu(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xu(n.pos,e.markFromJSON(n.mark))}}er.jsonID("removeNodeMark",Xu);class _n extends er{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&R_(e,this.from,this.to)?cn.fail("Structure replace would overwrite content"):cn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Fr([this.from,this.to-this.from,this.slice.size])}invert(e){return new _n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new _n(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof _n)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Ee.empty:new Ee(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new _n(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Ee.empty:new Ee(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new _n(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new _n(n.from,n.to,Ee.fromJSON(e,n.slice),!!n.structure)}}er.jsonID("replace",_n);class kn extends er{constructor(e,n,r,o,s,i,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=a}apply(e){if(this.structure&&(R_(e,this.from,this.gapFrom)||R_(e,this.gapTo,this.to)))return cn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return cn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?cn.fromReplace(e,this.from,this.to,r):cn.fail("Content does not fit in gap")}getMap(){return new Fr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new kn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),s=e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||s>r.pos?null:new kn(n.pos,r.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new kn(n.from,n.to,n.gapFrom,n.gapTo,Ee.fromJSON(e,n.slice),n.insert,!!n.structure)}}er.jsonID("replaceAround",kn);function R_(t,e,n){let r=t.resolve(e),o=n-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function lbe(t,e,n,r){let o=[],s=[],i,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+l.nodeSize,n),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=h:o.push(i=new Ts(f,h,d[m])));a&&a.to==f?a.to=h:s.push(a=new ta(f,h,r))}}),o.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function cbe(t,e,n,r){let o=[],s=0;t.doc.nodesBetween(e,n,(i,a)=>{if(!i.isInline)return;s++;let l=null;if(r instanceof Sb){let c=i.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let c=Math.min(a+i.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<o.length;h++){let p=o[h];p.step==s-1&&d.eq(o[h].style)&&(f=p)}f?(f.to=c,f.step=s):o.push({style:d,from:Math.max(a,e),to:c,step:s})}}}),o.forEach(i=>t.step(new Ts(i.from,i.to,i.style)))}function ube(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),s=[],i=e+1;for(let a=0;a<o.childCount;a++){let l=o.child(a),c=i+l.nodeSize,u=r.matchType(l.type);if(!u)s.push(new _n(i,c,Ee.empty));else{r=u;for(let d=0;d<l.marks.length;d++)n.allowsMarkType(l.marks[d].type)||t.step(new Ts(i,c,l.marks[d]));if(l.isText&&!n.spec.code){let d,f=/\r?\n|\r/g,h;for(;d=f.exec(l.text);)h||(h=new Ee(he.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new _n(i+d.index,i+d.index+d[0].length,h))}}i=c}if(!r.validEnd){let a=r.fillBefore(he.empty,!0);t.replace(i,i,new Ee(a,0,0))}for(let a=s.length-1;a>=0;a--)t.step(s[a])}function dbe(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function kd(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),s=t.$from.index(r),i=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(s,i,n))return r;if(r==0||o.type.spec.isolating||!dbe(o,s,i))break}return null}function fbe(t,e,n){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),a=o.after(s+1),l=i,c=a,u=he.empty,d=0;for(let p=s,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=he.from(r.node(p).copy(u)),d++):l--;let f=he.empty,h=0;for(let p=s,m=!1;p>n;p--)m||o.after(p+1)<o.end(p)?(m=!0,f=he.from(o.node(p).copy(f)),h++):c++;t.step(new kn(l,c,i,a,new Ee(u.append(f),d,h),u.size-d,!0))}function _M(t,e,n=null,r=t){let o=hbe(t,e),s=o&&pbe(r,e);return s?o.map(MI).concat({type:e,attrs:n}).concat(s.map(MI)):null}function MI(t){return{type:t,attrs:null}}function hbe(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return n.canReplaceWith(r,o,i)?s:null}function pbe(t,e){let{parent:n,startIndex:r,endIndex:o}=t,s=n.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let l=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:i}function mbe(t,e,n){let r=he.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let a=n[i].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=he.from(n[i].type.create(n[i].attrs,r))}let o=e.start,s=e.end;t.step(new kn(o,s,o,s,new Ee(r,0,0),n.length,!0))}function gbe(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(i,a)=>{if(i.isTextblock&&!i.hasMarkup(r,o)&&vbe(t.doc,t.mapping.slice(s).map(a),r)){t.clearIncompatible(t.mapping.slice(s).map(a,1),r);let l=t.mapping.slice(s),c=l.map(a,1),u=l.map(a+i.nodeSize,1);return t.step(new kn(c,u,c+1,u-1,new Ee(he.from(r.create(o,null,i.marks)),0,0),1,!0)),!1}})}function vbe(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function ybe(t,e,n,r,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(r,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new kn(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new Ee(he.from(i),0,0),1,!0))}function xu(t,e,n=1,r){let o=t.resolve(e),s=o.depth-n,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>s;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let a=o.indexAfter(s),l=r&&r[0];return o.node(s).canReplaceWith(a,a,l?l.type:o.node(s+1).type)}function bbe(t,e,n=1,r){let o=t.doc.resolve(e),s=he.empty,i=he.empty;for(let a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){s=he.from(o.node(a).copy(s));let u=r&&r[c];i=he.from(u?u.type.create(u.attrs,i):o.node(a).copy(i))}t.step(new _n(e,e,new Ee(s.append(i),n,n),!0))}function qa(t,e){let n=t.resolve(e),r=n.index();return J6(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function J6(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function _b(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let s,i,a=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):n>0?(s=r.node(o+1),a++,i=r.node(o).maybeChild(a)):(s=r.node(o).maybeChild(a-1),i=r.node(o+1)),s&&!s.isTextblock&&J6(s,i)&&r.node(o).canReplace(a,a+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function wbe(t,e,n){let r=new _n(e-n,e+n,Ee.empty,!0);t.step(r)}function xbe(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,n))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,n))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function Q6(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let s=0;s<n.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let i=r.depth;i>=0;i--){let a=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(a>0?1:0),c=r.node(i),u=!1;if(s==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?r.pos:a<0?r.before(i+1):r.after(i+1)}return null}function Cb(t,e,n=e,r=Ee.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),s=t.resolve(n);return Z6(o,s,r)?new _n(e,n,r):new Sbe(o,s,r).fit()}function Z6(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Sbe{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=he.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=he.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let s=this.placed,i=r.depth,a=o.depth;for(;i&&a&&s.childCount==1;)s=s.firstChild.content,i--,a--;let l=new Ee(s,i,a);return e>-1?new kn(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new _n(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=Yw(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(i?c.matchType(i.type)||(d=c.fillBefore(he.from(i),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:d};if(n==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Yw(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ee(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Yw(e,n);if(o.childCount<=1&&n>0){let s=e.size-n<=n+o.size;this.unplaced=new Ee(vf(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new Ee(vf(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let i=this.unplaced,a=r?r.content:i.content,l=i.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[n];if(o){for(let m=0;m<o.childCount;m++)u.push(o.child(m));d=d.matchFragment(o)}let h=a.size+e-(i.content.size-i.openEnd);for(;c<a.childCount;){let m=a.child(c),v=d.matchType(m.type);if(!v)break;c++,(c>1||l==0||m.content.size)&&(d=v,u.push(eV(m.mark(f.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?h:-1)))}let p=c==a.childCount;p||(h=-1),this.placed=yf(this.placed,n,he.from(u)),this.frontier[n].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=a;m<h;m++){let y=v.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),v=y.content}this.unplaced=p?e==0?Ee.empty:new Ee(vf(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new Ee(vf(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!qw(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),i=qw(e,n,o,r,s);if(i){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=qw(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:i,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=yf(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=yf(this.placed,this.depth,he.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(he.empty,!0);n.childCount&&(this.placed=yf(this.placed,this.frontier.length,n))}}function vf(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(vf(t.firstChild.content,e-1,n)))}function yf(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(yf(t.lastChild.content,e-1,n)))}function Yw(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function eV(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,eV(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(he.empty,!0)))),t.copy(r)}function qw(t,e,n,r,o){let s=t.node(e),i=o?t.indexAfter(e):t.index(e);if(i==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,i);return a&&!_be(n,s.content,i)?a:null}function _be(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Cbe(t){return t.spec.defining||t.spec.definingForContent}function kbe(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(Z6(o,s,r))return t.step(new _n(e,n,r));let i=nV(o,t.doc.resolve(n));i[i.length-1]==0&&i.pop();let a=-(o.depth+1);i.unshift(a);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let p=o.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;i.indexOf(f)>-1?a=f:o.before(f)==h&&i.splice(1,0,-f)}let l=i.indexOf(a),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Cbe(h.type);if(p&&!h.sameMarkup(o.node(Math.abs(a)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<i.length;m++){let v=i[(m+l)%i.length],y=!0;v<0&&(y=!1,v=-v);let b=o.node(v-1),w=o.index(v-1);if(b.canReplaceWith(w,w,p.type,p.marks))return t.replace(o.before(v),y?s.after(v):n,new Ee(tV(r.content,0,r.openStart,h),h,r.openEnd))}}let d=t.steps.length;for(let f=i.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let h=i[f];h<0||(e=o.before(h),n=s.after(h))}}function tV(t,e,n,r,o){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(tV(s.content,e+1,n,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(t).append(t);t=i.append(s.matchFragment(i).fillBefore(he.empty,!0))}return t}function Ebe(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=xbe(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ee(he.from(r),0,0))}function Mbe(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),s=nV(r,o);for(let i=0;i<s.length;i++){let a=s[i],l=i==s.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return t.delete(r.before(a),o.after(a))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return t.delete(r.before(i),n);t.delete(e,n)}function nV(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let s=t.start(o);if(s<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&n.push(o)}return n}class Su extends er{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return cn.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return cn.fromReplace(e,this.pos,this.pos+1,new Ee(he.from(o),0,n.isLeaf?0:1))}getMap(){return Fr.empty}invert(e){return new Su(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Su(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Su(n.pos,n.attr,n.value)}}er.jsonID("attr",Su);class Ah extends er{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return cn.ok(r)}getMap(){return Fr.empty}invert(e){return new Ah(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ah(n.attr,n.value)}}er.jsonID("docAttr",Ah);let Ju=class extends Error{};Ju=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Ju.prototype=Object.create(Error.prototype);Ju.prototype.constructor=Ju;Ju.prototype.name="TransformError";class rV{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new wu}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ju(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Ee.empty){let o=Cb(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ee(he.from(r),0,0))}delete(e,n){return this.replace(e,n,Ee.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return kbe(this,e,n,r),this}replaceRangeWith(e,n,r){return Ebe(this,e,n,r),this}deleteRange(e,n){return Mbe(this,e,n),this}lift(e,n){return fbe(this,e,n),this}join(e,n=1){return wbe(this,e,n),this}wrap(e,n){return mbe(this,e,n),this}setBlockType(e,n=e,r,o=null){return gbe(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return ybe(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Su(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ah(e,n)),this}addNodeMark(e,n){return this.step(new na(e,n)),this}removeNodeMark(e,n){if(!(n instanceof bt)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Xu(e,n)),this}split(e,n=1,r){return bbe(this,e,n,r),this}addMark(e,n,r){return lbe(this,e,n,r),this}removeMark(e,n,r){return cbe(this,e,n,r),this}clearIncompatible(e,n,r){return ube(this,e,n,r),this}}const Xw=Object.create(null);class Ke{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Tbe(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Ee.empty){let r=n.content.lastChild,o=null;for(let a=0;a<n.openEnd;a++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:l,$to:c}=i[a],u=e.mapping.slice(s);e.replaceRange(u.map(l.pos),u.map(c.pos),a?Ee.empty:n),a==0&&OI(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:a}=o[s],l=e.mapping.slice(r),c=l.map(i.pos),u=l.map(a.pos);s?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),OI(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new He(e):Uc(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=n<0?Uc(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):Uc(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(i)return i}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Xo(e.node(0))}static atStart(e){return Uc(e,e,0,0,1)||new Xo(e)}static atEnd(e){return Uc(e,e,e.content.size,e.childCount,-1)||new Xo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Xw[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Xw)throw new RangeError("Duplicate use of selection JSON ID "+e);return Xw[e]=n,n.prototype.jsonID=e,n}getBookmark(){return He.between(this.$anchor,this.$head).getBookmark()}}Ke.prototype.visible=!0;class Tbe{constructor(e,n){this.$from=e,this.$to=n}}let TI=!1;function RI(t){!TI&&!t.parent.inlineContent&&(TI=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class He extends Ke{constructor(e,n=e){RI(e),RI(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ke.near(r);let o=e.resolve(n.map(this.anchor));return new He(o.parent.inlineContent?o:r,r)}replace(e,n=Ee.empty){if(super.replace(e,n),n==Ee.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof He&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new kb(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new He(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let s=Ke.findFrom(n,r,!0)||Ke.findFrom(n,-r,!0);if(s)n=s.$head;else return Ke.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Ke.findFrom(e,-r,!0)||Ke.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new He(e,n)}}Ke.jsonID("text",He);class kb{constructor(e,n){this.anchor=e,this.head=n}map(e){return new kb(e.map(this.anchor),e.map(this.head))}resolve(e){return He.between(e.resolve(this.anchor),e.resolve(this.head))}}class ze extends Ke{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),s=e.resolve(o);return r?Ke.near(s):new ze(s)}content(){return new Ee(he.from(this.node),0,0)}eq(e){return e instanceof ze&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new CM(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ze(e.resolve(n.anchor))}static create(e,n){return new ze(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ze.prototype.visible=!1;Ke.jsonID("node",ze);class CM{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new kb(r,r):new CM(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&ze.isSelectable(r)?new ze(n):Ke.near(n)}}class Xo extends Ke{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ee.empty){if(n==Ee.empty){e.delete(0,e.doc.content.size);let r=Ke.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Xo(e)}map(e){return new Xo(e)}eq(e){return e instanceof Xo}getBookmark(){return Rbe}}Ke.jsonID("all",Xo);const Rbe={map(){return this},resolve(t){return new Xo(t)}};function Uc(t,e,n,r,o,s=!1){if(e.inlineContent)return He.create(t,n);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let a=e.child(i);if(a.isAtom){if(!s&&ze.isSelectable(a))return ze.create(t,n-(o<0?a.nodeSize:0))}else{let l=Uc(t,a,n+o,o<0?a.childCount:0,o,s);if(l)return l}n+=a.nodeSize*o}return null}function OI(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof _n||o instanceof kn))return;let s=t.mapping.maps[r],i;s.forEach((a,l,c,u)=>{i==null&&(i=u)}),t.setSelection(Ke.near(t.doc.resolve(i),n))}const PI=1,Vm=2,AI=4;class Obe extends rV{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|PI)&~Vm,this.storedMarks=null,this}get selectionSet(){return(this.updated&PI)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Vm,this}ensureMarks(e){return bt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Vm)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Vm,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||bt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let i=this.doc.resolve(n);s=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,s)),this.selection.empty||this.setSelection(Ke.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=AI,this}get scrolledIntoView(){return(this.updated&AI)>0}}function DI(t,e){return!e||!t?t:t.bind(e)}class bf{constructor(e,n,r){this.name=e,this.init=DI(n.init,r),this.apply=DI(n.apply,r)}}const Pbe=[new bf("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new bf("selection",{init(t,e){return t.selection||Ke.atStart(e.doc)},apply(t){return t.selection}}),new bf("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new bf("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Jw{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Pbe.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new bf(r.key,r.spec.state,r))})}}class lu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let a=this.config.plugins[i];if(a.spec.appendTransaction){let l=o?o[i].n:0,c=o?o[i].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<i?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),s=!0}o&&(o[i]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new lu(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let s=r[o];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new Obe(this)}static create(e){let n=new Jw(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new lu(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Jw(this.schema,e.plugins),r=n.fields,o=new lu(n);for(let s=0;s<r.length;s++){let i=r[s].name;o[i]=this.hasOwnProperty(i)?this[i]:r[s].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],s=o.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Jw(e.schema,e.plugins),s=new lu(o);return o.fields.forEach(i=>{if(i.name=="doc")s.doc=$l.fromJSON(e.schema,n.doc);else if(i.name=="selection")s.selection=Ke.fromJSON(s.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==i.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[i.name]=c.fromJSON.call(l,e,n[a],s);return}}s[i.name]=i.init(e,s)}}),s}}function oV(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=oV(o,e,{})),n[r]=o}return n}class vr{constructor(e){this.spec=e,this.props={},e.props&&oV(e.props,this,this.props),this.key=e.key?e.key.key:sV("plugin")}getState(e){return e[this.key]}}const Qw=Object.create(null);function sV(t){return t in Qw?t+"$"+ ++Qw[t]:(Qw[t]=0,t+"$")}class ls{constructor(e="key"){this.key=sV(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ln=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Dh=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let O_=null;const Ys=function(t,e,n){let r=O_||(O_=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Abe=function(){O_=null},nc=function(t,e,n,r){return n&&(II(t,e,n,r,-1)||II(t,e,n,r,1))},Dbe=/^(img|br|input|textarea|hr)$/i;function II(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Cs(t))){let s=t.parentNode;if(!s||s.nodeType!=1||_p(t)||Dbe.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ln(t)+(o<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?Cs(t):0}else return!1}}function Cs(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ibe(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Cs(t)}else if(t.parentNode&&!_p(t))e=Ln(t),t=t.parentNode;else return null}}function Nbe(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!_p(t))e=Ln(t)+1,t=t.parentNode;else return null}}function Lbe(t,e,n){for(let r=e==0,o=e==Cs(t);r||o;){if(t==n)return!0;let s=Ln(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,o=o&&s==Cs(t)}}function _p(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Eb=function(t){return t.focusNode&&nc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function gl(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function jbe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function $be(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Ls=typeof navigator<"u"?navigator:null,NI=typeof document<"u"?document:null,Xa=Ls&&Ls.userAgent||"",P_=/Edge\/(\d+)/.exec(Xa),iV=/MSIE \d/.exec(Xa),A_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xa),Ar=!!(iV||A_||P_),ma=iV?document.documentMode:A_?+A_[1]:P_?+P_[1]:0,ts=!Ar&&/gecko\/(\d+)/i.test(Xa);ts&&+(/Firefox\/(\d+)/.exec(Xa)||[0,0])[1];const D_=!Ar&&/Chrome\/(\d+)/.exec(Xa),sr=!!D_,Fbe=D_?+D_[1]:0,ur=!Ar&&!!Ls&&/Apple Computer/.test(Ls.vendor),Qu=ur&&(/Mobile\/\w+/.test(Xa)||!!Ls&&Ls.maxTouchPoints>2),co=Qu||(Ls?/Mac/.test(Ls.platform):!1),zbe=Ls?/Win/.test(Ls.platform):!1,zo=/Android \d/.test(Xa),Cp=!!NI&&"webkitFontSmoothing"in NI.documentElement.style,Bbe=Cp?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Vbe(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Hs(t,e){return typeof t=="number"?t:t[e]}function Hbe(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function LI(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let i=n||t.dom;i;i=Dh(i)){if(i.nodeType!=1)continue;let a=i,l=a==s.body,c=l?Vbe(s):Hbe(a),u=0,d=0;if(e.top<c.top+Hs(r,"top")?d=-(c.top-e.top+Hs(o,"top")):e.bottom>c.bottom-Hs(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Hs(o,"top")-c.top:e.bottom-c.bottom+Hs(o,"bottom")),e.left<c.left+Hs(r,"left")?u=-(c.left-e.left+Hs(o,"left")):e.right>c.right-Hs(r,"right")&&(u=e.right-c.right+Hs(o,"right")),u||d)if(l)s.defaultView.scrollBy(u,d);else{let f=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-f,m=a.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function Wbe(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let s=(e.left+e.right)/2,i=n+1;i<Math.min(innerHeight,e.bottom);i+=5){let a=t.root.elementFromPoint(s,i);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:aV(t.dom)}}function aV(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Dh(r));return e}function Ube({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;lV(n,r==0?0:r-e)}function lV(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:s}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let jc=null;function Gbe(t){if(t.setActive)return t.setActive();if(jc)return t.focus(jc);let e=aV(t);t.focus(jc==null?{get preventScroll(){return jc={preventScroll:!0},!0}}:void 0),jc||(jc=!1,lV(e,0))}function cV(t,e){let n,r=2e8,o,s=0,i=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Ys(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=i&&p.bottom>=a){i=Math.max(p.bottom,i),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){n=u,r=m,o=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(s=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?Kbe(n,o):!n||r&&n.nodeType==1?{node:t,offset:s}:cV(n,o)}function Kbe(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let s=Fi(r,1);if(s.top!=s.bottom&&kM(e,s))return{node:t,offset:o+(e.left>=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function kM(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Ybe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function qbe(t,e,n){let{node:r,offset:o}=cV(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();s=i.left!=i.right&&n.left>(i.left+i.right)/2?1:-1}return t.docView.posFromDOM(r,o,s)}function Xbe(t,e,n,r){let o=-1;for(let s=e,i=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!i||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!i&&(i=!0,l.left>r.left||l.top>r.top?o=a.posBefore:(l.right<r.left||l.bottom<r.top)&&(o=a.posAfter)),!a.contentDOM&&o<0&&!a.node.isText)return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}s=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function uV(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=o;;){let i=t.childNodes[s];if(i.nodeType==1){let a=i.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(kM(e,c))return uV(i,e,c)}}if((s=(s+1)%r)==o)break}return t}function Jbe(t,e){let n=t.dom.ownerDocument,r,o=0,s=$be(n,e.left,e.top);s&&({node:r,offset:o}=s);let i=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!i||!t.dom.contains(i.nodeType!=1?i.parentNode:i)){let c=t.dom.getBoundingClientRect();if(!kM(e,c)||(i=uV(t.dom,e,c),!i))return null}if(ur)for(let c=i;r&&c;c=Dh(c))c.draggable&&(r=void 0);if(i=Ybe(i,e),r){if(ts&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;Cp&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=Xbe(t,r,o,e))}a==null&&(a=qbe(t,i,e));let l=t.docView.nearestDesc(i,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function jI(t){return t.top<t.bottom||t.left<t.right}function Fi(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(jI(r))return r}return Array.prototype.find.call(n,jI)||t.getBoundingClientRect()}const Qbe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function dV(t,e,n){let{node:r,offset:o,atom:s}=t.docView.domFromPos(e,n<0?-1:1),i=Cp||ts;if(r.nodeType==3)if(i&&(Qbe.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Fi(Ys(r,o,o),n);if(ts&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Fi(Ys(r,o-1,o-1),-1);if(c.top==l.top){let u=Fi(Ys(r,o,o+1),-1);if(u.top!=l.top)return rf(u,u.left<c.left)}}return l}else{let l=o,c=o,u=n<0?1:-1;return n<0&&!o?(c++,u=-1):n>=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,rf(Fi(Ys(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(n<0||o==Cs(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Zw(l.getBoundingClientRect(),!1)}if(s==null&&o<Cs(r)){let l=r.childNodes[o];if(l.nodeType==1)return Zw(l.getBoundingClientRect(),!0)}return Zw(r.getBoundingClientRect(),n>=0)}if(s==null&&o&&(n<0||o==Cs(r))){let l=r.childNodes[o-1],c=l.nodeType==3?Ys(l,Cs(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return rf(Fi(c,1),!1)}if(s==null&&o<Cs(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Ys(l,0,i?0:1):l.nodeType==1?l:null:null;if(c)return rf(Fi(c,-1),!0)}return rf(Fi(r.nodeType==3?Ys(r):r,-n),n>=0)}function rf(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Zw(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function fV(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function Zbe(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return fV(t,e,()=>{let{node:s}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let i=dV(t,o.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Ys(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?i.top-u.top>(u.bottom-i.top)*2:u.bottom-i.bottom>(i.bottom-u.top)*2))return!1}}return!0})}const e1e=/[\u0590-\u08ac]/;function t1e(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,i=o==r.parent.content.size,a=t.domSelection();return!e1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:i:fV(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),v=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),v})}let $I=null,FI=null,zI=!1;function n1e(t,e,n){return $I==e&&FI==n?zI:($I=e,FI=n,zI=n=="up"||n=="down"?Zbe(t,e,n):t1e(t,e,n))}const xo=0,BI=1,El=2,js=3;class kp{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=xo,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,i;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>Ln(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),i;if(s&&(!n||s.node))if(r&&(i=s.nodeDOM)&&!(i.nodeType==1?i.contains(e.nodeType==1?e:e.parentNode):i==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],s=r+o.size;if(r==e&&s!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<s)return o.descAt(e-r-o.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let s=0;r<this.children.length;r++){let i=this.children[r],a=s+i.size;if(a>e||i instanceof pV){o=e-s;break}s=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof hV&&s.side>=0;r--);if(n<=0){let s,i=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,i=!1);return s&&n&&i&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?Ln(s.dom)+1:0}}else{let s,i=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,i=!1);return s&&i&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?Ln(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let i=r,a=0;;a++){let l=this.children[a],c=i+l.size;if(o==-1&&e<=c){let u=i+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=i;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=Ln(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Ln(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let s=Math.min(e,n),i=Math.max(e,n);for(let f=0,h=0;f<this.children.length;f++){let p=this.children[f],m=h+p.size;if(s>h&&i<m)return p.setSelection(e-h-p.border,n-h-p.border,r,o);h=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.getSelection(),u=!1;if((ts||ur)&&e==n){let{node:f,offset:h}=a;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
`),u&&h==f.nodeValue.length)for(let p=f,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:Ln(m)+1});break}let v=p.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let p=f.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(ts&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(o=!0)}if(!(o||u&&ur)&&nc(a.node,a.offset,c.anchorNode,c.anchorOffset)&&nc(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==n)&&!u){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>n){let h=a;a=l,l=h}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let s=this.children[o],i=r+s.size;if(r==i?e<=i&&n>=r:e<i&&n>r){let a=r+s.border,l=i-s.border;if(e>=a&&n<=l){this.dirty=e==r||n==i?El:BI,e==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=js:s.markDirty(e-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?El:js}r=i}this.dirty=El}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?El:BI;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class hV extends kp{constructor(e,n,r,o){let s,i=n.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(i.nodeType!=1){let a=document.createElement("span");a.appendChild(i),i=a}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==xo&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class r1e extends kp{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class rc extends kp{constructor(e,n,r,o){super(e,[],r,o),this.mark=n}static create(e,n,r,o){let s=o.nodeViews[n.type.name],i=s&&s(n,o,r);return(!i||!i.dom)&&(i=Ms.renderSpec(document,n.type.spec.toDOM(n,r))),new rc(e,n,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&js||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=js&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=xo){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=xo}}slice(e,n,r){let o=rc.create(this.parent,this.mark,!0,r),s=this.children,i=this.size;n<i&&(s=L_(s,n,i,r)),e>0&&(s=L_(s,0,e,r));for(let a=0;a<s.length;a++)s[a].parent=o;return o.children=s,o}}class ga extends kp{constructor(e,n,r,o,s,i,a,l,c){super(e,[],s,i),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=a}static create(e,n,r,o,s,i){let a=s.nodeViews[n.type.name],l,c=a&&a(n,s,()=>{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Ms.renderSpec(document,n.type.spec.toDOM(n)));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=vV(u,r,n),c?l=new o1e(e,n,r,o,u,d||null,f,c,s,i+1):n.isText?new Mb(e,n,r,o,u,f,s):new ga(e,n,r,o,u,d||null,f,s,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>he.empty)}return e}matchesNode(e,n,r){return this.dirty==xo&&e.eq(this.node)&&N_(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,s=e.composing?this.localCompositionInfo(e,n):null,i=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new i1e(this,i&&i.node,e);c1e(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?bt.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,e);let h;l.findNodeMatch(c,u,d,f)||a&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(h=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(c,u,d,h,e)||l.updateNextNode(c,u,d,e,f,o)||l.addNode(c,u,d,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==El)&&(i&&this.protectLocalComposition(e,i),mV(this.contentDOM,this.children,e),Qu&&u1e(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof He)||r<n||o>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let i=s.nodeValue,a=d1e(this.node.content,i,r-n,o-n);return a<0?null:{node:s,pos:a,text:i}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let i=new r1e(this,s,n,o);e.input.compositionNodes.push(i),this.children=L_(this.children,r,r+o.length,e,i)}update(e,n,r,o){return this.dirty==js||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=xo}updateOuterDeco(e){if(N_(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=gV(this.dom,this.nodeDOM,I_(this.outerDeco,this.node,n),I_(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function VI(t,e,n,r,o){vV(r,e,t);let s=new ga(void 0,t,e,n,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Mb extends ga{constructor(e,n,r,o,s,i,a){super(e,n,r,o,s,null,i,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==js||this.dirty!=xo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=xo||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=xo,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),s=document.createTextNode(o.text);return new Mb(this.parent,o,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=js)}get domAtom(){return!1}isText(e){return this.node.text==e}}class pV extends kp{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==xo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class o1e extends ga{constructor(e,n,r,o,s,i,a,l,c,u){super(e,n,r,o,s,i,a,c,u),this.spec=l}update(e,n,r,o){if(this.dirty==js)return!1;if(this.spec.update){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function mV(t,e,n){let r=t.firstChild,o=!1;for(let s=0;s<e.length;s++){let i=e[s],a=i.dom;if(a.parentNode==t){for(;a!=r;)r=HI(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(i instanceof rc){let l=r?r.previousSibling:t.lastChild;mV(i.contentDOM,i.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=HI(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Bf=function(t){t&&(this.nodeName=t)};Bf.prototype=Object.create(null);const Ml=[new Bf];function I_(t,e,n){if(t.length==0)return Ml;let r=n?Ml[0]:new Bf,o=[r];for(let s=0;s<t.length;s++){let i=t[s].type.attrs;if(i){i.nodeName&&o.push(r=new Bf(i.nodeName));for(let a in i){let l=i[a];l!=null&&(n&&o.length==1&&o.push(r=new Bf(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return o}function gV(t,e,n,r){if(n==Ml&&r==Ml)return e;let o=e;for(let s=0;s<r.length;s++){let i=r[s],a=n[s];if(s){let l;a&&a.nodeName==i.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==i.nodeName||(l=document.createElement(i.nodeName),l.pmIsDeco=!0,l.appendChild(o),a=Ml[0]),o=l}s1e(o,a||Ml[0],i)}return o}function s1e(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&t.classList.add(o[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function vV(t,e,n){return gV(t,t,Ml,I_(e,n,t.nodeType!=1))}function N_(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function HI(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class i1e{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=a1e(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,s=this.stack.length>>1,i=Math.min(s,e.length);for(;o<i&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=xo,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[s])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=rc.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let s=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,n,r))s=this.top.children.indexOf(i,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,o,s){let i=this.top.children[o];return i.dirty==js&&i.dom==i.contentDOM&&(i.dirty=El),i.update(e,n,r,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,s,i){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof ga){let c=this.preMatch.matched.get(l);if(c!=null&&c!=s)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=js&&N_(n,l.outerDeco));if(!f&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,o,i)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=El,d.updateChildren(o,i+1),d.dirty=xo),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,s,i){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=ga.create(this.top,n,r,o,s,i);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,o,s){let i=ga.create(this.top,e,n,r,o,s);i.contentDOM&&i.updateChildren(o,s+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let s=new hV(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof rc;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Mb)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ur||sr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new pV(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function a1e(t,e){let n=e,r=n.children.length,o=t.childCount,s=new Map,i=[];e:for(;o>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof rc)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,s.set(a,o),i.push(a)}}return{index:o,matched:s,matches:i.reverse()}}function l1e(t,e){return t.type.side-e.type.side}function c1e(t,e,n,r){let o=e.locals(t),s=0;if(o.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,o,e.forChild(s,u),c),s+=u.nodeSize}return}let i=0,a=[],l=null;for(let c=0;;){let u,d;for(;i<o.length&&o[i].to==s;){let v=o[i++];v.widget&&(u?(d||(d=[u])).push(v):u=v)}if(u)if(d){d.sort(l1e);for(let v=0;v<d.length;v++)n(d[v],c,!!l)}else n(u,c,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(c<t.childCount)h=c,f=t.child(c++);else break;for(let v=0;v<a.length;v++)a[v].to<=s&&a.splice(v--,1);for(;i<o.length&&o[i].from<=s&&o[i].to>s;)a.push(o[i++]);let p=s+f.nodeSize;if(f.isText){let v=p;i<o.length&&o[i].from<v&&(v=o[i].from);for(let y=0;y<a.length;y++)a[y].to<v&&(v=a[y].to);v<p&&(l=f.cut(v-s),f=f.cut(0,v-s),p=v,h=-1)}else for(;i<o.length&&o[i].to<p;)i++;let m=f.isInline&&!f.isLeaf?a.filter(v=>!v.inline):a.slice();r(f,m,e.forChild(s,f),h),s=p}}function u1e(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function d1e(t,e,n,r){for(let o=0,s=0;o<t.childCount&&s<=r;){let i=t.child(o++),a=s;if(s+=i.nodeSize,!i.isText)continue;let l=i.text;for(;o<t.childCount;){let c=t.child(o++);if(s+=c.nodeSize,!c.isText)break;l+=c.text}if(s>=n){if(s>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function L_(t,e,n,r,o){let s=[];for(let i=0,a=0;i<t.length;i++){let l=t[i],c=a,u=a+=l.size;c>=n||u<=e?s.push(l):(c<e&&s.push(l.slice(0,e-c,r)),o&&(s.push(o),o=void 0),u>n&&s.push(l.slice(n-c,l.size,r)))}return s}function EM(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),s=o&&o.size==0,i=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let a=r.resolve(i),l,c;if(Eb(n)){for(l=a;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&ze.isSelectable(u)&&o.parent&&!(u.isInline&&Lbe(n.focusNode,n.focusOffset,o.dom))){let d=o.posBefore;c=new ze(i==d?a:r.resolve(d))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=r.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!s?1:-1;c=MM(t,l,a,u)}return c}function yV(t){return t.editable?t.hasFocus():wV(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ui(t,e=!1){let n=t.state.selection;if(bV(t,n),!!yV(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&sr){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&nc(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)h1e(t);else{let{anchor:r,head:o}=n,s,i;WI&&!(n instanceof He)&&(n.$from.parent.inlineContent||(s=UI(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=UI(t,n.to))),t.docView.setSelection(r,o,t.root,e),WI&&(s&&GI(s),i&&GI(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&f1e(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const WI=ur||sr&&Fbe<63;function UI(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(ur&&o&&o.contentEditable=="false")return ex(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return ex(o);if(s)return ex(s)}}function ex(t){return t.contentEditable="true",ur&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function GI(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function f1e(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!yV(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function h1e(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,Ln(r)+1):n.setEnd(r,0),n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&Ar&&ma<=11&&(r.disabled=!0,r.disabled=!1)}function bV(t,e){if(e instanceof ze){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(KI(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else KI(t)}function KI(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function MM(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||He.between(e,n,r)}function YI(t){return t.editable&&!t.hasFocus()?!1:wV(t)}function wV(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function p1e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return nc(e.node,e.offset,n.anchorNode,n.anchorOffset)}function j_(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&Ke.findFrom(s,e)}function Vi(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function qI(t,e,n){let r=t.state.selection;if(r instanceof He)if(n.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=t.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return Vi(t,new He(r.$anchor,i))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=j_(t.state,e);return o&&o instanceof ze?Vi(t,o):!1}else if(!(co&&n.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM?ze.isSelectable(s)?Vi(t,new ze(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):Cp?Vi(t,new He(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ze&&r.node.isInline)return Vi(t,new He(e>0?r.$to:r.$from));{let o=j_(t.state,e);return o?Vi(t,o):!1}}}function Uv(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Vf(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function $c(t,e){return e<0?m1e(t):g1e(t)}function m1e(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,s,i=!1;for(ts&&n.nodeType==1&&r<Uv(n)&&Vf(n.childNodes[r],-1)&&(i=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Vf(a,-1))o=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(xV(n))break;{let a=n.previousSibling;for(;a&&Vf(a,-1);)o=n.parentNode,s=Ln(a),a=a.previousSibling;if(a)n=a,r=Uv(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}i?$_(t,n,r):o&&$_(t,o,s)}function g1e(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Uv(n),s,i;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Vf(a,1))s=n,i=++r;else break}else{if(xV(n))break;{let a=n.nextSibling;for(;a&&Vf(a,1);)s=a.parentNode,i=Ln(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=Uv(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}s&&$_(t,s,i)}function xV(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function v1e(t,e){for(;t&&e==t.childNodes.length&&!_p(t);)e=Ln(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function y1e(t,e){for(;t&&!e&&!_p(t);)e=Ln(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function $_(t,e,n){if(e.nodeType!=3){let s,i;(i=v1e(e,n))?(e=i,n=0):(s=y1e(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(Eb(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&ui(t)},50)}function XI(t,e){let n=t.state.doc.resolve(e);if(!(sr||zbe)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function JI(t,e,n){let r=t.state.selection;if(r instanceof He&&!r.empty||n.indexOf("s")>-1||co&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let i=j_(t.state,e);if(i&&i instanceof ze)return Vi(t,i)}if(!o.parent.inlineContent){let i=e<0?o:s,a=r instanceof Xo?Ke.near(i,e):Ke.findFrom(i,e);return a?Vi(t,a):!1}return!1}function QI(t,e){if(!(t.state.selection instanceof He))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=t.state.tr;return e<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),t.dispatch(i),!0}return!1}function ZI(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function b1e(t){if(!ur||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ZI(t,r,"true"),setTimeout(()=>ZI(t,r,"false"),20)}return!1}function w1e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function x1e(t,e){let n=e.keyCode,r=w1e(e);if(n==8||co&&n==72&&r=="c")return QI(t,-1)||$c(t,-1);if(n==46&&!e.shiftKey||co&&n==68&&r=="c")return QI(t,1)||$c(t,1);if(n==13||n==27)return!0;if(n==37||co&&n==66&&r=="c"){let o=n==37?XI(t,t.state.selection.from)=="ltr"?-1:1:-1;return qI(t,o,r)||$c(t,o)}else if(n==39||co&&n==70&&r=="c"){let o=n==39?XI(t,t.state.selection.from)=="ltr"?1:-1:1;return qI(t,o,r)||$c(t,o)}else{if(n==38||co&&n==80&&r=="c")return JI(t,-1,r)||$c(t,-1);if(n==40||co&&n==78&&r=="c")return b1e(t)||JI(t,1,r)||$c(t,1);if(r==(co?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function SV(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let i=t.someProp("clipboardSerializer")||Ms.fromSchema(t.state.schema),a=TV(),l=a.createElement("div");l.appendChild(i.serializeFragment(r,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=MV[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=a.createElement(u[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:f}}function _V(t,e,n,r,o){let s=o.parent.type.spec.code,i,a;if(!n&&!e)return null;let l=e&&(r||s||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,s||r,t)}),s)return e?new Ee(he.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0):Ee.empty;let d=t.someProp("clipboardTextParser",f=>f(e,o,r,t));if(d)a=d;else{let f=o.marks(),{schema:h}=t.state,p=Ms.fromSchema(h);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=i.appendChild(document.createElement("p"));m&&v.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),i=C1e(n),Cp&&k1e(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||xM.fromSchema(t.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!S1e.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)a=E1e(eN(a,+u[1],+u[2]),u[4]);else if(a=Ee.maxOpen(_1e(a.content,o),!0),a.openStart||a.openEnd){let d=0,f=0;for(let h=a.content.firstChild;d<a.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=a.content.lastChild;f<a.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);a=eN(a,d,f)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const S1e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function _1e(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),s,i=[];if(t.forEach(a=>{if(!i)return;let l=o.findWrapping(a.type),c;if(!l)return i=null;if(c=i.length&&s.length&&kV(l,s,a,i[i.length-1],0))i[i.length-1]=c;else{i.length&&(i[i.length-1]=EV(i[i.length-1],s.length));let u=CV(a,l);i.push(u),o=o.matchType(u.type),s=l}}),i)return he.from(i)}return t}function CV(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,he.from(t));return t}function kV(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=kV(t,e,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(he.from(CV(n,t,o+1))))}}function EV(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,EV(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(he.empty,!0);return t.copy(n.append(r))}function F_(t,e,n,r,o,s){let i=e<0?t.firstChild:t.lastChild,a=i.content;return t.childCount>1&&(s=0),o<r-1&&(a=F_(a,e,n,r,o+1,s)),o>=n&&(a=e<0?i.contentMatchAt(0).fillBefore(a,s<=o).append(a):a.append(i.contentMatchAt(i.childCount).fillBefore(he.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,i.copy(a))}function eN(t,e,n){return e<t.openStart&&(t=new Ee(F_(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ee(F_(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const MV={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let tN=null;function TV(){return tN||(tN=document.implementation.createHTMLDocument("title"))}function C1e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=TV().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&MV[r[1].toLowerCase()])&&(t=o.map(s=>"<"+s+">").join("")+t+o.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=t,o)for(let s=0;s<o.length;s++)n=n.querySelector(o[s])||n;return n}function k1e(t){let e=t.querySelectorAll(sr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function E1e(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:s,openEnd:i}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=he.from(l.create(r[a+1],o)),s++,i++}return new Ee(o,s,i)}const dr={},fr={},M1e={touchstart:!0,touchmove:!0};class T1e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function R1e(t){for(let e in dr){let n=dr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{P1e(t,r)&&!TM(t,r)&&(t.editable||!(r.type in fr))&&n(t,r)},M1e[e]?{passive:!0}:void 0)}ur&&t.dom.addEventListener("input",()=>null),z_(t)}function ra(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function O1e(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function z_(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>TM(t,r))})}function TM(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function P1e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function A1e(t,e){!TM(t,e)&&dr[e.type]&&(t.editable||!(e.type in fr))&&dr[e.type](t,e)}fr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!OV(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(zo&&sr&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Qu&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,gl(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||x1e(t,n)?n.preventDefault():ra(t,"key")};fr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};fr.keypress=(t,e)=>{let n=e;if(OV(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||co&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof He)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Tb(t){return{left:t.clientX,top:t.clientY}}function D1e(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function RM(t,e,n,r,o){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(t.someProp(e,a=>i>s.depth?a(t,n,s.nodeAfter,s.before(i),o,!0):a(t,n,s.node(i),s.before(i),o,!1)))return!0;return!1}function _u(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function I1e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&ze.isSelectable(r)?(_u(t,new ze(n),"pointer"),!0):!1}function N1e(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof ze&&(r=n.node);let s=t.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let a=i>s.depth?s.nodeAfter:s.node(i);if(ze.isSelectable(a)){r&&n.$from.depth>0&&i>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?o=s.before(n.$from.depth):o=s.before(i);break}}return o!=null?(_u(t,ze.create(t.state.doc,o),"pointer"),!0):!1}function L1e(t,e,n,r,o){return RM(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(o?N1e(t,n):I1e(t,n))}function j1e(t,e,n,r){return RM(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function $1e(t,e,n,r){return RM(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||F1e(t,n,r)}function F1e(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(_u(t,He.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let i=s>o.depth?o.nodeAfter:o.node(s),a=o.before(s);if(i.inlineContent)_u(t,He.create(r,a+1,a+1+i.content.size),"pointer");else if(ze.isSelectable(i))_u(t,ze.create(r,a),"pointer");else continue;return!0}}function OM(t){return Gv(t)}const RV=co?"metaKey":"ctrlKey";dr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=OM(t),o=Date.now(),s="singleClick";o-t.input.lastClick.time<500&&D1e(n,t.input.lastClick)&&!n[RV]&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:s};let i=t.posAtCoords(Tb(n));i&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new z1e(t,i,n,!!r)):(s=="doubleClick"?j1e:$1e)(t,i.pos,i.inside,n)?n.preventDefault():ra(t,"pointer"))};class z1e{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[RV],this.allowDefault=r.shiftKey;let s,i;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),i=n.inside;else{let u=e.state.doc.resolve(n.pos);s=u.parent,i=u.depth?u.before():0}const a=o?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof ze&&c.from<=i&&c.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ts&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ra(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ui(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Tb(e))),this.updateAllowDefault(e),this.allowDefault||!n?ra(this.view,"pointer"):L1e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ur&&this.mightDrag&&!this.mightDrag.node.isAtom||sr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(_u(this.view,Ke.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):ra(this.view,"pointer")}move(e){this.updateAllowDefault(e),ra(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}dr.touchstart=t=>{t.input.lastTouch=Date.now(),OM(t),ra(t,"pointer")};dr.touchmove=t=>{t.input.lastTouch=Date.now(),ra(t,"pointer")};dr.contextmenu=t=>OM(t);function OV(t,e){return t.composing?!0:ur&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const B1e=zo?5e3:-1;fr.compositionstart=fr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Gv(t,!0),t.markCursor=null;else if(Gv(t),ts&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let i=s<0?o.lastChild:o.childNodes[s-1];if(!i)break;if(i.nodeType==3){t.domSelection().collapse(i,i.nodeValue.length);break}else o=i,s=-1}}t.input.composing=!0}PV(t,B1e)};fr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,PV(t,20))};function PV(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Gv(t),e))}function AV(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=H1e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function V1e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Ibe(e.focusNode,e.focusOffset),r=Nbe(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n}function H1e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Gv(t,e=!1){if(!(zo&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),AV(t),e||t.docView&&t.docView.dirty){let n=EM(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):t.updateState(t.state),!0}return!1}}function W1e(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ih=Ar&&ma<15||Qu&&Bbe<604;dr.copy=fr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let s=Ih?null:n.clipboardData,i=r.content(),{dom:a,text:l}=SV(t,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):W1e(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function U1e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function G1e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Nh(t,r.value,null,o,e):Nh(t,r.textContent,r.innerHTML,o,e)},50)}function Nh(t,e,n,r,o){let s=_V(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,s||Ee.empty)))return!0;if(!s)return!1;let i=U1e(s),a=i?t.state.tr.replaceSelectionWith(i,r):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function DV(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}fr.paste=(t,e)=>{let n=e;if(t.composing&&!zo)return;let r=Ih?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Nh(t,DV(r),r.getData("text/html"),o,n)?n.preventDefault():G1e(t,n)};class IV{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const NV=co?"altKey":"ctrlKey";dr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,s=o.empty?null:t.posAtCoords(Tb(n)),i;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof ze?o.to-1:o.to))){if(r&&r.mightDrag)i=ze.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let u=t.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=t.docView&&(i=ze.create(t.state.doc,u.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:c}=SV(t,a);n.dataTransfer.clearData(),n.dataTransfer.setData(Ih?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ih||n.dataTransfer.setData("text/plain",c),t.dragging=new IV(a,!n[NV],i)};dr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};fr.dragover=fr.dragenter=(t,e)=>e.preventDefault();fr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Tb(n));if(!o)return;let s=t.state.doc.resolve(o.pos),i=r&&r.slice;i?t.someProp("transformPasted",p=>{i=p(i,t)}):i=_V(t,DV(n.dataTransfer),Ih?null:n.dataTransfer.getData("text/html"),!1,s);let a=!!(r&&!n[NV]);if(t.someProp("handleDrop",p=>p(t,n,i||Ee.empty,a))){n.preventDefault();return}if(!i)return;n.preventDefault();let l=i?Q6(t.state.doc,s.pos,i):s.pos;l==null&&(l=s.pos);let c=t.state.tr;if(a){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,i.content.firstChild):c.replaceRange(u,u,i),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&ze.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new ze(h));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,v,y,b)=>p=b),c.setSelection(MM(t,h,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};dr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ui(t)},20))};dr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};dr.beforeinput=(t,e)=>{if(sr&&zo&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,gl(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in fr)dr[t]=fr[t];function Lh(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Kv{constructor(e,n){this.toDOM=e,this.spec=n||Fl,this.side=this.spec.side||0}map(e,n,r,o){let{pos:s,deleted:i}=e.mapResult(n.from+o,this.side<0?-1:1);return i?null:new go(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Kv&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Lh(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class va{constructor(e,n){this.attrs=e,this.spec=n||Fl}map(e,n,r,o){let s=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,i=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=i?null:new go(s,i,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof va&&Lh(this.attrs,e.attrs)&&Lh(this.spec,e.spec)}static is(e){return e.type instanceof va}destroy(){}}class PM{constructor(e,n){this.attrs=e,this.spec=n||Fl}map(e,n,r,o){let s=e.mapResult(n.from+o,1);if(s.deleted)return null;let i=e.mapResult(n.to+o,-1);return i.deleted||i.pos<=s.pos?null:new go(s.pos-r,i.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),s;return o==n.from&&!(s=e.child(r)).isText&&o+s.nodeSize==n.to}eq(e){return this==e||e instanceof PM&&Lh(this.attrs,e.attrs)&&Lh(this.spec,e.spec)}destroy(){}}class go{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new go(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new go(e,e,new Kv(n,r))}static inline(e,n,r,o){return new go(e,n,new va(r,o))}static node(e,n,r,o){return new go(e,n,new PM(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof va}get widget(){return this.type instanceof Kv}}const Gc=[],Fl={};class pn{constructor(e,n){this.local=e.length?e:Gc,this.children=n.length?n:Gc}static create(e,n){return n.length?Yv(n,e,0,Fl):Kn}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,s){for(let i=0;i<this.local.length;i++){let a=this.local[i];a.from<=n&&a.to>=e&&(!s||s(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>e){let a=this.children[i]+1;this.children[i+2].findInner(e-a,n-a,r,o+a,s)}}map(e,n,r){return this==Kn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Fl)}mapInner(e,n,r,o,s){let i;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,o);l&&l.type.valid(n,l)?(i||(i=[])).push(l):s.onRemove&&s.onRemove(this.local[a].spec)}return this.children.length?K1e(this.children,i||[],e,n,r,o,s):i?new pn(i.sort(zl),Gc):Kn}add(e,n){return n.length?this==Kn?pn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,s=0;e.forEach((a,l)=>{let c=l+r,u;if(u=jV(n,a,c)){for(o||(o=this.children.slice());s<o.length&&o[s]<l;)s+=3;o[s]==l?o[s+2]=o[s+2].addInner(a,u,c+1):o.splice(s,0,l,l+a.nodeSize,Yv(u,a,c+1,Fl)),s+=3}});let i=LV(s?$V(n):n,-r);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||i.splice(a--,1);return new pn(i.length?this.local.concat(i).sort(zl):this.local,o||this.children)}remove(e){return e.length==0||this==Kn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let i,a=r[s]+n,l=r[s+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(i||(i=[])).push(d));if(!i)continue;r==this.children&&(r=this.children.slice());let c=r[s+2].removeInner(i,a+1);c!=Kn?r[s+2]=c:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,i;s<e.length;s++)if(i=e[s])for(let a=0;a<o.length;a++)o[a].eq(i,n)&&(o==this.local&&(o=this.local.slice()),o.splice(a--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new pn(o,r):Kn}forChild(e,n){if(this==Kn)return this;if(n.isLeaf)return pn.empty;let r,o;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let s=e+1,i=s+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<i&&l.to>s&&l.type instanceof va){let c=Math.max(s,l.from)-s,u=Math.min(i,l.to)-s;c<u&&(o||(o=[])).push(l.copy(c,u))}}if(o){let a=new pn(o.sort(zl),Gc);return r?new Ki([a,r]):a}return r||Kn}eq(e){if(this==e)return!0;if(!(e instanceof pn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return AM(this.localsInner(e))}localsInner(e){if(this==Kn)return Gc;if(e.inlineContent||!this.local.some(va.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof va||n.push(this.local[r]);return n}}pn.empty=new pn([],[]);pn.removeOverlap=AM;const Kn=pn.empty;class Ki{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,Fl));return Ki.from(r)}forChild(e,n){if(n.isLeaf)return pn.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,n);s!=Kn&&(s instanceof Ki?r=r.concat(s.members):r.push(s))}return Ki.from(r)}eq(e){if(!(e instanceof Ki)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let i=0;i<s.length;i++)n.push(s[i])}}return n?AM(r?n:n.sort(zl)):Gc}static from(e){switch(e.length){case 0:return Kn;case 1:return e[0];default:return new Ki(e.every(n=>n instanceof pn)?e:e.reduce((n,r)=>n.concat(r instanceof pn?r:r.members),[]))}}}function K1e(t,e,n,r,o,s,i){let a=t.slice();for(let c=0,u=s;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,h,p,m)=>{let v=m-p-(h-f);for(let y=0;y<a.length;y+=3){let b=a[y+1];if(b<0||f>b+u-d)continue;let w=a[y]+u-d;h>=w?a[y+1]=f<=w?-2:-1:f>=u&&v&&(a[y]+=v,a[y+1]+=v)}d+=v}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+s),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[c+1]+s,-1),h=f-o,{index:p,offset:m}=r.content.findIndex(d),v=r.maybeChild(p);if(v&&m==d&&m+v.nodeSize==h){let y=a[c+2].mapInner(n,v,u+1,t[c]+s+1,i);y!=Kn?(a[c]=d,a[c+1]=h,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=Y1e(a,t,e,n,o,s,i),u=Yv(c,r,0,i);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<a.length&&a[f]<h;)f+=3;a.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new pn(e.sort(zl),a)}function LV(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new go(o.from+e,o.to+e,o.type))}return n}function Y1e(t,e,n,r,o,s,i){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,o,c);d?n.push(d):i.onRemove&&i.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+s+1);return n}function jV(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let s=0,i;s<t.length;s++)(i=t[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[s]=null);return o}function $V(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Yv(t,e,n,r){let o=[],s=!1;e.forEach((a,l)=>{let c=jV(t,a,l+n);if(c){s=!0;let u=Yv(c,a,n+l+1,r);u!=Kn&&o.push(l,l+a.nodeSize,u)}});let i=LV(s?$V(t):t,-n).sort(zl);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||(r.onRemove&&r.onRemove(i[a].spec),i.splice(a--,1));return i.length||o.length?new pn(i,o):Kn}function zl(t,e){return t.from-e.from||t.to-e.to}function AM(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let s=e[o];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[o]=s.copy(s.from,r.to),nN(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),nN(e,o,r.copy(s.from,r.to)));break}}}return e}function nN(t,e,n){for(;e<t.length&&zl(n,t[e])>0;)e++;t.splice(e,0,n)}function tx(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Kn&&e.push(r)}),t.cursorWrapper&&e.push(pn.create(t.state.doc,[t.cursorWrapper.deco])),Ki.from(e)}const q1e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},X1e=Ar&&ma<=11;class J1e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Q1e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new J1e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Ar&&ma<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),X1e&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,q1e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(YI(this.view)){if(this.suppressingSelectionUpdates)return ui(this.view);if(Ar&&ma<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&nc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let s=e.focusNode;s;s=Dh(s))n.add(s);for(let s=e.anchorNode;s;s=Dh(s))if(n.has(s)){r=s;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&YI(e)&&!this.ignoreSelectionChange(r),s=-1,i=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(s=s<0?d.from:Math.min(d.from,s),i=i<0?d.to:Math.max(d.to,i),d.typeOver&&(a=!0))}if(ts&&l.length>1){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}let c=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Eb(r)&&(c=EM(e))&&c.eq(Ke.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ui(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,i),Z1e(e)),this.handleDOMChange(s,i,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ui(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++)n.push(e.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,s=e.nextSibling;if(Ar&&ma<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f)}let i=o&&o.parentNode==e.target?Ln(o)+1:0,a=r.localPosFromDOM(e.target,i,-1),l=s&&s.parentNode==e.target?Ln(s):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let rN=new WeakMap,oN=!1;function Z1e(t){if(!rN.has(t)&&(rN.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=ts,oN)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),oN=!0}}function ewe(t){let e;function n(l){l.preventDefault(),l.stopImmediatePropagation(),e=l.getTargetRanges()[0]}t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0);let r=e.startContainer,o=e.startOffset,s=e.endContainer,i=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return nc(a.node,a.offset,s,i)&&([r,o,s,i]=[s,i,r,o]),{anchorNode:r,anchorOffset:o,focusNode:s,focusOffset:i}}function twe(t,e,n){let{node:r,fromOffset:o,toOffset:s,from:i,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Eb(l)||c.push({node:l.focusNode,offset:l.focusOffset})),sr&&t.input.lastKeyCode===8)for(let v=s;v>o;v--){let y=r.childNodes[v-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){s=v;break}if(!b||b.size)break}let d=t.state.doc,f=t.someProp("domParser")||xM.fromSchema(t.state.schema),h=d.resolve(i),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:nwe,context:h});if(c&&c[0].pos!=null){let v=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=v),p={anchor:v+i,head:y+i}}return{doc:m,sel:p,from:i,to:a}}function nwe(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ur&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ur&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rwe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function owe(t,e,n,r,o){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let P=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,A=EM(t,P);if(A&&!t.state.selection.eq(A)){if(sr&&zo&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",V=>V(t,gl(13,"Enter"))))return;let L=t.state.tr.setSelection(A);P=="pointer"?L.setMeta("pointer",!0):P=="key"&&L.scrollIntoView(),s&&L.setMeta("composition",s),t.dispatch(L)}return}let i=t.state.doc.resolve(e),a=i.sharedDepth(n);e=i.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=twe(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),f,h;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,h="end"):(f=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let p=awe(d.content,c.doc.content,c.from,f,h);if((Qu&&t.input.lastIOSEnter>Date.now()-225||zo)&&o.some(P=>P.nodeType==1&&!rwe.test(P.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",P=>P(t,gl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof He&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let P=sN(t,t.state.doc,c.sel);if(P&&!P.eq(t.state.selection)){let A=t.state.tr.setSelection(P);s&&A.setMeta("composition",s),t.dispatch(A)}}return}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof He&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),Ar&&ma<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),v=c.doc.resolveNoCache(p.endB-c.from),y=u.resolve(p.start),b=m.sameParent(v)&&m.parent.inlineContent&&y.end()>=p.endA,w;if((Qu&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!b&&m.pos<c.doc.content.size&&!m.sameParent(v)&&(w=Ke.findFrom(c.doc.resolve(m.pos+1),1,!0))&&w.head==v.pos)&&t.someProp("handleKeyDown",P=>P(t,gl(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&iwe(u,p.start,p.endA,m,v)&&t.someProp("handleKeyDown",P=>P(t,gl(8,"Backspace")))){zo&&sr&&t.domObserver.suppressSelectionUpdates();return}sr&&zo&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),zo&&!b&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,v=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(P){return P(t,gl(13,"Enter"))})},20));let S=p.start,_=p.endA,k,M,T;if(b){if(m.pos==v.pos)Ar&&ma<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ui(t),20)),k=t.state.tr.delete(S,_),M=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=swe(m.parent.content.cut(m.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))k=t.state.tr,T.type=="add"?k.addMark(S,_,T.mark):k.removeMark(S,_,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let P=m.parent.textBetween(m.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",A=>A(t,S,_,P)))return;k=t.state.tr.insertText(P,S,_)}}if(k||(k=t.state.tr.replace(S,_,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let P=sN(t,k.doc,c.sel);P&&!(sr&&zo&&t.composing&&P.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(P.head==S||P.head==k.mapping.map(_)-1)||Ar&&P.empty&&P.head==S)&&k.setSelection(P)}M&&k.ensureMarks(M),s&&k.setMeta("composition",s),t.dispatch(k.scrollIntoView())}function sN(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:MM(t,e.resolve(n.anchor),e.resolve(n.head))}function swe(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,s=r,i,a,l;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)s=n[u].removeFromSet(s);if(o.length==1&&s.length==0)a=o[0],i="add",l=u=>u.mark(a.addToSet(u.marks));else if(o.length==0&&s.length==1)a=s[0],i="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(he.from(c).eq(t))return{mark:a,type:i}}function iwe(t,e,n,r,o){if(n-e<=o.pos-r.pos||nx(r,!0,!1)<o.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let a=s.nodeAfter;return a!=null&&n==e+a.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let i=t.resolve(nx(s,!0,!0));return!i.parent.isTextblock||i.pos>n||nx(i,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function nx(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function awe(t,e,n,r,o){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:i,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,s-Math.min(i,a));r-=i+l-s}if(i<s&&t.size<e.size){let l=r<=s&&r>=i?s-r:0;s-=l,s&&s<e.size&&iN(e.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-i),i=s}else if(a<s){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<t.size&&iN(t.textBetween(s-1,s+1))&&(s+=l?1:-1),i=s+(i-a),a=s}return{start:s,endA:i,endB:a}}function iN(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class lwe{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new T1e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(dN),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=cN(this),lN(this),this.nodeViews=uN(this),this.docView=VI(this.state.doc,aN(this),tx(this),this.dom,this),this.domObserver=new Q1e(this,(r,o,s,i)=>owe(this,r,o,s,i)),this.domObserver.start(),R1e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&z_(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(dN),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,s=!1,i=!1;e.storedMarks&&this.composing&&(AV(this),i=!0),this.state=e;let a=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=uN(this);uwe(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&z_(this),this.editable=cN(this),lN(this);let l=tx(this),c=aN(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(o.selection))&&(i=!0);let f=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&Wbe(this);if(i){this.domObserver.stop();let h=d&&(Ar||sr)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&cwe(o.selection,e.selection);if(d){let p=sr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=V1e(this)),(s||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=VI(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&p1e(this))?ui(this,h):(bV(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&Ube(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof ze){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&LI(this,n.getBoundingClientRect(),e)}else LI(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(o=s)}this.dragging=new IV(e.slice,e.move,o<0?void 0:ze.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let i=0;i<this.directPlugins.length;i++){let a=this.directPlugins[i].props[e];if(a!=null&&(o=n?n(a):a))return o}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let a=s[i].props[e];if(a!=null&&(o=n?n(a):a))return o}}hasFocus(){if(Ar){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Gbe(this.dom),ui(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Jbe(this,e)}coordsAtPos(e,n=1){return dV(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return n1e(this,n||this.state,e)}pasteHTML(e,n){return Nh(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Nh(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(O1e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],tx(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Abe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return A1e(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return ur&&this.root.nodeType===11&&jbe(this.dom.ownerDocument)==this.dom?ewe(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function aN(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[go.node(0,t.state.doc.content.size,e)]}function lN(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:go.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function cN(t){return!t.someProp("editable",e=>e(t.state)===!1)}function cwe(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function uN(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function uwe(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function dN(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Oa={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},qv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},dwe=typeof navigator<"u"&&/Mac/.test(navigator.platform),fwe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var jn=0;jn<10;jn++)Oa[48+jn]=Oa[96+jn]=String(jn);for(var jn=1;jn<=24;jn++)Oa[jn+111]="F"+jn;for(var jn=65;jn<=90;jn++)Oa[jn]=String.fromCharCode(jn+32),qv[jn]=String.fromCharCode(jn);for(var rx in Oa)qv.hasOwnProperty(rx)||(qv[rx]=Oa[rx]);function hwe(t){var e=dwe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||fwe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?qv:Oa)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const pwe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function mwe(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,s,i;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))pwe?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),i&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function gwe(t){let e=Object.create(null);for(let n in t)e[mwe(n)]=t[n];return e}function ox(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function vwe(t){return new vr({props:{handleKeyDown:FV(t)}})}function FV(t){let e=gwe(t);return function(n,r){let o=hwe(r),s,i=e[ox(o,r)];if(i&&i(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[ox(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(s=Oa[r.keyCode])&&s!=o){let a=e[ox(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const ywe=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function zV(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const bwe=(t,e,n)=>{let r=zV(t,n);if(!r)return!1;let o=DM(r);if(!o){let i=r.blockRange(),a=i&&kd(i);return a==null?!1:(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}let s=o.nodeBefore;if(!s.type.spec.isolating&&WV(t,o,e))return!0;if(r.parent.content.size==0&&(Zu(s,"end")||ze.isSelectable(s))){let i=Cb(t.doc,r.before(),r.after(),Ee.empty);if(i&&i.slice.size<i.to-i.from){if(e){let a=t.tr.step(i);a.setSelection(Zu(s,"end")?Ke.findFrom(a.doc.resolve(a.mapping.map(o.pos,-1)),-1):ze.create(a.doc,o.pos-s.nodeSize)),e(a.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},wwe=(t,e,n)=>{let r=zV(t,n);if(!r)return!1;let o=DM(r);return o?BV(t,o,e):!1},xwe=(t,e,n)=>{let r=VV(t,n);if(!r)return!1;let o=IM(r);return o?BV(t,o,e):!1};function BV(t,e,n){let r=e.nodeBefore,o=r,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let i=e.nodeAfter,a=i,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Cb(t.doc,s,l,Ee.empty);if(!c||c.from!=s||c instanceof _n&&c.slice.size>=l-s)return!1;if(n){let u=t.tr.step(c);u.setSelection(He.create(u.doc,s)),n(u.scrollIntoView())}return!0}function Zu(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Swe=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=DM(r)}let i=s&&s.nodeBefore;return!i||!ze.isSelectable(i)?!1:(e&&e(t.tr.setSelection(ze.create(t.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function DM(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function VV(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const _we=(t,e,n)=>{let r=VV(t,n);if(!r)return!1;let o=IM(r);if(!o)return!1;let s=o.nodeAfter;if(WV(t,o,e))return!0;if(r.parent.content.size==0&&(Zu(s,"start")||ze.isSelectable(s))){let i=Cb(t.doc,r.before(),r.after(),Ee.empty);if(i&&i.slice.size<i.to-i.from){if(e){let a=t.tr.step(i);a.setSelection(Zu(s,"start")?Ke.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):ze.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},Cwe=(t,e,n)=>{let{$head:r,empty:o}=t.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=IM(r)}let i=s&&s.nodeAfter;return!i||!ze.isSelectable(i)?!1:(e&&e(t.tr.setSelection(ze.create(t.doc,s.pos)).scrollIntoView()),!0)};function IM(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const kwe=(t,e)=>{let n=t.selection,r=n instanceof ze,o;if(r){if(n.node.isTextblock||!qa(t.doc,n.from))return!1;o=n.from}else if(o=_b(t.doc,n.from,-1),o==null)return!1;if(e){let s=t.tr.join(o);r&&s.setSelection(ze.create(s.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Ewe=(t,e)=>{let n=t.selection,r;if(n instanceof ze){if(n.node.isTextblock||!qa(t.doc,n.to))return!1;r=n.to}else if(r=_b(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Mwe=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&kd(o);return s==null?!1:(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)},Twe=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function HV(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Rwe=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),s=n.indexAfter(-1),i=HV(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,i.createAndFill());l.setSelection(Ke.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Owe=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Xo||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=HV(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=t.tr.insert(i,s.createAndFill());a.setSelection(He.create(a.doc,i+1)),e(a.scrollIntoView())}return!0},Pwe=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(xu(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),o=r&&kd(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},Awe=(t,e)=>{let{$from:n,to:r}=t.selection,o,s=n.sharedDepth(r);return s==0?!1:(o=n.before(s),e&&e(t.tr.setSelection(ze.create(t.doc,o))),!0)};function Dwe(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||qa(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function WV(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s,i;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(Dwe(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(s=(i=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&i.matchType(s[0]||o.type).validEnd){if(n){let d=e.pos+o.nodeSize,f=he.empty;for(let m=s.length-1;m>=0;m--)f=he.from(s[m].create(null,f));f=he.from(r.copy(f));let h=t.tr.step(new kn(e.pos-1,d,e.pos,d,new Ee(f,1,0),s.length,!0)),p=d+2*s.length;qa(h.doc,p)&&h.join(p),n(h.scrollIntoView())}return!0}let l=Ke.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&kd(c);if(u!=null&&u>=e.depth)return n&&n(t.tr.lift(c,u).scrollIntoView()),!0;if(a&&Zu(o,"start",!0)&&Zu(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let h=o,p=1;for(;!h.isTextblock;h=h.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,h.content)){if(n){let m=he.empty;for(let y=f.length-1;y>=0;y--)m=he.from(f[y].copy(m));let v=t.tr.step(new kn(e.pos-f.length,e.pos+o.nodeSize,e.pos+p,e.pos+o.nodeSize-p,new Ee(m,f.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function UV(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(n&&n(e.tr.setSelection(He.create(e.doc,t<0?o.start(s):o.end(s)))),!0):!1}}const Iwe=UV(-1),Nwe=UV(1);function Lwe(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s),a=i&&_M(i,t,e);return a?(r&&r(n.tr.wrap(i,a).scrollIntoView()),!0):!1}}function fN(t,e=null){return function(n,r){let o=!1;for(let s=0;s<n.selection.ranges.length&&!o;s++){let{$from:{pos:i},$to:{pos:a}}=n.selection.ranges[s];n.doc.nodesBetween(i,a,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,t)}})}if(!o)return!1;if(r){let s=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[i];s.setBlockType(a,l,t,e)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function jwe(t,e=null){return function(n,r){let{$from:o,$to:s}=n.selection,i=o.blockRange(s),a=!1,l=i;if(!i)return!1;if(i.depth>=2&&o.node(i.depth-1).type.compatibleContent(t)&&i.startIndex==0){if(o.index(i.depth-1)==0)return!1;let u=n.doc.resolve(i.start-2);l=new Bv(u,u,i.depth),i.endIndex<i.parent.childCount&&(i=new Bv(o,n.doc.resolve(s.end(i.depth)),i.depth)),a=!0}let c=_M(l,t,e,i);return c?(r&&r($we(n.tr,i,c,a,t).scrollIntoView()),!0):!1}}function $we(t,e,n,r,o){let s=he.empty;for(let u=n.length-1;u>=0;u--)s=he.from(n[u].type.create(n[u].attrs,s));t.step(new kn(e.start-(r?2:0),e.end,e.start,e.end,new Ee(s,0,0),n.length,!0));let i=0;for(let u=0;u<n.length;u++)n[u].type==o&&(i=u+1);let a=n.length-i,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&xu(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function Fwe(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?zwe(e,n,t,s):Bwe(e,n,s):!0:!1}}function zwe(t,e,n,r){let o=t.tr,s=r.end,i=r.$to.end(r.depth);s<i&&(o.step(new kn(s-1,i,s,i,new Ee(he.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Bv(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const a=kd(r);if(a==null)return!1;o.lift(r,a);let l=o.mapping.map(s,-1)-1;return qa(o.doc,l)&&o.join(l),e(o.scrollIntoView()),!0}function Bwe(t,e,n){let r=t.tr,o=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),i=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(a?0:1),u+1,i.content.append(l?he.empty:he.from(o))))return!1;let d=s.pos,f=d+i.nodeSize;return r.step(new kn(d-(a?1:0),f+(l?1:0),d+1,f-1,new Ee((a?he.empty:he.from(o.copy(he.empty))).append(l?he.empty:he.from(o.copy(he.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function Vwe(t){return function(e,n){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==t);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let a=s.parent,l=a.child(i-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=he.from(c?t.create():null),d=new Ee(he.from(t.create(null,he.from(a.type.create(null,u)))),c?3:1,0),f=s.start,h=s.end;n(e.tr.step(new kn(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function Rb(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,s=n.storedMarks,n}}}class Ob{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{const d=l(...u)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,a=[],l=!!e,c=e||s.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{const v=this.buildProps(c,n),y=h(...m)(v);return a.push(y),d}])),run:u};return d}createCan(e){const{rawCommands:n,state:r}=this,o=!1,s=e||r.tr,i=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,a={tr:e,editor:o,view:i,state:Rb({state:s,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class Hwe{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function Ae(t,e,n){return t.config[e]===void 0&&t.parent?Ae(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ae(t.parent,e,n):null}):t.config[e]}function Pb(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function GV(t){const e=[],{nodeExtensions:n,markExtensions:r}=Pb(t),o=[...n,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage,extensions:o},l=Ae(i,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...s,...h}})})})})}),o.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage},l=Ae(i,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...s,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:i.name,name:u,attribute:f})})}),e}function Mn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function Ht(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const a=s?s.split(" "):[],l=r[o]?r[o].split(" "):[],c=a.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else o==="style"?r[o]=[r[o],s].join("; "):r[o]=s}),r},{})}function B_(t,e){return e.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Ht(n,r),{})}function KV(t){return typeof t=="function"}function Je(t,e=void 0,...n){return KV(t)?e?t.bind(e)(...n):t(...n):t}function Wwe(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Uwe(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function hN(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((s,i)=>{const a=i.attribute.parseHTML?i.attribute.parseHTML(n):Uwe(n.getAttribute(i.name));return a==null?s:{...s,[i.name]:a}},{});return{...r,...o}}}}function pN(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&Wwe(n)?!1:n!=null))}function Gwe(t,e){var n;const r=GV(t),{nodeExtensions:o,markExtensions:s}=Pb(t),i=(n=o.find(c=>Ae(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((y,b)=>{const w=Ae(b,"extendNodeSchema",d);return{...y,...w?w(c):{}}},{}),h=pN({...f,content:Je(Ae(c,"content",d)),marks:Je(Ae(c,"marks",d)),group:Je(Ae(c,"group",d)),inline:Je(Ae(c,"inline",d)),atom:Je(Ae(c,"atom",d)),selectable:Je(Ae(c,"selectable",d)),draggable:Je(Ae(c,"draggable",d)),code:Je(Ae(c,"code",d)),whitespace:Je(Ae(c,"whitespace",d)),defining:Je(Ae(c,"defining",d)),isolating:Je(Ae(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),p=Je(Ae(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>hN(y,u)));const m=Ae(c,"renderHTML",d);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:B_(y,u)}));const v=Ae(c,"renderText",d);return v&&(h.toText=v),[c.name,h]})),l=Object.fromEntries(s.map(c=>{const u=r.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((v,y)=>{const b=Ae(y,"extendMarkSchema",d);return{...v,...b?b(c):{}}},{}),h=pN({...f,inclusive:Je(Ae(c,"inclusive",d)),excludes:Je(Ae(c,"excludes",d)),group:Je(Ae(c,"group",d)),spanning:Je(Ae(c,"spanning",d)),code:Je(Ae(c,"code",d)),attrs:Object.fromEntries(u.map(v=>{var y;return[v.name,{default:(y=v==null?void 0:v.attribute)===null||y===void 0?void 0:y.default}]}))}),p=Je(Ae(c,"parseHTML",d));p&&(h.parseDOM=p.map(v=>hN(v,u)));const m=Ae(c,"renderHTML",d);return m&&(h.toDOM=v=>m({mark:v,HTMLAttributes:B_(v,u)})),[c.name,h]}));return new H6({topNode:i,nodes:a,marks:l})}function sx(t,e){return e.nodes[t]||e.marks[t]||null}function mN(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}const Kwe=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,s,i,a)=>{var l,c;const u=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:s,parent:i,index:a}))||o.textContent||"%leaf%";n+=u.slice(0,Math.max(0,r-s))}),n};function NM(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Ab{constructor(e){this.find=e.find,this.handler=e.handler}}const Ywe=(t,e)=>{if(NM(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Hm(t){var e;const{editor:n,from:r,to:o,text:s,rules:i,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=Kwe(c)+s;return i.forEach(f=>{if(u)return;const h=Ywe(d,f.find);if(!h)return;const p=l.state.tr,m=Rb({state:l.state,transaction:p}),v={from:r-(h[0].length-s.length),to:o},{commands:y,chain:b,can:w}=new Ob({editor:n,state:m});f.handler({state:m,range:v,match:h,commands:y,chain:b,can:w})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:r,to:o,text:s}),l.dispatch(p),u=!0)}),u}function qwe(t){const{editor:e,rules:n}=t,r=new vr({state:{init(){return null},apply(o,s){const i=o.getMeta(r);if(i)return i;const a=o.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:c,text:u}=a,d=c+u.length;Hm({editor:e,from:c,to:d,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:s}},props:{handleTextInput(o,s,i,a){return Hm({editor:e,from:s,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&Hm({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:i}=o.state.selection;return i?Hm({editor:e,from:i.pos,to:i.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Xwe(t){return typeof t=="number"}class Jwe{constructor(e){this.find=e.find,this.handler=e.handler}}const Qwe=(t,e,n)=>{if(NM(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const s=[o.text];return s.index=o.index,s.input=t,s.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(o.replaceWith)),s}):[]};function Zwe(t){const{editor:e,state:n,from:r,to:o,rule:s,pasteEvent:i,dropEvent:a}=t,{commands:l,chain:c,can:u}=new Ob({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,o,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),v=Math.min(o,p+h.content.size),y=h.textBetween(m-p,v-p,void 0,"￼");Qwe(y,s.find,i).forEach(w=>{if(w.index===void 0)return;const S=m+w.index+1,_=S+w[0].length,k={from:n.tr.mapping.map(S),to:n.tr.mapping.map(_)},M=s.handler({state:n,range:k,match:w,commands:l,chain:c,can:u,pasteEvent:i,dropEvent:a});d.push(M)})}),d.every(h=>h!==null)}const exe=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function txe(t){const{editor:e,rules:n}=t;let r=null,o=!1,s=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:u,from:d,to:f,rule:h,pasteEvt:p})=>{const m=u.tr,v=Rb({state:u,transaction:m});if(!(!Zwe({editor:e,state:v,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:a})||!m.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m};return n.map(u=>new vr({view(d){const f=h=>{var p;r=!((p=d.dom.parentElement)===null||p===void 0)&&p.contains(h.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(d,f)=>(s=r===d.dom.parentElement,a=f,!1),paste:(d,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return i=f,o=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],m=p.getMeta("uiEvent")==="paste"&&!o,v=p.getMeta("uiEvent")==="drop"&&!s,y=p.getMeta("applyPasteRules"),b=!!y;if(!m&&!v&&!b)return;if(b){const{from:_,text:k}=y,M=_+k.length,T=exe(k);return l({rule:u,state:h,from:_,to:{b:M},pasteEvt:T})}const w=f.doc.content.findDiffStart(h.doc.content),S=f.doc.content.findDiffEnd(h.doc.content);if(!(!Xwe(w)||!S||w===S.b))return l({rule:u,state:h,from:w,to:S,pasteEvt:i})}}))}function nxe(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return[...new Set(e)]}class cu{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=cu.resolve(e),this.schema=Gwe(this.extensions,n),this.setupExtensions()}static resolve(e){const n=cu.sort(cu.flatten(e)),r=nxe(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Ae(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const s=Ae(r,"priority")||100,i=Ae(o,"priority")||100;return s>i?-1:s<i?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:sx(n.name,this.schema)},o=Ae(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=cu.sort([...this.extensions].reverse()),r=[],o=[],s=n.map(i=>{const a={name:i.name,options:i.options,storage:i.storage,editor:e,type:sx(i.name,this.schema)},l=[],c=Ae(i,"addKeyboardShortcuts",a);let u={};if(i.type==="mark"&&Ae(i,"exitable",a)&&(u.ArrowRight=()=>eo.handleExit({editor:e,mark:i})),c){const m=Object.fromEntries(Object.entries(c()).map(([v,y])=>[v,()=>y({editor:e})]));u={...u,...m}}const d=vwe(u);l.push(d);const f=Ae(i,"addInputRules",a);mN(i,e.options.enableInputRules)&&f&&r.push(...f());const h=Ae(i,"addPasteRules",a);mN(i,e.options.enablePasteRules)&&h&&o.push(...h());const p=Ae(i,"addProseMirrorPlugins",a);if(p){const m=p();l.push(...m)}return l}).flat();return[qwe({editor:e,rules:r}),...txe({editor:e,rules:o}),...s]}get attributes(){return GV(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Pb(this.extensions);return Object.fromEntries(n.filter(r=>!!Ae(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:e,type:Mn(r.name,this.schema)},i=Ae(r,"addNodeView",s);if(!i)return[];const a=(l,c,u,d)=>{const f=B_(l,o);return i()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:f,extension:r})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:sx(e.name,this.schema)};e.type==="mark"&&(!((n=Je(Ae(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Ae(e,"onBeforeCreate",r),s=Ae(e,"onCreate",r),i=Ae(e,"onUpdate",r),a=Ae(e,"onSelectionUpdate",r),l=Ae(e,"onTransaction",r),c=Ae(e,"onFocus",r),u=Ae(e,"onBlur",r),d=Ae(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),i&&this.editor.on("update",i),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}function rxe(t){return Object.prototype.toString.call(t).slice(8,-1)}function Wm(t){return rxe(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Db(t,e){const n={...t};return Wm(t)&&Wm(e)&&Object.keys(e).forEach(r=>{Wm(e[r])&&Wm(t[r])?n[r]=Db(t[r],e[r]):n[r]=e[r]}),n}class Ir{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Je(Ae(this,"addOptions",{name:this.name}))),this.storage=Je(Ae(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ir(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Db(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ir({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Je(Ae(n,"addOptions",{name:n.name})),n.storage=Je(Ae(n,"addStorage",{name:n.name,options:n.options})),n}}function YV(t,e,n){const{from:r,to:o}=e,{blockSeparator:s=`

`,textSerializers:i={}}=n||{};let a="";return t.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(a+=s);const h=i==null?void 0:i[l.type.name];if(h)return u&&(a+=h({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,o-c))}),a}function qV(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const oxe=Ir.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new vr({key:new ls("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(u=>u.$from.pos)),a=Math.max(...s.map(u=>u.$to.pos)),l=qV(n);return YV(r,{from:i,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),sxe=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),ixe=(t=!1)=>({commands:e})=>e.setContent("",t),axe=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:s,$to:i})=>{t.doc.nodesBetween(s.pos,i.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=kd(h);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},lxe=t=>e=>t(e),cxe=()=>({state:t,dispatch:e})=>Owe(t,e),uxe=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new He(r.doc.resolve(i-1))),!0},dxe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const a=o.before(s),l=o.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1},fxe=t=>({tr:e,state:n,dispatch:r})=>{const o=Mn(t,n.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const l=s.before(i),c=s.after(i);e.delete(l,c).scrollIntoView()}return!0}return!1},hxe=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},pxe=()=>({state:t,dispatch:e})=>ywe(t,e),mxe=()=>({commands:t})=>t.keyboardShortcut("Enter"),gxe=()=>({state:t,dispatch:e})=>Rwe(t,e);function Xv(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:NM(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function V_(t,e,n={}){return t.find(r=>r.type===e&&Xv(r.attrs,n))}function vxe(t,e,n={}){return!!V_(t,e,n)}function LM(t,e,n={}){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(t.parentOffset===r.offset&&r.offset!==0&&(r=t.parent.childBefore(t.parentOffset)),!r.node)return;const o=V_([...r.node.marks],e,n);if(!o)return;let s=r.index,i=t.start()+r.offset,a=s+1,l=i+r.node.nodeSize;for(V_([...r.node.marks],e,n);s>0&&o.isInSet(t.parent.child(s-1).marks);)s-=1,i-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&vxe([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:i,to:l}}function Ja(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const yxe=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const s=Ja(t,r.schema),{doc:i,selection:a}=n,{$from:l,from:c,to:u}=a;if(o){const d=LM(l,s,e);if(d&&d.from<=c&&d.to>=u){const f=He.create(i,d.from,d.to);n.setSelection(f)}}return!0},bxe=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function XV(t){return t instanceof He}function Tl(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function JV(t,e=null){if(!e)return null;const n=Ke.atStart(t),r=Ke.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,s=r.to;return e==="all"?He.create(t,Tl(0,o,s),Tl(t.content.size,o,s)):He.create(t,Tl(e,o,s),Tl(e,o,s))}function jM(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const wxe=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{jM()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(s&&t===null&&!XV(n.state.selection))return i(),!0;const a=JV(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},xxe=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),Sxe=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),QV=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&QV(r)}return t};function gN(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return QV(n)}function Jv(t,e,n){n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{return Array.isArray(t)&&t.length>0?he.fromArray(t.map(i=>e.nodeFromJSON(i))):e.nodeFromJSON(t)}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),Jv("",e,n)}if(o){let s=e,i=!1,a="";n.errorOnInvalidContent&&(s=new H6({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(i=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})}));const l=xM.fromSchema(s),c=n.slice?l.parseSlice(gN(t),n.parseOptions).content:l.parse(gN(t),n.parseOptions);if(n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)});return c}return Jv("",e,n)}function _xe(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof _n||o instanceof kn))return;const s=t.mapping.maps[r];let i=0;s.forEach((a,l,c,u)=>{i===0&&(i=u)}),t.setSelection(Ke.near(t.doc.resolve(i),n))}const Cxe=t=>!("type"in t),kxe=(t,e,n)=>({tr:r,dispatch:o,editor:s})=>{var i;if(o){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=Jv(e,s.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(i=n.errorOnInvalidContent)!==null&&i!==void 0?i:s.options.enableContentCheck})}catch{return!1}let{from:l,to:c}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},u=!0,d=!0;if((Cxe(a)?a:[a]).forEach(p=>{p.check(),u=u?p.isText&&p.marks.length===0:!1,d=d?p.isBlock:!1}),l===c&&d){const{parent:p}=r.doc.resolve(l);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(l-=1,c+=1)}let h;u?(Array.isArray(e)?h=e.map(p=>p.text||"").join(""):typeof e=="object"&&e&&e.text?h=e.text:h=e,r.insertText(h,l,c)):(h=a,r.replaceWith(l,c,h)),n.updateSelection&&_xe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:h})}return!0},Exe=()=>({state:t,dispatch:e})=>kwe(t,e),Mxe=()=>({state:t,dispatch:e})=>Ewe(t,e),Txe=()=>({state:t,dispatch:e})=>bwe(t,e),Rxe=()=>({state:t,dispatch:e})=>_we(t,e),Oxe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=_b(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Pxe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=_b(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Axe=()=>({state:t,dispatch:e})=>wwe(t,e),Dxe=()=>({state:t,dispatch:e})=>xwe(t,e);function ZV(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Ixe(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,s,i;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))jM()||ZV()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}const Nxe=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const s=Ixe(t).split(/-(?!$)/),i=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function jh(t,e,n={}){const{from:r,to:o,empty:s}=t.selection,i=e?Mn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(o,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=o-r,c=a.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>Xv(d.node.attrs,n,{strict:!1}));return s?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const Lxe=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return jh(n,o,e)?Mwe(n,r):!1},jxe=()=>({state:t,dispatch:e})=>Pwe(t,e),$xe=t=>({state:e,dispatch:n})=>{const r=Mn(t,e.schema);return Fwe(r)(e,n)},Fxe=()=>({state:t,dispatch:e})=>Twe(t,e);function Ib(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function vN(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const zxe=(t,e)=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=Ib(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(s=Mn(t,r.schema)),a==="mark"&&(i=Ja(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{s&&s===c.type&&n.setNodeMarkup(u,void 0,vN(c.attrs,e)),i&&c.marks.length&&c.marks.forEach(d=>{i===d.type&&n.addMark(u,u+c.nodeSize,i.create(vN(d.attrs,e)))})})}),!0):!1},Bxe=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),Vxe=()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),Hxe=()=>({state:t,dispatch:e})=>Swe(t,e),Wxe=()=>({state:t,dispatch:e})=>Cwe(t,e),Uxe=()=>({state:t,dispatch:e})=>Awe(t,e),Gxe=()=>({state:t,dispatch:e})=>Nwe(t,e),Kxe=()=>({state:t,dispatch:e})=>Iwe(t,e);function H_(t,e,n={},r={}){return Jv(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const Yxe=(t,e=!1,n={},r={})=>({editor:o,tr:s,dispatch:i,commands:a})=>{var l,c;const{doc:u}=s;if(n.preserveWhitespace!=="full"){const d=H_(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return i&&s.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!e),!0}return i&&s.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:u.content.size},t,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function Nb(t,e){const n=Ja(e,t.schema),{from:r,to:o,empty:s}=t.selection,i=[];s?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{i.push(...l.marks)});const a=i.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function qxe(t,e){const n=new rV(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Xxe(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Jxe(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,s)=>{n(o)&&r.push({node:o,pos:s})}),r}function Qxe(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function $M(t){return e=>Qxe(e.$from,t)}function Zxe(t,e){const n=Ms.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function eSe(t,e){const n={from:0,to:t.content.size};return YV(t,n,e)}function tSe(t,e){const n=Mn(e,t.schema),{from:r,to:o}=t.selection,s=[];t.doc.nodesBetween(r,o,a=>{s.push(a)});const i=s.reverse().find(a=>a.type.name===n.name);return i?{...i.attrs}:{}}function e8(t,e){const n=Ib(typeof e=="string"?e:e.name,t.schema);return n==="node"?tSe(t,e):n==="mark"?Nb(t,e):{}}function nSe(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function rSe(t){const e=nSe(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,i)=>i!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function oSe(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,s)=>{const i=[];if(o.ranges.length)o.forEach((a,l)=>{i.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;i.push({from:a,to:l})}i.forEach(({from:a,to:l})=>{const c=e.slice(s).map(a,-1),u=e.slice(s).map(l),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),rSe(r)}function FM(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const s=n.resolve(t-1),i=LM(s,o.type);i&&r.push({mark:o,...i})}):n.nodesBetween(t,e,(o,s)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(i=>({from:s,to:s+o.nodeSize,mark:i})))}),r}function Ag(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function W_(t,e,n={}){const{empty:r,ranges:o}=t.selection,s=e?Ja(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>Xv(d.attrs,n,{strict:!1}));let i=0;const a=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,v)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(h,v),b=Math.min(p,v+m.nodeSize),w=b-y;i+=w,a.push(...m.marks.map(S=>({mark:S,from:y,to:b})))})}),i===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>Xv(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=i}function sSe(t,e,n={}){if(!e)return jh(t,null,n)||W_(t,null,n);const r=Ib(e,t.schema);return r==="node"?jh(t,e,n):r==="mark"?W_(t,e,n):!1}function yN(t,e){const{nodeExtensions:n}=Pb(e),r=n.find(i=>i.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=Je(Ae(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function iSe(t){const e=t.type.createAndFill();return e?t.eq(e):!1}function aSe(t){return t instanceof ze}function lSe(t,e,n){var r;const{selection:o}=e;let s=null;if(XV(o)&&(s=o.$cursor),s){const a=(r=t.storedMarks)!==null&&r!==void 0?r:s.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:i}=o;return i.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(n),p=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=h&&p}return!c}),c})}const cSe=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=n,{empty:i,ranges:a}=s,l=Ja(t,r.schema);if(o)if(i){const c=Nb(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),m=Math.min(h+f.nodeSize,d);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&n.addMark(p,m,l.create({...y.attrs,...e}))}):n.addMark(p,m,l.create(e))})});return lSe(r,n,l)},uSe=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),dSe=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const s=Mn(t,n.schema);return s.isTextblock?o().command(({commands:i})=>fN(s,e)(n)?!0:i.clearNodes()).command(({state:i})=>fN(s,e)(i,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},fSe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Tl(t,0,r.content.size),s=ze.create(r,o);e.setSelection(s)}return!0},hSe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:s}=typeof t=="number"?{from:t,to:t}:t,i=He.atStart(r).from,a=He.atEnd(r).to,l=Tl(o,i,a),c=Tl(s,i,a),u=He.create(r,l,c);e.setSelection(u)}return!0},pSe=t=>({state:e,dispatch:n})=>{const r=Mn(t,e.schema);return Vwe(r)(e,n)};function bN(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const mSe=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:a,$to:l}=s,c=o.extensionManager.attributes,u=Ag(c,a.node().type.name,a.node().attrs);if(s instanceof ze&&s.node.isBlock)return!a.parentOffset||!xu(i,a.pos)?!1:(r&&(t&&bN(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const d=l.parentOffset===l.parent.content.size;s instanceof He&&e.deleteSelection();const f=a.depth===0?void 0:Xxe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,p=xu(e.doc,e.mapping.map(a.pos),1,h);if(!h&&!p&&xu(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),p&&(e.split(e.mapping.map(a.pos),1,h),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const m=e.mapping.map(a.before()),v=e.doc.resolve(m);a.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}t&&bN(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},gSe=t=>({tr:e,state:n,dispatch:r,editor:o})=>{var s;const i=Mn(t,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==i)return!1;const d=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==i||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let v=he.empty;const y=a.index(-1)?1:a.index(-2)?2:3;for(let M=a.depth-y;M>=a.depth-3;M-=1)v=he.from(a.node(M).copy(v));const b=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,w=Ag(d,a.node().type.name,a.node().attrs),S=((s=i.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(w))||void 0;v=v.append(he.from(i.createAndFill(null,S)||void 0));const _=a.before(a.depth-(y-1));e.replace(_,a.after(-b),new Ee(v,4-y,0));let k=-1;e.doc.nodesBetween(_,e.doc.content.size,(M,T)=>{if(k>-1)return!1;M.isTextblock&&M.content.size===0&&(k=T+1)}),k>-1&&e.setSelection(He.near(e.doc.resolve(k))),e.scrollIntoView()}return!0}const f=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Ag(d,u.type.name,u.attrs),p=Ag(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);const m=f?[{type:i,attrs:h},{type:f,attrs:p}]:[{type:i,attrs:h}];if(!xu(e.doc,a.pos,2))return!1;if(r){const{selection:v,storedMarks:y}=n,{splittableMarks:b}=o.extensionManager,w=y||v.$to.parentOffset&&v.$from.marks();if(e.split(a.pos,2,m).scrollIntoView(),!w||!r)return!0;const S=w.filter(_=>b.includes(_.type.name));e.ensureMarks(S)}return!0},ix=(t,e)=>{const n=$M(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&qa(t.doc,n.pos)&&t.join(n.pos),!0},ax=(t,e)=>{const n=$M(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&qa(t.doc,r)&&t.join(r),!0},vSe=(t,e,n,r={})=>({editor:o,tr:s,state:i,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Mn(t,i.schema),p=Mn(e,i.schema),{selection:m,storedMarks:v}=i,{$from:y,$to:b}=m,w=y.blockRange(b),S=v||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;const _=$M(k=>yN(k.type.name,d))(m);if(w.depth>=1&&_&&w.depth-_.depth<=1){if(_.node.type===h)return c.liftListItem(p);if(yN(_.node.type.name,d)&&h.validContent(_.node.content)&&a)return l().command(()=>(s.setNodeMarkup(_.pos,h),!0)).command(()=>ix(s,h)).command(()=>ax(s,h)).run()}return!n||!S||!a?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>ix(s,h)).command(()=>ax(s,h)).run():l().command(()=>{const k=u().wrapInList(h,r),M=S.filter(T=>f.includes(T.type.name));return s.ensureMarks(M),k?!0:c.clearNodes()}).wrapInList(h,r).command(()=>ix(s,h)).command(()=>ax(s,h)).run()},ySe=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=n,i=Ja(t,r.schema);return W_(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},bSe=(t,e,n={})=>({state:r,commands:o})=>{const s=Mn(t,r.schema),i=Mn(e,r.schema);return jh(r,s,n)?o.setNode(i):o.setNode(s,n)},wSe=(t,e={})=>({state:n,commands:r})=>{const o=Mn(t,n.schema);return jh(n,o,e)?r.lift(o):r.wrapIn(o,e)},xSe=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let s;if(o.spec.isInputRules&&(s=o.getState(t))){if(e){const i=t.tr,a=s.transform;for(let l=a.steps.length-1;l>=0;l-=1)i.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else i.delete(s.from,s.to)}return!0}}return!1},SSe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},_Se=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:a}=n,l=Ja(t,r.schema),{$from:c,empty:u,ranges:d}=a;if(!o)return!0;if(u&&i){let{from:f,to:h}=a;const p=(s=c.marks().find(v=>v.type===l))===null||s===void 0?void 0:s.attrs,m=LM(c,l,p);m&&(f=m.from,h=m.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},CSe=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let s=null,i=null;const a=Ib(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(s=Mn(t,r.schema)),a==="mark"&&(i=Ja(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{s&&s===d.type&&n.setNodeMarkup(f,void 0,{...d.attrs,...e}),i&&d.marks.length&&d.marks.forEach(h=>{if(i===h.type){const p=Math.max(f,c),m=Math.min(f+d.nodeSize,u);n.addMark(p,m,i.create({...h.attrs,...e}))}})})}),!0):!1},kSe=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return Lwe(o,e)(n,r)},ESe=(t,e={})=>({state:n,dispatch:r})=>{const o=Mn(t,n.schema);return jwe(o,e)(n,r)};var MSe=Object.freeze({__proto__:null,blur:sxe,clearContent:ixe,clearNodes:axe,command:lxe,createParagraphNear:cxe,cut:uxe,deleteCurrentNode:dxe,deleteNode:fxe,deleteRange:hxe,deleteSelection:pxe,enter:mxe,exitCode:gxe,extendMarkRange:yxe,first:bxe,focus:wxe,forEach:xxe,insertContent:Sxe,insertContentAt:kxe,joinBackward:Txe,joinDown:Mxe,joinForward:Rxe,joinItemBackward:Oxe,joinItemForward:Pxe,joinTextblockBackward:Axe,joinTextblockForward:Dxe,joinUp:Exe,keyboardShortcut:Nxe,lift:Lxe,liftEmptyBlock:jxe,liftListItem:$xe,newlineInCode:Fxe,resetAttributes:zxe,scrollIntoView:Bxe,selectAll:Vxe,selectNodeBackward:Hxe,selectNodeForward:Wxe,selectParentNode:Uxe,selectTextblockEnd:Gxe,selectTextblockStart:Kxe,setContent:Yxe,setMark:cSe,setMeta:uSe,setNode:dSe,setNodeSelection:fSe,setTextSelection:hSe,sinkListItem:pSe,splitBlock:mSe,splitListItem:gSe,toggleList:vSe,toggleMark:ySe,toggleNode:bSe,toggleWrap:wSe,undoInputRule:xSe,unsetAllMarks:SSe,unsetMark:_Se,updateAttributes:CSe,wrapIn:kSe,wrapInList:ESe});const TSe=Ir.create({name:"commands",addCommands(){return{...MSe}}}),RSe=Ir.create({name:"editable",addProseMirrorPlugins(){return[new vr({key:new ls("editable"),props:{editable:()=>this.editor.options.editable}})]}}),OSe=Ir.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new vr({key:new ls("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),PSe=Ir.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,v=d.pos-d.parentOffset,y=m&&p.parent.childCount===1?v===d.pos:Ke.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return jM()||ZV()?s:o},addProseMirrorPlugins(){return[new vr({key:new ls("clearDocument"),appendTransaction:(t,e,n)=>{if(!(t.some(p=>p.docChanged)&&!e.doc.eq(n.doc)))return;const{empty:o,from:s,to:i}=e.selection,a=Ke.atStart(e.doc).from,l=Ke.atEnd(e.doc).to;if(o||!(s===a&&i===l)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const d=n.tr,f=Rb({state:n,transaction:d}),{commands:h}=new Ob({editor:this.editor,state:f});if(h.clearNodes(),!!d.steps.length)return d}})]}}),ASe=Ir.create({name:"tabindex",addProseMirrorPlugins(){return[new vr({key:new ls("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class vl{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new vl(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new vl(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new vl(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,s=this.pos+r+1,i=this.resolvedPos.doc.resolve(s);if(!o&&i.depth<=this.depth)return;const a=new vl(i,this.editor,o,o?n:null);o&&(a.actualDepth=this.depth+1),e.push(new vl(i,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const s=o.node.attrs,i=Object.keys(n);for(let a=0;a<i.length;a+=1){const l=i[a];if(s[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const s=Object.keys(n);return this.children.forEach(i=>{r&&o.length>0||(i.node.type.name===e&&s.every(l=>n[l]===i.node.attrs[l])&&o.push(i),!(r&&o.length>0)&&(o=o.concat(i.querySelectorAll(e,n,r))))}),o}setAttribute(e){const n=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,e).setTextSelection(n.from).run()}}const DSe=`.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 1px !important;
  height: 1px !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}

.tippy-box[data-animation=fade][data-state=hidden] {
  opacity: 0
}`;function ISe(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}let NSe=class extends Hwe{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n}},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=ISe(DSe,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=KV(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(e){if(this.isDestroyed)return;const n=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[RSe,oxe.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),TSe,OSe,PSe,ASe]:[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new cu(o,this)}createCommandManager(){this.commandManager=new Ob({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e;try{e=H_(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(i=>i.name!=="collaboration"),this.createExtensionManager()}}),e=H_(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=JV(e,this.options.autofocus);this.view=new lwe(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:lu.create({doc:e,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(i=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(i)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),s=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return e8(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return sSe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Zxe(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`

`,textSerializers:r={}}=e||{};return eSe(this.state.doc,{blockSeparator:n,textSerializers:{...qV(this.schema),...r}})}get isEmpty(){return iSe(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new vl(n,this)}get $doc(){return this.$pos(0)}};function ed(t){return new Ab({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Je(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,i=r[r.length-1],a=r[0];if(i){const l=a.search(/\S/),c=n.from+a.indexOf(i),u=c+i.length;if(FM(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;u<n.to&&s.delete(u,n.to),c>n.from&&s.delete(n.from+l,c);const f=n.from+l+i.length;s.addMark(n.from+l,f,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function LSe(t){return new Ab({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Je(t.getAttributes,void 0,r)||{},{tr:s}=e,i=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=i+c;u>a?u=a:a=u+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,i+r[0].length-1),s.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?i:i-1;s.insert(c,t.type.create(o)).delete(s.mapping.map(i),s.mapping.map(a))}s.scrollIntoView()}})}function U_(t){return new Ab({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),s=Je(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)}})}function $h(t){return new Ab({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const s=Je(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),c=l&&_M(l,t.type,s);if(!c)return null;if(i.wrap(l,c),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(v=>h.includes(v.type.name));i.ensureMarks(m)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,s).run()}const u=i.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&qa(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&i.join(n.from-1)}})}class eo{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Je(Ae(this,"addOptions",{name:this.name}))),this.storage=Je(Ae(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new eo(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Db(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new eo(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Je(Ae(n,"addOptions",{name:n.name})),n.storage=Je(Ae(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=i.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}let ro=class G_{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Je(Ae(this,"addOptions",{name:this.name}))),this.storage=Je(Ae(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new G_(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Db(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new G_(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Je(Ae(n,"addOptions",{name:n.name})),n.storage=Je(Ae(n,"addStorage",{name:n.name,options:n.options})),n}};function oc(t){return new Jwe({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const s=Je(t.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:i}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(FM(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(v=>v===t.type&&v!==p.mark.type)).filter(p=>p.to>d).length)return null;f<n.to&&i.delete(f,n.to),d>n.from&&i.delete(n.from+u,d),c=n.from+u+a.length,i.addMark(n.from+u,c,t.type.create(s||{})),i.removeStoredMark(t.type)}}})}const jSe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",$Se="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",td=(t,e)=>{for(const n in e)t[n]=e[n];return t},K_="numeric",Y_="ascii",q_="alpha",Dg="asciinumeric",Um="alphanumeric",X_="domain",t8="emoji",FSe="scheme",zSe="slashscheme",wN="whitespace";function BSe(t,e){return t in e||(e[t]=[]),e[t]}function Rl(t,e,n){e[K_]&&(e[Dg]=!0,e[Um]=!0),e[Y_]&&(e[Dg]=!0,e[q_]=!0),e[Dg]&&(e[Um]=!0),e[q_]&&(e[Um]=!0),e[Um]&&(e[X_]=!0),e[t8]&&(e[X_]=!0);for(const r in e){const o=BSe(r,n);o.indexOf(t)<0&&o.push(t)}}function VSe(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function xr(t){t===void 0&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}xr.groups={};xr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(t))return s}return e.jd},has(t,e){return e===void 0&&(e=!1),e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||xr.groups;let o;return e&&e.j?o=e:(o=new xr(e),n&&r&&Rl(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const s=t.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(t[i]);return o.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||xr.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const s=e;let i,a=o.go(t);if(a?(i=new xr,td(i.j,a.j),i.jr.push.apply(i.jr,a.jr),i.jd=a.jd,i.t=a.t):i=new xr,s){if(r)if(i.t&&typeof i.t=="string"){const l=td(VSe(i.t,r),n);Rl(s,l,r)}else n&&Rl(s,n,r);i.t=s}return o.j[t]=i,i}};const Ge=(t,e,n,r,o)=>t.ta(e,n,r,o),ao=(t,e,n,r,o)=>t.tr(e,n,r,o),xN=(t,e,n,r,o)=>t.ts(e,n,r,o),we=(t,e,n,r,o)=>t.tt(e,n,r,o),Gs="WORD",J_="UWORD",Fh="LOCALHOST",Q_="TLD",Z_="UTLD",Ig="SCHEME",Kc="SLASH_SCHEME",zM="NUM",n8="WS",BM="NL",Hf="OPENBRACE",Wf="CLOSEBRACE",Qv="OPENBRACKET",Zv="CLOSEBRACKET",e0="OPENPAREN",t0="CLOSEPAREN",n0="OPENANGLEBRACKET",r0="CLOSEANGLEBRACKET",o0="FULLWIDTHLEFTPAREN",s0="FULLWIDTHRIGHTPAREN",i0="LEFTCORNERBRACKET",a0="RIGHTCORNERBRACKET",l0="LEFTWHITECORNERBRACKET",c0="RIGHTWHITECORNERBRACKET",u0="FULLWIDTHLESSTHAN",d0="FULLWIDTHGREATERTHAN",f0="AMPERSAND",h0="APOSTROPHE",p0="ASTERISK",Hi="AT",m0="BACKSLASH",g0="BACKTICK",v0="CARET",Yi="COLON",VM="COMMA",y0="DOLLAR",gs="DOT",b0="EQUALS",HM="EXCLAMATION",vs="HYPHEN",w0="PERCENT",x0="PIPE",S0="PLUS",_0="POUND",C0="QUERY",WM="QUOTE",UM="SEMI",ys="SLASH",Uf="TILDE",k0="UNDERSCORE",r8="EMOJI",E0="SYM";var o8=Object.freeze({__proto__:null,WORD:Gs,UWORD:J_,LOCALHOST:Fh,TLD:Q_,UTLD:Z_,SCHEME:Ig,SLASH_SCHEME:Kc,NUM:zM,WS:n8,NL:BM,OPENBRACE:Hf,CLOSEBRACE:Wf,OPENBRACKET:Qv,CLOSEBRACKET:Zv,OPENPAREN:e0,CLOSEPAREN:t0,OPENANGLEBRACKET:n0,CLOSEANGLEBRACKET:r0,FULLWIDTHLEFTPAREN:o0,FULLWIDTHRIGHTPAREN:s0,LEFTCORNERBRACKET:i0,RIGHTCORNERBRACKET:a0,LEFTWHITECORNERBRACKET:l0,RIGHTWHITECORNERBRACKET:c0,FULLWIDTHLESSTHAN:u0,FULLWIDTHGREATERTHAN:d0,AMPERSAND:f0,APOSTROPHE:h0,ASTERISK:p0,AT:Hi,BACKSLASH:m0,BACKTICK:g0,CARET:v0,COLON:Yi,COMMA:VM,DOLLAR:y0,DOT:gs,EQUALS:b0,EXCLAMATION:HM,HYPHEN:vs,PERCENT:w0,PIPE:x0,PLUS:S0,POUND:_0,QUERY:C0,QUOTE:WM,SEMI:UM,SLASH:ys,TILDE:Uf,UNDERSCORE:k0,EMOJI:r8,SYM:E0});const Fc=/[a-z]/,lx=new RegExp("\\p{L}","u"),cx=new RegExp("\\p{Emoji}","u"),ux=/\d/,SN=/\s/,_N=`
`,HSe="️",WSe="‍";let Gm=null,Km=null;function USe(t){t===void 0&&(t=[]);const e={};xr.groups=e;const n=new xr;Gm==null&&(Gm=CN(jSe)),Km==null&&(Km=CN($Se)),we(n,"'",h0),we(n,"{",Hf),we(n,"}",Wf),we(n,"[",Qv),we(n,"]",Zv),we(n,"(",e0),we(n,")",t0),we(n,"<",n0),we(n,">",r0),we(n,"（",o0),we(n,"）",s0),we(n,"「",i0),we(n,"」",a0),we(n,"『",l0),we(n,"』",c0),we(n,"＜",u0),we(n,"＞",d0),we(n,"&",f0),we(n,"*",p0),we(n,"@",Hi),we(n,"`",g0),we(n,"^",v0),we(n,":",Yi),we(n,",",VM),we(n,"$",y0),we(n,".",gs),we(n,"=",b0),we(n,"!",HM),we(n,"-",vs),we(n,"%",w0),we(n,"|",x0),we(n,"+",S0),we(n,"#",_0),we(n,"?",C0),we(n,'"',WM),we(n,"/",ys),we(n,";",UM),we(n,"~",Uf),we(n,"_",k0),we(n,"\\",m0);const r=ao(n,ux,zM,{[K_]:!0});ao(r,ux,r);const o=ao(n,Fc,Gs,{[Y_]:!0});ao(o,Fc,o);const s=ao(n,lx,J_,{[q_]:!0});ao(s,Fc),ao(s,lx,s);const i=ao(n,SN,n8,{[wN]:!0});we(n,_N,BM,{[wN]:!0}),we(i,_N),ao(i,SN,i);const a=ao(n,cx,r8,{[t8]:!0});ao(a,cx,a),we(a,HSe,a);const l=we(a,WSe);ao(l,cx,a);const c=[[Fc,o]],u=[[Fc,null],[lx,s]];for(let d=0;d<Gm.length;d++)Li(n,Gm[d],Q_,Gs,c);for(let d=0;d<Km.length;d++)Li(n,Km[d],Z_,J_,u);Rl(Q_,{tld:!0,ascii:!0},e),Rl(Z_,{utld:!0,alpha:!0},e),Li(n,"file",Ig,Gs,c),Li(n,"mailto",Ig,Gs,c),Li(n,"http",Kc,Gs,c),Li(n,"https",Kc,Gs,c),Li(n,"ftp",Kc,Gs,c),Li(n,"ftps",Kc,Gs,c),Rl(Ig,{scheme:!0,ascii:!0},e),Rl(Kc,{slashscheme:!0,ascii:!0},e),t=t.sort((d,f)=>d[0]>f[0]?1:-1);for(let d=0;d<t.length;d++){const f=t[d][0],p=t[d][1]?{[FSe]:!0}:{[zSe]:!0};f.indexOf("-")>=0?p[X_]=!0:Fc.test(f)?ux.test(f)?p[Dg]=!0:p[Y_]=!0:p[K_]=!0,xN(n,f,f,p)}return xN(n,"localhost",Fh,{ascii:!0}),n.jd=new xr(E0),{start:n,tokens:td({groups:e},o8)}}function GSe(t,e){const n=KSe(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let s=0,i=0;for(;i<r;){let a=t,l=null,c=0,u=null,d=-1,f=-1;for(;i<r&&(l=a.go(n[i]));)a=l,a.accepts()?(d=0,f=0,u=a):d>=0&&(d+=n[i].length,f++),c+=n[i].length,s+=n[i].length,i++;s-=d,i-=f,c-=d,o.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function KSe(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),s,i=o<55296||o>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function Li(t,e,n,r,o){let s;const i=e.length;for(let a=0;a<i-1;a++){const l=e[a];t.j[l]?s=t.j[l]:(s=new xr(r),s.jr=o.slice(),t.j[l]=s),t=s}return s=new xr(n),s.jr=o.slice(),t.j[e[i-1]]=s,s}function CN(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let s=0;for(;o.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let i=parseInt(t.substring(r,r+s),10);i>0;i--)n.pop();r+=s}else n.push(t[r]),r++}return e}const zh={defaultProtocol:"http",events:null,format:kN,formatHref:kN,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function GM(t,e){e===void 0&&(e=null);let n=td({},zh);t&&(n=td(n,t instanceof GM?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}GM.prototype={o:zh,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:zh[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function kN(t){return t}function s8(t,e){this.t="token",this.v=t,this.tk=e}s8.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return t===void 0&&(t=zh.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),s=this.toFormattedString(t),i={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return i.href=r,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),u&&td(i,u),{tagName:o,attributes:i,content:s,eventListeners:d}}};function Lb(t,e){class n extends s8{constructor(o,s){super(o,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const EN=Lb("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),MN=Lb("text"),YSe=Lb("nl"),Ym=Lb("url",{isLink:!0,toHref(t){return t===void 0&&(t=zh.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Fh&&t[1].t===Yi}}),lo=t=>new xr(t);function qSe(t){let{groups:e}=t;const n=e.domain.concat([f0,p0,Hi,m0,g0,v0,y0,b0,vs,zM,w0,x0,S0,_0,ys,E0,Uf,k0]),r=[h0,Yi,VM,gs,HM,C0,WM,UM,n0,r0,Hf,Wf,Zv,Qv,e0,t0,o0,s0,i0,a0,l0,c0,u0,d0],o=[f0,h0,p0,m0,g0,v0,y0,b0,vs,Hf,Wf,w0,x0,S0,_0,C0,ys,E0,Uf,k0],s=lo(),i=we(s,Uf);Ge(i,o,i),Ge(i,e.domain,i);const a=lo(),l=lo(),c=lo();Ge(s,e.domain,a),Ge(s,e.scheme,l),Ge(s,e.slashscheme,c),Ge(a,o,i),Ge(a,e.domain,a);const u=we(a,Hi);we(i,Hi,u),we(l,Hi,u),we(c,Hi,u);const d=we(i,gs);Ge(d,o,i),Ge(d,e.domain,i);const f=lo();Ge(u,e.domain,f),Ge(f,e.domain,f);const h=we(f,gs);Ge(h,e.domain,f);const p=lo(EN);Ge(h,e.tld,p),Ge(h,e.utld,p),we(u,Fh,p);const m=we(f,vs);Ge(m,e.domain,f),Ge(p,e.domain,f),we(p,gs,h),we(p,vs,m);const v=we(p,Yi);Ge(v,e.numeric,EN);const y=we(a,vs),b=we(a,gs);Ge(y,e.domain,a),Ge(b,o,i),Ge(b,e.domain,a);const w=lo(Ym);Ge(b,e.tld,w),Ge(b,e.utld,w),Ge(w,e.domain,a),Ge(w,o,i),we(w,gs,b),we(w,vs,y),we(w,Hi,u);const S=we(w,Yi),_=lo(Ym);Ge(S,e.numeric,_);const k=lo(Ym),M=lo();Ge(k,n,k),Ge(k,r,M),Ge(M,n,k),Ge(M,r,M),we(w,ys,k),we(_,ys,k);const T=we(l,Yi),P=we(c,Yi),A=we(P,ys),L=we(A,ys);Ge(l,e.domain,a),we(l,gs,b),we(l,vs,y),Ge(c,e.domain,a),we(c,gs,b),we(c,vs,y),Ge(T,e.domain,k),we(T,ys,k),Ge(L,e.domain,k),Ge(L,n,k),we(L,ys,k);const V=[[Hf,Wf],[Qv,Zv],[e0,t0],[n0,r0],[o0,s0],[i0,a0],[l0,c0],[u0,d0]];for(let H=0;H<V.length;H++){const[z,N]=V[H],D=we(k,z);we(M,z,D),we(D,N,k);const F=lo(Ym);Ge(D,n,F);const I=lo();Ge(D,r),Ge(F,n,F),Ge(F,r,I),Ge(I,n,F),Ge(I,r,I),we(F,N,k),we(I,N,k)}return we(s,Fh,w),we(s,BM,YSe),{start:s,tokens:o8}}function XSe(t,e,n){let r=n.length,o=0,s=[],i=[];for(;o<r;){let a=t,l=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(l=a.go(n[o].t));)i.push(n[o++]);for(;o<r&&(c=l||a.go(n[o].t));)l=null,a=c,a.accepts()?(f=0,d=a):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(i.push(n[o]),o++);else{i.length>0&&(s.push(dx(MN,e,i)),i=[]),o-=f,u-=f;const h=d.t,p=n.slice(o-u,o);s.push(dx(h,e,p))}}return i.length>0&&s.push(dx(MN,e,i)),s}function dx(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const JSe=typeof console<"u"&&console&&console.warn||(()=>{}),QSe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Lt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ZSe(){xr.groups={},Lt.scanner=null,Lt.parser=null,Lt.tokenQueue=[],Lt.pluginQueue=[],Lt.customSchemes=[],Lt.initialized=!1}function TN(t,e){if(e===void 0&&(e=!1),Lt.initialized&&JSe(`linkifyjs: already initialized - will not register custom scheme "${t}" ${QSe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Lt.customSchemes.push([t,e])}function e_e(){Lt.scanner=USe(Lt.customSchemes);for(let t=0;t<Lt.tokenQueue.length;t++)Lt.tokenQueue[t][1]({scanner:Lt.scanner});Lt.parser=qSe(Lt.scanner.tokens);for(let t=0;t<Lt.pluginQueue.length;t++)Lt.pluginQueue[t][1]({scanner:Lt.scanner,parser:Lt.parser});Lt.initialized=!0}function i8(t){return Lt.initialized||e_e(),XSe(Lt.parser.start,t,GSe(Lt.scanner.start,t))}function a8(t,e,n){if(e===void 0&&(e=null),n===void 0&&(n=null),e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new GM(n),o=i8(t),s=[];for(let i=0;i<o.length;i++){const a=o[i];a.isLink&&(!e||a.t===e)&&r.check(a)&&s.push(a.toFormattedObject(r))}return s}function t_e(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function n_e(t){return new vr({key:new ls("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,a=qxe(n.doc,[...e]);if(oSe(a).forEach(({newRange:c})=>{const u=Jxe(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;const v=i8(p).map(y=>y.toObject(t.defaultProtocol));if(!t_e(v))return!1;v.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>t.validate(y.value)).forEach(y=>{FM(y.from,y.to,r.doc).some(b=>b.mark.type===t.type)||i.addMark(y.from,y.to,t.type.create({href:y.href}))})}}),!!i.steps.length)return i}})}function r_e(t){return new vr({key:new ls("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(r.button!==0)return!1;let i=r.target;const a=[];for(;i.nodeName!=="DIV";)a.push(i),i=i.parentNode;if(!a.find(f=>f.nodeName==="A"))return!1;const l=e8(e.state,t.type.name),c=r.target,u=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:l.href,d=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:l.target;return c&&u?(window.open(u,d),!0):!1}}})}function o_e(t){return new vr({key:new ls("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:i}=s;if(i)return!1;let a="";r.content.forEach(c=>{a+=c.textContent});const l=a8(a,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!l?!1:(t.editor.commands.setMark(t.type,{href:l.href}),!0)}}})}const s_e=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,i_e=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;function RN(t){return!t||t.replace(s_e,"").match(i_e)}const a_e=eo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(t=>{if(typeof t=="string"){TN(t);return}TN(t.scheme,t.optionalSlashes)})},onDestroy(){ZSe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:t=>!!t}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!RN(e)?!1:{href:e}}}]},renderHTML({HTMLAttributes:t}){return RN(t.href)?["a",Ht(this.options.HTMLAttributes,t),0]:["a",Ht(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[oc({find:t=>{const e=[];if(t){const{validate:n}=this.options,r=a8(t).filter(o=>o.isLink&&n(o.value));r.length&&r.forEach(o=>e.push({text:o.value,data:{href:o.href},index:o.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push(n_e({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&t.push(r_e({type:this.type})),this.options.linkOnPaste&&t.push(o_e({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),bMe=a_e.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1});var yc={root:"m_dd3f7539",typographyStylesProvider:"m_d37966d9",content:"m_c2204cc2",linkEditorDropdown:"m_8a991b4f",control:"m_c2207da6",controlsGroup:"m_2ab47ef2",linkEditor:"m_b67b711e",linkEditorInput:"m_296cf94c",linkEditorExternalControl:"m_cfef614",linkEditorSave:"m_3b28e7bb",toolbar:"m_4574a3c4",taskList:"m_8b44009a"};const l_e={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:t=>`Set text color ${t}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",undoControlLabel:"Undo",redoControlLabel:"Redo",tasksControlLabel:"Task list",tasksSinkLabel:"Decrease task level",tasksLiftLabel:"Increase task level",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:t=>`Set text color ${t}`},[c_e,Qa]=bn("RichTextEditor component was not found in tree"),u_e=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},d_e=({renderers:t})=>$t.createElement($t.Fragment,null,Object.entries(t).map(([e,n])=>A5.createPortal(n.reactElement,n.element,e)));class f_e extends $t.Component{constructor(e){super(e),this.editorContentRef=$t.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:e}=this.props;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=this,e.createNodeViews(),this.initialized=!0}}maybeFlushSync(e){this.initialized?cc.flushSync(e):e()}setRenderer(e,n){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>({renderers:{...r,[e]:n}}))})}removeRenderer(e){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>{const r={...n};return delete r[e],{renderers:r}})})}componentWillUnmount(){const{editor:e}=this.props;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return $t.createElement($t.Fragment,null,$t.createElement("div",{ref:u_e(n,this.editorContentRef),...r}),$t.createElement(d_e,{renderers:this.state.renderers}))}}const h_e=C.forwardRef((t,e)=>{const n=$t.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return $t.createElement(f_e,{key:n,innerRef:e,...t})}),ON=$t.memo(h_e);class qm extends NSe{constructor(){super(...arguments),this.contentComponent=null}}var l8={exports:{}},fx={},hx={exports:{}},px={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var PN;function p_e(){if(PN)return px;PN=1;var t=$t;function e(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,s=t.useLayoutEffect,i=t.useDebugValue;function a(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,v=p[1];return s(function(){m.value=h,m.getSnapshot=f,l(m)&&v({inst:m})},[d,h,f]),o(function(){return l(m)&&v({inst:m}),d(function(){l(m)&&v({inst:m})})},[d]),i(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return px.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,px}var AN;function m_e(){return AN||(AN=1,hx.exports=p_e()),hx.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var DN;function g_e(){if(DN)return fx;DN=1;var t=$t,e=m_e();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,s=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;return fx.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function y(k){if(!b){if(b=!0,w=k,k=f(k),h!==void 0&&m.hasValue){var M=m.value;if(h(M,k))return S=M}return S=k}if(M=S,r(w,k))return M;var T=f(k);return h!==void 0&&h(M,T)?M:(w=k,S=T)}var b=!1,w,S,_=d===void 0?null:d;return[function(){return y(u())},_===null?void 0:function(){return y(_())}]},[u,d,f,h]);var v=o(c,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=v},[v]),l(v),v},fx}l8.exports=g_e();var v_e=l8.exports;function y_e(t){let e=0,n=0,r={editor:t,transactionNumber:0},o=t;const s=new Set;return{getSnapshot(){return e===n||(n=e,r={editor:o,transactionNumber:e}),r},getServerSnapshot(){return{editor:null,transactionNumber:0}},subscribe(a){return s.add(a),()=>{s.delete(a)}},watch(a){if(o=a,o){const l=()=>{e+=1,s.forEach(u=>u())},c=o;return c.on("transaction",l),()=>{c.off("transaction",l)}}}}}function b_e(t){const[e]=C.useState(()=>y_e(t.editor)),n=v_e.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getServerSnapshot,t.selector,t.equalityFn);return C.useEffect(()=>e.watch(t.editor),[t.editor]),C.useDebugValue(n),n}const w_e=!1,eC=typeof window>"u",x_e=eC||!!(typeof window<"u"&&window.next);function wMe(t={},e=[]){const n=C.useRef(!1),[r,o]=C.useState(()=>{if(t.immediatelyRender===void 0)return eC||x_e?null:new qm(t);if(t.immediatelyRender&&eC&&w_e)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return t.immediatelyRender?new qm(t):null});C.useDebugValue(r),C.useEffect(()=>{let M=r;M?Array.isArray(e)&&e.length?(M=new qm(t),o(M)):M.setOptions(t):(M=new qm(t),o(M))},e);const{onBeforeCreate:s,onBlur:i,onCreate:a,onDestroy:l,onFocus:c,onSelectionUpdate:u,onTransaction:d,onUpdate:f,onContentError:h}=t,p=C.useRef(s),m=C.useRef(i),v=C.useRef(a),y=C.useRef(l),b=C.useRef(c),w=C.useRef(u),S=C.useRef(d),_=C.useRef(f),k=C.useRef(h);return C.useEffect(()=>{r&&(s&&(r.off("beforeCreate",p.current),r.on("beforeCreate",s),p.current=s),i&&(r.off("blur",m.current),r.on("blur",i),m.current=i),a&&(r.off("create",v.current),r.on("create",a),v.current=a),l&&(r.off("destroy",y.current),r.on("destroy",l),y.current=l),c&&(r.off("focus",b.current),r.on("focus",c),b.current=c),u&&(r.off("selectionUpdate",w.current),r.on("selectionUpdate",u),w.current=u),d&&(r.off("transaction",S.current),r.on("transaction",d),S.current=d),f&&(r.off("update",_.current),r.on("update",f),_.current=f),h&&(r.off("contentError",k.current),r.on("contentError",h),k.current=h))},[s,i,a,l,c,u,d,f,h,r]),C.useEffect(()=>(n.current=!0,()=>{n.current=!1,r&&setTimeout(()=>{!n.current&&!r.isDestroyed&&r.destroy()})}),[]),b_e({editor:r,selector:({transactionNumber:M})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&M===0?0:M+1}),r}const S_e=C.createContext({editor:null});S_e.Consumer;const __e=C.createContext({onDragStart:void 0}),C_e=()=>C.useContext(__e);$t.forwardRef((t,e)=>{const{onDragStart:n}=C_e(),r=t.as||"div";return $t.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});const k_e={},KM=ee((t,e)=>{const n=K("RichTextEditorContent",k_e,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=Qa();return c.withTypographyStyles?g.jsx(ME,{...c.getStyles("typographyStylesProvider",{className:o,style:s,styles:i,classNames:r}),unstyled:c.unstyled,ref:e,children:g.jsx(J,{component:ON,editor:c.editor,...c.getStyles("content",{classNames:r,styles:i}),...l})}):g.jsx(J,{component:ON,editor:c.editor,...c.getStyles("content",{classNames:r,styles:i,className:o,style:s}),...l})});KM.classes=yc;KM.displayName="@mantine/tiptap/RichTextEditorContent";function ot(t){return g.jsx("svg",{...t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}function E_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),g.jsx("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})]})}function M_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 5l6 0"}),g.jsx("path",{d:"M7 19l6 0"}),g.jsx("path",{d:"M14 5l-4 14"})]})}function T_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),g.jsx("path",{d:"M5 19h14"})]})}function R_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12l14 0"}),g.jsx("path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5"})]})}function O_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 15l4 4m0 -4l-4 4"}),g.jsx("path",{d:"M7 6v-1h11v1"}),g.jsx("path",{d:"M7 19l4 0"}),g.jsx("path",{d:"M13 5l-4 14"})]})}function P_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 18v-8l-2 2"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function A_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function D_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),g.jsx("path",{d:"M17 16a2 2 0 1 0 2 -2"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function I_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 18v-8l-4 6h5"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function N_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function L_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z"}),g.jsx("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function j_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 6l11 0"}),g.jsx("path",{d:"M9 12l11 0"}),g.jsx("path",{d:"M9 18l11 0"}),g.jsx("path",{d:"M5 6l0 .01"}),g.jsx("path",{d:"M5 12l0 .01"}),g.jsx("path",{d:"M5 18l0 .01"})]})}function $_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 6h9"}),g.jsx("path",{d:"M11 12h9"}),g.jsx("path",{d:"M12 18h8"}),g.jsx("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),g.jsx("path",{d:"M6 10v-6l-2 2"})]})}function F_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 22v-2"}),g.jsx("path",{d:"M9 15l6 -6"}),g.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),g.jsx("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"}),g.jsx("path",{d:"M20 17h2"}),g.jsx("path",{d:"M2 7h2"}),g.jsx("path",{d:"M7 2v2"})]})}function z_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M6 15h15"}),g.jsx("path",{d:"M21 19h-15"}),g.jsx("path",{d:"M15 11h6"}),g.jsx("path",{d:"M21 7h-6"}),g.jsx("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),g.jsx("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})]})}function B_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M4 12l10 0"}),g.jsx("path",{d:"M4 18l14 0"})]})}function V_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M10 12l10 0"}),g.jsx("path",{d:"M6 18l14 0"})]})}function H_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M8 12l8 0"}),g.jsx("path",{d:"M6 18l12 0"})]})}function W_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M4 12l16 0"}),g.jsx("path",{d:"M4 18l12 0"})]})}function U_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),g.jsx("path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function G_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),g.jsx("path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function c8(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 8l-4 4l4 4"}),g.jsx("path",{d:"M17 8l4 4l-4 4"}),g.jsx("path",{d:"M14 4l-4 16"})]})}function K_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),g.jsx("path",{d:"M12.5 5.5l4 4"}),g.jsx("path",{d:"M4.5 13.5l4 4"}),g.jsx("path",{d:"M21 15v4h-8l4 -4z"})]})}function Y_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12h2"}),g.jsx("path",{d:"M17 12h2"}),g.jsx("path",{d:"M11 12h2"})]})}function u8(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"}),g.jsx("path",{d:"M3 3l18 18"})]})}function q_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 7l6 6"}),g.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}function X_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M18 6l-12 12"}),g.jsx("path",{d:"M6 6l12 12"})]})}function J_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("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"}),g.jsx("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),g.jsx("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),g.jsx("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function Q_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12l5 5l10 -10"})]})}function Z_e(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 15l6 -6"}),g.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),g.jsx("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"})]})}function eCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),g.jsx("path",{d:"M11 13l9 -9"}),g.jsx("path",{d:"M15 4h5v5"})]})}function tCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 14l-4 -4l4 -4"}),g.jsx("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})]})}function nCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M15 14l4 -4l-4 -4"}),g.jsx("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"})]})}function rCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M11 6l9 0"}),g.jsx("path",{d:"M11 12l9 0"}),g.jsx("path",{d:"M11 18l9 0"})]})}function oCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 6l-11 0"}),g.jsx("path",{d:"M20 12l-7 0"}),g.jsx("path",{d:"M20 18l-11 0"}),g.jsx("path",{d:"M4 8l4 4l-4 4"})]})}function sCe(t){return g.jsxs(ot,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 6l-7 0"}),g.jsx("path",{d:"M20 12l-9 0"}),g.jsx("path",{d:"M20 18l-7 0"}),g.jsx("path",{d:"M8 8l-4 4l4 4"})]})}const iCe={interactive:!0},Ed=ee((t,e)=>{const n=K("RichTextEditorControl",iCe,t),{classNames:r,className:o,style:s,styles:i,vars:a,interactive:l,active:c,onMouseDown:u,disabled:d,...f}=n,h=Qa();return g.jsx(un,{...f,...h.getStyles("control",{className:o,style:s,classNames:r,styles:i}),disabled:d,"data-rich-text-editor-control":!0,tabIndex:l?0:-1,"data-interactive":l||void 0,"data-disabled":d||void 0,"data-active":c||void 0,"aria-pressed":c&&l||void 0,"aria-hidden":!l||void 0,ref:e,unstyled:h.unstyled,onMouseDown:p=>{p.preventDefault(),u==null||u(p)}})});Ed.classes=yc;Ed.displayName="@mantine/tiptap/RichTextEditorControl";const YM=C.forwardRef(({className:t,icon:e,...n},r)=>g.jsx(Ed,{ref:r,...n,children:g.jsx(e,{style:{width:Y(16),height:Y(16)}})}));YM.displayName="@mantine/tiptap/RichTextEditorControlBase";function ht({label:t,isActive:e,operation:n,icon:r,isDisabled:o}){return C.forwardRef((s,i)=>{const{editor:a,labels:l}=Qa(),c=l[t];return g.jsx(YM,{...s,"aria-label":c,title:c,active:e!=null&&e.name?a==null?void 0:a.isActive(e.name,e.attributes):!1,ref:i,onClick:()=>a==null?void 0:a.chain().focus()[n.name](n.attributes).run(),icon:s.icon||r,disabled:(o==null?void 0:o(a))||!1})})}const aCe=ht({label:"boldControlLabel",icon:t=>g.jsx(E_e,{...t}),isActive:{name:"bold"},operation:{name:"toggleBold"}}),lCe=ht({label:"italicControlLabel",icon:t=>g.jsx(M_e,{...t}),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),cCe=ht({label:"underlineControlLabel",icon:t=>g.jsx(T_e,{...t}),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),uCe=ht({label:"strikeControlLabel",icon:t=>g.jsx(R_e,{...t}),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),dCe=ht({label:"clearFormattingControlLabel",icon:t=>g.jsx(O_e,{...t}),operation:{name:"unsetAllMarks"}}),fCe=ht({label:"unlinkControlLabel",icon:t=>g.jsx(F_e,{...t}),operation:{name:"unsetLink"}}),hCe=ht({label:"bulletListControlLabel",icon:t=>g.jsx(j_e,{...t}),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),pCe=ht({label:"orderedListControlLabel",icon:t=>g.jsx($_e,{...t}),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),mCe=ht({label:"h1ControlLabel",icon:t=>g.jsx(P_e,{...t}),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),gCe=ht({label:"h2ControlLabel",icon:t=>g.jsx(A_e,{...t}),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),vCe=ht({label:"h3ControlLabel",icon:t=>g.jsx(D_e,{...t}),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),yCe=ht({label:"h4ControlLabel",icon:t=>g.jsx(I_e,{...t}),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),bCe=ht({label:"h5ControlLabel",icon:t=>g.jsx(N_e,{...t}),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),wCe=ht({label:"h6ControlLabel",icon:t=>g.jsx(L_e,{...t}),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),xCe=ht({label:"blockquoteControlLabel",icon:t=>g.jsx(z_e,{...t}),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),SCe=ht({label:"alignLeftControlLabel",icon:t=>g.jsx(B_e,{...t}),operation:{name:"setTextAlign",attributes:"left"}}),_Ce=ht({label:"alignRightControlLabel",icon:t=>g.jsx(V_e,{...t}),operation:{name:"setTextAlign",attributes:"right"}}),CCe=ht({label:"alignCenterControlLabel",icon:t=>g.jsx(H_e,{...t}),operation:{name:"setTextAlign",attributes:"center"}}),kCe=ht({label:"alignJustifyControlLabel",icon:t=>g.jsx(W_e,{...t}),operation:{name:"setTextAlign",attributes:"justify"}}),ECe=ht({label:"subscriptControlLabel",icon:t=>g.jsx(U_e,{...t}),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),MCe=ht({label:"superscriptControlLabel",icon:t=>g.jsx(G_e,{...t}),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),TCe=ht({label:"codeControlLabel",icon:t=>g.jsx(c8,{...t}),isActive:{name:"code"},operation:{name:"toggleCode"}}),RCe=ht({label:"codeBlockControlLabel",icon:t=>g.jsx(c8,{...t}),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),OCe=ht({label:"highlightControlLabel",icon:t=>g.jsx(K_e,{...t}),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),PCe=ht({label:"hrControlLabel",icon:t=>g.jsx(Y_e,{...t}),operation:{name:"setHorizontalRule"}}),ACe=ht({label:"unsetColorControlLabel",icon:t=>g.jsx(u8,{...t}),operation:{name:"unsetColor"}}),DCe=ht({label:"undoControlLabel",icon:t=>g.jsx(tCe,{...t}),isDisabled:t=>!(t!=null&&t.can().undo()),operation:{name:"undo"}}),ICe=ht({label:"redoControlLabel",icon:t=>g.jsx(nCe,{...t}),isDisabled:t=>!(t!=null&&t.can().redo()),operation:{name:"redo"}}),NCe=ht({label:"tasksControlLabel",icon:t=>g.jsx(rCe,{...t}),isActive:{name:"taskList"},operation:{name:"toggleTaskList"}}),LCe=ht({label:"tasksSinkLabel",icon:t=>g.jsx(oCe,{...t}),operation:{name:"sinkListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().sinkListItem("taskItem"))}),jCe=ht({label:"tasksLiftLabel",icon:t=>g.jsx(sCe,{...t}),operation:{name:"liftListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().liftListItem("taskItem"))}),$Ce=t=>g.jsx(Z_e,{...t}),FCe={},qM=ee((t,e)=>{var V;const n=K("RichTextEditorLinkControl",FCe,t),{classNames:r,className:o,style:s,styles:i,vars:a,icon:l,popoverProps:c,disableTooltips:u,initialExternal:d,...f}=n,h=Qa(),p={classNames:r,styles:i},[m,v]=VQ(""),[y,b]=C.useState(d),[w,{open:S,close:_}]=sy(!1),k=()=>{var z;S();const H=(z=h.editor)==null?void 0:z.getAttributes("link");v((H==null?void 0:H.href)||""),b(H!=null&&H.href?(H==null?void 0:H.target)==="_blank":d)},M=()=>{_(),v(""),b(d)},T=()=>{var H,z;M(),m===""?(H=h.editor)==null||H.chain().focus().extendMarkRange("link").unsetLink().run():(z=h.editor)==null||z.chain().focus().extendMarkRange("link").setLink({href:m,target:y?"_blank":null}).run()},P=H=>{H.key==="Enter"&&(H.preventDefault(),T())};Ek("edit-link",k,!1);const{resolvedClassNames:A,resolvedStyles:L}=Nr({classNames:r,styles:i,props:n});return g.jsxs(Mt,{trapFocus:!0,shadow:"md",withinPortal:!0,opened:w,onClose:M,offset:-44,zIndex:1e4,...c,children:[g.jsx(Mt.Target,{children:g.jsx(YM,{icon:l||$Ce,...f,"aria-label":h.labels.linkControlLabel,title:h.labels.linkControlLabel,onClick:k,active:(V=h.editor)==null?void 0:V.isActive("link"),ref:e,classNames:A,styles:L,className:o,style:s})}),g.jsx(Mt.Dropdown,{...h.getStyles("linkEditorDropdown",p),children:g.jsxs("div",{...h.getStyles("linkEditor",p),children:[g.jsx(wd,{placeholder:h.labels.linkEditorInputPlaceholder,"aria-label":h.labels.linkEditorInputLabel,type:"url",value:m,onChange:v,classNames:{input:h.getStyles("linkEditorInput",p).className},onKeyDown:P,rightSection:g.jsx(ut,{label:y?h.labels.linkEditorExternalLink:h.labels.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:u,zIndex:1e4,children:g.jsx(un,{onClick:()=>b(H=>!H),"data-active":y||void 0,...h.getStyles("linkEditorExternalControl",p),children:g.jsx(eCe,{style:{width:Y(14),height:Y(14)}})})})}),g.jsx(Uo,{variant:"default",onClick:T,...h.getStyles("linkEditorSave",p),children:h.labels.linkEditorSave})]})})]})});qM.classes=yc;qM.displayName="@mantine/tiptap/RichTextEditorLinkControl";const zCe={},d8=C.forwardRef((t,e)=>{const{popoverProps:n,colors:r,colorPickerProps:o,...s}=K("RichTextEditorColorPickerControl",zCe,t),{editor:i,labels:a,getStyles:l}=Qa(),[c,{toggle:u,close:d}]=sy(!1),[f,h]=C.useState("palette"),p=(i==null?void 0:i.getAttributes("textStyle").color)||"var(--mantine-color-text)",m=(b,w=!0)=>{(i==null?void 0:i.chain()).focus().setColor(b).run(),w&&d()},v=()=>{(i==null?void 0:i.chain()).focus().unsetColor().run(),d()},y=r.map((b,w)=>g.jsx(Jl,{component:"button",color:b,onClick:()=>m(b),size:26,radius:"xs",style:{cursor:"pointer"},title:a.colorPickerColorLabel(b),"aria-label":a.colorPickerColorLabel(b)},w));return g.jsxs(Mt,{opened:c,withinPortal:!0,trapFocus:!0,onClose:d,...n,children:[g.jsx(Mt.Target,{children:g.jsx(Ed,{...s,"aria-label":a.colorPickerControlLabel,title:a.colorPickerControlLabel,ref:e,onClick:u,children:g.jsx(Jl,{color:p,size:14})})}),g.jsxs(Mt.Dropdown,{...l("linkEditorDropdown"),children:[f==="palette"&&g.jsx(hE,{cols:7,spacing:2,children:y}),f==="colorPicker"&&g.jsx(B2,{defaultValue:p,onChange:b=>m(b,!1),...o}),g.jsx(ut.Group,{closeDelay:200,children:g.jsxs(Bu,{justify:"flex-end",gap:"xs",mt:"sm",children:[f==="palette"&&g.jsx(Ze,{variant:"default",onClick:d,title:a.colorPickerCancel,"aria-label":a.colorPickerCancel,children:g.jsx(X_e,{style:{width:Y(16),height:Y(16)}})}),g.jsx(Ze,{variant:"default",onClick:v,title:a.colorPickerClear,"aria-label":a.colorPickerClear,children:g.jsx(u8,{style:{width:Y(16),height:Y(16)}})}),f==="palette"?g.jsx(Ze,{variant:"default",onClick:()=>h("colorPicker"),title:a.colorPickerColorPicker,"aria-label":a.colorPickerColorPicker,children:g.jsx(q_e,{style:{width:Y(16),height:Y(16)}})}):g.jsx(Ze,{variant:"default",onClick:()=>h("palette"),"aria-label":a.colorPickerPalette,title:a.colorPickerPalette,children:g.jsx(J_e,{style:{width:Y(16),height:Y(16)}})}),f==="colorPicker"&&g.jsx(Ze,{variant:"default",onClick:d,title:a.colorPickerSave,"aria-label":a.colorPickerSave,children:g.jsx(Q_e,{style:{width:Y(16),height:Y(16)}})})]})})]})]})});d8.displayName="@mantine/tiptap/ColorPickerControl";const BCe={},VCe=C.forwardRef((t,e)=>{const{color:n,...r}=K("RichTextEditorColorControl",BCe,t),{editor:o,labels:s}=Qa(),i=(o==null?void 0:o.getAttributes("textStyle").color)||null,a=s.colorControlLabel(n);return g.jsx(Ed,{...r,active:i===n,"aria-label":a,title:a,onClick:()=>(o==null?void 0:o.chain()).focus().setColor(n).run(),ref:e,children:g.jsx(Jl,{color:n,size:14})})}),HCe={},XM=ee((t,e)=>{const n=K("RichTextEditorControlsGroup",HCe,t),{classNames:r,className:o,style:s,styles:i,vars:a,...l}=n,c=Qa();return g.jsx(J,{ref:e,...c.getStyles("controlsGroup",{className:o,style:s,styles:i,classNames:r}),...l})});XM.classes=yc;XM.displayName="@mantine/tiptap/RichTextEditorControlsGroup";const WCe={},JM=ee((t,e)=>{const n=K("RichTextEditorToolbar",WCe,t),{classNames:r,className:o,style:s,styles:i,vars:a,sticky:l,stickyOffset:c,mod:u,...d}=n,f=Qa();return g.jsx(J,{ref:e,mod:[{sticky:l},u],...f.getStyles("toolbar",{className:o,style:s,styles:i,classNames:r}),...d,__vars:{"--rte-sticky-offset":Y(c)}})});JM.classes=yc;JM.displayName="@mantine/tiptap/RichTextEditorToolbar";const UCe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ye=ee((t,e)=>{const n=K("RichTextEditor",UCe,t),{classNames:r,className:o,style:s,styles:i,unstyled:a,vars:l,editor:c,withCodeHighlightStyles:u,withTypographyStyles:d,labels:f,children:h,...p}=n,m=be({name:"RichTextEditor",classes:yc,props:n,className:o,style:s,classNames:r,styles:i,unstyled:a,vars:l}),v=C.useMemo(()=>({...l_e,...f}),[f]);return g.jsx(c_e,{value:{editor:c,getStyles:m,labels:v,withCodeHighlightStyles:u,withTypographyStyles:d,unstyled:a},children:g.jsx(J,{...m("root"),...p,ref:e,children:h})})});Ye.classes=yc;Ye.displayName="@mantine/tiptap/RichTextEditor";Ye.Content=KM;Ye.Control=Ed;Ye.Toolbar=JM;Ye.ControlsGroup=XM;Ye.Bold=aCe;Ye.Italic=lCe;Ye.Strikethrough=uCe;Ye.Underline=cCe;Ye.ClearFormatting=dCe;Ye.H1=mCe;Ye.H2=gCe;Ye.H3=vCe;Ye.H4=yCe;Ye.H5=bCe;Ye.H6=wCe;Ye.BulletList=hCe;Ye.OrderedList=pCe;Ye.Link=qM;Ye.Unlink=fCe;Ye.Blockquote=xCe;Ye.AlignLeft=SCe;Ye.AlignRight=_Ce;Ye.AlignCenter=CCe;Ye.AlignJustify=kCe;Ye.Superscript=MCe;Ye.Subscript=ECe;Ye.Code=TCe;Ye.CodeBlock=RCe;Ye.ColorPicker=d8;Ye.Color=VCe;Ye.Highlight=OCe;Ye.Hr=PCe;Ye.UnsetColor=ACe;Ye.Undo=DCe;Ye.Redo=ICe;Ye.TaskList=NCe;Ye.TaskListSink=LCe;Ye.TaskListLift=jCe;const GCe=/^\s*>\s$/,KCe=ro.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$h({find:GCe,type:this.type})]}}),YCe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,qCe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,XCe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,JCe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,QCe=eo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[ed({find:YCe,type:this.type}),ed({find:XCe,type:this.type})]},addPasteRules(){return[oc({find:qCe,type:this.type}),oc({find:JCe,type:this.type})]}}),ZCe=ro.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ht(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),IN=eo.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Nb(t,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),NN=/^\s*([-+*])\s$/,eke=ro.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ZCe.name,this.editor.getAttributes(IN.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=$h({find:NN,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$h({find:NN,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(IN.name),editor:this.editor})),[t]}}),tke=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,nke=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,rke=eo.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[ed({find:tke,type:this.type})]},addPasteRules(){return[oc({find:nke,type:this.type})]}}),oke=/^```([a-z]+)?[\s\n]$/,ske=/^~~~([a-z]+)?[\s\n]$/,ike=ro.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,s=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ht(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(`

`);return!s||!i?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:s}=n;if(!s||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0||r.nodeAt(a)?!1:t.commands.exitCode()}}},addInputRules(){return[U_({find:oke,type:this.type,getAttributes:t=>({language:t[1]})}),U_({find:ske,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new vr({key:new ls("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,s=o==null?void 0:o.mode;if(!n||!s)return!1;const{tr:i,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
`));return i.replaceSelectionWith(this.type.create({language:s},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(He.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}}),ake=ro.create({name:"doc",topNode:!0,content:"block+"});function lke(t={}){return new vr({view(e){return new cke(e,t)}})}class cke{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=i=>{this[o](i)};return e.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,i;if(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,i=-pageYOffset;else{let a=o.getBoundingClientRect();s=a.left-o.scrollLeft,i=a.top-o.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-i+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Q6(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const uke=Ir.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[lke(this.options)]}});class Kt extends Ke{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Kt.valid(r)?new Kt(r):Ke.near(r)}content(){return Ee.empty}eq(e){return e instanceof Kt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Kt(e.resolve(n.pos))}getBookmark(){return new QM(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!dke(e)||!fke(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Kt.valid(e))return e;let o=e.pos,s=null;for(let i=e.depth;;i--){let a=e.node(i);if(n>0?e.indexAfter(i)<a.childCount:e.index(i)>0){s=a.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;o+=n;let l=e.doc.resolve(o);if(Kt.valid(l))return l}for(;;){let i=n>0?s.firstChild:s.lastChild;if(!i){if(s.isAtom&&!s.isText&&!ze.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=i,o+=n;let a=e.doc.resolve(o);if(Kt.valid(a))return a}return null}}}Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;Ke.jsonID("gapcursor",Kt);class QM{constructor(e){this.pos=e}map(e){return new QM(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Kt.valid(n)?new Kt(n):Ke.near(n)}}function dke(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function fke(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function hke(){return new vr({props:{decorations:vke,createSelectionBetween(t,e,n){return e.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:mke,handleKeyDown:pke,handleDOMEvents:{beforeinput:gke}}})}const pke=FV({ArrowLeft:Xm("horiz",-1),ArrowRight:Xm("horiz",1),ArrowUp:Xm("vert",-1),ArrowDown:Xm("vert",1)});function Xm(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let i=r.selection,a=e>0?i.$to:i.$from,l=i.empty;if(i instanceof He){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=Kt.findGapCursorFrom(a,e,l);return c?(o&&o(r.tr.setSelection(new Kt(c))),!0):!1}}function mke(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Kt.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&ze.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Kt(r))),!0)}function gke(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Kt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=he.empty;for(let i=r.length-1;i>=0;i--)o=he.from(r[i].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Ee(o,0,0));return s.setSelection(He.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function vke(t){if(!(t.selection instanceof Kt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",pn.create(t.doc,[go.widget(t.selection.head,e,{key:"gapcursor"})])}const yke=Ir.create({name:"gapCursor",addProseMirrorPlugins(){return[hke()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Je(Ae(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),bke=ro.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ht(this.options.HTMLAttributes,t)]},renderText(){return`
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&i){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),wke=ro.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ht(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>U_({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var M0=200,En=function(){};En.prototype.append=function(e){return e.length?(e=En.from(e),!this.length&&e||e.length<M0&&this.leafAppend(e)||this.length<M0&&e.leafPrepend(this)||this.appendInner(e)):this};En.prototype.prepend=function(e){return e.length?En.from(e).append(this):this};En.prototype.appendInner=function(e){return new xke(this,e)};En.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?En.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};En.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};En.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};En.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,i){return o.push(e(s,i))},n,r),o};En.from=function(e){return e instanceof En?e:e&&e.length?new f8(e):En.empty};var f8=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,i,a){for(var l=s;l<i;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,i,a){for(var l=s-1;l>=i;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=M0)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=M0)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(En);En.empty=new f8([]);var xke=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,s,i){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(s,a),i)===!1||s>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,s)-a,i+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,i){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(s,a)-a,i+a)===!1||s<a&&this.left.forEachInvertedInner(r,Math.min(o,a),s,i)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(En);const Ske=500;class Vo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let i=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),s=o.maps.length),s--,u.push(d);return}if(o){u.push(new bs(d.map));let h=d.step.map(o.slice(s)),p;h&&i.maybeStep(h).doc&&(p=i.mapping.maps[i.mapping.maps.length-1],c.push(new bs(p,void 0,void 0,c.length+u.length))),s--,p&&o.appendMap(p,s)}else i.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(s)):d.selection,l=new Vo(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(e,n,r,o){let s=[],i=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new bs(e.mapping.maps[u],d,n),h;(h=l&&l.merge(f))&&(f=h,u?s.pop():a=a.slice(0,a.length-1)),s.push(f),n&&(i++,n=void 0),o||(l=f)}let c=i-r.depth;return c>Cke&&(a=_ke(a,c),i-=c),new Vo(a.append(s),i)}remapping(e,n){let r=new wu;return this.items.forEach((o,s)=>{let i=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,i)},e,n),r}addMaps(e){return this.eventCount==0?this:new Vo(this.items.append(e.map(n=>new bs(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;i=Math.min(i,h);let p=s.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),v=f.selection&&f.selection.map(s.slice(l+1,h));v&&a++,r.push(new bs(p,m,v))}else r.push(new bs(p))},o);let c=[];for(let f=n;f<i;f++)c.push(new bs(s.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Vo(u,a);return d.emptyItemCount()>Ske&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],s=0;return this.items.forEach((i,a)=>{if(a>=e)o.push(i),i.selection&&s++;else if(i.step){let l=i.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=i.selection&&i.selection.map(n.slice(r));u&&s++;let d=new bs(c.invert(),l,u),f,h=o.length-1;(f=o.length&&o[h].merge(d))?o[h]=f:o.push(d)}}else i.map&&r--},this.items.length,0),new Vo(En.from(o.reverse()),s)}}Vo.empty=new Vo(En.empty,0);function _ke(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class bs{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new bs(n.getMap().invert(),n,this.selection)}}}class Wi{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const Cke=20;function kke(t,e,n,r){let o=n.getMeta(Bl),s;if(o)return o.historyState;n.getMeta(Tke)&&(t=new Wi(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(Bl))return i.getMeta(Bl).redo?new Wi(t.done.addTransform(n,void 0,r,Ng(e)),t.undone,LN(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new Wi(t.done,t.undone.addTransform(n,void 0,r,Ng(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!i&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Eke(n,t.prevRanges)),c=i?mx(t.prevRanges,n.mapping):LN(n.mapping.maps[n.steps.length-1]);return new Wi(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ng(e)),Vo.empty,c,n.time,a??t.prevComposition)}else return(s=n.getMeta("rebased"))?new Wi(t.done.rebased(n,s),t.undone.rebased(n,s),mx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Wi(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),mx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Eke(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function LN(t){let e=[];return t.forEach((n,r,o,s)=>e.push(o,s)),e}function mx(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function Mke(t,e,n){let r=Ng(e),o=Bl.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let i=s.selection.resolve(s.transform.doc),a=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,r),l=new Wi(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(i).setMeta(Bl,{redo:n,historyState:l})}let gx=!1,jN=null;function Ng(t){let e=t.plugins;if(jN!=e){gx=!1,jN=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){gx=!0;break}}return gx}const Bl=new ls("history"),Tke=new ls("closeHistory");function Rke(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new vr({key:Bl,state:{init(){return new Wi(Vo.empty,Vo.empty,null,0,-1)},apply(e,n,r){return kke(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?p8:r=="historyRedo"?m8:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function h8(t,e){return(n,r)=>{let o=Bl.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=Mke(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const p8=h8(!1,!0),m8=h8(!0,!0),Oke=Ir.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>p8(t,e),redo:()=>({state:t,dispatch:e})=>m8(t,e)}},addProseMirrorPlugins(){return[Rke(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Pke=ro.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ht(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):aSe(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:i,dispatch:a})=>{var l;if(a){const{$to:c}=i.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?i.setSelection(He.create(i.doc,c.pos+1)):c.nodeAfter.isBlock?i.setSelection(ze.create(i.doc,c.pos)):i.setSelection(He.create(i.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(i.insert(u,d),i.setSelection(He.create(i.doc,u+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[LSe({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Ake=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Dke=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Ike=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Nke=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Lke=eo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[ed({find:Ake,type:this.type}),ed({find:Ike,type:this.type})]},addPasteRules(){return[oc({find:Dke,type:this.type}),oc({find:Nke,type:this.type})]}}),jke=ro.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ht(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$ke=ro.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ht(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$N=eo.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Nb(t,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),FN=/^(\d+)\.\s$/,Fke=ro.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Ht(this.options.HTMLAttributes,n),0]:["ol",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($ke.name,this.editor.getAttributes($N.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=$h({find:FN,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=$h({find:FN,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes($N.name)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),zke=ro.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Bke=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Vke=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Hke=eo.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[ed({find:Bke,type:this.type})]},addPasteRules(){return[oc({find:Vke,type:this.type})]}}),Wke=ro.create({name:"text",group:"inline"}),xMe=Ir.create({name:"starterKit",addExtensions(){var t,e,n,r,o,s,i,a,l,c,u,d,f,h,p,m,v,y;const b=[];return this.options.bold!==!1&&b.push(QCe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&b.push(KCe.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&b.push(eke.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(rke.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(ike.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(ake.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&b.push(uke.configure((i=this.options)===null||i===void 0?void 0:i.dropcursor)),this.options.gapcursor!==!1&&b.push(yke.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&b.push(bke.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(wke.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(Oke.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(Pke.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(Lke.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(jke.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&b.push(Fke.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&b.push(zke.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&b.push(Hke.configure((v=this.options)===null||v===void 0?void 0:v.strike)),this.options.text!==!1&&b.push(Wke.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}}),SMe=Ir.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.every(n=>e.updateAttributes(n,{textAlign:t})):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),_Me=eo.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),CMe=eo.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",Ht(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}});var g8={exports:{}},v8={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var nd=C;function Uke(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Gke=typeof Object.is=="function"?Object.is:Uke,Kke=nd.useState,Yke=nd.useEffect,qke=nd.useLayoutEffect,Xke=nd.useDebugValue;function Jke(t,e){var n=e(),r=Kke({inst:{value:n,getSnapshot:e}}),o=r[0].inst,s=r[1];return qke(function(){o.value=n,o.getSnapshot=e,vx(o)&&s({inst:o})},[t,n,e]),Yke(function(){return vx(o)&&s({inst:o}),t(function(){vx(o)&&s({inst:o})})},[t]),Xke(n),n}function vx(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Gke(t,n)}catch{return!0}}function Qke(t,e){return e()}var Zke=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Qke:Jke;v8.useSyncExternalStore=nd.useSyncExternalStore!==void 0?nd.useSyncExternalStore:Zke;g8.exports=v8;var e2e=g8.exports;const oa=()=>{},Sr=oa(),yx=Object,ct=t=>t===Sr,ks=t=>typeof t=="function",Pa=(t,e)=>({...t,...e}),t2e=t=>ks(t.then),Jm=new WeakMap;let n2e=0;const Bh=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let o,s;if(yx(t)===t&&!r&&n!=RegExp){if(o=Jm.get(t),o)return o;if(o=++n2e+"~",Jm.set(t,o),n==Array){for(o="@",s=0;s<t.length;s++)o+=Bh(t[s])+",";Jm.set(t,o)}if(n==yx){o="#";const i=yx.keys(t).sort();for(;!ct(s=i.pop());)ct(t[s])||(o+=s+":"+Bh(t[s])+",");Jm.set(t,o)}}else o=r?t.toJSON():e=="symbol"?t.toString():e=="string"?JSON.stringify(t):""+t;return o},Js=new WeakMap,bx={},Qm={},ZM="undefined",jb=typeof window!=ZM,tC=typeof document!=ZM,r2e=()=>jb&&typeof window.requestAnimationFrame!=ZM,y8=(t,e)=>{const n=Js.get(t);return[()=>!ct(e)&&t.get(e)||bx,r=>{if(!ct(e)){const o=t.get(e);e in Qm||(Qm[e]=o),n[5](e,Pa(o,r),o||bx)}},n[6],()=>!ct(e)&&e in Qm?Qm[e]:!ct(e)&&t.get(e)||bx]};let nC=!0;const o2e=()=>nC,[rC,oC]=jb&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[oa,oa],s2e=()=>{const t=tC&&document.visibilityState;return ct(t)||t!=="hidden"},i2e=t=>(tC&&document.addEventListener("visibilitychange",t),rC("focus",t),()=>{tC&&document.removeEventListener("visibilitychange",t),oC("focus",t)}),a2e=t=>{const e=()=>{nC=!0,t()},n=()=>{nC=!1};return rC("online",e),rC("offline",n),()=>{oC("online",e),oC("offline",n)}},l2e={isOnline:o2e,isVisible:s2e},c2e={initFocus:i2e,initReconnect:a2e},zN=!$t.useId,Vh=!jb||"Deno"in window,u2e=t=>r2e()?window.requestAnimationFrame(t):setTimeout(t,1),wx=Vh?C.useEffect:C.useLayoutEffect,xx=typeof navigator<"u"&&navigator.connection,BN=!Vh&&xx&&(["slow-2g","2g"].includes(xx.effectiveType)||xx.saveData),eT=t=>{if(ks(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?Bh(t):"",[t,e]};let d2e=0;const sC=()=>++d2e,b8=0,w8=1,x8=2,f2e=3;var of={__proto__:null,ERROR_REVALIDATE_EVENT:f2e,FOCUS_EVENT:b8,MUTATE_EVENT:x8,RECONNECT_EVENT:w8};async function S8(...t){const[e,n,r,o]=t,s=Pa({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let i=s.populateCache;const a=s.rollbackOnError;let l=s.optimisticData;const c=f=>typeof a=="function"?a(f):a!==!1,u=s.throwOnError;if(ks(n)){const f=n,h=[],p=e.keys();for(const m of p)!/^\$(inf|sub)\$/.test(m)&&f(e.get(m)._k)&&h.push(m);return Promise.all(h.map(d))}return d(n);async function d(f){const[h]=eT(f);if(!h)return;const[p,m]=y8(e,h),[v,y,b,w]=Js.get(e),S=()=>{const H=v[h];return(ks(s.revalidate)?s.revalidate(p().data,f):s.revalidate!==!1)&&(delete b[h],delete w[h],H&&H[0])?H[0](x8).then(()=>p().data):p().data};if(t.length<3)return S();let _=r,k;const M=sC();y[h]=[M,0];const T=!ct(l),P=p(),A=P.data,L=P._c,V=ct(L)?A:L;if(T&&(l=ks(l)?l(V,A):l,m({data:l,_c:V})),ks(_))try{_=_(V)}catch(H){k=H}if(_&&t2e(_))if(_=await _.catch(H=>{k=H}),M!==y[h][0]){if(k)throw k;return _}else k&&T&&c(k)&&(i=!0,m({data:V,_c:Sr}));if(i&&!k)if(ks(i)){const H=i(_,V);m({data:H,error:Sr,_c:Sr})}else m({data:_,error:Sr,_c:Sr});if(y[h][1]=sC(),Promise.resolve(S()).then(()=>{m({_c:Sr})}),k){if(u)throw k;return}return _}}const VN=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},h2e=(t,e)=>{if(!Js.has(t)){const n=Pa(c2e,e),r={},o=S8.bind(Sr,t);let s=oa;const i={},a=(u,d)=>{const f=i[u]||[];return i[u]=f,f.push(d),()=>f.splice(f.indexOf(d),1)},l=(u,d,f)=>{t.set(u,d);const h=i[u];if(h)for(const p of h)p(d,f)},c=()=>{if(!Js.has(t)&&(Js.set(t,[r,{},{},{},o,l,a]),!Vh)){const u=n.initFocus(setTimeout.bind(Sr,VN.bind(Sr,r,b8))),d=n.initReconnect(setTimeout.bind(Sr,VN.bind(Sr,r,w8)));s=()=>{u&&u(),d&&d(),Js.delete(t)}}};return c(),[t,o,c,s]}return[t,Js.get(t)[4]]},p2e=(t,e,n,r,o)=>{const s=n.errorRetryCount,i=o.retryCount,a=~~((Math.random()+.5)*(1<<(i<8?i:8)))*n.errorRetryInterval;!ct(s)&&i>s||setTimeout(r,a,o)},m2e=(t,e)=>Bh(t)==Bh(e),[_8,g2e]=h2e(new Map),v2e=Pa({onLoadingSlow:oa,onSuccess:oa,onError:oa,onErrorRetry:p2e,onDiscarded:oa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:BN?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:BN?5e3:3e3,compare:m2e,isPaused:()=>!1,cache:_8,mutate:g2e,fallback:{}},l2e),y2e=(t,e)=>{const n=Pa(t,e);if(e){const{use:r,fallback:o}=t,{use:s,fallback:i}=e;r&&s&&(n.use=r.concat(s)),o&&i&&(n.fallback=Pa(o,i))}return n},b2e=C.createContext({}),w2e="$inf$",C8=jb&&window.__SWR_DEVTOOLS_USE__,x2e=C8?window.__SWR_DEVTOOLS_USE__:[],S2e=()=>{C8&&(window.__SWR_DEVTOOLS_REACT__=$t)},_2e=t=>ks(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],C2e=()=>Pa(v2e,C.useContext(b2e)),k2e=t=>(e,n,r)=>t(e,n&&((...s)=>{const[i]=eT(e),[,,,a]=Js.get(_8);if(i.startsWith(w2e))return n(...s);const l=a[i];return ct(l)?n(...s):(delete a[i],l)}),r),E2e=x2e.concat(k2e),M2e=t=>function(...n){const r=C2e(),[o,s,i]=_2e(n),a=y2e(r,i);let l=t;const{use:c}=a,u=(c||[]).concat(E2e);for(let d=u.length;d--;)l=u[d](l);return l(o,s||a.fetcher||null,a)},T2e=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};S2e();const HN=$t.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),Sx={dedupe:!0},R2e=(t,e,n)=>{const{cache:r,compare:o,suspense:s,fallbackData:i,revalidateOnMount:a,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:f}=n,[h,p,m,v]=Js.get(r),[y,b]=eT(t),w=C.useRef(!1),S=C.useRef(!1),_=C.useRef(y),k=C.useRef(e),M=C.useRef(n),T=()=>M.current,P=()=>T().isVisible()&&T().isOnline(),[A,L,V,H]=y8(r,y),z=C.useRef({}).current,N=ct(i)?n.fallback[y]:i,D=(ie,le)=>{for(const ce in z){const ye=ce;if(ye==="data"){if(!o(ie[ye],le[ye])&&(!ct(ie[ye])||!o(B,le[ye])))return!1}else if(le[ye]!==ie[ye])return!1}return!0},F=C.useMemo(()=>{const ie=!y||!e?!1:ct(a)?T().isPaused()||s?!1:ct(l)?!0:l:a,le=ue=>{const ve=Pa(ue);return delete ve._k,ie?{isValidating:!0,isLoading:!0,...ve}:ve},ce=A(),ye=H(),xe=le(ce),Ce=ce===ye?xe:le(ye);let se=xe;return[()=>{const ue=le(A());return D(ue,se)?(se.data=ue.data,se.isLoading=ue.isLoading,se.isValidating=ue.isValidating,se.error=ue.error,se):(se=ue,ue)},()=>Ce]},[r,y]),I=e2e.useSyncExternalStore(C.useCallback(ie=>V(y,(le,ce)=>{D(ce,le)||ie()}),[r,y]),F[0],F[1]),$=!w.current,j=h[y]&&h[y].length>0,W=I.data,G=ct(W)?N:W,X=I.error,q=C.useRef(G),B=f?ct(W)?q.current:W:G,Q=j&&!ct(X)?!1:$&&!ct(a)?a:T().isPaused()?!1:s?ct(G)?!1:l:ct(G)||l,Z=!!(y&&e&&$&&Q),oe=ct(I.isValidating)?Z:I.isValidating,te=ct(I.isLoading)?Z:I.isLoading,ne=C.useCallback(async ie=>{const le=k.current;if(!y||!le||S.current||T().isPaused())return!1;let ce,ye,xe=!0;const Ce=ie||{},se=!m[y]||!Ce.dedupe,ue=()=>zN?!S.current&&y===_.current&&w.current:y===_.current,ve={isValidating:!1,isLoading:!1},Oe=()=>{L(ve)},fe=()=>{const Ie=m[y];Ie&&Ie[1]===ye&&delete m[y]},Me={isValidating:!0};ct(A().data)&&(Me.isLoading=!0);try{if(se&&(L(Me),n.loadingTimeout&&ct(A().data)&&setTimeout(()=>{xe&&ue()&&T().onLoadingSlow(y,n)},n.loadingTimeout),m[y]=[le(b),sC()]),[ce,ye]=m[y],ce=await ce,se&&setTimeout(fe,n.dedupingInterval),!m[y]||m[y][1]!==ye)return se&&ue()&&T().onDiscarded(y),!1;ve.error=Sr;const Ie=p[y];if(!ct(Ie)&&(ye<=Ie[0]||ye<=Ie[1]||Ie[1]===0))return Oe(),se&&ue()&&T().onDiscarded(y),!1;const Be=A().data;ve.data=o(Be,ce)?Be:ce,se&&ue()&&T().onSuccess(ce,y,n)}catch(Ie){fe();const Be=T(),{shouldRetryOnError:et}=Be;Be.isPaused()||(ve.error=Ie,se&&ue()&&(Be.onError(Ie,y,Be),(et===!0||ks(et)&&et(Ie))&&(!T().revalidateOnFocus||!T().revalidateOnReconnect||P())&&Be.onErrorRetry(Ie,y,Be,mt=>{const Ue=h[y];Ue&&Ue[0]&&Ue[0](of.ERROR_REVALIDATE_EVENT,mt)},{retryCount:(Ce.retryCount||0)+1,dedupe:!0})))}return xe=!1,Oe(),!0},[y,r]),pe=C.useCallback((...ie)=>S8(r,_.current,...ie),[]);if(wx(()=>{k.current=e,M.current=n,ct(W)||(q.current=W)}),wx(()=>{if(!y)return;const ie=ne.bind(Sr,Sx);let le=0;const ye=T2e(y,h,(xe,Ce={})=>{if(xe==of.FOCUS_EVENT){const se=Date.now();T().revalidateOnFocus&&se>le&&P()&&(le=se+T().focusThrottleInterval,ie())}else if(xe==of.RECONNECT_EVENT)T().revalidateOnReconnect&&P()&&ie();else{if(xe==of.MUTATE_EVENT)return ne();if(xe==of.ERROR_REVALIDATE_EVENT)return ne(Ce)}});return S.current=!1,_.current=y,w.current=!0,L({_k:b}),Q&&(ct(G)||Vh?ie():u2e(ie)),()=>{S.current=!0,ye()}},[y]),wx(()=>{let ie;function le(){const ye=ks(c)?c(A().data):c;ye&&ie!==-1&&(ie=setTimeout(ce,ye))}function ce(){!A().error&&(u||T().isVisible())&&(d||T().isOnline())?ne(Sx).then(le):le()}return le(),()=>{ie&&(clearTimeout(ie),ie=-1)}},[c,u,d,y]),C.useDebugValue(B),s&&ct(G)&&y){if(!zN&&Vh)throw new Error("Fallback data is required when using suspense in SSR.");k.current=e,M.current=n,S.current=!1;const ie=v[y];if(!ct(ie)){const le=pe(ie);HN(le)}if(ct(X)){const le=ne(Sx);ct(B)||(le.status="fulfilled",le.value=!0),HN(le)}else throw X}return{mutate:pe,get data(){return z.data=!0,B},get error(){return z.error=!0,X},get isValidating(){return z.isValidating=!0,oe},get isLoading(){return z.isLoading=!0,te}}},kMe=M2e(R2e);export{BD as $,De as A,J as B,pc as C,D2 as D,es as E,kue as F,Bu as G,Y as H,TEe as I,QEe as J,HEe as K,Q2 as L,We as M,B2e as N,EEe as O,o4 as P,AEe as Q,np as R,Ky as S,wd as T,un as U,sF as V,RF as W,Z2e as X,Uo as Y,eM as Z,FD as _,D2e as a,GB as a$,Tg as a0,lMe as a1,cMe as a2,aMe as a3,hMe as a4,dMe as a5,mf as a6,fMe as a7,Mg as a8,kl as a9,pp as aA,Po as aB,gMe as aC,vMe as aD,XEe as aE,rMe as aF,nMe as aG,tn as aH,V2 as aI,P2 as aJ,zF as aK,ut as aL,cEe as aM,Q2e as aN,VEe as aO,J2e as aP,X2e as aQ,Yy as aR,E4 as aS,nEe as aT,CEe as aU,SEe as aV,KEe as aW,GEe as aX,l2 as aY,ki as aZ,zEe as a_,iMe as aa,uMe as ab,ZEe as ac,tMe as ad,PEe as ae,sEe as af,rEe as ag,gEe as ah,vEe as ai,yEe as aj,HF as ak,hp as al,Wue as am,Ze as an,eEe as ao,BEe as ap,q2e as aq,is as ar,z0e as as,KB as at,fEe as au,mMe as av,fM as aw,lM as ax,XF as ay,uEe as az,I2e as b,oEe as b0,iEe as b1,$Ee as b2,FF as b3,tEe as b4,jEe as b5,UEe as b6,wMe as b7,xMe as b8,bMe as b9,Wa as bA,dd as bB,V2e as bC,MF as bD,U2e as bE,C4 as bF,ud as bG,kMe as bH,g2e as bI,z2e as bJ,vp as bK,mEe as bL,JEe as bM,H2e as bN,Ble as bO,L2e as bP,uZ as bQ,Ok as bR,G2e as bS,xZ as bT,$2e as bU,W2e as bV,zR as bW,_Me as ba,CMe as bb,SMe as bc,pEe as bd,KF as be,xue as bf,IEe as bg,DEe as bh,MEe as bi,hEe as bj,_Ee as bk,N2e as bl,WEe as bm,NEe as bn,J2 as bo,LEe as bp,kEe as bq,wt as br,Ye as bs,xEe as bt,qEe as bu,Uue as bv,FEe as bw,eMe as bx,pMe as by,sy as bz,F2e as c,K2e as d,o3 as e,j2e as f,_e as g,Y2e as h,dEe as i,g as j,lEe as k,aEe as l,YEe as m,wEe as n,OEe as o,REe as p,hE as q,C as r,L2 as s,pE as t,bp as u,xy as v,bEe as w,U2 as x,Xt as y,$4 as z};
