zeonailabs-reactlib 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AreaChart/AreaChart.d.ts +4 -0
- package/dist/components/BarChart/BarChart.d.ts +4 -0
- package/dist/components/LineChart/LineChart.d.ts +4 -0
- package/dist/components/ScatterChart/ScatterChart.d.ts +4 -0
- package/dist/components/chartFormat.d.ts +2 -0
- package/dist/components/chartMargin.d.ts +8 -0
- package/dist/components/chartStyles.d.ts +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -151
- package/package.json +8 -6
package/dist/index.js
CHANGED
|
@@ -1,152 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@mui/material"),require("@emotion/react"),require("@emotion/styled"),require("react-dom")):"function"==typeof define&&define.amd?define(["React","@mui/material","@emotion/react","@emotion/styled","ReactDOM"],t):"object"==typeof exports?exports.reactlib=t(require("react"),require("@mui/material"),require("@emotion/react"),require("@emotion/styled"),require("react-dom")):e.reactlib=t(e.React,e["@mui/material"],e["@emotion/react"],e["@emotion/styled"],e.ReactDOM)}(this,(e,t,n,o,r)=>(()=>{var i={9940(e,t,n){"use strict";n.d(t,{A:()=>i}),n(156);var o=n(1869),r=n(4848);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"==typeof t?e=>{return t(null==(o=e)||0===Object.keys(o).length?n:e);var o}:t;return(0,r.jsx)(o.Global,{styles:i})}},5508(e,t,n){"use strict";n.r(t),n.d(t,{GlobalStyles:()=>we.A,StyledEngineProvider:()=>xe,ThemeContext:()=>g.ThemeContext,css:()=>g.css,default:()=>_e,internal_processStyles:()=>Ce,internal_serializeStyles:()=>ke,keyframes:()=>g.keyframes});var o=n(5729),r=n.n(o),i={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function a(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var s=/[A-Z]|^ms/g,l=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},d=a(function(e){return u(e)?e:e.replace(s,"-$&").toLowerCase()}),p=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(l,function(e,t,n){return f={name:t,styles:n,next:f},t})}return 1===i[e]||u(e)||"number"!=typeof t||0===t?t:t+"px"};function h(e,t,n){if(null==n)return"";var o=n;if(void 0!==o.__emotion_styles)return o;switch(typeof n){case"boolean":return"";case"object":var r=n;if(1===r.anim)return f={name:r.name,styles:r.styles,next:f},r.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)f={name:a.name,styles:a.styles,next:f},a=a.next;return i.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=h(e,t,n[r])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?o+=i+"{"+t[s]+"}":c(s)&&(o+=d(i)+":"+p(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=h(e,t,a);switch(i){case"animation":case"animationName":o+=d(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var u=0;u<a.length;u++)c(a[u])&&(o+=d(i)+":"+p(i,a[u])+";")}return o}(e,t,n);case"function":if(void 0!==e){var s=f,l=n(e);return f=s,h(e,t,l)}}var u=n;if(null==t)return u;var m=t[u];return void 0!==m?m:u}var f,m=/label:\s*([^\s;{]+)\s*(;|$)/g,g=n(1869),v=n(156),y=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),b=Math.abs,x=String.fromCharCode,w=Object.assign;function _(e){return e.trim()}function C(e,t,n){return e.replace(t,n)}function A(e,t){return e.indexOf(t)}function k(e,t){return 0|e.charCodeAt(t)}function S(e,t,n){return e.slice(t,n)}function M(e){return e.length}function P(e){return e.length}function I(e,t){return t.push(e),e}var R=1,T=1,E=0,O=0,L=0,z="";function j(e,t,n,o,r,i,a){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:R,column:T,length:a,return:""}}function $(e,t){return w(j("",null,null,"",null,null,0),e,{length:-e.length},t)}function F(){return L=O>0?k(z,--O):0,T--,10===L&&(T=1,R--),L}function N(){return L=O<E?k(z,O++):0,T++,10===L&&(T=1,R++),L}function D(){return k(z,O)}function H(){return O}function B(e,t){return S(z,e,t)}function V(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function W(e){return R=T=1,E=M(z=e),O=0,[]}function U(e){return z="",e}function G(e){return _(B(O-1,q(91===e?e+2:40===e?e+1:e)))}function Z(e){for(;(L=D())&&L<33;)N();return V(e)>2||V(L)>3?"":" "}function K(e,t){for(;--t&&N()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return B(e,H()+(t<6&&32==D()&&32==N()))}function q(e){for(;N();)switch(L){case e:return O;case 34:case 39:34!==e&&39!==e&&q(L);break;case 40:41===e&&q(e);break;case 92:N()}return O}function X(e,t){for(;N()&&e+L!==57&&(e+L!==84||47!==D()););return"/*"+B(t,O-1)+"*"+x(47===e?e:N())}function Y(e){for(;!V(D());)N();return B(e,O)}var Q="-ms-",J="-moz-",ee="-webkit-",te="comm",ne="rule",oe="decl",re="@keyframes";function ie(e,t){for(var n="",o=P(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function ae(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case oe:return e.return=e.return||e.value;case te:return"";case re:return e.return=e.value+"{"+ie(e.children,o)+"}";case ne:e.value=e.props.join(",")}return M(n=ie(e.children,o))?e.return=e.value+"{"+n+"}":""}function se(e){return U(le("",null,null,null,[""],e=W(e),0,[0],e))}function le(e,t,n,o,r,i,a,s,l){for(var u=0,c=0,d=a,p=0,h=0,f=0,m=1,g=1,v=1,y=0,b="",w=r,_=i,S=o,P=b;g;)switch(f=y,y=N()){case 40:if(108!=f&&58==k(P,d-1)){-1!=A(P+=C(G(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:P+=G(y);break;case 9:case 10:case 13:case 32:P+=Z(f);break;case 92:P+=K(H()-1,7);continue;case 47:switch(D()){case 42:case 47:I(ce(X(N(),H()),t,n),l);break;default:P+="/"}break;case 123*m:s[u++]=M(P)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(P=C(P,/\f/g,"")),h>0&&M(P)-d&&I(h>32?de(P+";",o,n,d-1):de(C(P," ","")+";",o,n,d-2),l);break;case 59:P+=";";default:if(I(S=ue(P,t,n,u,c,r,s,b,w=[],_=[],d),i),123===y)if(0===c)le(P,t,S,S,w,i,d,s,_);else switch(99===p&&110===k(P,3)?100:p){case 100:case 108:case 109:case 115:le(e,S,S,o&&I(ue(e,S,S,0,0,r,s,b,r,w=[],d),_),r,_,d,s,o?w:_);break;default:le(P,S,S,S,[""],_,0,s,_)}}u=c=h=0,m=v=1,b=P="",d=a;break;case 58:d=1+M(P),h=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==F())continue;switch(P+=x(y),y*m){case 38:v=c>0?1:(P+="\f",-1);break;case 44:s[u++]=(M(P)-1)*v,v=1;break;case 64:45===D()&&(P+=G(N())),p=D(),c=d=M(b=P+=Y(H())),y++;break;case 45:45===f&&2==M(P)&&(m=0)}}return i}function ue(e,t,n,o,r,i,a,s,l,u,c){for(var d=r-1,p=0===r?i:[""],h=P(p),f=0,m=0,g=0;f<o;++f)for(var v=0,y=S(e,d+1,d=b(m=a[f])),x=e;v<h;++v)(x=_(m>0?p[v]+" "+y:C(y,/&\f/g,p[v])))&&(l[g++]=x);return j(e,t,n,0===r?ne:s,l,u,c)}function ce(e,t,n){return j(e,t,n,te,x(L),S(e,2,-2),0)}function de(e,t,n,o){return j(e,t,n,oe,S(e,0,o),S(e,o+1,-1),o)}var pe=function(e,t,n){for(var o=0,r=0;o=r,r=D(),38===o&&12===r&&(t[n]=1),!V(r);)N();return B(e,O)},he=new WeakMap,fe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||he.get(n))&&!o){he.set(e,!0);for(var r=[],i=function(e,t){return U(function(e,t){var n=-1,o=44;do{switch(V(o)){case 0:38===o&&12===D()&&(t[n]=1),e[n]+=pe(O-1,t,n);break;case 2:e[n]+=G(o);break;case 4:if(44===o){e[++n]=58===D()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=x(o)}}while(o=N());return e}(W(e),t))}(t,r),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=r[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},me=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ge(e,t){switch(function(e,t){return 45^k(e,0)?(((t<<2^k(e,0))<<2^k(e,1))<<2^k(e,2))<<2^k(e,3):0}(e,t)){case 5103:return ee+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ee+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ee+e+J+e+Q+e+e;case 6828:case 4268:return ee+e+Q+e+e;case 6165:return ee+e+Q+"flex-"+e+e;case 5187:return ee+e+C(e,/(\w+).+(:[^]+)/,ee+"box-$1$2"+Q+"flex-$1$2")+e;case 5443:return ee+e+Q+"flex-item-"+C(e,/flex-|-self/,"")+e;case 4675:return ee+e+Q+"flex-line-pack"+C(e,/align-content|flex-|-self/,"")+e;case 5548:return ee+e+Q+C(e,"shrink","negative")+e;case 5292:return ee+e+Q+C(e,"basis","preferred-size")+e;case 6060:return ee+"box-"+C(e,"-grow","")+ee+e+Q+C(e,"grow","positive")+e;case 4554:return ee+C(e,/([^-])(transform)/g,"$1"+ee+"$2")+e;case 6187:return C(C(C(e,/(zoom-|grab)/,ee+"$1"),/(image-set)/,ee+"$1"),e,"")+e;case 5495:case 3959:return C(e,/(image-set\([^]*)/,ee+"$1$`$1");case 4968:return C(C(e,/(.+:)(flex-)?(.*)/,ee+"box-pack:$3"+Q+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ee+e+e;case 4095:case 3583:case 4068:case 2532:return C(e,/(.+)-inline(.+)/,ee+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(M(e)-1-t>6)switch(k(e,t+1)){case 109:if(45!==k(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1"+ee+"$2-$3$1"+J+(108==k(e,t+3)?"$3":"$2-$3"))+e;case 115:return~A(e,"stretch")?ge(C(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==k(e,t+1))break;case 6444:switch(k(e,M(e)-3-(~A(e,"!important")&&10))){case 107:return C(e,":",":"+ee)+e;case 101:return C(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ee+(45===k(e,14)?"inline-":"")+"box$3$1"+ee+"$2$3$1"+Q+"$2box$3")+e}break;case 5936:switch(k(e,t+11)){case 114:return ee+e+Q+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ee+e+Q+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ee+e+Q+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ee+e+Q+e+e}return e}var ve=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case oe:e.return=ge(e.value,e.length);break;case re:return ie([$(e,{value:C(e.value,"@","@"+ee)})],o);case ne:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return ie([$(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return ie([$(e,{props:[C(t,/:(plac\w+)/,":"+ee+"input-$1")]}),$(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]}),$(e,{props:[C(t,/:(plac\w+)/,Q+"input-$1")]})],o)}return""})}}],ye=n(4848);const be=new Map;function xe(e){const{injectFirst:t,enableCssLayer:n,children:o}=e,r=v.useMemo(()=>{const e=`${t}-${n}`;if("object"==typeof document&&be.has(e))return be.get(e);const o=function(e,t){const n=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var o,r,i=e.stylisPlugins||ve,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c,d,p=[ae,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(u=[fe,me].concat(i,p),c=P(u),function(e,t,n,o){for(var r="",i=0;i<c;i++)r+=u[i](e,t,n,o)||"";return r});r=function(e,t,n,o){l=n,ie(se(e?e+"{"+t.styles+"}":t.styles),h),o&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new y({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:r};return f.sheet.hydrate(s),f}({key:"css",prepend:e});if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}(t,n);return be.set(e,o),o},[t,n]);return t||n?(0,ye.jsx)(g.CacheProvider,{value:r,children:o}):o}var we=n(9940);function _e(e,t){return r()(e,t)}const Ce=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Ae=[];function ke(e){return Ae[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";f=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=h(n,t,i)):r+=i[0];for(var a=1;a<e.length;a++)r+=h(n,t,e[a]),o&&(r+=i[a]);m.lastIndex=0;for(var s,l="";null!==(s=m.exec(r));)l+="-"+s[1];var u=function(e){for(var t,n=0,o=0,r=e.length;r>=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+l;return{name:u,styles:r,next:f}}(Ae)}},771(e,t,n){"use strict";var o=n(4994);t.X4=function(e,t){return e=s(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)},t.e$=c,t.eM=function(e,t){const n=u(e),o=u(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)},t.a=d;var r=o(n(8944)),i=o(n(8586));function a(e,t=0,n=1){return(0,i.default)(e,t,n)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.default)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,r.default)(10,o))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:o}}function l(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function u(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(function(e){e=s(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),a=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let u="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function d(e,t){if(e=s(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}},6461(e,t,n){"use strict";var o=n(4994);t.Ay=function(e={}){const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:o=f,slotShouldForwardProp:l=f}=e,c=e=>(0,u.default)((0,r.default)({},e,{theme:y((0,r.default)({},e,{defaultTheme:n,themeId:t}))}));return c.__mui_systemSx=!0,(e,u={})=>{(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:d,slot:h,skipVariantsResolver:m,skipSx:g,overridesResolver:w=b(v(h))}=u,_=(0,i.default)(u,p),C=d&&d.startsWith("Mui")||h?"components":"custom",A=void 0!==m?m:h&&"Root"!==h&&"root"!==h||!1,k=g||!1;let S=f;"Root"===h||"root"===h?S=o:h?S=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(S=void 0);const M=(0,a.default)(e,(0,r.default)({shouldForwardProp:S,label:void 0},_)),P=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?o=>{const i=y({theme:o.theme,defaultTheme:n,themeId:t});return x(e,(0,r.default)({},o,{theme:i}),i.modularCssLayers?C:void 0)}:e,I=(o,...i)=>{let a=P(o);const s=i?i.map(P):[];d&&w&&s.push(e=>{const o=y((0,r.default)({},e,{defaultTheme:n,themeId:t}));if(!o.components||!o.components[d]||!o.components[d].styleOverrides)return null;const i=o.components[d].styleOverrides,a={};return Object.entries(i).forEach(([t,n])=>{a[t]=x(n,(0,r.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),w(e,a)}),d&&!A&&s.push(e=>{var o;const i=y((0,r.default)({},e,{defaultTheme:n,themeId:t}));return x({variants:null==i||null==(o=i.components)||null==(o=o[d])?void 0:o.variants},(0,r.default)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),k||s.push(c);const l=s.length-i.length;if(Array.isArray(o)&&l>0){const e=new Array(l).fill("");a=[...o,...e],a.raw=[...o.raw,...e]}const u=M(a,...s);return e.muiName&&(u.muiName=e.muiName),u};return M.withConfig&&(I.withConfig=M.withConfig),I}};var r=o(n(4634)),i=o(n(4893)),a=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(o,i,a):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(n(5508)),s=n(4239),l=(o(n(7149)),o(n(7320)),o(n(3142))),u=o(n(3857));const c=["ownerState"],d=["variants"],p=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function m(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const g=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y({defaultTheme:e,theme:t,themeId:n}){return o=t,0===Object.keys(o).length?e:t[n]||t;var o}function b(e){return e?(t,n)=>n[e]:null}function x(e,t,n){let{ownerState:o}=t,s=(0,i.default)(t,c);const l="function"==typeof e?e((0,r.default)({ownerState:o},s)):e;if(Array.isArray(l))return l.flatMap(e=>x(e,(0,r.default)({ownerState:o},s),n));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,i.default)(l,d);return e.forEach(e=>{let i=!0;if("function"==typeof e.props?i=e.props((0,r.default)({ownerState:o},s,o)):Object.keys(e.props).forEach(t=>{(null==o?void 0:o[t])!==e.props[t]&&s[t]!==e.props[t]&&(i=!1)}),i){Array.isArray(t)||(t=[t]);const i="function"==typeof e.style?e.style((0,r.default)({ownerState:o},s,o)):e.style;t.push(n?m((0,a.internal_serializeStyles)(i),n):i)}}),t}return n?m((0,a.internal_serializeStyles)(l),n):l}},9452(e,t,n){"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>u,kW:()=>c,vf:()=>l,zu:()=>r});var o=n(1317);const r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function a(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||i;return t.reduce((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o),{})}if("object"==typeof t){const e=o.breakpoints||i;return Object.keys(t).reduce((o,i)=>{if(-1!==Object.keys(e.values||r).indexOf(i))o[e.up(i)]=n(t[i],i);else{const e=i;o[e]=t[e]}return o},{})}return n(t)}function s(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function u(e,...t){const n=s(e),r=[n,...t].reduce((e,t)=>(0,o.A)(e,t),{});return l(Object.keys(n),r)}function c({values:e,breakpoints:t,base:n}){const o=n||function(e,t){if("object"!=typeof e)return{};const n={},o=Object.keys(t);return Array.isArray(e)?o.forEach((t,o)=>{o<e.length&&(n[t]=!0)}):o.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(e,t),r=Object.keys(o);if(0===r.length)return e;let i;return r.reduce((t,n,o)=>(Array.isArray(e)?(t[n]=null!=e[o]?e[o]:e[i],i=o):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t),{})}},8336(e,t,n){"use strict";function o(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const o=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[o]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>o})},8094(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(8587),r=n(8168);const i=["values","unit","step"];function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,s=(0,o.A)(e,i),l=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,r.A)({},e,{[t.key]:t.val}),{})})(t),u=Object.keys(l);function c(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function d(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-a/100}${n})`}function p(e,o){const r=u.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==r&&"number"==typeof t[u[r]]?t[u[r]]:o)-a/100}${n})`}return(0,r.A)({keys:u,values:l,up:c,down:d,between:p,only:function(e){return u.indexOf(e)+1<u.length?p(e,u[u.indexOf(e)+1]):c(e)},not:function(e){const t=u.indexOf(e);return 0===t?c(u[1]):t===u.length-1?d(u[t]):p(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}},8749(e,t,n){"use strict";n.d(t,{A:()=>h});var o=n(8168),r=n(8587),i=n(1317),a=n(8094);const s={borderRadius:4};var l=n(8248),u=n(3571),c=n(4188),d=n(8336);const p=["breakpoints","palette","spacing","shape"],h=function(e={},...t){const{breakpoints:n={},palette:h={},spacing:f,shape:m={}}=e,g=(0,r.A)(e,p),v=(0,a.A)(n),y=function(e=8){if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(f);let b=(0,i.A)({breakpoints:v,direction:"ltr",components:{},palette:(0,o.A)({mode:"light"},h),spacing:y,shape:(0,o.A)({},s,m)},g);return b.applyStyles=d.A,b=t.reduce((e,t)=>(0,i.A)(e,t),b),b.unstable_sxConfig=(0,o.A)({},c.A,null==g?void 0:g.unstable_sxConfig),b.unstable_sx=function(e){return(0,u.A)({sx:e,theme:this})},b}},3142(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A,private_createBreakpoints:()=>r.A,unstable_applyStyles:()=>i.A});var o=n(8749),r=n(8094),i=n(8336)},4620(e,t,n){"use strict";n.d(t,{A:()=>r});var o=n(1317);const r=function(e,t){return t?(0,o.A)(e,t,{clone:!1}):e}},8248(e,t,n){"use strict";n.d(t,{LX:()=>f,MA:()=>h,_W:()=>m,Lc:()=>v,Ms:()=>y});var o=n(9452),r=n(6481),i=n(4620);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),o=a[t],r=s[n]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]})(t)),e[t])}(),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],p=[...c,...d];function h(e,t,n,o){var i;const a=null!=(i=(0,r.Yn)(e,t,!1))?i:n;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>{}}function f(e){return h(e,"spacing",8)}function m(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function g(e,t){const n=f(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce((e,o)=>(e[o]=m(t,n),e),{})}(u(n),r),a=e[n];return(0,o.NI)(e,a,i)}(e,t,r,n)).reduce(i.A,{})}function v(e){return g(e,c)}function y(e){return g(e,d)}function b(e){return g(e,p)}v.propTypes={},v.filterProps=c,y.propTypes={},y.filterProps=d,b.propTypes={},b.filterProps=p},6481(e,t,n){"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var o=n(3967),r=n(9452);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],c=i(e.theme,s)||{};return(0,r.NI)(e,u,e=>{let r=a(c,l,e);return e===r&&"string"==typeof e&&(r=a(c,l,`${t}${"default"===e?"":(0,o.A)(e)}`,e)),!1===n?r:{[n]:r}})};return u.propTypes={},u.filterProps=[t],u}},4188(e,t,n){"use strict";n.d(t,{A:()=>L});var o=n(8248),r=n(6481),i=n(4620);const a=function(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,o)=>t[o]?(0,i.A)(n,t[o](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n};var s=n(9452);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,r.Ay)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),d=u("borderTop",l),p=u("borderRight",l),h=u("borderBottom",l),f=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),x=u("outline",l),w=u("outlineColor"),_=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,o.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,o._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};_.propTypes={},_.filterProps=["borderRadius"],a(c,d,p,h,f,m,g,v,y,b,_,x,w);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,o.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,o._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};C.propTypes={},C.filterProps=["gap"];const A=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,o.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,o._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};A.propTypes={},A.filterProps=["columnGap"];const k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,o.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,o._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};function S(e,t){return"grey"===t?t:e}function M(e){return e<=1&&0!==e?100*e+"%":e}k.propTypes={},k.filterProps=["rowGap"],a(C,A,k,(0,r.Ay)({prop:"gridColumn"}),(0,r.Ay)({prop:"gridRow"}),(0,r.Ay)({prop:"gridAutoFlow"}),(0,r.Ay)({prop:"gridAutoColumns"}),(0,r.Ay)({prop:"gridAutoRows"}),(0,r.Ay)({prop:"gridTemplateColumns"}),(0,r.Ay)({prop:"gridTemplateRows"}),(0,r.Ay)({prop:"gridTemplateAreas"}),(0,r.Ay)({prop:"gridArea"})),a((0,r.Ay)({prop:"color",themeKey:"palette",transform:S}),(0,r.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:S}),(0,r.Ay)({prop:"backgroundColor",themeKey:"palette",transform:S}));const P=(0,r.Ay)({prop:"width",transform:M}),I=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o;const r=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return r?"px"!==(null==(o=e.theme)||null==(o=o.breakpoints)?void 0:o.unit)?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:M(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};I.filterProps=["maxWidth"];const R=(0,r.Ay)({prop:"minWidth",transform:M}),T=(0,r.Ay)({prop:"height",transform:M}),E=(0,r.Ay)({prop:"maxHeight",transform:M}),O=(0,r.Ay)({prop:"minHeight",transform:M}),L=((0,r.Ay)({prop:"size",cssProperty:"width",transform:M}),(0,r.Ay)({prop:"size",cssProperty:"height",transform:M}),a(P,I,R,T,E,O,(0,r.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_},color:{themeKey:"palette",transform:S},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:S},backgroundColor:{themeKey:"palette",transform:S},p:{style:o.Ms},pt:{style:o.Ms},pr:{style:o.Ms},pb:{style:o.Ms},pl:{style:o.Ms},px:{style:o.Ms},py:{style:o.Ms},padding:{style:o.Ms},paddingTop:{style:o.Ms},paddingRight:{style:o.Ms},paddingBottom:{style:o.Ms},paddingLeft:{style:o.Ms},paddingX:{style:o.Ms},paddingY:{style:o.Ms},paddingInline:{style:o.Ms},paddingInlineStart:{style:o.Ms},paddingInlineEnd:{style:o.Ms},paddingBlock:{style:o.Ms},paddingBlockStart:{style:o.Ms},paddingBlockEnd:{style:o.Ms},m:{style:o.Lc},mt:{style:o.Lc},mr:{style:o.Lc},mb:{style:o.Lc},ml:{style:o.Lc},mx:{style:o.Lc},my:{style:o.Lc},margin:{style:o.Lc},marginTop:{style:o.Lc},marginRight:{style:o.Lc},marginBottom:{style:o.Lc},marginLeft:{style:o.Lc},marginX:{style:o.Lc},marginY:{style:o.Lc},marginInline:{style:o.Lc},marginInlineStart:{style:o.Lc},marginInlineEnd:{style:o.Lc},marginBlock:{style:o.Lc},marginBlockStart:{style:o.Lc},marginBlockEnd:{style:o.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:C},rowGap:{style:k},columnGap:{style:A},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:M},maxWidth:{style:I},minWidth:{transform:M},height:{transform:M},maxHeight:{transform:M},minHeight:{transform:M},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},9599(e,t,n){"use strict";n.d(t,{A:()=>l});var o=n(8168),r=n(8587),i=n(1317),a=n(4188);const s=["sx"];function l(e){const{sx:t}=e,n=(0,r.A)(e,s),{systemProps:l,otherProps:u}=(e=>{var t,n;const o={systemProps:{},otherProps:{}},r=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{r[t]?o.systemProps[t]=e[t]:o.otherProps[t]=e[t]}),o})(n);let c;return c=Array.isArray(t)?[l,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return(0,i.Q)(n)?(0,o.A)({},l,n):l}:(0,o.A)({},l,t),(0,o.A)({},u,{sx:c})}},3857(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A,extendSxProp:()=>r.A,unstable_createStyleFunctionSx:()=>o.k,unstable_defaultSxConfig:()=>i.A});var o=n(3571),r=n(9599),i=n(4188)},3571(e,t,n){"use strict";n.d(t,{A:()=>c,k:()=>l});var o=n(3967),r=n(4620),i=n(6481),a=n(9452),s=n(4188);function l(){function e(e,t,n,r){const s={[e]:t,theme:n},l=r[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:d,style:p}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const h=(0,i.Yn)(n,c)||{};return p?p(s):(0,a.NI)(s,t,t=>{let n=(0,i.BO)(h,d,t);return t===n&&"string"==typeof t&&(n=(0,i.BO)(h,d,`${e}${"default"===t?"":(0,o.A)(t)}`,t)),!1===u?n:{[u]:n}})}return function t(n){var o;const{sx:i,theme:l={},nested:u}=n||{};if(!i)return null;const c=null!=(o=l.unstable_sxConfig)?o:s.A;function d(n){let o=n;if("function"==typeof n)o=n(l);else if("object"!=typeof n)return n;if(!o)return null;const i=(0,a.EU)(l.breakpoints),s=Object.keys(i);let d=i;return Object.keys(o).forEach(n=>{const i="function"==typeof(s=o[n])?s(l):s;var s;if(null!=i)if("object"==typeof i)if(c[n])d=(0,r.A)(d,e(n,i,l,c));else{const e=(0,a.NI)({theme:l},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?d=(0,r.A)(d,e):d[n]=t({sx:i,theme:l,nested:!0})}else d=(0,r.A)(d,e(n,i,l,c))}),!u&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,d)}:(0,a.vf)(s,d)}return Array.isArray(i)?i.map(d):d(i)}}const u=l();u.filterProps=["sx"];const c=u},2923(e,t,n){"use strict";t.A=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}(n(156)),r=n(5508);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}t.A=function(e=null){const t=o.useContext(r.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},3967(e,t,n){"use strict";n.d(t,{A:()=>r});var o=n(9453);function r(e){if("string"!=typeof e)throw new Error((0,o.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},7149(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A});var o=n(3967)},725(e,t,n){"use strict";n.d(t,{A:()=>o});const o=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},8586(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A});var o=n(725)},1317(e,t,n){"use strict";n.d(t,{A:()=>s,Q:()=>i});var o=n(8168),r=n(156);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(r.isValidElement(e)||!i(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=a(e[n])}),t}function s(e,t,n={clone:!0}){const l=n.clone?(0,o.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach(o=>{r.isValidElement(t[o])?l[o]=t[o]:i(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&i(e[o])?l[o]=s(e[o],t[o],n):n.clone?l[o]=i(t[o])?a(t[o]):t[o]:l[o]=t[o]}),l}},4239(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A,isPlainObject:()=>o.Q});var o=n(1317)},9453(e,t,n){"use strict";function o(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>o})},8944(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o.A});var o=n(9453)},7320(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var o=n(4405);const r=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t=`${e}`.match(r);return t&&t[1]||""}function a(e,t=""){return e.displayName||e.name||i(e)||t}function s(e,t,n){const o=a(t);return e.displayName||(""!==o?`${n}(${o})`:n)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return a(e,"Component");if("object"==typeof e)switch(e.$$typeof){case o.vM:return s(e,e.render,"ForwardRef");case o.lD:return s(e,e.type,"memo");default:return}}}},1081(e,t,n){"use strict";n.d(t,{A:()=>g});var o=n(1601),r=n.n(o),i=n(6314),a=n.n(i),s=n(4417),l=n.n(s),u=new URL(n(3982),n.b),c=new URL(n(6426),n.b),d=new URL(n(9927),n.b),p=a()(r()),h=l()(u),f=l()(c),m=l()(d);p.push([e.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${h});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${m});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const g=p},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);o&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},4417(e){"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},1601(e){"use strict";e.exports=function(e){return e[1]}},3481(e,t){!function(e){"use strict";function t(e){var t,n,o,r;for(n=1,o=arguments.length;n<o;n++)for(t in r=arguments[n])e[t]=r[t];return e}var n=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function o(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var o=n.call(arguments,2);return function(){return e.apply(t,o.length?o.concat(n.call(arguments)):arguments)}}var r=0;function i(e){return"_leaflet_id"in e||(e._leaflet_id=++r),e._leaflet_id}function a(e,t,n){var o,r,i,a;return a=function(){o=!1,r&&(i.apply(n,r),r=!1)},i=function(){o?r=arguments:(e.apply(n,arguments),setTimeout(a,t),o=!0)},i}function s(e,t,n){var o=t[1],r=t[0],i=o-r;return e===o&&n?e:((e-r)%i+i)%i+r}function l(){return!1}function u(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function c(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function d(e){return c(e).split(/\s+/)}function p(e,t){for(var o in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?n(e.options):{}),t)e.options[o]=t[o];return e.options}function h(e,t,n){var o=[];for(var r in e)o.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function m(e,t){return e.replace(f,function(e,n){var o=t[n];if(void 0===o)throw new Error("No value provided for variable "+e);return"function"==typeof o&&(o=o(t)),o})}var g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function v(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var x=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var _=window.requestAnimationFrame||b("RequestAnimationFrame")||w,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function A(e,t,n){if(!n||_!==w)return _.call(window,o(e,t));e.call(t)}function k(e){e&&C.call(window,e)}var S={__proto__:null,extend:t,create:n,bind:o,get lastId(){return r},stamp:i,throttle:a,wrapNum:s,falseFn:l,formatNum:u,trim:c,splitWords:d,setOptions:p,getParamString:h,template:m,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:_,cancelFn:C,requestAnimFrame:A,cancelAnimFrame:k};function M(){}M.extend=function(e){var o=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=o.__super__=this.prototype,i=n(r);for(var a in i.constructor=o,o.prototype=i,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(o[a]=this[a]);return e.statics&&t(o,e.statics),e.includes&&(function(e){if("undefined"!=typeof L&&L&&L.Mixin){e=g(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(e.includes),t.apply(null,[i].concat(e.includes))),t(i,e),delete i.statics,delete i.includes,i.options&&(i.options=r.options?n(r.options):{},t(i.options,e.options)),i._initHooks=[],i.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=i._initHooks.length;e<t;e++)i._initHooks[e].call(this)}},o},M.include=function(e){var n=this.prototype.options;return t(this.prototype,e),e.options&&(this.prototype.options=n,this.mergeOptions(e.options)),this},M.mergeOptions=function(e){return t(this.prototype.options,e),this},M.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var P={on:function(e,t,n){if("object"==typeof e)for(var o in e)this._on(o,e[o],t);else for(var r=0,i=(e=d(e)).length;r<i;r++)this._on(e[r],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var o in e)this._off(o,e[o],t);else{e=d(e);for(var r=1===arguments.length,i=0,a=e.length;i<a;i++)r?this._off(e[i]):this._off(e[i],t,n)}else delete this._events;return this},_on:function(e,t,n,o){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var r={fn:t,ctx:n};o&&(r.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(r)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var o,r,i;if(this._events&&(o=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var a=this._listens(e,t,n);if(!1!==a){var s=o[a];this._firingCount&&(s.fn=l,this._events[e]=o=o.slice()),o.splice(a,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(r=0,i=o.length;r<i;r++)o[r].fn=l;delete this._events[e]}},fire:function(e,n,o){if(!this.listens(e,o))return this;var r=t({},n,{type:e,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var i=this._events[e];if(i){this._firingCount=this._firingCount+1||1;for(var a=0,s=i.length;a<s;a++){var l=i[a],u=l.fn;l.once&&this.off(e,u,l.ctx),u.call(l.ctx||this,r)}this._firingCount--}}return o&&this._propagateEvent(r),this},listens:function(e,t,n,o){"string"!=typeof e&&console.warn('"string" type argument expected');var r=t;"function"!=typeof t&&(o=!!t,r=void 0,n=void 0);var i=this._events&&this._events[e];if(i&&i.length&&!1!==this._listens(e,r,n))return!0;if(o)for(var a in this._eventParents)if(this._eventParents[a].listens(e,t,n,o))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var o=this._events[e]||[];if(!t)return!!o.length;n===this&&(n=void 0);for(var r=0,i=o.length;r<i;r++)if(o[r].fn===t&&o[r].ctx===n)return r;return!1},once:function(e,t,n){if("object"==typeof e)for(var o in e)this._on(o,e[o],t,!0);else for(var r=0,i=(e=d(e)).length;r<i;r++)this._on(e[r],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[i(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[i(e)],this},_propagateEvent:function(e){for(var n in this._eventParents)this._eventParents[n].fire(e.type,t({layer:e.target,propagatedFrom:e.target},e),!0)}};P.addEventListener=P.on,P.removeEventListener=P.clearAllEventListeners=P.off,P.addOneTimeEventListener=P.once,P.fireEvent=P.fire,P.hasEventListeners=P.listens;var I=M.extend(P);function R(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var T=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function E(e,t,n){return e instanceof R?e:g(e)?new R(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new R(e.x,e.y):new R(e,t,n)}function O(e,t){if(e)for(var n=t?[e,t]:e,o=0,r=n.length;o<r;o++)this.extend(n[o])}function z(e,t){return!e||e instanceof O?e:new O(e,t)}function j(e,t){if(e)for(var n=t?[e,t]:e,o=0,r=n.length;o<r;o++)this.extend(n[o])}function $(e,t){return e instanceof j?e:new j(e,t)}function F(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function N(e,t,n){return e instanceof F?e:g(e)&&"object"!=typeof e[0]?3===e.length?new F(e[0],e[1],e[2]):2===e.length?new F(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new F(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new F(e,t,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(e){return this.clone()._add(E(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(E(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new R(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new R(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=T(this.x),this.y=T(this.y),this},distanceTo:function(e){var t=(e=E(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=E(e)).x===this.x&&e.y===this.y},contains:function(e){return e=E(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof R||"number"==typeof e[0]||"x"in e)t=n=E(e);else if(t=(e=z(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return E((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return E(this.min.x,this.max.y)},getTopRight:function(){return E(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e="number"==typeof e[0]||e instanceof R?E(e):z(e))instanceof O?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=z(e);var t=this.min,n=this.max,o=e.min,r=e.max,i=r.x>=t.x&&o.x<=n.x,a=r.y>=t.y&&o.y<=n.y;return i&&a},overlaps:function(e){e=z(e);var t=this.min,n=this.max,o=e.min,r=e.max,i=r.x>t.x&&o.x<n.x,a=r.y>t.y&&o.y<n.y;return i&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,o=Math.abs(t.x-n.x)*e,r=Math.abs(t.y-n.y)*e;return z(E(t.x-o,t.y-r),E(n.x+o,n.y+r))},equals:function(e){return!!e&&(e=z(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},j.prototype={extend:function(e){var t,n,o=this._southWest,r=this._northEast;if(e instanceof F)t=e,n=e;else{if(!(e instanceof j))return e?this.extend(N(e)||$(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return o||r?(o.lat=Math.min(t.lat,o.lat),o.lng=Math.min(t.lng,o.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new F(t.lat,t.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,o=Math.abs(t.lat-n.lat)*e,r=Math.abs(t.lng-n.lng)*e;return new j(new F(t.lat-o,t.lng-r),new F(n.lat+o,n.lng+r))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof F||"lat"in e?N(e):$(e);var t,n,o=this._southWest,r=this._northEast;return e instanceof j?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=o.lat&&n.lat<=r.lat&&t.lng>=o.lng&&n.lng<=r.lng},intersects:function(e){e=$(e);var t=this._southWest,n=this._northEast,o=e.getSouthWest(),r=e.getNorthEast(),i=r.lat>=t.lat&&o.lat<=n.lat,a=r.lng>=t.lng&&o.lng<=n.lng;return i&&a},overlaps:function(e){e=$(e);var t=this._southWest,n=this._northEast,o=e.getSouthWest(),r=e.getNorthEast(),i=r.lat>t.lat&&o.lat<n.lat,a=r.lng>t.lng&&o.lng<n.lng;return i&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=$(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(e,t){return!!e&&(e=N(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+u(this.lat,e)+", "+u(this.lng,e)+")"},distanceTo:function(e){return B.distance(this,N(e))},wrap:function(){return B.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return $([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var D,H={latLngToPoint:function(e,t){var n=this.projection.project(e),o=this.scale(t);return this.transformation._transform(n,o)},pointToLatLng:function(e,t){var n=this.scale(t),o=this.transformation.untransform(e,n);return this.projection.unproject(o)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new O(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?s(e.lng,this.wrapLng,!0):e.lng;return new F(this.wrapLat?s(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),o=t.lat-n.lat,r=t.lng-n.lng;if(0===o&&0===r)return e;var i=e.getSouthWest(),a=e.getNorthEast();return new j(new F(i.lat-o,i.lng-r),new F(a.lat-o,a.lng-r))}},B=t({},H,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,o=e.lat*n,r=t.lat*n,i=Math.sin((t.lat-e.lat)*n/2),a=Math.sin((t.lng-e.lng)*n/2),s=i*i+Math.cos(o)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),V=6378137,W={R:V,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,o=Math.max(Math.min(n,e.lat),-n),r=Math.sin(o*t);return new R(this.R*e.lng*t,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(e){var t=180/Math.PI;return new F((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(D=V*Math.PI,new O([-D,-D],[D,D]))};function U(e,t,n,o){if(g(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=o}function G(e,t,n,o){return new U(e,t,n,o)}U.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new R((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var Z=t({},B,{code:"EPSG:3857",projection:W,transformation:function(){var e=.5/(Math.PI*W.R);return G(e,.5,-e,.5)}()}),K=t({},Z,{code:"EPSG:900913"});function q(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function X(e,t){var n,o,r,i,a,s,l="";for(n=0,r=e.length;n<r;n++){for(o=0,i=(a=e[n]).length;o<i;o++)l+=(o?"L":"M")+(s=a[o]).x+" "+s.y;l+=t?Le.svg?"z":"x":""}return l||"M0 0"}var Y,Q=document.documentElement.style,J="ActiveXObject"in window,ee=J&&!document.addEventListener,te="msLaunchUri"in navigator&&!("documentMode"in document),ne=Oe("webkit"),oe=Oe("android"),re=Oe("android 2")||Oe("android 3"),ie=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ae=oe&&Oe("Google")&&ie<537&&!("AudioNode"in window),se=!!window.opera,le=!te&&Oe("chrome"),ue=Oe("gecko")&&!ne&&!se&&!J,ce=!le&&Oe("safari"),de=Oe("phantom"),pe="OTransition"in Q,he=0===navigator.platform.indexOf("Win"),fe=J&&"transition"in Q,me="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!re,ge="MozPerspective"in Q,ve=!window.L_DISABLE_3D&&(fe||me||ge)&&!pe&&!de,ye="undefined"!=typeof orientation||Oe("mobile"),be=ye&&ne,xe=ye&&me,we=!window.PointerEvent&&window.MSPointerEvent,_e=!(!window.PointerEvent&&!we),Ce="ontouchstart"in window||!!window.TouchEvent,Ae=!window.L_NO_TOUCH&&(Ce||_e),ke=ye&&se,Se=ye&&ue,Me=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pe=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",l,t),window.removeEventListener("testPassiveEventSupport",l,t)}catch(e){}return e}(),Ie=!!document.createElement("canvas").getContext,Re=!(!document.createElementNS||!q("svg").createSVGRect),Te=!!Re&&((Y=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Y.firstChild&&Y.firstChild.namespaceURI)),Ee=!Re&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}();function Oe(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Le={ie:J,ielt9:ee,edge:te,webkit:ne,android:oe,android23:re,androidStock:ae,opera:se,chrome:le,gecko:ue,safari:ce,phantom:de,opera12:pe,win:he,ie3d:fe,webkit3d:me,gecko3d:ge,any3d:ve,mobile:ye,mobileWebkit:be,mobileWebkit3d:xe,msPointer:we,pointer:_e,touch:Ae,touchNative:Ce,mobileOpera:ke,mobileGecko:Se,retina:Me,passiveEvents:Pe,canvas:Ie,svg:Re,vml:Ee,inlineSvg:Te,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},ze=Le.msPointer?"MSPointerDown":"pointerdown",je=Le.msPointer?"MSPointerMove":"pointermove",$e=Le.msPointer?"MSPointerUp":"pointerup",Fe=Le.msPointer?"MSPointerCancel":"pointercancel",Ne={touchstart:ze,touchmove:je,touchend:$e,touchcancel:Fe},De={touchstart:function(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&$t(t),Ze(e,t)},touchmove:Ze,touchend:Ze,touchcancel:Ze},He={},Be=!1;function Ve(e,t,n){return"touchstart"===t&&(Be||(document.addEventListener(ze,We,!0),document.addEventListener(je,Ue,!0),document.addEventListener($e,Ge,!0),document.addEventListener(Fe,Ge,!0),Be=!0)),De[t]?(n=De[t].bind(this,n),e.addEventListener(Ne[t],n,!1),n):(console.warn("wrong event specified:",t),l)}function We(e){He[e.pointerId]=e}function Ue(e){He[e.pointerId]&&(He[e.pointerId]=e)}function Ge(e){delete He[e.pointerId]}function Ze(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],He)t.touches.push(He[n]);t.changedTouches=[t],e(t)}}var Ke,qe,Xe,Ye,Qe,Je=mt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),et=mt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tt="webkitTransition"===et||"OTransition"===et?et+"End":"transitionend";function nt(e){return"string"==typeof e?document.getElementById(e):e}function ot(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var o=document.defaultView.getComputedStyle(e,null);n=o?o[t]:null}return"auto"===n?null:n}function rt(e,t,n){var o=document.createElement(e);return o.className=t||"",n&&n.appendChild(o),o}function it(e){var t=e.parentNode;t&&t.removeChild(e)}function at(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function st(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function lt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function ut(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=ht(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function ct(e,t){if(void 0!==e.classList)for(var n=d(t),o=0,r=n.length;o<r;o++)e.classList.add(n[o]);else if(!ut(e,t)){var i=ht(e);pt(e,(i?i+" ":"")+t)}}function dt(e,t){void 0!==e.classList?e.classList.remove(t):pt(e,c((" "+ht(e)+" ").replace(" "+t+" "," ")))}function pt(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function ht(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function ft(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&function(e,t){var n=!1,o="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(o)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+o+"(opacity="+t+")"}(e,t)}function mt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function gt(e,t,n){var o=t||new R(0,0);e.style[Je]=(Le.ie3d?"translate("+o.x+"px,"+o.y+"px)":"translate3d("+o.x+"px,"+o.y+"px,0)")+(n?" scale("+n+")":"")}function vt(e,t){e._leaflet_pos=t,Le.any3d?gt(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function yt(e){return e._leaflet_pos||new R(0,0)}if("onselectstart"in document)Ke=function(){Mt(window,"selectstart",$t)},qe=function(){It(window,"selectstart",$t)};else{var bt=mt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ke=function(){if(bt){var e=document.documentElement.style;Xe=e[bt],e[bt]="none"}},qe=function(){bt&&(document.documentElement.style[bt]=Xe,Xe=void 0)}}function xt(){Mt(window,"dragstart",$t)}function wt(){It(window,"dragstart",$t)}function _t(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(Ct(),Ye=e,Qe=e.style.outlineStyle,e.style.outlineStyle="none",Mt(window,"keydown",Ct))}function Ct(){Ye&&(Ye.style.outlineStyle=Qe,Ye=void 0,Qe=void 0,It(window,"keydown",Ct))}function At(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function kt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var St={__proto__:null,TRANSFORM:Je,TRANSITION:et,TRANSITION_END:tt,get:nt,getStyle:ot,create:rt,remove:it,empty:at,toFront:st,toBack:lt,hasClass:ut,addClass:ct,removeClass:dt,setClass:pt,getClass:ht,setOpacity:ft,testProp:mt,setTransform:gt,setPosition:vt,getPosition:yt,get disableTextSelection(){return Ke},get enableTextSelection(){return qe},disableImageDrag:xt,enableImageDrag:wt,preventOutline:_t,restoreOutline:Ct,getSizedParentNode:At,getScale:kt};function Mt(e,t,n,o){if(t&&"object"==typeof t)for(var r in t)Et(e,r,t[r],n);else for(var i=0,a=(t=d(t)).length;i<a;i++)Et(e,t[i],n,o);return this}var Pt="_leaflet_events";function It(e,t,n,o){if(1===arguments.length)Rt(e),delete e[Pt];else if(t&&"object"==typeof t)for(var r in t)Ot(e,r,t[r],n);else if(t=d(t),2===arguments.length)Rt(e,function(e){return-1!==v(t,e)});else for(var i=0,a=t.length;i<a;i++)Ot(e,t[i],n,o);return this}function Rt(e,t){for(var n in e[Pt]){var o=n.split(/\d/)[0];t&&!t(o)||Ot(e,o,null,null,n)}}var Tt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Et(e,t,n,o){var r=t+i(n)+(o?"_"+i(o):"");if(e[Pt]&&e[Pt][r])return this;var a=function(t){return n.call(o||e,t||window.event)},s=a;!Le.touchNative&&Le.pointer&&0===t.indexOf("touch")?a=Ve(e,t,a):Le.touch&&"dblclick"===t?a=function(e,t){e.addEventListener("dblclick",t);var n,o=0;function r(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var r=Nt(e);if(!r.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})||r.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})){var i=Date.now();i-o<=200?2===++n&&t(function(e){var t,n,o={};for(n in e)t=e[n],o[n]=t&&t.bind?t.bind(e):t;return e=o,o.type="dblclick",o.detail=2,o.isTrusted=!1,o._simulated=!0,o}(e)):n=1,o=i}}}else n=e.detail}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}(e,a):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Tt[t]||t,a,!!Le.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(a=function(t){t=t||window.event,Vt(e,t)&&s(t)},e.addEventListener(Tt[t],a,!1)):e.addEventListener(t,s,!1):e.attachEvent("on"+t,a),e[Pt]=e[Pt]||{},e[Pt][r]=a}function Ot(e,t,n,o,r){r=r||t+i(n)+(o?"_"+i(o):"");var a=e[Pt]&&e[Pt][r];if(!a)return this;!Le.touchNative&&Le.pointer&&0===t.indexOf("touch")?function(e,t,n){Ne[t]?e.removeEventListener(Ne[t],n,!1):console.warn("wrong event specified:",t)}(e,t,a):Le.touch&&"dblclick"===t?function(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}(e,a):"removeEventListener"in e?e.removeEventListener(Tt[t]||t,a,!1):e.detachEvent("on"+t,a),e[Pt][r]=null}function Lt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function zt(e){return Et(e,"wheel",Lt),this}function jt(e){return Mt(e,"mousedown touchstart dblclick contextmenu",Lt),e._leaflet_disable_click=!0,this}function $t(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Ft(e){return $t(e),Lt(e),this}function Nt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Dt(e,t){if(!t)return new R(e.clientX,e.clientY);var n=kt(t),o=n.boundingClientRect;return new R((e.clientX-o.left)/n.x-t.clientLeft,(e.clientY-o.top)/n.y-t.clientTop)}var Ht=Le.linux&&Le.chrome?window.devicePixelRatio:Le.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Bt(e){return Le.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Ht:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function Vt(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var Wt={__proto__:null,on:Mt,off:It,stopPropagation:Lt,disableScrollPropagation:zt,disableClickPropagation:jt,preventDefault:$t,stop:Ft,getPropagationPath:Nt,getMousePosition:Dt,getWheelDelta:Bt,isExternalTarget:Vt,addListener:Mt,removeListener:It},Ut=I.extend({run:function(e,t,n,o){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(o||.5,.2),this._startPos=yt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=A(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),vt(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),Gt=I.extend({options:{crs:Z,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(N(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=et&&Le.any3d&&!Le.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Mt(this._proxy,tt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,n,o){return n=void 0===n?this._zoom:this._limitZoom(n),e=this._limitCenter(N(e),n,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&!0!==o&&(void 0!==o.animate&&(o.zoom=t({animate:o.animate},o.zoom),o.pan=t({animate:o.animate,duration:o.duration},o.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,n,o.zoom):this._tryAnimatedPan(e,o.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,n,o.pan&&o.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Le.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Le.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var o=this.getZoomScale(t),r=this.getSize().divideBy(2),i=(e instanceof R?e:this.latLngToContainerPoint(e)).subtract(r).multiplyBy(1-1/o),a=this.containerPointToLatLng(r.add(i));return this.setView(a,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():$(e);var n=E(t.paddingTopLeft||t.padding||[0,0]),o=E(t.paddingBottomRight||t.padding||[0,0]),r=this.getBoundsZoom(e,!1,n.add(o));if((r="number"==typeof t.maxZoom?Math.min(t.maxZoom,r):r)===1/0)return{center:e.getCenter(),zoom:r};var i=o.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),r),s=this.project(e.getNorthEast(),r);return{center:this.unproject(a.add(s).divideBy(2).add(i),r),zoom:r}},fitBounds:function(e,t){if(!(e=$(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=E(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ut,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){ct(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){if(!1===(n=n||{}).animate||!Le.any3d)return this.setView(e,t,n);this._stop();var o=this.project(this.getCenter()),r=this.project(e),i=this.getSize(),a=this._zoom;e=N(e),t=void 0===t?a:t;var s=Math.max(i.x,i.y),l=s*this.getZoomScale(a,t),u=r.distanceTo(o)||1,c=1.42,d=2.0164;function p(e){var t=(l*l-s*s+(e?-1:1)*d*d*u*u)/(2*(e?l:s)*d*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function h(e){return(Math.exp(e)-Math.exp(-e))/2}function f(e){return(Math.exp(e)+Math.exp(-e))/2}var m=p(0);function g(e){return s*(f(m)*(h(t=m+c*e)/f(t))-h(m))/d;var t}var v=Date.now(),y=(p(1)-m)/c,b=n.duration?1e3*n.duration:1e3*y*.8;return this._moveStart(!0,n.noMoveStart),function n(){var i=(Date.now()-v)/b,l=function(e){return 1-Math.pow(1-e,1.5)}(i)*y;i<=1?(this._flyToFrame=A(n,this),this._move(this.unproject(o.add(r.subtract(o).multiplyBy(g(l)/u)),a),this.getScaleZoom(s/function(e){return s*(f(m)/f(m+c*e))}(l),a),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=$(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),o=this._limitCenter(n,this._zoom,$(e));return n.equals(o)||this.panTo(o,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=E((t=t||{}).paddingTopLeft||t.padding||[0,0]),o=E(t.paddingBottomRight||t.padding||[0,0]),r=this.project(this.getCenter()),i=this.project(e),a=this.getPixelBounds(),s=z([a.min.add(n),a.max.subtract(o)]),l=s.getSize();if(!s.contains(i)){this._enforcingBounds=!0;var u=i.subtract(s.getCenter()),c=s.extend(i).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),i=n.divideBy(2).round(),a=r.divideBy(2).round(),s=i.subtract(a);return s.x||s.y?(e.animate&&e.pan?this.panBy(s):(e.pan&&this._rawPanBy(s),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=t({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=o(this._handleGeolocationResponse,this),r=o(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,r,e):navigator.geolocation.getCurrentPosition(n,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new F(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),o=this._locateOptions;if(o.setView){var r=this.getBoundsZoom(n);this.setView(t,o.maxZoom?Math.min(r,o.maxZoom):r)}var i={latlng:t,bounds:n,timestamp:e.timestamp};for(var a in e.coords)"number"==typeof e.coords[a]&&(i[a]=e.coords[a]);this.fire("locationfound",i)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),it(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)it(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=rt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new j(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=$(e),n=E(n||[0,0]);var o=this.getZoom()||0,r=this.getMinZoom(),i=this.getMaxZoom(),a=e.getNorthWest(),s=e.getSouthEast(),l=this.getSize().subtract(n),u=z(this.project(s,o),this.project(a,o)).getSize(),c=Le.any3d?this.options.zoomSnap:1,d=l.x/u.x,p=l.y/u.y,h=t?Math.max(d,p):Math.min(d,p);return o=this.getScaleZoom(h,o),c&&(o=Math.round(o/(c/100))*(c/100),o=t?Math.ceil(o/c)*c:Math.floor(o/c)*c),Math.max(r,Math.min(i,o))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new O(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var o=n.zoom(e*n.scale(t));return isNaN(o)?1/0:o},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(N(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(E(e),t)},layerPointToLatLng:function(e){var t=E(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(N(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(N(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds($(e))},distance:function(e,t){return this.options.crs.distance(N(e),N(t))},containerPointToLayerPoint:function(e){return E(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return E(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(E(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(e)))},mouseEventToContainerPoint:function(e){return Dt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=nt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Mt(t,"scroll",this._onScroll,this),this._containerId=i(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Le.any3d,ct(e,"leaflet-container"+(Le.touch?" leaflet-touch":"")+(Le.retina?" leaflet-retina":"")+(Le.ielt9?" leaflet-oldie":"")+(Le.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ot(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),vt(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ct(e.markerPane,"leaflet-zoom-hide"),ct(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){vt(this._mapPane,new R(0,0));var o=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,n)._move(e,t)._moveEnd(r),this.fire("viewreset"),o&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,o){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),o?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){vt(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[i(this._container)]=this;var t=e?It:Mt;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Le.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=A(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,o=[],r="mouseout"===t||"mouseover"===t,a=e.target||e.srcElement,s=!1;a;){if((n=this._targets[i(a)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(t,!0)){if(r&&!Vt(a,e))break;if(o.push(n),r)break}if(a===this._container)break;a=a.parentNode}return o.length||s||r||!this.listens(t,!0)||(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&_t(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,n,o){if("click"===e.type){var r=t({},e);r.type="preclick",this._fireDOMEvent(r,r.type,o)}var i=this._findEventTargets(e,n);if(o){for(var a=[],s=0;s<o.length;s++)o[s].listens(n,!0)&&a.push(o[s]);i=a.concat(i)}if(i.length){"contextmenu"===n&&$t(e);var l=i[0],u={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?l.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(s=0;s<i.length;s++)if(i[s].fire(n,u,!0),u.originalEvent._stopped||!1===i[s].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,n))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return yt(this._mapPane)||new R(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var o=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(o)},_latLngBoundsToNewLayerBounds:function(e,t,n){var o=this._getNewPixelOrigin(n,t);return z([this.project(e.getSouthWest(),t)._subtract(o),this.project(e.getNorthWest(),t)._subtract(o),this.project(e.getSouthEast(),t)._subtract(o),this.project(e.getNorthEast(),t)._subtract(o)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var o=this.project(e,t),r=this.getSize().divideBy(2),i=new O(o.subtract(r),o.add(r)),a=this._getBoundsOffset(i,n,t);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?e:this.unproject(o.add(a),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),o=new O(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(o,t))},_getBoundsOffset:function(e,t,n){var o=z(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),r=o.min.subtract(e.min),i=o.max.subtract(e.max);return new R(this._rebound(r.x,-i.x),this._rebound(r.y,-i.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),o=Le.any3d?this.options.zoomSnap:1;return o&&(e=Math.round(e/o)*o),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){dt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=rt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=Je,n=this._proxy.style[t];gt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){it(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();gt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(t),r=this._getCenterOffset(e)._divideBy(1-1/o);return!(!0!==n.animate&&!this.getSize().contains(r)||(A(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,ct(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&dt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var Zt=M.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),o=e._controlCorners[n];return ct(t,"leaflet-control"),-1!==n.indexOf("bottom")?o.insertBefore(t,o.firstChild):o.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(it(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),Kt=function(e){return new Zt(e)};Gt.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=rt("div",t+"control-container",this._container);function o(o,r){var i=t+o+" "+t+r;e[o+r]=rt("div",i,n)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)it(this._controlCorners[e]);it(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var qt=Zt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,o){return n<o?-1:o<n?1:0}},initialize:function(e,t,n){for(var o in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[o],o);for(o in t)this._addLayer(t[o],o,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return Zt.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(i(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){ct(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(ct(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):dt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return dt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=rt("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),jt(t),zt(t);var o=this._section=rt("section",e+"-list");n&&(this._map.on("click",this.collapse,this),Mt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=rt("a",e+"-toggle",t);r.href="#",r.title="Layers",r.setAttribute("role","button"),Mt(r,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){$t(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=rt("div",e+"-base",o),this._separator=rt("div",e+"-separator",o),this._overlaysList=rt("div",e+"-overlays",o),t.appendChild(o)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&i(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(o(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;at(this._baseLayersList),at(this._overlaysList),this._layerControlInputs=[];var e,t,n,o,r=0;for(n=0;n<this._layers.length;n++)o=this._layers[n],this._addItem(o),t=t||o.overlay,e=e||!o.overlay,r+=o.overlay?0:1;return this.options.hideSingleBase&&(e=e&&r>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(i(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",o=document.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(e){var t,n=document.createElement("label"),o=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=o):t=this._createRadioElement("leaflet-base-layers_"+i(this),o),this._layerControlInputs.push(t),t.layerId=i(e.layer),Mt(t,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+e.name;var a=document.createElement("span");return n.appendChild(a),a.appendChild(t),a.appendChild(r),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,o=[],r=[];this._handlingClick=!0;for(var i=n.length-1;i>=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.checked?o.push(t):e.checked||r.push(t);for(i=0;i<r.length;i++)this._map.hasLayer(r[i])&&this._map.removeLayer(r[i]);for(i=0;i<o.length;i++)this._map.hasLayer(o[i])||this._map.addLayer(o[i]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,o=this._map.getZoom(),r=n.length-1;r>=0;r--)e=n[r],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&o<t.options.minZoom||void 0!==t.options.maxZoom&&o>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Mt(e,"click",$t),this.expand();var t=this;setTimeout(function(){It(e,"click",$t),t._preventClick=!1})}}),Xt=Zt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=rt("div",t+" leaflet-bar"),o=this.options;return this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,o,r){var i=rt("a",n,o);return i.innerHTML=e,i.href="#",i.title=t,i.setAttribute("role","button"),i.setAttribute("aria-label",t),jt(i),Mt(i,"click",Ft),Mt(i,"click",r,this),Mt(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";dt(this._zoomInButton,t),dt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(ct(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(ct(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});Gt.mergeOptions({zoomControl:!0}),Gt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Xt,this.addControl(this.zoomControl))});var Yt=Zt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=rt("div",t),o=this.options;return this._addScales(o,t+"-line",n),e.on(o.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=rt("div",t,n)),e.imperial&&(this._iScale=rt("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,o,r=3.2808399*e;r>5280?(t=r/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(o=this._getRoundNum(r),this._updateScale(this._iScale,o+" ft",o/r))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Qt=Zt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Le.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=rt("div","leaflet-control-attribution"),jt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});Gt.mergeOptions({attributionControl:!0}),Gt.addInitHook(function(){this.options.attributionControl&&(new Qt).addTo(this)});Zt.Layers=qt,Zt.Zoom=Xt,Zt.Scale=Yt,Zt.Attribution=Qt,Kt.layers=function(e,t,n){return new qt(e,t,n)},Kt.zoom=function(e){return new Xt(e)},Kt.scale=function(e){return new Yt(e)},Kt.attribution=function(e){return new Qt(e)};var Jt=M.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Jt.addTo=function(e,t){return e.addHandler(t,this),this};var en={Events:P},tn=Le.touch?"touchstart mousedown":"mousedown",nn=I.extend({options:{clickTolerance:3},initialize:function(e,t,n,o){p(this,o),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(Mt(this._dragStartTarget,tn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),It(this._dragStartTarget,tn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!ut(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)nn._dragging===this&&this.finishDrag();else if(!(nn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(nn._dragging=this,this._preventOutline&&_t(this._element),xt(),Ke(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=At(this._element);this._startPoint=new R(t.clientX,t.clientY),this._startPos=yt(this._element),this._parentScale=kt(n);var o="mousedown"===e.type;Mt(document,o?"mousemove":"touchmove",this._onMove,this),Mt(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new R(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,$t(e),this._moved||(this.fire("dragstart"),this._moved=!0,ct(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ct(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),vt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){dt(document.body,"leaflet-dragging"),this._lastTarget&&(dt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),It(document,"mousemove touchmove",this._onMove,this),It(document,"mouseup touchend touchcancel",this._onUp,this),wt(),qe();var t=this._moved&&this._moving;this._moving=!1,nn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function on(e,t,n){var o,r,i,a,s,l,u,c,d,p=[1,4,2,8];for(r=0,u=e.length;r<u;r++)e[r]._code=fn(e[r],t);for(a=0;a<4;a++){for(c=p[a],o=[],r=0,i=(u=e.length)-1;r<u;i=r++)s=e[r],l=e[i],s._code&c?l._code&c||((d=hn(l,s,c,t,n))._code=fn(d,t),o.push(d)):(l._code&c&&((d=hn(l,s,c,t,n))._code=fn(d,t),o.push(d)),o.push(s));e=o}return e}function rn(e,t){var n,o,r,i,a,s,l,u,c;if(!e||0===e.length)throw new Error("latlngs not passed");vn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var d=N([0,0]),p=$(e);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(d=an(e));var h=e.length,f=[];for(n=0;n<h;n++){var m=N(e[n]);f.push(t.project(N([m.lat-d.lat,m.lng-d.lng])))}for(s=l=u=0,n=0,o=h-1;n<h;o=n++)r=f[n],i=f[o],a=r.y*i.x-i.y*r.x,l+=(r.x+i.x)*a,u+=(r.y+i.y)*a,s+=3*a;c=0===s?f[0]:[l/s,u/s];var g=t.unproject(E(c));return N([g.lat+d.lat,g.lng+d.lng])}function an(e){for(var t=0,n=0,o=0,r=0;r<e.length;r++){var i=N(e[r]);t+=i.lat,n+=i.lng,o++}return N([t/o,n/o])}var sn,ln={__proto__:null,clipPolygon:on,polygonCenter:rn,centroid:an};function un(e,t){if(!t||!e.length)return e.slice();var n=t*t;return function(e,t){var n=e.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);o[0]=o[n-1]=1,dn(e,o,t,0,n-1);var r,i=[];for(r=0;r<n;r++)o[r]&&i.push(e[r]);return i}(e=function(e,t){for(var n=[e[0]],o=1,r=0,i=e.length;o<i;o++)mn(e[o],e[r])>t&&(n.push(e[o]),r=o);return r<i-1&&n.push(e[i-1]),n}(e,n),n)}function cn(e,t,n){return Math.sqrt(gn(e,t,n,!0))}function dn(e,t,n,o,r){var i,a,s,l=0;for(a=o+1;a<=r-1;a++)(s=gn(e[a],e[o],e[r],!0))>l&&(i=a,l=s);l>n&&(t[i]=1,dn(e,t,n,o,i),dn(e,t,n,i,r))}function pn(e,t,n,o,r){var i,a,s,l=o?sn:fn(e,n),u=fn(t,n);for(sn=u;;){if(!(l|u))return[e,t];if(l&u)return!1;s=fn(a=hn(e,t,i=l||u,n,r),n),i===l?(e=a,l=s):(t=a,u=s)}}function hn(e,t,n,o,r){var i,a,s=t.x-e.x,l=t.y-e.y,u=o.min,c=o.max;return 8&n?(i=e.x+s*(c.y-e.y)/l,a=c.y):4&n?(i=e.x+s*(u.y-e.y)/l,a=u.y):2&n?(i=c.x,a=e.y+l*(c.x-e.x)/s):1&n&&(i=u.x,a=e.y+l*(u.x-e.x)/s),new R(i,a,r)}function fn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function mn(e,t){var n=t.x-e.x,o=t.y-e.y;return n*n+o*o}function gn(e,t,n,o){var r,i=t.x,a=t.y,s=n.x-i,l=n.y-a,u=s*s+l*l;return u>0&&((r=((e.x-i)*s+(e.y-a)*l)/u)>1?(i=n.x,a=n.y):r>0&&(i+=s*r,a+=l*r)),s=e.x-i,l=e.y-a,o?s*s+l*l:new R(i,a)}function vn(e){return!g(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function yn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vn(e)}function bn(e,t){var n,o,r,i,a,s,l,u;if(!e||0===e.length)throw new Error("latlngs not passed");vn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=N([0,0]),d=$(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(c=an(e));var p=e.length,h=[];for(n=0;n<p;n++){var f=N(e[n]);h.push(t.project(N([f.lat-c.lat,f.lng-c.lng])))}for(n=0,o=0;n<p-1;n++)o+=h[n].distanceTo(h[n+1])/2;if(0===o)u=h[0];else for(n=0,i=0;n<p-1;n++)if(a=h[n],s=h[n+1],(i+=r=a.distanceTo(s))>o){l=(i-o)/r,u=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=t.unproject(E(u));return N([m.lat+c.lat,m.lng+c.lng])}var xn={__proto__:null,simplify:un,pointToSegmentDistance:cn,closestPointOnSegment:function(e,t,n){return gn(e,t,n)},clipSegment:pn,_getEdgeIntersection:hn,_getBitCode:fn,_sqClosestPointOnSegment:gn,isFlat:vn,_flat:yn,polylineCenter:bn},wn={project:function(e){return new R(e.lng,e.lat)},unproject:function(e){return new F(e.y,e.x)},bounds:new O([-180,-90],[180,90])},_n={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,o=e.lat*t,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=i*Math.sin(o),s=Math.tan(Math.PI/4-o/2)/Math.pow((1-a)/(1+a),i/2);return o=-n*Math.log(Math.max(s,1e-10)),new R(e.lng*t*n,o)},unproject:function(e){for(var t,n=180/Math.PI,o=this.R,r=this.R_MINOR/o,i=Math.sqrt(1-r*r),a=Math.exp(-e.y/o),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)t=i*Math.sin(s),t=Math.pow((1-t)/(1+t),i/2),s+=u=Math.PI/2-2*Math.atan(a*t)-s;return new F(s*n,e.x*n/o)}},Cn={__proto__:null,LonLat:wn,Mercator:_n,SphericalMercator:W},An=t({},B,{code:"EPSG:3395",projection:_n,transformation:function(){var e=.5/(Math.PI*_n.R);return G(e,.5,-e,.5)}()}),kn=t({},B,{code:"EPSG:4326",projection:wn,transformation:G(1/180,1,-1/180,.5)}),Sn=t({},H,{projection:wn,transformation:G(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,o=t.lat-e.lat;return Math.sqrt(n*n+o*o)},infinite:!0});H.Earth=B,H.EPSG3395=An,H.EPSG3857=Z,H.EPSG900913=K,H.EPSG4326=kn,H.Simple=Sn;var Mn=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[i(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[i(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",function(){t.off(n,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});Gt.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=i(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=i(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return i(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?g(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[i(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=i(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var o in this._zoomBoundLayers){var r=this._zoomBoundLayers[o].options;e=void 0===r.minZoom?e:Math.min(e,r.minZoom),t=void 0===r.maxZoom?t:Math.max(t,r.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Pn=Mn.extend({initialize:function(e,t){var n,o;if(p(this,t),this._layers={},e)for(n=0,o=e.length;n<o;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,o=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,o);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return i(e)}}),In=Pn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Pn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Pn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new j;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Rn=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var o=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(o,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(o.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),o},_setIconStyles:function(e,t){var n=this.options,o=n[t+"Size"];"number"==typeof o&&(o=[o,o]);var r=E(o),i=E("shadow"===t&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),i&&(e.style.marginLeft=-i.x+"px",e.style.marginTop=-i.y+"px"),r&&(e.style.width=r.x+"px",e.style.height=r.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Le.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});var Tn=Rn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return"string"!=typeof Tn.imagePath&&(Tn.imagePath=this._detectIconPath()),(this.options.imagePath||Tn.imagePath)+Rn.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var o=t.exec(e);return o&&o[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=rt("div","leaflet-default-icon-path",document.body),t=ot(e,"background-image")||ot(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),En=Jt.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new nn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ct(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&dt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,o=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,i=yt(t._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=z(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(i)){var u=E((Math.max(l.max.x,i.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,i.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,i.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,i.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(o);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),vt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=A(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=A(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,o=yt(t._icon),r=t._map.layerPointToLatLng(o);n&&vt(n,o),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),On=Mn.extend({options:{icon:new Tn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=N(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=N(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),o=!1;n!==this._icon&&(this._icon&&this._removeIcon(),o=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),ct(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Mt(n,"focus",this._panOnFocus,this);var r=e.icon.createShadow(this._shadow),i=!1;r!==this._shadow&&(this._removeShadow(),i=!0),r&&(ct(r,t),r.alt=""),this._shadow=r,e.opacity<1&&this._updateOpacity(),o&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&i&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&It(this._icon,"focus",this._panOnFocus,this),it(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&it(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&vt(this._icon,e),this._shadow&&vt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(ct(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),En)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new En(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&ft(this._icon,e),this._shadow&&ft(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?E(t.iconSize):E(0,0),o=t.iconAnchor?E(t.iconAnchor):E(0,0);e.panInside(this._latlng,{paddingTopLeft:o,paddingBottomRight:n.subtract(o)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Ln=Mn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),zn=Ln.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=N(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=N(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return Ln.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),o=[e+n,t+n];this._pxBounds=new O(this._point.subtract(o),this._point.add(o))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var jn=zn.extend({initialize:function(e,n,o){if("number"==typeof n&&(n=t({},o,{radius:n})),p(this,n),this._latlng=N(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new j(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:Ln.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,o=n.options.crs;if(o.distance===B.distance){var r=Math.PI/180,i=this._mRadius/B.R/r,a=n.project([t+i,e]),s=n.project([t-i,e]),l=a.add(s).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(i*r)-Math.sin(t*r)*Math.sin(u*r))/(Math.cos(t*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=i/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,e-c]).x,this._radiusY=l.y-a.y}else{var d=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});var $n=Ln.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,o=1/0,r=null,i=gn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var d=i(e,t=l[u-1],n=l[u],!0);d<o&&(o=d,r=i(e,t,n))}return r&&(r.distance=Math.sqrt(o)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=N(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new j,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return vn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=vn(e),o=0,r=e.length;o<r;o++)n?(t[o]=N(e[o]),this._bounds.extend(t[o])):t[o]=this._convertLatLngs(e[o]);return t},_project:function(){var e=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new R(e,e);this._rawPxBounds&&(this._pxBounds=new O([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var o,r,i=e[0]instanceof F,a=e.length;if(i){for(r=[],o=0;o<a;o++)r[o]=this._map.latLngToLayerPoint(e[o]),n.extend(r[o]);t.push(r)}else for(o=0;o<a;o++)this._projectLatlngs(e[o],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,o,r,i,a,s,l=this._parts;for(t=0,o=0,r=this._rings.length;t<r;t++)for(n=0,i=(s=this._rings[t]).length;n<i-1;n++)(a=pn(s[n],s[n+1],e,n,!0))&&(l[o]=l[o]||[],l[o].push(a[0]),a[1]===s[n+1]&&n!==i-2||(l[o].push(a[1]),o++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,o=e.length;n<o;n++)e[n]=un(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,o,r,i,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,i=this._parts.length;n<i;n++)for(o=0,r=(a=(s=this._parts[n]).length)-1;o<a;r=o++)if((t||0!==o)&&cn(e,s[r],s[o])<=l)return!0;return!1}});$n._flat=yn;var Fn=$n.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return rn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=$n.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof F&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){$n.prototype._setLatLngs.call(this,e),vn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new R(t,t);if(e=new O(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var o,r=0,i=this._rings.length;r<i;r++)(o=on(this._rings[r],e,!0)).length&&this._parts.push(o)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,o,r,i,a,s,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(r=0,s=this._parts.length;r<s;r++)for(i=0,a=(l=(t=this._parts[r]).length)-1;i<l;a=i++)n=t[i],o=t[a],n.y>e.y!=o.y>e.y&&e.x<(o.x-n.x)*(e.y-n.y)/(o.y-n.y)+n.x&&(u=!u);return u||$n.prototype._containsPoint.call(this,e,!0)}});var Nn=In.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,o,r=g(e)?e:e.features;if(r){for(t=0,n=r.length;t<n;t++)((o=r[t]).geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}var i=this.options;if(i.filter&&!i.filter(e))return this;var a=Dn(e,i);return a?(a.feature=Zn(e),a.defaultOptions=a.options,this.resetStyle(a),i.onEachFeature&&i.onEachFeature(e,a),this.addLayer(a)):this},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=t({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function Dn(e,t){var n,o,r,i,a="Feature"===e.type?e.geometry:e,s=a?a.coordinates:null,l=[],u=t&&t.pointToLayer,c=t&&t.coordsToLatLng||Bn;if(!s&&!a)return null;switch(a.type){case"Point":return Hn(u,e,n=c(s),t);case"MultiPoint":for(r=0,i=s.length;r<i;r++)n=c(s[r]),l.push(Hn(u,e,n,t));return new In(l);case"LineString":case"MultiLineString":return o=Vn(s,"LineString"===a.type?0:1,c),new $n(o,t);case"Polygon":case"MultiPolygon":return o=Vn(s,"Polygon"===a.type?1:2,c),new Fn(o,t);case"GeometryCollection":for(r=0,i=a.geometries.length;r<i;r++){var d=Dn({geometry:a.geometries[r],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new In(l);case"FeatureCollection":for(r=0,i=a.features.length;r<i;r++){var p=Dn(a.features[r],t);p&&l.push(p)}return new In(l);default:throw new Error("Invalid GeoJSON object.")}}function Hn(e,t,n,o){return e?e(t,n):new On(n,o&&o.markersInheritOptions&&o)}function Bn(e){return new F(e[1],e[0],e[2])}function Vn(e,t,n){for(var o,r=[],i=0,a=e.length;i<a;i++)o=t?Vn(e[i],t-1,n):(n||Bn)(e[i]),r.push(o);return r}function Wn(e,t){return void 0!==(e=N(e)).alt?[u(e.lng,t),u(e.lat,t),u(e.alt,t)]:[u(e.lng,t),u(e.lat,t)]}function Un(e,t,n,o){for(var r=[],i=0,a=e.length;i<a;i++)r.push(t?Un(e[i],vn(e[i])?0:t-1,n,o):Wn(e[i],o));return!t&&n&&r.length>0&&r.push(r[0].slice()),r}function Gn(e,n){return e.feature?t({},e.feature,{geometry:n}):Zn(n)}function Zn(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var Kn={toGeoJSON:function(e){return Gn(this,{type:"Point",coordinates:Wn(this.getLatLng(),e)})}};function qn(e,t){return new Nn(e,t)}On.include(Kn),jn.include(Kn),zn.include(Kn),$n.include({toGeoJSON:function(e){var t=!vn(this._latlngs);return Gn(this,{type:(t?"Multi":"")+"LineString",coordinates:Un(this._latlngs,t?1:0,!1,e)})}}),Fn.include({toGeoJSON:function(e){var t=!vn(this._latlngs),n=t&&!vn(this._latlngs[0]),o=Un(this._latlngs,n?2:t?1:0,!0,e);return t||(o=[o]),Gn(this,{type:(n?"Multi":"")+"Polygon",coordinates:o})}}),Pn.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),Gn(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,o=[];return this.eachLayer(function(t){if(t.toGeoJSON){var r=t.toGeoJSON(e);if(n)o.push(r.geometry);else{var i=Zn(r);"FeatureCollection"===i.type?o.push.apply(o,i.features):o.push(i)}}}),n?Gn(this,{geometries:o,type:"GeometryCollection"}):{type:"FeatureCollection",features:o}}});var Xn=qn,Yn=Mn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=$(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ct(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){it(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&st(this._image),this},bringToBack:function(){return this._map&<(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=$(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:rt("img");ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onload=o(this.fire,this,"load"),t.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;gt(this._image,n,t)},_reset:function(){var e=this._image,t=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();vt(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){ft(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Qn=Yn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:rt("video");if(ct(t,"leaflet-image-layer"),this._zoomAnimated&&ct(t,"leaflet-zoom-animated"),this.options.className&&ct(t,this.options.className),t.onselectstart=l,t.onmousemove=l,t.onloadeddata=o(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),r=[],i=0;i<n.length;i++)r.push(n[i].src);this._url=n.length>0?r:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var s=rt("source");s.src=this._url[a],t.appendChild(s)}}}});var Jn=Yn.extend({_initImage:function(){var e=this._image=this._url;ct(e,"leaflet-image-layer"),this._zoomAnimated&&ct(e,"leaflet-zoom-animated"),this.options.className&&ct(e,this.options.className),e.onselectstart=l,e.onmousemove=l}});var eo=Mn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof F||g(e))?(this._latlng=N(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&ft(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&ft(this._container,1),this.bringToFront(),this.options.interactive&&(ct(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(ft(this._container,0),this._removeTimeout=setTimeout(o(it,void 0,this._container),200)):it(this._container),this.options.interactive&&(dt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=N(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&st(this._container),this},bringToBack:function(){return this._map&<(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof In){t=null;var n=this._source._layers;for(var o in n)if(n[o]._map){t=n[o];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=E(this.options.offset),n=this._getAnchor();this._zoomAnimated?vt(this._container,e.add(n)):t=t.add(e).add(n);var o=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=o+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});Gt.include({_initOverlay:function(e,t,n,o){var r=t;return r instanceof e||(r=new e(o).setContent(t)),n&&r.setLatLng(n),r}}),Mn.include({_initOverlay:function(e,t,n,o){var r=n;return r instanceof e?(p(r,o),r._source=this):(r=t&&!o?t:new e(o,this)).setContent(n),r}});var to=eo.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,eo.prototype.openOn.call(this,e)},onAdd:function(e){eo.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ln||this._source.on("preclick",Lt))},onRemove:function(e){eo.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ln||this._source.off("preclick",Lt))},getEvents:function(){var e=eo.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=rt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=rt("div",e+"-content-wrapper",t);if(this._contentNode=rt("div",e+"-content",n),jt(t),zt(this._contentNode),Mt(t,"contextmenu",Lt),this._tipContainer=rt("div",e+"-tip-container",t),this._tip=rt("div",e+"-tip",this._tipContainer),this.options.closeButton){var o=this._closeButton=rt("a",e+"-close-button",t);o.setAttribute("role","button"),o.setAttribute("aria-label","Close popup"),o.href="#close",o.innerHTML='<span aria-hidden="true">×</span>',Mt(o,"click",function(e){$t(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var o=e.offsetHeight,r=this.options.maxHeight,i="leaflet-popup-scrolled";r&&o>r?(t.height=r+"px",ct(e,i)):dt(e,i),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();vt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ot(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,o=this._containerWidth,r=new R(this._containerLeft,-n-this._containerBottom);r._add(yt(this._container));var i=e.layerPointToContainerPoint(r),a=E(this.options.autoPanPadding),s=E(this.options.autoPanPaddingTopLeft||a),l=E(this.options.autoPanPaddingBottomRight||a),u=e.getSize(),c=0,d=0;i.x+o+l.x>u.x&&(c=i.x+o-u.x+l.x),i.x-c-s.x<0&&(c=i.x-s.x),i.y+n+l.y>u.y&&(d=i.y+n-u.y+l.y),i.y-d-s.y<0&&(d=i.y-s.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return E(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Gt.mergeOptions({closePopupOnClick:!0}),Gt.include({openPopup:function(e,t,n){return this._initOverlay(to,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Mn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(to,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof In||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Ft(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof Ln?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var no=eo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){eo.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){eo.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=eo.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=rt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+i(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,o=this._map,r=this._container,i=o.latLngToContainerPoint(o.getCenter()),a=o.layerPointToContainerPoint(e),s=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=E(this.options.offset),d=this._getAnchor();"top"===s?(t=l/2,n=u):"bottom"===s?(t=l/2,n=0):"center"===s?(t=l/2,n=u/2):"right"===s?(t=0,n=u/2):"left"===s?(t=l,n=u/2):a.x<i.x?(s="right",t=0,n=u/2):(s="left",t=l+2*(c.x+d.x),n=u/2),e=e.subtract(E(t,n,!0)).add(c).add(d),dt(r,"leaflet-tooltip-right"),dt(r,"leaflet-tooltip-left"),dt(r,"leaflet-tooltip-top"),dt(r,"leaflet-tooltip-bottom"),ct(r,"leaflet-tooltip-"+s),vt(r,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&ft(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return E(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Gt.include({openTooltip:function(e,t,n){return this._initOverlay(no,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Mn.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(no,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof In||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(Mt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),Mt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,o=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),o=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(o)}});var oo=Rn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(at(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var o=E(n.bgPos);t.style.backgroundPosition=-o.x+"px "+-o.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});Rn.Default=Tn;var ro=Mn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Le.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),it(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(st(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(lt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof R?e:new R(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,o=-e(-1/0,1/0),r=0,i=n.length;r<i;r++)t=n[r].style.zIndex,n[r]!==this._container&&t&&(o=e(o,+t));isFinite(o)&&(this.options.zIndex=o+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Le.ielt9){ft(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var o in this._tiles){var r=this._tiles[o];if(r.current&&r.loaded){var i=Math.min(1,(e-r.loaded)/200);ft(r.el,i),i<1?t=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(k(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=rt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(it(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var o=this._levels[e],r=this._map;return o||((o=this._levels[e]={}).el=rt("div","leaflet-tile-container leaflet-zoom-animated",this._container),o.el.style.zIndex=t,o.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),o.zoom=e,this._setZoomTransform(o,r.getCenter(),r.getZoom()),o.el.offsetWidth,this._onCreateLevel(o)),this._level=o,o}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var o=t.coords;this._retainParent(o.x,o.y,o.z,o.z-5)||this._retainChildren(o.x,o.y,o.z,o.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)it(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,o){var r=Math.floor(e/2),i=Math.floor(t/2),a=n-1,s=new R(+r,+i);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>o&&this._retainParent(r,i,a,o))},_retainChildren:function(e,t,n,o){for(var r=2*e;r<2*e+2;r++)for(var i=2*t;i<2*t+2;i++){var a=new R(r,i);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<o&&this._retainChildren(r,i,n+1,o))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,o){var r=Math.round(t);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var i=this.options.updateWhenZooming&&r!==this._tileZoom;o&&!i||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var o=this._map.getZoomScale(n,e.zoom),r=e.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(t,n)).round();Le.any3d?gt(e.el,r,o):vt(e.el,r)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),o=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],o).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],o).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],o).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],o).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),o=t.getZoomScale(n,this._tileZoom),r=t.project(e,this._tileZoom).floor(),i=t.getSize().divideBy(2*o);return new O(r.subtract(i),r.add(i))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var o=this._getTiledPixelBounds(e),r=this._pxBoundsToTileRange(o),i=r.getCenter(),a=[],s=this.options.keepBuffer,l=new O(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new R(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=r.min.y;d<=r.max.y;d++)for(var p=r.min.x;p<=r.max.x;p++){var h=new R(p,d);if(h.z=this._tileZoom,this._isValidTile(h)){var f=this._tiles[this._tileCoordsToKey(h)];f?f.current=!0:a.push(h)}}if(a.sort(function(e,t){return e.distanceTo(i)-t.distanceTo(i)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var o=this._tileCoordsToBounds(e);return $(this.options.bounds).overlaps(o)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),o=e.scaleBy(n),r=o.add(n);return[t.unproject(o,e.z),t.unproject(r,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new j(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new R(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(it(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){ct(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=l,e.onmousemove=l,Le.ielt9&&this.options.opacity<1&&ft(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),i=this.createTile(this._wrapCoords(e),o(this._tileReady,this,e));this._initTile(i),this.createTile.length<2&&A(o(this._tileReady,this,e,null,i)),vt(i,n),this._tiles[r]={el:i,coords:e,current:!0},t.appendChild(i),this.fire("tileloadstart",{tile:i,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(ft(n.el,0),k(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(ct(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Le.ielt9||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new R(this._wrapX?s(e.x,this._wrapX):e.x,this._wrapY?s(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new O(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});var io=ro.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&Le.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return Mt(n,"load",o(this._tileOnLoad,this,t,n)),Mt(n,"error",o(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var n={r:Le.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;this.options.tms&&(n.y=o),n["-y"]=o}return m(this._url,t(n,this.options))},_tileOnLoad:function(e,t){Le.ielt9?setTimeout(o(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var o=this.options.errorTileUrl;o&&t.getAttribute("src")!==o&&(t.src=o),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=l,t.onerror=l,!t.complete)){t.src=y;var n=this._tiles[e].coords;it(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",y),ro.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==y))return ro.prototype._tileReady.call(this,e,t,n)}});function ao(e,t){return new io(e,t)}var so=io.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e;var o=t({},this.defaultWmsParams);for(var r in n)r in this.options||(o[r]=n[r]);var i=(n=p(this,n)).detectRetina&&Le.retina?2:1,a=this.getTileSize();o.width=a.x*i,o.height=a.y*i,this.wmsParams=o},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,io.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,o=z(n.project(t[0]),n.project(t[1])),r=o.min,i=o.max,a=(this._wmsVersion>=1.3&&this._crs===kn?[r.y,r.x,i.y,i.x]:[r.x,r.y,i.x,i.y]).join(","),s=io.prototype.getTileUrl.call(this,e);return s+h(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,n){return t(this.wmsParams,e),n||this.redraw(),this}});io.WMS=so,ao.wms=function(e,t){return new so(e,t)};var lo=Mn.extend({options:{padding:.1},initialize:function(e){p(this,e),i(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ct(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t),i=o.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(e,t));Le.any3d?gt(this._container,i,n):vt(this._container,i)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new O(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),uo=lo.extend({options:{tolerance:0},getEvents:function(){var e=lo.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){lo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Mt(e,"mousemove",this._onMouseMove,this),Mt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Mt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,it(this._container),It(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){lo.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),o=Le.retina?2:1;vt(t,e.min),t.width=o*n.x,t.height=o*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Le.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){lo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[i(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,o=t.prev;n?n.prev=o:this._drawLast=o,o?o.next=n:this._drawFirst=n,delete e._order,delete this._layers[i(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,o=e.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<o.length;n++){if(t=Number(o[n]),isNaN(t))return;r.push(t)}e.options._dashArray=r}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||A(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var o=this._drawFirst;o;o=o.next)e=o.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,o,r,i,a=e._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(o=0,r=a[n].length;o<r;o++)i=a[n][o],l[o?"lineTo":"moveTo"](i.x,i.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,o=Math.max(Math.round(e._radius),1),r=(Math.max(Math.round(e._radiusY),1)||o)/o;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(t.x,t.y/r,o,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,o=this._map.mouseEventToLayerPoint(e),r=this._drawFirst;r;r=r.next)(t=r.layer).options.interactive&&t._containsPoint(o)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(dt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,r,i=this._drawFirst;i;i=i.next)(n=i.layer).options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(e),r&&(ct(this._container,"leaflet-interactive"),this._fireEvent([r],e,"mouseover"),this._hoveredLayer=r)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(o(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,o=t.prev;n&&(n.prev=o,o?o.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,o=t.prev;o&&(o.next=n,n?n.prev=o:o&&(this._drawLast=o),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function co(e){return Le.canvas?new uo(e):null}var po=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),ho={_initContainer:function(){this._container=rt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(lo.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=po("shape");ct(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=po("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[i(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;it(t),e.removeInteractiveTarget(t),delete this._layers[i(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,o=e.options,r=e._container;r.stroked=!!o.stroke,r.filled=!!o.fill,o.stroke?(t||(t=e._stroke=po("stroke")),r.appendChild(t),t.weight=o.weight+"px",t.color=o.color,t.opacity=o.opacity,o.dashArray?t.dashStyle=g(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=o.lineCap.replace("butt","flat"),t.joinstyle=o.lineJoin):t&&(r.removeChild(t),e._stroke=null),o.fill?(n||(n=e._fill=po("fill")),r.appendChild(n),n.color=o.fillColor||o.color,n.opacity=o.fillOpacity):n&&(r.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),o=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+o+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){st(e._container)},_bringToBack:function(e){lt(e._container)}},fo=Le.vml?po:q,mo=lo.extend({_initContainer:function(){this._container=fo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){it(this._container),It(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){lo.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),vt(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=fo("path");e.options.className&&ct(t,e.options.className),e.options.interactive&&ct(t,"leaflet-interactive"),this._updateStyle(e),this._layers[i(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){it(e._path),e.removeInteractiveTarget(e._path),delete this._layers[i(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,X(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),o="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",r=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+o+2*n+",0 "+o+2*-n+",0 ";this._setPath(e,r)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){st(e._path)},_bringToBack:function(e){lt(e._path)}});function go(e){return Le.svg||Le.vml?new mo(e):null}Le.vml&&mo.include(ho),Gt.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&co(e)||go(e)}});var vo=Fn.extend({initialize:function(e,t){Fn.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=$(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});mo.create=fo,mo.pointsToPath=X,Nn.geometryToLayer=Dn,Nn.coordsToLatLng=Bn,Nn.coordsToLatLngs=Vn,Nn.latLngToCoords=Wn,Nn.latLngsToCoords=Un,Nn.getFeature=Gn,Nn.asFeature=Zn,Gt.mergeOptions({boxZoom:!0});var yo=Jt.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Mt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){It(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){it(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),Ke(),xt(),this._startPoint=this._map.mouseEventToContainerPoint(e),Mt(document,{contextmenu:Ft,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=rt("div","leaflet-zoom-box",this._container),ct(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new O(this._point,this._startPoint),n=t.getSize();vt(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(it(this._box),dt(this._container,"leaflet-crosshair")),qe(),wt(),It(document,{contextmenu:Ft,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var t=new j(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Gt.addInitHook("addHandler","boxZoom",yo),Gt.mergeOptions({doubleClickZoom:!0});var bo=Jt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),o=t.options.zoomDelta,r=e.originalEvent.shiftKey?n-o:n+o;"center"===t.options.doubleClickZoom?t.setZoom(r):t.setZoomAround(e.containerPoint,r)}});Gt.addInitHook("addHandler","doubleClickZoom",bo),Gt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var xo=Jt.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new nn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}ct(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){dt(this._map._container,"leaflet-grab"),dt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=$(this._map.options.maxBounds);this._offsetLimit=z(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,r=(o-t+n)%e+t-n,i=(o+t+n)%e-t-n,a=Math.abs(r+n)<Math.abs(i+n)?r:i;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,n=t.options,o=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),o)t.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),i=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=r.multiplyBy(a/i),l=s.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),d=u/(n.inertiaDeceleration*a),p=c.multiplyBy(-d/2).round();p.x||p.y?(p=t._limitOffset(p,t.options.maxBounds),A(function(){t.panBy(p,{duration:d,easeLinearity:a,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});Gt.addInitHook("addHandler","dragging",xo),Gt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wo=Jt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),Mt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),It(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,o=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(o,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,o=this._panKeys={},r=this.keyCodes;for(t=0,n=r.left.length;t<n;t++)o[r.left[t]]=[-1*e,0];for(t=0,n=r.right.length;t<n;t++)o[r.right[t]]=[e,0];for(t=0,n=r.down.length;t<n;t++)o[r.down[t]]=[0,e];for(t=0,n=r.up.length;t<n;t++)o[r.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,o=this._zoomKeys={},r=this.keyCodes;for(t=0,n=r.zoomIn.length;t<n;t++)o[r.zoomIn[t]]=e;for(t=0,n=r.zoomOut.length;t<n;t++)o[r.zoomOut[t]]=-e},_addHooks:function(){Mt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){It(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,o=this._map;if(n in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=E(t).multiplyBy(3)),o.options.maxBounds&&(t=o._limitOffset(E(t),o.options.maxBounds)),o.options.worldCopyJump){var r=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(t)));o.panTo(r)}else o.panBy(t)}else if(n in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Ft(e)}}});Gt.addInitHook("addHandler","keyboard",wo),Gt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var _o=Jt.extend({addHooks:function(){Mt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){It(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=Bt(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),r),Ft(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var o=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,i=n?Math.ceil(r/n)*n:r,a=e._limitZoom(t+(this._delta>0?i:-i))-t;this._delta=0,this._startTime=null,a&&("center"===e.options.scrollWheelZoom?e.setZoom(t+a):e.setZoomAround(this._lastMousePos,t+a))}});Gt.addInitHook("addHandler","scrollWheelZoom",_o);Gt.mergeOptions({tapHold:Le.touchNative&&Le.safari&&Le.mobile,tapTolerance:15});var Co=Jt.extend({addHooks:function(){Mt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){It(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new R(t.clientX,t.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Mt(document,"touchend",$t),Mt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),600),Mt(document,"touchend touchcancel contextmenu",this._cancel,this),Mt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){It(document,"touchend",$t),It(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),It(document,"touchend touchcancel contextmenu",this._cancel,this),It(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new R(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});Gt.addInitHook("addHandler","tapHold",Co),Gt.mergeOptions({touchZoom:Le.touch,bounceAtZoomLimits:!0});var Ao=Jt.extend({addHooks:function(){ct(this._map._container,"leaflet-touch-zoom"),Mt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){dt(this._map._container,"leaflet-touch-zoom"),It(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),o=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(o)._divideBy(2))),this._startDist=n.distanceTo(o),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),Mt(document,"touchmove",this._onTouchMove,this),Mt(document,"touchend touchcancel",this._onTouchEnd,this),$t(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),i=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(i,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&i<1||this._zoom>t.getMaxZoom()&&i>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===i)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===i&&0===a.x&&0===a.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var s=o(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=A(s,this,!0),$t(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),It(document,"touchmove",this._onTouchMove,this),It(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Gt.addInitHook("addHandler","touchZoom",Ao),Gt.BoxZoom=yo,Gt.DoubleClickZoom=bo,Gt.Drag=xo,Gt.Keyboard=wo,Gt.ScrollWheelZoom=_o,Gt.TapHold=Co,Gt.TouchZoom=Ao,e.Bounds=O,e.Browser=Le,e.CRS=H,e.Canvas=uo,e.Circle=jn,e.CircleMarker=zn,e.Class=M,e.Control=Zt,e.DivIcon=oo,e.DivOverlay=eo,e.DomEvent=Wt,e.DomUtil=St,e.Draggable=nn,e.Evented=I,e.FeatureGroup=In,e.GeoJSON=Nn,e.GridLayer=ro,e.Handler=Jt,e.Icon=Rn,e.ImageOverlay=Yn,e.LatLng=F,e.LatLngBounds=j,e.Layer=Mn,e.LayerGroup=Pn,e.LineUtil=xn,e.Map=Gt,e.Marker=On,e.Mixin=en,e.Path=Ln,e.Point=R,e.PolyUtil=ln,e.Polygon=Fn,e.Polyline=$n,e.Popup=to,e.PosAnimation=Ut,e.Projection=Cn,e.Rectangle=vo,e.Renderer=lo,e.SVG=mo,e.SVGOverlay=Jn,e.TileLayer=io,e.Tooltip=no,e.Transformation=U,e.Util=S,e.VideoOverlay=Qn,e.bind=o,e.bounds=z,e.canvas=co,e.circle=function(e,t,n){return new jn(e,t,n)},e.circleMarker=function(e,t){return new zn(e,t)},e.control=Kt,e.divIcon=function(e){return new oo(e)},e.extend=t,e.featureGroup=function(e,t){return new In(e,t)},e.geoJSON=qn,e.geoJson=Xn,e.gridLayer=function(e){return new ro(e)},e.icon=function(e){return new Rn(e)},e.imageOverlay=function(e,t,n){return new Yn(e,t,n)},e.latLng=N,e.latLngBounds=$,e.layerGroup=function(e,t){return new Pn(e,t)},e.map=function(e,t){return new Gt(e,t)},e.marker=function(e,t){return new On(e,t)},e.point=E,e.polygon=function(e,t){return new Fn(e,t)},e.polyline=function(e,t){return new $n(e,t)},e.popup=function(e,t){return new to(e,t)},e.rectangle=function(e,t){return new vo(e,t)},e.setOptions=p,e.stamp=i,e.svg=go,e.svgOverlay=function(e,t,n){return new Jn(e,t,n)},e.tileLayer=ao,e.tooltip=function(e,t){return new no(e,t)},e.transformation=G,e.version="1.9.4",e.videoOverlay=function(e,t,n){return new Qn(e,t,n)};var ko=window.L;e.noConflict=function(){return window.L=ko,this},window.L=e}(t)},2694(e,t,n){"use strict";var o=n(6925);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4405(e,t){"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.consumer"),Symbol.for("react.context");var n=Symbol.for("react.forward_ref"),o=(Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"));Symbol.for("react.lazy"),Symbol.for("react.view_transition"),Symbol.for("react.client.reference");t.vM=n,t.lD=o},1020(e,t,n){"use strict";var o=n(156),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var o,i={},u=null,c=null;for(o in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,o)&&!l.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:u,ref:c,props:i,_owner:s.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},4848(e,t,n){"use strict";e.exports=n(1020)},5072(e){"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var i={},a=[],s=0;s<e.length;s++){var l=e[s],u=o.base?l[0]+o.base:l[0],c=i[u]||0,d="".concat(u," ").concat(c);i[u]=c+1;var p=n(d),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var f=r(h,o);o.byIndex=s,t.splice(s,0,{identifier:d,updater:f,references:1})}a.push(d)}return a}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var l=o(e,r),u=0;u<i.length;u++){var c=n(i[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=l}}},7659(e){"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},6426(e,t,n){"use strict";e.exports=n.p+"8f2c4d11474275fbc161.png"},3982(e,t,n){"use strict";e.exports=n.p+"416d91365b44e4b4f477.png"},9927(e,t,n){"use strict";e.exports=n.p+"2b3e1faf89f94a483539.png"},1869(e){"use strict";e.exports=n},5729(e){"use strict";e.exports=o},4823(e){"use strict";e.exports=t},156(t){"use strict";t.exports=e},9318(e){"use strict";e.exports=r},4634(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4893(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},8168(e,t,n){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(null,arguments)}n.d(t,{A:()=>o})},8587(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}n.d(t,{A:()=>o})}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,exports:{}};return i[e].call(n.exports,n,n.exports,s),n.exports}s.m=i,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),s.b="undefined"!=typeof document&&document.baseURI||self.location.href,s.nc=void 0;var l={};return(()=>{"use strict";s.r(l),s.d(l,{ActivityFeed:()=>Ly,AreaChart:()=>A$,BarChart:()=>Bv,Button:()=>r,DataTable:()=>$j,DonutChart:()=>_y,GeoPoints:()=>C$,KpiStatsCard:()=>Py,LineChart:()=>Og,ScatterChart:()=>fv,formatRelativeTime:()=>Oy});var e=s(156),t=s.n(e),n=s(4823),o=s(4848);const r=({children:e,loading:t=!1,disabled:r,variant:i="contained",startIcon:a,...s})=>(0,o.jsx)(n.Button,{variant:i,disabled:r||t,startIcon:t?(0,o.jsx)(n.CircularProgress,{size:16,color:"inherit"}):a,...s,children:e});var i=s(8168);function a(e,t){const n=(0,i.A)({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=(0,i.A)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const r=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?r&&Object.keys(r)?(n[o]=(0,i.A)({},s),Object.keys(r).forEach(e=>{n[o][e]=a(r[e],s[e])})):n[o]=s:n[o]=r}else void 0===n[o]&&(n[o]=e[o])}),n}var u=s(8749),c=s(1869);const d=(0,u.A)(),p=function(t=d){return function(t=null){const n=e.useContext(c.ThemeContext);return n&&(o=n,0!==Object.keys(o).length)?n:t;var o}(t)};function h({props:e,name:t,defaultTheme:n,themeId:o}){let r=p(n);o&&(r=r[o]||r);const i=function(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?a(t.components[n].defaultProps,o):o}({theme:r,name:t,props:e});return i}var f=s(8587),m=s(9453),g=s(1317),v=s(4188),y=s(3571);function b(e,t){return(0,i.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var x=s(771);const w={black:"#000",white:"#fff"},_={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},C="#f3e5f5",A="#ce93d8",k="#ba68c8",S="#ab47bc",M="#9c27b0",P="#7b1fa2",I="#e57373",R="#ef5350",T="#f44336",E="#d32f2f",O="#c62828",L="#ffb74d",z="#ffa726",j="#ff9800",$="#f57c00",F="#e65100",N="#e3f2fd",D="#90caf9",H="#42a5f5",B="#1976d2",V="#1565c0",W="#4fc3f7",U="#29b6f6",G="#03a9f4",Z="#0288d1",K="#01579b",q="#81c784",X="#66bb6a",Y="#4caf50",Q="#388e3c",J="#2e7d32",ee="#1b5e20",te=["mode","contrastThreshold","tonalOffset"],ne={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:w.white,default:w.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},oe={text:{primary:w.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:w.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function re(e,t,n,o){const r=o.light||o,i=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,x.a)(e.main,r):"dark"===t&&(e.dark=(0,x.e$)(e.main,i)))}const ie=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function ae(e){return Math.round(1e5*e)/1e5}const se={textTransform:"uppercase"},le='"Roboto", "Helvetica", "Arial", sans-serif';function ue(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=le,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:l=500,fontWeightBold:u=700,htmlFontSize:c=16,allVariants:d,pxToRem:p}=n,h=(0,f.A)(n,ie),m=r/14,v=p||(e=>e/c*m+"rem"),y=(e,t,n,r,a)=>(0,i.A)({fontFamily:o,fontWeight:e,fontSize:v(t),lineHeight:n},o===le?{letterSpacing:`${ae(r/t)}em`}:{},a,d),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(l,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(l,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(l,14,1.75,.4,se),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,se),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,g.A)((0,i.A)({htmlFontSize:c,pxToRem:v,fontFamily:o,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:l,fontWeightBold:u},b),h,{clone:!1})}function ce(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const de=["none",ce(0,2,1,-1,0,1,1,0,0,1,3,0),ce(0,3,1,-2,0,2,2,0,0,1,5,0),ce(0,3,3,-2,0,3,4,0,0,1,8,0),ce(0,2,4,-1,0,4,5,0,0,1,10,0),ce(0,3,5,-1,0,5,8,0,0,1,14,0),ce(0,3,5,-1,0,6,10,0,0,1,18,0),ce(0,4,5,-2,0,7,10,1,0,2,16,1),ce(0,5,5,-3,0,8,10,1,0,3,14,2),ce(0,5,6,-3,0,9,12,1,0,3,16,2),ce(0,6,6,-3,0,10,14,1,0,4,18,3),ce(0,6,7,-4,0,11,15,1,0,4,20,3),ce(0,7,8,-4,0,12,17,2,0,5,22,4),ce(0,7,8,-4,0,13,19,2,0,5,24,4),ce(0,7,9,-4,0,14,21,2,0,5,26,4),ce(0,8,9,-5,0,15,22,2,0,6,28,5),ce(0,8,10,-5,0,16,24,2,0,6,30,5),ce(0,8,11,-5,0,17,26,2,0,6,32,5),ce(0,9,11,-5,0,18,28,2,0,7,34,6),ce(0,9,12,-6,0,19,29,2,0,7,36,6),ce(0,10,13,-6,0,20,31,3,0,8,38,7),ce(0,10,13,-6,0,21,33,3,0,8,40,7),ce(0,10,14,-6,0,22,35,3,0,8,42,7),ce(0,11,14,-7,0,23,36,3,0,9,44,8),ce(0,11,15,-7,0,24,38,3,0,9,46,8)],pe=["duration","easing","delay"],he={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},fe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function me(e){return`${Math.round(e)}ms`}function ge(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function ve(e){const t=(0,i.A)({},he,e.easing),n=(0,i.A)({},fe,e.duration);return(0,i.A)({getAutoHeightDuration:ge,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:a=0}=o;return(0,f.A)(o,pe),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof r?r:me(r)} ${i} ${"string"==typeof a?a:me(a)}`).join(",")}},e,{easing:t,duration:n})}const ye={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},be=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const xe=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:a={}}=e,s=(0,f.A)(e,be);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,m.A)(18));const l=function(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=(0,f.A)(e,te),a=e.primary||function(e="light"){return"dark"===e?{main:D,light:N,dark:H}:{main:B,light:H,dark:V}}(t),s=e.secondary||function(e="light"){return"dark"===e?{main:A,light:C,dark:S}:{main:M,light:k,dark:P}}(t),l=e.error||function(e="light"){return"dark"===e?{main:T,light:I,dark:E}:{main:E,light:R,dark:O}}(t),u=e.info||function(e="light"){return"dark"===e?{main:U,light:W,dark:Z}:{main:Z,light:G,dark:K}}(t),c=e.success||function(e="light"){return"dark"===e?{main:X,light:q,dark:Q}:{main:J,light:Y,dark:ee}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:z,light:L,dark:$}:{main:"#ed6c02",light:j,dark:F}}(t);function p(e){return(0,x.eM)(e,oe.text.primary)>=n?oe.text.primary:ne.text.primary}const h=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:a=700})=>{if(!(e=(0,i.A)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,m.A)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,m.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return re(e,"light",r,o),re(e,"dark",a,o),e.contrastText||(e.contrastText=p(e.main)),e},v={dark:oe,light:ne};return(0,g.A)((0,i.A)({common:(0,i.A)({},w),mode:t,primary:h({color:a,name:"primary"}),secondary:h({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:l,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:u,name:"info"}),success:h({color:c,name:"success"}),grey:_,contrastThreshold:n,getContrastText:p,augmentColor:h,tonalOffset:o},v[t]),r)}(o),c=(0,u.A)(e);let d=(0,g.A)(c,{mixins:b(c.breakpoints,n),palette:l,shadows:de.slice(),typography:ue(l,a),transitions:ve(r),zIndex:(0,i.A)({},ye)});return d=(0,g.A)(d,s),d=t.reduce((e,t)=>(0,g.A)(e,t),d),d.unstable_sxConfig=(0,i.A)({},v.A,null==s?void 0:s.unstable_sxConfig),d.unstable_sx=function(e){return(0,y.A)({sx:e,theme:this})},d}(),we="$$material";function _e({props:e,name:t}){return h({props:e,name:t,defaultTheme:xe,themeId:we})}function Ce(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ae(e){return function(){return e}}function ke(e){this._context=e}function Se(e){return new ke(e)}Object.defineProperty(Ce,"name",{value:"default",configurable:!0}),Array.prototype.slice,Object.defineProperty(Ae,"name",{value:"default",configurable:!0}),Object.defineProperty(Se,"name",{value:"default",configurable:!0}),ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};const Me=Math.PI,Pe=2*Me,Ie=1e-6,Re=Pe-Ie;function Te(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Ee{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Te:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Te;const n=10**t;return function(e){this._+=e[0];for(let t=1,o=e.length;t<o;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,o){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+o}`}bezierCurveTo(e,t,n,o,r,i){this._append`C${+e},${+t},${+n},${+o},${this._x1=+r},${this._y1=+i}`}arcTo(e,t,n,o,r){if(e=+e,t=+t,n=+n,o=+o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let i=this._x1,a=this._y1,s=n-e,l=o-t,u=i-e,c=a-t,d=u*u+c*c;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Ie)if(Math.abs(c*s-l*u)>Ie&&r){let p=n-i,h=o-a,f=s*s+l*l,m=p*p+h*h,g=Math.sqrt(f),v=Math.sqrt(d),y=r*Math.tan((Me-Math.acos((f+d-m)/(2*g*v)))/2),b=y/v,x=y/g;Math.abs(b-1)>Ie&&this._append`L${e+b*u},${t+b*c}`,this._append`A${r},${r},0,0,${+(c*p>u*h)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,o,r,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(o),s=n*Math.sin(o),l=e+a,u=t+s,c=1^i,d=i?o-r:r-o;null===this._x1?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ie||Math.abs(this._y1-u)>Ie)&&this._append`L${l},${u}`,n&&(d<0&&(d=d%Pe+Pe),d>Re?this._append`A${n},${n},0,1,${c},${e-a},${t-s}A${n},${n},0,1,${c},${this._x1=l},${this._y1=u}`:d>Ie&&this._append`A${n},${n},0,${+(d>=Me)},${c},${this._x1=e+n*Math.cos(r)},${this._y1=t+n*Math.sin(r)}`)}rect(e,t,n,o){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+o}h${-n}Z`}toString(){return this._}}function Oe(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ee(t)}function Le(e){return e[0]}function ze(e){return e[1]}function je(e,t){var n=Ae(!0),o=null,r=Se,i=null,a=Oe(s);function s(s){var l,u,c,d=(s=Ce(s)).length,p=!1;for(null==o&&(i=r(c=a())),l=0;l<=d;++l)!(l<d&&n(u=s[l],l,s))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(u,l,s),+t(u,l,s));if(c)return i=null,c+""||null}return e="function"==typeof e?e:void 0===e?Le:Ae(e),t="function"==typeof t?t:void 0===t?ze:Ae(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:Ae(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:Ae(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:Ae(!!e),s):n},s.curve=function(e){return arguments.length?(r=e,null!=o&&(i=r(o)),s):r},s.context=function(e){return arguments.length?(null==e?o=i=null:i=r(o=e),s):o},s}function $e(e,t,n){var o=null,r=Ae(!0),i=null,a=Se,s=null,l=Oe(u);function u(u){var c,d,p,h,f,m=(u=Ce(u)).length,g=!1,v=new Array(m),y=new Array(m);for(null==i&&(s=a(f=l())),c=0;c<=m;++c){if(!(c<m&&r(h=u[c],c,u))===g)if(g=!g)d=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=c-1;p>=d;--p)s.point(v[p],y[p]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+e(h,c,u),y[c]=+t(h,c,u),s.point(o?+o(h,c,u):v[c],n?+n(h,c,u):y[c]))}if(f)return s=null,f+""||null}function c(){return je().defined(r).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?Le:Ae(+e),t="function"==typeof t?t:Ae(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?ze:Ae(+n),u.x=function(t){return arguments.length?(e="function"==typeof t?t:Ae(+t),o=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:Ae(+t),u):e},u.x1=function(e){return arguments.length?(o=null==e?null:"function"==typeof e?e:Ae(+e),u):o},u.y=function(e){return arguments.length?(t="function"==typeof e?e:Ae(+e),n=null,u):t},u.y0=function(e){return arguments.length?(t="function"==typeof e?e:Ae(+e),u):t},u.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Ae(+e),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(o).y(t)},u.defined=function(e){return arguments.length?(r="function"==typeof e?e:Ae(!!e),u):r},u.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),u):a},u.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),u):i},u}Object.defineProperty(je,"name",{value:"default",configurable:!0}),Object.defineProperty($e,"name",{value:"default",configurable:!0});const Fe=e.createContext({isInitialized:!1,data:{xAxis:{},yAxis:{},xAxisIds:[],yAxisIds:[]}}),Ne=()=>{const{data:t}=e.useContext(Fe);return t};function De(e,t,n=void 0){const o={};return Object.keys(e).forEach(r=>{o[r]=e[r].reduce((e,o)=>{if(o){const r=t(o);""!==r&&e.push(r),n&&n[o]&&e.push(n[o])}return e},[]).join(" ")}),o}function He(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Be(...t){return e.useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{He(t,e)})},t)}const Ve=function(e){return"string"==typeof e},We=function(e,t,n){return void 0===e||Ve(e)?t:(0,i.A)({},t,{ownerState:(0,i.A)({},t.ownerState,n)})};function Ue(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ue(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const Ge=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ue(e))&&(o&&(o+=" "),o+=t);return o},Ze=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n},Ke=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},qe=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"],Xe=function(e){var t;const{elementType:n,externalSlotProps:o,ownerState:r,skipResolvingSlotProps:a=!1}=e,s=(0,f.A)(e,qe),l=a?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(o,r),{props:u,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:o,externalForwardedProps:r,className:a}=e;if(!t){const e=Ge(null==n?void 0:n.className,a,null==r?void 0:r.className,null==o?void 0:o.className),t=(0,i.A)({},null==n?void 0:n.style,null==r?void 0:r.style,null==o?void 0:o.style),s=(0,i.A)({},n,r,o);return e.length>0&&(s.className=e),Object.keys(t).length>0&&(s.style=t),{props:s,internalRef:void 0}}const s=Ze((0,i.A)({},r,o)),l=Ke(o),u=Ke(r),c=t(s),d=Ge(null==c?void 0:c.className,null==n?void 0:n.className,a,null==r?void 0:r.className,null==o?void 0:o.className),p=(0,i.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==r?void 0:r.style,null==o?void 0:o.style),h=(0,i.A)({},c,n,u,l);return d.length>0&&(h.className=d),Object.keys(p).length>0&&(h.style=p),{props:h,internalRef:c.ref}}((0,i.A)({},s,{externalSlotProps:l})),d=Be(c,null==l?void 0:l.ref,null==(t=e.additionalProps)?void 0:t.ref);return We(n,(0,i.A)({},u,{ref:d}),r)},Ye=e=>e,Qe=(()=>{let e=Ye;return{configure(t){e=t},generate:t=>e(t),reset(){e=Ye}}})(),Je={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function et(e,t,n="Mui"){const o=Je[t];return o?`${n}-${o}`:`${Qe.generate(e)}-${t}`}function tt(e,t,n="Mui"){const o={};return t.forEach(t=>{o[t]=et(e,t,n)}),o}const nt=e.createContext({item:null,axis:{x:null,y:null},useVoronoiInteraction:!1,dispatch:()=>null}),ot=(e,t)=>{switch(t.type){case"enterItem":return(0,i.A)({},e,{item:t.data});case"exitChart":return null===e.item&&null===e.axis.x&&null===e.axis.y?e:(0,i.A)({},e,{axis:{x:null,y:null},item:null});case"updateVoronoiUsage":return(0,i.A)({},e,{useVoronoiInteraction:t.useVoronoiInteraction});case"leaveItem":return null===e.item||Object.keys(t.data).some(n=>t.data[n]!==e.item[n])?e:(0,i.A)({},e,{item:null});case"updateAxis":return t.data.x===e.axis.x&&t.data.y===e.axis.y?e:(0,i.A)({},e,{axis:t.data});default:return e}};function rt(t){const{children:n}=t,[r,a]=e.useReducer(ot,{item:null,axis:{x:null,y:null},useVoronoiInteraction:!1}),s=e.useMemo(()=>(0,i.A)({},r,{dispatch:a}),[r]);return(0,o.jsx)(nt.Provider,{value:s,children:n})}const it=e.createContext({isInitialized:!1,data:{highlightedItem:null,setHighlighted:()=>{},clearHighlighted:()=>{},isHighlighted:()=>!1,isFaded:()=>!1}});function at(){const{isInitialized:t,data:n}=e.useContext(it);if(!t)throw new Error(["MUI X: Could not find the highlighted ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}const st=t=>{const{dispatch:n}=e.useContext(nt),{setHighlighted:o,clearHighlighted:r}=at();return t?()=>({}):e=>({onPointerEnter:()=>{n({type:"enterItem",data:e}),o({seriesId:e.seriesId,dataIndex:e.dataIndex})},onPointerLeave:t=>{t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId),n({type:"leaveItem",data:e}),r()},onPointerDown:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)}})};var lt=s(6461);const ut=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e},ct=e=>ut(e)&&"classes"!==e,dt=(0,lt.Ay)({themeId:we,defaultTheme:xe,rootShouldForwardProp:ct});var pt=Pt(),ht=e=>At(e,pt),ft=Pt();ht.write=e=>At(e,ft);var mt=Pt();ht.onStart=e=>At(e,mt);var gt=Pt();ht.onFrame=e=>At(e,gt);var vt=Pt();ht.onFinish=e=>At(e,vt);var yt=[];ht.setTimeout=(e,t)=>{const n=ht.now()+t,o=()=>{const e=yt.findIndex(e=>e.cancel==o);~e&&yt.splice(e,1),_t-=~e?1:0},r={time:n,handler:e,cancel:o};return yt.splice(bt(n),0,r),_t+=1,kt(),r};var bt=e=>~(~yt.findIndex(t=>t.time>e)||~yt.length);ht.cancel=e=>{mt.delete(e),gt.delete(e),vt.delete(e),pt.delete(e),ft.delete(e)},ht.sync=e=>{Ct=!0,ht.batchedUpdates(e),Ct=!1},ht.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,ht.onStart(n)}return o.handler=e,o.cancel=()=>{mt.delete(n),t=null},o};var xt="undefined"!=typeof window?window.requestAnimationFrame:()=>{};ht.use=e=>xt=e,ht.now="undefined"!=typeof performance?()=>performance.now():Date.now,ht.batchedUpdates=e=>e(),ht.catch=console.error,ht.frameLoop="always",ht.advance=()=>{"demand"!==ht.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Mt()};var wt=-1,_t=0,Ct=!1;function At(e,t){Ct?(t.delete(e),e(0)):(t.add(e),kt())}function kt(){wt<0&&(wt=0,"demand"!==ht.frameLoop&&xt(St))}function St(){~wt&&(xt(St),ht.batchedUpdates(Mt))}function Mt(){const e=wt;wt=ht.now();const t=bt(wt);t&&(It(yt.splice(0,t),e=>e.handler()),_t-=t),_t?(mt.flush(),pt.flush(e?Math.min(64,wt-e):16.667),gt.flush(),ft.flush(),vt.flush()):wt=-1}function Pt(){let e=new Set,t=e;return{add(n){_t+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(_t-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,_t-=t.size,It(t,t=>t(n)&&e.add(t)),_t+=e.size,t=e)}}}function It(e,t){e.forEach(e=>{try{t(e)}catch(e){ht.catch(e)}})}var Rt=Object.defineProperty,Tt={};function Et(){}((e,t)=>{for(var n in t)Rt(e,n,{get:t[n],enumerable:!0})})(Tt,{assign:()=>Gt,colors:()=>Vt,createStringInterpolator:()=>Nt,skipAnimation:()=>Wt,to:()=>Dt,willAdvance:()=>Ut});var Ot={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Lt(e,t){if(Ot.arr(e)){if(!Ot.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var zt=(e,t)=>e.forEach(t);function jt(e,t,n){if(Ot.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(const o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var $t=e=>Ot.und(e)?[]:Ot.arr(e)?e:[e];function Ft(e,t){if(e.size){const n=Array.from(e);e.clear(),zt(n,t)}}var Nt,Dt,Ht=(e,...t)=>Ft(e,e=>e(...t)),Bt=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Vt=null,Wt=!1,Ut=Et,Gt=e=>{e.to&&(Dt=e.to),e.now&&(ht.now=e.now),void 0!==e.colors&&(Vt=e.colors),null!=e.skipAnimation&&(Wt=e.skipAnimation),e.createStringInterpolator&&(Nt=e.createStringInterpolator),e.requestAnimationFrame&&ht.use(e.requestAnimationFrame),e.batchedUpdates&&(ht.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Ut=e.willAdvance),e.frameLoop&&(ht.frameLoop=e.frameLoop)},Zt=new Set,Kt=[],qt=[],Xt=0,Yt={get idle(){return!Zt.size&&!Kt.length},start(e){Xt>e.priority?(Zt.add(e),ht.onStart(Qt)):(Jt(e),ht(tn))},advance:tn,sort(e){if(Xt)ht.onFrame(()=>Yt.sort(e));else{const t=Kt.indexOf(e);~t&&(Kt.splice(t,1),en(e))}},clear(){Kt=[],Zt.clear()}};function Qt(){Zt.forEach(Jt),Zt.clear(),ht(tn)}function Jt(e){Kt.includes(e)||en(e)}function en(e){Kt.splice(function(t){const n=t.findIndex(t=>t.priority>e.priority);return n<0?t.length:n}(Kt),0,e)}function tn(e){const t=qt;for(let n=0;n<Kt.length;n++){const o=Kt[n];Xt=o.priority,o.idle||(Ut(o),o.advance(e),o.idle||t.push(o))}return Xt=0,(qt=Kt).length=0,(Kt=t).length>0}var nn="[-+]?\\d*\\.?\\d+",on=nn+"%";function rn(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var an=new RegExp("rgb"+rn(nn,nn,nn)),sn=new RegExp("rgba"+rn(nn,nn,nn,nn)),ln=new RegExp("hsl"+rn(nn,on,on)),un=new RegExp("hsla"+rn(nn,on,on,nn)),cn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,dn=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,pn=/^#([0-9a-fA-F]{6})$/,hn=/^#([0-9a-fA-F]{8})$/;function fn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mn(e,t,n){const o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=fn(r,o,e+1/3),a=fn(r,o,e),s=fn(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function gn(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function vn(e){return(parseFloat(e)%360+360)%360/360}function yn(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function bn(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function xn(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=pn.exec(e))?parseInt(t[1]+"ff",16)>>>0:Vt&&void 0!==Vt[e]?Vt[e]:(t=an.exec(e))?(gn(t[1])<<24|gn(t[2])<<16|gn(t[3])<<8|255)>>>0:(t=sn.exec(e))?(gn(t[1])<<24|gn(t[2])<<16|gn(t[3])<<8|yn(t[4]))>>>0:(t=cn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=hn.exec(e))?parseInt(t[1],16)>>>0:(t=dn.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ln.exec(e))?(255|mn(vn(t[1]),bn(t[2]),bn(t[3])))>>>0:(t=un.exec(e))?(mn(vn(t[1]),bn(t[2]),bn(t[3]))|yn(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var wn=(e,t,n)=>{if(Ot.fun(e))return e;if(Ot.arr(e))return wn({range:e,output:t,extrapolate:n});if(Ot.str(e.output[0]))return Nt(e);const o=e,r=o.output,i=o.range||[0,1],a=o.extrapolateLeft||o.extrapolate||"extend",s=o.extrapolateRight||o.extrapolate||"extend",l=o.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,a,s,l){let u=l?l(e):e;if(u<t){if("identity"===a)return u;"clamp"===a&&(u=t)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=i(u),o===-1/0?u=-u:r===1/0?u+=o:u=u*(r-o)+o,u)}(e,i[t],i[t+1],r[t],r[t+1],l,a,s,o.map)}},_n=1.70158,Cn=1.525*_n,An=_n+1,kn=2*Math.PI/3,Sn=2*Math.PI/4.5,Mn=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Pn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>An*e*e*e-_n*e*e,easeOutBack:e=>1+An*Math.pow(e-1,3)+_n*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Cn)/2:(Math.pow(2*e-2,2)*((Cn+1)*(2*e-2)+Cn)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*kn),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*kn)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Sn)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Sn)/2+1,easeInBounce:e=>1-Mn(1-e),easeOutBounce:Mn,easeInOutBounce:e=>e<.5?(1-Mn(1-2*e))/2:(1+Mn(2*e-1))/2,steps:(e,t="end")=>n=>{const o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return r=("end"===t?Math.floor(o):Math.ceil(o))/e,Math.min(Math.max(r,0),1);var r}},In=Symbol.for("FluidValue.get"),Rn=Symbol.for("FluidValue.observers"),Tn=e=>Boolean(e&&e[In]),En=e=>e&&e[In]?e[In]():e,On=e=>e[Rn]||null;function Ln(e,t){const n=e[Rn];n&&n.forEach(e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)})}var zn=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");jn(this,e)}},jn=(e,t)=>Dn(e,In,t);function $n(e,t){if(e[In]){let n=e[Rn];n||Dn(e,Rn,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Fn(e,t){const n=e[Rn];if(n&&n.has(t)){const o=n.size-1;o?n.delete(t):e[Rn]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var Nn,Dn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Hn=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Bn=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Vn=new RegExp(`(${Hn.source})(%|[a-z]+)`,"i"),Wn=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Un=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Gn=e=>{const[t,n]=Zn(e);if(!t||Bt())return e;const o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Un.test(n)?Gn(n):n||e},Zn=e=>{const t=Un.exec(e);if(!t)return[,];const[,n,o]=t;return[n,o]},Kn=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,qn=e=>{Nn||(Nn=Vt?new RegExp(`(${Object.keys(Vt).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(e=>En(e).replace(Un,Gn).replace(Bn,xn).replace(Nn,xn)),n=t.map(e=>e.match(Hn).map(Number)),o=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),r=o.map(t=>wn({...e,output:t}));return e=>{const n=!Vn.test(t[0])&&t.find(e=>Vn.test(e))?.replace(Hn,"");let o=0;return t[0].replace(Hn,()=>`${r[o++](e)}${n||""}`).replace(Wn,Kn)}},Xn="react-spring: ",Yn=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Xn}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Qn=Yn(console.warn),Jn=Yn(console.warn);function eo(e){return Ot.str(e)&&("#"==e[0]||/\d/.test(e)||!Bt()&&Un.test(e)||e in(Vt||{}))}var to=Bt()?e.useEffect:e.useLayoutEffect;function no(){const t=(0,e.useState)()[1],n=(()=>{const t=(0,e.useRef)(!1);return to(()=>(t.current=!0,()=>{t.current=!1}),[]),t})();return()=>{n.current&&t(Math.random())}}var oo=t=>(0,e.useEffect)(t,ro),ro=[];function io(t){const n=(0,e.useRef)();return(0,e.useEffect)(()=>{n.current=t}),n.current}var ao=Symbol.for("Animated:node"),so=e=>e&&e[ao],lo=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,ao,t),uo=e=>e&&e[ao]&&e[ao].getPayload(),co=class{constructor(){lo(this,this)}getPayload(){return this.payload||[]}},po=class extends co{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ot.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new po(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ot.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ot.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ho=class extends po{constructor(e){super(0),this._string=null,this._toString=wn({output:[e,e]})}static create(e){return new ho(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(Ot.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=wn({output:[this.getValue(),e]})),this._value=0,super.reset()}},fo={dependencies:null},mo=class extends co{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return jt(this.source,(n,o)=>{(e=>!!e&&e[ao]===e)(n)?t[o]=n.getValue(e):Tn(n)?t[o]=En(n):e||(t[o]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&zt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return jt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fo.dependencies&&Tn(e)&&fo.dependencies.add(e);const t=uo(e);t&&zt(t,e=>this.add(e))}},go=class extends mo{constructor(e){super(e)}static create(e){return new go(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(vo)),!0)}};function vo(e){return(eo(e)?ho:po).create(e)}function yo(e){const t=so(e);return t?t.constructor:Ot.arr(e)?go:eo(e)?ho:po}var bo=(t,n)=>{const o=!Ot.fun(t)||t.prototype&&t.prototype.isReactComponent;return(0,e.forwardRef)((r,i)=>{const a=(0,e.useRef)(null),s=o&&(0,e.useCallback)(e=>{a.current=function(e,t){return e&&(Ot.fun(e)?e(t):e.current=t),t}(i,e)},[i]),[l,u]=function(e,t){const n=new Set;return fo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new mo(e),fo.dependencies=null,[e,n]}(r,n),c=no(),d=()=>{const e=a.current;o&&!e||!1===(!!e&&n.applyAnimatedValues(e,l.getValue(!0)))&&c()},p=new xo(d,u),h=(0,e.useRef)();to(()=>(h.current=p,zt(u,e=>$n(e,p)),()=>{h.current&&(zt(h.current.deps,e=>Fn(e,h.current)),ht.cancel(h.current.update))})),(0,e.useEffect)(d,[]),oo(()=>()=>{const e=h.current;zt(e.deps,t=>Fn(t,e))});const f=n.getComponentProps(l.getValue());return e.createElement(t,{...f,ref:s})})},xo=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&ht.write(this.update)}},wo=Symbol.for("AnimatedComponent"),_o=e=>Ot.str(e)?e:e&&Ot.str(e.displayName)?e.displayName:Ot.fun(e)&&e.name||null;function Co(e,...t){return Ot.fun(e)?e(...t):e}var Ao=(e,t)=>!0===e||!!(t&&e&&(Ot.fun(e)?e(t):$t(e).includes(t))),ko=(e,t)=>Ot.obj(e)?t&&e[t]:e,So=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Mo=e=>e,Po=(e,t=Mo)=>{let n=Io;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const o={};for(const r of n){const n=t(e[r],r);Ot.und(n)||(o[r]=n)}return o},Io=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Ro={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function To(e){const t=function(e){const t={};let n=0;if(jt(e,(e,o)=>{Ro[o]||(t[o]=e,n++)}),n)return t}(e);if(t){const n={to:t};return jt(e,(e,o)=>o in t||(n[o]=e)),n}return{...e}}function Eo(e){return e=En(e),Ot.arr(e)?e.map(Eo):eo(e)?Tt.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Oo(e){for(const t in e)return!0;return!1}function Lo(e){return Ot.fun(e)||Ot.arr(e)&&Ot.obj(e[0])}function zo(e,t){e.ref?.delete(e),t?.delete(e)}function jo(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var $o={tension:170,friction:26,mass:1,damping:1,easing:Pn.linear,clamp:!1},Fo=class{constructor(){this.velocity=0,Object.assign(this,$o)}};function No(e,t){if(Ot.und(t.decay)){const n=!Ot.und(t.tension)||!Ot.und(t.friction);!n&&Ot.und(t.frequency)&&Ot.und(t.damping)&&Ot.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Do=[],Ho=class{constructor(){this.changed=!1,this.values=Do,this.toValues=null,this.fromValues=Do,this.config=new Fo,this.immediate=!1}};function Bo(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise((a,s)=>{let l,u,c=Ao(n.cancel??o?.cancel,t);if(c)h();else{Ot.und(n.pause)||(r.paused=Ao(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Ao(e,t)),l=Co(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(u),u.cancel(),l=u.time-ht.now()}function p(){l>0&&!Tt.skipAnimation?(r.delayed=!0,u=ht.setTimeout(h,l),r.pauseQueue.add(d),r.timeouts.add(u)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(u),e<=(r.cancelId||0)&&(c=!0);try{i.start({...n,callId:e,cancel:c},a)}catch(e){s(e)}}})}var Vo=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?Go(e.get()):t.every(e=>e.noop)?Wo(e.get()):Uo(e.get(),t.every(e=>e.finished)),Wo=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Uo=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Go=e=>({value:e,cancelled:!0,finished:!1});function Zo(e,t,n,o){const{callId:r,parentId:i,onRest:a}=t,{asyncTo:s,promise:l}=n;return i||e!==s||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;const u=Po(t,(e,t)=>"onRest"===t?void 0:e);let c,d;const p=new Promise((e,t)=>(c=e,d=t)),h=e=>{const t=r<=(n.cancelId||0)&&Go(o)||r!==n.asyncId&&Uo(o,!1);if(t)throw e.result=t,d(e),e},f=(e,t)=>{const i=new qo,a=new Xo;return(async()=>{if(Tt.skipAnimation)throw Ko(n),a.result=Uo(o,!1),d(a),a;h(i);const s=Ot.obj(e)?{...e}:{...t,to:e};s.parentId=r,jt(u,(e,t)=>{Ot.und(s[t])&&(s[t]=e)});const l=await o.start(s);return h(i),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};let m;if(Tt.skipAnimation)return Ko(n),Uo(o,!1);try{let t;t=Ot.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,o.stop.bind(o))),await Promise.all([t.then(c),p]),m=Uo(o.get(),!0,!1)}catch(e){if(e instanceof qo)m=e.result;else{if(!(e instanceof Xo))throw e;m=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?l:void 0)}return Ot.fun(a)&&ht.batchedUpdates(()=>{a(m,o,o.item)}),m})():l}function Ko(e,t){Ft(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var qo=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Xo=class extends Error{constructor(){super("SkipAnimationSignal")}},Yo=e=>e instanceof Jo,Qo=1,Jo=class extends zn{constructor(){super(...arguments),this.id=Qo++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=so(this);return e&&e.getValue()}to(...e){return Tt.to(this,e)}interpolate(...e){return Qn(`${Xn}The "interpolate" function is deprecated in v9 (use "to" instead)`),Tt.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ln(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Yt.sort(this),Ln(this,{type:"priority",parent:this,priority:e})}},er=Symbol.for("SpringPhase"),tr=e=>(1&e[er])>0,nr=e=>(2&e[er])>0,or=e=>(4&e[er])>0,rr=(e,t)=>t?e[er]|=3:e[er]&=-3,ir=(e,t)=>t?e[er]|=4:e[er]&=-5,ar=class extends Jo{constructor(e,t){if(super(),this.animation=new Ho,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Ot.und(e)||!Ot.und(t)){const n=Ot.obj(e)?{...e}:{...t,from:e};Ot.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(nr(this)||this._state.asyncTo)||or(this)}get goal(){return En(this.animation.to)}get velocity(){const e=so(this);return e instanceof po?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return tr(this)}get isAnimating(){return nr(this)}get isPaused(){return or(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const o=this.animation;let{toValues:r}=o;const{config:i}=o,a=uo(o.to);!a&&Tn(o.to)&&(r=$t(En(o.to))),o.values.forEach((s,l)=>{if(s.done)return;const u=s.constructor==ho?1:a?a[l].lastPosition:r[l];let c=o.immediate,d=u;if(!c){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=o.fromValues[l],r=null!=s.v0?s.v0:s.v0=Ot.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const p=i.precision||(n==u?.005:Math.min(1,.001*Math.abs(u-n)));if(Ot.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,o=Math.exp(-(1-e)*t);d=n+r/(1-e)*(1-o),c=Math.abs(s.lastPosition-d)<=p,a=r*o}else{a=null==s.lastVelocity?r:s.lastVelocity;const t=i.restVelocity||p/10,o=i.clamp?0:i.bounce,l=!Ot.und(o),h=n==u?s.v0>0:n<u;let f,m=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(f=Math.abs(a)>t,f||(c=Math.abs(u-d)<=p,!c));++e)l&&(m=d==u||d>u==h,m&&(a=-a*o,d=u)),a+=(1e-6*-i.tension*(d-u)+.001*-i.friction*a)/i.mass*g,d+=a*g}else{let o=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),o=(i.progress||0)+t/this._memoizedDuration,o=o>1?1:o<0?0:o,s.durationProgress=o),d=n+i.easing(o)*(u-n),a=(d-s.lastPosition)/e,c=1==o}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[l].done&&(c=!1),c?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)});const s=so(this),l=s.getValue();if(t){const e=En(o.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return ht.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(nr(this)){const{to:e,config:t}=this.animation;ht.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Ot.und(e)?(n=this.queue||[],this.queue=[]):n=[Ot.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>Vo(this,e))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ko(this._state,e&&this._lastCallId),ht.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:o}=e;n=Ot.obj(n)?n[t]:n,(null==n||Lo(n))&&(n=void 0),o=Ot.obj(o)?o[t]:o,null==o&&(o=void 0);const r={to:n,from:o};return tr(this)||(e.reverse&&([n,o]=[o,n]),o=En(o),Ot.und(o)?so(this)||this._set(n):this._set(o)),r}_update({...e},t){const{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Po(e,(e,t)=>/^on/.test(t)?ko(e,n):e)),hr(this,e,"onProps"),fr(this,"onProps",e,this);const r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Bo(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{or(this)||(ir(this,!0),Ht(i.pauseQueue),fr(this,"onPause",Uo(this,sr(this,this.animation.to)),this))},resume:()=>{or(this)&&(ir(this,!1),nr(this)&&this._resume(),Ht(i.resumeQueue),fr(this,"onResume",Uo(this,sr(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then(n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=lr(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Go(this));const o=!Ot.und(e.to),r=!Ot.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(Go(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:l,from:u}=s;let{to:c=l,from:d=u}=e;!r||o||t.default&&!Ot.und(c)||(c=d),t.reverse&&([c,d]=[d,c]);const p=!Lt(d,u);p&&(s.from=d),d=En(d);const h=!Lt(c,l);h&&this._focus(c);const f=Lo(t.to),{config:m}=s,{decay:g,velocity:v}=m;(o||r)&&(m.velocity=0),t.config&&!f&&function(e,t,n){n&&(No(n={...n},t),t={...n,...t}),No(e,t),Object.assign(e,t);for(const t in $o)null==e[t]&&(e[t]=$o[t]);let{frequency:o,damping:r}=e;const{mass:i}=e;Ot.und(o)||(o<.01&&(o=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/o,2)*i,e.friction=4*Math.PI*r*i/o)}(m,Co(t.config,i),t.config!==a.config?Co(a.config,i):void 0);let y=so(this);if(!y||Ot.und(c))return n(Uo(this,!0));const b=Ot.und(t.reset)?r&&!t.default:!Ot.und(d)&&Ao(t.reset,i),x=b?d:this.get(),w=Eo(c),_=Ot.num(w)||Ot.arr(w)||eo(w),C=!f&&(!_||Ao(a.immediate||t.immediate,i));if(h){const e=yo(c);if(e!==y.constructor){if(!C)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}const A=y.constructor;let k=Tn(c),S=!1;if(!k){const e=b||!tr(this)&&p;(h||e)&&(S=Lt(Eo(x),w),k=!S),(Lt(s.immediate,C)||C)&&Lt(m.decay,g)&&Lt(m.velocity,v)||(k=!0)}if(S&&nr(this)&&(s.changed&&!b?k=!0:k||this._stop(l)),!f&&((k||Tn(l))&&(s.values=y.getPayload(),s.toValues=Tn(c)?null:A==ho?[1]:$t(w)),s.immediate!=C&&(s.immediate=C,C||b||this._set(l)),k)){const{onRest:e}=s;zt(pr,e=>hr(this,t,e));const o=Uo(this,sr(this,l));Ht(this._pendingCalls,o),this._pendingCalls.add(n),s.changed&&ht.batchedUpdates(()=>{s.changed=!b,e?.(o,this),b?Co(a.onRest,o):s.onStart?.(o,this)})}b&&this._set(x),f?n(Zo(t.to,t,this._state,this)):k?this._start():nr(this)&&!h?this._pendingCalls.add(n):n(Wo(x))}_focus(e){const t=this.animation;e!==t.to&&(On(this)&&this._detach(),t.to=e,On(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Tn(t)&&($n(t,this),Yo(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Tn(e)&&Fn(e,this)}_set(e,t=!0){const n=En(e);if(!Ot.und(n)){const e=so(this);if(!e||!Lt(n,e.getValue())){const o=yo(n);e&&e.constructor==o?e.setValue(n):lo(this,o.create(n)),e&&ht.batchedUpdates(()=>{this._onChange(n,t)})}}return so(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,fr(this,"onStart",Uo(this,sr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Co(this.animation.onChange,e,this)),Co(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;so(this).reset(En(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),nr(this)||(rr(this,!0),or(this)||this._resume())}_resume(){Tt.skipAnimation?this.finish():Yt.start(this)}_stop(e,t){if(nr(this)){rr(this,!1);const n=this.animation;zt(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ln(this,{type:"idle",parent:this});const o=t?Go(this.get()):Uo(this.get(),sr(this,e??n.to));Ht(this._pendingCalls,o),n.changed&&(n.changed=!1,fr(this,"onRest",o,this))}}};function sr(e,t){const n=Eo(t);return Lt(Eo(e.get()),n)}function lr(e,t=e.loop,n=e.to){const o=Co(t);if(o){const r=!0!==o&&To(o),i=(r||e).reverse,a=!r||r.reset;return ur({...e,loop:t,default:!1,pause:void 0,to:!i||Lo(n)?n:void 0,from:a?e.from:void 0,reset:a,...r})}}function ur(e){const{to:t,from:n}=e=To(e),o=new Set;return Ot.obj(t)&&dr(t,o),Ot.obj(n)&&dr(n,o),e.keys=o.size?Array.from(o):null,e}function cr(e){const t=ur(e);return Ot.und(t.default)&&(t.default=Po(t)),t}function dr(e,t){jt(e,(e,n)=>null!=e&&t.add(n))}var pr=["onStart","onRest","onChange","onPause","onResume"];function hr(e,t,n){e.animation[n]=t[n]!==So(t,n)?ko(t[n],e.key):void 0}function fr(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var mr=["onStart","onChange","onRest"],gr=1,vr=class{constructor(e,t){this.id=gr++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];Ot.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ur(e)),this}start(e){let{queue:t}=this;return e?t=$t(e).map(ur):this.queue=[],this._flush?this._flush(this,t):(Ar(this,t),yr(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;zt($t(t),t=>n[t].stop(!!e))}else Ko(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Ot.und(e))this.start({pause:!0});else{const t=this.springs;zt($t(e),e=>t[e].pause())}return this}resume(e){if(Ot.und(e))this.start({pause:!1});else{const t=this.springs;zt($t(e),e=>t[e].resume())}return this}each(e){jt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,Ft(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));const i=!o&&this._started,a=r||i&&n.size?this.get():null;r&&t.size&&Ft(t,([e,t])=>{t.value=a,e(t,this,this._item)}),i&&(this._started=!1,Ft(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}ht.onFrame(this._onFrame)}};function yr(e,t){return Promise.all(t.map(t=>br(e,t))).then(t=>Vo(e,t))}async function br(e,t,n){const{keys:o,to:r,from:i,loop:a,onRest:s,onResolve:l}=t,u=Ot.obj(t.default)&&t.default;a&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);const c=Ot.arr(r)||Ot.fun(r)?r:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):zt(mr,n=>{const o=t[n];if(Ot.fun(o)){const r=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ht(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const p=(o||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=!0===t.cancel||!0===So(t,"cancel");(c||h&&d.asyncId)&&p.push(Bo(++e._lastAsyncId,{props:t,state:d,actions:{pause:Et,resume:Et,start(t,n){h?(Ko(d,e._lastAsyncId),n(Go(e))):(t.onRest=s,n(Zo(c,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});const f=Vo(e,await Promise.all(p));if(a&&f.finished&&(!n||!f.noop)){const n=lr(t,a,r);if(n)return Ar(e,[n]),br(e,n,!0)}return l&&ht.batchedUpdates(()=>l(f,e,e.item)),f}function xr(e,t){const n={...e.springs};return t&&zt($t(t),e=>{Ot.und(e.keys)&&(e=ur(e)),Ot.obj(e.to)||(e={...e,to:void 0}),Cr(n,e,e=>_r(e))}),wr(e,n),n}function wr(e,t){jt(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,$n(t,e))})}function _r(e,t){const n=new ar;return n.key=e,t&&$n(n,t),n}function Cr(e,t,n){t.keys&&zt(t.keys,o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)})}function Ar(e,t){zt(t,t=>{Cr(e.springs,t,t=>_r(t,e))})}var kr,Sr,Mr=({children:t,...n})=>{const o=(0,e.useContext)(Pr),r=n.pause||!!o.pause,i=n.immediate||!!o.immediate;n=function(t,n){const[o]=(0,e.useState)(()=>({inputs:n,result:t()})),r=(0,e.useRef)(),i=r.current;let a=i;return a?Boolean(n&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(n,a.inputs))||(a={inputs:n,result:t()}):a=o,(0,e.useEffect)(()=>{r.current=a,i==o&&(o.inputs=o.result=void 0)},[a]),a.result}(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Pr;return e.createElement(a,{value:n},t)},Pr=(kr=Mr,Sr={},Object.assign(kr,e.createContext(Sr)),kr.Provider._context=kr,kr.Consumer._context=kr,kr);Mr.Provider=Pr.Provider,Mr.Consumer=Pr.Consumer;var Ir=()=>{const e=[],t=function(t){Jn(`${Xn}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const o=[];return zt(e,(e,r)=>{if(Ot.und(t))o.push(e.start());else{const i=n(t,e,r);i&&o.push(e.start(i))}}),o};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return zt(e,e=>e.pause(...arguments)),this},t.resume=function(){return zt(e,e=>e.resume(...arguments)),this},t.set=function(t){zt(e,(e,n)=>{const o=Ot.fun(t)?t(n,e):t;o&&e.set(o)})},t.start=function(t){const n=[];return zt(e,(e,o)=>{if(Ot.und(t))n.push(e.start());else{const r=this._getProps(t,e,o);r&&n.push(e.start(r))}}),n},t.stop=function(){return zt(e,e=>e.stop(...arguments)),this},t.update=function(t){return zt(e,(e,n)=>e.update(this._getProps(t,e,n))),this};const n=function(e,t,n){return Ot.fun(e)?e(n,t):e};return t._getProps=n,t};function Rr(t,n){const o=Ot.fun(t),[[r],i]=function(t,n,o){const r=Ot.fun(n)&&n;r&&!o&&(o=[]);const i=(0,e.useMemo)(()=>r||3==arguments.length?Ir():void 0,[]),a=(0,e.useRef)(0),s=no(),l=(0,e.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const n=xr(e,t);return a.current>0&&!l.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?yr(e,t):new Promise(o=>{wr(e,n),l.queue.push(()=>{o(yr(e,t))}),s()})}}),[]),u=(0,e.useRef)([...l.ctrls]),c=[],d=io(t)||0;function p(e,t){for(let o=e;o<t;o++){const e=u.current[o]||(u.current[o]=new vr(null,l.flush)),t=r?r(o,e):n[o];t&&(c[o]=cr(t))}}(0,e.useMemo)(()=>{zt(u.current.slice(t,d),e=>{zo(e,i),e.stop(!0)}),u.current.length=t,p(d,t)},[t]),(0,e.useMemo)(()=>{p(0,Math.min(d,t))},o);const h=u.current.map((e,t)=>xr(e,c[t])),f=(0,e.useContext)(Mr),m=io(f),g=f!==m&&Oo(f);to(()=>{a.current++,l.ctrls=u.current;const{queue:e}=l;e.length&&(l.queue=[],zt(e,e=>e())),zt(u.current,(e,t)=>{i?.add(e),g&&e.start({default:f});const n=c[t];n&&(jo(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),oo(()=>()=>{zt(l.ctrls,e=>e.stop(!0))});const v=h.map(e=>({...e}));return i?[v,i]:v}(1,o?t:[t],o?n||[]:n);return o||2==arguments.length?[r,i]:r}function Tr(t,n,o){const r=Ot.fun(n)&&n,{reset:i,sort:a,trail:s=0,expires:l=!0,exitBeforeEnter:u=!1,onDestroyed:c,ref:d,config:p}=r?r():n,h=(0,e.useMemo)(()=>r||3==arguments.length?Ir():void 0,[]),f=$t(t),m=[],g=(0,e.useRef)(null),v=i?null:g.current;to(()=>{g.current=m}),oo(()=>(zt(m,e=>{h?.add(e.ctrl),e.ctrl.ref=h}),()=>{zt(g.current,e=>{e.expired&&clearTimeout(e.expirationId),zo(e.ctrl,h),e.ctrl.stop(!0)})}));const y=function(e,{key:t,keys:n=t},o){if(null===n){const t=new Set;return e.map(e=>{const n=o&&o.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):Er++})}return Ot.und(n)?e:Ot.fun(n)?e.map(n):$t(n)}(f,r?r():n,v),b=i&&g.current||[];to(()=>zt(b,({ctrl:e,item:t,key:n})=>{zo(e,h),Co(c,t,n)}));const x=[];if(v&&zt(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),b.push(e)):~(t=x[t]=y.indexOf(e.key))&&(m[t]=e)}),zt(f,(e,t)=>{m[t]||(m[t]={key:y[t],item:e,phase:"mount",ctrl:new vr},m[t].ctrl.item=e)}),x.length){let e=-1;const{leave:t}=r?r():n;zt(x,(n,o)=>{const r=v[o];~n?(e=m.indexOf(r),m[e]={...r,item:f[n]}):t&&m.splice(++e,0,r)})}Ot.fun(a)&&m.sort((e,t)=>a(e.item,t.item));let w=-s;const _=no(),C=Po(n),A=new Map,k=(0,e.useRef)(new Map),S=(0,e.useRef)(!1);zt(m,(e,t)=>{const o=e.key,i=e.phase,a=r?r():n;let c,h;const f=Co(a.delay||0,o);if("mount"==i)c=a.enter,h="enter";else{const e=y.indexOf(o)<0;if("leave"!=i)if(e)c=a.leave,h="leave";else{if(!(c=a.update))return;h="update"}else{if(e)return;c=a.enter,h="enter"}}if(c=Co(c,e.item,t),c=Ot.obj(c)?To(c):{to:c},!c.config){const n=p||C.config;c.config=Co(n,e.item,t,h)}w+=s;const m={...C,delay:f+w,ref:d,immediate:a.immediate,reset:!1,...c};if("enter"==h&&Ot.und(m.from)){const o=r?r():n,i=Ot.und(o.initial)||v?o.from:o.initial;m.from=Co(i,e.item,t)}const{onResolve:b}=m;m.onResolve=e=>{Co(b,e);const t=g.current,n=t.find(e=>e.key===o);if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){const t=Co(l,n.item);if(!1!==t){const o=!0===t?0:t;if(n.expired=!0,!e&&o>0)return void(o<=2147483647&&(n.expirationId=setTimeout(_,o)))}}e&&t.some(e=>e.expired)&&(k.current.delete(n),u&&(S.current=!0),_())}};const x=xr(e.ctrl,m);"leave"===h&&u?k.current.set(e,{phase:h,springs:x,payload:m}):A.set(e,{phase:h,springs:x,payload:m})});const M=(0,e.useContext)(Mr),P=io(M),I=M!==P&&Oo(M);to(()=>{I&&zt(m,e=>{e.ctrl.start({default:M})})},[M]),zt(A,(e,t)=>{if(k.current.size){const e=m.findIndex(e=>e.key===t.key);m.splice(e,1)}}),to(()=>{zt(k.current.size?k.current:A,({phase:e,payload:t},n)=>{const{ctrl:o}=n;n.phase=e,h?.add(o),I&&"enter"==e&&o.start({default:M}),t&&(jo(o,t.ref),!o.ref&&!h||S.current?(o.start(t),S.current&&(S.current=!1)):o.update(t))})},i?void 0:o);const R=t=>e.createElement(e.Fragment,null,m.map((n,o)=>{const{springs:r}=A.get(n)||n.ctrl,i=t({...r},n.item,n,o);return i&&i.type?e.createElement(i.type,{...i.props,key:Ot.str(n.key)||Ot.num(n.key)?n.key:n.ctrl.id,ref:i.ref}):i}));return h?[R,h]:R}var Er=1,Or=class extends Jo{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=wn(...t);const n=this._get(),o=yo(n);lo(this,o.create(n))}advance(e){const t=this._get();Lt(t,this.get())||(so(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&zr(this._active)&&jr(this)}_get(){const e=Ot.arr(this.source)?this.source.map(En):$t(En(this.source));return this.calc(...e)}_start(){this.idle&&!zr(this._active)&&(this.idle=!1,zt(uo(this),e=>{e.done=!1}),Tt.skipAnimation?(ht.batchedUpdates(()=>this.advance()),jr(this)):Yt.start(this))}_attach(){let e=1;zt($t(this.source),t=>{Tn(t)&&$n(t,this),Yo(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){zt($t(this.source),e=>{Tn(e)&&Fn(e,this)}),this._active.clear(),jr(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=$t(this.source).reduce((e,t)=>Math.max(e,(Yo(t)?t.priority:0)+1),0))}};function Lr(e){return!1!==e.idle}function zr(e){return!e.size||Array.from(e).every(Lr)}function jr(e){e.idle||(e.idle=!0,zt(uo(e),e=>{e.done=!0}),Ln(e,{type:"idle",parent:e}))}var $r=(e,...t)=>new Or(e,t);Tt.assign({createStringInterpolator:qn,to:(e,t)=>new Or(e,t)}),Yt.advance;var Fr=s(9318),Nr=s.n(Fr),Dr=/^--/;function Hr(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Dr.test(e)||Vr.hasOwnProperty(e)&&Vr[e]?(""+t).trim():t+"px"}var Br={},Vr={animationIterationCount:!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,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},Wr=["Webkit","Ms","Moz","O"];Vr=Object.keys(Vr).reduce((e,t)=>(Wr.forEach(n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t]),e),Vr);var Ur=/^(matrix|translate|scale|rotate|skew)/,Gr=/^(translate)/,Zr=/^(rotate|skew)/,Kr=(e,t)=>Ot.num(e)&&0!==e?e+t:e,qr=(e,t)=>Ot.arr(e)?e.every(e=>qr(e,t)):Ot.num(e)?e===t:parseFloat(e)===t,Xr=class extends mo{constructor({x:e,y:t,z:n,...o}){const r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push(e=>[`translate3d(${e.map(e=>Kr(e,"px")).join(",")})`,qr(e,0)])),jt(o,(e,t)=>{if("transform"===t)r.push([e||""]),i.push(e=>[e,""===e]);else if(Ur.test(t)){if(delete o[t],Ot.und(e))return;const n=Gr.test(t)?"px":Zr.test(t)?"deg":"";r.push($t(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Kr(r,n)})`,qr(r,0)]:e=>[`${t}(${e.map(e=>Kr(e,n)).join(",")})`,qr(e,t.startsWith("scale")?1:0)])}}),r.length&&(o.transform=new Yr(r,i)),super(o)}},Yr=class extends zn{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return zt(this.inputs,(n,o)=>{const r=En(n[0]),[i,a]=this.transforms[o](Ot.arr(r)?r:n.map(En));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){1==e&&zt(this.inputs,e=>zt(e,e=>Tn(e)&&$n(e,this)))}observerRemoved(e){0==e&&zt(this.inputs,e=>zt(e,e=>Tn(e)&&Fn(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),Ln(this,e)}};Tt.assign({batchedUpdates:Fr.unstable_batchedUpdates,createStringInterpolator:qn,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Qr=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new mo(e),getComponentProps:o=e=>e}={})=>{const r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{const t=_o(e)||"Anonymous";return(e=Ot.str(e)?i[e]||(i[e]=bo(e,r)):e[wo]||(e[wo]=bo(e,r))).displayName=`Animated(${t})`,e};return jt(e,(t,n)=>{Ot.arr(e)&&(n=_o(t)),i[n]=i(t)}),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{className:o,style:r,children:i,scrollTop:a,scrollLeft:s,viewBox:l,...u}=t,c=Object.values(u),d=Object.keys(u).map(t=>n||e.hasAttribute(t)?t:Br[t]||(Br[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));void 0!==i&&(e.textContent=i);for(const t in r)if(r.hasOwnProperty(t)){const n=Hr(t,r[t]);Dr.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{e.setAttribute(t,c[n])}),void 0!==o&&(e.className=o),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Xr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Jr=Qr.animated;function ei(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ti(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ni(){}Object.defineProperty(ei,"name",{value:"default",configurable:!0});var oi=.7,ri=1/oi,ii="\\s*([+-]?\\d+)\\s*",ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",li=/^#([0-9a-f]{3,8})$/,ui=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),ci=new RegExp(`^rgb\\(${si},${si},${si}\\)$`),di=new RegExp(`^rgba\\(${ii},${ii},${ii},${ai}\\)$`),pi=new RegExp(`^rgba\\(${si},${si},${si},${ai}\\)$`),hi=new RegExp(`^hsl\\(${ai},${si},${si}\\)$`),fi=new RegExp(`^hsla\\(${ai},${si},${si},${ai}\\)$`),mi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function gi(){return this.rgb().formatHex()}function vi(){return this.rgb().formatRgb()}function yi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=li.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bi(t):3===n?new _i(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ui.exec(e))?new _i(t[1],t[2],t[3],1):(t=ci.exec(e))?new _i(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=di.exec(e))?xi(t[1],t[2],t[3],t[4]):(t=pi.exec(e))?xi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=hi.exec(e))?Pi(t[1],t[2]/100,t[3]/100,1):(t=fi.exec(e))?Pi(t[1],t[2]/100,t[3]/100,t[4]):mi.hasOwnProperty(e)?bi(mi[e]):"transparent"===e?new _i(NaN,NaN,NaN,0):null}function bi(e){return new _i(e>>16&255,e>>8&255,255&e,1)}function xi(e,t,n,o){return o<=0&&(e=t=n=NaN),new _i(e,t,n,o)}function wi(e,t,n,o){return 1===arguments.length?((r=e)instanceof ni||(r=yi(r)),r?new _i((r=r.rgb()).r,r.g,r.b,r.opacity):new _i):new _i(e,t,n,null==o?1:o);var r}function _i(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function Ci(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}`}function Ai(){const e=ki(this.opacity);return`${1===e?"rgb(":"rgba("}${Si(this.r)}, ${Si(this.g)}, ${Si(this.b)}${1===e?")":`, ${e})`}`}function ki(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Si(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mi(e){return((e=Si(e))<16?"0":"")+e.toString(16)}function Pi(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ri(e,t,n,o)}function Ii(e){if(e instanceof Ri)return new Ri(e.h,e.s,e.l,e.opacity);if(e instanceof ni||(e=yi(e)),!e)return new Ri;if(e instanceof Ri)return e;var t=(e=e.rgb()).r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,s=i-r,l=(i+r)/2;return s?(a=t===i?(n-o)/s+6*(n<o):n===i?(o-t)/s+2:(t-n)/s+4,s/=l<.5?i+r:2-i-r,a*=60):s=l>0&&l<1?0:a,new Ri(a,s,l,e.opacity)}function Ri(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function Ti(e){return(e=(e||0)%360)<0?e+360:e}function Ei(e){return Math.max(0,Math.min(1,e||0))}function Oi(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Li(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}ei(ni,yi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gi,formatHex:gi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ii(this).formatHsl()},formatRgb:vi,toString:vi}),ei(_i,wi,ti(ni,{brighter(e){return e=null==e?ri:Math.pow(ri,e),new _i(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?oi:Math.pow(oi,e),new _i(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _i(Si(this.r),Si(this.g),Si(this.b),ki(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ci,formatHex:Ci,formatHex8:function(){return`#${Mi(this.r)}${Mi(this.g)}${Mi(this.b)}${Mi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ai,toString:Ai})),ei(Ri,function(e,t,n,o){return 1===arguments.length?Ii(e):new Ri(e,t,n,null==o?1:o)},ti(ni,{brighter(e){return e=null==e?ri:Math.pow(ri,e),new Ri(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?oi:Math.pow(oi,e),new Ri(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new _i(Oi(e>=240?e-240:e+120,r,o),Oi(e,r,o),Oi(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Ri(Ti(this.h),Ei(this.s),Ei(this.l),ki(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ki(this.opacity);return`${1===e?"hsl(":"hsla("}${Ti(this.h)}, ${100*Ei(this.s)}%, ${100*Ei(this.l)}%${1===e?")":`, ${e})`}`}})),Object.defineProperty(Li,"name",{value:"default",configurable:!0}),Object.defineProperty($i,"name",{value:"default",configurable:!0});var zi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(zi.source,"g");function $i(e,t){var n,o,r,i=zi.lastIndex=ji.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zi.exec(e))&&(o=ji.exec(t));)(r=o.index)>i&&(r=t.slice(i,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:Li(n,o)})),i=ji.lastIndex;return i<t.length&&(r=t.slice(i),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,o=0;o<t;++o)s[(n=l[o]).i]=n.x(e);return s.join("")})}const Fi=t=>{const n=function(t){const n=e.useRef({currentPath:t,previousPath:void 0});return n.current.currentPath!==t&&(n.current={currentPath:t,previousPath:n.current.currentPath}),n.current}(t);return e.useMemo(()=>n.previousPath?$i(n.previousPath,n.currentPath):()=>n.currentPath,[n.currentPath,n.previousPath])};function Ni(e){return e.replace(" ","_")}let Di=0;const Hi=e["useId".toString()];function Bi(t){if(void 0!==Hi){const e=Hi();return null!=t?t:e}return function(t){const[n,o]=e.useState(t),r=t||n;return e.useEffect(()=>{null==n&&(Di+=1,o(`mui-${Di}`))},[n]),r}(t)}const Vi="DEFAULT_X_AXIS_KEY",Wi="DEFAULT_Y_AXIS_KEY",Ui={top:50,bottom:50,left:50,right:50},Gi=e.createContext({top:0,left:0,bottom:0,right:0,height:300,width:400,chartId:"",isPointInside:()=>!1}),Zi=e.createContext({isInitialized:!1,data:{current:null}});function Ki(t){const{width:n,height:r,margin:a,svgRef:s,children:l}=t,u=((t,n,o)=>{const r=(0,i.A)({},Ui,o);return e.useMemo(()=>({left:r.left,top:r.top,right:r.right,bottom:r.bottom,width:Math.max(0,t-r.left-r.right),height:Math.max(0,n-r.top-r.bottom)}),[t,n,r.top,r.bottom,r.left,r.right])})(n,r,a),c=Bi(),d=e.useCallback(({x:e,y:t},n)=>{if(n?.targetElement&&n?.targetElement.closest("[data-drawing-container]"))return!0;const o=e>=u.left-1&&e<=u.left+u.width,r=t>=u.top-1&&t<=u.top+u.height;return"x"===n?.direction?o:("y"===n?.direction||o)&&r},[u]),p=e.useMemo(()=>(0,i.A)({chartId:c??""},u,{isPointInside:d}),[c,u,d]),h=e.useMemo(()=>({isInitialized:!0,data:s}),[s]);return(0,o.jsx)(Zi.Provider,{value:h,children:(0,o.jsx)(Gi.Provider,{value:p,children:l})})}function qi(){const{left:t,top:n,width:o,height:r,bottom:i,right:a,isPointInside:s}=e.useContext(Gi);return e.useMemo(()=>({left:t,top:n,width:o,height:r,bottom:i,right:a,isPointInside:s}),[r,t,n,o,i,a,s])}function Xi(){const{chartId:t}=e.useContext(Gi);return e.useMemo(()=>t,[t])}function Yi(t){const n=qi(),r=Xi(),i=Tr([n],{from:e=>({animatedWidth:e.left}),enter:e=>({animatedWidth:e.width+e.left+e.right}),leave:e=>({animatedWidth:e.width+e.left+e.right}),reset:!1,immediate:t.skipAnimation}),a=Ni(`${r}-${t.id}`);return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)("clipPath",{id:a,children:i(e=>(0,o.jsx)(Jr.rect,{x:0,y:0,width:e.animatedWidth,height:n.top+n.height+n.bottom}))}),(0,o.jsx)("g",{clipPath:`url(#${a})`,children:t.children})]})}const Qi=["d","skipAnimation","ownerState"],Ji=dt(Jr.path,{name:"MuiAreaElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({stroke:"none",fill:e.gradientId&&`url(#${e.gradientId})`||e.isHighlighted&&yi(e.color).brighter(1).formatHex()||yi(e.color).brighter(.5).formatHex(),transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:e.isFaded?.3:1}));function ea(e){const{d:t,skipAnimation:n,ownerState:r}=e,a=(0,f.A)(e,Qi),s=Tr([Fi(t)],{from:{value:0},to:{value:1},enter:{value:1},reset:!1,immediate:n});return(0,o.jsx)(Yi,{skipAnimation:n,id:`${r.id}-area-clip`,children:s((e,t)=>(0,o.jsx)(Ji,(0,i.A)({},a,{ownerState:r,d:e.value.to(t)})))})}function ta(e){const t=at();if(!e)return{isHighlighted:!1,isFaded:!1};const n=t.isHighlighted(e);return{isHighlighted:n,isFaded:!n&&t.isFaded(e)}}const na=["id","classes","color","gradientId","slots","slotProps","onClick"];function oa(e){return et("MuiAreaElement",e)}function ra(e){const{id:t,classes:n,color:r,gradientId:a,slots:s,slotProps:l,onClick:u}=e,c=(0,f.A)(e,na),d=st(),{isFaded:p,isHighlighted:h}=ta({seriesId:t}),m={id:t,classes:n,color:r,gradientId:a,isFaded:p,isHighlighted:h},g=(e=>{const{classes:t,id:n,isFaded:o,isHighlighted:r}=e;return De({root:["root",`series-${n}`,r&&"highlighted",o&&"faded"]},oa,t)})(m),v=s?.area??ea,y=Xe({elementType:v,externalSlotProps:l?.area,additionalProps:(0,i.A)({},d({type:"line",seriesId:t}),{onClick:u,cursor:u?"pointer":"unset"}),className:g.root,ownerState:m});return(0,o.jsx)(v,(0,i.A)({},c,y))}function ia(e){return void 0!==e.bandwidth}function aa(e){return ia(e)?t=>(e(t)??0)+e.bandwidth()/2:t=>e(t)}tt("MuiAreaElement",["root","highlighted","faded"]);const sa=Math.abs,la=Math.atan2,ua=Math.cos,ca=Math.max,da=Math.min,pa=Math.sin,ha=Math.sqrt,fa=1e-12,ma=Math.PI,ga=ma/2,va=2*ma;function ya(e){return e>=1?ga:e<=-1?-ga:Math.asin(e)}function ba(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function xa(e,t){this._context=e,this._k=(1-t)/6}function wa(e,t){this._context=e,this._alpha=t}xa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ba(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ba(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(e){return new xa(e,t)}return n.tension=function(t){return e(+t)},n}(0),wa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,o=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var o=e._x1,r=e._y1,i=e._x2,a=e._y2;if(e._l01_a>fa){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);o=(o*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>fa){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(o,r,i,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _a=function e(t){function n(e){return t?new wa(e,t):new xa(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ca(e){return e<0?-1:1}function Aa(e,t,n){var o=e._x1-e._x0,r=t-e._x1,i=(e._y1-e._y0)/(o||r<0&&-0),a=(n-e._y1)/(r||o<0&&-0),s=(i*r+a*o)/(o+r);return(Ca(i)+Ca(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function ka(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Sa(e,t,n){var o=e._x0,r=e._y0,i=e._x1,a=e._y1,s=(i-o)/3;e._context.bezierCurveTo(o+s,r+s*t,i-s,a-s*n,i,a)}function Ma(e){this._context=e}function Pa(e){this._context=new Ia(e)}function Ia(e){this._context=e}function Ra(e){return new Ma(e)}function Ta(e){return new Pa(e)}function Ea(e){this._context=e}function Oa(e){var t,n,o=e.length-1,r=new Array(o),i=new Array(o),a=new Array(o);for(r[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<o-1;++t)r[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(r[o-1]=2,i[o-1]=7,a[o-1]=8*e[o-1]+e[o],t=1;t<o;++t)n=r[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(r[o-1]=a[o-1]/i[o-1],t=o-2;t>=0;--t)r[t]=(a[t]-r[t+1])/i[t];for(i[o-1]=(e[o]+r[o-1])/2,t=0;t<o-1;++t)i[t]=2*e[t+1]-r[t+1];return[r,i]}function La(e){return new Ea(e)}function za(e,t){this._context=e,this._t=t}function ja(e){return new za(e,.5)}function $a(e){return new za(e,0)}function Fa(e){return new za(e,1)}function Na(e){switch(e){case"catmullRom":return _a.alpha(.5);case"linear":return Se;case"monotoneX":default:return Ra;case"monotoneY":return Ta;case"natural":return La;case"step":return ja;case"stepBefore":return $a;case"stepAfter":return Fa}}function Da(t){const{isReversed:n,gradientId:r,size:i,direction:a,scale:s,colorMap:l}=t;return i<=0?null:(0,o.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${n?1:2}`]:`${i}px`,gradientUnits:"userSpaceOnUse",children:l.thresholds.map((t,r)=>{const a=s(t);if(void 0===a)return null;const u=n?1-a/i:a/i;return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)("stop",{offset:u,stopColor:l.colors[r],stopOpacity:1}),(0,o.jsx)("stop",{offset:u,stopColor:l.colors[r+1],stopOpacity:1})]},t.toString()+r)})})}function Ha(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Ba(e){const{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:a,scale:s,colorScale:l,colorMap:u}=e,c=[u.min??0,u.max??100],d=c.map(s).filter(e=>void 0!==e);if(2!==d.length)return null;const p="number"==typeof c[0]?Li(c[0],c[1]):Ha(c[0],c[1]),h=Math.round((Math.max(...d)-Math.min(...d))/10),f=`${c[0]}-${c[1]}-`;return(0,o.jsx)("linearGradient",{id:r,x1:"0",x2:"0",y1:"0",y2:"0",[`${a}${n?1:2}`]:"objectBoundingBox"===t?1:`${i}px`,gradientUnits:t??"userSpaceOnUse",children:Array.from({length:h+1},(e,t)=>{const r=p(t/h);if(void 0===r)return null;const a=s(r);if(void 0===a)return null;const u=n?1-a/i:a/i,c=l(r);return null===c?null:(0,o.jsx)("stop",{offset:u,stopColor:c,stopOpacity:1},f+t)})})}function Va(){const{chartId:t}=e.useContext(Gi);return e.useCallback((e,n)=>`${t}-gradient-${n}-${e}`,[t])}function Wa(){const{top:e,height:t,bottom:n,left:r,width:i,right:a}=qi(),s=e+t+n,l=r+i+a,u=Va(),{xAxisIds:c,xAxis:d,yAxisIds:p,yAxis:h}=Ne();return(0,o.jsxs)("defs",{children:[p.filter(e=>void 0!==h[e].colorMap).map(e=>{const t=u(e,"y"),{colorMap:n,scale:r,colorScale:i,reverse:a}=h[e];return"piecewise"===n?.type?(0,o.jsx)(Da,{isReversed:!a,scale:r,colorMap:n,size:s,gradientId:t,direction:"y"},t):"continuous"===n?.type?(0,o.jsx)(Ba,{isReversed:!a,scale:r,colorScale:i,colorMap:n,size:s,gradientId:t,direction:"y"},t):null}),c.filter(e=>void 0!==d[e].colorMap).map(e=>{const t=u(e,"x"),{colorMap:n,scale:r,reverse:i,colorScale:a}=d[e];return"piecewise"===n?.type?(0,o.jsx)(Da,{isReversed:i,scale:r,colorMap:n,size:l,gradientId:t,direction:"x"},t):"continuous"===n?.type?(0,o.jsx)(Ba,{isReversed:i,scale:r,colorScale:a,colorMap:n,size:l,gradientId:t,direction:"x"},t):null})]})}Ma.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Sa(this,this._t0,ka(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Sa(this,ka(this,n=Aa(this,e,t)),n);break;default:Sa(this,this._t0,n=Aa(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Pa.prototype=Object.create(Ma.prototype)).point=function(e,t){Ma.prototype.point.call(this,t,e)},Ia.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,o,r,i){this._context.bezierCurveTo(t,e,o,n,i,r)}},Object.defineProperty(La,"name",{value:"default",configurable:!0}),Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var o=Oa(e),r=Oa(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(o[0][i],r[0][i],o[1][i],r[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Object.defineProperty(ja,"name",{value:"default",configurable:!0}),za.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}},Object.defineProperty(Ha,"name",{value:"default",configurable:!0});const Ua=e.createContext({isInitialized:!1,data:{}});function Ga(){const{isInitialized:t,data:n}=e.useContext(Ua);if(!t)throw new Error(["MUI X: Could not find the series ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}function Za(){const t=Ga();return e.useMemo(()=>t.line,[t.line])}function Ka(){const t=Ga();return e.useMemo(()=>t.scatter,[t.scatter])}const qa=e.createContext({isInitialized:!1,data:{skipAnimation:void 0}});function Xa(t){const{isInitialized:n,data:o}=e.useContext(qa);if(!n)throw new Error(["MUI X: Could not find the animation ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return t||o.skipAnimation}const Ya=["slots","slotProps","onItemClick","skipAnimation"];function Qa(t){const{slots:n,slotProps:r,onItemClick:a,skipAnimation:s}=t,l=(0,f.A)(t,Ya),u=Xa(s),c=Va(),d=(()=>{const t=Za(),n=Ne(),o=e.useMemo(()=>{if(void 0===t)return[];const{series:e,stackingGroups:o}=t,{xAxis:r,yAxis:a,xAxisIds:s,yAxisIds:l}=n,u=s[0],c=l[0];return o.flatMap(({ids:t})=>[...t].reverse().map(t=>{const{xAxisId:n,yAxisId:o,xAxisKey:s=u,yAxisKey:l=c,stackedData:d,data:p,connectNulls:h,baseline:f}=e[t],m=n??s,g=o??l,v=aa(r[m].scale),y=a[g].scale,b=r[m].data,x=a[g].colorScale&&[g,"y"]||r[m].colorScale&&[m,"x"]||void 0,w=$e().x(e=>v(e.x)).defined((e,t)=>h||null!=p[t]).y0(e=>{if("number"==typeof f)return y(f);if("max"===f)return y.range()[1];if("min"===f)return y.range()[0];const t=e.y&&y(e.y[0]);return Number.isNaN(t)?y.range()[0]:t}).y1(e=>e.y&&y(e.y[1])),_=Na(e[t].curve),C=b?.map((e,t)=>({x:e,y:d[t]}))??[],A=h?C.filter((e,t)=>null!=p[t]):C,k=w.curve(_)(A)||"";return(0,i.A)({},e[t],{gradientUsed:x,d:k,seriesId:t})}))},[t,n]);return o})();return(0,o.jsx)("g",(0,i.A)({},l,{children:d.map(({d:e,seriesId:t,color:i,area:s,gradientUsed:l})=>!!s&&(0,o.jsx)(ra,{id:t,d:e,color:i,gradientId:l&&c(...l),slots:n,slotProps:r,onClick:a&&(e=>a(e,{type:"line",seriesId:t})),skipAnimation:u},t))}))}const Ja=["d","skipAnimation","ownerState"],es=dt(Jr.path,{name:"MuiLineElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({strokeWidth:2,strokeLinejoin:"round",fill:"none",stroke:e.gradientId&&`url(#${e.gradientId})`||e.isHighlighted&&yi(e.color).brighter(.5).formatHex()||e.color,transition:"opacity 0.2s ease-in, stroke 0.2s ease-in",opacity:e.isFaded?.3:1}));function ts(e){const{d:t,skipAnimation:n,ownerState:r}=e,a=(0,f.A)(e,Ja),s=Tr([Fi(t)],{from:{value:0},to:{value:1},enter:{value:1},reset:!1,immediate:n});return(0,o.jsx)(Yi,{skipAnimation:n,id:`${r.id}-line-clip`,children:s((e,t)=>(0,o.jsx)(es,(0,i.A)({},a,{ownerState:r,d:e.value.to(t)})))})}const ns=["id","classes","color","gradientId","slots","slotProps","onClick"];function os(e){return et("MuiLineElement",e)}function rs(e){const{id:t,classes:n,color:r,gradientId:a,slots:s,slotProps:l,onClick:u}=e,c=(0,f.A)(e,ns),d=st(),{isFaded:p,isHighlighted:h}=ta({seriesId:t}),m={id:t,classes:n,color:r,gradientId:a,isFaded:p,isHighlighted:h},g=(e=>{const{classes:t,id:n,isFaded:o,isHighlighted:r}=e;return De({root:["root",`series-${n}`,r&&"highlighted",o&&"faded"]},os,t)})(m),v=s?.line??ts,y=Xe({elementType:v,externalSlotProps:l?.line,additionalProps:(0,i.A)({},d({type:"line",seriesId:t}),{onClick:u,cursor:u?"pointer":"unset"}),className:g.root,ownerState:m});return(0,o.jsx)(v,(0,i.A)({},c,y))}tt("MuiLineElement",["root","highlighted","faded"]);const is=["slots","slotProps","skipAnimation","onItemClick"];function as(t){const{slots:n,slotProps:r,skipAnimation:a,onItemClick:s}=t,l=(0,f.A)(t,is),u=Xa(a),c=Va(),d=(()=>{const t=Za(),n=Ne();return e.useMemo(()=>{if(void 0===t)return[];const{series:e,stackingGroups:o}=t,{xAxis:r,yAxis:a,xAxisIds:s,yAxisIds:l}=n,u=s[0],c=l[0];return o.flatMap(({ids:t})=>t.flatMap(t=>{const{xAxisId:n,yAxisId:o,xAxisKey:s=u,yAxisKey:l=c,stackedData:d,data:p,connectNulls:h}=e[t],f=n??s,m=o??l,g=aa(r[f].scale),v=a[m].scale,y=r[f].data,b=a[m].colorScale&&[m,"y"]||r[f].colorScale&&[f,"x"]||void 0,x=je().x(e=>g(e.x)).defined((e,t)=>h||null!=p[t]).y(e=>v(e.y[1])),w=y?.map((e,t)=>({x:e,y:d[t]}))??[],_=h?w.filter((e,t)=>null!=p[t]):w,C=x.curve(Na(e[t].curve))(_)||"";return(0,i.A)({},e[t],{gradientUsed:b,d:C,seriesId:t})}))},[t,n])})();return(0,o.jsx)("g",(0,i.A)({},l,{children:d.map(({d:e,seriesId:t,color:i,gradientUsed:a})=>(0,o.jsx)(rs,{id:t,d:e,color:i,gradientId:a&&c(...a),skipAnimation:u,slots:n,slotProps:r,onClick:s&&(e=>s(e,{type:"line",seriesId:t}))},t))}))}function ss(){const e=p(xe);return e[we]||e}const ls=["#02B2AF","#2E96FF","#B800D8","#60009B","#2731C8","#03008D"],us=["#02B2AF","#72CCFF","#DA00FF","#9001CB","#2E96FF","#3B48E0"],cs=e=>"dark"===e?us:ls,ds=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],ps=({series:e,colors:t,seriesFormatters:n,dataset:o})=>{const r={};e.forEach((e,n)=>{const{id:o=`auto-generated-id-${n}`,type:a}=e;if(void 0===r[a]&&(r[a]={series:{},seriesOrder:[]}),void 0!==r[a]?.series[o])throw new Error(`MUI X: series' id "${o}" is not unique.`);r[a].series[o]=(0,i.A)({id:o},function(e,t,n=ds){return"pie"===e.type?(0,i.A)({},e,{data:e.data.map((e,t)=>(0,i.A)({color:n[t%n.length]},e))}):(0,i.A)({color:n[t%n.length]},e)}(e,n,t)),r[a].seriesOrder.push(o)});const a={};return Object.keys(n).forEach(e=>{const t=r[e];void 0!==t&&(a[e]=n[e]?.(t,o)??r[e])}),a},hs=e.createContext({isInitialized:!1,data:{colorProcessors:{},seriesFormatters:{},xExtremumGetters:{},yExtremumGetters:{},rotationExtremumGetters:{},radiusExtremumGetters:{}}});function fs(t){const{series:n,dataset:r,colors:i=cs,children:a}=t,s=function(){const{isInitialized:t,data:n}=e.useContext(hs);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.seriesFormatters}(),l=ss(),u=e.useMemo(()=>({isInitialized:!0,data:ps({series:n,colors:"function"==typeof i?i(l.palette.mode):i,seriesFormatters:s,dataset:r})}),[n,i,l.palette.mode,s,r]);return(0,o.jsx)(Ua.Provider,{value:u,children:a})}function ms(e,t){const n=e.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n.matrixTransform(e.getScreenCTM().inverse())}function gs(){const{isInitialized:t,data:n}=e.useContext(Zi);if(!t)throw new Error(["MUI X: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}function vs(e){return e instanceof Date?e.getTime():e}const ys=["children","width","height","viewBox","disableAxisListener","className","title","desc"],bs=dt("svg",{name:"MuiChartsSurface",slot:"Root"})(()=>({touchAction:"none"})),xs=e.forwardRef(function(t,n){const r=_e({props:t,name:"MuiChartsSurface"}),{children:a,width:s,height:l,viewBox:u,disableAxisListener:c=!1,className:d,title:p,desc:h}=r,m=(0,f.A)(r,ys),g=(0,i.A)({width:s,height:l,x:0,y:0},u);return(t=>{const n=gs(),o=qi(),{xAxis:r,yAxis:i,xAxisIds:a,yAxisIds:s}=Ne(),{dispatch:l}=e.useContext(nt),u=a[0],c=s[0],d=e.useRef({isInChart:!1,x:-1,y:-1});e.useEffect(()=>{const e=n.current;if(null===e||t)return()=>{};function a(e,t){const{scale:n,data:o,reverse:r}=e;if(!ia(n)){const e=n.invert(t);if(void 0===o)return{value:e,index:-1};const r=vs(e),i=o?.findIndex((t,n)=>{const i=vs(t);return i>r&&(0===n||Math.abs(r-i)<=Math.abs(r-vs(o[n-1])))||i<=r&&(n===o.length-1||Math.abs(vs(e)-i)<Math.abs(vs(e)-vs(o[n+1])))});return{value:void 0!==i&&i>=0?o[i]:e,index:i}}const i=0===n.bandwidth()?Math.floor((t-Math.min(...n.range())+n.step()/2)/n.step()):Math.floor((t-Math.min(...n.range()))/n.step());if(i<0||i>=o.length)return null;if(r){const e=o.length-1-i;return{index:e,value:o[e]}}return{index:i,value:o[i]}}const s=()=>{d.current={isInChart:!1,x:-1,y:-1},l({type:"exitChart"})},p=t=>{const n="targetTouches"in t?t.targetTouches[0]:t,s=ms(e,n);if(d.current.x=s.x,d.current.y=s.y,!o.isPointInside(s,{targetElement:t.target}))return void(d.current.isInChart&&(l({type:"exitChart"}),d.current.isInChart=!1));d.current.isInChart=!0;const p=a(r[u],s.x),h=a(i[c],s.y);l({type:"updateAxis",data:{x:p,y:h}})},h=e=>{const t=e.currentTarget;t&&t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)};return e.addEventListener("pointerdown",h),e.addEventListener("pointermove",p),e.addEventListener("pointerout",s),e.addEventListener("pointercancel",s),e.addEventListener("pointerleave",s),()=>{e.removeEventListener("pointerdown",h),e.removeEventListener("pointermove",p),e.removeEventListener("pointerout",s),e.removeEventListener("pointercancel",s),e.removeEventListener("pointerleave",s)}},[n,l,c,i,u,r,t,o])})(c),(0,o.jsxs)(bs,(0,i.A)({width:s,height:l,viewBox:`${g.x} ${g.y} ${g.width} ${g.height}`,ref:n,className:d},m,{children:[(0,o.jsx)("title",{children:p}),(0,o.jsx)("desc",{children:h}),a]}))});function ws(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _s(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Cs(e){let t,n,o;function r(e,o,r=0,i=e.length){if(r<i){if(0!==t(o,o))return i;do{const t=r+i>>>1;n(e[t],o)<0?r=t+1:i=t}while(r<i)}return r}return 2!==e.length?(t=ws,n=(t,n)=>ws(e(t),n),o=(t,n)=>e(t)-n):(t=e===ws||e===_s?e:As,n=e,o=e),{left:r,center:function(e,t,n=0,i=e.length){const a=r(e,t,n,i-1);return a>n&&o(e[a-1],t)>-o(e[a],t)?a-1:a},right:function(e,o,r=0,i=e.length){if(r<i){if(0!==t(o,o))return i;do{const t=r+i>>>1;n(e[t],o)<=0?r=t+1:i=t}while(r<i)}return r}}}function As(){return 0}const ks=Math.sqrt(50),Ss=Math.sqrt(10),Ms=Math.sqrt(2);function Ps(e,t,n){const o=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(o)),i=o/Math.pow(10,r),a=i>=ks?10:i>=Ss?5:i>=Ms?2:1;let s,l,u;return r<0?(u=Math.pow(10,-r)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,r)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?Ps(e,t,2*n):[s,l,u]}function Is(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const o=t<e,[r,i,a]=o?Ps(t,e,n):Ps(e,t,n);if(!(i>=r))return[];const s=i-r+1,l=new Array(s);if(o)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(r+e)/-a;else for(let e=0;e<s;++e)l[e]=(r+e)*a;return l}function Rs(e,t,n){return Ps(e=+e,t=+t,n=+n)[2]}function Ts(e,t,n){n=+n;const o=(t=+t)<(e=+e),r=o?Rs(t,e,n):Rs(e,t,n);return(o?-1:1)*(r<0?1/-r:r)}const Es=1e3,Os=6e4,Ls=36e5,zs=864e5,js=6048e5,$s=31536e6,Fs=new Date,Ns=new Date;function Ds(e,t,n,o){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,o,i)=>{const a=[];if(n=r.ceil(n),i=null==i?1:Math.floor(i),!(n<o&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<o);return a},r.filter=n=>Ds(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,o)=>{if(e>=e)if(o<0)for(;++o<=0;)for(;t(e,-1),!n(e););else for(;--o>=0;)for(;t(e,1),!n(e););}),n&&(r.count=(t,o)=>(Fs.setTime(+t),Ns.setTime(+o),e(Fs),e(Ns),Math.floor(n(Fs,Ns))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(o?t=>o(t)%e===0:t=>r.count(0,t)%e===0):r:null)),r}const Hs=Ds(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hs.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Ds(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Hs:null),Hs.range;const Bs=Ds(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Es)},(e,t)=>(t-e)/Es,e=>e.getUTCSeconds()),Vs=(Bs.range,Ds(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Es)},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getMinutes())),Ws=(Vs.range,Ds(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getUTCMinutes())),Us=(Ws.range,Ds(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Es-e.getMinutes()*Os)},(e,t)=>{e.setTime(+e+t*Ls)},(e,t)=>(t-e)/Ls,e=>e.getHours())),Gs=(Us.range,Ds(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ls)},(e,t)=>(t-e)/Ls,e=>e.getUTCHours())),Zs=(Gs.range,Ds(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Os)/zs,e=>e.getDate()-1)),Ks=(Zs.range,Ds(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zs,e=>e.getUTCDate()-1)),qs=(Ks.range,Ds(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/zs,e=>Math.floor(e/zs)));function Xs(e){return Ds(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Os)/js)}qs.range;const Ys=Xs(0),Qs=Xs(1),Js=Xs(2),el=Xs(3),tl=Xs(4),nl=Xs(5),ol=Xs(6);function rl(e){return Ds(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/js)}Ys.range,Qs.range,Js.range,el.range,tl.range,nl.range,ol.range;const il=rl(0),al=rl(1),sl=rl(2),ll=rl(3),ul=rl(4),cl=rl(5),dl=rl(6),pl=(il.range,al.range,sl.range,ll.range,ul.range,cl.range,dl.range,Ds(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),hl=(pl.range,Ds(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),fl=(hl.range,Ds(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));fl.every=e=>isFinite(e=Math.floor(e))&&e>0?Ds(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,fl.range;const ml=Ds(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function gl(e,t,n,o,r,i){const a=[[Bs,1,Es],[Bs,5,5e3],[Bs,15,15e3],[Bs,30,3e4],[i,1,Os],[i,5,3e5],[i,15,9e5],[i,30,18e5],[r,1,Ls],[r,3,108e5],[r,6,216e5],[r,12,432e5],[o,1,zs],[o,2,1728e5],[n,1,js],[t,1,2592e6],[t,3,7776e6],[e,1,$s]];function s(t,n,o){const r=Math.abs(n-t)/o,i=Cs(([,,e])=>e).right(a,r);if(i===a.length)return e.every(Ts(t/$s,n/$s,o));if(0===i)return Hs.every(Math.max(Ts(t,n,o),1));const[s,l]=a[r/a[i-1][2]<a[i][2]/r?i-1:i];return s.every(l)}return[function(e,t,n){const o=t<e;o&&([e,t]=[t,e]);const r=n&&"function"==typeof n.range?n:s(e,t,n),i=r?r.range(e,+t+1):[];return o?i.reverse():i},s]}ml.every=e=>isFinite(e=Math.floor(e))&&e>0?Ds(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,ml.range;const[vl,yl]=gl(ml,hl,il,qs,Gs,Ws),[bl,xl]=gl(fl,pl,Ys,Zs,Us,Vs);function wl(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function _l(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Cl(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Al,kl,Sl,Ml={"-":"",_:" ",0:"0"},Pl=/^\s*\d+/,Il=/^%/,Rl=/[\\^$*+?|[\]().{}]/g;function Tl(e,t,n){var o=e<0?"-":"",r=(o?-e:e)+"",i=r.length;return o+(i<n?new Array(n-i+1).join(t)+r:r)}function El(e){return e.replace(Rl,"\\$&")}function Ol(e){return new RegExp("^(?:"+e.map(El).join("|")+")","i")}function Ll(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function zl(e,t,n){var o=Pl.exec(t.slice(n,n+1));return o?(e.w=+o[0],n+o[0].length):-1}function jl(e,t,n){var o=Pl.exec(t.slice(n,n+1));return o?(e.u=+o[0],n+o[0].length):-1}function $l(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.U=+o[0],n+o[0].length):-1}function Fl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.V=+o[0],n+o[0].length):-1}function Nl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.W=+o[0],n+o[0].length):-1}function Dl(e,t,n){var o=Pl.exec(t.slice(n,n+4));return o?(e.y=+o[0],n+o[0].length):-1}function Hl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.y=+o[0]+(+o[0]>68?1900:2e3),n+o[0].length):-1}function Bl(e,t,n){var o=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return o?(e.Z=o[1]?0:-(o[2]+(o[3]||"00")),n+o[0].length):-1}function Vl(e,t,n){var o=Pl.exec(t.slice(n,n+1));return o?(e.q=3*o[0]-3,n+o[0].length):-1}function Wl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.m=o[0]-1,n+o[0].length):-1}function Ul(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.d=+o[0],n+o[0].length):-1}function Gl(e,t,n){var o=Pl.exec(t.slice(n,n+3));return o?(e.m=0,e.d=+o[0],n+o[0].length):-1}function Zl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.H=+o[0],n+o[0].length):-1}function Kl(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.M=+o[0],n+o[0].length):-1}function ql(e,t,n){var o=Pl.exec(t.slice(n,n+2));return o?(e.S=+o[0],n+o[0].length):-1}function Xl(e,t,n){var o=Pl.exec(t.slice(n,n+3));return o?(e.L=+o[0],n+o[0].length):-1}function Yl(e,t,n){var o=Pl.exec(t.slice(n,n+6));return o?(e.L=Math.floor(o[0]/1e3),n+o[0].length):-1}function Ql(e,t,n){var o=Il.exec(t.slice(n,n+1));return o?n+o[0].length:-1}function Jl(e,t,n){var o=Pl.exec(t.slice(n));return o?(e.Q=+o[0],n+o[0].length):-1}function eu(e,t,n){var o=Pl.exec(t.slice(n));return o?(e.s=+o[0],n+o[0].length):-1}function tu(e,t){return Tl(e.getDate(),t,2)}function nu(e,t){return Tl(e.getHours(),t,2)}function ou(e,t){return Tl(e.getHours()%12||12,t,2)}function ru(e,t){return Tl(1+Zs.count(fl(e),e),t,3)}function iu(e,t){return Tl(e.getMilliseconds(),t,3)}function au(e,t){return iu(e,t)+"000"}function su(e,t){return Tl(e.getMonth()+1,t,2)}function lu(e,t){return Tl(e.getMinutes(),t,2)}function uu(e,t){return Tl(e.getSeconds(),t,2)}function cu(e){var t=e.getDay();return 0===t?7:t}function du(e,t){return Tl(Ys.count(fl(e)-1,e),t,2)}function pu(e){var t=e.getDay();return t>=4||0===t?tl(e):tl.ceil(e)}function hu(e,t){return e=pu(e),Tl(tl.count(fl(e),e)+(4===fl(e).getDay()),t,2)}function fu(e){return e.getDay()}function mu(e,t){return Tl(Qs.count(fl(e)-1,e),t,2)}function gu(e,t){return Tl(e.getFullYear()%100,t,2)}function vu(e,t){return Tl((e=pu(e)).getFullYear()%100,t,2)}function yu(e,t){return Tl(e.getFullYear()%1e4,t,4)}function bu(e,t){var n=e.getDay();return Tl((e=n>=4||0===n?tl(e):tl.ceil(e)).getFullYear()%1e4,t,4)}function xu(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tl(t/60|0,"0",2)+Tl(t%60,"0",2)}function wu(e,t){return Tl(e.getUTCDate(),t,2)}function _u(e,t){return Tl(e.getUTCHours(),t,2)}function Cu(e,t){return Tl(e.getUTCHours()%12||12,t,2)}function Au(e,t){return Tl(1+Ks.count(ml(e),e),t,3)}function ku(e,t){return Tl(e.getUTCMilliseconds(),t,3)}function Su(e,t){return ku(e,t)+"000"}function Mu(e,t){return Tl(e.getUTCMonth()+1,t,2)}function Pu(e,t){return Tl(e.getUTCMinutes(),t,2)}function Iu(e,t){return Tl(e.getUTCSeconds(),t,2)}function Ru(e){var t=e.getUTCDay();return 0===t?7:t}function Tu(e,t){return Tl(il.count(ml(e)-1,e),t,2)}function Eu(e){var t=e.getUTCDay();return t>=4||0===t?ul(e):ul.ceil(e)}function Ou(e,t){return e=Eu(e),Tl(ul.count(ml(e),e)+(4===ml(e).getUTCDay()),t,2)}function Lu(e){return e.getUTCDay()}function zu(e,t){return Tl(al.count(ml(e)-1,e),t,2)}function ju(e,t){return Tl(e.getUTCFullYear()%100,t,2)}function $u(e,t){return Tl((e=Eu(e)).getUTCFullYear()%100,t,2)}function Fu(e,t){return Tl(e.getUTCFullYear()%1e4,t,4)}function Nu(e,t){var n=e.getUTCDay();return Tl((e=n>=4||0===n?ul(e):ul.ceil(e)).getUTCFullYear()%1e4,t,4)}function Du(){return"+0000"}function Hu(){return"%"}function Bu(e){return+e}function Vu(e){return Math.floor(+e/1e3)}Al=function(e){var t=e.dateTime,n=e.date,o=e.time,r=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Ol(r),c=Ll(r),d=Ol(i),p=Ll(i),h=Ol(a),f=Ll(a),m=Ol(s),g=Ll(s),v=Ol(l),y=Ll(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:tu,e:tu,f:au,g:vu,G:bu,H:nu,I:ou,j:ru,L:iu,m:su,M:lu,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Bu,s:Vu,S:uu,u:cu,U:du,V:hu,w:fu,W:mu,x:null,X:null,y:gu,Y:yu,Z:xu,"%":Hu},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:wu,e:wu,f:Su,g:$u,G:Nu,H:_u,I:Cu,j:Au,L:ku,m:Mu,M:Pu,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Bu,s:Vu,S:Iu,u:Ru,U:Tu,V:Ou,w:Lu,W:zu,x:null,X:null,y:ju,Y:Fu,Z:Du,"%":Hu},w={a:function(e,t,n){var o=h.exec(t.slice(n));return o?(e.w=f.get(o[0].toLowerCase()),n+o[0].length):-1},A:function(e,t,n){var o=d.exec(t.slice(n));return o?(e.w=p.get(o[0].toLowerCase()),n+o[0].length):-1},b:function(e,t,n){var o=v.exec(t.slice(n));return o?(e.m=y.get(o[0].toLowerCase()),n+o[0].length):-1},B:function(e,t,n){var o=m.exec(t.slice(n));return o?(e.m=g.get(o[0].toLowerCase()),n+o[0].length):-1},c:function(e,n,o){return A(e,t,n,o)},d:Ul,e:Ul,f:Yl,g:Hl,G:Dl,H:Zl,I:Zl,j:Gl,L:Xl,m:Wl,M:Kl,p:function(e,t,n){var o=u.exec(t.slice(n));return o?(e.p=c.get(o[0].toLowerCase()),n+o[0].length):-1},q:Vl,Q:Jl,s:eu,S:ql,u:jl,U:$l,V:Fl,w:zl,W:Nl,x:function(e,t,o){return A(e,n,t,o)},X:function(e,t,n){return A(e,o,t,n)},y:Hl,Y:Dl,Z:Bl,"%":Ql};function _(e,t){return function(n){var o,r,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(r=Ml[o=e.charAt(++s)])?o=e.charAt(++s):r="e"===o?" ":"0",(i=t[o])&&(o=i(n,r)),a.push(o),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var o,r,i=Cl(1900,void 0,1);if(A(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(o=_l(Cl(i.y,0,1))).getUTCDay(),o=r>4||0===r?al.ceil(o):al(o),o=Ks.offset(o,7*(i.V-1)),i.y=o.getUTCFullYear(),i.m=o.getUTCMonth(),i.d=o.getUTCDate()+(i.w+6)%7):(r=(o=wl(Cl(i.y,0,1))).getDay(),o=r>4||0===r?Qs.ceil(o):Qs(o),o=Zs.offset(o,7*(i.V-1)),i.y=o.getFullYear(),i.m=o.getMonth(),i.d=o.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?_l(Cl(i.y,0,1)).getUTCDay():wl(Cl(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,_l(i)):wl(i)}}function A(e,t,n,o){for(var r,i,a=0,s=t.length,l=n.length;a<s;){if(o>=l)return-1;if(37===(r=t.charCodeAt(a++))){if(r=t.charAt(a++),!(i=w[r in Ml?t.charAt(a++):r])||(o=i(e,n,o))<0)return-1}else if(r!=n.charCodeAt(o++))return-1}return o}return b.x=_(n,b),b.X=_(o,b),b.c=_(t,b),x.x=_(n,x),x.X=_(o,x),x.c=_(t,x),{format:function(e){var t=_(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),kl=Al.format,Al.parse,Sl=Al.utcFormat,Al.utcParse;const Wu=Cs(ws),Uu=Wu.right,Gu=(Wu.left,Cs(function(e){return null===e?NaN:+e}).center,Uu);function Zu(e,t,n,o,r){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*o+a*r)/6}function Ku(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[o],i=e[o+1],a=o>0?e[o-1]:2*r-i,s=o<t-1?e[o+2]:2*i-r;return Zu((n-o/t)*t,a,r,i,s)}}function qu(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),r=e[(o+t-1)%t],i=e[o%t],a=e[(o+1)%t],s=e[(o+2)%t];return Zu((n-o/t)*t,r,i,a,s)}}Object.defineProperty(Ku,"name",{value:"default",configurable:!0}),Object.defineProperty(qu,"name",{value:"default",configurable:!0});const Xu=e=>()=>e;function Yu(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Xu(isNaN(e)?t:e)}(Object.getOwnPropertyDescriptor(Xu,"name")||{}).writable||Object.defineProperty(Xu,"name",{value:"default",configurable:!0});const Qu=function e(t){var n=function(e){return 1===(e=+e)?Yu:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}(t,n,e):Xu(isNaN(t)?n:t)}}(t);function o(e,t){var o=n((e=wi(e)).r,(t=wi(t)).r),r=n(e.g,t.g),i=n(e.b,t.b),a=Yu(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function Ju(e){return function(t){var n,o,r=t.length,i=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n<r;++n)o=wi(t[n]),i[n]=o.r||0,a[n]=o.g||0,s[n]=o.b||0;return i=e(i),a=e(a),s=e(s),o.opacity=1,function(e){return o.r=i(e),o.g=a(e),o.b=s(e),o+""}}}function ec(e,t){var n,o=t?t.length:0,r=e?Math.min(o,e.length):0,i=new Array(r),a=new Array(o);for(n=0;n<r;++n)i[n]=oc(e[n],t[n]);for(;n<o;++n)a[n]=t[n];return function(e){for(n=0;n<r;++n)a[n]=i[n](e);return a}}function tc(e,t){var n,o={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?o[n]=oc(e[n],t[n]):r[n]=t[n];return function(e){for(n in o)r[n]=o[n](e);return r}}function nc(e,t){t||(t=[]);var n,o=e?Math.min(t.length,e.length):0,r=t.slice();return function(i){for(n=0;n<o;++n)r[n]=e[n]*(1-i)+t[n]*i;return r}}function oc(e,t){var n,o,r=typeof t;return null==t||"boolean"===r?Xu(t):("number"===r?Li:"string"===r?(n=yi(t))?(t=n,Qu):$i:t instanceof yi?Qu:t instanceof Date?Ha:(o=t,!ArrayBuffer.isView(o)||o instanceof DataView?Array.isArray(t)?ec:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?tc:Li:nc))(e,t)}function rc(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function ic(e){return+e}Ju(Ku),Ju(qu),Object.defineProperty(function(e,t){return((void 0)(t)?void 0:ec)(e,t)},"name",{value:"default",configurable:!0}),Object.defineProperty(tc,"name",{value:"default",configurable:!0}),Object.defineProperty(nc,"name",{value:"default",configurable:!0}),Object.defineProperty(oc,"name",{value:"default",configurable:!0}),Object.defineProperty(rc,"name",{value:"default",configurable:!0});var ac=[0,1];function sc(e){return e}function lc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function uc(e,t,n){var o=e[0],r=e[1],i=t[0],a=t[1];return r<o?(o=lc(r,o),i=n(a,i)):(o=lc(o,r),i=n(i,a)),function(e){return i(o(e))}}function cc(e,t,n){var o=Math.min(e.length,t.length)-1,r=new Array(o),i=new Array(o),a=-1;for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<o;)r[a]=lc(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Gu(e,t,1,o)-1;return i[n](r[n](t))}}function dc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pc(){var e,t,n,o,r,i,a=ac,s=ac,l=oc,u=sc;function c(){var e=Math.min(a.length,s.length);return u!==sc&&(u=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),o=e>2?cc:uc,r=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(r||(r=o(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((i||(i=o(s,a.map(e),Li)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,ic),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=rc,c()},d.clamp=function(e){return arguments.length?(u=!!e||sc,c()):u!==sc},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,o){return e=n,t=o,c()}}function hc(){return pc()(sc,sc)}function fc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function mc(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}function gc(e,t){var n,o=0,r=(e=e.slice()).length-1,i=e[o],a=e[r];return a<i&&(n=o,o=r,r=n,n=i,i=a,a=n),e[o]=t.floor(i),e[r]=t.ceil(a),e}function vc(e){return new Date(e)}function yc(e){return e instanceof Date?+e:+new Date(+e)}function bc(e,t,n,o,r,i,a,s,l,u){var c=hc(),d=c.invert,p=c.domain,h=u(".%L"),f=u(":%S"),m=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),y=u("%b %d"),b=u("%B"),x=u("%Y");function w(e){return(l(e)<e?h:s(e)<e?f:a(e)<e?m:i(e)<e?g:o(e)<e?r(e)<e?v:y:n(e)<e?b:x)(e)}return c.invert=function(e){return new Date(d(e))},c.domain=function(e){return arguments.length?p(Array.from(e,yc)):p().map(vc)},c.ticks=function(t){var n=p();return e(n[0],n[n.length-1],null==t?10:t)},c.tickFormat=function(e,t){return null==t?w:u(t)},c.nice=function(e){var n=p();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?p(gc(n,e)):c},c.copy=function(){return dc(c,bc(e,t,n,o,r,i,a,s,l,u))},c}function xc(){return fc.apply(bc(bl,xl,fl,pl,Ys,Zs,Us,Vs,Bs,kl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}class wc extends Map{constructor(e,t=Cc){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(_c(this,e))}has(e){return super.has(_c(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const o=t(n);return e.has(o)?e.get(o):(e.set(o,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const o=t(n);return e.has(o)&&(n=e.get(o),e.delete(o)),n}(this,e))}}function _c({_intern:e,_key:t},n){const o=t(n);return e.has(o)?e.get(o):n}function Cc(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const Ac=Symbol("implicit");function kc(){var e=new wc,t=[],n=[],o=Ac;function r(r){let i=e.get(r);if(void 0===i){if(o!==Ac)return o;e.set(r,i=t.push(r)-1)}return n[i%n.length]}return r.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new wc;for(const o of n)e.has(o)||e.set(o,t.push(o)-1);return r},r.range=function(e){return arguments.length?(n=Array.from(e),r):n.slice()},r.unknown=function(e){return arguments.length?(o=e,r):o},r.copy=function(){return kc(t,n).unknown(o)},fc.apply(r,arguments),r}function Sc(){var e,t,n=kc().unknown(void 0),o=n.domain,r=n.range,i=0,a=1,s=!1,l=0,u=0,c=.5;function d(){var n=o().length,d=a<i,p=d?a:i,h=d?i:a;e=(h-p)/Math.max(1,n-l+2*u),s&&(e=Math.floor(e)),p+=(h-p-e*(n-l))*c,t=e*(1-l),s&&(p=Math.round(p),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var o=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(r);++o<r;)i[o]=e+o*n;return i}(n).map(function(t){return p+e*t});return r(d?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(o(e),d()):o()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(u=+e,d()):u},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),d()):c},n.copy=function(){return Sc(o(),[i,a]).round(s).paddingInner(l).paddingOuter(u).align(c)},fc.apply(d(),arguments)}function Mc(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Mc(t())},e}function Pc(){return Mc(Sc.apply(null,arguments).paddingInner(1))}function Ic(e){return"band"===e.scaleType}function Rc(e){return"point"===e.scaleType}function Tc(){var e,t=[.5],n=[0,1],o=1;function r(r){return null!=r&&r<=r?n[Gu(t,r,0,o)]:e}return r.domain=function(e){return arguments.length?(t=Array.from(e),o=Math.min(t.length,n.length-1),r):t.slice()},r.range=function(e){return arguments.length?(n=Array.from(e),o=Math.min(t.length,n.length-1),r):n.slice()},r.invertExtent=function(e){var o=n.indexOf(e);return[t[o-1],t[o]]},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Tc().domain(t).range(n).unknown(e)},fc.apply(r,arguments)}var Ec,Oc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lc(e){if(!(t=Oc.exec(e)))throw new Error("invalid format: "+e);var t;return new zc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function zc(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function jc(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $c(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),o=e.slice(0,n);return[o.length>1?o[0]+o.slice(2):o,+e.slice(n+1)]}function Fc(e){return(e=$c(Math.abs(e)))?e[1]:NaN}function Nc(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fc(t)/3)))-Fc(Math.abs(e)))}function Dc(e,t){return function(n,o){for(var r=n.length,i=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>o&&(s=Math.max(1,o-l)),i.push(n.substring(r-=s,r+s)),!((l+=s+1)>o));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function Hc(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}function Bc(e){e:for(var t,n=e.length,o=1,r=-1;o<n;++o)switch(e[o]){case".":r=t=o;break;case"0":0===r&&(r=o),t=o;break;default:if(!+e[o])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}function Vc(e,t){var n=$c(e,t);if(!n)return Ec=void 0,e.toPrecision(t);var o=n[0],r=n[1],i=r-(Ec=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=o.length;return i===a?o:i>a?o+new Array(i-a+1).join("0"):i>0?o.slice(0,i)+"."+o.slice(i):"0."+new Array(1-i).join("0")+$c(e,Math.max(0,t+i-1))[0]}function Wc(e,t){var n=$c(e,t);if(!n)return e+"";var o=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+o:o.length>r+1?o.slice(0,r+1)+"."+o.slice(r+1):o+new Array(r-o.length+2).join("0")}Lc.prototype=zc.prototype,zc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},Object.defineProperty(jc,"name",{value:"default",configurable:!0}),Object.defineProperty(Fc,"name",{value:"default",configurable:!0}),Object.defineProperty(Nc,"name",{value:"default",configurable:!0}),Object.defineProperty(Dc,"name",{value:"default",configurable:!0}),Object.defineProperty(Hc,"name",{value:"default",configurable:!0}),Object.defineProperty(Bc,"name",{value:"default",configurable:!0}),Object.defineProperty(Vc,"name",{value:"default",configurable:!0}),Object.defineProperty(Wc,"name",{value:"default",configurable:!0});const Uc={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:jc,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Wc(100*e,t),r:Wc,s:Vc,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gc(e){return e}Object.defineProperty(Gc,"name",{value:"default",configurable:!0}),Object.defineProperty(Qc,"name",{value:"default",configurable:!0});var Zc,Kc,qc,Xc=Array.prototype.map,Yc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Qc(e){var t=void 0===e.grouping||void 0===e.thousands?Gc:Dc(Xc.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",r=void 0===e.decimal?".":e.decimal+"",i=void 0===e.numerals?Gc:Hc(Xc.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function u(e,u){var c=(e=Lc(e)).fill,d=e.align,p=e.sign,h=e.symbol,f=e.zero,m=e.width,g=e.comma,v=e.precision,y=e.trim,b=e.type;"n"===b?(g=!0,b="g"):Uc[b]||(void 0===v&&(v=12),y=!0,b="g"),(f||"0"===c&&"="===d)&&(f=!0,c="0",d="=");var x=(u&&void 0!==u.prefix?u.prefix:"")+("$"===h?n:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===h?o:/[%p]/.test(b)?a:"")+(u&&void 0!==u.suffix?u.suffix:""),_=Uc[b],C=/[defgprs%]/.test(b);function A(e){var n,o,a,u=x,h=w;if("c"===b)h=_(e)+h,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:_(Math.abs(e),v),y&&(e=Bc(e)),A&&0===+e&&"+"!==p&&(A=!1),u=(A?"("===p?p:s:"-"===p||"("===p?"":p)+u,h=("s"!==b||isNaN(e)||void 0===Ec?"":Yc[8+Ec/3])+h+(A&&"("===p?")":""),C)for(n=-1,o=e.length;++n<o;)if(48>(a=e.charCodeAt(n))||a>57){h=(46===a?r+e.slice(n+1):e.slice(n))+h,e=e.slice(0,n);break}}g&&!f&&(e=t(e,1/0));var k=u.length+e.length+h.length,S=k<m?new Array(m-k+1).join(c):"";switch(g&&f&&(e=t(S+e,S.length?m-h.length:1/0),S=""),d){case"<":e=u+e+h+S;break;case"=":e=u+S+e+h;break;case"^":e=S.slice(0,k=S.length>>1)+u+e+h+S.slice(k);break;default:e=S+u+e+h}return i(e)}return v=void 0===v?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(Fc(t)/3))),o=Math.pow(10,-n),r=u(((e=Lc(e)).type="f",e),{suffix:Yc[8+n/3]});return function(e){return r(o*e)}}}}function Jc(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fc(t)-Fc(e))+1}function ed(e){return Math.max(0,-Fc(Math.abs(e)))}function td(e){var t=e.domain;return e.ticks=function(e){var n=t();return Is(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var o=t();return function(e,t,n,o){var r,i=Ts(e,t,n);switch((o=Lc(null==o?",f":o)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=o.precision||isNaN(r=Nc(i,a))||(o.precision=r),qc(o,a);case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(r=Jc(i,Math.max(Math.abs(e),Math.abs(t))))||(o.precision=r-("e"===o.type));break;case"f":case"%":null!=o.precision||isNaN(r=ed(i))||(o.precision=r-2*("%"===o.type))}return Kc(o)}(o[0],o[o.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var o,r,i=t(),a=0,s=i.length-1,l=i[a],u=i[s],c=10;for(u<l&&(r=l,l=u,u=r,r=a,a=s,s=r);c-- >0;){if((r=Rs(l,u,n))===o)return i[a]=l,i[s]=u,t(i);if(r>0)l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,u=Math.floor(u*r)/r}o=r}return e},e}function nd(){var e=hc();return e.copy=function(){return dc(e,nd())},fc.apply(e,arguments),td(e)}function od(){var e=td(function(){var e,t,n,o,r,i=0,a=1,s=sc,l=!1;function u(t){return null==t||isNaN(t=+t)?r:s(0===n?.5:(t=(o(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var n,o;return arguments.length?([n,o]=t,s=e(n,o),u):[s(0),s(1)]}}return u.domain=function(r){return arguments.length?([i,a]=r,e=o(i=+i),t=o(a=+a),n=e===t?0:1/(t-e),u):[i,a]},u.clamp=function(e){return arguments.length?(l=!!e,u):l},u.interpolator=function(e){return arguments.length?(s=e,u):s},u.range=c(oc),u.rangeRound=c(rc),u.unknown=function(e){return arguments.length?(r=e,u):r},function(r){return o=r,e=r(i),t=r(a),n=e===t?0:1/(t-e),u}}()(sc));return e.copy=function(){return function(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}(e,od())},mc.apply(e,arguments)}function rd(e){return"piecewise"===e.type?Tc(e.thresholds,e.colors):od([e.min??0,e.max??100],e.color)}function id(e){return e.values?kc(e.values,e.colors).unknown(e.unknownColor??null):kc(e.colors.map((e,t)=>t),e.colors).unknown(e.unknownColor??null)}function ad(e){return"ordinal"===e.type?id(e):rd(e)}function sd(e){return"number"==typeof e&&!Number.isFinite(e)}Zc=Qc({thousands:",",grouping:[3],currency:["$",""]}),Kc=Zc.format,qc=Zc.formatPrefix,Object.defineProperty(Jc,"name",{value:"default",configurable:!0}),Object.defineProperty(ed,"name",{value:"default",configurable:!0});const ld={start:0,extremities:0,end:1,middle:.5};function ud(t){const{scale:n,tickNumber:o,valueFormatter:r,tickInterval:i,tickPlacement:a="extremities",tickLabelPlacement:s="middle"}=t;return e.useMemo(()=>{if(ia(n)){const e=n.domain();return n.bandwidth()>0?[...("function"==typeof i&&e.filter(i)||"object"==typeof i&&i||e).map(e=>({value:e,formattedValue:r?.(e,{location:"tick"})??`${e}`,offset:n(e)-(n.step()-n.bandwidth())/2+ld[a]*n.step(),labelOffset:"tick"===s?0:n.step()*(ld[s]-ld[a])})),..."extremities"===a?[{formattedValue:void 0,offset:n.range()[1],labelOffset:0}]:[]]:("function"==typeof i&&e.filter(i)||"object"==typeof i&&i||e).map(e=>({value:e,formattedValue:r?.(e,{location:"tick"})??`${e}`,offset:n(e),labelOffset:0}))}return n.domain().some(sd)?[]:("object"==typeof i?i:n.ticks(o)).map(e=>({value:e,formattedValue:r?.(e,{location:"tick"})??n.tickFormat(o)(e),offset:n(e),labelOffset:0}))},[n,i,o,r,a,s])}function cd(e){return Math.log(e)}function dd(e){return Math.exp(e)}function pd(e){return-Math.log(-e)}function hd(e){return-Math.exp(-e)}function fd(e){return isFinite(e)?+("1e"+e):e<0?0:e}function md(e){return(t,n)=>-e(-t,n)}function gd(){const e=function(e){const t=e(cd,dd),n=t.domain;let o,r,i=10;function a(){return o=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),r=function(e){return 10===e?fd:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(o=md(o),r=md(r),e(pd,hd)):e(cd,dd),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let u,c,d=o(a),p=o(s);const h=null==e?10:+e;let f=[];if(!(i%1)&&p-d<h){if(d=Math.floor(d),p=Math.ceil(p),a>0){for(;d<=p;++d)for(u=1;u<i;++u)if(c=d<0?u/r(-d):u*r(d),!(c<a)){if(c>s)break;f.push(c)}}else for(;d<=p;++d)for(u=i-1;u>=1;--u)if(c=d>0?u/r(-d):u*r(d),!(c<a)){if(c>s)break;f.push(c)}2*f.length<h&&(f=Is(a,s,h))}else f=Is(d,p,Math.min(p-d,h)).map(r);return l?f.reverse():f},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=Lc(n)).precision||(n.trim=!0),n=Kc(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/r(Math.round(o(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(gc(n(),{floor:e=>r(Math.floor(o(e))),ceil:e=>r(Math.ceil(o(e)))})),t}(pc()).domain([1,10]);return e.copy=()=>dc(e,gd()).base(e.base()),fc.apply(e,arguments),e}function vd(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function yd(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bd(e){return e<0?-e*e:e*e}function xd(){var e=function(e){var t=e(sc,sc),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(sc,sc):.5===n?e(yd,bd):e(vd(n),vd(1/n)):n},td(t)}(pc());return e.copy=function(){return dc(e,xd()).exponent(e.exponent())},fc.apply(e,arguments),e}function wd(e,t,n){switch(e){case"log":return gd(t,n);case"pow":return xd(t,n);case"sqrt":return function(){return xd.apply(null,arguments).exponent(.5)}(t,n);case"time":return xc(t,n);case"utc":return function(){return fc.apply(bc(vl,yl,ml,hl,il,Ks,Gs,Ws,Bs,Sl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}(t,n);default:return nd(t,n)}}const _d=(e,t)=>{const n=e[1]-e[0],o=t[1]-t[0];return[e[0]-t[0]*n/o,e[1]+(100-t[1])*n/o]},Cd=e=>e?.[0]instanceof Date;function Ad(e,t){const n=xc(e.data,t);return(t,{location:o})=>"tick"===o?n.tickFormat(e.tickNumber)(t):`${t.toLocaleString()}`}function kd({drawingArea:e,formattedSeries:t,axis:n,extremumGetters:o,axisDirection:r,zoomData:a,zoomOptions:s,getFilters:l}){const u={};return n.forEach((n,c)=>{const d=n,p=s?.[d.id],h=a?.find(({axisId:e})=>e===d.id),f=h?[h.start,h.end]:[0,100],m=function(e,t,n){if("rotation"===t){const{startAngle:e=0,endAngle:t=e+360}=n;return n.reverse?[Math.PI*e/180,Math.PI*t/180]:[Math.PI*t/180,Math.PI*e/180]}if("radius"===t){const{minRadius:t=0,maxRadius:o=Math.min(e.width,e.height)/2}=n;return[t,o]}const o="x"===t?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[o[1],o[0]]:o}(e,r,d),[g,v]=((e,t,n,o,r)=>{const i=Object.keys(t).reduce((i,a)=>((e,t,n,o,r,i,a)=>{const s=o[t],l=i[t]?.series??{},[u,c]=s?.({series:l,axis:n,axisIndex:r,isDefaultAxis:0===r,getFilters:a})??[1/0,-1/0],[d,p]=e;return[Math.min(u,d),Math.max(c,p)]})(i,a,e,t,n,o,r),[1/0,-1/0]);return Number.isNaN(i[0])||Number.isNaN(i[1])?[1/0,-1/0]:i})(d,o,c,t,void 0!==h||p?void 0:l),y=d.data??[];if(Ic(d)){const e=d.categoryGapRatio??.2,t=d.barGapRatio??.1,n="y"===r?[m[1],m[0]]:m,o=_d(n,f);if(u[d.id]=(0,i.A)({categoryGapRatio:e,barGapRatio:t},d,{data:y,scale:Sc(d.data,o).paddingInner(e).paddingOuter(e/2),tickNumber:d.data.length,colorScale:d.colorMap&&("ordinal"===d.colorMap.type?id((0,i.A)({values:d.data},d.colorMap)):ad(d.colorMap))}),Cd(d.data)){const e=Ad(d,n);u[d.id].valueFormatter=d.valueFormatter??e}}if(Rc(d)){const e="y"===r?[...m].reverse():m,t=_d(e,f);if(u[d.id]=(0,i.A)({},d,{data:y,scale:Pc(d.data,t),tickNumber:d.data.length,colorScale:d.colorMap&&("ordinal"===d.colorMap.type?id((0,i.A)({values:d.data},d.colorMap)):ad(d.colorMap))}),Cd(d.data)){const t=Ad(d,e);u[d.id].valueFormatter=d.valueFormatter??t}}if("band"===d.scaleType||"point"===d.scaleType)return;const b=d.scaleType??"linear",x=d.domainLimit??"nice",w=[d.min??g,d.max??v];if("function"==typeof x){const{min:e,max:t}=x(g,v);w[0]=e,w[1]=t}const _=function(e){const{tickMaxStep:t,tickMinStep:n,tickNumber:o,range:r,domain:i}=e,a=void 0===n?999:Math.floor(Math.abs(i[1]-i[0])/n),s=void 0===t?2:Math.ceil(Math.abs(i[1]-i[0])/t),l=o??Math.floor(Math.abs(r[1]-r[0])/50);return Math.min(a,Math.max(s,l))}((0,i.A)({},d,{range:m,domain:w})),C=_/((f[1]-f[0])/100),A=wd(b,w,_d(m,f)),k="nice"===x?A.nice(_):A,[S,M]=k.domain(),P=[d.min??S,d.max??M];u[d.id]=(0,i.A)({},d,{data:y,scaleType:b,scale:k.domain(P),tickNumber:C,colorScale:d.colorMap&&ad(d.colorMap)})}),{axis:u,axisIds:n.map(({id:e})=>e)}}function Sd(t){const{xAxis:n,yAxis:r,children:i}=t,a=Ga(),s=qi(),l=function(){const{isInitialized:t,data:n}=e.useContext(hs);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.xExtremumGetters}(),u=function(){const{isInitialized:t,data:n}=e.useContext(hs);if(!t)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.yExtremumGetters}(),c=e.useMemo(()=>kd({drawingArea:s,formattedSeries:a,axis:n,extremumGetters:l,axisDirection:"x"}),[s,a,n,l]),d=e.useMemo(()=>kd({drawingArea:s,formattedSeries:a,axis:r,extremumGetters:u,axisDirection:"y"}),[s,a,r,u]),p=e.useMemo(()=>({isInitialized:!0,data:{xAxis:c.axis,yAxis:d.axis,xAxisIds:c.axisIds,yAxisIds:d.axisIds}}),[c,d]);return(0,o.jsx)(Fe.Provider,{value:p,children:i})}const Md=e.createContext({zAxis:{},zAxisIds:[]});function Pd(t){const{zAxis:n,dataset:r,children:a}=t,s=e.useMemo(()=>n?.map(e=>{const t=e.dataKey;if(void 0===t||void 0!==e.data)return e;if(void 0===r)throw new Error("MUI X: z-axis uses `dataKey` but no `dataset` is provided.");return(0,i.A)({},e,{data:r.map(e=>e[t])})}),[n,r]),l=e.useMemo(()=>{const e=s?.map((e,t)=>(0,i.A)({id:`defaultized-z-axis-${t}`},e))??[],t={};return e.forEach(e=>{t[e.id]=(0,i.A)({},e,{colorScale:e.colorMap&&("ordinal"===e.colorMap.type&&e.data?id((0,i.A)({values:e.data},e.colorMap)):ad("continuous"===e.colorMap.type?(0,i.A)({min:e.min,max:e.max},e.colorMap):e.colorMap))})}),{zAxis:t,zAxisIds:e.map(({id:e})=>e)}},[s]);return(0,o.jsx)(Md.Provider,{value:l,children:a})}function Id({controlled:t,default:n,name:o,state:r="value"}){const{current:i}=e.useRef(void 0!==t),[a,s]=e.useState(n);return[i?t:a,e.useCallback(e=>{i||s(e)},[])]}const Rd=(e,t)=>n=>!!e&&("series"===e.fade?n.seriesId===t?.seriesId&&n.dataIndex!==t?.dataIndex:"global"===e.fade&&(n.seriesId!==t?.seriesId||n.dataIndex!==t?.dataIndex)),Td=(e,t)=>n=>!!e&&("series"===e.highlight||"item"===e.highlight&&n.dataIndex===t?.dataIndex)&&n.seriesId===t?.seriesId,Ed=["highlighted","faded"];function Od({children:t,highlightedItem:n,onHighlightChange:r}){const[a,s]=Id({controlled:n,default:null,name:"HighlightedProvider",state:"highlightedItem"}),l=Ga(),u=e.useMemo(()=>{const e=new Map;return Object.keys(l).forEach(t=>{const n=l[t];Object.keys(n?.series??{}).forEach(t=>{const o=n?.series[t];e.set(t,(e=>{const t=e??{},{highlighted:n,faded:o}=t,r=(0,f.A)(t,Ed);return(0,i.A)({highlight:n,fade:o},r)})(o?.highlightScope))})}),e},[l]),c=a&&a.seriesId?u.get(a.seriesId)??void 0:void 0,d=e.useMemo(()=>({isInitialized:!0,data:{highlightScope:c,highlightedItem:a,setHighlighted:e=>{s(e),r?.(e)},clearHighlighted:()=>{s(null),r?.(null)},isHighlighted:Td(c,a),isFaded:Rd(c,a)}}),[a,c,s,r]);return(0,o.jsx)(it.Provider,{value:d,children:t})}const Ld=(e,t)=>"x"===t?{x:e,y:null}:{x:null,y:e},zd=e=>{const{axis:t,getFilters:n,isDefaultAxis:o}=e,r=n?.({currentAxisId:t.id,isDefaultAxis:o}),i=r?t.data?.filter((e,t)=>r({x:null,y:null},t)):t.data;return[Math.min(...i??[]),Math.max(...i??[])]},jd=e=>t=>{const{series:n,axis:o,getFilters:r,isDefaultAxis:i}=t;return Object.keys(n).filter(e=>{const t=n[e].yAxisId??n[e].yAxisKey;return t===o.id||i&&void 0===t}).reduce((t,a)=>{const{stackedData:s}=n[a],l=r?.({currentAxisId:o.id,isDefaultAxis:i,seriesXAxisId:n[a].xAxisId??n[a].xAxisKey,seriesYAxisId:n[a].yAxisId??n[a].yAxisKey}),[u,c]=s?.reduce((t,n,o)=>!l||l(Ld(n[0],e),o)&&l(Ld(n[1],e),o)?[Math.min(...n,t[0]),Math.max(...n,t[1])]:t,[1/0,-1/0])??[1/0,-1/0];return[Math.min(u,t[0]),Math.max(c,t[1])]},[1/0,-1/0])};function $d(e,t){if((r=e.length)>1)for(var n,o,r,i=1,a=e[t[0]],s=a.length;i<r;++i)for(o=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function Fd(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Nd(e,t){return e[t]}function Dd(e){const t=[];return t.key=e,t}function Hd(){var e=Ae([]),t=Fd,n=$d,o=Nd;function r(r){var i,a,s=Array.from(e.apply(this,arguments),Dd),l=s.length,u=-1;for(const e of r)for(i=0,++u;i<l;++i)(s[i][u]=[0,+o(e,s[i].key,u,r)]).data=e;for(i=0,a=Ce(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return r.keys=function(t){return arguments.length?(e="function"==typeof t?t:Ae(Array.from(t)),r):e},r.value=function(e){return arguments.length?(o="function"==typeof e?e:Ae(+e),r):o},r.order=function(e){return arguments.length?(t=null==e?Fd:"function"==typeof e?e:Ae(Array.from(e)),r):t},r.offset=function(e){return arguments.length?(n=null==e?$d:e,r):n},r}function Bd(e){var t=e.map(Vd);return Fd(e).sort(function(e,n){return t[e]-t[n]})}function Vd(e){for(var t,n=-1,o=0,r=e.length,i=-1/0;++n<r;)(t=+e[n][1])>i&&(i=t,o=n);return o}function Wd(e){var t=e.map(Ud);return Fd(e).sort(function(e,n){return t[e]-t[n]})}function Ud(e){for(var t,n=0,o=-1,r=e.length;++o<r;)(t=+e[o][1])&&(n+=t);return n}function Gd(e){return Wd(e).reverse()}function Zd(e){var t,n,o=e.length,r=e.map(Ud),i=Bd(e),a=0,s=0,l=[],u=[];for(t=0;t<o;++t)n=i[t],a<s?(a+=r[n],l.push(n)):(s+=r[n],u.push(n));return u.reverse().concat(l)}function Kd(e){return Fd(e).reverse()}function qd(e,t){if((o=e.length)>0){for(var n,o,r,i=0,a=e[0].length;i<a;++i){for(r=n=0;n<o;++n)r+=e[n][i][1]||0;if(r)for(n=0;n<o;++n)e[n][i][1]/=r}$d(e,t)}}function Xd(e,t){if((s=e.length)>0)for(var n,o,r,i,a,s,l=0,u=e[t[0]].length;l<u;++l)for(i=a=0,n=0;n<s;++n)(r=(o=e[t[n]][l])[1]-o[0])>0?(o[0]=i,o[1]=i+=r):r<0?(o[1]=a,o[0]=a+=r):(o[0]=0,o[1]=r)}function Yd(e,t){if((n=e.length)>0){for(var n,o=0,r=e[t[0]],i=r.length;o<i;++o){for(var a=0,s=0;a<n;++a)s+=e[a][o][1]||0;r[o][1]+=r[o][0]=-s/2}$d(e,t)}}function Qd(e,t){if((r=e.length)>0&&(o=(n=e[t[0]]).length)>0){for(var n,o,r,i=0,a=1;a<o;++a){for(var s=0,l=0,u=0;s<r;++s){for(var c=e[t[s]],d=c[a][1]||0,p=(d-(c[a-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[a][1]||0)-(f[a-1][1]||0)}l+=d,u+=p*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=u/l)}n[a-1][1]+=n[a-1][0]=i,$d(e,t)}}Object.defineProperty($d,"name",{value:"default",configurable:!0}),Object.defineProperty(Fd,"name",{value:"default",configurable:!0}),Object.defineProperty(Hd,"name",{value:"default",configurable:!0}),Object.defineProperty(Bd,"name",{value:"default",configurable:!0}),Object.defineProperty(Wd,"name",{value:"default",configurable:!0}),Object.defineProperty(Gd,"name",{value:"default",configurable:!0}),Object.defineProperty(Zd,"name",{value:"default",configurable:!0}),Object.defineProperty(Kd,"name",{value:"default",configurable:!0}),Object.defineProperty(qd,"name",{value:"default",configurable:!0}),Object.defineProperty(Xd,"name",{value:"default",configurable:!0}),Object.defineProperty(Yd,"name",{value:"default",configurable:!0}),Object.defineProperty(Qd,"name",{value:"default",configurable:!0});const Jd={appearance:Bd,ascending:Wd,descending:Gd,insideOut:Zd,none:Fd,reverse:Kd},ep={expand:qd,diverging:Xd,none:$d,silhouette:Yd,wiggle:Qd},tp=e=>{const{series:t,seriesOrder:n,defaultStrategy:o}=e,r=[],i={};return n.forEach(e=>{const{stack:n,stackOrder:a,stackOffset:s}=t[e];void 0===n?r.push({ids:[e],stackingOrder:Jd.none,stackingOffset:ep.none}):void 0===i[n]?(i[n]=r.length,r.push({ids:[e],stackingOrder:Jd[a??o?.stackOrder??"none"],stackingOffset:ep[s??o?.stackOffset??"diverging"]})):(r[i[n]].ids.push(e),void 0!==a&&(r[i[n]].stackingOrder=Jd[a]),void 0!==s&&(r[i[n]].stackingOffset=ep[s]))}),r};function np(e,t){const n={};return Object.keys(e).forEach(o=>{n[o]=(0,i.A)({},e[o],{valueFormatter:e[o].valueFormatter??t})}),n}const op=(e,t,n)=>{const o="vertical"===e.layout,r=o?t?.colorScale:n?.colorScale,i=o?n?.colorScale:t?.colorScale,a=o?t?.data:n?.data;return i?t=>{const n=e.data[t],o=null===n?e.color:i(n);return null===o?e.color:o}:r&&a?t=>{const n=a[t],o=null===n?e.color:r(n);return null===o?e.color:o}:()=>e.color},rp={seriesType:"bar",seriesFormatter:(e,t)=>{const{seriesOrder:n,series:o}=e,r=tp(e),a=t??[];n.forEach(e=>{const n=o[e].data;if(void 0!==n)n.forEach((t,n)=>{a.length<=n?a.push({[e]:t}):a[n][e]=t});else if(void 0===t)throw new Error([`MUI X: bar series with id='${e}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join("\n"))});const s={};return r.forEach(e=>{const{ids:n,stackingOffset:r,stackingOrder:l}=e,u=Hd().keys(n.map(e=>{const t=o[e].dataKey;return void 0===o[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(l).offset(r)(a);n.forEach((e,n)=>{const r=o[e].dataKey;s[e]=(0,i.A)({layout:"vertical"},o[e],{data:r?t.map(e=>{const t=e[r];return"number"!=typeof t?0:t}):o[e].data,stackedData:u[n].map(([e,t])=>[e,t])})})}),{seriesOrder:n,stackingGroups:r,series:np(s,e=>null==e?"":e.toLocaleString())}},colorProcessor:op,xExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?jd("x")(e):zd(e),yExtremumGetter:e=>Object.keys(e.series).some(t=>"horizontal"===e.series[t].layout)?zd(e):jd("y")(e)},ip=(e,t)=>[null===t[0]?e[0]:Math.min(e[0],t[0]),null===t[1]?e[1]:Math.max(e[1],t[1])],ap=(e,t,n,o)=>{const r=o?.colorScale,i=n?.colorScale,a=t?.colorScale;return r?t=>{if(void 0!==o?.data?.[t]){const e=r(o?.data?.[t]);if(null!==e)return e}const n=e.data[t],i=null===n?e.color:r(n.z);return null===i?e.color:i}:i?t=>{const n=e.data[t],o=null===n?e.color:i(n.y);return null===o?e.color:o}:a?t=>{const n=e.data[t],o=null===n?e.color:a(n.x);return null===o?e.color:o}:()=>e.color},sp={seriesType:"scatter",seriesFormatter:({series:e,seriesOrder:t},n)=>({series:Object.fromEntries(Object.entries(e).map(([e,t])=>{const o=t?.datasetKeys,r=["x","y","id"].filter(e=>"string"!=typeof o?.[e]);if(t?.datasetKeys&&r.length>0)throw new Error([`MUI X: scatter series with id='${e}' has incomplete datasetKeys.`,`Properties ${r.map(e=>`"${e}"`).join(", ")} are missing.`].join("\n"));const a=o?n?.map(e=>({x:e[o.x]??null,y:e[o.y]??null,z:o.z&&e[o.z],id:e[o.id]}))??[]:t.data??[];return[e,(0,i.A)({},t,{data:a,valueFormatter:t.valueFormatter??(e=>`(${e.x}, ${e.y})`)})]})),seriesOrder:t}),colorProcessor:ap,xExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:o,getFilters:r}=e;return Object.keys(t).filter(e=>{const r=t[e].xAxisId??t[e].xAxisKey;return r===n.id||void 0===r&&o}).reduce((e,i)=>{const a=r?.({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:t[i].xAxisId??t[i].xAxisKey,seriesYAxisId:t[i].yAxisId??t[i].yAxisKey}),s=t[i].data?.reduce((e,t,n)=>a&&!a(t,n)?e:ip(e,[t.x,t.x]),[1/0,-1/0]);return ip(e,s??[1/0,-1/0])},[1/0,-1/0])},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:o,getFilters:r}=e;return Object.keys(t).filter(e=>{const r=t[e].yAxisId??t[e].yAxisKey;return r===n.id||void 0===r&&o}).reduce((e,i)=>{const a=r?.({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:t[i].xAxisId??t[i].xAxisKey,seriesYAxisId:t[i].yAxisId??t[i].yAxisKey}),s=t[i].data?.reduce((e,t,n)=>a&&!a(t,n)?e:ip(e,[t.y,t.y]),[1/0,-1/0]);return ip(e,s??[1/0,-1/0])},[1/0,-1/0])}},lp=(e,t,n)=>{const o=n?.colorScale,r=t?.colorScale;return o?t=>{const n=e.data[t],r=null===n?e.color:o(n);return null===r?e.color:r}:r?n=>{const o=t.data?.[n],i=null===o?e.color:r(o);return null===i?e.color:i}:()=>e.color},up={seriesType:"line",colorProcessor:lp,seriesFormatter:(e,t)=>{const{seriesOrder:n,series:o}=e,r=tp((0,i.A)({},e,{defaultStrategy:{stackOffset:"none"}})),a=t??[];n.forEach(e=>{const t=o[e].data;void 0!==t&&t.forEach((t,n)=>{a.length<=n?a.push({[e]:t}):a[n][e]=t})});const s={};return r.forEach(e=>{const{ids:n,stackingOrder:r,stackingOffset:l}=e,u=Hd().keys(n.map(e=>{const t=o[e].dataKey;return void 0===o[e].data&&void 0!==t?t:e})).value((e,t)=>e[t]??0).order(r).offset(l)(a);n.forEach((e,n)=>{const r=o[e].dataKey;s[e]=(0,i.A)({},o[e],{data:r?t.map(e=>{const t=e[r];return"number"!=typeof t?null:t}):o[e].data,stackedData:u[n].map(([e,t])=>[e,t])})})}),{seriesOrder:n,stackingGroups:r,series:np(s,e=>null==e?"":e.toLocaleString())}},xExtremumGetter:e=>{const{axis:t}=e;return[Math.min(...t.data??[]),Math.max(...t.data??[])]},yExtremumGetter:e=>{const{series:t,axis:n,isDefaultAxis:o,getFilters:r}=e;return Object.keys(t).filter(e=>{const r=t[e].yAxisId??t[e].yAxisKey;return r===n.id||o&&void 0===r}).reduce((e,i)=>{const{area:a,stackedData:s}=t[i],l=void 0!==a,u=r?.({currentAxisId:n.id,isDefaultAxis:o,seriesXAxisId:t[i].xAxisId??t[i].xAxisKey,seriesYAxisId:t[i].yAxisId??t[i].yAxisKey}),c=function(e,t,n){return t.reduce((t,o,r)=>{const[i,a]=e(o);return!n||n({y:i,x:null},r)&&n({y:a,x:null},r)?[Math.min(i,a,t[0]),Math.max(i,a,t[1])]:t},[1/0,-1/0])}(l&&"log"!==n.scaleType&&"string"!=typeof t[i].baseline?e=>e:e=>[e[1],e[1]],s,u),[d,p]=c;return[Math.min(d,e[0]),Math.max(p,e[1])]},[1/0,-1/0])}};function cp(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function dp(e){return e}function pp(){var e=dp,t=cp,n=null,o=Ae(0),r=Ae(va),i=Ae(0);function a(a){var s,l,u,c,d,p=(a=Ce(a)).length,h=0,f=new Array(p),m=new Array(p),g=+o.apply(this,arguments),v=Math.min(va,Math.max(-va,r.apply(this,arguments)-g)),y=Math.min(Math.abs(v)/p,i.apply(this,arguments)),b=y*(v<0?-1:1);for(s=0;s<p;++s)(d=m[f[s]=s]=+e(a[s],s,a))>0&&(h+=d);for(null!=t?f.sort(function(e,n){return t(m[e],m[n])}):null!=n&&f.sort(function(e,t){return n(a[e],a[t])}),s=0,u=h?(v-p*b)/h:0;s<p;++s,g=c)l=f[s],c=g+((d=m[l])>0?d*u:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:c,padAngle:y};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:Ae(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:Ae(+e),a):o},a.endAngle=function(e){return arguments.length?(r="function"==typeof e?e:Ae(+e),a):r},a.padAngle=function(e){return arguments.length?(i="function"==typeof e?e:Ae(+e),a):i},a}function hp(e,t){return"function"==typeof e?e(t):e}Object.defineProperty(cp,"name",{value:"default",configurable:!0}),Object.defineProperty(dp,"name",{value:"default",configurable:!0}),Object.defineProperty(pp,"name",{value:"default",configurable:!0});const fp=[rp,sp,up,{seriesType:"pie",colorProcessor:e=>t=>e.data[t].color,seriesFormatter:e=>{const{seriesOrder:t,series:n}=e,o={};return t.forEach(e=>{const t=pp().startAngle(2*Math.PI*(n[e].startAngle??0)/360).endAngle(2*Math.PI*(n[e].endAngle??360)/360).padAngle(2*Math.PI*(n[e].paddingAngle??0)/360).sortValues(((e="none")=>{if("function"==typeof e)return e;switch(e){case"none":default:return null;case"desc":return(e,t)=>t-e;case"asc":return(e,t)=>e-t}})(n[e].sortingValues??"none"))(n[e].data.map(e=>e.value));o[e]=(0,i.A)({valueFormatter:e=>e.value.toLocaleString()},n[e],{data:n[e].data.map((n,o)=>(0,i.A)({},n,{id:n.id??`auto-generated-pie-id-${e}-${o}`},t[o])).map((t,o)=>(0,i.A)({},t,{formattedValue:n[e].valueFormatter?.((0,i.A)({},t,{label:hp(t.label,"arc")}),{dataIndex:o})??t.value.toLocaleString()}))})}),{seriesOrder:t,series:o}}}];function mp(e){const t=e??fp,n={},o={},r={},i={},a={},s={};for(let e=0;e<t.length;e+=1){const l=t[e],u=l.seriesType;n[u]=l.seriesFormatter,o[u]=l.colorProcessor,l.xExtremumGetter&&(r[u]=l.xExtremumGetter),l.yExtremumGetter&&(i[u]=l.yExtremumGetter),l.rotationExtremumGetter&&(a[u]=l.rotationExtremumGetter),l.radiusExtremumGetter&&(s[u]=l.radiusExtremumGetter)}return{seriesFormatters:n,colorProcessors:o,xExtremumGetters:r,yExtremumGetters:i,rotationExtremumGetters:a,radiusExtremumGetters:s}}function gp(t){const{children:n,plugins:r}=t,i=e.useMemo(()=>({isInitialized:!0,data:mp(r)}),[r]);return(0,o.jsx)(hs.Provider,{value:i,children:n})}const vp=(e,t,n)=>{const o="x"===n?Vi:Wi;return[...e?.map((e,t)=>(0,i.A)({id:`defaultized-${n}-axis-${t}`},e))??[],...void 0===e||-1===e.findIndex(({id:e})=>e===o)?[{id:o,scaleType:"linear"}]:[]].map(e=>{const o=e.dataKey;if(void 0===o||void 0!==e.data)return e;if(void 0===t)throw new Error(`MUI X: ${n}-axis uses \`dataKey\` but no \`dataset\` is provided.`);return(0,i.A)({},e,{data:t.map(e=>e[o])})})},yp=["width","height","series","margin","xAxis","yAxis","zAxis","colors","dataset","sx","title","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","children","skipAnimation"];function bp(t){const{children:n,skipAnimation:r}=t,i="undefined"==typeof window||!window?.matchMedia,[a,s]=e.useState(i||void 0);to(()=>{if(i)return;const e=e=>{const t=e.matches||void 0;s(t),Tt.assign({skipAnimation:t})},t=window.matchMedia("(prefers-reduced-motion)");return e(t),t?.addEventListener?.("change",e),()=>{t?.removeEventListener?.("change",e)}},[]);const l=e.useMemo(()=>({isInitialized:!0,data:{skipAnimation:r||a}}),[a,r]);return(0,o.jsx)(qa.Provider,{value:l,children:n})}const xp=e.forwardRef(function(t,n){const{children:r,drawingProviderProps:a,seriesProviderProps:s,cartesianProviderProps:l,zAxisContextProps:u,highlightedProviderProps:c,chartsSurfaceProps:d,pluginProviderProps:p,animationProviderProps:h}=((t,n)=>{const{width:o,height:r,series:a,margin:s,xAxis:l,yAxis:u,zAxis:c,colors:d,dataset:p,sx:h,title:m,desc:g,disableAxisListener:v,highlightedItem:y,onHighlightChange:b,plugins:x,children:w,skipAnimation:_}=t,C=(0,f.A)(t,yp),A=e.useRef(null),k=Be(n,A),[S,M]=((t,n,o)=>[e.useMemo(()=>vp(t,o,"x"),[t,o]),e.useMemo(()=>vp(n,o,"y"),[n,o])])(l,u,p),P={skipAnimation:_},I={plugins:x};return{children:w,drawingProviderProps:{width:o,height:r,margin:s,svgRef:A},seriesProviderProps:{series:a,colors:d,dataset:p},cartesianProviderProps:{xAxis:S,yAxis:M,dataset:p},zAxisContextProps:{zAxis:c,dataset:p},highlightedProviderProps:{highlightedItem:y,onHighlightChange:b},chartsSurfaceProps:(0,i.A)({},C,{width:o,height:r,ref:k,sx:h,title:m,desc:g,disableAxisListener:v}),pluginProviderProps:I,animationProviderProps:P,xAxis:S,yAxis:M}})(t,n);return(0,o.jsx)(Ki,(0,i.A)({},a,{children:(0,o.jsx)(gp,(0,i.A)({},p,{children:(0,o.jsx)(fs,(0,i.A)({},s,{children:(0,o.jsx)(Sd,(0,i.A)({},l,{children:(0,o.jsx)(Pd,(0,i.A)({},u,{children:(0,o.jsx)(rt,{children:(0,o.jsx)(Od,(0,i.A)({},c,{children:(0,o.jsxs)(xs,(0,i.A)({},d,{children:[(0,o.jsx)(Wa,{}),(0,o.jsx)(bp,(0,i.A)({},h,{children:r}))]}))}))})}))}))}))}))}))}),wp=dt("div",{name:"MuiResponsiveChart",slot:"Container"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexGrow:1,flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden","&>svg":{width:"100%",height:"100%"}})),_p="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Cp(e){return e&&e.ownerDocument||document}function Ap(e){return Cp(e).defaultView||window}const kp=["width","height","resolveSizeBeforeRender","margin","children","series","colors","dataset","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","sx","title","viewBox","xAxis","yAxis","zAxis","skipAnimation"],Sp=e.forwardRef(function(t,n){const{hasIntrinsicSize:r,chartContainerProps:a,resizableChartContainerProps:s}=((t,n)=>{const{width:o,height:r,resolveSizeBeforeRender:a,margin:s,children:l,series:u,colors:c,dataset:d,desc:p,disableAxisListener:h,highlightedItem:m,onHighlightChange:g,plugins:v,sx:y,title:b,viewBox:x,xAxis:w,yAxis:_,zAxis:C,skipAnimation:A}=t,k=(0,f.A)(t,kp),{containerRef:S,width:M,height:P}=((t,n,o)=>{const r=e.useRef({displayError:!1,initialCompute:!0,computeRun:0}),i=e.useRef(null),[a,s]=e.useState(0),[l,u]=e.useState(0),c=e.useCallback(()=>{const e=i?.current;if(!e)return{};const t=Ap(e).getComputedStyle(e),n=Math.floor(parseFloat(t.height))||0,o=Math.floor(parseFloat(t.width))||0;return s(o),u(n),{width:o,height:n}},[]);return e.useEffect(()=>{r.current.displayError=!0},[]),_p(()=>{if(!o||!r.current.initialCompute||r.current.computeRun>20)return;const e=c();e.width!==a||e.height!==l?r.current.computeRun+=1:r.current.initialCompute&&(r.current.initialCompute=!1)},[a,l,c,o]),_p(()=>{if(void 0!==t&&void 0!==n)return()=>{};c();const e=i.current;if("undefined"==typeof ResizeObserver)return()=>{};let o;const r=new ResizeObserver(()=>{o=requestAnimationFrame(()=>{c()})});return e&&r.observe(e),()=>{o&&cancelAnimationFrame(o),e&&r.unobserve(e)}},[c,n,t]),{containerRef:i,width:t??a,height:n??l}})(o,r,a);return{hasIntrinsicSize:M&&P,chartContainerProps:{margin:s,children:l,series:u,colors:c,dataset:d,desc:p,disableAxisListener:h,highlightedItem:m,onHighlightChange:g,plugins:v,sx:y,title:b,viewBox:x,xAxis:w,yAxis:_,zAxis:C,skipAnimation:A,width:M,height:P,ref:n},resizableChartContainerProps:(0,i.A)({},k,{ownerState:{width:o,height:r},ref:S})}})(t,n);return(0,o.jsx)(wp,(0,i.A)({},s,{children:r?(0,o.jsx)(xp,(0,i.A)({},a)):null}))});function Mp(e){return et("MuiMarkElement",e)}new Set,tt("MuiMarkElement",["root","highlighted","faded"]);const Pp=e=>{const{classes:t,id:n,isFaded:o,isHighlighted:r}=e;return De({root:["root",`series-${n}`,r&&"highlighted",o&&"faded"]},Mp,t)},Ip=["x","y","id","classes","color","dataIndex","onClick","skipAnimation","shape"];function Rp(t){const{x:n,y:r,id:a,classes:s,color:l,dataIndex:u,onClick:c,skipAnimation:d,shape:p}=t,h=(0,f.A)(t,Ip);"circle"!==p&&[`MUI X: The mark element of your line chart have shape "${p}" which is not supported when using \`experimentalRendering=true\`.`,'Only "circle" are supported with `experimentalRendering`.'].join("\n");const m=ss(),g=st(),{isFaded:v,isHighlighted:y}=ta({seriesId:a}),{axis:b}=e.useContext(nt),x=Rr({to:{x:n,y:r},immediate:d}),w={id:a,classes:s,isHighlighted:b.x?.index===u||y,isFaded:v,color:l},_=Pp(w);return(0,o.jsx)(Jr.circle,(0,i.A)({},h,{cx:x.x,cy:x.y,r:5,fill:(m.vars||m).palette.background.paper,stroke:l,strokeWidth:2,className:_.root,onClick:c,cursor:c?"pointer":"unset"},g({type:"line",seriesId:a,dataIndex:u})))}ha(3);const Tp={draw(e,t){const n=ha(t/ma);e.moveTo(n,0),e.arc(0,0,n,0,va)}},Ep={draw(e,t){const n=ha(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Op=ha(1/3),Lp=2*Op,zp={draw(e,t){const n=ha(t/Lp),o=n*Op;e.moveTo(0,-n),e.lineTo(o,0),e.lineTo(0,n),e.lineTo(-o,0),e.closePath()}},jp={draw(e,t){const n=ha(t),o=-n/2;e.rect(o,o,n,n)}},$p=pa(ma/10)/pa(7*ma/10),Fp=pa(va/10)*$p,Np=-ua(va/10)*$p,Dp={draw(e,t){const n=ha(.8908130915292852*t),o=Fp*n,r=Np*n;e.moveTo(0,-n),e.lineTo(o,r);for(let t=1;t<5;++t){const i=va*t/5,a=ua(i),s=pa(i);e.lineTo(s*n,-a*n),e.lineTo(a*o-s*r,s*o+a*r)}e.closePath()}},Hp=ha(3),Bp={draw(e,t){const n=-ha(t/(3*Hp));e.moveTo(0,2*n),e.lineTo(-Hp*n,-n),e.lineTo(Hp*n,-n),e.closePath()}},Vp=(ha(3),-.5),Wp=ha(3)/2,Up=1/ha(12),Gp=3*(Up/2+1),Zp={draw(e,t){const n=ha(t/Gp),o=n/2,r=n*Up,i=o,a=n*Up+n,s=-i,l=a;e.moveTo(o,r),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Vp*o-Wp*r,Wp*o+Vp*r),e.lineTo(Vp*i-Wp*a,Wp*i+Vp*a),e.lineTo(Vp*s-Wp*l,Wp*s+Vp*l),e.lineTo(Vp*o+Wp*r,Vp*r-Wp*o),e.lineTo(Vp*i+Wp*a,Vp*a-Wp*i),e.lineTo(Vp*s+Wp*l,Vp*l-Wp*s),e.closePath()}},Kp=[Tp,Ep,zp,jp,Dp,Bp,Zp];function qp(e,t){let n=null,o=Oe(r);function r(){let r;if(n||(n=r=o()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"==typeof e?e:Ae(e||Tp),t="function"==typeof t?t:Ae(void 0===t?64:+t),r.type=function(t){return arguments.length?(e="function"==typeof t?t:Ae(t),r):e},r.size=function(e){return arguments.length?(t="function"==typeof e?e:Ae(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r}function Xp(e){return"circle cross diamond square star triangle wye".split(/ /).indexOf(e)||0}const Yp=["x","y","id","classes","color","shape","dataIndex","onClick","skipAnimation"],Qp=dt(Jr.path,{name:"MuiMarkElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>({fill:(t.vars||t).palette.background.paper,stroke:e.color,strokeWidth:2}));function Jp(t){const{x:n,y:r,id:a,classes:s,color:l,shape:u,dataIndex:c,onClick:d,skipAnimation:p}=t,h=(0,f.A)(t,Yp),m=st(),{isFaded:g,isHighlighted:v}=ta({seriesId:a}),{axis:y}=e.useContext(nt),b=Rr({to:{x:n,y:r},immediate:p}),x={id:a,classes:s,isHighlighted:y.x?.index===c||v,isFaded:g,color:l},w=Pp(x);return(0,o.jsx)(Qp,(0,i.A)({},h,{style:{transform:$r([b.x,b.y],(e,t)=>`translate(${e}px, ${t}px)`),transformOrigin:$r([b.x,b.y],(e,t)=>`${e}px ${t}px`)},ownerState:x,className:w.root,d:qp(Kp[Xp(u)])(),onClick:d,cursor:d?"pointer":"unset"},m({type:"line",seriesId:a,dataIndex:c})))}const eh=["slots","slotProps","skipAnimation","onItemClick","experimentalRendering"];function th(e){const{slots:t,slotProps:n,skipAnimation:r,onItemClick:a,experimentalRendering:s}=e,l=(0,f.A)(e,eh),u=Xa(r),c=Za(),d=Ne(),p=Xi(),h=qi(),m=t?.mark??(s?Rp:Jp);if(void 0===c)return null;const{series:g,stackingGroups:v}=c,{xAxis:y,yAxis:b,xAxisIds:x,yAxisIds:w}=d,_=x[0],C=w[0];return(0,o.jsx)("g",(0,i.A)({},l,{children:v.flatMap(({ids:e})=>e.map(e=>{const{xAxisId:t,yAxisId:r,xAxisKey:s=_,yAxisKey:l=C,stackedData:c,data:d,showMark:f=!0}=g[e];if(!1===f)return null;const v=t??s,x=r??l,w=aa(y[v].scale),A=b[x].scale,k=y[v].data;if(void 0===k)throw new Error(`MUI X: ${v===Vi?"The first `xAxis`":`The x-axis with id "${v}"`} should have data property to be able to display a line plot.`);const S=Ni(`${p}-${e}-line-clip`),M=lp(g[e],y[v],b[x]);return(0,o.jsx)("g",{clipPath:`url(#${S})`,children:k?.map((e,t)=>{const n=null==d[t]?null:c[t][1];return{x:w(e),y:null===n?null:A(n),position:e,value:n,index:t}}).filter(({x:e,y:t,index:n,position:o,value:r})=>null!==r&&null!==t&&!!h.isPointInside({x:e,y:t})&&(!0===f||f({x:e,y:t,index:n,position:o,value:r}))).map(({x:t,y:r,index:s})=>(0,o.jsx)(m,(0,i.A)({id:e,dataIndex:s,shape:"circle",color:M(s),x:t,y:r,skipAnimation:u,onClick:a&&(t=>a(t,{type:"line",seriesId:e,dataIndex:s}))},n?.mark),`${e}-${s}`))},e)}))}))}function nh(e){return et("MuiChartsAxis",e)}const oh=tt("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right"]),rh=dt("g",{name:"MuiChartsAxis",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`& .${oh.tickLabel}`]:(0,i.A)({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${oh.label}`]:(0,i.A)({},e.typography.body1,{fill:(e.vars||e).palette.text.primary}),[`& .${oh.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${oh.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges"}})),ih={widthCache:{},cacheCount:0},ah={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sh=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],lh="mui_measurement_span";function uh(e,t){return sh.indexOf(e)>=0&&t===+t?`${t}px`:t}function ch(e){return e.split("").reduce((e,t)=>t===t.toUpperCase()?[...e,"-",t.toLowerCase()]:[...e,t],[]).join("")}let dh;function ph({style:e,needsComputation:t,text:n}){return n.split("\n").map(n=>(0,i.A)({text:n},t?((e,t={})=>{if(null==e||"undefined"==typeof window)return{width:0,height:0};const n=`${e}`,o=(e=>Object.keys(e).sort().reduce((t,n)=>`${t}${ch(n)}:${uh(n,e[n])};`,""))(t),r=`${n}-${o}`;if(ih.widthCache[r])return ih.widthCache[r];try{let e=document.getElementById(lh);null===e&&(e=document.createElement("span"),e.setAttribute("id",lh),e.setAttribute("aria-hidden","true"),document.body.appendChild(e));const o=(0,i.A)({},ah,t);Object.keys(o).map(t=>(e.style[ch(t)]=uh(t,o[t]),t)),e.textContent=n;const a=e.getBoundingClientRect(),s={width:a.width,height:a.height};return ih.widthCache[r]=s,ih.cacheCount+1>2e3?(ih.cacheCount=0,ih.widthCache={}):ih.cacheCount+=1,dh&&clearTimeout(dh),dh=setTimeout(()=>{e.textContent=""},0),s}catch{return{width:0,height:0}}})(n,e):{width:0,height:0}))}const hh=["x","y","style","text","ownerState"],fh=["angle","textAnchor","dominantBaseline"];function mh(t){const{x:n,y:r,style:a,text:s}=t,l=(0,f.A)(t,hh),u=a??{},{angle:c,textAnchor:d,dominantBaseline:p}=u,h=(0,f.A)(u,fh),m=e.useMemo(()=>ph({style:h,needsComputation:s.includes("\n"),text:s}),[h,s]);let g;switch(p){case"hanging":g=0;break;case"central":g=(m.length-1)/2*-m[0].height;break;default:g=(m.length-1)*-m[0].height}const v=[];return c&&v.push(`rotate(${c}, ${n}, ${r})`),(0,o.jsx)("text",(0,i.A)({},l,{transform:v.length>0?v.join(" "):void 0,x:n,y:r,textAnchor:d,dominantBaseline:p,style:h,children:m.map((e,t)=>(0,o.jsx)("tspan",{x:n,dy:`${0===t?g:m[0].height}px`,dominantBaseline:p,children:e.text},t))}))}const gh=["scale","tickNumber","reverse"];const vh=dt(rh,{name:"MuiChartsXAxis",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yh={position:"bottom",disableLine:!1,disableTicks:!1,tickSize:6};function bh(t){const{xAxisIds:n,xAxis:r}=Ne(),a=r[t.axisId??n[0]],{scale:s,tickNumber:l,reverse:u}=a,c=(0,f.A)(a,gh),d=function(t=!1){const[n,o]=e.useState(!1);return _p(()=>{t||o(!0)},[t]),e.useEffect(()=>{t&&o(!0)},[t]),n}(),p=_e({props:(0,i.A)({},c,t),name:"MuiChartsXAxis"}),h=(0,i.A)({},yh,p),{position:m,disableLine:g,disableTicks:v,tickLabelStyle:y,label:b,labelStyle:x,tickFontSize:w,labelFontSize:_,tickSize:C,valueFormatter:A,slots:k,slotProps:S,tickInterval:M,tickLabelInterval:P,tickPlacement:I,tickLabelPlacement:R,sx:T}=h,E=ss(),O=(e=>{const{classes:t,position:n}=e;return De({root:["root","directionX",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},nh,t)})((0,i.A)({},h,{theme:E})),{left:L,top:z,width:j,height:$,isPointInside:F}=qi(),N=v?4:C,D="bottom"===m?1:-1,H=k?.axisLine??"line",B=k?.axisTick??"line",V=k?.axisTickLabel??mh,W=k?.axisLabel??mh,U=Xe({elementType:V,externalSlotProps:S?.axisTickLabel,additionalProps:{style:(0,i.A)({textAnchor:"middle",dominantBaseline:"bottom"===m?"hanging":"auto",fontSize:w??12},y)},className:O.tickLabel,ownerState:{}}),G=function(e,{tickLabelStyle:t,tickLabelInterval:n,reverse:o,isMounted:r}){const a=e.map(e=>{if(!r||void 0===e.formattedValue)return(0,i.A)({},e,{width:0,height:0});const n=ph({style:t,needsComputation:!0,text:e.formattedValue});return(0,i.A)({},e,{width:Math.max(...n.map(e=>e.width)),height:Math.max(n.length*n[0].height)})});if("function"==typeof n)return a.map((e,t)=>(0,i.A)({},e,{skipLabel:!n(e.value,t)}));let s=0,l=0;const u=o?-1:1;return a.map((e,n)=>{const{width:o,offset:r,labelOffset:a,height:c}=e,d=function(e,t,n=0){const o=Math.min(Math.abs(n)%180,Math.abs(Math.abs(n)%180-180)%180);if(o<5)return e;if(o>85)return t;const r=o*Math.PI/180;return r<Math.atan2(t,e)?e/Math.cos(r):t/Math.sin(r)}(o,c,t?.angle),p=r+a;return s=p-u*(1.2*d)/2,n>0&&u*s<u*l?(0,i.A)({},e,{skipLabel:!0}):(l=p+u*(1.2*d)/2,e)})}(ud({scale:s,tickNumber:l,valueFormatter:A,tickInterval:M,tickPlacement:I,tickLabelPlacement:R}),{tickLabelStyle:U.style,tickLabelInterval:P,reverse:u,isMounted:d}),Z={x:L+j/2,y:D*(N+22)},K=Xe({elementType:W,externalSlotProps:S?.axisLabel,additionalProps:{style:(0,i.A)({fontSize:_??14,textAnchor:"middle",dominantBaseline:"bottom"===m?"hanging":"auto"},x)},ownerState:{}}),q=s.domain(),X=ia(s);return X&&0===q.length||!X&&q.some(sd)?null:(0,o.jsxs)(vh,{transform:`translate(0, ${"bottom"===m?z+$:z})`,className:O.root,sx:T,children:[!g&&(0,o.jsx)(H,(0,i.A)({x1:L,x2:L+j,className:O.line},S?.axisLine)),G.map(({formattedValue:e,offset:t,labelOffset:n,skipLabel:r},a)=>{const s=n??0,l=D*(N+3),u=F({x:t,y:-1},{direction:"x"}),c=F({x:t+s,y:-1},{direction:"x"});return(0,o.jsxs)("g",{transform:`translate(${t}, 0)`,className:O.tickContainer,children:[!v&&u&&(0,o.jsx)(B,(0,i.A)({y2:D*N,className:O.tick},S?.axisTick)),void 0!==e&&!r&&c&&(0,o.jsx)(V,(0,i.A)({x:s,y:l},U,{text:e.toString()}))]},a)}),b&&(0,o.jsx)("g",{className:O.label,children:(0,o.jsx)(W,(0,i.A)({},Z,K,{text:b}))})]})}const xh=e.createContext(),wh=()=>{const t=e.useContext(xh);return null!=t&&t},_h=["scale","tickNumber"],Ch=dt(rh,{name:"MuiChartsYAxis",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ah={position:"left",disableLine:!1,disableTicks:!1,tickFontSize:12,labelFontSize:14,tickSize:6};function kh(e){const{yAxisIds:t,yAxis:n}=Ne(),r=n[e.axisId??t[0]],{scale:a,tickNumber:s}=r,l=(0,f.A)(r,_h),u=_e({props:(0,i.A)({},l,e),name:"MuiChartsYAxis"}),c=(0,i.A)({},Ah,u),{position:d,disableLine:p,disableTicks:h,tickFontSize:m,label:g,labelFontSize:v,labelStyle:y,tickLabelStyle:b,tickSize:x,valueFormatter:w,slots:_,slotProps:C,tickPlacement:A,tickLabelPlacement:k,tickInterval:S,tickLabelInterval:M,sx:P}=c,I=ss(),R=wh(),T=(e=>{const{classes:t,position:n}=e;return De({root:["root","directionY",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},nh,t)})((0,i.A)({},c,{theme:I})),{left:E,top:O,width:L,height:z,isPointInside:j}=qi(),$=h?4:x,F=ud({scale:a,tickNumber:s,valueFormatter:w,tickPlacement:A,tickLabelPlacement:k,tickInterval:S}),N="right"===d?1:-1,D={x:N*(m+$+10),y:O+z/2},H=_?.axisLine??"line",B=_?.axisTick??"line",V=_?.axisTickLabel??mh,W=_?.axisLabel??mh,U=!R&&"right"===d||R&&"right"!==d,G=Xe({elementType:V,externalSlotProps:C?.axisTickLabel,additionalProps:{style:(0,i.A)({fontSize:m,textAnchor:U?"start":"end",dominantBaseline:"central"},b)},className:T.tickLabel,ownerState:{}}),Z=Xe({elementType:W,externalSlotProps:C?.axisLabel,additionalProps:{style:(0,i.A)({fontSize:v,angle:90*N,textAnchor:"middle",dominantBaseline:"auto"},y)},ownerState:{}}),K=Xe({elementType:H,externalSlotProps:C?.axisLine,additionalProps:{strokeLinecap:"square"},ownerState:{}}),q=a.domain(),X=ia(a);return X&&0===q.length||!X&&q.some(sd)?null:(0,o.jsxs)(Ch,{transform:`translate(${"right"===d?E+L:E}, 0)`,className:T.root,sx:P,children:[!p&&(0,o.jsx)(H,(0,i.A)({y1:O,y2:O+z,className:T.line},K)),F.map(({formattedValue:e,offset:t,labelOffset:n,value:r},a)=>{const s=N*($+2),l=n,u="function"==typeof M&&!M?.(r,a);return j({x:-1,y:t},{direction:"y"})?(0,o.jsxs)("g",{transform:`translate(0, ${t})`,className:T.tickContainer,children:[!h&&(0,o.jsx)(B,(0,i.A)({x2:N*$,className:T.tick},C?.axisTick)),void 0!==e&&!u&&(0,o.jsx)(V,(0,i.A)({x:s,y:l,text:e.toString()},G))]},a):null}),g&&(0,o.jsx)("g",{className:T.label,children:(0,o.jsx)(W,(0,i.A)({},D,Z,{text:g}))})]})}const Sh=(e,t)=>null==e?null:"object"==typeof e?e.axisId??t??null:e,Mh=(e,t,n)=>"object"==typeof e?(0,i.A)({},e,{slots:(0,i.A)({},t,e?.slots),slotProps:(0,i.A)({},n,e?.slotProps)}):{slots:t,slotProps:n};function Ph(t){const{topAxis:n,leftAxis:r,rightAxis:a,bottomAxis:s,slots:l,slotProps:u}=t,{xAxis:c,xAxisIds:d,yAxis:p,yAxisIds:h}=Ne(),f=Sh(void 0===r?h[0]:r,h[0]),m=Sh(void 0===s?d[0]:s,d[0]),g=Sh(n,d[0]),v=Sh(a,h[0]);if(null!==g&&!c[g])throw new Error([`MUI X: id used for top axis "${g}" is not defined.`,`Available ids are: ${d.join(", ")}.`].join("\n"));if(null!==f&&!p[f])throw new Error([`MUI X: id used for left axis "${f}" is not defined.`,`Available ids are: ${h.join(", ")}.`].join("\n"));if(null!==v&&!p[v])throw new Error([`MUI X: id used for right axis "${v}" is not defined.`,`Available ids are: ${h.join(", ")}.`].join("\n"));if(null!==m&&!c[m])throw new Error([`MUI X: id used for bottom axis "${m}" is not defined.`,`Available ids are: ${d.join(", ")}.`].join("\n"));const y=Mh(n,l,u),b=Mh(s,l,u),x=Mh(r,l,u),w=Mh(a,l,u);return(0,o.jsxs)(e.Fragment,{children:[g&&(0,o.jsx)(bh,(0,i.A)({},y,{position:"top",axisId:g})),m&&(0,o.jsx)(bh,(0,i.A)({},b,{position:"bottom",axisId:m})),f&&(0,o.jsx)(kh,(0,i.A)({},x,{position:"left",axisId:f})),v&&(0,o.jsx)(kh,(0,i.A)({},w,{position:"right",axisId:v}))]})}var Ih=s(2923);function Rh(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Th(e){return e instanceof Rh(e).Element||e instanceof Element}function Eh(e){return e instanceof Rh(e).HTMLElement||e instanceof HTMLElement}function Oh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Rh(e).ShadowRoot||e instanceof ShadowRoot)}var Lh=Math.max,zh=Math.min,jh=Math.round;function $h(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Fh(){return!/^((?!chrome|android).)*safari/i.test($h())}function Nh(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&Eh(e)&&(r=e.offsetWidth>0&&jh(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&jh(o.height)/e.offsetHeight||1);var a=(Th(e)?Rh(e):window).visualViewport,s=!Fh()&&n,l=(o.left+(s&&a?a.offsetLeft:0))/r,u=(o.top+(s&&a?a.offsetTop:0))/i,c=o.width/r,d=o.height/i;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l,x:l,y:u}}function Dh(e){var t=Rh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Hh(e){return e?(e.nodeName||"").toLowerCase():null}function Bh(e){return((Th(e)?e.ownerDocument:e.document)||window.document).documentElement}function Vh(e){return Nh(Bh(e)).left+Dh(e).scrollLeft}function Wh(e){return Rh(e).getComputedStyle(e)}function Uh(e){var t=Wh(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function Gh(e,t,n){void 0===n&&(n=!1);var o,r,i=Eh(t),a=Eh(t)&&function(e){var t=e.getBoundingClientRect(),n=jh(t.width)/e.offsetWidth||1,o=jh(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),s=Bh(t),l=Nh(e,a,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==Hh(t)||Uh(s))&&(u=(o=t)!==Rh(o)&&Eh(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:Dh(o)),Eh(t)?((c=Nh(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=Vh(s))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Zh(e){var t=Nh(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function Kh(e){return"html"===Hh(e)?e:e.assignedSlot||e.parentNode||(Oh(e)?e.host:null)||Bh(e)}function qh(e){return["html","body","#document"].indexOf(Hh(e))>=0?e.ownerDocument.body:Eh(e)&&Uh(e)?e:qh(Kh(e))}function Xh(e,t){var n;void 0===t&&(t=[]);var o=qh(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=Rh(o),a=r?[i].concat(i.visualViewport||[],Uh(o)?o:[]):o,s=t.concat(a);return r?s:s.concat(Xh(Kh(a)))}function Yh(e){return["table","td","th"].indexOf(Hh(e))>=0}function Qh(e){return Eh(e)&&"fixed"!==Wh(e).position?e.offsetParent:null}function Jh(e){for(var t=Rh(e),n=Qh(e);n&&Yh(n)&&"static"===Wh(n).position;)n=Qh(n);return n&&("html"===Hh(n)||"body"===Hh(n)&&"static"===Wh(n).position)?t:n||function(e){var t=/firefox/i.test($h());if(/Trident/i.test($h())&&Eh(e)&&"fixed"===Wh(e).position)return null;var n=Kh(e);for(Oh(n)&&(n=n.host);Eh(n)&&["html","body"].indexOf(Hh(n))<0;){var o=Wh(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}var ef="top",tf="bottom",nf="right",of="left",rf="auto",af=[ef,tf,nf,of],sf="start",lf="end",uf="viewport",cf="popper",df=af.reduce(function(e,t){return e.concat([t+"-"+sf,t+"-"+lf])},[]),pf=[].concat(af,[rf]).reduce(function(e,t){return e.concat([t,t+"-"+sf,t+"-"+lf])},[]),hf=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ff(e){var t=new Map,n=new Set,o=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var o=t.get(e);o&&r(o)}}),o.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||r(e)}),o}var mf={placement:"bottom",modifiers:[],strategy:"absolute"};function gf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function vf(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?mf:r;return function(e,t,n){void 0===n&&(n=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},mf,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:Th(e)?Xh(e):e.contextElement?Xh(e.contextElement):[],popper:Xh(t)};var a,u,p=function(e){var t=ff(e);return hf.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(o,s.options.modifiers),u=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return s.orderedModifiers=p.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var i=r({state:s,name:t,instance:c,options:o});l.push(i||function(){})}}),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(gf(t,n)){s.rects={reference:Gh(t,Jh(n),"fixed"===s.options.strategy),popper:Zh(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var r=s.orderedModifiers[o],i=r.fn,a=r.options,l=void 0===a?{}:a,d=r.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise(function(e){c.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(r())})})),a}),destroy:function(){d(),u=!0}};if(!gf(e,t))return c;function d(){l.forEach(function(e){return e()}),l=[]}return c.setOptions(n).then(function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)}),c}}var yf={passive:!0};const bf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=void 0===r||r,a=o.resize,s=void 0===a||a,l=Rh(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(e){e.addEventListener("scroll",n.update,yf)}),s&&l.addEventListener("resize",n.update,yf),function(){i&&u.forEach(function(e){e.removeEventListener("scroll",n.update,yf)}),s&&l.removeEventListener("resize",n.update,yf)}},data:{}};function xf(e){return e.split("-")[0]}function wf(e){return e.split("-")[1]}function _f(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Cf(e){var t,n=e.reference,o=e.element,r=e.placement,i=r?xf(r):null,a=r?wf(r):null,s=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2;switch(i){case ef:t={x:s,y:n.y-o.height};break;case tf:t={x:s,y:n.y+n.height};break;case nf:t={x:n.x+n.width,y:l};break;case of:t={x:n.x-o.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?_f(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case sf:t[u]=t[u]-(n[c]/2-o[c]/2);break;case lf:t[u]=t[u]+(n[c]/2-o[c]/2)}}return t}var Af={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kf(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,p=a.x,h=void 0===p?0:p,f=a.y,m=void 0===f?0:f,g="function"==typeof c?c({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=of,x=ef,w=window;if(u){var _=Jh(n),C="clientHeight",A="clientWidth";_===Rh(n)&&"static"!==Wh(_=Bh(n)).position&&"absolute"===s&&(C="scrollHeight",A="scrollWidth"),(r===ef||(r===of||r===nf)&&i===lf)&&(x=tf,m-=(d&&_===w&&w.visualViewport?w.visualViewport.height:_[C])-o.height,m*=l?1:-1),r!==of&&(r!==ef&&r!==tf||i!==lf)||(b=nf,h-=(d&&_===w&&w.visualViewport?w.visualViewport.width:_[A])-o.width,h*=l?1:-1)}var k,S=Object.assign({position:s},u&&Af),M=!0===c?function(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:jh(n*r)/r||0,y:jh(o*r)/r||0}}({x:h,y:m},Rh(n)):{x:h,y:m};return h=M.x,m=M.y,l?Object.assign({},S,((k={})[x]=y?"0":"",k[b]=v?"0":"",k.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",k)):Object.assign({},S,((t={})[x]=y?m+"px":"",t[b]=v?h+"px":"",t.transform="",t))}const Sf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:xf(t.placement),variation:wf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,kf(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,kf(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Mf={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];Eh(r)&&Hh(r)&&(Object.assign(r.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var o=t.elements[e],r=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});Eh(o)&&Hh(o)&&(Object.assign(o.style,i),Object.keys(r).forEach(function(e){o.removeAttribute(e)}))})}},requires:["computeStyles"]},Pf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=void 0===r?[0,0]:r,a=pf.reduce(function(e,n){return e[n]=function(e,t,n){var o=xf(e),r=[of,ef].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*r,[of,nf].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=a}};var If={left:"right",right:"left",bottom:"top",top:"bottom"};function Rf(e){return e.replace(/left|right|bottom|top/g,function(e){return If[e]})}var Tf={start:"end",end:"start"};function Ef(e){return e.replace(/start|end/g,function(e){return Tf[e]})}function Of(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Oh(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Lf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function zf(e,t,n){return t===uf?Lf(function(e,t){var n=Rh(e),o=Bh(e),r=n.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;var u=Fh();(u||!u&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s+Vh(e),y:l}}(e,n)):Th(t)?function(e,t){var n=Nh(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Lf(function(e){var t,n=Bh(e),o=Dh(e),r=null==(t=e.ownerDocument)?void 0:t.body,i=Lh(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Lh(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-o.scrollLeft+Vh(e),l=-o.scrollTop;return"rtl"===Wh(r||n).direction&&(s+=Lh(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Bh(e)))}function jf(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function $f(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function Ff(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=void 0===o?e.placement:o,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,u=n.rootBoundary,c=void 0===u?uf:u,d=n.elementContext,p=void 0===d?cf:d,h=n.altBoundary,f=void 0!==h&&h,m=n.padding,g=void 0===m?0:m,v=jf("number"!=typeof g?g:$f(g,af)),y=p===cf?"reference":cf,b=e.rects.popper,x=e.elements[f?y:p],w=function(e,t,n,o){var r="clippingParents"===t?function(e){var t=Xh(Kh(e)),n=["absolute","fixed"].indexOf(Wh(e).position)>=0&&Eh(e)?Jh(e):e;return Th(n)?t.filter(function(e){return Th(e)&&Of(e,n)&&"body"!==Hh(e)}):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],s=i.reduce(function(t,n){var r=zf(e,n,o);return t.top=Lh(r.top,t.top),t.right=zh(r.right,t.right),t.bottom=zh(r.bottom,t.bottom),t.left=Lh(r.left,t.left),t},zf(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(Th(x)?x:x.contextElement||Bh(e.elements.popper),l,c,a),_=Nh(e.elements.reference),C=Cf({reference:_,element:b,strategy:"absolute",placement:r}),A=Lf(Object.assign({},b,C)),k=p===cf?A:_,S={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},M=e.modifiersData.offset;if(p===cf&&M){var P=M[r];Object.keys(S).forEach(function(e){var t=[nf,tf].indexOf(e)>=0?1:-1,n=[ef,tf].indexOf(e)>=0?"y":"x";S[e]+=P[n]*t})}return S}const Nf={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,v=xf(g),y=l||(v!==g&&f?function(e){if(xf(e)===rf)return[];var t=Rf(e);return[Ef(e),t,Ef(t)]}(g):[Rf(g)]),b=[g].concat(y).reduce(function(e,n){return e.concat(xf(n)===rf?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?pf:l,c=wf(o),d=c?s?df:df.filter(function(e){return wf(e)===c}):af,p=d.filter(function(e){return u.indexOf(e)>=0});0===p.length&&(p=d);var h=p.reduce(function(t,n){return t[n]=Ff(e,{placement:n,boundary:r,rootBoundary:i,padding:a})[xf(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)},[]),x=t.rects.reference,w=t.rects.popper,_=new Map,C=!0,A=b[0],k=0;k<b.length;k++){var S=b[k],M=xf(S),P=wf(S)===sf,I=[ef,tf].indexOf(M)>=0,R=I?"width":"height",T=Ff(t,{placement:S,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),E=I?P?nf:of:P?tf:ef;x[R]>w[R]&&(E=Rf(E));var O=Rf(E),L=[];if(i&&L.push(T[M]<=0),s&&L.push(T[E]<=0,T[O]<=0),L.every(function(e){return e})){A=S,C=!1;break}_.set(S,L)}if(C)for(var z=function(e){var t=b.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},j=f?3:1;j>0&&"break"!==z(j);j--);t.placement!==A&&(t.modifiersData[o]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Df(e,t,n){return Lh(e,zh(t,n))}const Hf={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,p=n.tether,h=void 0===p||p,f=n.tetherOffset,m=void 0===f?0:f,g=Ff(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),v=xf(t.placement),y=wf(t.placement),b=!y,x=_f(v),w="x"===x?"y":"x",_=t.modifiersData.popperOffsets,C=t.rects.reference,A=t.rects.popper,k="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(_){if(i){var I,R="y"===x?ef:of,T="y"===x?tf:nf,E="y"===x?"height":"width",O=_[x],L=O+g[R],z=O-g[T],j=h?-A[E]/2:0,$=y===sf?C[E]:A[E],F=y===sf?-A[E]:-C[E],N=t.elements.arrow,D=h&&N?Zh(N):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=H[R],V=H[T],W=Df(0,C[E],D[E]),U=b?C[E]/2-j-W-B-S.mainAxis:$-W-B-S.mainAxis,G=b?-C[E]/2+j+W+V+S.mainAxis:F+W+V+S.mainAxis,Z=t.elements.arrow&&Jh(t.elements.arrow),K=Z?"y"===x?Z.clientTop||0:Z.clientLeft||0:0,q=null!=(I=null==M?void 0:M[x])?I:0,X=O+G-q,Y=Df(h?zh(L,O+U-q-K):L,O,h?Lh(z,X):z);_[x]=Y,P[x]=Y-O}if(s){var Q,J="x"===x?ef:of,ee="x"===x?tf:nf,te=_[w],ne="y"===w?"height":"width",oe=te+g[J],re=te-g[ee],ie=-1!==[ef,of].indexOf(v),ae=null!=(Q=null==M?void 0:M[w])?Q:0,se=ie?oe:te-C[ne]-A[ne]-ae+S.altAxis,le=ie?te+C[ne]+A[ne]-ae-S.altAxis:re,ue=h&&ie?function(e,t,n){var o=Df(e,t,n);return o>n?n:o}(se,te,le):Df(h?se:oe,te,h?le:re);_[w]=ue,P[w]=ue-te}t.modifiersData[o]=P}},requiresIfExists:["offset"]},Bf={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xf(n.placement),l=_f(s),u=[of,nf].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return jf("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:$f(e,af))}(r.padding,n),d=Zh(i),p="y"===l?ef:of,h="y"===l?tf:nf,f=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=Jh(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=c[p],x=v-d[u]-c[h],w=v/2-d[u]/2+y,_=Df(b,w,x),C=l;n.modifiersData[o]=((t={})[C]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&Of(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vf(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wf(e){return[ef,nf,tf,of].some(function(t){return e[t]>=0})}var Uf=vf({defaultModifiers:[bf,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Cf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Sf,Mf,Pf,Nf,Hf,Bf,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ff(t,{elementContext:"reference"}),s=Ff(t,{altBoundary:!0}),l=Vf(a,o),u=Vf(s,r,i),c=Wf(l),d=Wf(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]});function Gf(t){var n;return parseInt(e.version,10)>=19?(null==t||null==(n=t.props)?void 0:n.ref)||null:(null==t?void 0:t.ref)||null}const Zf=e.forwardRef(function(t,n){const{children:r,container:i,disablePortal:a=!1}=t,[s,l]=e.useState(null),u=Be(e.isValidElement(r)?Gf(r):null,n);if(_p(()=>{a||l(function(e){return"function"==typeof e?e():e}(i)||document.body)},[i,a]),_p(()=>{if(s&&!a)return He(n,s),()=>{He(n,null)}},[n,s,a]),a){if(e.isValidElement(r)){const t={ref:u};return e.cloneElement(r,t)}return(0,o.jsx)(e.Fragment,{children:r})}return(0,o.jsx)(e.Fragment,{children:s?Fr.createPortal(r,s):s})});function Kf(e){return et("MuiPopper",e)}tt("MuiPopper",["root"]);const qf=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Xf=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Yf(e){return"function"==typeof e?e():e}const Qf={},Jf=e.forwardRef(function(t,n){var r;const{anchorEl:a,children:s,direction:l,disablePortal:u,modifiers:c,open:d,placement:p,popperOptions:h,popperRef:m,slotProps:g={},slots:v={},TransitionProps:y}=t,b=(0,f.A)(t,qf),x=e.useRef(null),w=Be(x,n),_=e.useRef(null),C=Be(_,m),A=e.useRef(C);_p(()=>{A.current=C},[C]),e.useImperativeHandle(m,()=>_.current,[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p,l),[S,M]=e.useState(k),[P,I]=e.useState(Yf(a));e.useEffect(()=>{_.current&&_.current.forceUpdate()}),e.useEffect(()=>{a&&I(Yf(a))},[a]),_p(()=>{if(!P||!d)return;let e=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{M(e.placement)}}];null!=c&&(e=e.concat(c)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));const t=Uf(P,x.current,(0,i.A)({placement:k},h,{modifiers:e}));return A.current(t),()=>{t.destroy(),A.current(null)}},[P,u,c,d,h,k]);const R={placement:S};null!==y&&(R.TransitionProps=y);const T=(e=>{const{classes:t}=e;return De({root:["root"]},Kf,t)})(t),E=null!=(r=v.root)?r:"div",O=Xe({elementType:E,externalSlotProps:g.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:w},ownerState:t,className:T.root});return(0,o.jsx)(E,(0,i.A)({},O,{children:"function"==typeof s?s(R):s}))}),em=e.forwardRef(function(t,n){const{anchorEl:r,children:a,container:s,direction:l="ltr",disablePortal:u=!1,keepMounted:c=!1,modifiers:d,open:p,placement:h="bottom",popperOptions:m=Qf,popperRef:g,style:v,transition:y=!1,slotProps:b={},slots:x={}}=t,w=(0,f.A)(t,Xf),[_,C]=e.useState(!0);if(!c&&!p&&(!y||_))return null;let A;if(s)A=s;else if(r){const e=Yf(r);A=e&&void 0!==e.nodeType?Cp(e).body:Cp(null).body}const k=p||!c||y&&!_?void 0:"none",S=y?{in:p,onEnter:()=>{C(!1)},onExited:()=>{C(!0)}}:void 0;return(0,o.jsx)(Zf,{disablePortal:u,container:A,children:(0,o.jsx)(Jf,(0,i.A)({anchorEl:r,direction:l,disablePortal:u,modifiers:d,ref:n,open:y?!_:p,placement:h,popperOptions:m,popperRef:g,slotProps:b,slots:x},w,{style:(0,i.A)({position:"fixed",top:0,left:0,display:k},v),TransitionProps:S,children:a}))})}),tm=em,nm=e.createContext(void 0);function om(t){return function({props:t,name:n}){return function(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const r=t.components[n];return r.defaultProps?a(r.defaultProps,o):r.styleOverrides||r.variants?o:a(r,o)}({props:t,name:n,theme:{components:e.useContext(nm)}})}(t)}const rm=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],im=dt(tm,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),am=e.forwardRef(function(e,t){var n;const r=(0,Ih.A)(),a=om({props:e,name:"MuiPopper"}),{anchorEl:s,component:l,components:u,componentsProps:c,container:d,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:x,slots:w,slotProps:_}=a,C=(0,f.A)(a,rm),A=null!=(n=null==w?void 0:w.root)?n:null==u?void 0:u.Root,k=(0,i.A)({anchorEl:s,container:d,disablePortal:p,keepMounted:h,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:x},C);return(0,o.jsx)(im,(0,i.A)({as:l,direction:null==r?void 0:r.direction,slots:{root:A},slotProps:null!=_?_:c},k,{ref:t}))}),sm=function(t){const{children:n,defer:r=!1,fallback:i=null}=t,[a,s]=e.useState(!1);return _p(()=>{r||s(!0)},[r]),e.useEffect(()=>{r&&s(!0)},[r]),(0,o.jsx)(e.Fragment,{children:a?n:i})};function lm(e){if(null===e)return{getBoundingClientRect:()=>({width:0,height:0,x:0,y:0,top:0,right:0,bottom:0,left:0,toJSON:()=>""})};const{x:t,y:n}=e,o={width:0,height:0,x:t,y:n,top:n,right:t,bottom:n,left:t};return{getBoundingClientRect:()=>(0,i.A)({},o,{toJSON:()=>JSON.stringify(o)})}}var um=s(5508);const cm=["ownerState"],dm=["variants"],pm=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function hm(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function fm(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const mm=(0,u.A)(),gm=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function vm({defaultTheme:e,theme:t,themeId:n}){return o=t,0===Object.keys(o).length?e:t[n]||t;var o}function ym(e){return e?(t,n)=>n[e]:null}function bm(e,t,n){let{ownerState:o}=t,r=(0,f.A)(t,cm);const a="function"==typeof e?e((0,i.A)({ownerState:o},r)):e;if(Array.isArray(a))return a.flatMap(e=>bm(e,(0,i.A)({ownerState:o},r),n));if(a&&"object"==typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,f.A)(a,dm);return e.forEach(e=>{let a=!0;if("function"==typeof e.props?a=e.props((0,i.A)({ownerState:o},r,o)):Object.keys(e.props).forEach(t=>{(null==o?void 0:o[t])!==e.props[t]&&r[t]!==e.props[t]&&(a=!1)}),a){Array.isArray(t)||(t=[t]);const a="function"==typeof e.style?e.style((0,i.A)({ownerState:o},r,o)):e.style;t.push(n?fm((0,um.internal_serializeStyles)(a),n):a)}}),t}return n?fm((0,um.internal_serializeStyles)(a),n):a}function xm(e){return et("MuiChartsTooltip",e)}const wm=tt("MuiChartsTooltip",["root","paper","table","row","cell","mark","markCell","labelCell","valueCell"]),_m=dt("div",{name:"MuiChartsTooltip",slot:"Container",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),borderRadius:e.shape.borderRadius})),Cm=dt("table",{name:"MuiChartsTooltip",slot:"Table",overridesResolver:(e,t)=>t.table})(({theme:e})=>({borderSpacing:0,"& thead td":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`}})),Am=dt("tr",{name:"MuiChartsTooltip",slot:"Row",overridesResolver:(e,t)=>t.row})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(1)},"tr:last-of-type& td":{paddingBottom:e.spacing(1)}})),km=dt("td",{name:"MuiChartsTooltip",slot:"Cell",overridesResolver:(e,t)=>t.cell})(({theme:e})=>({verticalAlign:"middle",color:(e.vars||e).palette.text.secondary,[`&.${wm.labelCell}`]:{paddingLeft:e.spacing(1)},[`&.${wm.valueCell}`]:{paddingLeft:e.spacing(4),color:(e.vars||e).palette.text.primary},"td:first-of-type&":{paddingLeft:e.spacing(2)},"td:last-of-type&":{paddingRight:e.spacing(2)}})),Sm=dt("div",{name:"MuiChartsTooltip",slot:"Mark",overridesResolver:(e,t)=>t.mark,shouldForwardProp:e=>hm(e)&&"color"!==e})(({theme:e,color:t})=>({width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",boxShadow:e.shadows[1],background:t,borderColor:(e.vars||e).palette.background.paper,border:`solid ${(e.vars||e).palette.background.paper} ${e.spacing(.25)}`,boxSizing:"content-box"}));function Mm(e){const{series:t,itemData:n,sx:r,classes:a,getColor:s}=e;if(void 0===n.dataIndex||!t.data[n.dataIndex])return null;const{displayedLabel:l,color:u}="pie"===t.type?{color:s(n.dataIndex),displayedLabel:hp(t.data[n.dataIndex].label,"tooltip")}:{color:s(n.dataIndex),displayedLabel:hp(t.label,"tooltip")},c="pie"===t.type?(0,i.A)({},t.data[n.dataIndex],{label:hp(t.data[n.dataIndex].label,"tooltip")}):t.data[n.dataIndex],d=t.valueFormatter?.(c,{dataIndex:n.dataIndex});return(0,o.jsx)(_m,{sx:r,className:a.paper,children:(0,o.jsx)(Cm,{className:a.table,children:(0,o.jsx)("tbody",{children:(0,o.jsxs)(Am,{className:a.row,children:[(0,o.jsx)(km,{className:Ge(a.markCell,a.cell),children:(0,o.jsx)(Sm,{color:u,className:a.mark})}),(0,o.jsx)(km,{className:Ge(a.labelCell,a.cell),children:l}),(0,o.jsx)(km,{className:Ge(a.valueCell,a.cell),children:d})]})})})})}function Pm(t){const{isInitialized:n,data:o}=e.useContext(hs);if(!n)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return t?o.colorProcessors[t]:o.colorProcessors}function Im(t){const{content:n,itemData:r,sx:a,classes:s,contentProps:l}=t,u=Ga()[r.type].series[r.seriesId],{xAxis:c,yAxis:d,xAxisIds:p,yAxisIds:h}=Ne(),{zAxis:f,zAxisIds:m}=e.useContext(Md),g=Pm(),v=u.xAxisId??u.xAxisKey??p[0],y=u.yAxisId??u.yAxisKey??h[0],b=u.zAxisId??u.zAxisKey??m[0],x=g[u.type]?.(u,v&&c[v],y&&d[y],b&&f[b])??(()=>""),w=n??Mm,_=Xe({elementType:w,externalSlotProps:l,additionalProps:{itemData:r,series:u,sx:a,classes:s,getColor:x},ownerState:{}});return(0,o.jsx)(w,(0,i.A)({},_))}var Rm=s(9599),Tm=s(3967);const Em=Tm.A;function Om(e){return et("MuiTypography",e)}tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Lm=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],zm=dt("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Em(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>(0,i.A)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),jm={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$m={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Fm=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiTypography"}),r=(e=>$m[e]||e)(n.color),a=(0,Rm.A)((0,i.A)({},n,{color:r})),{align:s="inherit",className:l,component:u,gutterBottom:c=!1,noWrap:d=!1,paragraph:p=!1,variant:h="body1",variantMapping:m=jm}=a,g=(0,f.A)(a,Lm),v=(0,i.A)({},a,{align:s,color:r,className:l,component:u,gutterBottom:c,noWrap:d,paragraph:p,variant:h,variantMapping:m}),y=u||(p?"p":m[h]||jm[h])||"span",b=(e=>{const{align:t,gutterBottom:n,noWrap:o,paragraph:r,variant:i,classes:a}=e;return De({root:["root",i,"inherit"!==e.align&&`align${Em(t)}`,n&&"gutterBottom",o&&"noWrap",r&&"paragraph"]},Om,a)})(v);return(0,o.jsx)(zm,(0,i.A)({as:y,ref:t,ownerState:v,className:Ge(b.root,l)},g))}),Nm=Fm;let Dm;const Hm=new class{constructor(){if(this.types=new Set,Dm)throw new Error("You can only create one instance!");Dm=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}};function Bm(e){return Hm.getTypes().has(e)}function Vm(e){return Bm(e.type)}function Wm(e){const{series:t,axis:n,dataIndex:r,axisValue:i,sx:a,classes:s}=e;if(null==r)return null;const l=n.valueFormatter??(e=>"utc"===n.scaleType?function(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}(e):e.toLocaleString());return(0,o.jsx)(_m,{sx:a,className:s.paper,children:(0,o.jsxs)(Cm,{className:s.table,children:[null!=i&&!n.hideTooltip&&(0,o.jsx)("thead",{children:(0,o.jsx)(Am,{children:(0,o.jsx)(km,{colSpan:3,children:(0,o.jsx)(Nm,{children:l(i,{location:"tooltip"})})})})}),(0,o.jsx)("tbody",{children:t.filter(Vm).map(({id:e,label:t,valueFormatter:n,data:i,getColor:a})=>{const l=n(i[r]??null,{dataIndex:r});if(null==l)return null;const u=hp(t,"tooltip"),c=a(r);return(0,o.jsxs)(Am,{className:s.row,children:[(0,o.jsx)(km,{className:Ge(s.markCell,s.cell),children:c&&(0,o.jsx)(Sm,{color:c,className:s.mark})}),(0,o.jsx)(km,{className:Ge(s.labelCell,s.cell),children:u?(0,o.jsx)(Nm,{children:u}):null}),(0,o.jsx)(km,{className:Ge(s.valueCell,s.cell),children:(0,o.jsx)(Nm,{children:l})})]},e)})})]})})}function Um(t){const{content:n,contentProps:r,axisData:a,sx:s,classes:l}=t,u=a.x&&-1!==a.x.index,c=u?a.x&&a.x.index:a.y&&a.y.index,d=u?a.x&&a.x.value:a.y&&a.y.value,{xAxisIds:p,xAxis:h,yAxisIds:f,yAxis:m}=Ne(),{zAxisIds:g,zAxis:v}=e.useContext(Md),y=Ga(),b=Pm(),x=u?p[0]:f[0],w=e.useMemo(()=>{const e=[];return Object.keys(y).filter(Bm).forEach(t=>{y[t].seriesOrder.forEach(n=>{const o=y[t].series[n],r=o.xAxisId??o.xAxisKey,a=o.yAxisId??o.yAxisKey,s=u?r:a;if(void 0===s||s===x){const o=y[t].series[n],s=r??p[0],l=a??f[0],u=o.zAxisId??o.zAxisKey??g[0],c=b[t]?.(o,h[s],m[l],u&&v[u])??(()=>"");e.push((0,i.A)({},o,{getColor:c}))}})}),e},[x,b,u,y,h,p,m,f,v,g]),_=e.useMemo(()=>u?h[x]:m[x],[x,u,h,m]),C=n??Wm,A=Xe({elementType:C,externalSlotProps:r,additionalProps:{axisData:a,series:w,axis:_,dataIndex:c,axisValue:d,sx:s,classes:l},ownerState:{}});return(0,o.jsx)(C,(0,i.A)({},A))}Hm.addType("bar"),Hm.addType("line"),Hm.addType("scatter");const Gm=dt(am,{name:"MuiChartsTooltip",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal}));function Zm(t){const n=_e({props:t,name:"MuiChartsTooltip"}),{trigger:r="axis",itemContent:a,axisContent:s,slots:l,slotProps:u}=n,c=function(){const t=gs(),[n,o]=e.useState(null);return e.useEffect(()=>{const e=t.current;if(null===e)return()=>{};const n=e=>{"mouse"!==e.pointerType&&o(null)},r=e=>{o({x:e.clientX,y:e.clientY,height:e.height,pointerType:e.pointerType})};return e.addEventListener("pointerdown",r),e.addEventListener("pointermove",r),e.addEventListener("pointerup",n),()=>{e.removeEventListener("pointerdown",r),e.removeEventListener("pointermove",r),e.removeEventListener("pointerup",n)}},[t]),n}(),{item:d,axis:p}=e.useContext(nt),h="item"===r?d:p,f=function(e,t){if("item"===e)return null!==t;const n=null!==t.x,o=null!==t.y;return n||o}(r,h),m=null!==c&&f,g=(e=>{const{classes:t}=e;return De({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markCell:["markCell"],labelCell:["labelCell"],valueCell:["valueCell"]},xm,t)})({classes:n.classes}),v=l?.popper??Gm,y=Xe({elementType:v,externalSlotProps:u?.popper,additionalProps:{open:m,placement:"mouse"===c?.pointerType?"right-start":"top",anchorEl:lm(c),modifiers:[{name:"offset",options:{offset:[0,"touch"===c?.pointerType?40-c.height:0]}}]},ownerState:{}});return"none"===r?null:(0,o.jsx)(sm,{children:m&&(0,o.jsx)(v,(0,i.A)({},y,{className:g.root,children:"item"===r?(0,o.jsx)(Im,{itemData:h,content:l?.itemContent??a,contentProps:u?.itemContent,sx:{mx:2},classes:g}):(0,o.jsx)(Um,{axisData:h,content:l?.axisContent??s,contentProps:u?.axisContent,sx:{mx:2},classes:g})}))})}const Km={bar:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const o=hp(n[t].label,"legend");return void 0===o||e.push({id:t,seriesId:t,color:n[t].color,label:o}),e},[])},scatter:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const o=hp(n[t].label,"legend");return void 0===o||e.push({id:t,seriesId:t,color:n[t].color,label:o}),e},[])},line:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{const o=hp(n[t].label,"legend");return void 0===o||e.push({id:t,seriesId:t,color:n[t].color,label:o}),e},[])},pie:e=>{const{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>(n[t].data.forEach(n=>{const o=hp(n.label,"legend");void 0!==o&&e.push({id:n.id,seriesId:t,color:n.color,label:o,itemId:n.id})}),e),[])}};function qm(e){return et("MuiChartsLegend",e)}tt("MuiChartsLegend",["root","series","itemBackground","mark","label","column","row"]);const Xm=["label"];function Ym(e){const t=wh(),{id:n,positionY:r,label:a,positionX:s,innerHeight:l,innerWidth:u,legendWidth:c,color:d,gapX:p,gapY:h,itemMarkHeight:f,itemMarkWidth:m,markGap:g,labelStyle:v,classes:y,onClick:b}=e;return(0,o.jsxs)("g",{className:Ge(y?.series,`${y?.series}-${n}`),transform:`translate(${p+(t?c-s:s)} ${h+r})`,children:[(0,o.jsx)("rect",{x:t?-(u+2):-2,y:-f/2-2,width:u+4,height:l+4,fill:"transparent",className:y?.itemBackground,onClick:b,style:{pointerEvents:b?"all":"none",cursor:b?"pointer":"unset"}}),(0,o.jsx)("rect",{className:y?.mark,x:t?-m:0,y:-f/2,width:m,height:f,fill:d,style:{pointerEvents:"none"}}),(0,o.jsx)(mh,{style:(0,i.A)({pointerEvents:"none"},v),text:a,x:(t?-1:1)*(m+g),y:0})]})}const Qm=["rotate","dominantBaseline"],Jm=dt("g",{name:"MuiChartsLegend",slot:"Root",overridesResolver:(e,t)=>t.root})({});function eg(t){const{position:n,direction:r,itemsToDisplay:a,classes:s,itemMarkWidth:l=20,itemMarkHeight:u=20,markGap:c=5,itemGap:d=10,padding:p=10,labelStyle:h,onItemClick:m}=t,g=ss(),v=qi(),y=e.useMemo(()=>(0,i.A)({},g.typography.subtitle1,{color:"inherit",dominantBaseline:"central",textAnchor:"start",fill:(g.vars||g).palette.text.primary,lineHeight:1},h),[h,g]),b=e.useMemo(()=>(e=>"number"==typeof e?{left:e,right:e,top:e,bottom:e}:(0,i.A)({left:0,right:0,top:0,bottom:0},e))(p),[p]),x=e.useCallback((e,t={})=>{const n=ph({style:(0,f.A)(t,Qm),needsComputation:!0,text:e}),o={innerWidth:l+c+Math.max(...n.map(e=>e.width)),innerHeight:Math.max(u,n.length*n[0].height)};return(0,i.A)({},o,{outerWidth:o.innerWidth+d,outerHeight:o.innerHeight+d})},[d,u,l,c]),w=v.left+v.width+v.right,_=v.top+v.height+v.bottom,C=w-b.left-b.right,A=_-b.top-b.bottom,[k,S,M]=e.useMemo(()=>function(e,t,n,o,r,a,s){let l=0,u=0,c=0,d=0,p=0;const h=[0];return[e.map(e=>{let{label:m}=e,g=(0,f.A)(e,Xm);const v=t(m,n),y=(0,i.A)({},g,{label:m,positionX:l,positionY:u,innerHeight:v.innerHeight,innerWidth:v.innerWidth,outerHeight:v.outerHeight,outerWidth:v.outerWidth,rowIndex:p});return"row"===o&&(l+v.innerWidth>r&&(l=0,u+=h[p],p+=1,h.length<=p&&h.push(0),y.positionX=l,y.positionY=u,y.rowIndex=p),c=Math.max(c,l+v.outerWidth),d=Math.max(d,u+v.outerHeight),h[p]=Math.max(h[p],v.outerHeight),l+=v.outerWidth),"column"===o&&(u+v.innerHeight>a&&(l=c+s,u=0,p=0,y.positionX=l,y.positionY=u,y.rowIndex=p),h.length<=p&&h.push(0),c=Math.max(c,l+v.outerWidth),d=Math.max(d,u+v.outerHeight),p+=1,u+=v.outerHeight),y}).map(e=>(0,i.A)({},e,{positionY:e.positionY+("row"===o?h[e.rowIndex]/2:e.outerHeight/2)})),c,d]}(a,x,y,r,C,A,d),[a,x,y,r,C,A,d]),P=e.useMemo(()=>{switch(n.horizontal){case"left":return b.left;case"right":return w-b.right-S;default:return(w-S)/2}},[n.horizontal,b.left,b.right,w,S]),I=e.useMemo(()=>{switch(n.vertical){case"top":return b.top;case"bottom":return _-b.bottom-M;default:return(_-M)/2}},[n.vertical,b.top,b.bottom,_,M]);return(0,o.jsx)(sm,{children:(0,o.jsx)(Jm,{className:s?.root,children:k.map((t,n)=>(0,e.createElement)(Ym,(0,i.A)({},t,{key:t.id,gapX:P,gapY:I,legendWidth:S,itemMarkHeight:u,itemMarkWidth:l,markGap:c,labelStyle:y,classes:s,onClick:m?e=>m(e,n):void 0})))})})}const tg=["drawingArea","seriesToDisplay","hidden","onItemClick"];function ng(e){const{seriesToDisplay:t,hidden:n,onItemClick:r}=e,a=(0,f.A)(e,tg);return n?null:(0,o.jsx)(eg,(0,i.A)({},a,{itemsToDisplay:t,onItemClick:r?(e,n)=>{return r(e,{type:"series",color:(o=t[n]).color,label:o.label,seriesId:o.seriesId,itemId:o.itemId},n);var o}:void 0}))}const og=["slots","slotProps"];function rg(e){const t=_e({props:e,name:"MuiChartsLegend"}),n=(0,i.A)({direction:"row"},t,{position:(0,i.A)({horizontal:"middle",vertical:"top"},t.position)}),{slots:r,slotProps:a}=n,s=(0,f.A)(n,og),l=ss(),u=(e=>{const{classes:t,direction:n}=e;return De({root:["root",n],mark:["mark"],label:["label"],series:["series"],itemBackground:["itemBackground"]},qm,t)})((0,i.A)({},n,{theme:l})),c=qi(),d=Ga(),p=function(e){return Object.keys(e).flatMap(t=>{const n=Km[t];return void 0===n?[]:n(e[t])})}(d),h=r?.legend??ng,m=Xe({elementType:h,externalSlotProps:a?.legend,additionalProps:(0,i.A)({},s,{classes:u,drawingArea:c,series:d,seriesToDisplay:p}),ownerState:{}});return(0,o.jsx)(h,(0,i.A)({},m))}function ig(e){return et("MuiChartsAxisHighlight",e)}tt("MuiChartsAxisHighlight",["root"]);const ag=dt("path",{name:"MuiChartsAxisHighlight",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:(0,i.A)({fill:"white",fillOpacity:.1},e.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:(0,i.A)({strokeDasharray:"5 2",stroke:"#ffffff"},e.applyStyles("light",{stroke:"#000000"}))}]}));function sg(t){const{x:n,y:r}=t,{xAxisIds:i,xAxis:a,yAxisIds:s,yAxis:l}=Ne(),u=De({root:["root"]},ig),c=i[0],d=s[0],p=a[c].scale,h=l[d].scale,{axis:f}=e.useContext(nt),m=aa(p),g=aa(h),v=f.x,y=f.y,b="band"===n&&null!==v&&ia(p),x="band"===r&&null!==y&&ia(h);return(0,o.jsxs)(e.Fragment,{children:[b&&void 0!==p(v.value)&&(0,o.jsx)(ag,{d:`M ${p(v.value)-(p.step()-p.bandwidth())/2} ${h.range()[0]} l ${p.step()} 0 l 0 ${h.range()[1]-h.range()[0]} l ${-p.step()} 0 Z`,className:u.root,ownerState:{axisHighlight:"band"}}),x&&void 0!==h(y.value)&&(0,o.jsx)(ag,{d:`M ${p.range()[0]} ${h(y.value)-(h.step()-h.bandwidth())/2} l 0 ${h.step()} l ${p.range()[1]-p.range()[0]} 0 l 0 ${-h.step()} Z`,className:u.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==f.x&&(0,o.jsx)(ag,{d:`M ${m(f.x.value)} ${h.range()[0]} L ${m(f.x.value)} ${h.range()[1]}`,className:u.root,ownerState:{axisHighlight:"line"}}),"line"===r&&null!==f.y&&(0,o.jsx)(ag,{d:`M ${p.range()[0]} ${g(f.y.value)} L ${p.range()[1]} ${g(f.y.value)}`,className:u.root,ownerState:{axisHighlight:"line"}})]})}function lg(e){const{id:t,offset:n}=e,{left:r,top:a,width:s,height:l}=qi(),u=(0,i.A)({top:0,right:0,bottom:0,left:0},n);return(0,o.jsx)("clipPath",{id:t,children:(0,o.jsx)("rect",{x:r-u.left,y:a-u.top,width:s+u.left+u.right,height:l+u.top+u.bottom})})}const ug=["x","y","id","classes","color"];function cg(e){return et("MuiHighlightElement",e)}tt("MuiHighlightElement",["root"]);const dg=dt("circle",{name:"MuiHighlightElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({transform:`translate(${e.x}px, ${e.y}px)`,transformOrigin:`${e.x}px ${e.y}px`,fill:e.color}));function pg(e){const{x:t,y:n,id:r,classes:a,color:s}=e,l=(0,f.A)(e,ug),u={id:r,classes:a,color:s,x:t,y:n},c=(e=>{const{classes:t,id:n}=e;return De({root:["root",`series-${n}`]},cg,t)})(u);return(0,o.jsx)(dg,(0,i.A)({pointerEvents:"none",ownerState:u,className:c.root,cx:0,cy:0,r:void 0===l.r?5:l.r},l))}const hg=["slots","slotProps"];function fg(t){const{slots:n,slotProps:r}=t,a=(0,f.A)(t,hg),s=Za(),l=Ne(),u=qi(),{axis:c}=e.useContext(nt),d=c.x?.index;if(void 0===d)return null;if(void 0===s)return null;const{series:p,stackingGroups:h}=s,{xAxis:m,yAxis:g,xAxisIds:v,yAxisIds:y}=l,b=v[0],x=y[0],w=n?.lineHighlight??pg;return(0,o.jsx)("g",(0,i.A)({},a,{children:h.flatMap(({ids:e})=>e.flatMap(e=>{const{xAxisId:t,yAxisId:n,xAxisKey:a=b,yAxisKey:s=x,stackedData:l,data:c,disableHighlight:h}=p[e],f=t??a,v=n??s;if(h||null==c[d])return null;const y=aa(m[f].scale),_=g[v].scale,C=m[f].data;if(void 0===C)throw new Error(`MUI X: ${f===Vi?"The first `xAxis`":`The x-axis with id "${f}"`} should have data property to be able to display a line plot.`);const A=y(C[d]),k=_(l[d][1]);if(!u.isPointInside({x:A,y:k}))return null;const S=lp(p[e],m[f],g[v]);return(0,o.jsx)(w,(0,i.A)({id:e,color:S(d),x:A,y:k},r?.lineHighlight),`${e}`)}))}))}function mg(e){return et("MuiChartsGrid",e)}const gg=tt("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),vg=dt("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${gg.verticalLine}`]:t.verticalLine},{[`&.${gg.horizontalLine}`]:t.horizontalLine},t.root]})({}),yg=dt("line",{name:"MuiChartsGrid",slot:"Line",overridesResolver:(e,t)=>t.line})(({theme:e})=>({stroke:(e.vars||e).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function bg(t){const{axis:n,drawingArea:r,classes:i}=t,{scale:a,tickNumber:s,tickInterval:l}=n,u=ud({scale:a,tickNumber:s,tickInterval:l});return(0,o.jsx)(e.Fragment,{children:u.map(({value:e,offset:t})=>(0,o.jsx)(yg,{y1:r.top,y2:r.top+r.height,x1:t,x2:t,className:i.verticalLine},`vertical-${e}`))})}function xg(t){const{axis:n,drawingArea:r,classes:i}=t,{scale:a,tickNumber:s,tickInterval:l}=n,u=ud({scale:a,tickNumber:s,tickInterval:l});return(0,o.jsx)(e.Fragment,{children:u.map(({value:e,offset:t})=>(0,o.jsx)(yg,{y1:t,y2:t,x1:r.left,x2:r.left+r.width,className:i.horizontalLine},`horizontal-${e}`))})}const wg=["vertical","horizontal"];function _g(e){const t=_e({props:e,name:"MuiChartsGrid"}),n=qi(),{vertical:r,horizontal:a}=t,s=(0,f.A)(t,wg),{xAxis:l,xAxisIds:u,yAxis:c,yAxisIds:d}=Ne(),p=(({classes:e})=>De({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},mg,e))(t),h=c[d[0]],m=l[u[0]];return(0,o.jsxs)(vg,(0,i.A)({},s,{className:p.root,children:[r&&(0,o.jsx)(bg,{axis:m,drawingArea:n,classes:p}),a&&(0,o.jsx)(xg,{axis:h,drawingArea:n,classes:p})]}))}function Cg(t){const{onAxisClick:n}=t,r=gs(),i=Ga(),{axis:a}=e.useContext(nt),{xAxisIds:s,xAxis:l,yAxisIds:u,yAxis:c}=Ne();return e.useEffect(()=>{const e=r.current;if(null===e||!n)return()=>{};const t=e=>{e.preventDefault();const t=a.x&&-1!==a.x.index,o=t?s[0]:u[0],r=t?a.x&&a.x.index:a.y&&a.y.index;if(null==r)return;const d={};Object.keys(i).filter(e=>["bar","line"].includes(e)).forEach(e=>{i[e]?.seriesOrder.forEach(n=>{const a=i[e].series[n],s=a.xAxisId??a.xAxisKey,l=a.yAxisId??a.yAxisKey,u=t?s:l;void 0!==u&&u!==o||(d[n]=a.data[r])})});const p=(t?l:c)[o].data?.[r];n(e,{dataIndex:r,axisValue:p,seriesValues:d})};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}},[a.x,a.y,n,i,r,l,s,c,u]),(0,o.jsx)(e.Fragment,{})}const Ag=["message"],kg=dt("text")(({theme:e})=>(0,i.A)({},e.typography.body2,{stroke:"none",fill:e.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function Sg(e){const{message:t}=e,n=(0,f.A)(e,Ag),{top:r,left:a,height:s,width:l}=qi();return(0,o.jsx)(kg,(0,i.A)({x:a+l/2,y:r+s/2},n,{children:t??"Loading data…"}))}const Mg=["message"],Pg=dt("text")(({theme:e})=>(0,i.A)({},e.typography.body2,{stroke:"none",fill:e.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function Ig(e){const{message:t}=e,n=(0,f.A)(e,Mg),{top:r,left:a,height:s,width:l}=qi();return(0,o.jsx)(Pg,(0,i.A)({x:a+l/2,y:r+s/2},n,{children:t??"No data to display"}))}function Rg(e){const t=function(){const e=Ga();return Object.values(e).every(e=>{if(!e)return!0;const{series:t,seriesOrder:n}=e;return n.every(e=>0===t[e].data.length)})}();if(e.loading){const t=e.slots?.loadingOverlay??Sg;return(0,o.jsx)(t,(0,i.A)({},e.slotProps?.loadingOverlay))}if(t){const t=e.slots?.noDataOverlay??Ig;return(0,o.jsx)(t,(0,i.A)({},e.slotProps?.noDataOverlay))}return null}const Tg=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","tooltip","onAxisClick","onAreaClick","onLineClick","onMarkClick","axisHighlight","disableLineItemHighlight","legend","grid","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","skipAnimation","loading","highlightedItem","onHighlightChange","className","experimentalMarkRendering"],Eg=e.forwardRef(function(e,t){const n=_e({props:e,name:"MuiLineChart"}),{chartContainerProps:r,axisClickHandlerProps:a,gridProps:s,clipPathProps:l,clipPathGroupProps:u,areaPlotProps:c,linePlotProps:d,markPlotProps:p,overlayProps:h,chartsAxisProps:m,axisHighlightProps:g,lineHighlightPlotProps:v,legendProps:y,tooltipProps:b,children:x}=(e=>{const{xAxis:t,yAxis:n,series:o,width:r,height:a,margin:s,colors:l,dataset:u,sx:c,tooltip:d,onAxisClick:p,onAreaClick:h,onLineClick:m,onMarkClick:g,axisHighlight:v,disableLineItemHighlight:y,legend:b,grid:x,topAxis:w,leftAxis:_,rightAxis:C,bottomAxis:A,children:k,slots:S,slotProps:M,skipAnimation:P,loading:I,highlightedItem:R,onHighlightChange:T,className:E,experimentalMarkRendering:O}=e,L=(0,f.A)(e,Tg),z=`${Bi()}-clip-path`,j=(0,i.A)({},L,{series:o.map(e=>(0,i.A)({disableHighlight:!!y,type:"line"},e)),width:r,height:a,margin:s,colors:l,dataset:u,xAxis:t??[{id:Vi,scaleType:"point",data:Array.from({length:Math.max(...o.map(e=>(e.data??u??[]).length))},(e,t)=>t)}],yAxis:n,sx:c,highlightedItem:R,onHighlightChange:T,disableAxisListener:"axis"!==d?.trigger&&"none"===v?.x&&"none"===v?.y&&!p,className:E,skipAnimation:P});return{chartContainerProps:j,axisClickHandlerProps:{onAxisClick:p},gridProps:{vertical:x?.vertical,horizontal:x?.horizontal},clipPathProps:{id:z},clipPathGroupProps:{clipPath:`url(#${z})`},areaPlotProps:{slots:S,slotProps:M,onItemClick:h},linePlotProps:{slots:S,slotProps:M,onItemClick:m},markPlotProps:{slots:S,slotProps:M,onItemClick:g,skipAnimation:P,experimentalRendering:O},overlayProps:{slots:S,slotProps:M,loading:I},chartsAxisProps:{topAxis:w,leftAxis:_,rightAxis:C,bottomAxis:A,slots:S,slotProps:M},axisHighlightProps:(0,i.A)({x:"line"},v),lineHighlightPlotProps:{slots:S,slotProps:M},legendProps:(0,i.A)({},b,{slots:S,slotProps:M}),tooltipProps:(0,i.A)({},d,{slots:S,slotProps:M}),children:k}})(n);return(0,o.jsxs)(Sp,(0,i.A)({ref:t},r,{children:[n.onAxisClick&&(0,o.jsx)(Cg,(0,i.A)({},a)),(0,o.jsx)(_g,(0,i.A)({},s)),(0,o.jsxs)("g",(0,i.A)({},u,{children:[(0,o.jsx)(Qa,(0,i.A)({},c)),(0,o.jsx)(as,(0,i.A)({},d)),(0,o.jsx)(Rg,(0,i.A)({},h)),(0,o.jsx)(sg,(0,i.A)({},g))]})),(0,o.jsx)(Ph,(0,i.A)({},m)),(0,o.jsx)("g",{"data-drawing-container":!0,children:(0,o.jsx)(th,(0,i.A)({},p))}),(0,o.jsx)(fg,(0,i.A)({},v)),(0,o.jsx)(rg,(0,i.A)({},y)),!n.loading&&(0,o.jsx)(Zm,(0,i.A)({},b)),(0,o.jsx)(lg,(0,i.A)({},l)),x]}))}),Og=({series:e,xAxisData:t,xAxisLabel:n,yAxisLabel:r,width:i=600,height:a=400,loading:s=!1})=>{const l=t?[{data:t,scaleType:"point",label:n}]:n?[{label:n}]:void 0,u=r?[{label:r}]:void 0;return(0,o.jsx)(Eg,{series:e,xAxis:l,yAxis:u,width:i,height:a,loading:s})};function Lg(t){const{series:n,xScale:r,yScale:a,color:s,colorGetter:l,markerSize:u,onItemClick:c}=t,d=qi(),{useVoronoiInteraction:p}=e.useContext(nt),h=p||n.disableHover,f=st(h),{isFaded:m,isHighlighted:g}=at(),v=e.useMemo(()=>{const e=aa(r),t=aa(a),o=[];for(let r=0;r<n.data.length;r+=1){const i=n.data[r],a=e(i.x),u=t(i.y),c=d.isPointInside({x:a,y:u}),p={type:"scatter",seriesId:n.id,dataIndex:r};if(c){const e={seriesId:p.seriesId,dataIndex:p.dataIndex},t=g(e);o.push({x:a,y:u,isHighlighted:t,isFaded:!t&&m(e),interactionProps:f(p),id:i.id,dataIndex:r,color:l?l(r):s})}}return o},[r,a,d,n.data,n.id,g,m,f,l,s]);return(0,o.jsx)("g",{children:v.map(e=>(0,o.jsx)("circle",(0,i.A)({cx:0,cy:0,r:(e.isHighlighted?1.2:1)*u,transform:`translate(${e.x}, ${e.y})`,fill:e.color,opacity:e.isFaded?.3:1,onClick:c&&(t=>c(t,{type:"scatter",seriesId:n.id,dataIndex:e.dataIndex})),cursor:c?"pointer":"unset"},e.interactionProps),e.id))})}function zg(t){const{slots:n,slotProps:r,onItemClick:a}=t,s=Ka(),l=Ne(),{zAxis:u,zAxisIds:c}=e.useContext(Md);if(void 0===s)return null;const{series:d,seriesOrder:p}=s,{xAxis:h,yAxis:f,xAxisIds:m,yAxisIds:g}=l,v=m[0],y=g[0],b=c[0],x=n?.scatter??Lg;return(0,o.jsx)(e.Fragment,{children:p.map(e=>{const{id:t,xAxisKey:n,yAxisKey:s,zAxisKey:l,xAxisId:c,yAxisId:p,zAxisId:m,markerSize:g,color:w}=d[e],_=ap(d[e],h[c??n??v],f[p??s??y],u[m??l??b]),C=h[c??n??v].scale,A=f[p??s??y].scale;return(0,o.jsx)(x,(0,i.A)({xScale:C,yScale:A,color:w,colorGetter:_,markerSize:g??4,series:d[e],onItemClick:a},r?.scatter),t)})})}const jg=134217729;function $g(e,t,n,o,r){let i,a,s,l,u=t[0],c=o[0],d=0,p=0;c>u==c>-u?(i=u,u=t[++d]):(i=c,c=o[++p]);let h=0;if(d<e&&p<n)for(c>u==c>-u?(a=u+i,s=i-(a-u),u=t[++d]):(a=c+i,s=i-(a-c),c=o[++p]),i=a,0!==s&&(r[h++]=s);d<e&&p<n;)c>u==c>-u?(a=i+u,l=a-i,s=i-(a-l)+(u-l),u=t[++d]):(a=i+c,l=a-i,s=i-(a-l)+(c-l),c=o[++p]),i=a,0!==s&&(r[h++]=s);for(;d<e;)a=i+u,l=a-i,s=i-(a-l)+(u-l),u=t[++d],i=a,0!==s&&(r[h++]=s);for(;p<n;)a=i+c,l=a-i,s=i-(a-l)+(c-l),c=o[++p],i=a,0!==s&&(r[h++]=s);return 0===i&&0!==h||(r[h++]=i),h}function Fg(e){return new Float64Array(e)}const Ng=Fg(4),Dg=Fg(8),Hg=Fg(12),Bg=Fg(16),Vg=Fg(4);function Wg(e,t,n,o,r,i){const a=(t-i)*(n-r),s=(e-r)*(o-i),l=a-s,u=Math.abs(a+s);return Math.abs(l)>=33306690738754716e-32*u?l:-function(e,t,n,o,r,i,a){let s,l,u,c,d,p,h,f,m,g,v,y,b,x,w,_,C,A;const k=e-r,S=n-r,M=t-i,P=o-i;x=k*P,p=jg*k,h=p-(p-k),f=k-h,p=jg*P,m=p-(p-P),g=P-m,w=f*g-(x-h*m-f*m-h*g),_=M*S,p=jg*M,h=p-(p-M),f=M-h,p=jg*S,m=p-(p-S),g=S-m,C=f*g-(_-h*m-f*m-h*g),v=w-C,d=w-v,Ng[0]=w-(v+d)+(d-C),y=x+v,d=y-x,b=x-(y-d)+(v-d),v=b-_,d=b-v,Ng[1]=b-(v+d)+(d-_),A=y+v,d=A-y,Ng[2]=y-(A-d)+(v-d),Ng[3]=A;let I=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,Ng),R=22204460492503146e-32*a;if(I>=R||-I>=R)return I;if(d=e-k,s=e-(k+d)+(d-r),d=n-S,u=n-(S+d)+(d-r),d=t-M,l=t-(M+d)+(d-i),d=o-P,c=o-(P+d)+(d-i),0===s&&0===l&&0===u&&0===c)return I;if(R=11093356479670487e-47*a+33306690738754706e-32*Math.abs(I),I+=k*c+P*s-(M*u+S*l),I>=R||-I>=R)return I;x=s*P,p=jg*s,h=p-(p-s),f=s-h,p=jg*P,m=p-(p-P),g=P-m,w=f*g-(x-h*m-f*m-h*g),_=l*S,p=jg*l,h=p-(p-l),f=l-h,p=jg*S,m=p-(p-S),g=S-m,C=f*g-(_-h*m-f*m-h*g),v=w-C,d=w-v,Vg[0]=w-(v+d)+(d-C),y=x+v,d=y-x,b=x-(y-d)+(v-d),v=b-_,d=b-v,Vg[1]=b-(v+d)+(d-_),A=y+v,d=A-y,Vg[2]=y-(A-d)+(v-d),Vg[3]=A;const T=$g(4,Ng,4,Vg,Dg);x=k*c,p=jg*k,h=p-(p-k),f=k-h,p=jg*c,m=p-(p-c),g=c-m,w=f*g-(x-h*m-f*m-h*g),_=M*u,p=jg*M,h=p-(p-M),f=M-h,p=jg*u,m=p-(p-u),g=u-m,C=f*g-(_-h*m-f*m-h*g),v=w-C,d=w-v,Vg[0]=w-(v+d)+(d-C),y=x+v,d=y-x,b=x-(y-d)+(v-d),v=b-_,d=b-v,Vg[1]=b-(v+d)+(d-_),A=y+v,d=A-y,Vg[2]=y-(A-d)+(v-d),Vg[3]=A;const E=$g(T,Dg,4,Vg,Hg);x=s*c,p=jg*s,h=p-(p-s),f=s-h,p=jg*c,m=p-(p-c),g=c-m,w=f*g-(x-h*m-f*m-h*g),_=l*u,p=jg*l,h=p-(p-l),f=l-h,p=jg*u,m=p-(p-u),g=u-m,C=f*g-(_-h*m-f*m-h*g),v=w-C,d=w-v,Vg[0]=w-(v+d)+(d-C),y=x+v,d=y-x,b=x-(y-d)+(v-d),v=b-_,d=b-v,Vg[1]=b-(v+d)+(d-_),A=y+v,d=A-y,Vg[2]=y-(A-d)+(v-d),Vg[3]=A;const O=$g(E,Hg,4,Vg,Bg);return Bg[O-1]}(e,t,n,o,r,i,u)}Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(8),Fg(8),Fg(8),Fg(4),Fg(8),Fg(8),Fg(16),Fg(12),Fg(192),Fg(192),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(8),Fg(8),Fg(8),Fg(8),Fg(8),Fg(8),Fg(8),Fg(8),Fg(8),Fg(4),Fg(4),Fg(4),Fg(8),Fg(16),Fg(16),Fg(16),Fg(32),Fg(32),Fg(48),Fg(64),Fg(1152),Fg(1152),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(4),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(24),Fg(1152),Fg(1152),Fg(1152),Fg(1152),Fg(1152),Fg(2304),Fg(2304),Fg(3456),Fg(5760),Fg(8),Fg(8),Fg(8),Fg(16),Fg(24),Fg(48),Fg(48),Fg(96),Fg(192),Fg(384),Fg(384),Fg(384),Fg(768),Fg(96),Fg(96),Fg(96),Fg(1152);const Ug=Math.pow(2,-52),Gg=new Uint32Array(512);class Zg{static from(e,t=Jg,n=ev){const o=e.length,r=new Float64Array(2*o);for(let i=0;i<o;i++){const o=e[i];r[2*i]=t(o),r[2*i+1]=n(o)}return new Zg(r)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:o,_hullHash:r}=this,i=e.length>>1;let a=1/0,s=1/0,l=-1/0,u=-1/0;for(let t=0;t<i;t++){const n=e[2*t],o=e[2*t+1];n<a&&(a=n),o<s&&(s=o),n>l&&(l=n),o>u&&(u=o),this._ids[t]=t}const c=(a+l)/2,d=(s+u)/2;let p=0,h=0,f=0;for(let t=0,n=1/0;t<i;t++){const o=Kg(c,d,e[2*t],e[2*t+1]);o<n&&(p=t,n=o)}const m=e[2*p],g=e[2*p+1];for(let t=0,n=1/0;t<i;t++){if(t===p)continue;const o=Kg(m,g,e[2*t],e[2*t+1]);o<n&&o>0&&(h=t,n=o)}let v=e[2*h],y=e[2*h+1],b=1/0;for(let t=0;t<i;t++){if(t===p||t===h)continue;const n=Xg(m,g,v,y,e[2*t],e[2*t+1]);n<b&&(f=t,b=n)}let x=e[2*f],w=e[2*f+1];if(b===1/0){for(let t=0;t<i;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];Yg(this._ids,this._dists,0,i-1);const t=new Uint32Array(i);let n=0;for(let e=0,o=-1/0;e<i;e++){const r=this._ids[e],i=this._dists[r];i>o&&(t[n++]=r,o=i)}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Int32Array(0))}if(Wg(m,g,v,y,x,w)<0){const e=h,t=v,n=y;h=f,v=x,y=w,f=e,x=t,w=n}const _=function(e,t,n,o,r,i){const a=n-e,s=o-t,l=r-e,u=i-t,c=a*a+s*s,d=l*l+u*u,p=.5/(a*u-s*l);return{x:e+(u*c-s*d)*p,y:t+(a*d-l*c)*p}}(m,g,v,y,x,w);this._cx=_.x,this._cy=_.y;for(let t=0;t<i;t++)this._dists[t]=Kg(e[2*t],e[2*t+1],_.x,_.y);Yg(this._ids,this._dists,0,i-1),this._hullStart=p;let C=3;n[p]=t[f]=h,n[h]=t[p]=f,n[f]=t[h]=p,o[p]=0,o[h]=1,o[f]=2,r.fill(-1),r[this._hashKey(m,g)]=p,r[this._hashKey(v,y)]=h,r[this._hashKey(x,w)]=f,this.trianglesLen=0,this._addTriangle(p,h,f,-1,-1,-1);for(let i=0,a=0,s=0;i<this._ids.length;i++){const l=this._ids[i],u=e[2*l],c=e[2*l+1];if(i>0&&Math.abs(u-a)<=Ug&&Math.abs(c-s)<=Ug)continue;if(a=u,s=c,l===p||l===h||l===f)continue;let d=0;for(let e=0,t=this._hashKey(u,c);e<this._hashSize&&(d=r[(t+e)%this._hashSize],-1===d||d===n[d]);e++);d=t[d];let m,g=d;for(;m=n[g],Wg(u,c,e[2*g],e[2*g+1],e[2*m],e[2*m+1])>=0;)if(g=m,g===d){g=-1;break}if(-1===g)continue;let v=this._addTriangle(g,l,n[g],-1,-1,o[g]);o[l]=this._legalize(v+2),o[g]=v,C++;let y=n[g];for(;m=n[y],Wg(u,c,e[2*y],e[2*y+1],e[2*m],e[2*m+1])<0;)v=this._addTriangle(y,l,m,o[l],-1,o[y]),o[l]=this._legalize(v+2),n[y]=y,C--,y=m;if(g===d)for(;m=t[g],Wg(u,c,e[2*m],e[2*m+1],e[2*g],e[2*g+1])<0;)v=this._addTriangle(m,l,g,-1,o[g],o[m]),this._legalize(v+2),o[m]=v,n[g]=g,C--,g=m;this._hullStart=t[l]=g,n[g]=t[y]=l,n[l]=y,r[this._hashKey(u,c)]=l,r[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(C);for(let e=0,t=this._hullStart;e<C;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:o}=this;let r=0,i=0;for(;;){const a=n[e],s=e-e%3;if(i=s+(e+2)%3,-1===a){if(0===r)break;e=Gg[--r];continue}const l=a-a%3,u=s+(e+1)%3,c=l+(a+2)%3,d=t[i],p=t[e],h=t[u],f=t[c];if(qg(o[2*d],o[2*d+1],o[2*p],o[2*p+1],o[2*h],o[2*h+1],o[2*f],o[2*f+1])){t[e]=f,t[a]=d;const o=n[c];if(-1===o){let t=this._hullStart;do{if(this._hullTri[t]===c){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,o),this._link(a,n[i]),this._link(i,c);const s=l+(a+1)%3;r<Gg.length&&(Gg[r++]=s)}else{if(0===r)break;e=Gg[--r]}}return i}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,o,r,i){const a=this.trianglesLen;return this._triangles[a]=e,this._triangles[a+1]=t,this._triangles[a+2]=n,this._link(a,o),this._link(a+1,r),this._link(a+2,i),this.trianglesLen+=3,a}}function Kg(e,t,n,o){const r=e-n,i=t-o;return r*r+i*i}function qg(e,t,n,o,r,i,a,s){const l=e-a,u=t-s,c=n-a,d=o-s,p=r-a,h=i-s,f=c*c+d*d,m=p*p+h*h;return l*(d*m-f*h)-u*(c*m-f*p)+(l*l+u*u)*(c*h-d*p)<0}function Xg(e,t,n,o,r,i){const a=n-e,s=o-t,l=r-e,u=i-t,c=a*a+s*s,d=l*l+u*u,p=.5/(a*u-s*l),h=(u*c-s*d)*p,f=(a*d-l*c)*p;return h*h+f*f}function Yg(e,t,n,o){if(o-n<=20)for(let r=n+1;r<=o;r++){const o=e[r],i=t[o];let a=r-1;for(;a>=n&&t[e[a]]>i;)e[a+1]=e[a--];e[a+1]=o}else{let r=n+1,i=o;Qg(e,n+o>>1,r),t[e[n]]>t[e[o]]&&Qg(e,n,o),t[e[r]]>t[e[o]]&&Qg(e,r,o),t[e[n]]>t[e[r]]&&Qg(e,n,r);const a=e[r],s=t[a];for(;;){do{r++}while(t[e[r]]<s);do{i--}while(t[e[i]]>s);if(i<r)break;Qg(e,r,i)}e[n+1]=e[i],e[i]=a,o-r+1>=i-n?(Yg(e,t,r,o),Yg(e,t,n,i-1)):(Yg(e,t,n,i-1),Yg(e,t,r,o))}}function Qg(e,t,n){const o=e[t];e[t]=e[n],e[n]=o}function Jg(e){return e[0]}function ev(e){return e[1]}const tv=1e-6;class nv{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const o=(e=+e)+(n=+n),r=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${o},${r}`:(Math.abs(this._x1-o)>tv||Math.abs(this._y1-r)>tv)&&(this._+="L"+o+","+r),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=o},${this._y1=r}`)}rect(e,t,n,o){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+o}h${-n}Z`}value(){return this._||null}}class ov{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class rv{constructor(e,[t,n,o,r]=[0,0,960,500]){if(!((o=+o)>=(t=+t)&&(r=+r)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=o,this.xmin=t,this.ymax=r,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:o}=this;let r,i;const a=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let o,s,l=0,u=0,c=n.length;l<c;l+=3,u+=2){const c=2*n[l],d=2*n[l+1],p=2*n[l+2],h=e[c],f=e[c+1],m=e[d],g=e[d+1],v=e[p],y=e[p+1],b=m-h,x=g-f,w=v-h,_=y-f,C=2*(b*_-x*w);if(Math.abs(C)<1e-9){if(void 0===r){r=i=0;for(const n of t)r+=e[2*n],i+=e[2*n+1];r/=t.length,i/=t.length}const n=1e9*Math.sign((r-h)*_-(i-f)*w);o=(h+v)/2-n*_,s=(f+y)/2+n*w}else{const e=1/C,t=b*b+x*x,n=w*w+_*_;o=h+(_*t-x*n)*e,s=f+(b*n-w*t)*e}a[u]=o,a[u+1]=s}let s,l,u,c=t[t.length-1],d=4*c,p=e[2*c],h=e[2*c+1];o.fill(0);for(let n=0;n<t.length;++n)c=t[n],s=d,l=p,u=h,d=4*c,p=e[2*c],h=e[2*c+1],o[s+2]=o[d]=u-h,o[s+3]=o[d+1]=p-l}render(e){const t=null==e?e=new nv:void 0,{delaunay:{halfedges:n,inedges:o,hull:r},circumcenters:i,vectors:a}=this;if(r.length<=1)return null;for(let t=0,o=n.length;t<o;++t){const o=n[t];if(o<t)continue;const r=2*Math.floor(t/3),a=2*Math.floor(o/3),s=i[r],l=i[r+1],u=i[a],c=i[a+1];this._renderSegment(s,l,u,c,e)}let s,l=r[r.length-1];for(let t=0;t<r.length;++t){s=l,l=r[t];const n=2*Math.floor(o[l]/3),u=i[n],c=i[n+1],d=4*s,p=this._project(u,c,a[d+2],a[d+3]);p&&this._renderSegment(u,c,p[0],p[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new nv:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new nv:void 0,o=this._clip(e);if(null===o||!o.length)return;t.moveTo(o[0],o[1]);let r=o.length;for(;o[0]===o[r-2]&&o[1]===o[r-1]&&r>1;)r-=2;for(let e=2;e<r;e+=2)o[e]===o[e-2]&&o[e+1]===o[e-1]||t.lineTo(o[e],o[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new ov;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,o,r){let i;const a=this._regioncode(e,t),s=this._regioncode(n,o);0===a&&0===s?(r.moveTo(e,t),r.lineTo(n,o)):(i=this._clipSegment(e,t,n,o,a,s))&&(r.moveTo(i[0],i[1]),r.lineTo(i[2],i[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let o=0,r=t.length;o<r;o+=2)for(let i=0,a=e.length;i<a;i+=2)if(t[o]===e[i]&&t[o+1]===e[i+1]&&t[(o+2)%r]===e[(i+a-2)%a]&&t[(o+3)%r]===e[(i+a-1)%a]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:o,triangles:r}}=this,i=n[e];if(-1===i)return null;const a=[];let s=i;do{const n=Math.floor(s/3);if(a.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,r[s]!==e)break;s=o[s]}while(s!==i&&-1!==s);return a}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,o=4*e;return this._simplify(n[o]||n[o+1]?this._clipInfinite(e,t,n[o],n[o+1],n[o+2],n[o+3]):this._clipFinite(e,t))}_clipFinite(e,t){const n=t.length;let o,r,i,a,s=null,l=t[n-2],u=t[n-1],c=this._regioncode(l,u),d=0;for(let p=0;p<n;p+=2)if(o=l,r=u,l=t[p],u=t[p+1],i=c,c=this._regioncode(l,u),0===i&&0===c)a=d,d=0,s?s.push(l,u):s=[l,u];else{let t,n,p,h,f;if(0===i){if(null===(t=this._clipSegment(o,r,l,u,i,c)))continue;[n,p,h,f]=t}else{if(null===(t=this._clipSegment(l,u,o,r,c,i)))continue;[h,f,n,p]=t,a=d,d=this._edgecode(n,p),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(n,p):s=[n,p]}a=d,d=this._edgecode(h,f),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(h,f):s=[h,f]}if(s)a=d,d=this._edgecode(s[0],s[1]),a&&d&&this._edge(e,a,d,s,s.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(e,t,n,o,r,i){const a=r<i;for(a&&([e,t,n,o,r,i]=[n,o,e,t,i,r]);;){if(0===r&&0===i)return a?[n,o,e,t]:[e,t,n,o];if(r&i)return null;let s,l,u=r||i;8&u?(s=e+(n-e)*(this.ymax-t)/(o-t),l=this.ymax):4&u?(s=e+(n-e)*(this.ymin-t)/(o-t),l=this.ymin):2&u?(l=t+(o-t)*(this.xmax-e)/(n-e),s=this.xmax):(l=t+(o-t)*(this.xmin-e)/(n-e),s=this.xmin),r?(e=s,t=l,r=this._regioncode(e,t)):(n=s,o=l,i=this._regioncode(n,o))}}_clipInfinite(e,t,n,o,r,i){let a,s=Array.from(t);if((a=this._project(s[0],s[1],n,o))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],r,i))&&s.push(a[0],a[1]),s=this._clipFinite(e,s))for(let t,n=0,o=s.length,r=this._edgecode(s[o-2],s[o-1]);n<o;n+=2)t=r,r=this._edgecode(s[n],s[n+1]),t&&r&&(n=this._edge(e,t,r,s,n),o=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,o,r){for(;t!==n;){let n,i;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,i=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,i=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,i=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,i=this.ymin}o[r]===n&&o[r+1]===i||!this.contains(e,n,i)||(o.splice(r,0,n,i),r+=2)}return r}_project(e,t,n,o){let r,i,a,s=1/0;if(o<0){if(t<=this.ymin)return null;(r=(this.ymin-t)/o)<s&&(a=this.ymin,i=e+(s=r)*n)}else if(o>0){if(t>=this.ymax)return null;(r=(this.ymax-t)/o)<s&&(a=this.ymax,i=e+(s=r)*n)}if(n>0){if(e>=this.xmax)return null;(r=(this.xmax-e)/n)<s&&(i=this.xmax,a=t+(s=r)*o)}else if(n<0){if(e<=this.xmin)return null;(r=(this.xmin-e)/n)<s&&(i=this.xmin,a=t+(s=r)*o)}return[i,a]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){const n=(t+2)%e.length,o=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[o]||e[t+1]===e[n+1]&&e[n+1]===e[o+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}}const iv=2*Math.PI,av=Math.pow;function sv(e){return e[0]}function lv(e){return e[1]}function uv(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class cv{static from(e,t=sv,n=lv,o){return new cv("length"in e?function(e,t,n,o){const r=e.length,i=new Float64Array(2*r);for(let a=0;a<r;++a){const r=e[a];i[2*a]=t.call(o,r,a,e),i[2*a+1]=n.call(o,r,a,e)}return i}(e,t,n,o):Float64Array.from(function*(e,t,n,o){let r=0;for(const i of e)yield t.call(o,i,r,e),yield n.call(o,i,r,e),++r}(e,t,n,o)))}constructor(e){this._delaunator=new Zg(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const o=2*t[e],r=2*t[e+1],i=2*t[e+2];if((n[i]-n[o])*(n[r+1]-n[o+1])-(n[r]-n[o])*(n[i+1]-n[o+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);const e=this.collinear[0],n=this.collinear[this.collinear.length-1],o=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],r=1e-8*Math.hypot(o[3]-o[1],o[2]-o[0]);for(let e=0,n=t.length/2;e<n;++e){const n=uv(t[2*e],t[2*e+1],r);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new Zg(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,o=this.hull=this._delaunator.hull,r=this.triangles=this._delaunator.triangles,i=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=r[e%3==2?e-2:e+1];-1!==n[e]&&-1!==i[t]||(i[t]=e)}for(let e=0,t=o.length;e<t;++e)a[o[e]]=e;o.length<=2&&o.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=o[0],i[o[0]]=1,2===o.length&&(i[o[1]]=0,this.triangles[1]=o[1],this.triangles[2]=o[1]))}voronoi(e){return new rv(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:o,halfedges:r,triangles:i,collinear:a}=this;if(a){const t=a.indexOf(e);return t>0&&(yield a[t-1]),void(t<a.length-1&&(yield a[t+1]))}const s=t[e];if(-1===s)return;let l=s,u=-1;do{if(yield u=i[l],l=l%3==2?l-2:l+1,i[l]!==e)return;if(l=r[l],-1===l){const t=n[(o[e]+1)%n.length];return void(t!==u&&(yield t))}}while(l!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const o=n;let r;for(;(r=this._step(n,e,t))>=0&&r!==n&&r!==o;)n=r;return r}_step(e,t,n){const{inedges:o,hull:r,_hullIndex:i,halfedges:a,triangles:s,points:l}=this;if(-1===o[e]||!l.length)return(e+1)%(l.length>>1);let u=e,c=av(t-l[2*e],2)+av(n-l[2*e+1],2);const d=o[e];let p=d;do{let o=s[p];const d=av(t-l[2*o],2)+av(n-l[2*o+1],2);if(d<c&&(c=d,u=o),p=p%3==2?p-2:p+1,s[p]!==e)break;if(p=a[p],-1===p){if(p=r[(i[e]+1)%r.length],p!==o&&av(t-l[2*p],2)+av(n-l[2*p+1],2)<c)return p;break}}while(p!==d);return u}render(e){const t=null==e?e=new nv:void 0,{points:n,halfedges:o,triangles:r}=this;for(let t=0,i=o.length;t<i;++t){const i=o[t];if(i<t)continue;const a=2*r[t],s=2*r[i];e.moveTo(n[a],n[a+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){void 0!==t||e&&"function"==typeof e.moveTo||(t=e,e=null),t=null==t?2:+t;const n=null==e?e=new nv:void 0,{points:o}=this;for(let n=0,r=o.length;n<r;n+=2){const r=o[n],i=o[n+1];e.moveTo(r+t,i),e.arc(r,i,t,0,iv)}return n&&n.value()}renderHull(e){const t=null==e?e=new nv:void 0,{hull:n,points:o}=this,r=2*n[0],i=n.length;e.moveTo(o[r],o[r+1]);for(let t=1;t<i;++t){const r=2*n[t];e.lineTo(o[r],o[r+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new ov;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new nv:void 0,{points:o,triangles:r}=this,i=2*r[e*=3],a=2*r[e+1],s=2*r[e+2];return t.moveTo(o[i],o[i+1]),t.lineTo(o[a],o[a+1]),t.lineTo(o[s],o[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new ov;return this.renderTriangle(e,t),t.value()}}function dv(t){const{voronoiMaxRadius:n,onItemClick:r}=t,i=gs(),a=qi(),{xAxis:s,yAxis:l,xAxisIds:u,yAxisIds:c}=Ne(),{dispatch:d}=e.useContext(nt),{series:p,seriesOrder:h}=Ka()??{},f=e.useRef({}),m=e.useRef(void 0),g=e.useRef(void 0),{setHighlighted:v,clearHighlighted:y}=at(),b=u[0],x=c[0];return _p(()=>(d({type:"updateVoronoiUsage",useVoronoiInteraction:!0}),()=>{d({type:"updateVoronoiUsage",useVoronoiInteraction:!1})}),[d]),_p(()=>{if(void 0===h||void 0===p)return;f.current={};let e=[];h.forEach(t=>{const{data:n,xAxisId:o,yAxisId:r,xAxisKey:i,yAxisKey:u}=p[t],c=s[o??i??b].scale,d=l[r??u??x].scale,h=aa(c),m=aa(d),g=n.flatMap(({x:e,y:t})=>{const n=h(e),o=m(t);return a.isPointInside({x:n,y:o})?[n,o]:[-a.width,-a.height]});f.current[t]={seriesId:t,startIndex:e.length,endIndex:e.length+g.length},e=e.concat(g)}),m.current=new cv(e),g.current=void 0},[b,x,p,h,s,l,a]),e.useEffect(()=>{if(null===i.current)return;const e=i.current;function t(t){const o=ms(e,t);if(!a.isPointInside(o))return g.current=void 0,"outside-chart";if(!m.current)return"no-point-found";const r=m.current.find(o.x,o.y,g.current);if(void 0===r)return"no-point-found";g.current=r;const i=Object.values(f.current).find(e=>2*r>=e.startIndex&&2*r<e.endIndex);if(void 0===i)return"no-point-found";const s=(2*r-f.current[i.seriesId].startIndex)/2;if(void 0!==n){const e=m.current.points[2*r],t=m.current.points[2*r+1];if((e-o.x)**2+(t-o.y)**2>n**2)return"outside-voronoi-max-radius"}return{seriesId:i.seriesId,dataIndex:s}}const o=()=>{d({type:"exitChart"}),y()},s=e=>{const n=t(e);if("outside-chart"===n)return d({type:"exitChart"}),void y();if("outside-voronoi-max-radius"===n||"no-point-found"===n)return d({type:"leaveItem",data:{type:"scatter"}}),void y();const{seriesId:o,dataIndex:r}=n;d({type:"enterItem",data:{type:"scatter",seriesId:o,dataIndex:r}}),v({seriesId:o,dataIndex:r})},l=e=>{if(!r)return;const n=t(e);if("string"==typeof n)return;const{seriesId:o,dataIndex:i}=n;r(e,{type:"scatter",seriesId:o,dataIndex:i})};return e.addEventListener("pointerleave",o),e.addEventListener("pointermove",s),e.addEventListener("click",l),()=>{e.removeEventListener("pointerleave",o),e.removeEventListener("pointermove",s),e.removeEventListener("click",l)}},[i,d,l,s,n,r,v,y,a]),(0,o.jsx)(e.Fragment,{})}const pv=["xAxis","yAxis","zAxis","series","tooltip","axisHighlight","voronoiMaxRadius","disableVoronoi","legend","width","height","margin","colors","sx","grid","topAxis","leftAxis","rightAxis","bottomAxis","onItemClick","children","slots","slotProps","loading","highlightedItem","onHighlightChange","className"],hv=e.forwardRef(function(e,t){const n=_e({props:e,name:"MuiScatterChart"}),{chartContainerProps:r,zAxisProps:a,voronoiHandlerProps:s,chartsAxisProps:l,gridProps:u,scatterPlotProps:c,overlayProps:d,legendProps:p,axisHighlightProps:h,tooltipProps:m,children:g}=(e=>{const{xAxis:t,yAxis:n,zAxis:o,series:r,tooltip:a,axisHighlight:s,voronoiMaxRadius:l,disableVoronoi:u,legend:c,width:d,height:p,margin:h,colors:m,sx:g,grid:v,topAxis:y,leftAxis:b,rightAxis:x,bottomAxis:w,onItemClick:_,children:C,slots:A,slotProps:k,loading:S,highlightedItem:M,onHighlightChange:P,className:I}=e,R=(0,f.A)(e,pv),T=(0,i.A)({},R,{series:r.map(e=>(0,i.A)({type:"scatter"},e)),width:d,height:p,margin:h,colors:m,xAxis:t,yAxis:n,sx:g,highlightedItem:M,onHighlightChange:P,className:I});return{chartContainerProps:T,zAxisProps:{zAxis:o},voronoiHandlerProps:{voronoiMaxRadius:l,onItemClick:_},chartsAxisProps:{topAxis:y,leftAxis:b,rightAxis:x,bottomAxis:w,slots:A,slotProps:k},gridProps:{vertical:v?.vertical,horizontal:v?.horizontal},scatterPlotProps:{onItemClick:u?_:void 0,slots:A,slotProps:k},overlayProps:{loading:S,slots:A,slotProps:k},legendProps:(0,i.A)({},c,{slots:A,slotProps:k}),axisHighlightProps:(0,i.A)({y:"none",x:"none"},s),tooltipProps:(0,i.A)({trigger:"item"},a,{slots:A,slotProps:k}),children:C}})(n);return(0,o.jsx)(Sp,(0,i.A)({ref:t},r,{children:(0,o.jsxs)(Pd,(0,i.A)({},a,{children:[!n.disableVoronoi&&(0,o.jsx)(dv,(0,i.A)({},s)),(0,o.jsx)(Ph,(0,i.A)({},l)),(0,o.jsx)(_g,(0,i.A)({},u)),(0,o.jsx)("g",{"data-drawing-container":!0,children:(0,o.jsx)(zg,(0,i.A)({},c))}),(0,o.jsx)(Rg,(0,i.A)({},d)),(0,o.jsx)(rg,(0,i.A)({},p)),(0,o.jsx)(sg,(0,i.A)({},h)),!n.loading&&(0,o.jsx)(Zm,(0,i.A)({},m)),g]}))}))}),fv=({series:e,xAxisLabel:t,yAxisLabel:n,width:r=600,height:i=400,loading:a=!1})=>{const s=t?[{label:t}]:void 0,l=n?[{label:n}]:void 0;return(0,o.jsx)(hv,{series:e,xAxis:s,yAxis:l,width:r,height:i,loading:a})},mv=["id","dataIndex","classes","color","slots","slotProps","style","onClick"];function gv(e){return et("MuiBarElement",e)}tt("MuiBarElement",["root"]);const vv=dt(Jr.rect,{name:"MuiBarElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({stroke:"none",fill:e.isHighlighted?yi(e.color).brighter(.5).formatHex():e.color,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:e.isFaded?.3:1}));function yv(e){const{id:t,dataIndex:n,classes:r,color:a,slots:s,slotProps:l,style:u,onClick:c}=e,d=(0,f.A)(e,mv),p=st(),{isFaded:h,isHighlighted:m}=ta({seriesId:t,dataIndex:n}),g={id:t,dataIndex:n,classes:r,color:a,isFaded:h,isHighlighted:m},v=(e=>{const{classes:t,id:n}=e;return De({root:["root",`series-${n}`]},gv,t)})(g),y=s?.bar??vv,b=Xe({elementType:y,externalSlotProps:l?.bar,externalForwardedProps:d,additionalProps:(0,i.A)({},p({type:"bar",seriesId:t,dataIndex:n}),{style:u,onClick:c,cursor:c?"pointer":"unset"}),className:v.root,ownerState:g});return(0,o.jsx)(y,(0,i.A)({},b))}const bv=(e,{hasNegative:t,hasPositive:n,borderRadius:o,layout:r})=>{if(!o)return 0;const i="vertical"===r;return"top-left"===e&&(i&&n||!i&&t)||"top-right"===e&&(i&&n||!i&&n)||"bottom-right"===e&&(i&&t||!i&&n)||"bottom-left"===e&&(i&&t||!i&&t)?o:0},xv=["style","maskId"];function wv(e){const t=e.ownerState;return(0,o.jsx)(Jr.rect,{style:(0,i.A)({},e.style,{clipPath:("vertical"===e.ownerState.layout?e.style?.height:e.style?.width).to(e=>{return`inset(0px round ${(n={topLeft:Math.min(e,bv("top-left",t)),topRight:Math.min(e,bv("top-right",t)),bottomRight:Math.min(e,bv("bottom-right",t)),bottomLeft:Math.min(e,bv("bottom-left",t))}).topLeft}px ${n.topRight}px ${n.bottomRight}px ${n.bottomLeft}px)`;var n})})})}function _v(e){const{style:t,maskId:n}=e,r=(0,f.A)(e,xv);return!e.borderRadius||e.borderRadius<=0?null:(0,o.jsx)("clipPath",{id:n,children:(0,o.jsx)(wv,{ownerState:r,style:t})})}function Cv(e){return et("MuiBarLabel",e)}const Av=tt("MuiBarLabel",["root","highlighted","faded"]),kv=["seriesId","dataIndex","color","isFaded","isHighlighted","classes"],Sv=dt(Jr.text,{name:"MuiBarLabel",slot:"Root",overridesResolver:(e,t)=>[{[`&.${Av.faded}`]:t.faded},{[`&.${Av.highlighted}`]:t.highlighted},t.root]})(({theme:e})=>(0,i.A)({},e?.typography?.body2,{stroke:"none",fill:(e.vars||e)?.palette?.text?.primary,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",textAnchor:"middle",dominantBaseline:"central",pointerEvents:"none",opacity:1,[`&.${Av.faded}`]:{opacity:.3}}));function Mv(e){const t=_e({props:e,name:"MuiBarLabel"}),n=(0,f.A)(t,kv);return(0,o.jsx)(Sv,(0,i.A)({},n))}const Pv=["seriesId","classes","color","style","dataIndex","barLabel","slots","slotProps","height","width","value"],Iv=["ownerState"];function Rv(e){const{seriesId:t,classes:n,color:r,style:a,dataIndex:s,barLabel:l,slots:u,slotProps:c,height:d,width:p,value:h}=e,m=(0,f.A)(e,Pv),{isFaded:g,isHighlighted:v}=ta({seriesId:t,dataIndex:s}),y={seriesId:t,classes:n,color:r,isFaded:g,isHighlighted:v,dataIndex:s},b=(e=>{const{classes:t,seriesId:n,isFaded:o,isHighlighted:r}=e;return De({root:["root",`series-${n}`,r&&"highlighted",o&&"faded"]},Cv,t)})(y),x=u?.barLabel??Mv,w=Xe({elementType:x,externalSlotProps:c?.barLabel,additionalProps:(0,i.A)({},m,{style:a,className:b.root}),ownerState:y}),{ownerState:_}=w,C=(0,f.A)(w,Iv);if(!l)return null;const A=(e=>{const{barLabel:t,value:n,dataIndex:o,seriesId:r,height:i,width:a}=e;return"value"===t?n?n?.toString():null:t({seriesId:r,dataIndex:o,value:n},{bar:{height:i,width:a}})})({barLabel:l,value:h,dataIndex:s,seriesId:t,height:d,width:p});return A?(0,o.jsx)(x,(0,i.A)({},C,_,{children:A})):null}const Tv=["bars","skipAnimation"],Ev=({layout:e,yOrigin:t,x:n,width:o,y:r,xOrigin:a,height:s})=>(0,i.A)({},"vertical"===e?{y:t,x:n+o/2,height:0,width:o}:{y:r+s/2,x:a,height:s,width:0}),Ov=({x:e,width:t,y:n,height:o})=>({x:e+t/2,y:n+o/2,height:o,width:t});function Lv(t){const{bars:n,skipAnimation:r}=t,a=(0,f.A)(t,Tv),s=Tr(n,{keys:e=>`${e.seriesId}-${e.dataIndex}`,from:Ev,leave:null,enter:Ov,update:Ov,immediate:r});return(0,o.jsx)(e.Fragment,{children:s((e,{seriesId:t,dataIndex:n,color:r,value:s,width:l,height:u})=>(0,o.jsx)(Rv,(0,i.A)({seriesId:t,dataIndex:n,value:s,color:r,width:l,height:u},a,{style:e})))})}const zv=(e,t)=>t===("x"===e?Vi:Wi)?`The first \`${e}Axis\``:`The ${e}-axis with id "${t}"`,jv=["skipAnimation","onItemClick","borderRadius","barLabel"],$v=({layout:e,yOrigin:t,x:n,width:o,y:r,xOrigin:a,height:s})=>(0,i.A)({},"vertical"===e?{y:t,x:n,height:0,width:o}:{y:r,x:a,height:s,width:0}),Fv=({x:e,width:t,y:n,height:o})=>({y:n,x:e,height:o,width:t});function Nv(t){const{completedData:n,masksData:r}=(()=>{const t=function(){const t=Ga();return e.useMemo(()=>t.bar,[t.bar])}()??{series:{},stackingGroups:[],seriesOrder:[]},n=Ne(),o=Xi(),{series:r,stackingGroups:i}=t,{xAxis:a,yAxis:s,xAxisIds:l,yAxisIds:u}=n,c=l[0],d=u[0],p={},h=i.flatMap(({ids:e},t)=>e.flatMap(e=>{const n=r[e].xAxisId??r[e].xAxisKey??c,l=r[e].yAxisId??r[e].yAxisKey??d,u=a[n],h=s[l],f="vertical"===r[e].layout;!function(e,t,n,o,r,i){const a=o[n],s=i[r],l=e?a:s,u=e?s:a,c=e?n:r,d=e?r:n,p=e?"x":"y",h=e?"y":"x";if(!Ic(l))throw new Error(`MUI X: ${zv(p,c)} should be of type "band" to display the bar series of id "${t}".`);if(void 0===l.data)throw new Error(`MUI X: ${zv(p,c)} should have data property.`);if(Ic(u)||Rc(u))throw new Error(`MUI X: ${zv(h,d)} should be a continuous type to display the bar series of id "${t}".`)}(f,e,n,a,l,s);const m=f?u:h,g=u.scale,v=h.scale,y=op(r[e],a[n],s[l]),b=m.scale.bandwidth(),{barWidth:x,offset:w}=function({bandWidth:e,numberOfGroups:t,gapRatio:n}){if(0===n)return{barWidth:e/t,offset:0};const o=e/(t+(t-1)*n);return{barWidth:o,offset:n*o}}({bandWidth:b,numberOfGroups:i.length,gapRatio:m.barGapRatio}),_=t*(x+w),{stackedData:C}=r[e];return C.map((i,u)=>{const c=i.map(e=>f?v(e):g(e)),d=Math.round(Math.min(...c)),h=Math.round(Math.max(...c)),m=r[e].stack,b={seriesId:e,dataIndex:u,layout:r[e].layout,x:f?g(a[n].data?.[u])+_:d,y:f?d:v(s[l].data?.[u])+_,xOrigin:g(0),yOrigin:v(0),height:f?h-d:x,width:f?x:h-d,color:y(u),value:r[e].data[u],maskId:`${o}_${m||e}_${t}_${u}`};p[b.maskId]||(p[b.maskId]={id:b.maskId,width:0,height:0,hasNegative:!1,hasPositive:!1,layout:b.layout,xOrigin:g(0),yOrigin:v(0),x:0,y:0});const w=p[b.maskId];return w.width="vertical"===b.layout?b.width:w.width+b.width,w.height="vertical"===b.layout?w.height+b.height:b.height,w.x=Math.min(0===w.x?1/0:w.x,b.x),w.y=Math.min(0===w.y?1/0:w.y,b.y),w.hasNegative=w.hasNegative||(b.value??0)<0,w.hasPositive=w.hasPositive||(b.value??0)>0,b})}));return{completedData:h,masksData:Object.values(p)}})(),{skipAnimation:a,onItemClick:s,borderRadius:l,barLabel:u}=t,c=(0,f.A)(t,jv),d=Xa(a),p=!l||l<=0,h=Tr(n,{keys:e=>`${e.seriesId}-${e.dataIndex}`,from:$v,leave:$v,enter:Fv,update:Fv,immediate:d}),m=Tr(p?[]:r,{keys:e=>e.id,from:$v,leave:$v,enter:Fv,update:Fv,immediate:d});return(0,o.jsxs)(e.Fragment,{children:[!p&&m((e,{id:t,hasPositive:n,hasNegative:r,layout:i})=>(0,o.jsx)(_v,{maskId:t,borderRadius:l,hasNegative:r,hasPositive:n,layout:i,style:e})),h((e,{seriesId:t,dataIndex:n,color:r,maskId:a})=>{const l=(0,o.jsx)(yv,(0,i.A)({id:t,dataIndex:n,color:r},c,{onClick:s&&(e=>{s(e,{type:"bar",seriesId:t,dataIndex:n})}),style:e}));return p?l:(0,o.jsx)("g",{clipPath:`url(#${a})`,children:l})}),u&&(0,o.jsx)(Lv,(0,i.A)({bars:n,skipAnimation:d,barLabel:u},c))]})}const Dv=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","tooltip","onAxisClick","axisHighlight","legend","grid","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","skipAnimation","loading","layout","onItemClick","highlightedItem","onHighlightChange","borderRadius","barLabel","className"],Hv=e.forwardRef(function(e,t){const n=_e({props:e,name:"MuiBarChart"}),{chartContainerProps:r,barPlotProps:a,axisClickHandlerProps:s,gridProps:l,clipPathProps:u,clipPathGroupProps:c,overlayProps:d,chartsAxisProps:p,axisHighlightProps:h,legendProps:m,tooltipProps:g,children:v}=(e=>{const{xAxis:t,yAxis:n,series:o,width:r,height:a,margin:s,colors:l,dataset:u,sx:c,tooltip:d,onAxisClick:p,axisHighlight:h,legend:m,grid:g,topAxis:v,leftAxis:y,rightAxis:b,bottomAxis:x,children:w,slots:_,slotProps:C,skipAnimation:A,loading:k,layout:S,onItemClick:M,highlightedItem:P,onHighlightChange:I,borderRadius:R,barLabel:T,className:E}=e,O=(0,f.A)(e,Dv),L=`${Bi()}-clip-path`,z="horizontal"===S||void 0===S&&o.some(e=>"horizontal"===e.layout),j={scaleType:"band",data:Array.from({length:Math.max(...o.map(e=>(e.data??u??[]).length))},(e,t)=>t)},$=(0,i.A)({},O,{series:o.map(e=>(0,i.A)({type:"bar"},e,{layout:z?"horizontal":"vertical"})),width:r,height:a,margin:s,colors:l,dataset:u,xAxis:t??(z?void 0:[(0,i.A)({id:Vi},j)]),yAxis:n??(z?[(0,i.A)({id:Wi},j)]:void 0),sx:c,highlightedItem:P,onHighlightChange:I,disableAxisListener:"axis"!==d?.trigger&&"none"===h?.x&&"none"===h?.y&&!p,className:E,skipAnimation:A});return{chartContainerProps:$,barPlotProps:{onItemClick:M,slots:_,slotProps:C,borderRadius:R,barLabel:T},axisClickHandlerProps:{onAxisClick:p},gridProps:{vertical:g?.vertical,horizontal:g?.horizontal},clipPathProps:{id:L},clipPathGroupProps:{clipPath:`url(#${L})`},overlayProps:{slots:_,slotProps:C,loading:k},chartsAxisProps:{topAxis:v,leftAxis:y,rightAxis:b,bottomAxis:x,slots:_,slotProps:C},axisHighlightProps:(0,i.A)({},z?{y:"band"}:{x:"band"},h),legendProps:(0,i.A)({},m,{slots:_,slotProps:C}),tooltipProps:(0,i.A)({},d,{slots:_,slotProps:C}),children:w}})(n);return(0,o.jsxs)(Sp,(0,i.A)({ref:t},r,{children:[n.onAxisClick&&(0,o.jsx)(Cg,(0,i.A)({},s)),(0,o.jsx)(_g,(0,i.A)({},l)),(0,o.jsxs)("g",(0,i.A)({},c,{children:[(0,o.jsx)(Nv,(0,i.A)({},a)),(0,o.jsx)(Rg,(0,i.A)({},d)),(0,o.jsx)(sg,(0,i.A)({},h))]})),(0,o.jsx)(Ph,(0,i.A)({},p)),(0,o.jsx)(rg,(0,i.A)({},m)),!n.loading&&(0,o.jsx)(Zm,(0,i.A)({},g)),(0,o.jsx)(lg,(0,i.A)({},u)),v]}))}),Bv=({series:e,categories:t,layout:n="vertical",xAxisLabel:r,yAxisLabel:i,width:a=600,height:s=400,loading:l=!1})=>{const u={data:t,scaleType:"band",label:"vertical"===n?r:i},c="vertical"===n?i:r,d=c?[{label:c}]:void 0,p="vertical"===n?[u]:d,h="vertical"===n?d:[u];return(0,o.jsx)(Hv,{series:e,xAxis:p,yAxis:h,layout:n,width:a,height:s,loading:l})};function Vv(e){return e.innerRadius}function Wv(e){return e.outerRadius}function Uv(e){return e.startAngle}function Gv(e){return e.endAngle}function Zv(e){return e&&e.padAngle}function Kv(e,t,n,o,r,i,a){var s=e-n,l=t-o,u=(a?i:-i)/ha(s*s+l*l),c=u*l,d=-u*s,p=e+c,h=t+d,f=n+c,m=o+d,g=(p+f)/2,v=(h+m)/2,y=f-p,b=m-h,x=y*y+b*b,w=r-i,_=p*m-f*h,C=(b<0?-1:1)*ha(ca(0,w*w*x-_*_)),A=(_*b-y*C)/x,k=(-_*y-b*C)/x,S=(_*b+y*C)/x,M=(-_*y+b*C)/x,P=A-g,I=k-v,R=S-g,T=M-v;return P*P+I*I>R*R+T*T&&(A=S,k=M),{cx:A,cy:k,x01:-c,y01:-d,x11:A*(r/w-1),y11:k*(r/w-1)}}function qv(){var e=Vv,t=Wv,n=Ae(0),o=null,r=Uv,i=Gv,a=Zv,s=null,l=Oe(u);function u(){var u,c,d,p=+e.apply(this,arguments),h=+t.apply(this,arguments),f=r.apply(this,arguments)-ga,m=i.apply(this,arguments)-ga,g=sa(m-f),v=m>f;if(s||(s=u=l()),h<p&&(c=h,h=p,p=c),h>fa)if(g>va-fa)s.moveTo(h*ua(f),h*pa(f)),s.arc(0,0,h,f,m,!v),p>fa&&(s.moveTo(p*ua(m),p*pa(m)),s.arc(0,0,p,m,f,v));else{var y,b,x=f,w=m,_=f,C=m,A=g,k=g,S=a.apply(this,arguments)/2,M=S>fa&&(o?+o.apply(this,arguments):ha(p*p+h*h)),P=da(sa(h-p)/2,+n.apply(this,arguments)),I=P,R=P;if(M>fa){var T=ya(M/p*pa(S)),E=ya(M/h*pa(S));(A-=2*T)>fa?(_+=T*=v?1:-1,C-=T):(A=0,_=C=(f+m)/2),(k-=2*E)>fa?(x+=E*=v?1:-1,w-=E):(k=0,x=w=(f+m)/2)}var O=h*ua(x),L=h*pa(x),z=p*ua(C),j=p*pa(C);if(P>fa){var $,F=h*ua(w),N=h*pa(w),D=p*ua(_),H=p*pa(_);if(g<ma)if($=function(e,t,n,o,r,i,a,s){var l=n-e,u=o-t,c=a-r,d=s-i,p=d*l-c*u;if(!(p*p<fa))return[e+(p=(c*(t-i)-d*(e-r))/p)*l,t+p*u]}(O,L,D,H,F,N,z,j)){var B=O-$[0],V=L-$[1],W=F-$[0],U=N-$[1],G=1/pa(((d=(B*W+V*U)/(ha(B*B+V*V)*ha(W*W+U*U)))>1?0:d<-1?ma:Math.acos(d))/2),Z=ha($[0]*$[0]+$[1]*$[1]);I=da(P,(p-Z)/(G-1)),R=da(P,(h-Z)/(G+1))}else I=R=0}k>fa?R>fa?(y=Kv(D,H,O,L,h,R,v),b=Kv(F,N,z,j,h,R,v),s.moveTo(y.cx+y.x01,y.cy+y.y01),R<P?s.arc(y.cx,y.cy,R,la(y.y01,y.x01),la(b.y01,b.x01),!v):(s.arc(y.cx,y.cy,R,la(y.y01,y.x01),la(y.y11,y.x11),!v),s.arc(0,0,h,la(y.cy+y.y11,y.cx+y.x11),la(b.cy+b.y11,b.cx+b.x11),!v),s.arc(b.cx,b.cy,R,la(b.y11,b.x11),la(b.y01,b.x01),!v))):(s.moveTo(O,L),s.arc(0,0,h,x,w,!v)):s.moveTo(O,L),p>fa&&A>fa?I>fa?(y=Kv(z,j,F,N,p,-I,v),b=Kv(O,L,D,H,p,-I,v),s.lineTo(y.cx+y.x01,y.cy+y.y01),I<P?s.arc(y.cx,y.cy,I,la(y.y01,y.x01),la(b.y01,b.x01),!v):(s.arc(y.cx,y.cy,I,la(y.y01,y.x01),la(y.y11,y.x11),!v),s.arc(0,0,p,la(y.cy+y.y11,y.cx+y.x11),la(b.cy+b.y11,b.cx+b.x11),v),s.arc(b.cx,b.cy,I,la(b.y11,b.x11),la(b.y01,b.x01),!v))):s.arc(0,0,p,C,_,v):s.lineTo(z,j)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,o=(+r.apply(this,arguments)+ +i.apply(this,arguments))/2-ma/2;return[ua(o)*n,pa(o)*n]},u.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ae(+t),u):e},u.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ae(+e),u):t},u.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Ae(+e),u):n},u.padRadius=function(e){return arguments.length?(o=null==e?null:"function"==typeof e?e:Ae(+e),u):o},u.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:Ae(+e),u):r},u.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:Ae(+e),u):i},u.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:Ae(+e),u):a},u.context=function(e){return arguments.length?(s=null==e?null:e,u):s},u}Object.defineProperty(qv,"name",{value:"default",configurable:!0});const Xv=["classes","color","cornerRadius","dataIndex","endAngle","id","innerRadius","isFaded","isHighlighted","onClick","outerRadius","paddingAngle","startAngle","highlightScope"];function Yv(e){return et("MuiPieArc",e)}tt("MuiPieArc",["root","highlighted","faded"]);const Qv=dt(Jr.path,{name:"MuiPieArc",slot:"Root",overridesResolver:(e,t)=>t.arc})(({theme:e})=>({stroke:(e.vars||e).palette.background.paper,transition:"opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in"}));function Jv(e){const{classes:t,color:n,cornerRadius:r,dataIndex:a,endAngle:s,id:l,innerRadius:u,isFaded:c,isHighlighted:d,onClick:p,outerRadius:h,paddingAngle:m,startAngle:g}=e,v=(0,f.A)(e,Xv),y={id:l,dataIndex:a,classes:t,color:n,isFaded:c,isHighlighted:d},b=(e=>{const{classes:t,id:n,isFaded:o,isHighlighted:r,dataIndex:i}=e;return De({root:["root",`series-${n}`,`data-index-${i}`,r&&"highlighted",o&&"faded"]},Yv,t)})(y),x=st();return(0,o.jsx)(Qv,(0,i.A)({d:$r([g,s,m,u,h,r],(e,t,n,o,r,i)=>qv().cornerRadius(i)({padAngle:n,startAngle:e,endAngle:t,innerRadius:o,outerRadius:r})),visibility:$r([g,s],(e,t)=>e===t?"hidden":"visible"),onClick:p,cursor:p?"pointer":"unset",ownerState:y,className:b.root,fill:y.color,opacity:y.isFaded?.3:1,filter:y.isHighlighted?"brightness(120%)":"none",strokeWidth:1,strokeLinejoin:"round"},v,x({type:"pie",seriesId:l,dataIndex:a})))}const ey={keys:e=>e.id,from:({innerRadius:e,outerRadius:t,cornerRadius:n,startAngle:o,endAngle:r,paddingAngle:i,color:a,isFaded:s})=>({innerRadius:e,outerRadius:(e+t)/2,cornerRadius:n,startAngle:(o+r)/2,endAngle:(o+r)/2,paddingAngle:i,fill:a,opacity:s?.3:1}),leave:({innerRadius:e,startAngle:t,endAngle:n})=>({innerRadius:e,outerRadius:e,startAngle:(t+n)/2,endAngle:(t+n)/2}),enter:({innerRadius:e,outerRadius:t,startAngle:n,endAngle:o})=>({innerRadius:e,outerRadius:t,startAngle:n,endAngle:o}),update:({innerRadius:e,outerRadius:t,cornerRadius:n,startAngle:o,endAngle:r,paddingAngle:i,color:a,isFaded:s})=>({innerRadius:e,outerRadius:t,cornerRadius:n,startAngle:o,endAngle:r,paddingAngle:i,fill:a,opacity:s?.3:1}),config:{tension:120,friction:14,clamp:!0}},ty={keys:e=>e.id,from:({innerRadius:e,outerRadius:t,arcLabelRadius:n,cornerRadius:o,startAngle:r,endAngle:i,paddingAngle:a})=>({innerRadius:e,outerRadius:(e+t)/2,cornerRadius:o,arcLabelRadius:n,startAngle:(r+i)/2,endAngle:(r+i)/2,paddingAngle:a,opacity:0}),leave:({innerRadius:e,startAngle:t,endAngle:n})=>({innerRadius:e,outerRadius:e,arcLabelRadius:e,startAngle:(t+n)/2,endAngle:(t+n)/2,opacity:0}),enter:({innerRadius:e,outerRadius:t,startAngle:n,endAngle:o,arcLabelRadius:r})=>({innerRadius:e,outerRadius:t,startAngle:n,endAngle:o,arcLabelRadius:r,opacity:1}),update:({innerRadius:e,outerRadius:t,cornerRadius:n,startAngle:o,endAngle:r,paddingAngle:i,arcLabelRadius:a})=>({innerRadius:e,outerRadius:t,cornerRadius:n,startAngle:o,endAngle:r,paddingAngle:i,arcLabelRadius:a,opacity:1}),config:{tension:120,friction:14,clamp:!0}};function ny(t){const{id:n,data:o,faded:r,highlighted:a,paddingAngle:s=0,innerRadius:l=0,arcLabelRadius:u,outerRadius:c,cornerRadius:d=0}=t,{isFaded:p,isHighlighted:h}=at();return e.useMemo(()=>o.map((e,t)=>{const o={seriesId:n,dataIndex:t},f=h(o),m=!f&&p(o),g=(0,i.A)({additionalRadius:0},m&&r||f&&a||{}),v=Math.max(0,Math.PI*(g.paddingAngle??s)/180),y=Math.max(0,g.innerRadius??l),b=Math.max(0,g.outerRadius??c+g.additionalRadius),x=g.cornerRadius??d,w=g.arcLabelRadius??u??(y+b)/2;return(0,i.A)({},e,g,{isFaded:m,isHighlighted:f,paddingAngle:v,innerRadius:y,outerRadius:b,cornerRadius:x,arcLabelRadius:w})}),[d,l,c,s,u,o,r,a,p,h,n])}const oy=["slots","slotProps","innerRadius","outerRadius","cornerRadius","paddingAngle","id","highlighted","faded","data","onItemClick","skipAnimation"];function ry(e){const{slots:t,slotProps:n,innerRadius:r=0,outerRadius:a,cornerRadius:s=0,paddingAngle:l=0,id:u,highlighted:c,faded:d={additionalRadius:-5},data:p,onItemClick:h,skipAnimation:m}=e,g=(0,f.A)(e,oy),v=Tr(ny({innerRadius:r,outerRadius:a,cornerRadius:s,paddingAngle:l,id:u,highlighted:c,faded:d,data:p}),(0,i.A)({},ey,{immediate:m})),{highlightScope:y}=at();if(0===p.length)return null;const b=t?.pieArc??Jv;return(0,o.jsx)("g",(0,i.A)({},g,{children:v(({startAngle:e,endAngle:t,paddingAngle:r,innerRadius:a,outerRadius:s,cornerRadius:l},c,d,p)=>(0,o.jsx)(b,(0,i.A)({startAngle:e,endAngle:t,paddingAngle:r,innerRadius:a,outerRadius:s,cornerRadius:l,id:u,color:c.color,dataIndex:p,highlightScope:y,isFaded:c.isFaded,isHighlighted:c.isHighlighted,onClick:h&&(e=>{h(e,{type:"pie",seriesId:u,dataIndex:p},c)})},n?.pieArc)))}))}const iy=["id","classes","color","startAngle","endAngle","paddingAngle","arcLabelRadius","innerRadius","outerRadius","cornerRadius","formattedArcLabel","isHighlighted","isFaded","style"];function ay(e){return et("MuiPieArcLabel",e)}tt("MuiPieArcLabel",["root","highlighted","faded"]);const sy=dt(Jr.text,{name:"MuiPieArcLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fill:(e.vars||e).palette.text.primary,textAnchor:"middle",dominantBaseline:"middle",pointerEvents:"none"})),ly=(e,t)=>(n,o,r,i,a)=>{if(!e)return 0;const[s,l]=qv().cornerRadius(a).centroid({padAngle:r,startAngle:n,endAngle:o,innerRadius:i,outerRadius:i});return"x"===t?s:l};function uy(e){const{id:t,classes:n,color:r,startAngle:a,endAngle:s,paddingAngle:l,arcLabelRadius:u,cornerRadius:c,formattedArcLabel:d,isHighlighted:p,isFaded:h,style:m}=e,g=(0,f.A)(e,iy),v=(e=>{const{classes:t,id:n,isFaded:o,isHighlighted:r}=e;return De({root:["root",`series-${n}`,r&&"highlighted",o&&"faded"]},ay,t)})({id:t,classes:n,color:r,isFaded:h,isHighlighted:p});return(0,o.jsx)(sy,(0,i.A)({className:v.root},g,{style:(0,i.A)({x:$r([a,s,l,u,c],ly(d,"x")),y:$r([a,s,l,u,c],ly(d,"y"))},m),children:d}))}const cy=["arcLabel","arcLabelMinAngle","arcLabelRadius","cornerRadius","data","faded","highlighted","id","innerRadius","outerRadius","paddingAngle","skipAnimation","slotProps","slots"],dy=["startAngle","endAngle","paddingAngle","innerRadius","outerRadius","arcLabelRadius","cornerRadius"],py=180/Math.PI;function hy(e,t,n){if(!e)return null;if((n.endAngle-n.startAngle)*py<t)return null;switch(e){case"label":return hp(n.label,"arc");case"value":return n.value?.toString();case"formattedValue":return n.formattedValue;default:return e((0,i.A)({},n,{label:hp(n.label,"arc")}))}}function fy(e){const{arcLabel:t,arcLabelMinAngle:n=0,arcLabelRadius:r,cornerRadius:a=0,data:s,faded:l={additionalRadius:-5},highlighted:u,id:c,innerRadius:d,outerRadius:p,paddingAngle:h=0,skipAnimation:m,slotProps:g,slots:v}=e,y=(0,f.A)(e,cy),b=Tr(ny({innerRadius:d,outerRadius:p,arcLabelRadius:r,cornerRadius:a,paddingAngle:h,id:c,highlighted:u,faded:l,data:s}),(0,i.A)({},ty,{immediate:m}));if(0===s.length)return null;const x=v?.pieArcLabel??uy;return(0,o.jsx)("g",(0,i.A)({},y,{children:b((e,r)=>{let{startAngle:a,endAngle:s,paddingAngle:l,innerRadius:u,outerRadius:d,arcLabelRadius:p,cornerRadius:h}=e,m=(0,f.A)(e,dy);return(0,o.jsx)(x,(0,i.A)({startAngle:a,endAngle:s,paddingAngle:l,innerRadius:u,outerRadius:d,arcLabelRadius:p,cornerRadius:h,style:m,id:c,color:r.color,isFaded:r.isFaded,isHighlighted:r.isHighlighted,formattedArcLabel:hy(t,n,r)},g?.pieArcLabel))})}))}function my(e,t){if("number"==typeof e)return e;if("100%"===e)return t;if(e.endsWith("%")){const n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith("px")){const t=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(t))return t}throw new Error(`MUI X: Received an unknown value "${e}". It should be a number, or a string with a percentage value.`)}function gy(e,t){const{height:n,width:o}=t,{cx:r,cy:i}=e,a=Math.min(o,n)/2;return{cx:my(r??"50%",o),cy:my(i??"50%",n),availableRadius:a}}function vy(t){const{skipAnimation:n,slots:r,slotProps:i,onItemClick:a}=t,s=function(){const t=Ga();return e.useMemo(()=>t.pie,[t.pie])}(),{left:l,top:u,width:c,height:d}=e.useContext(Gi),p=Xa(n);if(void 0===s)return null;const{series:h,seriesOrder:f}=s;return(0,o.jsxs)("g",{children:[f.map(e=>{const{innerRadius:t,outerRadius:n,cornerRadius:s,paddingAngle:f,data:m,cx:g,cy:v,highlighted:y,faded:b}=h[e],{cx:x,cy:w,availableRadius:_}=gy({cx:g,cy:v},{width:c,height:d}),C=my(n??_,_),A=my(t??0,_);return(0,o.jsx)("g",{transform:`translate(${l+x}, ${u+w})`,children:(0,o.jsx)(ry,{innerRadius:A,outerRadius:C,cornerRadius:s,paddingAngle:f,id:e,data:m,skipAnimation:p,highlighted:y,faded:b,onItemClick:a,slots:r,slotProps:i})},e)}),f.map(e=>{const{innerRadius:t,outerRadius:n,arcLabelRadius:a,cornerRadius:s,paddingAngle:f,arcLabel:m,arcLabelMinAngle:g,data:v,cx:y,cy:b}=h[e],{cx:x,cy:w,availableRadius:_}=gy({cx:y,cy:b},{width:c,height:d}),C=my(n??_,_),A=my(t??0,_),k=void 0===a?(C+A)/2:my(a,_);return(0,o.jsx)("g",{transform:`translate(${l+x}, ${u+w})`,children:(0,o.jsx)(fy,{innerRadius:A,outerRadius:C??_,arcLabelRadius:k,cornerRadius:s,paddingAngle:f,id:e,data:v,skipAnimation:p,arcLabel:m,arcLabelMinAngle:g,slots:r,slotProps:i})},e)})]})}const yy=["xAxis","yAxis","series","width","height","margin","colors","sx","tooltip","axisHighlight","skipAnimation","legend","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","onItemClick","loading","highlightedItem","onHighlightChange","className"],by={top:5,bottom:5,left:5,right:100},xy={top:5,bottom:5,left:100,right:5},wy=e.forwardRef(function(e,t){const n=_e({props:e,name:"MuiPieChart"}),{xAxis:r,yAxis:a,series:s,width:l,height:u,margin:c,colors:d,sx:p,tooltip:h={trigger:"item"},axisHighlight:m={x:"none",y:"none"},skipAnimation:g,legend:v,topAxis:y=null,leftAxis:b=null,rightAxis:x=null,bottomAxis:w=null,children:_,slots:C,slotProps:A,onItemClick:k,loading:S,highlightedItem:M,onHighlightChange:P,className:I}=n,R=(0,f.A)(n,yy),T=wh(),E=(0,i.A)({},T?xy:by,c),O=(0,i.A)({direction:"column",position:{vertical:"middle",horizontal:T?"left":"right"}},v);return(0,o.jsxs)(Sp,(0,i.A)({},R,{ref:t,series:s.map(e=>(0,i.A)({type:"pie"},e)),width:l,height:u,margin:E,xAxis:r??[{id:Vi,scaleType:"point",data:[...new Array(Math.max(0,...s.map(e=>e.data.length)))].map((e,t)=>t)}],yAxis:a,colors:d,sx:p,disableAxisListener:"axis"!==h?.trigger&&"none"===m?.x&&"none"===m?.y,highlightedItem:M,onHighlightChange:P,className:I,skipAnimation:g,children:[(0,o.jsx)(Ph,{topAxis:y,leftAxis:b,rightAxis:x,bottomAxis:w,slots:C,slotProps:A}),(0,o.jsx)(vy,{slots:C,slotProps:A,onItemClick:k}),(0,o.jsx)(Rg,{loading:S,slots:C,slotProps:A}),(0,o.jsx)(rg,(0,i.A)({},O,{slots:C,slotProps:A})),(0,o.jsx)(sg,(0,i.A)({},m)),!S&&(0,o.jsx)(Zm,(0,i.A)({},h,{slots:C,slotProps:A})),_]}))}),_y=({data:e,width:t=400,height:n=400,innerRadius:r=60,outerRadius:i=120,paddingAngle:a=2,loading:s=!1,hideLegend:l=!1})=>(0,o.jsx)(wy,{series:[{data:e,innerRadius:r,outerRadius:i,paddingAngle:a}],width:t,height:n,loading:s,slotProps:{legend:l?{hidden:!0}:void 0}}),Cy=require("@mui/icons-material/ArrowUpward");var Ay=s.n(Cy);const ky=require("@mui/icons-material/ArrowDownward");var Sy=s.n(ky);const My=(e,t)=>`${e>0?"+":""}${e}${t}`,Py=({title:e,value:t,unit:r,delta:i,deltaSuffix:a="%",status:s,icon:l,loading:u=!1})=>{const c=void 0===i?void 0:i>0?"success.main":i<0?"error.main":"text.secondary";return(0,o.jsx)(n.Card,{variant:"outlined",sx:{minWidth:200},children:(0,o.jsxs)(n.CardContent,{children:[(0,o.jsxs)(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,o.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:e}),l&&(0,o.jsx)(n.Box,{color:"text.secondary",display:"flex",alignItems:"center",children:l})]}),(0,o.jsx)(n.Box,{mt:1,display:"flex",alignItems:"baseline",gap:.5,children:u?(0,o.jsx)(n.Skeleton,{width:80,height:40}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.Typography,{variant:"h4",component:"div",children:t}),r&&(0,o.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:r})]})}),(0,o.jsxs)(n.Box,{mt:1,display:"flex",alignItems:"center",gap:1,children:[void 0!==i&&!u&&(0,o.jsxs)(n.Box,{display:"flex",alignItems:"center",sx:{color:c},children:[i>0?(0,o.jsx)(Ay(),{fontSize:"small"}):i<0?(0,o.jsx)(Sy(),{fontSize:"small"}):null,(0,o.jsx)(n.Typography,{variant:"body2",component:"span",sx:{fontWeight:500},children:My(i,a)})]}),s&&!u&&(0,o.jsx)(n.Chip,{label:s.label,size:"small",color:s.color??"default"})]})]})})},Iy=86400,Ry=7*Iy,Ty=30*Iy,Ey=365*Iy,Oy=(e,t=new Date)=>{const n=e instanceof Date?e:new Date(e),o=Math.round((t.getTime()-n.getTime())/1e3);return Number.isNaN(o)?"":o<0?"in the future":o<5?"just now":o<60?`${o} seconds ago`:o<120?"1 minute ago":o<3600?`${Math.floor(o/60)} minutes ago`:o<7200?"1 hour ago":o<Iy?`${Math.floor(o/3600)} hours ago`:o<2*Iy?"yesterday":o<Ry?`${Math.floor(o/Iy)} days ago`:o<2*Ry?"1 week ago":o<Ty?`${Math.floor(o/Ry)} weeks ago`:o<5184e3?"1 month ago":o<Ey?`${Math.floor(o/Ty)} months ago`:o<2*Ey?"1 year ago":`${Math.floor(o/Ey)} years ago`},Ly=({items:e,loading:t=!1,emptyMessage:r="No activity yet.",maxHeight:i,now:a})=>t?(0,o.jsx)(n.List,{dense:!0,sx:{maxHeight:i,overflowY:i?"auto":void 0},children:Array.from({length:3}).map((e,t)=>(0,o.jsxs)(n.ListItem,{alignItems:"flex-start",children:[(0,o.jsx)(n.ListItemAvatar,{children:(0,o.jsx)(n.Skeleton,{variant:"circular",width:40,height:40})}),(0,o.jsx)(n.ListItemText,{primary:(0,o.jsx)(n.Skeleton,{width:"60%"}),secondary:(0,o.jsx)(n.Skeleton,{width:"30%"})})]},t))}):0===e.length?(0,o.jsx)(n.Box,{p:2,children:(0,o.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:r})}):(0,o.jsx)(n.List,{dense:!0,sx:{maxHeight:i,overflowY:i?"auto":void 0},children:e.map(e=>(0,o.jsxs)(n.ListItem,{alignItems:"flex-start",children:[(0,o.jsx)(n.ListItemAvatar,{children:(0,o.jsx)(n.Avatar,{sx:{bgcolor:e.iconColor},children:e.icon})}),(0,o.jsx)(n.ListItemText,{primary:e.description,secondary:Oy(e.timestamp,a)})]},e.id))});var zy=s(5556),jy=s.n(zy),$y=s(725);function Fy(e,t=0,n=1){return(0,$y.A)(e,t,n)}function Ny(e){if(e.type)return e;if("#"===e.charAt(0))return Ny(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,m.A)(9,e));let o,r=e.substring(t+1,e.length-1);if("color"===n){if(r=r.split(" "),o=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error((0,m.A)(10,o))}else r=r.split(",");return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:o}}function Dy(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function Hy(e,t){return e=Ny(e),t=Fy(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Dy(e)}function By(e){return et("MuiDataGrid",e)}const Vy=tt("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),Wy={[`.${Vy.columnSeparator}, .${Vy["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},Uy={[`& .${Vy.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${Vy.menuIcon}`]:{width:"auto",visibility:"visible"}},Gy=dt("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${Vy.autoHeight}`]:t.autoHeight},{[`&.${Vy.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${Vy["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${Vy["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${Vy["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${Vy.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${Vy["root--disableUserSelection"]} .${Vy.cell}`]:t["root--disableUserSelection"]},{[`&.${Vy.autosizing}`]:t.autosizing},{[`& .${Vy.editBooleanCell}`]:t.editBooleanCell},{[`& .${Vy["cell--editing"]}`]:t["cell--editing"]},{[`& .${Vy["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${Vy["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${Vy["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${Vy["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${Vy.cell}`]:t.cell},{[`& .${Vy["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${Vy["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${Vy["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${Vy["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${Vy["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${Vy.cellContent}`]:t.cellContent},{[`& .${Vy.cellCheckbox}`]:t.cellCheckbox},{[`& .${Vy.cellSkeleton}`]:t.cellSkeleton},{[`& .${Vy.checkboxInput}`]:t.checkboxInput},{[`& .${Vy["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${Vy["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${Vy["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${Vy["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${Vy["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${Vy["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${Vy["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${Vy["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${Vy["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${Vy.columnHeader}`]:t.columnHeader},{[`& .${Vy.headerFilterRow}`]:t.headerFilterRow},{[`& .${Vy.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${Vy.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${Vy.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${Vy["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${Vy["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${Vy.columnSeparator}`]:t.columnSeparator},{[`& .${Vy.filterIcon}`]:t.filterIcon},{[`& .${Vy.iconSeparator}`]:t.iconSeparator},{[`& .${Vy.menuIcon}`]:t.menuIcon},{[`& .${Vy.menuIconButton}`]:t.menuIconButton},{[`& .${Vy.menuOpen}`]:t.menuOpen},{[`& .${Vy.menuList}`]:t.menuList},{[`& .${Vy["row--editable"]}`]:t["row--editable"]},{[`& .${Vy["row--editing"]}`]:t["row--editing"]},{[`& .${Vy["row--dragging"]}`]:t["row--dragging"]},{[`& .${Vy.row}`]:t.row},{[`& .${Vy.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${Vy.rowReorderCell}`]:t.rowReorderCell},{[`& .${Vy["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${Vy.sortIcon}`]:t.sortIcon},{[`& .${Vy.withBorderColor}`]:t.withBorderColor},{[`& .${Vy.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${Vy.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${Vy.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${Vy["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=function(e){return e.vars?e.vars.palette.TableCell.border:"light"===e.palette.mode?function(e,t){if(e=Ny(e),t=Fy(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Dy(e)}(Hy(e.palette.divider,1),.88):function(e,t){if(e=Ny(e),t=Fy(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Dy(e)}(Hy(e.palette.divider,1),.68)}(e),n=e.shape.borderRadius;return(0,i.A)({"--unstable_DataGrid-radius":"number"==typeof n?`${n}px`:n,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:Hy(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${Vy.autoHeight}`]:{height:"auto",[`& .${Vy["row--lastVisible"]} .${Vy.cell}`]:{borderBottomColor:"transparent"}},[`&.${Vy.autosizing}`]:{[`& .${Vy.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${Vy.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"},[`& .${Vy.groupingCriteriaCell}`]:{width:"unset"},[`& .${Vy.treeDataGroupingCell}`]:{width:"unset"}},[`& .${Vy["virtualScrollerContent--overflowed"]} .${Vy["row--lastVisible"]} .${Vy.cell}`]:{borderBottomColor:"transparent"},[`& .${Vy.columnHeader}, & .${Vy.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${Vy.columnHeader}:focus-within, & .${Vy.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:Hy(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${Vy.columnHeader}:focus, & .${Vy.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${Vy.columnHeaderCheckbox}, & .${Vy.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${Vy.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${Vy["columnHeader--sorted"]} .${Vy.iconButtonContainer}, & .${Vy["columnHeader--filtered"]} .${Vy.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${Vy.columnHeader}:not(.${Vy["columnHeader--sorted"]}) .${Vy.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${Vy.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${Vy.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${Vy["columnHeader--filledGroup"]} .${Vy.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${Vy["columnHeader--filledGroup"]}.${Vy["columnHeader--showColumnBorder"]} .${Vy.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${Vy["columnHeader--filledGroup"]}.${Vy["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${Vy.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${Vy.sortIcon}, & .${Vy.filterIcon}`]:{fontSize:"inherit"},[`& .${Vy["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${Vy["columnHeader--alignCenter"]} .${Vy.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${Vy["columnHeader--alignRight"]} .${Vy.columnHeaderDraggableContainer}, & .${Vy["columnHeader--alignRight"]} .${Vy.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${Vy["columnHeader--alignCenter"]} .${Vy.menuIcon}, & .${Vy["columnHeader--alignRight"]} .${Vy.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${Vy["columnHeader--alignRight"]} .${Vy.menuIcon}, & .${Vy["columnHeader--alignRight"]} .${Vy.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${Vy["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${Vy.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${Vy.columnHeaders}:hover`]:Wy,[`& .${Vy.columnHeader}:hover`]:Uy,[`& .${Vy.columnHeader}:not(.${Vy["columnHeader--sorted"]}):hover .${Vy.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${Vy.columnHeaders}`]:Wy,[`& .${Vy.columnHeader}`]:Uy},[`& .${Vy["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${Vy["columnSeparator--sideRight"]}`]:{right:-12},[`& .${Vy["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${Vy["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${Vy.iconSeparator}`]:{color:"inherit"},[`& .${Vy.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${Vy.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${Vy.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(\n ${e.vars.palette.action.selectedOpacity} + \n ${e.vars.palette.action.hoverOpacity}\n ))`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${Vy.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Hy(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${Vy["root--disableUserSelection"]} .${Vy.cell}`]:{userSelect:"none"},[`& .${Vy.row}:not(.${Vy["row--dynamicHeight"]}) > .${Vy.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${Vy.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${Vy.cell}.${Vy["cell--selectionMode"]}`]:{cursor:"default"},[`& .${Vy.cell}.${Vy["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${Vy["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${Vy["row--editing"]} .${Vy.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${Vy.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${Vy.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${Vy.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${Vy.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${Vy.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${Vy["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${Vy.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${Vy.withBorderColor}`]:{borderColor:t},[`& .${Vy["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${Vy["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${Vy["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${Vy["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${Vy["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${Vy.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${Vy.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${Vy["columnHeader--dragging"]}, & .${Vy["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${Vy["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${Vy.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${Vy.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Vy.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${Vy.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${Vy.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}),Zy={};function Ky(t,n){const o=e.useRef(Zy);return o.current===Zy&&(o.current=t(n)),o}const qy=[];function Xy(t){e.useEffect(t,qy)}const Yy=(e,t="warning")=>{let n=!1;const o=Array.isArray(e)?e.join("\n"):e;return()=>{n||(n=!0,"error"===t?console.error(o):console.warn(o))}},Qy=Object.is;function Jy(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let n=0,o=0;for(const o in e){if(n+=1,!Qy(e[o],t[o]))return!1;if(!(o in t))return!1}for(const e in t)o+=1;return n===o}function eb(e,t){return function(e){return e.acceptsApiRef}(t)?t(e):t(e.current.state)}Yy(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);const tb=Object.is,nb=Jy,ob=()=>({state:null,equals:null,selector:null}),rb=(t,n,o=tb)=>{const r=Ky(ob),i=null!==r.current.selector,[a,s]=e.useState(i?null:eb(t,n));return r.current.state=a,r.current.equals=o,r.current.selector=n,Xy(()=>t.current.store.subscribe(()=>{const e=eb(t,r.current.selector);r.current.equals(r.current.state,e)||(r.current.state=e,s(e))})),a},ib=e.createContext(void 0);function ab(){const t=e.useContext(ib);if(void 0===t)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return t}const sb=e.createContext(void 0),lb=()=>{const t=e.useContext(sb);if(!t)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return t};var ub="NOT_FOUND",cb=function(e,t){return e===t};function db(e,t){var n,o,r="object"==typeof t?t:{equalityCheck:t},i=r.equalityCheck,a=void 0===i?cb:i,s=r.maxSize,l=void 0===s?1:s,u=r.resultEqualityCheck,c=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e(t[r],n[r]))return!1;return!0}}(a),d=1===l?(n=c,{get:function(e){return o&&n(o.key,e)?o.value:ub},put:function(e,t){o={key:e,value:t}},getEntries:function(){return o?[o]:[]},clear:function(){o=void 0}}):function(e,t){var n=[];function o(e){var o=n.findIndex(function(n){return t(e,n.key)});if(o>-1){var r=n[o];return o>0&&(n.splice(o,1),n.unshift(r)),r.value}return ub}return{get:o,put:function(t,r){o(t)===ub&&(n.unshift({key:t,value:r}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(l,c);function p(){var t=d.get(arguments);if(t===ub){if(t=e.apply(null,arguments),u){var n=d.getEntries().find(function(e){return u(e.value,t)});n&&(t=n.value)}d.put(arguments,t)}return t}return p.clearCache=function(){return d.clear()},p}function pb(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var i,a=0,s={memoizeOptions:void 0},l=o.pop();if("object"==typeof l&&(s=l,l=o.pop()),"function"!=typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var u=s.memoizeOptions,c=void 0===u?n:u,d=Array.isArray(c)?c:[c],p=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}(o),h=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(d)),f=e(function(){for(var e=[],t=p.length,n=0;n<t;n++)e.push(p[n].apply(null,arguments));return i=h.apply(null,e)});return Object.assign(f,{resultFunc:l,memoizedResultFunc:h,dependencies:p,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),f}}var hb=pb(db);const fb={cache:new WeakMap};function mb(e){return"current"in e&&"instanceId"in e.current}Yy(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);const gb={id:"default"},vb=(e,t,n,o,r,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&o&&r&&i)s=(a,s)=>{const l=mb(a),u=null!=s?s:l?a.current.instanceId:gb,c=l?a.current.state:a,d=e(c,u),p=t(c,u),h=n(c,u),f=o(c,u),m=r(c,u);return i(d,p,h,f,m)};else if(e&&t&&n&&o&&r)s=(i,a)=>{const s=mb(i),l=null!=a?a:s?i.current.instanceId:gb,u=s?i.current.state:i,c=e(u,l),d=t(u,l),p=n(u,l),h=o(u,l);return r(c,d,p,h)};else if(e&&t&&n&&o)s=(r,i)=>{const a=mb(r),s=null!=i?i:a?r.current.instanceId:gb,l=a?r.current.state:r,u=e(l,s),c=t(l,s),d=n(l,s);return o(u,c,d)};else if(e&&t&&n)s=(o,r)=>{const i=mb(o),a=null!=r?r:i?o.current.instanceId:gb,s=i?o.current.state:o,l=e(s,a),u=t(s,a);return n(l,u)};else{if(!e||!t)throw new Error("Missing arguments");s=(n,o)=>{const r=mb(n),i=null!=o?o:r?n.current.instanceId:gb,a=r?n.current.state:n,s=e(a,i);return t(s)}}return s.acceptsApiRef=!0,s},yb=(...e)=>{const t=(...t)=>{var n,o;const[r,i]=t,a=mb(r),s=a?r.current.instanceId:null!=i?i:gb,l=a?r.current.state:r,{cache:u}=fb;var c;if(u.get(s)&&null!=(n=u.get(s))&&n.get(e))return null==(c=u.get(s))?void 0:c.get(e)(l,s);const d=hb(...e);return u.get(s)||u.set(s,new Map),null==(o=u.get(s))||o.set(e,d),d(l,s)};return t.acceptsApiRef=!0,t},bb=e=>e.density,xb=vb(bb,e=>e.value),wb=vb(bb,e=>e.factor),_b=e=>e.columns,Cb=vb(_b,e=>e.orderedFields),Ab=vb(_b,e=>e.lookup),kb=yb(Cb,Ab,(e,t)=>e.map(e=>t[e])),Sb=vb(_b,e=>e.columnVisibilityModel),Mb=yb(kb,Sb,(e,t)=>e.filter(e=>!1!==t[e.field])),Pb=yb(Mb,e=>e.map(e=>e.field)),Ib=yb(Mb,e=>{const t=[];let n=0;for(let o=0;o<e.length;o+=1)t.push(n),n+=e[o].computedWidth;return t}),Rb=vb(Mb,Ib,(e,t)=>{const n=e.length;return 0===n?0:t[n-1]+e[n-1].computedWidth}),Tb=yb(kb,e=>e.filter(e=>e.filterable)),Eb=yb(kb,e=>e.reduce((e,t)=>(t.filterable&&(e[t.field]=t),e),{})),Ob=e=>e.columnGrouping,Lb=yb(Ob,e=>{var t;return null!=(t=null==e?void 0:e.unwrappedGroupingModel)?t:{}}),zb=yb(Ob,e=>{var t;return null!=(t=null==e?void 0:e.lookup)?t:{}}),jb=yb(Ob,e=>{var t;return null!=(t=null==e?void 0:e.headerStructure)?t:[]}),$b=vb(Ob,e=>{var t;return null!=(t=null==e?void 0:e.maxDepth)?t:0}),Fb=e=>e.rows,Nb=vb(Fb,e=>e.totalRowCount),Db=vb(Fb,e=>e.loading),Hb=vb(Fb,e=>e.totalTopLevelRowCount),Bb=vb(Fb,e=>e.dataRowIdToModelLookup),Vb=vb(Fb,e=>e.dataRowIdToIdLookup),Wb=vb(Fb,e=>e.tree),Ub=vb(Fb,e=>e.groupingName),Gb=vb(Fb,e=>e.treeDepths),Zb=yb(Fb,e=>{const t=Object.entries(e.treeDepths);return 0===t.length?1:t.filter(([,e])=>e>0).map(([e])=>Number(e)).sort((e,t)=>t-e)[0]+1}),Kb=vb(Fb,e=>e.dataRowIds),qb=yb(vb(Fb,e=>null==e?void 0:e.additionalRowGroups),e=>{var t,n;const o=null==e?void 0:e.pinnedRows;return{bottom:null==o||null==(t=o.bottom)?void 0:t.map(e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}}),top:null==o||null==(n=o.top)?void 0:n.map(e=>{var t;return{id:e.id,model:null!=(t=e.model)?t:{}}})}}),Xb=vb(qb,e=>{var t,n;return((null==e||null==(t=e.top)?void 0:t.length)||0)+((null==e||null==(n=e.bottom)?void 0:n.length)||0)}),Yb=()=>{var e;const t=ab(),n=lb(),o=rb(t,Mb),r=rb(t,Nb),i=rb(t,$b),a=rb(t,Xb);let s="grid";return null!=(e=n.experimentalFeatures)&&e.ariaV7&&n.treeData&&(s="treegrid"),{role:s,"aria-colcount":o.length,"aria-rowcount":i+1+a+r,"aria-multiselectable":!n.disableMultipleRowSelection}},Qb=["children","className"],Jb=e.forwardRef(function(t,n){var r;const a=lb(),{children:s,className:l}=t,u=(0,f.A)(t,Qb),c=ab(),d=rb(c,xb),p=e.useRef(null),h=Be(p,n),m=null!=(r=a.experimentalFeatures)&&r.ariaV7?null:Yb,g="function"==typeof m?m():null,v=(0,i.A)({},a,{density:d}),y=(e=>{const{autoHeight:t,density:n,classes:o}=e;return De({root:["root",t&&"autoHeight",`root--density${(0,Tm.A)(n)}`,"withBorderColor"]},By,o)})(v);c.current.register("public",{rootElementRef:p});const[b,x]=e.useState(!1);return _p(()=>{x(!0)},[]),b?(0,o.jsx)(Gy,(0,i.A)({ref:h,className:Ge(l,y.root),ownerState:v},g,u,{children:s})):null});function ex(){var t,n;const r=lb();return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)(r.slots.preferencesPanel,(0,i.A)({},null==(t=r.slotProps)?void 0:t.preferencesPanel)),r.slots.toolbar&&(0,o.jsx)(r.slots.toolbar,(0,i.A)({},null==(n=r.slotProps)?void 0:n.toolbar))]})}const tx=function(e={}){const{themeId:t,defaultTheme:n=mm,rootShouldForwardProp:o=hm,slotShouldForwardProp:r=hm}=e,a=e=>(0,y.A)((0,i.A)({},e,{theme:vm((0,i.A)({},e,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,(e,s={})=>{(0,um.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:p=ym(gm(u))}=s,h=(0,f.A)(s,pm),m=l&&l.startsWith("Mui")||u?"components":"custom",v=void 0!==c?c:u&&"Root"!==u&&"root"!==u||!1,y=d||!1;let b=hm;"Root"===u||"root"===u?b=o:u?b=r:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(b=void 0);const x=(0,um.default)(e,(0,i.A)({shouldForwardProp:b,label:void 0},h)),w=e=>"function"==typeof e&&e.__emotion_real!==e||(0,g.Q)(e)?o=>{const r=vm({theme:o.theme,defaultTheme:n,themeId:t});return bm(e,(0,i.A)({},o,{theme:r}),r.modularCssLayers?m:void 0)}:e,_=(o,...r)=>{let s=w(o);const u=r?r.map(w):[];l&&p&&u.push(e=>{const o=vm((0,i.A)({},e,{defaultTheme:n,themeId:t}));if(!o.components||!o.components[l]||!o.components[l].styleOverrides)return null;const r=o.components[l].styleOverrides,a={};return Object.entries(r).forEach(([t,n])=>{a[t]=bm(n,(0,i.A)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),p(e,a)}),l&&!v&&u.push(e=>{var o;const r=vm((0,i.A)({},e,{defaultTheme:n,themeId:t}));return bm({variants:null==r||null==(o=r.components)||null==(o=o[l])?void 0:o.variants},(0,i.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),y||u.push(a);const c=u.length-r.length;if(Array.isArray(o)&&c>0){const e=new Array(c).fill("");s=[...o,...e],s.raw=[...o.raw,...e]}const d=x(s,...u);return e.muiName&&(d.muiName=e.muiName),d};return x.withConfig&&(_.withConfig=x.withConfig),_}}(),nx=tx,ox=nx("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})(()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})),rx=e.forwardRef((e,t)=>{var n;const r=lb(),a=(e=>{const{classes:t}=e;return De({root:["main"]},By,t)})(r),s=null!=(n=r.experimentalFeatures)&&n.ariaV7?Yb:null,l="function"==typeof s?s():null;return(0,o.jsx)(ox,(0,i.A)({ref:t,className:a.root,ownerState:r},l,{children:e.children}))}),ix=e=>e.sorting,ax=vb(ix,e=>e.sortedRows),sx=yb(ax,Bb,(e,t)=>e.map(e=>{var n;return{id:e,model:null!=(n=t[e])?n:{}}})),lx=vb(ix,e=>e.sortModel),ux=yb(lx,e=>e.reduce((t,n,o)=>(t[n.field]={sortDirection:n.sort,sortIndex:e.length>1?o+1:void 0},t),{})),cx=e=>e.filter,dx=vb(cx,e=>e.filterModel),px=(vb(dx,e=>e.quickFilterValues),vb(cx,e=>e.filteredRowsLookup)),hx=(vb(cx,e=>e.filteredDescendantCountLookup),yb(e=>e.visibleRowsLookup,sx,(e,t)=>t.filter(t=>!1!==e[t.id]))),fx=yb(hx,e=>e.map(e=>e.id)),mx=yb(px,sx,(e,t)=>t.filter(t=>!1!==e[t.id])),gx=yb(mx,e=>e.map(e=>e.id)),vx=yb(hx,Wb,Zb,(e,t,n)=>n<2?e:e.filter(e=>{var n;return 0===(null==(n=t[e.id])?void 0:n.depth)})),yx=vb(hx,e=>e.length),bx=vb(vx,e=>e.length),xx=yb(dx,Ab,(e,t)=>{var n;return null==(n=e.items)?void 0:n.filter(e=>{var n,o;if(!e.field)return!1;const r=t[e.field];if(null==r||!r.filterOperators||0===(null==r||null==(n=r.filterOperators)?void 0:n.length))return!1;const i=r.filterOperators.find(t=>t.value===e.operator);return!!i&&(!i.InputComponent||null!=e.value&&""!==(null==(o=e.value)?void 0:o.toString()))})}),wx=yb(xx,e=>e.reduce((e,t)=>(e[t.field]?e[t.field].push(t):e[t.field]=[t],e),{})),_x=e=>e.focus,Cx=vb(_x,e=>e.cell),Ax=vb(_x,e=>e.columnHeader),kx=(vb(_x,e=>e.columnHeaderFilter),vb(_x,e=>e.columnGroupHeader)),Sx=e=>e.tabIndex,Mx=vb(Sx,e=>e.cell),Px=vb(Sx,e=>e.columnHeader),Ix=(vb(Sx,e=>e.columnHeaderFilter),vb(Sx,e=>e.columnGroupHeader)),Rx=e=>e.columnMenu;function Tx(t){const{VirtualScrollerComponent:n,ColumnHeadersProps:r,children:a}=t,s=ab(),l=lb(),u=e.useRef(null),c=rb(s,Mb),d=rb(s,wx),p=rb(s,ux),h=rb(s,Ib),f=rb(s,Px),m=rb(s,Mx),g=rb(s,Ix),v=rb(s,Ax),y=rb(s,kx),b=rb(s,wb),x=rb(s,$b),w=rb(s,Rx),_=rb(s,Sb),C=rb(s,jb),A=!(null===g&&null===f&&null===m);_p(()=>{s.current.computeSizeAndPublishResizeEvent();const e=u.current;if("undefined"==typeof ResizeObserver)return()=>{};let t;const n=new ResizeObserver(()=>{t=requestAnimationFrame(()=>{s.current.computeSizeAndPublishResizeEvent()})});return e&&n.observe(e),()=>{t&&window.cancelAnimationFrame(t),e&&n.unobserve(e)}},[s]);const k=e.useRef(null),S=e.useRef(null),M=e.useRef(null);s.current.register("private",{columnHeadersContainerElementRef:S,columnHeadersElementRef:k,virtualScrollerRef:M,mainElementRef:u});const P=!!s.current.getRootDimensions();return(0,o.jsxs)(rx,{ref:u,children:[(0,o.jsx)(l.slots.columnHeaders,(0,i.A)({ref:S,innerRef:k,visibleColumns:c,filterColumnLookup:d,sortColumnLookup:p,columnPositions:h,columnHeaderTabIndexState:f,columnGroupHeaderTabIndexState:g,columnHeaderFocus:v,columnGroupHeaderFocus:y,densityFactor:b,headerGroupingMaxDepth:x,columnMenuState:w,columnVisibility:_,columnGroupsHeaderStructure:C,hasOtherElementInTabSequence:A},r)),P&&(0,o.jsx)(n,{ref:M}),a]})}function Ex(){var e;const t=lb();return t.hideFooter?null:(0,o.jsx)(t.slots.footer,(0,i.A)({},null==(e=t.slotProps)?void 0:e.footer))}const Ox=e.createContext(void 0);function Lx({privateApiRef:t,props:n,children:r}){const i=e.useRef(t.current.getPublicApi());return(0,o.jsx)(sb.Provider,{value:n,children:(0,o.jsx)(ib.Provider,{value:t,children:(0,o.jsx)(Ox.Provider,{value:i,children:r})})})}function zx(e){return"function"==typeof e}function jx(e){return"object"==typeof e&&null!==e}function $x(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Fx=(e,t,n)=>Math.max(t,Math.min(n,e));function Nx(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o+=1)if(!Nx(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;for(let e=0;e<n.length;e+=1){const o=n[e];if(!Nx(o[1],t.get(o[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const n=Array.from(e.entries());for(let e=0;e<n.length;e+=1)if(!t.has(n[e][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const n=Object.keys(e),o=n.length;if(o!==Object.keys(t).length)return!1;for(let e=0;e<o;e+=1)if(!Object.prototype.hasOwnProperty.call(t,n[e]))return!1;for(let r=0;r<o;r+=1){const o=n[r];if(!Nx(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Dx(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}function Hx(t,n,o){const r=e.useRef(!0);e.useEffect(()=>{r.current=!1,t.current.register(o,n)},[t,o,n]),r.current&&t.current.register(o,n)}const Bx=function(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}()&&null!=window.localStorage.getItem("DEBUG"),Vx=()=>{},Wx={debug:Vx,info:Vx,warn:Vx,error:Vx},Ux=["debug","info","warn","error"];function Gx(e,t,n=console){const o=Ux.indexOf(t);if(-1===o)throw new Error(`MUI: Log level ${t} not recognized.`);return Ux.reduce((t,r,i)=>(t[r]=i>=o?(...t)=>{const[o,...i]=t;n[r](`MUI: ${e} - ${o}`,...i)}:Vx,t),{})}class Zx{static create(e){return new Zx(e)}constructor(e){this.value=void 0,this.listeners=void 0,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.getSnapshot=()=>this.value,this.update=e=>{this.value=e,this.listeners.forEach(t=>t(e))},this.value=e,this.listeners=new Set}}class Kx{constructor(e=1e3){this.timeouts=new Map,this.cleanupTimeout=1e3,this.cleanupTimeout=e}register(e,t,n){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{"function"==typeof t&&t(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,o)}unregister(e){const t=this.timeouts.get(e.cleanupToken);t&&(this.timeouts.delete(e.cleanupToken),clearTimeout(t))}reset(){this.timeouts&&(this.timeouts.forEach((e,t)=>{this.unregister({cleanupToken:t})}),this.timeouts=void 0)}}class qx{constructor(){this.registry=new FinalizationRegistry(e=>{"function"==typeof e&&e()})}register(e,t,n){this.registry.register(e,t,n)}unregister(e){this.registry.unregister(e)}reset(){}}var Xx=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Xx||{});class Yx{}const Qx=function(t){let n=0;return function(o,r,i,a){null===t.registry&&(t.registry="undefined"!=typeof FinalizationRegistry?new qx:new Kx);const[s]=e.useState(new Yx),l=e.useRef(null),u=e.useRef();u.current=i;const c=e.useRef(null);if(!l.current&&u.current){const e=(e,t,n)=>{var o;t.defaultMuiPrevented||null==(o=u.current)||o.call(u,e,t,n)};l.current=o.current.subscribeEvent(r,e,a),n+=1,c.current={cleanupToken:n},t.registry.register(s,()=>{var e;null==(e=l.current)||e.call(l),l.current=null,c.current=null},c.current)}else!u.current&&l.current&&(l.current(),l.current=null,c.current&&(t.registry.unregister(c.current),c.current=null));e.useEffect(()=>{if(!l.current&&u.current){const e=(e,t,n)=>{var o;t.defaultMuiPrevented||null==(o=u.current)||o.call(u,e,t,n)};l.current=o.current.subscribeEvent(r,e,a)}return c.current&&t.registry&&(t.registry.unregister(c.current),c.current=null),()=>{var e;null==(e=l.current)||e.call(l),l.current=null}},[o,r,a])}}({registry:null}),Jx={isFirst:!0};function ew(e,t,n){Qx(e,t,n,Jx)}class tw{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(e,t,n={}){let o=this.events[e];o||(o={highPriority:new Map,regular:new Map},this.events[e]=o),n.isFirst?o.highPriority.set(t,!0):o.regular.set(t,!0)}removeListener(e,t){this.events[e]&&(this.events[e].regular.delete(t),this.events[e].highPriority.delete(t))}removeAllListeners(){this.events={}}emit(e,...t){const n=this.events[e];if(!n)return;const o=Array.from(n.highPriority.keys()),r=Array.from(n.regular.keys());for(let e=o.length-1;e>=0;e-=1){const r=o[e];n.highPriority.has(r)&&r.apply(this,t)}for(let e=0;e<r.length;e+=1){const o=r[e];n.regular.has(o)&&o.apply(this,t)}}once(e,t){const n=this;this.on(e,function o(...r){n.removeListener(e,o),t.apply(n,r)})}}const nw=Symbol("mui.api_private");let ow=0;function rw(e){return rw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rw(e)}function iw(e){var t=function(e){if("object"!=rw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rw(t)?t:t+""}const aw="none",sw={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},lw=(t,n)=>{const o=function(t,n){const o=e.useRef(),r=e.useRef();r.current||(r.current=function(e){var t;const n=null==(t=e.current)?void 0:t[nw];if(n)return n;const o={},r={state:o,store:Zx.create(o),instanceId:{id:ow}};return ow+=1,r.getPublicApi=()=>e.current,r.register=(t,n)=>{Object.keys(n).forEach(o=>{const i=n[o],a=r[o];if(!0===(null==a?void 0:a.spying)?a.target=i:r[o]=i,"public"===t){const t=e.current,n=t[o];!0===(null==n?void 0:n.spying)?n.target=i:t[o]=i}})},r.register("private",{caches:{},eventManager:new tw}),r}(o)),o.current||(o.current=function(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[nw]:e.current}}(r));const i=e.useCallback((...e)=>{const[t,o,i={}]=e;if(i.defaultMuiPrevented=!1,(e=>void 0!==e.isPropagationStopped)(i)&&i.isPropagationStopped())return;const a=n.signature===Xx.DataGridPro?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(t,o,i,a)},[r,n.signature]),a=e.useCallback((e,t,n)=>{r.current.eventManager.on(e,t,n);const o=r.current;return()=>{o.eventManager.removeListener(e,t)}},[r]);return Hx(r,{subscribeEvent:a,publishEvent:i},"public"),e.useImperativeHandle(t,()=>o.current,[o]),e.useEffect(()=>{const e=r.current;return()=>{e.publishEvent("unmount")}},[r]),r}(t,n);return((t,n)=>{Hx(t,{getLogger:e.useCallback(e=>Bx?Gx(e,"debug",n.logger):n.logLevel?Gx(e,n.logLevel.toString(),n.logger):Wx,[n.logLevel,n.logger])},"private")})(o,n),((t,n)=>{const o=e.useRef({}),[,r]=e.useState(),a=e.useCallback(e=>{o.current[e.stateId]=e},[]),s=e.useCallback((e,r)=>{let i;if(i=zx(e)?e(t.current.state):e,t.current.state===i)return!1;let a=!1;const s=[];if(Object.keys(o.current).forEach(e=>{const n=o.current[e],r=n.stateSelector(t.current.state,t.current.instanceId),l=n.stateSelector(i,t.current.instanceId);l!==r&&(s.push({stateId:n.stateId,hasPropChanged:l!==n.propModel}),void 0!==n.propModel&&l!==n.propModel&&(a=!0))}),s.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${s[0].stateId}, therefore, you're not allowed to update ${s.map(e=>e.stateId).join(", ")} in the same transaction.`);if(a||(t.current.state=i,t.current.publishEvent&&t.current.publishEvent("stateChange",i),t.current.store.update(i)),1===s.length){const{stateId:e,hasPropChanged:l}=s[0],u=o.current[e],c=u.stateSelector(i,t.current.instanceId);if(u.propOnChange&&l){const e=n.signature===Xx.DataGridPro?{api:t.current,reason:r}:{reason:r};u.propOnChange(c,e)}a||t.current.publishEvent(u.changeEvent,c,{reason:r})}return!a},[t,n.signature]),l=e.useCallback((e,n,o)=>t.current.setState(t=>(0,i.A)({},t,{[e]:n(t[e])}),o),[t]),u=e.useCallback(()=>r(()=>t.current.state),[t]),c={updateControlState:l,registerControlState:a};Hx(t,{setState:s,forceUpdate:u},"public"),Hx(t,c,"private")})(o,n),(t=>{const n=e.useRef({}),o=e.useRef(!1),r=e.useCallback(e=>{!o.current&&e&&(o.current=!0,Object.values(e.appliers).forEach(e=>{e()}),o.current=!1)},[]),i=e.useCallback((e,t,o)=>{n.current[e]||(n.current[e]={processors:new Map,appliers:{}});const i=n.current[e];return i.processors.get(t)!==o&&(i.processors.set(t,o),r(i)),()=>{n.current[e].processors.set(t,null)}},[r]),a=e.useCallback((e,t,o)=>(n.current[e]||(n.current[e]={processors:new Map,appliers:{}}),n.current[e].appliers[t]=o,()=>{const o=n.current[e].appliers,r=(0,f.A)(o,[t].map(iw));n.current[e].appliers=r}),[]),s=e.useCallback(e=>{const t=n.current[e];r(t)},[r]),l=e.useCallback((...e)=>{const[t,o,r]=e;return n.current[t]?Array.from(n.current[t].processors.values()).reduce((e,t)=>t?t(e,r):e,o):o},[]),u={unstable_applyPipeProcessors:l};Hx(t,{registerPipeProcessor:i,registerPipeApplier:a,requestPipeProcessorsApplication:s},"private"),Hx(t,u,"public")})(o),(t=>{const n=e.useRef(new Map),o=e.useRef({}),r=e.useCallback((e,n,r)=>{const i=()=>{const t=o.current[n],r=(0,f.A)(t,[e].map(iw));o.current[n]=r};o.current[n]||(o.current[n]={});const a=o.current[n],s=a[e];return a[e]=r,s&&s!==r?(e===t.current.getActiveStrategy(sw[n])&&t.current.publishEvent("activeStrategyProcessorChange",n),i):i},[t]),i=e.useCallback((e,n)=>{const r=t.current.getActiveStrategy(sw[e]);if(null==r)throw new Error("Can't apply a strategy processor before defining an active strategy");const i=o.current[e];if(!i||!i[r])throw new Error(`No processor found for processor "${e}" on strategy "${r}"`);return(0,i[r])(n)},[t]),a=e.useCallback(e=>{var t;const o=Array.from(n.current.entries()).find(([,t])=>t.group===e&&t.isAvailable());return null!=(t=null==o?void 0:o[0])?t:aw},[]),s=e.useCallback((e,o,r)=>{n.current.set(o,{group:e,isAvailable:r}),t.current.publishEvent("strategyAvailabilityChange")},[t]);Hx(t,{registerStrategyProcessor:r,applyStrategyProcessor:i,getActiveStrategy:a,setStrategyAvailability:s},"private")})(o),((t,n)=>{const o=e.useCallback(e=>{if(null==n.localeText[e])throw new Error(`Missing translation for key ${e}.`);return n.localeText[e]},[n.localeText]);t.current.register("public",{getLocaleText:o})})(o,n),o.current.register("private",{rootProps:n}),o},uw=(t,n,o)=>{const r=e.useRef(!1);r.current||(n.current.state=t(n.current.state,o,n),r.current=!0)};function cw(t,n){const o=e.useRef(null);if(o.current)return o.current;const r=t.current.getLogger(n);return o.current=r,r}const dw=e=>"Escape"===e,pw=e=>"Tab"===e,hw=e=>" "===e;function fw(e){return 1===e.key.length&&!e.ctrlKey&&!e.metaKey}const mw=e=>(e=>"Home"===e||"End"===e)(e)||(e=>0===e.indexOf("Arrow"))(e)||(e=>0===e.indexOf("Page"))(e)||hw(e);function gw(){const t=e.useContext(Ox);if(void 0===t)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join("\n"));return t}const vw=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],yw=e.forwardRef(function(t,n){var r;const{field:a,id:s,value:l,rowNode:u,hasFocus:c,tabIndex:d}=t,p=(0,f.A)(t,vw),h=gw(),m=lb(),g=(e=>{const{classes:t}=e;return De({root:["checkboxInput"]},By,t)})({classes:m.classes}),v=e.useRef(null),y=e.useRef(null),b=Be(v,n),x=h.current.getCellElement(s,a);e.useLayoutEffect(()=>{0===d&&x&&(x.tabIndex=-1)},[x,d]),e.useEffect(()=>{if(c){var e;const t=null==(e=v.current)?void 0:e.querySelector("input");null==t||t.focus({preventScroll:!0})}else y.current&&y.current.stop({})},[c]);const w=e.useCallback(e=>{hw(e.key)&&e.stopPropagation()},[]);if("footer"===u.type||"pinnedRow"===u.type)return null;const _=h.current.isRowSelectable(s),C=h.current.getLocaleText(l?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return(0,o.jsx)(m.slots.baseCheckbox,(0,i.A)({ref:b,tabIndex:d,checked:l,onChange:e=>{const t={value:e.target.checked,id:s};h.current.publishEvent("rowSelectionCheckboxChange",t,e)},className:g.root,inputProps:{"aria-label":C},onKeyDown:w,disabled:!_,touchRippleRef:y},null==(r=m.slotProps)?void 0:r.baseCheckbox,p))}),bw=yw,xw=e=>e.rowSelection,ww=vb(xw,e=>e.length),_w=yb(xw,Bb,(e,t)=>new Map(e.map(e=>[e,t[e]]))),Cw=yb(xw,e=>e.reduce((e,t)=>(e[t]=t,e),{})),Aw=(e,t)=>t>0&&e>0?Math.ceil(e/t):0,kw=(Yy(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error"),e=>({page:0,pageSize:e?0:100})),Sw=(e,t)=>{if(t===Xx.DataGrid&&e>100)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"))},Mw=e=>e.pagination,Pw=vb(Mw,e=>e.paginationModel),Iw=vb(Mw,e=>e.rowCount),Rw=vb(Pw,e=>e.page),Tw=vb(Pw,e=>e.pageSize),Ew=vb(Tw,Iw,(e,t)=>Aw(t,e)),Ow=yb(Pw,Wb,Zb,hx,vx,(e,t,n,o,r)=>{const i=r.length,a=Math.min(e.pageSize*e.page,i-1),s=Math.min(a+e.pageSize-1,i-1);if(-1===a||-1===s)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=r[a],u=s-a+1,c=o.findIndex(e=>e.id===l.id);let d=c,p=0;for(;d<o.length&&p<=u;){var h;const e=null==(h=t[o[d].id])?void 0:h.depth;void 0===e?d+=1:((p<u||e>0)&&(d+=1),0===e&&(p+=1))}return{firstRowIndex:c,lastRowIndex:d-1}}),Lw=yb(hx,Ow,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),zw=yb(fx,Ow,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),jw=["field","colDef"],$w=e.forwardRef(function(t,n){var r;const a=(0,f.A)(t,jw),[,s]=e.useState(!1),l=gw(),u=lb(),c=(e=>{const{classes:t}=e;return De({root:["checkboxInput"]},By,t)})({classes:u.classes}),d=rb(l,Px),p=rb(l,xw),h=rb(l,fx),m=rb(l,zw),g=e.useMemo(()=>"function"!=typeof u.isRowSelectable?p:p.filter(e=>!!l.current.getRow(e)&&u.isRowSelectable(l.current.getRowParams(e))),[l,u.isRowSelectable,p]),v=e.useMemo(()=>(u.pagination&&u.checkboxSelectionVisibleOnly?m:h).reduce((e,t)=>(e[t]=!0,e),{}),[u.pagination,u.checkboxSelectionVisibleOnly,m,h]),y=e.useMemo(()=>g.filter(e=>v[e]).length,[g,v]),b=y>0&&y<Object.keys(v).length,x=y>0,w=null!==d&&d.field===t.field?0:-1;e.useLayoutEffect(()=>{const e=l.current.getColumnHeaderElement(t.field);0===w&&e&&(e.tabIndex=-1)},[w,l,t.field]);const _=e.useCallback(e=>{" "===e.key&&l.current.publishEvent("headerSelectionCheckboxChange",{value:!x})},[l,x]),C=e.useCallback(()=>{s(e=>!e)},[]);e.useEffect(()=>l.current.subscribeEvent("rowSelectionChange",C),[l,C]);const A=l.current.getLocaleText(x?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return(0,o.jsx)(u.slots.baseCheckbox,(0,i.A)({ref:n,indeterminate:b,checked:x,onChange:e=>{const t={value:e.target.checked};l.current.publishEvent("headerSelectionCheckboxChange",t)},className:c.root,inputProps:{"aria-label":A},tabIndex:w,onKeyDown:_},null==(r=u.slotProps)?void 0:r.baseCheckbox,a))}),Fw=function(t){const n=e.useRef(t);return _p(()=>{n.current=t}),e.useRef((...e)=>(0,n.current)(...e)).current};function Nw(e,t=166){let n;function o(...o){clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}return o.clear=()=>{clearTimeout(n)},o}const Dw=["onChange","maxRows","minRows","style","value"];function Hw(e){return parseInt(e,10)||0}const Bw={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Vw(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const Ww=e.forwardRef(function(t,n){const{onChange:r,maxRows:a,minRows:s=1,style:l,value:u}=t,c=(0,f.A)(t,Dw),{current:d}=e.useRef(null!=u),p=e.useRef(null),h=Be(n,p),m=e.useRef(null),g=e.useRef(null),v=e.useCallback(()=>{const e=p.current,n=g.current;if(!e||!n)return;const o=Ap(e).getComputedStyle(e);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=e.value||t.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const r=o.boxSizing,i=Hw(o.paddingBottom)+Hw(o.paddingTop),l=Hw(o.borderBottomWidth)+Hw(o.borderTopWidth),u=n.scrollHeight;n.value="x";const c=n.scrollHeight;let d=u;return s&&(d=Math.max(Number(s)*c,d)),a&&(d=Math.min(Number(a)*c,d)),d=Math.max(d,c),{outerHeightStyle:d+("border-box"===r?i+l:0),overflowing:Math.abs(d-u)<=1}},[a,s,t.placeholder]),y=Fw(()=>{const e=p.current,t=v();if(!e||!t||Vw(t))return!1;const n=t.outerHeightStyle;return null!=m.current&&m.current!==n}),b=e.useCallback(()=>{const e=p.current,t=v();if(!e||!t||Vw(t))return;const n=t.outerHeightStyle;m.current!==n&&(m.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[v]),x=e.useRef(-1);return _p(()=>{const e=Nw(b),t=null==p?void 0:p.current;if(!t)return;const n=Ap(t);let o;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver(()=>{y()&&(o.unobserve(t),cancelAnimationFrame(x.current),b(),x.current=requestAnimationFrame(()=>{o.observe(t)}))}),o.observe(t)),()=>{e.clear(),cancelAnimationFrame(x.current),n.removeEventListener("resize",e),o&&o.disconnect()}},[v,b,y]),_p(()=>{b()}),(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)("textarea",(0,i.A)({value:u,onChange:e=>{d||b(),r&&r(e)},ref:h,rows:s,style:l},c)),(0,o.jsx)("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:g,tabIndex:-1,style:(0,i.A)({},Bw,l,{paddingTop:0,paddingBottom:0})})]})}),Uw=Ww;function Gw({props:e,states:t,muiFormControl:n}){return t.reduce((t,o)=>(t[o]=e[o],n&&void 0===e[o]&&(t[o]=n[o]),t),{})}const Zw=e.createContext(void 0);function Kw(){return e.useContext(Zw)}const qw=Be,Xw=_p;var Yw=s(9940);function Qw(e){const t=(0,um.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}const Jw=function({styles:e,themeId:t,defaultTheme:n={}}){const r=p(n),i=t&&r[t]||r;let a="function"==typeof e?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Qw("function"==typeof e?e(i):e)):Qw(a)),(0,o.jsx)(Yw.A,{styles:a})},e_=function(e){return(0,o.jsx)(Jw,(0,i.A)({},e,{defaultTheme:xe,themeId:we}))};function t_(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function n_(e,t=!1){return e&&(t_(e.value)&&""!==e.value||t&&t_(e.defaultValue)&&""!==e.defaultValue)}function o_(e){return et("MuiInputBase",e)}const r_=tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),i_=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],a_=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Em(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},s_=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},l_=dt("div",{name:"MuiInputBase",slot:"Root",overridesResolver:a_})(({theme:e,ownerState:t})=>(0,i.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${r_.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&(0,i.A)({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),u_=dt("input",{name:"MuiInputBase",slot:"Input",overridesResolver:s_})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,o=(0,i.A)({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),r={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return(0,i.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${r_.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${r_.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),c_=(0,o.jsx)(e_,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),d_=e.forwardRef(function(t,n){var r;const a=om({props:t,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:l,autoFocus:u,className:c,components:d={},componentsProps:p={},defaultValue:h,disabled:g,disableInjectingGlobalStyles:v,endAdornment:y,fullWidth:b=!1,id:x,inputComponent:w="input",inputProps:_={},inputRef:C,maxRows:A,minRows:k,multiline:S=!1,name:M,onBlur:P,onChange:I,onClick:R,onFocus:T,onKeyDown:E,onKeyUp:O,placeholder:L,readOnly:z,renderSuffix:j,rows:$,slotProps:F={},slots:N={},startAdornment:D,type:H="text",value:B}=a,V=(0,f.A)(a,i_),W=null!=_.value?_.value:B,{current:U}=e.useRef(null!=W),G=e.useRef(),Z=e.useCallback(e=>{},[]),K=qw(G,C,_.ref,Z),[q,X]=e.useState(!1),Y=Kw(),Q=Gw({props:a,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=Y?Y.focused:q,e.useEffect(()=>{!Y&&g&&q&&(X(!1),P&&P())},[Y,g,q,P]);const J=Y&&Y.onFilled,ee=Y&&Y.onEmpty,te=e.useCallback(e=>{n_(e)?J&&J():ee&&ee()},[J,ee]);Xw(()=>{U&&te({value:W})},[W,te,U]),e.useEffect(()=>{te(G.current)},[]);let ne=w,oe=_;S&&"input"===ne&&(oe=$?(0,i.A)({type:void 0,minRows:$,maxRows:$},oe):(0,i.A)({type:void 0,maxRows:A,minRows:k},oe),ne=Uw),e.useEffect(()=>{Y&&Y.setAdornedStart(Boolean(D))},[Y,D]);const re=(0,i.A)({},a,{color:Q.color||"primary",disabled:Q.disabled,endAdornment:y,error:Q.error,focused:Q.focused,formControl:Y,fullWidth:b,hiddenLabel:Q.hiddenLabel,multiline:S,size:Q.size,startAdornment:D,type:H}),ie=(e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:c,readOnly:d,size:p,startAdornment:h,type:f}=e;return De({root:["root",`color${Em(n)}`,o&&"disabled",r&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${Em(p)}`,c&&"multiline",h&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",d&&"readOnly"],input:["input",o&&"disabled","search"===f&&"inputTypeSearch",c&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},o_,t)})(re),ae=N.root||d.Root||l_,se=F.root||p.root||{},le=N.input||d.Input||u_;return oe=(0,i.A)({},oe,null!=(r=F.input)?r:p.input),(0,o.jsxs)(e.Fragment,{children:[!v&&c_,(0,o.jsxs)(ae,(0,i.A)({},se,!Ve(ae)&&{ownerState:(0,i.A)({},re,se.ownerState)},{ref:n,onClick:e=>{G.current&&e.currentTarget===e.target&&G.current.focus(),R&&R(e)}},V,{className:Ge(ie.root,se.className,c,z&&"MuiInputBase-readOnly"),children:[D,(0,o.jsx)(Zw.Provider,{value:null,children:(0,o.jsx)(le,(0,i.A)({ownerState:re,"aria-invalid":Q.error,"aria-describedby":s,autoComplete:l,autoFocus:u,defaultValue:h,disabled:Q.disabled,id:x,onAnimationStart:e=>{te("mui-auto-fill-cancel"===e.animationName?G.current:{value:"x"})},name:M,placeholder:L,readOnly:z,required:Q.required,rows:$,value:W,onKeyDown:E,onKeyUp:O,type:H},oe,!Ve(le)&&{as:ne,ownerState:(0,i.A)({},re,oe.ownerState)},{ref:K,className:Ge(ie.input,oe.className,z&&"MuiInputBase-readOnly"),onBlur:e=>{P&&P(e),_.onBlur&&_.onBlur(e),Y&&Y.onBlur?Y.onBlur(e):X(!1)},onChange:(e,...t)=>{if(!U){const t=e.target||G.current;if(null==t)throw new Error((0,m.A)(1));te({value:t.value})}_.onChange&&_.onChange(e,...t),I&&I(e,...t)},onFocus:e=>{Q.disabled?e.stopPropagation():(T&&T(e),_.onFocus&&_.onFocus(e),Y&&Y.onFocus?Y.onFocus(e):X(!0))}}))}),y,j?j((0,i.A)({},Q,{startAdornment:D})):null]}))]})}),p_=d_,h_=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],f_=dt(p_,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>(0,i.A)({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),m_=e.forwardRef((t,n)=>{const r=lb(),{id:a,value:s,field:l,colDef:u,hasFocus:c,debounceMs:d=200,isProcessingProps:p,onValueChange:h}=t,m=(0,f.A)(t,h_),g=gw(),v=e.useRef(),[y,b]=e.useState(s),x=(e=>{const{classes:t}=e;return De({root:["editInputCell"]},By,t)})(r),w=e.useCallback(async e=>{const t=e.target.value;h&&await h(e,t);const n=g.current.getColumn(l);let o=t;n.valueParser&&(o=n.valueParser(t,g.current.getCellParams(a,l))),b(o),g.current.setEditCellValue({id:a,field:l,value:o,debounceMs:d,unstable_skipValueParser:!0},e)},[g,d,l,a,h]),_=g.current.unstable_getEditCellMeta(a,l);return e.useEffect(()=>{"debouncedSetEditCellValue"!==(null==_?void 0:_.changeReason)&&b(s)},[_,s]),_p(()=>{c&&v.current.focus()},[c]),(0,o.jsx)(f_,(0,i.A)({ref:n,inputRef:v,className:x.root,ownerState:r,fullWidth:!0,type:"number"===u.type?u.type:"text",value:null!=y?y:"",onChange:w,endAdornment:p?(0,o.jsx)(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},m))}),g_=Yy(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),v_=(e,t)=>t&&e.length>1?(g_(),[e[0]]):e,y_=(e,t)=>n=>(0,i.A)({},n,{sorting:(0,i.A)({},n.sorting,{sortModel:v_(e,t)})}),b_=(e,t)=>{const n=e.indexOf(t);return t&&-1!==n&&n+1!==e.length?e[n+1]:e[0]},x_=(e,t)=>null==e&&null!=t?-1:null==t&&null!=e?1:null==e&&null==t?0:null,w_=new Intl.Collator,__=(e,t)=>{const n=x_(e,t);return null!==n?n:Number(e)-Number(t)},C_=(e,t)=>{const n=x_(e,t);return null!==n?n:e>t?1:e<t?-1:0};class A_{constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new A_}start(e,t){this.clear(),this.currentId=setTimeout(t,e)}}function k_(){const e=Ky(A_.create).current;return Xy(e.disposeEffect),e}const S_=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps","variant"];function M_(t){var n,r;const{item:a,applyValue:s,type:l,apiRef:u,focusElementRef:c,tabIndex:d,disabled:p,clearButton:h,InputProps:m,variant:g="standard"}=t,v=(0,f.A)(t,S_),y=k_(),[b,x]=e.useState(null!=(n=a.value)?n:""),[w,_]=e.useState(!1),C=Bi(),A=lb(),k=e.useCallback(e=>{const{value:t}=e.target;x(String(t)),_(!0),y.start(A.filterDebounceMs,()=>{const e=(0,i.A)({},a,{value:t,fromInput:C});s(e),_(!1)})},[C,s,a,A.filterDebounceMs,y]);return e.useEffect(()=>{var e;a.fromInput===C&&void 0!==a.value||x(String(null!=(e=a.value)?e:""))},[C,a]),(0,o.jsx)(A.slots.baseTextField,(0,i.A)({id:C,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:b,onChange:k,variant:g,type:l||"text",InputProps:(0,i.A)({},w||h?{endAdornment:w?(0,o.jsx)(A.slots.loadIcon,{fontSize:"small",color:"action"}):h}:{},{disabled:p},m,{inputProps:(0,i.A)({tabIndex:d},null==m?void 0:m.inputProps)}),InputLabelProps:{shrink:!0},inputRef:c},v,null==(r=A.slotProps)?void 0:r.baseTextField))}const P_=t=>{const n=e.useRef({});return e.useEffect(()=>{n.current=t}),n.current};function I_(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function R_(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:o,matchFrom:r="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let u=a?s.trim():s;n&&(u=u.toLowerCase()),t&&(u=I_(u));const c=u?e.filter(e=>{let o=(i||l)(e);return n&&(o=o.toLowerCase()),t&&(o=I_(o)),"start"===r?0===o.indexOf(u):o.indexOf(u)>-1}):e;return"number"==typeof o?c.slice(0,o):c}}function T_(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const E_=R_(),O_=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))},L_=[];function z_(e){return et("MuiListSubheader",e)}tt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const j_=["className","color","component","disableGutters","disableSticky","inset"],$_=dt("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Em(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>(0,i.A)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},"primary"===t.color&&{color:(e.vars||e).palette.primary.main},"inherit"===t.color&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),F_=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiListSubheader"}),{className:r,color:a="default",component:s="li",disableGutters:l=!1,disableSticky:u=!1,inset:c=!1}=n,d=(0,f.A)(n,j_),p=(0,i.A)({},n,{color:a,component:s,disableGutters:l,disableSticky:u,inset:c}),h=(e=>{const{classes:t,color:n,disableGutters:o,inset:r,disableSticky:i}=e;return De({root:["root","default"!==n&&`color${Em(n)}`,!o&&"gutters",r&&"inset",!i&&"sticky"]},z_,t)})(p);return(0,o.jsx)($_,(0,i.A)({as:s,className:Ge(h.root,r),ref:t,ownerState:p},d))});F_.muiSkipListHighlight=!0;const N_=F_,D_=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function H_(e){return et("MuiPaper",e)}tt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const B_=["className","component","elevation","square","variant"],V_=dt("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return(0,i.A)({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&(0,i.A)({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${(0,x.X4)("#fff",D_(t.elevation))}, ${(0,x.X4)("#fff",D_(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}),W_=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiPaper"}),{className:r,component:a="div",elevation:s=1,square:l=!1,variant:u="elevation"}=n,c=(0,f.A)(n,B_),d=(0,i.A)({},n,{component:a,elevation:s,square:l,variant:u}),p=(e=>{const{square:t,elevation:n,variant:o,classes:r}=e;return De({root:["root",o,!t&&"rounded","elevation"===o&&`elevation${n}`]},H_,r)})(d);return(0,o.jsx)(V_,(0,i.A)({as:a,ownerState:d,className:Ge(p.root,r),ref:t},c))}),U_=W_,G_=Fw,Z_={},K_=[];class q_{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new q_}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function X_(){const t=function(t){const n=e.useRef(Z_);return n.current===Z_&&(n.current=t(void 0)),n}(q_.create).current;var n;return n=t.disposeEffect,e.useEffect(n,K_),t}let Y_=!0,Q_=!1;const J_=new q_,eC={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function tC(e){e.metaKey||e.altKey||e.ctrlKey||(Y_=!0)}function nC(){Y_=!1}function oC(){"hidden"===this.visibilityState&&Q_&&(Y_=!0)}const rC=function(){const t=e.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",tC,!0),t.addEventListener("mousedown",nC,!0),t.addEventListener("pointerdown",nC,!0),t.addEventListener("touchstart",nC,!0),t.addEventListener("visibilitychange",oC,!0))},[]),n=e.useRef(!1);return{isFocusVisibleRef:n,onFocus:function(e){return!!function(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return Y_||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!eC[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}(e)&&(n.current=!0,!0)},onBlur:function(){return!!n.current&&(Q_=!0,J_.start(100,()=>{Q_=!1}),n.current=!1,!0)},ref:t}};function iC(e,t){return iC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iC(e,t)}function aC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,iC(e,t)}const sC=t().createContext(null);function lC(t,n){var o=Object.create(null);return t&&e.Children.map(t,function(e){return e}).forEach(function(t){o[t.key]=function(t){return n&&(0,e.isValidElement)(t)?n(t):t}(t)}),o}function uC(e,t,n){return null!=n[t]?n[t]:e.props[t]}function cC(t,n,o){var r=lC(t.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(r[l])for(o=0;o<r[l].length;o++){var u=r[l][o];s[r[l][o]]=n(u)}s[l]=n(l)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}(n,r);return Object.keys(i).forEach(function(a){var s=i[a];if((0,e.isValidElement)(s)){var l=a in n,u=a in r,c=n[a],d=(0,e.isValidElement)(c)&&!c.props.in;!u||l&&!d?u||!l||d?u&&l&&(0,e.isValidElement)(c)&&(i[a]=(0,e.cloneElement)(s,{onExited:o.bind(null,s),in:c.props.in,exit:uC(s,"exit",t),enter:uC(s,"enter",t)})):i[a]=(0,e.cloneElement)(s,{in:!1}):i[a]=(0,e.cloneElement)(s,{onExited:o.bind(null,s),in:!0,exit:uC(s,"exit",t),enter:uC(s,"enter",t)})}}),i}var dC=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},pC=function(n){function o(e,t){var o,r=(o=n.call(this,e,t)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o));return o.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},o}aC(o,n);var r=o.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(t,n){var o,r,i=n.children,a=n.handleExited;return{children:n.firstRender?(o=t,r=a,lC(o.children,function(t){return(0,e.cloneElement)(t,{onExited:r.bind(null,t),in:!0,appear:uC(t,"appear",o),enter:uC(t,"enter",o),exit:uC(t,"exit",o)})})):cC(t,i,a),firstRender:!1}},r.handleExited=function(e,t){var n=lC(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,i.A)({},t.children);return delete n[e.key],{children:n}}))},r.render=function(){var e=this.props,n=e.component,o=e.childFactory,r=(0,f.A)(e,["component","childFactory"]),i=this.state.contextValue,a=dC(this.state.children).map(o);return delete r.appear,delete r.enter,delete r.exit,null===n?t().createElement(sC.Provider,{value:i},a):t().createElement(sC.Provider,{value:i},t().createElement(n,r,a))},o}(t().Component);pC.propTypes={},pC.defaultProps={component:"div",childFactory:function(e){return e}};const hC=pC,fC=tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),mC=["center","classes","className"];let gC,vC,yC,bC,xC=e=>e;const wC=(0,c.keyframes)(gC||(gC=xC`
|
|
3
|
-
0% {
|
|
4
|
-
transform: scale(0);
|
|
5
|
-
opacity: 0.1;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
100% {
|
|
9
|
-
transform: scale(1);
|
|
10
|
-
opacity: 0.3;
|
|
11
|
-
}
|
|
12
|
-
`)),_C=(0,c.keyframes)(vC||(vC=xC`
|
|
13
|
-
0% {
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
100% {
|
|
18
|
-
opacity: 0;
|
|
19
|
-
}
|
|
20
|
-
`)),CC=(0,c.keyframes)(yC||(yC=xC`
|
|
21
|
-
0% {
|
|
22
|
-
transform: scale(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
50% {
|
|
26
|
-
transform: scale(0.92);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
100% {
|
|
30
|
-
transform: scale(1);
|
|
31
|
-
}
|
|
32
|
-
`)),AC=dt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),kC=dt(function(t){const{className:n,classes:r,pulsate:i=!1,rippleX:a,rippleY:s,rippleSize:l,in:u,onExited:c,timeout:d}=t,[p,h]=e.useState(!1),f=Ge(n,r.ripple,r.rippleVisible,i&&r.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+a},g=Ge(r.child,p&&r.childLeaving,i&&r.childPulsate);return u||p||h(!0),e.useEffect(()=>{if(!u&&null!=c){const e=setTimeout(c,d);return()=>{clearTimeout(e)}}},[c,u,d]),(0,o.jsx)("span",{className:f,style:m,children:(0,o.jsx)("span",{className:g})})},{name:"MuiTouchRipple",slot:"Ripple"})(bC||(bC=xC`
|
|
33
|
-
opacity: 0;
|
|
34
|
-
position: absolute;
|
|
35
|
-
|
|
36
|
-
&.${0} {
|
|
37
|
-
opacity: 0.3;
|
|
38
|
-
transform: scale(1);
|
|
39
|
-
animation-name: ${0};
|
|
40
|
-
animation-duration: ${0}ms;
|
|
41
|
-
animation-timing-function: ${0};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.${0} {
|
|
45
|
-
animation-duration: ${0}ms;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
& .${0} {
|
|
49
|
-
opacity: 1;
|
|
50
|
-
display: block;
|
|
51
|
-
width: 100%;
|
|
52
|
-
height: 100%;
|
|
53
|
-
border-radius: 50%;
|
|
54
|
-
background-color: currentColor;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
& .${0} {
|
|
58
|
-
opacity: 0;
|
|
59
|
-
animation-name: ${0};
|
|
60
|
-
animation-duration: ${0}ms;
|
|
61
|
-
animation-timing-function: ${0};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
& .${0} {
|
|
65
|
-
position: absolute;
|
|
66
|
-
/* @noflip */
|
|
67
|
-
left: 0px;
|
|
68
|
-
top: 0;
|
|
69
|
-
animation-name: ${0};
|
|
70
|
-
animation-duration: 2500ms;
|
|
71
|
-
animation-timing-function: ${0};
|
|
72
|
-
animation-iteration-count: infinite;
|
|
73
|
-
animation-delay: 200ms;
|
|
74
|
-
}
|
|
75
|
-
`),fC.rippleVisible,wC,550,({theme:e})=>e.transitions.easing.easeInOut,fC.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,fC.child,fC.childLeaving,_C,550,({theme:e})=>e.transitions.easing.easeInOut,fC.childPulsate,CC,({theme:e})=>e.transitions.easing.easeInOut),SC=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:l}=r,u=(0,f.A)(r,mC),[c,d]=e.useState([]),p=e.useRef(0),h=e.useRef(null);e.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const m=e.useRef(!1),g=X_(),v=e.useRef(null),y=e.useRef(null),b=e.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;d(e=>[...e,(0,o.jsx)(kC,{classes:{ripple:Ge(s.ripple,fC.ripple),rippleVisible:Ge(s.rippleVisible,fC.rippleVisible),ripplePulsate:Ge(s.ripplePulsate,fC.ripplePulsate),child:Ge(s.child,fC.child),childLeaving:Ge(s.childLeaving,fC.childLeaving),childPulsate:Ge(s.childPulsate,fC.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},p.current)]),p.current+=1,h.current=a},[s]),x=e.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:r=a||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&m.current)return void(m.current=!1);"touchstart"===(null==e?void 0:e.type)&&(m.current=!0);const s=i?null:y.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,d;if(r||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(r)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===v.current&&(v.current=()=>{b({pulsate:o,rippleX:u,rippleY:c,rippleSize:d,cb:n})},g.start(80,()=>{v.current&&(v.current(),v.current=null)})):b({pulsate:o,rippleX:u,rippleY:c,rippleSize:d,cb:n})},[a,b,g]),w=e.useCallback(()=>{x({},{pulsate:!0})},[x]),_=e.useCallback((e,t)=>{if(g.clear(),"touchend"===(null==e?void 0:e.type)&&v.current)return v.current(),v.current=null,void g.start(0,()=>{_(e,t)});v.current=null,d(e=>e.length>0?e.slice(1):e),h.current=t},[g]);return e.useImperativeHandle(n,()=>({pulsate:w,start:x,stop:_}),[w,x,_]),(0,o.jsx)(AC,(0,i.A)({className:Ge(fC.root,s.root,l),ref:y},u,{children:(0,o.jsx)(hC,{component:null,exit:!0,children:c})}))}),MC=SC;function PC(e){return et("MuiButtonBase",e)}const IC=tt("MuiButtonBase",["root","disabled","focusVisible"]),RC=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],TC=dt("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${IC.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),EC=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:l,className:u,component:c="button",disabled:d=!1,disableRipple:p=!1,disableTouchRipple:h=!1,focusRipple:m=!1,LinkComponent:g="a",onBlur:v,onClick:y,onContextMenu:b,onDragLeave:x,onFocus:w,onFocusVisible:_,onKeyDown:C,onKeyUp:A,onMouseDown:k,onMouseLeave:S,onMouseUp:M,onTouchEnd:P,onTouchMove:I,onTouchStart:R,tabIndex:T=0,TouchRippleProps:E,touchRippleRef:O,type:L}=r,z=(0,f.A)(r,RC),j=e.useRef(null),$=e.useRef(null),F=qw($,O),{isFocusVisibleRef:N,onFocus:D,onBlur:H,ref:B}=rC(),[V,W]=e.useState(!1);d&&V&&W(!1),e.useImperativeHandle(a,()=>({focusVisible:()=>{W(!0),j.current.focus()}}),[]);const[U,G]=e.useState(!1);e.useEffect(()=>{G(!0)},[]);const Z=U&&!p&&!d;function K(e,t,n=h){return G_(o=>(t&&t(o),!n&&$.current&&$.current[e](o),!0))}e.useEffect(()=>{V&&m&&!p&&U&&$.current.pulsate()},[p,m,V,U]);const q=K("start",k),X=K("stop",b),Y=K("stop",x),Q=K("stop",M),J=K("stop",e=>{V&&e.preventDefault(),S&&S(e)}),ee=K("start",R),te=K("stop",P),ne=K("stop",I),oe=K("stop",e=>{H(e),!1===N.current&&W(!1),v&&v(e)},!1),re=G_(e=>{j.current||(j.current=e.currentTarget),D(e),!0===N.current&&(W(!0),_&&_(e)),w&&w(e)}),ie=()=>{const e=j.current;return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ae=e.useRef(!1),se=G_(e=>{m&&!ae.current&&V&&$.current&&" "===e.key&&(ae.current=!0,$.current.stop(e,()=>{$.current.start(e)})),e.target===e.currentTarget&&ie()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ie()&&"Enter"===e.key&&!d&&(e.preventDefault(),y&&y(e))}),le=G_(e=>{m&&" "===e.key&&$.current&&V&&!e.defaultPrevented&&(ae.current=!1,$.current.stop(e,()=>{$.current.pulsate(e)})),A&&A(e),y&&e.target===e.currentTarget&&ie()&&" "===e.key&&!e.defaultPrevented&&y(e)});let ue=c;"button"===ue&&(z.href||z.to)&&(ue=g);const ce={};"button"===ue?(ce.type=void 0===L?"button":L,ce.disabled=d):(z.href||z.to||(ce.role="button"),d&&(ce["aria-disabled"]=d));const de=qw(n,B,j),pe=(0,i.A)({},r,{centerRipple:s,component:c,disabled:d,disableRipple:p,disableTouchRipple:h,focusRipple:m,tabIndex:T,focusVisible:V}),he=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:o,classes:r}=e,i=De({root:["root",t&&"disabled",n&&"focusVisible"]},PC,r);return n&&o&&(i.root+=` ${o}`),i})(pe);return(0,o.jsxs)(TC,(0,i.A)({as:ue,className:Ge(he.root,u),ownerState:pe,onBlur:oe,onClick:y,onContextMenu:X,onFocus:re,onKeyDown:se,onKeyUp:le,onMouseDown:q,onMouseLeave:J,onMouseUp:Q,onDragLeave:Y,onTouchEnd:te,onTouchMove:ne,onTouchStart:ee,ref:de,tabIndex:d?-1:T,type:L},ce,z,{children:[l,Z?(0,o.jsx)(MC,(0,i.A)({ref:F,center:s},E)):null]}))}),OC=EC;function LC(e){return et("MuiIconButton",e)}const zC=tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),jC=["edge","children","className","color","disabled","disableFocusRipple","size"],$C=dt(OC,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Em(n.color)}`],n.edge&&t[`edge${Em(n.edge)}`],t[`size${Em(n.size)}`]]}})(({theme:e,ownerState:t})=>(0,i.A)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}),({theme:e,ownerState:t})=>{var n;const o=null==(n=(e.vars||e).palette)?void 0:n[t.color];return(0,i.A)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,i.A)({color:null==o?void 0:o.main},!t.disableRipple&&{"&:hover":(0,i.A)({},o&&{backgroundColor:e.vars?`rgba(${o.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(o.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${zC.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),FC=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiIconButton"}),{edge:r=!1,children:a,className:s,color:l="default",disabled:u=!1,disableFocusRipple:c=!1,size:d="medium"}=n,p=(0,f.A)(n,jC),h=(0,i.A)({},n,{edge:r,color:l,disabled:u,disableFocusRipple:c,size:d}),m=(e=>{const{classes:t,disabled:n,color:o,edge:r,size:i}=e;return De({root:["root",n&&"disabled","default"!==o&&`color${Em(o)}`,r&&`edge${Em(r)}`,`size${Em(i)}`]},LC,t)})(h);return(0,o.jsx)($C,(0,i.A)({className:Ge(m.root,s),centerRipple:!0,focusRipple:!c,disabled:u,ref:t},p,{ownerState:h,children:a}))}),NC=FC;function DC(e){return et("MuiSvgIcon",e)}tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HC=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],BC=dt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Em(n.color)}`],t[`fontSize${Em(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,o,r,i,a,s,l,u,c,d,p,h,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(o=n.create)?void 0:o.call(n,"fill",{duration:null==(r=e.transitions)||null==(r=r.duration)?void 0:r.shorter}),fontSize:{inherit:"inherit",small:(null==(i=e.typography)||null==(a=i.pxToRem)?void 0:a.call(i,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(u=e.typography)||null==(c=u.pxToRem)?void 0:c.call(u,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(p=(e.vars||e).palette)||null==(p=p[t.color])?void 0:p.main)?d:{action:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.active,disabled:null==(f=(e.vars||e).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[t.color]}}),VC=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:l="inherit",component:u="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:p=!1,titleAccess:h,viewBox:m="0 0 24 24"}=r,g=(0,f.A)(r,HC),v=e.isValidElement(a)&&"svg"===a.type,y=(0,i.A)({},r,{color:l,component:u,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:m,hasSvgAsChild:v}),b={};p||(b.viewBox=m);const x=(e=>{const{color:t,fontSize:n,classes:o}=e;return De({root:["root","inherit"!==t&&`color${Em(t)}`,`fontSize${Em(n)}`]},DC,o)})(y);return(0,o.jsxs)(BC,(0,i.A)({as:u,className:Ge(x.root,s),focusable:"false",color:d,"aria-hidden":!h||void 0,role:h?"img":void 0,ref:n},b,g,v&&a.props,{ownerState:y,children:[v?a.props.children:a,h?(0,o.jsx)("title",{children:h}):null]}))});VC.muiName="SvgIcon";const WC=VC;function UC(t,n){function r(e,r){return(0,o.jsx)(WC,(0,i.A)({"data-testid":`${n}Icon`,ref:r},e,{children:t}))}return r.muiName=WC.muiName,e.memo(e.forwardRef(r))}const GC=UC((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function ZC(e){return et("MuiChip",e)}const KC=tt("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),qC=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],XC=dt("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:o,iconColor:r,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${KC.avatar}`]:t.avatar},{[`& .${KC.avatar}`]:t[`avatar${Em(s)}`]},{[`& .${KC.avatar}`]:t[`avatarColor${Em(o)}`]},{[`& .${KC.icon}`]:t.icon},{[`& .${KC.icon}`]:t[`icon${Em(s)}`]},{[`& .${KC.icon}`]:t[`iconColor${Em(r)}`]},{[`& .${KC.deleteIcon}`]:t.deleteIcon},{[`& .${KC.deleteIcon}`]:t[`deleteIcon${Em(s)}`]},{[`& .${KC.deleteIcon}`]:t[`deleteIconColor${Em(o)}`]},{[`& .${KC.deleteIcon}`]:t[`deleteIcon${Em(l)}Color${Em(o)}`]},t.root,t[`size${Em(s)}`],t[`color${Em(o)}`],i&&t.clickable,i&&"default"!==o&&t[`clickableColor${Em(o)})`],a&&t.deletable,a&&"default"!==o&&t[`deletableColor${Em(o)}`],t[l],t[`${l}${Em(o)}`]]}})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return(0,i.A)({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${KC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${KC.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${KC.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${KC.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${KC.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${KC.icon}`]:(0,i.A)({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&(0,i.A)({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},"default"!==t.color&&{color:"inherit"})),[`& .${KC.deleteIcon}`]:(0,i.A)({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,x.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,x.X4)(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:(0,x.X4)(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${KC.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,x.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${KC.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>(0,i.A)({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,x.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${KC.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,x.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${KC.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>(0,i.A)({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${KC.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${KC.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${KC.avatar}`]:{marginLeft:4},[`& .${KC.avatarSmall}`]:{marginLeft:2},[`& .${KC.icon}`]:{marginLeft:4},[`& .${KC.iconSmall}`]:{marginLeft:2},[`& .${KC.deleteIcon}`]:{marginRight:5},[`& .${KC.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,x.X4)(e.palette[t.color].main,.7)}`,[`&.${KC.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${KC.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,x.X4)(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${KC.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:(0,x.X4)(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),YC=dt("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:o}=n;return[t.label,t[`label${Em(o)}`]]}})(({ownerState:e})=>(0,i.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===e.variant&&{paddingLeft:11,paddingRight:11},"small"===e.size&&{paddingLeft:8,paddingRight:8},"small"===e.size&&"outlined"===e.variant&&{paddingLeft:7,paddingRight:7}));function QC(e){return"Backspace"===e.key||"Delete"===e.key}const JC=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiChip"}),{avatar:a,className:s,clickable:l,color:u="default",component:c,deleteIcon:d,disabled:p=!1,icon:h,label:m,onClick:g,onDelete:v,onKeyDown:y,onKeyUp:b,size:x="medium",variant:w="filled",tabIndex:_,skipFocusWhenDisabled:C=!1}=r,A=(0,f.A)(r,qC),k=e.useRef(null),S=qw(k,n),M=e=>{e.stopPropagation(),v&&v(e)},P=!(!1===l||!g)||l,I=P||v?OC:c||"div",R=(0,i.A)({},r,{component:I,disabled:p,size:x,color:u,iconColor:e.isValidElement(h)&&h.props.color||u,onDelete:!!v,clickable:P,variant:w}),T=(e=>{const{classes:t,disabled:n,size:o,color:r,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return De({root:["root",l,n&&"disabled",`size${Em(o)}`,`color${Em(r)}`,s&&"clickable",s&&`clickableColor${Em(r)}`,a&&"deletable",a&&`deletableColor${Em(r)}`,`${l}${Em(r)}`],label:["label",`label${Em(o)}`],avatar:["avatar",`avatar${Em(o)}`,`avatarColor${Em(r)}`],icon:["icon",`icon${Em(o)}`,`iconColor${Em(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Em(o)}`,`deleteIconColor${Em(r)}`,`deleteIcon${Em(l)}Color${Em(r)}`]},ZC,t)})(R),E=I===OC?(0,i.A)({component:c||"div",focusVisibleClassName:T.focusVisible},v&&{disableRipple:!0}):{};let O=null;v&&(O=d&&e.isValidElement(d)?e.cloneElement(d,{className:Ge(d.props.className,T.deleteIcon),onClick:M}):(0,o.jsx)(GC,{className:Ge(T.deleteIcon),onClick:M}));let L=null;a&&e.isValidElement(a)&&(L=e.cloneElement(a,{className:Ge(T.avatar,a.props.className)}));let z=null;return h&&e.isValidElement(h)&&(z=e.cloneElement(h,{className:Ge(T.icon,h.props.className)})),(0,o.jsxs)(XC,(0,i.A)({as:I,className:Ge(T.root,s),disabled:!(!P||!p)||void 0,onClick:g,onKeyDown:e=>{e.currentTarget===e.target&&QC(e)&&e.preventDefault(),y&&y(e)},onKeyUp:e=>{e.currentTarget===e.target&&(v&&QC(e)?v(e):"Escape"===e.key&&k.current&&k.current.blur()),b&&b(e)},ref:S,tabIndex:C&&p?-1:_,ownerState:R},E,A,{children:[L||z,(0,o.jsx)(YC,{className:Ge(T.label),ownerState:R,children:m}),O]}))}),eA=JC;function tA(e){return et("MuiInput",e)}const nA=(0,i.A)({},r_,tt("MuiInput",["root","underline","input"]));function oA(e){return et("MuiOutlinedInput",e)}const rA=(0,i.A)({},r_,tt("MuiOutlinedInput",["root","notchedOutline","input"]));function iA(e){return et("MuiFilledInput",e)}const aA=(0,i.A)({},r_,tt("MuiFilledInput",["root","underline","input"])),sA=UC((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),lA=UC((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function uA(e){return et("MuiAutocomplete",e)}const cA=tt("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var dA,pA;const hA=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],fA=["ref"],mA=["key"],gA=["key"],vA=dt("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:o,hasClearIcon:r,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${cA.tag}`]:t.tag},{[`& .${cA.tag}`]:t[`tagSize${Em(s)}`]},{[`& .${cA.inputRoot}`]:t.inputRoot},{[`& .${cA.input}`]:t.input},{[`& .${cA.input}`]:a&&t.inputFocused},t.root,o&&t.fullWidth,i&&t.hasPopupIcon,r&&t.hasClearIcon]}})({[`&.${cA.focused} .${cA.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${cA.clearIndicator}`]:{visibility:"visible"}},[`& .${cA.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${cA.inputRoot}`]:{[`.${cA.hasPopupIcon}&, .${cA.hasClearIcon}&`]:{paddingRight:30},[`.${cA.hasPopupIcon}.${cA.hasClearIcon}&`]:{paddingRight:56},[`& .${cA.input}`]:{width:0,minWidth:30}},[`& .${nA.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${nA.root}.${r_.sizeSmall}`]:{[`& .${nA.input}`]:{padding:"2px 4px 3px 0"}},[`& .${rA.root}`]:{padding:9,[`.${cA.hasPopupIcon}&, .${cA.hasClearIcon}&`]:{paddingRight:39},[`.${cA.hasPopupIcon}.${cA.hasClearIcon}&`]:{paddingRight:65},[`& .${cA.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${cA.endAdornment}`]:{right:9}},[`& .${rA.root}.${r_.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${cA.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${aA.root}`]:{paddingTop:19,paddingLeft:8,[`.${cA.hasPopupIcon}&, .${cA.hasClearIcon}&`]:{paddingRight:39},[`.${cA.hasPopupIcon}.${cA.hasClearIcon}&`]:{paddingRight:65},[`& .${aA.input}`]:{padding:"7px 4px"},[`& .${cA.endAdornment}`]:{right:9}},[`& .${aA.root}.${r_.sizeSmall}`]:{paddingBottom:1,[`& .${aA.input}`]:{padding:"2.5px 4px"}},[`& .${r_.hiddenLabel}`]:{paddingTop:8},[`& .${aA.root}.${r_.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${cA.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${aA.root}.${r_.hiddenLabel}.${r_.sizeSmall}`]:{[`& .${cA.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${cA.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${cA.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${cA.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${cA.inputRoot}`]:{flexWrap:"wrap"}}}]}),yA=dt("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),bA=dt(NC,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),xA=dt(NC,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>(0,i.A)({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),wA=dt(am,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${cA.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),_A=dt(U_,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>(0,i.A)({},e.typography.body1,{overflow:"auto"})),CA=dt("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),AA=dt("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),kA=dt("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${cA.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${cA.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${cA.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cA.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${cA.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),SA=dt(N_,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),MA=dt("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${cA.option}`]:{paddingLeft:24}}),PA=e.forwardRef(function(t,n){var r,a,s,l;const u=om({props:t,name:"MuiAutocomplete"}),{autoComplete:c=!1,autoHighlight:d=!1,autoSelect:p=!1,blurOnSelect:h=!1,ChipProps:m,className:g,clearIcon:v=dA||(dA=(0,o.jsx)(sA,{fontSize:"small"})),clearOnBlur:y=!u.freeSolo,clearOnEscape:b=!1,clearText:x="Clear",closeText:w="Close",componentsProps:_={},defaultValue:C=(u.multiple?[]:null),disableClearable:A=!1,disableCloseOnSelect:k=!1,disabled:S=!1,disabledItemsFocusable:M=!1,disableListWrap:P=!1,disablePortal:I=!1,filterSelectedOptions:R=!1,forcePopupIcon:T="auto",freeSolo:E=!1,fullWidth:O=!1,getLimitTagsText:L=e=>`+${e}`,getOptionLabel:z,groupBy:j,handleHomeEndKeys:$=!u.freeSolo,includeInputInList:F=!1,limitTags:N=-1,ListboxComponent:D="ul",ListboxProps:H,loading:B=!1,loadingText:V="Loading…",multiple:W=!1,noOptionsText:U="No options",openOnFocus:G=!1,openText:Z="Open",PaperComponent:K=U_,PopperComponent:q=am,popupIcon:X=pA||(pA=(0,o.jsx)(lA,{})),readOnly:Y=!1,renderGroup:Q,renderInput:J,renderOption:ee,renderTags:te,selectOnFocus:ne=!u.freeSolo,size:oe="medium",slotProps:re={}}=u,ie=(0,f.A)(u,hA),{getRootProps:ae,getInputProps:se,getInputLabelProps:le,getPopupIndicatorProps:ue,getClearProps:ce,getTagProps:de,getListboxProps:pe,getOptionProps:he,value:fe,dirty:me,expanded:ge,id:ve,popupOpen:ye,focused:be,focusedTag:xe,anchorEl:we,setAnchorEl:_e,inputValue:Ce,groupedOptions:Ae}=function(t){const{unstable_isActiveElementInListbox:n=O_,unstable_classNamePrefix:o="Mui",autoComplete:r=!1,autoHighlight:a=!1,autoSelect:s=!1,blurOnSelect:l=!1,clearOnBlur:u=!t.freeSolo,clearOnEscape:c=!1,componentName:d="useAutocomplete",defaultValue:p=(t.multiple?L_:null),disableClearable:h=!1,disableCloseOnSelect:f=!1,disabled:m,disabledItemsFocusable:g=!1,disableListWrap:v=!1,filterOptions:y=E_,filterSelectedOptions:b=!1,freeSolo:x=!1,getOptionDisabled:w,getOptionKey:_,getOptionLabel:C=e=>{var t;return null!=(t=e.label)?t:e},groupBy:A,handleHomeEndKeys:k=!t.freeSolo,id:S,includeInputInList:M=!1,inputValue:P,isOptionEqualToValue:I=(e,t)=>e===t,multiple:R=!1,onChange:T,onClose:E,onHighlightChange:O,onInputChange:L,onOpen:z,open:j,openOnFocus:$=!1,options:F,readOnly:N=!1,selectOnFocus:D=!t.freeSolo,value:H}=t,B=Bi(S);let V=C;V=e=>{const t=C(e);return"string"!=typeof t?String(t):t};const W=e.useRef(!1),U=e.useRef(!0),G=e.useRef(null),Z=e.useRef(null),[K,q]=e.useState(null),[X,Y]=e.useState(-1),Q=a?0:-1,J=e.useRef(Q),[ee,te]=Id({controlled:H,default:p,name:d}),[ne,oe]=Id({controlled:P,default:"",name:d,state:"inputValue"}),[re,ie]=e.useState(!1),ae=e.useCallback((e,t)=>{if(!(R?ee.length<t.length:null!==t)&&!u)return;let n;if(R)n="";else if(null==t)n="";else{const e=V(t);n="string"==typeof e?e:""}ne!==n&&(oe(n),L&&L(e,n,"reset"))},[V,ne,R,L,oe,u,ee]),[se,le]=Id({controlled:j,default:!1,name:d,state:"open"}),[ue,ce]=e.useState(!0),de=!R&&null!=ee&&ne===V(ee),pe=se&&!N,he=pe?y(F.filter(e=>!b||!(R?ee:[ee]).some(t=>null!==t&&I(e,t))),{inputValue:de&&ue?"":ne,getOptionLabel:V}):[],fe=P_({filteredOptions:he,value:ee,inputValue:ne});e.useEffect(()=>{const e=ee!==fe.value;re&&!e||x&&!e||ae(null,ee)},[ee,ae,re,fe.value,x]);const me=se&&he.length>0&&!N,ge=Fw(e=>{-1===e?G.current.focus():K.querySelector(`[data-tag-index="${e}"]`).focus()});e.useEffect(()=>{R&&X>ee.length-1&&(Y(-1),ge(-1))},[ee,R,X,ge]);const ve=Fw(({event:e,index:t,reason:n="auto"})=>{if(J.current=t,-1===t?G.current.removeAttribute("aria-activedescendant"):G.current.setAttribute("aria-activedescendant",`${B}-option-${t}`),O&&O(e,-1===t?null:he[t],n),!Z.current)return;const r=Z.current.querySelector(`[role="option"].${o}-focused`);r&&(r.classList.remove(`${o}-focused`),r.classList.remove(`${o}-focusVisible`));let i=Z.current;if("listbox"!==Z.current.getAttribute("role")&&(i=Z.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=Z.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${o}-focused`),"keyboard"===n&&a.classList.add(`${o}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==n&&"touch"!==n)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(A?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(A?1.3:0))}}),ye=Fw(({event:e,diff:t,direction:n="next",reason:o="auto"})=>{if(!pe)return;const i=function(e,t){if(!Z.current||e<0||e>=he.length)return-1;let n=e;for(;;){const o=Z.current.querySelector(`[data-option-index="${n}"]`),r=!g&&(!o||o.disabled||"true"===o.getAttribute("aria-disabled"));if(o&&o.hasAttribute("tabindex")&&!r)return n;if(n="next"===t?(n+1)%he.length:(n-1+he.length)%he.length,n===e)return-1}}((()=>{const e=he.length-1;if("reset"===t)return Q;if("start"===t)return 0;if("end"===t)return e;const n=J.current+t;return n<0?-1===n&&M?-1:v&&-1!==J.current||Math.abs(t)>1?0:e:n>e?n===e+1&&M?-1:v||Math.abs(t)>1?e:0:n})(),n);if(ve({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)G.current.value=ne;else{const e=V(he[i]);G.current.value=e,0===e.toLowerCase().indexOf(ne.toLowerCase())&&ne.length>0&&G.current.setSelectionRange(ne.length,e.length)}}),be=e.useCallback(()=>{if(!pe)return;const e=(()=>{if(-1!==J.current&&fe.filteredOptions&&fe.filteredOptions.length!==he.length&&fe.inputValue===ne&&(R?ee.length===fe.value.length&&fe.value.every((e,t)=>V(ee[t])===V(e)):(e=fe.value,t=ee,(e?V(e):"")===(t?V(t):"")))){const e=fe.filteredOptions[J.current];if(e)return T_(he,t=>V(t)===V(e))}var e,t;return-1})();if(-1!==e)return void(J.current=e);const t=R?ee[0]:ee;if(0!==he.length&&null!=t){if(Z.current){if(null!=t){const e=he[J.current];if(R&&e&&-1!==T_(ee,t=>I(e,t)))return;const n=T_(he,e=>I(e,t));return void(-1===n?ye({diff:"reset"}):ve({index:n}))}J.current>=he.length-1?ve({index:he.length-1}):ve({index:J.current})}}else ye({diff:"reset"})},[he.length,!R&&ee,b,ye,ve,pe,ne,R]),xe=Fw(e=>{He(Z,e),e&&be()});e.useEffect(()=>{be()},[be]);const we=e=>{se||(le(!0),ce(!0),z&&z(e))},_e=(e,t)=>{se&&(le(!1),E&&E(e,t))},Ce=(e,t,n,o)=>{if(R){if(ee.length===t.length&&ee.every((e,n)=>e===t[n]))return}else if(ee===t)return;T&&T(e,t,n,o),te(t)},Ae=e.useRef(!1),ke=(e,t,n="selectOption",o="options")=>{let r=n,i=t;if(R){i=Array.isArray(ee)?ee.slice():[];const e=T_(i,e=>I(t,e));-1===e?i.push(t):"freeSolo"!==o&&(i.splice(e,1),r="removeOption")}ae(e,i),Ce(e,i,r,{option:t}),f||e&&(e.ctrlKey||e.metaKey)||_e(e,r),(!0===l||"touch"===l&&Ae.current||"mouse"===l&&!Ae.current)&&G.current.blur()},Se=(e,t)=>{if(!R)return;""===ne&&_e(e,"toggleInput");let n=X;-1===X?""===ne&&"previous"===t&&(n=ee.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===ee.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===ee.length||"previous"===t&&-1===n)return-1;const e=K.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),Y(n),ge(n)},Me=e=>{W.current=!0,oe(""),L&&L(e,"","clear"),Ce(e,R?[]:null,"clear")},Pe=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==X&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(Y(-1),ge(-1)),229!==t.which))switch(t.key){case"Home":pe&&k&&(t.preventDefault(),ye({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":pe&&k&&(t.preventDefault(),ye({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),ye({diff:-5,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"PageDown":t.preventDefault(),ye({diff:5,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowDown":t.preventDefault(),ye({diff:1,direction:"next",reason:"keyboard",event:t}),we(t);break;case"ArrowUp":t.preventDefault(),ye({diff:-1,direction:"previous",reason:"keyboard",event:t}),we(t);break;case"ArrowLeft":Se(t,"previous");break;case"ArrowRight":Se(t,"next");break;case"Enter":if(-1!==J.current&&pe){const e=he[J.current],n=!!w&&w(e);if(t.preventDefault(),n)return;ke(t,e,"selectOption"),r&&G.current.setSelectionRange(G.current.value.length,G.current.value.length)}else x&&""!==ne&&!1===de&&(R&&t.preventDefault(),ke(t,ne,"createOption","freeSolo"));break;case"Escape":pe?(t.preventDefault(),t.stopPropagation(),_e(t,"escape")):c&&(""!==ne||R&&ee.length>0)&&(t.preventDefault(),t.stopPropagation(),Me(t));break;case"Backspace":if(R&&!N&&""===ne&&ee.length>0){const e=-1===X?ee.length-1:X,n=ee.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:ee[e]})}break;case"Delete":if(R&&!N&&""===ne&&ee.length>0&&-1!==X){const e=X,n=ee.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:ee[e]})}}},Ie=e=>{ie(!0),$&&!W.current&&we(e)},Re=e=>{n(Z)?G.current.focus():(ie(!1),U.current=!0,W.current=!1,s&&-1!==J.current&&pe?ke(e,he[J.current],"blur"):s&&x&&""!==ne?ke(e,ne,"blur","freeSolo"):u&&ae(e,ee),_e(e,"blur"))},Te=e=>{const t=e.target.value;ne!==t&&(oe(t),ce(!1),L&&L(e,t,"input")),""===t?h||R||Ce(e,null,"clear"):we(e)},Ee=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));J.current!==t&&ve({event:e,index:t,reason:"mouse"})},Oe=e=>{ve({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Ae.current=!0},Le=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));ke(e,he[t],"selectOption"),Ae.current=!1},ze=e=>t=>{const n=ee.slice();n.splice(e,1),Ce(t,n,"removeOption",{option:ee[e]})},je=e=>{se?_e(e,"toggleInput"):we(e)},$e=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==B&&e.preventDefault()},Fe=e=>{e.currentTarget.contains(e.target)&&(G.current.focus(),D&&U.current&&G.current.selectionEnd-G.current.selectionStart===0&&G.current.select(),U.current=!1)},Ne=e=>{m||""!==ne&&se||je(e)};let De=x&&ne.length>0;De=De||(R?ee.length>0:null!==ee);let Be=he;return A&&(new Map,Be=he.reduce((e,t,n)=>{const o=A(t);return e.length>0&&e[e.length-1].group===o?e[e.length-1].options.push(t):e.push({key:n,index:n,group:o,options:[t]}),e},[])),m&&re&&Re(),{getRootProps:(e={})=>(0,i.A)({"aria-owns":me?`${B}-listbox`:null},e,{onKeyDown:Pe(e),onMouseDown:$e,onClick:Fe}),getInputLabelProps:()=>({id:`${B}-label`,htmlFor:B}),getInputProps:()=>({id:B,value:ne,onBlur:Re,onFocus:Ie,onChange:Te,onMouseDown:Ne,"aria-activedescendant":pe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":me?`${B}-listbox`:void 0,"aria-expanded":me,autoComplete:"off",ref:G,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:m}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Me}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:je}),getTagProps:({index:e})=>(0,i.A)({key:e,"data-tag-index":e,tabIndex:-1},!N&&{onDelete:ze(e)}),getListboxProps:()=>({role:"listbox",id:`${B}-listbox`,"aria-labelledby":`${B}-label`,ref:xe,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{var n;const o=(R?ee:[ee]).some(e=>null!=e&&I(t,e)),r=!!w&&w(t);return{key:null!=(n=null==_?void 0:_(t))?n:V(t),tabIndex:-1,role:"option",id:`${B}-option-${e}`,onMouseMove:Ee,onClick:Le,onTouchStart:Oe,"data-option-index":e,"aria-disabled":r,"aria-selected":o}},id:B,inputValue:ne,value:ee,dirty:De,expanded:pe&&K,popupOpen:pe,focused:re||-1!==X,anchorEl:K,setAnchorEl:q,focusedTag:X,groupedOptions:Be}}((0,i.A)({},u,{componentName:"Autocomplete"})),ke=!A&&!S&&me&&!Y,Se=(!E||!0===T)&&!1!==T,{onMouseDown:Me}=se(),{ref:Pe}=null!=H?H:{},Ie=pe(),{ref:Re}=Ie,Te=(0,f.A)(Ie,fA),Ee=qw(Re,Pe),Oe=z||(e=>{var t;return null!=(t=e.label)?t:e}),Le=(0,i.A)({},u,{disablePortal:I,expanded:ge,focused:be,fullWidth:O,getOptionLabel:Oe,hasClearIcon:ke,hasPopupIcon:Se,inputFocused:-1===xe,popupOpen:ye,size:oe}),ze=(e=>{const{classes:t,disablePortal:n,expanded:o,focused:r,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:c}=e;return De({root:["root",o&&"expanded",r&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Em(c)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},uA,t)})(Le);let je;if(W&&fe.length>0){const e=e=>(0,i.A)({className:ze.tag,disabled:S},de(e));je=te?te(fe,e,Le):fe.map((t,n)=>{const r=e({index:n}),{key:a}=r,s=(0,f.A)(r,mA);return(0,o.jsx)(eA,(0,i.A)({label:Oe(t),size:oe},s,m),a)})}if(N>-1&&Array.isArray(je)){const e=je.length-N;!be&&e>0&&(je=je.splice(0,N),je.push((0,o.jsx)("span",{className:ze.tag,children:L(e)},je.length)))}const $e=Q||(e=>(0,o.jsxs)("li",{children:[(0,o.jsx)(SA,{className:ze.groupLabel,ownerState:Le,component:"div",children:e.group}),(0,o.jsx)(MA,{className:ze.groupUl,ownerState:Le,children:e.children})]},e.key)),Fe=ee||((e,t)=>{const{key:n}=e,r=(0,f.A)(e,gA);return(0,o.jsx)("li",(0,i.A)({},r,{children:Oe(t)}),n)}),Ne=(e,t)=>{const n=he({option:e,index:t});return Fe((0,i.A)({},n,{className:ze.option}),e,{selected:n["aria-selected"],index:t,inputValue:Ce},Le)},Be=null!=(r=re.clearIndicator)?r:_.clearIndicator,Ve=null!=(a=re.paper)?a:_.paper,We=null!=(s=re.popper)?s:_.popper,Ue=null!=(l=re.popupIndicator)?l:_.popupIndicator;return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)(vA,(0,i.A)({ref:n,className:Ge(ze.root,g),ownerState:Le},ae(ie),{children:J({id:ve,disabled:S,fullWidth:!0,size:"small"===oe?"small":void 0,InputLabelProps:le(),InputProps:(0,i.A)({ref:_e,className:ze.inputRoot,startAdornment:je,onClick:e=>{e.target===e.currentTarget&&Me(e)}},(ke||Se)&&{endAdornment:(0,o.jsxs)(yA,{className:ze.endAdornment,ownerState:Le,children:[ke?(0,o.jsx)(bA,(0,i.A)({},ce(),{"aria-label":x,title:x,ownerState:Le},Be,{className:Ge(ze.clearIndicator,null==Be?void 0:Be.className),children:v})):null,Se?(0,o.jsx)(xA,(0,i.A)({},ue(),{disabled:S,"aria-label":ye?w:Z,title:ye?w:Z,ownerState:Le},Ue,{className:Ge(ze.popupIndicator,null==Ue?void 0:Ue.className),children:X})):null]})}),inputProps:(0,i.A)({className:ze.input,disabled:S,readOnly:Y},se())})})),we?(0,o.jsx)(wA,(0,i.A)({as:q,disablePortal:I,style:{width:we?we.clientWidth:null},ownerState:Le,role:"presentation",anchorEl:we,open:ye},We,{className:Ge(ze.popper,null==We?void 0:We.className),children:(0,o.jsxs)(_A,(0,i.A)({ownerState:Le,as:K},Ve,{className:Ge(ze.paper,null==Ve?void 0:Ve.className),children:[B&&0===Ae.length?(0,o.jsx)(CA,{className:ze.loading,ownerState:Le,children:V}):null,0!==Ae.length||E||B?null:(0,o.jsx)(AA,{className:ze.noOptions,ownerState:Le,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:U}),Ae.length>0?(0,o.jsx)(kA,(0,i.A)({as:D,className:ze.listbox,ownerState:Le},Te,H,{ref:Ee,children:Ae.map((e,t)=>j?$e({key:e.key,group:e.group,children:e.options.map((t,n)=>Ne(t,e.index+n))}):Ne(e,t))})):null]}))})):null]})}),IA=PA,RA=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function TA(t){const{item:n,applyValue:r,type:a,apiRef:s,focusElementRef:l,color:u,error:c,helperText:d,size:p,variant:h}=t,m=(0,f.A)(t,RA),g={color:u,error:c,helperText:d,size:p,variant:h},[v,y]=e.useState(n.value||[]),b=Bi(),x=lb();e.useEffect(()=>{var e;const t=null!=(e=n.value)?e:[];y(t.map(String))},[n.value]);const w=e.useCallback((e,t)=>{y(t.map(String)),r((0,i.A)({},n,{value:[...t]}))},[r,n]);return(0,o.jsx)(IA,(0,i.A)({multiple:!0,freeSolo:!0,options:[],filterOptions:(e,t)=>{const{inputValue:n}=t;return null==n||""===n?[]:[n]},id:b,value:v,onChange:w,renderTags:(e,t)=>e.map((e,n)=>(0,o.jsx)(x.slots.baseChip,(0,i.A)({variant:"outlined",size:"small",label:e},t({index:n})))),renderInput:e=>{var t;return(0,o.jsx)(x.slots.baseTextField,(0,i.A)({},e,{label:s.current.getLocaleText("filterPanelInputLabel"),placeholder:s.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,i.A)({},e.InputLabelProps,{shrink:!0}),inputRef:l,type:a||"text"},g,null==(t=x.slotProps)?void 0:t.baseTextField))}},m))}const EA={current:null};function OA(e){return e.isInternal=!0,e}function LA(e){return void 0!==e&&!0===e.isInternal}function zA(e){return e.map(e=>{return(0,i.A)({},e,{getApplyFilterFn:(t=e.getApplyFilterFnV7,OA((e,n)=>{const o=t(e,n);return o?e=>o(e.value,e.row,n,EA.current):o})),getApplyFilterFnV7:OA(e.getApplyFilterFnV7)});var t})}function jA(e){return OA((t,n,o)=>{const r=e(t,n,o);return r?e=>r(e.value,e.row,n,o):r})}var $A=function(e){return e.And="and",e.Or="or",e}($A||{});const FA=()=>({items:[],logicOperator:$A.And,quickFilterValues:[],quickFilterLogicOperator:$A.And});function NA(e){return{current:e.current.getPublicApi()}}let DA;const HA=(e,t)=>{const n=(0,i.A)({},e);if(null==n.id&&(n.id=Math.round(1e5*Math.random())),null==n.operator){const e=Ab(t)[n.field];n.operator=e&&e.filterOperators[0].value}return n},BA=Yy(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),VA=Yy("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),WA=Yy("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),UA=(e,t,n)=>{const o=e.items.length>1;let r;o&&t?(BA(),r=[e.items[0]]):r=e.items;const a=o&&r.some(e=>null==e.id),s=r.some(e=>null==e.operator);return a&&VA(),s&&WA(),s||a?(0,i.A)({},e,{items:r.map(e=>HA(e,n))}):e.items!==r?(0,i.A)({},e,{items:r}):e},GA=(e,t,n)=>o=>(0,i.A)({},o,{filterModel:UA(e,t,n)}),ZA=e=>"string"==typeof e?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,KA=(e,t)=>{if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let o;if(n.valueParser){var r;const t=n.valueParser;o=Array.isArray(e.value)?null==(r=e.value)?void 0:r.map(e=>t(e)):t(e.value)}else o=e.value;const{ignoreDiacritics:a}=t.current.rootProps;a&&(o=ZA(o));const s=(0,i.A)({},e,{value:o}),l=n.filterOperators;if(null==l||!l.length)throw new Error(`MUI: No filter operators found for column '${n.field}'.`);const u=l.find(e=>e.value===s.operator);if(!u)throw new Error(`MUI: No filter operator found for column '${n.field}' and operator value '${s.operator}'.`);const c=!LA(u.getApplyFilterFn),d=!LA(u.getApplyFilterFnV7),p=NA(t);if(u.getApplyFilterFnV7&&(!c||d)){const e=u.getApplyFilterFnV7(s,n);return"function"!=typeof e?null:{v7:!0,item:s,fn:o=>{let r=t.current.getRowValue(o,n);return a&&(r=ZA(r)),e(r,o,n,p)}}}const h=u.getApplyFilterFn(s,n);return"function"!=typeof h?null:{v7:!1,item:s,fn:e=>{const n=t.current.getCellParams(e,s.field);EA.current=p,a&&(n.value=ZA(n.value));const o=h(n);return EA.current=null,o}}};let qA=1;const XA=(e,t,n)=>{const o=((e,t,n)=>{const{items:o}=e,r=o.map(e=>KA(e,t)).filter(e=>!!e);if(0===r.length)return null;if(n||!function(){if(void 0!==DA)return DA;try{DA=new Function("return true")()}catch(e){DA=!1}return DA}())return(e,n)=>{const o={};for(let i=0;i<r.length;i+=1){const a=r[i];n&&!n(a.item.field)||(o[a.item.id]=a.v7?a.fn(e):a.fn(t.current.getRowId(e)))}return o};const i=new Function("getRowId","appliers","row","shouldApplyFilter",`"use strict";\n${r.map((e,t)=>`const shouldApply${t} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(e.item.field)});`).join("\n")}\n\nconst result$$ = {\n${r.map((e,t)=>` ${JSON.stringify(String(e.item.id))}: !shouldApply${t}\n ? false\n : ${e.v7?`appliers[${t}].fn(row)`:`appliers[${t}].fn(getRowId(row))`},`).join("\n")}\n};\n\nreturn result$$;`.replaceAll("$$",String(qA)));return qA+=1,(e,n)=>i(t.current.getRowId,r,e,n)})(e,t,n),r=((e,t)=>{var n,o,r;const i=null!=(n=null==(o=e.quickFilterValues)?void 0:o.filter(Boolean))?n:[];if(0===i.length)return null;const a=null!=(r=e.quickFilterExcludeHiddenColumns)&&r?Pb(t):Cb(t),s=[],{ignoreDiacritics:l}=t.current.rootProps,u=NA(t);return a.forEach(e=>{const n=t.current.getColumn(e),o=null==n?void 0:n.getApplyQuickFilterFn,r=null==n?void 0:n.getApplyQuickFilterFnV7,a=!LA(o),c=!LA(r);!r||a&&!c?o&&s.push({column:n,appliers:i.map(e=>{const t=l?ZA(e):e;return{v7:!1,fn:o(t,n,u)}})}):s.push({column:n,appliers:i.map(e=>{const t=l?ZA(e):e;return{v7:!0,fn:r(t,n,u)}})})}),function(e,n){const o={},r={};e:for(let c=0;c<i.length;c+=1){const d=i[c];for(let i=0;i<s.length;i+=1){const{column:p,appliers:h}=s[i],{field:f}=p;if(n&&!n(f))continue;const m=h[c];let g=t.current.getRowValue(e,p);if(null!==m.fn)if(m.v7){if(l&&(g=ZA(g)),m.fn(g,e,p,u)){o[d]=!0;continue e}}else{var a;const n=null!=(a=r[f])?a:t.current.getCellParams(t.current.getRowId(e),f);if(l&&(n.value=ZA(n.value)),r[f]=n,m.fn(n)){o[d]=!0;continue e}}}o[d]=!1}return o}})(e,t);return function(e,t,n){var i,a;n.passingFilterItems=null!=(i=null==o?void 0:o(e,t))?i:null,n.passingQuickFilterValues=null!=(a=null==r?void 0:r(e,t))?a:null}},YA=e=>null!=e,QA=(e,t,n,o,r)=>{const i=((e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(e=>null!==KA(e,t))),e.cleanedFilterItems))(r,o,n.items),a=e.filter(YA),s=t.filter(YA);if(a.length>0){var l;const e=e=>a.some(t=>t[e.id]);if((null!=(l=n.logicOperator)?l:FA().logicOperator)===$A.And){if(!i.every(e))return!1}else if(!i.some(e))return!1}if(s.length>0&&null!=n.quickFilterValues){var u;const e=e=>s.some(t=>t[e]);if((null!=(u=n.quickFilterLogicOperator)?u:FA().quickFilterLogicOperator)===$A.And){if(!n.quickFilterValues.every(e))return!1}else if(!n.quickFilterValues.some(e))return!1}return!0},JA=OA(e=>{if(!e)return null;const t=new RegExp($x(e),"i");return(e,n,o,r)=>{let i=r.current.getRowFormattedValue(n,o);return r.current.ignoreDiacritics&&(i=ZA(i)),null!=i&&t.test(i.toString())}}),ek={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:(e,t)=>{const n=x_(e,t);return null!==n?n:"string"==typeof e?w_.compare(e.toString(),t.toString()):e-t},type:"string",align:"left",filterOperators:((e=!1)=>zA([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp($x(n),"i");return e=>null!=e&&o.test(String(e))},InputComponent:M_},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&0===o.compare(n,e.toString())},InputComponent:M_},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`^${$x(n)}.*$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:M_},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),o=new RegExp(`.*${$x(n)}$`,"i");return e=>null!=e&&o.test(e.toString())},InputComponent:M_},{value:"isEmpty",getApplyFilterFnV7:()=>e=>""===e||null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>""!==e&&null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||0===t.value.length)return null;const n=e?t.value:t.value.map(e=>e.trim()),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return e=>null!=e&&n.some(t=>0===o.compare(t,e.toString()||""))},InputComponent:TA}]))(),renderEditCell:e=>(0,o.jsx)(m_,(0,i.A)({},e)),getApplyQuickFilterFn:jA(JA),getApplyQuickFilterFnV7:JA},tk="auto-generated-group-node-root",nk=Symbol("mui.id_autogenerated"),ok=(e,t,n)=>{const o=t?t(e):e.id;return function(e,t,n="A row was provided without id in the rows prop:"){if(null==e)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join("\n"))}(o,e,n),o},rk=({rows:e,getRowId:t,loading:n,rowCount:o})=>{const r={type:"full",rows:[]},i={},a={};for(let n=0;n<e.length;n+=1){const o=e[n],s=ok(o,t);i[s]=o,a[s]=s,r.rows.push(s)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:o,updates:r,dataRowIdToIdLookup:a,dataRowIdToModelLookup:i}},ik=({tree:e,rowCountProp:t=0})=>{const n=e[tk];return Math.max(t,n.children.length+(null==n.footerId?0:1))},ak=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:o,previousTreeDepths:r})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:u,groupingName:c}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:o,previousTreeDepths:r,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup}),d=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:u,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},(0,i.A)({},d,{totalRowCount:Math.max(t,d.dataRowIds.length),totalTopLevelRowCount:ik({tree:d.tree,rowCountProp:t}),groupingName:c,loading:n})},sk=e=>"skeletonRow"===e.type||"footer"===e.type||"group"===e.type&&e.isAutoGenerated||"pinnedRow"===e.type&&e.isAutoGenerated,lk=(e,t,n)=>{const o=e[t];if("group"!==o.type)return[];const r=[];for(let t=0;t<o.children.length;t+=1){const i=o.children[t];n&&sk(e[i])||r.push(i);const a=lk(e,i,n);for(let e=0;e<a.length;e+=1)r.push(a[e])}return n||null==o.footerId||r.push(o.footerId),r};function uk(e){var t,n;const o=qb(e),r=(null==o||null==(t=o.top)?void 0:t.reduce((t,n)=>t+e.current.unstable_getRowHeight(n.id),0))||0,i=(null==o||null==(n=o.bottom)?void 0:n.reduce((t,n)=>t+e.current.unstable_getRowHeight(n.id),0))||0;return{top:r,bottom:i}}function ck(e,t){const n=wb(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*n)}px)`}const dk=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"];function pk(t){const{value:n}=t,r=(0,f.A)(t,dk),a=gw(),s=lb(),l=(e=>{const{classes:t}=e;return De({root:["booleanCell"]},By,t)})({classes:s.classes}),u=e.useMemo(()=>n?s.slots.booleanCellTrueIcon:s.slots.booleanCellFalseIcon,[s.slots.booleanCellFalseIcon,s.slots.booleanCellTrueIcon,n]);return(0,o.jsx)(u,(0,i.A)({fontSize:"small",className:l.root,titleAccess:a.current.getLocaleText(n?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":Boolean(n)},r))}const hk=e.memo(pk),fk=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"];function mk(t){var n;const{id:r,value:a,field:s,className:l,hasFocus:u,onValueChange:c}=t,d=(0,f.A)(t,fk),p=gw(),h=e.useRef(null),m=Bi(),[g,v]=e.useState(a),y=lb(),b=(e=>{const{classes:t}=e;return De({root:["editBooleanCell"]},By,t)})({classes:y.classes}),x=e.useCallback(async e=>{const t=e.target.checked;c&&await c(e,t),v(t),await p.current.setEditCellValue({id:r,field:s,value:t},e)},[p,s,r,c]);return e.useEffect(()=>{v(a)},[a]),_p(()=>{u&&h.current.focus()},[u]),(0,o.jsx)("label",(0,i.A)({htmlFor:m,className:Ge(b.root,l)},d,{children:(0,o.jsx)(y.slots.baseCheckbox,(0,i.A)({id:m,inputRef:h,checked:Boolean(g),onChange:x,size:"small"},null==(n=y.slotProps)?void 0:n.baseCheckbox))}))}const gk=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],vk=dt("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});const yk=(0,i.A)({},ek,{type:"boolean",align:"center",headerAlign:"center",renderCell:e=>sk(e.rowNode)?"":(0,o.jsx)(hk,(0,i.A)({},e)),renderEditCell:e=>(0,o.jsx)(mk,(0,i.A)({},e)),sortComparator:__,valueFormatter:function({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")},filterOperators:zA([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t="true"===e.value;return e=>Boolean(e)===t},InputComponent:function(t){var n,r,a,s;const{item:l,applyValue:u,apiRef:c,focusElementRef:d,clearButton:p,tabIndex:h,label:m,variant:g="standard"}=t,v=(0,f.A)(t,gk),[y,b]=e.useState(l.value||""),x=lb(),w=Bi(),_=Bi(),C=(null==(n=x.slotProps)?void 0:n.baseSelect)||{},A=null==(r=C.native)||r,k=(null==(a=x.slotProps)?void 0:a.baseSelectOption)||{},S=e.useCallback(e=>{const t=e.target.value;b(t),u((0,i.A)({},l,{value:t}))},[u,l]);e.useEffect(()=>{b(l.value||"")},[l.value]);const M=null!=m?m:c.current.getLocaleText("filterPanelInputLabel");return(0,o.jsxs)(vk,{children:[(0,o.jsxs)(x.slots.baseFormControl,{fullWidth:!0,children:[(0,o.jsx)(x.slots.baseInputLabel,(0,i.A)({},null==(s=x.slotProps)?void 0:s.baseInputLabel,{id:w,shrink:!0,variant:g,children:M})),(0,o.jsxs)(x.slots.baseSelect,(0,i.A)({labelId:w,id:_,label:M,value:y,onChange:S,variant:g,notched:"outlined"===g||void 0,native:A,displayEmpty:!0,inputProps:{ref:d,tabIndex:h}},v,C,{children:[(0,o.jsx)(x.slots.baseSelectOption,(0,i.A)({},k,{native:A,value:"",children:c.current.getLocaleText("filterValueAny")})),(0,o.jsx)(x.slots.baseSelectOption,(0,i.A)({},k,{native:A,value:"true",children:c.current.getLocaleText("filterValueTrue")})),(0,o.jsx)(x.slots.baseSelectOption,(0,i.A)({},k,{native:A,value:"false",children:c.current.getLocaleText("filterValueFalse")}))]}))]}),p]})}}]),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>(e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}})(e)}),bk="__check__",xk=(0,i.A)({},yk,{field:bk,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>void 0!==Cw(e.api.state,e.api.instanceId)[e.id],renderHeader:e=>(0,o.jsx)($w,(0,i.A)({},e)),renderCell:e=>(0,o.jsx)(bw,(0,i.A)({},e))});function wk(e,t){if("string"==typeof e){if(t.shouldAppendQuotes||t.escapeFormulas){const n=e.replace(/"/g,'""');return[t.delimiter,"\n","\r",'"'].some(t=>e.includes(t))?`"${n}"`:t.escapeFormulas&&["=","+","-","@","\t","\r"].includes(n[0])?`'${n}`:n}return e}return e}const _k=(e,t)=>{const{csvOptions:n,ignoreValueFormatter:o}=t;let r;if(o){var i;const t=e.colDef.type;if("number"===t)r=String(e.value);else if("date"===t||"dateTime"===t){var a;r=null==(a=e.value)?void 0:a.toISOString()}else r="function"==typeof(null==(i=e.value)?void 0:i.toString)?e.value.toString():e.value}else r=e.formattedValue;return wk(r,n)};Yy(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class Ck{constructor(e){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=e}addValue(e){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),null==e?this.rowString+="":"function"==typeof this.options.sanitizeCellValue?this.rowString+=this.options.sanitizeCellValue(e,this.options.csvOptions):this.rowString+=e,this.isEmpty=!1}getRowString(){return this.rowString}}function Ak(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const o=window.getSelection();o.removeAllRanges(),o.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}const kk=e=>(0,i.A)({},e,{columnMenu:{open:!1}}),Sk=t=>{const n=e.useRef(!0);n.current&&(n.current=!1,t())},Mk=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),a=e.useCallback(()=>{r.current=t.current.registerPipeProcessor(n,i.current,o)},[t,o,n]);Sk(()=>{a()});const s=e.useRef(!0);e.useEffect(()=>(s.current?s.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)}),[a])},Pk=(t,n,o)=>{const r=e.useRef(),i=e.useRef(`mui-${Math.round(1e9*Math.random())}`),a=e.useCallback(()=>{r.current=t.current.registerPipeApplier(n,i.current,o)},[t,o,n]);Sk(()=>{a()});const s=e.useRef(!0);e.useEffect(()=>(s.current?s.current=!1:a(),()=>{r.current&&(r.current(),r.current=null)}),[a])},Ik=e=>null==e?null:Number(e),Rk=OA(e=>null==e||Number.isNaN(e)||""===e?null:t=>Ik(t)===Ik(e)),Tk=(0,i.A)({},ek,{type:"number",align:"right",headerAlign:"right",sortComparator:__,valueParser:e=>""===e?null:Number(e),valueFormatter:({value:e})=>function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)?e.toLocaleString():e||"",filterOperators:zA([{value:"=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Ik(t)===e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>Ik(t)!==e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ik(t)>e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ik(t)>=e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ik(t)<e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>null==e.value||Number.isNaN(e.value)?null:t=>null!=t&&Ik(t)<=e.value,InputComponent:M_,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>Array.isArray(e.value)&&0!==e.value.length?t=>null!=t&&e.value.includes(Number(t)):null,InputComponent:TA,InputComponentProps:{type:"number"}}]),getApplyQuickFilterFn:jA(Rk),getApplyQuickFilterFnV7:Rk}),Ek=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Ok(t){var n,r;const{item:a,applyValue:s,type:l,apiRef:u,focusElementRef:c,InputProps:d,clearButton:p,tabIndex:h,disabled:m}=t,g=(0,f.A)(t,Ek),v=k_(),[y,b]=e.useState(null!=(n=a.value)?n:""),[x,w]=e.useState(!1),_=Bi(),C=lb(),A=e.useCallback(e=>{const t=e.target.value;b(String(t)),w(!0),v.start(C.filterDebounceMs,()=>{s((0,i.A)({},a,{value:t})),w(!1)})},[s,a,C.filterDebounceMs,v]);return e.useEffect(()=>{var e;const t=null!=(e=a.value)?e:"";b(String(t))},[a.value]),(0,o.jsx)(C.slots.baseTextField,(0,i.A)({fullWidth:!0,id:_,label:u.current.getLocaleText("filterPanelInputLabel"),placeholder:u.current.getLocaleText("filterPanelInputPlaceholder"),value:y,onChange:A,variant:"standard",type:l||"text",InputLabelProps:{shrink:!0},inputRef:c,InputProps:(0,i.A)({},x||p?{endAdornment:x?(0,o.jsx)(C.slots.loadIcon,{fontSize:"small",color:"action"}):p}:{},{disabled:m},d,{inputProps:(0,i.A)({max:"datetime-local"===l?"9999-12-31T23:59":"9999-12-31",tabIndex:h},null==d?void 0:d.inputProps)})},g,null==(r=C.slotProps)?void 0:r.baseTextField))}const Lk=/(\d+)-(\d+)-(\d+)/,zk=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function jk(e,t,n,o){if(!e.value)return null;const[r,i,a,s,l]=e.value.match(n?zk:Lk).slice(1).map(Number),u=new Date(r,i-1,a,s||0,l||0).getTime();return e=>{if(!e)return!1;if(o)return t(e.getTime(),u);const r=new Date(e).setHours(n?e.getHours():0,n?e.getMinutes():0,0,0);return t(r,u)}}const $k=e=>zA([{value:"is",getApplyFilterFnV7:t=>jk(t,(e,t)=>e===t,e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>jk(t,(e,t)=>e!==t,e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>jk(t,(e,t)=>e>t,e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>jk(t,(e,t)=>e>=t,e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>jk(t,(e,t)=>e<t,e,!e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>jk(t,(e,t)=>e<=t,e),InputComponent:Ok,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>null==e,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>null!=e,requiresFilterValue:!1}]),Fk=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],Nk=dt(p_)({fontSize:"inherit"});function Dk(t){const{id:n,value:r,field:a,colDef:s,hasFocus:l,inputProps:u,onValueChange:c}=t,d=(0,f.A)(t,Fk),p="dateTime"===s.type,h=gw(),m=e.useRef(),g=e.useMemo(()=>{let e,t;return e=null==r?null:r instanceof Date?r:new Date((null!=r?r:"").toString()),t=null==e||Number.isNaN(e.getTime())?"":new Date(e.getTime()-60*e.getTimezoneOffset()*1e3).toISOString().substr(0,p?16:10),{parsed:e,formatted:t}},[r,p]),[v,y]=e.useState(g),b=(e=>{const{classes:t}=e;return De({root:["editInputCell"]},By,t)})({classes:lb().classes}),x=e.useCallback(e=>{if(""===e)return null;const[t,n]=e.split("T"),[o,r,i]=t.split("-"),a=new Date;if(a.setFullYear(Number(o),Number(r)-1,Number(i)),a.setHours(0,0,0,0),n){const[e,t]=n.split(":");a.setHours(Number(e),Number(t),0,0)}return a},[]),w=e.useCallback(async e=>{const t=e.target.value,o=x(t);c&&await c(e,o),y({parsed:o,formatted:t}),h.current.setEditCellValue({id:n,field:a,value:o},e)},[h,a,n,c,x]);return e.useEffect(()=>{y(e=>{var t,n;return g.parsed!==e.parsed&&(null==(t=g.parsed)?void 0:t.getTime())!==(null==(n=e.parsed)?void 0:n.getTime())?g:e})},[g]),_p(()=>{l&&m.current.focus()},[l]),(0,o.jsx)(Nk,(0,i.A)({inputRef:m,fullWidth:!0,className:b.root,type:p?"datetime-local":"date",inputProps:(0,i.A)({max:p?"9999-12-31T23:59":"9999-12-31"},u),value:v.formatted,onChange:w},d))}const Hk=e=>(0,o.jsx)(Dk,(0,i.A)({},e));function Bk({value:e,columnType:t,rowId:n,field:o}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${o}".`].join("\n"))}const Vk=(0,i.A)({},ek,{type:"date",sortComparator:C_,valueFormatter:function({value:e,field:t,id:n}){return e?(Bk({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""},filterOperators:$k(),renderEditCell:Hk,pastedValueParser:e=>new Date(e)}),Wk=(0,i.A)({},ek,{type:"dateTime",sortComparator:C_,valueFormatter:function({value:e,field:t,id:n}){return e?(Bk({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""},filterOperators:$k(!0),renderEditCell:Hk,pastedValueParser:e=>new Date(e)});var Uk=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Uk||{}),Gk=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Gk||{}),Zk=function(e){return e.Cell="cell",e.Row="row",e}(Zk||{}),Kk=function(e){return e.Edit="edit",e.View="view",e}(Kk||{}),qk=function(e){return e.Edit="edit",e.View="view",e}(qk||{});function Xk(e){return"singleSelect"===(null==e?void 0:e.type)}function Yk(e,t,n){if(void 0===t)return;const o=t.find(t=>{const o=n(t);return String(o)===String(e)});return n(o)}const Qk=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],Jk=["MenuProps"];function eS(t){var n,r,a;const s=lb(),{id:l,value:u,field:c,row:d,colDef:p,hasFocus:h,error:m,onValueChange:g,initialOpen:v=s.editMode===Zk.Cell,getOptionLabel:y,getOptionValue:b}=t,x=(0,f.A)(t,Qk),w=gw(),_=e.useRef(),C=e.useRef(),[A,k]=e.useState(v),S=null!=(r=((null==(n=s.slotProps)?void 0:n.baseSelect)||{}).native)&&r,M=(null==(a=s.slotProps)?void 0:a.baseSelect)||{},{MenuProps:P}=M,I=(0,f.A)(M,Jk);if(_p(()=>{var e;h&&(null==(e=C.current)||e.focus())},[h]),!Xk(p))return null;let R;if(R="function"==typeof(null==p?void 0:p.valueOptions)?null==p?void 0:p.valueOptions({id:l,row:d,field:c}):null==p?void 0:p.valueOptions,!R)return null;const T=b||p.getOptionValue,E=y||p.getOptionLabel;return R&&p?(0,o.jsx)(s.slots.baseSelect,(0,i.A)({ref:_,inputRef:C,value:u,onChange:async e=>{if(!Xk(p)||!R)return;k(!1);const t=Yk(e.target.value,R,T);g&&await g(e,t),await w.current.setEditCellValue({id:l,field:c,value:t},e)},open:A,onOpen:e=>{(function(e){return!!e.key})(e)&&"Enter"===e.key||k(!0)},MenuProps:(0,i.A)({onClose:(e,t)=>{if(s.editMode!==Zk.Row){if("backdropClick"===t||dw(e.key)){const t=w.current.getCellParams(l,c);w.current.publishEvent("cellEditStop",(0,i.A)({},t,{reason:dw(e.key)?Gk.escapeKeyDown:Gk.cellFocusOut}))}}else k(!1)}},P),error:m,native:S,fullWidth:!0},x,I,{children:R.map(t=>{var n;const o=T(t);return(0,e.createElement)(s.slots.baseSelectOption,(0,i.A)({},(null==(n=s.slotProps)?void 0:n.baseSelectOption)||{},{native:S,key:o,value:o}),E(t))})})):null}const tS=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],nS=({column:{valueOptions:t,field:n},OptionComponent:o,getOptionLabel:r,getOptionValue:a,isSelectNative:s,baseSelectOptionProps:l})=>("function"==typeof t?["",...t({field:n})]:["",...t||[]]).map(t=>{const n=a(t),u=r(t);return(0,e.createElement)(o,(0,i.A)({},l,{native:s,key:n,value:n}),u)}),oS=dt("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function rS(t){var n,r,a,s,l,u,c,d;const{item:p,applyValue:h,type:m,apiRef:g,focusElementRef:v,getOptionLabel:y,getOptionValue:b,placeholder:x,tabIndex:w,label:_,variant:C="standard",clearButton:A}=t,k=(0,f.A)(t,tS),[S,M]=e.useState(null!=(n=p.value)?n:""),P=Bi(),I=Bi(),R=lb(),T=null==(r=null==(a=R.slotProps)||null==(a=a.baseSelect)?void 0:a.native)||r;let E=null;if(p.field){const e=g.current.getColumn(p.field);Xk(e)&&(E=e)}const O=b||(null==(s=E)?void 0:s.getOptionValue),L=y||(null==(l=E)?void 0:l.getOptionLabel),z=e.useMemo(()=>{if(E)return"function"==typeof E.valueOptions?E.valueOptions({field:E.field}):E.valueOptions},[E]),j=e.useCallback(e=>{let t=e.target.value;t=Yk(t,z,O),M(String(t)),h((0,i.A)({},p,{value:t}))},[z,O,h,p]);if(e.useEffect(()=>{var e;let t;if(void 0!==z){if(t=Yk(p.value,z,O),t!==p.value)return void h((0,i.A)({},p,{value:t}))}else t=p.value;t=null!=(e=t)?e:"",M(String(t))},[p,z,h,O]),!Xk(E))return null;if(!Xk(E))return null;const $=null!=_?_:g.current.getLocaleText("filterPanelInputLabel");return(0,o.jsxs)(oS,{children:[(0,o.jsxs)(R.slots.baseFormControl,{children:[(0,o.jsx)(R.slots.baseInputLabel,(0,i.A)({},null==(u=R.slotProps)?void 0:u.baseInputLabel,{id:I,htmlFor:P,shrink:!0,variant:C,children:$})),(0,o.jsx)(R.slots.baseSelect,(0,i.A)({id:P,label:$,labelId:I,value:S,onChange:j,variant:C,type:m||"text",inputProps:{tabIndex:w,ref:v,placeholder:null!=x?x:g.current.getLocaleText("filterPanelInputPlaceholder")},native:T,notched:"outlined"===C||void 0},k,null==(c=R.slotProps)?void 0:c.baseSelect,{children:nS({column:E,OptionComponent:R.slots.baseSelectOption,getOptionLabel:L,getOptionValue:O,isSelectNative:T,baseSelectOptionProps:null==(d=R.slotProps)?void 0:d.baseSelectOption})}))]}),A]})}const iS=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],aS=R_();const sS=e=>null!=e&&jx(e)?e.value:e,lS=(0,i.A)({},ek,{type:"singleSelect",getOptionLabel:e=>jx(e)?e.label:String(e),getOptionValue:e=>jx(e)?e.value:e,valueFormatter(e){const{id:t,field:n,value:o,api:r}=e,i=e.api.getColumn(n);if(!Xk(i))return"";let a;if(a="function"==typeof i.valueOptions?i.valueOptions({id:t,row:t?r.getRow(t):null,field:n}):i.valueOptions,null==o)return"";if(!a)return o;if(!(e=>"object"==typeof e[0])(a))return i.getOptionLabel(o);const s=a.find(e=>i.getOptionValue(e)===o);return s?i.getOptionLabel(s):""},renderEditCell:e=>(0,o.jsx)(eS,(0,i.A)({},e)),filterOperators:zA([{value:"is",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>sS(t)===sS(e.value),InputComponent:rS},{value:"not",getApplyFilterFnV7:e=>null==e.value||""===e.value?null:t=>sS(t)!==sS(e.value),InputComponent:rS},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||0===e.value.length)return null;const t=e.value.map(sS);return e=>t.includes(sS(e))},InputComponent:function(t){var n,r;const{item:a,applyValue:s,apiRef:l,focusElementRef:u,color:c,error:d,helperText:p,size:h,variant:m="standard",getOptionLabel:g,getOptionValue:v}=t,y=(0,f.A)(t,iS),b={color:c,error:d,helperText:p,size:h,variant:m},x=Bi(),w=lb();let _=null;if(a.field){const e=l.current.getColumn(a.field);Xk(e)&&(_=e)}const C=v||(null==(n=_)?void 0:n.getOptionValue),A=g||(null==(r=_)?void 0:r.getOptionLabel),k=e.useCallback((e,t)=>C(e)===C(t),[C]),S=e.useMemo(()=>{var e;return null!=(e=_)&&e.valueOptions?"function"==typeof _.valueOptions?_.valueOptions({field:_.field}):_.valueOptions:[]},[_]),M=e.useMemo(()=>null==S?void 0:S.map(C),[S,C]),P=e.useMemo(()=>Array.isArray(a.value)?void 0!==S?a.value.map(e=>null==M?void 0:M.findIndex(t=>t===e)).filter(e=>e>=0).map(e=>S[e]):a.value:[],[a.value,S,M]);e.useEffect(()=>{Array.isArray(a.value)&&P.length===a.value.length||s((0,i.A)({},a,{value:P.map(C)}))},[a,P,s,C]);const I=e.useCallback((e,t)=>{s((0,i.A)({},a,{value:t.map(C)}))},[s,a,C]);return(0,o.jsx)(IA,(0,i.A)({multiple:!0,options:S,isOptionEqualToValue:k,filterOptions:aS,id:x,value:P,onChange:I,getOptionLabel:A,renderTags:(e,t)=>e.map((e,n)=>(0,o.jsx)(w.slots.baseChip,(0,i.A)({variant:"outlined",size:"small",label:A(e)},t({index:n})))),renderInput:e=>{var t;return(0,o.jsx)(w.slots.baseTextField,(0,i.A)({},e,{label:l.current.getLocaleText("filterPanelInputLabel"),placeholder:l.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:(0,i.A)({},e.InputLabelProps,{shrink:!0}),inputRef:u,type:"singleSelect"},b,null==(t=w.slotProps)?void 0:t.baseTextField))}},y))}}]),pastedValueParser:(e,t)=>{const n=t.colDef,o=n.valueOptions,r="function"==typeof o?o({field:n.field}):o||[],i=n.getOptionValue;if(r.find(t=>i(t)===e))return e}}),uS=Cp,cS=e.createContext({});function dS(e){return et("MuiList",e)}tt("MuiList",["root","padding","dense","subheader"]);const pS=["children","className","component","dense","disablePadding","subheader"],hS=dt("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>(0,i.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),fS=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiList"}),{children:a,className:s,component:l="ul",dense:u=!1,disablePadding:c=!1,subheader:d}=r,p=(0,f.A)(r,pS),h=e.useMemo(()=>({dense:u}),[u]),m=(0,i.A)({},r,{component:l,dense:u,disablePadding:c}),g=(e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return De({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},dS,t)})(m);return(0,o.jsx)(cS.Provider,{value:h,children:(0,o.jsxs)(hS,(0,i.A)({as:l,className:Ge(g.root,s),ref:n,ownerState:m},p,{children:[d,a]}))})});function mS(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const gS=mS,vS=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function yS(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function bS(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function xS(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function wS(e,t,n,o,r,i){let a=!1,s=r(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!o&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&xS(s,i)&&!t)return s.focus(),!0;s=r(e,s,n)}return!1}const _S=e.forwardRef(function(t,n){const{actions:r,autoFocus:a=!1,autoFocusItem:s=!1,children:l,className:u,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:p,variant:h="selectedMenu"}=t,m=(0,f.A)(t,vS),g=e.useRef(null),v=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Xw(()=>{a&&g.current.focus()},[a]),e.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!g.current.style.width;if(e.clientHeight<g.current.clientHeight&&n){const n=`${gS(uS(e))}px`;g.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,g.current.style.width=`calc(100% + ${n})`}return g.current}}),[]);const y=qw(g,n);let b=-1;e.Children.forEach(l,(t,n)=>{e.isValidElement(t)?(t.props.disabled||("selectedMenu"===h&&t.props.selected||-1===b)&&(b=n),b===n&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(b+=1,b>=l.length&&(b=-1))):b===n&&(b+=1,b>=l.length&&(b=-1))});const x=e.Children.map(l,(t,n)=>{if(n===b){const n={};return s&&(n.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===h&&(n.tabIndex=0),e.cloneElement(t,n)}return t});return(0,o.jsx)(fS,(0,i.A)({role:"menu",ref:y,className:u,onKeyDown:e=>{const t=g.current,n=e.key,o=uS(t).activeElement;if("ArrowDown"===n)e.preventDefault(),wS(t,o,d,c,yS);else if("ArrowUp"===n)e.preventDefault(),wS(t,o,d,c,bS);else if("Home"===n)e.preventDefault(),wS(t,null,d,c,yS);else if("End"===n)e.preventDefault(),wS(t,null,d,c,bS);else if(1===n.length){const r=v.current,i=n.toLowerCase(),a=performance.now();r.keys.length>0&&(a-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&i!==r.keys[0]&&(r.repeating=!1)),r.lastTime=a,r.keys.push(i);const s=o&&!r.repeating&&xS(o,r);r.previousKeyMatched&&(s||wS(t,o,!1,c,yS,r))?e.preventDefault():r.previousKeyMatched=!1}p&&p(e)},tabIndex:a?0:-1},m,{children:x}))});function CS(e){return e.substring(2).toLowerCase()}function AS(t){const{children:n,disableReactTree:r=!1,mouseEvent:i="onClick",onClickAway:a,touchEvent:s="onTouchEnd"}=t,l=e.useRef(!1),u=e.useRef(null),c=e.useRef(!1),d=e.useRef(!1);e.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const p=Be(Gf(n),u),h=Fw(e=>{const t=d.current;d.current=!1;const n=Cp(u.current);if(!c.current||!u.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,n))return;if(l.current)return void(l.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(u.current)>-1:!n.documentElement.contains(e.target)||u.current.contains(e.target),o||!r&&t||a(e)}),f=e=>t=>{d.current=!0;const o=n.props[e];o&&o(t)},m={ref:p};return!1!==s&&(m[s]=f(s)),e.useEffect(()=>{if(!1!==s){const e=CS(s),t=Cp(u.current),n=()=>{l.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,h),t.removeEventListener("touchmove",n)}}},[h,s]),!1!==i&&(m[i]=f(i)),e.useEffect(()=>{if(!1!==i){const e=CS(i),t=Cp(u.current);return t.addEventListener(e,h),()=>{t.removeEventListener(e,h)}}},[h,i]),(0,o.jsx)(e.Fragment,{children:e.cloneElement(n,m)})}var kS="unmounted",SS="exited",MS="entering",PS="entered",IS="exiting",RS=function(e){function n(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=SS,o.appearStatus=MS):r=PS:r=t.unmountOnExit||t.mountOnEnter?kS:SS,o.state={status:r},o.nextCallback=null,o}aC(n,e),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===kS?{status:SS}:null};var o=n.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==MS&&n!==PS&&(t=MS):n!==MS&&n!==PS||(t=IS)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===MS){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Nr().findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===SS&&this.setState({status:kS})},o.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[Nr().findDOMNode(this),o],i=r[0],a=r[1],s=this.getTimeouts(),l=o?s.appear:s.enter;e||n?(this.props.onEnter(i,a),this.safeSetState({status:MS},function(){t.props.onEntering(i,a),t.onTransitionEnd(l,function(){t.safeSetState({status:PS},function(){t.props.onEntered(i,a)})})})):this.safeSetState({status:PS},function(){t.props.onEntered(i)})},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:Nr().findDOMNode(this);t?(this.props.onExit(o),this.safeSetState({status:IS},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:SS},function(){e.props.onExited(o)})})})):this.safeSetState({status:SS},function(){e.props.onExited(o)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Nr().findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],a=r[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===kS)return null;var n=this.props,o=n.children,r=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,(0,f.A)(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return t().createElement(sC.Provider,{value:null},"function"==typeof o?o(e,r):t().cloneElement(t().Children.only(o),r))},n}(t().Component);function TS(){}RS.contextType=sC,RS.propTypes={},RS.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:TS,onEntering:TS,onEntered:TS,onExit:TS,onExiting:TS,onExited:TS},RS.UNMOUNTED=kS,RS.EXITED=SS,RS.ENTERING=MS,RS.ENTERED=PS,RS.EXITING=IS;const ES=RS,OS=e=>e.scrollTop;function LS(e,t){var n,o;const{timeout:r,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof r?r:r[t.mode]||0,easing:null!=(o=a.transitionTimingFunction)?o:"object"==typeof i?i[t.mode]:i,delay:a.transitionDelay}}const zS=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function jS(e){return`scale(${e}, ${e**2})`}const $S={entering:{opacity:1,transform:jS(1)},entered:{opacity:1,transform:"none"}},FS="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),NS=e.forwardRef(function(t,n){const{addEndListener:r,appear:a=!0,children:s,easing:l,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:h,onExited:m,onExiting:g,style:v,timeout:y="auto",TransitionComponent:b=ES}=t,x=(0,f.A)(t,zS),w=X_(),_=e.useRef(),C=ss(),A=e.useRef(null),k=qw(A,Gf(s),n),S=e=>t=>{if(e){const n=A.current;void 0===t?e(n):e(n,t)}},M=S(p),P=S((e,t)=>{OS(e);const{duration:n,delay:o,easing:r}=LS({style:v,timeout:y,easing:l},{mode:"enter"});let i;"auto"===y?(i=C.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=n,e.style.transition=[C.transitions.create("opacity",{duration:i,delay:o}),C.transitions.create("transform",{duration:FS?i:.666*i,delay:o,easing:r})].join(","),c&&c(e,t)}),I=S(d),R=S(g),T=S(e=>{const{duration:t,delay:n,easing:o}=LS({style:v,timeout:y,easing:l},{mode:"exit"});let r;"auto"===y?(r=C.transitions.getAutoHeightDuration(e.clientHeight),_.current=r):r=t,e.style.transition=[C.transitions.create("opacity",{duration:r,delay:n}),C.transitions.create("transform",{duration:FS?r:.666*r,delay:FS?n:n||.333*r,easing:o})].join(","),e.style.opacity=0,e.style.transform=jS(.75),h&&h(e)}),E=S(m);return(0,o.jsx)(b,(0,i.A)({appear:a,in:u,nodeRef:A,onEnter:P,onEntered:I,onEntering:M,onExit:T,onExited:E,onExiting:R,addEndListener:e=>{"auto"===y&&w.start(_.current||0,e),r&&r(A.current,e)},timeout:"auto"===y?null:y},x,{children:(t,n)=>e.cloneElement(s,(0,i.A)({style:(0,i.A)({opacity:0,transform:jS(.75),visibility:"exited"!==t||u?void 0:"hidden"},$S[t],v,s.props.style),ref:k},n))}))});NS.muiSupportAuto=!0;const DS=NS,HS=["open","target","onClose","children","position","className","onExited"],BS=dt(am,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${Vy.menuList}`]:{outline:0}})),VS={"bottom-start":"top left","bottom-end":"top right"};function WS(t){var n;const{open:r,target:a,onClose:s,children:l,position:u,className:c,onExited:d}=t,p=(0,f.A)(t,HS),h=gw(),m=lb(),g=(e=>{const{classes:t}=e;return De({root:["menu"]},By,t)})(m),v=e.useRef(null);_p(()=>{var e,t;r?v.current=document.activeElement instanceof HTMLElement?document.activeElement:null:(null==(e=v.current)||null==(t=e.focus)||t.call(e),v.current=null)},[r]),e.useEffect(()=>{const e=r?"menuOpen":"menuClose";h.current.publishEvent(e,{target:a})},[h,r,a]);const y=e=>{e.target&&(a===e.target||null!=a&&a.contains(e.target))||s(e)};return(0,o.jsx)(BS,(0,i.A)({as:m.slots.basePopper,className:Ge(c,g.root),ownerState:m,open:r,anchorEl:a,transition:!0,placement:u},p,null==(n=m.slotProps)?void 0:n.basePopper,{children:({TransitionProps:e,placement:t})=>{return(0,o.jsx)(AS,{onClickAway:y,mouseEvent:"onMouseDown",children:(0,o.jsx)(DS,(0,i.A)({},e,{style:{transformOrigin:VS[t]},onExited:(n=null==e?void 0:e.onExited,e=>{n&&n(),d&&d(e)}),children:(0,o.jsx)(U_,{children:l})}))});var n}}))}const US=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"];function GS(t){var n;const{colDef:r,id:a,hasFocus:s,tabIndex:l,position:u="bottom-end",focusElementRef:c}=t,d=(0,f.A)(t,US),[p,h]=e.useState(-1),[m,g]=e.useState(!1),v=gw(),y=e.useRef(null),b=e.useRef(null),x=e.useRef(!1),w=e.useRef({}),_=ss(),C=Bi(),A=Bi(),k=lb();if(!(e=>"function"==typeof e.getActions)(r))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const S=r.getActions(v.current.getRowParams(a)),M=S.filter(e=>!e.props.showInMenu),P=S.filter(e=>e.props.showInMenu),I=M.length+(P.length?1:0);e.useLayoutEffect(()=>{s||Object.entries(w.current).forEach(([e,t])=>{null==t||t.stop({},()=>{delete w.current[e]})})},[s]),e.useEffect(()=>{p<0||!y.current||p>=y.current.children.length||y.current.children[p].focus({preventScroll:!0})},[p]),e.useEffect(()=>{s||(h(-1),x.current=!1)},[s]),e.useImperativeHandle(c,()=>({focus(){if(!x.current){const e=S.findIndex(e=>!e.props.disabled);h(e)}}}),[S]),e.useEffect(()=>{p>=I&&h(I-1)},[p,I]);const R=()=>{g(!1)},T=e=>t=>{w.current[e]=t},E=(e,t)=>n=>{h(e),x.current=!0,t&&t(n)};return(0,o.jsxs)("div",(0,i.A)({role:"menu",ref:y,tabIndex:-1,className:Vy.actionsCell,onKeyDown:e=>{if(I<=1)return;const t=(e,n)=>{var o;if(e<0||e>S.length)return e;const r=("left"===n?-1:1)*("rtl"===_.direction?-1:1);return null!=(o=S[e+r])&&o.props.disabled?t(e+r,n):e+r};let n=p;"ArrowRight"===e.key?n=t(p,"right"):"ArrowLeft"===e.key&&(n=t(p,"left")),n<0||n>=I||n!==p&&(e.preventDefault(),e.stopPropagation(),h(n))}},d,{children:[M.map((t,n)=>e.cloneElement(t,{key:n,touchRippleRef:T(n),onClick:E(n,t.props.onClick),tabIndex:p===n?l:-1})),P.length>0&&A&&(0,o.jsx)(k.slots.baseIconButton,(0,i.A)({ref:b,id:A,"aria-label":v.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?C:void 0,role:"menuitem",size:"small",onClick:()=>{g(!0),h(I-1),x.current=!0},touchRippleRef:T(A),tabIndex:p===M.length?l:-1},null==(n=k.slotProps)?void 0:n.baseIconButton,{children:(0,o.jsx)(k.slots.moreActionsIcon,{fontSize:"small"})})),P.length>0&&(0,o.jsx)(WS,{open:m,target:b.current,position:u,onClose:R,children:(0,o.jsx)(_S,{id:C,className:Vy.menuList,onKeyDown:e=>{"Tab"===e.key&&e.preventDefault(),["Tab","Escape"].includes(e.key)&&R()},"aria-labelledby":A,variant:"menu",autoFocusItem:!0,children:P.map((t,n)=>e.cloneElement(t,{key:n,closeMenu:R}))})})]}))}const ZS="actions",KS=(0,i.A)({},ek,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:e=>(0,o.jsx)(GS,(0,i.A)({},e)),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),qS="__default__",XS=["maxWidth","minWidth","width","flex"],YS=(e,t)=>{const n={};let o=0,r=0;const a=[];e.orderedFields.forEach(t=>{const s=(0,i.A)({},e.lookup[t]);if(!1===e.columnVisibilityModel[t])s.computedWidth=0;else{let e;s.flex&&s.flex>0?(o+=s.flex,e=0,a.push(s)):e=Fx(s.width||ek.width,s.minWidth||ek.minWidth,s.maxWidth||ek.maxWidth),r+=e,s.computedWidth=e}n[t]=s});const s=Math.max(t-r,0);if(o>0&&t>0){const e=function({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const o=new Set(n.map(e=>e.field)),r={all:{},frozenFields:[],freeze:e=>{const t=r.all[e];t&&!0!==t.frozen&&(r.all[e].frozen=!0,r.frozenFields.push(e))}};return function i(){if(r.frozenFields.length===o.size)return;const a={min:{},max:{}};let s=e,l=t,u=0;r.frozenFields.forEach(e=>{s-=r.all[e].computedWidth,l-=r.all[e].flex});for(let e=0;e<n.length;e+=1){const t=n[e];if(r.all[t.field]&&!0===r.all[t.field].frozen)continue;let o=s/l*t.flex;o<t.minWidth?(u+=t.minWidth-o,o=t.minWidth,a.min[t.field]=!0):o>t.maxWidth&&(u+=t.maxWidth-o,o=t.maxWidth,a.max[t.field]=!0),r.all[t.field]={frozen:!1,computedWidth:o,flex:t.flex}}u<0?Object.keys(a.max).forEach(e=>{r.freeze(e)}):u>0?Object.keys(a.min).forEach(e=>{r.freeze(e)}):n.forEach(({field:e})=>{r.freeze(e)}),i()}(),r.all}({initialFreeSpace:s,totalFlexUnits:o,flexColumns:a});Object.keys(e).forEach(t=>{n[t].computedWidth=e[t].computedWidth})}return(0,i.A)({},e,{lookup:n})};function QS(e,t){let n=e[qS];return t&&e[t]&&(n=e[t]),n}const JS=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:o,columnVisibilityModel:r=Sb(e),keepOnlyColumnsToUpsert:a=!1})=>{var s,l,u;const c=!e.current.state.columns;let d;if(c)d={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const t=_b(e.current.state);d={orderedFields:a?[]:[...t.orderedFields],lookup:(0,i.A)({},t.lookup),columnVisibilityModel:r}}let p={};a&&!c&&(p=Object.keys(d.lookup).reduce((e,t)=>(0,i.A)({},e,{[t]:!1}),{}));const h={};t.forEach(e=>{const{field:t}=e;h[t]=!0,p[t]=!0;let n=d.lookup[t];null==n?(n=(0,i.A)({},QS(o,e.type),{field:t,hasBeenResized:!1}),d.orderedFields.push(t)):a&&d.orderedFields.push(t),n&&n.type!==e.type&&(n=(0,i.A)({},QS(o,e.type),{field:t}));let r=n.hasBeenResized;XS.forEach(t=>{void 0!==e[t]&&(r=!0,-1===e[t]&&(e[t]=1/0))}),d.lookup[t]=(0,i.A)({},n,e,{hasBeenResized:r})}),a&&!c&&Object.keys(d.lookup).forEach(e=>{p[e]||delete d.lookup[e]});const f=((e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:o={}}=t,r=Object.keys(o);if(0===r.length&&0===n.length)return e;const a={},s=[];for(let t=0;t<n.length;t+=1){const o=n[t];e.lookup[o]&&(a[o]=!0,s.push(o))}const l=0===s.length?e.orderedFields:[...s,...e.orderedFields.filter(e=>!a[e])],u=(0,i.A)({},e.lookup);for(let e=0;e<r.length;e+=1){const t=r[e],n=(0,i.A)({},u[t],{hasBeenResized:!0});Object.entries(o[t]).forEach(([e,t])=>{n[e]=-1===t?1/0:t}),u[t]=n}return(0,i.A)({},e,{orderedFields:l,lookup:u})})(e.current.unstable_applyPipeProcessors("hydrateColumns",d),n);return YS(f,null!=(s=null==(l=(u=e.current).getRootDimensions)||null==(l=l.call(u))?void 0:l.viewportInnerSize.width)?s:0)},eM=e=>t=>(0,i.A)({},t,{columns:e});function tM({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:o,visibleRows:r}){let i=e;for(let a=n;a<o;a+=1)if(r[a]){const n=r[a].id,o=t.current.unstable_getCellColSpanInfo(n,e);o&&o.spannedByColSpan&&(i=o.leftVisibleCellIndex)}return i}function nM({firstColumnIndex:e,minColumnIndex:t,columnBuffer:n,firstRowToRender:o,lastRowToRender:r,apiRef:i,visibleRows:a}){return tM({firstColumnToRender:Math.max(e-n,t),apiRef:i,firstRowToRender:o,lastRowToRender:r,visibleRows:a})}function oM(e,t){const n=wb(e),o=$b(e);return Math.floor(t*n)*((null!=o?o:0)+1)}var rM=function(e){return e.filters="filters",e.columns="columns",e}(rM||{});const iM={string:ek,number:Tk,date:Vk,dateTime:Wk,boolean:yk,singleSelect:lS,[ZS]:KS,[qS]:ek},aM=(e,t,n)=>{var o,r,a,s;const l=JS({apiRef:n,columnTypes:iM,columnsToUpsert:t.columns,initialState:null==(o=t.initialState)?void 0:o.columns,columnVisibilityModel:null!=(r=null!=(a=t.columnVisibilityModel)?a:null==(s=t.initialState)||null==(s=s.columns)?void 0:s.columnVisibilityModel)?r:{},keepOnlyColumnsToUpsert:!0});return(0,i.A)({},e,{columns:l})},sM={compact:.7,comfortable:1.3,standard:1},lM=(e,t)=>(0,i.A)({},e,{density:{value:t.density,factor:sM[t.density]}}),uM=({apiRef:e,options:t})=>{const n=kb(e);return t.fields?t.fields.reduce((e,t)=>{const o=n.find(e=>e.field===t);return o&&e.push(o),e},[]):(t.allColumns?n:Mb(e)).filter(e=>!e.disableExport)},cM=({apiRef:e})=>{var t,n;const o=gx(e),r=Wb(e),i=e.current.getSelectedRows(),a=o.filter(e=>"footer"!==r[e].type),s=qb(e),l=(null==s||null==(t=s.top)?void 0:t.map(e=>e.id))||[],u=(null==s||null==(n=s.bottom)?void 0:n.map(e=>e.id))||[];return a.unshift(...l),a.push(...u),i.size>0?a.filter(e=>i.has(e)):a};function dM(e){return et("MuiDivider",e)}const pM=tt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);function hM(e){return et("MuiListItemIcon",e)}const fM=tt("MuiListItemIcon",["root","alignItemsFlexStart"]);function mM(e){return et("MuiListItemText",e)}const gM=tt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function vM(e){return et("MuiMenuItem",e)}const yM=tt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),bM=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],xM=dt(OC,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>(0,i.A)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${yM.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${yM.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${yM.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${yM.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${yM.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${pM.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${pM.inset}`]:{marginLeft:52},[`& .${gM.root}`]:{marginTop:0,marginBottom:0},[`& .${gM.inset}`]:{paddingLeft:36},[`& .${fM.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,i.A)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${fM.root} svg`]:{fontSize:"1.25rem"}}))),wM=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiMenuItem"}),{autoFocus:a=!1,component:s="li",dense:l=!1,divider:u=!1,disableGutters:c=!1,focusVisibleClassName:d,role:p="menuitem",tabIndex:h,className:m}=r,g=(0,f.A)(r,bM),v=e.useContext(cS),y=e.useMemo(()=>({dense:l||v.dense||!1,disableGutters:c}),[v.dense,l,c]),b=e.useRef(null);Xw(()=>{a&&b.current&&b.current.focus()},[a]);const x=(0,i.A)({},r,{dense:y.dense,divider:u,disableGutters:c}),w=(e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:a,classes:s}=e,l=De({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",a&&"selected"]},vM,s);return(0,i.A)({},s,l)})(r),_=qw(b,n);let C;return r.disabled||(C=void 0!==h?h:-1),(0,o.jsx)(cS.Provider,{value:y,children:(0,o.jsx)(xM,(0,i.A)({ref:_,role:p,tabIndex:C,component:s,focusVisibleClassName:Ge(w.focusVisible,d),className:Ge(w.root,m)},g,{ownerState:x,classes:w}))})}),_M=["hideMenu","options"],CM=["hideMenu","options"];function AM(e){const t=gw(),{hideMenu:n,options:r}=e,a=(0,f.A)(e,_M);return(0,o.jsx)(wM,(0,i.A)({onClick:()=>{t.current.exportDataAsCsv(r),null==n||n()}},a,{children:t.current.getLocaleText("toolbarExportCSV")}))}function kM(e){const t=gw(),{hideMenu:n,options:r}=e,a=(0,f.A)(e,CM);return(0,o.jsx)(wM,(0,i.A)({onClick:()=>{t.current.exportDataAsPrint(r),null==n||n()}},a,{children:t.current.getLocaleText("toolbarExportPrint")}))}const SM=(t,n)=>{const r=cw(t,"useGridCsvExport"),i=n.unstable_ignoreValueFormatterDuringExport,a=("object"==typeof i?null==i?void 0:i.csvExport:i)||!1,s=e.useCallback((e={})=>{var n,o,i,s,l;return r.debug("Get data as CSV"),function(e){const{columns:t,rowIds:n,csvOptions:o,ignoreValueFormatter:r,apiRef:i}=e,a=n.reduce((e,n)=>`${e}${(({id:e,columns:t,getCellParams:n,csvOptions:o,ignoreValueFormatter:r})=>{const i=new Ck({csvOptions:o});return t.forEach(t=>{const a=n(e,t.field);i.addValue(_k(a,{ignoreValueFormatter:r,csvOptions:o}))}),i.getRowString()})({id:n,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:r,csvOptions:o})}\r\n`,"").trim();if(!o.includeHeaders)return a;const s=t.filter(e=>e.field!==xk.field),l=[];if(o.includeColumnGroupsHeaders){const e=i.current.unstable_getAllGroupDetails();let t=0;const n=s.reduce((e,n)=>{const o=i.current.unstable_getColumnGroupPath(n.field);return e[n.field]=o,t=Math.max(t,o.length),e},{});for(let r=0;r<t;r+=1){const t=new Ck({csvOptions:o,sanitizeCellValue:wk});l.push(t),s.forEach(o=>{const i=(n[o.field]||[])[r],a=e[i];t.addValue(a?a.headerName||a.groupId:"")})}}const u=new Ck({csvOptions:o,sanitizeCellValue:wk});return s.forEach(e=>{u.addValue(e.headerName||e.field)}),l.push(u),`${l.map(e=>e.getRowString()).join("\r\n")}\r\n${a}`.trim()}({columns:uM({apiRef:t,options:e}),rowIds:(null!=(n=e.getRowsToExport)?n:cM)({apiRef:t}),csvOptions:{delimiter:e.delimiter||",",shouldAppendQuotes:null==(o=e.shouldAppendQuotes)||o,includeHeaders:null==(i=e.includeHeaders)||i,includeColumnGroupsHeaders:null==(s=e.includeColumnGroupsHeaders)||s,escapeFormulas:null==(l=e.escapeFormulas)||l},ignoreValueFormatter:a,apiRef:t})},[r,t,a]),l=e.useCallback(e=>{r.debug("Export data as CSV");const t=s(e);!function(e,t="csv",n=document.title||"untitled"){const o=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const t=URL.createObjectURL(e),n=document.createElement("a");return n.href=t,n.download=o,n.click(),void setTimeout(()=>{URL.revokeObjectURL(t)})}throw new Error("MUI: exportAs not supported")}(new Blob([null!=e&&e.utf8WithBom?new Uint8Array([239,187,191]):"",t],{type:"text/csv"}),"csv",null==e?void 0:e.fileName)},[r,s]);Hx(t,{getDataAsCsv:s,exportDataAsCsv:l},"public");const u=e.useCallback((e,t)=>{var n;return null!=(n=t.csvOptions)&&n.disableToolbarButton?e:[...e,{component:(0,o.jsx)(AM,{options:t.csvOptions}),componentName:"csvExport"}]},[]);Mk(t,"exportMenu",u)},MM=e=>e.rowsMeta,PM=(e,t,n)=>{var o;let r=e.paginationModel;const a=e.rowCount,s=null!=(o=null==n?void 0:n.pageSize)?o:r.pageSize,l=Aw(a,s);!n||(null==n?void 0:n.page)===r.page&&(null==n?void 0:n.pageSize)===r.pageSize||(r=n);const u=((e,t=0)=>0===t?e:Math.max(Math.min(e,t-1),0))(r.page,l);return u!==r.page&&(r=(0,i.A)({},r,{page:u})),Sw(r.pageSize,t),r},IM=(t,n,o,r)=>{const i=e.useCallback(()=>{t.current.registerStrategyProcessor(n,o,r)},[t,r,o,n]);Sk(()=>{i()});const a=e.useRef(!0);e.useEffect(()=>{a.current?a.current=!1:i()},[i])},RM=(e,t,n)=>{var o,r,a;const s=null!=(o=null!=(r=t.filterModel)?r:null==(a=t.initialState)||null==(a=a.filter)?void 0:a.filterModel)?o:FA();return(0,i.A)({},e,{filter:{filterModel:UA(s,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},TM=e=>e.filteredRowsLookup;function EM(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function OM(){return db(Object.values)}const LM=(e,t)=>{let n,o;return t.pagination&&"client"===t.paginationMode?(o=Ow(e),n=Lw(e)):(n=hx(e),o=0===n.length?null:{firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:o}},zM=(t,n)=>{const o=LM(t,n);return e.useMemo(()=>({rows:o.rows,range:o.range}),[o.rows,o.range])},jM=e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),$M="__detail_panel_toggle__",FM=e=>e.headerFiltering,NM=vb(FM,e=>e.editing),DM=vb(FM,e=>e.menuOpen);function HM(e){return e.replace(/["\\]/g,"\\$&")}function BM(e){return`.${Vy.row}[data-id="${HM(String(e))}"]`}function VM(e){return 1===e.target.nodeType&&!e.currentTarget.contains(e.target)}const WM=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e<n)return e+1}else if("ltr"===o&&e>t)return e-1;return null},UM=({currentColIndex:e,firstColIndex:t,lastColIndex:n,direction:o})=>{if("rtl"===o){if(e>t)return e-1}else if("ltr"===o&&e<n)return e+1;return null},GM=(e,t)=>{var n,o,r,a,s;const l=(0,i.A)({},kw(t.autoPageSize),null!=(n=t.paginationModel)?n:null==(o=t.initialState)||null==(o=o.pagination)?void 0:o.paginationModel);Sw(l.pageSize,t.signature);const u=null!=(r=null!=(a=t.rowCount)?a:null==(s=t.initialState)||null==(s=s.pagination)?void 0:s.rowCount)?r:0;return(0,i.A)({},e,{pagination:{paginationModel:l,rowCount:u}})},ZM=e=>e.preferencePanel,KM=(e,t)=>{var n,o;return(0,i.A)({},e,{preferencePanel:null!=(n=null==(o=t.initialState)?void 0:o.preferencePanel)?n:{open:!1}})},qM=e=>e.editRows,XM=["id","field"],YM=["id","field"],QM=Yy(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error");var JM=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(JM||{}),eP=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(eP||{});const tP=["id"],nP=["id"],oP=Yy(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),rP=e=>(0,i.A)({},e,{editRows:{}}),iP=(e,t,n)=>(n.current.caches.rows=rk({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),(0,i.A)({},e,{rows:ak({apiRef:n,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),aP=e=>"full"===e.updates.type?(e=>{const t={[tk]:(0,i.A)({},{type:"group",id:tk,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null},{children:e})};for(let n=0;n<e.length;n+=1){const o=e[n];t[o]={id:o,depth:0,parent:tk,type:"leaf",groupingKey:null}}return{groupingName:aw,tree:t,treeDepths:{0:e.length},dataRowIds:e}})(e.updates.rows):(({previousTree:e,actions:t})=>{const n=(0,i.A)({},e),o={};for(let e=0;e<t.remove.length;e+=1){const r=t.remove[e];o[r]=!0,delete n[r]}for(let e=0;e<t.insert.length;e+=1){const o=t.insert[e];n[o]={id:o,depth:0,parent:tk,type:"leaf",groupingKey:null}}const r=n[tk];let a=[...r.children,...t.insert];return Object.values(o).length&&(a=a.filter(e=>!o[e])),n[tk]=(0,i.A)({},r,{children:a}),{groupingName:aw,tree:n,treeDepths:{0:a.length},dataRowIds:a}})({previousTree:e.previousTree,actions:e.updates.actions});class sP extends Error{}const lP=(e,t)=>null==e||Array.isArray(e)?e:t&&t[0]===e?t:[e],uP=(e,t)=>{var n;return(0,i.A)({},e,{rowSelection:t.rowSelection&&null!=(n=lP(t.rowSelectionModel))?n:[]})},cP=(e,t)=>{var n,o,r;const a=null!=(n=null!=(o=t.sortModel)?o:null==(r=t.initialState)||null==(r=r.sorting)?void 0:r.sortModel)?n:[];return(0,i.A)({},e,{sorting:{sortModel:v_(a,t.disableMultipleColumnsSorting),sortedRows:[]}})};function dP(e){const{clientHeight:t,scrollTop:n,offsetHeight:o,offsetTop:r}=e,i=r+o;return o>t?r:i-t>n?i-t:r<n?r:void 0}const pP={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>1!==e?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>1!==e?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function hP(e){return et("MuiSkeleton",e)}tt("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const fP=["animation","className","component","height","style","variant","width"];let mP,gP,vP,yP,bP=e=>e;const xP=(0,c.keyframes)(mP||(mP=bP`
|
|
76
|
-
0% {
|
|
77
|
-
opacity: 1;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
50% {
|
|
81
|
-
opacity: 0.4;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
100% {
|
|
85
|
-
opacity: 1;
|
|
86
|
-
}
|
|
87
|
-
`)),wP=(0,c.keyframes)(gP||(gP=bP`
|
|
88
|
-
0% {
|
|
89
|
-
transform: translateX(-100%);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
50% {
|
|
93
|
-
/* +0.5s of delay between each loop */
|
|
94
|
-
transform: translateX(100%);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
100% {
|
|
98
|
-
transform: translateX(100%);
|
|
99
|
-
}
|
|
100
|
-
`)),_P=dt("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const n=(a=e.shape.borderRadius,String(a).match(/[\d.\-+]*\s*(.*)/)[1]||""||"px"),o=(r=e.shape.borderRadius,parseFloat(r));var r,a;return(0,i.A)({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:Hy(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${o}${n}/${Math.round(o/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>"pulse"===e.animation&&(0,c.css)(vP||(vP=bP`
|
|
101
|
-
animation: ${0} 2s ease-in-out 0.5s infinite;
|
|
102
|
-
`),xP),({ownerState:e,theme:t})=>"wave"===e.animation&&(0,c.css)(yP||(yP=bP`
|
|
103
|
-
position: relative;
|
|
104
|
-
overflow: hidden;
|
|
105
|
-
|
|
106
|
-
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
|
|
107
|
-
-webkit-mask-image: -webkit-radial-gradient(white, black);
|
|
108
|
-
|
|
109
|
-
&::after {
|
|
110
|
-
animation: ${0} 2s linear 0.5s infinite;
|
|
111
|
-
background: linear-gradient(
|
|
112
|
-
90deg,
|
|
113
|
-
transparent,
|
|
114
|
-
${0},
|
|
115
|
-
transparent
|
|
116
|
-
);
|
|
117
|
-
content: '';
|
|
118
|
-
position: absolute;
|
|
119
|
-
transform: translateX(-100%); /* Avoid flash during server-side hydration */
|
|
120
|
-
bottom: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
right: 0;
|
|
123
|
-
top: 0;
|
|
124
|
-
}
|
|
125
|
-
`),wP,(t.vars||t).palette.action.hover)),CP=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d}=n,p=(0,f.A)(n,fP),h=(0,i.A)({},n,{animation:r,component:s,variant:c,hasChildren:Boolean(p.children)}),m=(e=>{const{classes:t,variant:n,animation:o,hasChildren:r,width:i,height:a}=e;return De({root:["root",n,o,r&&"withChildren",r&&!i&&"fitContent",r&&!a&&"heightAuto"]},hP,t)})(h);return(0,o.jsx)(_P,(0,i.A)({as:s,ref:t,className:Ge(m.root,a),ownerState:h},p,{style:(0,i.A)({width:d,height:l},u)}))}),AP=CP,kP=["field","align","width","contentWidth"];function SP(e){return et("MuiBadge",e)}const MP=tt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),PP=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],IP=dt("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),RP=dt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Em(n.anchorOrigin.vertical)}${Em(n.anchorOrigin.horizontal)}${Em(n.overlap)}`],"default"!==n.color&&t[`color${Em(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var n,o;return(null!=(n=e.vars)?n:e).palette[t].main&&(null!=(o=e.vars)?o:e).palette[t].contrastText}).map(t=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:4,height:8,minWidth:8,padding:0}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"rectangular"===e.overlap,style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"right"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:e})=>"top"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:e})=>"bottom"===e.anchorOrigin.vertical&&"left"===e.anchorOrigin.horizontal&&"circular"===e.overlap,style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${MP.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),TP=e.forwardRef(function(e,t){var n,r,a,s,l,u;const c=om({props:e,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:p,component:h,components:m={},componentsProps:g={},children:v,overlap:y="rectangular",color:b="default",invisible:x=!1,max:w=99,badgeContent:_,slots:C,slotProps:A,showZero:k=!1,variant:S="standard"}=c,M=(0,f.A)(c,PP),{badgeContent:P,invisible:I,max:R,displayValue:T}=function(e){const{badgeContent:t,invisible:n=!1,max:o=99,showZero:r=!1}=e,i=P_({badgeContent:t,max:o});let a=n;!1!==n||0!==t||r||(a=!0);const{badgeContent:s,max:l=o}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}({max:w,invisible:x,badgeContent:_,showZero:k}),E=P_({anchorOrigin:d,color:b,overlap:y,variant:S,badgeContent:_}),O=I||null==P&&"dot"!==S,{color:L=b,overlap:z=y,anchorOrigin:j=d,variant:$=S}=O?E:c,F="dot"!==$?T:void 0,N=(0,i.A)({},c,{badgeContent:P,invisible:O,max:R,displayValue:F,showZero:k,anchorOrigin:j,color:L,overlap:z,variant:$}),D=(e=>{const{color:t,anchorOrigin:n,invisible:o,overlap:r,variant:i,classes:a={}}=e;return De({root:["root"],badge:["badge",i,o&&"invisible",`anchorOrigin${Em(n.vertical)}${Em(n.horizontal)}`,`anchorOrigin${Em(n.vertical)}${Em(n.horizontal)}${Em(r)}`,`overlap${Em(r)}`,"default"!==t&&`color${Em(t)}`]},SP,a)})(N),H=null!=(n=null!=(r=null==C?void 0:C.root)?r:m.Root)?n:IP,B=null!=(a=null!=(s=null==C?void 0:C.badge)?s:m.Badge)?a:RP,V=null!=(l=null==A?void 0:A.root)?l:g.root,W=null!=(u=null==A?void 0:A.badge)?u:g.badge,U=Xe({elementType:H,externalSlotProps:V,externalForwardedProps:M,additionalProps:{ref:t,as:h},ownerState:N,className:Ge(null==V?void 0:V.className,D.root,p)}),G=Xe({elementType:B,externalSlotProps:W,ownerState:N,className:Ge(D.badge,null==W?void 0:W.className)});return(0,o.jsxs)(H,(0,i.A)({},U,{children:[v,(0,o.jsx)(B,(0,i.A)({},G,{children:F}))]}))}),EP=TP,OP=["className"],LP=nx("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),zP=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,OP),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["iconButtonContainer"]},By,t)})(a);return(0,o.jsx)(LP,(0,i.A)({ref:t,className:Ge(s.root,n),ownerState:a},r))}),jP=["className","selectedRowCount"],$P=nx("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),FP=e.forwardRef(function(e,t){const{className:n,selectedRowCount:r}=e,a=(0,f.A)(e,jP),s=gw(),l=lb(),u=(e=>{const{classes:t}=e;return De({root:["selectedRowCount"]},By,t)})(l),c=s.current.getLocaleText("footerRowSelected")(r);return(0,o.jsx)($P,(0,i.A)({ref:t,className:Ge(u.root,n),ownerState:l},a,{children:c}))}),NP=["className"],DP=nx("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),HP=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,NP),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["footerContainer","withBorderColor"]},By,t)})(a);return(0,o.jsx)(DP,(0,i.A)({ref:t,className:Ge(s.root,n),ownerState:a},r))}),BP=e.forwardRef(function(e,t){var n,r;const a=gw(),s=lb(),l=rb(a,Hb),u=rb(a,ww),c=rb(a,bx),d=!s.hideFooterSelectedRowCount&&u>0?(0,o.jsx)(FP,{selectedRowCount:u}):(0,o.jsx)("div",{}),p=s.hideFooterRowCount||s.pagination?null:(0,o.jsx)(s.slots.footerRowCount,(0,i.A)({},null==(n=s.slotProps)?void 0:n.footerRowCount,{rowCount:l,visibleRowCount:c})),h=s.pagination&&!s.hideFooterPagination&&s.slots.pagination&&(0,o.jsx)(s.slots.pagination,(0,i.A)({},null==(r=s.slotProps)?void 0:r.pagination));return(0,o.jsxs)(HP,(0,i.A)({ref:t},e,{children:[d,p,h]}))}),VP=["className","rowCount","visibleRowCount"],WP=nx("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),UP=e.forwardRef(function(e,t){const{className:n,rowCount:r,visibleRowCount:a}=e,s=(0,f.A)(e,VP),l=gw(),u=lb(),c=(e=>{const{classes:t}=e;return De({root:["rowCount"]},By,t)})(u);if(0===r)return null;const d=a<r?l.current.getLocaleText("footerTotalVisibleRows")(a,r):r.toLocaleString();return(0,o.jsxs)(WP,(0,i.A)({ref:t,className:Ge(c.root,n),ownerState:u},s,{children:[l.current.getLocaleText("footerTotalRows")," ",d]}))}),GP=e.forwardRef(function(e,t){var n,r,a;const s=gw(),l=rb(s,kb),u=lb(),c=rb(s,ZM),d=s.current.unstable_applyPipeProcessors("preferencePanel",null,null!=(n=c.openedPanelValue)?n:rM.filters);return(0,o.jsx)(u.slots.panel,(0,i.A)({ref:t,as:u.slots.basePopper,open:l.length>0&&c.open,id:c.panelId,"aria-labelledby":c.labelId},null==(r=u.slotProps)?void 0:r.panel,e,null==(a=u.slotProps)?void 0:a.basePopper,{children:d}))});function ZP(e){return et("MuiCircularProgress",e)}tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const KP=["className","color","disableShrink","size","style","thickness","value","variant"];let qP,XP,YP,QP,JP=e=>e;const eI=(0,c.keyframes)(qP||(qP=JP`
|
|
126
|
-
0% {
|
|
127
|
-
transform: rotate(0deg);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
100% {
|
|
131
|
-
transform: rotate(360deg);
|
|
132
|
-
}
|
|
133
|
-
`)),tI=(0,c.keyframes)(XP||(XP=JP`
|
|
134
|
-
0% {
|
|
135
|
-
stroke-dasharray: 1px, 200px;
|
|
136
|
-
stroke-dashoffset: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
50% {
|
|
140
|
-
stroke-dasharray: 100px, 200px;
|
|
141
|
-
stroke-dashoffset: -15px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
100% {
|
|
145
|
-
stroke-dasharray: 100px, 200px;
|
|
146
|
-
stroke-dashoffset: -125px;
|
|
147
|
-
}
|
|
148
|
-
`)),nI=dt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Em(n.color)}`]]}})(({ownerState:e,theme:t})=>(0,i.A)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,c.css)(YP||(YP=JP`
|
|
149
|
-
animation: ${0} 1.4s linear infinite;
|
|
150
|
-
`),eI)),oI=dt("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),rI=dt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Em(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,i.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,c.css)(QP||(QP=JP`
|
|
151
|
-
animation: ${0} 1.4s ease-in-out infinite;
|
|
152
|
-
`),tI)),iI=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiCircularProgress"}),{className:r,color:a="primary",disableShrink:s=!1,size:l=40,style:u,thickness:c=3.6,value:d=0,variant:p="indeterminate"}=n,h=(0,f.A)(n,KP),m=(0,i.A)({},n,{color:a,disableShrink:s,size:l,thickness:c,value:d,variant:p}),g=(e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e;return De({root:["root",n,`color${Em(o)}`],svg:["svg"],circle:["circle",`circle${Em(n)}`,r&&"circleDisableShrink"]},ZP,t)})(m),v={},y={},b={};if("determinate"===p){const e=2*Math.PI*((44-c)/2);v.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*e).toFixed(3)}px`,y.transform="rotate(-90deg)"}return(0,o.jsx)(nI,(0,i.A)({className:Ge(g.root,r),style:(0,i.A)({width:l,height:l},y,u),ownerState:m,ref:t,role:"progressbar"},b,h,{children:(0,o.jsx)(oI,{className:g.svg,ownerState:m,viewBox:"22 22 44 44",children:(0,o.jsx)(rI,{className:g.circle,style:v,ownerState:m,cx:44,cy:44,r:(44-c)/2,fill:"none",strokeWidth:c})})}))}),aI=iI,sI=["className"],lI=nx("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),uI=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,sI),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["overlay"]},By,t)})(a);return(0,o.jsx)(lI,(0,i.A)({ref:t,className:Ge(s.root,n),ownerState:a},r))}),cI=e.forwardRef(function(e,t){return(0,o.jsx)(uI,(0,i.A)({ref:t},e,{children:(0,o.jsx)(aI,{})}))}),dI=e.forwardRef(function(e,t){const n=gw().current.getLocaleText("noRowsLabel");return(0,o.jsx)(uI,(0,i.A)({ref:t},e,{children:n}))}),pI=Nw,hI=Ap,fI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function mI(e){const t=[],n=[];return Array.from(e.querySelectorAll(fI)).forEach((e,o)=>{const r=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===r?t.push(e):n.push({documentOrder:o,tabIndex:r,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function gI(){return!0}const vI=function(t){const{children:n,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:a=!1,getTabbable:s=mI,isEnabled:l=gI,open:u}=t,c=e.useRef(!1),d=e.useRef(null),p=e.useRef(null),h=e.useRef(null),f=e.useRef(null),m=e.useRef(!1),g=e.useRef(null),v=Be(Gf(n),g),y=e.useRef(null);e.useEffect(()=>{u&&g.current&&(m.current=!r)},[r,u]),e.useEffect(()=>{if(!u||!g.current)return;const e=Cp(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),m.current&&g.current.focus()),()=>{a||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[u]),e.useEffect(()=>{if(!u||!g.current)return;const e=Cp(g.current),t=t=>{y.current=t,!i&&l()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(c.current=!0,p.current&&p.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!l()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(i&&e.activeElement!==d.current&&e.activeElement!==p.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!m.current)return;let n=[];if(e.activeElement!==d.current&&e.activeElement!==p.current||(n=s(g.current)),n.length>0){var o,r;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(r=y.current)?void 0:r.key)),t=n[0],i=n[n.length-1];"string"!=typeof t&&"string"!=typeof i&&(e?i.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[r,i,a,l,u,s]);const b=e=>{null===h.current&&(h.current=e.relatedTarget),m.current=!0};return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)("div",{tabIndex:u?0:-1,onFocus:b,ref:d,"data-testid":"sentinelStart"}),e.cloneElement(n,{ref:v,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),m.current=!0,f.current=e.target;const t=n.props.onFocus;t&&t(e)}}),(0,o.jsx)("div",{tabIndex:u?0:-1,onFocus:b,ref:p,"data-testid":"sentinelEnd"})]})},yI=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],bI={entering:{opacity:1},entered:{opacity:1}},xI=e.forwardRef(function(t,n){const r=ss(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,easing:c,in:d,onEnter:p,onEntered:h,onEntering:m,onExit:g,onExited:v,onExiting:y,style:b,timeout:x=a,TransitionComponent:w=ES}=t,_=(0,f.A)(t,yI),C=e.useRef(null),A=qw(C,Gf(u),n),k=e=>t=>{if(e){const n=C.current;void 0===t?e(n):e(n,t)}},S=k(m),M=k((e,t)=>{OS(e);const n=LS({style:b,timeout:x,easing:c},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),p&&p(e,t)}),P=k(h),I=k(y),R=k(e=>{const t=LS({style:b,timeout:x,easing:c},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),g&&g(e)}),T=k(v);return(0,o.jsx)(w,(0,i.A)({appear:l,in:d,nodeRef:C,onEnter:M,onEntered:P,onEntering:S,onExit:R,onExited:T,onExiting:I,addEndListener:e=>{s&&s(C.current,e)},timeout:x},_,{children:(t,n)=>e.cloneElement(u,(0,i.A)({style:(0,i.A)({opacity:0,visibility:"exited"!==t||d?void 0:"hidden"},bI[t],b,u.props.style),ref:A},n))}))}),wI=xI;function _I(e){return et("MuiBackdrop",e)}tt("MuiBackdrop",["root","invisible"]);const CI=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],AI=dt("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>(0,i.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),kI=e.forwardRef(function(e,t){var n,r,a;const s=om({props:e,name:"MuiBackdrop"}),{children:l,className:u,component:c="div",components:d={},componentsProps:p={},invisible:h=!1,open:m,slotProps:g={},slots:v={},TransitionComponent:y=wI,transitionDuration:b}=s,x=(0,f.A)(s,CI),w=(0,i.A)({},s,{component:c,invisible:h}),_=(e=>{const{classes:t,invisible:n}=e;return De({root:["root",n&&"invisible"]},_I,t)})(w),C=null!=(n=g.root)?n:p.root;return(0,o.jsx)(y,(0,i.A)({in:m,timeout:b},x,{children:(0,o.jsx)(AI,(0,i.A)({"aria-hidden":!0},C,{as:null!=(r=null!=(a=v.root)?a:d.Root)?r:c,className:Ge(_.root,u,null==C?void 0:C.className),ownerState:(0,i.A)({},w,null==C?void 0:C.ownerState),classes:_,ref:t,children:l}))}))});function SI(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function MI(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function PI(e){return parseInt(Ap(e).getComputedStyle(e).paddingRight,10)||0}function II(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&MI(e,r)})}function RI(e,t){let n=-1;return e.some((e,o)=>!!t(e)&&(n=o,!0)),n}const TI=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&MI(e.modalRef,!1);const o=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);II(t,e.mount,e.modalRef,o,!0);const r=RI(this.containers,e=>e.container===t);return-1!==r?(this.containers[r].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),n)}mount(e,t){const n=RI(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[n];o.restore||(o.restore=function(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(function(e){const t=Cp(e);return t.body===e?Ap(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){const e=mS(Cp(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${PI(o)+e}px`;const t=Cp(o).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${PI(t)+e}px`})}let e;if(o.parentNode instanceof DocumentFragment)e=Cp(o).body;else{const t=o.parentElement,n=Ap(o);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:o}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}(o,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const o=RI(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[o];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(n,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&MI(e.modalRef,t),II(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(o,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&MI(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function EI(e){return et("MuiModal",e)}tt("MuiModal",["root","hidden","backdrop"]);const OI=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],LI=dt("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>(0,i.A)({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),zI=dt(kI,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),jI=e.forwardRef(function(t,n){var r,a,s,l,u,c;const d=om({name:"MuiModal",props:t}),{BackdropComponent:p=zI,BackdropProps:h,className:m,closeAfterTransition:g=!1,children:v,container:y,component:b,components:x={},componentsProps:w={},disableAutoFocus:_=!1,disableEnforceFocus:C=!1,disableEscapeKeyDown:A=!1,disablePortal:k=!1,disableRestoreFocus:S=!1,disableScrollLock:M=!1,hideBackdrop:P=!1,keepMounted:I=!1,onBackdropClick:R,open:T,slotProps:E,slots:O}=d,L=(0,f.A)(d,OI),z=(0,i.A)({},d,{closeAfterTransition:g,disableAutoFocus:_,disableEnforceFocus:C,disableEscapeKeyDown:A,disablePortal:k,disableRestoreFocus:S,disableScrollLock:M,hideBackdrop:P,keepMounted:I}),{getRootProps:j,getBackdropProps:$,getTransitionProps:F,portalRef:N,isTopModal:D,exited:H,hasTransition:B}=function(t){const{container:n,disableEscapeKeyDown:o=!1,disableScrollLock:r=!1,manager:a=TI,closeAfterTransition:s=!1,onTransitionEnter:l,onTransitionExited:u,children:c,onClose:d,open:p,rootRef:h}=t,f=e.useRef({}),m=e.useRef(null),g=e.useRef(null),v=Be(g,h),[y,b]=e.useState(!p),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let w=!0;"false"!==t["aria-hidden"]&&!1!==t["aria-hidden"]||(w=!1);const _=()=>(f.current.modalRef=g.current,f.current.mount=m.current,f.current),C=()=>{a.mount(_(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},A=Fw(()=>{const e=function(e){return"function"==typeof e?e():e}(n)||Cp(m.current).body;a.add(_(),e),g.current&&C()}),k=e.useCallback(()=>a.isTopModal(_()),[a]),S=Fw(e=>{m.current=e,e&&(p&&k()?C():g.current&&MI(g.current,w))}),M=e.useCallback(()=>{a.remove(_(),w)},[w,a]);e.useEffect(()=>()=>{M()},[M]),e.useEffect(()=>{p?A():x&&s||M()},[p,M,x,s,A]);const P=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&k()&&(o||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},I=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:(e={})=>{const n=Ze(t);delete n.onTransitionEnter,delete n.onTransitionExited;const o=(0,i.A)({},n,e);return(0,i.A)({role:"presentation"},o,{onKeyDown:P(o),ref:v})},getBackdropProps:(e={})=>{const t=e;return(0,i.A)({"aria-hidden":!0},t,{onClick:I(t),open:p})},getTransitionProps:()=>({onEnter:SI(()=>{b(!1),l&&l()},null==c?void 0:c.props.onEnter),onExited:SI(()=>{b(!0),u&&u(),s&&M()},null==c?void 0:c.props.onExited)}),rootRef:v,portalRef:S,isTopModal:k,exited:y,hasTransition:x}}((0,i.A)({},z,{rootRef:n})),V=(0,i.A)({},z,{exited:H}),W=(e=>{const{open:t,exited:n,classes:o}=e;return De({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},EI,o)})(V),U={};if(void 0===v.props.tabIndex&&(U.tabIndex="-1"),B){const{onEnter:e,onExited:t}=F();U.onEnter=e,U.onExited=t}const G=null!=(r=null!=(a=null==O?void 0:O.root)?a:x.Root)?r:LI,Z=null!=(s=null!=(l=null==O?void 0:O.backdrop)?l:x.Backdrop)?s:p,K=null!=(u=null==E?void 0:E.root)?u:w.root,q=null!=(c=null==E?void 0:E.backdrop)?c:w.backdrop,X=Xe({elementType:G,externalSlotProps:K,externalForwardedProps:L,getSlotProps:j,additionalProps:{ref:n,as:b},ownerState:V,className:Ge(m,null==K?void 0:K.className,null==W?void 0:W.root,!V.open&&V.exited&&(null==W?void 0:W.hidden))}),Y=Xe({elementType:Z,externalSlotProps:q,additionalProps:h,getSlotProps:e=>$((0,i.A)({},e,{onClick:t=>{R&&R(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ge(null==q?void 0:q.className,null==h?void 0:h.className,null==W?void 0:W.backdrop),ownerState:V});return I||T||B&&!H?(0,o.jsx)(Zf,{ref:N,container:y,disablePortal:k,children:(0,o.jsxs)(G,(0,i.A)({},X,{children:[!P&&p?(0,o.jsx)(Z,(0,i.A)({},Y)):null,(0,o.jsx)(vI,{disableEnforceFocus:C,disableAutoFocus:_,disableRestoreFocus:S,isEnabled:D,open:T,children:e.cloneElement(v,U)})]}))}):null}),$I=jI;function FI(e){return et("MuiPopover",e)}tt("MuiPopover",["root","paper"]);const NI=["onEntering"],DI=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],HI=["slotProps"];function BI(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function VI(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function WI(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function UI(e){return"function"==typeof e?e():e}const GI=dt($I,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ZI=dt(U_,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),KI=e.forwardRef(function(t,n){var r,a,s;const l=om({props:t,name:"MuiPopover"}),{action:u,anchorEl:c,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:p,anchorReference:h="anchorEl",children:m,className:g,container:v,elevation:y=8,marginThreshold:b=16,open:x,PaperProps:w={},slots:_,slotProps:C,transformOrigin:A={vertical:"top",horizontal:"left"},TransitionComponent:k=DS,transitionDuration:S="auto",TransitionProps:{onEntering:M}={},disableScrollLock:P=!1}=l,I=(0,f.A)(l.TransitionProps,NI),R=(0,f.A)(l,DI),T=null!=(r=null==C?void 0:C.paper)?r:w,E=e.useRef(),O=qw(E,T.ref),L=(0,i.A)({},l,{anchorOrigin:d,anchorReference:h,elevation:y,marginThreshold:b,externalPaperSlotProps:T,transformOrigin:A,TransitionComponent:k,transitionDuration:S,TransitionProps:I}),z=(e=>{const{classes:t}=e;return De({root:["root"],paper:["paper"]},FI,t)})(L),j=e.useCallback(()=>{if("anchorPosition"===h)return p;const e=UI(c),t=(e&&1===e.nodeType?e:uS(E.current).body).getBoundingClientRect();return{top:t.top+BI(t,d.vertical),left:t.left+VI(t,d.horizontal)}},[c,d.horizontal,d.vertical,p,h]),$=e.useCallback(e=>({vertical:BI(e,A.vertical),horizontal:VI(e,A.horizontal)}),[A.horizontal,A.vertical]),F=e.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=$(t);if("none"===h)return{top:null,left:null,transformOrigin:WI(n)};const o=j();let r=o.top-n.vertical,i=o.left-n.horizontal;const a=r+t.height,s=i+t.width,l=hI(UI(c)),u=l.innerHeight-b,d=l.innerWidth-b;if(null!==b&&r<b){const e=r-b;r-=e,n.vertical+=e}else if(null!==b&&a>u){const e=a-u;r-=e,n.vertical+=e}if(null!==b&&i<b){const e=i-b;i-=e,n.horizontal+=e}else if(s>d){const e=s-d;i-=e,n.horizontal+=e}return{top:`${Math.round(r)}px`,left:`${Math.round(i)}px`,transformOrigin:WI(n)}},[c,h,j,$,b]),[N,D]=e.useState(x),H=e.useCallback(()=>{const e=E.current;if(!e)return;const t=F(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,D(!0)},[F]);e.useEffect(()=>(P&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[c,P,H]),e.useEffect(()=>{x&&H()}),e.useImperativeHandle(u,()=>x?{updatePosition:()=>{H()}}:null,[x,H]),e.useEffect(()=>{if(!x)return;const e=pI(()=>{H()}),t=hI(c);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[c,x,H]);let B=S;"auto"!==S||k.muiSupportAuto||(B=void 0);const V=v||(c?uS(UI(c)).body:void 0),W=null!=(a=null==_?void 0:_.root)?a:GI,U=null!=(s=null==_?void 0:_.paper)?s:ZI,G=Xe({elementType:U,externalSlotProps:(0,i.A)({},T,{style:N?T.style:(0,i.A)({},T.style,{opacity:0})}),additionalProps:{elevation:y,ref:O},ownerState:L,className:Ge(z.paper,null==T?void 0:T.className)}),Z=Xe({elementType:W,externalSlotProps:(null==C?void 0:C.root)||{},externalForwardedProps:R,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:V,open:x},ownerState:L,className:Ge(z.root,g)}),{slotProps:K}=Z,q=(0,f.A)(Z,HI);return(0,o.jsx)(W,(0,i.A)({},q,!Ve(W)&&{slotProps:K,disableScrollLock:P},{children:(0,o.jsx)(k,(0,i.A)({appear:!0,in:x,onEntering:(e,t)=>{M&&M(e,t),H()},onExited:()=>{D(!1)},timeout:B},I,{children:(0,o.jsx)(U,(0,i.A)({},G,{children:m}))}))}))}),qI=KI;function XI(e){return et("MuiMenu",e)}tt("MuiMenu",["root","paper","list"]);const YI=["onEntering"],QI=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],JI={vertical:"top",horizontal:"right"},eR={vertical:"top",horizontal:"left"},tR=dt(qI,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nR=dt(ZI,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),oR=dt(_S,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),rR=e.forwardRef(function(t,n){var r,a;const s=om({props:t,name:"MuiMenu"}),{autoFocus:l=!0,children:u,className:c,disableAutoFocusItem:d=!1,MenuListProps:p={},onClose:h,open:m,PaperProps:g={},PopoverClasses:v,transitionDuration:y="auto",TransitionProps:{onEntering:b}={},variant:x="selectedMenu",slots:w={},slotProps:_={}}=s,C=(0,f.A)(s.TransitionProps,YI),A=(0,f.A)(s,QI),k=wh(),S=(0,i.A)({},s,{autoFocus:l,disableAutoFocusItem:d,MenuListProps:p,onEntering:b,PaperProps:g,transitionDuration:y,TransitionProps:C,variant:x}),M=(e=>{const{classes:t}=e;return De({root:["root"],paper:["paper"],list:["list"]},XI,t)})(S),P=l&&!d&&m,I=e.useRef(null);let R=-1;e.Children.map(u,(t,n)=>{e.isValidElement(t)&&(t.props.disabled||("selectedMenu"===x&&t.props.selected||-1===R)&&(R=n))});const T=null!=(r=w.paper)?r:nR,E=null!=(a=_.paper)?a:g,O=Xe({elementType:w.root,externalSlotProps:_.root,ownerState:S,className:[M.root,c]}),L=Xe({elementType:T,externalSlotProps:E,ownerState:S,className:M.paper});return(0,o.jsx)(tR,(0,i.A)({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?JI:eR,slots:{paper:T,root:w.root},slotProps:{root:O,paper:L},open:m,ref:n,transitionDuration:y,TransitionProps:(0,i.A)({onEntering:(e,t)=>{I.current&&I.current.adjustStyleForScrollbar(e,{direction:k?"rtl":"ltr"}),b&&b(e,t)}},C),ownerState:S},A,{classes:v,children:(0,o.jsx)(oR,(0,i.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:I,autoFocus:l&&(-1===R||d),autoFocusItem:P,variant:x},p,{className:Ge(M.list,p.className),children:u}))}))});function iR(e){return et("MuiNativeSelect",e)}const aR=tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),sR=["className","disabled","error","IconComponent","inputRef","variant"],lR=({ownerState:e,theme:t})=>(0,i.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,i.A)({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${aR.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),uR=dt("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ct,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${aR.multiple}`]:t.multiple}]}})(lR),cR=({ownerState:e,theme:t})=>(0,i.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${aR.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),dR=dt("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Em(n.variant)}`],n.open&&t.iconOpen]}})(cR),pR=e.forwardRef(function(t,n){const{className:r,disabled:a,error:s,IconComponent:l,inputRef:u,variant:c="standard"}=t,d=(0,f.A)(t,sR),p=(0,i.A)({},t,{disabled:a,variant:c,error:s}),h=(e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e;return De({select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${Em(n)}`,i&&"iconOpen",o&&"disabled"]},iR,t)})(p);return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)(uR,(0,i.A)({ownerState:p,className:Ge(h.select,r),disabled:a,ref:u||n},d)),t.multiple?null:(0,o.jsx)(dR,{as:l,ownerState:p,className:h.icon})]})}),hR=Id;function fR(e){return et("MuiSelect",e)}const mR=tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var gR;const vR=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],yR=dt("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${mR.select}`]:t.select},{[`&.${mR.select}`]:t[n.variant]},{[`&.${mR.error}`]:t.error},{[`&.${mR.multiple}`]:t.multiple}]}})(lR,{[`&.${mR.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bR=dt("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Em(n.variant)}`],n.open&&t.iconOpen]}})(cR),xR=dt("input",{shouldForwardProp:e=>ut(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function wR(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function _R(e){return null==e||"string"==typeof e&&!e.trim()}const CR=e.forwardRef(function(t,n){var r;const{"aria-describedby":a,"aria-label":s,autoFocus:l,autoWidth:u,children:c,className:d,defaultOpen:p,defaultValue:h,disabled:g,displayEmpty:v,error:y=!1,IconComponent:b,inputRef:x,labelId:w,MenuProps:_={},multiple:C,name:A,onBlur:k,onChange:S,onClose:M,onFocus:P,onOpen:I,open:R,readOnly:T,renderValue:E,SelectDisplayProps:O={},tabIndex:L,value:z,variant:j="standard"}=t,$=(0,f.A)(t,vR),[F,N]=hR({controlled:z,default:h,name:"Select"}),[D,H]=hR({controlled:R,default:p,name:"Select"}),B=e.useRef(null),V=e.useRef(null),[W,U]=e.useState(null),{current:G}=e.useRef(null!=R),[Z,K]=e.useState(),q=qw(n,x),X=e.useCallback(e=>{V.current=e,e&&U(e)},[]),Y=null==W?void 0:W.parentNode;e.useImperativeHandle(q,()=>({focus:()=>{V.current.focus()},node:B.current,value:F}),[F]),e.useEffect(()=>{p&&D&&W&&!G&&(K(u?null:Y.clientWidth),V.current.focus())},[W,u]),e.useEffect(()=>{l&&V.current.focus()},[l]),e.useEffect(()=>{if(!w)return;const e=uS(V.current).getElementById(w);if(e){const t=()=>{getSelection().isCollapsed&&V.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[w]);const Q=(e,t)=>{e?I&&I(t):M&&M(t),G||(K(u?null:Y.clientWidth),H(e))},J=e.Children.toArray(c),ee=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(C){n=Array.isArray(F)?F.slice():[];const t=F.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),F!==n&&(N(n),S)){const o=t.nativeEvent||t,r=new o.constructor(o.type,o);Object.defineProperty(r,"target",{writable:!0,value:{value:n,name:A}}),S(r,e)}C||Q(!1,t)}},te=null!==W&&D;let ne,oe;delete $["aria-invalid"];const re=[];let ie=!1,ae=!1;(n_({value:F})||v)&&(E?ne=E(F):ie=!0);const se=J.map(t=>{if(!e.isValidElement(t))return null;let n;if(C){if(!Array.isArray(F))throw new Error((0,m.A)(2));n=F.some(e=>wR(e,t.props.value)),n&&ie&&re.push(t.props.children)}else n=wR(F,t.props.value),n&&ie&&(oe=t.props.children);return n&&(ae=!0),e.cloneElement(t,{"aria-selected":n?"true":"false",onClick:ee(t),onKeyUp:e=>{" "===e.key&&e.preventDefault(),t.props.onKeyUp&&t.props.onKeyUp(e)},role:"option",selected:n,value:void 0,"data-value":t.props.value})});ie&&(ne=C?0===re.length?null:re.reduce((e,t,n)=>(e.push(t),n<re.length-1&&e.push(", "),e),[]):oe);let le,ue=Z;!u&&G&&W&&(ue=Y.clientWidth),le=void 0!==L?L:g?null:0;const ce=O.id||(A?`mui-component-select-${A}`:void 0),de=(0,i.A)({},t,{variant:j,value:F,open:te,error:y}),pe=(e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:i,error:a}=e;return De({select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${Em(n)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]},fR,t)})(de),he=(0,i.A)({},_.PaperProps,null==(r=_.slotProps)?void 0:r.paper),fe=Bi();return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)(yR,(0,i.A)({ref:X,tabIndex:le,role:"combobox","aria-controls":fe,"aria-disabled":g?"true":void 0,"aria-expanded":te?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[w,ce].filter(Boolean).join(" ")||void 0,"aria-describedby":a,onKeyDown:e=>{T||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Q(!0,e))},onMouseDown:g||T?null:e=>{0===e.button&&(e.preventDefault(),V.current.focus(),Q(!0,e))},onBlur:e=>{!te&&k&&(Object.defineProperty(e,"target",{writable:!0,value:{value:F,name:A}}),k(e))},onFocus:P},O,{ownerState:de,className:Ge(O.className,pe.select,d),id:ce,children:_R(ne)?gR||(gR=(0,o.jsx)("span",{className:"notranslate",children:""})):ne})),(0,o.jsx)(xR,(0,i.A)({"aria-invalid":y,value:Array.isArray(F)?F.join(","):F,name:A,ref:B,"aria-hidden":!0,onChange:e=>{const t=J.find(t=>t.props.value===e.target.value);void 0!==t&&(N(t.props.value),S&&S(e,t))},tabIndex:-1,disabled:g,className:pe.nativeInput,autoFocus:l,ownerState:de},$)),(0,o.jsx)(bR,{as:b,className:pe.icon,ownerState:de}),(0,o.jsx)(rR,(0,i.A)({id:`menu-${A||""}`,anchorEl:Y,open:te,onClose:e=>{Q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},_,{MenuListProps:(0,i.A)({"aria-labelledby":w,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:fe},_.MenuListProps),slotProps:(0,i.A)({},_.slotProps,{paper:(0,i.A)({},he,{style:(0,i.A)({minWidth:ue},null!=he?he.style:null)})}),children:se}))]})}),AR=CR,kR=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],SR=dt(l_,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...a_(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),(0,i.A)({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${nA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${nA.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${nA.disabled}, .${nA.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${nA.disabled}:before`]:{borderBottomStyle:"dotted"}})}),MR=dt(u_,{name:"MuiInput",slot:"Input",overridesResolver:s_})({}),PR=e.forwardRef(function(e,t){var n,r,a,s;const l=om({props:e,name:"MuiInput"}),{disableUnderline:u,components:c={},componentsProps:d,fullWidth:p=!1,inputComponent:h="input",multiline:m=!1,slotProps:v,slots:y={},type:b="text"}=l,x=(0,f.A)(l,kR),w=(e=>{const{classes:t,disableUnderline:n}=e,o=De({root:["root",!n&&"underline"],input:["input"]},tA,t);return(0,i.A)({},t,o)})(l),_={root:{ownerState:{disableUnderline:u}}},C=(null!=v?v:d)?(0,g.A)(null!=v?v:d,_):_,A=null!=(n=null!=(r=y.root)?r:c.Root)?n:SR,k=null!=(a=null!=(s=y.input)?s:c.Input)?a:MR;return(0,o.jsx)(p_,(0,i.A)({slots:{root:A,input:k},slotProps:C,fullWidth:p,inputComponent:h,multiline:m,ref:t,type:b},x,{classes:w}))});PR.muiName="Input";const IR=PR,RR=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],TR=dt(l_,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...a_(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const o="light"===e.palette.mode,r=o?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=o?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=o?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=o?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,i.A)({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a}},[`&.${aA.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:a},[`&.${aA.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:l}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${aA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${aA.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${aA.disabled}, .${aA.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${aA.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&(0,i.A)({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),ER=dt(u_,{name:"MuiFilledInput",slot:"Input",overridesResolver:s_})(({theme:e,ownerState:t})=>(0,i.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),OR=e.forwardRef(function(e,t){var n,r,a,s;const l=om({props:e,name:"MuiFilledInput"}),{components:u={},componentsProps:c,fullWidth:d=!1,inputComponent:p="input",multiline:h=!1,slotProps:m,slots:v={},type:y="text"}=l,b=(0,f.A)(l,RR),x=(0,i.A)({},l,{fullWidth:d,inputComponent:p,multiline:h,type:y}),w=(e=>{const{classes:t,disableUnderline:n}=e,o=De({root:["root",!n&&"underline"],input:["input"]},iA,t);return(0,i.A)({},t,o)})(l),_={root:{ownerState:x},input:{ownerState:x}},C=(null!=m?m:c)?(0,g.A)(_,null!=m?m:c):_,A=null!=(n=null!=(r=v.root)?r:u.Root)?n:TR,k=null!=(a=null!=(s=v.input)?s:u.Input)?a:ER;return(0,o.jsx)(p_,(0,i.A)({slots:{root:A,input:k},componentsProps:C,fullWidth:d,inputComponent:p,multiline:h,ref:t,type:y},b,{classes:w}))});OR.muiName="Input";const LR=OR;var zR;const jR=["children","classes","className","label","notched"],$R=dt("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:ct})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),FR=dt("legend",{name:"MuiNotchedOutlined",shouldForwardProp:ct})(({ownerState:e,theme:t})=>(0,i.A)({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&(0,i.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}))),NR=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],DR=dt(l_,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:a_})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,i.A)({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${rA.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${rA.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${rA.focused} .${rA.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${rA.error} .${rA.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${rA.disabled} .${rA.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&(0,i.A)({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),HR=dt(function(e){const{className:t,label:n,notched:r}=e,a=(0,f.A)(e,jR),s=null!=n&&""!==n,l=(0,i.A)({},e,{notched:r,withLabel:s});return(0,o.jsx)($R,(0,i.A)({"aria-hidden":!0,className:t,ownerState:l},a,{children:(0,o.jsx)(FR,{ownerState:l,children:s?(0,o.jsx)("span",{children:n}):zR||(zR=(0,o.jsx)("span",{className:"notranslate",children:""}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),BR=dt(u_,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:s_})(({theme:e,ownerState:t})=>(0,i.A)({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),VR=e.forwardRef(function(t,n){var r,a,s,l,u;const c=om({props:t,name:"MuiOutlinedInput"}),{components:d={},fullWidth:p=!1,inputComponent:h="input",label:m,multiline:g=!1,notched:v,slots:y={},type:b="text"}=c,x=(0,f.A)(c,NR),w=(e=>{const{classes:t}=e,n=De({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},oA,t);return(0,i.A)({},t,n)})(c),_=Kw(),C=Gw({props:c,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A=(0,i.A)({},c,{color:C.color||"primary",disabled:C.disabled,error:C.error,focused:C.focused,formControl:_,fullWidth:p,hiddenLabel:C.hiddenLabel,multiline:g,size:C.size,type:b}),k=null!=(r=null!=(a=y.root)?a:d.Root)?r:DR,S=null!=(s=null!=(l=y.input)?l:d.Input)?s:BR;return(0,o.jsx)(p_,(0,i.A)({slots:{root:k,input:S},renderSuffix:t=>(0,o.jsx)(HR,{ownerState:A,className:w.notchedOutline,label:null!=m&&""!==m&&C.required?u||(u=(0,o.jsxs)(e.Fragment,{children:[m," ","*"]})):m,notched:void 0!==v?v:Boolean(t.startAdornment||t.filled||t.focused)}),fullWidth:p,inputComponent:h,multiline:g,ref:n,type:b},x,{classes:(0,i.A)({},w,{notchedOutline:null})}))});VR.muiName="Input";const WR=VR,UR=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],GR=["root"],ZR={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ct(e)&&"variant"!==e,slot:"Root"},KR=dt(IR,ZR)(""),qR=dt(WR,ZR)(""),XR=dt(LR,ZR)(""),YR=e.forwardRef(function(t,n){const r=om({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:s,classes:l={},className:u,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:p=lA,id:h,input:m,inputProps:v,label:y,labelId:b,MenuProps:x,multiple:w=!1,native:_=!1,onClose:C,onOpen:A,open:k,renderValue:S,SelectDisplayProps:M,variant:P="outlined"}=r,I=(0,f.A)(r,UR),R=_?pR:AR,T=Gw({props:r,muiFormControl:Kw(),states:["variant","error"]}),E=T.variant||P,O=(0,i.A)({},r,{variant:E,classes:l}),L=(e=>{const{classes:t}=e;return t})(O),z=(0,f.A)(L,GR),j=m||{standard:(0,o.jsx)(KR,{ownerState:O}),outlined:(0,o.jsx)(qR,{label:y,ownerState:O}),filled:(0,o.jsx)(XR,{ownerState:O})}[E],$=qw(n,Gf(j));return(0,o.jsx)(e.Fragment,{children:e.cloneElement(j,(0,i.A)({inputComponent:R,inputProps:(0,i.A)({children:s,error:T.error,IconComponent:p,variant:E,type:void 0,multiple:w},_?{id:h}:{autoWidth:a,defaultOpen:c,displayEmpty:d,labelId:b,MenuProps:x,onClose:C,onOpen:A,open:k,renderValue:S,SelectDisplayProps:(0,i.A)({id:h},M)},v,{classes:v?(0,g.A)(z,v.classes):z},m?m.props.inputProps:{})},(w&&_||d)&&"outlined"===E?{notched:!0}:{},{ref:$,className:Ge(j.props.className,u,L.root)},!m&&{variant:E},I))})});YR.muiName="Select";const QR=YR,JR=e.createContext(),eT=e.createContext();function tT(e){return et("MuiTableCell",e)}const nT=tt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),oT=["align","className","component","padding","scope","size","sortDirection","variant"],rT=dt("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Em(n.size)}`],"normal"!==n.padding&&t[`padding${Em(n.padding)}`],"inherit"!==n.align&&t[`align${Em(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>(0,i.A)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,x.a)((0,x.X4)(e.palette.divider,1),.88):(0,x.e$)((0,x.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${nT.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),iT=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiTableCell"}),{align:a="inherit",className:s,component:l,padding:u,scope:c,size:d,sortDirection:p,variant:h}=r,m=(0,f.A)(r,oT),g=e.useContext(JR),v=e.useContext(eT),y=v&&"head"===v.variant;let b;b=l||(y?"th":"td");let x=c;"td"===b?x=void 0:!x&&y&&(x="col");const w=h||v&&v.variant,_=(0,i.A)({},r,{align:a,component:b,padding:u||(g&&g.padding?g.padding:"normal"),size:d||(g&&g.size?g.size:"medium"),sortDirection:p,stickyHeader:"head"===w&&g&&g.stickyHeader,variant:w}),C=(e=>{const{classes:t,variant:n,align:o,padding:r,size:i,stickyHeader:a}=e;return De({root:["root",n,a&&"stickyHeader","inherit"!==o&&`align${Em(o)}`,"normal"!==r&&`padding${Em(r)}`,`size${Em(i)}`]},tT,t)})(_);let A=null;return p&&(A="asc"===p?"ascending":"descending"),(0,o.jsx)(rT,(0,i.A)({as:b,ref:n,className:Ge(C.root,s),"aria-sort":A,scope:x,ownerState:_},m))});function aT(e){return et("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const sT=["className","component","disableGutters","variant"],lT=dt("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>(0,i.A)({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},"dense"===t.variant&&{minHeight:48}),({theme:e,ownerState:t})=>"regular"===t.variant&&e.mixins.toolbar),uT=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiToolbar"}),{className:r,component:a="div",disableGutters:s=!1,variant:l="regular"}=n,u=(0,f.A)(n,sT),c=(0,i.A)({},n,{component:a,disableGutters:s,variant:l}),d=(e=>{const{classes:t,disableGutters:n,variant:o}=e;return De({root:["root",!n&&"gutters",o]},aT,t)})(c);return(0,o.jsx)(lT,(0,i.A)({as:a,className:Ge(d.root,r),ref:t,ownerState:c},u))}),cT=UC((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),dT=UC((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),pT=UC((0,o.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),hT=UC((0,o.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),fT=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],mT=e.forwardRef(function(e,t){var n,r,a,s,l,u,c,d;const{backIconButtonProps:p,count:h,disabled:m=!1,getItemAriaLabel:g,nextIconButtonProps:v,onPageChange:y,page:b,rowsPerPage:x,showFirstButton:w,showLastButton:_,slots:C={},slotProps:A={}}=e,k=(0,f.A)(e,fT),S=wh(),M=null!=(n=C.firstButton)?n:NC,P=null!=(r=C.lastButton)?r:NC,I=null!=(a=C.nextButton)?a:NC,R=null!=(s=C.previousButton)?s:NC,T=null!=(l=C.firstButtonIcon)?l:hT,E=null!=(u=C.lastButtonIcon)?u:pT,O=null!=(c=C.nextButtonIcon)?c:dT,L=null!=(d=C.previousButtonIcon)?d:cT,z=S?P:M,j=S?I:R,$=S?R:I,F=S?M:P,N=S?A.lastButton:A.firstButton,D=S?A.nextButton:A.previousButton,H=S?A.previousButton:A.nextButton,B=S?A.firstButton:A.lastButton;return(0,o.jsxs)("div",(0,i.A)({ref:t},k,{children:[w&&(0,o.jsx)(z,(0,i.A)({onClick:e=>{y(e,0)},disabled:m||0===b,"aria-label":g("first",b),title:g("first",b)},N,{children:S?(0,o.jsx)(E,(0,i.A)({},A.lastButtonIcon)):(0,o.jsx)(T,(0,i.A)({},A.firstButtonIcon))})),(0,o.jsx)(j,(0,i.A)({onClick:e=>{y(e,b-1)},disabled:m||0===b,color:"inherit","aria-label":g("previous",b),title:g("previous",b)},null!=D?D:p,{children:S?(0,o.jsx)(O,(0,i.A)({},A.nextButtonIcon)):(0,o.jsx)(L,(0,i.A)({},A.previousButtonIcon))})),(0,o.jsx)($,(0,i.A)({onClick:e=>{y(e,b+1)},disabled:m||-1!==h&&b>=Math.ceil(h/x)-1,color:"inherit","aria-label":g("next",b),title:g("next",b)},null!=H?H:v,{children:S?(0,o.jsx)(L,(0,i.A)({},A.previousButtonIcon)):(0,o.jsx)(O,(0,i.A)({},A.nextButtonIcon))})),_&&(0,o.jsx)(F,(0,i.A)({onClick:e=>{y(e,Math.max(0,Math.ceil(h/x)-1))},disabled:m||b>=Math.ceil(h/x)-1,"aria-label":g("last",b),title:g("last",b)},B,{children:S?(0,o.jsx)(T,(0,i.A)({},A.firstButtonIcon)):(0,o.jsx)(E,(0,i.A)({},A.lastButtonIcon))}))]}))}),gT=Bi;function vT(e){return et("MuiTablePagination",e)}const yT=tt("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var bT;const xT=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],wT=dt(iT,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),_T=dt(uT,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,i.A)({[`& .${yT.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${yT.actions}`]:{flexShrink:0,marginLeft:20}})),CT=dt("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),AT=dt("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>(0,i.A)({},e.typography.body2,{flexShrink:0})),kT=dt(QR,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,i.A)({[`& .${yT.selectIcon}`]:t.selectIcon,[`& .${yT.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${yT.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),ST=dt(wM,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),MT=dt("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>(0,i.A)({},e.typography.body2,{flexShrink:0}));function PT({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function IT(e){return`Go to ${e} page`}const RT=dt(e.forwardRef(function(t,n){var r;const a=om({props:t,name:"MuiTablePagination"}),{ActionsComponent:s=mT,backIconButtonProps:l,className:u,colSpan:c,component:d=iT,count:p,disabled:h=!1,getItemAriaLabel:m=IT,labelDisplayedRows:g=PT,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:b,onRowsPerPageChange:x,page:w,rowsPerPage:_,rowsPerPageOptions:C=[10,25,50,100],SelectProps:A={},showFirstButton:k=!1,showLastButton:S=!1,slotProps:M={},slots:P={}}=a,I=(0,f.A)(a,xT),R=a,T=(e=>{const{classes:t}=e;return De({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},vT,t)})(R),E=null!=(r=null==M?void 0:M.select)?r:A,O=E.native?"option":ST;let L;d!==iT&&"td"!==d||(L=c||1e3);const z=gT(E.id),j=gT(E.labelId);return(0,o.jsx)(wT,(0,i.A)({colSpan:L,ref:n,as:d,ownerState:R,className:Ge(T.root,u)},I,{children:(0,o.jsxs)(_T,{className:T.toolbar,children:[(0,o.jsx)(CT,{className:T.spacer}),C.length>1&&(0,o.jsx)(AT,{className:T.selectLabel,id:j,children:v}),C.length>1&&(0,o.jsx)(kT,(0,i.A)({variant:"standard"},!E.variant&&{input:bT||(bT=(0,o.jsx)(p_,{}))},{value:_,onChange:x,id:z,labelId:j},E,{classes:(0,i.A)({},E.classes,{root:Ge(T.input,T.selectRoot,(E.classes||{}).root),select:Ge(T.select,(E.classes||{}).select),icon:Ge(T.selectIcon,(E.classes||{}).icon)}),disabled:h,children:C.map(t=>(0,e.createElement)(O,(0,i.A)({},!Ve(O)&&{ownerState:R},{className:T.menuItem,key:t.label?t.label:t,value:t.value?t.value:t}),t.label?t.label:t))})),(0,o.jsx)(MT,{className:T.displayedRows,children:g({from:0===p?0:w*_+1,to:-1===p?(w+1)*_:-1===_?p:Math.min(p,(w+1)*_),count:-1===p?-1:p,page:w})}),(0,o.jsx)(s,{className:T.actions,backIconButtonProps:l,count:p,nextIconButtonProps:y,onPageChange:b,page:w,rowsPerPage:_,showFirstButton:k,showLastButton:S,slotProps:M.actions,slots:P.actions,getItemAriaLabel:m,disabled:h})]})}))}))(({theme:e})=>({[`& .${yT.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${yT.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),TT=e.forwardRef(function(t,n){const r=gw(),a=lb(),s=rb(r,Pw),l=rb(r,Iw),u=e.useMemo(()=>Math.floor(l/(s.pageSize||1)),[l,s.pageSize]),c=e.useCallback(e=>{const t=Number(e.target.value);r.current.setPageSize(t)},[r]),d=e.useCallback((e,t)=>{r.current.setPage(t)},[r]),p=(e=>{for(let t=0;t<a.pageSizeOptions.length;t+=1){const n=a.pageSizeOptions[t];if("number"==typeof n){if(n===e)return!0}else if(n.value===e)return!0}return!1})(s.pageSize)?a.pageSizeOptions:[];return(0,o.jsx)(RT,(0,i.A)({ref:n,component:"div",count:l,page:s.page<=u?s.page:u,rowsPerPageOptions:p,rowsPerPage:s.pageSize,onPageChange:d,onRowsPerPageChange:c},r.current.getLocaleText("MuiTablePagination"),t))}),ET=["className"],OT=nx("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function LT(e){const{className:t}=e,n=(0,f.A)(e,ET),r=lb(),a=(e=>{const{classes:t}=e;return De({root:["panelContent"]},By,t)})(r);return(0,o.jsx)(OT,(0,i.A)({className:Ge(t,a.root),ownerState:r},n))}const zT=["className"],jT=nx("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function $T(e){const{className:t}=e,n=(0,f.A)(e,zT),r=lb(),a=(e=>{const{classes:t}=e;return De({root:["panelFooter"]},By,t)})(r);return(0,o.jsx)(jT,(0,i.A)({className:Ge(t,a.root),ownerState:r},n))}const FT=["className","slotProps"],NT=dt("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),DT=()=>!0,HT=e.forwardRef(function(e,t){const{className:n,slotProps:r={}}=e,a=(0,f.A)(e,FT),s=lb(),l=(e=>{const{classes:t}=e;return De({root:["panelWrapper"]},By,t)})(s);return(0,o.jsx)(vI,(0,i.A)({open:!0,disableEnforceFocus:!0,isEnabled:DT},r.TrapFocus,{children:(0,o.jsx)(NT,(0,i.A)({ref:t,tabIndex:-1,className:Ge(n,l.root),ownerState:s},a))}))}),BT=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],VT=["InputComponentProps"],WT=dt("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),UT=dt("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),GT=dt("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),ZT=dt("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),KT=dt("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),qT=dt("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),XT=e=>e.headerName||e.field,YT=new Intl.Collator,QT=e.forwardRef(function(t,n){var r,a,s,l,u,c,d,p,h,m;const{item:g,hasMultipleFilters:v,deleteFilter:y,applyFilterChanges:b,multiFilterOperator:x,showMultiFilterOperators:w,disableMultiFilterOperator:_,applyMultiFilterOperatorChanges:C,focusElementRef:A,logicOperators:k=[$A.And,$A.Or],columnsSort:S,filterColumns:M,deleteIconProps:P={},logicOperatorInputProps:I={},operatorInputProps:R={},columnInputProps:T={},valueInputProps:E={}}=t,O=(0,f.A)(t,BT),L=gw(),z=rb(L,Tb),j=rb(L,dx),$=Bi(),F=Bi(),N=Bi(),D=Bi(),H=lb(),B=(e=>{const{classes:t}=e;return De({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},By,t)})(H),V=e.useRef(null),W=e.useRef(null),U=v&&k.length>0,G=(null==(r=H.slotProps)?void 0:r.baseFormControl)||{},Z=null==(s=((null==(a=H.slotProps)?void 0:a.baseSelect)||{}).native)||s,K=(null==(l=H.slotProps)?void 0:l.baseInputLabel)||{},q=(null==(u=H.slotProps)?void 0:u.baseSelectOption)||{},{InputComponentProps:X}=E,Y=(0,f.A)(E,VT),Q=e.useMemo(()=>{if(void 0===M||"function"!=typeof M)return z;const e=M({field:g.field,columns:z,currentFilters:(null==j?void 0:j.items)||[]});return z.filter(t=>e.includes(t.field))},[M,null==j?void 0:j.items,z,g.field]),J=e.useMemo(()=>{switch(S){case"asc":return Q.sort((e,t)=>YT.compare(XT(e),XT(t)));case"desc":return Q.sort((e,t)=>-YT.compare(XT(e),XT(t)));default:return Q}},[Q,S]),ee=g.field?L.current.getColumn(g.field):null,te=e.useMemo(()=>{var e;return g.operator&&ee?null==(e=ee.filterOperators)?void 0:e.find(e=>e.value===g.operator):null},[g,ee]),ne=e.useCallback(e=>{const t=e.target.value,n=L.current.getColumn(t);if(n.field===ee.field)return;const o=n.filterOperators.find(e=>e.value===g.operator)||n.filterOperators[0],r=!o.InputComponent||o.InputComponent!==(null==te?void 0:te.InputComponent)||n.type!==ee.type;b((0,i.A)({},g,{field:t,operator:o.value,value:r?void 0:g.value}))},[L,b,g,ee,te]),oe=e.useCallback(e=>{const t=e.target.value,n=null==ee?void 0:ee.filterOperators.find(e=>e.value===t),o=!(null!=n&&n.InputComponent)||(null==n?void 0:n.InputComponent)!==(null==te?void 0:te.InputComponent);b((0,i.A)({},g,{operator:t,value:o?void 0:g.value}))},[b,g,ee,te]),re=e.useCallback(e=>{const t=e.target.value===$A.And.toString()?$A.And:$A.Or;C(t)},[C]);return e.useImperativeHandle(A,()=>({focus:()=>{var e;null!=te&&te.InputComponent?null==V||null==(e=V.current)||e.focus():W.current.focus()}}),[te]),(0,o.jsxs)(WT,(0,i.A)({ref:n,className:B.root,"data-id":g.id,ownerState:H},O,{children:[(0,o.jsx)(UT,(0,i.A)({variant:"standard",as:H.slots.baseFormControl},G,P,{className:Ge(B.deleteIcon,G.className,P.className),ownerState:H,children:(0,o.jsx)(H.slots.baseIconButton,(0,i.A)({"aria-label":L.current.getLocaleText("filterPanelDeleteIconLabel"),title:L.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:()=>{H.disableMultipleColumnsFiltering?void 0===g.value?y(g):b((0,i.A)({},g,{value:void 0})):y(g)},size:"small"},null==(c=H.slotProps)?void 0:c.baseIconButton,{children:(0,o.jsx)(H.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),(0,o.jsx)(GT,(0,i.A)({variant:"standard",as:H.slots.baseFormControl},G,I,{sx:(0,i.A)({display:U?"flex":"none",visibility:w?"visible":"hidden"},G.sx||{},I.sx||{}),className:Ge(B.logicOperatorInput,G.className,I.className),ownerState:H,children:(0,o.jsx)(H.slots.baseSelect,(0,i.A)({inputProps:{"aria-label":L.current.getLocaleText("filterPanelLogicOperator")},value:x,onChange:re,disabled:!!_||1===k.length,native:Z},null==(d=H.slotProps)?void 0:d.baseSelect,{children:k.map(t=>(0,e.createElement)(H.slots.baseSelectOption,(0,i.A)({},q,{native:Z,key:t.toString(),value:t.toString()}),L.current.getLocaleText((e=>{switch(e){case $A.And:return"filterPanelOperatorAnd";case $A.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}})(t))))}))})),(0,o.jsxs)(ZT,(0,i.A)({variant:"standard",as:H.slots.baseFormControl},G,T,{className:Ge(B.columnInput,G.className,T.className),ownerState:H,children:[(0,o.jsx)(H.slots.baseInputLabel,(0,i.A)({},K,{htmlFor:$,id:F,children:L.current.getLocaleText("filterPanelColumns")})),(0,o.jsx)(H.slots.baseSelect,(0,i.A)({labelId:F,id:$,label:L.current.getLocaleText("filterPanelColumns"),value:g.field||"",onChange:ne,native:Z},null==(p=H.slotProps)?void 0:p.baseSelect,{children:J.map(t=>(0,e.createElement)(H.slots.baseSelectOption,(0,i.A)({},q,{native:Z,key:t.field,value:t.field}),XT(t)))}))]})),(0,o.jsxs)(KT,(0,i.A)({variant:"standard",as:H.slots.baseFormControl},G,R,{className:Ge(B.operatorInput,G.className,R.className),ownerState:H,children:[(0,o.jsx)(H.slots.baseInputLabel,(0,i.A)({},K,{htmlFor:N,id:D,children:L.current.getLocaleText("filterPanelOperator")})),(0,o.jsx)(H.slots.baseSelect,(0,i.A)({labelId:D,label:L.current.getLocaleText("filterPanelOperator"),id:N,value:g.operator,onChange:oe,native:Z,inputRef:W},null==(h=H.slotProps)?void 0:h.baseSelect,{children:null==ee||null==(m=ee.filterOperators)?void 0:m.map(t=>(0,e.createElement)(H.slots.baseSelectOption,(0,i.A)({},q,{native:Z,key:t.value,value:t.value}),t.label||L.current.getLocaleText(`filterOperator${(0,Tm.A)(t.value)}`)))}))]})),(0,o.jsx)(qT,(0,i.A)({variant:"standard",as:H.slots.baseFormControl},G,Y,{className:Ge(B.valueInput,G.className,Y.className),ownerState:H,children:null!=te&&te.InputComponent?(0,o.jsx)(te.InputComponent,(0,i.A)({apiRef:L,item:g,applyValue:b,focusElementRef:V},te.InputComponentProps,X)):null}))]}))}),JT=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],eE=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(1e5*Math.random())}),tE=e.forwardRef(function(t,n){var r,a;const s=gw(),l=lb(),u=rb(s,dx),c=rb(s,Tb),d=e.useRef(null),p=e.useRef(null),{logicOperators:h=[$A.And,$A.Or],columnsSort:m,filterFormProps:g,getColumnForNewFilter:v,disableAddFilterButton:y=!1,disableRemoveAllButton:b=!1}=t,x=(0,f.A)(t,JT),w=s.current.upsertFilterItem,_=e.useCallback(e=>{s.current.setFilterLogicOperator(e)},[s]),C=e.useCallback(()=>{let e;if(v&&"function"==typeof v){const t=v({currentFilters:(null==u?void 0:u.items)||[],columns:c});if(null===t)return null;e=c.find(({field:e})=>e===t)}else e=c.find(e=>{var t;return null==(t=e.filterOperators)?void 0:t.length});return e?eE(e):null},[null==u?void 0:u.items,c,v]),A=e.useCallback(()=>{if(void 0===v||"function"!=typeof v)return C();const e=u.items.length?u.items:[C()].filter(Boolean),t=v({currentFilters:e,columns:c});if(null===t)return null;const n=c.find(({field:e})=>e===t);return n?eE(n):null},[u.items,c,v,C]),k=e.useMemo(()=>u.items.length?u.items:(p.current||(p.current=C()),p.current?[p.current]:[]),[u.items,C]),S=k.length>1,M=e.useCallback(e=>{const t=1===k.length;s.current.deleteFilterItem(e),t&&s.current.hideFilterPanel()},[s,k.length]);return e.useEffect(()=>{h.length>0&&u.logicOperator&&!h.includes(u.logicOperator)&&_(h[0])},[h,_,u.logicOperator]),e.useEffect(()=>{k.length>0&&d.current.focus()},[k.length]),(0,o.jsxs)(HT,(0,i.A)({ref:n},x,{children:[(0,o.jsx)(LT,{children:k.map((e,t)=>(0,o.jsx)(QT,(0,i.A)({item:e,applyFilterChanges:w,deleteFilter:M,hasMultipleFilters:S,showMultiFilterOperators:t>0,multiFilterOperator:u.logicOperator,disableMultiFilterOperator:1!==t,applyMultiFilterOperatorChanges:_,focusElementRef:t===k.length-1?d:null,logicOperators:h,columnsSort:m},g),null==e.id?t:e.id))}),l.disableMultipleColumnsFiltering||y&&b?null:(0,o.jsxs)($T,{children:[y?(0,o.jsx)("span",{}):(0,o.jsx)(l.slots.baseButton,(0,i.A)({onClick:()=>{const e=A();e&&s.current.upsertFilterItems([...k,e])},startIcon:(0,o.jsx)(l.slots.filterPanelAddIcon,{})},null==(r=l.slotProps)?void 0:r.baseButton,{children:s.current.getLocaleText("filterPanelAddFilter")})),b?null:(0,o.jsx)(l.slots.baseButton,(0,i.A)({onClick:()=>{1===k.length&&void 0===k[0].value&&(s.current.deleteFilterItem(k[0]),s.current.hideFilterPanel()),s.current.setFilterModel((0,i.A)({},u,{items:[]}))},startIcon:(0,o.jsx)(l.slots.filterPanelRemoveAllIcon,{})},null==(a=l.slotProps)?void 0:a.baseButton,{children:s.current.getLocaleText("filterPanelRemoveAll")}))]})]}))});function nE(e){return et("MuiSwitch",e)}const oE=tt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var rE=s(9452),iE=s(8248);const aE=["component","direction","spacing","divider","children","className","useFlexGap"],sE=(0,u.A)(),lE=nx("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function uE(e){return h({props:e,name:"MuiStack",defaultTheme:sE})}function cE(t,n){const o=e.Children.toArray(t).filter(Boolean);return o.reduce((t,r,i)=>(t.push(r),i<o.length-1&&t.push(e.cloneElement(n,{key:`separator-${i}`})),t),[])}const dE=({ownerState:e,theme:t})=>{let n=(0,i.A)({display:"flex",flexDirection:"column"},(0,rE.NI)({theme:t},(0,rE.kW)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){const o=(0,iE.LX)(t),r=Object.keys(t.breakpoints.values).reduce((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t),{}),i=(0,rE.kW)({values:e.direction,base:r}),a=(0,rE.kW)({values:e.spacing,base:r});"object"==typeof i&&Object.keys(i).forEach((e,t,n)=>{if(!i[e]){const o=t>0?i[n[t-1]]:"column";i[e]=o}});const s=(t,n)=>{return e.useFlexGap?{gap:(0,iE._W)(o,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${r=n?i[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[r]}`]:(0,iE._W)(o,t)}};var r};n=(0,g.A)(n,(0,rE.NI)({theme:t},a,s))}return n=(0,rE.iZ)(t.breakpoints,n),n},pE=function(t={}){const{createStyledComponent:n=lE,useThemeProps:r=uE,componentName:a="MuiStack"}=t,s=n(dE),l=e.forwardRef(function(e,t){const n=r(e),l=(0,Rm.A)(n),{component:u="div",direction:c="column",spacing:d=0,divider:p,children:h,className:m,useFlexGap:g=!1}=l,v=(0,f.A)(l,aE),y={direction:c,spacing:d,useFlexGap:g},b=De({root:["root"]},e=>et(a,e),{});return(0,o.jsx)(s,(0,i.A)({as:u,ownerState:y,ref:t,className:Ge(b.root,m)},v,{children:p?cE(h,p):h}))});return l}({createStyledComponent:dt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>om({props:e,name:"MuiStack"})}),hE=pE;function fE(e){return et("MuiFormControlLabel",e)}const mE=tt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),gE=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],vE=dt("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mE.label}`]:t.label},t.root,t[`labelPlacement${Em(n.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>(0,i.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${mE.disabled}`]:{cursor:"default"}},"start"===t.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===t.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===t.labelPlacement&&{flexDirection:"column",marginLeft:16},{[`& .${mE.label}`]:{[`&.${mE.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),yE=dt("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${mE.error}`]:{color:(e.vars||e).palette.error.main}})),bE=e.forwardRef(function(t,n){var r,a;const s=om({props:t,name:"MuiFormControlLabel"}),{className:l,componentsProps:u={},control:c,disabled:d,disableTypography:p,label:h,labelPlacement:m="end",required:g,slotProps:v={}}=s,y=(0,f.A)(s,gE),b=Kw(),x=null!=(r=null!=d?d:c.props.disabled)?r:null==b?void 0:b.disabled,w=null!=g?g:c.props.required,_={disabled:x,required:w};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===c.props[e]&&void 0!==s[e]&&(_[e]=s[e])});const C=Gw({props:s,muiFormControl:b,states:["error"]}),A=(0,i.A)({},s,{disabled:x,labelPlacement:m,required:w,error:C.error}),k=(e=>{const{classes:t,disabled:n,labelPlacement:o,error:r,required:i}=e;return De({root:["root",n&&"disabled",`labelPlacement${Em(o)}`,r&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",r&&"error"]},fE,t)})(A),S=null!=(a=v.typography)?a:u.typography;let M=h;return null==M||M.type===Nm||p||(M=(0,o.jsx)(Nm,(0,i.A)({component:"span"},S,{className:Ge(k.label,null==S?void 0:S.className),children:M}))),(0,o.jsxs)(vE,(0,i.A)({className:Ge(k.root,l),ownerState:A,ref:n},y,{children:[e.cloneElement(c,_),w?(0,o.jsxs)(hE,{display:"block",children:[M,(0,o.jsxs)(yE,{ownerState:A,"aria-hidden":!0,className:k.asterisk,children:[" ","*"]})]}):M]}))}),xE=["className"],wE=nx("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})(({theme:e})=>({padding:e.spacing(1)}));function _E(e){const{className:t}=e,n=(0,f.A)(e,xE),r=lb(),a=(e=>{const{classes:t}=e;return De({root:["panelHeader"]},By,t)})(r);return(0,o.jsx)(wE,(0,i.A)({className:Ge(t,a.root),ownerState:r},n))}const CE=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],AE=dt("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),kE=dt("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${oE.root}`]:{marginRight:e.spacing(.5)}})),SE=(dt(NC)({justifyContent:"flex-end"}),new Intl.Collator),ME=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,PE=["children","className","classes"],IE=tt("MuiDataGrid",["panel","paper"]),RE=dt(am,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),TE=dt(U_,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"})),EE=e.forwardRef((t,n)=>{const{children:r,className:a}=t,s=(0,f.A)(t,PE),l=gw(),u=lb(),c=IE,[d,p]=e.useState(!1),h=e.useCallback(()=>{l.current.hidePreferences()},[l]),m=e.useCallback(e=>{dw(e.key)&&l.current.hidePreferences()},[l]),g=e.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{p(!0)},effect:()=>()=>{p(!1)}}],[]),[v,y]=e.useState(null);return e.useEffect(()=>{var e;const t=null==(e=l.current.rootElementRef)||null==(e=e.current)?void 0:e.querySelector(`.${Vy.columnHeaders}`);t&&y(t)},[l]),v?(0,o.jsx)(RE,(0,i.A)({ref:n,placement:"bottom-start",className:Ge(a,c.panel),ownerState:u,anchorEl:v,modifiers:g},s,{children:(0,o.jsx)(AS,{mouseEvent:"onMouseUp",onClickAway:h,children:(0,o.jsx)(TE,{className:c.paper,ownerState:u,elevation:8,onKeyDown:m,children:d&&r})})})):null});function OE(t){return e.memo(t,Jy)}let LE;const zE=["changeReason","unstable_updateValueOnRender"],jE=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver","style"],$E=["changeReason","unstable_updateValueOnRender"],FE={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Kk.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},NE=e.forwardRef((t,n)=>{const{column:o,rowId:r,editCellState:a}=t,s=gw(),l=lb(),u=o.field,c=rb(s,()=>{try{const e=s.current.getCellParams(r,u);return e.api=s.current,e}catch(e){if(e instanceof sP)return FE;throw e}},nb),d=rb(s,()=>s.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:r,field:u}));if(c===FE)return null;const{cellMode:p,hasFocus:h,isEditable:m,value:g,formattedValue:v}=c,y="actions"===o.type,b="view"!==p&&m||y?-1:c.tabIndex,{classes:x,getCellClassName:w}=l,_=s.current.unstable_applyPipeProcessors("cellClassName",[],{id:r,field:u});let C;if(o.cellClassName&&_.push("function"==typeof o.cellClassName?o.cellClassName(c):o.cellClassName),w&&_.push(w(c)),null==a&&o.renderCell&&(C=o.renderCell(c),_.push(Vy["cell--withRenderer"]),_.push(null==x?void 0:x["cell--withRenderer"])),null!=a&&o.renderEditCell){const e=s.current.getRowWithUpdatedValues(r,o.field),t=(0,f.A)(a,zE),n=(0,i.A)({},c,{row:e},t);C=o.renderEditCell(n),_.push(Vy["cell--editing"]),_.push(null==x?void 0:x["cell--editing"])}const{slots:A}=l,k=A.cell,S=(0,i.A)({},t,{ref:n,field:u,formattedValue:v,hasFocus:h,isEditable:m,isSelected:d,value:g,cellMode:p,children:C,tabIndex:b,className:Ge(_)});return e.createElement(k,S)}),DE=OE(NE),HE=e.forwardRef((t,n)=>{var r,a,s,l;const{column:u,rowId:c,editCellState:d,align:p,colIndex:h,height:m,width:g,className:v,showRightBorder:y,colSpan:b,disableDragEvents:x,isNotVisible:w,onClick:_,onDoubleClick:C,onMouseDown:A,onMouseUp:k,onMouseOver:S,onKeyDown:M,onKeyUp:P,onDragEnter:I,onDragOver:R,style:T}=t,E=(0,f.A)(t,jE),O=gw(),L=lb(),z=u.field,j=rb(O,()=>{try{const e=O.current.getCellParams(c,z);return e.api=O.current,e}catch(e){if(e instanceof sP)return FE;throw e}},nb),$=rb(O,()=>O.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:c,field:z})),{cellMode:F,hasFocus:N,isEditable:D,value:H,formattedValue:B}=j,V="actions"===u.type&&(null==(r=(a=u).getActions)?void 0:r.call(a,O.current.getRowParams(c)).some(e=>!e.props.disabled)),W="view"!==F&&D||V?-1:j.tabIndex,{classes:U,getCellClassName:G}=L,Z=O.current.unstable_applyPipeProcessors("cellClassName",[],{id:c,field:z});u.cellClassName&&Z.push("function"==typeof u.cellClassName?u.cellClassName(j):u.cellClassName),G&&Z.push(G(j));const K=null==B?H:B,q=e.useRef(null),X=Be(n,q),Y=e.useRef(null),Q=null!=(s=L.unstable_cellSelection)&&s,J=(e=>{const{align:t,showRightBorder:n,isEditable:o,isSelected:r,isSelectionMode:i,classes:a}=e;return De({root:["cell",`cell--text${(0,Tm.A)(t)}`,o&&"cell--editable",r&&"selected",n&&"cell--withRightBorder",i&&!o&&"cell--selectionMode","withBorderColor"],content:["cellContent"]},By,a)})({align:p,showRightBorder:y,isEditable:D,classes:L.classes,isSelected:$,isSelectionMode:Q}),ee=e.useCallback(e=>t=>{const n=O.current.getCellParams(c,z||"");O.current.publishEvent(e,n,t),k&&k(t)},[O,z,k,c]),te=e.useCallback(e=>t=>{const n=O.current.getCellParams(c,z||"");O.current.publishEvent(e,n,t),A&&A(t)},[O,z,A,c]),ne=e.useCallback((e,t)=>n=>{if(!O.current.getRow(c))return;const o=O.current.getCellParams(c,z||"");O.current.publishEvent(e,o,n),t&&t(n)},[O,z,c]),oe=e.useMemo(()=>w?(0,i.A)({padding:0,opacity:0,width:0,border:0},T):(0,i.A)({minWidth:g,maxWidth:g,minHeight:m,maxHeight:"auto"===m?"none":m},T),[g,m,w,T]);if(e.useEffect(()=>{if(!N||F===Kk.Edit)return;const e=Cp(O.current.rootElementRef.current);if(q.current&&!q.current.contains(e.activeElement)){const e=q.current.querySelector('[tabindex="0"]'),t=Y.current||e||q.current;if(void 0===LE&&document.createElement("div").focus({get preventScroll(){return LE=!0,!1}}),LE)t.focus({preventScroll:!0});else{const e=O.current.getScrollPosition();t.focus(),O.current.scroll(e)}}},[N,F,O]),j===FE)return null;let re,ie=E.onFocus;if(null==d&&u.renderCell&&(re=u.renderCell(j),Z.push(Vy["cell--withRenderer"]),Z.push(null==U?void 0:U["cell--withRenderer"])),null!=d&&u.renderEditCell){const e=O.current.getRowWithUpdatedValues(c,u.field),t=(0,f.A)(d,$E),n=(0,i.A)({},j,{row:e},t);re=u.renderEditCell(n),Z.push(Vy["cell--editing"]),Z.push(null==U?void 0:U["cell--editing"])}if(void 0===re){const e=null==K?void 0:K.toString();re=(0,o.jsx)("div",{className:J.content,title:e,role:"presentation",children:e})}e.isValidElement(re)&&V&&(re=e.cloneElement(re,{focusElementRef:Y}));const ae=x?null:{onDragEnter:ne("cellDragEnter",I),onDragOver:ne("cellDragOver",R)},se=null==(l=L.experimentalFeatures)?void 0:l.ariaV7;return(0,o.jsx)("div",(0,i.A)({ref:X,className:Ge(v,Z,J.root),role:se?"gridcell":"cell","data-field":z,"data-colindex":h,"aria-colindex":h+1,"aria-colspan":b,style:oe,tabIndex:W,onClick:ne("cellClick",_),onDoubleClick:ne("cellDoubleClick",C),onMouseOver:ne("cellMouseOver",S),onMouseDown:te("cellMouseDown"),onMouseUp:ee("cellMouseUp"),onKeyDown:ne("cellKeyDown",M),onKeyUp:ne("cellKeyUp",P)},ae,E,{onFocus:ie,children:re}))}),BE=OE(HE),VE=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"];function WE({width:e}){if(!e)return null;const t={width:e};return(0,o.jsx)("div",{className:`${Vy.cell} ${Vy.withBorderColor}`,style:t})}const UE=e.forwardRef(function(t,n){const{selected:r,hovered:a,rowId:s,row:l,index:u,style:c,position:d,rowHeight:p,className:h,visibleColumns:m,renderedColumns:g,containerWidth:v,firstColumnToRender:y,isLastVisible:b=!1,focusedCellColumnIndexNotInRange:x,isNotVisible:w,focusedCell:_,onClick:C,onDoubleClick:A,onMouseEnter:k,onMouseLeave:S,onMouseOut:M,onMouseOver:P}=t,I=(0,f.A)(t,VE),R=gw(),T=e.useRef(null),E=lb(),O=zM(R,E),L=rb(R,Rb),z=rb(R,lx),j=rb(R,Zb),$=rb(R,$b),F=rb(R,qM),N=Be(T,n),D=u+$+2,H=(e=>{const{editable:t,editing:n,selected:o,isLastVisible:r,rowHeight:i,classes:a}=e;return De({root:["row",o&&"selected",t&&"row--editable",n&&"row--editing",r&&"row--lastVisible","auto"===i&&"row--dynamicHeight"]},By,a)})({selected:r,hovered:a,isLastVisible:b,classes:E.classes,editing:R.current.getRowMode(s)===qk.Edit,editable:E.editMode===Zk.Row,rowHeight:p});e.useLayoutEffect(()=>{"auto"===p&&T.current&&"undefined"==typeof ResizeObserver&&R.current.unstable_storeRowHeightMeasurement(s,T.current.clientHeight,d)},[R,p,s,d]),e.useLayoutEffect(()=>{if(O.range){const e=R.current.getRowIndexRelativeToVisibleRows(s);null!=e&&R.current.unstable_setLastMeasuredRowIndex(e)}const e=T.current;if(!e||"auto"!==p||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(e=>{const[t]=e,n=t.borderBoxSize&&t.borderBoxSize.length>0?t.borderBoxSize[0].blockSize:t.contentRect.height;R.current.unstable_storeRowHeightMeasurement(s,n,d)});return t.observe(e),()=>t.disconnect()},[R,O.range,u,p,s,d]);const B=e.useCallback((e,t)=>n=>{VM(n)||R.current.getRow(s)&&(R.current.publishEvent(e,R.current.getRowParams(s),n),t&&t(n))},[R,s]),V=e.useCallback(e=>{const t=function(e,t){return e.closest(`.${t}`)}(e.target,Vy.cell),n=null==t?void 0:t.getAttribute("data-field");if(n){if(n===xk.field)return;if(n===$M)return;if("__reorder__"===n)return;if(R.current.getCellMode(s,n)===Kk.Edit)return;const e=R.current.getColumn(n);if((null==e?void 0:e.type)===ZS)return}B("rowClick",C)(e)},[R,C,B,s]),{slots:W,slotProps:U,disableColumnReorder:G}=E,Z=W.cell===BE?BE:DE,K=E.rowReordering,q=(e,t)=>{var n,r;const a=G&&e.disableReorder||!K&&!!z.length&&j>1&&Object.keys(F).length>0,l=null!=(n=null==(r=F[s])?void 0:r[e.field])?n:null;let u=!1;return void 0!==x&&m[x].field===e.field&&(u=!0),(0,o.jsx)(Z,(0,i.A)({column:e,width:t.width,rowId:s,height:p,showRightBorder:t.showRightBorder,align:e.align||"left",colIndex:t.indexRelativeToAllColumns,colSpan:t.colSpan,disableDragEvents:a,editCellState:l,isNotVisible:u},null==U?void 0:U.cell),e.field)},X=rb(R,()=>(0,i.A)({},R.current.unstable_getRowInternalSizes(s)),nb);let Y=p;if("auto"===Y&&X){let e=0;const t=Object.entries(X).reduce((t,[n,o])=>/^base[A-Z]/.test(n)?(e+=1,o>t?o:t):t,0);t>0&&e>1&&(Y=t)}const Q=e.useMemo(()=>{if(w)return{opacity:0,width:0,height:0};const e=(0,i.A)({},c,{maxHeight:"auto"===p?"none":p,minHeight:Y});if(null!=X&&X.spacingTop&&(e["border"===E.rowSpacingType?"borderTopWidth":"marginTop"]=X.spacingTop),null!=X&&X.spacingBottom){const t="border"===E.rowSpacingType?"borderBottomWidth":"marginBottom";let n=e[t];"number"!=typeof n&&(n=parseInt(n||"0",10)),n+=X.spacingBottom,e[t]=n}return e},[w,p,c,Y,X,E.rowSpacingType]),J=R.current.unstable_applyPipeProcessors("rowClassName",[],s);if("function"==typeof E.getRowClassName){var ee;const e=u-((null==(ee=O.range)?void 0:ee.firstRowIndex)||0),t=(0,i.A)({},R.current.getRowParams(s),{isFirstVisible:0===e,isLastVisible:e===O.rows.length-1,indexRelativeToCurrentPage:e});J.push(E.getRowClassName(t))}const te=function(e,t,n){const o=function(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}(e);return()=>t+(n-t)*o()}(1e4,20,80),ne=R.current.getRowNode(s);if(!ne)return null;const oe=ne.type,re=[];for(let e=0;e<g.length;e+=1){const t=g[e];let n=y+e;void 0!==x&&_&&(m[x].field===t.field?n=x:n-=1);const r=R.current.unstable_getCellColSpanInfo(s,n);if(r&&!r.spannedByColSpan)if("skeletonRow"!==oe){const{colSpan:e,width:o}=r.cellProps,i={width:o,colSpan:e,showRightBorder:E.showCellVerticalBorder,indexRelativeToAllColumns:n};re.push(q(t,i))}else{const{width:e}=r.cellProps,n=Math.round(te());re.push((0,o.jsx)(W.skeletonCell,{width:e,contentWidth:n,field:t.field,align:t.align},t.field))}}const ie=v-L,ae=l?{onClick:V,onDoubleClick:B("rowDoubleClick",A),onMouseEnter:B("rowMouseEnter",k),onMouseLeave:B("rowMouseLeave",S),onMouseOut:B("rowMouseOut",M),onMouseOver:B("rowMouseOver",P)}:null;return(0,o.jsxs)("div",(0,i.A)({ref:N,"data-id":s,"data-rowindex":u,role:"row",className:Ge(...J,H.root,h,a&&"Mui-hovered"),"aria-rowindex":D,"aria-selected":r,style:Q},ae,I,{children:[re,ie>0&&(0,o.jsx)(WE,{width:ie})]}))}),GE=OE(UE);function ZE(e){var t;const{direction:n,index:r,sortingOrder:a}=e,s=gw(),l=lb(),u=(e=>{const{classes:t}=e;return De({icon:["sortIcon"]},By,t)})((0,i.A)({},e,{classes:l.classes})),c=function(e,t,n,r){let a;const s={};return"asc"===t?a=e.columnSortedAscendingIcon:"desc"===t?a=e.columnSortedDescendingIcon:(a=e.columnUnsortedIcon,s.sortingOrder=r),a?(0,o.jsx)(a,(0,i.A)({fontSize:"small",className:n},s)):null}(l.slots,n,u.icon,a);if(!c)return null;const d=(0,o.jsx)(l.slots.baseIconButton,(0,i.A)({tabIndex:-1,"aria-label":s.current.getLocaleText("columnHeaderSortIconLabel"),title:s.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},null==(t=l.slotProps)?void 0:t.baseIconButton,{children:c}));return(0,o.jsxs)(zP,{children:[null!=r&&(0,o.jsx)(EP,{badgeContent:r,color:"default",children:d}),null==r&&d]})}const KE=e.memo(ZE),qE=e.memo(t=>{var n,r;const{colDef:a,open:s,columnMenuId:l,columnMenuButtonId:u,iconButtonRef:c}=t,d=gw(),p=lb(),h=(e=>{const{classes:t,open:n}=e;return De({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},By,t)})((0,i.A)({},t,{classes:p.classes})),f=e.useCallback(e=>{e.preventDefault(),e.stopPropagation(),d.current.toggleColumnMenu(a.field)},[d,a.field]);return(0,o.jsx)("div",{className:h.root,children:(0,o.jsx)(p.slots.baseTooltip,(0,i.A)({title:d.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},null==(n=p.slotProps)?void 0:n.baseTooltip,{children:(0,o.jsx)(p.slots.baseIconButton,(0,i.A)({ref:c,tabIndex:-1,className:h.button,"aria-label":d.current.getLocaleText("columnMenuLabel"),size:"small",onClick:f,"aria-haspopup":"menu","aria-expanded":s,"aria-controls":s?l:void 0,id:u},null==(r=p.slotProps)?void 0:r.baseIconButton,{children:(0,o.jsx)(p.slots.columnMenuIcon,{fontSize:"small"})}))}))})});function XE({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:a,open:s,target:l,onExited:u}){const c=gw(),d=c.current.getColumn(a),p=Fw(e=>{e&&(e.stopPropagation(),null!=l&&l.contains(e.target))||c.current.hideColumnMenu()});return l&&d?(0,o.jsx)(WS,{placement:"bottom-"+("right"===d.align?"start":"end"),open:s,target:l,onClose:p,onExited:u,children:(0,o.jsx)(n,(0,i.A)({colDef:d,hideMenu:p,open:s,id:e,labelledby:t},r))}):null}const YE=["className"],QE=nx("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),JE=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,YE),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["columnHeaderTitle"]},By,t)})(a);return(0,o.jsx)(QE,(0,i.A)({ref:t,className:Ge(s.root,n),ownerState:a},r))});function eO(t){var n;const{label:r,description:a}=t,s=lb(),l=e.useRef(null),[u,c]=e.useState(""),d=e.useCallback(()=>{if(!a&&null!=l&&l.current){const t=(e=l.current).scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth;c(t?r:"")}var e},[a,r]);return(0,o.jsx)(s.slots.baseTooltip,(0,i.A)({title:a||u},null==(n=s.slotProps)?void 0:n.baseTooltip,{children:(0,o.jsx)(JE,{onMouseOver:d,ref:l,children:r})}))}const tO=["resizable","resizing","height","side"];var nO=function(e){return e.Left="left",e.Right="right",e}(nO||{});function oO(t){const{height:n,side:r=nO.Right}=t,a=(0,f.A)(t,tO),s=lb(),l=(e=>{const{resizable:t,resizing:n,classes:o,side:r}=e;return De({root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",r&&`columnSeparator--side${(0,Tm.A)(r)}`],icon:["iconSeparator"]},By,o)})((0,i.A)({},t,{side:r,classes:s.classes})),u=e.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,o.jsx)("div",(0,i.A)({className:l.root,style:{minHeight:n,opacity:s.showColumnVerticalBorder?0:1}},a,{onClick:u,children:(0,o.jsx)(s.slots.columnResizeIcon,{className:l.icon})}))}const rO=e.memo(oO),iO=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],aO=e.forwardRef(function(t,n){const{classes:r,columnMenuOpen:a,colIndex:s,height:l,isResizing:u,sortDirection:c,hasFocus:d,tabIndex:p,separatorSide:h,isDraggable:m,headerComponent:g,description:v,width:y,columnMenuIconButton:b=null,columnMenu:x=null,columnTitleIconButtons:w=null,headerClassName:_,label:C,resizable:A,draggableContainerProps:k,columnHeaderSeparatorProps:S}=t,M=(0,f.A)(t,iO),P=ab(),I=lb(),R=e.useRef(null),[T,E]=e.useState(a),O=Be(R,n);let L="none";return null!=c&&(L="asc"===c?"ascending":"descending"),e.useEffect(()=>{T||E(a)},[T,a]),e.useLayoutEffect(()=>{const e=P.current.state.columnMenu;if(d&&!e.open){const e=R.current.querySelector('[tabindex="0"]')||R.current;null==e||e.focus(),P.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[P,d]),(0,o.jsxs)("div",(0,i.A)({ref:O,className:Ge(r.root,_),style:{height:l,width:y,minWidth:y,maxWidth:y},role:"columnheader",tabIndex:p,"aria-colindex":s+1,"aria-sort":L,"aria-label":null==g?C:void 0},M,{children:[(0,o.jsxs)("div",(0,i.A)({className:r.draggableContainer,draggable:m,role:"presentation"},k,{children:[(0,o.jsxs)("div",{className:r.titleContainer,role:"presentation",children:[(0,o.jsx)("div",{className:r.titleContainerContent,children:void 0!==g?g:(0,o.jsx)(eO,{label:C,description:v,columnWidth:y})}),w]}),b]})),(0,o.jsx)(rO,(0,i.A)({resizable:!I.disableColumnResize&&!!A,resizing:u,height:l,side:h},S)),x]}))});function sO(t){var n,r,a,s;const{colDef:l,columnMenuOpen:u,colIndex:c,headerHeight:d,isResizing:p,sortDirection:h,sortIndex:f,filterItemsCounter:m,hasFocus:g,tabIndex:v,disableReorder:y,separatorSide:b}=t,x=ab(),w=lb(),_=e.useRef(null),C=Bi(),A=Bi(),k=e.useRef(null),[S,M]=e.useState(u),P=e.useMemo(()=>!w.disableColumnReorder&&!y&&!l.disableReorder,[w.disableColumnReorder,y,l.disableReorder]);let I;l.renderHeader&&(I=l.renderHeader(x.current.getColumnHeaderParams(l.field)));const R=(e=>{const{colDef:t,classes:n,isDragging:o,sortDirection:r,showRightBorder:i,filterItemsCounter:a}=e,s=null!=r,l=null!=a&&a>0,u="number"===t.type;return De({root:["columnHeader","left"===t.headerAlign&&"columnHeader--alignLeft","center"===t.headerAlign&&"columnHeader--alignCenter","right"===t.headerAlign&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",o&&"columnHeader--moving",s&&"columnHeader--sorted",l&&"columnHeader--filtered",u&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]},By,n)})((0,i.A)({},t,{classes:w.classes,showRightBorder:w.showColumnVerticalBorder})),T=e.useCallback(e=>t=>{VM(t)||x.current.publishEvent(e,x.current.getColumnHeaderParams(l.field),t)},[x,l.field]),E=e.useMemo(()=>({onClick:T("columnHeaderClick"),onDoubleClick:T("columnHeaderDoubleClick"),onMouseOver:T("columnHeaderOver"),onMouseOut:T("columnHeaderOut"),onMouseEnter:T("columnHeaderEnter"),onMouseLeave:T("columnHeaderLeave"),onKeyDown:T("columnHeaderKeyDown"),onFocus:T("columnHeaderFocus"),onBlur:T("columnHeaderBlur")}),[T]),O=e.useMemo(()=>P?{onDragStart:T("columnHeaderDragStart"),onDragEnter:T("columnHeaderDragEnter"),onDragOver:T("columnHeaderDragOver"),onDragEnd:T("columnHeaderDragEnd")}:{},[P,T]),L=e.useMemo(()=>({onMouseDown:T("columnSeparatorMouseDown"),onDoubleClick:T("columnSeparatorDoubleClick")}),[T]);e.useEffect(()=>{S||M(u)},[S,u]);const z=e.useCallback(()=>{M(!1)},[]),j=!w.disableColumnMenu&&!l.disableColumnMenu&&(0,o.jsx)(qE,{colDef:l,columnMenuId:C,columnMenuButtonId:A,open:S,iconButtonRef:k}),$=(0,o.jsx)(XE,{columnMenuId:C,columnMenuButtonId:A,field:l.field,open:u,target:k.current,ContentComponent:w.slots.columnMenu,contentComponentProps:null==(n=w.slotProps)?void 0:n.columnMenu,onExited:z}),F=null!=(r=l.sortingOrder)?r:w.sortingOrder,N=(0,o.jsxs)(e.Fragment,{children:[!w.disableColumnFilter&&(0,o.jsx)(w.slots.columnHeaderFilterIconButton,(0,i.A)({field:l.field,counter:m},null==(a=w.slotProps)?void 0:a.columnHeaderFilterIconButton)),l.sortable&&!l.hideSortIcons&&(0,o.jsx)(KE,{direction:h,index:f,sortingOrder:F})]});e.useLayoutEffect(()=>{const e=x.current.state.columnMenu;if(g&&!e.open){var t;const e=_.current.querySelector('[tabindex="0"]')||_.current;null==e||e.focus(),null!=(t=x.current.columnHeadersContainerElementRef)&&t.current&&(x.current.columnHeadersContainerElementRef.current.scrollLeft=0)}},[x,g]);const D="function"==typeof l.headerClassName?l.headerClassName({field:l.field,colDef:l}):l.headerClassName,H=null!=(s=l.headerName)?s:l.field;return(0,o.jsx)(aO,(0,i.A)({ref:_,classes:R,columnMenuOpen:u,colIndex:c,height:d,isResizing:p,sortDirection:h,hasFocus:g,tabIndex:v,separatorSide:b,isDraggable:P,headerComponent:I,description:l.description,elementId:l.field,width:l.computedWidth,columnMenuIconButton:j,columnTitleIconButtons:N,headerClassName:D,label:H,resizable:!w.disableColumnResize&&!!l.resizable,"data-field":l.field,columnMenu:$,draggableContainerProps:O,columnHeaderSeparatorProps:L},E))}const lO=e=>e.virtualization,uO=vb(lO,e=>e.enabled),cO=vb(lO,e=>e.enabledForColumns),dO=["style"],pO=["style"];function hO(e,t,n=0,o=t.length){if(t.length<=0)return-1;if(n>=o)return n;const r=n+Math.floor((o-n)/2);return e<=t[r]?hO(e,t,n,r):hO(e,t,r+1,o)}const fO=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:o,maxLastIndex:r})=>[Fx(e-n,o,r),Fx(t+n,o,r)],mO=(e,t)=>e===t||e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,gO={maxSize:3};function vO(e,t,n,o){var r,i;const a=e.current.getLastMeasuredRowIndex();let s=a===1/0;null!=(r=t.range)&&r.lastRowIndex&&!s&&(s=a>=t.range.lastRowIndex);const l=Fx(a-((null==(i=t.range)?void 0:i.firstRowIndex)||0),0,n.positions.length);return s||n.positions[l]>=o?hO(o,n.positions):function(e,t,n){let o=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=o,o*=2;return hO(e,t,Math.floor(n/2),Math.min(n,t.length))}(o,n.positions,l)}function yO(t){var n;const{groupId:r,width:a,depth:s,maxDepth:l,fields:u,height:c,colIndex:d,hasFocus:p,tabIndex:h,isLastColumn:f}=t,m=lb(),g=e.useRef(null),v=gw(),y=rb(v,zb),b=r?y[r]:{},{headerName:x=(null!=r?r:""),description:w="",headerAlign:_}=b;let C;const A=r&&(null==(n=y[r])?void 0:n.renderHeaderGroup),k=e.useMemo(()=>({groupId:r,headerName:x,description:w,depth:s,maxDepth:l,fields:u,colIndex:d,isLastColumn:f}),[r,x,w,s,l,u,d,f]);r&&A&&(C=A(k));const S=m.showColumnVerticalBorder,M=(0,i.A)({},t,{classes:m.classes,showColumnBorder:S,headerAlign:_,depth:s,isDragging:!1}),P=null!=x?x:r,I=Bi(),R=null===r?`empty-group-cell-${I}`:r,T=(e=>{const{classes:t,headerAlign:n,isDragging:o,showColumnBorder:r,groupId:i}=e;return De({root:["columnHeader","left"===n&&"columnHeader--alignLeft","center"===n&&"columnHeader--alignCenter","right"===n&&"columnHeader--alignRight",o&&"columnHeader--moving",r&&"columnHeader--showColumnBorder",r&&"columnHeader--withRightBorder","withBorderColor",null===i?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},By,t)})(M);e.useLayoutEffect(()=>{if(p){const e=g.current.querySelector('[tabindex="0"]')||g.current;null==e||e.focus()}},[v,p]);const E=e.useCallback(e=>t=>{VM(t)||v.current.publishEvent(e,k,t)},[v,k]),O=e.useMemo(()=>({onKeyDown:E("columnGroupHeaderKeyDown"),onFocus:E("columnGroupHeaderFocus"),onBlur:E("columnGroupHeaderBlur")}),[E]),L="function"==typeof b.headerClassName?b.headerClassName(k):b.headerClassName;return(0,o.jsx)(aO,(0,i.A)({ref:g,classes:T,columnMenuOpen:!1,colIndex:d,height:c,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:h,isDraggable:!1,headerComponent:C,headerClassName:L,description:w,elementId:R,width:a,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:P,"aria-colspan":u.length,"data-fields":`|-${u.join("-|-")}-|`},O))}const bO=dt("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})(()=>({display:"flex"})),xO=["className"],wO=nx("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),_O=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,xO),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["columnHeaders","withBorderColor"]},By,t)})(a);return(0,o.jsx)(wO,(0,i.A)({ref:t,className:Ge(n,s.root),ownerState:a},r,{role:"presentation"}))}),CO=["isDragging","className"],AO=nx("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${Vy.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})(()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${Vy.columnHeaderDropZone} .${Vy.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${Vy["columnHeadersInner--scrollable"]} .${Vy.columnHeader}:last-child`]:{borderRight:"none"}})),kO=e.forwardRef(function(e,t){var n,r;const{isDragging:a,className:s}=e,l=(0,f.A)(e,CO),u=gw(),c=lb(),d=(0,i.A)({},c,{isDragging:a,hasScrollX:null!=(n=null==(r=u.current.getRootDimensions())?void 0:r.hasScrollX)&&n}),p=(e=>{const{isDragging:t,hasScrollX:n,classes:o}=e;return De({root:["columnHeadersInner",t&&"columnHeaderDropZone",n&&"columnHeadersInner--scrollable"]},By,o)})(d);return(0,o.jsx)(AO,(0,i.A)({ref:t,className:Ge(s,p.root),ownerState:d},l))}),SO=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],MO=e.forwardRef(function(t,n){const{innerRef:r,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:u,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:d,columnHeaderFocus:p,columnGroupHeaderFocus:h,densityFactor:m,headerGroupingMaxDepth:g,columnMenuState:v,columnVisibility:y,columnGroupsHeaderStructure:b,hasOtherElementInTabSequence:x}=t,w=(0,f.A)(t,SO),{isDragging:_,getRootProps:C,getInnerProps:A,getColumnHeaders:k,getColumnGroupHeaders:S}=(t=>{const{innerRef:n,minColumnIndex:r=0,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:u,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:d,columnHeaderFocus:p,columnGroupHeaderFocus:h,densityFactor:f,headerGroupingMaxDepth:m,columnMenuState:g,columnVisibility:v,columnGroupsHeaderStructure:y,hasOtherElementInTabSequence:b}=t,x=ss(),[w,_]=e.useState(""),[C,A]=e.useState(""),k=ab(),S=rb(k,cO),M=lb(),P=e.useRef(null),I=Be(n,P),[R,T]=e.useState(null),E=e.useRef(R),O=e.useRef(0),L=zM(k,M),z=oM(k,M.columnHeaderHeight),j=Math.floor(M.columnHeaderHeight*f),$=e.useCallback(e=>{R&&e&&mO(R,e)||T(e)},[R]);e.useEffect(()=>{var e;null!=(e=k.current.columnHeadersContainerElementRef)&&e.current&&(k.current.columnHeadersContainerElementRef.current.scrollLeft=0)},[k]);const F=e.useRef(db(nM,{equalityCheck:(e,t)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every(n=>e[n]===t[n])})),N=e.useCallback(e=>{const[t,n]=fO({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:L.rows.length,buffer:M.rowBuffer}),o=F.current({firstColumnIndex:e.firstColumnIndex,minColumnIndex:r,columnBuffer:M.columnBuffer,firstRowToRender:t,lastRowToRender:n,apiRef:k,visibleRows:L.rows}),i="ltr"===x.direction?1:-1,a=o>0?O.current-i*u[o]:O.current;P.current.style.transform=`translate3d(${-a}px, 0px, 0px)`},[u,r,M.columnBuffer,k,L.rows,M.rowBuffer,x.direction]);e.useLayoutEffect(()=>{R&&N(R)},[R,N]);const D=e.useCallback(({left:e,renderContext:t=null},n)=>{var o,r;if(!P.current)return;if(O.current===e&&(null==(o=E.current)?void 0:o.firstColumnIndex)===(null==t?void 0:t.firstColumnIndex)&&(null==(r=E.current)?void 0:r.lastColumnIndex)===(null==t?void 0:t.lastColumnIndex))return;O.current=e;let i=!1;t===E.current&&E.current?i=!0:(function(e){return!!e.target}(n)?(Fr.flushSync(()=>{$(t)}),i=!0):$(t),E.current=t),t&&i&&N(t)},[N,$]),H=e.useCallback(e=>A(e.field),[]),B=e.useCallback(()=>A(""),[]),V=e.useCallback(e=>_(e.field),[]),W=e.useCallback(()=>_(""),[]);Qx(k,"columnResizeStart",H),Qx(k,"columnResizeStop",B),Qx(k,"columnHeaderDragStart",V),Qx(k,"columnHeaderDragEnd",W),Qx(k,"scrollPositionChange",D);const U=e=>{const{renderContext:t=R,minFirstColumn:n=r,maxLastColumn:o=a.length}=e||{};if(!t)return null;const[i,s]=fO({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:L.rows.length,buffer:M.rowBuffer}),l=S?F.current({firstColumnIndex:t.firstColumnIndex,minColumnIndex:n,columnBuffer:M.columnBuffer,apiRef:k,firstRowToRender:i,lastRowToRender:s,visibleRows:L.rows}):0,u=S?Math.min(t.lastColumnIndex+M.columnBuffer,o):o;return{renderedColumns:a.slice(l,u),firstColumnToRender:l,lastColumnToRender:u,minFirstColumn:n,maxLastColumn:o}},G={minHeight:z,maxHeight:z,lineHeight:`${j}px`};return{renderContext:R,getColumnHeaders:(e,t={})=>{const n=U(e);if(null==n)return null;const{renderedColumns:r,firstColumnToRender:a}=n,u=[];for(let e=0;e<r.length;e+=1){const n=r[e],d=a+e,h=0===d,f=null!==c&&c.field===n.field||h&&!b?0:-1,m=null!==p&&p.field===n.field,v=g.open&&g.field===n.field;u.push((0,o.jsx)(sO,(0,i.A)({},s[n.field],{columnMenuOpen:v,filterItemsCounter:l[n.field]&&l[n.field].length,headerHeight:j,isDragging:n.field===w,colDef:n,colIndex:d,isResizing:C===n.field,hasFocus:m,tabIndex:f},t),n.field))}return(0,o.jsx)(bO,{role:"row","aria-rowindex":m+1,ownerState:M,children:u})},getColumnsToRender:U,getColumnGroupHeaders:e=>{if(0===m)return null;const t=U(e);if(null==t||0===t.renderedColumns.length)return null;const{firstColumnToRender:n,lastColumnToRender:r}=t,s=[],l=[];for(let e=0;e<m;e+=1){var u,c;const t=y[e],o=a[n].field,s=null!=(u=k.current.unstable_getColumnGroupPath(o)[e])?u:null,p=t.findIndex(({groupId:e,columnFields:t})=>e===s&&t.includes(o)),f=a[r-1].field,m=null!=(c=k.current.unstable_getColumnGroupPath(f)[e])?c:null,g=t.findIndex(({groupId:e,columnFields:t})=>e===m&&t.includes(f)),b=t.slice(p,g+1).map(e=>(0,i.A)({},e,{columnFields:e.columnFields.filter(e=>!1!==v[e])})).filter(e=>e.columnFields.length>0),x=b[0].columnFields.indexOf(o),w=b[0].columnFields.slice(0,x).reduce((e,t)=>{var n;return e+(null!=(n=k.current.getColumn(t).computedWidth)?n:0)},0);let _=n;const C=b.map(({groupId:t,columnFields:n})=>{const o=null!==h&&h.depth===e&&n.includes(h.field),r=null!==d&&d.depth===e&&n.includes(d.field)?0:-1,i={groupId:t,width:n.reduce((e,t)=>e+k.current.getColumn(t).computedWidth,0),fields:n,colIndex:_,hasFocus:o,tabIndex:r};return _+=n.length,i});l.push({leftOverflow:w,elements:C})}return l.forEach((e,t)=>{s.push((0,o.jsx)(bO,{style:{height:`${j}px`,transform:`translateX(-${e.leftOverflow}px)`},role:"row","aria-rowindex":t+1,ownerState:M,children:e.elements.map(({groupId:e,width:n,fields:r,colIndex:i,hasFocus:s,tabIndex:u},c)=>(0,o.jsx)(yO,{groupId:e,width:n,fields:r,colIndex:i,depth:t,isLastColumn:i===a.length-r.length,maxDepth:l.length,height:j,hasFocus:s,tabIndex:u},c))},t))}),s},isDragging:!!w,getRootProps:(e={})=>(0,i.A)({style:G},e),getInnerProps:()=>({ref:I,role:"rowgroup"}),headerHeight:j}})({innerRef:r,visibleColumns:a,sortColumnLookup:s,filterColumnLookup:l,columnPositions:u,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:d,columnHeaderFocus:p,columnGroupHeaderFocus:h,densityFactor:m,headerGroupingMaxDepth:g,columnMenuState:v,columnVisibility:y,columnGroupsHeaderStructure:b,hasOtherElementInTabSequence:x});return(0,o.jsx)(_O,(0,i.A)({ref:n},C(w),{children:(0,o.jsxs)(kO,(0,i.A)({isDragging:_},A(),{children:[S(),k()]}))}))}),PO=OE(MO),IO=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],RO=dt("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>(0,i.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,x.X4)(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>(0,i.A)({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>(0,i.A)({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>(0,i.A)({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>(0,i.A)({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),TO=dt("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>(0,i.A)({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),EO=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiDivider"}),{absolute:r=!1,children:a,className:s,component:l=(a?"div":"hr"),flexItem:u=!1,light:c=!1,orientation:d="horizontal",role:p=("hr"!==l?"separator":void 0),textAlign:h="center",variant:m="fullWidth"}=n,g=(0,f.A)(n,IO),v=(0,i.A)({},n,{absolute:r,component:l,flexItem:u,light:c,orientation:d,role:p,textAlign:h,variant:m}),y=(e=>{const{absolute:t,children:n,classes:o,flexItem:r,light:i,orientation:a,textAlign:s,variant:l}=e;return De({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",r&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},dM,o)})(v);return(0,o.jsx)(RO,(0,i.A)({as:l,className:Ge(y.root,s),role:p,ref:t,ownerState:v},g,{children:a?(0,o.jsx)(TO,{className:y.wrapper,ownerState:v,children:a}):null}))});EO.muiSkipListHighlight=!0;const OO=EO,LO=["displayOrder"],zO=["hideMenu","colDef","id","labelledby","className","children","open"],jO=dt(_S)(()=>({minWidth:248})),$O=e.forwardRef(function(t,n){const{hideMenu:r,id:a,labelledby:s,className:l,children:u,open:c}=t,d=(0,f.A)(t,zO),p=e.useCallback(e=>{var t;pw(e.key)&&e.preventDefault(),t=e.key,(pw(t)||dw(t))&&r(e)},[r]);return(0,o.jsx)(jO,(0,i.A)({id:a,ref:n,className:Ge(Vy.menuList,l),"aria-labelledby":s,onKeyDown:p,autoFocus:c},d,{children:u}))}),FO=["className"],NO=dt("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>(0,i.A)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),DO=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiListItemIcon"}),{className:a}=r,s=(0,f.A)(r,FO),l=e.useContext(cS),u=(0,i.A)({},r,{alignItems:l.alignItems}),c=(e=>{const{alignItems:t,classes:n}=e;return De({root:["root","flex-start"===t&&"alignItemsFlexStart"]},hM,n)})(u);return(0,o.jsx)(NO,(0,i.A)({className:Ge(c.root,a),ownerState:u,ref:n},s))}),HO=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],BO=dt("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${gM.primary}`]:t.primary},{[`& .${gM.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>(0,i.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),VO=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiListItemText"}),{children:a,className:s,disableTypography:l=!1,inset:u=!1,primary:c,primaryTypographyProps:d,secondary:p,secondaryTypographyProps:h}=r,m=(0,f.A)(r,HO),{dense:g}=e.useContext(cS);let v=null!=c?c:a,y=p;const b=(0,i.A)({},r,{disableTypography:l,inset:u,primary:!!v,secondary:!!y,dense:g}),x=(e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return De({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},mM,t)})(b);return null==v||v.type===Nm||l||(v=(0,o.jsx)(Nm,(0,i.A)({variant:g?"body2":"body1",className:x.primary,component:null!=d&&d.variant?void 0:"span",display:"block"},d,{children:v}))),null==y||y.type===Nm||l||(y=(0,o.jsx)(Nm,(0,i.A)({variant:"body2",className:x.secondary,color:"text.secondary",display:"block"},h,{children:y}))),(0,o.jsxs)(BO,(0,i.A)({className:Ge(x.root,s),ownerState:b,ref:n},m,{children:[v,y]}))});function WO(t){const{colDef:n,onClick:r}=t,i=gw(),a=lb(),s=1===Mb(i).filter(e=>!0!==e.disableColumnMenu).length,l=e.useCallback(e=>{s||(i.current.setColumnVisibility(n.field,!1),r(e))},[i,n.field,r,s]);return a.disableColumnSelector||!1===n.hideable?null:(0,o.jsxs)(wM,{onClick:l,disabled:s,children:[(0,o.jsx)(DO,{children:(0,o.jsx)(a.slots.columnMenuHideIcon,{fontSize:"small"})}),(0,o.jsx)(VO,{children:i.current.getLocaleText("columnMenuHideColumn")})]})}function UO(t){const{onClick:n}=t,r=gw(),i=lb(),a=e.useCallback(e=>{n(e),r.current.showPreferences(rM.columns)},[r,n]);return i.disableColumnSelector?null:(0,o.jsxs)(wM,{onClick:a,children:[(0,o.jsx)(DO,{children:(0,o.jsx)(i.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),(0,o.jsx)(VO,{children:r.current.getLocaleText("columnMenuManageColumns")})]})}const GO=["defaultSlots","defaultSlotProps","slots","slotProps"],ZO={columnMenuSortItem:function(t){var n;const{colDef:r,onClick:i}=t,a=gw(),s=rb(a,lx),l=lb(),u=e.useMemo(()=>{if(!r)return null;const e=s.find(e=>e.field===r.field);return null==e?void 0:e.sort},[r,s]),c=null!=(n=r.sortingOrder)?n:l.sortingOrder,d=e.useCallback(e=>{i(e);const t=e.currentTarget.getAttribute("data-value")||null;a.current.sortColumn(r,t===u?null:t)},[a,r,i,u]);if(!r||!r.sortable||!c.some(e=>!!e))return null;const p=e=>{const t=a.current.getLocaleText(e);return"function"==typeof t?t(r):t};return(0,o.jsxs)(e.Fragment,{children:[c.includes("asc")&&"asc"!==u?(0,o.jsxs)(wM,{onClick:d,"data-value":"asc",children:[(0,o.jsx)(DO,{children:(0,o.jsx)(l.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),(0,o.jsx)(VO,{children:p("columnMenuSortAsc")})]}):null,c.includes("desc")&&"desc"!==u?(0,o.jsxs)(wM,{onClick:d,"data-value":"desc",children:[(0,o.jsx)(DO,{children:(0,o.jsx)(l.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),(0,o.jsx)(VO,{children:p("columnMenuSortDesc")})]}):null,c.includes(null)&&null!=u?(0,o.jsxs)(wM,{onClick:d,children:[(0,o.jsx)(DO,{}),(0,o.jsx)(VO,{children:a.current.getLocaleText("columnMenuUnsort")})]}):null]})},columnMenuFilterItem:function(t){const{colDef:n,onClick:r}=t,i=gw(),a=lb(),s=e.useCallback(e=>{r(e),i.current.showFilterPanel(n.field)},[i,n.field,r]);return a.disableColumnFilter||!n.filterable?null:(0,o.jsxs)(wM,{onClick:s,children:[(0,o.jsx)(DO,{children:(0,o.jsx)(a.slots.columnMenuFilterIcon,{fontSize:"small"})}),(0,o.jsx)(VO,{children:i.current.getLocaleText("columnMenuFilter")})]})},columnMenuColumnsItem:function(t){return(0,o.jsxs)(e.Fragment,{children:[(0,o.jsx)(WO,(0,i.A)({},t)),(0,o.jsx)(UO,(0,i.A)({},t))]})}},KO={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},qO=e.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:a,slots:s,slotProps:l}=t,u=(0,f.A)(t,GO),c=(t=>{const n=ab(),{defaultSlots:o,defaultSlotProps:r,slots:a={},slotProps:s={},hideMenu:l,colDef:u,addDividers:c=!0}=t,d=e.useMemo(()=>(0,i.A)({},o,a),[o,a]),p=e.useMemo(()=>{if(!s||0===Object.keys(s).length)return r;const e=(0,i.A)({},s);return Object.entries(r).forEach(([t,n])=>{e[t]=(0,i.A)({},n,s[t]||{})}),e},[r,s]),h=n.current.unstable_applyPipeProcessors("columnMenu",[],t.colDef),m=e.useMemo(()=>{const e=Object.keys(o);return Object.keys(a).filter(t=>!e.includes(t))},[a,o]);return e.useMemo(()=>{const e=Array.from(new Set([...h,...m])).filter(e=>null!=d[e]).sort((e,t)=>{const n=p[e],o=p[t];return(Number.isFinite(null==n?void 0:n.displayOrder)?n.displayOrder:100)-(Number.isFinite(null==o?void 0:o.displayOrder)?o.displayOrder:100)});return e.reduce((t,n,o)=>{let r={colDef:u,onClick:l};const a=p[n];if(a){const e=(0,f.A)(a,LO);r=(0,i.A)({},r,e)}return c&&o!==e.length-1?[...t,[d[n],r],[OO,{}]]:[...t,[d[n],r]]},[])},[c,u,h,l,d,p,m])})((0,i.A)({},u,{defaultSlots:r,defaultSlotProps:a,slots:s,slotProps:l}));return(0,o.jsx)($O,(0,i.A)({ref:n},u,{children:c.map(([e,t],n)=>(0,o.jsx)(e,(0,i.A)({},t),n))}))}),XO=e.forwardRef(function(e,t){return(0,o.jsx)(qO,(0,i.A)({},e,{ref:t,defaultSlots:ZO,defaultSlotProps:KO}))}),YO=e.forwardRef(function(e,t){const n=gw().current.getLocaleText("noResultsOverlayLabel");return(0,o.jsx)(uI,(0,i.A)({ref:t},e,{children:n}))});function QO(e){return et("PrivateSwitchBase",e)}tt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const JO=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],eL=dt(OC,{name:"MuiSwitchBase"})(({ownerState:e})=>(0,i.A)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),tL=dt("input",{name:"MuiSwitchBase",shouldForwardProp:ct})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),nL=e.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:a,className:s,defaultChecked:l,disabled:u,disableFocusRipple:c=!1,edge:d=!1,icon:p,id:h,inputProps:m,inputRef:g,name:v,onBlur:y,onChange:b,onFocus:x,readOnly:w,required:_=!1,tabIndex:C,type:A,value:k}=e,S=(0,f.A)(e,JO),[M,P]=hR({controlled:r,default:Boolean(l),name:"SwitchBase",state:"checked"}),I=Kw();let R=u;I&&void 0===R&&(R=I.disabled);const T="checkbox"===A||"radio"===A,E=(0,i.A)({},e,{checked:M,disabled:R,disableFocusRipple:c,edge:d}),O=(e=>{const{classes:t,checked:n,disabled:o,edge:r}=e;return De({root:["root",n&&"checked",o&&"disabled",r&&`edge${Em(r)}`],input:["input"]},QO,t)})(E);return(0,o.jsxs)(eL,(0,i.A)({component:"span",className:Ge(O.root,s),centerRipple:!0,focusRipple:!c,disabled:R,tabIndex:null,role:void 0,onFocus:e=>{x&&x(e),I&&I.onFocus&&I.onFocus(e)},onBlur:e=>{y&&y(e),I&&I.onBlur&&I.onBlur(e)},ownerState:E,ref:t},S,{children:[(0,o.jsx)(tL,(0,i.A)({autoFocus:n,checked:r,defaultChecked:l,className:O.input,disabled:R,id:T?h:void 0,name:v,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;P(t),b&&b(e,t)},readOnly:w,ref:g,required:_,ownerState:E,tabIndex:C,type:A},"checkbox"===A&&void 0===k?{}:{value:k},m)),M?a:p]}))}),oL=nL,rL=UC((0,o.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),iL=UC((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),aL=UC((0,o.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function sL(e){return et("MuiCheckbox",e)}const lL=tt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),uL=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],cL=dt(oL,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Em(n.size)}`],"default"!==n.color&&t[`color${Em(n.color)}`]]}})(({theme:e,ownerState:t})=>(0,i.A)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${lL.checked}, &.${lL.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${lL.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),dL=(0,o.jsx)(iL,{}),pL=(0,o.jsx)(rL,{}),hL=(0,o.jsx)(aL,{}),fL=e.forwardRef(function(t,n){var r,a;const s=om({props:t,name:"MuiCheckbox"}),{checkedIcon:l=dL,color:u="primary",icon:c=pL,indeterminate:d=!1,indeterminateIcon:p=hL,inputProps:h,size:m="medium",className:g}=s,v=(0,f.A)(s,uL),y=d?p:c,b=d?p:l,x=(0,i.A)({},s,{color:u,indeterminate:d,size:m}),w=(e=>{const{classes:t,indeterminate:n,color:o,size:r}=e,a=De({root:["root",n&&"indeterminate",`color${Em(o)}`,`size${Em(r)}`]},sL,t);return(0,i.A)({},t,a)})(x);return(0,o.jsx)(cL,(0,i.A)({type:"checkbox",inputProps:(0,i.A)({"data-indeterminate":d},h),icon:e.cloneElement(y,{fontSize:null!=(r=y.props.fontSize)?r:m}),checkedIcon:e.cloneElement(b,{fontSize:null!=(a=b.props.fontSize)?a:m}),ownerState:x,ref:n,className:Ge(w.root,g)},v,{classes:w}))}),mL=fL;function gL(e){return et("MuiFormLabel",e)}const vL=tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),yL=["children","className","color","component","disabled","error","filled","focused","required"],bL=dt("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,i.A)({},t.root,"secondary"===e.color&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>(0,i.A)({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${vL.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${vL.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${vL.error}`]:{color:(e.vars||e).palette.error.main}})),xL=dt("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${vL.error}`]:{color:(e.vars||e).palette.error.main}})),wL=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiFormLabel"}),{children:r,className:a,component:s="label"}=n,l=(0,f.A)(n,yL),u=Gw({props:n,muiFormControl:Kw(),states:["color","required","focused","disabled","error","filled"]}),c=(0,i.A)({},n,{color:u.color||"primary",component:s,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=(e=>{const{classes:t,color:n,focused:o,disabled:r,error:i,filled:a,required:s}=e;return De({root:["root",`color${Em(n)}`,r&&"disabled",i&&"error",a&&"filled",o&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]},gL,t)})(c);return(0,o.jsxs)(bL,(0,i.A)({as:s,ownerState:c,className:Ge(d.root,a),ref:t},l,{children:[r,u.required&&(0,o.jsxs)(xL,{ownerState:c,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),_L=wL;function CL(e){return et("MuiInputLabel",e)}tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const AL=["disableAnimation","margin","shrink","variant","className"],kL=dt(_L,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${vL.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(({theme:e,ownerState:t})=>(0,i.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===t.size&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},"filled"===t.variant&&(0,i.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&(0,i.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===t.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===t.variant&&(0,i.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===t.size&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),SL=e.forwardRef(function(e,t){const n=om({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:a,className:s}=n,l=(0,f.A)(n,AL),u=Kw();let c=a;void 0===c&&u&&(c=u.filled||u.focused||u.adornedStart);const d=Gw({props:n,muiFormControl:u,states:["size","variant","required","focused"]}),p=(0,i.A)({},n,{disableAnimation:r,formControl:u,shrink:c,size:d.size,variant:d.variant,required:d.required,focused:d.focused}),h=(e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:a,variant:s,required:l}=e,u=De({root:["root",n&&"formControl",!a&&"animated",r&&"shrink",o&&"normal"!==o&&`size${Em(o)}`,s],asterisk:[l&&"asterisk"]},CL,t);return(0,i.A)({},t,u)})(p);return(0,o.jsx)(kL,(0,i.A)({"data-shrink":c,ownerState:p,ref:t,className:Ge(h.root,s)},l,{classes:h}))}),ML=function(t,n){var o,r;return e.isValidElement(t)&&-1!==n.indexOf(null!=(o=t.type.muiName)?o:null==(r=t.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)};function PL(e){return et("MuiFormControl",e)}tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const IL=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],RL=dt("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>(0,i.A)({},t.root,t[`margin${Em(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>(0,i.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===e.margin&&{marginTop:16,marginBottom:8},"dense"===e.margin&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),TL=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiFormControl"}),{children:a,className:s,color:l="primary",component:u="div",disabled:c=!1,error:d=!1,focused:p,fullWidth:h=!1,hiddenLabel:m=!1,margin:g="none",required:v=!1,size:y="medium",variant:b="outlined"}=r,x=(0,f.A)(r,IL),w=(0,i.A)({},r,{color:l,component:u,disabled:c,error:d,fullWidth:h,hiddenLabel:m,margin:g,required:v,size:y,variant:b}),_=(e=>{const{classes:t,margin:n,fullWidth:o}=e;return De({root:["root","none"!==n&&`margin${Em(n)}`,o&&"fullWidth"]},PL,t)})(w),[C,A]=e.useState(()=>{let t=!1;return a&&e.Children.forEach(a,e=>{if(!ML(e,["Input","Select"]))return;const n=ML(e,["Select"])?e.props.input:e;n&&n.props.startAdornment&&(t=!0)}),t}),[k,S]=e.useState(()=>{let t=!1;return a&&e.Children.forEach(a,e=>{ML(e,["Input","Select"])&&(n_(e.props,!0)||n_(e.props.inputProps,!0))&&(t=!0)}),t}),[M,P]=e.useState(!1);c&&M&&P(!1);const I=void 0===p||c?M:p;let R;const T=e.useMemo(()=>({adornedStart:C,setAdornedStart:A,color:l,disabled:c,error:d,filled:k,focused:I,fullWidth:h,hiddenLabel:m,size:y,onBlur:()=>{P(!1)},onEmpty:()=>{S(!1)},onFilled:()=>{S(!0)},onFocus:()=>{P(!0)},registerEffect:R,required:v,variant:b}),[C,l,c,d,k,I,h,m,R,v,y,b]);return(0,o.jsx)(Zw.Provider,{value:T,children:(0,o.jsx)(RL,(0,i.A)({as:u,ownerState:w,className:Ge(_.root,s),ref:n},x,{children:a}))})}),EL=TL;function OL(e){return et("MuiFormHelperText",e)}const LL=tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var zL;const jL=["children","className","component","disabled","error","filled","focused","margin","required","variant"],$L=dt("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Em(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(({theme:e,ownerState:t})=>(0,i.A)({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${LL.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${LL.error}`]:{color:(e.vars||e).palette.error.main}},"small"===t.size&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),FL=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiFormHelperText"}),{children:r,className:a,component:s="p"}=n,l=(0,f.A)(n,jL),u=Gw({props:n,muiFormControl:Kw(),states:["variant","size","disabled","error","filled","focused","required"]}),c=(0,i.A)({},n,{component:s,contained:"filled"===u.variant||"outlined"===u.variant,variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),d=(e=>{const{classes:t,contained:n,size:o,disabled:r,error:i,filled:a,focused:s,required:l}=e;return De({root:["root",r&&"disabled",i&&"error",o&&`size${Em(o)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},OL,t)})(c);return(0,o.jsx)($L,(0,i.A)({as:s,ownerState:c,className:Ge(d.root,a),ref:t},l,{children:" "===r?zL||(zL=(0,o.jsx)("span",{className:"notranslate",children:""})):r}))});function NL(e){return et("MuiTextField",e)}tt("MuiTextField",["root"]);const DL=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],HL={standard:IR,filled:LR,outlined:WR},BL=dt(EL,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),VL=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:a=!1,children:s,className:l,color:u="primary",defaultValue:c,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:m=!1,helperText:g,id:v,InputLabelProps:y,inputProps:b,InputProps:x,inputRef:w,label:_,maxRows:C,minRows:A,multiline:k=!1,name:S,onBlur:M,onChange:P,onFocus:I,placeholder:R,required:T=!1,rows:E,select:O=!1,SelectProps:L,type:z,value:j,variant:$="outlined"}=n,F=(0,f.A)(n,DL),N=(0,i.A)({},n,{autoFocus:a,color:u,disabled:d,error:p,fullWidth:m,multiline:k,required:T,select:O,variant:$}),D=(e=>{const{classes:t}=e;return De({root:["root"]},NL,t)})(N),H={};"outlined"===$&&(y&&void 0!==y.shrink&&(H.notched=y.shrink),H.label=_),O&&(L&&L.native||(H.id=void 0),H["aria-describedby"]=void 0);const B=Bi(v),V=g&&B?`${B}-helper-text`:void 0,W=_&&B?`${B}-label`:void 0,U=HL[$],G=(0,o.jsx)(U,(0,i.A)({"aria-describedby":V,autoComplete:r,autoFocus:a,defaultValue:c,fullWidth:m,multiline:k,name:S,rows:E,maxRows:C,minRows:A,type:z,value:j,id:B,inputRef:w,onBlur:M,onChange:P,onFocus:I,placeholder:R,inputProps:b},H,x));return(0,o.jsxs)(BL,(0,i.A)({className:Ge(D.root,l),disabled:d,error:p,fullWidth:m,ref:t,required:T,color:u,variant:$,ownerState:N},F,{children:[null!=_&&""!==_&&(0,o.jsx)(SL,(0,i.A)({htmlFor:B,id:W},y,{children:_})),O?(0,o.jsx)(QR,(0,i.A)({"aria-describedby":V,id:B,labelId:W,value:j,input:G},L,{children:s})):G,g&&(0,o.jsx)(FL,(0,i.A)({id:V},h,{children:g}))]}))}),WL=VL,UL=["className","color","edge","size","sx"],GL=dt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Em(n.edge)}`],t[`size${Em(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${oE.thumb}`]:{width:16,height:16},[`& .${oE.switchBase}`]:{padding:4,[`&.${oE.checked}`]:{transform:"translateX(16px)"}}}}]}),ZL=dt(oL,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${oE.input}`]:t.input},"default"!==n.color&&t[`color${Em(n.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${oE.checked}`]:{transform:"translateX(20px)"},[`&.${oE.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${oE.checked} + .${oE.track}`]:{opacity:.5},[`&.${oE.disabled} + .${oE.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${oE.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,e])=>e.main&&e.light).map(([t])=>({props:{color:t},style:{[`&.${oE.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${oE.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,x.a)(e.palette[t].main,.62):(0,x.e$)(e.palette[t].main,.55)}`}},[`&.${oE.checked} + .${oE.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),KL=dt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)})),qL=dt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),XL=e.forwardRef(function(e,t){const n=om({props:e,name:"MuiSwitch"}),{className:r,color:a="primary",edge:s=!1,size:l="medium",sx:u}=n,c=(0,f.A)(n,UL),d=(0,i.A)({},n,{color:a,edge:s,size:l}),p=(e=>{const{classes:t,edge:n,size:o,color:r,checked:a,disabled:s}=e,l=De({root:["root",n&&`edge${Em(n)}`,`size${Em(o)}`],switchBase:["switchBase",`color${Em(r)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},nE,t);return(0,i.A)({},t,l)})(d),h=(0,o.jsx)(qL,{className:p.thumb,ownerState:d});return(0,o.jsxs)(GL,{className:Ge(p.root,r),sx:u,ownerState:d,children:[(0,o.jsx)(ZL,(0,i.A)({type:"checkbox",icon:h,checkedIcon:h,ref:t,ownerState:d},c,{classes:(0,i.A)({},p,{root:p.switchBase})})),(0,o.jsx)(KL,{className:p.track,ownerState:d})]})}),YL=XL;function QL(e){return et("MuiButton",e)}const JL=tt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),ez=e.createContext({}),tz=e.createContext(void 0),nz=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],oz=e=>(0,i.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),rz=dt(OC,{shouldForwardProp:e=>ct(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Em(n.color)}`],t[`size${Em(n.size)}`],t[`${n.variant}Size${Em(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,o;const r="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],a="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return(0,i.A)({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":(0,i.A)({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.X4)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":(0,i.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${JL.focusVisible}`]:(0,i.A)({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${JL.disabled}`]:(0,i.A)({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${(0,x.X4)(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(o=e.palette).getContrastText)?void 0:n.call(o,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:r,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${JL.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${JL.disabled}`]:{boxShadow:"none"}}),iz=dt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Em(n.size)}`]]}})(({ownerState:e})=>(0,i.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},oz(e))),az=dt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Em(n.size)}`]]}})(({ownerState:e})=>(0,i.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},oz(e))),sz=e.forwardRef(function(t,n){const r=e.useContext(ez),s=e.useContext(tz),l=om({props:a(r,t),name:"MuiButton"}),{children:u,color:c="primary",component:d="button",className:p,disabled:h=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:b=!1,size:x="medium",startIcon:w,type:_,variant:C="text"}=l,A=(0,f.A)(l,nz),k=(0,i.A)({},l,{color:c,component:d,disabled:h,disableElevation:m,disableFocusRipple:g,fullWidth:b,size:x,type:_,variant:C}),S=(e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:a,classes:s}=e,l=De({root:["root",a,`${a}${Em(t)}`,`size${Em(r)}`,`${a}Size${Em(r)}`,`color${Em(t)}`,n&&"disableElevation",o&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Em(r)}`],endIcon:["icon","endIcon",`iconSize${Em(r)}`]},QL,s);return(0,i.A)({},s,l)})(k),M=w&&(0,o.jsx)(iz,{className:S.startIcon,ownerState:k,children:w}),P=v&&(0,o.jsx)(az,{className:S.endIcon,ownerState:k,children:v}),I=s||"";return(0,o.jsxs)(rz,(0,i.A)({ownerState:k,className:Ge(r.className,S.root,p,I),component:d,disabled:h,focusRipple:!g,focusVisibleClassName:Ge(S.focusVisible,y),ref:n,type:_},A,{classes:S,children:[M,u,P]}))}),lz=sz;function uz(e){return et("MuiInputAdornment",e)}const cz=tt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var dz;const pz=["children","className","component","disablePointerEvents","disableTypography","position","variant"],hz=dt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Em(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>(0,i.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${cz.positionStart}&:not(.${cz.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),fz=e.forwardRef(function(t,n){const r=om({props:t,name:"MuiInputAdornment"}),{children:a,className:s,component:l="div",disablePointerEvents:u=!1,disableTypography:c=!1,position:d,variant:p}=r,h=(0,f.A)(r,pz),m=Kw()||{};let g=p;p&&m.variant,m&&!g&&(g=m.variant);const v=(0,i.A)({},r,{hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:u,position:d,variant:g}),y=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:i,variant:a}=e;return De({root:["root",n&&"disablePointerEvents",r&&`position${Em(r)}`,a,o&&"hiddenLabel",i&&`size${Em(i)}`]},uz,t)})(v);return(0,o.jsx)(Zw.Provider,{value:null,children:(0,o.jsx)(hz,(0,i.A)({as:l,ownerState:v,className:Ge(y.root,s),ref:n},h,{children:"string"!=typeof a||c?(0,o.jsxs)(e.Fragment,{children:["start"===d?dz||(dz=(0,o.jsx)("span",{className:"notranslate",children:""})):null,a]}):(0,o.jsx)(Nm,{color:"text.secondary",children:a})}))})});function mz(e){return et("MuiTooltip",e)}const gz=tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),vz=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function yz(e){return Math.round(1e5*e)/1e5}const bz=dt(am,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>(0,i.A)({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${gz.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${gz.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${gz.arrow}`]:(0,i.A)({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${gz.arrow}`]:(0,i.A)({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),xz=dt("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Em(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>(0,i.A)({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,x.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${yz(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${gz.popper}[data-popper-placement*="left"] &`]:(0,i.A)({transformOrigin:"right center"},t.isRtl?(0,i.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):(0,i.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${gz.popper}[data-popper-placement*="right"] &`]:(0,i.A)({transformOrigin:"left center"},t.isRtl?(0,i.A)({marginRight:"14px"},t.touch&&{marginRight:"24px"}):(0,i.A)({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${gz.popper}[data-popper-placement*="top"] &`]:(0,i.A)({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${gz.popper}[data-popper-placement*="bottom"] &`]:(0,i.A)({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),wz=dt("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,x.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let _z=!1;const Cz=new q_;let Az={x:0,y:0};function kz(e,t){return(n,...o)=>{t&&t(n,...o),e(n,...o)}}const Sz=e.forwardRef(function(t,n){var r,a,s,l,u,c,d,p,h,m,g,v,y,b,x,w,_,C,A;const k=om({props:t,name:"MuiTooltip"}),{arrow:S=!1,children:M,components:P={},componentsProps:I={},describeChild:R=!1,disableFocusListener:T=!1,disableHoverListener:E=!1,disableInteractive:O=!1,disableTouchListener:L=!1,enterDelay:z=100,enterNextDelay:j=0,enterTouchDelay:$=700,followCursor:F=!1,id:N,leaveDelay:D=0,leaveTouchDelay:H=1500,onClose:B,onOpen:V,open:W,placement:U="bottom",PopperComponent:G,PopperProps:Z={},slotProps:K={},slots:q={},title:X,TransitionComponent:Y=DS,TransitionProps:Q}=k,J=(0,f.A)(k,vz),ee=e.isValidElement(M)?M:(0,o.jsx)("span",{children:M}),te=ss(),ne=wh(),[oe,re]=e.useState(),[ie,ae]=e.useState(null),se=e.useRef(!1),le=O||F,ue=X_(),ce=X_(),de=X_(),pe=X_(),[he,fe]=hR({controlled:W,default:!1,name:"Tooltip",state:"open"});let me=he;const ge=gT(N),ve=e.useRef(),ye=G_(()=>{void 0!==ve.current&&(document.body.style.WebkitUserSelect=ve.current,ve.current=void 0),pe.clear()});e.useEffect(()=>ye,[ye]);const be=e=>{Cz.clear(),_z=!0,fe(!0),V&&!me&&V(e)},xe=G_(e=>{Cz.start(800+D,()=>{_z=!1}),fe(!1),B&&me&&B(e),ue.start(te.transitions.duration.shortest,()=>{se.current=!1})}),we=e=>{se.current&&"touchstart"!==e.type||(oe&&oe.removeAttribute("title"),ce.clear(),de.clear(),z||_z&&j?ce.start(_z?j:z,()=>{be(e)}):be(e))},_e=e=>{ce.clear(),de.start(D,()=>{xe(e)})},{isFocusVisibleRef:Ce,onBlur:Ae,onFocus:ke,ref:Se}=rC(),[,Me]=e.useState(!1),Pe=e=>{Ae(e),!1===Ce.current&&(Me(!1),_e(e))},Ie=e=>{oe||re(e.currentTarget),ke(e),!0===Ce.current&&(Me(!0),we(e))},Re=e=>{se.current=!0;const t=ee.props;t.onTouchStart&&t.onTouchStart(e)};e.useEffect(()=>{if(me)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||xe(e)}},[xe,me]);const Te=qw(Gf(ee),Se,re,n);X||0===X||(me=!1);const Ee=e.useRef(),Oe={},Le="string"==typeof X;R?(Oe.title=me||!Le||E?null:X,Oe["aria-describedby"]=me?ge:null):(Oe["aria-label"]=Le?X:null,Oe["aria-labelledby"]=me&&!Le?ge:null);const ze=(0,i.A)({},Oe,J,ee.props,{className:Ge(J.className,ee.props.className),onTouchStart:Re,ref:Te},F?{onMouseMove:e=>{const t=ee.props;t.onMouseMove&&t.onMouseMove(e),Az={x:e.clientX,y:e.clientY},Ee.current&&Ee.current.update()}}:{}),je={};L||(ze.onTouchStart=e=>{Re(e),de.clear(),ue.clear(),ye(),ve.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",pe.start($,()=>{document.body.style.WebkitUserSelect=ve.current,we(e)})},ze.onTouchEnd=e=>{ee.props.onTouchEnd&&ee.props.onTouchEnd(e),ye(),de.start(H,()=>{xe(e)})}),E||(ze.onMouseOver=kz(we,ze.onMouseOver),ze.onMouseLeave=kz(_e,ze.onMouseLeave),le||(je.onMouseOver=we,je.onMouseLeave=_e)),T||(ze.onFocus=kz(Ie,ze.onFocus),ze.onBlur=kz(Pe,ze.onBlur),le||(je.onFocus=Ie,je.onBlur=Pe));const $e=e.useMemo(()=>{var e;let t=[{name:"arrow",enabled:Boolean(ie),options:{element:ie,padding:4}}];return null!=(e=Z.popperOptions)&&e.modifiers&&(t=t.concat(Z.popperOptions.modifiers)),(0,i.A)({},Z.popperOptions,{modifiers:t})},[ie,Z]),Fe=(0,i.A)({},k,{isRtl:ne,arrow:S,disableInteractive:le,placement:U,PopperComponentProp:G,touch:se.current}),Ne=(e=>{const{classes:t,disableInteractive:n,arrow:o,touch:r,placement:i}=e;return De({popper:["popper",!n&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",r&&"touch",`tooltipPlacement${Em(i.split("-")[0])}`],arrow:["arrow"]},mz,t)})(Fe),He=null!=(r=null!=(a=q.popper)?a:P.Popper)?r:bz,Be=null!=(s=null!=(l=null!=(u=q.transition)?u:P.Transition)?l:Y)?s:DS,Ve=null!=(c=null!=(d=q.tooltip)?d:P.Tooltip)?c:xz,Ue=null!=(p=null!=(h=q.arrow)?h:P.Arrow)?p:wz,Ze=We(He,(0,i.A)({},Z,null!=(m=K.popper)?m:I.popper,{className:Ge(Ne.popper,null==Z?void 0:Z.className,null==(g=null!=(v=K.popper)?v:I.popper)?void 0:g.className)}),Fe),Ke=We(Be,(0,i.A)({},Q,null!=(y=K.transition)?y:I.transition),Fe),qe=We(Ve,(0,i.A)({},null!=(b=K.tooltip)?b:I.tooltip,{className:Ge(Ne.tooltip,null==(x=null!=(w=K.tooltip)?w:I.tooltip)?void 0:x.className)}),Fe),Xe=We(Ue,(0,i.A)({},null!=(_=K.arrow)?_:I.arrow,{className:Ge(Ne.arrow,null==(C=null!=(A=K.arrow)?A:I.arrow)?void 0:C.className)}),Fe);return(0,o.jsxs)(e.Fragment,{children:[e.cloneElement(ee,ze),(0,o.jsx)(He,(0,i.A)({as:null!=G?G:am,placement:U,anchorEl:F?{getBoundingClientRect:()=>({top:Az.y,left:Az.x,right:Az.x,bottom:Az.y,width:0,height:0})}:oe,popperRef:Ee,open:!!oe&&me,id:ge,transition:!0},je,Ze,{popperOptions:$e,children:({TransitionProps:e})=>(0,o.jsx)(Be,(0,i.A)({timeout:te.transitions.duration.shorter},e,Ke,{children:(0,o.jsxs)(Ve,(0,i.A)({},qe,{children:[X,S?(0,o.jsx)(Ue,(0,i.A)({},Xe,{ref:ae})):null]}))}))}))]})}),Mz=Sz,Pz=["sortingOrder"],Iz=e.memo(function(e){const{sortingOrder:t}=e,n=(0,f.A)(e,Pz),r=lb(),[a]=t,s="asc"===a?r.slots.columnSortedAscendingIcon:r.slots.columnSortedDescendingIcon;return s?(0,o.jsx)(s,(0,i.A)({},n)):null}),Rz=UC((0,o.jsx)("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Tz=UC((0,o.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Ez=UC((0,o.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Oz=UC((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Lz=UC((0,o.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),zz=UC((0,o.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),jz=UC((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),$z=(UC((0,o.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu"),UC((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),UC((0,o.jsx)("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon")),Fz=UC((0,o.jsx)("path",{d:"M11 19V5h2v14z"}),"Separator"),Nz=UC((0,o.jsx)("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),Dz=UC((0,o.jsx)("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),Hz=UC((0,o.jsx)("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),Bz=UC((0,o.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),Vz=UC((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Wz=UC((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),Uz=UC((0,o.jsx)("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),Gz=UC((0,o.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),Zz=UC((0,o.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),Kz=UC((0,o.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),qz=UC((0,o.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Xz=UC((0,o.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),Yz=UC((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),Qz=UC((0,o.jsx)("g",{children:(0,o.jsx)("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),Jz=UC((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),ej=(UC((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),UC((0,o.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete")),tj=["native"],nj={BooleanCellTrueIcon:qz,BooleanCellFalseIcon:Vz,ColumnMenuIcon:Bz,OpenFilterButtonIcon:Lz,FilterPanelDeleteIcon:Vz,ColumnFilteredIcon:zz,ColumnSelectorIcon:$z,ColumnUnsortedIcon:Iz,ColumnSortedAscendingIcon:Rz,ColumnSortedDescendingIcon:Tz,ColumnResizeIcon:Fz,DensityCompactIcon:Nz,DensityStandardIcon:Dz,DensityComfortableIcon:Hz,ExportIcon:Kz,MoreActionsIcon:Xz,TreeDataCollapseIcon:Oz,TreeDataExpandIcon:Ez,GroupingCriteriaCollapseIcon:Oz,GroupingCriteriaExpandIcon:Ez,DetailPanelExpandIcon:Wz,DetailPanelCollapseIcon:Uz,RowReorderIcon:Zz,QuickFilterIcon:jz,QuickFilterClearIcon:Vz,ColumnMenuHideIcon:Yz,ColumnMenuSortAscendingIcon:Rz,ColumnMenuSortDescendingIcon:Tz,ColumnMenuFilterIcon:zz,ColumnMenuManageColumnsIcon:Qz,ColumnMenuClearIcon:Jz,LoadIcon:Gz,FilterPanelAddIcon:Wz,FilterPanelRemoveAllIcon:ej,ColumnReorderIcon:Zz},oj=(0,i.A)({},nj,{BaseCheckbox:mL,BaseTextField:WL,BaseFormControl:EL,BaseSelect:QR,BaseSwitch:YL,BaseButton:lz,BaseIconButton:NC,BaseInputAdornment:fz,BaseTooltip:Mz,BasePopper:am,BaseInputLabel:SL,BaseSelectOption:function(e){let{native:t}=e,n=(0,f.A)(e,tj);return t?(0,o.jsx)("option",(0,i.A)({},n)):(0,o.jsx)(wM,(0,i.A)({},n))},BaseChip:eA}),rj=(0,i.A)({},oj,{Cell:BE,SkeletonCell:function(e){const{align:t,width:n,contentWidth:r}=e,a=(0,f.A)(e,kP),s=(e=>{const{align:t,classes:n}=e;return De({root:["cell","cellSkeleton",`cell--text${(0,Tm.A)(t)}`,"withBorderColor"]},By,n)})({classes:lb().classes,align:t});return(0,o.jsx)("div",(0,i.A)({className:s.root,style:{width:n}},a,{children:(0,o.jsx)(AP,{width:`${r}%`})}))},ColumnHeaderFilterIconButton:function(t){var n,r;const{counter:a,field:s,onClick:l}=t,u=gw(),c=lb(),d=(e=>{const{classes:t}=e;return De({icon:["filterIcon"]},By,t)})((0,i.A)({},t,{classes:c.classes})),p=rb(u,ZM),h=Bi(),f=Bi(),m=e.useCallback(e=>{e.preventDefault(),e.stopPropagation();const{open:t,openedPanelValue:n}=ZM(u.current.state);t&&n===rM.filters?u.current.hideFilterPanel():u.current.showFilterPanel(void 0,f,h),l&&l(u.current.getColumnHeaderParams(s),e)},[u,s,l,f,h]);if(!a)return null;const g=p.open&&p.labelId===h,v=(0,o.jsx)(c.slots.baseIconButton,(0,i.A)({id:h,onClick:m,color:"default","aria-label":u.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?f:void 0},null==(n=c.slotProps)?void 0:n.baseIconButton,{children:(0,o.jsx)(c.slots.columnFilteredIcon,{className:d.icon,fontSize:"small"})}));return(0,o.jsx)(c.slots.baseTooltip,(0,i.A)({title:u.current.getLocaleText("columnHeaderFiltersTooltipActive")(a),enterDelay:1e3},null==(r=c.slotProps)?void 0:r.baseTooltip,{children:(0,o.jsxs)(zP,{children:[a>1&&(0,o.jsx)(EP,{badgeContent:a,color:"default",children:v}),1===a&&v]})}))},ColumnMenu:XO,ColumnHeaders:PO,Footer:BP,FooterRowCount:UP,Toolbar:null,PreferencesPanel:GP,LoadingOverlay:cI,NoResultsOverlay:YO,NoRowsOverlay:dI,Pagination:TT,FilterPanel:tE,ColumnsPanel:function(t){var n,r,a;const s=gw(),l=e.useRef(null),u=rb(s,kb),c=rb(s,Sb),d=lb(),[p,h]=e.useState(""),m=(e=>{const{classes:t}=e;return De({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},By,t)})(d),{sort:g,searchPredicate:v=ME,autoFocusSearchField:y=!0,disableHideAllButton:b=!1,disableShowAllButton:x=!1,getTogglableColumns:w}=t,_=(0,f.A)(t,CE),C=e.useMemo(()=>{switch(g){case"asc":return[...u].sort((e,t)=>SE.compare(e.headerName||e.field,t.headerName||t.field));case"desc":return[...u].sort((e,t)=>-SE.compare(e.headerName||e.field,t.headerName||t.field));default:return u}},[u,g]),A=e=>{const{name:t}=e.target;s.current.setColumnVisibility(t,!1===c[t])},k=e.useCallback(e=>{const t=Sb(s),n=(0,i.A)({},t),o=w?w(u):null;return u.forEach(t=>{t.hideable&&(null==o||o.includes(t.field))&&(e?delete n[t.field]:n[t.field]=!1)}),s.current.setColumnVisibilityModel(n)},[s,u,w]),S=e.useCallback(e=>{h(e.target.value)},[]),M=e.useMemo(()=>{const e=w?w(C):null,t=e?C.filter(({field:t})=>e.includes(t)):C;return p?t.filter(e=>v(e,p.toLowerCase())):t},[C,p,v,w]),P=e.useRef(null);e.useEffect(()=>{y?l.current.focus():P.current&&"function"==typeof P.current.focus&&P.current.focus()},[y]);let I=!1;const R=e=>!1===I&&!1!==e.hideable&&(I=!0,!0);return(0,o.jsxs)(HT,(0,i.A)({},_,{children:[(0,o.jsx)(_E,{children:(0,o.jsx)(d.slots.baseTextField,(0,i.A)({label:s.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:s.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:l,value:p,onChange:S,variant:"standard",fullWidth:!0},null==(n=d.slotProps)?void 0:n.baseTextField))}),(0,o.jsx)(LT,{children:(0,o.jsx)(AE,{className:m.root,ownerState:d,children:M.map(e=>{var t;return(0,o.jsxs)(kE,{className:m.columnsPanelRow,ownerState:d,children:[(0,o.jsx)(bE,{control:(0,o.jsx)(d.slots.baseSwitch,(0,i.A)({disabled:!1===e.hideable,checked:!1!==c[e.field],onClick:A,name:e.field,size:"small",inputRef:R(e)?P:void 0},null==(t=d.slotProps)?void 0:t.baseSwitch)),label:e.headerName||e.field}),!d.disableColumnReorder&&!1]},e.field)})})}),x&&b?null:(0,o.jsxs)($T,{children:[b?(0,o.jsx)("span",{}):(0,o.jsx)(d.slots.baseButton,(0,i.A)({onClick:()=>k(!1)},null==(r=d.slotProps)?void 0:r.baseButton,{disabled:b,children:s.current.getLocaleText("columnsPanelHideAllButton")})),x?null:(0,o.jsx)(d.slots.baseButton,(0,i.A)({onClick:()=>k(!0)},null==(a=d.slotProps)?void 0:a.baseButton,{disabled:x,children:s.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))},Panel:EE,Row:GE}),ij=e=>{if(void 0!==e)return Object.keys(e).reduce((t,n)=>(0,i.A)({},t,{[`${n.charAt(0).toLowerCase()}${n.slice(1)}`]:e[n]}),{})},aj=["components","componentsProps"];function sj(e){var t;const n=Object.keys(e);if(!n.some(e=>e.startsWith("aria-")||e.startsWith("data-")))return e;const o={},r=null!=(t=e.forwardedProps)?t:{};for(let t=0;t<n.length;t+=1){const i=n[t];i.startsWith("aria-")||i.startsWith("data-")?r[i]=e[i]:o[i]=e[i]}return o.forwardedProps=r,o}const lj={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,disableMultipleRowSelection:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,disableColumnResize:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid"},uj={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Zk.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"\t",rowPositionsDebounceMs:166},cj=ij(rj),dj=e=>(0,i.A)({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),pj=(e,t,n)=>"number"==typeof e&&e>0?e:t;function hj(e){return void 0!==e.field}["MUI: The `rowHeight` prop should be a number greater than 0.","The default value will be used instead."].join("\n"),["MUI: The `getRowHeight` prop should return a number greater than 0 or 'auto'.","The default value will be used instead."].join("\n");const fj=(e,t,n)=>{if(hj(e)){if(void 0!==n[e.field])throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join("\n"));return void(n[e.field]=t)}const{groupId:o,children:r}=e;r.forEach(e=>{fj(e,[...t,o],n)})},mj=e=>{if(!e)return{};const t={};return e.forEach(e=>{fj(e,[],t)}),t},gj=(e,t,n)=>{const o=e=>{var n;return null!=(n=t[e])?n:[]},r=[],i=Math.max(...e.map(e=>o(e).length)),a=(e,t,n)=>Nx(o(e).slice(0,n+1),o(t).slice(0,n+1));for(let t=0;t<i;t+=1){const i=e.reduce((e,r)=>{var i;const s=null!=(i=o(r)[t])?i:null;if(0===e.length)return[{columnFields:[r],groupId:s}];const l=e[e.length-1],u=l.columnFields[l.columnFields.length-1];return l.groupId!==s||!a(u,r,t)||(c=u,d=r,null!=n&&n.left&&n.left.includes(c)&&!n.left.includes(d)||null!=n&&n.right&&!n.right.includes(c)&&n.right.includes(d))?[...e,{columnFields:[r],groupId:s}]:[...e.slice(0,e.length-1),{columnFields:[...l.columnFields,r],groupId:s}];var c,d},[]);r.push(i)}return r},vj=["groupId","children"],yj=e=>{let t={};return e.forEach(e=>{if(hj(e))return;const{groupId:n,children:o}=e,r=(0,f.A)(e,vj);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${n} has no children.`);const a=(0,i.A)({},r,{groupId:n}),s=yj(o);if(void 0!==s[n]||void 0!==t[n])throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=(0,i.A)({},t,s,{[n]:a})}),(0,i.A)({},t)},bj=(e,t,n)=>{var o,r,a,s;if(null==(o=t.experimentalFeatures)||!o.columnGrouping)return e;const l=Cb(n),u=Pb(n),c=yj(null!=(r=t.columnGroupingModel)?r:[]),d=mj(null!=(a=t.columnGroupingModel)?a:[]),p=gj(l,d,null!=(s=n.current.state.pinnedColumns)?s:{}),h=0===u.length?0:Math.max(...u.map(e=>{var t,n;return null!=(t=null==(n=d[e])?void 0:n.length)?t:0}));return(0,i.A)({},e,{columnGrouping:{lookup:c,unwrappedGroupingModel:d,headerStructure:p,maxDepth:h}})},xj=(e,t)=>{const n={enabled:!t.disableVirtualization,enabledForColumns:!0};return(0,i.A)({},e,{virtualization:n})},wj=(t,n)=>{const r=lw(t,n);return((t,n)=>{const o=(t=>{const{classes:n}=t;return e.useMemo(()=>De({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},By,n),[n])})({classes:n.classes}),r=e.useCallback(e=>{const r=(0,i.A)({},xk,{cellClassName:o.cellCheckbox,headerClassName:o.columnHeaderCheckbox,headerName:t.current.getLocaleText("checkboxSelectionHeaderName")}),a=n.checkboxSelection,s=null!=e.lookup[bk];return a&&!s?(e.lookup[bk]=r,e.orderedFields=[bk,...e.orderedFields]):!a&&s?(delete e.lookup[bk],e.orderedFields=e.orderedFields.filter(e=>e!==bk)):a&&s&&(e.lookup[bk]=(0,i.A)({},r,e.lookup[bk])),e},[t,o,n.checkboxSelection]);Mk(t,"hydrateColumns",r)})(r,n),(e=>{IM(e,aw,"rowTreeCreation",aP)})(r),uw(uP,r,n),uw(aM,r,n),uw(iP,r,n),uw(rP,r,n),uw(jM,r,n),uw(cP,r,n),uw(KM,r,n),uw(RM,r,n),uw(lM,r,n),uw(GM,r,n),uw(dj,r,n),uw(kk,r,n),uw(bj,r,n),uw(xj,r,n),((t,n)=>{const o=cw(t,"useGridKeyboardNavigation"),r=zM(t,n).rows,i=ss(),a=e.useMemo(()=>function(e,t){const n=qb(e)||{};return[...n.top||[],...t,...n.bottom||[]]}(t,r),[t,r]),s="DataGrid"!==n.signature&&n.unstable_headerFilters,l=e.useCallback((e,n,r="left")=>{const i=hx(t),a=t.current.unstable_getCellColSpanInfo(n,e);a&&a.spannedByColSpan&&("left"===r?e=a.leftVisibleCellIndex:"right"===r&&(e=a.rightVisibleCellIndex));const s=i.findIndex(e=>e.id===n);o.debug(`Navigating to cell row ${s}, col ${e}`),t.current.scrollToIndexes({colIndex:e,rowIndex:s});const l=t.current.getVisibleColumns()[e].field;t.current.setCellFocus(n,l)},[t,o]),u=e.useCallback((e,n)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFocus(r,n)},[t,o]),c=e.useCallback((e,n)=>{o.debug(`Navigating to header filter col ${e}`),t.current.scrollToIndexes({colIndex:e});const r=t.current.getVisibleColumns()[e].field;t.current.setColumnHeaderFilterFocus(r,n)},[t,o]),d=e.useCallback((e,n,r)=>{o.debug(`Navigating to header col ${e}`),t.current.scrollToIndexes({colIndex:e});const{field:i}=t.current.getVisibleColumns()[e];t.current.setColumnGroupHeaderFocus(i,n,r)},[t,o]),p=e.useCallback(e=>{var t;return null==(t=a[e])?void 0:t.id},[a]),h=e.useCallback((e,n)=>{const o=n.currentTarget.querySelector(`.${Vy.columnHeaderTitleContainerContent}`);if(o&&o.contains(n.target)&&e.field!==xk.field)return;if(!t.current.getRootDimensions())return;const r=t.current.getViewportPageSize(),h=e.field?t.current.getColumnIndex(e.field):0,f=a.length>0?0:null,m=a.length-1,g=Mb(t).length-1,v=$b(t);let y=!0;switch(n.key){case"ArrowDown":null!==f&&(s?c(h,n):l(h,p(f)));break;case"ArrowRight":{const e=UM({currentColIndex:h,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&u(e,n);break}case"ArrowLeft":{const e=WM({currentColIndex:h,firstColIndex:0,lastColIndex:g,direction:i.direction});null!==e&&u(e,n);break}case"ArrowUp":v>0&&d(h,v-1,n);break;case"PageDown":null!==f&&null!==m&&l(h,p(Math.min(f+r,m)));break;case"Home":u(0,n);break;case"End":u(g,n);break;case"Enter":(n.ctrlKey||n.metaKey)&&t.current.toggleColumnMenu(e.field);break;case" ":break;default:y=!1}y&&n.preventDefault()},[t,a.length,s,c,l,p,i.direction,u,d]),f=e.useCallback((e,n)=>{if(!t.current.getRootDimensions())return;const o=NM(t)===e.field,r=DM(t)===e.field;if(o||r||!mw(n.key))return;const s=t.current.getViewportPageSize(),d=e.field?t.current.getColumnIndex(e.field):0,h=a.length-1,f=Mb(t).length-1;let m=!0;switch(n.key){case"ArrowDown":{const e=p(0);null!=e&&l(d,e);break}case"ArrowRight":{const e=UM({currentColIndex:d,firstColIndex:0,lastColIndex:f,direction:i.direction});null!==e&&c(e,n);break}case"ArrowLeft":{const o=WM({currentColIndex:d,firstColIndex:0,lastColIndex:f,direction:i.direction});null!==o?c(o,n):t.current.setColumnHeaderFilterFocus(e.field,n);break}case"ArrowUp":u(d,n);break;case"PageDown":null!==h&&l(d,p(Math.min(0+s,h)));break;case"Home":c(0,n);break;case"End":c(f,n);break;case" ":break;default:m=!1}m&&n.preventDefault()},[t,a.length,c,i.direction,u,l,p]),m=e.useCallback((e,n)=>{if(!t.current.getRootDimensions())return;const o=kx(t);if(null===o)return;const{field:r,depth:i}=o,{fields:s,depth:c,maxDepth:h}=e,f=t.current.getViewportPageSize(),m=t.current.getColumnIndex(r),g=r?t.current.getColumnIndex(r):0,v=a.length-1,y=Mb(t).length-1;let b=!0;switch(n.key){case"ArrowDown":c===h-1?u(m,n):d(m,i+1,n);break;case"ArrowUp":c>0&&d(m,i-1,n);break;case"ArrowRight":{const e=s.length-s.indexOf(r)-1;m+e+1<=y&&d(m+e+1,i,n);break}case"ArrowLeft":{const e=s.indexOf(r);m-e-1>=0&&d(m-e-1,i,n);break}case"PageDown":null!==v&&l(g,p(Math.min(0+f,v)));break;case"Home":d(0,i,n);break;case"End":d(y,i,n);break;case" ":break;default:b=!1}b&&n.preventDefault()},[t,a.length,u,d,l,p]),g=e.useCallback((e,n)=>{if(VM(n))return;const o=t.current.getCellParams(e.id,e.field);if(o.cellMode===Kk.Edit||!mw(n.key))return;if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:n,cell:o}))return;const r=t.current.getRootDimensions();if(0===a.length||!r)return;const d=i.direction,h=t.current.getViewportPageSize(),f=e.field?t.current.getColumnIndex(e.field):0,m=a.findIndex(t=>t.id===e.id),g=a.length-1,v=Mb(t).length-1;let y=!0;switch(n.key){case"ArrowDown":m<g&&l(f,p(m+1));break;case"ArrowUp":m>0?l(f,p(m-1)):s?c(f,n):u(f,n);break;case"ArrowRight":{const e=UM({currentColIndex:f,firstColIndex:0,lastColIndex:v,direction:d});null!==e&&l(e,p(m),"rtl"===d?"left":"right");break}case"ArrowLeft":{const e=WM({currentColIndex:f,firstColIndex:0,lastColIndex:v,direction:d});null!==e&&l(e,p(m),"rtl"===d?"right":"left");break}case"Tab":n.shiftKey&&f>0?l(f-1,p(m),"left"):!n.shiftKey&&f<v&&l(f+1,p(m),"right");break;case" ":{if(e.field===$M)break;const t=e.colDef;if(t&&"treeDataGroup"===t.type)break;!n.shiftKey&&m<g&&l(f,p(Math.min(m+h,g)));break}case"PageDown":m<g&&l(f,p(Math.min(m+h,g)));break;case"PageUp":{const e=Math.max(m-h,0);e!==m&&e>=0?l(f,p(e)):u(f,n);break}case"Home":n.ctrlKey||n.metaKey||n.shiftKey?l(0,p(0)):l(0,p(m));break;case"End":n.ctrlKey||n.metaKey||n.shiftKey?l(v,p(g)):l(v,p(m));break;default:y=!1}y&&n.preventDefault()},[t,a,i.direction,l,p,s,c,u]),v=e.useCallback((e,{event:t})=>" "!==t.key&&e,[]);Mk(t,"canStartEditing",v),Qx(t,"columnHeaderKeyDown",h),Qx(t,"headerFilterKeyDown",f),Qx(t,"columnGroupHeaderKeyDown",m),Qx(t,"cellKeyDown",g)})(r,n),((t,n)=>{const o=cw(t,"useGridSelection"),r=e=>(...t)=>{n.rowSelection&&e(...t)},a=e.useMemo(()=>lP(n.rowSelectionModel,xw(t.current.state)),[t,n.rowSelectionModel]),s=e.useRef(null);t.current.registerControlState({stateId:"rowSelection",propModel:a,propOnChange:n.onRowSelectionModelChange,stateSelector:xw,changeEvent:"rowSelectionChange"});const{checkboxSelection:l,disableMultipleRowSelection:u,disableRowSelectionOnClick:c,isRowSelectable:d}=n,p=!u||l,h=zM(t,n),f=e.useCallback(e=>{var n;let o=e;const r=null!=(n=s.current)?n:e,i=t.current.isRowSelected(e);if(i){const e=fx(t),n=e.findIndex(e=>e===r),i=e.findIndex(e=>e===o);if(n===i)return;o=n>i?e[i+1]:e[i-1]}s.current=e,t.current.selectRowRange({startId:r,endId:o},!i)},[t]),m=e.useCallback(e=>{if(n.signature===Xx.DataGrid&&!n.checkboxSelection&&Array.isArray(e)&&e.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));xw(t.current.state)!==e&&(o.debug("Setting selection model"),t.current.setState(t=>(0,i.A)({},t,{rowSelection:n.rowSelection?e:[]})),t.current.forceUpdate())},[t,o,n.rowSelection,n.signature,n.checkboxSelection]),g=e.useCallback(e=>xw(t.current.state).includes(e),[t]),v=e.useCallback(e=>{if(d&&!d(t.current.getRowParams(e)))return!1;const n=t.current.getRowNode(e);return"footer"!==(null==n?void 0:n.type)&&"pinnedRow"!==(null==n?void 0:n.type)},[t,d]),y=e.useCallback(()=>_w(t),[t]),b=e.useCallback((e,n=!0,r=!1)=>{if(t.current.isRowSelectable(e))if(s.current=e,r)o.debug(`Setting selection for row ${e}`),t.current.setRowSelectionModel(n?[e]:[]);else{o.debug(`Toggling selection for row ${e}`);const r=xw(t.current.state).filter(t=>t!==e);n&&r.push(e),(r.length<2||p)&&t.current.setRowSelectionModel(r)}},[t,o,p]),x=e.useCallback((e,n=!0,r=!1)=>{o.debug("Setting selection for several rows");const a=e.filter(e=>t.current.isRowSelectable(e));let s;if(r)s=n?a:[];else{const e=(0,i.A)({},Cw(t));a.forEach(t=>{n?e[t]=t:delete e[t]}),s=Object.values(e)}(s.length<2||p)&&t.current.setRowSelectionModel(s)},[t,o,p]),w=e.useCallback(({startId:e,endId:n},r=!0,i=!1)=>{if(!t.current.getRow(e)||!t.current.getRow(n))return;o.debug(`Expanding selection from row ${e} to row ${n}`);const a=fx(t),s=a.indexOf(e),l=a.indexOf(n),[u,c]=s>l?[l,s]:[s,l],d=a.slice(u,c+1);t.current.selectRows(d,r,i)},[t,o]),_={selectRows:x,selectRowRange:w};Hx(t,{selectRow:b,setRowSelectionModel:m,getSelectedRows:y,isRowSelected:g,isRowSelectable:v},"public"),Hx(t,_,n.signature===Xx.DataGrid?"private":"public");const C=e.useCallback(()=>{if(n.keepNonExistentRowsSelected)return;const e=xw(t.current.state),o=Bb(t),r=(0,i.A)({},Cw(t));let a=!1;e.forEach(e=>{o[e]||(delete r[e],a=!0)}),a&&t.current.setRowSelectionModel(Object.values(r))},[t,n.keepNonExistentRowsSelected]),A=e.useCallback((e,n)=>{const o=n.metaKey||n.ctrlKey,r=!l&&!o&&!(e=>!!e.key)(n),i=!p||r,a=t.current.isRowSelected(e);i?t.current.selectRow(e,!!r||!a,!0):t.current.selectRow(e,!a,!1)},[t,p,l]),k=e.useCallback((e,n)=>{var o;if(c)return;const r=null==(o=n.target.closest(`.${Vy.cell}`))?void 0:o.getAttribute("data-field");if(r!==xk.field&&r!==$M){if(r){const e=t.current.getColumn(r);if((null==e?void 0:e.type)===ZS)return}"pinnedRow"!==t.current.getRowNode(e.id).type&&(n.shiftKey&&(p||l)?f(e.id):A(e.id,n))}},[c,p,l,t,f,A]),S=e.useCallback((e,t)=>{var n;p&&t.shiftKey&&(null==(n=window.getSelection())||n.removeAllRanges())},[p]),M=e.useCallback((e,n)=>{n.nativeEvent.shiftKey?f(e.id):t.current.selectRow(e.id,e.value)},[t,f]),P=e.useCallback(e=>{const o=n.checkboxSelectionVisibleOnly&&n.pagination?zw(t):fx(t),r=dx(t);t.current.selectRows(o,e.value,(null==r?void 0:r.items.length)>0)},[t,n.checkboxSelectionVisibleOnly,n.pagination]),I=e.useCallback((e,n)=>{if(t.current.getCellMode(e.id,e.field)!==Kk.Edit&&!VM(n)){if(mw(n.key)&&n.shiftKey){const o=Cx(t);if(o&&o.id!==e.id){n.preventDefault();const r=t.current.isRowSelected(o.id);if(!p)return void t.current.selectRow(o.id,!r,!0);const i=t.current.getRowIndexRelativeToVisibleRows(o.id),a=t.current.getRowIndexRelativeToVisibleRows(e.id);let s,l;i>a?r?(s=a,l=i-1):(s=a,l=i):r?(s=i+1,l=a):(s=i,l=a);const u=h.rows.slice(s,l+1).map(e=>e.id);return void t.current.selectRows(u,!r)}}if(" "===n.key&&n.shiftKey)return n.preventDefault(),void A(e.id,n);"a"===n.key&&(n.ctrlKey||n.metaKey)&&(n.preventDefault(),x(t.current.getAllRowIds(),!0))}},[t,A,x,h.rows,p]);Qx(t,"sortedRowsSet",r(C)),Qx(t,"rowClick",r(k)),Qx(t,"rowSelectionCheckboxChange",r(M)),Qx(t,"headerSelectionCheckboxChange",P),Qx(t,"cellMouseDown",r(S)),Qx(t,"cellKeyDown",r(I)),e.useEffect(()=>{void 0!==a&&t.current.setRowSelectionModel(a)},[t,a,n.rowSelection]),e.useEffect(()=>{n.rowSelection||t.current.setRowSelectionModel([])},[t,n.rowSelection]);const R=null!=a;e.useEffect(()=>{if(R||!n.rowSelection)return;const e=xw(t.current.state);if(v){const n=e.filter(e=>v(e));n.length<e.length&&t.current.setRowSelectionModel(n)}},[t,v,R,n.rowSelection]),e.useEffect(()=>{if(!n.rowSelection||R)return;const e=xw(t.current.state);!p&&e.length>1&&t.current.setRowSelectionModel([])},[t,p,l,R,n.rowSelection])})(r,n),function(t,n){var r,a;const s=cw(t,"useGridColumns"),l=iM,u=e.useRef(n.columns),c=e.useRef(l);t.current.registerControlState({stateId:"visibleColumns",propModel:n.columnVisibilityModel,propOnChange:n.onColumnVisibilityModelChange,stateSelector:Sb,changeEvent:"columnVisibilityModelChange"});const d=e.useCallback(e=>{s.debug("Updating columns state."),t.current.setState(eM(e)),t.current.forceUpdate(),t.current.publishEvent("columnsChange",e.orderedFields)},[s,t]),p=e.useCallback(e=>Ab(t)[e],[t]),h=e.useCallback(()=>kb(t),[t]),f=e.useCallback(()=>Mb(t),[t]),m=e.useCallback((e,n=!0)=>(n?Mb(t):kb(t)).findIndex(t=>t.field===e),[t]),g=e.useCallback(e=>{const n=m(e);return Ib(t)[n]},[t,m]),v=e.useCallback(e=>{Sb(t)!==e&&(t.current.setState(n=>(0,i.A)({},n,{columns:JS({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:e,keepOnlyColumnsToUpsert:!1})})),t.current.forceUpdate())},[t,l]),y=e.useCallback(e=>{const n=JS({apiRef:t,columnTypes:l,columnsToUpsert:e,initialState:void 0,keepOnlyColumnsToUpsert:!1});d(n)},[t,d,l]),b=e.useCallback((e,n)=>{var o;const r=Sb(t);if(n!==(null==(o=r[e])||o)){const o=(0,i.A)({},r,{[e]:n});t.current.setColumnVisibilityModel(o)}},[t]),x=e.useCallback(e=>Cb(t).findIndex(t=>t===e),[t]),w=e.useCallback((e,n)=>{const o=Cb(t),r=x(e);if(r===n)return;s.debug(`Moving column ${e} to index ${n}`);const a=[...o],l=a.splice(r,1)[0];a.splice(n,0,l),d((0,i.A)({},_b(t.current.state),{orderedFields:a}));const u={column:t.current.getColumn(e),targetIndex:t.current.getColumnIndexRelativeToVisibleColumns(e),oldIndex:r};t.current.publishEvent("columnIndexChange",u)},[t,s,d,x]),_=e.useCallback((e,n)=>{var o,r;s.debug(`Updating column ${e} width to ${n}`);const a=_b(t.current.state),l=a.lookup[e],u=(0,i.A)({},l,{width:n,hasBeenResized:!0});d(YS((0,i.A)({},a,{lookup:(0,i.A)({},a.lookup,{[e]:u})}),null!=(o=null==(r=t.current.getRootDimensions())?void 0:r.viewportInnerSize.width)?o:0)),t.current.publishEvent("columnWidthChange",{element:t.current.getColumnHeaderElement(e),colDef:u,width:n})},[t,s,d]),C={setColumnIndex:w};Hx(t,{getColumn:p,getAllColumns:h,getColumnIndex:m,getColumnPosition:g,getVisibleColumns:f,getColumnIndexRelativeToVisibleColumns:x,updateColumns:y,setColumnVisibilityModel:v,setColumnVisibility:b,setColumnWidth:_},"public"),Hx(t,C,n.signature===Xx.DataGrid?"private":"public");const A=e.useCallback((e,o)=>{var r,a;const s={},l=Sb(t);(!o.exportOnlyDirtyModels||null!=n.columnVisibilityModel||Object.keys(null!=(r=null==(a=n.initialState)||null==(a=a.columns)?void 0:a.columnVisibilityModel)?r:{}).length>0||Object.keys(l).length>0)&&(s.columnVisibilityModel=l),s.orderedFields=Cb(t);const u=kb(t),c={};return u.forEach(e=>{if(e.hasBeenResized){const t={};XS.forEach(n=>{let o=e[n];o===1/0&&(o=-1),t[n]=o}),c[e.field]=t}}),Object.keys(c).length>0&&(s.dimensions=c),(0,i.A)({},e,{columns:s})},[t,n.columnVisibilityModel,null==(r=n.initialState)?void 0:r.columns]),k=e.useCallback((e,n)=>{var o;const r=null==(o=n.stateToRestore.columns)?void 0:o.columnVisibilityModel,i=n.stateToRestore.columns;if(null==r&&null==i)return e;const a=JS({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:i,columnVisibilityModel:r,keepOnlyColumnsToUpsert:!1});return t.current.setState(eM(a)),null!=i&&t.current.publishEvent("columnsChange",a.orderedFields),e},[t,l]),S=e.useCallback((e,t)=>{if(t===rM.columns){var r;const e=n.slots.columnsPanel;return(0,o.jsx)(e,(0,i.A)({},null==(r=n.slotProps)?void 0:r.columnsPanel))}return e},[n.slots.columnsPanel,null==(a=n.slotProps)?void 0:a.columnsPanel]),M=e.useCallback(e=>n.disableColumnSelector?e:[...e,"columnMenuColumnsItem"],[n.disableColumnSelector]);Mk(t,"columnMenu",M),Mk(t,"exportState",A),Mk(t,"restoreState",k),Mk(t,"preferencePanel",S);const P=e.useRef(null);Qx(t,"viewportInnerSizeChange",e=>{P.current!==e.width&&(P.current=e.width,d(YS(_b(t.current.state),e.width)))});const I=e.useCallback(()=>{s.info("Columns pipe processing have changed, regenerating the columns");const e=JS({apiRef:t,columnTypes:l,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});d(e)},[t,s,d,l]);Pk(t,"hydrateColumns",I);const R=e.useRef(!0);e.useEffect(()=>{if(R.current)return void(R.current=!1);if(s.info(`GridColumns have changed, new length ${n.columns.length}`),u.current===n.columns&&c.current===l)return;const e=JS({apiRef:t,columnTypes:l,initialState:void 0,columnsToUpsert:n.columns,keepOnlyColumnsToUpsert:!0});u.current=n.columns,c.current=l,d(e)},[s,t,d,n.columns,l]),e.useEffect(()=>{void 0!==n.columnVisibilityModel&&t.current.setColumnVisibilityModel(n.columnVisibilityModel)},[t,s,n.columnVisibilityModel])}(r,n),((t,n)=>{const o=cw(t,"useGridRows"),r=zM(t,n),a=e.useRef(Date.now()),s=k_(),l=e.useCallback(e=>{const n=Bb(t)[e];if(n)return n;const o=t.current.getRowNode(e);return o&&sk(o)?{[nk]:e}:null},[t]),u=n.getRowId,c=e.useCallback(e=>nk in e?e[nk]:u?u(e):e.id,[u]),d=e.useMemo(()=>r.rows.reduce((e,{id:t},n)=>(e[t]=n,e),{}),[r.rows]),p=e.useCallback(({cache:e,throttle:o})=>{const r=()=>{a.current=Date.now(),t.current.setState(e=>(0,i.A)({},e,{rows:ak({apiRef:t,rowCountProp:n.rowCount,loadingProp:n.loading,previousTree:Wb(t),previousTreeDepths:Gb(t)})})),t.current.publishEvent("rowsSet"),t.current.forceUpdate()};if(s.clear(),t.current.caches.rows=e,!o)return void r();const l=n.throttleRowsMs-(Date.now()-a.current);l>0?s.start(l,r):r()},[n.throttleRowsMs,n.rowCount,n.loading,t,s]),h=e.useCallback(e=>{o.debug(`Updating all rows, new length ${e.length}`);const r=rk({rows:e,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),i=t.current.caches.rows;r.rowsBeforePartialUpdates=i.rowsBeforePartialUpdates,p({cache:r,throttle:!0})},[o,n.getRowId,n.loading,n.rowCount,p,t]),f=e.useCallback(e=>{if(n.signature===Xx.DataGrid&&e.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));const o=[];e.forEach(e=>{const r=ok(e,n.getRowId,"A row was provided without id when calling updateRows():"),a=t.current.getRowNode(r);if("pinnedRow"===(null==a?void 0:a.type)){const n=t.current.caches.pinnedRows,o=n.idLookup[r];o&&(n.idLookup[r]=(0,i.A)({},o,e))}else o.push(e)});const r=(({previousCache:e,getRowId:t,updates:n})=>{var o,r,a;if("full"===e.updates.type)throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const s=new Map;n.forEach(e=>{const n=ok(e,t,"A row was provided without id when calling updateRows():");s.has(n)?s.set(n,(0,i.A)({},s.get(n),e)):s.set(n,e)});const l={type:"partial",actions:{insert:[...null!=(o=e.updates.actions.insert)?o:[]],modify:[...null!=(r=e.updates.actions.modify)?r:[]],remove:[...null!=(a=e.updates.actions.remove)?a:[]]},idToActionLookup:(0,i.A)({},e.updates.idToActionLookup)},u=(0,i.A)({},e.dataRowIdToModelLookup),c=(0,i.A)({},e.dataRowIdToIdLookup),d={insert:{},modify:{},remove:{}};s.forEach((e,t)=>{const n=l.idToActionLookup[t];if("delete"===e._action){if("remove"===n||!u[t])return;return null!=n&&(d[n][t]=!0),l.actions.remove.push(t),delete u[t],void delete c[t]}const o=u[t];if(o)return"remove"===n?(d.remove[t]=!0,l.actions.modify.push(t)):null==n&&l.actions.modify.push(t),void(u[t]=(0,i.A)({},o,e));"remove"===n?(d.remove[t]=!0,l.actions.insert.push(t)):null==n&&l.actions.insert.push(t),u[t]=e,c[t]=t});const p=Object.keys(d);for(let e=0;e<p.length;e+=1){const t=p[e],n=d[t];Object.keys(n).length>0&&(l.actions[t]=l.actions[t].filter(e=>!n[e]))}return{dataRowIdToModelLookup:u,dataRowIdToIdLookup:c,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}})({updates:o,getRowId:n.getRowId,previousCache:t.current.caches.rows});p({cache:r,throttle:!0})},[n.signature,n.getRowId,p,t]),m=e.useCallback(()=>{const e=Kb(t),n=Bb(t);return new Map(e.map(e=>{var t;return[e,null!=(t=n[e])?t:{}]}))},[t]),g=e.useCallback(()=>Nb(t),[t]),v=e.useCallback(()=>Kb(t),[t]),y=e.useCallback(e=>d[e],[d]),b=e.useCallback((e,n)=>{const o=t.current.getRowNode(e);if(!o)throw new Error(`MUI: No row with id #${e} found`);if("group"!==o.type)throw new Error("MUI: Only group nodes can be expanded or collapsed");const r=(0,i.A)({},o,{childrenExpanded:n});t.current.setState(t=>(0,i.A)({},t,{rows:(0,i.A)({},t.rows,{tree:(0,i.A)({},t.rows.tree,{[e]:r})})})),t.current.forceUpdate(),t.current.publishEvent("rowExpansionChange",r)},[t]),x=e.useCallback(e=>{var n;return null!=(n=Wb(t)[e])?n:null},[t]),w=e.useCallback(({skipAutoGeneratedRows:e=!0,groupId:n,applySorting:o,applyFiltering:r})=>{const i=Wb(t);let a;if(o){const o=i[n];if(!o)return[];const r=ax(t);a=[];for(let t=r.findIndex(e=>e===n)+1;t<r.length&&i[r[t]].depth>o.depth;t+=1){const n=r[t];e&&sk(i[n])||a.push(n)}}else a=lk(i,n,e);if(r){const e=px(t);a=a.filter(t=>!1!==e[t])}return a},[t]),_=e.useCallback((e,n)=>{const r=t.current.getRowNode(e);if(!r)throw new Error(`MUI: No row with id #${e} found`);if(r.parent!==tk)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if("leaf"!==r.type)throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");t.current.setState(r=>{const a=Wb(r,t.current.instanceId)[tk],s=a.children,l=s.findIndex(t=>t===e);if(-1===l||l===n)return r;o.debug(`Moving row ${e} to index ${n}`);const u=[...s];return u.splice(n,0,u.splice(l,1)[0]),(0,i.A)({},r,{rows:(0,i.A)({},r.rows,{tree:(0,i.A)({},r.rows.tree,{[tk]:(0,i.A)({},a,{children:u})})})})}),t.current.publishEvent("rowsSet")},[t,o]),C={getRow:l,getRowId:c,getRowModels:m,getRowsCount:g,getAllRowIds:v,setRows:h,updateRows:f,getRowNode:x,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:e.useCallback((e,o)=>{if(n.signature===Xx.DataGrid&&o.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));if(0===o.length)return;if(Zb(t)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const r=(0,i.A)({},Wb(t)),a=(0,i.A)({},Bb(t)),s=(0,i.A)({},Vb(t)),l=r[tk],u=[...l.children],c=new Set;for(let t=0;t<o.length;t+=1){const i=o[t],l=ok(i,n.getRowId,"A row was provided without id when calling replaceRows()."),[d]=u.splice(e+t,1,l);c.has(d)||(delete a[d],delete s[d],delete r[d]);const p={id:l,depth:0,parent:tk,type:"leaf",groupingKey:null};a[l]=i,s[l]=l,r[l]=p,c.add(l)}r[tk]=(0,i.A)({},l,{children:u});const d=u.filter(e=>"leaf"===r[e].type);t.current.caches.rows.dataRowIdToModelLookup=a,t.current.caches.rows.dataRowIdToIdLookup=s,t.current.setState(e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,dataRowIds:d,tree:r})})),t.current.publishEvent("rowsSet")},[t,n.signature,n.getRowId])},A={setRowIndex:_,setRowChildrenExpansion:b,getRowGroupChildren:w},k=e.useCallback(()=>{let e;o.info("Row grouping pre-processing have changed, regenerating the row tree"),e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows?(0,i.A)({},t.current.caches.rows,{updates:{type:"full",rows:Kb(t)}}):rk({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),p({cache:e,throttle:!1})},[o,t,n.rows,n.getRowId,n.loading,n.rowCount,p]),S=e.useCallback(e=>{"rowTreeCreation"===e&&k()},[k]),M=e.useCallback(()=>{t.current.getActiveStrategy("rowTree")!==Ub(t)&&k()},[t,k]);Qx(t,"activeStrategyProcessorChange",S),Qx(t,"strategyAvailabilityChange",M);const P=e.useCallback(()=>{t.current.setState(e=>{const o=t.current.unstable_applyPipeProcessors("hydrateRows",{tree:Wb(e,t.current.instanceId),treeDepths:Gb(e,t.current.instanceId),dataRowIds:Kb(e,t.current.instanceId),dataRowIdToModelLookup:Bb(e,t.current.instanceId),dataRowIdToIdLookup:Vb(e,t.current.instanceId)});return(0,i.A)({},e,{rows:(0,i.A)({},e.rows,o,{totalTopLevelRowCount:ik({tree:o.tree,rowCountProp:n.rowCount})})})}),t.current.publishEvent("rowsSet"),t.current.forceUpdate()},[t,n.rowCount]);Pk(t,"hydrateRows",P),Hx(t,C,"public"),Hx(t,A,n.signature===Xx.DataGrid?"private":"public");const I=e.useRef(!0);e.useEffect(()=>{if(I.current)return void(I.current=!1);const e=t.current.caches.rows.rowsBeforePartialUpdates===n.rows,r=t.current.caches.rows.loadingPropBeforePartialUpdates===n.loading,a=t.current.caches.rows.rowCountPropBeforePartialUpdates===n.rowCount;if(e)return r||(t.current.setState(e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{loading:n.loading})})),t.current.caches.rows.loadingPropBeforePartialUpdates=n.loading,t.current.forceUpdate()),void(a||(t.current.setState(e=>(0,i.A)({},e,{rows:(0,i.A)({},e.rows,{totalRowCount:Math.max(n.rowCount||0,e.rows.totalRowCount),totalTopLevelRowCount:Math.max(n.rowCount||0,e.rows.totalTopLevelRowCount)})})),t.current.caches.rows.rowCountPropBeforePartialUpdates=n.rowCount,t.current.forceUpdate()));o.debug(`Updating all rows, new length ${n.rows.length}`),p({cache:rk({rows:n.rows,getRowId:n.getRowId,loading:n.loading,rowCount:n.rowCount}),throttle:!1})},[n.rows,n.rowCount,n.getRowId,n.loading,o,p,t])})(r,n),function(t,n){const{getRowId:o}=n,r=e.useCallback(e=>({field:e,colDef:t.current.getColumn(e)}),[t]),i=e.useCallback(e=>{const n=t.current.getRow(e);if(!n)throw new sP(`No row with id #${e} found`);return{id:e,columns:t.current.getAllColumns(),row:n}},[t]),a=e.useCallback((e,n)=>{const o=t.current.getRow(e),r=t.current.getRowNode(e);if(!o||!r)throw new sP(`No row with id #${e} found`);const i=Cx(t),a=Mx(t);return{id:e,field:n,row:o,rowNode:r,value:o[n],colDef:t.current.getColumn(n),cellMode:t.current.getCellMode(e,n),api:t.current,hasFocus:null!==i&&i.field===n&&i.id===e,tabIndex:a&&a.field===n&&a.id===e?0:-1}},[t]),s=e.useCallback((e,n)=>{const o=t.current.getColumn(n),r=t.current.getCellValue(e,n),i=t.current.getRow(e),a=t.current.getRowNode(e);if(!i||!a)throw new sP(`No row with id #${e} found`);const s=Cx(t),l=Mx(t),u={id:e,field:n,row:i,rowNode:a,colDef:o,cellMode:t.current.getCellMode(e,n),hasFocus:null!==s&&s.field===n&&s.id===e,tabIndex:l&&l.field===n&&l.id===e?0:-1,value:r,formattedValue:r,isEditable:!1};return o&&o.valueFormatter&&(u.formattedValue=o.valueFormatter({id:e,field:u.field,value:u.value,api:t.current})),u.isEditable=o&&t.current.isCellEditable(u),u},[t]),l=e.useCallback((e,n)=>{const o=t.current.getColumn(n);if(!o||!o.valueGetter){const o=t.current.getRow(e);if(!o)throw new sP(`No row with id #${e} found`);return o[n]}return o.valueGetter(a(e,n))},[t,a]),u=e.useCallback((e,t)=>{var n;const r=nk in e?e[nk]:null!=(n=null==o?void 0:o(e))?n:e.id,i=t.field;return t&&t.valueGetter?t.valueGetter(a(r,i)):e[i]},[a,o]),c=e.useCallback((e,n)=>{var r;const i=u(e,n);if(!n||!n.valueFormatter)return i;const a=null!=(r=o?o(e):e.id)?r:e[nk],s=n.field;return n.valueFormatter({id:a,field:s,value:i,api:t.current})},[t,o,u]),d=e.useCallback(e=>t.current.rootElementRef.current?function(e,t){return e.querySelector(`[role="columnheader"][data-field="${HM(t)}"]`)}(t.current.rootElementRef.current,e):null,[t]),p=e.useCallback(e=>t.current.rootElementRef.current?function(e,t){return e.querySelector(BM(t))}(t.current.rootElementRef.current,e):null,[t]),h=e.useCallback((e,n)=>t.current.rootElementRef.current?function(e,{id:t,field:n}){const o=`${BM(t)} .${Vy.cell}[data-field="${HM(n)}"]`;return e.querySelector(o)}(t.current.rootElementRef.current,{id:e,field:n}):null,[t]);Hx(t,{getCellValue:l,getCellParams:s,getCellElement:h,getRowValue:u,getRowFormattedValue:c,getRowParams:i,getRowElement:p,getColumnHeaderParams:r,getColumnHeaderElement:d},"public")}(r,n),(t=>{const n=e.useRef({}),o=e.useCallback((e,t,o)=>{const r=n.current;r[e]||(r[e]={}),r[e][t]=o},[]),r=e.useCallback((e,t)=>{var o;return null==(o=n.current[e])?void 0:o[t]},[]),i=e.useCallback(e=>{const{columnIndex:n,rowId:r,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,u=s[n],c="function"==typeof u.colSpan?u.colSpan(t.current.getCellParams(r,u.field)):u.colSpan;if(!c||1===c)return o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:1,width:u.computedWidth}}),{colSpan:1};let d=u.computedWidth;for(let e=1;e<c;e+=1){const t=n+e;t>=i&&t<a&&(d+=s[t].computedWidth,o(r,n+e,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(n+c,l-1),leftVisibleCellIndex:n})),o(r,n,{spannedByColSpan:!1,cellProps:{colSpan:c,width:d}})}return{colSpan:c}},[t,o]),a={calculateColSpan:e.useCallback(({rowId:e,minFirstColumn:t,maxLastColumn:n,columns:o})=>{for(let r=t;r<n;r+=1){const a=i({columnIndex:r,rowId:e,minFirstColumnIndex:t,maxLastColumnIndex:n,columns:o});a.colSpan>1&&(r+=a.colSpan-1)}},[i])};Hx(t,{unstable_getCellColSpanInfo:r},"public"),Hx(t,a,"private");const s=e.useCallback(()=>{n.current={}},[]);Qx(t,"columnOrderChange",s)})(r),((t,n)=>{var o;const r=e.useCallback(e=>{var n;return null!=(n=Lb(t)[e])?n:[]},[t]),a=e.useCallback(()=>zb(t),[t]);Hx(t,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:a},"public");const s=e.useCallback(()=>{var e;const o=mj(null!=(e=n.columnGroupingModel)?e:[]);t.current.setState(e=>{var t,n,r;const a=null!=(t=null==(n=e.columns)?void 0:n.orderedFields)?t:[],s=null!=(r=e.pinnedColumns)?r:{},l=gj(a,o,s);return(0,i.A)({},e,{columnGrouping:(0,i.A)({},e.columnGrouping,{headerStructure:l})})})},[t,n.columnGroupingModel]),l=e.useCallback(e=>{var o,r,a,s;if(null==(o=n.experimentalFeatures)||!o.columnGrouping)return;const l=null!=(r=null==(a=(s=t.current).getPinnedColumns)?void 0:a.call(s))?r:{},u=Cb(t),c=Pb(t),d=yj(null!=e?e:[]),p=mj(null!=e?e:[]),h=gj(u,p,l),f=0===c.length?0:Math.max(...c.map(e=>{var t,n;return null!=(t=null==(n=p[e])?void 0:n.length)?t:0}));t.current.setState(e=>(0,i.A)({},e,{columnGrouping:{lookup:d,unwrappedGroupingModel:p,headerStructure:h,maxDepth:f}}))},[t,null==(o=n.experimentalFeatures)?void 0:o.columnGrouping]);Qx(t,"columnIndexChange",s),Qx(t,"columnsChange",()=>{l(n.columnGroupingModel)}),Qx(t,"columnVisibilityModelChange",()=>{l(n.columnGroupingModel)}),e.useEffect(()=>{l(n.columnGroupingModel)},[l,n.columnGroupingModel])})(r,n),((t,n)=>{((t,n)=>{const[o,r]=e.useState({}),a=e.useRef(o),s=e.useRef({}),{processRowUpdate:l,onProcessRowUpdateError:u,cellModesModel:c,onCellModesModelChange:d}=n,p=e=>(...t)=>{n.editMode===Zk.Cell&&e(...t)},h=e.useCallback((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)},[t]),m=e.useCallback((e,n,o)=>{if(t.current.getCellMode(e,n)!==o)throw new Error(`MUI: The cell with id=${e} and field=${n} is not in ${o} mode.`)},[t]),g=e.useCallback((e,n)=>{if(!e.isEditable)return;if(e.cellMode===Kk.Edit)return;const o=(0,i.A)({},e,{reason:Uk.cellDoubleClick});t.current.publishEvent("cellEditStart",o,n)},[t]),v=e.useCallback((e,n)=>{if(e.cellMode===Kk.View)return;if(t.current.getCellMode(e.id,e.field)===Kk.View)return;const o=(0,i.A)({},e,{reason:Gk.cellFocusOut});t.current.publishEvent("cellEditStop",o,n)},[t]),y=e.useCallback((e,n)=>{if(e.cellMode===Kk.Edit){if(229===n.which)return;let o;if("Escape"===n.key?o=Gk.escapeKeyDown:"Enter"===n.key?o=Gk.enterKeyDown:"Tab"===n.key&&(o=n.shiftKey?Gk.shiftTabKeyDown:Gk.tabKeyDown,n.preventDefault()),o){const r=(0,i.A)({},e,{reason:o});t.current.publishEvent("cellEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"cell"}))return;if(fw(n)?o=Uk.printableKeyDown:(n.ctrlKey||n.metaKey)&&"v"===n.key?o=Uk.pasteKeyDown:"Enter"===n.key?o=Uk.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(o=Uk.deleteKeyDown),o){const r=(0,i.A)({},e,{reason:o,key:n.key});t.current.publishEvent("cellEditStart",r,n)}}},[t]),b=e.useCallback(e=>{const{id:n,field:o,reason:r}=e,i={id:n,field:o};r!==Uk.printableKeyDown&&r!==Uk.deleteKeyDown&&r!==Uk.pasteKeyDown||(i.deleteValue=!0),t.current.startCellEditMode(i)},[t]),x=e.useCallback(e=>{const{id:n,field:o,reason:r}=e;let i;t.current.runPendingEditCellValueMutation(n,o),r===Gk.enterKeyDown?i="below":r===Gk.tabKeyDown?i="right":r===Gk.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===r;t.current.stopCellEditMode({id:n,field:o,ignoreModifications:a,cellToFocusAfter:i})},[t]);Qx(t,"cellDoubleClick",p(g)),Qx(t,"cellFocusOut",p(v)),Qx(t,"cellKeyDown",p(y)),Qx(t,"cellEditStart",p(b)),Qx(t,"cellEditStop",p(x)),ew(t,"cellEditStart",n.onCellEditStart),ew(t,"cellEditStop",n.onCellEditStop);const w=e.useCallback((e,n)=>{const o=qM(t.current.state);return o[e]&&o[e][n]?Kk.Edit:Kk.View},[t]),_=Fw(e=>{const o=e!==n.cellModesModel;d&&o&&d(e,{}),n.cellModesModel&&o||(r(e),a.current=e,t.current.publishEvent("cellModesModelChange",e))}),C=e.useCallback((e,t,n)=>{const o=(0,i.A)({},a.current);if(null!==n)o[e]=(0,i.A)({},o[e],{[t]:(0,i.A)({},n)});else{const n=o[e],r=(0,f.A)(n,[t].map(iw));o[e]=r,0===Object.keys(o[e]).length&&delete o[e]}_(o)},[_]),A=e.useCallback((e,n,o)=>{t.current.setState(t=>{const r=(0,i.A)({},t.editRows);return null!==o?r[e]=(0,i.A)({},r[e],{[n]:(0,i.A)({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),(0,i.A)({},t,{editRows:r})}),t.current.forceUpdate()},[t]),k=e.useCallback(e=>{const{id:t,field:n}=e,o=(0,f.A)(e,XM);h(t,n),m(t,n,Kk.View),C(t,n,(0,i.A)({mode:Kk.Edit},o))},[h,m,C]),S=Fw(e=>{const{id:n,field:o,deleteValue:r,initialValue:i}=e;let a=t.current.getCellValue(n,o);(r||i)&&(a=r?"":i),A(n,o,{value:a,error:!1,isProcessingProps:!1}),t.current.setCellFocus(n,o)}),M=e.useCallback(e=>{const{id:t,field:n}=e,o=(0,f.A)(e,YM);m(t,n,Kk.Edit),C(t,n,(0,i.A)({mode:Kk.View},o))},[m,C]),P=Fw(async e=>{const{id:n,field:o,ignoreModifications:r,cellToFocusAfter:i="none"}=e;m(n,o,Kk.Edit),t.current.runPendingEditCellValueMutation(n,o);const a=()=>{A(n,o,null),C(n,o,null),"none"!==i&&t.current.moveFocusToRelativeCell(n,o,i)};if(r)return void a();const c=qM(t.current.state),{error:d,isProcessingProps:p}=c[n][o];if(d||p)return s.current[n][o].mode=Kk.Edit,void C(n,o,{mode:Kk.Edit});const h=t.current.getRowWithUpdatedValuesFromCellEditing(n,o);if(l){const e=e=>{s.current[n][o].mode=Kk.Edit,C(n,o,{mode:Kk.Edit}),u?u(e):QM()};try{const o=t.current.getRow(n);Promise.resolve(l(h,o)).then(e=>{t.current.updateRows([e]),a()}).catch(e)}catch(t){e(t)}}else t.current.updateRows([h]),a()}),I=e.useCallback(async e=>{var n;const{id:o,field:r,value:a,debounceMs:s,unstable_skipValueParser:l}=e;h(o,r),m(o,r,Kk.Edit);const u=t.current.getColumn(r),c=t.current.getRow(o);let d=a;u.valueParser&&!l&&(d=u.valueParser(a,t.current.getCellParams(o,r)));let p=qM(t.current.state),f=(0,i.A)({},p[o][r],{value:d,changeReason:s?"debouncedSetEditCellValue":"setEditCellValue"});if(u.preProcessEditCellProps){const e=a!==p[o][r].value;f=(0,i.A)({},f,{isProcessingProps:!0}),A(o,r,f),f=await Promise.resolve(u.preProcessEditCellProps({id:o,row:c,props:f,hasChanged:e}))}return t.current.getCellMode(o,r)!==Kk.View&&(p=qM(t.current.state),f=(0,i.A)({},f,{isProcessingProps:!1}),f.value=u.preProcessEditCellProps?p[o][r].value:d,A(o,r,f),p=qM(t.current.state),!(null!=(n=p[o])&&null!=(n=n[r])&&n.error))},[t,h,m,A]),R=e.useCallback((e,n)=>{const o=t.current.getColumn(n),r=qM(t.current.state),a=t.current.getRow(e);if(!r[e]||!r[e][n])return t.current.getRow(e);const{value:s}=r[e][n];return o.valueSetter?o.valueSetter({value:s,row:a}):(0,i.A)({},a,{[n]:s})},[t]),T={setCellEditingEditCellValue:I,getRowWithUpdatedValuesFromCellEditing:R};Hx(t,{getCellMode:w,startCellEditMode:k,stopCellEditMode:M},"public"),Hx(t,T,"private"),e.useEffect(()=>{c&&_(c)},[c,_]),_p(()=>{const e=Vb(t),n=s.current;s.current=Dx(o),Object.entries(o).forEach(([t,o])=>{Object.entries(o).forEach(([o,r])=>{var a,s;const l=(null==(a=n[t])||null==(a=a[o])?void 0:a.mode)||Kk.View,u=null!=(s=e[t])?s:t;r.mode===Kk.Edit&&l===Kk.View?S((0,i.A)({id:u,field:o},r)):r.mode===Kk.View&&l===Kk.Edit&&P((0,i.A)({id:u,field:o},r))})})},[t,o,S,P])})(t,n),((t,n)=>{const[o,r]=e.useState({}),a=e.useRef(o),s=e.useRef({}),l=e.useRef(null),u=e.useRef(null),{processRowUpdate:c,onProcessRowUpdateError:d,rowModesModel:p,onRowModesModelChange:h}=n,m=e=>(...t)=>{n.editMode===Zk.Row&&e(...t)},g=e.useCallback((e,n)=>{const o=t.current.getCellParams(e,n);if(!t.current.isCellEditable(o))throw new Error(`MUI: The cell with id=${e} and field=${n} is not editable.`)},[t]),v=e.useCallback((e,n)=>{if(t.current.getRowMode(e)!==n)throw new Error(`MUI: The row with id=${e} is not in ${n} mode.`)},[t]),y=e.useCallback((e,n)=>{if(!e.isEditable)return;if(t.current.getRowMode(e.id)===qk.Edit)return;const o=t.current.getRowParams(e.id),r=(0,i.A)({},o,{field:e.field,reason:JM.cellDoubleClick});t.current.publishEvent("rowEditStart",r,n)},[t]),b=e.useCallback(e=>{u.current=e},[]),x=e.useCallback((e,n)=>{e.isEditable&&t.current.getRowMode(e.id)!==qk.View&&(u.current=null,l.current=setTimeout(()=>{var o;if(l.current=null,(null==(o=u.current)?void 0:o.id)!==e.id){if(!t.current.getRow(e.id))return;if(t.current.getRowMode(e.id)===qk.View)return;const o=t.current.getRowParams(e.id),r=(0,i.A)({},o,{field:e.field,reason:eP.rowFocusOut});t.current.publishEvent("rowEditStop",r,n)}}))},[t]);e.useEffect(()=>()=>{clearTimeout(l.current)},[]);const w=e.useCallback((e,n)=>{if(e.cellMode===qk.Edit){if(229===n.which)return;let o;if("Escape"===n.key)o=eP.escapeKeyDown;else if("Enter"===n.key)o=eP.enterKeyDown;else if("Tab"===n.key){const r=Pb(t).filter(n=>t.current.getColumn(n).type===ZS||t.current.isCellEditable(t.current.getCellParams(e.id,n)));if(n.shiftKey?e.field===r[0]&&(o=eP.shiftTabKeyDown):e.field===r[r.length-1]&&(o=eP.tabKeyDown),n.preventDefault(),!o){const o=r.findIndex(t=>t===e.field),i=r[n.shiftKey?o-1:o+1];t.current.setCellFocus(e.id,i)}}if(o){const r=(0,i.A)({},t.current.getRowParams(e.id),{reason:o,field:e.field});t.current.publishEvent("rowEditStop",r,n)}}else if(e.isEditable){let o;if(!t.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:n,cellParams:e,editMode:"row"}))return;if(fw(n)||(n.ctrlKey||n.metaKey)&&"v"===n.key?o=JM.printableKeyDown:"Enter"===n.key?o=JM.enterKeyDown:"Delete"!==n.key&&"Backspace"!==n.key||(o=JM.deleteKeyDown),o){const r=t.current.getRowParams(e.id),a=(0,i.A)({},r,{field:e.field,reason:o});t.current.publishEvent("rowEditStart",a,n)}}},[t]),_=e.useCallback(e=>{const{id:n,field:o,reason:r}=e,i={id:n,fieldToFocus:o};r!==JM.printableKeyDown&&r!==JM.deleteKeyDown||(i.deleteValue=!!o),t.current.startRowEditMode(i)},[t]),C=e.useCallback(e=>{const{id:n,reason:o,field:r}=e;let i;t.current.runPendingEditCellValueMutation(n),o===eP.enterKeyDown?i="below":o===eP.tabKeyDown?i="right":o===eP.shiftTabKeyDown&&(i="left");const a="escapeKeyDown"===o;t.current.stopRowEditMode({id:n,ignoreModifications:a,field:r,cellToFocusAfter:i})},[t]);Qx(t,"cellDoubleClick",m(y)),Qx(t,"cellFocusIn",m(b)),Qx(t,"cellFocusOut",m(x)),Qx(t,"cellKeyDown",m(w)),Qx(t,"rowEditStart",m(_)),Qx(t,"rowEditStop",m(C)),ew(t,"rowEditStart",n.onRowEditStart),ew(t,"rowEditStop",n.onRowEditStop);const A=e.useCallback(e=>{if(n.editMode===Zk.Cell)return qk.View;const o=qM(t.current.state);return o[e]&&Object.keys(o[e]).length>0?qk.Edit:qk.View},[t,n.editMode]),k=Fw(e=>{const o=e!==n.rowModesModel;h&&o&&h(e,{}),n.rowModesModel&&o||(r(e),a.current=e,t.current.publishEvent("rowModesModelChange",e))}),S=e.useCallback((e,t)=>{const n=(0,i.A)({},a.current);null!==t?n[e]=(0,i.A)({},t):delete n[e],k(n)},[k]),M=e.useCallback((e,n)=>{t.current.setState(t=>{const o=(0,i.A)({},t.editRows);return null!==n?o[e]=n:delete o[e],(0,i.A)({},t,{editRows:o})}),t.current.forceUpdate()},[t]),P=e.useCallback((e,n,o)=>{t.current.setState(t=>{const r=(0,i.A)({},t.editRows);return null!==o?r[e]=(0,i.A)({},r[e],{[n]:(0,i.A)({},o)}):(delete r[e][n],0===Object.keys(r[e]).length&&delete r[e]),(0,i.A)({},t,{editRows:r})}),t.current.forceUpdate()},[t]),I=e.useCallback(e=>{const{id:t}=e,n=(0,f.A)(e,tP);v(t,qk.View),S(t,(0,i.A)({mode:qk.Edit},n))},[v,S]),R=Fw(e=>{const{id:n,fieldToFocus:o,deleteValue:r,initialValue:i}=e,a=Cb(t).reduce((e,a)=>{if(!t.current.getCellParams(n,a).isEditable)return e;let s=t.current.getCellValue(n,a);return o===a&&(r||i)&&(s=r?"":i),e[a]={value:s,error:!1,isProcessingProps:!1},e},{});M(n,a),o&&t.current.setCellFocus(n,o)}),T=e.useCallback(e=>{const{id:t}=e,n=(0,f.A)(e,nP);v(t,qk.Edit),S(t,(0,i.A)({mode:qk.View},n))},[v,S]),E=Fw(e=>{const{id:n,ignoreModifications:o,field:r,cellToFocusAfter:i="none"}=e;t.current.runPendingEditCellValueMutation(n);const a=()=>{"none"!==i&&r&&t.current.moveFocusToRelativeCell(n,r,i),M(n,null),S(n,null)};if(o)return void a();const l=qM(t.current.state),u=t.current.getRow(n);if(Object.values(l[n]).some(e=>e.isProcessingProps))return void(s.current[n].mode=qk.Edit);if(Object.values(l[n]).some(e=>e.error))return s.current[n].mode=qk.Edit,void S(n,{mode:qk.Edit});const p=t.current.getRowWithUpdatedValuesFromRowEditing(n);if(c){const e=e=>{s.current[n].mode=qk.Edit,S(n,{mode:qk.Edit}),d?d(e):oP()};try{Promise.resolve(c(p,u)).then(e=>{t.current.updateRows([e]),a()}).catch(e)}catch(t){e(t)}}else t.current.updateRows([p]),a()}),O=e.useCallback(e=>{const{id:n,field:o,value:r,debounceMs:a,unstable_skipValueParser:s}=e;g(n,o);const l=t.current.getColumn(o),u=t.current.getRow(n);let c=r;l.valueParser&&!s&&(c=l.valueParser(r,t.current.getCellParams(n,o)));let d=qM(t.current.state),p=(0,i.A)({},d[n][o],{value:c,changeReason:a?"debouncedSetEditCellValue":"setEditCellValue"});return l.preProcessEditCellProps||P(n,o,p),new Promise(e=>{const r=[];if(l.preProcessEditCellProps){const a=p.value!==d[n][o].value;p=(0,i.A)({},p,{isProcessingProps:!0}),P(n,o,p);const s=d[n],h=(0,f.A)(s,[o].map(iw)),m=Promise.resolve(l.preProcessEditCellProps({id:n,row:u,props:p,hasChanged:a,otherFieldsProps:h})).then(r=>{t.current.getRowMode(n)!==qk.View?(d=qM(t.current.state),(r=(0,i.A)({},r,{isProcessingProps:!1})).value=l.preProcessEditCellProps?d[n][o].value:c,P(n,o,r)):e(!1)});r.push(m)}Object.entries(d[n]).forEach(([a,s])=>{if(a===o)return;const l=t.current.getColumn(a);if(!l.preProcessEditCellProps)return;s=(0,i.A)({},s,{isProcessingProps:!0}),P(n,a,s),d=qM(t.current.state);const c=d[n],p=(0,f.A)(c,[a].map(iw)),h=Promise.resolve(l.preProcessEditCellProps({id:n,row:u,props:s,hasChanged:!1,otherFieldsProps:p})).then(o=>{t.current.getRowMode(n)!==qk.View?(o=(0,i.A)({},o,{isProcessingProps:!1}),P(n,a,o)):e(!1)});r.push(h)}),Promise.all(r).then(()=>{t.current.getRowMode(n)===qk.Edit?(d=qM(t.current.state),e(!d[n][o].error)):e(!1)})})},[t,g,P]),L={setRowEditingEditCellValue:O,getRowWithUpdatedValuesFromRowEditing:e.useCallback(e=>{const n=qM(t.current.state),o=t.current.getRow(e);if(!n[e])return t.current.getRow(e);let r=(0,i.A)({},o);return Object.entries(n[e]).forEach(([e,n])=>{const o=t.current.getColumn(e);o.valueSetter?r=o.valueSetter({value:n.value,row:r}):r[e]=n.value}),r},[t])};Hx(t,{getRowMode:A,startRowEditMode:I,stopRowEditMode:T},"public"),Hx(t,L,"private"),e.useEffect(()=>{p&&k(p)},[p,k]),_p(()=>{const e=Vb(t),n=s.current;s.current=Dx(o),Object.entries(o).forEach(([t,o])=>{var r,a;const s=(null==(r=n[t])?void 0:r.mode)||qk.View,l=null!=(a=e[t])?a:t;o.mode===qk.Edit&&s===qk.View?R((0,i.A)({id:l},o)):o.mode===qk.View&&s===qk.Edit&&E((0,i.A)({id:l},o))})},[t,o,R,E])})(t,n);const o=e.useRef({}),{isCellEditable:r}=n,a=e.useCallback(e=>!sk(e.rowNode)&&!!e.colDef.editable&&!!e.colDef.renderEditCell&&(!r||r(e)),[r]);e.useEffect(()=>{const e=o.current;return()=>{Object.entries(e).forEach(([t,n])=>{Object.keys(n).forEach(n=>{const[o]=e[t][n];clearTimeout(o),delete e[t][n]})})}},[]);const s=e.useCallback((e,t)=>{if(o.current[e])if(t){if(o.current[e][t]){const[,n]=o.current[e][t];n()}}else Object.keys(o.current[e]).forEach(t=>{const[,n]=o.current[e][t];n()})},[]),l=e.useCallback(e=>{const{id:r,field:i,debounceMs:a}=e;return new Promise(s=>{((e,t,n,r)=>{if(!n)return void r();if(o.current[e]||(o.current[e]={}),o.current[e][t]){const[n]=o.current[e][t];clearTimeout(n)}const i=setTimeout(()=>{r(),delete o.current[e][t]},n);o.current[e][t]=[i,()=>{const[n]=o.current[e][t];clearTimeout(n),r(),delete o.current[e][t]}]})(r,i,a,async()=>{const o=n.editMode===Zk.Row?t.current.setRowEditingEditCellValue:t.current.setCellEditingEditCellValue;if(t.current.getCellMode(r,i)===Kk.Edit){const t=await o(e);s(t)}})})},[t,n.editMode]),u=e.useCallback((e,o)=>n.editMode===Zk.Cell?t.current.getRowWithUpdatedValuesFromCellEditing(e,o):t.current.getRowWithUpdatedValuesFromRowEditing(e),[t,n.editMode]),c=e.useCallback((e,n)=>{var o,r;return null!=(o=null==(r=qM(t.current.state)[e])?void 0:r[n])?o:null},[t]),d={runPendingEditCellValueMutation:s};Hx(t,{isCellEditable:a,setEditCellValue:l,getRowWithUpdatedValues:u,unstable_getEditCellMeta:c},"public"),Hx(t,d,"private")})(r,n),((t,n)=>{const o=cw(t,"useGridFocus"),r=e.useRef(null),a=e.useCallback((e,n)=>{e&&t.current.getRow(e.id)&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(e.id,e.field),n)},[t]),s=e.useCallback((e,n)=>{const r=Cx(t);(null==r?void 0:r.id)===e&&(null==r?void 0:r.field)===n||(t.current.setState(t=>(o.debug(`Focusing on cell with id=${e} and field=${n}`),(0,i.A)({},t,{tabIndex:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:e,field:n},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),t.current.forceUpdate(),t.current.getRow(e)&&(r&&a(r,{}),t.current.publishEvent("cellFocusIn",t.current.getCellParams(e,n))))},[t,o,a]),l=e.useCallback((e,n={})=>{const r=Cx(t);a(r,n),t.current.setState(t=>(o.debug(`Focusing on column header with colIndex=${e}`),(0,i.A)({},t,{tabIndex:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:e},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),t.current.forceUpdate()},[t,o,a]),u=e.useCallback((e,n={})=>{const r=Cx(t);a(r,n),t.current.setState(t=>(o.debug(`Focusing on column header filter with colIndex=${e}`),(0,i.A)({},t,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:e},cell:null,columnGroupHeader:null}}))),t.current.forceUpdate()},[t,o,a]),c=e.useCallback((e,n,o={})=>{const r=Cx(t);r&&t.current.publishEvent("cellFocusOut",t.current.getCellParams(r.id,r.field),o),t.current.setState(t=>(0,i.A)({},t,{tabIndex:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:e,depth:n},columnHeader:null,columnHeaderFilter:null,cell:null}})),t.current.forceUpdate()},[t]),d=e.useCallback(()=>kx(t),[t]),p=e.useCallback((e,o,r)=>{let i=t.current.getColumnIndex(o);const a=Mb(t),s=LM(t,{pagination:n.pagination,paginationMode:n.paginationMode}),l=qb(t),u=[].concat(l.top||[],s.rows,l.bottom||[]);let c=u.findIndex(t=>t.id===e);"right"===r?i+=1:"left"===r?i-=1:c+=1,i>=a.length?(c+=1,c<u.length&&(i=0)):i<0&&(c-=1,c>=0&&(i=a.length-1)),c=Fx(c,0,u.length-1);const d=u[c];if(!d)return;const p=t.current.unstable_getCellColSpanInfo(d.id,i);p&&p.spannedByColSpan&&("left"===r||"below"===r?i=p.leftVisibleCellIndex:"right"===r&&(i=p.rightVisibleCellIndex)),i=Fx(i,0,a.length-1);const h=a[i];t.current.setCellFocus(d.id,h.field)},[t,n.pagination,n.paginationMode]),h=e.useCallback(({id:e,field:n})=>{t.current.setCellFocus(e,n)},[t]),f=e.useCallback((e,n)=>{"Enter"===n.key||"Tab"===n.key||"Shift"===n.key||mw(n.key)||t.current.setCellFocus(e.id,e.field)},[t]),m=e.useCallback(({field:e},n)=>{n.target===n.currentTarget&&t.current.setColumnHeaderFocus(e,n)},[t]),g=e.useCallback(({fields:e,depth:n},o)=>{if(o.target!==o.currentTarget)return;const r=kx(t);null!==r&&r.depth===n&&e.includes(r.field)||t.current.setColumnGroupHeaderFocus(e[0],n,o)},[t]),v=e.useCallback((e,n)=>{var r;null!=(r=n.relatedTarget)&&r.className.includes(Vy.columnHeader)||(o.debug("Clearing focus"),t.current.setState(e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[o,t]),y=e.useCallback(e=>{r.current=e},[]),b=e.useCallback(e=>{const n=r.current;r.current=null;const o=Cx(t);if(!t.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:e,cell:n}))return;if(!o)return void(n&&t.current.setCellFocus(n.id,n.field));if((null==n?void 0:n.id)===o.id&&(null==n?void 0:n.field)===o.field)return;const s=t.current.getCellElement(o.id,o.field);null!=s&&s.contains(e.target)||(n?t.current.setCellFocus(n.id,n.field):(t.current.setState(e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),t.current.forceUpdate(),a(o,e)))},[t,a]),x=e.useCallback(e=>{if("view"===e.cellMode)return;const n=Cx(t);(null==n?void 0:n.id)===e.id&&(null==n?void 0:n.field)===e.field||t.current.setCellFocus(e.id,e.field)},[t]),w=e.useCallback(()=>{const e=Cx(t);e&&!t.current.getRow(e.id)&&t.current.setState(e=>(0,i.A)({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},[t]),_=Fw(()=>{const e=Cx(t);if(!e)return;const o=LM(t,{pagination:n.pagination,paginationMode:n.paginationMode});if(o.rows.find(t=>t.id===e.id))return;const r=Mb(t);t.current.setState(e=>(0,i.A)({},e,{tabIndex:{cell:{id:o.rows[0].id,field:r[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),C={moveFocusToRelativeCell:p,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:d};Hx(t,{setCellFocus:s,setColumnHeaderFocus:l,setColumnHeaderFilterFocus:u},"public"),Hx(t,C,"private"),e.useEffect(()=>{const e=Cp(t.current.rootElementRef.current);return e.addEventListener("mouseup",b),()=>{e.removeEventListener("mouseup",b)}},[t,b]),Qx(t,"columnHeaderBlur",v),Qx(t,"cellDoubleClick",h),Qx(t,"cellMouseDown",y),Qx(t,"cellKeyDown",f),Qx(t,"cellModeChange",x),Qx(t,"columnHeaderFocus",m),Qx(t,"columnGroupHeaderFocus",g),Qx(t,"rowsSet",w),Qx(t,"paginationModelChange",_)})(r,n),((t,n)=>{var o;const r=cw(t,"useGridPreferencesPanel"),a=e.useRef(),s=e.useRef(),l=e.useCallback(()=>{r.debug("Hiding Preferences Panel");const e=ZM(t.current.state);e.openedPanelValue&&t.current.publishEvent("preferencePanelClose",{openedPanelValue:e.openedPanelValue}),t.current.setState(e=>(0,i.A)({},e,{preferencePanel:{open:!1}})),t.current.forceUpdate()},[t,r]),u=e.useCallback(()=>{s.current=setTimeout(()=>clearTimeout(a.current),0)},[]),c=e.useCallback(()=>{a.current=setTimeout(l,100)},[l]),d=e.useCallback((e,n,o)=>{r.debug("Opening Preferences Panel"),u(),t.current.setState(t=>(0,i.A)({},t,{preferencePanel:(0,i.A)({},t.preferencePanel,{open:!0,openedPanelValue:e,panelId:n,labelId:o})})),t.current.publishEvent("preferencePanelOpen",{openedPanelValue:e}),t.current.forceUpdate()},[r,u,t]);Hx(t,{showPreferences:d,hidePreferences:c},"public");const p=e.useCallback((e,o)=>{var r;const a=ZM(t.current.state);return!o.exportOnlyDirtyModels||null!=(null==(r=n.initialState)?void 0:r.preferencePanel)||a.open?(0,i.A)({},e,{preferencePanel:a}):e},[t,null==(o=n.initialState)?void 0:o.preferencePanel]),h=e.useCallback((e,n)=>{const o=n.stateToRestore.preferencePanel;return null!=o&&t.current.setState(e=>(0,i.A)({},e,{preferencePanel:o})),e},[t]);Mk(t,"exportState",p),Mk(t,"restoreState",h),e.useEffect(()=>()=>{clearTimeout(a.current),clearTimeout(s.current)},[])})(r,n),((t,n)=>{var r,a;const s=cw(t,"useGridFilter");t.current.registerControlState({stateId:"filter",propModel:n.filterModel,propOnChange:n.onFilterModelChange,stateSelector:dx,changeEvent:"filterModelChange"});const l=e.useCallback(()=>{t.current.setState(e=>{const o=dx(e,t.current.instanceId),r="client"===n.filterMode?XA(o,t,n.disableEval):null,a=t.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:r,filterModel:null!=o?o:FA()}),s=(0,i.A)({},e,{filter:(0,i.A)({},e.filter,a)}),l=EM(t,s);return(0,i.A)({},s,{visibleRowsLookup:l})}),t.current.publishEvent("filteredRowsSet")},[t,n.filterMode,n.disableEval]),u=e.useCallback((e,t)=>null==t||!1===t.filterable||n.disableColumnFilter?e:[...e,"columnMenuFilterItem"],[n.disableColumnFilter]),c=e.useCallback(()=>{l(),t.current.forceUpdate()},[t,l]),d=e.useCallback(e=>{const n=dx(t),o=[...n.items],r=o.findIndex(t=>t.id===e.id);-1===r?o.push(e):o[r]=e,t.current.setFilterModel((0,i.A)({},n,{items:o}),"upsertFilterItem")},[t]),p=e.useCallback(e=>{const n=dx(t),o=[...n.items];e.forEach(t=>{const n=e.findIndex(e=>e.id===t.id);-1===n?o.push(t):o[n]=t}),t.current.setFilterModel((0,i.A)({},n,{items:e}),"upsertFilterItems")},[t]),h=e.useCallback(e=>{const n=dx(t),o=n.items.filter(t=>t.id!==e.id);o.length!==n.items.length&&t.current.setFilterModel((0,i.A)({},n,{items:o}),"deleteFilterItem")},[t]),f=e.useCallback((e,o,r)=>{if(s.debug("Displaying filter panel"),e){const o=dx(t),r=o.items.filter(e=>{var n;if(void 0!==e.value)return!Array.isArray(e.value)||0!==e.value.length;const o=null==(n=t.current.getColumn(e.field).filterOperators)?void 0:n.find(t=>t.value===e.operator);return!(void 0===(null==o?void 0:o.requiresFilterValue)||(null==o?void 0:o.requiresFilterValue))});let a;const s=r.find(t=>t.field===e),l=t.current.getColumn(e);a=s?r:n.disableMultipleColumnsFiltering?[HA({field:e,operator:l.filterOperators[0].value},t)]:[...r,HA({field:e,operator:l.filterOperators[0].value},t)],t.current.setFilterModel((0,i.A)({},o,{items:a}))}t.current.showPreferences(rM.filters,o,r)},[t,s,n.disableMultipleColumnsFiltering]),m=e.useCallback(()=>{s.debug("Hiding filter panel"),t.current.hidePreferences()},[t,s]),g=e.useCallback(e=>{const n=dx(t);n.logicOperator!==e&&t.current.setFilterModel((0,i.A)({},n,{logicOperator:e}),"changeLogicOperator")},[t]),v=e.useCallback(e=>{const n=dx(t);Nx(n.quickFilterValues,e)||t.current.setFilterModel((0,i.A)({},n,{quickFilterValues:[...e]}))},[t]),y={setFilterLogicOperator:g,unstable_applyFilters:c,deleteFilterItem:h,upsertFilterItem:d,upsertFilterItems:p,setFilterModel:e.useCallback((e,o)=>{dx(t)!==e&&(s.debug("Setting filter model"),t.current.updateControlState("filter",GA(e,n.disableMultipleColumnsFiltering,t),o),t.current.unstable_applyFilters())},[t,s,n.disableMultipleColumnsFiltering]),showFilterPanel:f,hideFilterPanel:m,setQuickFilterValues:v,ignoreDiacritics:n.ignoreDiacritics};Hx(t,y,"public");const b=e.useCallback((e,o)=>{var r;const a=dx(t);return o.exportOnlyDirtyModels&&null==n.filterModel&&null==(null==(r=n.initialState)||null==(r=r.filter)?void 0:r.filterModel)&&Nx(a,FA())?e:(0,i.A)({},e,{filter:{filterModel:a}})},[t,n.filterModel,null==(r=n.initialState)||null==(r=r.filter)?void 0:r.filterModel]),x=e.useCallback((e,o)=>{var r;const a=null==(r=o.stateToRestore.filter)?void 0:r.filterModel;return null==a?e:(t.current.updateControlState("filter",GA(a,n.disableMultipleColumnsFiltering,t),"restoreState"),(0,i.A)({},e,{callbacks:[...e.callbacks,t.current.unstable_applyFilters]}))},[t,n.disableMultipleColumnsFiltering]),w=e.useCallback((e,t)=>{if(t===rM.filters){var r;const e=n.slots.filterPanel;return(0,o.jsx)(e,(0,i.A)({},null==(r=n.slotProps)?void 0:r.filterPanel))}return e},[n.slots.filterPanel,null==(a=n.slotProps)?void 0:a.filterPanel]),{getRowId:_}=n,C=Ky(OM),A=e.useCallback(e=>{if("client"!==n.filterMode||!e.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const o=Bb(t),r={},{isRowMatchingFilters:i}=e,a={},s={passingFilterItems:null,passingQuickFilterValues:null},l=C.current(t.current.state.rows.dataRowIdToModelLookup);for(let n=0;n<l.length;n+=1){const o=l[n],u=_?_(o):o.id;i(o,void 0,s);const c=QA([s.passingFilterItems],[s.passingQuickFilterValues],e.filterModel,t,a);r[u]=c}const u="auto-generated-group-footer-root";return o[u]&&(r[u]=!0),{filteredRowsLookup:r,filteredDescendantCountLookup:{}}},[t,n.filterMode,_,C]);Mk(t,"columnMenu",u),Mk(t,"exportState",b),Mk(t,"restoreState",x),Mk(t,"preferencePanel",w),IM(t,aw,"filtering",A),IM(t,aw,"visibleRowsLookupCreation",TM);const k=e.useCallback(()=>{s.debug("onColUpdated - GridColumns changed, applying filters");const e=dx(t),n=Eb(t),o=e.items.filter(e=>e.field&&n[e.field]);o.length<e.items.length&&t.current.setFilterModel((0,i.A)({},e,{items:o}))},[t,s]),S=e.useCallback(e=>{"filtering"===e&&t.current.unstable_applyFilters()},[t]),M=e.useCallback(()=>{t.current.setState(e=>(0,i.A)({},e,{visibleRowsLookup:EM(t,e)})),t.current.forceUpdate()},[t]);Qx(t,"rowsSet",l),Qx(t,"columnsChange",k),Qx(t,"activeStrategyProcessorChange",S),Qx(t,"rowExpansionChange",M),Qx(t,"columnVisibilityModelChange",()=>{const e=dx(t);e.quickFilterValues&&e.quickFilterExcludeHiddenColumns&&t.current.unstable_applyFilters()}),Sk(()=>{t.current.unstable_applyFilters()}),_p(()=>{void 0!==n.filterModel&&t.current.setFilterModel(n.filterModel)},[t,s,n.filterModel])})(r,n),((t,n)=>{var o;const r=cw(t,"useGridSorting");t.current.registerControlState({stateId:"sortModel",propModel:n.sortModel,propOnChange:n.onSortModelChange,stateSelector:lx,changeEvent:"sortModelChange"});const a=e.useCallback((e,n)=>{const o=lx(t),r=o.findIndex(t=>t.field===e);let i=[...o];return r>-1?n?i.splice(r,1,n):i.splice(r,1):i=[...o,n],i},[t]),s=e.useCallback((e,o)=>{var r;const a=lx(t).find(t=>t.field===e.field);if(a){var s;const t=void 0===o?b_(null!=(s=e.sortingOrder)?s:n.sortingOrder,a.sort):o;return null==t?void 0:(0,i.A)({},a,{sort:t})}return{field:e.field,sort:void 0===o?b_(null!=(r=e.sortingOrder)?r:n.sortingOrder):o}},[t,n.sortingOrder]),l=e.useCallback((e,t)=>null==t||!1===t.sortable?e:(t.sortingOrder||n.sortingOrder).some(e=>!!e)?[...e,"columnMenuSortItem"]:e,[n.sortingOrder]),u=e.useCallback(()=>{t.current.setState(e=>{if("server"===n.sortingMode)return r.debug("Skipping sorting rows as sortingMode = server"),(0,i.A)({},e,{sorting:(0,i.A)({},e.sorting,{sortedRows:lk(Wb(t),tk,!1)})});const o=((e,t)=>{const n=e.map(e=>((e,t)=>{const n=t.current.getColumn(e.field);return n?{getSortCellParams:e=>({id:e,field:n.field,rowNode:t.current.getRowNode(e),value:t.current.getCellValue(e,n.field),api:t.current}),comparator:"desc"===e.sort?(...e)=>-1*n.sortComparator(...e):n.sortComparator}:null})(e,t)).filter(e=>!!e);return 0===n.length?null:e=>e.map(e=>({node:e,params:n.map(t=>t.getSortCellParams(e.id))})).sort((e,t)=>{return o=e,r=t,n.reduce((e,t,n)=>{if(0!==e)return e;const i=o.params[n],a=r.params[n];return t.comparator(i.value,a.value,i,a)},0);var o,r}).map(e=>e.node.id)})(lx(e,t.current.instanceId),t),a=t.current.applyStrategyProcessor("sorting",{sortRowList:o});return(0,i.A)({},e,{sorting:(0,i.A)({},e.sorting,{sortedRows:a})})}),t.current.publishEvent("sortedRowsSet"),t.current.forceUpdate()},[t,r,n.sortingMode]),c=e.useCallback(e=>{lx(t)!==e&&(r.debug("Setting sort model"),t.current.setState(y_(e,n.disableMultipleColumnsSorting)),t.current.forceUpdate(),t.current.applySorting())},[t,r,n.disableMultipleColumnsSorting]),d=e.useCallback((e,o,r)=>{if(!e.sortable)return;const i=s(e,o);let l;l=!r||n.disableMultipleColumnsSorting?i?[i]:[]:a(e.field,i),t.current.setSortModel(l)},[t,a,s,n.disableMultipleColumnsSorting]),p=e.useCallback(()=>lx(t),[t]),h=e.useCallback(()=>sx(t).map(e=>e.model),[t]),f=e.useCallback(()=>ax(t),[t]),m=e.useCallback(e=>t.current.getSortedRowIds()[e],[t]);Hx(t,{getSortModel:p,getSortedRows:h,getSortedRowIds:f,getRowIdFromRowIndex:m,setSortModel:c,sortColumn:d,applySorting:u},"public");const g=e.useCallback((e,o)=>{var r;const a=lx(t);return!o.exportOnlyDirtyModels||null!=n.sortModel||null!=(null==(r=n.initialState)||null==(r=r.sorting)?void 0:r.sortModel)||a.length>0?(0,i.A)({},e,{sorting:{sortModel:a}}):e},[t,n.sortModel,null==(o=n.initialState)||null==(o=o.sorting)?void 0:o.sortModel]),v=e.useCallback((e,o)=>{var r;const a=null==(r=o.stateToRestore.sorting)?void 0:r.sortModel;return null==a?e:(t.current.setState(y_(a,n.disableMultipleColumnsSorting)),(0,i.A)({},e,{callbacks:[...e.callbacks,t.current.applySorting]}))},[t,n.disableMultipleColumnsSorting]),y=e.useCallback(e=>{const n=Wb(t),o=n[tk],r=e.sortRowList?e.sortRowList(o.children.map(e=>n[e])):[...o.children];return null!=o.footerId&&r.push(o.footerId),r},[t]);Mk(t,"exportState",g),Mk(t,"restoreState",v),IM(t,aw,"sorting",y);const b=e.useCallback(({colDef:e},t)=>{const n=t.shiftKey||t.metaKey||t.ctrlKey;d(e,void 0,n)},[d]),x=e.useCallback(({colDef:e},t)=>{"Enter"!==t.key||t.ctrlKey||t.metaKey||d(e,void 0,t.shiftKey)},[d]),w=e.useCallback(()=>{const e=lx(t),n=Ab(t);if(e.length>0){const o=e.filter(e=>n[e.field]);o.length<e.length&&t.current.setSortModel(o)}},[t]),_=e.useCallback(e=>{"sorting"===e&&t.current.applySorting()},[t]);Mk(t,"columnMenu",l),Qx(t,"columnHeaderClick",b),Qx(t,"columnHeaderKeyDown",x),Qx(t,"rowsSet",t.current.applySorting),Qx(t,"columnsChange",w),Qx(t,"activeStrategyProcessorChange",_),Sk(()=>{t.current.applySorting()}),_p(()=>{void 0!==n.sortModel&&t.current.setSortModel(n.sortModel)},[t,n.sortModel])})(r,n),((t,n)=>{const o=cw(t,"useDensity"),r=e.useCallback(e=>{o.debug(`Set grid density to ${e}`),t.current.setState(t=>{const n=bb(t),o={value:e,factor:sM[e]};return Nx(n,o)?t:(0,i.A)({},t,{density:o})}),t.current.forceUpdate()},[o,t]);e.useEffect(()=>{t.current.setDensity(n.density)},[t,n.density]),Hx(t,{setDensity:r},"public")})(r,n),((t,n)=>{((t,n)=>{var o;const r=cw(t,"useGridPaginationModel"),a=rb(t,wb),s=Math.floor(n.rowHeight*a);t.current.registerControlState({stateId:"paginationModel",propModel:n.paginationModel,propOnChange:n.onPaginationModelChange,stateSelector:Pw,changeEvent:"paginationModelChange"});const l=e.useCallback(e=>{const n=Pw(t);e!==n.page&&(r.debug(`Setting page to ${e}`),t.current.setPaginationModel({page:e,pageSize:n.pageSize}))},[t,r]),u=e.useCallback(e=>{const n=Pw(t);e!==n.pageSize&&(r.debug(`Setting page size to ${e}`),t.current.setPaginationModel({pageSize:e,page:n.page}))},[t,r]),c=e.useCallback(e=>{const o=Pw(t);e!==o&&(r.debug("Setting 'paginationModel' to",e),t.current.setState(t=>(0,i.A)({},t,{pagination:(0,i.A)({},t.pagination,{paginationModel:PM(t.pagination,n.signature,e)})})))},[t,r,n.signature]);Hx(t,{setPage:l,setPageSize:u,setPaginationModel:c},"public");const d=e.useCallback((e,o)=>{var r;const a=Pw(t);return!o.exportOnlyDirtyModels||null!=n.paginationModel||null!=(null==(r=n.initialState)||null==(r=r.pagination)?void 0:r.paginationModel)||0!==a.page&&a.pageSize!==(n.autoPageSize?0:100)?(0,i.A)({},e,{pagination:(0,i.A)({},e.pagination,{paginationModel:a})}):e},[t,n.paginationModel,null==(o=n.initialState)||null==(o=o.pagination)?void 0:o.paginationModel,n.autoPageSize]),p=e.useCallback((e,o)=>{var r,a;const s=null!=(r=o.stateToRestore.pagination)&&r.paginationModel?(0,i.A)({},kw(n.autoPageSize),null==(a=o.stateToRestore.pagination)?void 0:a.paginationModel):Pw(t);return t.current.setState(e=>(0,i.A)({},e,{pagination:(0,i.A)({},e.pagination,{paginationModel:PM(e.pagination,n.signature,s)})})),e},[t,n.autoPageSize,n.signature]);Mk(t,"exportState",d),Mk(t,"restoreState",p);const h=e.useCallback(()=>{if(!n.autoPageSize)return;const e=t.current.getRootDimensions()||{viewportInnerSize:{height:0}},o=uk(t),r=Math.floor((e.viewportInnerSize.height-o.top-o.bottom)/s);t.current.setPageSize(r)},[t,n.autoPageSize,s]),f=e.useCallback(e=>{if(null==e)return;const n=Pw(t),o=Ew(t);n.page>o-1&&t.current.setPage(Math.max(0,o-1))},[t]);Qx(t,"viewportInnerSizeChange",h),Qx(t,"paginationModelChange",()=>{var e;const n=Pw(t);null!=(e=t.current.virtualScrollerRef)&&e.current&&t.current.scrollToIndexes({rowIndex:n.page*n.pageSize})}),Qx(t,"rowCountChange",f),e.useEffect(()=>{t.current.setState(e=>(0,i.A)({},e,{pagination:(0,i.A)({},e.pagination,{paginationModel:PM(e.pagination,n.signature,n.paginationModel)})}))},[t,n.paginationModel,n.paginationMode,n.signature]),e.useEffect(h,[h])})(t,n),((t,n)=>{var o;const r=cw(t,"useGridRowCount"),a=rb(t,bx),s=rb(t,Iw);t.current.registerControlState({stateId:"paginationRowCount",propModel:n.rowCount,propOnChange:n.onRowCountChange,stateSelector:Iw,changeEvent:"rowCountChange"});const l=e.useCallback(e=>{s!==e&&(r.debug("Setting 'rowCount' to",e),t.current.setState(t=>(0,i.A)({},t,{pagination:(0,i.A)({},t.pagination,{rowCount:e})})))},[t,r,s]);Hx(t,{setRowCount:l},"public");const u=e.useCallback((e,o)=>{var r;const a=Iw(t);return o.exportOnlyDirtyModels&&null==n.rowCount&&null==(null==(r=n.initialState)||null==(r=r.pagination)?void 0:r.rowCount)?e:(0,i.A)({},e,{pagination:(0,i.A)({},e.pagination,{rowCount:a})})},[t,n.rowCount,null==(o=n.initialState)||null==(o=o.pagination)?void 0:o.rowCount]),c=e.useCallback((e,n)=>{var o;const r=null!=(o=n.stateToRestore.pagination)&&o.rowCount?n.stateToRestore.pagination.rowCount:Iw(t);return t.current.setState(e=>(0,i.A)({},e,{pagination:(0,i.A)({},e.pagination,{rowCount:r})})),e},[t]);Mk(t,"exportState",u),Mk(t,"restoreState",c),e.useEffect(()=>{},[n.rowCount,n.paginationMode]),e.useEffect(()=>{"client"===n.paginationMode?t.current.setRowCount(a):null!=n.rowCount&&t.current.setRowCount(n.rowCount)},[t,a,n.paginationMode,n.rowCount])})(t,n)})(r,n),((t,n)=>{const{getRowHeight:o,getRowSpacing:r,getEstimatedRowHeight:a}=n,s=e.useRef(Object.create(null)),l=e.useRef(-1),u=e.useRef(!1),c=rb(t,wb),d=rb(t,dx),p=rb(t,Mw),h=rb(t,lx),f=zM(t,n),m=rb(t,qb),g=pj(n.rowHeight,uj.rowHeight),v=Math.floor(g*c),y=e.useCallback(()=>{var e,n;u.current=!1;const d=e=>{s.current[e.id]||(s.current[e.id]={sizes:{baseCenter:v},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:n,needsFirstMeasurement:l,sizes:d}=s.current[e.id];let p="number"==typeof v&&v>0?v:52;const h=d.baseCenter;if(n)p=h;else if(o){const t=o((0,i.A)({},e,{densityFactor:c}));if("auto"===t){if(l){const t=a?a((0,i.A)({},e,{densityFactor:c})):v;p=null!=t?t:v}else p=h;u.current=!0,s.current[e.id].autoHeight=!0}else p=pj(t,v),s.current[e.id].needsFirstMeasurement=!1,s.current[e.id].autoHeight=!1}else s.current[e.id].needsFirstMeasurement=!1;const m={};for(const e in d)/^base[A-Z]/.test(e)&&(m[e]=d[e]);if(m.baseCenter=p,r){var g,y;const n=t.current.getRowIndexRelativeToVisibleRows(e.id),o=r((0,i.A)({},e,{isFirstVisible:0===n,isLastVisible:n===f.rows.length-1,indexRelativeToCurrentPage:n}));m.spacingTop=null!=(g=o.top)?g:0,m.spacingBottom=null!=(y=o.bottom)?y:0}const b=t.current.unstable_applyPipeProcessors("rowHeight",m,e);return s.current[e.id].sizes=b,b},p=[],h=f.rows.reduce((e,t)=>{p.push(e);let n=0,o=0;const r=d(t);for(const e in r){const t=r[e];/^base[A-Z]/.test(e)?n=t>n?t:n:o+=t}return e+n+o},0);null==m||null==(e=m.top)||e.forEach(e=>{d(e)}),null==m||null==(n=m.bottom)||n.forEach(e=>{d(e)}),t.current.setState(e=>(0,i.A)({},e,{rowsMeta:{currentPageTotalHeight:h,positions:p}})),u.current||(l.current=1/0),t.current.forceUpdate()},[t,f.rows,v,o,r,a,m,c]),b=e.useCallback(e=>{const t=s.current[e];return t?t.sizes.baseCenter:v},[v]),x=e.useCallback((e,t)=>{s.current[e].sizes.baseCenter=t,s.current[e].isResized=!0,s.current[e].needsFirstMeasurement=!1,y()},[y]),w=e.useMemo(()=>Nw(y,n.rowPositionsDebounceMs),[y,n.rowPositionsDebounceMs]),_=e.useCallback((e,t,n)=>{if(!s.current[e]||!s.current[e].autoHeight)return;const o=s.current[e].sizes[`base${(0,Tm.A)(n)}`]!==t;s.current[e].needsFirstMeasurement=!1,s.current[e].sizes[`base${(0,Tm.A)(n)}`]=t,o&&w()},[w]),C=e.useCallback(e=>{var t;return(null==(t=s.current[e])?void 0:t.autoHeight)||!1},[]),A=e.useCallback(()=>l.current,[]),k=e.useCallback(e=>{u.current&&e>l.current&&(l.current=e)},[]),S=e.useCallback(()=>{s.current={},y()},[y]);e.useEffect(()=>{y()},[v,d,p,h,y]),Pk(t,"rowHeight",y);const M={getLastMeasuredRowIndex:A,rowHasAutoHeight:C};Hx(t,{unstable_setLastMeasuredRowIndex:k,unstable_getRowHeight:b,unstable_getRowInternalSizes:e=>{var t;return null==(t=s.current[e])?void 0:t.sizes},unstable_setRowHeight:x,unstable_storeRowHeightMeasurement:_,resetRowHeights:S},"public"),Hx(t,M,"private")})(r,n),((t,n)=>{const o=ss(),r=cw(t,"useGridScroll"),i=t.current.columnHeadersElementRef,a=t.current.virtualScrollerRef,s=rb(t,hx),l=e.useCallback(e=>{const o=Nb(t),i=Mb(t);if(null!=e.rowIndex&&0===o||0===i.length)return!1;r.debug(`Scrolling to cell at row ${e.rowIndex}, col: ${e.colIndex} `);let l={};if(null!=e.colIndex){const n=Ib(t);let o;if(void 0!==e.rowIndex){var u;const n=null==(u=s[e.rowIndex])?void 0:u.id,r=t.current.unstable_getCellColSpanInfo(n,e.colIndex);r&&!r.spannedByColSpan&&(o=r.cellProps.width)}void 0===o&&(o=i[e.colIndex].computedWidth),l.left=dP({clientHeight:a.current.clientWidth,scrollTop:Math.abs(a.current.scrollLeft),offsetHeight:o,offsetTop:n[e.colIndex]})}if(null!=e.rowIndex){var c,d;const o=MM(t.current.state),r=Rw(t),i=Tw(t),s=n.pagination?e.rowIndex-r*i:e.rowIndex,u=o.positions[s+1]?o.positions[s+1]-o.positions[s]:o.currentPageTotalHeight-o.positions[s],p=(null==(c=a.current.querySelector(`.${Vy["pinnedRows--top"]}`))?void 0:c.clientHeight)||0,h=(null==(d=a.current.querySelector(`.${Vy["pinnedRows--bottom"]}`))?void 0:d.clientHeight)||0;l.top=dP({clientHeight:a.current.clientHeight-p-h,scrollTop:a.current.scrollTop,offsetHeight:u,offsetTop:o.positions[s]})}return l=t.current.unstable_applyPipeProcessors("scrollToIndexes",l,e),(void 0!==typeof l.left||void 0!==typeof l.top)&&(t.current.scroll(l),!0)},[r,t,a,n.pagination,s]),u=e.useCallback(e=>{if(a.current&&null!=e.left&&i.current){const t="rtl"===o.direction?-1:1;i.current.scrollLeft=e.left,a.current.scrollLeft=t*e.left,r.debug(`Scrolling left: ${e.left}`)}a.current&&null!=e.top&&(a.current.scrollTop=e.top,r.debug(`Scrolling top: ${e.top}`)),r.debug("Scrolling, updating container, and viewport")},[a,o.direction,i,r]),c=e.useCallback(()=>null!=a&&a.current?{top:a.current.scrollTop,left:a.current.scrollLeft}:{top:0,left:0},[a]);Hx(t,{scroll:u,scrollToIndexes:l,getScrollPosition:c},"public")})(r,n),(t=>{const n=cw(t,"useGridColumnMenu"),o=e.useCallback(e=>{t.current.setState(t=>t.columnMenu.open&&t.columnMenu.field===e?t:(n.debug("Opening Column Menu"),(0,i.A)({},t,{columnMenu:{open:!0,field:e}})))&&(t.current.hidePreferences(),t.current.forceUpdate())},[t,n]),r=e.useCallback(()=>{const e=Rx(t.current.state);if(e.field){const n=Ab(t),o=Sb(t),r=Cb(t);let i=e.field;if(n[i]||(i=r[0]),!1===o[i]){const e=r.filter(e=>e===i||!1!==o[e]),t=e.indexOf(i);i=e[t+1]||e[t-1]}t.current.setColumnHeaderFocus(i)}t.current.setState(e=>e.columnMenu.open||void 0!==e.columnMenu.field?(n.debug("Hiding Column Menu"),(0,i.A)({},e,{columnMenu:(0,i.A)({},e.columnMenu,{open:!1,field:void 0})})):e)&&t.current.forceUpdate()},[t,n]),a=e.useCallback(e=>{n.debug("Toggle Column Menu");const i=Rx(t.current.state);i.open&&i.field===e?r():o(e)},[t,n,o,r]);Hx(t,{showColumnMenu:o,hideColumnMenu:r,toggleColumnMenu:a},"public"),Qx(t,"columnResizeStart",r),Qx(t,"virtualScrollerWheel",t.current.hideColumnMenu),Qx(t,"virtualScrollerTouchMove",t.current.hideColumnMenu)})(r),SM(r,n),((t,n)=>{const r=cw(t,"useGridPrintExport"),a=e.useRef(null),s=e.useRef(null),l=e.useRef({}),u=e.useRef([]);e.useEffect(()=>{a.current=Cp(t.current.rootElementRef.current)},[t]);const c=e.useCallback((e,n,o)=>new Promise(r=>{const i=uM({apiRef:t,options:{fields:e,allColumns:n}}).map(e=>e.field),a=kb(t),s={};a.forEach(e=>{s[e.field]=i.includes(e.field)}),o&&(s[xk.field]=!0),t.current.setColumnVisibilityModel(s),r()}),[t]),d=e.useCallback(e=>{const n=e({apiRef:t}).map(e=>t.current.getRow(e));t.current.setRows(n)},[t]),p=e.useCallback((e,o)=>{var r,s;const l=(0,i.A)({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},o),u=e.contentDocument;if(!u)return;const c=MM(t.current.state),d=t.current.rootElementRef.current,p=d.cloneNode(!0);p.querySelector(`.${Vy.main}`).style.overflow="visible",p.style.contain="size",p.querySelector(`.${Vy.columnHeaders}`).querySelector(`.${Vy.columnHeadersInner}`).style.width="100%";let h=(null==(r=d.querySelector(`.${Vy.toolbarContainer}`))?void 0:r.offsetHeight)||0,f=(null==(s=d.querySelector(`.${Vy.footerContainer}`))?void 0:s.offsetHeight)||0;var m,g;l.hideToolbar&&(null==(m=p.querySelector(`.${Vy.toolbarContainer}`))||m.remove(),h=0),l.hideFooter&&(null==(g=p.querySelector(`.${Vy.footerContainer}`))||g.remove(),f=0);const v=c.currentPageTotalHeight+oM(t,n.columnHeaderHeight)+h+f;if(p.style.height=`${v}px`,p.style.boxSizing="content-box",null!=o&&o.getRowsToExport){const e=p.querySelector(`.${Vy.footerContainer}`);e.style.position="absolute",e.style.width="100%",e.style.top=v-f+"px"}const y=document.createElement("div");y.appendChild(p),u.body.innerHTML=y.innerHTML;const b="function"==typeof l.pageStyle?l.pageStyle():l.pageStyle;if("string"==typeof b){const e=u.createElement("style");e.appendChild(u.createTextNode(b)),u.head.appendChild(e)}l.bodyClassName&&u.body.classList.add(...l.bodyClassName.split(" "));const x=[];if(l.copyStyles){const e=d.getRootNode(),t=("ShadowRoot"===e.constructor.name?e:a.current).querySelectorAll("style, link[rel='stylesheet']");for(let e=0;e<t.length;e+=1){const n=t[e];if("STYLE"===n.tagName){const e=u.createElement(n.tagName),t=n.sheet;if(t){let n="";for(let e=0;e<t.cssRules.length;e+=1)"string"==typeof t.cssRules[e].cssText&&(n+=`${t.cssRules[e].cssText}\r\n`);e.appendChild(u.createTextNode(n)),u.head.appendChild(e)}}else if(n.getAttribute("href")){const e=u.createElement(n.tagName);for(let t=0;t<n.attributes.length;t+=1){const o=n.attributes[t];o&&e.setAttribute(o.nodeName,o.nodeValue||"")}x.push(new Promise(t=>{e.addEventListener("load",()=>t())})),u.head.appendChild(e)}}}Promise.all(x).then(()=>{e.contentWindow.print()})},[t,a,n.columnHeaderHeight]),h=e.useCallback(e=>{var n;a.current.body.removeChild(e),t.current.restoreState(s.current||{}),null!=(n=s.current)&&null!=(n=n.columns)&&n.columnVisibilityModel||t.current.setColumnVisibilityModel(l.current),t.current.unstable_setVirtualization(!0),t.current.setRows(u.current),s.current=null,l.current={},u.current=[]},[t]),f=e.useCallback(async e=>{if(r.debug("Export data as Print"),!t.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");s.current=t.current.exportState(),l.current=Sb(t);const o=Bb(t);if(u.current=Kb(t).map(e=>o[e]),n.pagination){const e={page:0,pageSize:yx(t)};t.current.setState(t=>(0,i.A)({},t,{pagination:(0,i.A)({},t.pagination,{paginationModel:PM(t.pagination,"DataGridPro",e)})})),t.current.forceUpdate()}await c(null==e?void 0:e.fields,null==e?void 0:e.allColumns,null==e?void 0:e.includeCheckboxes),null!=e&&e.getRowsToExport&&d(e.getRowsToExport),t.current.unstable_setVirtualization(!1),await new Promise(e=>{requestAnimationFrame(()=>{e()})});const f=function(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}(null==e?void 0:e.fileName);f.onload=()=>{p(f,e),f.contentWindow.matchMedia("print").addEventListener("change",e=>{!1===e.matches&&h(f)})},a.current.body.appendChild(f)},[n,r,t,p,h,c,d]);Hx(t,{exportDataAsPrint:f},"public");const m=e.useCallback((e,t)=>{var n;return null!=(n=t.printOptions)&&n.disableToolbarButton?e:[...e,{component:(0,o.jsx)(kM,{options:t.printOptions}),componentName:"printExport"}]},[]);Mk(t,"exportMenu",m)})(r,n),((t,n)=>{const o=n.unstable_ignoreValueFormatterDuringExport,r=("object"==typeof o?null==o?void 0:o.clipboardExport:o)||!1,i=n.clipboardCopyCellDelimiter,a=e.useCallback(e=>{if(!e.ctrlKey&&!e.metaKey||"c"!==e.key)return;if(n=e.target,null!=(o=window.getSelection())&&o.toString()||n&&(n.selectionEnd||0)-(n.selectionStart||0)>0)return;var n,o;let a="";if(t.current.getSelectedRows().size>0)a=t.current.getDataAsCsv({includeHeaders:!1,delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1});else{const e=Cx(t);if(e){const n=t.current.getCellParams(e.id,e.field);a=_k(n,{csvOptions:{delimiter:i,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}var s;a=t.current.unstable_applyPipeProcessors("clipboardCopy",a),a&&(s=a,navigator.clipboard?navigator.clipboard.writeText(s).catch(()=>{Ak(s)}):Ak(s),t.current.publishEvent("clipboardCopy",a))},[t,r,i]);((t,n,o,r,i)=>{const a=cw(t,"useNativeEventListener"),[s,l]=e.useState(!1),u=e.useRef(r),c=e.useCallback(e=>u.current&&u.current(e),[]);e.useEffect(()=>{u.current=r},[r]),e.useEffect(()=>{let e;if(e=zx(n)?n():n&&n.current?n.current:null,e&&o&&!s){a.debug(`Binding native ${o} event`),e.addEventListener(o,c,i);const n=e;l(!0);const r=()=>{a.debug(`Clearing native ${o} event`),n.removeEventListener(o,c,i)};t.current.subscribeEvent("unmount",r)}},[n,c,o,s,a,i,t])})(t,t.current.rootElementRef,"keydown",a),ew(t,"clipboardCopy",n.onClipboardCopy)})(r,n),function(t,n){const o=cw(t,"useResizeContainer"),r=e.useRef(!1),i=e.useRef(null),a=e.useRef(null),s=rb(t,MM),l=rb(t,wb),u=Math.floor(n.rowHeight*l),c=oM(t,n.columnHeaderHeight),d=e.useCallback(()=>{var e;const o=null==(e=t.current.rootElementRef)?void 0:e.current,r=Rb(t),l=uk(t);if(!i.current)return;let u,d,p,h;if(null!=n.scrollbarSize)u=n.scrollbarSize;else if(r&&o){const e=Cp(o).createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.overflow="scroll",e.className="scrollDiv",o.appendChild(e),u=e.offsetWidth-e.clientWidth,o.removeChild(e)}else u=0;if(n.autoHeight)h=!1,p=Math.round(r)>Math.round(i.current.width),d={width:i.current.width,height:s.currentPageTotalHeight+(p?u:0)};else{d={width:i.current.width,height:Math.max(i.current.height-c,0)};const e=(({content:e,container:t,scrollBarSize:n})=>{const o=e.width>t.width,r=e.height>t.height;let i=!1,a=!1;return(o||r)&&(i=o,a=e.height+(i?n:0)>t.height,a&&(i=e.width+n>t.width)),{hasScrollX:i,hasScrollY:a}})({content:{width:Math.round(r),height:s.currentPageTotalHeight},container:{width:Math.round(d.width),height:d.height-l.top-l.bottom},scrollBarSize:u});h=e.hasScrollY,p=e.hasScrollX}const f={viewportOuterSize:d,viewportInnerSize:{width:d.width-(h?u:0),height:d.height-(p?u:0)},hasScrollX:p,hasScrollY:h,scrollBarSize:u},m=a.current;a.current=f,f.viewportInnerSize.width===(null==m?void 0:m.viewportInnerSize.width)&&f.viewportInnerSize.height===(null==m?void 0:m.viewportInnerSize.height)||t.current.publishEvent("viewportInnerSizeChange",f.viewportInnerSize)},[t,n.scrollbarSize,n.autoHeight,s.currentPageTotalHeight,c]),[p,h]=e.useState(),f=e.useMemo(()=>Nw(h,60),[]),m=e.useRef();_p(()=>{p&&(d(),t.current.publishEvent("debouncedResize",i.current))},[t,p,d]);const g=e.useCallback(()=>{t.current.computeSizeAndPublishResizeEvent()},[t]),v=e.useCallback(()=>a.current,[]),y=e.useCallback(()=>{const e=t.current.getRootDimensions();if(!e)return 0;const o=LM(t,{pagination:n.pagination,paginationMode:n.paginationMode});if(n.getRowHeight){const e=t.current.getRenderContext(),n=e.lastRowIndex-e.firstRowIndex;return Math.min(n-1,o.rows.length)}const r=Math.floor(e.viewportInnerSize.height/u);return Math.min(r,o.rows.length)},[t,n.pagination,n.paginationMode,n.getRowHeight,u]),b=e.useCallback(()=>{var e,n,o;const r=null==(e=t.current.mainElementRef)?void 0:e.current;if(!r)return;const i=Ap(r).getComputedStyle(r),a=parseFloat(i.height)||0,s=parseFloat(i.width)||0,l=a!==(null==(n=m.current)?void 0:n.height),u=s!==(null==(o=m.current)?void 0:o.width);if(!m.current||l||u){const e={width:s,height:a};t.current.publishEvent("resize",e),m.current=e}},[t]),x={getViewportPageSize:y,updateGridDimensionsRef:d,computeSizeAndPublishResizeEvent:b};Hx(t,{resize:g,getRootDimensions:v},"public"),Hx(t,x,"private");const w=e.useRef(!0),_=e.useCallback(e=>{i.current=e;const t=/jsdom/.test(window.navigator.userAgent);if(0!==e.height||r.current||n.autoHeight||t||(o.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),0!==e.width||r.current||t||(o.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n")),r.current=!0),w.current)return h(e),void(w.current=!1);f(e)},[n.autoHeight,f,o]);_p(()=>d(),[d]),ew(t,"sortedRowsSet",d),ew(t,"paginationModelChange",d),ew(t,"columnsChange",d),Qx(t,"resize",_),ew(t,"debouncedResize",n.onResize)}(r,n),function(e,t){ew(e,"columnHeaderClick",t.onColumnHeaderClick),ew(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),ew(e,"columnHeaderOver",t.onColumnHeaderOver),ew(e,"columnHeaderOut",t.onColumnHeaderOut),ew(e,"columnHeaderEnter",t.onColumnHeaderEnter),ew(e,"columnHeaderLeave",t.onColumnHeaderLeave),ew(e,"cellClick",t.onCellClick),ew(e,"cellDoubleClick",t.onCellDoubleClick),ew(e,"cellKeyDown",t.onCellKeyDown),ew(e,"preferencePanelClose",t.onPreferencePanelClose),ew(e,"preferencePanelOpen",t.onPreferencePanelOpen),ew(e,"menuOpen",t.onMenuOpen),ew(e,"menuClose",t.onMenuClose),ew(e,"rowDoubleClick",t.onRowDoubleClick),ew(e,"rowClick",t.onRowClick),ew(e,"stateChange",t.onStateChange)}(r,n),(t=>{const n=e.useCallback((e={})=>t.current.unstable_applyPipeProcessors("exportState",{},e),[t]),o=e.useCallback(e=>{t.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:e}).callbacks.forEach(e=>{e()}),t.current.forceUpdate()},[t]);Hx(t,{exportState:n,restoreState:o},"public")})(r),function(t,n){const o=e=>{t.current.setState(t=>(0,i.A)({},t,{virtualization:(0,i.A)({},t.virtualization,{enabled:e})}))},r={unstable_setVirtualization:o,unstable_setColumnVirtualization:e=>{t.current.setState(t=>(0,i.A)({},t,{virtualization:(0,i.A)({},t.virtualization,{enabledForColumns:e})}))}};Hx(t,r,"public"),e.useEffect(()=>{o(!n.disableVirtualization)},[n.disableVirtualization])}(r,n),r},_j=nx("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),Cj=e.forwardRef(function(e,t){const n=lb(),r=(e=>{const{classes:t}=e;return De({root:["virtualScroller"]},By,t)})(n);return(0,o.jsx)(_j,(0,i.A)({ref:t},e,{className:Ge(r.root,e.className),ownerState:n}))}),Aj=nx("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),kj=e.forwardRef(function(e,t){var n;const r=lb(),a=((e,t)=>{const{classes:n}=e;return De({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},By,n)})(r,!r.autoHeight&&"auto"===(null==(n=e.style)?void 0:n.minHeight));return(0,o.jsx)(Aj,(0,i.A)({ref:t},e,{ownerState:r,className:Ge(a.root,e.className)}))}),Sj=["className"],Mj=nx("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Pj=e.forwardRef(function(e,t){const{className:n}=e,r=(0,f.A)(e,Sj),a=lb(),s=(e=>{const{classes:t}=e;return De({root:["virtualScrollerRenderZone"]},By,t)})(a);return(0,o.jsx)(Mj,(0,i.A)({ref:t,className:Ge(s.root,n),ownerState:a},r))}),Ij=nx("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:"loadingOverlay"===e?5:4})),Rj=nx("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>"overlayType"!==e,overridesResolver:(e,t)=>t.overlayWrapperInner})({});function Tj(t){var n,r;const a=gw(),s=lb(),[l,u]=e.useState(()=>{var e,t;return null!=(e=null==(t=a.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null}),c=e.useCallback(()=>{var e,t;u(null!=(e=null==(t=a.current.getRootDimensions())?void 0:t.viewportInnerSize)?e:null)},[a]);_p(()=>a.current.subscribeEvent("viewportInnerSizeChange",c),[a,c]);let d=null!=(n=null==l?void 0:l.height)?n:0;s.autoHeight&&0===d&&(d=ck(a,s.rowHeight));const p=(e=>{const{classes:t}=e;return De({root:["overlayWrapper"],inner:["overlayWrapperInner"]},By,t)})((0,i.A)({},t,{classes:s.classes}));return l?(0,o.jsx)(Ij,{className:Ge(p.root),overlayType:t.overlayType,children:(0,o.jsx)(Rj,(0,i.A)({className:Ge(p.inner),style:{height:d,width:null!=(r=null==l?void 0:l.width)?r:0}},t))}):null}function Ej(){const e=gw(),t=lb(),n=rb(e,Nb),r=rb(e,yx),a=rb(e,Db),s=!a&&n>0&&0===r;let l=null,u="";var c,d,p;return a||0!==n||(l=(0,o.jsx)(t.slots.noRowsOverlay,(0,i.A)({},null==(c=t.slotProps)?void 0:c.noRowsOverlay)),u="noRowsOverlay"),s&&(l=(0,o.jsx)(t.slots.noResultsOverlay,(0,i.A)({},null==(d=t.slotProps)?void 0:d.noResultsOverlay)),u="noResultsOverlay"),a&&(l=(0,o.jsx)(t.slots.loadingOverlay,(0,i.A)({},null==(p=t.slotProps)?void 0:p.loadingOverlay)),u="loadingOverlay"),null===l?null:(0,o.jsx)(Tj,{overlayType:u,children:l})}const Oj=["className"],Lj=e.forwardRef(function(t,n){const{className:r}=t,a=(0,f.A)(t,Oj),{getRootProps:s,getContentProps:l,getRenderZoneProps:u,getRows:c}=(t=>{const n=ab(),r=lb(),a=rb(n,Mb),s=rb(n,uO),l=rb(n,cO),{ref:u,onRenderZonePositioning:c,renderZoneMinColumnIndex:d=0,renderZoneMaxColumnIndex:p=a.length,getRowProps:h}=t,m=ss(),g=rb(n,Ib),v=rb(n,Rb),y=rb(n,Cx),b=rb(n,Mx),x=rb(n,MM),w=rb(n,Cw),_=zM(n,r),C=e.useRef(null),A=e.useRef(null),k=Be(u,A),[S,M]=e.useState(null),P=e.useRef(S),I=e.useRef({top:0,left:0}),[R,T]=e.useState({width:null,height:null}),E=e.useRef(v),[O,L]=e.useState(null),z=e.useRef(Object.create(null)),j=e.useRef(),$=e.useRef(),F=e.useRef(db((e,t,n,o,r,i)=>{let a;return i>-1&&(t>i&&i>=o||n<i&&i<r)&&(a=i),{focusedCellColumnIndexNotInRange:a,renderedColumns:e.slice(t,n)}},gO)),N=e.useMemo(()=>null!==y?a.findIndex(e=>e.field===y.field):-1,[y,a]),D=e.useCallback(()=>{if(!s)return{firstRowIndex:0,lastRowIndex:_.rows.length,firstColumnIndex:0,lastColumnIndex:a.length};const{top:e,left:t}=I.current,o=Math.min(vO(n,_,x,e),x.positions.length-1),i=r.autoHeight?o+_.rows.length:vO(n,_,x,e+R.height);let u=0,c=g.length;if(l){let e=!1;const[a,s]=fO({firstIndex:o,lastIndex:i,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});for(let t=a;t<s&&!e;t+=1){const o=_.rows[t];e=n.current.rowHasAutoHeight(o.id)}e||(u=hO(Math.abs(t),g),c=hO(Math.abs(t)+R.width,g))}return{firstRowIndex:o,lastRowIndex:i,firstColumnIndex:u,lastColumnIndex:c}},[s,l,x,r.autoHeight,r.rowBuffer,_,g,a.length,n,R]);_p(()=>{s?(A.current.scrollLeft=0,A.current.scrollTop=0):C.current.style.transform="translate3d(0px, 0px, 0px)"},[s]),_p(()=>{T({width:A.current.clientWidth,height:A.current.clientHeight})},[x.currentPageTotalHeight]);const H=e.useCallback(()=>{A.current&&T({width:A.current.clientWidth,height:A.current.clientHeight})},[]);Qx(n,"debouncedResize",H);const B=e.useCallback(e=>{const[t,o]=fO({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer}),[i]=fO({firstIndex:e.firstColumnIndex,lastIndex:e.lastColumnIndex,minFirstIndex:d,maxLastIndex:p,buffer:r.columnBuffer}),a=tM({firstColumnToRender:i,apiRef:n,firstRowToRender:t,lastRowToRender:o,visibleRows:_.rows}),s="ltr"===m.direction?1:-1,l=MM(n.current.state).positions[t],u=s*Ib(n)[a];C.current.style.transform=`translate3d(${u}px, ${l}px, 0px)`,"function"==typeof c&&c({top:l,left:u})},[n,_.rows,c,d,p,r.columnBuffer,r.rowBuffer,m.direction]),V=e.useCallback(()=>P.current,[]),W=e.useCallback(e=>{if(P.current&&mO(e,P.current))return void B(e);M(e),B(e);const[t,o]=fO({firstIndex:e.firstRowIndex,lastIndex:e.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:r.rowBuffer});n.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:t,lastRowToRender:o}),P.current=e},[n,M,P,_.rows.length,r.rowBuffer,B]);_p(()=>{if(null==R.width)return;const e=D();W(e);const{top:t,left:o}=I.current,r={top:t,left:o,renderContext:e};n.current.publishEvent("scrollPositionChange",r)},[n,D,R.width,W]);const U=Fw(e=>{const{scrollTop:t,scrollLeft:o}=e.currentTarget;if(I.current.top=t,I.current.left=o,!P.current||t<0)return;if("ltr"===m.direction&&o<0)return;if("rtl"===m.direction&&o>0)return;const i=s?D():P.current,a=Math.abs(i.firstRowIndex-P.current.firstRowIndex),l=Math.abs(i.lastRowIndex-P.current.lastRowIndex),u=Math.abs(i.firstColumnIndex-P.current.firstColumnIndex),c=Math.abs(i.lastColumnIndex-P.current.lastColumnIndex),d=a>=r.rowThreshold||l>=r.rowThreshold||u>=r.columnThreshold||c>=r.columnThreshold||E.current!==v;n.current.publishEvent("scrollPositionChange",{top:t,left:o,renderContext:d?i:P.current},e),d&&(Fr.flushSync(()=>{W(i)}),E.current=v)}),G=Fw(e=>{n.current.publishEvent("virtualScrollerWheel",{},e)}),Z=Fw(e=>{n.current.publishEvent("virtualScrollerTouchMove",{},e)}),K=e.useMemo(()=>null!==y?_.rows.findIndex(e=>e.id===y.id):-1,[y,_.rows]);Qx(n,"rowMouseOver",(e,t)=>{var n;t.currentTarget.contains(t.relatedTarget)||L(null!=(n=e.id)?n:null)}),Qx(n,"rowMouseOut",(e,t)=>{t.currentTarget.contains(t.relatedTarget)||L(null)});const q=R.width&&v>=R.width,X=e.useMemo(()=>{const e=Math.max(x.currentPageTotalHeight,1);let t=!1;null!=A&&A.current&&e<=(null==A?void 0:A.current.clientHeight)&&(t=!0);const o={width:q?v:"auto",height:e,minHeight:t?"100%":"auto"};return r.autoHeight&&0===_.rows.length&&(o.height=ck(n,r.rowHeight)),o},[n,A,v,x.currentPageTotalHeight,q,r.autoHeight,r.rowHeight,_.rows.length]);e.useEffect(()=>{n.current.publishEvent("virtualScrollerContentSizeChange")},[n,X]);const Y=e.useMemo(()=>{const e={};return q||(e.overflowX="hidden"),r.autoHeight&&(e.overflowY="hidden"),e},[q,r.autoHeight]);return n.current.register("private",{getRenderContext:V}),{renderContext:S,updateRenderZonePosition:B,getRows:(e={renderContext:S})=>{var t;const{onRowRender:l,renderContext:u,minFirstColumn:c=d,maxLastColumn:m=p,availableSpace:g=R.width,rowIndexOffset:v=0,position:x="center"}=e;if(!u||null==g)return null;const C=s?r.rowBuffer:0,A=s?r.columnBuffer:0,[k,M]=fO({firstIndex:u.firstRowIndex,lastIndex:u.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:C}),P=[];if(e.rows)e.rows.forEach(e=>{P.push(e),n.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:m,columns:a})});else{if(!_.range)return null;for(let e=k;e<M;e+=1){const t=_.rows[e];P.push(t),n.current.calculateColSpan({rowId:t.id,minFirstColumn:c,maxLastColumn:m,columns:a})}}let I=!1;if(K>-1){const e=_.rows[K];(k>K||M<K)&&(I=!0,K>k?P.push(e):P.unshift(e),n.current.calculateColSpan({rowId:e.id,minFirstColumn:c,maxLastColumn:m,columns:a}))}const[T,E]=fO({firstIndex:u.firstColumnIndex,lastIndex:u.lastColumnIndex,minFirstIndex:c,maxLastIndex:m,buffer:A}),L=tM({firstColumnToRender:T,apiRef:n,firstRowToRender:k,lastRowToRender:M,visibleRows:_.rows});let D=!1;(L>N||E<N)&&(D=!0);const{focusedCellColumnIndexNotInRange:H,renderedColumns:B}=F.current(a,L,E,c,m,D?N:-1),V=(null==(t=r.slotProps)?void 0:t.row)||{},{style:W}=V,U=(0,f.A)(V,dO);(j.current!==h||$.current!==W)&&(z.current=Object.create(null));const G=[];let Z=!1;for(let e=0;e<P.length;e+=1){var q;const{id:t,model:s}=P[e],u=I&&y.id===t,c=I?k+e===_.rows.length:k+e===_.rows.length-1,d=n.current.rowHasAutoHeight(t)?"auto":n.current.unstable_getRowHeight(t);let p;p=null!=w[t]&&n.current.isRowSelectable(t),l&&l(t);const m=null!==y&&y.id===t?y.field:null,C=void 0!==H&&a[H],A=C&&m?[C,...B]:B;let S=null;null!==b&&b.id===t&&(S="view"===n.current.getCellParams(t,b.field).cellMode?b.field:null);const M="function"==typeof h&&h(t,s)||{},{style:R}=M,T=(0,f.A)(M,pO);if(!z.current[t]){const e=(0,i.A)({},R,W);z.current[t]=e}let j=v+((null==_||null==(q=_.range)?void 0:q.firstRowIndex)||0)+k+e;I&&(null==y?void 0:y.id)===t?(j=K,Z=!0):Z&&(j-=1),G.push((0,o.jsx)(r.slots.row,(0,i.A)({row:s,rowId:t,focusedCellColumnIndexNotInRange:H,isNotVisible:u,rowHeight:d,focusedCell:m,tabbableCell:S,renderedColumns:A,visibleColumns:a,firstColumnToRender:L,lastColumnToRender:E,selected:p,index:j,containerWidth:g,isLastVisible:c,position:x},T,U,{hovered:O===t,style:z.current[t]}),t))}return j.current=h,$.current=W,G},getRootProps:(e={})=>(0,i.A)({ref:k,onScroll:U,onWheel:G,onTouchMove:Z},e,{style:e.style?(0,i.A)({},e.style,Y):Y,role:"presentation"}),getContentProps:({style:e}={})=>({style:e?(0,i.A)({},e,X):X,role:"presentation"}),getRenderZoneProps:()=>({ref:C,role:"rowgroup"})}})({ref:n});return(0,o.jsxs)(Cj,(0,i.A)({className:r},s(a),{children:[(0,o.jsx)(Ej,{}),(0,o.jsx)(kj,(0,i.A)({},l(),{children:(0,o.jsx)(Pj,(0,i.A)({},u(),{children:c()}))}))]}))}),zj=e.forwardRef(function(t,n){const r=(t=>{const[n,o,r]=(a=_e({props:t,name:"MuiDataGrid"}),e.useMemo(()=>{const{components:e,componentsProps:t}=a;return[e,t,sj((0,f.A)(a,aj))]},[a]));var a;const s=e.useMemo(()=>(0,i.A)({},pP,r.localeText),[r.localeText]),l=e.useMemo(()=>function({defaultSlots:e,slots:t,components:n}){const o=null!=t?t:n?ij(n):null;if(!o||0===Object.keys(o).length)return e;const r=(0,i.A)({},e);return Object.keys(o).forEach(e=>{const t=e;void 0!==o[t]&&(r[t]=o[t])}),r}({defaultSlots:cj,slots:r.slots,components:n}),[n,r.slots]);return e.useMemo(()=>{var e;return(0,i.A)({},uj,r,{localeText:s,slots:l,slotProps:null!=(e=r.slotProps)?e:o},lj)},[r,s,l,o])})(t),a=wj(r.apiRef,r);return(0,o.jsx)(Lx,{privateApiRef:a,props:r,children:(0,o.jsxs)(Jb,(0,i.A)({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[(0,o.jsx)(ex,{}),(0,o.jsx)(Tx,{VirtualScrollerComponent:Lj}),(0,o.jsx)(Ex,{})]}))})}),jj=e.memo(zj);zj.propTypes={apiRef:jy().shape({current:jy().object.isRequired}),"aria-label":jy().string,"aria-labelledby":jy().string,autoHeight:jy().bool,autoPageSize:jy().bool,cellModesModel:jy().object,checkboxSelection:jy().bool,classes:jy().object,clipboardCopyCellDelimiter:jy().string,columnBuffer:jy().number,columnGroupingModel:jy().arrayOf(jy().object),columnHeaderHeight:jy().number,columns:(jy().array.isRequired,()=>null),columnThreshold:jy().number,columnVisibilityModel:jy().object,components:jy().object,componentsProps:jy().object,density:jy().oneOf(["comfortable","compact","standard"]),disableColumnFilter:jy().bool,disableColumnMenu:jy().bool,disableColumnSelector:jy().bool,disableDensitySelector:jy().bool,disableEval:jy().bool,disableRowSelectionOnClick:jy().bool,disableVirtualization:jy().bool,editMode:jy().oneOf(["cell","row"]),experimentalFeatures:jy().shape({ariaV7:jy().bool,columnGrouping:jy().bool,warnIfFocusStateIsNotSynced:jy().bool}),filterDebounceMs:jy().number,filterMode:jy().oneOf(["client","server"]),filterModel:jy().shape({items:jy().arrayOf(jy().shape({field:jy().string.isRequired,id:jy().oneOfType([jy().number,jy().string]),operator:jy().string.isRequired,value:jy().any})).isRequired,logicOperator:jy().oneOf(["and","or"]),quickFilterExcludeHiddenColumns:jy().bool,quickFilterLogicOperator:jy().oneOf(["and","or"]),quickFilterValues:jy().array}),forwardedProps:jy().object,getCellClassName:jy().func,getDetailPanelContent:jy().func,getEstimatedRowHeight:jy().func,getRowClassName:jy().func,getRowHeight:jy().func,getRowId:jy().func,getRowSpacing:jy().func,hideFooter:jy().bool,hideFooterPagination:jy().bool,hideFooterSelectedRowCount:jy().bool,ignoreDiacritics:jy().bool,initialState:jy().object,isCellEditable:jy().func,isRowSelectable:jy().func,keepNonExistentRowsSelected:jy().bool,loading:jy().bool,localeText:jy().object,logger:jy().shape({debug:jy().func.isRequired,error:jy().func.isRequired,info:jy().func.isRequired,warn:jy().func.isRequired}),logLevel:jy().oneOf(["debug","error","info","warn",!1]),nonce:jy().string,onCellClick:jy().func,onCellDoubleClick:jy().func,onCellEditStart:jy().func,onCellEditStop:jy().func,onCellKeyDown:jy().func,onCellModesModelChange:jy().func,onClipboardCopy:jy().func,onColumnHeaderClick:jy().func,onColumnHeaderDoubleClick:jy().func,onColumnHeaderEnter:jy().func,onColumnHeaderLeave:jy().func,onColumnHeaderOut:jy().func,onColumnHeaderOver:jy().func,onColumnOrderChange:jy().func,onColumnVisibilityModelChange:jy().func,onFilterModelChange:jy().func,onMenuClose:jy().func,onMenuOpen:jy().func,onPaginationModelChange:jy().func,onPreferencePanelClose:jy().func,onPreferencePanelOpen:jy().func,onProcessRowUpdateError:jy().func,onResize:jy().func,onRowClick:jy().func,onRowCountChange:jy().func,onRowDoubleClick:jy().func,onRowEditStart:jy().func,onRowEditStop:jy().func,onRowModesModelChange:jy().func,onRowSelectionModelChange:jy().func,onSortModelChange:jy().func,onStateChange:jy().func,pageSizeOptions:jy().arrayOf(jy().oneOfType([jy().number,jy().shape({label:jy().string.isRequired,value:jy().number.isRequired})]).isRequired),pagination:e=>!1===e.pagination?new Error(["MUI: `<DataGrid pagination={false} />` is not a valid prop.","Infinite scrolling is not available in the MIT version.","","You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n")):null,paginationMode:jy().oneOf(["client","server"]),paginationModel:jy().shape({page:jy().number.isRequired,pageSize:jy().number.isRequired}),processRowUpdate:jy().func,rowBuffer:jy().number,rowCount:jy().number,rowHeight:jy().number,rowModesModel:jy().object,rowPositionsDebounceMs:jy().number,rows:jy().arrayOf(jy().object).isRequired,rowSelection:jy().bool,rowSelectionModel:jy().oneOfType([jy().arrayOf(jy().oneOfType([jy().number,jy().string]).isRequired),jy().number,jy().string]),rowSpacingType:jy().oneOf(["border","margin"]),rowThreshold:jy().number,scrollbarSize:jy().number,showCellVerticalBorder:jy().bool,showColumnVerticalBorder:jy().bool,slotProps:jy().object,slots:jy().object,sortingMode:jy().oneOf(["client","server"]),sortingOrder:jy().arrayOf(jy().oneOf(["asc","desc"])),sortModel:jy().arrayOf(jy().shape({field:jy().string.isRequired,sort:jy().oneOf(["asc","desc"])})),sx:jy().oneOfType([jy().arrayOf(jy().oneOfType([jy().func,jy().object,jy().bool])),jy().func,jy().object]),unstable_ignoreValueFormatterDuringExport:jy().oneOfType([jy().shape({clipboardExport:jy().bool,csvExport:jy().bool}),jy().bool])};const $j=({rows:e,columns:r,loading:i=!1,pageSize:a=10,pageSizeOptions:s=[5,10,25,30,50],initialSort:l,height:u=400,density:c="standard",checkboxSelection:d=!1,disablePagination:p=!1,onRowClick:h})=>{const[f,m]=t().useState({page:0,pageSize:a});return(0,o.jsx)(n.Box,{sx:{height:u,width:"100%"},children:(0,o.jsx)(jj,{rows:e,columns:r,loading:i,density:c,checkboxSelection:d,initialState:{sorting:l?{sortModel:l}:void 0},paginationModel:p?void 0:f,onPaginationModelChange:p?void 0:m,pageSizeOptions:s,hideFooterPagination:p,onRowClick:h?e=>h(e.row):void 0,disableRowSelectionOnClick:!0})})};function Fj(e,t){return Object.freeze({...e,...t})}const Nj=(0,e.createContext)(null),Dj=Nj.Provider;function Hj(){const t=(0,e.useContext)(Nj);if(null==t)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return t}var Bj=s(3481),Vj=s.n(Bj);function Wj(){return Wj=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wj.apply(this,arguments)}function Uj({bounds:t,boundsOptions:n,center:o,children:r,className:i,id:a,placeholder:s,style:l,whenReady:u,zoom:c,...d},p){const[h]=(0,e.useState)({className:i,id:a,style:l}),[f,m]=(0,e.useState)(null);(0,e.useImperativeHandle)(p,()=>f?.map??null,[f]);const g=(0,e.useCallback)(e=>{if(null!==e&&null===f){const r=new Bj.Map(e,d);null!=o&&null!=c?r.setView(o,c):null!=t&&r.fitBounds(t,n),null!=u&&r.whenReady(u),m(function(e){return Object.freeze({__version:1,map:e})}(r))}},[]);(0,e.useEffect)(()=>()=>{f?.map.remove()},[f]);const v=f?e.createElement(Dj,{value:f},r):s??null;return e.createElement("div",Wj({},h,{ref:g}),v)}const Gj=(0,e.forwardRef)(Uj);function Zj(t){function n(n,o){const{instance:r,context:i}=t(n).current;return(0,e.useImperativeHandle)(o,()=>r),null==n.children?null:e.createElement(Dj,{value:i},n.children)}return(0,e.forwardRef)(n)}function Kj(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function qj(t,n){return null==n?function(n,o){const r=(0,e.useRef)();return r.current||(r.current=t(n,o)),r}:function(o,r){const i=(0,e.useRef)();i.current||(i.current=t(o,r));const a=(0,e.useRef)(o),{instance:s}=i.current;return(0,e.useEffect)(function(){a.current!==o&&(n(s,o,a.current),a.current=o)},[s,o,r]),i}}function Xj(t,n){const o=(0,e.useRef)(n);(0,e.useEffect)(function(){n!==o.current&&null!=t.attributionControl&&(null!=o.current&&t.attributionControl.removeAttribution(o.current),null!=n&&t.attributionControl.addAttribution(n)),o.current=n},[t,n])}function Yj(t,n){const o=(0,e.useRef)();(0,e.useEffect)(function(){return null!=n&&t.instance.on(n),o.current=n,function(){null!=o.current&&t.instance.off(o.current),o.current=null}},[t,n])}function Qj(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Jj(t,n){(0,e.useEffect)(function(){return(n.layerContainer??n.map).addLayer(t.instance),function(){n.layerContainer?.removeLayer(t.instance),n.map.removeLayer(t.instance)}},[n,t])}function e$(e){return function(t){const n=Hj(),o=e(Qj(t,n),n);return Xj(n.map,t.attribution),Yj(o.current,t.eventHandlers),Jj(o.current,n),o}}const t$=(n$=function({url:e,...t},n){return Kj(new Bj.TileLayer(e,Qj(t,n)),n)},function(t){function n(n,o){const{instance:r}=t(n).current;return(0,e.useImperativeHandle)(o,()=>r),null}return(0,e.forwardRef)(n)}(e$(qj(n$,function(e,t,n){!function(e,t,n){const{opacity:o,zIndex:r}=t;null!=o&&o!==n.opacity&&e.setOpacity(o),null!=r&&r!==n.zIndex&&e.setZIndex(r)}(e,t,n);const{url:o}=t;null!=o&&o!==n.url&&e.setUrl(o)}))));var n$;const o$=Zj((a$=qj(function({center:e,children:t,...n},o){const r=new Bj.CircleMarker(e,n);return Kj(r,Fj(o,{overlayContainer:r}))},function(e,t,n){t.center!==n.center&&e.setLatLng(t.center),null!=t.radius&&t.radius!==n.radius&&e.setRadius(t.radius)}),function(t){const n=Hj(),o=a$(Qj(t,n),n);return Yj(o.current,t.eventHandlers),Jj(o.current,n),function(t,n){const o=(0,e.useRef)();(0,e.useEffect)(function(){if(n.pathOptions!==o.current){const e=n.pathOptions??{};t.instance.setStyle(e),o.current=e}},[t,n])}(o.current,t),o})),r$=function(){const t=function(e,t){return function(n,o){const r=Hj(),i=e(Qj(n,r),r);return Xj(r.map,n.attribution),Yj(i.current,n.eventHandlers),t(i.current,r,n,o),i}}(qj(function(e,t){return Kj(new Bj.Popup(e,t.overlayContainer),t)}),function(t,n,{position:o},r){(0,e.useEffect)(function(){const{instance:e}=t;function i(t){t.popup===e&&(e.update(),r(!0))}function a(t){t.popup===e&&r(!1)}return n.map.on({popupopen:i,popupclose:a}),null==n.overlayContainer?(null!=o&&e.setLatLng(o),e.openOn(n.map)):n.overlayContainer.bindPopup(e),function(){n.map.off({popupopen:i,popupclose:a}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(e)}},[t,n,r,o])});return function(t){function n(n,o){const[r,i]=(0,e.useState)(!1),{instance:a}=t(n,i).current;(0,e.useImperativeHandle)(o,()=>a),(0,e.useEffect)(function(){r&&a.update()},[a,r,n.children]);const s=a._contentNode;return s?(0,Fr.createPortal)(n.children,s):null}return(0,e.forwardRef)(n)}(t)}(),i$=Zj(e$(qj(function({position:e,...t},n){const o=new Bj.Marker(e,t);return Kj(o,Fj(n,{overlayContainer:o}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())})));var a$,s$=s(5072),l$=s.n(s$),u$=s(7825),c$=s.n(u$),d$=s(7659),p$=s.n(d$),h$=s(5056),f$=s.n(h$),m$=s(540),g$=s.n(m$),v$=s(1113),y$=s.n(v$),b$=s(1081),x$={};x$.styleTagTransform=y$(),x$.setAttributes=f$(),x$.insert=p$().bind(null,"head"),x$.domAPI=c$(),x$.insertStyleElement=g$(),l$()(b$.A,x$),b$.A&&b$.A.locals&&b$.A.locals;const w$=Vj().icon({iconUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});Vj().Marker.prototype.options.icon=w$;const _$=({points:e,enabled:n})=>{const o=Hj().map;return t().useEffect(()=>{if(!n||0===e.length)return;const t=e.map(e=>[e.lat,e.lng]);o.fitBounds(t,{padding:[40,40]})},[e,n,o]),null},C$=({points:e,center:t,zoom:r=5,height:i=500,width:a="100%",variant:s="marker",fitBounds:l=!0,tileUrl:u="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileAttribution:c='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',loading:d=!1})=>{const p=t??(e.length>0?[e[0].lat,e[0].lng]:[20.5937,78.9629]);return(0,o.jsxs)(n.Box,{sx:{position:"relative",height:i,width:a,"& .leaflet-container":{height:"100%",width:"100%"}},children:[(0,o.jsxs)(Gj,{center:p,zoom:r,scrollWheelZoom:!0,children:[(0,o.jsx)(t$,{url:u,attribution:c}),(0,o.jsx)(_$,{points:e,enabled:l}),e.map(e=>"circle"===s?(0,o.jsx)(o$,{center:[e.lat,e.lng],radius:8,pathOptions:{color:e.color??"#1976d2",fillColor:e.color??"#1976d2",fillOpacity:.7},children:(e.label||e.description)&&(0,o.jsxs)(r$,{children:[e.label&&(0,o.jsx)("strong",{children:e.label}),e.description&&(0,o.jsx)(n.Box,{mt:e.label?.5:0,children:e.description})]})},e.id):(0,o.jsx)(i$,{position:[e.lat,e.lng],children:(e.label||e.description)&&(0,o.jsxs)(r$,{children:[e.label&&(0,o.jsx)("strong",{children:e.label}),e.description&&(0,o.jsx)(n.Box,{mt:e.label?.5:0,children:e.description})]})},e.id))]}),d&&(0,o.jsx)(n.Box,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"rgba(255,255,255,0.6)",zIndex:500},children:(0,o.jsx)(n.CircularProgress,{})})]})},A$=({series:e,xAxisData:t,xAxisLabel:n,yAxisLabel:r,width:i=600,height:a=400,loading:s=!1,showMarks:l=!1})=>{const u=t?[{data:t,scaleType:"point",label:n}]:n?[{label:n}]:void 0,c=r?[{label:r}]:void 0,d=e.map(e=>({...e,area:!0,showMark:l}));return(0,o.jsx)(Eg,{series:d,xAxis:u,yAxis:c,width:i,height:a,loading:s})}})(),l})());
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@mui/material"),require("@emotion/react"),require("@emotion/styled"),require("react-dom"),require("@mui/system"),require("@mui/x-data-grid")):"function"==typeof define&&define.amd?define([,,,,,,],e):"object"==typeof exports?exports.reactlib=e(require("react"),require("@mui/material"),require("@emotion/react"),require("@emotion/styled"),require("react-dom"),require("@mui/system"),require("@mui/x-data-grid")):t.reactlib=e(t[void 0],t[void 0],t[void 0],t[void 0],t[void 0],t[void 0],t[void 0])}(this,(t,e,n,i,o,r,s)=>(()=>{var a={9582(t,e,n){"use strict";var i=n(4994);e.A=void 0;var o=i(n(2032)),r=n(4848);e.A=(0,o.default)((0,r.jsx)("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward")},7423(t,e,n){"use strict";var i=n(4994);e.A=void 0;var o=i(n(2032)),r=n(4848);e.A=(0,o.default)((0,r.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward")},2032(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.createSvgIcon}});var i=n(8382)},5607(t,e,n){"use strict";n.d(e,{b:()=>s});var i=n(690),o=n(7379);n(4848);const r=i.createContext(void 0);function s(t){return function({props:t,name:e}){return function(t){const{theme:e,name:n,props:i}=t;if(!e||!e.components||!e.components[n])return i;const r=e.components[n];return r.defaultProps?(0,o.A)(r.defaultProps,i):r.styleOverrides||r.variants?i:(0,o.A)(r,i)}({props:t,name:e,theme:{components:i.useContext(r)}})}(t)}},3478(t,e,n){"use strict";n.d(e,{A:()=>ct});var i=n(8168),o=n(8587),r=n(9453),s=n(1317),a=n(4188),l=n(3571),c=n(8749),u=n(771);const h={black:"#000",white:"#fff"},d={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},p="#f3e5f5",f="#ce93d8",m="#ba68c8",g="#ab47bc",y="#9c27b0",_="#7b1fa2",v="#e57373",x="#ef5350",b="#f44336",w="#d32f2f",A="#c62828",P="#ffb74d",k="#ffa726",M="#ff9800",C="#f57c00",I="#e65100",T="#e3f2fd",L="#90caf9",S="#42a5f5",O="#1976d2",j="#1565c0",z="#4fc3f7",E="#29b6f6",R="#03a9f4",N="#0288d1",$="#01579b",B="#81c784",F="#66bb6a",D="#4caf50",Z="#388e3c",H="#2e7d32",U="#1b5e20",W=["mode","contrastThreshold","tonalOffset"],V={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:h.white,default:h.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},q={text:{primary:h.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:h.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function G(t,e,n,i){const o=i.light||i,r=i.dark||1.5*i;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=(0,u.a)(t.main,o):"dark"===e&&(t.dark=(0,u.e$)(t.main,r)))}const K=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"],Y={textTransform:"uppercase"},X='"Roboto", "Helvetica", "Arial", sans-serif';function Q(t,e){const n="function"==typeof e?e(t):e,{fontFamily:r=X,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:h=700,htmlFontSize:d=16,allVariants:p,pxToRem:f}=n,m=(0,o.A)(n,K),g=a/14,y=f||(t=>t/d*g+"rem"),_=(t,e,n,o,s)=>{return(0,i.A)({fontFamily:r,fontWeight:t,fontSize:y(e),lineHeight:n},r===X?{letterSpacing:(a=o/e,Math.round(1e5*a)/1e5+"em")}:{},s,p);var a},v={h1:_(l,96,1.167,-1.5),h2:_(l,60,1.2,-.5),h3:_(c,48,1.167,0),h4:_(c,34,1.235,.25),h5:_(c,24,1.334,0),h6:_(u,20,1.6,.15),subtitle1:_(c,16,1.75,.15),subtitle2:_(u,14,1.57,.1),body1:_(c,16,1.5,.15),body2:_(c,14,1.43,.15),button:_(u,14,1.75,.4,Y),caption:_(c,12,1.66,.4),overline:_(c,12,2.66,1,Y),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,s.A)((0,i.A)({htmlFontSize:d,pxToRem:y,fontFamily:r,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:h},v),m,{clone:!1})}function J(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,0.2)`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,0.14)`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,0.12)`].join(",")}const tt=["none",J(0,2,1,-1,0,1,1,0,0,1,3,0),J(0,3,1,-2,0,2,2,0,0,1,5,0),J(0,3,3,-2,0,3,4,0,0,1,8,0),J(0,2,4,-1,0,4,5,0,0,1,10,0),J(0,3,5,-1,0,5,8,0,0,1,14,0),J(0,3,5,-1,0,6,10,0,0,1,18,0),J(0,4,5,-2,0,7,10,1,0,2,16,1),J(0,5,5,-3,0,8,10,1,0,3,14,2),J(0,5,6,-3,0,9,12,1,0,3,16,2),J(0,6,6,-3,0,10,14,1,0,4,18,3),J(0,6,7,-4,0,11,15,1,0,4,20,3),J(0,7,8,-4,0,12,17,2,0,5,22,4),J(0,7,8,-4,0,13,19,2,0,5,24,4),J(0,7,9,-4,0,14,21,2,0,5,26,4),J(0,8,9,-5,0,15,22,2,0,6,28,5),J(0,8,10,-5,0,16,24,2,0,6,30,5),J(0,8,11,-5,0,17,26,2,0,6,32,5),J(0,9,11,-5,0,18,28,2,0,7,34,6),J(0,9,12,-6,0,19,29,2,0,7,36,6),J(0,10,13,-6,0,20,31,3,0,8,38,7),J(0,10,13,-6,0,21,33,3,0,8,40,7),J(0,10,14,-6,0,22,35,3,0,8,42,7),J(0,11,14,-7,0,23,36,3,0,9,44,8),J(0,11,15,-7,0,24,38,3,0,9,46,8)],et=["duration","easing","delay"],nt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},it={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ot(t){return`${Math.round(t)}ms`}function rt(t){if(!t)return 0;const e=t/36;return Math.round(10*(4+15*e**.25+e/5))}function st(t){const e=(0,i.A)({},nt,t.easing),n=(0,i.A)({},it,t.duration);return(0,i.A)({getAutoHeightDuration:rt,create:(t=["all"],i={})=>{const{duration:r=n.standard,easing:s=e.easeInOut,delay:a=0}=i;return(0,o.A)(i,et),(Array.isArray(t)?t:[t]).map(t=>`${t} ${"string"==typeof r?r:ot(r)} ${s} ${"string"==typeof a?a:ot(a)}`).join(",")}},t,{easing:e,duration:n})}const at={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},lt=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const ct=function(t={},...e){const{mixins:n={},palette:K={},transitions:Y={},typography:X={}}=t,J=(0,o.A)(t,lt);if(t.vars&&void 0===t.generateCssVars)throw new Error((0,r.A)(18));const et=function(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:a=.2}=t,l=(0,o.A)(t,W),c=t.primary||function(t="light"){return"dark"===t?{main:L,light:T,dark:S}:{main:O,light:S,dark:j}}(e),K=t.secondary||function(t="light"){return"dark"===t?{main:f,light:p,dark:g}:{main:y,light:m,dark:_}}(e),Y=t.error||function(t="light"){return"dark"===t?{main:b,light:v,dark:w}:{main:w,light:x,dark:A}}(e),X=t.info||function(t="light"){return"dark"===t?{main:E,light:z,dark:N}:{main:N,light:R,dark:$}}(e),Q=t.success||function(t="light"){return"dark"===t?{main:F,light:B,dark:Z}:{main:H,light:D,dark:U}}(e),J=t.warning||function(t="light"){return"dark"===t?{main:k,light:P,dark:C}:{main:"#ed6c02",light:M,dark:I}}(e);function tt(t){return(0,u.eM)(t,q.text.primary)>=n?q.text.primary:V.text.primary}const et=({color:t,name:e,mainShade:n=500,lightShade:o=300,darkShade:s=700})=>{if(!(t=(0,i.A)({},t)).main&&t[n]&&(t.main=t[n]),!t.hasOwnProperty("main"))throw new Error((0,r.A)(11,e?` (${e})`:"",n));if("string"!=typeof t.main)throw new Error((0,r.A)(12,e?` (${e})`:"",JSON.stringify(t.main)));return G(t,"light",o,a),G(t,"dark",s,a),t.contrastText||(t.contrastText=tt(t.main)),t},nt={dark:q,light:V};return(0,s.A)((0,i.A)({common:(0,i.A)({},h),mode:e,primary:et({color:c,name:"primary"}),secondary:et({color:K,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:et({color:Y,name:"error"}),warning:et({color:J,name:"warning"}),info:et({color:X,name:"info"}),success:et({color:Q,name:"success"}),grey:d,contrastThreshold:n,getContrastText:tt,augmentColor:et,tonalOffset:a},nt[e]),l)}(K),nt=(0,c.A)(t);let it=(0,s.A)(nt,{mixins:(ot=nt.breakpoints,rt=n,(0,i.A)({toolbar:{minHeight:56,[ot.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[ot.up("sm")]:{minHeight:64}}},rt)),palette:et,shadows:tt.slice(),typography:Q(et,X),transitions:st(Y),zIndex:(0,i.A)({},at)});var ot,rt;return it=(0,s.A)(it,J),it=e.reduce((t,e)=>(0,s.A)(t,e),it),it.unstable_sxConfig=(0,i.A)({},a.A,null==J?void 0:J.unstable_sxConfig),it.unstable_sx=function(t){return(0,l.A)({sx:t,theme:this})},it}},2765(t,e,n){"use strict";n.d(e,{A:()=>i});const i=(0,n(3478).A)()},8312(t,e,n){"use strict";n.d(e,{A:()=>i});const i="$$material"},9245(t,e,n){"use strict";n.d(e,{Ay:()=>s});var i=n(6461),o=n(2765),r=n(8312);const s=(0,i.Ay)({themeId:r.A,defaultTheme:o.A,rootShouldForwardProp:t=>function(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}(t)&&"classes"!==t})},8466(t,e,n){"use strict";n.d(e,{A:()=>i});const i=n(3967).A},8382(t,e,n){"use strict";n.r(e),n.d(e,{capitalize:()=>o.A,createChainedFunction:()=>r,createSvgIcon:()=>b,debounce:()=>w,deprecatedPropType:()=>A,isMuiElement:()=>P,ownerDocument:()=>k,ownerWindow:()=>M,requirePropFactory:()=>C,setRef:()=>I,unstable_ClassNameGenerator:()=>W,unstable_useEnhancedEffect:()=>L,unstable_useId:()=>S,unsupportedProp:()=>O,useControlled:()=>j,useEventCallback:()=>z,useForkRef:()=>E,useIsFocusVisible:()=>U});var i=n(9071),o=n(8466);const r=function(...t){return t.reduce((t,e)=>null==e?t:function(...n){t.apply(this,n),e.apply(this,n)},()=>{})};var s=n(8168),a=n(690),l=n(8587),c=n(4164),u=n(5659),h=n(5607),d=n(9245),p=n(8413),f=n(1609);function m(t){return(0,f.Ay)("MuiSvgIcon",t)}(0,p.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var g=n(4848);const y=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],_=(0,d.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,"inherit"!==n.color&&e[`color${(0,o.A)(n.color)}`],e[`fontSize${(0,o.A)(n.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var n,i,o,r,s,a,l,c,u,h,d,p,f;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=t.transitions)||null==(i=n.create)?void 0:i.call(n,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(r=t.typography)||null==(s=r.pxToRem)?void 0:s.call(r,20))||"1.25rem",medium:(null==(a=t.typography)||null==(l=a.pxToRem)?void 0:l.call(a,24))||"1.5rem",large:(null==(c=t.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[e.fontSize],color:null!=(h=null==(d=(t.vars||t).palette)||null==(d=d[e.color])?void 0:d.main)?h:{action:null==(p=(t.vars||t).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.disabled,inherit:void 0}[e.color]}}),v=a.forwardRef(function(t,e){const n=(0,h.b)({props:t,name:"MuiSvgIcon"}),{children:i,className:r,color:d="inherit",component:p="svg",fontSize:f="medium",htmlColor:v,inheritViewBox:x=!1,titleAccess:b,viewBox:w="0 0 24 24"}=n,A=(0,l.A)(n,y),P=a.isValidElement(i)&&"svg"===i.type,k=(0,s.A)({},n,{color:d,component:p,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:x,viewBox:w,hasSvgAsChild:P}),M={};x||(M.viewBox=w);const C=(t=>{const{color:e,fontSize:n,classes:i}=t,r={root:["root","inherit"!==e&&`color${(0,o.A)(e)}`,`fontSize${(0,o.A)(n)}`]};return(0,u.A)(r,m,i)})(k);return(0,g.jsxs)(_,(0,s.A)({as:p,className:(0,c.A)(C.root,r),focusable:"false",color:v,"aria-hidden":!b||void 0,role:b?"img":void 0,ref:e},M,A,P&&i.props,{ownerState:k,children:[P?i.props.children:i,b?(0,g.jsx)("title",{children:b}):null]}))});v.muiName="SvgIcon";const x=v;function b(t,e){function n(n,i){return(0,g.jsx)(x,(0,s.A)({"data-testid":`${e}Icon`,ref:i},n,{children:t}))}return n.muiName=x.muiName,a.memo(a.forwardRef(n))}const w=function(t,e=166){let n;function i(...i){clearTimeout(n),n=setTimeout(()=>{t.apply(this,i)},e)}return i.clear=()=>{clearTimeout(n)},i},A=function(t,e){return()=>null},P=function(t,e){var n,i;return a.isValidElement(t)&&-1!==e.indexOf(null!=(n=t.type.muiName)?n:null==(i=t.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)},k=n(2325).A,M=n(4877).A,C=function(t,e){return()=>null},I=n(7365).A;var T=n(1529);const L=T.A,S=n(4661).A,O=function(t,e,n,i,o){return null},j=n(2501).A,z=function(t){const e=a.useRef(t);return(0,T.A)(()=>{e.current=t}),a.useRef((...t)=>(0,e.current)(...t)).current},E=n(1523).A;class R{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new R}start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,e()},t)}}let N=!0,$=!1;const B=new R,F={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function D(t){t.metaKey||t.altKey||t.ctrlKey||(N=!0)}function Z(){N=!1}function H(){"hidden"===this.visibilityState&&$&&(N=!0)}const U=function(){const t=a.useCallback(t=>{var e;null!=t&&((e=t.ownerDocument).addEventListener("keydown",D,!0),e.addEventListener("mousedown",Z,!0),e.addEventListener("pointerdown",Z,!0),e.addEventListener("touchstart",Z,!0),e.addEventListener("visibilitychange",H,!0))},[]),e=a.useRef(!1);return{isFocusVisibleRef:e,onFocus:function(t){return!!function(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch(t){}return N||function(t){const{type:e,tagName:n}=t;return!("INPUT"!==n||!F[e]||t.readOnly)||"TEXTAREA"===n&&!t.readOnly||!!t.isContentEditable}(e)}(t)&&(e.current=!0,!0)},onBlur:function(){return!!e.current&&($=!0,B.start(100,()=>{$=!1}),e.current=!1,!0)},ref:t}},W={configure:t=>{i.A.configure(t)}}},2739(t,e,n){"use strict";n.r(e),n.d(e,{GlobalStyles:()=>bt,StyledEngineProvider:()=>xt,ThemeContext:()=>g.ThemeContext,css:()=>g.css,default:()=>wt,internal_processStyles:()=>At,internal_serializeStyles:()=>kt,keyframes:()=>g.keyframes});var i=n(4774),o=n.n(i),r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function s(t){var e=Object.create(null);return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}var a=/[A-Z]|^ms/g,l=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(t){return 45===t.charCodeAt(1)},u=function(t){return null!=t&&"boolean"!=typeof t},h=s(function(t){return c(t)?t:t.replace(a,"-$&").toLowerCase()}),d=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(l,function(t,e,n){return f={name:e,styles:n,next:f},e})}return 1===r[t]||c(t)||"number"!=typeof e||0===e?e:e+"px"};function p(t,e,n){if(null==n)return"";var i=n;if(void 0!==i.__emotion_styles)return i;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var r=n;if(void 0!==r.styles){var s=r.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return r.styles+";"}return function(t,e,n){var i="";if(Array.isArray(n))for(var o=0;o<n.length;o++)i+=p(t,e,n[o])+";";else for(var r in n){var s=n[r];if("object"!=typeof s){var a=s;null!=e&&void 0!==e[a]?i+=r+"{"+e[a]+"}":u(a)&&(i+=h(r)+":"+d(r,a)+";")}else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var l=p(t,e,s);switch(r){case"animation":case"animationName":i+=h(r)+":"+l+";";break;default:i+=r+"{"+l+"}"}}else for(var c=0;c<s.length;c++)u(s[c])&&(i+=h(r)+":"+d(r,s[c])+";")}return i}(t,e,n);case"function":if(void 0!==t){var a=f,l=n(t);return f=a,p(t,e,l)}}var c=n;if(null==e)return c;var m=e[c];return void 0!==m?m:c}var f,m=/label:\s*([^\s;{]+)\s*(;|$)/g,g=n(476),y=n(690),_=function(){function t(t){var e=this;this._insertTag=function(t){var n;n=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,n),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{n.insertRule(t,n.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach(function(t){var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),this.tags=[],this.ctr=0},t}(),v=Math.abs,x=String.fromCharCode,b=Object.assign;function w(t){return t.trim()}function A(t,e,n){return t.replace(e,n)}function P(t,e){return t.indexOf(e)}function k(t,e){return 0|t.charCodeAt(e)}function M(t,e,n){return t.slice(e,n)}function C(t){return t.length}function I(t){return t.length}function T(t,e){return e.push(t),t}var L=1,S=1,O=0,j=0,z=0,E="";function R(t,e,n,i,o,r,s){return{value:t,root:e,parent:n,type:i,props:o,children:r,line:L,column:S,length:s,return:""}}function N(t,e){return b(R("",null,null,"",null,null,0),t,{length:-t.length},e)}function $(){return z=j>0?k(E,--j):0,S--,10===z&&(S=1,L--),z}function B(){return z=j<O?k(E,j++):0,S++,10===z&&(S=1,L++),z}function F(){return k(E,j)}function D(){return j}function Z(t,e){return M(E,t,e)}function H(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function U(t){return L=S=1,O=C(E=t),j=0,[]}function W(t){return E="",t}function V(t){return w(Z(j-1,K(91===t?t+2:40===t?t+1:t)))}function q(t){for(;(z=F())&&z<33;)B();return H(t)>2||H(z)>3?"":" "}function G(t,e){for(;--e&&B()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return Z(t,D()+(e<6&&32==F()&&32==B()))}function K(t){for(;B();)switch(z){case t:return j;case 34:case 39:34!==t&&39!==t&&K(z);break;case 40:41===t&&K(t);break;case 92:B()}return j}function Y(t,e){for(;B()&&t+z!==57&&(t+z!==84||47!==F()););return"/*"+Z(e,j-1)+"*"+x(47===t?t:B())}function X(t){for(;!H(F());)B();return Z(t,j)}var Q="-ms-",J="-moz-",tt="-webkit-",et="comm",nt="rule",it="decl",ot="@keyframes";function rt(t,e){for(var n="",i=I(t),o=0;o<i;o++)n+=e(t[o],o,t,e)||"";return n}function st(t,e,n,i){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case it:return t.return=t.return||t.value;case et:return"";case ot:return t.return=t.value+"{"+rt(t.children,i)+"}";case nt:t.value=t.props.join(",")}return C(n=rt(t.children,i))?t.return=t.value+"{"+n+"}":""}function at(t){return W(lt("",null,null,null,[""],t=U(t),0,[0],t))}function lt(t,e,n,i,o,r,s,a,l){for(var c=0,u=0,h=s,d=0,p=0,f=0,m=1,g=1,y=1,_=0,v="",b=o,w=r,M=i,I=v;g;)switch(f=_,_=B()){case 40:if(108!=f&&58==k(I,h-1)){-1!=P(I+=A(V(_),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:I+=V(_);break;case 9:case 10:case 13:case 32:I+=q(f);break;case 92:I+=G(D()-1,7);continue;case 47:switch(F()){case 42:case 47:T(ut(Y(B(),D()),e,n),l);break;default:I+="/"}break;case 123*m:a[c++]=C(I)*y;case 125*m:case 59:case 0:switch(_){case 0:case 125:g=0;case 59+u:-1==y&&(I=A(I,/\f/g,"")),p>0&&C(I)-h&&T(p>32?ht(I+";",i,n,h-1):ht(A(I," ","")+";",i,n,h-2),l);break;case 59:I+=";";default:if(T(M=ct(I,e,n,c,u,o,a,v,b=[],w=[],h),r),123===_)if(0===u)lt(I,e,M,M,b,r,h,a,w);else switch(99===d&&110===k(I,3)?100:d){case 100:case 108:case 109:case 115:lt(t,M,M,i&&T(ct(t,M,M,0,0,o,a,v,o,b=[],h),w),o,w,h,a,i?b:w);break;default:lt(I,M,M,M,[""],w,0,a,w)}}c=u=p=0,m=y=1,v=I="",h=s;break;case 58:h=1+C(I),p=f;default:if(m<1)if(123==_)--m;else if(125==_&&0==m++&&125==$())continue;switch(I+=x(_),_*m){case 38:y=u>0?1:(I+="\f",-1);break;case 44:a[c++]=(C(I)-1)*y,y=1;break;case 64:45===F()&&(I+=V(B())),d=F(),u=h=C(v=I+=X(D())),_++;break;case 45:45===f&&2==C(I)&&(m=0)}}return r}function ct(t,e,n,i,o,r,s,a,l,c,u){for(var h=o-1,d=0===o?r:[""],p=I(d),f=0,m=0,g=0;f<i;++f)for(var y=0,_=M(t,h+1,h=v(m=s[f])),x=t;y<p;++y)(x=w(m>0?d[y]+" "+_:A(_,/&\f/g,d[y])))&&(l[g++]=x);return R(t,e,n,0===o?nt:a,l,c,u)}function ut(t,e,n){return R(t,e,n,et,x(z),M(t,2,-2),0)}function ht(t,e,n,i){return R(t,e,n,it,M(t,0,i),M(t,i+1,-1),i)}var dt=function(t,e,n){for(var i=0,o=0;i=o,o=F(),38===i&&12===o&&(e[n]=1),!H(o);)B();return Z(t,j)},pt=new WeakMap,ft=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||pt.get(n))&&!i){pt.set(t,!0);for(var o=[],r=function(t,e){return W(function(t,e){var n=-1,i=44;do{switch(H(i)){case 0:38===i&&12===F()&&(e[n]=1),t[n]+=dt(j-1,e,n);break;case 2:t[n]+=V(i);break;case 4:if(44===i){t[++n]=58===F()?"&\f":"",e[n]=t[n].length;break}default:t[n]+=x(i)}}while(i=B());return t}(U(t),e))}(e,o),s=n.props,a=0,l=0;a<r.length;a++)for(var c=0;c<s.length;c++,l++)t.props[l]=o[a]?r[a].replace(/&\f/g,s[c]):s[c]+" "+r[a]}}},mt=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function gt(t,e){switch(function(t,e){return 45^k(t,0)?(((e<<2^k(t,0))<<2^k(t,1))<<2^k(t,2))<<2^k(t,3):0}(t,e)){case 5103:return tt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return tt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return tt+t+J+t+Q+t+t;case 6828:case 4268:return tt+t+Q+t+t;case 6165:return tt+t+Q+"flex-"+t+t;case 5187:return tt+t+A(t,/(\w+).+(:[^]+)/,tt+"box-$1$2"+Q+"flex-$1$2")+t;case 5443:return tt+t+Q+"flex-item-"+A(t,/flex-|-self/,"")+t;case 4675:return tt+t+Q+"flex-line-pack"+A(t,/align-content|flex-|-self/,"")+t;case 5548:return tt+t+Q+A(t,"shrink","negative")+t;case 5292:return tt+t+Q+A(t,"basis","preferred-size")+t;case 6060:return tt+"box-"+A(t,"-grow","")+tt+t+Q+A(t,"grow","positive")+t;case 4554:return tt+A(t,/([^-])(transform)/g,"$1"+tt+"$2")+t;case 6187:return A(A(A(t,/(zoom-|grab)/,tt+"$1"),/(image-set)/,tt+"$1"),t,"")+t;case 5495:case 3959:return A(t,/(image-set\([^]*)/,tt+"$1$`$1");case 4968:return A(A(t,/(.+:)(flex-)?(.*)/,tt+"box-pack:$3"+Q+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+tt+t+t;case 4095:case 3583:case 4068:case 2532:return A(t,/(.+)-inline(.+)/,tt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(C(t)-1-e>6)switch(k(t,e+1)){case 109:if(45!==k(t,e+4))break;case 102:return A(t,/(.+:)(.+)-([^]+)/,"$1"+tt+"$2-$3$1"+J+(108==k(t,e+3)?"$3":"$2-$3"))+t;case 115:return~P(t,"stretch")?gt(A(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==k(t,e+1))break;case 6444:switch(k(t,C(t)-3-(~P(t,"!important")&&10))){case 107:return A(t,":",":"+tt)+t;case 101:return A(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+tt+(45===k(t,14)?"inline-":"")+"box$3$1"+tt+"$2$3$1"+Q+"$2box$3")+t}break;case 5936:switch(k(t,e+11)){case 114:return tt+t+Q+A(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return tt+t+Q+A(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return tt+t+Q+A(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return tt+t+Q+t+t}return t}var yt=[function(t,e,n,i){if(t.length>-1&&!t.return)switch(t.type){case it:t.return=gt(t.value,t.length);break;case ot:return rt([N(t,{value:A(t.value,"@","@"+tt)})],i);case nt:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,function(e){switch(function(t){return(t=/(::plac\w+|:read-\w+)/.exec(t))?t[0]:t}(e)){case":read-only":case":read-write":return rt([N(t,{props:[A(e,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return rt([N(t,{props:[A(e,/:(plac\w+)/,":"+tt+"input-$1")]}),N(t,{props:[A(e,/:(plac\w+)/,":-moz-$1")]}),N(t,{props:[A(e,/:(plac\w+)/,Q+"input-$1")]})],i)}return""})}}],_t=n(4848);const vt=new Map;function xt(t){const{injectFirst:e,enableCssLayer:n,children:i}=t,o=y.useMemo(()=>{const t=`${e}-${n}`;if("object"==typeof document&&vt.has(t))return vt.get(t);const i=function(t,e){const n=function(t){var e=t.key;if("css"===e){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))})}var i,o,r=t.stylisPlugins||yt,s={},a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(t){for(var e=t.getAttribute("data-emotion").split(" "),n=1;n<e.length;n++)s[e[n]]=!0;a.push(t)});var l,c,u,h,d=[st,(h=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&h(t)})],p=(c=[ft,mt].concat(r,d),u=I(c),function(t,e,n,i){for(var o="",r=0;r<u;r++)o+=c[r](t,e,n,i)||"";return o});o=function(t,e,n,i){l=n,rt(at(t?t+"{"+e.styles+"}":e.styles),p),i&&(f.inserted[e.name]=!0)};var f={key:e,sheet:new _({key:e,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:o};return f.sheet.hydrate(a),f}({key:"css",prepend:t});if(e){const t=n.insert;n.insert=(...e)=>(e[1].styles.match(/^@layer\s+[^{]*$/)||(e[1].styles=`@layer mui {${e[1].styles}}`),t(...e))}return n}(e,n);return vt.set(t,i),i},[e,n]);return e||n?(0,_t.jsx)(g.CacheProvider,{value:o,children:i}):i}function bt(t){const{styles:e,defaultTheme:n={}}=t,i="function"==typeof e?t=>{return e(null==(i=t)||0===Object.keys(i).length?n:t);var i}:e;return(0,_t.jsx)(g.Global,{styles:i})}function wt(t,e){return o()(t,e)}const At=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))},Pt=[];function kt(t){return Pt[0]=t,function(t,e,n){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var i=!0,o="";f=void 0;var r=t[0];null==r||void 0===r.raw?(i=!1,o+=p(n,e,r)):o+=r[0];for(var s=1;s<t.length;s++)o+=p(n,e,t[s]),i&&(o+=r[s]);m.lastIndex=0;for(var a,l="";null!==(a=m.exec(o));)l+="-"+a[1];var c=function(t){for(var e,n=0,i=0,o=t.length;o>=4;++i,o-=4)e=1540483477*(65535&(e=255&t.charCodeAt(i)|(255&t.charCodeAt(++i))<<8|(255&t.charCodeAt(++i))<<16|(255&t.charCodeAt(++i))<<24))+(59797*(e>>>16)<<16),n=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&t.charCodeAt(i+2))<<16;case 2:n^=(255&t.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(i)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:f}}(Pt)}},771(t,e,n){"use strict";var i=n(4994);e.e$=u,e.eM=function(t,e){const n=c(t),i=c(e);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)},e.a=h;var o=i(n(8944)),r=i(n(7535));function s(t,e=0,n=1){return(0,r.default)(t,e,n)}function a(t){if(t.type)return t;if("#"===t.charAt(0))return a(function(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&1===n[0].length&&(n=n.map(t=>t+t)),n?`rgb${4===n.length?"a":""}(${n.map((t,e)=>e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3).join(", ")})`:""}(t));const e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,o.default)(9,t));let i,r=t.substring(e+1,t.length-1);if("color"===n){if(r=r.split(" "),i=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,o.default)(10,i))}else r=r.split(",");return r=r.map(t=>parseFloat(t)),{type:n,values:r,colorSpace:i}}function l(t){const{type:e,colorSpace:n}=t;let{values:i}=t;return-1!==e.indexOf("rgb")?i=i.map((t,e)=>e<3?parseInt(t,10):t):-1!==e.indexOf("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),i=-1!==e.indexOf("color")?`${n} ${i.join(" ")}`:`${i.join(", ")}`,`${e}(${i})`}function c(t){let e="hsl"===(t=a(t)).type||"hsla"===t.type?a(function(t){t=a(t);const{values:e}=t,n=e[0],i=e[1]/100,o=e[2]/100,r=i*Math.min(o,1-o),s=(t,e=(t+n/30)%12)=>o-r*Math.max(Math.min(e-3,9-e,1),-1);let c="rgb";const u=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===t.type&&(c+="a",u.push(e[3])),l({type:c,values:u})}(t)).values:t.values;return e=e.map(e=>("color"!==t.type&&(e/=255),e<=.03928?e/12.92:((e+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function u(t,e){if(t=a(t),e=s(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb")||-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return l(t)}function h(t,e){if(t=a(t),e=s(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(-1!==t.type.indexOf("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return l(t)}},6461(t,e,n){"use strict";var i=n(4994);e.Ay=function(t={}){const{themeId:e,defaultTheme:n=g,rootShouldForwardProp:i=f,slotShouldForwardProp:l=f}=t,u=t=>(0,c.default)((0,o.default)({},t,{theme:_((0,o.default)({},t,{defaultTheme:n,themeId:e}))}));return u.__mui_systemSx=!0,(t,c={})=>{(0,s.internal_processStyles)(t,t=>t.filter(t=>!(null!=t&&t.__mui_systemSx)));const{name:h,slot:p,skipVariantsResolver:m,skipSx:g,overridesResolver:b=v(y(p))}=c,w=(0,r.default)(c,d),A=h&&h.startsWith("Mui")||p?"components":"custom",P=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,k=g||!1;let M=f;"Root"===p||"root"===p?M=i:p?M=l:function(t){return"string"==typeof t&&t.charCodeAt(0)>96}(t)&&(M=void 0);const C=(0,s.default)(t,(0,o.default)({shouldForwardProp:M,label:void 0},w)),I=t=>"function"==typeof t&&t.__emotion_real!==t||(0,a.isPlainObject)(t)?i=>{const r=_({theme:i.theme,defaultTheme:n,themeId:e});return x(t,(0,o.default)({},i,{theme:r}),r.modularCssLayers?A:void 0)}:t,T=(i,...r)=>{let s=I(i);const a=r?r.map(I):[];h&&b&&a.push(t=>{const i=_((0,o.default)({},t,{defaultTheme:n,themeId:e}));if(!i.components||!i.components[h]||!i.components[h].styleOverrides)return null;const r=i.components[h].styleOverrides,s={};return Object.entries(r).forEach(([e,n])=>{s[e]=x(n,(0,o.default)({},t,{theme:i}),i.modularCssLayers?"theme":void 0)}),b(t,s)}),h&&!P&&a.push(t=>{var i;const r=_((0,o.default)({},t,{defaultTheme:n,themeId:e}));return x({variants:null==r||null==(i=r.components)||null==(i=i[h])?void 0:i.variants},(0,o.default)({},t,{theme:r}),r.modularCssLayers?"theme":void 0)}),k||a.push(u);const l=a.length-r.length;if(Array.isArray(i)&&l>0){const t=new Array(l).fill("");s=[...i,...t],s.raw=[...i.raw,...t]}const c=C(s,...a);return t.muiName&&(c.muiName=t.muiName),c};return C.withConfig&&(T.withConfig=C.withConfig),T}};var o=i(n(4634)),r=i(n(4893)),s=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if("default"!==r&&Object.prototype.hasOwnProperty.call(t,r)){var s=o?Object.getOwnPropertyDescriptor(t,r):null;s&&(s.get||s.set)?Object.defineProperty(i,r,s):i[r]=t[r]}return i.default=t,n&&n.set(t,i),i}(n(2739)),a=n(4239),l=(i(n(7149)),i(n(7320)),i(n(3142))),c=i(n(3857));const u=["ownerState"],h=["variants"],d=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}function f(t){return"ownerState"!==t&&"theme"!==t&&"sx"!==t&&"as"!==t}function m(t,e){return e&&t&&"object"==typeof t&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}const g=(0,l.default)(),y=t=>t?t.charAt(0).toLowerCase()+t.slice(1):t;function _({defaultTheme:t,theme:e,themeId:n}){return i=e,0===Object.keys(i).length?t:e[n]||e;var i}function v(t){return t?(e,n)=>n[t]:null}function x(t,e,n){let{ownerState:i}=e,a=(0,r.default)(e,u);const l="function"==typeof t?t((0,o.default)({ownerState:i},a)):t;if(Array.isArray(l))return l.flatMap(t=>x(t,(0,o.default)({ownerState:i},a),n));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:t=[]}=l;let e=(0,r.default)(l,h);return t.forEach(t=>{let r=!0;if("function"==typeof t.props?r=t.props((0,o.default)({ownerState:i},a,i)):Object.keys(t.props).forEach(e=>{(null==i?void 0:i[e])!==t.props[e]&&a[e]!==t.props[e]&&(r=!1)}),r){Array.isArray(e)||(e=[e]);const r="function"==typeof t.style?t.style((0,o.default)({ownerState:i},a,i)):t.style;e.push(n?m((0,s.internal_serializeStyles)(r),n):r)}}),e}return n?m((0,s.internal_serializeStyles)(l),n):l}},9452(t,e,n){"use strict";n.d(e,{EU:()=>s,NI:()=>r,vf:()=>a,zu:()=>i});const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${i[t]}px)`};function r(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const t=r.breakpoints||o;return e.reduce((i,o,r)=>(i[t.up(t.keys[r])]=n(e[r]),i),{})}if("object"==typeof e){const t=r.breakpoints||o;return Object.keys(e).reduce((o,r)=>{if(-1!==Object.keys(t.values||i).indexOf(r))o[t.up(r)]=n(e[r],r);else{const t=r;o[t]=e[t]}return o},{})}return n(e)}function s(t={}){var e;return(null==(e=t.keys)?void 0:e.reduce((e,n)=>(e[t.up(n)]={},e),{}))||{}}function a(t,e){return t.reduce((t,e)=>{const n=t[e];return(!n||0===Object.keys(n).length)&&delete t[e],t},e)}},8336(t,e,n){"use strict";function i(t,e){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const i=n.getColorSchemeSelector(t).replace(/(\[[^\]]+\])/,"*:where($1)");return{[i]:e}}return n.palette.mode===t?e:{}}n.d(e,{A:()=>i})},8094(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(8587),o=n(8168);const r=["values","unit","step"];function s(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=t,a=(0,i.A)(t,r),l=(t=>{const e=Object.keys(t).map(e=>({key:e,val:t[e]}))||[];return e.sort((t,e)=>t.val-e.val),e.reduce((t,e)=>(0,o.A)({},t,{[e.key]:e.val}),{})})(e),c=Object.keys(l);function u(t){return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n})`}function h(t){return`@media (max-width:${("number"==typeof e[t]?e[t]:t)-s/100}${n})`}function d(t,i){const o=c.indexOf(i);return`@media (min-width:${"number"==typeof e[t]?e[t]:t}${n}) and (max-width:${(-1!==o&&"number"==typeof e[c[o]]?e[c[o]]:i)-s/100}${n})`}return(0,o.A)({keys:c,values:l,up:u,down:h,between:d,only:function(t){return c.indexOf(t)+1<c.length?d(t,c[c.indexOf(t)+1]):u(t)},not:function(t){const e=c.indexOf(t);return 0===e?u(c[1]):e===c.length-1?h(c[e]):d(t,c[c.indexOf(t)+1]).replace("@media","@media not all and")},unit:n},a)}},8749(t,e,n){"use strict";n.d(e,{A:()=>p});var i=n(8168),o=n(8587),r=n(1317),s=n(8094);const a={borderRadius:4};var l=n(8248),c=n(3571),u=n(4188),h=n(8336);const d=["breakpoints","palette","spacing","shape"],p=function(t={},...e){const{breakpoints:n={},palette:p={},spacing:f,shape:m={}}=t,g=(0,o.A)(t,d),y=(0,s.A)(n),_=function(t=8){if(t.mui)return t;const e=(0,l.LX)({spacing:t}),n=(...t)=>(0===t.length?[1]:t).map(t=>{const n=e(t);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(f);let v=(0,r.A)({breakpoints:y,direction:"ltr",components:{},palette:(0,i.A)({mode:"light"},p),spacing:_,shape:(0,i.A)({},a,m)},g);return v.applyStyles=h.A,v=e.reduce((t,e)=>(0,r.A)(t,e),v),v.unstable_sxConfig=(0,i.A)({},u.A,null==g?void 0:g.unstable_sxConfig),v.unstable_sx=function(t){return(0,c.A)({sx:t,theme:this})},v}},3142(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>r.A});var i=n(8749),o=n(8094),r=n(8336)},4620(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(1317);const o=function(t,e){return e?(0,i.A)(t,e,{clone:!1}):t}},8248(t,e,n){"use strict";n.d(e,{LX:()=>f,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>_});var i=n(9452),o=n(6481),r=n(4620);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(){const t={};return e=>(void 0===t[e]&&(t[e]=(t=>{if(t.length>2){if(!l[t])return[t];t=l[t]}const[e,n]=t.split(""),i=s[e],o=a[n]||"";return Array.isArray(o)?o.map(t=>i+t):[i+o]})(e)),t[e])}(),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],h=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...u,...h];function p(t,e,n,i){var r;const s=null!=(r=(0,o.Yn)(t,e,!1))?r:n;return"number"==typeof s?t=>"string"==typeof t?t:s*t:Array.isArray(s)?t=>"string"==typeof t?t:s[t]:"function"==typeof s?s:()=>{}}function f(t){return p(t,"spacing",8)}function m(t,e){if("string"==typeof e||null==e)return e;const n=t(Math.abs(e));return e>=0?n:"number"==typeof n?-n:`-${n}`}function g(t,e){const n=f(t.theme);return Object.keys(t).map(o=>function(t,e,n,o){if(-1===e.indexOf(n))return null;const r=function(t,e){return n=>t.reduce((t,i)=>(t[i]=m(e,n),t),{})}(c(n),o),s=t[n];return(0,i.NI)(t,s,r)}(t,e,o,n)).reduce(r.A,{})}function y(t){return g(t,u)}function _(t){return g(t,h)}function v(t){return g(t,d)}y.propTypes={},y.filterProps=u,_.propTypes={},_.filterProps=h,v.propTypes={},v.filterProps=d},6481(t,e,n){"use strict";n.d(e,{Ay:()=>a,BO:()=>s,Yn:()=>r});var i=n(3967),o=n(9452);function r(t,e,n=!0){if(!e||"string"!=typeof e)return null;if(t&&t.vars&&n){const n=`vars.${e}`.split(".").reduce((t,e)=>t&&t[e]?t[e]:null,t);if(null!=n)return n}return e.split(".").reduce((t,e)=>t&&null!=t[e]?t[e]:null,t)}function s(t,e,n,i=n){let o;return o="function"==typeof t?t(n):Array.isArray(t)?t[n]||i:r(t,n)||i,e&&(o=e(o,i,t)),o}const a=function(t){const{prop:e,cssProperty:n=t.prop,themeKey:a,transform:l}=t,c=t=>{if(null==t[e])return null;const c=t[e],u=r(t.theme,a)||{};return(0,o.NI)(t,c,t=>{let o=s(u,l,t);return t===o&&"string"==typeof t&&(o=s(u,l,`${e}${"default"===t?"":(0,i.A)(t)}`,t)),!1===n?o:{[n]:o}})};return c.propTypes={},c.filterProps=[e],c}},4188(t,e,n){"use strict";n.d(e,{A:()=>z});var i=n(8248),o=n(6481),r=n(4620);const s=function(...t){const e=t.reduce((t,e)=>(e.filterProps.forEach(n=>{t[n]=e}),t),{}),n=t=>Object.keys(t).reduce((n,i)=>e[i]?(0,r.A)(n,e[i](t)):n,{});return n.propTypes={},n.filterProps=t.reduce((t,e)=>t.concat(e.filterProps),[]),n};var a=n(9452);function l(t){return"number"!=typeof t?t:`${t}px solid`}function c(t,e){return(0,o.Ay)({prop:t,themeKey:"borders",transform:e})}const u=c("border",l),h=c("borderTop",l),d=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),y=c("borderRightColor"),_=c("borderBottomColor"),v=c("borderLeftColor"),x=c("outline",l),b=c("outlineColor"),w=t=>{if(void 0!==t.borderRadius&&null!==t.borderRadius){const e=(0,i.MA)(t.theme,"shape.borderRadius",4,"borderRadius"),n=t=>({borderRadius:(0,i._W)(e,t)});return(0,a.NI)(t,t.borderRadius,n)}return null};w.propTypes={},w.filterProps=["borderRadius"],s(u,h,d,p,f,m,g,y,_,v,w,x,b);const A=t=>{if(void 0!==t.gap&&null!==t.gap){const e=(0,i.MA)(t.theme,"spacing",8,"gap"),n=t=>({gap:(0,i._W)(e,t)});return(0,a.NI)(t,t.gap,n)}return null};A.propTypes={},A.filterProps=["gap"];const P=t=>{if(void 0!==t.columnGap&&null!==t.columnGap){const e=(0,i.MA)(t.theme,"spacing",8,"columnGap"),n=t=>({columnGap:(0,i._W)(e,t)});return(0,a.NI)(t,t.columnGap,n)}return null};P.propTypes={},P.filterProps=["columnGap"];const k=t=>{if(void 0!==t.rowGap&&null!==t.rowGap){const e=(0,i.MA)(t.theme,"spacing",8,"rowGap"),n=t=>({rowGap:(0,i._W)(e,t)});return(0,a.NI)(t,t.rowGap,n)}return null};function M(t,e){return"grey"===e?e:t}function C(t){return t<=1&&0!==t?100*t+"%":t}k.propTypes={},k.filterProps=["rowGap"],s(A,P,k,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"})),s((0,o.Ay)({prop:"color",themeKey:"palette",transform:M}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:M}));const I=(0,o.Ay)({prop:"width",transform:C}),T=t=>{if(void 0!==t.maxWidth&&null!==t.maxWidth){const e=e=>{var n,i;const o=(null==(n=t.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[e])||a.zu[e];return o?"px"!==(null==(i=t.theme)||null==(i=i.breakpoints)?void 0:i.unit)?{maxWidth:`${o}${t.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:C(e)}};return(0,a.NI)(t,t.maxWidth,e)}return null};T.filterProps=["maxWidth"];const L=(0,o.Ay)({prop:"minWidth",transform:C}),S=(0,o.Ay)({prop:"height",transform:C}),O=(0,o.Ay)({prop:"maxHeight",transform:C}),j=(0,o.Ay)({prop:"minHeight",transform:C}),z=((0,o.Ay)({prop:"size",cssProperty:"width",transform:C}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:C}),s(I,T,L,S,O,j,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:w},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:i.Ms},pt:{style:i.Ms},pr:{style:i.Ms},pb:{style:i.Ms},pl:{style:i.Ms},px:{style:i.Ms},py:{style:i.Ms},padding:{style:i.Ms},paddingTop:{style:i.Ms},paddingRight:{style:i.Ms},paddingBottom:{style:i.Ms},paddingLeft:{style:i.Ms},paddingX:{style:i.Ms},paddingY:{style:i.Ms},paddingInline:{style:i.Ms},paddingInlineStart:{style:i.Ms},paddingInlineEnd:{style:i.Ms},paddingBlock:{style:i.Ms},paddingBlockStart:{style:i.Ms},paddingBlockEnd:{style:i.Ms},m:{style:i.Lc},mt:{style:i.Lc},mr:{style:i.Lc},mb:{style:i.Lc},ml:{style:i.Lc},mx:{style:i.Lc},my:{style:i.Lc},margin:{style:i.Lc},marginTop:{style:i.Lc},marginRight:{style:i.Lc},marginBottom:{style:i.Lc},marginLeft:{style:i.Lc},marginX:{style:i.Lc},marginY:{style:i.Lc},marginInline:{style:i.Lc},marginInlineStart:{style:i.Lc},marginInlineEnd:{style:i.Lc},marginBlock:{style:i.Lc},marginBlockStart:{style:i.Lc},marginBlockEnd:{style:i.Lc},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:A},rowGap:{style:k},columnGap:{style:P},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:C},maxWidth:{style:T},minWidth:{transform:C},height:{transform:C},maxHeight:{transform:C},minHeight:{transform:C},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},9599(t,e,n){"use strict";n.d(e,{A:()=>l});var i=n(8168),o=n(8587),r=n(1317),s=n(4188);const a=["sx"];function l(t){const{sx:e}=t,n=(0,o.A)(t,a),{systemProps:l,otherProps:c}=(t=>{var e,n;const i={systemProps:{},otherProps:{}},o=null!=(e=null==t||null==(n=t.theme)?void 0:n.unstable_sxConfig)?e:s.A;return Object.keys(t).forEach(e=>{o[e]?i.systemProps[e]=t[e]:i.otherProps[e]=t[e]}),i})(n);let u;return u=Array.isArray(e)?[l,...e]:"function"==typeof e?(...t)=>{const n=e(...t);return(0,r.Q)(n)?(0,i.A)({},l,n):l}:(0,i.A)({},l,e),(0,i.A)({},c,{sx:u})}},3857(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>i.k,unstable_defaultSxConfig:()=>r.A});var i=n(3571),o=n(9599),r=n(4188)},3571(t,e,n){"use strict";n.d(e,{A:()=>u,k:()=>l});var i=n(3967),o=n(4620),r=n(6481),s=n(9452),a=n(4188);function l(){function t(t,e,n,o){const a={[t]:e,theme:n},l=o[t];if(!l)return{[t]:e};const{cssProperty:c=t,themeKey:u,transform:h,style:d}=l;if(null==e)return null;if("typography"===u&&"inherit"===e)return{[t]:e};const p=(0,r.Yn)(n,u)||{};return d?d(a):(0,s.NI)(a,e,e=>{let n=(0,r.BO)(p,h,e);return e===n&&"string"==typeof e&&(n=(0,r.BO)(p,h,`${t}${"default"===e?"":(0,i.A)(e)}`,e)),!1===c?n:{[c]:n}})}return function e(n){var i;const{sx:r,theme:l={},nested:c}=n||{};if(!r)return null;const u=null!=(i=l.unstable_sxConfig)?i:a.A;function h(n){let i=n;if("function"==typeof n)i=n(l);else if("object"!=typeof n)return n;if(!i)return null;const r=(0,s.EU)(l.breakpoints),a=Object.keys(r);let h=r;return Object.keys(i).forEach(n=>{const r="function"==typeof(a=i[n])?a(l):a;var a;if(null!=r)if("object"==typeof r)if(u[n])h=(0,o.A)(h,t(n,r,l,u));else{const t=(0,s.NI)({theme:l},r,t=>({[n]:t}));!function(...t){const e=t.reduce((t,e)=>t.concat(Object.keys(e)),[]),n=new Set(e);return t.every(t=>n.size===Object.keys(t).length)}(t,r)?h=(0,o.A)(h,t):h[n]=e({sx:r,theme:l,nested:!0})}else h=(0,o.A)(h,t(n,r,l,u))}),!c&&l.modularCssLayers?{"@layer sx":(0,s.vf)(a,h)}:(0,s.vf)(a,h)}return Array.isArray(r)?r.map(h):h(r)}}const c=l();c.filterProps=["sx"];const u=c},2923(t,e,n){"use strict";e.A=void 0;var i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,n&&n.set(t,i),i}(n(690)),o=n(2739);function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}e.A=function(t=null){const e=i.useContext(o.ThemeContext);return e&&(n=e,0!==Object.keys(n).length)?e:t;var n}},9071(t,e,n){"use strict";n.d(e,{A:()=>o});const i=t=>t,o=(()=>{let t=i;return{configure(e){t=e},generate:e=>t(e),reset(){t=i}}})()},3967(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(9453);function o(t){if("string"!=typeof t)throw new Error((0,i.A)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},7149(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i.A});var i=n(3967)},7535(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i});const i=function(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}},5659(t,e,n){"use strict";function i(t,e,n=void 0){const i={};return Object.keys(t).forEach(o=>{i[o]=t[o].reduce((t,i)=>{if(i){const o=e(i);""!==o&&t.push(o),n&&n[i]&&t.push(n[i])}return t},[]).join(" ")}),i}n.d(e,{A:()=>i})},1317(t,e,n){"use strict";n.d(e,{A:()=>a,Q:()=>r});var i=n(8168),o=n(690);function r(t){if("object"!=typeof t||null===t)return!1;const e=Object.getPrototypeOf(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)}function s(t){if(o.isValidElement(t)||!r(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=s(t[n])}),e}function a(t,e,n={clone:!0}){const l=n.clone?(0,i.A)({},t):t;return r(t)&&r(e)&&Object.keys(e).forEach(i=>{o.isValidElement(e[i])?l[i]=e[i]:r(e[i])&&Object.prototype.hasOwnProperty.call(t,i)&&r(t[i])?l[i]=a(t[i],e[i],n):n.clone?l[i]=r(e[i])?s(e[i]):e[i]:l[i]=e[i]}),l}},4239(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i.A,isPlainObject:()=>i.Q});var i=n(1317)},9453(t,e,n){"use strict";function i(t){let e="https://mui.com/production-error/?code="+t;for(let t=1;t<arguments.length;t+=1)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}n.d(e,{A:()=>i})},8944(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>i.A});var i=n(9453)},1609(t,e,n){"use strict";n.d(e,{Ay:()=>r});var i=n(9071);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function r(t,e,n="Mui"){const r=o[e];return r?`${n}-${r}`:`${i.A.generate(t)}-${e}`}},8413(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(1609);function o(t,e,n="Mui"){const o={};return e.forEach(e=>{o[e]=(0,i.Ay)(t,e,n)}),o}},7320(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>l,getFunctionName:()=>r});var i=n(4405);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function r(t){const e=`${t}`.match(o);return e&&e[1]||""}function s(t,e=""){return t.displayName||t.name||r(t)||e}function a(t,e,n){const i=s(e);return t.displayName||(""!==i?`${n}(${i})`:n)}function l(t){if(null!=t){if("string"==typeof t)return t;if("function"==typeof t)return s(t,"Component");if("object"==typeof t)switch(t.$$typeof){case i.vM:return a(t,t.render,"ForwardRef");case i.lD:return a(t,t.type,"memo");default:return}}}},2325(t,e,n){"use strict";function i(t){return t&&t.ownerDocument||document}n.d(e,{A:()=>i})},4877(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(2325);function o(t){return(0,i.A)(t).defaultView||window}},7379(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(8168);function o(t,e){const n=(0,i.A)({},e);return Object.keys(t).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=(0,i.A)({},t[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const s=t[r]||{},a=e[r];n[r]={},a&&Object.keys(a)?s&&Object.keys(s)?(n[r]=(0,i.A)({},a),Object.keys(s).forEach(t=>{n[r][t]=o(s[t],a[t])})):n[r]=a:n[r]=s}else void 0===n[r]&&(n[r]=t[r])}),n}},7365(t,e,n){"use strict";function i(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,{A:()=>i})},2501(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(690);function o({controlled:t,default:e,name:n,state:o="value"}){const{current:r}=i.useRef(void 0!==t),[s,a]=i.useState(e);return[r?t:s,i.useCallback(t=>{r||a(t)},[])]}},1529(t,e,n){"use strict";n.d(e,{A:()=>o});var i=n(690);const o="undefined"!=typeof window?i.useLayoutEffect:i.useEffect},1523(t,e,n){"use strict";n.d(e,{A:()=>r});var i=n(690),o=n(7365);function r(...t){return i.useMemo(()=>t.every(t=>null==t)?null:e=>{t.forEach(t=>{(0,o.A)(t,e)})},t)}},4661(t,e,n){"use strict";n.d(e,{A:()=>s});var i=n(690);let o=0;const r=i["useId".toString()];function s(t){if(void 0!==r){const e=r();return null!=t?t:e}return function(t){const[e,n]=i.useState(t),r=t||e;return i.useEffect(()=>{null==e&&(o+=1,n(`mui-${o}`))},[e]),r}(t)}},1081(t,e,n){"use strict";n.d(e,{A:()=>g});var i=n(1601),o=n.n(i),r=n(6314),s=n.n(r),a=n(4417),l=n.n(a),c=new URL(n(3982),n.b),u=new URL(n(6426),n.b),h=new URL(n(9927),n.b),d=s()(o()),p=l()(c),f=l()(u),m=l()(h);d.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${p});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${m});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const g=d},6314(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},4417(t){"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},1601(t){"use strict";t.exports=function(t){return t[1]}},3481(t,e){!function(t){"use strict";function e(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function i(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function s(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function a(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function l(){return!1}function c(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return u(t).split(/\s+/)}function d(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function p(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function m(t,e){return t.replace(f,function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var _="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function v(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function b(t){var e=+new Date,n=Math.max(0,16-(e-x));return x=e+n,window.setTimeout(t,n)}var w=window.requestAnimationFrame||v("RequestAnimationFrame")||b,A=window.cancelAnimationFrame||v("CancelAnimationFrame")||v("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function P(t,e,n){if(!n||w!==b)return w.call(window,i(t,e));t.call(e)}function k(t){t&&A.call(window,t)}var M={__proto__:null,extend:e,create:n,bind:i,get lastId(){return o},stamp:r,throttle:s,wrapNum:a,falseFn:l,formatNum:c,trim:u,splitWords:h,setOptions:d,getParamString:p,template:m,isArray:g,indexOf:y,emptyImageUrl:_,requestFn:w,cancelFn:A,requestAnimFrame:P,cancelAnimFrame:k};function C(){}C.extend=function(t){var i=function(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=i.__super__=this.prototype,r=n(o);for(var s in r.constructor=i,i.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(i[s]=this[s]);return t.statics&&e(i,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),e.apply(null,[r].concat(t.includes))),e(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?n(o.options):{},e(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},i},C.include=function(t){var n=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},C.mergeOptions=function(t){return e(this.prototype.options,t),this},C.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var I={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=h(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=h(t);for(var o=1===arguments.length,r=0,s=t.length;r<s;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var s=this._listens(t,e,n);if(!1!==s){var a=i[s];this._firingCount&&(a.fn=l,this._events[t]=i=i.slice()),i.splice(s,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,r=i.length;o<r;o++)i[o].fn=l;delete this._events[t]}},fire:function(t,n,i){if(!this.listens(t,i))return this;var o=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s],c=l.fn;l.once&&this.off(t,c,l.ctx),c.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var s in this._eventParents)if(this._eventParents[s].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=h(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};I.addEventListener=I.on,I.removeEventListener=I.clearAllEventListeners=I.off,I.addOneTimeEventListener=I.once,I.fireEvent=I.fire,I.hasEventListeners=I.listens;var T=C.extend(I);function S(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var O=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof S?t:g(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,n)}function z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function E(t,e){return!t||t instanceof z?t:new z(t,e)}function R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function N(t,e){return t instanceof R?t:new R(t,e)}function $(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function B(t,e,n){return t instanceof $?t:g(t)&&"object"!=typeof t[0]?3===t.length?new $(t[0],t[1],t[2]):2===t.length?new $(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new $(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new $(t,e,n)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=O(this.x),this.y=O(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},z.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof S||"number"==typeof t[0]||"x"in t)e=n=j(t);else if(e=(t=E(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return j((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return j(this.min.x,this.max.y)},getTopRight:function(){return j(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof S?j(t):E(t))instanceof z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=E(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=E(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return E(j(e.x-i,e.y-o),j(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=E(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},R.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof $)e=t,n=t;else{if(!(t instanceof R))return t?this.extend(B(t)||N(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new $(e.lat,e.lng),this._northEast=new $(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new R(new $(e.lat-i,e.lng-o),new $(n.lat+i,n.lng+o))},getCenter:function(){return new $((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new $(this.getNorth(),this.getWest())},getSouthEast:function(){return new $(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof $||"lat"in t?B(t):N(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=N(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=N(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},$.prototype={equals:function(t,e){return!!t&&(t=B(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return Z.distance(this,B(t))},wrap:function(){return Z.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return N([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new $(this.lat,this.lng,this.alt)}};var F,D={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?a(t.lng,this.wrapLng,!0):t.lng;return new $(this.wrapLat?a(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new R(new $(r.lat-i,r.lng-o),new $(s.lat-i,s.lng-o))}},Z=e({},D,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),H=6378137,U={R:H,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new $((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(F=H*Math.PI,new z([-F,-F],[F,F]))};function W(t,e,n,i){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function V(t,e,n,i){return new W(t,e,n,i)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new S((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var q=e({},Z,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return V(t,.5,-t,.5)}()}),G=e({},q,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?zt.svg?"z":"x":""}return l||"M0 0"}var X,Q=document.documentElement.style,J="ActiveXObject"in window,tt=J&&!document.addEventListener,et="msLaunchUri"in navigator&&!("documentMode"in document),nt=jt("webkit"),it=jt("android"),ot=jt("android 2")||jt("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=it&&jt("Google")&&rt<537&&!("AudioNode"in window),at=!!window.opera,lt=!et&&jt("chrome"),ct=jt("gecko")&&!nt&&!at&&!J,ut=!lt&&jt("safari"),ht=jt("phantom"),dt="OTransition"in Q,pt=0===navigator.platform.indexOf("Win"),ft=J&&"transition"in Q,mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ot,gt="MozPerspective"in Q,yt=!window.L_DISABLE_3D&&(ft||mt||gt)&&!dt&&!ht,_t="undefined"!=typeof orientation||jt("mobile"),vt=_t&&nt,xt=_t&&mt,bt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!bt),At="ontouchstart"in window||!!window.TouchEvent,Pt=!window.L_NO_TOUCH&&(At||wt),kt=_t&&at,Mt=_t&&ct,Ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,It=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(t){}return t}(),Tt=!!document.createElement("canvas").getContext,Lt=!(!document.createElementNS||!K("svg").createSVGRect),St=!!Lt&&((X=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(X.firstChild&&X.firstChild.namespaceURI)),Ot=!Lt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function jt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt={ie:J,ielt9:tt,edge:et,webkit:nt,android:it,android23:ot,androidStock:st,opera:at,chrome:lt,gecko:ct,safari:ut,phantom:ht,opera12:dt,win:pt,ie3d:ft,webkit3d:mt,gecko3d:gt,any3d:yt,mobile:_t,mobileWebkit:vt,mobileWebkit3d:xt,msPointer:bt,pointer:wt,touch:Pt,touchNative:At,mobileOpera:kt,mobileGecko:Mt,retina:Ct,passiveEvents:It,canvas:Tt,svg:Lt,vml:Ot,inlineSvg:St,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Et=zt.msPointer?"MSPointerDown":"pointerdown",Rt=zt.msPointer?"MSPointerMove":"pointermove",Nt=zt.msPointer?"MSPointerUp":"pointerup",$t=zt.msPointer?"MSPointerCancel":"pointercancel",Bt={touchstart:Et,touchmove:Rt,touchend:Nt,touchcancel:$t},Ft={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ne(e),qt(t,e)},touchmove:qt,touchend:qt,touchcancel:qt},Dt={},Zt=!1;function Ht(t,e,n){return"touchstart"===e&&(Zt||(document.addEventListener(Et,Ut,!0),document.addEventListener(Rt,Wt,!0),document.addEventListener(Nt,Vt,!0),document.addEventListener($t,Vt,!0),Zt=!0)),Ft[e]?(n=Ft[e].bind(this,n),t.addEventListener(Bt[e],n,!1),n):(console.warn("wrong event specified:",e),l)}function Ut(t){Dt[t.pointerId]=t}function Wt(t){Dt[t.pointerId]&&(Dt[t.pointerId]=t)}function Vt(t){delete Dt[t.pointerId]}function qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Dt)e.touches.push(Dt[n]);e.changedTouches=[e],t(e)}}var Gt,Kt,Yt,Xt,Qt,Jt=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function ie(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function oe(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function re(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ce(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=pe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ue(t,e){if(void 0!==t.classList)for(var n=h(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!ce(t,e)){var r=pe(t);de(t,(r?r+" ":"")+e)}}function he(t,e){void 0!==t.classList?t.classList.remove(e):de(t,u((" "+pe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function pe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function fe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function ge(t,e,n){var i=e||new S(0,0);t.style[Jt]=(zt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function ye(t,e){t._leaflet_pos=e,zt.any3d?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function _e(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Gt=function(){Ce(window,"selectstart",Ne)},Kt=function(){Te(window,"selectstart",Ne)};else{var ve=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Gt=function(){if(ve){var t=document.documentElement.style;Yt=t[ve],t[ve]="none"}},Kt=function(){ve&&(document.documentElement.style[ve]=Yt,Yt=void 0)}}function xe(){Ce(window,"dragstart",Ne)}function be(){Te(window,"dragstart",Ne)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ae(),Xt=t,Qt=t.style.outlineStyle,t.style.outlineStyle="none",Ce(window,"keydown",Ae))}function Ae(){Xt&&(Xt.style.outlineStyle=Qt,Xt=void 0,Qt=void 0,Te(window,"keydown",Ae))}function Pe(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ke(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Me={__proto__:null,TRANSFORM:Jt,TRANSITION:te,TRANSITION_END:ee,get:ne,getStyle:ie,create:oe,remove:re,empty:se,toFront:ae,toBack:le,hasClass:ce,addClass:ue,removeClass:he,setClass:de,getClass:pe,setOpacity:fe,testProp:me,setTransform:ge,setPosition:ye,getPosition:_e,get disableTextSelection(){return Gt},get enableTextSelection(){return Kt},disableImageDrag:xe,enableImageDrag:be,preventOutline:we,restoreOutline:Ae,getSizedParentNode:Pe,getScale:ke};function Ce(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)Oe(t,o,e[o],n);else for(var r=0,s=(e=h(e)).length;r<s;r++)Oe(t,e[r],n,i);return this}var Ie="_leaflet_events";function Te(t,e,n,i){if(1===arguments.length)Le(t),delete t[Ie];else if(e&&"object"==typeof e)for(var o in e)je(t,o,e[o],n);else if(e=h(e),2===arguments.length)Le(t,function(t){return-1!==y(e,t)});else for(var r=0,s=e.length;r<s;r++)je(t,e[r],n,i);return this}function Le(t,e){for(var n in t[Ie]){var i=n.split(/\d/)[0];e&&!e(i)||je(t,i,null,null,n)}}var Se={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Oe(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[Ie]&&t[Ie][o])return this;var s=function(e){return n.call(i||t,e||window.event)},a=s;!zt.touchNative&&zt.pointer&&0===e.indexOf("touch")?s=Ht(t,e,s):zt.touch&&"dblclick"===e?s=function(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Be(t);if(!o.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||o.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var r=Date.now();r-i<=200?2===++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Se[e]||e,s,!!zt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,He(t,e)&&a(e)},t.addEventListener(Se[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[Ie]=t[Ie]||{},t[Ie][o]=s}function je(t,e,n,i,o){o=o||e+r(n)+(i?"_"+r(i):"");var s=t[Ie]&&t[Ie][o];if(!s)return this;!zt.touchNative&&zt.pointer&&0===e.indexOf("touch")?function(t,e,n){Bt[e]?t.removeEventListener(Bt[e],n,!1):console.warn("wrong event specified:",e)}(t,e,s):zt.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,s):"removeEventListener"in t?t.removeEventListener(Se[e]||e,s,!1):t.detachEvent("on"+e,s),t[Ie][o]=null}function ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ee(t){return Oe(t,"wheel",ze),this}function Re(t){return Ce(t,"mousedown touchstart dblclick contextmenu",ze),t._leaflet_disable_click=!0,this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $e(t){return Ne(t),ze(t),this}function Be(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Fe(t,e){if(!e)return new S(t.clientX,t.clientY);var n=ke(e),i=n.boundingClientRect;return new S((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var De=zt.linux&&zt.chrome?window.devicePixelRatio:zt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Ze(t){return zt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/De:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function He(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Ue={__proto__:null,on:Ce,off:Te,stopPropagation:ze,disableScrollPropagation:Ee,disableClickPropagation:Re,preventDefault:Ne,stop:$e,getPropagationPath:Be,getMousePosition:Fe,getWheelDelta:Ze,isExternalTarget:He,addListener:Ce,removeListener:Te},We=T.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=_e(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=P(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ye(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ve=T.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(B(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=te&&zt.any3d&&!zt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ce(this._proxy,ee,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,i){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(B(t),n,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=e({animate:i.animate},i.zoom),i.pan=e({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof S?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=j(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new We,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ue(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!zt.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=B(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),c=o.distanceTo(i)||1,u=1.42,h=2.0164;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*c*c)/(2*(t?l:a)*h*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);function g(t){return a*(f(m)*(p(e=m+u*t)/f(e))-p(m))/h;var e}var y=Date.now(),_=(d(1)-m)/u,v=n.duration?1e3*n.duration:1e3*_*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-y)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*_;r<=1?(this._flyToFrame=P(n,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(g(l)/c)),s),this.getScaleZoom(a/function(t){return a*(f(m)/f(m+u*t))}(l),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=N(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,N(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=E([s.min.add(n),s.max.subtract(i)]),l=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;var c=r.subtract(a.getCenter()),u=a.extend(r).getSize().subtract(l);o.x+=c.x<0?-u.x:u.x,o.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=n.divideBy(2).round(),s=o.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),o=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new $(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),re(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)re(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=N(t),n=j(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=E(this.project(a,i),this.project(s,i)).getSize(),u=zt.any3d?this.options.zoomSnap:1,h=l.x/c.x,d=l.y/c.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(B(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(B(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(B(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,e){return this.options.crs.distance(B(t),B(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(B(t)))},mouseEventToContainerPoint:function(t){return Fe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ce(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&zt.any3d,ue(t,"leaflet-container"+(zt.touch?" leaflet-touch":"")+(zt.retina?" leaflet-retina":"")+(zt.ielt9?" leaflet-oldie":"")+(zt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ie(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ue(t.markerPane,"leaflet-zoom-hide"),ue(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){ye(this._mapPane,new S(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[r(this._container)]=this;var e=t?Te:Ce;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),zt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=P(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((n=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!He(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||a||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&we(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){if("click"===t.type){var o=e({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var r=this._findEventTargets(t,n);if(i){for(var s=[],a=0;a<i.length;a++)i[a].listens(n,!0)&&s.push(i[a]);r=s.concat(r)}if(r.length){"contextmenu"===n&&Ne(t);var l=r[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<r.length;a++)if(r[a].fire(n,c,!0),c.originalEvent._stopped||!1===r[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return _e(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return E([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=E(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new S(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=zt.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){he(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Jt,n=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){re(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(P(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ue(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&he(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});var qe=C.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return ue(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(re(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ge=function(t){return new qe(t)};Ve.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=oe("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=oe("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)re(this._controlCorners[t]);re(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ke=qe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return qe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ue(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ue(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):he(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return he(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=oe("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Re(e),Ee(e);var i=this._section=oe("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Ce(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=oe("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Ce(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ne(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=oe("div",t+"-base",i),this._separator=oe("div",t+"-separator",i),this._overlaysList=oe("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Ce(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ce(t,"click",Ne),this.expand();var e=this;setTimeout(function(){Te(t,"click",Ne),e._preventClick=!1})}}),Ye=qe.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=oe("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=oe("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Re(r),Ce(r,"click",$e),Ce(r,"click",o,this),Ce(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";he(this._zoomInButton,e),he(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ue(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ue(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ve.mergeOptions({zoomControl:!0}),Ve.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ye,this.addControl(this.zoomControl))});var Xe=qe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=oe("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=oe("div",e,n)),t.imperial&&(this._iScale=oe("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),Qe=qe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(zt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),Re(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});Ve.mergeOptions({attributionControl:!0}),Ve.addInitHook(function(){this.options.attributionControl&&(new Qe).addTo(this)});qe.Layers=Ke,qe.Zoom=Ye,qe.Scale=Xe,qe.Attribution=Qe,Ge.layers=function(t,e,n){return new Ke(t,e,n)},Ge.zoom=function(t){return new Ye(t)},Ge.scale=function(t){return new Xe(t)},Ge.attribution=function(t){return new Qe(t)};var Je=C.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Je.addTo=function(t,e){return t.addHandler(e,this),this};var tn={Events:I},en=zt.touch?"touchstart mousedown":"mousedown",nn=T.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Ce(this._dragStartTarget,en,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),Te(this._dragStartTarget,en,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ce(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)nn._dragging===this&&this.finishDrag();else if(!(nn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(nn._dragging=this,this._preventOutline&&we(this._element),xe(),Gt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Pe(this._element);this._startPoint=new S(e.clientX,e.clientY),this._startPos=_e(this._element),this._parentScale=ke(n);var i="mousedown"===t.type;Ce(document,i?"mousemove":"touchmove",this._onMove,this),Ce(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new S(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,ue(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ue(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){he(document.body,"leaflet-dragging"),this._lastTarget&&(he(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Te(document,"mousemove touchmove",this._onMove,this),Te(document,"mouseup touchend touchcancel",this._onUp,this),be(),Kt();var e=this._moved&&this._moving;this._moving=!1,nn._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function on(t,e,n){var i,o,r,s,a,l,c,u,h,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=fn(t[o],e);for(s=0;s<4;s++){for(u=d[s],i=[],o=0,r=(c=t.length)-1;o<c;r=o++)a=t[o],l=t[r],a._code&u?l._code&u||((h=pn(l,a,u,e,n))._code=fn(h,e),i.push(h)):(l._code&u&&((h=pn(l,a,u,e,n))._code=fn(h,e),i.push(h)),i.push(a));t=i}return t}function rn(t,e){var n,i,o,r,s,a,l,c,u;if(!t||0===t.length)throw new Error("latlngs not passed");yn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=B([0,0]),d=N(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=sn(t));var p=t.length,f=[];for(n=0;n<p;n++){var m=B(t[n]);f.push(e.project(B([m.lat-h.lat,m.lng-h.lng])))}for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=f[n],r=f[i],s=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*s,c+=(o.y+r.y)*s,a+=3*s;u=0===a?f[0]:[l/a,c/a];var g=e.unproject(j(u));return B([g.lat+h.lat,g.lng+h.lng])}function sn(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=B(t[o]);e+=r.lat,n+=r.lng,i++}return B([e/i,n/i])}var an,ln={__proto__:null,clipPolygon:on,polygonCenter:rn,centroid:sn};function cn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,hn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}(t=function(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)mn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}(t,n),n)}function un(t,e,n){return Math.sqrt(gn(t,e,n,!0))}function hn(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=gn(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,hn(t,e,n,i,r),hn(t,e,n,r,o))}function dn(t,e,n,i,o){var r,s,a,l=i?an:fn(t,n),c=fn(e,n);for(an=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=fn(s=pn(t,e,r=l||c,n,o),n),r===l?(t=s,l=a):(e=s,c=a)}}function pn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,c=i.min,u=i.max;return 8&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):4&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):2&n?(r=u.x,s=t.y+l*(u.x-t.x)/a):1&n&&(r=c.x,s=t.y+l*(c.x-t.x)/a),new S(r,s,o)}function fn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function mn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function gn(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,c=a*a+l*l;return c>0&&((o=((t.x-r)*a+(t.y-s)*l)/c)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new S(r,s)}function yn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _n(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),yn(t)}function vn(t,e){var n,i,o,r,s,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");yn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=B([0,0]),h=N(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(u=sn(t));var d=t.length,p=[];for(n=0;n<d;n++){var f=B(t[n]);p.push(e.project(B([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<d-1;n++)i+=p[n].distanceTo(p[n+1])/2;if(0===i)c=p[0];else for(n=0,r=0;n<d-1;n++)if(s=p[n],a=p[n+1],(r+=o=s.distanceTo(a))>i){l=(r-i)/o,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var m=e.unproject(j(c));return B([m.lat+u.lat,m.lng+u.lng])}var xn={__proto__:null,simplify:cn,pointToSegmentDistance:un,closestPointOnSegment:function(t,e,n){return gn(t,e,n)},clipSegment:dn,_getEdgeIntersection:pn,_getBitCode:fn,_sqClosestPointOnSegment:gn,isFlat:yn,_flat:_n,polylineCenter:vn},bn={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new $(t.y,t.x)},bounds:new z([-180,-90],[180,90])},wn={R:6378137,R_MINOR:6356752.314245179,bounds:new z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new S(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=c=Math.PI/2-2*Math.atan(s*e)-a;return new $(a*n,t.x*n/i)}},An={__proto__:null,LonLat:bn,Mercator:wn,SphericalMercator:U},Pn=e({},Z,{code:"EPSG:3395",projection:wn,transformation:function(){var t=.5/(Math.PI*wn.R);return V(t,.5,-t,.5)}()}),kn=e({},Z,{code:"EPSG:4326",projection:bn,transformation:V(1/180,1,-1/180,.5)}),Mn=e({},D,{projection:bn,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});D.Earth=Z,D.EPSG3395=Pn,D.EPSG3857=q,D.EPSG900913=G,D.EPSG4326=kn,D.Simple=Mn;var Cn=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ve.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var In=Cn.extend({initialize:function(t,e){var n,i;if(d(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),Tn=In.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),In.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),In.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new R;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Ln=C.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=j(i),r=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return zt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var Sn=Ln.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof Sn.imagePath&&(Sn.imagePath=this._detectIconPath()),(this.options.imagePath||Sn.imagePath)+Ln.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=oe("div","leaflet-default-icon-path",document.body),e=ie(t,"background-image")||ie(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),On=Je.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new nn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ue(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&he(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=_e(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=E(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var c=j((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=P(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=P(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=_e(e._icon),o=e._map.layerPointToLatLng(i);n&&ye(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),jn=Cn.extend({options:{icon:new Sn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=B(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=B(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ue(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ce(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ue(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Te(this._icon,"focus",this._panOnFocus,this),re(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&re(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ue(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),On)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new On(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&fe(this._icon,t),this._shadow&&fe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?j(e.iconSize):j(0,0),i=e.iconAnchor?j(e.iconAnchor):j(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var zn=Cn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),En=zn.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=B(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=B(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return zn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var Rn=En.extend({initialize:function(t,n,i){if("number"==typeof n&&(n=e({},i,{radius:n})),d(this,n),this._latlng=B(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:zn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===Z.distance){var o=Math.PI/180,r=this._mRadius/Z.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,t-u]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});var Nn=zn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=gn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],c=1,u=l.length;c<u;c++){var h=r(t,e=l[c-1],n=l[c],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return vn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=B(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return yn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=yn(t),i=0,o=t.length;i<o;i++)n?(e[i]=B(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._rawPxBounds&&(this._pxBounds=new z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof $,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=dn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=cn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&un(t,a[o],a[i])<=l)return!0;return!1}});Nn._flat=_n;var $n=Nn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return rn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Nn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof $&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Nn.prototype._setLatLngs.call(this,t),yn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return yn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new S(e,e);if(t=new z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=on(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||Nn.prototype._containsPoint.call(this,t,!0)}});var Bn=Tn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=Fn(t,r);return s?(s.feature=qn(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Fn(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],c=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Zn;if(!a&&!s)return null;switch(s.type){case"Point":return Dn(c,t,n=u(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=u(a[o]),l.push(Dn(c,t,n,e));return new Tn(l);case"LineString":case"MultiLineString":return i=Hn(a,"LineString"===s.type?0:1,u),new Nn(i,e);case"Polygon":case"MultiPolygon":return i=Hn(a,"Polygon"===s.type?1:2,u),new $n(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=Fn({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Tn(l);case"FeatureCollection":for(o=0,r=s.features.length;o<r;o++){var d=Fn(s.features[o],e);d&&l.push(d)}return new Tn(l);default:throw new Error("Invalid GeoJSON object.")}}function Dn(t,e,n,i){return t?t(e,n):new jn(n,i&&i.markersInheritOptions&&i)}function Zn(t){return new $(t[1],t[0],t[2])}function Hn(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?Hn(t[r],e-1,n):(n||Zn)(t[r]),o.push(i);return o}function Un(t,e){return void 0!==(t=B(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Wn(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?Wn(t[r],yn(t[r])?0:e-1,n,i):Un(t[r],i));return!e&&n&&o.length>0&&o.push(o[0].slice()),o}function Vn(t,n){return t.feature?e({},t.feature,{geometry:n}):qn(n)}function qn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Gn={toGeoJSON:function(t){return Vn(this,{type:"Point",coordinates:Un(this.getLatLng(),t)})}};function Kn(t,e){return new Bn(t,e)}jn.include(Gn),Rn.include(Gn),En.include(Gn),Nn.include({toGeoJSON:function(t){var e=!yn(this._latlngs);return Vn(this,{type:(e?"Multi":"")+"LineString",coordinates:Wn(this._latlngs,e?1:0,!1,t)})}}),$n.include({toGeoJSON:function(t){var e=!yn(this._latlngs),n=e&&!yn(this._latlngs[0]),i=Wn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Vn(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),In.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Vn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=qn(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}}),n?Vn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Yn=Kn,Xn=Cn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=N(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ue(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){re(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ae(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:oe("img");ue(e,"leaflet-image-layer"),this._zoomAnimated&&ue(e,"leaflet-zoom-animated"),this.options.className&&ue(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,n,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ye(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){fe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Qn=Xn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(ue(e,"leaflet-image-layer"),this._zoomAnimated&&ue(e,"leaflet-zoom-animated"),this.options.className&&ue(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),o=[],r=0;r<n.length;r++)o.push(n[r].src);this._url=n.length>0?o:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=oe("source");a.src=this._url[s],e.appendChild(a)}}}});var Jn=Xn.extend({_initImage:function(){var t=this._image=this._url;ue(t,"leaflet-image-layer"),this._zoomAnimated&&ue(t,"leaflet-zoom-animated"),this.options.className&&ue(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});var ti=Cn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof $||g(t))?(this._latlng=B(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&fe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&fe(this._container,1),this.bringToFront(),this.options.interactive&&(ue(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(fe(this._container,0),this._removeTimeout=setTimeout(i(re,void 0,this._container),200)):re(this._container),this.options.interactive&&(he(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=B(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ae(this._container),this},bringToBack:function(){return this._map&&le(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Tn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=j(this.options.offset),n=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});Ve.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Cn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(d(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var ei=ti.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,ti.prototype.openOn.call(this,t)},onAdd:function(t){ti.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zn||this._source.on("preclick",ze))},onRemove:function(t){ti.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zn||this._source.off("preclick",ze))},getEvents:function(){var t=ti.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=oe("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=oe("div",t+"-content-wrapper",e);if(this._contentNode=oe("div",t+"-content",n),Re(e),Ee(this._contentNode),Ce(e,"contextmenu",ze),this._tipContainer=oe("div",t+"-tip-container",e),this._tip=oe("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=oe("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Ce(i,"click",function(t){Ne(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",ue(t,r)):he(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ye(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(ie(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new S(this._containerLeft,-n-this._containerBottom);o._add(_e(this._container));var r=t.layerPointToContainerPoint(o),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),c=t.getSize(),u=0,h=0;r.x+i+l.x>c.x&&(u=r.x+i-c.x+l.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+l.y>c.y&&(h=r.y+n-c.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(u||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,h]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ve.mergeOptions({closePopupOnClick:!0}),Ve.include({openPopup:function(t,e,n){return this._initOverlay(ei,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Cn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ei,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Tn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){$e(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof zn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ni=ti.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){ti.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){ti.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=ti.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,u=j(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):s.x<r.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(u.x+h.x),n=c/2),t=t.subtract(j(e,n,!0)).add(u).add(h),he(o,"leaflet-tooltip-right"),he(o,"leaflet-tooltip-left"),he(o,"leaflet-tooltip-top"),he(o,"leaflet-tooltip-bottom"),ue(o,"leaflet-tooltip-"+a),ye(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&fe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ve.include({openTooltip:function(t,e,n){return this._initOverlay(ni,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Cn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ni,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Tn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Ce(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Ce(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var ii=Ln.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(se(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=j(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ln.Default=Sn;var oi=Cn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:zt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),re(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!zt.ielt9){fe(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);fe(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=oe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(re(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)re(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new S(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new S(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();zt.any3d?ge(t.el,o,i):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new z(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new S(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new S(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new R(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new S(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(re(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ue(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,zt.ielt9&&this.options.opacity<1&&fe(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&P(i(this._tileReady,this,t,null,r)),ye(r,n),this._tiles[o]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(fe(n.el,0),k(this._fadeFrame),this._fadeFrame=P(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ue(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),zt.ielt9||!this._map._fadeAnimated?P(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var ri=oi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&zt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ce(n,"load",i(this._tileOnLoad,this,e,n)),Ce(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n={r:zt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=i),n["-y"]=i}return m(this._url,e(n,this.options))},_tileOnLoad:function(t,e){zt.ielt9?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=_;var n=this._tiles[t].coords;re(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",_),oi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==_))return oi.prototype._tileReady.call(this,t,e,n)}});function si(t,e){return new ri(t,e)}var ai=ri.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var i=e({},this.defaultWmsParams);for(var o in n)o in this.options||(i[o]=n[o]);var r=(n=d(this,n)).detectRetina&&zt.retina?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,ri.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=E(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===kn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=ri.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});ri.WMS=ai,si.wms=function(t,e){return new ai(t,e)};var li=Cn.extend({options:{padding:.1},initialize:function(t){d(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ue(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));zt.any3d?ge(this._container,r,n):ye(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ci=li.extend({options:{tolerance:0},getEvents:function(){var t=li.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){li.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ce(t,"mousemove",this._onMouseMove,this),Ce(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ce(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,re(this._container),Te(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){li.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=zt.retina?2:1;ye(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",zt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){li.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||P(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(he(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,o,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(o=n);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(ue(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(i(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ui(t){return zt.canvas?new ci(t):null}var hi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),di={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(li.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hi("shape");ue(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;re(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=hi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=hi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ae(t._container)},_bringToBack:function(t){le(t._container)}},pi=zt.vml?hi:K,fi=li.extend({_initContainer:function(){this._container=pi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){re(this._container),Te(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){li.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ye(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=pi("path");t.options.className&&ue(e,t.options.className),t.options.interactive&&ue(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){re(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Y(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ae(t._path)},_bringToBack:function(t){le(t._path)}});function mi(t){return zt.svg||zt.vml?new fi(t):null}zt.vml&&fi.include(di),Ve.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ui(t)||mi(t)}});var gi=$n.extend({initialize:function(t,e){$n.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fi.create=pi,fi.pointsToPath=Y,Bn.geometryToLayer=Fn,Bn.coordsToLatLng=Zn,Bn.coordsToLatLngs=Hn,Bn.latLngToCoords=Un,Bn.latLngsToCoords=Wn,Bn.getFeature=Vn,Bn.asFeature=qn,Ve.mergeOptions({boxZoom:!0});var yi=Je.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ce(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){re(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),xe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ce(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),ue(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),n=e.getSize();ye(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(re(this._box),he(this._container,"leaflet-crosshair")),Kt(),be(),Te(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ve.addInitHook("addHandler","boxZoom",yi),Ve.mergeOptions({doubleClickZoom:!0});var _i=Je.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Ve.addInitHook("addHandler","doubleClickZoom",_i),Ve.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var vi=Je.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new nn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ue(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){he(this._map._container,"leaflet-grab"),he(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=N(this._map.options.maxBounds);this._offsetLimit=E(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=a.multiplyBy(c/l),h=c/(n.inertiaDeceleration*s),d=u.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),P(function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Ve.addInitHook("addHandler","dragging",vi),Ve.mergeOptions({keyboard:!0,keyboardPanDelta:80});var xi=Je.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ce(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Te(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Ce(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Te(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=j(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(j(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}$e(t)}}});Ve.addInitHook("addHandler","keyboard",xi),Ve.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var bi=Je.extend({addHooks:function(){Ce(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Te(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ze(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),o),$e(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});Ve.addInitHook("addHandler","scrollWheelZoom",bi);Ve.mergeOptions({tapHold:zt.touchNative&&zt.safari&&zt.mobile,tapTolerance:15});var wi=Je.extend({addHooks:function(){Ce(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new S(e.clientX,e.clientY),this._holdTimeout=setTimeout(i(function(){this._cancel(),this._isTapValid()&&(Ce(document,"touchend",Ne),Ce(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),Ce(document,"touchend touchcancel contextmenu",this._cancel,this),Ce(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Te(document,"touchend",Ne),Te(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Te(document,"touchend touchcancel contextmenu",this._cancel,this),Te(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});Ve.addInitHook("addHandler","tapHold",wi),Ve.mergeOptions({touchZoom:zt.touch,bounceAtZoomLimits:!0});var Ai=Je.extend({addHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),Ce(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){he(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ce(document,"touchmove",this._onTouchMove,this),Ce(document,"touchend touchcancel",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=P(a,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ve.addInitHook("addHandler","touchZoom",Ai),Ve.BoxZoom=yi,Ve.DoubleClickZoom=_i,Ve.Drag=vi,Ve.Keyboard=xi,Ve.ScrollWheelZoom=bi,Ve.TapHold=wi,Ve.TouchZoom=Ai,t.Bounds=z,t.Browser=zt,t.CRS=D,t.Canvas=ci,t.Circle=Rn,t.CircleMarker=En,t.Class=C,t.Control=qe,t.DivIcon=ii,t.DivOverlay=ti,t.DomEvent=Ue,t.DomUtil=Me,t.Draggable=nn,t.Evented=T,t.FeatureGroup=Tn,t.GeoJSON=Bn,t.GridLayer=oi,t.Handler=Je,t.Icon=Ln,t.ImageOverlay=Xn,t.LatLng=$,t.LatLngBounds=R,t.Layer=Cn,t.LayerGroup=In,t.LineUtil=xn,t.Map=Ve,t.Marker=jn,t.Mixin=tn,t.Path=zn,t.Point=S,t.PolyUtil=ln,t.Polygon=$n,t.Polyline=Nn,t.Popup=ei,t.PosAnimation=We,t.Projection=An,t.Rectangle=gi,t.Renderer=li,t.SVG=fi,t.SVGOverlay=Jn,t.TileLayer=ri,t.Tooltip=ni,t.Transformation=W,t.Util=M,t.VideoOverlay=Qn,t.bind=i,t.bounds=E,t.canvas=ui,t.circle=function(t,e,n){return new Rn(t,e,n)},t.circleMarker=function(t,e){return new En(t,e)},t.control=Ge,t.divIcon=function(t){return new ii(t)},t.extend=e,t.featureGroup=function(t,e){return new Tn(t,e)},t.geoJSON=Kn,t.geoJson=Yn,t.gridLayer=function(t){return new oi(t)},t.icon=function(t){return new Ln(t)},t.imageOverlay=function(t,e,n){return new Xn(t,e,n)},t.latLng=B,t.latLngBounds=N,t.layerGroup=function(t,e){return new In(t,e)},t.map=function(t,e){return new Ve(t,e)},t.marker=function(t,e){return new jn(t,e)},t.point=j,t.polygon=function(t,e){return new $n(t,e)},t.polyline=function(t,e){return new Nn(t,e)},t.popup=function(t,e){return new ei(t,e)},t.rectangle=function(t,e){return new gi(t,e)},t.setOptions=d,t.stamp=r,t.svg=mi,t.svgOverlay=function(t,e,n){return new Jn(t,e,n)},t.tileLayer=si,t.tooltip=function(t,e){return new ni(t,e)},t.transformation=V,t.version="1.9.4",t.videoOverlay=function(t,e,n){return new Qn(t,e,n)};var Pi=window.L;t.noConflict=function(){return window.L=Pi,this},window.L=t}(e)},4405(t,e){"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.consumer"),Symbol.for("react.context");var n=Symbol.for("react.forward_ref"),i=(Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"));Symbol.for("react.lazy"),Symbol.for("react.view_transition"),Symbol.for("react.client.reference");e.vM=n,e.lD=i},1020(t,e,n){"use strict";var i=n(690),o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,r={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,i)&&!l.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===r[i]&&(r[i]=e[i]);return{$$typeof:o,type:t,key:c,ref:u,props:r,_owner:a.current}}e.Fragment=r,e.jsx=c,e.jsxs=c},4848(t,e,n){"use strict";t.exports=n(1020)},5072(t){"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var r={},s=[],a=0;a<t.length;a++){var l=t[a],c=i.base?l[0]+i.base:l[0],u=r[c]||0,h="".concat(c," ").concat(u);r[c]=u+1;var d=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=o(p,i);i.byIndex=a,e.splice(a,0,{identifier:h,updater:f,references:1})}s.push(h)}return s}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var r=i(t=t||[],o=o||{});return function(t){t=t||[];for(var s=0;s<r.length;s++){var a=n(r[s]);e[a].references--}for(var l=i(t,o),c=0;c<r.length;c++){var u=n(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},7659(t){"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},540(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},5056(t,e,n){"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},7825(t){"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},1113(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},6426(t,e,n){"use strict";t.exports=n.p+"8f2c4d11474275fbc161.png"},3982(t,e,n){"use strict";t.exports=n.p+"416d91365b44e4b4f477.png"},9927(t,e,n){"use strict";t.exports=n.p+"2b3e1faf89f94a483539.png"},476(t){"use strict";t.exports=n},4774(t){"use strict";t.exports=i},674(t){"use strict";t.exports=e},1054(t){"use strict";t.exports=r},1386(t){"use strict";t.exports=s},690(e){"use strict";e.exports=t},1658(t){"use strict";t.exports=o},4634(t){function e(){return t.exports=e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,e.apply(null,arguments)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4994(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},4893(t){t.exports=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n},t.exports.__esModule=!0,t.exports.default=t.exports},8168(t,e,n){"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},i.apply(null,arguments)}n.d(e,{A:()=>i})},8587(t,e,n){"use strict";function i(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}n.d(e,{A:()=>i})},4164(t,e,n){"use strict";function i(t){var e,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=i(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}n.d(e,{A:()=>o});const o=function(){for(var t,e,n=0,o="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=i(t))&&(o&&(o+=" "),o+=e);return o}}},l={};function c(t){var e=l[t];if(void 0!==e)return e.exports;var n=l[t]={id:t,exports:{}};return a[t].call(n.exports,n,n.exports,c),n.exports}c.m=a,c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t})(),c.b="undefined"!=typeof document&&document.baseURI||self.location.href,c.nc=void 0;var u={};return(()=>{"use strict";c.r(u),c.d(u,{ActivityFeed:()=>cy,AreaChart:()=>Qy,BarChart:()=>fg,Button:()=>o,DEFAULT_CHART_MARGIN:()=>tm,DataTable:()=>hy,DonutChart:()=>Jg,GeoPoints:()=>Xy,KpiStatsCard:()=>iy,LineChart:()=>rm,ScatterChart:()=>Fm,compactNumber:()=>im,formatRelativeTime:()=>ly,resolveMargin:()=>em});var t=c(690),e=c.n(t),n=c(674),i=c(4848);const o=({children:t,loading:e=!1,disabled:o,variant:r="contained",startIcon:s,...a})=>(0,i.jsx)(n.Button,{variant:r,disabled:o||e,startIcon:e?(0,i.jsx)(n.CircularProgress,{size:16,color:"inherit"}):s,...a,children:t});var r=c(8168),s=c(7379),a=c(8749),l=c(476);const h=(0,a.A)(),d=function(e=h){return function(e=null){const n=t.useContext(l.ThemeContext);return n&&(i=n,0!==Object.keys(i).length)?n:e;var i}(e)};var p=c(2765),f=c(8312);function m({props:t,name:e}){return function({props:t,name:e,defaultTheme:n,themeId:i}){let o=d(n);i&&(o=o[i]||o);const r=function(t){const{theme:e,name:n,props:i}=t;return e&&e.components&&e.components[n]&&e.components[n].defaultProps?(0,s.A)(e.components[n].defaultProps,i):i}({theme:o,name:e,props:t});return r}({props:t,name:e,defaultTheme:p.A,themeId:f.A})}var g=c(8587);function y(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function _(t){return function(){return t}}function v(t){this._context=t}function x(t){return new v(t)}Object.defineProperty(y,"name",{value:"default",configurable:!0}),Array.prototype.slice,Object.defineProperty(_,"name",{value:"default",configurable:!0}),Object.defineProperty(x,"name",{value:"default",configurable:!0}),v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};const b=Math.PI,w=2*b,A=1e-6,P=w-A;function k(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class M{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?k:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return k;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,o,r){this._append`C${+t},${+e},${+n},${+i},${this._x1=+o},${this._y1=+r}`}arcTo(t,e,n,i,o){if(t=+t,e=+e,n=+n,i=+i,(o=+o)<0)throw new Error(`negative radius: ${o}`);let r=this._x1,s=this._y1,a=n-t,l=i-e,c=r-t,u=s-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>A)if(Math.abs(u*a-l*c)>A&&o){let d=n-r,p=i-s,f=a*a+l*l,m=d*d+p*p,g=Math.sqrt(f),y=Math.sqrt(h),_=o*Math.tan((b-Math.acos((f+h-m)/(2*g*y)))/2),v=_/y,x=_/g;Math.abs(v-1)>A&&this._append`L${t+v*c},${e+v*u}`,this._append`A${o},${o},0,0,${+(u*d>c*p)},${this._x1=t+x*a},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,i,o,r){if(t=+t,e=+e,r=!!r,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^r,h=r?i-o:o-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>A||Math.abs(this._y1-c)>A)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%w+w),h>P?this._append`A${n},${n},0,1,${u},${t-s},${e-a}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>A&&this._append`A${n},${n},0,${+(h>=b)},${u},${this._x1=t+n*Math.cos(o)},${this._y1=e+n*Math.sin(o)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function C(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new M(e)}function I(t){return t[0]}function T(t){return t[1]}function L(t,e){var n=_(!0),i=null,o=x,r=null,s=C(a);function a(a){var l,c,u,h=(a=y(a)).length,d=!1;for(null==i&&(r=o(u=s())),l=0;l<=h;++l)!(l<h&&n(c=a[l],l,a))===d&&((d=!d)?r.lineStart():r.lineEnd()),d&&r.point(+t(c,l,a),+e(c,l,a));if(u)return r=null,u+""||null}return t="function"==typeof t?t:void 0===t?I:_(t),e="function"==typeof e?e:void 0===e?T:_(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:_(!!t),a):n},a.curve=function(t){return arguments.length?(o=t,null!=i&&(r=o(i)),a):o},a.context=function(t){return arguments.length?(null==t?i=r=null:r=o(i=t),a):i},a}function S(t,e,n){var i=null,o=_(!0),r=null,s=x,a=null,l=C(c);function c(c){var u,h,d,p,f,m=(c=y(c)).length,g=!1,_=new Array(m),v=new Array(m);for(null==r&&(a=s(f=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===g)if(g=!g)h=u,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=u-1;d>=h;--d)a.point(_[d],v[d]);a.lineEnd(),a.areaEnd()}g&&(_[u]=+t(p,u,c),v[u]=+e(p,u,c),a.point(i?+i(p,u,c):_[u],n?+n(p,u,c):v[u]))}if(f)return a=null,f+""||null}function u(){return L().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?I:_(+t),e="function"==typeof e?e:_(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?T:_(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:_(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:_(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(o="function"==typeof t?t:_(!!t),c):o},c.curve=function(t){return arguments.length?(s=t,null!=r&&(a=s(r)),c):s},c.context=function(t){return arguments.length?(null==t?r=a=null:a=s(r=t),c):r},c}Object.defineProperty(L,"name",{value:"default",configurable:!0}),Object.defineProperty(S,"name",{value:"default",configurable:!0});const O=t.createContext({isInitialized:!1,data:{xAxis:{},yAxis:{},xAxisIds:[],yAxisIds:[]}}),j=()=>{const{data:e}=t.useContext(O);return e};var z=c(5659),E=c(1523);var R=c(4164);const N=function(t){if(void 0===t)return{};const e={};return Object.keys(t).filter(e=>!(e.match(/^on[A-Z]/)&&"function"==typeof t[e])).forEach(n=>{e[n]=t[n]}),e},$=function(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:i,externalForwardedProps:o,className:s}=t;if(!e){const t=(0,R.A)(null==n?void 0:n.className,s,null==o?void 0:o.className,null==i?void 0:i.className),e=(0,r.A)({},null==n?void 0:n.style,null==o?void 0:o.style,null==i?void 0:i.style),a=(0,r.A)({},n,o,i);return t.length>0&&(a.className=t),Object.keys(e).length>0&&(a.style=e),{props:a,internalRef:void 0}}const a=function(t,e=[]){if(void 0===t)return{};const n={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof t[n]&&!e.includes(n)).forEach(e=>{n[e]=t[e]}),n}((0,r.A)({},o,i)),l=N(i),c=N(o),u=e(a),h=(0,R.A)(null==u?void 0:u.className,null==n?void 0:n.className,s,null==o?void 0:o.className,null==i?void 0:i.className),d=(0,r.A)({},null==u?void 0:u.style,null==n?void 0:n.style,null==o?void 0:o.style,null==i?void 0:i.style),p=(0,r.A)({},u,n,c,l);return h.length>0&&(p.className=h),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:u.ref}},B=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"],F=function(t){var e;const{elementType:n,externalSlotProps:i,ownerState:o,skipResolvingSlotProps:s=!1}=t,a=(0,g.A)(t,B),l=s?{}:function(t,e,n){return"function"==typeof t?t(e,n):t}(i,o),{props:c,internalRef:u}=$((0,r.A)({},a,{externalSlotProps:l})),h=(0,E.A)(u,null==l?void 0:l.ref,null==(e=t.additionalProps)?void 0:e.ref);return function(t,e,n){return void 0===t||"string"==typeof t?e:(0,r.A)({},e,{ownerState:(0,r.A)({},e.ownerState,n)})}(n,(0,r.A)({},c,{ref:h}),o)};var D=c(1609),Z=c(8413);const H=t.createContext({item:null,axis:{x:null,y:null},useVoronoiInteraction:!1,dispatch:()=>null}),U=(t,e)=>{switch(e.type){case"enterItem":return(0,r.A)({},t,{item:e.data});case"exitChart":return null===t.item&&null===t.axis.x&&null===t.axis.y?t:(0,r.A)({},t,{axis:{x:null,y:null},item:null});case"updateVoronoiUsage":return(0,r.A)({},t,{useVoronoiInteraction:e.useVoronoiInteraction});case"leaveItem":return null===t.item||Object.keys(e.data).some(n=>e.data[n]!==t.item[n])?t:(0,r.A)({},t,{item:null});case"updateAxis":return e.data.x===t.axis.x&&e.data.y===t.axis.y?t:(0,r.A)({},t,{axis:e.data});default:return t}};function W(e){const{children:n}=e,[o,s]=t.useReducer(U,{item:null,axis:{x:null,y:null},useVoronoiInteraction:!1}),a=t.useMemo(()=>(0,r.A)({},o,{dispatch:s}),[o]);return(0,i.jsx)(H.Provider,{value:a,children:n})}const V=t.createContext({isInitialized:!1,data:{highlightedItem:null,setHighlighted:()=>{},clearHighlighted:()=>{},isHighlighted:()=>!1,isFaded:()=>!1}});function q(){const{isInitialized:e,data:n}=t.useContext(V);if(!e)throw new Error(["MUI X: Could not find the highlighted ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}const G=e=>{const{dispatch:n}=t.useContext(H),{setHighlighted:i,clearHighlighted:o}=q();return e?()=>({}):t=>({onPointerEnter:()=>{n({type:"enterItem",data:t}),i({seriesId:t.seriesId,dataIndex:t.dataIndex})},onPointerLeave:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),n({type:"leaveItem",data:t}),o()},onPointerDown:t=>{t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId)}})};var K=c(9245),Y=dt(),X=t=>lt(t,Y),Q=dt();X.write=t=>lt(t,Q);var J=dt();X.onStart=t=>lt(t,J);var tt=dt();X.onFrame=t=>lt(t,tt);var et=dt();X.onFinish=t=>lt(t,et);var nt=[];X.setTimeout=(t,e)=>{const n=X.now()+e,i=()=>{const t=nt.findIndex(t=>t.cancel==i);~t&&nt.splice(t,1),st-=~t?1:0},o={time:n,handler:t,cancel:i};return nt.splice(it(n),0,o),st+=1,ct(),o};var it=t=>~(~nt.findIndex(e=>e.time>t)||~nt.length);X.cancel=t=>{J.delete(t),tt.delete(t),et.delete(t),Y.delete(t),Q.delete(t)},X.sync=t=>{at=!0,X.batchedUpdates(t),at=!1},X.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function i(...t){e=t,X.onStart(n)}return i.handler=t,i.cancel=()=>{J.delete(n),e=null},i};var ot="undefined"!=typeof window?window.requestAnimationFrame:()=>{};X.use=t=>ot=t,X.now="undefined"!=typeof performance?()=>performance.now():Date.now,X.batchedUpdates=t=>t(),X.catch=console.error,X.frameLoop="always",X.advance=()=>{"demand"!==X.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):ht()};var rt=-1,st=0,at=!1;function lt(t,e){at?(e.delete(t),t(0)):(e.add(t),ct())}function ct(){rt<0&&(rt=0,"demand"!==X.frameLoop&&ot(ut))}function ut(){~rt&&(ot(ut),X.batchedUpdates(ht))}function ht(){const t=rt;rt=X.now();const e=it(rt);e&&(pt(nt.splice(0,e),t=>t.handler()),st-=e),st?(J.flush(),Y.flush(t?Math.min(64,rt-t):16.667),tt.flush(),Q.flush(),et.flush()):rt=-1}function dt(){let t=new Set,e=t;return{add(n){st+=e!=t||t.has(n)?0:1,t.add(n)},delete:n=>(st-=e==t&&t.has(n)?1:0,t.delete(n)),flush(n){e.size&&(t=new Set,st-=e.size,pt(e,e=>e(n)&&t.add(e)),st+=t.size,e=t)}}}function pt(t,e){t.forEach(t=>{try{e(t)}catch(t){X.catch(t)}})}var ft=Object.defineProperty,mt={};function gt(){}((t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})})(mt,{assign:()=>Lt,colors:()=>Ct,createStringInterpolator:()=>At,skipAnimation:()=>It,to:()=>Pt,willAdvance:()=>Tt});var yt={arr:Array.isArray,obj:t=>!!t&&"Object"===t.constructor.name,fun:t=>"function"==typeof t,str:t=>"string"==typeof t,num:t=>"number"==typeof t,und:t=>void 0===t};function _t(t,e){if(yt.arr(t)){if(!yt.arr(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t===e}var vt=(t,e)=>t.forEach(e);function xt(t,e,n){if(yt.arr(t))for(let i=0;i<t.length;i++)e.call(n,t[i],`${i}`);else for(const i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i)}var bt=t=>yt.und(t)?[]:yt.arr(t)?t:[t];function wt(t,e){if(t.size){const n=Array.from(t);t.clear(),vt(n,e)}}var At,Pt,kt=(t,...e)=>wt(t,t=>t(...e)),Mt=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ct=null,It=!1,Tt=gt,Lt=t=>{t.to&&(Pt=t.to),t.now&&(X.now=t.now),void 0!==t.colors&&(Ct=t.colors),null!=t.skipAnimation&&(It=t.skipAnimation),t.createStringInterpolator&&(At=t.createStringInterpolator),t.requestAnimationFrame&&X.use(t.requestAnimationFrame),t.batchedUpdates&&(X.batchedUpdates=t.batchedUpdates),t.willAdvance&&(Tt=t.willAdvance),t.frameLoop&&(X.frameLoop=t.frameLoop)},St=new Set,Ot=[],jt=[],zt=0,Et={get idle(){return!St.size&&!Ot.length},start(t){zt>t.priority?(St.add(t),X.onStart(Rt)):(Nt(t),X(Bt))},advance:Bt,sort(t){if(zt)X.onFrame(()=>Et.sort(t));else{const e=Ot.indexOf(t);~e&&(Ot.splice(e,1),$t(t))}},clear(){Ot=[],St.clear()}};function Rt(){St.forEach(Nt),St.clear(),X(Bt)}function Nt(t){Ot.includes(t)||$t(t)}function $t(t){Ot.splice(function(e){const n=e.findIndex(e=>e.priority>t.priority);return n<0?e.length:n}(Ot),0,t)}function Bt(t){const e=jt;for(let n=0;n<Ot.length;n++){const i=Ot[n];zt=i.priority,i.idle||(Tt(i),i.advance(t),i.idle||e.push(i))}return zt=0,(jt=Ot).length=0,(Ot=e).length>0}var Ft="[-+]?\\d*\\.?\\d+",Dt=Ft+"%";function Zt(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var Ht=new RegExp("rgb"+Zt(Ft,Ft,Ft)),Ut=new RegExp("rgba"+Zt(Ft,Ft,Ft,Ft)),Wt=new RegExp("hsl"+Zt(Ft,Dt,Dt)),Vt=new RegExp("hsla"+Zt(Ft,Dt,Dt,Ft)),qt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Kt=/^#([0-9a-fA-F]{6})$/,Yt=/^#([0-9a-fA-F]{8})$/;function Xt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Qt(t,e,n){const i=n<.5?n*(1+e):n+e-n*e,o=2*n-i,r=Xt(o,i,t+1/3),s=Xt(o,i,t),a=Xt(o,i,t-1/3);return Math.round(255*r)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function Jt(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function te(t){return(parseFloat(t)%360+360)%360/360}function ee(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function ne(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function ie(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=Kt.exec(t))?parseInt(e[1]+"ff",16)>>>0:Ct&&void 0!==Ct[t]?Ct[t]:(e=Ht.exec(t))?(Jt(e[1])<<24|Jt(e[2])<<16|Jt(e[3])<<8|255)>>>0:(e=Ut.exec(t))?(Jt(e[1])<<24|Jt(e[2])<<16|Jt(e[3])<<8|ee(e[4]))>>>0:(e=qt.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=Yt.exec(t))?parseInt(e[1],16)>>>0:(e=Gt.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=Wt.exec(t))?(255|Qt(te(e[1]),ne(e[2]),ne(e[3])))>>>0:(e=Vt.exec(t))?(Qt(te(e[1]),ne(e[2]),ne(e[3]))|ee(e[4]))>>>0:null}(t);return null===e?t:(e=e||0,`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`)}var oe=(t,e,n)=>{if(yt.fun(t))return t;if(yt.arr(t))return oe({range:t,output:e,extrapolate:n});if(yt.str(t.output[0]))return At(t);const i=t,o=i.output,r=i.range||[0,1],s=i.extrapolateLeft||i.extrapolate||"extend",a=i.extrapolateRight||i.extrapolate||"extend",l=i.easing||(t=>t);return t=>{const e=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,r);return function(t,e,n,i,o,r,s,a,l){let c=l?l(t):t;if(c<e){if("identity"===s)return c;"clamp"===s&&(c=e)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}return i===o?i:e===n?t<=e?i:o:(e===-1/0?c=-c:n===1/0?c-=e:c=(c-e)/(n-e),c=r(c),i===-1/0?c=-c:o===1/0?c+=i:c=c*(o-i)+i,c)}(t,r[e],r[e+1],o[e],o[e+1],l,s,a,i.map)}},re=1.70158,se=1.525*re,ae=re+1,le=2*Math.PI/3,ce=2*Math.PI/4.5,ue=t=>{const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},he={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>0===t?0:Math.pow(2,10*t-10),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>ae*t*t*t-re*t*t,easeOutBack:t=>1+ae*Math.pow(t-1,3)+re*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*(7.189819*t-se)/2:(Math.pow(2*t-2,2)*((se+1)*(2*t-2)+se)+2)/2,easeInElastic:t=>0===t?0:1===t?1:-Math.pow(2,10*t-10)*Math.sin((10*t-10.75)*le),easeOutElastic:t=>0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin((10*t-.75)*le)+1,easeInOutElastic:t=>0===t?0:1===t?1:t<.5?-Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*ce)/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*ce)/2+1,easeInBounce:t=>1-ue(1-t),easeOutBounce:ue,easeInOutBounce:t=>t<.5?(1-ue(1-2*t))/2:(1+ue(2*t-1))/2,steps:(t,e="end")=>n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t;return o=("end"===e?Math.floor(i):Math.ceil(i))/t,Math.min(Math.max(o,0),1);var o}},de=Symbol.for("FluidValue.get"),pe=Symbol.for("FluidValue.observers"),fe=t=>Boolean(t&&t[de]),me=t=>t&&t[de]?t[de]():t,ge=t=>t[pe]||null;function ye(t,e){const n=t[pe];n&&n.forEach(t=>{!function(t,e){t.eventObserved?t.eventObserved(e):t(e)}(t,e)})}var _e=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");ve(this,t)}},ve=(t,e)=>Ae(t,de,e);function xe(t,e){if(t[de]){let n=t[pe];n||Ae(t,pe,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function be(t,e){const n=t[pe];if(n&&n.has(e)){const i=n.size-1;i?n.delete(e):t[pe]=null,t.observerRemoved&&t.observerRemoved(i,e)}}var we,Ae=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),Pe=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ke=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Me=new RegExp(`(${Pe.source})(%|[a-z]+)`,"i"),Ce=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Ie=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Te=t=>{const[e,n]=Le(t);if(!e||Mt())return t;const i=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(i)return i.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||t}return n&&Ie.test(n)?Te(n):n||t},Le=t=>{const e=Ie.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]},Se=(t,e,n,i,o)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(i)}, ${o})`,Oe=t=>{we||(we=Ct?new RegExp(`(${Object.keys(Ct).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(t=>me(t).replace(Ie,Te).replace(ke,ie).replace(we,ie)),n=e.map(t=>t.match(Pe).map(Number)),i=n[0].map((t,e)=>n.map(t=>{if(!(e in t))throw Error('The arity of each "output" value must be equal');return t[e]})).map(e=>oe({...t,output:e}));return t=>{const n=!Me.test(e[0])&&e.find(t=>Me.test(t))?.replace(Pe,"");let o=0;return e[0].replace(Pe,()=>`${i[o++](t)}${n||""}`).replace(Ce,Se)}},je="react-spring: ",ze=t=>{const e=t;let n=!1;if("function"!=typeof e)throw new TypeError(`${je}once requires a function parameter`);return(...t)=>{n||(e(...t),n=!0)}},Ee=ze(console.warn),Re=ze(console.warn);function Ne(t){return yt.str(t)&&("#"==t[0]||/\d/.test(t)||!Mt()&&Ie.test(t)||t in(Ct||{}))}var $e=Mt()?t.useEffect:t.useLayoutEffect;function Be(){const e=(0,t.useState)()[1],n=(()=>{const e=(0,t.useRef)(!1);return $e(()=>(e.current=!0,()=>{e.current=!1}),[]),e})();return()=>{n.current&&e(Math.random())}}var Fe=e=>(0,t.useEffect)(e,De),De=[];function Ze(e){const n=(0,t.useRef)();return(0,t.useEffect)(()=>{n.current=e}),n.current}var He=Symbol.for("Animated:node"),Ue=t=>t&&t[He],We=(t,e)=>((t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}))(t,He,e),Ve=t=>t&&t[He]&&t[He].getPayload(),qe=class{constructor(){We(this,this)}getPayload(){return this.payload||[]}},Ge=class extends qe{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,yt.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new Ge(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return yt.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value!==t&&(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,yt.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ke=class extends Ge{constructor(t){super(0),this._string=null,this._toString=oe({output:[t,t]})}static create(t){return new Ke(t)}getValue(){const t=this._string;return null==t?this._string=this._toString(this._value):t}setValue(t){if(yt.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else{if(!super.setValue(t))return!1;this._string=null}return!0}reset(t){t&&(this._toString=oe({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ye={dependencies:null},Xe=class extends qe{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return xt(this.source,(n,i)=>{(t=>!!t&&t[He]===t)(n)?e[i]=n.getValue(t):fe(n)?e[i]=me(n):t||(e[i]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&vt(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return xt(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){Ye.dependencies&&fe(t)&&Ye.dependencies.add(t);const e=Ve(t);e&&vt(e,t=>this.add(t))}},Qe=class extends Xe{constructor(t){super(t)}static create(t){return new Qe(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((e,n)=>e.setValue(t[n])).some(Boolean):(super.setValue(t.map(Je)),!0)}};function Je(t){return(Ne(t)?Ke:Ge).create(t)}function tn(t){const e=Ue(t);return e?e.constructor:yt.arr(t)?Qe:Ne(t)?Ke:Ge}var en=(e,n)=>{const i=!yt.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,t.forwardRef)((o,r)=>{const s=(0,t.useRef)(null),a=i&&(0,t.useCallback)(t=>{s.current=function(t,e){return t&&(yt.fun(t)?t(e):t.current=e),e}(r,t)},[r]),[l,c]=function(t,e){const n=new Set;return Ye.dependencies=n,t.style&&(t={...t,style:e.createAnimatedStyle(t.style)}),t=new Xe(t),Ye.dependencies=null,[t,n]}(o,n),u=Be(),h=()=>{const t=s.current;i&&!t||!1===(!!t&&n.applyAnimatedValues(t,l.getValue(!0)))&&u()},d=new nn(h,c),p=(0,t.useRef)();$e(()=>(p.current=d,vt(c,t=>xe(t,d)),()=>{p.current&&(vt(p.current.deps,t=>be(t,p.current)),X.cancel(p.current.update))})),(0,t.useEffect)(h,[]),Fe(()=>()=>{const t=p.current;vt(t.deps,e=>be(e,t))});const f=n.getComponentProps(l.getValue());return t.createElement(e,{...f,ref:a})})},nn=class{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){"change"==t.type&&X.write(this.update)}},on=Symbol.for("AnimatedComponent"),rn=t=>yt.str(t)?t:t&&yt.str(t.displayName)?t.displayName:yt.fun(t)&&t.name||null;function sn(t,...e){return yt.fun(t)?t(...e):t}var an=(t,e)=>!0===t||!!(e&&t&&(yt.fun(t)?t(e):bt(t).includes(e))),ln=(t,e)=>yt.obj(t)?e&&t[e]:t,cn=(t,e)=>!0===t.default?t[e]:t.default?t.default[e]:void 0,un=t=>t,hn=(t,e=un)=>{let n=dn;t.default&&!0!==t.default&&(t=t.default,n=Object.keys(t));const i={};for(const o of n){const n=e(t[o],o);yt.und(n)||(i[o]=n)}return i},dn=["config","onProps","onStart","onChange","onPause","onResume","onRest"],pn={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function fn(t){const e=function(t){const e={};let n=0;if(xt(t,(t,i)=>{pn[i]||(e[i]=t,n++)}),n)return e}(t);if(e){const n={to:e};return xt(t,(t,i)=>i in e||(n[i]=t)),n}return{...t}}function mn(t){return t=me(t),yt.arr(t)?t.map(mn):Ne(t)?mt.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function gn(t){for(const e in t)return!0;return!1}function yn(t){return yt.fun(t)||yt.arr(t)&&yt.obj(t[0])}function _n(t,e){t.ref?.delete(t),e?.delete(t)}function vn(t,e){e&&t.ref!==e&&(t.ref?.delete(t),e.add(t),t.ref=e)}var xn={tension:170,friction:26,mass:1,damping:1,easing:he.linear,clamp:!1},bn=class{constructor(){this.velocity=0,Object.assign(this,xn)}};function wn(t,e){if(yt.und(e.decay)){const n=!yt.und(e.tension)||!yt.und(e.friction);!n&&yt.und(e.frequency)&&yt.und(e.damping)&&yt.und(e.mass)||(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}else t.duration=void 0}var An=[],Pn=class{constructor(){this.changed=!1,this.values=An,this.toValues=null,this.fromValues=An,this.config=new bn,this.immediate=!1}};function kn(t,{key:e,props:n,defaultProps:i,state:o,actions:r}){return new Promise((s,a)=>{let l,c,u=an(n.cancel??i?.cancel,e);if(u)p();else{yt.und(n.pause)||(o.paused=an(n.pause,e));let t=i?.pause;!0!==t&&(t=o.paused||an(t,e)),l=sn(n.delay||0,e),t?(o.resumeQueue.add(d),r.pause()):(r.resume(),d())}function h(){o.resumeQueue.add(d),o.timeouts.delete(c),c.cancel(),l=c.time-X.now()}function d(){l>0&&!mt.skipAnimation?(o.delayed=!0,c=X.setTimeout(p,l),o.pauseQueue.add(h),o.timeouts.add(c)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(c),t<=(o.cancelId||0)&&(u=!0);try{r.start({...n,callId:t,cancel:u},s)}catch(t){a(t)}}})}var Mn=(t,e)=>1==e.length?e[0]:e.some(t=>t.cancelled)?Tn(t.get()):e.every(t=>t.noop)?Cn(t.get()):In(t.get(),e.every(t=>t.finished)),Cn=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),In=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),Tn=t=>({value:t,cancelled:!0,finished:!1});function Ln(t,e,n,i){const{callId:o,parentId:r,onRest:s}=e,{asyncTo:a,promise:l}=n;return r||t!==a||e.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const c=hn(e,(t,e)=>"onRest"===e?void 0:t);let u,h;const d=new Promise((t,e)=>(u=t,h=e)),p=t=>{const e=o<=(n.cancelId||0)&&Tn(i)||o!==n.asyncId&&In(i,!1);if(e)throw t.result=e,h(t),t},f=(t,e)=>{const r=new On,s=new jn;return(async()=>{if(mt.skipAnimation)throw Sn(n),s.result=In(i,!1),h(s),s;p(r);const a=yt.obj(t)?{...t}:{...e,to:t};a.parentId=o,xt(c,(t,e)=>{yt.und(a[e])&&(a[e]=t)});const l=await i.start(a);return p(r),n.paused&&await new Promise(t=>{n.resumeQueue.add(t)}),l})()};let m;if(mt.skipAnimation)return Sn(n),In(i,!1);try{let e;e=yt.arr(t)?(async t=>{for(const e of t)await f(e)})(t):Promise.resolve(t(f,i.stop.bind(i))),await Promise.all([e.then(u),d]),m=In(i.get(),!0,!1)}catch(t){if(t instanceof On)m=t.result;else{if(!(t instanceof jn))throw t;m=t.result}}finally{o==n.asyncId&&(n.asyncId=r,n.asyncTo=r?a:void 0,n.promise=r?l:void 0)}return yt.fun(s)&&X.batchedUpdates(()=>{s(m,i,i.item)}),m})():l}function Sn(t,e){wt(t.timeouts,t=>t.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var On=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},jn=class extends Error{constructor(){super("SkipAnimationSignal")}},zn=t=>t instanceof Rn,En=1,Rn=class extends _e{constructor(){super(...arguments),this.id=En++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Ue(this);return t&&t.getValue()}to(...t){return mt.to(this,t)}interpolate(...t){return Ee(`${je}The "interpolate" function is deprecated in v9 (use "to" instead)`),mt.to(this,t)}toJSON(){return this.get()}observerAdded(t){1==t&&this._attach()}observerRemoved(t){0==t&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){ye(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||Et.sort(this),ye(this,{type:"priority",parent:this,priority:t})}},Nn=Symbol.for("SpringPhase"),$n=t=>(1&t[Nn])>0,Bn=t=>(2&t[Nn])>0,Fn=t=>(4&t[Nn])>0,Dn=(t,e)=>e?t[Nn]|=3:t[Nn]&=-3,Zn=(t,e)=>e?t[Nn]|=4:t[Nn]&=-5,Hn=class extends Rn{constructor(t,e){if(super(),this.animation=new Pn,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!yt.und(t)||!yt.und(e)){const n=yt.obj(t)?{...t}:{...e,from:t};yt.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Bn(this)||this._state.asyncTo)||Fn(this)}get goal(){return me(this.animation.to)}get velocity(){const t=Ue(this);return t instanceof Ge?t.lastVelocity||0:t.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return $n(this)}get isAnimating(){return Bn(this)}get isPaused(){return Fn(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const i=this.animation;let{toValues:o}=i;const{config:r}=i,s=Ve(i.to);!s&&fe(i.to)&&(o=bt(me(i.to))),i.values.forEach((a,l)=>{if(a.done)return;const c=a.constructor==Ke?1:s?s[l].lastPosition:o[l];let u=i.immediate,h=c;if(!u){if(h=a.lastPosition,r.tension<=0)return void(a.done=!0);let e=a.elapsedTime+=t;const n=i.fromValues[l],o=null!=a.v0?a.v0:a.v0=yt.arr(r.velocity)?r.velocity[l]:r.velocity;let s;const d=r.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(yt.und(r.duration))if(r.decay){const t=!0===r.decay?.998:r.decay,i=Math.exp(-(1-t)*e);h=n+o/(1-t)*(1-i),u=Math.abs(a.lastPosition-h)<=d,s=o*i}else{s=null==a.lastVelocity?o:a.lastVelocity;const e=r.restVelocity||d/10,i=r.clamp?0:r.bounce,l=!yt.und(i),p=n==c?a.v0>0:n<c;let f,m=!1;const g=1,y=Math.ceil(t/g);for(let t=0;t<y&&(f=Math.abs(s)>e,f||(u=Math.abs(c-h)<=d,!u));++t)l&&(m=h==c||h>c==p,m&&(s=-s*i,h=c)),s+=(1e-6*-r.tension*(h-c)+.001*-r.friction*s)/r.mass*g,h+=s*g}else{let i=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,a.durationProgress>0&&(a.elapsedTime=r.duration*a.durationProgress,e=a.elapsedTime+=t)),i=(r.progress||0)+e/this._memoizedDuration,i=i>1?1:i<0?0:i,a.durationProgress=i),h=n+r.easing(i)*(c-n),s=(h-a.lastPosition)/t,u=1==i}a.lastVelocity=s,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[l].done&&(u=!1),u?a.done=!0:e=!1,a.setValue(h,r.round)&&(n=!0)});const a=Ue(this),l=a.getValue();if(e){const t=me(i.to);l===t&&!n||r.decay?n&&r.decay&&this._onChange(l):(a.setValue(t),this._onChange(t)),this._stop()}else n&&this._onChange(l)}set(t){return X.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Bn(this)){const{to:t,config:e}=this.animation;X.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return yt.und(t)?(n=this.queue||[],this.queue=[]):n=[yt.obj(t)?t:{...e,to:t}],Promise.all(n.map(t=>this._update(t))).then(t=>Mn(this,t))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),Sn(this._state,t&&this._lastCallId),X.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){"change"==t.type?this._start():"priority"==t.type&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:i}=t;n=yt.obj(n)?n[e]:n,(null==n||yn(n))&&(n=void 0),i=yt.obj(i)?i[e]:i,null==i&&(i=void 0);const o={to:n,from:i};return $n(this)||(t.reverse&&([n,i]=[i,n]),i=me(i),yt.und(i)?Ue(this)||this._set(n):this._set(i)),o}_update({...t},e){const{key:n,defaultProps:i}=this;t.default&&Object.assign(i,hn(t,(t,e)=>/^on/.test(e)?ln(t,n):t)),Yn(this,t,"onProps"),Xn(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const r=this._state;return kn(++this._lastCallId,{key:n,props:t,defaultProps:i,state:r,actions:{pause:()=>{Fn(this)||(Zn(this,!0),kt(r.pauseQueue),Xn(this,"onPause",In(this,Un(this,this.animation.to)),this))},resume:()=>{Fn(this)&&(Zn(this,!1),Bn(this)&&this._resume(),kt(r.resumeQueue),Xn(this,"onResume",In(this,Un(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(n=>{if(t.loop&&n.finished&&(!e||!n.noop)){const e=Wn(t);if(e)return this._update(e,!0)}return n})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(Tn(this));const i=!yt.und(t.to),o=!yt.und(t.from);if(i||o){if(!(e.callId>this._lastToId))return n(Tn(this));this._lastToId=e.callId}const{key:r,defaultProps:s,animation:a}=this,{to:l,from:c}=a;let{to:u=l,from:h=c}=t;!o||i||e.default&&!yt.und(u)||(u=h),e.reverse&&([u,h]=[h,u]);const d=!_t(h,c);d&&(a.from=h),h=me(h);const p=!_t(u,l);p&&this._focus(u);const f=yn(e.to),{config:m}=a,{decay:g,velocity:y}=m;(i||o)&&(m.velocity=0),e.config&&!f&&function(t,e,n){n&&(wn(n={...n},e),e={...n,...e}),wn(t,e),Object.assign(t,e);for(const e in xn)null==t[e]&&(t[e]=xn[e]);let{frequency:i,damping:o}=t;const{mass:r}=t;yt.und(i)||(i<.01&&(i=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/i,2)*r,t.friction=4*Math.PI*o*r/i)}(m,sn(e.config,r),e.config!==s.config?sn(s.config,r):void 0);let _=Ue(this);if(!_||yt.und(u))return n(In(this,!0));const v=yt.und(e.reset)?o&&!e.default:!yt.und(h)&&an(e.reset,r),x=v?h:this.get(),b=mn(u),w=yt.num(b)||yt.arr(b)||Ne(b),A=!f&&(!w||an(s.immediate||e.immediate,r));if(p){const t=tn(u);if(t!==_.constructor){if(!A)throw Error(`Cannot animate between ${_.constructor.name} and ${t.name}, as the "to" prop suggests`);_=this._set(b)}}const P=_.constructor;let k=fe(u),M=!1;if(!k){const t=v||!$n(this)&&d;(p||t)&&(M=_t(mn(x),b),k=!M),(_t(a.immediate,A)||A)&&_t(m.decay,g)&&_t(m.velocity,y)||(k=!0)}if(M&&Bn(this)&&(a.changed&&!v?k=!0:k||this._stop(l)),!f&&((k||fe(l))&&(a.values=_.getPayload(),a.toValues=fe(u)?null:P==Ke?[1]:bt(b)),a.immediate!=A&&(a.immediate=A,A||v||this._set(l)),k)){const{onRest:t}=a;vt(Kn,t=>Yn(this,e,t));const i=In(this,Un(this,l));kt(this._pendingCalls,i),this._pendingCalls.add(n),a.changed&&X.batchedUpdates(()=>{a.changed=!v,t?.(i,this),v?sn(s.onRest,i):a.onStart?.(i,this)})}v&&this._set(x),f?n(Ln(e.to,e,this._state,this)):k?this._start():Bn(this)&&!p?this._pendingCalls.add(n):n(Cn(x))}_focus(t){const e=this.animation;t!==e.to&&(ge(this)&&this._detach(),e.to=t,ge(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;fe(e)&&(xe(e,this),zn(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;fe(t)&&be(t,this)}_set(t,e=!0){const n=me(t);if(!yt.und(n)){const t=Ue(this);if(!t||!_t(n,t.getValue())){const i=tn(n);t&&t.constructor==i?t.setValue(n):We(this,i.create(n)),t&&X.batchedUpdates(()=>{this._onChange(n,e)})}}return Ue(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,Xn(this,"onStart",In(this,Un(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),sn(this.animation.onChange,t,this)),sn(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Ue(this).reset(me(t.to)),t.immediate||(t.fromValues=t.values.map(t=>t.lastPosition)),Bn(this)||(Dn(this,!0),Fn(this)||this._resume())}_resume(){mt.skipAnimation?this.finish():Et.start(this)}_stop(t,e){if(Bn(this)){Dn(this,!1);const n=this.animation;vt(n.values,t=>{t.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ye(this,{type:"idle",parent:this});const i=e?Tn(this.get()):In(this.get(),Un(this,t??n.to));kt(this._pendingCalls,i),n.changed&&(n.changed=!1,Xn(this,"onRest",i,this))}}};function Un(t,e){const n=mn(e);return _t(mn(t.get()),n)}function Wn(t,e=t.loop,n=t.to){const i=sn(e);if(i){const o=!0!==i&&fn(i),r=(o||t).reverse,s=!o||o.reset;return Vn({...t,loop:e,default:!1,pause:void 0,to:!r||yn(n)?n:void 0,from:s?t.from:void 0,reset:s,...o})}}function Vn(t){const{to:e,from:n}=t=fn(t),i=new Set;return yt.obj(e)&&Gn(e,i),yt.obj(n)&&Gn(n,i),t.keys=i.size?Array.from(i):null,t}function qn(t){const e=Vn(t);return yt.und(e.default)&&(e.default=hn(e)),e}function Gn(t,e){xt(t,(t,n)=>null!=t&&e.add(n))}var Kn=["onStart","onRest","onChange","onPause","onResume"];function Yn(t,e,n){t.animation[n]=e[n]!==cn(e,n)?ln(e[n],t.key):void 0}function Xn(t,e,...n){t.animation[e]?.(...n),t.defaultProps[e]?.(...n)}var Qn=["onStart","onChange","onRest"],Jn=1,ti=class{constructor(t,e){this.id=Jn++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];yt.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(Vn(t)),this}start(t){let{queue:e}=this;return t?e=bt(t).map(Vn):this.queue=[],this._flush?this._flush(this,e):(ai(this,e),ei(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;vt(bt(e),e=>n[e].stop(!!t))}else Sn(this._state,this._lastAsyncId),this.each(e=>e.stop(!!t));return this}pause(t){if(yt.und(t))this.start({pause:!0});else{const e=this.springs;vt(bt(t),t=>e[t].pause())}return this}resume(t){if(yt.und(t))this.start({pause:!1});else{const e=this.springs;vt(bt(t),t=>e[t].resume())}return this}each(t){xt(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,i=this._active.size>0,o=this._changed.size>0;(i&&!this._started||o&&!this._started)&&(this._started=!0,wt(t,([t,e])=>{e.value=this.get(),t(e,this,this._item)}));const r=!i&&this._started,s=o||r&&n.size?this.get():null;o&&e.size&&wt(e,([t,e])=>{e.value=s,t(e,this,this._item)}),r&&(this._started=!1,wt(n,([t,e])=>{e.value=s,t(e,this,this._item)}))}eventObserved(t){if("change"==t.type)this._changed.add(t.parent),t.idle||this._active.add(t.parent);else{if("idle"!=t.type)return;this._active.delete(t.parent)}X.onFrame(this._onFrame)}};function ei(t,e){return Promise.all(e.map(e=>ni(t,e))).then(e=>Mn(t,e))}async function ni(t,e,n){const{keys:i,to:o,from:r,loop:s,onRest:a,onResolve:l}=e,c=yt.obj(e.default)&&e.default;s&&(e.loop=!1),!1===o&&(e.to=null),!1===r&&(e.from=null);const u=yt.arr(o)||yt.fun(o)?o:void 0;u?(e.to=void 0,e.onRest=void 0,c&&(c.onRest=void 0)):vt(Qn,n=>{const i=e[n];if(yt.fun(i)){const o=t._events[n];e[n]=({finished:t,cancelled:e})=>{const n=o.get(i);n?(t||(n.finished=!1),e&&(n.cancelled=!0)):o.set(i,{value:null,finished:t||!1,cancelled:e||!1})},c&&(c[n]=e[n])}});const h=t._state;e.pause===!h.paused?(h.paused=e.pause,kt(e.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(e.pause=!0);const d=(i||Object.keys(t.springs)).map(n=>t.springs[n].start(e)),p=!0===e.cancel||!0===cn(e,"cancel");(u||p&&h.asyncId)&&d.push(kn(++t._lastAsyncId,{props:e,state:h,actions:{pause:gt,resume:gt,start(e,n){p?(Sn(h,t._lastAsyncId),n(Tn(t))):(e.onRest=a,n(Ln(u,e,h,t)))}}})),h.paused&&await new Promise(t=>{h.resumeQueue.add(t)});const f=Mn(t,await Promise.all(d));if(s&&f.finished&&(!n||!f.noop)){const n=Wn(e,s,o);if(n)return ai(t,[n]),ni(t,n,!0)}return l&&X.batchedUpdates(()=>l(f,t,t.item)),f}function ii(t,e){const n={...t.springs};return e&&vt(bt(e),t=>{yt.und(t.keys)&&(t=Vn(t)),yt.obj(t.to)||(t={...t,to:void 0}),si(n,t,t=>ri(t))}),oi(t,n),n}function oi(t,e){xt(e,(e,n)=>{t.springs[n]||(t.springs[n]=e,xe(e,t))})}function ri(t,e){const n=new Hn;return n.key=t,e&&xe(n,e),n}function si(t,e,n){e.keys&&vt(e.keys,i=>{(t[i]||(t[i]=n(i)))._prepareNode(e)})}function ai(t,e){vt(e,e=>{si(t.springs,e,e=>ri(e,t))})}var li,ci,ui=({children:e,...n})=>{const i=(0,t.useContext)(hi),o=n.pause||!!i.pause,r=n.immediate||!!i.immediate;n=function(e,n){const[i]=(0,t.useState)(()=>({inputs:n,result:e()})),o=(0,t.useRef)(),r=o.current;let s=r;return s?Boolean(n&&s.inputs&&function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(n,s.inputs))||(s={inputs:n,result:e()}):s=i,(0,t.useEffect)(()=>{o.current=s,r==i&&(i.inputs=i.result=void 0)},[s]),s.result}(()=>({pause:o,immediate:r}),[o,r]);const{Provider:s}=hi;return t.createElement(s,{value:n},e)},hi=(li=ui,ci={},Object.assign(li,t.createContext(ci)),li.Provider._context=li,li.Consumer._context=li,li);ui.Provider=hi.Provider,ui.Consumer=hi.Consumer;var di=()=>{const t=[],e=function(e){Re(`${je}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const i=[];return vt(t,(t,o)=>{if(yt.und(e))i.push(t.start());else{const r=n(e,t,o);r&&i.push(t.start(r))}}),i};e.current=t,e.add=function(e){t.includes(e)||t.push(e)},e.delete=function(e){const n=t.indexOf(e);~n&&t.splice(n,1)},e.pause=function(){return vt(t,t=>t.pause(...arguments)),this},e.resume=function(){return vt(t,t=>t.resume(...arguments)),this},e.set=function(e){vt(t,(t,n)=>{const i=yt.fun(e)?e(n,t):e;i&&t.set(i)})},e.start=function(e){const n=[];return vt(t,(t,i)=>{if(yt.und(e))n.push(t.start());else{const o=this._getProps(e,t,i);o&&n.push(t.start(o))}}),n},e.stop=function(){return vt(t,t=>t.stop(...arguments)),this},e.update=function(e){return vt(t,(t,n)=>t.update(this._getProps(e,t,n))),this};const n=function(t,e,n){return yt.fun(t)?t(n,e):t};return e._getProps=n,e};function pi(e,n){const i=yt.fun(e),[[o],r]=function(e,n,i){const o=yt.fun(n)&&n;o&&!i&&(i=[]);const r=(0,t.useMemo)(()=>o||3==arguments.length?di():void 0,[]),s=(0,t.useRef)(0),a=Be(),l=(0,t.useMemo)(()=>({ctrls:[],queue:[],flush(t,e){const n=ii(t,e);return s.current>0&&!l.queue.length&&!Object.keys(n).some(e=>!t.springs[e])?ei(t,e):new Promise(i=>{oi(t,n),l.queue.push(()=>{i(ei(t,e))}),a()})}}),[]),c=(0,t.useRef)([...l.ctrls]),u=[],h=Ze(e)||0;function d(t,e){for(let i=t;i<e;i++){const t=c.current[i]||(c.current[i]=new ti(null,l.flush)),e=o?o(i,t):n[i];e&&(u[i]=qn(e))}}(0,t.useMemo)(()=>{vt(c.current.slice(e,h),t=>{_n(t,r),t.stop(!0)}),c.current.length=e,d(h,e)},[e]),(0,t.useMemo)(()=>{d(0,Math.min(h,e))},i);const p=c.current.map((t,e)=>ii(t,u[e])),f=(0,t.useContext)(ui),m=Ze(f),g=f!==m&&gn(f);$e(()=>{s.current++,l.ctrls=c.current;const{queue:t}=l;t.length&&(l.queue=[],vt(t,t=>t())),vt(c.current,(t,e)=>{r?.add(t),g&&t.start({default:f});const n=u[e];n&&(vn(t,n.ref),t.ref?t.queue.push(n):t.start(n))})}),Fe(()=>()=>{vt(l.ctrls,t=>t.stop(!0))});const y=p.map(t=>({...t}));return r?[y,r]:y}(1,i?e:[e],i?n||[]:n);return i||2==arguments.length?[o,r]:o}function fi(e,n,i){const o=yt.fun(n)&&n,{reset:r,sort:s,trail:a=0,expires:l=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:h,config:d}=o?o():n,p=(0,t.useMemo)(()=>o||3==arguments.length?di():void 0,[]),f=bt(e),m=[],g=(0,t.useRef)(null),y=r?null:g.current;$e(()=>{g.current=m}),Fe(()=>(vt(m,t=>{p?.add(t.ctrl),t.ctrl.ref=p}),()=>{vt(g.current,t=>{t.expired&&clearTimeout(t.expirationId),_n(t.ctrl,p),t.ctrl.stop(!0)})}));const _=function(t,{key:e,keys:n=e},i){if(null===n){const e=new Set;return t.map(t=>{const n=i&&i.find(n=>n.item===t&&"leave"!==n.phase&&!e.has(n));return n?(e.add(n),n.key):mi++})}return yt.und(n)?t:yt.fun(n)?t.map(n):bt(n)}(f,o?o():n,y),v=r&&g.current||[];$e(()=>vt(v,({ctrl:t,item:e,key:n})=>{_n(t,p),sn(u,e,n)}));const x=[];if(y&&vt(y,(t,e)=>{t.expired?(clearTimeout(t.expirationId),v.push(t)):~(e=x[e]=_.indexOf(t.key))&&(m[e]=t)}),vt(f,(t,e)=>{m[e]||(m[e]={key:_[e],item:t,phase:"mount",ctrl:new ti},m[e].ctrl.item=t)}),x.length){let t=-1;const{leave:e}=o?o():n;vt(x,(n,i)=>{const o=y[i];~n?(t=m.indexOf(o),m[t]={...o,item:f[n]}):e&&m.splice(++t,0,o)})}yt.fun(s)&&m.sort((t,e)=>s(t.item,e.item));let b=-a;const w=Be(),A=hn(n),P=new Map,k=(0,t.useRef)(new Map),M=(0,t.useRef)(!1);vt(m,(t,e)=>{const i=t.key,r=t.phase,s=o?o():n;let u,p;const f=sn(s.delay||0,i);if("mount"==r)u=s.enter,p="enter";else{const t=_.indexOf(i)<0;if("leave"!=r)if(t)u=s.leave,p="leave";else{if(!(u=s.update))return;p="update"}else{if(t)return;u=s.enter,p="enter"}}if(u=sn(u,t.item,e),u=yt.obj(u)?fn(u):{to:u},!u.config){const n=d||A.config;u.config=sn(n,t.item,e,p)}b+=a;const m={...A,delay:f+b,ref:h,immediate:s.immediate,reset:!1,...u};if("enter"==p&&yt.und(m.from)){const i=o?o():n,r=yt.und(i.initial)||y?i.from:i.initial;m.from=sn(r,t.item,e)}const{onResolve:v}=m;m.onResolve=t=>{sn(v,t);const e=g.current,n=e.find(t=>t.key===i);if(n&&(!t.cancelled||"update"==n.phase)&&n.ctrl.idle){const t=e.every(t=>t.ctrl.idle);if("leave"==n.phase){const e=sn(l,n.item);if(!1!==e){const i=!0===e?0:e;if(n.expired=!0,!t&&i>0)return void(i<=2147483647&&(n.expirationId=setTimeout(w,i)))}}t&&e.some(t=>t.expired)&&(k.current.delete(n),c&&(M.current=!0),w())}};const x=ii(t.ctrl,m);"leave"===p&&c?k.current.set(t,{phase:p,springs:x,payload:m}):P.set(t,{phase:p,springs:x,payload:m})});const C=(0,t.useContext)(ui),I=Ze(C),T=C!==I&&gn(C);$e(()=>{T&&vt(m,t=>{t.ctrl.start({default:C})})},[C]),vt(P,(t,e)=>{if(k.current.size){const t=m.findIndex(t=>t.key===e.key);m.splice(t,1)}}),$e(()=>{vt(k.current.size?k.current:P,({phase:t,payload:e},n)=>{const{ctrl:i}=n;n.phase=t,p?.add(i),T&&"enter"==t&&i.start({default:C}),e&&(vn(i,e.ref),!i.ref&&!p||M.current?(i.start(e),M.current&&(M.current=!1)):i.update(e))})},r?void 0:i);const L=e=>t.createElement(t.Fragment,null,m.map((n,i)=>{const{springs:o}=P.get(n)||n.ctrl,r=e({...o},n.item,n,i);return r&&r.type?t.createElement(r.type,{...r.props,key:yt.str(n.key)||yt.num(n.key)?n.key:n.ctrl.id,ref:r.ref}):r}));return p?[L,p]:L}var mi=1,gi=class extends Rn{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=oe(...e);const n=this._get(),i=tn(n);We(this,i.create(n))}advance(t){const e=this._get();_t(e,this.get())||(Ue(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&_i(this._active)&&vi(this)}_get(){const t=yt.arr(this.source)?this.source.map(me):bt(me(this.source));return this.calc(...t)}_start(){this.idle&&!_i(this._active)&&(this.idle=!1,vt(Ve(this),t=>{t.done=!1}),mt.skipAnimation?(X.batchedUpdates(()=>this.advance()),vi(this)):Et.start(this))}_attach(){let t=1;vt(bt(this.source),e=>{fe(e)&&xe(e,this),zn(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){vt(bt(this.source),t=>{fe(t)&&be(t,this)}),this._active.clear(),vi(this)}eventObserved(t){"change"==t.type?t.idle?this.advance():(this._active.add(t.parent),this._start()):"idle"==t.type?this._active.delete(t.parent):"priority"==t.type&&(this.priority=bt(this.source).reduce((t,e)=>Math.max(t,(zn(e)?e.priority:0)+1),0))}};function yi(t){return!1!==t.idle}function _i(t){return!t.size||Array.from(t).every(yi)}function vi(t){t.idle||(t.idle=!0,vt(Ve(t),t=>{t.done=!0}),ye(t,{type:"idle",parent:t}))}var xi=(t,...e)=>new gi(t,e);mt.assign({createStringInterpolator:Oe,to:(t,e)=>new gi(t,e)}),Et.advance;var bi=c(1658),wi=/^--/;function Ai(t,e){return null==e||"boolean"==typeof e||""===e?"":"number"!=typeof e||0===e||wi.test(t)||ki.hasOwnProperty(t)&&ki[t]?(""+e).trim():e+"px"}var Pi={},ki={animationIterationCount:!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,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},Mi=["Webkit","Ms","Moz","O"];ki=Object.keys(ki).reduce((t,e)=>(Mi.forEach(n=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(n,e)]=t[e]),t),ki);var Ci=/^(matrix|translate|scale|rotate|skew)/,Ii=/^(translate)/,Ti=/^(rotate|skew)/,Li=(t,e)=>yt.num(t)&&0!==t?t+e:t,Si=(t,e)=>yt.arr(t)?t.every(t=>Si(t,e)):yt.num(t)?t===e:parseFloat(t)===e,Oi=class extends Xe{constructor({x:t,y:e,z:n,...i}){const o=[],r=[];(t||e||n)&&(o.push([t||0,e||0,n||0]),r.push(t=>[`translate3d(${t.map(t=>Li(t,"px")).join(",")})`,Si(t,0)])),xt(i,(t,e)=>{if("transform"===e)o.push([t||""]),r.push(t=>[t,""===t]);else if(Ci.test(e)){if(delete i[e],yt.und(t))return;const n=Ii.test(e)?"px":Ti.test(e)?"deg":"";o.push(bt(t)),r.push("rotate3d"===e?([t,e,i,o])=>[`rotate3d(${t},${e},${i},${Li(o,n)})`,Si(o,0)]:t=>[`${e}(${t.map(t=>Li(t,n)).join(",")})`,Si(t,e.startsWith("scale")?1:0)])}}),o.length&&(i.transform=new ji(o,r)),super(i)}},ji=class extends _e{constructor(t,e){super(),this.inputs=t,this.transforms=e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return vt(this.inputs,(n,i)=>{const o=me(n[0]),[r,s]=this.transforms[i](yt.arr(o)?o:n.map(me));t+=" "+r,e=e&&s}),e?"none":t}observerAdded(t){1==t&&vt(this.inputs,t=>vt(t,t=>fe(t)&&xe(t,this)))}observerRemoved(t){0==t&&vt(this.inputs,t=>vt(t,t=>fe(t)&&be(t,this)))}eventObserved(t){"change"==t.type&&(this._value=null),ye(this,t)}};mt.assign({batchedUpdates:bi.unstable_batchedUpdates,createStringInterpolator:Oe,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var zi=((t,{applyAnimatedValues:e=()=>!1,createAnimatedStyle:n=t=>new Xe(t),getComponentProps:i=t=>t}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:i},r=t=>{const e=rn(t)||"Anonymous";return(t=yt.str(t)?r[t]||(r[t]=en(t,o)):t[on]||(t[on]=en(t,o))).displayName=`Animated(${e})`,t};return xt(t,(e,n)=>{yt.arr(t)&&(n=rn(e)),r[n]=r(e)}),{animated:r}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n="filter"===t.nodeName||t.parentNode&&"filter"===t.parentNode.nodeName,{className:i,style:o,children:r,scrollTop:s,scrollLeft:a,viewBox:l,...c}=e,u=Object.values(c),h=Object.keys(c).map(e=>n||t.hasAttribute(e)?e:Pi[e]||(Pi[e]=e.replace(/([A-Z])/g,t=>"-"+t.toLowerCase())));void 0!==r&&(t.textContent=r);for(const e in o)if(o.hasOwnProperty(e)){const n=Ai(e,o[e]);wi.test(e)?t.style.setProperty(e,n):t.style[e]=n}h.forEach((e,n)=>{t.setAttribute(e,u[n])}),void 0!==i&&(t.className=i),void 0!==s&&(t.scrollTop=s),void 0!==a&&(t.scrollLeft=a),void 0!==l&&t.setAttribute("viewBox",l)},createAnimatedStyle:t=>new Oi(t),getComponentProps:({scrollTop:t,scrollLeft:e,...n})=>n}),Ei=zi.animated;function Ri(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ni(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function $i(){}Object.defineProperty(Ri,"name",{value:"default",configurable:!0});var Bi=.7,Fi=1/Bi,Di="\\s*([+-]?\\d+)\\s*",Zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ui=/^#([0-9a-f]{3,8})$/,Wi=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),Vi=new RegExp(`^rgb\\(${Hi},${Hi},${Hi}\\)$`),qi=new RegExp(`^rgba\\(${Di},${Di},${Di},${Zi}\\)$`),Gi=new RegExp(`^rgba\\(${Hi},${Hi},${Hi},${Zi}\\)$`),Ki=new RegExp(`^hsl\\(${Zi},${Hi},${Hi}\\)$`),Yi=new RegExp(`^hsla\\(${Zi},${Hi},${Hi},${Zi}\\)$`),Xi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Qi(){return this.rgb().formatHex()}function Ji(){return this.rgb().formatRgb()}function to(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ui.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?eo(e):3===n?new oo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?no(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?no(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Wi.exec(t))?new oo(e[1],e[2],e[3],1):(e=Vi.exec(t))?new oo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qi.exec(t))?no(e[1],e[2],e[3],e[4]):(e=Gi.exec(t))?no(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ki.exec(t))?uo(e[1],e[2]/100,e[3]/100,1):(e=Yi.exec(t))?uo(e[1],e[2]/100,e[3]/100,e[4]):Xi.hasOwnProperty(t)?eo(Xi[t]):"transparent"===t?new oo(NaN,NaN,NaN,0):null}function eo(t){return new oo(t>>16&255,t>>8&255,255&t,1)}function no(t,e,n,i){return i<=0&&(t=e=n=NaN),new oo(t,e,n,i)}function io(t,e,n,i){return 1===arguments.length?((o=t)instanceof $i||(o=to(o)),o?new oo((o=o.rgb()).r,o.g,o.b,o.opacity):new oo):new oo(t,e,n,null==i?1:i);var o}function oo(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function ro(){return`#${co(this.r)}${co(this.g)}${co(this.b)}`}function so(){const t=ao(this.opacity);return`${1===t?"rgb(":"rgba("}${lo(this.r)}, ${lo(this.g)}, ${lo(this.b)}${1===t?")":`, ${t})`}`}function ao(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function lo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function co(t){return((t=lo(t))<16?"0":"")+t.toString(16)}function uo(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new po(t,e,n,i)}function ho(t){if(t instanceof po)return new po(t.h,t.s,t.l,t.opacity);if(t instanceof $i||(t=to(t)),!t)return new po;if(t instanceof po)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,a=r-o,l=(r+o)/2;return a?(s=e===r?(n-i)/a+6*(n<i):n===r?(i-e)/a+2:(e-n)/a+4,a/=l<.5?r+o:2-r-o,s*=60):a=l>0&&l<1?0:s,new po(s,a,l,t.opacity)}function po(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function fo(t){return(t=(t||0)%360)<0?t+360:t}function mo(t){return Math.max(0,Math.min(1,t||0))}function go(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function yo(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}Ri($i,to,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qi,formatHex:Qi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ho(this).formatHsl()},formatRgb:Ji,toString:Ji}),Ri(oo,io,Ni($i,{brighter(t){return t=null==t?Fi:Math.pow(Fi,t),new oo(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Bi:Math.pow(Bi,t),new oo(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new oo(lo(this.r),lo(this.g),lo(this.b),ao(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ro,formatHex:ro,formatHex8:function(){return`#${co(this.r)}${co(this.g)}${co(this.b)}${co(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:so,toString:so})),Ri(po,function(t,e,n,i){return 1===arguments.length?ho(t):new po(t,e,n,null==i?1:i)},Ni($i,{brighter(t){return t=null==t?Fi:Math.pow(Fi,t),new po(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Bi:Math.pow(Bi,t),new po(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new oo(go(t>=240?t-240:t+120,o,i),go(t,o,i),go(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new po(fo(this.h),mo(this.s),mo(this.l),ao(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ao(this.opacity);return`${1===t?"hsl(":"hsla("}${fo(this.h)}, ${100*mo(this.s)}%, ${100*mo(this.l)}%${1===t?")":`, ${t})`}`}})),Object.defineProperty(yo,"name",{value:"default",configurable:!0}),Object.defineProperty(xo,"name",{value:"default",configurable:!0});var _o=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vo=new RegExp(_o.source,"g");function xo(t,e){var n,i,o,r=_o.lastIndex=vo.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=_o.exec(t))&&(i=vo.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:yo(n,i)})),r=vo.lastIndex;return r<e.length&&(o=e.slice(r),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}const bo=e=>{const n=function(e){const n=t.useRef({currentPath:e,previousPath:void 0});return n.current.currentPath!==e&&(n.current={currentPath:e,previousPath:n.current.currentPath}),n.current}(e);return t.useMemo(()=>n.previousPath?xo(n.previousPath,n.currentPath):()=>n.currentPath,[n.currentPath,n.previousPath])};function wo(t){return t.replace(" ","_")}var Ao=c(4661);const Po="DEFAULT_X_AXIS_KEY",ko="DEFAULT_Y_AXIS_KEY",Mo={top:50,bottom:50,left:50,right:50},Co=t.createContext({top:0,left:0,bottom:0,right:0,height:300,width:400,chartId:"",isPointInside:()=>!1}),Io=t.createContext({isInitialized:!1,data:{current:null}});function To(e){const{width:n,height:o,margin:s,svgRef:a,children:l}=e,c=((e,n,i)=>{const o=(0,r.A)({},Mo,i);return t.useMemo(()=>({left:o.left,top:o.top,right:o.right,bottom:o.bottom,width:Math.max(0,e-o.left-o.right),height:Math.max(0,n-o.top-o.bottom)}),[e,n,o.top,o.bottom,o.left,o.right])})(n,o,s),u=(0,Ao.A)(),h=t.useCallback(({x:t,y:e},n)=>{if(n?.targetElement&&n?.targetElement.closest("[data-drawing-container]"))return!0;const i=t>=c.left-1&&t<=c.left+c.width,o=e>=c.top-1&&e<=c.top+c.height;return"x"===n?.direction?i:("y"===n?.direction||i)&&o},[c]),d=t.useMemo(()=>(0,r.A)({chartId:u??""},c,{isPointInside:h}),[u,c,h]),p=t.useMemo(()=>({isInitialized:!0,data:a}),[a]);return(0,i.jsx)(Io.Provider,{value:p,children:(0,i.jsx)(Co.Provider,{value:d,children:l})})}function Lo(){const{left:e,top:n,width:i,height:o,bottom:r,right:s,isPointInside:a}=t.useContext(Co);return t.useMemo(()=>({left:e,top:n,width:i,height:o,bottom:r,right:s,isPointInside:a}),[o,e,n,i,r,s,a])}function So(){const{chartId:e}=t.useContext(Co);return t.useMemo(()=>e,[e])}function Oo(e){const n=Lo(),o=So(),r=fi([n],{from:t=>({animatedWidth:t.left}),enter:t=>({animatedWidth:t.width+t.left+t.right}),leave:t=>({animatedWidth:t.width+t.left+t.right}),reset:!1,immediate:e.skipAnimation}),s=wo(`${o}-${e.id}`);return(0,i.jsxs)(t.Fragment,{children:[(0,i.jsx)("clipPath",{id:s,children:r(t=>(0,i.jsx)(Ei.rect,{x:0,y:0,width:t.animatedWidth,height:n.top+n.height+n.bottom}))}),(0,i.jsx)("g",{clipPath:`url(#${s})`,children:e.children})]})}const jo=["d","skipAnimation","ownerState"],zo=(0,K.Ay)(Ei.path,{name:"MuiAreaElement",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({stroke:"none",fill:t.gradientId&&`url(#${t.gradientId})`||t.isHighlighted&&to(t.color).brighter(1).formatHex()||to(t.color).brighter(.5).formatHex(),transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:t.isFaded?.3:1}));function Eo(t){const{d:e,skipAnimation:n,ownerState:o}=t,s=(0,g.A)(t,jo),a=fi([bo(e)],{from:{value:0},to:{value:1},enter:{value:1},reset:!1,immediate:n});return(0,i.jsx)(Oo,{skipAnimation:n,id:`${o.id}-area-clip`,children:a((t,e)=>(0,i.jsx)(zo,(0,r.A)({},s,{ownerState:o,d:t.value.to(e)})))})}function Ro(t){const e=q();if(!t)return{isHighlighted:!1,isFaded:!1};const n=e.isHighlighted(t);return{isHighlighted:n,isFaded:!n&&e.isFaded(t)}}const No=["id","classes","color","gradientId","slots","slotProps","onClick"];function $o(t){return(0,D.Ay)("MuiAreaElement",t)}function Bo(t){const{id:e,classes:n,color:o,gradientId:s,slots:a,slotProps:l,onClick:c}=t,u=(0,g.A)(t,No),h=G(),{isFaded:d,isHighlighted:p}=Ro({seriesId:e}),f={id:e,classes:n,color:o,gradientId:s,isFaded:d,isHighlighted:p},m=(t=>{const{classes:e,id:n,isFaded:i,isHighlighted:o}=t,r={root:["root",`series-${n}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(r,$o,e)})(f),y=a?.area??Eo,_=F({elementType:y,externalSlotProps:l?.area,additionalProps:(0,r.A)({},h({type:"line",seriesId:e}),{onClick:c,cursor:c?"pointer":"unset"}),className:m.root,ownerState:f});return(0,i.jsx)(y,(0,r.A)({},u,_))}function Fo(t){return void 0!==t.bandwidth}function Do(t){return Fo(t)?e=>(t(e)??0)+t.bandwidth()/2:e=>t(e)}(0,Z.A)("MuiAreaElement",["root","highlighted","faded"]);const Zo=Math.abs,Ho=Math.atan2,Uo=Math.cos,Wo=Math.max,Vo=Math.min,qo=Math.sin,Go=Math.sqrt,Ko=1e-12,Yo=Math.PI,Xo=Yo/2,Qo=2*Yo;function Jo(t){return t>=1?Xo:t<=-1?-Xo:Math.asin(t)}function tr(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function er(t,e){this._context=t,this._k=(1-e)/6}function nr(t,e){this._context=t,this._alpha=e}er.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:tr(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:tr(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new er(t,e)}return n.tension=function(e){return t(+e)},n}(0),nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(t,e,n){var i=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>Ko){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ko){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,o,r,s,t._x2,t._y2)}(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ir=function t(e){function n(t){return e?new nr(t,e):new er(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function or(t){return t<0?-1:1}function rr(t,e,n){var i=t._x1-t._x0,o=e-t._x1,r=(t._y1-t._y0)/(i||o<0&&-0),s=(n-t._y1)/(o||i<0&&-0),a=(r*o+s*i)/(i+o);return(or(r)+or(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(a))||0}function sr(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ar(t,e,n){var i=t._x0,o=t._y0,r=t._x1,s=t._y1,a=(r-i)/3;t._context.bezierCurveTo(i+a,o+a*e,r-a,s-a*n,r,s)}function lr(t){this._context=t}function cr(t){this._context=new ur(t)}function ur(t){this._context=t}function hr(t){return new lr(t)}function dr(t){return new cr(t)}function pr(t){this._context=t}function fr(t){var e,n,i=t.length-1,o=new Array(i),r=new Array(i),s=new Array(i);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,r[e]=4,s[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,r[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=o[e]/r[e-1],r[e]-=n,s[e]-=n*s[e-1];for(o[i-1]=s[i-1]/r[i-1],e=i-2;e>=0;--e)o[e]=(s[e]-o[e+1])/r[e];for(r[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)r[e]=2*t[e+1]-o[e+1];return[o,r]}function mr(t){return new pr(t)}function gr(t,e){this._context=t,this._t=e}function yr(t){return new gr(t,.5)}function _r(t){return new gr(t,0)}function vr(t){return new gr(t,1)}function xr(t){switch(t){case"catmullRom":return ir.alpha(.5);case"linear":return x;case"monotoneX":default:return hr;case"monotoneY":return dr;case"natural":return mr;case"step":return yr;case"stepBefore":return _r;case"stepAfter":return vr}}function br(e){const{isReversed:n,gradientId:o,size:r,direction:s,scale:a,colorMap:l}=e;return r<=0?null:(0,i.jsx)("linearGradient",{id:o,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${n?1:2}`]:`${r}px`,gradientUnits:"userSpaceOnUse",children:l.thresholds.map((e,o)=>{const s=a(e);if(void 0===s)return null;const c=n?1-s/r:s/r;return(0,i.jsxs)(t.Fragment,{children:[(0,i.jsx)("stop",{offset:c,stopColor:l.colors[o],stopOpacity:1}),(0,i.jsx)("stop",{offset:c,stopColor:l.colors[o+1],stopOpacity:1})]},e.toString()+o)})})}function wr(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ar(t){const{gradientUnits:e,isReversed:n,gradientId:o,size:r,direction:s,scale:a,colorScale:l,colorMap:c}=t,u=[c.min??0,c.max??100],h=u.map(a).filter(t=>void 0!==t);if(2!==h.length)return null;const d="number"==typeof u[0]?yo(u[0],u[1]):wr(u[0],u[1]),p=Math.round((Math.max(...h)-Math.min(...h))/10),f=`${u[0]}-${u[1]}-`;return(0,i.jsx)("linearGradient",{id:o,x1:"0",x2:"0",y1:"0",y2:"0",[`${s}${n?1:2}`]:"objectBoundingBox"===e?1:`${r}px`,gradientUnits:e??"userSpaceOnUse",children:Array.from({length:p+1},(t,e)=>{const o=d(e/p);if(void 0===o)return null;const s=a(o);if(void 0===s)return null;const c=n?1-s/r:s/r,u=l(o);return null===u?null:(0,i.jsx)("stop",{offset:c,stopColor:u,stopOpacity:1},f+e)})})}function Pr(){const{chartId:e}=t.useContext(Co);return t.useCallback((t,n)=>`${e}-gradient-${n}-${t}`,[e])}function kr(){const{top:t,height:e,bottom:n,left:o,width:r,right:s}=Lo(),a=t+e+n,l=o+r+s,c=Pr(),{xAxisIds:u,xAxis:h,yAxisIds:d,yAxis:p}=j();return(0,i.jsxs)("defs",{children:[d.filter(t=>void 0!==p[t].colorMap).map(t=>{const e=c(t,"y"),{colorMap:n,scale:o,colorScale:r,reverse:s}=p[t];return"piecewise"===n?.type?(0,i.jsx)(br,{isReversed:!s,scale:o,colorMap:n,size:a,gradientId:e,direction:"y"},e):"continuous"===n?.type?(0,i.jsx)(Ar,{isReversed:!s,scale:o,colorScale:r,colorMap:n,size:a,gradientId:e,direction:"y"},e):null}),u.filter(t=>void 0!==h[t].colorMap).map(t=>{const e=c(t,"x"),{colorMap:n,scale:o,reverse:r,colorScale:s}=h[t];return"piecewise"===n?.type?(0,i.jsx)(br,{isReversed:r,scale:o,colorMap:n,size:l,gradientId:e,direction:"x"},e):"continuous"===n?.type?(0,i.jsx)(Ar,{isReversed:r,scale:o,colorScale:s,colorMap:n,size:l,gradientId:e,direction:"x"},e):null})]})}lr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ar(this,this._t0,sr(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ar(this,sr(this,n=rr(this,t,e)),n);break;default:ar(this,this._t0,n=rr(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(cr.prototype=Object.create(lr.prototype)).point=function(t,e){lr.prototype.point.call(this,e,t)},ur.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,o,r){this._context.bezierCurveTo(e,t,i,n,r,o)}},Object.defineProperty(mr,"name",{value:"default",configurable:!0}),pr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=fr(t),o=fr(e),r=0,s=1;s<n;++r,++s)this._context.bezierCurveTo(i[0][r],o[0][r],i[1][r],o[1][r],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Object.defineProperty(yr,"name",{value:"default",configurable:!0}),gr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},Object.defineProperty(wr,"name",{value:"default",configurable:!0});const Mr=t.createContext({isInitialized:!1,data:{}});function Cr(){const{isInitialized:e,data:n}=t.useContext(Mr);if(!e)throw new Error(["MUI X: Could not find the series ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}function Ir(){const e=Cr();return t.useMemo(()=>e.line,[e.line])}function Tr(){const e=Cr();return t.useMemo(()=>e.scatter,[e.scatter])}const Lr=t.createContext({isInitialized:!1,data:{skipAnimation:void 0}});function Sr(e){const{isInitialized:n,data:i}=t.useContext(Lr);if(!n)throw new Error(["MUI X: Could not find the animation ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return e||i.skipAnimation}const Or=["slots","slotProps","onItemClick","skipAnimation"];function jr(e){const{slots:n,slotProps:o,onItemClick:s,skipAnimation:a}=e,l=(0,g.A)(e,Or),c=Sr(a),u=Pr(),h=(()=>{const e=Ir(),n=j(),i=t.useMemo(()=>{if(void 0===e)return[];const{series:t,stackingGroups:i}=e,{xAxis:o,yAxis:s,xAxisIds:a,yAxisIds:l}=n,c=a[0],u=l[0];return i.flatMap(({ids:e})=>[...e].reverse().map(e=>{const{xAxisId:n,yAxisId:i,xAxisKey:a=c,yAxisKey:l=u,stackedData:h,data:d,connectNulls:p,baseline:f}=t[e],m=n??a,g=i??l,y=Do(o[m].scale),_=s[g].scale,v=o[m].data,x=s[g].colorScale&&[g,"y"]||o[m].colorScale&&[m,"x"]||void 0,b=S().x(t=>y(t.x)).defined((t,e)=>p||null!=d[e]).y0(t=>{if("number"==typeof f)return _(f);if("max"===f)return _.range()[1];if("min"===f)return _.range()[0];const e=t.y&&_(t.y[0]);return Number.isNaN(e)?_.range()[0]:e}).y1(t=>t.y&&_(t.y[1])),w=xr(t[e].curve),A=v?.map((t,e)=>({x:t,y:h[e]}))??[],P=p?A.filter((t,e)=>null!=d[e]):A,k=b.curve(w)(P)||"";return(0,r.A)({},t[e],{gradientUsed:x,d:k,seriesId:e})}))},[e,n]);return i})();return(0,i.jsx)("g",(0,r.A)({},l,{children:h.map(({d:t,seriesId:e,color:r,area:a,gradientUsed:l})=>!!a&&(0,i.jsx)(Bo,{id:e,d:t,color:r,gradientId:l&&u(...l),slots:n,slotProps:o,onClick:s&&(t=>s(t,{type:"line",seriesId:e})),skipAnimation:c},e))}))}const zr=["d","skipAnimation","ownerState"],Er=(0,K.Ay)(Ei.path,{name:"MuiLineElement",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({strokeWidth:2,strokeLinejoin:"round",fill:"none",stroke:t.gradientId&&`url(#${t.gradientId})`||t.isHighlighted&&to(t.color).brighter(.5).formatHex()||t.color,transition:"opacity 0.2s ease-in, stroke 0.2s ease-in",opacity:t.isFaded?.3:1}));function Rr(t){const{d:e,skipAnimation:n,ownerState:o}=t,s=(0,g.A)(t,zr),a=fi([bo(e)],{from:{value:0},to:{value:1},enter:{value:1},reset:!1,immediate:n});return(0,i.jsx)(Oo,{skipAnimation:n,id:`${o.id}-line-clip`,children:a((t,e)=>(0,i.jsx)(Er,(0,r.A)({},s,{ownerState:o,d:t.value.to(e)})))})}const Nr=["id","classes","color","gradientId","slots","slotProps","onClick"];function $r(t){return(0,D.Ay)("MuiLineElement",t)}function Br(t){const{id:e,classes:n,color:o,gradientId:s,slots:a,slotProps:l,onClick:c}=t,u=(0,g.A)(t,Nr),h=G(),{isFaded:d,isHighlighted:p}=Ro({seriesId:e}),f={id:e,classes:n,color:o,gradientId:s,isFaded:d,isHighlighted:p},m=(t=>{const{classes:e,id:n,isFaded:i,isHighlighted:o}=t,r={root:["root",`series-${n}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(r,$r,e)})(f),y=a?.line??Rr,_=F({elementType:y,externalSlotProps:l?.line,additionalProps:(0,r.A)({},h({type:"line",seriesId:e}),{onClick:c,cursor:c?"pointer":"unset"}),className:m.root,ownerState:f});return(0,i.jsx)(y,(0,r.A)({},u,_))}(0,Z.A)("MuiLineElement",["root","highlighted","faded"]);const Fr=["slots","slotProps","skipAnimation","onItemClick"];function Dr(e){const{slots:n,slotProps:o,skipAnimation:s,onItemClick:a}=e,l=(0,g.A)(e,Fr),c=Sr(s),u=Pr(),h=(()=>{const e=Ir(),n=j();return t.useMemo(()=>{if(void 0===e)return[];const{series:t,stackingGroups:i}=e,{xAxis:o,yAxis:s,xAxisIds:a,yAxisIds:l}=n,c=a[0],u=l[0];return i.flatMap(({ids:e})=>e.flatMap(e=>{const{xAxisId:n,yAxisId:i,xAxisKey:a=c,yAxisKey:l=u,stackedData:h,data:d,connectNulls:p}=t[e],f=n??a,m=i??l,g=Do(o[f].scale),y=s[m].scale,_=o[f].data,v=s[m].colorScale&&[m,"y"]||o[f].colorScale&&[f,"x"]||void 0,x=L().x(t=>g(t.x)).defined((t,e)=>p||null!=d[e]).y(t=>y(t.y[1])),b=_?.map((t,e)=>({x:t,y:h[e]}))??[],w=p?b.filter((t,e)=>null!=d[e]):b,A=x.curve(xr(t[e].curve))(w)||"";return(0,r.A)({},t[e],{gradientUsed:v,d:A,seriesId:e})}))},[e,n])})();return(0,i.jsx)("g",(0,r.A)({},l,{children:h.map(({d:t,seriesId:e,color:r,gradientUsed:s})=>(0,i.jsx)(Br,{id:e,d:t,color:r,gradientId:s&&u(...s),skipAnimation:c,slots:n,slotProps:o,onClick:a&&(t=>a(t,{type:"line",seriesId:e}))},e))}))}var Zr=c(1054);function Hr(){const t=(0,Zr.useTheme)(p.A);return t[f.A]||t}const Ur=["#02B2AF","#2E96FF","#B800D8","#60009B","#2731C8","#03008D"],Wr=["#02B2AF","#72CCFF","#DA00FF","#9001CB","#2E96FF","#3B48E0"],Vr=t=>"dark"===t?Wr:Ur,qr=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Gr=({series:t,colors:e,seriesFormatters:n,dataset:i})=>{const o={};t.forEach((t,n)=>{const{id:i=`auto-generated-id-${n}`,type:s}=t;if(void 0===o[s]&&(o[s]={series:{},seriesOrder:[]}),void 0!==o[s]?.series[i])throw new Error(`MUI X: series' id "${i}" is not unique.`);o[s].series[i]=(0,r.A)({id:i},function(t,e,n=qr){return"pie"===t.type?(0,r.A)({},t,{data:t.data.map((t,e)=>(0,r.A)({color:n[e%n.length]},t))}):(0,r.A)({color:n[e%n.length]},t)}(t,n,e)),o[s].seriesOrder.push(i)});const s={};return Object.keys(n).forEach(t=>{const e=o[t];void 0!==e&&(s[t]=n[t]?.(e,i)??o[t])}),s},Kr=t.createContext({isInitialized:!1,data:{colorProcessors:{},seriesFormatters:{},xExtremumGetters:{},yExtremumGetters:{},rotationExtremumGetters:{},radiusExtremumGetters:{}}});function Yr(e){const{series:n,dataset:o,colors:r=Vr,children:s}=e,a=function(){const{isInitialized:e,data:n}=t.useContext(Kr);if(!e)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.seriesFormatters}(),l=Hr(),c=t.useMemo(()=>({isInitialized:!0,data:Gr({series:n,colors:"function"==typeof r?r(l.palette.mode):r,seriesFormatters:a,dataset:o})}),[n,r,l.palette.mode,a,o]);return(0,i.jsx)(Mr.Provider,{value:c,children:s})}function Xr(t,e){const n=t.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n.matrixTransform(t.getScreenCTM().inverse())}function Qr(){const{isInitialized:e,data:n}=t.useContext(Io);if(!e)throw new Error(["MUI X: Could not find the svg ref context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n}function Jr(t){return t instanceof Date?t.getTime():t}const ts=["children","width","height","viewBox","disableAxisListener","className","title","desc"],es=(0,K.Ay)("svg",{name:"MuiChartsSurface",slot:"Root"})(()=>({touchAction:"none"})),ns=t.forwardRef(function(e,n){const o=m({props:e,name:"MuiChartsSurface"}),{children:s,width:a,height:l,viewBox:c,disableAxisListener:u=!1,className:h,title:d,desc:p}=o,f=(0,g.A)(o,ts),y=(0,r.A)({width:a,height:l,x:0,y:0},c);return(e=>{const n=Qr(),i=Lo(),{xAxis:o,yAxis:r,xAxisIds:s,yAxisIds:a}=j(),{dispatch:l}=t.useContext(H),c=s[0],u=a[0],h=t.useRef({isInChart:!1,x:-1,y:-1});t.useEffect(()=>{const t=n.current;if(null===t||e)return()=>{};function s(t,e){const{scale:n,data:i,reverse:o}=t;if(!Fo(n)){const t=n.invert(e);if(void 0===i)return{value:t,index:-1};const o=Jr(t),r=i?.findIndex((e,n)=>{const r=Jr(e);return r>o&&(0===n||Math.abs(o-r)<=Math.abs(o-Jr(i[n-1])))||r<=o&&(n===i.length-1||Math.abs(Jr(t)-r)<Math.abs(Jr(t)-Jr(i[n+1])))});return{value:void 0!==r&&r>=0?i[r]:t,index:r}}const r=0===n.bandwidth()?Math.floor((e-Math.min(...n.range())+n.step()/2)/n.step()):Math.floor((e-Math.min(...n.range()))/n.step());if(r<0||r>=i.length)return null;if(o){const t=i.length-1-r;return{index:t,value:i[t]}}return{index:r,value:i[r]}}const a=()=>{h.current={isInChart:!1,x:-1,y:-1},l({type:"exitChart"})},d=e=>{const n="targetTouches"in e?e.targetTouches[0]:e,a=Xr(t,n);if(h.current.x=a.x,h.current.y=a.y,!i.isPointInside(a,{targetElement:e.target}))return void(h.current.isInChart&&(l({type:"exitChart"}),h.current.isInChart=!1));h.current.isInChart=!0;const d=s(o[c],a.x),p=s(r[u],a.y);l({type:"updateAxis",data:{x:d,y:p}})},p=t=>{const e=t.currentTarget;e&&e.hasPointerCapture(t.pointerId)&&e.releasePointerCapture(t.pointerId)};return t.addEventListener("pointerdown",p),t.addEventListener("pointermove",d),t.addEventListener("pointerout",a),t.addEventListener("pointercancel",a),t.addEventListener("pointerleave",a),()=>{t.removeEventListener("pointerdown",p),t.removeEventListener("pointermove",d),t.removeEventListener("pointerout",a),t.removeEventListener("pointercancel",a),t.removeEventListener("pointerleave",a)}},[n,l,u,r,c,o,e,i])})(u),(0,i.jsxs)(es,(0,r.A)({width:a,height:l,viewBox:`${y.x} ${y.y} ${y.width} ${y.height}`,ref:n,className:h},f,{children:[(0,i.jsx)("title",{children:d}),(0,i.jsx)("desc",{children:p}),s]}))});function is(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function os(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rs(t){let e,n,i;function o(t,i,o=0,r=t.length){if(o<r){if(0!==e(i,i))return r;do{const e=o+r>>>1;n(t[e],i)<0?o=e+1:r=e}while(o<r)}return o}return 2!==t.length?(e=is,n=(e,n)=>is(t(e),n),i=(e,n)=>t(e)-n):(e=t===is||t===os?t:ss,n=t,i=t),{left:o,center:function(t,e,n=0,r=t.length){const s=o(t,e,n,r-1);return s>n&&i(t[s-1],e)>-i(t[s],e)?s-1:s},right:function(t,i,o=0,r=t.length){if(o<r){if(0!==e(i,i))return r;do{const e=o+r>>>1;n(t[e],i)<=0?o=e+1:r=e}while(o<r)}return o}}}function ss(){return 0}const as=Math.sqrt(50),ls=Math.sqrt(10),cs=Math.sqrt(2);function us(t,e,n){const i=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(i)),r=i/Math.pow(10,o),s=r>=as?10:r>=ls?5:r>=cs?2:1;let a,l,c;return o<0?(c=Math.pow(10,-o)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,o)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?us(t,e,2*n):[a,l,c]}function hs(t,e,n){if(!((n=+n)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[o,r,s]=i?us(e,t,n):us(t,e,n);if(!(r>=o))return[];const a=r-o+1,l=new Array(a);if(i)if(s<0)for(let t=0;t<a;++t)l[t]=(r-t)/-s;else for(let t=0;t<a;++t)l[t]=(r-t)*s;else if(s<0)for(let t=0;t<a;++t)l[t]=(o+t)/-s;else for(let t=0;t<a;++t)l[t]=(o+t)*s;return l}function ds(t,e,n){return us(t=+t,e=+e,n=+n)[2]}function ps(t,e,n){n=+n;const i=(e=+e)<(t=+t),o=i?ds(e,t,n):ds(t,e,n);return(i?-1:1)*(o<0?1/-o:o)}const fs=1e3,ms=6e4,gs=36e5,ys=864e5,_s=6048e5,vs=31536e6,xs=new Date,bs=new Date;function ws(t,e,n,i){function o(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return o.floor=e=>(t(e=new Date(+e)),e),o.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),o.round=t=>{const e=o(t),n=o.ceil(t);return t-e<n-t?e:n},o.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),o.range=(n,i,r)=>{const s=[];if(n=o.ceil(n),r=null==r?1:Math.floor(r),!(n<i&&r>0))return s;let a;do{s.push(a=new Date(+n)),e(n,r),t(n)}while(a<n&&n<i);return s},o.filter=n=>ws(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););}),n&&(o.count=(e,i)=>(xs.setTime(+e),bs.setTime(+i),t(xs),t(bs),Math.floor(n(xs,bs))),o.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(i?e=>i(e)%t===0:e=>o.count(0,e)%t===0):o:null)),o}const As=ws(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);As.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?ws(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):As:null),As.range;const Ps=ws(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*fs)},(t,e)=>(e-t)/fs,t=>t.getUTCSeconds()),ks=(Ps.range,ws(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*fs)},(t,e)=>{t.setTime(+t+e*ms)},(t,e)=>(e-t)/ms,t=>t.getMinutes())),Ms=(ks.range,ws(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ms)},(t,e)=>(e-t)/ms,t=>t.getUTCMinutes())),Cs=(Ms.range,ws(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*fs-t.getMinutes()*ms)},(t,e)=>{t.setTime(+t+e*gs)},(t,e)=>(e-t)/gs,t=>t.getHours())),Is=(Cs.range,ws(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gs)},(t,e)=>(e-t)/gs,t=>t.getUTCHours())),Ts=(Is.range,ws(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ms)/ys,t=>t.getDate()-1)),Ls=(Ts.range,ws(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ys,t=>t.getUTCDate()-1)),Ss=(Ls.range,ws(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ys,t=>Math.floor(t/ys)));function Os(t){return ws(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ms)/_s)}Ss.range;const js=Os(0),zs=Os(1),Es=Os(2),Rs=Os(3),Ns=Os(4),$s=Os(5),Bs=Os(6);function Fs(t){return ws(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/_s)}js.range,zs.range,Es.range,Rs.range,Ns.range,$s.range,Bs.range;const Ds=Fs(0),Zs=Fs(1),Hs=Fs(2),Us=Fs(3),Ws=Fs(4),Vs=Fs(5),qs=Fs(6),Gs=(Ds.range,Zs.range,Hs.range,Us.range,Ws.range,Vs.range,qs.range,ws(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Ks=(Gs.range,ws(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Ys=(Ks.range,ws(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Ys.every=t=>isFinite(t=Math.floor(t))&&t>0?ws(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null,Ys.range;const Xs=ws(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());function Qs(t,e,n,i,o,r){const s=[[Ps,1,fs],[Ps,5,5e3],[Ps,15,15e3],[Ps,30,3e4],[r,1,ms],[r,5,3e5],[r,15,9e5],[r,30,18e5],[o,1,gs],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,ys],[i,2,1728e5],[n,1,_s],[e,1,2592e6],[e,3,7776e6],[t,1,vs]];function a(e,n,i){const o=Math.abs(n-e)/i,r=rs(([,,t])=>t).right(s,o);if(r===s.length)return t.every(ps(e/vs,n/vs,i));if(0===r)return As.every(Math.max(ps(e,n,i),1));const[a,l]=s[o/s[r-1][2]<s[r][2]/o?r-1:r];return a.every(l)}return[function(t,e,n){const i=e<t;i&&([t,e]=[e,t]);const o=n&&"function"==typeof n.range?n:a(t,e,n),r=o?o.range(t,+e+1):[];return i?r.reverse():r},a]}Xs.every=t=>isFinite(t=Math.floor(t))&&t>0?ws(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null,Xs.range;const[Js,ta]=Qs(Xs,Ks,Ds,Ss,Is,Ms),[ea,na]=Qs(Ys,Gs,js,Ts,Cs,ks);function ia(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function oa(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ra(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var sa,aa,la,ca={"-":"",_:" ",0:"0"},ua=/^\s*\d+/,ha=/^%/,da=/[\\^$*+?|[\]().{}]/g;function pa(t,e,n){var i=t<0?"-":"",o=(i?-t:t)+"",r=o.length;return i+(r<n?new Array(n-r+1).join(e)+o:o)}function fa(t){return t.replace(da,"\\$&")}function ma(t){return new RegExp("^(?:"+t.map(fa).join("|")+")","i")}function ga(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function ya(t,e,n){var i=ua.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function _a(t,e,n){var i=ua.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function va(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function xa(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function ba(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function wa(t,e,n){var i=ua.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Aa(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Pa(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ka(t,e,n){var i=ua.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Ma(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Ca(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ia(t,e,n){var i=ua.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Ta(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function La(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Sa(t,e,n){var i=ua.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Oa(t,e,n){var i=ua.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function ja(t,e,n){var i=ua.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function za(t,e,n){var i=ha.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Ea(t,e,n){var i=ua.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Ra(t,e,n){var i=ua.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Na(t,e){return pa(t.getDate(),e,2)}function $a(t,e){return pa(t.getHours(),e,2)}function Ba(t,e){return pa(t.getHours()%12||12,e,2)}function Fa(t,e){return pa(1+Ts.count(Ys(t),t),e,3)}function Da(t,e){return pa(t.getMilliseconds(),e,3)}function Za(t,e){return Da(t,e)+"000"}function Ha(t,e){return pa(t.getMonth()+1,e,2)}function Ua(t,e){return pa(t.getMinutes(),e,2)}function Wa(t,e){return pa(t.getSeconds(),e,2)}function Va(t){var e=t.getDay();return 0===e?7:e}function qa(t,e){return pa(js.count(Ys(t)-1,t),e,2)}function Ga(t){var e=t.getDay();return e>=4||0===e?Ns(t):Ns.ceil(t)}function Ka(t,e){return t=Ga(t),pa(Ns.count(Ys(t),t)+(4===Ys(t).getDay()),e,2)}function Ya(t){return t.getDay()}function Xa(t,e){return pa(zs.count(Ys(t)-1,t),e,2)}function Qa(t,e){return pa(t.getFullYear()%100,e,2)}function Ja(t,e){return pa((t=Ga(t)).getFullYear()%100,e,2)}function tl(t,e){return pa(t.getFullYear()%1e4,e,4)}function el(t,e){var n=t.getDay();return pa((t=n>=4||0===n?Ns(t):Ns.ceil(t)).getFullYear()%1e4,e,4)}function nl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pa(e/60|0,"0",2)+pa(e%60,"0",2)}function il(t,e){return pa(t.getUTCDate(),e,2)}function ol(t,e){return pa(t.getUTCHours(),e,2)}function rl(t,e){return pa(t.getUTCHours()%12||12,e,2)}function sl(t,e){return pa(1+Ls.count(Xs(t),t),e,3)}function al(t,e){return pa(t.getUTCMilliseconds(),e,3)}function ll(t,e){return al(t,e)+"000"}function cl(t,e){return pa(t.getUTCMonth()+1,e,2)}function ul(t,e){return pa(t.getUTCMinutes(),e,2)}function hl(t,e){return pa(t.getUTCSeconds(),e,2)}function dl(t){var e=t.getUTCDay();return 0===e?7:e}function pl(t,e){return pa(Ds.count(Xs(t)-1,t),e,2)}function fl(t){var e=t.getUTCDay();return e>=4||0===e?Ws(t):Ws.ceil(t)}function ml(t,e){return t=fl(t),pa(Ws.count(Xs(t),t)+(4===Xs(t).getUTCDay()),e,2)}function gl(t){return t.getUTCDay()}function yl(t,e){return pa(Zs.count(Xs(t)-1,t),e,2)}function _l(t,e){return pa(t.getUTCFullYear()%100,e,2)}function vl(t,e){return pa((t=fl(t)).getUTCFullYear()%100,e,2)}function xl(t,e){return pa(t.getUTCFullYear()%1e4,e,4)}function bl(t,e){var n=t.getUTCDay();return pa((t=n>=4||0===n?Ws(t):Ws.ceil(t)).getUTCFullYear()%1e4,e,4)}function wl(){return"+0000"}function Al(){return"%"}function Pl(t){return+t}function kl(t){return Math.floor(+t/1e3)}sa=function(t){var e=t.dateTime,n=t.date,i=t.time,o=t.periods,r=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=ma(o),u=ga(o),h=ma(r),d=ga(r),p=ma(s),f=ga(s),m=ma(a),g=ga(a),y=ma(l),_=ga(l),v={a:function(t){return s[t.getDay()]},A:function(t){return r[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Na,e:Na,f:Za,g:Ja,G:el,H:$a,I:Ba,j:Fa,L:Da,m:Ha,M:Ua,p:function(t){return o[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Pl,s:kl,S:Wa,u:Va,U:qa,V:Ka,w:Ya,W:Xa,x:null,X:null,y:Qa,Y:tl,Z:nl,"%":Al},x={a:function(t){return s[t.getUTCDay()]},A:function(t){return r[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:il,e:il,f:ll,g:vl,G:bl,H:ol,I:rl,j:sl,L:al,m:cl,M:ul,p:function(t){return o[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Pl,s:kl,S:hl,u:dl,U:pl,V:ml,w:gl,W:yl,x:null,X:null,y:_l,Y:xl,Z:wl,"%":Al},b={a:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=_.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=g.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return P(t,e,n,i)},d:Ca,e:Ca,f:ja,g:Aa,G:wa,H:Ta,I:Ta,j:Ia,L:Oa,m:Ma,M:La,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:ka,Q:Ea,s:Ra,S:Sa,u:_a,U:va,V:xa,w:ya,W:ba,x:function(t,e,i){return P(t,n,e,i)},X:function(t,e,n){return P(t,i,e,n)},y:Aa,Y:wa,Z:Pa,"%":za};function w(t,e){return function(n){var i,o,r,s=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(o=ca[i=t.charAt(++a)])?i=t.charAt(++a):o="e"===i?" ":"0",(r=e[i])&&(i=r(n,o)),s.push(i),l=a+1);return s.push(t.slice(l,a)),s.join("")}}function A(t,e){return function(n){var i,o,r=ra(1900,void 0,1);if(P(r,t,n+="",0)!=n.length)return null;if("Q"in r)return new Date(r.Q);if("s"in r)return new Date(1e3*r.s+("L"in r?r.L:0));if(e&&!("Z"in r)&&(r.Z=0),"p"in r&&(r.H=r.H%12+12*r.p),void 0===r.m&&(r.m="q"in r?r.q:0),"V"in r){if(r.V<1||r.V>53)return null;"w"in r||(r.w=1),"Z"in r?(o=(i=oa(ra(r.y,0,1))).getUTCDay(),i=o>4||0===o?Zs.ceil(i):Zs(i),i=Ls.offset(i,7*(r.V-1)),r.y=i.getUTCFullYear(),r.m=i.getUTCMonth(),r.d=i.getUTCDate()+(r.w+6)%7):(o=(i=ia(ra(r.y,0,1))).getDay(),i=o>4||0===o?zs.ceil(i):zs(i),i=Ts.offset(i,7*(r.V-1)),r.y=i.getFullYear(),r.m=i.getMonth(),r.d=i.getDate()+(r.w+6)%7)}else("W"in r||"U"in r)&&("w"in r||(r.w="u"in r?r.u%7:"W"in r?1:0),o="Z"in r?oa(ra(r.y,0,1)).getUTCDay():ia(ra(r.y,0,1)).getDay(),r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(o+5)%7:r.w+7*r.U-(o+6)%7);return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,oa(r)):ia(r)}}function P(t,e,n,i){for(var o,r,s=0,a=e.length,l=n.length;s<a;){if(i>=l)return-1;if(37===(o=e.charCodeAt(s++))){if(o=e.charAt(s++),!(r=b[o in ca?e.charAt(s++):o])||(i=r(t,n,i))<0)return-1}else if(o!=n.charCodeAt(i++))return-1}return i}return v.x=w(n,v),v.X=w(i,v),v.c=w(e,v),x.x=w(n,x),x.X=w(i,x),x.c=w(e,x),{format:function(t){var e=w(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),aa=sa.format,sa.parse,la=sa.utcFormat,sa.utcParse;const Ml=rs(is),Cl=Ml.right,Il=(Ml.left,rs(function(t){return null===t?NaN:+t}).center,Cl);function Tl(t,e,n,i,o){var r=t*t,s=r*t;return((1-3*t+3*r-s)*e+(4-6*r+3*s)*n+(1+3*t+3*r-3*s)*i+s*o)/6}function Ll(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],r=t[i+1],s=i>0?t[i-1]:2*o-r,a=i<e-1?t[i+2]:2*r-o;return Tl((n-i/e)*e,s,o,r,a)}}function Sl(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),o=t[(i+e-1)%e],r=t[i%e],s=t[(i+1)%e],a=t[(i+2)%e];return Tl((n-i/e)*e,o,r,s,a)}}Object.defineProperty(Ll,"name",{value:"default",configurable:!0}),Object.defineProperty(Sl,"name",{value:"default",configurable:!0});const Ol=t=>()=>t;function jl(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ol(isNaN(t)?e:t)}(Object.getOwnPropertyDescriptor(Ol,"name")||{}).writable||Object.defineProperty(Ol,"name",{value:"default",configurable:!0});const zl=function t(e){var n=function(t){return 1===(t=+t)?jl:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ol(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=io(t)).r,(e=io(e)).r),o=n(t.g,e.g),r=n(t.b,e.b),s=jl(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=r(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function El(t){return function(e){var n,i,o=e.length,r=new Array(o),s=new Array(o),a=new Array(o);for(n=0;n<o;++n)i=io(e[n]),r[n]=i.r||0,s[n]=i.g||0,a[n]=i.b||0;return r=t(r),s=t(s),a=t(a),i.opacity=1,function(t){return i.r=r(t),i.g=s(t),i.b=a(t),i+""}}}function Rl(t,e){var n,i=e?e.length:0,o=t?Math.min(i,t.length):0,r=new Array(o),s=new Array(i);for(n=0;n<o;++n)r[n]=Bl(t[n],e[n]);for(;n<i;++n)s[n]=e[n];return function(t){for(n=0;n<o;++n)s[n]=r[n](t);return s}}function Nl(t,e){var n,i={},o={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Bl(t[n],e[n]):o[n]=e[n];return function(t){for(n in i)o[n]=i[n](t);return o}}function $l(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,o=e.slice();return function(r){for(n=0;n<i;++n)o[n]=t[n]*(1-r)+e[n]*r;return o}}function Bl(t,e){var n,i,o=typeof e;return null==e||"boolean"===o?Ol(e):("number"===o?yo:"string"===o?(n=to(e))?(e=n,zl):xo:e instanceof to?zl:e instanceof Date?wr:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Rl:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Nl:yo:$l))(t,e)}function Fl(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Dl(t){return+t}El(Ll),El(Sl),Object.defineProperty(function(t,e){return((void 0)(e)?void 0:Rl)(t,e)},"name",{value:"default",configurable:!0}),Object.defineProperty(Nl,"name",{value:"default",configurable:!0}),Object.defineProperty($l,"name",{value:"default",configurable:!0}),Object.defineProperty(Bl,"name",{value:"default",configurable:!0}),Object.defineProperty(Fl,"name",{value:"default",configurable:!0});var Zl=[0,1];function Hl(t){return t}function Ul(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Wl(t,e,n){var i=t[0],o=t[1],r=e[0],s=e[1];return o<i?(i=Ul(o,i),r=n(s,r)):(i=Ul(i,o),r=n(r,s)),function(t){return r(i(t))}}function Vl(t,e,n){var i=Math.min(t.length,e.length)-1,o=new Array(i),r=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)o[s]=Ul(t[s],t[s+1]),r[s]=n(e[s],e[s+1]);return function(e){var n=Il(t,e,1,i)-1;return r[n](o[n](e))}}function ql(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Gl(){var t,e,n,i,o,r,s=Zl,a=Zl,l=Bl,c=Hl;function u(){var t=Math.min(s.length,a.length);return c!==Hl&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),i=t>2?Vl:Wl,o=r=null,h}function h(e){return null==e||isNaN(e=+e)?n:(o||(o=i(s.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((r||(r=i(a,s.map(t),yo)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Dl),u()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=Fl,u()},h.clamp=function(t){return arguments.length?(c=!!t||Hl,u()):c!==Hl},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function Kl(){return Gl()(Hl,Hl)}function Yl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Xl(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}function Ql(t,e){var n,i=0,o=(t=t.slice()).length-1,r=t[i],s=t[o];return s<r&&(n=i,i=o,o=n,n=r,r=s,s=n),t[i]=e.floor(r),t[o]=e.ceil(s),t}function Jl(t){return new Date(t)}function tc(t){return t instanceof Date?+t:+new Date(+t)}function ec(t,e,n,i,o,r,s,a,l,c){var u=Kl(),h=u.invert,d=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),_=c("%b %d"),v=c("%B"),x=c("%Y");function b(t){return(l(t)<t?p:a(t)<t?f:s(t)<t?m:r(t)<t?g:i(t)<t?o(t)<t?y:_:n(t)<t?v:x)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?d(Array.from(t,tc)):d().map(Jl)},u.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},u.tickFormat=function(t,e){return null==e?b:c(e)},u.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(Ql(n,t)):u},u.copy=function(){return ql(u,ec(t,e,n,i,o,r,s,a,l,c))},u}function nc(){return Yl.apply(ec(ea,na,Ys,Gs,js,Ts,Cs,ks,Ps,aa).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}class ic extends Map{constructor(t,e=rc){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(oc(this,t))}has(t){return super.has(oc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}(this,t))}}function oc({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function rc(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const sc=Symbol("implicit");function ac(){var t=new ic,e=[],n=[],i=sc;function o(o){let r=t.get(o);if(void 0===r){if(i!==sc)return i;t.set(o,r=e.push(o)-1)}return n[r%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new ic;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return o},o.range=function(t){return arguments.length?(n=Array.from(t),o):n.slice()},o.unknown=function(t){return arguments.length?(i=t,o):i},o.copy=function(){return ac(e,n).unknown(i)},Yl.apply(o,arguments),o}function lc(){var t,e,n=ac().unknown(void 0),i=n.domain,o=n.range,r=0,s=1,a=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=s<r,d=h?s:r,p=h?r:s;t=(p-d)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),d+=(p-d-t*(n-l))*u,e=t*(1-l),a&&(d=Math.round(d),e=Math.round(e));var f=function(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var i=-1,o=0|Math.max(0,Math.ceil((e-t)/n)),r=new Array(o);++i<o;)r[i]=t+i*n;return r}(n).map(function(e){return d+t*e});return o(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([r,s]=t,r=+r,s=+s,h()):[r,s]},n.rangeRound=function(t){return[r,s]=t,r=+r,s=+s,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return lc(i(),[r,s]).round(a).paddingInner(l).paddingOuter(c).align(u)},Yl.apply(h(),arguments)}function cc(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return cc(e())},t}function uc(){return cc(lc.apply(null,arguments).paddingInner(1))}function hc(t){return"band"===t.scaleType}function dc(t){return"point"===t.scaleType}function pc(){var t,e=[.5],n=[0,1],i=1;function o(o){return null!=o&&o<=o?n[Il(e,o,0,i)]:t}return o.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,n.length-1),o):e.slice()},o.range=function(t){return arguments.length?(n=Array.from(t),i=Math.min(e.length,n.length-1),o):n.slice()},o.invertExtent=function(t){var i=n.indexOf(t);return[e[i-1],e[i]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return pc().domain(e).range(n).unknown(t)},Yl.apply(o,arguments)}var fc,mc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gc(t){if(!(e=mc.exec(t)))throw new Error("invalid format: "+t);var e;return new yc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function yc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _c(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function vc(t,e){if(!isFinite(t)||0===t)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function xc(t){return(t=vc(Math.abs(t)))?t[1]:NaN}function bc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3)))-xc(Math.abs(t)))}function wc(t,e){return function(n,i){for(var o=n.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),r.push(n.substring(o-=a,o+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return r.reverse().join(e)}}function Ac(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}function Pc(t){t:for(var e,n=t.length,i=1,o=-1;i<n;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;default:if(!+t[i])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}function kc(t,e){var n=vc(t,e);if(!n)return fc=void 0,t.toPrecision(e);var i=n[0],o=n[1],r=o-(fc=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return r===s?i:r>s?i+new Array(r-s+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+vc(t,Math.max(0,e+r-1))[0]}function Mc(t,e){var n=vc(t,e);if(!n)return t+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}gc.prototype=yc.prototype,yc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},Object.defineProperty(_c,"name",{value:"default",configurable:!0}),Object.defineProperty(xc,"name",{value:"default",configurable:!0}),Object.defineProperty(bc,"name",{value:"default",configurable:!0}),Object.defineProperty(wc,"name",{value:"default",configurable:!0}),Object.defineProperty(Ac,"name",{value:"default",configurable:!0}),Object.defineProperty(Pc,"name",{value:"default",configurable:!0}),Object.defineProperty(kc,"name",{value:"default",configurable:!0}),Object.defineProperty(Mc,"name",{value:"default",configurable:!0});const Cc={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:_c,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Mc(100*t,e),r:Mc,s:kc,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ic(t){return t}Object.defineProperty(Ic,"name",{value:"default",configurable:!0}),Object.defineProperty(zc,"name",{value:"default",configurable:!0});var Tc,Lc,Sc,Oc=Array.prototype.map,jc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zc(t){var e=void 0===t.grouping||void 0===t.thousands?Ic:wc(Oc.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",r=void 0===t.numerals?Ic:Ac(Oc.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t,c){var u=(t=gc(t)).fill,h=t.align,d=t.sign,p=t.symbol,f=t.zero,m=t.width,g=t.comma,y=t.precision,_=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Cc[v]||(void 0===y&&(y=12),_=!0,v="g"),(f||"0"===u&&"="===h)&&(f=!0,u="0",h="=");var x=(c&&void 0!==c.prefix?c.prefix:"")+("$"===p?n:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():""),b=("$"===p?i:/[%p]/.test(v)?s:"")+(c&&void 0!==c.suffix?c.suffix:""),w=Cc[v],A=/[defgprs%]/.test(v);function P(t){var n,i,s,c=x,p=b;if("c"===v)p=w(t)+p,t="";else{var P=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),_&&(t=Pc(t)),P&&0===+t&&"+"!==d&&(P=!1),c=(P?"("===d?d:a:"-"===d||"("===d?"":d)+c,p=("s"!==v||isNaN(t)||void 0===fc?"":jc[8+fc/3])+p+(P&&"("===d?")":""),A)for(n=-1,i=t.length;++n<i;)if(48>(s=t.charCodeAt(n))||s>57){p=(46===s?o+t.slice(n+1):t.slice(n))+p,t=t.slice(0,n);break}}g&&!f&&(t=e(t,1/0));var k=c.length+t.length+p.length,M=k<m?new Array(m-k+1).join(u):"";switch(g&&f&&(t=e(M+t,M.length?m-p.length:1/0),M=""),h){case"<":t=c+t+p+M;break;case"=":t=c+M+t+p;break;case"^":t=M.slice(0,k=M.length>>1)+c+t+p+M.slice(k);break;default:t=M+c+t+p}return r(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),P.toString=function(){return t+""},P}return{format:c,formatPrefix:function(t,e){var n=3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3))),i=Math.pow(10,-n),o=c(((t=gc(t)).type="f",t),{suffix:jc[8+n/3]});return function(t){return o(i*t)}}}}function Ec(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,xc(e)-xc(t))+1}function Rc(t){return Math.max(0,-xc(Math.abs(t)))}function Nc(t){var e=t.domain;return t.ticks=function(t){var n=e();return hs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return function(t,e,n,i){var o,r=ps(t,e,n);switch((i=gc(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=bc(r,s))||(i.precision=o),Sc(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Ec(r,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=Rc(r))||(i.precision=o-2*("%"===i.type))}return Lc(i)}(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,o,r=e(),s=0,a=r.length-1,l=r[s],c=r[a],u=10;for(c<l&&(o=l,l=c,c=o,o=s,s=a,a=o);u-- >0;){if((o=ds(l,c,n))===i)return r[s]=l,r[a]=c,e(r);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}i=o}return t},t}function $c(){var t=Kl();return t.copy=function(){return ql(t,$c())},Yl.apply(t,arguments),Nc(t)}function Bc(){var t=Nc(function(){var t,e,n,i,o,r=0,s=1,a=Hl,l=!1;function c(e){return null==e||isNaN(e=+e)?o:a(0===n?.5:(e=(i(e)-t)*n,l?Math.max(0,Math.min(1,e)):e))}function u(t){return function(e){var n,i;return arguments.length?([n,i]=e,a=t(n,i),c):[a(0),a(1)]}}return c.domain=function(o){return arguments.length?([r,s]=o,t=i(r=+r),e=i(s=+s),n=t===e?0:1/(e-t),c):[r,s]},c.clamp=function(t){return arguments.length?(l=!!t,c):l},c.interpolator=function(t){return arguments.length?(a=t,c):a},c.range=u(Bl),c.rangeRound=u(Fl),c.unknown=function(t){return arguments.length?(o=t,c):o},function(o){return i=o,t=o(r),e=o(s),n=t===e?0:1/(e-t),c}}()(Hl));return t.copy=function(){return function(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}(t,Bc())},Xl.apply(t,arguments)}function Fc(t){return"piecewise"===t.type?pc(t.thresholds,t.colors):Bc([t.min??0,t.max??100],t.color)}function Dc(t){return t.values?ac(t.values,t.colors).unknown(t.unknownColor??null):ac(t.colors.map((t,e)=>e),t.colors).unknown(t.unknownColor??null)}function Zc(t){return"ordinal"===t.type?Dc(t):Fc(t)}function Hc(t){return"number"==typeof t&&!Number.isFinite(t)}Tc=zc({thousands:",",grouping:[3],currency:["$",""]}),Lc=Tc.format,Sc=Tc.formatPrefix,Object.defineProperty(Ec,"name",{value:"default",configurable:!0}),Object.defineProperty(Rc,"name",{value:"default",configurable:!0});const Uc={start:0,extremities:0,end:1,middle:.5};function Wc(e){const{scale:n,tickNumber:i,valueFormatter:o,tickInterval:r,tickPlacement:s="extremities",tickLabelPlacement:a="middle"}=e;return t.useMemo(()=>{if(Fo(n)){const t=n.domain();return n.bandwidth()>0?[...("function"==typeof r&&t.filter(r)||"object"==typeof r&&r||t).map(t=>({value:t,formattedValue:o?.(t,{location:"tick"})??`${t}`,offset:n(t)-(n.step()-n.bandwidth())/2+Uc[s]*n.step(),labelOffset:"tick"===a?0:n.step()*(Uc[a]-Uc[s])})),..."extremities"===s?[{formattedValue:void 0,offset:n.range()[1],labelOffset:0}]:[]]:("function"==typeof r&&t.filter(r)||"object"==typeof r&&r||t).map(t=>({value:t,formattedValue:o?.(t,{location:"tick"})??`${t}`,offset:n(t),labelOffset:0}))}return n.domain().some(Hc)?[]:("object"==typeof r?r:n.ticks(i)).map(t=>({value:t,formattedValue:o?.(t,{location:"tick"})??n.tickFormat(i)(t),offset:n(t),labelOffset:0}))},[n,r,i,o,s,a])}function Vc(t){return Math.log(t)}function qc(t){return Math.exp(t)}function Gc(t){return-Math.log(-t)}function Kc(t){return-Math.exp(-t)}function Yc(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xc(t){return(e,n)=>-t(-e,n)}function Qc(){const t=function(t){const e=t(Vc,qc),n=e.domain;let i,o,r=10;function s(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(r),o=function(t){return 10===t?Yc:t===Math.E?Math.exp:e=>Math.pow(t,e)}(r),n()[0]<0?(i=Xc(i),o=Xc(o),t(Gc,Kc)):t(Vc,qc),e}return e.base=function(t){return arguments.length?(r=+t,s()):r},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const l=a<s;l&&([s,a]=[a,s]);let c,u,h=i(s),d=i(a);const p=null==t?10:+t;let f=[];if(!(r%1)&&d-h<p){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(c=1;c<r;++c)if(u=h<0?c/o(-h):c*o(h),!(u<s)){if(u>a)break;f.push(u)}}else for(;h<=d;++h)for(c=r-1;c>=1;--c)if(u=h>0?c/o(-h):c*o(h),!(u<s)){if(u>a)break;f.push(u)}2*f.length<p&&(f=hs(s,a,p))}else f=hs(h,d,Math.min(d-h,p)).map(o);return l?f.reverse():f},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===r?"s":","),"function"!=typeof n&&(r%1||null!=(n=gc(n)).precision||(n.trim=!0),n=Lc(n)),t===1/0)return n;const s=Math.max(1,r*t/e.ticks().length);return t=>{let e=t/o(Math.round(i(t)));return e*r<r-.5&&(e*=r),e<=s?n(t):""}},e.nice=()=>n(Ql(n(),{floor:t=>o(Math.floor(i(t))),ceil:t=>o(Math.ceil(i(t)))})),e}(Gl()).domain([1,10]);return t.copy=()=>ql(t,Qc()).base(t.base()),Yl.apply(t,arguments),t}function Jc(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function tu(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function eu(t){return t<0?-t*t:t*t}function nu(){var t=function(t){var e=t(Hl,Hl),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(Hl,Hl):.5===n?t(tu,eu):t(Jc(n),Jc(1/n)):n},Nc(e)}(Gl());return t.copy=function(){return ql(t,nu()).exponent(t.exponent())},Yl.apply(t,arguments),t}function iu(t,e,n){switch(t){case"log":return Qc(e,n);case"pow":return nu(e,n);case"sqrt":return function(){return nu.apply(null,arguments).exponent(.5)}(e,n);case"time":return nc(e,n);case"utc":return function(){return Yl.apply(ec(Js,ta,Xs,Ks,Ds,Ls,Is,Ms,Ps,la).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}(e,n);default:return $c(e,n)}}const ou=(t,e)=>{const n=t[1]-t[0],i=e[1]-e[0];return[t[0]-e[0]*n/i,t[1]+(100-e[1])*n/i]},ru=t=>t?.[0]instanceof Date;function su(t,e){const n=nc(t.data,e);return(e,{location:i})=>"tick"===i?n.tickFormat(t.tickNumber)(e):`${e.toLocaleString()}`}function au({drawingArea:t,formattedSeries:e,axis:n,extremumGetters:i,axisDirection:o,zoomData:s,zoomOptions:a,getFilters:l}){const c={};return n.forEach((n,u)=>{const h=n,d=a?.[h.id],p=s?.find(({axisId:t})=>t===h.id),f=p?[p.start,p.end]:[0,100],m=function(t,e,n){if("rotation"===e){const{startAngle:t=0,endAngle:e=t+360}=n;return n.reverse?[Math.PI*t/180,Math.PI*e/180]:[Math.PI*e/180,Math.PI*t/180]}if("radius"===e){const{minRadius:e=0,maxRadius:i=Math.min(t.width,t.height)/2}=n;return[e,i]}const i="x"===e?[t.left,t.left+t.width]:[t.top+t.height,t.top];return n.reverse?[i[1],i[0]]:i}(t,o,h),[g,y]=((t,e,n,i,o)=>{const r=Object.keys(e).reduce((r,s)=>((t,e,n,i,o,r,s)=>{const a=i[e],l=r[e]?.series??{},[c,u]=a?.({series:l,axis:n,axisIndex:o,isDefaultAxis:0===o,getFilters:s})??[1/0,-1/0],[h,d]=t;return[Math.min(c,h),Math.max(u,d)]})(r,s,t,e,n,i,o),[1/0,-1/0]);return Number.isNaN(r[0])||Number.isNaN(r[1])?[1/0,-1/0]:r})(h,i,u,e,void 0!==p||d?void 0:l),_=h.data??[];if(hc(h)){const t=h.categoryGapRatio??.2,e=h.barGapRatio??.1,n="y"===o?[m[1],m[0]]:m,i=ou(n,f);if(c[h.id]=(0,r.A)({categoryGapRatio:t,barGapRatio:e},h,{data:_,scale:lc(h.data,i).paddingInner(t).paddingOuter(t/2),tickNumber:h.data.length,colorScale:h.colorMap&&("ordinal"===h.colorMap.type?Dc((0,r.A)({values:h.data},h.colorMap)):Zc(h.colorMap))}),ru(h.data)){const t=su(h,n);c[h.id].valueFormatter=h.valueFormatter??t}}if(dc(h)){const t="y"===o?[...m].reverse():m,e=ou(t,f);if(c[h.id]=(0,r.A)({},h,{data:_,scale:uc(h.data,e),tickNumber:h.data.length,colorScale:h.colorMap&&("ordinal"===h.colorMap.type?Dc((0,r.A)({values:h.data},h.colorMap)):Zc(h.colorMap))}),ru(h.data)){const e=su(h,t);c[h.id].valueFormatter=h.valueFormatter??e}}if("band"===h.scaleType||"point"===h.scaleType)return;const v=h.scaleType??"linear",x=h.domainLimit??"nice",b=[h.min??g,h.max??y];if("function"==typeof x){const{min:t,max:e}=x(g,y);b[0]=t,b[1]=e}const w=function(t){const{tickMaxStep:e,tickMinStep:n,tickNumber:i,range:o,domain:r}=t,s=void 0===n?999:Math.floor(Math.abs(r[1]-r[0])/n),a=void 0===e?2:Math.ceil(Math.abs(r[1]-r[0])/e),l=i??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(s,Math.max(a,l))}((0,r.A)({},h,{range:m,domain:b})),A=w/((f[1]-f[0])/100),P=iu(v,b,ou(m,f)),k="nice"===x?P.nice(w):P,[M,C]=k.domain(),I=[h.min??M,h.max??C];c[h.id]=(0,r.A)({},h,{data:_,scaleType:v,scale:k.domain(I),tickNumber:A,colorScale:h.colorMap&&Zc(h.colorMap)})}),{axis:c,axisIds:n.map(({id:t})=>t)}}function lu(e){const{xAxis:n,yAxis:o,children:r}=e,s=Cr(),a=Lo(),l=function(){const{isInitialized:e,data:n}=t.useContext(Kr);if(!e)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.xExtremumGetters}(),c=function(){const{isInitialized:e,data:n}=t.useContext(Kr);if(!e)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return n.yExtremumGetters}(),u=t.useMemo(()=>au({drawingArea:a,formattedSeries:s,axis:n,extremumGetters:l,axisDirection:"x"}),[a,s,n,l]),h=t.useMemo(()=>au({drawingArea:a,formattedSeries:s,axis:o,extremumGetters:c,axisDirection:"y"}),[a,s,o,c]),d=t.useMemo(()=>({isInitialized:!0,data:{xAxis:u.axis,yAxis:h.axis,xAxisIds:u.axisIds,yAxisIds:h.axisIds}}),[u,h]);return(0,i.jsx)(O.Provider,{value:d,children:r})}const cu=t.createContext({zAxis:{},zAxisIds:[]});function uu(e){const{zAxis:n,dataset:o,children:s}=e,a=t.useMemo(()=>n?.map(t=>{const e=t.dataKey;if(void 0===e||void 0!==t.data)return t;if(void 0===o)throw new Error("MUI X: z-axis uses `dataKey` but no `dataset` is provided.");return(0,r.A)({},t,{data:o.map(t=>t[e])})}),[n,o]),l=t.useMemo(()=>{const t=a?.map((t,e)=>(0,r.A)({id:`defaultized-z-axis-${e}`},t))??[],e={};return t.forEach(t=>{e[t.id]=(0,r.A)({},t,{colorScale:t.colorMap&&("ordinal"===t.colorMap.type&&t.data?Dc((0,r.A)({values:t.data},t.colorMap)):Zc("continuous"===t.colorMap.type?(0,r.A)({min:t.min,max:t.max},t.colorMap):t.colorMap))})}),{zAxis:e,zAxisIds:t.map(({id:t})=>t)}},[a]);return(0,i.jsx)(cu.Provider,{value:l,children:s})}var hu=c(2501);const du=(t,e)=>n=>!!t&&("series"===t.fade?n.seriesId===e?.seriesId&&n.dataIndex!==e?.dataIndex:"global"===t.fade&&(n.seriesId!==e?.seriesId||n.dataIndex!==e?.dataIndex)),pu=(t,e)=>n=>!!t&&("series"===t.highlight||"item"===t.highlight&&n.dataIndex===e?.dataIndex)&&n.seriesId===e?.seriesId,fu=["highlighted","faded"];function mu({children:e,highlightedItem:n,onHighlightChange:o}){const[s,a]=(0,hu.A)({controlled:n,default:null,name:"HighlightedProvider",state:"highlightedItem"}),l=Cr(),c=t.useMemo(()=>{const t=new Map;return Object.keys(l).forEach(e=>{const n=l[e];Object.keys(n?.series??{}).forEach(e=>{const i=n?.series[e];t.set(e,(t=>{const e=t??{},{highlighted:n,faded:i}=e,o=(0,g.A)(e,fu);return(0,r.A)({highlight:n,fade:i},o)})(i?.highlightScope))})}),t},[l]),u=s&&s.seriesId?c.get(s.seriesId)??void 0:void 0,h=t.useMemo(()=>({isInitialized:!0,data:{highlightScope:u,highlightedItem:s,setHighlighted:t=>{a(t),o?.(t)},clearHighlighted:()=>{a(null),o?.(null)},isHighlighted:pu(u,s),isFaded:du(u,s)}}),[s,u,a,o]);return(0,i.jsx)(V.Provider,{value:h,children:e})}const gu=(t,e)=>"x"===e?{x:t,y:null}:{x:null,y:t},yu=t=>{const{axis:e,getFilters:n,isDefaultAxis:i}=t,o=n?.({currentAxisId:e.id,isDefaultAxis:i}),r=o?e.data?.filter((t,e)=>o({x:null,y:null},e)):e.data;return[Math.min(...r??[]),Math.max(...r??[])]},_u=t=>e=>{const{series:n,axis:i,getFilters:o,isDefaultAxis:r}=e;return Object.keys(n).filter(t=>{const e=n[t].yAxisId??n[t].yAxisKey;return e===i.id||r&&void 0===e}).reduce((e,s)=>{const{stackedData:a}=n[s],l=o?.({currentAxisId:i.id,isDefaultAxis:r,seriesXAxisId:n[s].xAxisId??n[s].xAxisKey,seriesYAxisId:n[s].yAxisId??n[s].yAxisKey}),[c,u]=a?.reduce((e,n,i)=>!l||l(gu(n[0],t),i)&&l(gu(n[1],t),i)?[Math.min(...n,e[0]),Math.max(...n,e[1])]:e,[1/0,-1/0])??[1/0,-1/0];return[Math.min(c,e[0]),Math.max(u,e[1])]},[1/0,-1/0])};function vu(t,e){if((o=t.length)>1)for(var n,i,o,r=1,s=t[e[0]],a=s.length;r<o;++r)for(i=s,s=t[e[r]],n=0;n<a;++n)s[n][1]+=s[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function xu(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function bu(t,e){return t[e]}function wu(t){const e=[];return e.key=t,e}function Au(){var t=_([]),e=xu,n=vu,i=bu;function o(o){var r,s,a=Array.from(t.apply(this,arguments),wu),l=a.length,c=-1;for(const t of o)for(r=0,++c;r<l;++r)(a[r][c]=[0,+i(t,a[r].key,c,o)]).data=t;for(r=0,s=y(e(a));r<l;++r)a[s[r]].index=r;return n(a,s),a}return o.keys=function(e){return arguments.length?(t="function"==typeof e?e:_(Array.from(e)),o):t},o.value=function(t){return arguments.length?(i="function"==typeof t?t:_(+t),o):i},o.order=function(t){return arguments.length?(e=null==t?xu:"function"==typeof t?t:_(Array.from(t)),o):e},o.offset=function(t){return arguments.length?(n=null==t?vu:t,o):n},o}function Pu(t){var e=t.map(ku);return xu(t).sort(function(t,n){return e[t]-e[n]})}function ku(t){for(var e,n=-1,i=0,o=t.length,r=-1/0;++n<o;)(e=+t[n][1])>r&&(r=e,i=n);return i}function Mu(t){var e=t.map(Cu);return xu(t).sort(function(t,n){return e[t]-e[n]})}function Cu(t){for(var e,n=0,i=-1,o=t.length;++i<o;)(e=+t[i][1])&&(n+=e);return n}function Iu(t){return Mu(t).reverse()}function Tu(t){var e,n,i=t.length,o=t.map(Cu),r=Pu(t),s=0,a=0,l=[],c=[];for(e=0;e<i;++e)n=r[e],s<a?(s+=o[n],l.push(n)):(a+=o[n],c.push(n));return c.reverse().concat(l)}function Lu(t){return xu(t).reverse()}function Su(t,e){if((i=t.length)>0){for(var n,i,o,r=0,s=t[0].length;r<s;++r){for(o=n=0;n<i;++n)o+=t[n][r][1]||0;if(o)for(n=0;n<i;++n)t[n][r][1]/=o}vu(t,e)}}function Ou(t,e){if((a=t.length)>0)for(var n,i,o,r,s,a,l=0,c=t[e[0]].length;l<c;++l)for(r=s=0,n=0;n<a;++n)(o=(i=t[e[n]][l])[1]-i[0])>0?(i[0]=r,i[1]=r+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function ju(t,e){if((n=t.length)>0){for(var n,i=0,o=t[e[0]],r=o.length;i<r;++i){for(var s=0,a=0;s<n;++s)a+=t[s][i][1]||0;o[i][1]+=o[i][0]=-a/2}vu(t,e)}}function zu(t,e){if((o=t.length)>0&&(i=(n=t[e[0]]).length)>0){for(var n,i,o,r=0,s=1;s<i;++s){for(var a=0,l=0,c=0;a<o;++a){for(var u=t[e[a]],h=u[s][1]||0,d=(h-(u[s-1][1]||0))/2,p=0;p<a;++p){var f=t[e[p]];d+=(f[s][1]||0)-(f[s-1][1]||0)}l+=h,c+=d*h}n[s-1][1]+=n[s-1][0]=r,l&&(r-=c/l)}n[s-1][1]+=n[s-1][0]=r,vu(t,e)}}Object.defineProperty(vu,"name",{value:"default",configurable:!0}),Object.defineProperty(xu,"name",{value:"default",configurable:!0}),Object.defineProperty(Au,"name",{value:"default",configurable:!0}),Object.defineProperty(Pu,"name",{value:"default",configurable:!0}),Object.defineProperty(Mu,"name",{value:"default",configurable:!0}),Object.defineProperty(Iu,"name",{value:"default",configurable:!0}),Object.defineProperty(Tu,"name",{value:"default",configurable:!0}),Object.defineProperty(Lu,"name",{value:"default",configurable:!0}),Object.defineProperty(Su,"name",{value:"default",configurable:!0}),Object.defineProperty(Ou,"name",{value:"default",configurable:!0}),Object.defineProperty(ju,"name",{value:"default",configurable:!0}),Object.defineProperty(zu,"name",{value:"default",configurable:!0});const Eu={appearance:Pu,ascending:Mu,descending:Iu,insideOut:Tu,none:xu,reverse:Lu},Ru={expand:Su,diverging:Ou,none:vu,silhouette:ju,wiggle:zu},Nu=t=>{const{series:e,seriesOrder:n,defaultStrategy:i}=t,o=[],r={};return n.forEach(t=>{const{stack:n,stackOrder:s,stackOffset:a}=e[t];void 0===n?o.push({ids:[t],stackingOrder:Eu.none,stackingOffset:Ru.none}):void 0===r[n]?(r[n]=o.length,o.push({ids:[t],stackingOrder:Eu[s??i?.stackOrder??"none"],stackingOffset:Ru[a??i?.stackOffset??"diverging"]})):(o[r[n]].ids.push(t),void 0!==s&&(o[r[n]].stackingOrder=Eu[s]),void 0!==a&&(o[r[n]].stackingOffset=Ru[a]))}),o};function $u(t,e){const n={};return Object.keys(t).forEach(i=>{n[i]=(0,r.A)({},t[i],{valueFormatter:t[i].valueFormatter??e})}),n}const Bu=(t,e,n)=>{const i="vertical"===t.layout,o=i?e?.colorScale:n?.colorScale,r=i?n?.colorScale:e?.colorScale,s=i?e?.data:n?.data;return r?e=>{const n=t.data[e],i=null===n?t.color:r(n);return null===i?t.color:i}:o&&s?e=>{const n=s[e],i=null===n?t.color:o(n);return null===i?t.color:i}:()=>t.color},Fu={seriesType:"bar",seriesFormatter:(t,e)=>{const{seriesOrder:n,series:i}=t,o=Nu(t),s=e??[];n.forEach(t=>{const n=i[t].data;if(void 0!==n)n.forEach((e,n)=>{s.length<=n?s.push({[t]:e}):s[n][t]=e});else if(void 0===e)throw new Error([`MUI X: bar series with id='${t}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join("\n"))});const a={};return o.forEach(t=>{const{ids:n,stackingOffset:o,stackingOrder:l}=t,c=Au().keys(n.map(t=>{const e=i[t].dataKey;return void 0===i[t].data&&void 0!==e?e:t})).value((t,e)=>t[e]??0).order(l).offset(o)(s);n.forEach((t,n)=>{const o=i[t].dataKey;a[t]=(0,r.A)({layout:"vertical"},i[t],{data:o?e.map(t=>{const e=t[o];return"number"!=typeof e?0:e}):i[t].data,stackedData:c[n].map(([t,e])=>[t,e])})})}),{seriesOrder:n,stackingGroups:o,series:$u(a,t=>null==t?"":t.toLocaleString())}},colorProcessor:Bu,xExtremumGetter:t=>Object.keys(t.series).some(e=>"horizontal"===t.series[e].layout)?_u("x")(t):yu(t),yExtremumGetter:t=>Object.keys(t.series).some(e=>"horizontal"===t.series[e].layout)?yu(t):_u("y")(t)},Du=(t,e)=>[null===e[0]?t[0]:Math.min(t[0],e[0]),null===e[1]?t[1]:Math.max(t[1],e[1])],Zu=(t,e,n,i)=>{const o=i?.colorScale,r=n?.colorScale,s=e?.colorScale;return o?e=>{if(void 0!==i?.data?.[e]){const t=o(i?.data?.[e]);if(null!==t)return t}const n=t.data[e],r=null===n?t.color:o(n.z);return null===r?t.color:r}:r?e=>{const n=t.data[e],i=null===n?t.color:r(n.y);return null===i?t.color:i}:s?e=>{const n=t.data[e],i=null===n?t.color:s(n.x);return null===i?t.color:i}:()=>t.color},Hu={seriesType:"scatter",seriesFormatter:({series:t,seriesOrder:e},n)=>({series:Object.fromEntries(Object.entries(t).map(([t,e])=>{const i=e?.datasetKeys,o=["x","y","id"].filter(t=>"string"!=typeof i?.[t]);if(e?.datasetKeys&&o.length>0)throw new Error([`MUI X: scatter series with id='${t}' has incomplete datasetKeys.`,`Properties ${o.map(t=>`"${t}"`).join(", ")} are missing.`].join("\n"));const s=i?n?.map(t=>({x:t[i.x]??null,y:t[i.y]??null,z:i.z&&t[i.z],id:t[i.id]}))??[]:e.data??[];return[t,(0,r.A)({},e,{data:s,valueFormatter:e.valueFormatter??(t=>`(${t.x}, ${t.y})`)})]})),seriesOrder:e}),colorProcessor:Zu,xExtremumGetter:t=>{const{series:e,axis:n,isDefaultAxis:i,getFilters:o}=t;return Object.keys(e).filter(t=>{const o=e[t].xAxisId??e[t].xAxisKey;return o===n.id||void 0===o&&i}).reduce((t,r)=>{const s=o?.({currentAxisId:n.id,isDefaultAxis:i,seriesXAxisId:e[r].xAxisId??e[r].xAxisKey,seriesYAxisId:e[r].yAxisId??e[r].yAxisKey}),a=e[r].data?.reduce((t,e,n)=>s&&!s(e,n)?t:Du(t,[e.x,e.x]),[1/0,-1/0]);return Du(t,a??[1/0,-1/0])},[1/0,-1/0])},yExtremumGetter:t=>{const{series:e,axis:n,isDefaultAxis:i,getFilters:o}=t;return Object.keys(e).filter(t=>{const o=e[t].yAxisId??e[t].yAxisKey;return o===n.id||void 0===o&&i}).reduce((t,r)=>{const s=o?.({currentAxisId:n.id,isDefaultAxis:i,seriesXAxisId:e[r].xAxisId??e[r].xAxisKey,seriesYAxisId:e[r].yAxisId??e[r].yAxisKey}),a=e[r].data?.reduce((t,e,n)=>s&&!s(e,n)?t:Du(t,[e.y,e.y]),[1/0,-1/0]);return Du(t,a??[1/0,-1/0])},[1/0,-1/0])}},Uu=(t,e,n)=>{const i=n?.colorScale,o=e?.colorScale;return i?e=>{const n=t.data[e],o=null===n?t.color:i(n);return null===o?t.color:o}:o?n=>{const i=e.data?.[n],r=null===i?t.color:o(i);return null===r?t.color:r}:()=>t.color},Wu={seriesType:"line",colorProcessor:Uu,seriesFormatter:(t,e)=>{const{seriesOrder:n,series:i}=t,o=Nu((0,r.A)({},t,{defaultStrategy:{stackOffset:"none"}})),s=e??[];n.forEach(t=>{const e=i[t].data;void 0!==e&&e.forEach((e,n)=>{s.length<=n?s.push({[t]:e}):s[n][t]=e})});const a={};return o.forEach(t=>{const{ids:n,stackingOrder:o,stackingOffset:l}=t,c=Au().keys(n.map(t=>{const e=i[t].dataKey;return void 0===i[t].data&&void 0!==e?e:t})).value((t,e)=>t[e]??0).order(o).offset(l)(s);n.forEach((t,n)=>{const o=i[t].dataKey;a[t]=(0,r.A)({},i[t],{data:o?e.map(t=>{const e=t[o];return"number"!=typeof e?null:e}):i[t].data,stackedData:c[n].map(([t,e])=>[t,e])})})}),{seriesOrder:n,stackingGroups:o,series:$u(a,t=>null==t?"":t.toLocaleString())}},xExtremumGetter:t=>{const{axis:e}=t;return[Math.min(...e.data??[]),Math.max(...e.data??[])]},yExtremumGetter:t=>{const{series:e,axis:n,isDefaultAxis:i,getFilters:o}=t;return Object.keys(e).filter(t=>{const o=e[t].yAxisId??e[t].yAxisKey;return o===n.id||i&&void 0===o}).reduce((t,r)=>{const{area:s,stackedData:a}=e[r],l=void 0!==s,c=o?.({currentAxisId:n.id,isDefaultAxis:i,seriesXAxisId:e[r].xAxisId??e[r].xAxisKey,seriesYAxisId:e[r].yAxisId??e[r].yAxisKey}),u=function(t,e,n){return e.reduce((e,i,o)=>{const[r,s]=t(i);return!n||n({y:r,x:null},o)&&n({y:s,x:null},o)?[Math.min(r,s,e[0]),Math.max(r,s,e[1])]:e},[1/0,-1/0])}(l&&"log"!==n.scaleType&&"string"!=typeof e[r].baseline?t=>t:t=>[t[1],t[1]],a,c),[h,d]=u;return[Math.min(h,t[0]),Math.max(d,t[1])]},[1/0,-1/0])}};function Vu(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function qu(t){return t}function Gu(){var t=qu,e=Vu,n=null,i=_(0),o=_(Qo),r=_(0);function s(s){var a,l,c,u,h,d=(s=y(s)).length,p=0,f=new Array(d),m=new Array(d),g=+i.apply(this,arguments),_=Math.min(Qo,Math.max(-Qo,o.apply(this,arguments)-g)),v=Math.min(Math.abs(_)/d,r.apply(this,arguments)),x=v*(_<0?-1:1);for(a=0;a<d;++a)(h=m[f[a]=a]=+t(s[a],a,s))>0&&(p+=h);for(null!=e?f.sort(function(t,n){return e(m[t],m[n])}):null!=n&&f.sort(function(t,e){return n(s[t],s[e])}),a=0,c=p?(_-d*x)/p:0;a<d;++a,g=u)l=f[a],u=g+((h=m[l])>0?h*c:0)+x,m[l]={data:s[l],index:a,value:h,startAngle:g,endAngle:u,padAngle:v};return m}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:_(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:_(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:_(+t),s):r},s}function Ku(t,e){return"function"==typeof t?t(e):t}Object.defineProperty(Vu,"name",{value:"default",configurable:!0}),Object.defineProperty(qu,"name",{value:"default",configurable:!0}),Object.defineProperty(Gu,"name",{value:"default",configurable:!0});const Yu=[Fu,Hu,Wu,{seriesType:"pie",colorProcessor:t=>e=>t.data[e].color,seriesFormatter:t=>{const{seriesOrder:e,series:n}=t,i={};return e.forEach(t=>{const e=Gu().startAngle(2*Math.PI*(n[t].startAngle??0)/360).endAngle(2*Math.PI*(n[t].endAngle??360)/360).padAngle(2*Math.PI*(n[t].paddingAngle??0)/360).sortValues(((t="none")=>{if("function"==typeof t)return t;switch(t){case"none":default:return null;case"desc":return(t,e)=>e-t;case"asc":return(t,e)=>t-e}})(n[t].sortingValues??"none"))(n[t].data.map(t=>t.value));i[t]=(0,r.A)({valueFormatter:t=>t.value.toLocaleString()},n[t],{data:n[t].data.map((n,i)=>(0,r.A)({},n,{id:n.id??`auto-generated-pie-id-${t}-${i}`},e[i])).map((e,i)=>(0,r.A)({},e,{formattedValue:n[t].valueFormatter?.((0,r.A)({},e,{label:Ku(e.label,"arc")}),{dataIndex:i})??e.value.toLocaleString()}))})}),{seriesOrder:e,series:i}}}];function Xu(t){const e=t??Yu,n={},i={},o={},r={},s={},a={};for(let t=0;t<e.length;t+=1){const l=e[t],c=l.seriesType;n[c]=l.seriesFormatter,i[c]=l.colorProcessor,l.xExtremumGetter&&(o[c]=l.xExtremumGetter),l.yExtremumGetter&&(r[c]=l.yExtremumGetter),l.rotationExtremumGetter&&(s[c]=l.rotationExtremumGetter),l.radiusExtremumGetter&&(a[c]=l.radiusExtremumGetter)}return{seriesFormatters:n,colorProcessors:i,xExtremumGetters:o,yExtremumGetters:r,rotationExtremumGetters:s,radiusExtremumGetters:a}}function Qu(e){const{children:n,plugins:o}=e,r=t.useMemo(()=>({isInitialized:!0,data:Xu(o)}),[o]);return(0,i.jsx)(Kr.Provider,{value:r,children:n})}const Ju=(t,e,n)=>{const i="x"===n?Po:ko;return[...t?.map((t,e)=>(0,r.A)({id:`defaultized-${n}-axis-${e}`},t))??[],...void 0===t||-1===t.findIndex(({id:t})=>t===i)?[{id:i,scaleType:"linear"}]:[]].map(t=>{const i=t.dataKey;if(void 0===i||void 0!==t.data)return t;if(void 0===e)throw new Error(`MUI X: ${n}-axis uses \`dataKey\` but no \`dataset\` is provided.`);return(0,r.A)({},t,{data:e.map(t=>t[i])})})},th=["width","height","series","margin","xAxis","yAxis","zAxis","colors","dataset","sx","title","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","children","skipAnimation"];function eh(e){const{children:n,skipAnimation:o}=e,r="undefined"==typeof window||!window?.matchMedia,[s,a]=t.useState(r||void 0);$e(()=>{if(r)return;const t=t=>{const e=t.matches||void 0;a(e),mt.assign({skipAnimation:e})},e=window.matchMedia("(prefers-reduced-motion)");return t(e),e?.addEventListener?.("change",t),()=>{e?.removeEventListener?.("change",t)}},[]);const l=t.useMemo(()=>({isInitialized:!0,data:{skipAnimation:o||s}}),[s,o]);return(0,i.jsx)(Lr.Provider,{value:l,children:n})}const nh=t.forwardRef(function(e,n){const{children:o,drawingProviderProps:s,seriesProviderProps:a,cartesianProviderProps:l,zAxisContextProps:c,highlightedProviderProps:u,chartsSurfaceProps:h,pluginProviderProps:d,animationProviderProps:p}=((e,n)=>{const{width:i,height:o,series:s,margin:a,xAxis:l,yAxis:c,zAxis:u,colors:h,dataset:d,sx:p,title:f,desc:m,disableAxisListener:y,highlightedItem:_,onHighlightChange:v,plugins:x,children:b,skipAnimation:w}=e,A=(0,g.A)(e,th),P=t.useRef(null),k=(0,E.A)(n,P),[M,C]=((e,n,i)=>[t.useMemo(()=>Ju(e,i,"x"),[e,i]),t.useMemo(()=>Ju(n,i,"y"),[n,i])])(l,c,d),I={skipAnimation:w},T={plugins:x};return{children:b,drawingProviderProps:{width:i,height:o,margin:a,svgRef:P},seriesProviderProps:{series:s,colors:h,dataset:d},cartesianProviderProps:{xAxis:M,yAxis:C,dataset:d},zAxisContextProps:{zAxis:u,dataset:d},highlightedProviderProps:{highlightedItem:_,onHighlightChange:v},chartsSurfaceProps:(0,r.A)({},A,{width:i,height:o,ref:k,sx:p,title:f,desc:m,disableAxisListener:y}),pluginProviderProps:T,animationProviderProps:I,xAxis:M,yAxis:C}})(e,n);return(0,i.jsx)(To,(0,r.A)({},s,{children:(0,i.jsx)(Qu,(0,r.A)({},d,{children:(0,i.jsx)(Yr,(0,r.A)({},a,{children:(0,i.jsx)(lu,(0,r.A)({},l,{children:(0,i.jsx)(uu,(0,r.A)({},c,{children:(0,i.jsx)(W,{children:(0,i.jsx)(mu,(0,r.A)({},u,{children:(0,i.jsxs)(ns,(0,r.A)({},h,{children:[(0,i.jsx)(kr,{}),(0,i.jsx)(eh,(0,r.A)({},p,{children:o}))]}))}))})}))}))}))}))}))}),ih=(0,K.Ay)("div",{name:"MuiResponsiveChart",slot:"Container"})(({ownerState:t})=>({width:t.width??"100%",height:t.height??"100%",display:"flex",position:"relative",flexGrow:1,flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden","&>svg":{width:"100%",height:"100%"}}));var oh=c(1529),rh=c(4877);const sh=["width","height","resolveSizeBeforeRender","margin","children","series","colors","dataset","desc","disableAxisListener","highlightedItem","onHighlightChange","plugins","sx","title","viewBox","xAxis","yAxis","zAxis","skipAnimation"],ah=t.forwardRef(function(e,n){const{hasIntrinsicSize:o,chartContainerProps:s,resizableChartContainerProps:a}=((e,n)=>{const{width:i,height:o,resolveSizeBeforeRender:s,margin:a,children:l,series:c,colors:u,dataset:h,desc:d,disableAxisListener:p,highlightedItem:f,onHighlightChange:m,plugins:y,sx:_,title:v,viewBox:x,xAxis:b,yAxis:w,zAxis:A,skipAnimation:P}=e,k=(0,g.A)(e,sh),{containerRef:M,width:C,height:I}=((e,n,i)=>{const o=t.useRef({displayError:!1,initialCompute:!0,computeRun:0}),r=t.useRef(null),[s,a]=t.useState(0),[l,c]=t.useState(0),u=t.useCallback(()=>{const t=r?.current;if(!t)return{};const e=(0,rh.A)(t).getComputedStyle(t),n=Math.floor(parseFloat(e.height))||0,i=Math.floor(parseFloat(e.width))||0;return a(i),c(n),{width:i,height:n}},[]);return t.useEffect(()=>{o.current.displayError=!0},[]),(0,oh.A)(()=>{if(!i||!o.current.initialCompute||o.current.computeRun>20)return;const t=u();t.width!==s||t.height!==l?o.current.computeRun+=1:o.current.initialCompute&&(o.current.initialCompute=!1)},[s,l,u,i]),(0,oh.A)(()=>{if(void 0!==e&&void 0!==n)return()=>{};u();const t=r.current;if("undefined"==typeof ResizeObserver)return()=>{};let i;const o=new ResizeObserver(()=>{i=requestAnimationFrame(()=>{u()})});return t&&o.observe(t),()=>{i&&cancelAnimationFrame(i),t&&o.unobserve(t)}},[u,n,e]),{containerRef:r,width:e??s,height:n??l}})(i,o,s);return{hasIntrinsicSize:C&&I,chartContainerProps:{margin:a,children:l,series:c,colors:u,dataset:h,desc:d,disableAxisListener:p,highlightedItem:f,onHighlightChange:m,plugins:y,sx:_,title:v,viewBox:x,xAxis:b,yAxis:w,zAxis:A,skipAnimation:P,width:C,height:I,ref:n},resizableChartContainerProps:(0,r.A)({},k,{ownerState:{width:i,height:o},ref:M})}})(e,n);return(0,i.jsx)(ih,(0,r.A)({},a,{children:o?(0,i.jsx)(nh,(0,r.A)({},s)):null}))});function lh(t){return(0,D.Ay)("MuiMarkElement",t)}new Set,(0,Z.A)("MuiMarkElement",["root","highlighted","faded"]);const ch=t=>{const{classes:e,id:n,isFaded:i,isHighlighted:o}=t,r={root:["root",`series-${n}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(r,lh,e)},uh=["x","y","id","classes","color","dataIndex","onClick","skipAnimation","shape"];function hh(e){const{x:n,y:o,id:s,classes:a,color:l,dataIndex:c,onClick:u,skipAnimation:h,shape:d}=e,p=(0,g.A)(e,uh);"circle"!==d&&[`MUI X: The mark element of your line chart have shape "${d}" which is not supported when using \`experimentalRendering=true\`.`,'Only "circle" are supported with `experimentalRendering`.'].join("\n");const f=Hr(),m=G(),{isFaded:y,isHighlighted:_}=Ro({seriesId:s}),{axis:v}=t.useContext(H),x=pi({to:{x:n,y:o},immediate:h}),b={id:s,classes:a,isHighlighted:v.x?.index===c||_,isFaded:y,color:l},w=ch(b);return(0,i.jsx)(Ei.circle,(0,r.A)({},p,{cx:x.x,cy:x.y,r:5,fill:(f.vars||f).palette.background.paper,stroke:l,strokeWidth:2,className:w.root,onClick:u,cursor:u?"pointer":"unset"},m({type:"line",seriesId:s,dataIndex:c})))}Go(3);const dh={draw(t,e){const n=Go(e/Yo);t.moveTo(n,0),t.arc(0,0,n,0,Qo)}},ph={draw(t,e){const n=Go(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},fh=Go(1/3),mh=2*fh,gh={draw(t,e){const n=Go(e/mh),i=n*fh;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},yh={draw(t,e){const n=Go(e),i=-n/2;t.rect(i,i,n,n)}},_h=qo(Yo/10)/qo(7*Yo/10),vh=qo(Qo/10)*_h,xh=-Uo(Qo/10)*_h,bh={draw(t,e){const n=Go(.8908130915292852*e),i=vh*n,o=xh*n;t.moveTo(0,-n),t.lineTo(i,o);for(let e=1;e<5;++e){const r=Qo*e/5,s=Uo(r),a=qo(r);t.lineTo(a*n,-s*n),t.lineTo(s*i-a*o,a*i+s*o)}t.closePath()}},wh=Go(3),Ah={draw(t,e){const n=-Go(e/(3*wh));t.moveTo(0,2*n),t.lineTo(-wh*n,-n),t.lineTo(wh*n,-n),t.closePath()}},Ph=(Go(3),-.5),kh=Go(3)/2,Mh=1/Go(12),Ch=3*(Mh/2+1),Ih=[dh,ph,gh,yh,bh,Ah,{draw(t,e){const n=Go(e/Ch),i=n/2,o=n*Mh,r=i,s=n*Mh+n,a=-r,l=s;t.moveTo(i,o),t.lineTo(r,s),t.lineTo(a,l),t.lineTo(Ph*i-kh*o,kh*i+Ph*o),t.lineTo(Ph*r-kh*s,kh*r+Ph*s),t.lineTo(Ph*a-kh*l,kh*a+Ph*l),t.lineTo(Ph*i+kh*o,Ph*o-kh*i),t.lineTo(Ph*r+kh*s,Ph*s-kh*r),t.lineTo(Ph*a+kh*l,Ph*l-kh*a),t.closePath()}}];function Th(t,e){let n=null,i=C(o);function o(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return t="function"==typeof t?t:_(t||dh),e="function"==typeof e?e:_(void 0===e?64:+e),o.type=function(e){return arguments.length?(t="function"==typeof e?e:_(e),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),o):e},o.context=function(t){return arguments.length?(n=null==t?null:t,o):n},o}function Lh(t){return"circle cross diamond square star triangle wye".split(/ /).indexOf(t)||0}const Sh=["x","y","id","classes","color","shape","dataIndex","onClick","skipAnimation"],Oh=(0,K.Ay)(Ei.path,{name:"MuiMarkElement",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t,theme:e})=>({fill:(e.vars||e).palette.background.paper,stroke:t.color,strokeWidth:2}));function jh(e){const{x:n,y:o,id:s,classes:a,color:l,shape:c,dataIndex:u,onClick:h,skipAnimation:d}=e,p=(0,g.A)(e,Sh),f=G(),{isFaded:m,isHighlighted:y}=Ro({seriesId:s}),{axis:_}=t.useContext(H),v=pi({to:{x:n,y:o},immediate:d}),x={id:s,classes:a,isHighlighted:_.x?.index===u||y,isFaded:m,color:l},b=ch(x);return(0,i.jsx)(Oh,(0,r.A)({},p,{style:{transform:xi([v.x,v.y],(t,e)=>`translate(${t}px, ${e}px)`),transformOrigin:xi([v.x,v.y],(t,e)=>`${t}px ${e}px`)},ownerState:x,className:b.root,d:Th(Ih[Lh(c)])(),onClick:h,cursor:h?"pointer":"unset"},f({type:"line",seriesId:s,dataIndex:u})))}const zh=["slots","slotProps","skipAnimation","onItemClick","experimentalRendering"];function Eh(t){const{slots:e,slotProps:n,skipAnimation:o,onItemClick:s,experimentalRendering:a}=t,l=(0,g.A)(t,zh),c=Sr(o),u=Ir(),h=j(),d=So(),p=Lo(),f=e?.mark??(a?hh:jh);if(void 0===u)return null;const{series:m,stackingGroups:y}=u,{xAxis:_,yAxis:v,xAxisIds:x,yAxisIds:b}=h,w=x[0],A=b[0];return(0,i.jsx)("g",(0,r.A)({},l,{children:y.flatMap(({ids:t})=>t.map(t=>{const{xAxisId:e,yAxisId:o,xAxisKey:a=w,yAxisKey:l=A,stackedData:u,data:h,showMark:g=!0}=m[t];if(!1===g)return null;const y=e??a,x=o??l,b=Do(_[y].scale),P=v[x].scale,k=_[y].data;if(void 0===k)throw new Error(`MUI X: ${y===Po?"The first `xAxis`":`The x-axis with id "${y}"`} should have data property to be able to display a line plot.`);const M=wo(`${d}-${t}-line-clip`),C=Uu(m[t],_[y],v[x]);return(0,i.jsx)("g",{clipPath:`url(#${M})`,children:k?.map((t,e)=>{const n=null==h[e]?null:u[e][1];return{x:b(t),y:null===n?null:P(n),position:t,value:n,index:e}}).filter(({x:t,y:e,index:n,position:i,value:o})=>null!==o&&null!==e&&!!p.isPointInside({x:t,y:e})&&(!0===g||g({x:t,y:e,index:n,position:i,value:o}))).map(({x:e,y:o,index:a})=>(0,i.jsx)(f,(0,r.A)({id:t,dataIndex:a,shape:"circle",color:C(a),x:e,y:o,skipAnimation:c,onClick:s&&(e=>s(e,{type:"line",seriesId:t,dataIndex:a}))},n?.mark),`${t}-${a}`))},t)}))}))}function Rh(t){return(0,D.Ay)("MuiChartsAxis",t)}const Nh=(0,Z.A)("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right"]),$h=(0,K.Ay)("g",{name:"MuiChartsAxis",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({[`& .${Nh.tickLabel}`]:(0,r.A)({},t.typography.caption,{fill:(t.vars||t).palette.text.primary}),[`& .${Nh.label}`]:(0,r.A)({},t.typography.body1,{fill:(t.vars||t).palette.text.primary}),[`& .${Nh.line}`]:{stroke:(t.vars||t).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${Nh.tick}`]:{stroke:(t.vars||t).palette.text.primary,shapeRendering:"crispEdges"}})),Bh={widthCache:{},cacheCount:0},Fh={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Dh=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],Zh="mui_measurement_span";function Hh(t,e){return Dh.indexOf(t)>=0&&e===+e?`${e}px`:e}function Uh(t){return t.split("").reduce((t,e)=>e===e.toUpperCase()?[...t,"-",e.toLowerCase()]:[...t,e],[]).join("")}let Wh;function Vh({style:t,needsComputation:e,text:n}){return n.split("\n").map(n=>(0,r.A)({text:n},e?((t,e={})=>{if(null==t||"undefined"==typeof window)return{width:0,height:0};const n=`${t}`,i=(t=>Object.keys(t).sort().reduce((e,n)=>`${e}${Uh(n)}:${Hh(n,t[n])};`,""))(e),o=`${n}-${i}`;if(Bh.widthCache[o])return Bh.widthCache[o];try{let t=document.getElementById(Zh);null===t&&(t=document.createElement("span"),t.setAttribute("id",Zh),t.setAttribute("aria-hidden","true"),document.body.appendChild(t));const i=(0,r.A)({},Fh,e);Object.keys(i).map(e=>(t.style[Uh(e)]=Hh(e,i[e]),e)),t.textContent=n;const s=t.getBoundingClientRect(),a={width:s.width,height:s.height};return Bh.widthCache[o]=a,Bh.cacheCount+1>2e3?(Bh.cacheCount=0,Bh.widthCache={}):Bh.cacheCount+=1,Wh&&clearTimeout(Wh),Wh=setTimeout(()=>{t.textContent=""},0),a}catch{return{width:0,height:0}}})(n,t):{width:0,height:0}))}const qh=["x","y","style","text","ownerState"],Gh=["angle","textAnchor","dominantBaseline"];function Kh(e){const{x:n,y:o,style:s,text:a}=e,l=(0,g.A)(e,qh),c=s??{},{angle:u,textAnchor:h,dominantBaseline:d}=c,p=(0,g.A)(c,Gh),f=t.useMemo(()=>Vh({style:p,needsComputation:a.includes("\n"),text:a}),[p,a]);let m;switch(d){case"hanging":m=0;break;case"central":m=(f.length-1)/2*-f[0].height;break;default:m=(f.length-1)*-f[0].height}const y=[];return u&&y.push(`rotate(${u}, ${n}, ${o})`),(0,i.jsx)("text",(0,r.A)({},l,{transform:y.length>0?y.join(" "):void 0,x:n,y:o,textAnchor:h,dominantBaseline:d,style:p,children:f.map((t,e)=>(0,i.jsx)("tspan",{x:n,dy:`${0===e?m:f[0].height}px`,dominantBaseline:d,children:t.text},e))}))}const Yh=["scale","tickNumber","reverse"];const Xh=(0,K.Ay)($h,{name:"MuiChartsXAxis",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Qh={position:"bottom",disableLine:!1,disableTicks:!1,tickSize:6};function Jh(e){const{xAxisIds:n,xAxis:o}=j(),s=o[e.axisId??n[0]],{scale:a,tickNumber:l,reverse:c}=s,u=(0,g.A)(s,Yh),h=function(e=!1){const[n,i]=t.useState(!1);return(0,oh.A)(()=>{e||i(!0)},[e]),t.useEffect(()=>{e&&i(!0)},[e]),n}(),d=m({props:(0,r.A)({},u,e),name:"MuiChartsXAxis"}),p=(0,r.A)({},Qh,d),{position:f,disableLine:y,disableTicks:_,tickLabelStyle:v,label:x,labelStyle:b,tickFontSize:w,labelFontSize:A,tickSize:P,valueFormatter:k,slots:M,slotProps:C,tickInterval:I,tickLabelInterval:T,tickPlacement:L,tickLabelPlacement:S,sx:O}=p,E=Hr(),R=(t=>{const{classes:e,position:n}=t,i={root:["root","directionX",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]};return(0,z.A)(i,Rh,e)})((0,r.A)({},p,{theme:E})),{left:N,top:$,width:B,height:D,isPointInside:Z}=Lo(),H=_?4:P,U="bottom"===f?1:-1,W=M?.axisLine??"line",V=M?.axisTick??"line",q=M?.axisTickLabel??Kh,G=M?.axisLabel??Kh,K=F({elementType:q,externalSlotProps:C?.axisTickLabel,additionalProps:{style:(0,r.A)({textAnchor:"middle",dominantBaseline:"bottom"===f?"hanging":"auto",fontSize:w??12},v)},className:R.tickLabel,ownerState:{}}),Y=function(t,{tickLabelStyle:e,tickLabelInterval:n,reverse:i,isMounted:o}){const s=t.map(t=>{if(!o||void 0===t.formattedValue)return(0,r.A)({},t,{width:0,height:0});const n=Vh({style:e,needsComputation:!0,text:t.formattedValue});return(0,r.A)({},t,{width:Math.max(...n.map(t=>t.width)),height:Math.max(n.length*n[0].height)})});if("function"==typeof n)return s.map((t,e)=>(0,r.A)({},t,{skipLabel:!n(t.value,e)}));let a=0,l=0;const c=i?-1:1;return s.map((t,n)=>{const{width:i,offset:o,labelOffset:s,height:u}=t,h=function(t,e,n=0){const i=Math.min(Math.abs(n)%180,Math.abs(Math.abs(n)%180-180)%180);if(i<5)return t;if(i>85)return e;const o=i*Math.PI/180;return o<Math.atan2(e,t)?t/Math.cos(o):e/Math.sin(o)}(i,u,e?.angle),d=o+s;return a=d-c*(1.2*h)/2,n>0&&c*a<c*l?(0,r.A)({},t,{skipLabel:!0}):(l=d+c*(1.2*h)/2,t)})}(Wc({scale:a,tickNumber:l,valueFormatter:k,tickInterval:I,tickPlacement:L,tickLabelPlacement:S}),{tickLabelStyle:K.style,tickLabelInterval:T,reverse:c,isMounted:h}),X={x:N+B/2,y:U*(H+22)},Q=F({elementType:G,externalSlotProps:C?.axisLabel,additionalProps:{style:(0,r.A)({fontSize:A??14,textAnchor:"middle",dominantBaseline:"bottom"===f?"hanging":"auto"},b)},ownerState:{}}),J=a.domain(),tt=Fo(a);return tt&&0===J.length||!tt&&J.some(Hc)?null:(0,i.jsxs)(Xh,{transform:`translate(0, ${"bottom"===f?$+D:$})`,className:R.root,sx:O,children:[!y&&(0,i.jsx)(W,(0,r.A)({x1:N,x2:N+B,className:R.line},C?.axisLine)),Y.map(({formattedValue:t,offset:e,labelOffset:n,skipLabel:o},s)=>{const a=n??0,l=U*(H+3),c=Z({x:e,y:-1},{direction:"x"}),u=Z({x:e+a,y:-1},{direction:"x"});return(0,i.jsxs)("g",{transform:`translate(${e}, 0)`,className:R.tickContainer,children:[!_&&c&&(0,i.jsx)(V,(0,r.A)({y2:U*H,className:R.tick},C?.axisTick)),void 0!==t&&!o&&u&&(0,i.jsx)(q,(0,r.A)({x:a,y:l},K,{text:t.toString()}))]},s)}),x&&(0,i.jsx)("g",{className:R.label,children:(0,i.jsx)(G,(0,r.A)({},X,Q,{text:x}))})]})}const td=t.createContext(),ed=()=>{const e=t.useContext(td);return null!=e&&e},nd=["scale","tickNumber"],id=(0,K.Ay)($h,{name:"MuiChartsYAxis",slot:"Root",overridesResolver:(t,e)=>e.root})({}),od={position:"left",disableLine:!1,disableTicks:!1,tickFontSize:12,labelFontSize:14,tickSize:6};function rd(t){const{yAxisIds:e,yAxis:n}=j(),o=n[t.axisId??e[0]],{scale:s,tickNumber:a}=o,l=(0,g.A)(o,nd),c=m({props:(0,r.A)({},l,t),name:"MuiChartsYAxis"}),u=(0,r.A)({},od,c),{position:h,disableLine:d,disableTicks:p,tickFontSize:f,label:y,labelFontSize:_,labelStyle:v,tickLabelStyle:x,tickSize:b,valueFormatter:w,slots:A,slotProps:P,tickPlacement:k,tickLabelPlacement:M,tickInterval:C,tickLabelInterval:I,sx:T}=u,L=Hr(),S=ed(),O=(t=>{const{classes:e,position:n}=t,i={root:["root","directionY",n],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]};return(0,z.A)(i,Rh,e)})((0,r.A)({},u,{theme:L})),{left:E,top:R,width:N,height:$,isPointInside:B}=Lo(),D=p?4:b,Z=Wc({scale:s,tickNumber:a,valueFormatter:w,tickPlacement:k,tickLabelPlacement:M,tickInterval:C}),H="right"===h?1:-1,U={x:H*(f+D+10),y:R+$/2},W=A?.axisLine??"line",V=A?.axisTick??"line",q=A?.axisTickLabel??Kh,G=A?.axisLabel??Kh,K=!S&&"right"===h||S&&"right"!==h,Y=F({elementType:q,externalSlotProps:P?.axisTickLabel,additionalProps:{style:(0,r.A)({fontSize:f,textAnchor:K?"start":"end",dominantBaseline:"central"},x)},className:O.tickLabel,ownerState:{}}),X=F({elementType:G,externalSlotProps:P?.axisLabel,additionalProps:{style:(0,r.A)({fontSize:_,angle:90*H,textAnchor:"middle",dominantBaseline:"auto"},v)},ownerState:{}}),Q=F({elementType:W,externalSlotProps:P?.axisLine,additionalProps:{strokeLinecap:"square"},ownerState:{}}),J=s.domain(),tt=Fo(s);return tt&&0===J.length||!tt&&J.some(Hc)?null:(0,i.jsxs)(id,{transform:`translate(${"right"===h?E+N:E}, 0)`,className:O.root,sx:T,children:[!d&&(0,i.jsx)(W,(0,r.A)({y1:R,y2:R+$,className:O.line},Q)),Z.map(({formattedValue:t,offset:e,labelOffset:n,value:o},s)=>{const a=H*(D+2),l=n,c="function"==typeof I&&!I?.(o,s);return B({x:-1,y:e},{direction:"y"})?(0,i.jsxs)("g",{transform:`translate(0, ${e})`,className:O.tickContainer,children:[!p&&(0,i.jsx)(V,(0,r.A)({x2:H*D,className:O.tick},P?.axisTick)),void 0!==t&&!c&&(0,i.jsx)(q,(0,r.A)({x:a,y:l,text:t.toString()},Y))]},s):null}),y&&(0,i.jsx)("g",{className:O.label,children:(0,i.jsx)(G,(0,r.A)({},U,X,{text:y}))})]})}const sd=(t,e)=>null==t?null:"object"==typeof t?t.axisId??e??null:t,ad=(t,e,n)=>"object"==typeof t?(0,r.A)({},t,{slots:(0,r.A)({},e,t?.slots),slotProps:(0,r.A)({},n,t?.slotProps)}):{slots:e,slotProps:n};function ld(e){const{topAxis:n,leftAxis:o,rightAxis:s,bottomAxis:a,slots:l,slotProps:c}=e,{xAxis:u,xAxisIds:h,yAxis:d,yAxisIds:p}=j(),f=sd(void 0===o?p[0]:o,p[0]),m=sd(void 0===a?h[0]:a,h[0]),g=sd(n,h[0]),y=sd(s,p[0]);if(null!==g&&!u[g])throw new Error([`MUI X: id used for top axis "${g}" is not defined.`,`Available ids are: ${h.join(", ")}.`].join("\n"));if(null!==f&&!d[f])throw new Error([`MUI X: id used for left axis "${f}" is not defined.`,`Available ids are: ${p.join(", ")}.`].join("\n"));if(null!==y&&!d[y])throw new Error([`MUI X: id used for right axis "${y}" is not defined.`,`Available ids are: ${p.join(", ")}.`].join("\n"));if(null!==m&&!u[m])throw new Error([`MUI X: id used for bottom axis "${m}" is not defined.`,`Available ids are: ${h.join(", ")}.`].join("\n"));const _=ad(n,l,c),v=ad(a,l,c),x=ad(o,l,c),b=ad(s,l,c);return(0,i.jsxs)(t.Fragment,{children:[g&&(0,i.jsx)(Jh,(0,r.A)({},_,{position:"top",axisId:g})),m&&(0,i.jsx)(Jh,(0,r.A)({},v,{position:"bottom",axisId:m})),f&&(0,i.jsx)(rd,(0,r.A)({},x,{position:"left",axisId:f})),y&&(0,i.jsx)(rd,(0,r.A)({},b,{position:"right",axisId:y}))]})}var cd=c(2923),ud=c(2325);function hd(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function dd(t){return t instanceof hd(t).Element||t instanceof Element}function pd(t){return t instanceof hd(t).HTMLElement||t instanceof HTMLElement}function fd(t){return"undefined"!=typeof ShadowRoot&&(t instanceof hd(t).ShadowRoot||t instanceof ShadowRoot)}var md=Math.max,gd=Math.min,yd=Math.round;function _d(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function vd(){return!/^((?!chrome|android).)*safari/i.test(_d())}function xd(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),o=1,r=1;e&&pd(t)&&(o=t.offsetWidth>0&&yd(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&yd(i.height)/t.offsetHeight||1);var s=(dd(t)?hd(t):window).visualViewport,a=!vd()&&n,l=(i.left+(a&&s?s.offsetLeft:0))/o,c=(i.top+(a&&s?s.offsetTop:0))/r,u=i.width/o,h=i.height/r;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function bd(t){var e=hd(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wd(t){return t?(t.nodeName||"").toLowerCase():null}function Ad(t){return((dd(t)?t.ownerDocument:t.document)||window.document).documentElement}function Pd(t){return xd(Ad(t)).left+bd(t).scrollLeft}function kd(t){return hd(t).getComputedStyle(t)}function Md(t){var e=kd(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function Cd(t,e,n){void 0===n&&(n=!1);var i,o,r=pd(e),s=pd(e)&&function(t){var e=t.getBoundingClientRect(),n=yd(e.width)/t.offsetWidth||1,i=yd(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=Ad(e),l=xd(t,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==wd(e)||Md(a))&&(c=(i=e)!==hd(i)&&pd(i)?{scrollLeft:(o=i).scrollLeft,scrollTop:o.scrollTop}:bd(i)),pd(e)?((u=xd(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=Pd(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Id(t){var e=xd(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function Td(t){return"html"===wd(t)?t:t.assignedSlot||t.parentNode||(fd(t)?t.host:null)||Ad(t)}function Ld(t){return["html","body","#document"].indexOf(wd(t))>=0?t.ownerDocument.body:pd(t)&&Md(t)?t:Ld(Td(t))}function Sd(t,e){var n;void 0===e&&(e=[]);var i=Ld(t),o=i===(null==(n=t.ownerDocument)?void 0:n.body),r=hd(i),s=o?[r].concat(r.visualViewport||[],Md(i)?i:[]):i,a=e.concat(s);return o?a:a.concat(Sd(Td(s)))}function Od(t){return["table","td","th"].indexOf(wd(t))>=0}function jd(t){return pd(t)&&"fixed"!==kd(t).position?t.offsetParent:null}function zd(t){for(var e=hd(t),n=jd(t);n&&Od(n)&&"static"===kd(n).position;)n=jd(n);return n&&("html"===wd(n)||"body"===wd(n)&&"static"===kd(n).position)?e:n||function(t){var e=/firefox/i.test(_d());if(/Trident/i.test(_d())&&pd(t)&&"fixed"===kd(t).position)return null;var n=Td(t);for(fd(n)&&(n=n.host);pd(n)&&["html","body"].indexOf(wd(n))<0;){var i=kd(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}var Ed="top",Rd="bottom",Nd="right",$d="left",Bd="auto",Fd=[Ed,Rd,Nd,$d],Dd="start",Zd="end",Hd="viewport",Ud="popper",Wd=Fd.reduce(function(t,e){return t.concat([e+"-"+Dd,e+"-"+Zd])},[]),Vd=[].concat(Fd,[Bd]).reduce(function(t,e){return t.concat([e,e+"-"+Dd,e+"-"+Zd])},[]),qd=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Gd(t){var e=new Map,n=new Set,i=[];function o(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&o(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||o(t)}),i}var Kd={placement:"bottom",modifiers:[],strategy:"absolute"};function Yd(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Xd(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,i=void 0===n?[]:n,o=e.defaultOptions,r=void 0===o?Kd:o;return function(t,e,n){void 0===n&&(n=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Kd,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,u={state:a,setOptions:function(n){var o="function"==typeof n?n(a.options):n;h(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:dd(t)?Sd(t):t.contextElement?Sd(t.contextElement):[],popper:Sd(e)};var s,c,d=function(t){var e=Gd(t);return qd.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((s=[].concat(i,a.options.modifiers),c=s.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=d.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,i=void 0===n?{}:n,o=t.effect;if("function"==typeof o){var r=o({state:a,name:e,instance:u,options:i});l.push(r||function(){})}}),u.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(Yd(e,n)){a.rects={reference:Cd(e,zd(n),"fixed"===a.options.strategy),popper:Id(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var o=a.orderedModifiers[i],r=o.fn,s=o.options,l=void 0===s?{}:s,h=o.name;"function"==typeof r&&(a=r({state:a,options:l,name:h,instance:u})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return s||(s=new Promise(function(t){Promise.resolve().then(function(){s=void 0,t(o())})})),s}),destroy:function(){h(),c=!0}};if(!Yd(t,e))return u;function h(){l.forEach(function(t){return t()}),l=[]}return u.setOptions(n).then(function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)}),u}}var Qd={passive:!0};const Jd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,r=void 0===o||o,s=i.resize,a=void 0===s||s,l=hd(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(t){t.addEventListener("scroll",n.update,Qd)}),a&&l.addEventListener("resize",n.update,Qd),function(){r&&c.forEach(function(t){t.removeEventListener("scroll",n.update,Qd)}),a&&l.removeEventListener("resize",n.update,Qd)}},data:{}};function tp(t){return t.split("-")[0]}function ep(t){return t.split("-")[1]}function np(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ip(t){var e,n=t.reference,i=t.element,o=t.placement,r=o?tp(o):null,s=o?ep(o):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(r){case Ed:e={x:a,y:n.y-i.height};break;case Rd:e={x:a,y:n.y+n.height};break;case Nd:e={x:n.x+n.width,y:l};break;case $d:e={x:n.x-i.width,y:l};break;default:e={x:n.x,y:n.y}}var c=r?np(r):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Dd:e[c]=e[c]-(n[u]/2-i[u]/2);break;case Zd:e[c]=e[c]+(n[u]/2-i[u]/2)}}return e}var op={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rp(t){var e,n=t.popper,i=t.popperRect,o=t.placement,r=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,h=t.isFixed,d=s.x,p=void 0===d?0:d,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=s.hasOwnProperty("x"),_=s.hasOwnProperty("y"),v=$d,x=Ed,b=window;if(c){var w=zd(n),A="clientHeight",P="clientWidth";w===hd(n)&&"static"!==kd(w=Ad(n)).position&&"absolute"===a&&(A="scrollHeight",P="scrollWidth"),(o===Ed||(o===$d||o===Nd)&&r===Zd)&&(x=Rd,m-=(h&&w===b&&b.visualViewport?b.visualViewport.height:w[A])-i.height,m*=l?1:-1),o!==$d&&(o!==Ed&&o!==Rd||r!==Zd)||(v=Nd,p-=(h&&w===b&&b.visualViewport?b.visualViewport.width:w[P])-i.width,p*=l?1:-1)}var k,M=Object.assign({position:a},c&&op),C=!0===u?function(t,e){var n=t.x,i=t.y,o=e.devicePixelRatio||1;return{x:yd(n*o)/o||0,y:yd(i*o)/o||0}}({x:p,y:m},hd(n)):{x:p,y:m};return p=C.x,m=C.y,l?Object.assign({},M,((k={})[x]=_?"0":"",k[v]=y?"0":"",k.transform=(b.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",k)):Object.assign({},M,((e={})[x]=_?m+"px":"",e[v]=y?p+"px":"",e.transform="",e))}const sp={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=void 0===i||i,r=n.adaptive,s=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:tp(e.placement),variation:ep(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,rp(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,rp(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})},data:{}},ap={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];pd(o)&&wd(o)&&(Object.assign(o.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)}))})},effect:function(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(t){var i=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});pd(i)&&wd(i)&&(Object.assign(i.style,r),Object.keys(o).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]},lp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.offset,r=void 0===o?[0,0]:o,s=Vd.reduce(function(t,n){return t[n]=function(t,e,n){var i=tp(t),o=[$d,Ed].indexOf(i)>=0?-1:1,r="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=r[0],a=r[1];return s=s||0,a=(a||0)*o,[$d,Nd].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,r),t},{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}};var cp={left:"right",right:"left",bottom:"top",top:"bottom"};function up(t){return t.replace(/left|right|bottom|top/g,function(t){return cp[t]})}var hp={start:"end",end:"start"};function dp(t){return t.replace(/start|end/g,function(t){return hp[t]})}function pp(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&fd(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function fp(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mp(t,e,n){return e===Hd?fp(function(t,e){var n=hd(t),i=Ad(t),o=n.visualViewport,r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;var c=vd();(c||!c&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a+Pd(t),y:l}}(t,n)):dd(e)?function(t,e){var n=xd(t,!1,"fixed"===e);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}(e,n):fp(function(t){var e,n=Ad(t),i=bd(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=md(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=md(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+Pd(t),l=-i.scrollTop;return"rtl"===kd(o||n).direction&&(a+=md(n.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:l}}(Ad(t)))}function gp(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function yp(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function _p(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=void 0===i?t.placement:i,r=n.strategy,s=void 0===r?t.strategy:r,a=n.boundary,l=void 0===a?"clippingParents":a,c=n.rootBoundary,u=void 0===c?Hd:c,h=n.elementContext,d=void 0===h?Ud:h,p=n.altBoundary,f=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,y=gp("number"!=typeof g?g:yp(g,Fd)),_=d===Ud?"reference":Ud,v=t.rects.popper,x=t.elements[f?_:d],b=function(t,e,n,i){var o="clippingParents"===e?function(t){var e=Sd(Td(t)),n=["absolute","fixed"].indexOf(kd(t).position)>=0&&pd(t)?zd(t):t;return dd(n)?e.filter(function(t){return dd(t)&&pp(t,n)&&"body"!==wd(t)}):[]}(t):[].concat(e),r=[].concat(o,[n]),s=r[0],a=r.reduce(function(e,n){var o=mp(t,n,i);return e.top=md(o.top,e.top),e.right=gd(o.right,e.right),e.bottom=gd(o.bottom,e.bottom),e.left=md(o.left,e.left),e},mp(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(dd(x)?x:x.contextElement||Ad(t.elements.popper),l,u,s),w=xd(t.elements.reference),A=ip({reference:w,element:v,strategy:"absolute",placement:o}),P=fp(Object.assign({},v,A)),k=d===Ud?P:w,M={top:b.top-k.top+y.top,bottom:k.bottom-b.bottom+y.bottom,left:b.left-k.left+y.left,right:k.right-b.right+y.right},C=t.modifiersData.offset;if(d===Ud&&C){var I=C[o];Object.keys(M).forEach(function(t){var e=[Nd,Rd].indexOf(t)>=0?1:-1,n=[Ed,Rd].indexOf(t)>=0?"y":"x";M[t]+=I[n]*e})}return M}const vp={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=e.options.placement,y=tp(g),_=l||(y!==g&&f?function(t){if(tp(t)===Bd)return[];var e=up(t);return[dp(t),e,dp(e)]}(g):[up(g)]),v=[g].concat(_).reduce(function(t,n){return t.concat(tp(n)===Bd?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,o=n.boundary,r=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Vd:l,u=ep(i),h=u?a?Wd:Wd.filter(function(t){return ep(t)===u}):Fd,d=h.filter(function(t){return c.indexOf(t)>=0});0===d.length&&(d=h);var p=d.reduce(function(e,n){return e[n]=_p(t,{placement:n,boundary:o,rootBoundary:r,padding:s})[tp(n)],e},{});return Object.keys(p).sort(function(t,e){return p[t]-p[e]})}(e,{placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)},[]),x=e.rects.reference,b=e.rects.popper,w=new Map,A=!0,P=v[0],k=0;k<v.length;k++){var M=v[k],C=tp(M),I=ep(M)===Dd,T=[Ed,Rd].indexOf(C)>=0,L=T?"width":"height",S=_p(e,{placement:M,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),O=T?I?Nd:$d:I?Rd:Ed;x[L]>b[L]&&(O=up(O));var j=up(O),z=[];if(r&&z.push(S[C]<=0),a&&z.push(S[O]<=0,S[j]<=0),z.every(function(t){return t})){P=M,A=!1;break}w.set(M,z)}if(A)for(var E=function(t){var e=v.find(function(e){var n=w.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return P=e,"break"},R=f?3:1;R>0&&"break"!==E(R);R--);e.placement!==P&&(e.modifiersData[i]._skip=!0,e.placement=P,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function xp(t,e,n){return md(t,gd(e,n))}const bp={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,r=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,h=n.padding,d=n.tether,p=void 0===d||d,f=n.tetherOffset,m=void 0===f?0:f,g=_p(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:u}),y=tp(e.placement),_=ep(e.placement),v=!_,x=np(y),b="x"===x?"y":"x",w=e.modifiersData.popperOffsets,A=e.rects.reference,P=e.rects.popper,k="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,M="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,I={x:0,y:0};if(w){if(r){var T,L="y"===x?Ed:$d,S="y"===x?Rd:Nd,O="y"===x?"height":"width",j=w[x],z=j+g[L],E=j-g[S],R=p?-P[O]/2:0,N=_===Dd?A[O]:P[O],$=_===Dd?-P[O]:-A[O],B=e.elements.arrow,F=p&&B?Id(B):{width:0,height:0},D=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Z=D[L],H=D[S],U=xp(0,A[O],F[O]),W=v?A[O]/2-R-U-Z-M.mainAxis:N-U-Z-M.mainAxis,V=v?-A[O]/2+R+U+H+M.mainAxis:$+U+H+M.mainAxis,q=e.elements.arrow&&zd(e.elements.arrow),G=q?"y"===x?q.clientTop||0:q.clientLeft||0:0,K=null!=(T=null==C?void 0:C[x])?T:0,Y=j+V-K,X=xp(p?gd(z,j+W-K-G):z,j,p?md(E,Y):E);w[x]=X,I[x]=X-j}if(a){var Q,J="x"===x?Ed:$d,tt="x"===x?Rd:Nd,et=w[b],nt="y"===b?"height":"width",it=et+g[J],ot=et-g[tt],rt=-1!==[Ed,$d].indexOf(y),st=null!=(Q=null==C?void 0:C[b])?Q:0,at=rt?it:et-A[nt]-P[nt]-st+M.altAxis,lt=rt?et+A[nt]+P[nt]-st-M.altAxis:ot,ct=p&&rt?function(t,e,n){var i=xp(t,e,n);return i>n?n:i}(at,et,lt):xp(p?at:it,et,p?lt:ot);w[b]=ct,I[b]=ct-et}e.modifiersData[i]=I}},requiresIfExists:["offset"]},wp={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,o=t.options,r=n.elements.arrow,s=n.modifiersData.popperOffsets,a=tp(n.placement),l=np(a),c=[$d,Nd].indexOf(a)>=0?"height":"width";if(r&&s){var u=function(t,e){return gp("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:yp(t,Fd))}(o.padding,n),h=Id(r),d="y"===l?Ed:$d,p="y"===l?Rd:Nd,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=zd(r),y=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,_=f/2-m/2,v=u[d],x=y-h[c]-u[p],b=y/2-h[c]/2+_,w=xp(v,b,x),A=l;n.modifiersData[i]=((e={})[A]=w,e.centerOffset=w-b,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&pp(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ap(t,e,n){return void 0===n&&(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 Pp(t){return[Ed,Nd,Rd,$d].some(function(e){return t[e]>=0})}var kp=Xd({defaultModifiers:[Jd,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=ip({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},sp,ap,lp,vp,bp,wp,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=_p(e,{elementContext:"reference"}),a=_p(e,{altBoundary:!0}),l=Ap(s,i),c=Ap(a,o,r),u=Pp(l),h=Pp(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}),Mp=c(7365);const Cp=t.forwardRef(function(e,n){const{children:o,container:r,disablePortal:s=!1}=e,[a,l]=t.useState(null),c=(0,E.A)(t.isValidElement(o)?(u=o,parseInt(t.version,10)>=19?(null==u||null==(h=u.props)?void 0:h.ref)||null:(null==u?void 0:u.ref)||null):null,n);var u,h;if((0,oh.A)(()=>{s||l(function(t){return"function"==typeof t?t():t}(r)||document.body)},[r,s]),(0,oh.A)(()=>{if(a&&!s)return(0,Mp.A)(n,a),()=>{(0,Mp.A)(n,null)}},[n,a,s]),s){if(t.isValidElement(o)){const e={ref:c};return t.cloneElement(o,e)}return(0,i.jsx)(t.Fragment,{children:o})}return(0,i.jsx)(t.Fragment,{children:a?bi.createPortal(o,a):a})});function Ip(t){return(0,D.Ay)("MuiPopper",t)}(0,Z.A)("MuiPopper",["root"]);const Tp=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],Lp=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Sp(t){return"function"==typeof t?t():t}const Op={},jp=t.forwardRef(function(e,n){var o;const{anchorEl:s,children:a,direction:l,disablePortal:c,modifiers:u,open:h,placement:d,popperOptions:p,popperRef:f,slotProps:m={},slots:y={},TransitionProps:_}=e,v=(0,g.A)(e,Tp),x=t.useRef(null),b=(0,E.A)(x,n),w=t.useRef(null),A=(0,E.A)(w,f),P=t.useRef(A);(0,oh.A)(()=>{P.current=A},[A]),t.useImperativeHandle(f,()=>w.current,[]);const k=function(t,e){if("ltr"===e)return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}(d,l),[M,C]=t.useState(k),[I,T]=t.useState(Sp(s));t.useEffect(()=>{w.current&&w.current.forceUpdate()}),t.useEffect(()=>{s&&T(Sp(s))},[s]),(0,oh.A)(()=>{if(!I||!h)return;let t=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:t})=>{C(t.placement)}}];null!=u&&(t=t.concat(u)),p&&null!=p.modifiers&&(t=t.concat(p.modifiers));const e=kp(I,x.current,(0,r.A)({placement:k},p,{modifiers:t}));return P.current(e),()=>{e.destroy(),P.current(null)}},[I,c,u,h,p,k]);const L={placement:M};null!==_&&(L.TransitionProps=_);const S=(t=>{const{classes:e}=t;return(0,z.A)({root:["root"]},Ip,e)})(e),O=null!=(o=y.root)?o:"div",j=F({elementType:O,externalSlotProps:m.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:S.root});return(0,i.jsx)(O,(0,r.A)({},j,{children:"function"==typeof a?a(L):a}))}),zp=t.forwardRef(function(e,n){const{anchorEl:o,children:s,container:a,direction:l="ltr",disablePortal:c=!1,keepMounted:u=!1,modifiers:h,open:d,placement:p="bottom",popperOptions:f=Op,popperRef:m,style:y,transition:_=!1,slotProps:v={},slots:x={}}=e,b=(0,g.A)(e,Lp),[w,A]=t.useState(!0);if(!u&&!d&&(!_||w))return null;let P;if(a)P=a;else if(o){const t=Sp(o);P=t&&void 0!==t.nodeType?(0,ud.A)(t).body:(0,ud.A)(null).body}const k=d||!u||_&&!w?void 0:"none",M=_?{in:d,onEnter:()=>{A(!1)},onExited:()=>{A(!0)}}:void 0;return(0,i.jsx)(Cp,{disablePortal:c,container:P,children:(0,i.jsx)(jp,(0,r.A)({anchorEl:o,direction:l,disablePortal:c,modifiers:h,ref:n,open:_?!w:d,placement:p,popperOptions:f,popperRef:m,slotProps:v,slots:x},b,{style:(0,r.A)({position:"fixed",top:0,left:0,display:k},y),TransitionProps:M,children:s}))})});var Ep=c(5607);const Rp=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Np=(0,K.Ay)(zp,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),$p=t.forwardRef(function(t,e){var n;const o=(0,cd.A)(),s=(0,Ep.b)({props:t,name:"MuiPopper"}),{anchorEl:a,component:l,components:c,componentsProps:u,container:h,disablePortal:d,keepMounted:p,modifiers:f,open:m,placement:y,popperOptions:_,popperRef:v,transition:x,slots:b,slotProps:w}=s,A=(0,g.A)(s,Rp),P=null!=(n=null==b?void 0:b.root)?n:null==c?void 0:c.Root,k=(0,r.A)({anchorEl:a,container:h,disablePortal:d,keepMounted:p,modifiers:f,open:m,placement:y,popperOptions:_,popperRef:v,transition:x},A);return(0,i.jsx)(Np,(0,r.A)({as:l,direction:null==o?void 0:o.direction,slots:{root:P},slotProps:null!=w?w:u},k,{ref:e}))}),Bp=function(e){const{children:n,defer:o=!1,fallback:r=null}=e,[s,a]=t.useState(!1);return(0,oh.A)(()=>{o||a(!0)},[o]),t.useEffect(()=>{o&&a(!0)},[o]),(0,i.jsx)(t.Fragment,{children:s?n:r})};function Fp(t){if(null===t)return{getBoundingClientRect:()=>({width:0,height:0,x:0,y:0,top:0,right:0,bottom:0,left:0,toJSON:()=>""})};const{x:e,y:n}=t,i={width:0,height:0,x:e,y:n,top:n,right:e,bottom:n,left:e};return{getBoundingClientRect:()=>(0,r.A)({},i,{toJSON:()=>JSON.stringify(i)})}}function Dp(t){return(0,D.Ay)("MuiChartsTooltip",t)}const Zp=(0,Z.A)("MuiChartsTooltip",["root","paper","table","row","cell","mark","markCell","labelCell","valueCell"]),Hp=(0,K.Ay)("div",{name:"MuiChartsTooltip",slot:"Container",overridesResolver:(t,e)=>e.paper})(({theme:t})=>({boxShadow:t.shadows[1],backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),borderRadius:t.shape.borderRadius})),Up=(0,K.Ay)("table",{name:"MuiChartsTooltip",slot:"Table",overridesResolver:(t,e)=>e.table})(({theme:t})=>({borderSpacing:0,"& thead td":{borderBottom:`solid ${(t.vars||t).palette.divider} 1px`}})),Wp=(0,K.Ay)("tr",{name:"MuiChartsTooltip",slot:"Row",overridesResolver:(t,e)=>e.row})(({theme:t})=>({"tr:first-of-type& td":{paddingTop:t.spacing(1)},"tr:last-of-type& td":{paddingBottom:t.spacing(1)}})),Vp=(0,K.Ay)("td",{name:"MuiChartsTooltip",slot:"Cell",overridesResolver:(t,e)=>e.cell})(({theme:t})=>({verticalAlign:"middle",color:(t.vars||t).palette.text.secondary,[`&.${Zp.labelCell}`]:{paddingLeft:t.spacing(1)},[`&.${Zp.valueCell}`]:{paddingLeft:t.spacing(4),color:(t.vars||t).palette.text.primary},"td:first-of-type&":{paddingLeft:t.spacing(2)},"td:last-of-type&":{paddingRight:t.spacing(2)}})),qp=(0,K.Ay)("div",{name:"MuiChartsTooltip",slot:"Mark",overridesResolver:(t,e)=>e.mark,shouldForwardProp:t=>(0,Zr.shouldForwardProp)(t)&&"color"!==t})(({theme:t,color:e})=>({width:t.spacing(1),height:t.spacing(1),borderRadius:"50%",boxShadow:t.shadows[1],background:e,borderColor:(t.vars||t).palette.background.paper,border:`solid ${(t.vars||t).palette.background.paper} ${t.spacing(.25)}`,boxSizing:"content-box"}));function Gp(t){const{series:e,itemData:n,sx:o,classes:s,getColor:a}=t;if(void 0===n.dataIndex||!e.data[n.dataIndex])return null;const{displayedLabel:l,color:c}="pie"===e.type?{color:a(n.dataIndex),displayedLabel:Ku(e.data[n.dataIndex].label,"tooltip")}:{color:a(n.dataIndex),displayedLabel:Ku(e.label,"tooltip")},u="pie"===e.type?(0,r.A)({},e.data[n.dataIndex],{label:Ku(e.data[n.dataIndex].label,"tooltip")}):e.data[n.dataIndex],h=e.valueFormatter?.(u,{dataIndex:n.dataIndex});return(0,i.jsx)(Hp,{sx:o,className:s.paper,children:(0,i.jsx)(Up,{className:s.table,children:(0,i.jsx)("tbody",{children:(0,i.jsxs)(Wp,{className:s.row,children:[(0,i.jsx)(Vp,{className:(0,R.A)(s.markCell,s.cell),children:(0,i.jsx)(qp,{color:c,className:s.mark})}),(0,i.jsx)(Vp,{className:(0,R.A)(s.labelCell,s.cell),children:l}),(0,i.jsx)(Vp,{className:(0,R.A)(s.valueCell,s.cell),children:h})]})})})})}function Kp(e){const{isInitialized:n,data:i}=t.useContext(Kr);if(!n)throw new Error(["MUI X: Could not find the plugin context.","It looks like you rendered your component outside of a ChartsContainer parent component."].join("\n"));return e?i.colorProcessors[e]:i.colorProcessors}function Yp(e){const{content:n,itemData:o,sx:s,classes:a,contentProps:l}=e,c=Cr()[o.type].series[o.seriesId],{xAxis:u,yAxis:h,xAxisIds:d,yAxisIds:p}=j(),{zAxis:f,zAxisIds:m}=t.useContext(cu),g=Kp(),y=c.xAxisId??c.xAxisKey??d[0],_=c.yAxisId??c.yAxisKey??p[0],v=c.zAxisId??c.zAxisKey??m[0],x=g[c.type]?.(c,y&&u[y],_&&h[_],v&&f[v])??(()=>""),b=n??Gp,w=F({elementType:b,externalSlotProps:l,additionalProps:{itemData:o,series:c,sx:s,classes:a,getColor:x},ownerState:{}});return(0,i.jsx)(b,(0,r.A)({},w))}var Xp=c(9599),Qp=c(8466);function Jp(t){return(0,D.Ay)("MuiTypography",t)}(0,Z.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const tf=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ef=(0,K.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],"inherit"!==n.align&&e[`align${(0,Qp.A)(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>(0,r.A)({margin:0},"inherit"===e.variant&&{font:"inherit"},"inherit"!==e.variant&&t.typography[e.variant],"inherit"!==e.align&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),nf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},of={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rf=t.forwardRef(function(t,e){const n=(0,Ep.b)({props:t,name:"MuiTypography"}),o=(t=>of[t]||t)(n.color),s=(0,Xp.A)((0,r.A)({},n,{color:o})),{align:a="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:h=!1,paragraph:d=!1,variant:p="body1",variantMapping:f=nf}=s,m=(0,g.A)(s,tf),y=(0,r.A)({},s,{align:a,color:o,className:l,component:c,gutterBottom:u,noWrap:h,paragraph:d,variant:p,variantMapping:f}),_=c||(d?"p":f[p]||nf[p])||"span",v=(t=>{const{align:e,gutterBottom:n,noWrap:i,paragraph:o,variant:r,classes:s}=t,a={root:["root",r,"inherit"!==t.align&&`align${(0,Qp.A)(e)}`,n&&"gutterBottom",i&&"noWrap",o&&"paragraph"]};return(0,z.A)(a,Jp,s)})(y);return(0,i.jsx)(ef,(0,r.A)({as:_,ref:e,ownerState:y,className:(0,R.A)(v.root,l)},m))}),sf=rf;let af;const lf=new class{constructor(){if(this.types=new Set,af)throw new Error("You can only create one instance!");af=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}};function cf(t){return lf.getTypes().has(t)}function uf(t){return cf(t.type)}function hf(t){const{series:e,axis:n,dataIndex:o,axisValue:r,sx:s,classes:a}=t;if(null==o)return null;const l=n.valueFormatter??(t=>"utc"===n.scaleType?function(t){return t instanceof Date?t.toUTCString():t.toLocaleString()}(t):t.toLocaleString());return(0,i.jsx)(Hp,{sx:s,className:a.paper,children:(0,i.jsxs)(Up,{className:a.table,children:[null!=r&&!n.hideTooltip&&(0,i.jsx)("thead",{children:(0,i.jsx)(Wp,{children:(0,i.jsx)(Vp,{colSpan:3,children:(0,i.jsx)(sf,{children:l(r,{location:"tooltip"})})})})}),(0,i.jsx)("tbody",{children:e.filter(uf).map(({id:t,label:e,valueFormatter:n,data:r,getColor:s})=>{const l=n(r[o]??null,{dataIndex:o});if(null==l)return null;const c=Ku(e,"tooltip"),u=s(o);return(0,i.jsxs)(Wp,{className:a.row,children:[(0,i.jsx)(Vp,{className:(0,R.A)(a.markCell,a.cell),children:u&&(0,i.jsx)(qp,{color:u,className:a.mark})}),(0,i.jsx)(Vp,{className:(0,R.A)(a.labelCell,a.cell),children:c?(0,i.jsx)(sf,{children:c}):null}),(0,i.jsx)(Vp,{className:(0,R.A)(a.valueCell,a.cell),children:(0,i.jsx)(sf,{children:l})})]},t)})})]})})}function df(e){const{content:n,contentProps:o,axisData:s,sx:a,classes:l}=e,c=s.x&&-1!==s.x.index,u=c?s.x&&s.x.index:s.y&&s.y.index,h=c?s.x&&s.x.value:s.y&&s.y.value,{xAxisIds:d,xAxis:p,yAxisIds:f,yAxis:m}=j(),{zAxisIds:g,zAxis:y}=t.useContext(cu),_=Cr(),v=Kp(),x=c?d[0]:f[0],b=t.useMemo(()=>{const t=[];return Object.keys(_).filter(cf).forEach(e=>{_[e].seriesOrder.forEach(n=>{const i=_[e].series[n],o=i.xAxisId??i.xAxisKey,s=i.yAxisId??i.yAxisKey,a=c?o:s;if(void 0===a||a===x){const i=_[e].series[n],a=o??d[0],l=s??f[0],c=i.zAxisId??i.zAxisKey??g[0],u=v[e]?.(i,p[a],m[l],c&&y[c])??(()=>"");t.push((0,r.A)({},i,{getColor:u}))}})}),t},[x,v,c,_,p,d,m,f,y,g]),w=t.useMemo(()=>c?p[x]:m[x],[x,c,p,m]),A=n??hf,P=F({elementType:A,externalSlotProps:o,additionalProps:{axisData:s,series:b,axis:w,dataIndex:u,axisValue:h,sx:a,classes:l},ownerState:{}});return(0,i.jsx)(A,(0,r.A)({},P))}lf.addType("bar"),lf.addType("line"),lf.addType("scatter");const pf=(0,K.Ay)($p,{name:"MuiChartsTooltip",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({pointerEvents:"none",zIndex:t.zIndex.modal}));function ff(e){const n=m({props:e,name:"MuiChartsTooltip"}),{trigger:o="axis",itemContent:s,axisContent:a,slots:l,slotProps:c}=n,u=function(){const e=Qr(),[n,i]=t.useState(null);return t.useEffect(()=>{const t=e.current;if(null===t)return()=>{};const n=t=>{"mouse"!==t.pointerType&&i(null)},o=t=>{i({x:t.clientX,y:t.clientY,height:t.height,pointerType:t.pointerType})};return t.addEventListener("pointerdown",o),t.addEventListener("pointermove",o),t.addEventListener("pointerup",n),()=>{t.removeEventListener("pointerdown",o),t.removeEventListener("pointermove",o),t.removeEventListener("pointerup",n)}},[e]),n}(),{item:h,axis:d}=t.useContext(H),p="item"===o?h:d,f=function(t,e){if("item"===t)return null!==e;const n=null!==e.x,i=null!==e.y;return n||i}(o,p),g=null!==u&&f,y=(t=>{const{classes:e}=t;return(0,z.A)({root:["root"],paper:["paper"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markCell:["markCell"],labelCell:["labelCell"],valueCell:["valueCell"]},Dp,e)})({classes:n.classes}),_=l?.popper??pf,v=F({elementType:_,externalSlotProps:c?.popper,additionalProps:{open:g,placement:"mouse"===u?.pointerType?"right-start":"top",anchorEl:Fp(u),modifiers:[{name:"offset",options:{offset:[0,"touch"===u?.pointerType?40-u.height:0]}}]},ownerState:{}});return"none"===o?null:(0,i.jsx)(Bp,{children:g&&(0,i.jsx)(_,(0,r.A)({},v,{className:y.root,children:"item"===o?(0,i.jsx)(Yp,{itemData:p,content:l?.itemContent??s,contentProps:c?.itemContent,sx:{mx:2},classes:y}):(0,i.jsx)(df,{axisData:p,content:l?.axisContent??a,contentProps:c?.axisContent,sx:{mx:2},classes:y})}))})}const mf={bar:t=>{const{seriesOrder:e,series:n}=t;return e.reduce((t,e)=>{const i=Ku(n[e].label,"legend");return void 0===i||t.push({id:e,seriesId:e,color:n[e].color,label:i}),t},[])},scatter:t=>{const{seriesOrder:e,series:n}=t;return e.reduce((t,e)=>{const i=Ku(n[e].label,"legend");return void 0===i||t.push({id:e,seriesId:e,color:n[e].color,label:i}),t},[])},line:t=>{const{seriesOrder:e,series:n}=t;return e.reduce((t,e)=>{const i=Ku(n[e].label,"legend");return void 0===i||t.push({id:e,seriesId:e,color:n[e].color,label:i}),t},[])},pie:t=>{const{seriesOrder:e,series:n}=t;return e.reduce((t,e)=>(n[e].data.forEach(n=>{const i=Ku(n.label,"legend");void 0!==i&&t.push({id:n.id,seriesId:e,color:n.color,label:i,itemId:n.id})}),t),[])}};function gf(t){return(0,D.Ay)("MuiChartsLegend",t)}(0,Z.A)("MuiChartsLegend",["root","series","itemBackground","mark","label","column","row"]);const yf=["label"];function _f(t){const e=ed(),{id:n,positionY:o,label:s,positionX:a,innerHeight:l,innerWidth:c,legendWidth:u,color:h,gapX:d,gapY:p,itemMarkHeight:f,itemMarkWidth:m,markGap:g,labelStyle:y,classes:_,onClick:v}=t;return(0,i.jsxs)("g",{className:(0,R.A)(_?.series,`${_?.series}-${n}`),transform:`translate(${d+(e?u-a:a)} ${p+o})`,children:[(0,i.jsx)("rect",{x:e?-(c+2):-2,y:-f/2-2,width:c+4,height:l+4,fill:"transparent",className:_?.itemBackground,onClick:v,style:{pointerEvents:v?"all":"none",cursor:v?"pointer":"unset"}}),(0,i.jsx)("rect",{className:_?.mark,x:e?-m:0,y:-f/2,width:m,height:f,fill:h,style:{pointerEvents:"none"}}),(0,i.jsx)(Kh,{style:(0,r.A)({pointerEvents:"none"},y),text:s,x:(e?-1:1)*(m+g),y:0})]})}const vf=["rotate","dominantBaseline"],xf=(0,K.Ay)("g",{name:"MuiChartsLegend",slot:"Root",overridesResolver:(t,e)=>e.root})({});function bf(e){const{position:n,direction:o,itemsToDisplay:s,classes:a,itemMarkWidth:l=20,itemMarkHeight:c=20,markGap:u=5,itemGap:h=10,padding:d=10,labelStyle:p,onItemClick:f}=e,m=Hr(),y=Lo(),_=t.useMemo(()=>(0,r.A)({},m.typography.subtitle1,{color:"inherit",dominantBaseline:"central",textAnchor:"start",fill:(m.vars||m).palette.text.primary,lineHeight:1},p),[p,m]),v=t.useMemo(()=>(t=>"number"==typeof t?{left:t,right:t,top:t,bottom:t}:(0,r.A)({left:0,right:0,top:0,bottom:0},t))(d),[d]),x=t.useCallback((t,e={})=>{const n=Vh({style:(0,g.A)(e,vf),needsComputation:!0,text:t}),i={innerWidth:l+u+Math.max(...n.map(t=>t.width)),innerHeight:Math.max(c,n.length*n[0].height)};return(0,r.A)({},i,{outerWidth:i.innerWidth+h,outerHeight:i.innerHeight+h})},[h,c,l,u]),b=y.left+y.width+y.right,w=y.top+y.height+y.bottom,A=b-v.left-v.right,P=w-v.top-v.bottom,[k,M,C]=t.useMemo(()=>function(t,e,n,i,o,s,a){let l=0,c=0,u=0,h=0,d=0;const p=[0];return[t.map(t=>{let{label:f}=t,m=(0,g.A)(t,yf);const y=e(f,n),_=(0,r.A)({},m,{label:f,positionX:l,positionY:c,innerHeight:y.innerHeight,innerWidth:y.innerWidth,outerHeight:y.outerHeight,outerWidth:y.outerWidth,rowIndex:d});return"row"===i&&(l+y.innerWidth>o&&(l=0,c+=p[d],d+=1,p.length<=d&&p.push(0),_.positionX=l,_.positionY=c,_.rowIndex=d),u=Math.max(u,l+y.outerWidth),h=Math.max(h,c+y.outerHeight),p[d]=Math.max(p[d],y.outerHeight),l+=y.outerWidth),"column"===i&&(c+y.innerHeight>s&&(l=u+a,c=0,d=0,_.positionX=l,_.positionY=c,_.rowIndex=d),p.length<=d&&p.push(0),u=Math.max(u,l+y.outerWidth),h=Math.max(h,c+y.outerHeight),d+=1,c+=y.outerHeight),_}).map(t=>(0,r.A)({},t,{positionY:t.positionY+("row"===i?p[t.rowIndex]/2:t.outerHeight/2)})),u,h]}(s,x,_,o,A,P,h),[s,x,_,o,A,P,h]),I=t.useMemo(()=>{switch(n.horizontal){case"left":return v.left;case"right":return b-v.right-M;default:return(b-M)/2}},[n.horizontal,v.left,v.right,b,M]),T=t.useMemo(()=>{switch(n.vertical){case"top":return v.top;case"bottom":return w-v.bottom-C;default:return(w-C)/2}},[n.vertical,v.top,v.bottom,w,C]);return(0,i.jsx)(Bp,{children:(0,i.jsx)(xf,{className:a?.root,children:k.map((e,n)=>(0,t.createElement)(_f,(0,r.A)({},e,{key:e.id,gapX:I,gapY:T,legendWidth:M,itemMarkHeight:c,itemMarkWidth:l,markGap:u,labelStyle:_,classes:a,onClick:f?t=>f(t,n):void 0})))})})}const wf=["drawingArea","seriesToDisplay","hidden","onItemClick"];function Af(t){const{seriesToDisplay:e,hidden:n,onItemClick:o}=t,s=(0,g.A)(t,wf);return n?null:(0,i.jsx)(bf,(0,r.A)({},s,{itemsToDisplay:e,onItemClick:o?(t,n)=>{return o(t,{type:"series",color:(i=e[n]).color,label:i.label,seriesId:i.seriesId,itemId:i.itemId},n);var i}:void 0}))}const Pf=["slots","slotProps"];function kf(t){const e=m({props:t,name:"MuiChartsLegend"}),n=(0,r.A)({direction:"row"},e,{position:(0,r.A)({horizontal:"middle",vertical:"top"},e.position)}),{slots:o,slotProps:s}=n,a=(0,g.A)(n,Pf),l=Hr(),c=(t=>{const{classes:e,direction:n}=t,i={root:["root",n],mark:["mark"],label:["label"],series:["series"],itemBackground:["itemBackground"]};return(0,z.A)(i,gf,e)})((0,r.A)({},n,{theme:l})),u=Lo(),h=Cr(),d=function(t){return Object.keys(t).flatMap(e=>{const n=mf[e];return void 0===n?[]:n(t[e])})}(h),p=o?.legend??Af,f=F({elementType:p,externalSlotProps:s?.legend,additionalProps:(0,r.A)({},a,{classes:c,drawingArea:u,series:h,seriesToDisplay:d}),ownerState:{}});return(0,i.jsx)(p,(0,r.A)({},f))}function Mf(t){return(0,D.Ay)("MuiChartsAxisHighlight",t)}(0,Z.A)("MuiChartsAxisHighlight",["root"]);const Cf=(0,K.Ay)("path",{name:"MuiChartsAxisHighlight",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({pointerEvents:"none",variants:[{props:{axisHighlight:"band"},style:(0,r.A)({fill:"white",fillOpacity:.1},t.applyStyles("light",{fill:"gray"}))},{props:{axisHighlight:"line"},style:(0,r.A)({strokeDasharray:"5 2",stroke:"#ffffff"},t.applyStyles("light",{stroke:"#000000"}))}]}));function If(e){const{x:n,y:o}=e,{xAxisIds:r,xAxis:s,yAxisIds:a,yAxis:l}=j(),c=(0,z.A)({root:["root"]},Mf),u=r[0],h=a[0],d=s[u].scale,p=l[h].scale,{axis:f}=t.useContext(H),m=Do(d),g=Do(p),y=f.x,_=f.y,v="band"===n&&null!==y&&Fo(d),x="band"===o&&null!==_&&Fo(p);return(0,i.jsxs)(t.Fragment,{children:[v&&void 0!==d(y.value)&&(0,i.jsx)(Cf,{d:`M ${d(y.value)-(d.step()-d.bandwidth())/2} ${p.range()[0]} l ${d.step()} 0 l 0 ${p.range()[1]-p.range()[0]} l ${-d.step()} 0 Z`,className:c.root,ownerState:{axisHighlight:"band"}}),x&&void 0!==p(_.value)&&(0,i.jsx)(Cf,{d:`M ${d.range()[0]} ${p(_.value)-(p.step()-p.bandwidth())/2} l 0 ${p.step()} l ${d.range()[1]-d.range()[0]} 0 l 0 ${-p.step()} Z`,className:c.root,ownerState:{axisHighlight:"band"}}),"line"===n&&null!==f.x&&(0,i.jsx)(Cf,{d:`M ${m(f.x.value)} ${p.range()[0]} L ${m(f.x.value)} ${p.range()[1]}`,className:c.root,ownerState:{axisHighlight:"line"}}),"line"===o&&null!==f.y&&(0,i.jsx)(Cf,{d:`M ${d.range()[0]} ${g(f.y.value)} L ${d.range()[1]} ${g(f.y.value)}`,className:c.root,ownerState:{axisHighlight:"line"}})]})}function Tf(t){const{id:e,offset:n}=t,{left:o,top:s,width:a,height:l}=Lo(),c=(0,r.A)({top:0,right:0,bottom:0,left:0},n);return(0,i.jsx)("clipPath",{id:e,children:(0,i.jsx)("rect",{x:o-c.left,y:s-c.top,width:a+c.left+c.right,height:l+c.top+c.bottom})})}const Lf=["x","y","id","classes","color"];function Sf(t){return(0,D.Ay)("MuiHighlightElement",t)}(0,Z.A)("MuiHighlightElement",["root"]);const Of=(0,K.Ay)("circle",{name:"MuiHighlightElement",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({transform:`translate(${t.x}px, ${t.y}px)`,transformOrigin:`${t.x}px ${t.y}px`,fill:t.color}));function jf(t){const{x:e,y:n,id:o,classes:s,color:a}=t,l=(0,g.A)(t,Lf),c={id:o,classes:s,color:a,x:e,y:n},u=(t=>{const{classes:e,id:n}=t,i={root:["root",`series-${n}`]};return(0,z.A)(i,Sf,e)})(c);return(0,i.jsx)(Of,(0,r.A)({pointerEvents:"none",ownerState:c,className:u.root,cx:0,cy:0,r:void 0===l.r?5:l.r},l))}const zf=["slots","slotProps"];function Ef(e){const{slots:n,slotProps:o}=e,s=(0,g.A)(e,zf),a=Ir(),l=j(),c=Lo(),{axis:u}=t.useContext(H),h=u.x?.index;if(void 0===h)return null;if(void 0===a)return null;const{series:d,stackingGroups:p}=a,{xAxis:f,yAxis:m,xAxisIds:y,yAxisIds:_}=l,v=y[0],x=_[0],b=n?.lineHighlight??jf;return(0,i.jsx)("g",(0,r.A)({},s,{children:p.flatMap(({ids:t})=>t.flatMap(t=>{const{xAxisId:e,yAxisId:n,xAxisKey:s=v,yAxisKey:a=x,stackedData:l,data:u,disableHighlight:p}=d[t],g=e??s,y=n??a;if(p||null==u[h])return null;const _=Do(f[g].scale),w=m[y].scale,A=f[g].data;if(void 0===A)throw new Error(`MUI X: ${g===Po?"The first `xAxis`":`The x-axis with id "${g}"`} should have data property to be able to display a line plot.`);const P=_(A[h]),k=w(l[h][1]);if(!c.isPointInside({x:P,y:k}))return null;const M=Uu(d[t],f[g],m[y]);return(0,i.jsx)(b,(0,r.A)({id:t,color:M(h),x:P,y:k},o?.lineHighlight),`${t}`)}))}))}function Rf(t){return(0,D.Ay)("MuiChartsGrid",t)}const Nf=(0,Z.A)("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),$f=(0,K.Ay)("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(t,e)=>[{[`&.${Nf.verticalLine}`]:e.verticalLine},{[`&.${Nf.horizontalLine}`]:e.horizontalLine},e.root]})({}),Bf=(0,K.Ay)("line",{name:"MuiChartsGrid",slot:"Line",overridesResolver:(t,e)=>e.line})(({theme:t})=>({stroke:(t.vars||t).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}));function Ff(e){const{axis:n,drawingArea:o,classes:r}=e,{scale:s,tickNumber:a,tickInterval:l}=n,c=Wc({scale:s,tickNumber:a,tickInterval:l});return(0,i.jsx)(t.Fragment,{children:c.map(({value:t,offset:e})=>(0,i.jsx)(Bf,{y1:o.top,y2:o.top+o.height,x1:e,x2:e,className:r.verticalLine},`vertical-${t}`))})}function Df(e){const{axis:n,drawingArea:o,classes:r}=e,{scale:s,tickNumber:a,tickInterval:l}=n,c=Wc({scale:s,tickNumber:a,tickInterval:l});return(0,i.jsx)(t.Fragment,{children:c.map(({value:t,offset:e})=>(0,i.jsx)(Bf,{y1:e,y2:e,x1:o.left,x2:o.left+o.width,className:r.horizontalLine},`horizontal-${t}`))})}const Zf=["vertical","horizontal"];function Hf(t){const e=m({props:t,name:"MuiChartsGrid"}),n=Lo(),{vertical:o,horizontal:s}=e,a=(0,g.A)(e,Zf),{xAxis:l,xAxisIds:c,yAxis:u,yAxisIds:h}=j(),d=(({classes:t})=>(0,z.A)({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},Rf,t))(e),p=u[h[0]],f=l[c[0]];return(0,i.jsxs)($f,(0,r.A)({},a,{className:d.root,children:[o&&(0,i.jsx)(Ff,{axis:f,drawingArea:n,classes:d}),s&&(0,i.jsx)(Df,{axis:p,drawingArea:n,classes:d})]}))}function Uf(e){const{onAxisClick:n}=e,o=Qr(),r=Cr(),{axis:s}=t.useContext(H),{xAxisIds:a,xAxis:l,yAxisIds:c,yAxis:u}=j();return t.useEffect(()=>{const t=o.current;if(null===t||!n)return()=>{};const e=t=>{t.preventDefault();const e=s.x&&-1!==s.x.index,i=e?a[0]:c[0],o=e?s.x&&s.x.index:s.y&&s.y.index;if(null==o)return;const h={};Object.keys(r).filter(t=>["bar","line"].includes(t)).forEach(t=>{r[t]?.seriesOrder.forEach(n=>{const s=r[t].series[n],a=s.xAxisId??s.xAxisKey,l=s.yAxisId??s.yAxisKey,c=e?a:l;void 0!==c&&c!==i||(h[n]=s.data[o])})});const d=(e?l:u)[i].data?.[o];n(t,{dataIndex:o,axisValue:d,seriesValues:h})};return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[s.x,s.y,n,r,o,l,a,u,c]),(0,i.jsx)(t.Fragment,{})}const Wf=["message"],Vf=(0,K.Ay)("text")(({theme:t})=>(0,r.A)({},t.typography.body2,{stroke:"none",fill:t.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function qf(t){const{message:e}=t,n=(0,g.A)(t,Wf),{top:o,left:s,height:a,width:l}=Lo();return(0,i.jsx)(Vf,(0,r.A)({x:s+l/2,y:o+a/2},n,{children:e??"Loading data…"}))}const Gf=["message"],Kf=(0,K.Ay)("text")(({theme:t})=>(0,r.A)({},t.typography.body2,{stroke:"none",fill:t.palette.text.primary,shapeRendering:"crispEdges",textAnchor:"middle",dominantBaseline:"middle"}));function Yf(t){const{message:e}=t,n=(0,g.A)(t,Gf),{top:o,left:s,height:a,width:l}=Lo();return(0,i.jsx)(Kf,(0,r.A)({x:s+l/2,y:o+a/2},n,{children:e??"No data to display"}))}function Xf(t){const e=function(){const t=Cr();return Object.values(t).every(t=>{if(!t)return!0;const{series:e,seriesOrder:n}=t;return n.every(t=>0===e[t].data.length)})}();if(t.loading){const e=t.slots?.loadingOverlay??qf;return(0,i.jsx)(e,(0,r.A)({},t.slotProps?.loadingOverlay))}if(e){const e=t.slots?.noDataOverlay??Yf;return(0,i.jsx)(e,(0,r.A)({},t.slotProps?.noDataOverlay))}return null}const Qf=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","tooltip","onAxisClick","onAreaClick","onLineClick","onMarkClick","axisHighlight","disableLineItemHighlight","legend","grid","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","skipAnimation","loading","highlightedItem","onHighlightChange","className","experimentalMarkRendering"],Jf=t.forwardRef(function(t,e){const n=m({props:t,name:"MuiLineChart"}),{chartContainerProps:o,axisClickHandlerProps:s,gridProps:a,clipPathProps:l,clipPathGroupProps:c,areaPlotProps:u,linePlotProps:h,markPlotProps:d,overlayProps:p,chartsAxisProps:f,axisHighlightProps:y,lineHighlightPlotProps:_,legendProps:v,tooltipProps:x,children:b}=(t=>{const{xAxis:e,yAxis:n,series:i,width:o,height:s,margin:a,colors:l,dataset:c,sx:u,tooltip:h,onAxisClick:d,onAreaClick:p,onLineClick:f,onMarkClick:m,axisHighlight:y,disableLineItemHighlight:_,legend:v,grid:x,topAxis:b,leftAxis:w,rightAxis:A,bottomAxis:P,children:k,slots:M,slotProps:C,skipAnimation:I,loading:T,highlightedItem:L,onHighlightChange:S,className:O,experimentalMarkRendering:j}=t,z=(0,g.A)(t,Qf),E=`${(0,Ao.A)()}-clip-path`,R=(0,r.A)({},z,{series:i.map(t=>(0,r.A)({disableHighlight:!!_,type:"line"},t)),width:o,height:s,margin:a,colors:l,dataset:c,xAxis:e??[{id:Po,scaleType:"point",data:Array.from({length:Math.max(...i.map(t=>(t.data??c??[]).length))},(t,e)=>e)}],yAxis:n,sx:u,highlightedItem:L,onHighlightChange:S,disableAxisListener:"axis"!==h?.trigger&&"none"===y?.x&&"none"===y?.y&&!d,className:O,skipAnimation:I});return{chartContainerProps:R,axisClickHandlerProps:{onAxisClick:d},gridProps:{vertical:x?.vertical,horizontal:x?.horizontal},clipPathProps:{id:E},clipPathGroupProps:{clipPath:`url(#${E})`},areaPlotProps:{slots:M,slotProps:C,onItemClick:p},linePlotProps:{slots:M,slotProps:C,onItemClick:f},markPlotProps:{slots:M,slotProps:C,onItemClick:m,skipAnimation:I,experimentalRendering:j},overlayProps:{slots:M,slotProps:C,loading:T},chartsAxisProps:{topAxis:b,leftAxis:w,rightAxis:A,bottomAxis:P,slots:M,slotProps:C},axisHighlightProps:(0,r.A)({x:"line"},y),lineHighlightPlotProps:{slots:M,slotProps:C},legendProps:(0,r.A)({},v,{slots:M,slotProps:C}),tooltipProps:(0,r.A)({},h,{slots:M,slotProps:C}),children:k}})(n);return(0,i.jsxs)(ah,(0,r.A)({ref:e},o,{children:[n.onAxisClick&&(0,i.jsx)(Uf,(0,r.A)({},s)),(0,i.jsx)(Hf,(0,r.A)({},a)),(0,i.jsxs)("g",(0,r.A)({},c,{children:[(0,i.jsx)(jr,(0,r.A)({},u)),(0,i.jsx)(Dr,(0,r.A)({},h)),(0,i.jsx)(Xf,(0,r.A)({},p)),(0,i.jsx)(If,(0,r.A)({},y))]})),(0,i.jsx)(ld,(0,r.A)({},f)),(0,i.jsx)("g",{"data-drawing-container":!0,children:(0,i.jsx)(Eh,(0,r.A)({},d))}),(0,i.jsx)(Ef,(0,r.A)({},_)),(0,i.jsx)(kf,(0,r.A)({},v)),!n.loading&&(0,i.jsx)(ff,(0,r.A)({},x)),(0,i.jsx)(Tf,(0,r.A)({},l)),b]}))}),tm={top:30,right:24,bottom:55,left:78},em=t=>({...tm,...t}),nm=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),im=t=>"number"==typeof t&&Number.isFinite(t)?nm.format(t):null==t?"":String(t),om={"& .MuiChartsAxis-left .MuiChartsAxis-label":{translate:"-30px 0"}},rm=({series:t,xAxisData:e,xAxisLabel:n,yAxisLabel:o,width:r=600,height:s=400,loading:a=!1,margin:l,valueFormatter:c=im})=>{const u=e?[{data:e,scaleType:"point",label:n}]:n?[{label:n}]:void 0,h=[{label:o,valueFormatter:c}];return(0,i.jsx)(Jf,{series:t,xAxis:u,yAxis:h,width:r,height:s,loading:a,margin:em(l),sx:om})};function sm(e){const{series:n,xScale:o,yScale:s,color:a,colorGetter:l,markerSize:c,onItemClick:u}=e,h=Lo(),{useVoronoiInteraction:d}=t.useContext(H),p=d||n.disableHover,f=G(p),{isFaded:m,isHighlighted:g}=q(),y=t.useMemo(()=>{const t=Do(o),e=Do(s),i=[];for(let o=0;o<n.data.length;o+=1){const r=n.data[o],s=t(r.x),c=e(r.y),u=h.isPointInside({x:s,y:c}),d={type:"scatter",seriesId:n.id,dataIndex:o};if(u){const t={seriesId:d.seriesId,dataIndex:d.dataIndex},e=g(t);i.push({x:s,y:c,isHighlighted:e,isFaded:!e&&m(t),interactionProps:f(d),id:r.id,dataIndex:o,color:l?l(o):a})}}return i},[o,s,h,n.data,n.id,g,m,f,l,a]);return(0,i.jsx)("g",{children:y.map(t=>(0,i.jsx)("circle",(0,r.A)({cx:0,cy:0,r:(t.isHighlighted?1.2:1)*c,transform:`translate(${t.x}, ${t.y})`,fill:t.color,opacity:t.isFaded?.3:1,onClick:u&&(e=>u(e,{type:"scatter",seriesId:n.id,dataIndex:t.dataIndex})),cursor:u?"pointer":"unset"},t.interactionProps),t.id))})}function am(e){const{slots:n,slotProps:o,onItemClick:s}=e,a=Tr(),l=j(),{zAxis:c,zAxisIds:u}=t.useContext(cu);if(void 0===a)return null;const{series:h,seriesOrder:d}=a,{xAxis:p,yAxis:f,xAxisIds:m,yAxisIds:g}=l,y=m[0],_=g[0],v=u[0],x=n?.scatter??sm;return(0,i.jsx)(t.Fragment,{children:d.map(t=>{const{id:e,xAxisKey:n,yAxisKey:a,zAxisKey:l,xAxisId:u,yAxisId:d,zAxisId:m,markerSize:g,color:b}=h[t],w=Zu(h[t],p[u??n??y],f[d??a??_],c[m??l??v]),A=p[u??n??y].scale,P=f[d??a??_].scale;return(0,i.jsx)(x,(0,r.A)({xScale:A,yScale:P,color:b,colorGetter:w,markerSize:g??4,series:h[t],onItemClick:s},o?.scatter),e)})})}const lm=134217729;function cm(t,e,n,i,o){let r,s,a,l,c=e[0],u=i[0],h=0,d=0;u>c==u>-c?(r=c,c=e[++h]):(r=u,u=i[++d]);let p=0;if(h<t&&d<n)for(u>c==u>-c?(s=c+r,a=r-(s-c),c=e[++h]):(s=u+r,a=r-(s-u),u=i[++d]),r=s,0!==a&&(o[p++]=a);h<t&&d<n;)u>c==u>-c?(s=r+c,l=s-r,a=r-(s-l)+(c-l),c=e[++h]):(s=r+u,l=s-r,a=r-(s-l)+(u-l),u=i[++d]),r=s,0!==a&&(o[p++]=a);for(;h<t;)s=r+c,l=s-r,a=r-(s-l)+(c-l),c=e[++h],r=s,0!==a&&(o[p++]=a);for(;d<n;)s=r+u,l=s-r,a=r-(s-l)+(u-l),u=i[++d],r=s,0!==a&&(o[p++]=a);return 0===r&&0!==p||(o[p++]=r),p}function um(t){return new Float64Array(t)}const hm=um(4),dm=um(8),pm=um(12),fm=um(16),mm=um(4);function gm(t,e,n,i,o,r){const s=(e-r)*(n-o),a=(t-o)*(i-r),l=s-a,c=Math.abs(s+a);return Math.abs(l)>=33306690738754716e-32*c?l:-function(t,e,n,i,o,r,s){let a,l,c,u,h,d,p,f,m,g,y,_,v,x,b,w,A,P;const k=t-o,M=n-o,C=e-r,I=i-r;x=k*I,d=lm*k,p=d-(d-k),f=k-p,d=lm*I,m=d-(d-I),g=I-m,b=f*g-(x-p*m-f*m-p*g),w=C*M,d=lm*C,p=d-(d-C),f=C-p,d=lm*M,m=d-(d-M),g=M-m,A=f*g-(w-p*m-f*m-p*g),y=b-A,h=b-y,hm[0]=b-(y+h)+(h-A),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-w,h=v-y,hm[1]=v-(y+h)+(h-w),P=_+y,h=P-_,hm[2]=_-(P-h)+(y-h),hm[3]=P;let T=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,hm),L=22204460492503146e-32*s;if(T>=L||-T>=L)return T;if(h=t-k,a=t-(k+h)+(h-o),h=n-M,c=n-(M+h)+(h-o),h=e-C,l=e-(C+h)+(h-r),h=i-I,u=i-(I+h)+(h-r),0===a&&0===l&&0===c&&0===u)return T;if(L=11093356479670487e-47*s+33306690738754706e-32*Math.abs(T),T+=k*u+I*a-(C*c+M*l),T>=L||-T>=L)return T;x=a*I,d=lm*a,p=d-(d-a),f=a-p,d=lm*I,m=d-(d-I),g=I-m,b=f*g-(x-p*m-f*m-p*g),w=l*M,d=lm*l,p=d-(d-l),f=l-p,d=lm*M,m=d-(d-M),g=M-m,A=f*g-(w-p*m-f*m-p*g),y=b-A,h=b-y,mm[0]=b-(y+h)+(h-A),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-w,h=v-y,mm[1]=v-(y+h)+(h-w),P=_+y,h=P-_,mm[2]=_-(P-h)+(y-h),mm[3]=P;const S=cm(4,hm,4,mm,dm);x=k*u,d=lm*k,p=d-(d-k),f=k-p,d=lm*u,m=d-(d-u),g=u-m,b=f*g-(x-p*m-f*m-p*g),w=C*c,d=lm*C,p=d-(d-C),f=C-p,d=lm*c,m=d-(d-c),g=c-m,A=f*g-(w-p*m-f*m-p*g),y=b-A,h=b-y,mm[0]=b-(y+h)+(h-A),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-w,h=v-y,mm[1]=v-(y+h)+(h-w),P=_+y,h=P-_,mm[2]=_-(P-h)+(y-h),mm[3]=P;const O=cm(S,dm,4,mm,pm);x=a*u,d=lm*a,p=d-(d-a),f=a-p,d=lm*u,m=d-(d-u),g=u-m,b=f*g-(x-p*m-f*m-p*g),w=l*c,d=lm*l,p=d-(d-l),f=l-p,d=lm*c,m=d-(d-c),g=c-m,A=f*g-(w-p*m-f*m-p*g),y=b-A,h=b-y,mm[0]=b-(y+h)+(h-A),_=x+y,h=_-x,v=x-(_-h)+(y-h),y=v-w,h=v-y,mm[1]=v-(y+h)+(h-w),P=_+y,h=P-_,mm[2]=_-(P-h)+(y-h),mm[3]=P;const j=cm(O,pm,4,mm,fm);return fm[j-1]}(t,e,n,i,o,r,c)}um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(8),um(8),um(8),um(4),um(8),um(8),um(16),um(12),um(192),um(192),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(8),um(8),um(8),um(8),um(8),um(8),um(8),um(8),um(8),um(4),um(4),um(4),um(8),um(16),um(16),um(16),um(32),um(32),um(48),um(64),um(1152),um(1152),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(4),um(24),um(24),um(24),um(24),um(24),um(24),um(24),um(24),um(24),um(24),um(1152),um(1152),um(1152),um(1152),um(1152),um(2304),um(2304),um(3456),um(5760),um(8),um(8),um(8),um(16),um(24),um(48),um(48),um(96),um(192),um(384),um(384),um(384),um(768),um(96),um(96),um(96),um(1152);const ym=Math.pow(2,-52),_m=new Uint32Array(512);class vm{static from(t,e=km,n=Mm){const i=t.length,o=new Float64Array(2*i);for(let r=0;r<i;r++){const i=t[r];o[2*r]=e(i),o[2*r+1]=n(i)}return new vm(o)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:i,_hullHash:o}=this,r=t.length>>1;let s=1/0,a=1/0,l=-1/0,c=-1/0;for(let e=0;e<r;e++){const n=t[2*e],i=t[2*e+1];n<s&&(s=n),i<a&&(a=i),n>l&&(l=n),i>c&&(c=i),this._ids[e]=e}const u=(s+l)/2,h=(a+c)/2;let d=0,p=0,f=0;for(let e=0,n=1/0;e<r;e++){const i=xm(u,h,t[2*e],t[2*e+1]);i<n&&(d=e,n=i)}const m=t[2*d],g=t[2*d+1];for(let e=0,n=1/0;e<r;e++){if(e===d)continue;const i=xm(m,g,t[2*e],t[2*e+1]);i<n&&i>0&&(p=e,n=i)}let y=t[2*p],_=t[2*p+1],v=1/0;for(let e=0;e<r;e++){if(e===d||e===p)continue;const n=wm(m,g,y,_,t[2*e],t[2*e+1]);n<v&&(f=e,v=n)}let x=t[2*f],b=t[2*f+1];if(v===1/0){for(let e=0;e<r;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];Am(this._ids,this._dists,0,r-1);const e=new Uint32Array(r);let n=0;for(let t=0,i=-1/0;t<r;t++){const o=this._ids[t],r=this._dists[o];r>i&&(e[n++]=o,i=r)}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Int32Array(0))}if(gm(m,g,y,_,x,b)<0){const t=p,e=y,n=_;p=f,y=x,_=b,f=t,x=e,b=n}const w=function(t,e,n,i,o,r){const s=n-t,a=i-e,l=o-t,c=r-e,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l);return{x:t+(c*u-a*h)*d,y:e+(s*h-l*u)*d}}(m,g,y,_,x,b);this._cx=w.x,this._cy=w.y;for(let e=0;e<r;e++)this._dists[e]=xm(t[2*e],t[2*e+1],w.x,w.y);Am(this._ids,this._dists,0,r-1),this._hullStart=d;let A=3;n[d]=e[f]=p,n[p]=e[d]=f,n[f]=e[p]=d,i[d]=0,i[p]=1,i[f]=2,o.fill(-1),o[this._hashKey(m,g)]=d,o[this._hashKey(y,_)]=p,o[this._hashKey(x,b)]=f,this.trianglesLen=0,this._addTriangle(d,p,f,-1,-1,-1);for(let r=0,s=0,a=0;r<this._ids.length;r++){const l=this._ids[r],c=t[2*l],u=t[2*l+1];if(r>0&&Math.abs(c-s)<=ym&&Math.abs(u-a)<=ym)continue;if(s=c,a=u,l===d||l===p||l===f)continue;let h=0;for(let t=0,e=this._hashKey(c,u);t<this._hashSize&&(h=o[(e+t)%this._hashSize],-1===h||h===n[h]);t++);h=e[h];let m,g=h;for(;m=n[g],gm(c,u,t[2*g],t[2*g+1],t[2*m],t[2*m+1])>=0;)if(g=m,g===h){g=-1;break}if(-1===g)continue;let y=this._addTriangle(g,l,n[g],-1,-1,i[g]);i[l]=this._legalize(y+2),i[g]=y,A++;let _=n[g];for(;m=n[_],gm(c,u,t[2*_],t[2*_+1],t[2*m],t[2*m+1])<0;)y=this._addTriangle(_,l,m,i[l],-1,i[_]),i[l]=this._legalize(y+2),n[_]=_,A--,_=m;if(g===h)for(;m=e[g],gm(c,u,t[2*m],t[2*m+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(m,l,g,-1,i[g],i[m]),this._legalize(y+2),i[m]=y,n[g]=g,A--,g=m;this._hullStart=e[l]=g,n[g]=e[_]=l,n[l]=_,o[this._hashKey(c,u)]=l,o[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(A);for(let t=0,e=this._hullStart;t<A;t++)this.hull[t]=e,e=n[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:i}=this;let o=0,r=0;for(;;){const s=n[t],a=t-t%3;if(r=a+(t+2)%3,-1===s){if(0===o)break;t=_m[--o];continue}const l=s-s%3,c=a+(t+1)%3,u=l+(s+2)%3,h=e[r],d=e[t],p=e[c],f=e[u];if(bm(i[2*h],i[2*h+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*f],i[2*f+1])){e[t]=f,e[s]=h;const i=n[u];if(-1===i){let e=this._hullStart;do{if(this._hullTri[e]===u){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,i),this._link(s,n[r]),this._link(r,u);const a=l+(s+1)%3;o<_m.length&&(_m[o++]=a)}else{if(0===o)break;t=_m[--o]}}return r}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,i,o,r){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,i),this._link(s+1,o),this._link(s+2,r),this.trianglesLen+=3,s}}function xm(t,e,n,i){const o=t-n,r=e-i;return o*o+r*r}function bm(t,e,n,i,o,r,s,a){const l=t-s,c=e-a,u=n-s,h=i-a,d=o-s,p=r-a,f=u*u+h*h,m=d*d+p*p;return l*(h*m-f*p)-c*(u*m-f*d)+(l*l+c*c)*(u*p-h*d)<0}function wm(t,e,n,i,o,r){const s=n-t,a=i-e,l=o-t,c=r-e,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l),p=(c*u-a*h)*d,f=(s*h-l*u)*d;return p*p+f*f}function Am(t,e,n,i){if(i-n<=20)for(let o=n+1;o<=i;o++){const i=t[o],r=e[i];let s=o-1;for(;s>=n&&e[t[s]]>r;)t[s+1]=t[s--];t[s+1]=i}else{let o=n+1,r=i;Pm(t,n+i>>1,o),e[t[n]]>e[t[i]]&&Pm(t,n,i),e[t[o]]>e[t[i]]&&Pm(t,o,i),e[t[n]]>e[t[o]]&&Pm(t,n,o);const s=t[o],a=e[s];for(;;){do{o++}while(e[t[o]]<a);do{r--}while(e[t[r]]>a);if(r<o)break;Pm(t,o,r)}t[n+1]=t[r],t[r]=s,i-o+1>=r-n?(Am(t,e,o,i),Am(t,e,n,r-1)):(Am(t,e,n,r-1),Am(t,e,o,i))}}function Pm(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function km(t){return t[0]}function Mm(t){return t[1]}const Cm=1e-6;class Im{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const i=(t=+t)+(n=+n),o=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Cm||Math.abs(this._y1-o)>Cm)&&(this._+="L"+i+","+o),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=i},${this._y1=o}`)}rect(t,e,n,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+i}h${-n}Z`}value(){return this._||null}}class Tm{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Lm{constructor(t,[e,n,i,o]=[0,0,960,500]){if(!((i=+i)>=(e=+e)&&(o=+o)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=i,this.xmin=e,this.ymax=o,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:i}=this;let o,r;const s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let i,a,l=0,c=0,u=n.length;l<u;l+=3,c+=2){const u=2*n[l],h=2*n[l+1],d=2*n[l+2],p=t[u],f=t[u+1],m=t[h],g=t[h+1],y=t[d],_=t[d+1],v=m-p,x=g-f,b=y-p,w=_-f,A=2*(v*w-x*b);if(Math.abs(A)<1e-9){if(void 0===o){o=r=0;for(const n of e)o+=t[2*n],r+=t[2*n+1];o/=e.length,r/=e.length}const n=1e9*Math.sign((o-p)*w-(r-f)*b);i=(p+y)/2-n*w,a=(f+_)/2+n*b}else{const t=1/A,e=v*v+x*x,n=b*b+w*w;i=p+(w*e-x*n)*t,a=f+(v*n-b*e)*t}s[c]=i,s[c+1]=a}let a,l,c,u=e[e.length-1],h=4*u,d=t[2*u],p=t[2*u+1];i.fill(0);for(let n=0;n<e.length;++n)u=e[n],a=h,l=d,c=p,h=4*u,d=t[2*u],p=t[2*u+1],i[a+2]=i[h]=c-p,i[a+3]=i[h+1]=d-l}render(t){const e=null==t?t=new Im:void 0,{delaunay:{halfedges:n,inedges:i,hull:o},circumcenters:r,vectors:s}=this;if(o.length<=1)return null;for(let e=0,i=n.length;e<i;++e){const i=n[e];if(i<e)continue;const o=2*Math.floor(e/3),s=2*Math.floor(i/3),a=r[o],l=r[o+1],c=r[s],u=r[s+1];this._renderSegment(a,l,c,u,t)}let a,l=o[o.length-1];for(let e=0;e<o.length;++e){a=l,l=o[e];const n=2*Math.floor(i[l]/3),c=r[n],u=r[n+1],h=4*a,d=this._project(c,u,s[h+2],s[h+3]);d&&this._renderSegment(c,u,d[0],d[1],t)}return e&&e.value()}renderBounds(t){const e=null==t?t=new Im:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(t,e){const n=null==e?e=new Im:void 0,i=this._clip(t);if(null===i||!i.length)return;e.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let t=2;t<o;t+=2)i[t]===i[t-2]&&i[t+1]===i[t-1]||e.lineTo(i[t],i[t+1]);return e.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,n=t.length/2;e<n;++e){const t=this.cellPolygon(e);t&&(t.index=e,yield t)}}cellPolygon(t){const e=new Tm;return this.renderCell(t,e),e.value()}_renderSegment(t,e,n,i,o){let r;const s=this._regioncode(t,e),a=this._regioncode(n,i);0===s&&0===a?(o.moveTo(t,e),o.lineTo(n,i)):(r=this._clipSegment(t,e,n,i,s,a))&&(o.moveTo(r[0],r[1]),o.lineTo(r[2],r[3]))}contains(t,e,n){return(e=+e)==e&&(n=+n)==n&&this.delaunay._step(t,e,n)===t}*neighbors(t){const e=this._clip(t);if(e)for(const n of this.delaunay.neighbors(t)){const t=this._clip(n);if(t)t:for(let i=0,o=e.length;i<o;i+=2)for(let r=0,s=t.length;r<s;r+=2)if(e[i]===t[r]&&e[i+1]===t[r+1]&&e[(i+2)%o]===t[(r+s-2)%s]&&e[(i+3)%o]===t[(r+s-1)%s]){yield n;break t}}}_cell(t){const{circumcenters:e,delaunay:{inedges:n,halfedges:i,triangles:o}}=this,r=n[t];if(-1===r)return null;const s=[];let a=r;do{const n=Math.floor(a/3);if(s.push(e[2*n],e[2*n+1]),a=a%3==2?a-2:a+1,o[a]!==t)break;a=i[a]}while(a!==r&&-1!==a);return s}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(t);if(null===e)return null;const{vectors:n}=this,i=4*t;return this._simplify(n[i]||n[i+1]?this._clipInfinite(t,e,n[i],n[i+1],n[i+2],n[i+3]):this._clipFinite(t,e))}_clipFinite(t,e){const n=e.length;let i,o,r,s,a=null,l=e[n-2],c=e[n-1],u=this._regioncode(l,c),h=0;for(let d=0;d<n;d+=2)if(i=l,o=c,l=e[d],c=e[d+1],r=u,u=this._regioncode(l,c),0===r&&0===u)s=h,h=0,a?a.push(l,c):a=[l,c];else{let e,n,d,p,f;if(0===r){if(null===(e=this._clipSegment(i,o,l,c,r,u)))continue;[n,d,p,f]=e}else{if(null===(e=this._clipSegment(l,c,i,o,u,r)))continue;[p,f,n,d]=e,s=h,h=this._edgecode(n,d),s&&h&&this._edge(t,s,h,a,a.length),a?a.push(n,d):a=[n,d]}s=h,h=this._edgecode(p,f),s&&h&&this._edge(t,s,h,a,a.length),a?a.push(p,f):a=[p,f]}if(a)s=h,h=this._edgecode(a[0],a[1]),s&&h&&this._edge(t,s,h,a,a.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return a}_clipSegment(t,e,n,i,o,r){const s=o<r;for(s&&([t,e,n,i,o,r]=[n,i,t,e,r,o]);;){if(0===o&&0===r)return s?[n,i,t,e]:[t,e,n,i];if(o&r)return null;let a,l,c=o||r;8&c?(a=t+(n-t)*(this.ymax-e)/(i-e),l=this.ymax):4&c?(a=t+(n-t)*(this.ymin-e)/(i-e),l=this.ymin):2&c?(l=e+(i-e)*(this.xmax-t)/(n-t),a=this.xmax):(l=e+(i-e)*(this.xmin-t)/(n-t),a=this.xmin),o?(t=a,e=l,o=this._regioncode(t,e)):(n=a,i=l,r=this._regioncode(n,i))}}_clipInfinite(t,e,n,i,o,r){let s,a=Array.from(e);if((s=this._project(a[0],a[1],n,i))&&a.unshift(s[0],s[1]),(s=this._project(a[a.length-2],a[a.length-1],o,r))&&a.push(s[0],s[1]),a=this._clipFinite(t,a))for(let e,n=0,i=a.length,o=this._edgecode(a[i-2],a[i-1]);n<i;n+=2)e=o,o=this._edgecode(a[n],a[n+1]),e&&o&&(n=this._edge(t,e,o,a,n),i=a.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(a=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return a}_edge(t,e,n,i,o){for(;e!==n;){let n,r;switch(e){case 5:e=4;continue;case 4:e=6,n=this.xmax,r=this.ymin;break;case 6:e=2;continue;case 2:e=10,n=this.xmax,r=this.ymax;break;case 10:e=8;continue;case 8:e=9,n=this.xmin,r=this.ymax;break;case 9:e=1;continue;case 1:e=5,n=this.xmin,r=this.ymin}i[o]===n&&i[o+1]===r||!this.contains(t,n,r)||(i.splice(o,0,n,r),o+=2)}return o}_project(t,e,n,i){let o,r,s,a=1/0;if(i<0){if(e<=this.ymin)return null;(o=(this.ymin-e)/i)<a&&(s=this.ymin,r=t+(a=o)*n)}else if(i>0){if(e>=this.ymax)return null;(o=(this.ymax-e)/i)<a&&(s=this.ymax,r=t+(a=o)*n)}if(n>0){if(t>=this.xmax)return null;(o=(this.xmax-t)/n)<a&&(r=this.xmax,s=e+(a=o)*i)}else if(n<0){if(t<=this.xmin)return null;(o=(this.xmin-t)/n)<a&&(r=this.xmin,s=e+(a=o)*i)}return[r,s]}_edgecode(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e<t.length;e+=2){const n=(e+2)%t.length,i=(e+4)%t.length;(t[e]===t[n]&&t[n]===t[i]||t[e+1]===t[n+1]&&t[n+1]===t[i+1])&&(t.splice(n,2),e-=2)}t.length||(t=null)}return t}}const Sm=2*Math.PI,Om=Math.pow;function jm(t){return t[0]}function zm(t){return t[1]}function Em(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Rm{static from(t,e=jm,n=zm,i){return new Rm("length"in t?function(t,e,n,i){const o=t.length,r=new Float64Array(2*o);for(let s=0;s<o;++s){const o=t[s];r[2*s]=e.call(i,o,s,t),r[2*s+1]=n.call(i,o,s,t)}return r}(t,e,n,i):Float64Array.from(function*(t,e,n,i){let o=0;for(const r of t)yield e.call(i,r,o,t),yield n.call(i,r,o,t),++o}(t,e,n,i)))}constructor(t){this._delaunator=new vm(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t<e.length;t+=3){const i=2*e[t],o=2*e[t+1],r=2*e[t+2];if((n[r]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[r+1]-n[i+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(t,e)=>e).sort((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]);const t=this.collinear[0],n=this.collinear[this.collinear.length-1],i=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],o=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]);for(let t=0,n=e.length/2;t<n;++t){const n=Em(e[2*t],e[2*t+1],o);e[2*t]=n[0],e[2*t+1]=n[1]}this._delaunator=new vm(e)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,r=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let t=0,e=n.length;t<e;++t){const e=o[t%3==2?t-2:t+1];-1!==n[t]&&-1!==r[e]||(r[e]=t)}for(let t=0,e=i.length;t<e;++t)s[i[t]]=t;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],r[i[0]]=1,2===i.length&&(r[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new Lm(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:i,halfedges:o,triangles:r,collinear:s}=this;if(s){const e=s.indexOf(t);return e>0&&(yield s[e-1]),void(e<s.length-1&&(yield s[e+1]))}const a=e[t];if(-1===a)return;let l=a,c=-1;do{if(yield c=r[l],l=l%3==2?l-2:l+1,r[l]!==t)return;if(l=o[l],-1===l){const e=n[(i[t]+1)%n.length];return void(e!==c&&(yield e))}}while(l!==a)}find(t,e,n=0){if((t=+t)!=t||(e=+e)!=e)return-1;const i=n;let o;for(;(o=this._step(n,t,e))>=0&&o!==n&&o!==i;)n=o;return o}_step(t,e,n){const{inedges:i,hull:o,_hullIndex:r,halfedges:s,triangles:a,points:l}=this;if(-1===i[t]||!l.length)return(t+1)%(l.length>>1);let c=t,u=Om(e-l[2*t],2)+Om(n-l[2*t+1],2);const h=i[t];let d=h;do{let i=a[d];const h=Om(e-l[2*i],2)+Om(n-l[2*i+1],2);if(h<u&&(u=h,c=i),d=d%3==2?d-2:d+1,a[d]!==t)break;if(d=s[d],-1===d){if(d=o[(r[t]+1)%o.length],d!==i&&Om(e-l[2*d],2)+Om(n-l[2*d+1],2)<u)return d;break}}while(d!==h);return c}render(t){const e=null==t?t=new Im:void 0,{points:n,halfedges:i,triangles:o}=this;for(let e=0,r=i.length;e<r;++e){const r=i[e];if(r<e)continue;const s=2*o[e],a=2*o[r];t.moveTo(n[s],n[s+1]),t.lineTo(n[a],n[a+1])}return this.renderHull(t),e&&e.value()}renderPoints(t,e){void 0!==e||t&&"function"==typeof t.moveTo||(e=t,t=null),e=null==e?2:+e;const n=null==t?t=new Im:void 0,{points:i}=this;for(let n=0,o=i.length;n<o;n+=2){const o=i[n],r=i[n+1];t.moveTo(o+e,r),t.arc(o,r,e,0,Sm)}return n&&n.value()}renderHull(t){const e=null==t?t=new Im:void 0,{hull:n,points:i}=this,o=2*n[0],r=n.length;t.moveTo(i[o],i[o+1]);for(let e=1;e<r;++e){const o=2*n[e];t.lineTo(i[o],i[o+1])}return t.closePath(),e&&e.value()}hullPolygon(){const t=new Tm;return this.renderHull(t),t.value()}renderTriangle(t,e){const n=null==e?e=new Im:void 0,{points:i,triangles:o}=this,r=2*o[t*=3],s=2*o[t+1],a=2*o[t+2];return e.moveTo(i[r],i[r+1]),e.lineTo(i[s],i[s+1]),e.lineTo(i[a],i[a+1]),e.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,n=t.length/3;e<n;++e)yield this.trianglePolygon(e)}trianglePolygon(t){const e=new Tm;return this.renderTriangle(t,e),e.value()}}function Nm(e){const{voronoiMaxRadius:n,onItemClick:o}=e,r=Qr(),s=Lo(),{xAxis:a,yAxis:l,xAxisIds:c,yAxisIds:u}=j(),{dispatch:h}=t.useContext(H),{series:d,seriesOrder:p}=Tr()??{},f=t.useRef({}),m=t.useRef(void 0),g=t.useRef(void 0),{setHighlighted:y,clearHighlighted:_}=q(),v=c[0],x=u[0];return(0,oh.A)(()=>(h({type:"updateVoronoiUsage",useVoronoiInteraction:!0}),()=>{h({type:"updateVoronoiUsage",useVoronoiInteraction:!1})}),[h]),(0,oh.A)(()=>{if(void 0===p||void 0===d)return;f.current={};let t=[];p.forEach(e=>{const{data:n,xAxisId:i,yAxisId:o,xAxisKey:r,yAxisKey:c}=d[e],u=a[i??r??v].scale,h=l[o??c??x].scale,p=Do(u),m=Do(h),g=n.flatMap(({x:t,y:e})=>{const n=p(t),i=m(e);return s.isPointInside({x:n,y:i})?[n,i]:[-s.width,-s.height]});f.current[e]={seriesId:e,startIndex:t.length,endIndex:t.length+g.length},t=t.concat(g)}),m.current=new Rm(t),g.current=void 0},[v,x,d,p,a,l,s]),t.useEffect(()=>{if(null===r.current)return;const t=r.current;function e(e){const i=Xr(t,e);if(!s.isPointInside(i))return g.current=void 0,"outside-chart";if(!m.current)return"no-point-found";const o=m.current.find(i.x,i.y,g.current);if(void 0===o)return"no-point-found";g.current=o;const r=Object.values(f.current).find(t=>2*o>=t.startIndex&&2*o<t.endIndex);if(void 0===r)return"no-point-found";const a=(2*o-f.current[r.seriesId].startIndex)/2;if(void 0!==n){const t=m.current.points[2*o],e=m.current.points[2*o+1];if((t-i.x)**2+(e-i.y)**2>n**2)return"outside-voronoi-max-radius"}return{seriesId:r.seriesId,dataIndex:a}}const i=()=>{h({type:"exitChart"}),_()},a=t=>{const n=e(t);if("outside-chart"===n)return h({type:"exitChart"}),void _();if("outside-voronoi-max-radius"===n||"no-point-found"===n)return h({type:"leaveItem",data:{type:"scatter"}}),void _();const{seriesId:i,dataIndex:o}=n;h({type:"enterItem",data:{type:"scatter",seriesId:i,dataIndex:o}}),y({seriesId:i,dataIndex:o})},l=t=>{if(!o)return;const n=e(t);if("string"==typeof n)return;const{seriesId:i,dataIndex:r}=n;o(t,{type:"scatter",seriesId:i,dataIndex:r})};return t.addEventListener("pointerleave",i),t.addEventListener("pointermove",a),t.addEventListener("click",l),()=>{t.removeEventListener("pointerleave",i),t.removeEventListener("pointermove",a),t.removeEventListener("click",l)}},[r,h,l,a,n,o,y,_,s]),(0,i.jsx)(t.Fragment,{})}const $m=["xAxis","yAxis","zAxis","series","tooltip","axisHighlight","voronoiMaxRadius","disableVoronoi","legend","width","height","margin","colors","sx","grid","topAxis","leftAxis","rightAxis","bottomAxis","onItemClick","children","slots","slotProps","loading","highlightedItem","onHighlightChange","className"],Bm=t.forwardRef(function(t,e){const n=m({props:t,name:"MuiScatterChart"}),{chartContainerProps:o,zAxisProps:s,voronoiHandlerProps:a,chartsAxisProps:l,gridProps:c,scatterPlotProps:u,overlayProps:h,legendProps:d,axisHighlightProps:p,tooltipProps:f,children:y}=(t=>{const{xAxis:e,yAxis:n,zAxis:i,series:o,tooltip:s,axisHighlight:a,voronoiMaxRadius:l,disableVoronoi:c,legend:u,width:h,height:d,margin:p,colors:f,sx:m,grid:y,topAxis:_,leftAxis:v,rightAxis:x,bottomAxis:b,onItemClick:w,children:A,slots:P,slotProps:k,loading:M,highlightedItem:C,onHighlightChange:I,className:T}=t,L=(0,g.A)(t,$m),S=(0,r.A)({},L,{series:o.map(t=>(0,r.A)({type:"scatter"},t)),width:h,height:d,margin:p,colors:f,xAxis:e,yAxis:n,sx:m,highlightedItem:C,onHighlightChange:I,className:T});return{chartContainerProps:S,zAxisProps:{zAxis:i},voronoiHandlerProps:{voronoiMaxRadius:l,onItemClick:w},chartsAxisProps:{topAxis:_,leftAxis:v,rightAxis:x,bottomAxis:b,slots:P,slotProps:k},gridProps:{vertical:y?.vertical,horizontal:y?.horizontal},scatterPlotProps:{onItemClick:c?w:void 0,slots:P,slotProps:k},overlayProps:{loading:M,slots:P,slotProps:k},legendProps:(0,r.A)({},u,{slots:P,slotProps:k}),axisHighlightProps:(0,r.A)({y:"none",x:"none"},a),tooltipProps:(0,r.A)({trigger:"item"},s,{slots:P,slotProps:k}),children:A}})(n);return(0,i.jsx)(ah,(0,r.A)({ref:e},o,{children:(0,i.jsxs)(uu,(0,r.A)({},s,{children:[!n.disableVoronoi&&(0,i.jsx)(Nm,(0,r.A)({},a)),(0,i.jsx)(ld,(0,r.A)({},l)),(0,i.jsx)(Hf,(0,r.A)({},c)),(0,i.jsx)("g",{"data-drawing-container":!0,children:(0,i.jsx)(am,(0,r.A)({},u))}),(0,i.jsx)(Xf,(0,r.A)({},h)),(0,i.jsx)(kf,(0,r.A)({},d)),(0,i.jsx)(If,(0,r.A)({},p)),!n.loading&&(0,i.jsx)(ff,(0,r.A)({},f)),y]}))}))}),Fm=({series:t,xAxisLabel:e,yAxisLabel:n,width:o=600,height:r=400,loading:s=!1,margin:a,valueFormatter:l=im})=>{const c=[{label:e,valueFormatter:l}],u=[{label:n,valueFormatter:l}];return(0,i.jsx)(Bm,{series:t,xAxis:c,yAxis:u,width:o,height:r,loading:s,margin:em(a),sx:om})},Dm=["id","dataIndex","classes","color","slots","slotProps","style","onClick"];function Zm(t){return(0,D.Ay)("MuiBarElement",t)}(0,Z.A)("MuiBarElement",["root"]);const Hm=(0,K.Ay)(Ei.rect,{name:"MuiBarElement",slot:"Root",overridesResolver:(t,e)=>e.root})(({ownerState:t})=>({stroke:"none",fill:t.isHighlighted?to(t.color).brighter(.5).formatHex():t.color,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:t.isFaded?.3:1}));function Um(t){const{id:e,dataIndex:n,classes:o,color:s,slots:a,slotProps:l,style:c,onClick:u}=t,h=(0,g.A)(t,Dm),d=G(),{isFaded:p,isHighlighted:f}=Ro({seriesId:e,dataIndex:n}),m={id:e,dataIndex:n,classes:o,color:s,isFaded:p,isHighlighted:f},y=(t=>{const{classes:e,id:n}=t,i={root:["root",`series-${n}`]};return(0,z.A)(i,Zm,e)})(m),_=a?.bar??Hm,v=F({elementType:_,externalSlotProps:l?.bar,externalForwardedProps:h,additionalProps:(0,r.A)({},d({type:"bar",seriesId:e,dataIndex:n}),{style:c,onClick:u,cursor:u?"pointer":"unset"}),className:y.root,ownerState:m});return(0,i.jsx)(_,(0,r.A)({},v))}const Wm=(t,{hasNegative:e,hasPositive:n,borderRadius:i,layout:o})=>{if(!i)return 0;const r="vertical"===o;return"top-left"===t&&(r&&n||!r&&e)||"top-right"===t&&(r&&n||!r&&n)||"bottom-right"===t&&(r&&e||!r&&n)||"bottom-left"===t&&(r&&e||!r&&e)?i:0},Vm=["style","maskId"];function qm(t){const e=t.ownerState;return(0,i.jsx)(Ei.rect,{style:(0,r.A)({},t.style,{clipPath:("vertical"===t.ownerState.layout?t.style?.height:t.style?.width).to(t=>{return`inset(0px round ${(n={topLeft:Math.min(t,Wm("top-left",e)),topRight:Math.min(t,Wm("top-right",e)),bottomRight:Math.min(t,Wm("bottom-right",e)),bottomLeft:Math.min(t,Wm("bottom-left",e))}).topLeft}px ${n.topRight}px ${n.bottomRight}px ${n.bottomLeft}px)`;var n})})})}function Gm(t){const{style:e,maskId:n}=t,o=(0,g.A)(t,Vm);return!t.borderRadius||t.borderRadius<=0?null:(0,i.jsx)("clipPath",{id:n,children:(0,i.jsx)(qm,{ownerState:o,style:e})})}function Km(t){return(0,D.Ay)("MuiBarLabel",t)}const Ym=(0,Z.A)("MuiBarLabel",["root","highlighted","faded"]),Xm=["seriesId","dataIndex","color","isFaded","isHighlighted","classes"],Qm=(0,K.Ay)(Ei.text,{name:"MuiBarLabel",slot:"Root",overridesResolver:(t,e)=>[{[`&.${Ym.faded}`]:e.faded},{[`&.${Ym.highlighted}`]:e.highlighted},e.root]})(({theme:t})=>(0,r.A)({},t?.typography?.body2,{stroke:"none",fill:(t.vars||t)?.palette?.text?.primary,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",textAnchor:"middle",dominantBaseline:"central",pointerEvents:"none",opacity:1,[`&.${Ym.faded}`]:{opacity:.3}}));function Jm(t){const e=m({props:t,name:"MuiBarLabel"}),n=(0,g.A)(e,Xm);return(0,i.jsx)(Qm,(0,r.A)({},n))}const tg=["seriesId","classes","color","style","dataIndex","barLabel","slots","slotProps","height","width","value"],eg=["ownerState"];function ng(t){const{seriesId:e,classes:n,color:o,style:s,dataIndex:a,barLabel:l,slots:c,slotProps:u,height:h,width:d,value:p}=t,f=(0,g.A)(t,tg),{isFaded:m,isHighlighted:y}=Ro({seriesId:e,dataIndex:a}),_={seriesId:e,classes:n,color:o,isFaded:m,isHighlighted:y,dataIndex:a},v=(t=>{const{classes:e,seriesId:n,isFaded:i,isHighlighted:o}=t,r={root:["root",`series-${n}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(r,Km,e)})(_),x=c?.barLabel??Jm,b=F({elementType:x,externalSlotProps:u?.barLabel,additionalProps:(0,r.A)({},f,{style:s,className:v.root}),ownerState:_}),{ownerState:w}=b,A=(0,g.A)(b,eg);if(!l)return null;const P=(t=>{const{barLabel:e,value:n,dataIndex:i,seriesId:o,height:r,width:s}=t;return"value"===e?n?n?.toString():null:e({seriesId:o,dataIndex:i,value:n},{bar:{height:r,width:s}})})({barLabel:l,value:p,dataIndex:a,seriesId:e,height:h,width:d});return P?(0,i.jsx)(x,(0,r.A)({},A,w,{children:P})):null}const ig=["bars","skipAnimation"],og=({layout:t,yOrigin:e,x:n,width:i,y:o,xOrigin:s,height:a})=>(0,r.A)({},"vertical"===t?{y:e,x:n+i/2,height:0,width:i}:{y:o+a/2,x:s,height:a,width:0}),rg=({x:t,width:e,y:n,height:i})=>({x:t+e/2,y:n+i/2,height:i,width:e});function sg(e){const{bars:n,skipAnimation:o}=e,s=(0,g.A)(e,ig),a=fi(n,{keys:t=>`${t.seriesId}-${t.dataIndex}`,from:og,leave:null,enter:rg,update:rg,immediate:o});return(0,i.jsx)(t.Fragment,{children:a((t,{seriesId:e,dataIndex:n,color:o,value:a,width:l,height:c})=>(0,i.jsx)(ng,(0,r.A)({seriesId:e,dataIndex:n,value:a,color:o,width:l,height:c},s,{style:t})))})}const ag=(t,e)=>e===("x"===t?Po:ko)?`The first \`${t}Axis\``:`The ${t}-axis with id "${e}"`,lg=["skipAnimation","onItemClick","borderRadius","barLabel"],cg=({layout:t,yOrigin:e,x:n,width:i,y:o,xOrigin:s,height:a})=>(0,r.A)({},"vertical"===t?{y:e,x:n,height:0,width:i}:{y:o,x:s,height:a,width:0}),ug=({x:t,width:e,y:n,height:i})=>({y:n,x:t,height:i,width:e});function hg(e){const{completedData:n,masksData:o}=(()=>{const e=function(){const e=Cr();return t.useMemo(()=>e.bar,[e.bar])}()??{series:{},stackingGroups:[],seriesOrder:[]},n=j(),i=So(),{series:o,stackingGroups:r}=e,{xAxis:s,yAxis:a,xAxisIds:l,yAxisIds:c}=n,u=l[0],h=c[0],d={};return{completedData:r.flatMap(({ids:t},e)=>t.flatMap(t=>{const n=o[t].xAxisId??o[t].xAxisKey??u,l=o[t].yAxisId??o[t].yAxisKey??h,c=s[n],p=a[l],f="vertical"===o[t].layout;!function(t,e,n,i,o,r){const s=i[n],a=r[o],l=t?s:a,c=t?a:s,u=t?n:o,h=t?o:n,d=t?"x":"y",p=t?"y":"x";if(!hc(l))throw new Error(`MUI X: ${ag(d,u)} should be of type "band" to display the bar series of id "${e}".`);if(void 0===l.data)throw new Error(`MUI X: ${ag(d,u)} should have data property.`);if(hc(c)||dc(c))throw new Error(`MUI X: ${ag(p,h)} should be a continuous type to display the bar series of id "${e}".`)}(f,t,n,s,l,a);const m=f?c:p,g=c.scale,y=p.scale,_=Bu(o[t],s[n],a[l]),v=m.scale.bandwidth(),{barWidth:x,offset:b}=function({bandWidth:t,numberOfGroups:e,gapRatio:n}){if(0===n)return{barWidth:t/e,offset:0};const i=t/(e+(e-1)*n);return{barWidth:i,offset:n*i}}({bandWidth:v,numberOfGroups:r.length,gapRatio:m.barGapRatio}),w=e*(x+b),{stackedData:A}=o[t];return A.map((r,c)=>{const u=r.map(t=>f?y(t):g(t)),h=Math.round(Math.min(...u)),p=Math.round(Math.max(...u)),m=o[t].stack,v={seriesId:t,dataIndex:c,layout:o[t].layout,x:f?g(s[n].data?.[c])+w:h,y:f?h:y(a[l].data?.[c])+w,xOrigin:g(0),yOrigin:y(0),height:f?p-h:x,width:f?x:p-h,color:_(c),value:o[t].data[c],maskId:`${i}_${m||t}_${e}_${c}`};d[v.maskId]||(d[v.maskId]={id:v.maskId,width:0,height:0,hasNegative:!1,hasPositive:!1,layout:v.layout,xOrigin:g(0),yOrigin:y(0),x:0,y:0});const b=d[v.maskId];return b.width="vertical"===v.layout?v.width:b.width+v.width,b.height="vertical"===v.layout?b.height+v.height:v.height,b.x=Math.min(0===b.x?1/0:b.x,v.x),b.y=Math.min(0===b.y?1/0:b.y,v.y),b.hasNegative=b.hasNegative||(v.value??0)<0,b.hasPositive=b.hasPositive||(v.value??0)>0,v})})),masksData:Object.values(d)}})(),{skipAnimation:s,onItemClick:a,borderRadius:l,barLabel:c}=e,u=(0,g.A)(e,lg),h=Sr(s),d=!l||l<=0,p=fi(n,{keys:t=>`${t.seriesId}-${t.dataIndex}`,from:cg,leave:cg,enter:ug,update:ug,immediate:h}),f=fi(d?[]:o,{keys:t=>t.id,from:cg,leave:cg,enter:ug,update:ug,immediate:h});return(0,i.jsxs)(t.Fragment,{children:[!d&&f((t,{id:e,hasPositive:n,hasNegative:o,layout:r})=>(0,i.jsx)(Gm,{maskId:e,borderRadius:l,hasNegative:o,hasPositive:n,layout:r,style:t})),p((t,{seriesId:e,dataIndex:n,color:o,maskId:s})=>{const l=(0,i.jsx)(Um,(0,r.A)({id:e,dataIndex:n,color:o},u,{onClick:a&&(t=>{a(t,{type:"bar",seriesId:e,dataIndex:n})}),style:t}));return d?l:(0,i.jsx)("g",{clipPath:`url(#${s})`,children:l})}),c&&(0,i.jsx)(sg,(0,r.A)({bars:n,skipAnimation:h,barLabel:c},u))]})}const dg=["xAxis","yAxis","series","width","height","margin","colors","dataset","sx","tooltip","onAxisClick","axisHighlight","legend","grid","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","skipAnimation","loading","layout","onItemClick","highlightedItem","onHighlightChange","borderRadius","barLabel","className"],pg=t.forwardRef(function(t,e){const n=m({props:t,name:"MuiBarChart"}),{chartContainerProps:o,barPlotProps:s,axisClickHandlerProps:a,gridProps:l,clipPathProps:c,clipPathGroupProps:u,overlayProps:h,chartsAxisProps:d,axisHighlightProps:p,legendProps:f,tooltipProps:y,children:_}=(t=>{const{xAxis:e,yAxis:n,series:i,width:o,height:s,margin:a,colors:l,dataset:c,sx:u,tooltip:h,onAxisClick:d,axisHighlight:p,legend:f,grid:m,topAxis:y,leftAxis:_,rightAxis:v,bottomAxis:x,children:b,slots:w,slotProps:A,skipAnimation:P,loading:k,layout:M,onItemClick:C,highlightedItem:I,onHighlightChange:T,borderRadius:L,barLabel:S,className:O}=t,j=(0,g.A)(t,dg),z=`${(0,Ao.A)()}-clip-path`,E="horizontal"===M||void 0===M&&i.some(t=>"horizontal"===t.layout),R={scaleType:"band",data:Array.from({length:Math.max(...i.map(t=>(t.data??c??[]).length))},(t,e)=>e)},N=(0,r.A)({},j,{series:i.map(t=>(0,r.A)({type:"bar"},t,{layout:E?"horizontal":"vertical"})),width:o,height:s,margin:a,colors:l,dataset:c,xAxis:e??(E?void 0:[(0,r.A)({id:Po},R)]),yAxis:n??(E?[(0,r.A)({id:ko},R)]:void 0),sx:u,highlightedItem:I,onHighlightChange:T,disableAxisListener:"axis"!==h?.trigger&&"none"===p?.x&&"none"===p?.y&&!d,className:O,skipAnimation:P});return{chartContainerProps:N,barPlotProps:{onItemClick:C,slots:w,slotProps:A,borderRadius:L,barLabel:S},axisClickHandlerProps:{onAxisClick:d},gridProps:{vertical:m?.vertical,horizontal:m?.horizontal},clipPathProps:{id:z},clipPathGroupProps:{clipPath:`url(#${z})`},overlayProps:{slots:w,slotProps:A,loading:k},chartsAxisProps:{topAxis:y,leftAxis:_,rightAxis:v,bottomAxis:x,slots:w,slotProps:A},axisHighlightProps:(0,r.A)({},E?{y:"band"}:{x:"band"},p),legendProps:(0,r.A)({},f,{slots:w,slotProps:A}),tooltipProps:(0,r.A)({},h,{slots:w,slotProps:A}),children:b}})(n);return(0,i.jsxs)(ah,(0,r.A)({ref:e},o,{children:[n.onAxisClick&&(0,i.jsx)(Uf,(0,r.A)({},a)),(0,i.jsx)(Hf,(0,r.A)({},l)),(0,i.jsxs)("g",(0,r.A)({},u,{children:[(0,i.jsx)(hg,(0,r.A)({},s)),(0,i.jsx)(Xf,(0,r.A)({},h)),(0,i.jsx)(If,(0,r.A)({},p))]})),(0,i.jsx)(ld,(0,r.A)({},d)),(0,i.jsx)(kf,(0,r.A)({},f)),!n.loading&&(0,i.jsx)(ff,(0,r.A)({},y)),(0,i.jsx)(Tf,(0,r.A)({},c)),_]}))}),fg=({series:t,categories:e,layout:n="vertical",xAxisLabel:o,yAxisLabel:r,width:s=600,height:a=400,loading:l=!1,margin:c,valueFormatter:u=im})=>{const h={data:e,scaleType:"band",label:"vertical"===n?o:r},d=[{label:"vertical"===n?r:o,valueFormatter:u}],p="vertical"===n?[h]:d,f="vertical"===n?d:[h];return(0,i.jsx)(pg,{series:t,xAxis:p,yAxis:f,layout:n,width:s,height:a,loading:l,margin:em(c),sx:om})};function mg(t){return t.innerRadius}function gg(t){return t.outerRadius}function yg(t){return t.startAngle}function _g(t){return t.endAngle}function vg(t){return t&&t.padAngle}function xg(t,e,n,i,o,r,s){var a=t-n,l=e-i,c=(s?r:-r)/Go(a*a+l*l),u=c*l,h=-c*a,d=t+u,p=e+h,f=n+u,m=i+h,g=(d+f)/2,y=(p+m)/2,_=f-d,v=m-p,x=_*_+v*v,b=o-r,w=d*m-f*p,A=(v<0?-1:1)*Go(Wo(0,b*b*x-w*w)),P=(w*v-_*A)/x,k=(-w*_-v*A)/x,M=(w*v+_*A)/x,C=(-w*_+v*A)/x,I=P-g,T=k-y,L=M-g,S=C-y;return I*I+T*T>L*L+S*S&&(P=M,k=C),{cx:P,cy:k,x01:-u,y01:-h,x11:P*(o/b-1),y11:k*(o/b-1)}}function bg(){var t=mg,e=gg,n=_(0),i=null,o=yg,r=_g,s=vg,a=null,l=C(c);function c(){var c,u,h,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=o.apply(this,arguments)-Xo,m=r.apply(this,arguments)-Xo,g=Zo(m-f),y=m>f;if(a||(a=c=l()),p<d&&(u=p,p=d,d=u),p>Ko)if(g>Qo-Ko)a.moveTo(p*Uo(f),p*qo(f)),a.arc(0,0,p,f,m,!y),d>Ko&&(a.moveTo(d*Uo(m),d*qo(m)),a.arc(0,0,d,m,f,y));else{var _,v,x=f,b=m,w=f,A=m,P=g,k=g,M=s.apply(this,arguments)/2,C=M>Ko&&(i?+i.apply(this,arguments):Go(d*d+p*p)),I=Vo(Zo(p-d)/2,+n.apply(this,arguments)),T=I,L=I;if(C>Ko){var S=Jo(C/d*qo(M)),O=Jo(C/p*qo(M));(P-=2*S)>Ko?(w+=S*=y?1:-1,A-=S):(P=0,w=A=(f+m)/2),(k-=2*O)>Ko?(x+=O*=y?1:-1,b-=O):(k=0,x=b=(f+m)/2)}var j=p*Uo(x),z=p*qo(x),E=d*Uo(A),R=d*qo(A);if(I>Ko){var N,$=p*Uo(b),B=p*qo(b),F=d*Uo(w),D=d*qo(w);if(g<Yo)if(N=function(t,e,n,i,o,r,s,a){var l=n-t,c=i-e,u=s-o,h=a-r,d=h*l-u*c;if(!(d*d<Ko))return[t+(d=(u*(e-r)-h*(t-o))/d)*l,e+d*c]}(j,z,F,D,$,B,E,R)){var Z=j-N[0],H=z-N[1],U=$-N[0],W=B-N[1],V=1/qo(((h=(Z*U+H*W)/(Go(Z*Z+H*H)*Go(U*U+W*W)))>1?0:h<-1?Yo:Math.acos(h))/2),q=Go(N[0]*N[0]+N[1]*N[1]);T=Vo(I,(d-q)/(V-1)),L=Vo(I,(p-q)/(V+1))}else T=L=0}k>Ko?L>Ko?(_=xg(F,D,j,z,p,L,y),v=xg($,B,E,R,p,L,y),a.moveTo(_.cx+_.x01,_.cy+_.y01),L<I?a.arc(_.cx,_.cy,L,Ho(_.y01,_.x01),Ho(v.y01,v.x01),!y):(a.arc(_.cx,_.cy,L,Ho(_.y01,_.x01),Ho(_.y11,_.x11),!y),a.arc(0,0,p,Ho(_.cy+_.y11,_.cx+_.x11),Ho(v.cy+v.y11,v.cx+v.x11),!y),a.arc(v.cx,v.cy,L,Ho(v.y11,v.x11),Ho(v.y01,v.x01),!y))):(a.moveTo(j,z),a.arc(0,0,p,x,b,!y)):a.moveTo(j,z),d>Ko&&P>Ko?T>Ko?(_=xg(E,R,$,B,d,-T,y),v=xg(j,z,F,D,d,-T,y),a.lineTo(_.cx+_.x01,_.cy+_.y01),T<I?a.arc(_.cx,_.cy,T,Ho(_.y01,_.x01),Ho(v.y01,v.x01),!y):(a.arc(_.cx,_.cy,T,Ho(_.y01,_.x01),Ho(_.y11,_.x11),!y),a.arc(0,0,d,Ho(_.cy+_.y11,_.cx+_.x11),Ho(v.cy+v.y11,v.cx+v.x11),y),a.arc(v.cx,v.cy,T,Ho(v.y11,v.x11),Ho(v.y01,v.x01),!y))):a.arc(0,0,d,A,w,y):a.lineTo(E,R)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-Yo/2;return[Uo(i)*n,qo(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:_(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:_(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:_(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:_(+t),c):i},c.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:_(+t),c):o},c.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:_(+t),c):r},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:_(+t),c):s},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}Object.defineProperty(bg,"name",{value:"default",configurable:!0});const wg=["classes","color","cornerRadius","dataIndex","endAngle","id","innerRadius","isFaded","isHighlighted","onClick","outerRadius","paddingAngle","startAngle","highlightScope"];function Ag(t){return(0,D.Ay)("MuiPieArc",t)}(0,Z.A)("MuiPieArc",["root","highlighted","faded"]);const Pg=(0,K.Ay)(Ei.path,{name:"MuiPieArc",slot:"Root",overridesResolver:(t,e)=>e.arc})(({theme:t})=>({stroke:(t.vars||t).palette.background.paper,transition:"opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in"}));function kg(t){const{classes:e,color:n,cornerRadius:o,dataIndex:s,endAngle:a,id:l,innerRadius:c,isFaded:u,isHighlighted:h,onClick:d,outerRadius:p,paddingAngle:f,startAngle:m}=t,y=(0,g.A)(t,wg),_={id:l,dataIndex:s,classes:e,color:n,isFaded:u,isHighlighted:h},v=(t=>{const{classes:e,id:n,isFaded:i,isHighlighted:o,dataIndex:r}=t,s={root:["root",`series-${n}`,`data-index-${r}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(s,Ag,e)})(_),x=G();return(0,i.jsx)(Pg,(0,r.A)({d:xi([m,a,f,c,p,o],(t,e,n,i,o,r)=>bg().cornerRadius(r)({padAngle:n,startAngle:t,endAngle:e,innerRadius:i,outerRadius:o})),visibility:xi([m,a],(t,e)=>t===e?"hidden":"visible"),onClick:d,cursor:d?"pointer":"unset",ownerState:_,className:v.root,fill:_.color,opacity:_.isFaded?.3:1,filter:_.isHighlighted?"brightness(120%)":"none",strokeWidth:1,strokeLinejoin:"round"},y,x({type:"pie",seriesId:l,dataIndex:s})))}const Mg={keys:t=>t.id,from:({innerRadius:t,outerRadius:e,cornerRadius:n,startAngle:i,endAngle:o,paddingAngle:r,color:s,isFaded:a})=>({innerRadius:t,outerRadius:(t+e)/2,cornerRadius:n,startAngle:(i+o)/2,endAngle:(i+o)/2,paddingAngle:r,fill:s,opacity:a?.3:1}),leave:({innerRadius:t,startAngle:e,endAngle:n})=>({innerRadius:t,outerRadius:t,startAngle:(e+n)/2,endAngle:(e+n)/2}),enter:({innerRadius:t,outerRadius:e,startAngle:n,endAngle:i})=>({innerRadius:t,outerRadius:e,startAngle:n,endAngle:i}),update:({innerRadius:t,outerRadius:e,cornerRadius:n,startAngle:i,endAngle:o,paddingAngle:r,color:s,isFaded:a})=>({innerRadius:t,outerRadius:e,cornerRadius:n,startAngle:i,endAngle:o,paddingAngle:r,fill:s,opacity:a?.3:1}),config:{tension:120,friction:14,clamp:!0}},Cg={keys:t=>t.id,from:({innerRadius:t,outerRadius:e,arcLabelRadius:n,cornerRadius:i,startAngle:o,endAngle:r,paddingAngle:s})=>({innerRadius:t,outerRadius:(t+e)/2,cornerRadius:i,arcLabelRadius:n,startAngle:(o+r)/2,endAngle:(o+r)/2,paddingAngle:s,opacity:0}),leave:({innerRadius:t,startAngle:e,endAngle:n})=>({innerRadius:t,outerRadius:t,arcLabelRadius:t,startAngle:(e+n)/2,endAngle:(e+n)/2,opacity:0}),enter:({innerRadius:t,outerRadius:e,startAngle:n,endAngle:i,arcLabelRadius:o})=>({innerRadius:t,outerRadius:e,startAngle:n,endAngle:i,arcLabelRadius:o,opacity:1}),update:({innerRadius:t,outerRadius:e,cornerRadius:n,startAngle:i,endAngle:o,paddingAngle:r,arcLabelRadius:s})=>({innerRadius:t,outerRadius:e,cornerRadius:n,startAngle:i,endAngle:o,paddingAngle:r,arcLabelRadius:s,opacity:1}),config:{tension:120,friction:14,clamp:!0}};function Ig(e){const{id:n,data:i,faded:o,highlighted:s,paddingAngle:a=0,innerRadius:l=0,arcLabelRadius:c,outerRadius:u,cornerRadius:h=0}=e,{isFaded:d,isHighlighted:p}=q();return t.useMemo(()=>i.map((t,e)=>{const i={seriesId:n,dataIndex:e},f=p(i),m=!f&&d(i),g=(0,r.A)({additionalRadius:0},m&&o||f&&s||{}),y=Math.max(0,Math.PI*(g.paddingAngle??a)/180),_=Math.max(0,g.innerRadius??l),v=Math.max(0,g.outerRadius??u+g.additionalRadius),x=g.cornerRadius??h,b=g.arcLabelRadius??c??(_+v)/2;return(0,r.A)({},t,g,{isFaded:m,isHighlighted:f,paddingAngle:y,innerRadius:_,outerRadius:v,cornerRadius:x,arcLabelRadius:b})}),[h,l,u,a,c,i,o,s,d,p,n])}const Tg=["slots","slotProps","innerRadius","outerRadius","cornerRadius","paddingAngle","id","highlighted","faded","data","onItemClick","skipAnimation"];function Lg(t){const{slots:e,slotProps:n,innerRadius:o=0,outerRadius:s,cornerRadius:a=0,paddingAngle:l=0,id:c,highlighted:u,faded:h={additionalRadius:-5},data:d,onItemClick:p,skipAnimation:f}=t,m=(0,g.A)(t,Tg),y=fi(Ig({innerRadius:o,outerRadius:s,cornerRadius:a,paddingAngle:l,id:c,highlighted:u,faded:h,data:d}),(0,r.A)({},Mg,{immediate:f})),{highlightScope:_}=q();if(0===d.length)return null;const v=e?.pieArc??kg;return(0,i.jsx)("g",(0,r.A)({},m,{children:y(({startAngle:t,endAngle:e,paddingAngle:o,innerRadius:s,outerRadius:a,cornerRadius:l},u,h,d)=>(0,i.jsx)(v,(0,r.A)({startAngle:t,endAngle:e,paddingAngle:o,innerRadius:s,outerRadius:a,cornerRadius:l,id:c,color:u.color,dataIndex:d,highlightScope:_,isFaded:u.isFaded,isHighlighted:u.isHighlighted,onClick:p&&(t=>{p(t,{type:"pie",seriesId:c,dataIndex:d},u)})},n?.pieArc)))}))}const Sg=["id","classes","color","startAngle","endAngle","paddingAngle","arcLabelRadius","innerRadius","outerRadius","cornerRadius","formattedArcLabel","isHighlighted","isFaded","style"];function Og(t){return(0,D.Ay)("MuiPieArcLabel",t)}(0,Z.A)("MuiPieArcLabel",["root","highlighted","faded"]);const jg=(0,K.Ay)(Ei.text,{name:"MuiPieArcLabel",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({fill:(t.vars||t).palette.text.primary,textAnchor:"middle",dominantBaseline:"middle",pointerEvents:"none"})),zg=(t,e)=>(n,i,o,r,s)=>{if(!t)return 0;const[a,l]=bg().cornerRadius(s).centroid({padAngle:o,startAngle:n,endAngle:i,innerRadius:r,outerRadius:r});return"x"===e?a:l};function Eg(t){const{id:e,classes:n,color:o,startAngle:s,endAngle:a,paddingAngle:l,arcLabelRadius:c,cornerRadius:u,formattedArcLabel:h,isHighlighted:d,isFaded:p,style:f}=t,m=(0,g.A)(t,Sg),y=(t=>{const{classes:e,id:n,isFaded:i,isHighlighted:o}=t,r={root:["root",`series-${n}`,o&&"highlighted",i&&"faded"]};return(0,z.A)(r,Og,e)})({id:e,classes:n,color:o,isFaded:p,isHighlighted:d});return(0,i.jsx)(jg,(0,r.A)({className:y.root},m,{style:(0,r.A)({x:xi([s,a,l,c,u],zg(h,"x")),y:xi([s,a,l,c,u],zg(h,"y"))},f),children:h}))}const Rg=["arcLabel","arcLabelMinAngle","arcLabelRadius","cornerRadius","data","faded","highlighted","id","innerRadius","outerRadius","paddingAngle","skipAnimation","slotProps","slots"],Ng=["startAngle","endAngle","paddingAngle","innerRadius","outerRadius","arcLabelRadius","cornerRadius"],$g=180/Math.PI;function Bg(t,e,n){if(!t)return null;if((n.endAngle-n.startAngle)*$g<e)return null;switch(t){case"label":return Ku(n.label,"arc");case"value":return n.value?.toString();case"formattedValue":return n.formattedValue;default:return t((0,r.A)({},n,{label:Ku(n.label,"arc")}))}}function Fg(t){const{arcLabel:e,arcLabelMinAngle:n=0,arcLabelRadius:o,cornerRadius:s=0,data:a,faded:l={additionalRadius:-5},highlighted:c,id:u,innerRadius:h,outerRadius:d,paddingAngle:p=0,skipAnimation:f,slotProps:m,slots:y}=t,_=(0,g.A)(t,Rg),v=fi(Ig({innerRadius:h,outerRadius:d,arcLabelRadius:o,cornerRadius:s,paddingAngle:p,id:u,highlighted:c,faded:l,data:a}),(0,r.A)({},Cg,{immediate:f}));if(0===a.length)return null;const x=y?.pieArcLabel??Eg;return(0,i.jsx)("g",(0,r.A)({},_,{children:v((t,o)=>{let{startAngle:s,endAngle:a,paddingAngle:l,innerRadius:c,outerRadius:h,arcLabelRadius:d,cornerRadius:p}=t,f=(0,g.A)(t,Ng);return(0,i.jsx)(x,(0,r.A)({startAngle:s,endAngle:a,paddingAngle:l,innerRadius:c,outerRadius:h,arcLabelRadius:d,cornerRadius:p,style:f,id:u,color:o.color,isFaded:o.isFaded,isHighlighted:o.isHighlighted,formattedArcLabel:Bg(e,n,o)},m?.pieArcLabel))})}))}function Dg(t,e){if("number"==typeof t)return t;if("100%"===t)return e;if(t.endsWith("%")){const n=Number.parseFloat(t.slice(0,t.length-1));if(!Number.isNaN(n))return n*e/100}if(t.endsWith("px")){const e=Number.parseFloat(t.slice(0,t.length-2));if(!Number.isNaN(e))return e}throw new Error(`MUI X: Received an unknown value "${t}". It should be a number, or a string with a percentage value.`)}function Zg(t,e){const{height:n,width:i}=e,{cx:o,cy:r}=t,s=Math.min(i,n)/2;return{cx:Dg(o??"50%",i),cy:Dg(r??"50%",n),availableRadius:s}}function Hg(e){const{skipAnimation:n,slots:o,slotProps:r,onItemClick:s}=e,a=function(){const e=Cr();return t.useMemo(()=>e.pie,[e.pie])}(),{left:l,top:c,width:u,height:h}=t.useContext(Co),d=Sr(n);if(void 0===a)return null;const{series:p,seriesOrder:f}=a;return(0,i.jsxs)("g",{children:[f.map(t=>{const{innerRadius:e,outerRadius:n,cornerRadius:a,paddingAngle:f,data:m,cx:g,cy:y,highlighted:_,faded:v}=p[t],{cx:x,cy:b,availableRadius:w}=Zg({cx:g,cy:y},{width:u,height:h}),A=Dg(n??w,w),P=Dg(e??0,w);return(0,i.jsx)("g",{transform:`translate(${l+x}, ${c+b})`,children:(0,i.jsx)(Lg,{innerRadius:P,outerRadius:A,cornerRadius:a,paddingAngle:f,id:t,data:m,skipAnimation:d,highlighted:_,faded:v,onItemClick:s,slots:o,slotProps:r})},t)}),f.map(t=>{const{innerRadius:e,outerRadius:n,arcLabelRadius:s,cornerRadius:a,paddingAngle:f,arcLabel:m,arcLabelMinAngle:g,data:y,cx:_,cy:v}=p[t],{cx:x,cy:b,availableRadius:w}=Zg({cx:_,cy:v},{width:u,height:h}),A=Dg(n??w,w),P=Dg(e??0,w),k=void 0===s?(A+P)/2:Dg(s,w);return(0,i.jsx)("g",{transform:`translate(${l+x}, ${c+b})`,children:(0,i.jsx)(Fg,{innerRadius:P,outerRadius:A??w,arcLabelRadius:k,cornerRadius:a,paddingAngle:f,id:t,data:y,skipAnimation:d,arcLabel:m,arcLabelMinAngle:g,slots:o,slotProps:r})},t)})]})}const Ug=["xAxis","yAxis","series","width","height","margin","colors","sx","tooltip","axisHighlight","skipAnimation","legend","topAxis","leftAxis","rightAxis","bottomAxis","children","slots","slotProps","onItemClick","loading","highlightedItem","onHighlightChange","className"],Wg={top:5,bottom:5,left:5,right:100},Vg={top:5,bottom:5,left:100,right:5},qg=t.forwardRef(function(t,e){const n=m({props:t,name:"MuiPieChart"}),{xAxis:o,yAxis:s,series:a,width:l,height:c,margin:u,colors:h,sx:d,tooltip:p={trigger:"item"},axisHighlight:f={x:"none",y:"none"},skipAnimation:y,legend:_,topAxis:v=null,leftAxis:x=null,rightAxis:b=null,bottomAxis:w=null,children:A,slots:P,slotProps:k,onItemClick:M,loading:C,highlightedItem:I,onHighlightChange:T,className:L}=n,S=(0,g.A)(n,Ug),O=ed(),j=(0,r.A)({},O?Vg:Wg,u),z=(0,r.A)({direction:"column",position:{vertical:"middle",horizontal:O?"left":"right"}},_);return(0,i.jsxs)(ah,(0,r.A)({},S,{ref:e,series:a.map(t=>(0,r.A)({type:"pie"},t)),width:l,height:c,margin:j,xAxis:o??[{id:Po,scaleType:"point",data:[...new Array(Math.max(0,...a.map(t=>t.data.length)))].map((t,e)=>e)}],yAxis:s,colors:h,sx:d,disableAxisListener:"axis"!==p?.trigger&&"none"===f?.x&&"none"===f?.y,highlightedItem:I,onHighlightChange:T,className:L,skipAnimation:y,children:[(0,i.jsx)(ld,{topAxis:v,leftAxis:x,rightAxis:b,bottomAxis:w,slots:P,slotProps:k}),(0,i.jsx)(Hg,{slots:P,slotProps:k,onItemClick:M}),(0,i.jsx)(Xf,{loading:C,slots:P,slotProps:k}),(0,i.jsx)(kf,(0,r.A)({},z,{slots:P,slotProps:k})),(0,i.jsx)(If,(0,r.A)({},f)),!C&&(0,i.jsx)(ff,(0,r.A)({},p,{slots:P,slotProps:k})),A]}))});var Gg=c(9071),Kg=c(3478);const Yg=(0,Z.A)("MuiBox",["root"]),Xg=(0,Kg.A)(),Qg=(0,Zr.createBox)({themeId:f.A,defaultTheme:Xg,defaultClassName:Yg.root,generateClassName:Gg.A.generate}),Jg=({data:t,width:e=400,height:n=400,innerRadius:o=60,outerRadius:r=120,paddingAngle:s=2,loading:a=!1,hideLegend:l=!1})=>(0,i.jsxs)(Qg,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%"},children:[(0,i.jsx)(qg,{series:[{data:t,innerRadius:o,outerRadius:r,paddingAngle:s}],width:e,height:n,loading:a,margin:{top:10,right:10,bottom:10,left:10},slotProps:{legend:{hidden:!0}}}),!l&&(0,i.jsx)(Qg,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"4px 16px",mt:1,px:1,maxWidth:e},children:t.map(t=>(0,i.jsxs)(Qg,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[(0,i.jsx)(Qg,{sx:{width:12,height:12,borderRadius:"3px",backgroundColor:t.color,flexShrink:0}}),(0,i.jsx)(sf,{sx:{fontSize:12,lineHeight:1.3,color:"text.secondary"},children:t.label})]},t.id))})]});var ty=c(7423),ey=c(9582);const ny=(t,e)=>`${t>0?"+":""}${t}${e}`,iy=({title:t,value:e,unit:o,delta:r,deltaSuffix:s="%",status:a,icon:l,loading:c=!1})=>{const u=void 0===r?void 0:r>0?"success.main":r<0?"error.main":"text.secondary";return(0,i.jsx)(n.Card,{variant:"outlined",sx:{minWidth:200},children:(0,i.jsxs)(n.CardContent,{children:[(0,i.jsxs)(n.Box,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,i.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:t}),l&&(0,i.jsx)(n.Box,{color:"text.secondary",display:"flex",alignItems:"center",children:l})]}),(0,i.jsx)(n.Box,{mt:1,display:"flex",alignItems:"baseline",gap:.5,children:c?(0,i.jsx)(n.Skeleton,{width:80,height:40}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.Typography,{variant:"h4",component:"div",children:e}),o&&(0,i.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:o})]})}),(0,i.jsxs)(n.Box,{mt:1,display:"flex",alignItems:"center",gap:1,children:[void 0!==r&&!c&&(0,i.jsxs)(n.Box,{display:"flex",alignItems:"center",sx:{color:u},children:[r>0?(0,i.jsx)(ty.A,{fontSize:"small"}):r<0?(0,i.jsx)(ey.A,{fontSize:"small"}):null,(0,i.jsx)(n.Typography,{variant:"body2",component:"span",sx:{fontWeight:500},children:ny(r,s)})]}),a&&!c&&(0,i.jsx)(n.Chip,{label:a.label,size:"small",color:a.color??"default"})]})]})})},oy=86400,ry=7*oy,sy=30*oy,ay=365*oy,ly=(t,e=new Date)=>{const n=t instanceof Date?t:new Date(t),i=Math.round((e.getTime()-n.getTime())/1e3);return Number.isNaN(i)?"":i<0?"in the future":i<5?"just now":i<60?`${i} seconds ago`:i<120?"1 minute ago":i<3600?`${Math.floor(i/60)} minutes ago`:i<7200?"1 hour ago":i<oy?`${Math.floor(i/3600)} hours ago`:i<2*oy?"yesterday":i<ry?`${Math.floor(i/oy)} days ago`:i<2*ry?"1 week ago":i<sy?`${Math.floor(i/ry)} weeks ago`:i<5184e3?"1 month ago":i<ay?`${Math.floor(i/sy)} months ago`:i<2*ay?"1 year ago":`${Math.floor(i/ay)} years ago`},cy=({items:t,loading:e=!1,emptyMessage:o="No activity yet.",maxHeight:r,now:s})=>e?(0,i.jsx)(n.List,{dense:!0,sx:{maxHeight:r,overflowY:r?"auto":void 0},children:Array.from({length:3}).map((t,e)=>(0,i.jsxs)(n.ListItem,{alignItems:"flex-start",children:[(0,i.jsx)(n.ListItemAvatar,{children:(0,i.jsx)(n.Skeleton,{variant:"circular",width:40,height:40})}),(0,i.jsx)(n.ListItemText,{primary:(0,i.jsx)(n.Skeleton,{width:"60%"}),secondary:(0,i.jsx)(n.Skeleton,{width:"30%"})})]},e))}):0===t.length?(0,i.jsx)(n.Box,{p:2,children:(0,i.jsx)(n.Typography,{variant:"body2",color:"text.secondary",children:o})}):(0,i.jsx)(n.List,{dense:!0,sx:{maxHeight:r,overflowY:r?"auto":void 0},children:t.map(t=>(0,i.jsxs)(n.ListItem,{alignItems:"flex-start",children:[(0,i.jsx)(n.ListItemAvatar,{children:(0,i.jsx)(n.Avatar,{sx:{bgcolor:t.iconColor},children:t.icon})}),(0,i.jsx)(n.ListItemText,{primary:t.description,secondary:ly(t.timestamp,s)})]},t.id))});var uy=c(1386);const hy=({rows:t,columns:o,loading:r=!1,pageSize:s=10,pageSizeOptions:a=[5,10,25,30,50],initialSort:l,height:c=400,density:u="standard",checkboxSelection:h=!1,disablePagination:d=!1,onRowClick:p})=>{const[f,m]=e().useState({page:0,pageSize:s});return(0,i.jsx)(n.Box,{sx:{height:c,width:"100%"},children:(0,i.jsx)(uy.DataGrid,{rows:t,columns:o,loading:r,density:u,checkboxSelection:h,initialState:{sorting:l?{sortModel:l}:void 0},paginationModel:d?void 0:f,onPaginationModelChange:d?void 0:m,pageSizeOptions:a,hideFooterPagination:d,onRowClick:p?t=>p(t.row):void 0,disableRowSelectionOnClick:!0})})};function dy(t,e){return Object.freeze({...t,...e})}const py=(0,t.createContext)(null),fy=py.Provider;function my(){const e=(0,t.useContext)(py);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}var gy=c(3481),yy=c.n(gy);function _y(){return _y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_y.apply(this,arguments)}function vy({bounds:e,boundsOptions:n,center:i,children:o,className:r,id:s,placeholder:a,style:l,whenReady:c,zoom:u,...h},d){const[p]=(0,t.useState)({className:r,id:s,style:l}),[f,m]=(0,t.useState)(null);(0,t.useImperativeHandle)(d,()=>f?.map??null,[f]);const g=(0,t.useCallback)(t=>{if(null!==t&&null===f){const o=new gy.Map(t,h);null!=i&&null!=u?o.setView(i,u):null!=e&&o.fitBounds(e,n),null!=c&&o.whenReady(c),m(function(t){return Object.freeze({__version:1,map:t})}(o))}},[]);(0,t.useEffect)(()=>()=>{f?.map.remove()},[f]);const y=f?t.createElement(fy,{value:f},o):a??null;return t.createElement("div",_y({},p,{ref:g}),y)}const xy=(0,t.forwardRef)(vy);function by(e){function n(n,i){const{instance:o,context:r}=e(n).current;return(0,t.useImperativeHandle)(i,()=>o),null==n.children?null:t.createElement(fy,{value:r},n.children)}return(0,t.forwardRef)(n)}function wy(t,e,n){return Object.freeze({instance:t,context:e,container:n})}function Ay(e,n){return null==n?function(n,i){const o=(0,t.useRef)();return o.current||(o.current=e(n,i)),o}:function(i,o){const r=(0,t.useRef)();r.current||(r.current=e(i,o));const s=(0,t.useRef)(i),{instance:a}=r.current;return(0,t.useEffect)(function(){s.current!==i&&(n(a,i,s.current),s.current=i)},[a,i,o]),r}}function Py(e,n){const i=(0,t.useRef)(n);(0,t.useEffect)(function(){n!==i.current&&null!=e.attributionControl&&(null!=i.current&&e.attributionControl.removeAttribution(i.current),null!=n&&e.attributionControl.addAttribution(n)),i.current=n},[e,n])}function ky(e,n){const i=(0,t.useRef)();(0,t.useEffect)(function(){return null!=n&&e.instance.on(n),i.current=n,function(){null!=i.current&&e.instance.off(i.current),i.current=null}},[e,n])}function My(t,e){const n=t.pane??e.pane;return n?{...t,pane:n}:t}function Cy(e,n){(0,t.useEffect)(function(){return(n.layerContainer??n.map).addLayer(e.instance),function(){n.layerContainer?.removeLayer(e.instance),n.map.removeLayer(e.instance)}},[n,e])}function Iy(t){return function(e){const n=my(),i=t(My(e,n),n);return Py(n.map,e.attribution),ky(i.current,e.eventHandlers),Cy(i.current,n),i}}const Ty=(Ly=function({url:t,...e},n){return wy(new gy.TileLayer(t,My(e,n)),n)},function(e){function n(n,i){const{instance:o}=e(n).current;return(0,t.useImperativeHandle)(i,()=>o),null}return(0,t.forwardRef)(n)}(Iy(Ay(Ly,function(t,e,n){!function(t,e,n){const{opacity:i,zIndex:o}=e;null!=i&&i!==n.opacity&&t.setOpacity(i),null!=o&&o!==n.zIndex&&t.setZIndex(o)}(t,e,n);const{url:i}=e;null!=i&&i!==n.url&&t.setUrl(i)}))));var Ly;const Sy=by((zy=Ay(function({center:t,children:e,...n},i){const o=new gy.CircleMarker(t,n);return wy(o,dy(i,{overlayContainer:o}))},function(t,e,n){e.center!==n.center&&t.setLatLng(e.center),null!=e.radius&&e.radius!==n.radius&&t.setRadius(e.radius)}),function(e){const n=my(),i=zy(My(e,n),n);return ky(i.current,e.eventHandlers),Cy(i.current,n),function(e,n){const i=(0,t.useRef)();(0,t.useEffect)(function(){if(n.pathOptions!==i.current){const t=n.pathOptions??{};e.instance.setStyle(t),i.current=t}},[e,n])}(i.current,e),i})),Oy=function(){const e=function(t,e){return function(n,i){const o=my(),r=t(My(n,o),o);return Py(o.map,n.attribution),ky(r.current,n.eventHandlers),e(r.current,o,n,i),r}}(Ay(function(t,e){return wy(new gy.Popup(t,e.overlayContainer),e)}),function(e,n,{position:i},o){(0,t.useEffect)(function(){const{instance:t}=e;function r(e){e.popup===t&&(t.update(),o(!0))}function s(e){e.popup===t&&o(!1)}return n.map.on({popupopen:r,popupclose:s}),null==n.overlayContainer?(null!=i&&t.setLatLng(i),t.openOn(n.map)):n.overlayContainer.bindPopup(t),function(){n.map.off({popupopen:r,popupclose:s}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(t)}},[e,n,o,i])});return function(e){function n(n,i){const[o,r]=(0,t.useState)(!1),{instance:s}=e(n,r).current;(0,t.useImperativeHandle)(i,()=>s),(0,t.useEffect)(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?(0,bi.createPortal)(n.children,a):null}return(0,t.forwardRef)(n)}(e)}(),jy=by(Iy(Ay(function({position:t,...e},n){const i=new gy.Marker(t,e);return wy(i,dy(n,{overlayContainer:i}))},function(t,e,n){e.position!==n.position&&t.setLatLng(e.position),null!=e.icon&&e.icon!==n.icon&&t.setIcon(e.icon),null!=e.zIndexOffset&&e.zIndexOffset!==n.zIndexOffset&&t.setZIndexOffset(e.zIndexOffset),null!=e.opacity&&e.opacity!==n.opacity&&t.setOpacity(e.opacity),null!=t.dragging&&e.draggable!==n.draggable&&(!0===e.draggable?t.dragging.enable():t.dragging.disable())})));var zy,Ey=c(5072),Ry=c.n(Ey),Ny=c(7825),$y=c.n(Ny),By=c(7659),Fy=c.n(By),Dy=c(5056),Zy=c.n(Dy),Hy=c(540),Uy=c.n(Hy),Wy=c(1113),Vy=c.n(Wy),qy=c(1081),Gy={};Gy.styleTagTransform=Vy(),Gy.setAttributes=Zy(),Gy.insert=Fy().bind(null,"head"),Gy.domAPI=$y(),Gy.insertStyleElement=Uy(),Ry()(qy.A,Gy),qy.A&&qy.A.locals&&qy.A.locals;const Ky=yy().icon({iconUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});yy().Marker.prototype.options.icon=Ky;const Yy=({points:t,enabled:n})=>{const i=my().map;return e().useEffect(()=>{if(!n||0===t.length)return;const e=t.map(t=>[t.lat,t.lng]);i.fitBounds(e,{padding:[40,40]})},[t,n,i]),null},Xy=({points:t,center:e,zoom:o=5,height:r=500,width:s="100%",variant:a="marker",fitBounds:l=!0,tileUrl:c="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",tileAttribution:u='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',loading:h=!1})=>{const d=e??(t.length>0?[t[0].lat,t[0].lng]:[20.5937,78.9629]);return(0,i.jsxs)(n.Box,{sx:{position:"relative",height:r,width:s,"& .leaflet-container":{height:"100%",width:"100%"}},children:[(0,i.jsxs)(xy,{center:d,zoom:o,scrollWheelZoom:!0,children:[(0,i.jsx)(Ty,{url:c,attribution:u}),(0,i.jsx)(Yy,{points:t,enabled:l}),t.map(t=>"circle"===a?(0,i.jsx)(Sy,{center:[t.lat,t.lng],radius:8,pathOptions:{color:t.color??"#1976d2",fillColor:t.color??"#1976d2",fillOpacity:.7},children:(t.label||t.description)&&(0,i.jsxs)(Oy,{children:[t.label&&(0,i.jsx)("strong",{children:t.label}),t.description&&(0,i.jsx)(n.Box,{mt:t.label?.5:0,children:t.description})]})},t.id):(0,i.jsx)(jy,{position:[t.lat,t.lng],children:(t.label||t.description)&&(0,i.jsxs)(Oy,{children:[t.label&&(0,i.jsx)("strong",{children:t.label}),t.description&&(0,i.jsx)(n.Box,{mt:t.label?.5:0,children:t.description})]})},t.id))]}),h&&(0,i.jsx)(n.Box,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"rgba(255,255,255,0.6)",zIndex:500},children:(0,i.jsx)(n.CircularProgress,{})})]})},Qy=({series:t,xAxisData:e,xAxisLabel:n,yAxisLabel:o,width:r=600,height:s=400,loading:a=!1,showMarks:l=!1,margin:c,valueFormatter:u=im})=>{const h=e?[{data:e,scaleType:"point",label:n}]:n?[{label:n}]:void 0,d=[{label:o,valueFormatter:u}],p=t.map(t=>({...t,area:!0,showMark:l}));return(0,i.jsx)(Jf,{series:p,xAxis:h,yAxis:d,width:r,height:s,loading:a,margin:em(c),sx:om})}})(),u})());
|