@perses-dev/histogram-chart-plugin 0.13.0-beta.2 → 0.13.0-beta.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.
Files changed (23) hide show
  1. package/__mf/js/{HistogramChart.df5fff46.js → HistogramChart.e1912eda.js} +5 -5
  2. package/__mf/js/async/{121.27e8d4f8.js → 121.db4baaec.js} +2 -2
  3. package/__mf/js/async/{392.5ba26727.js → 392.499edcc0.js} +2 -2
  4. package/__mf/js/async/{470.2ea03b19.js → 470.3e0b7777.js} +2 -2
  5. package/__mf/js/async/659.7ed1095b.js +50 -0
  6. package/__mf/js/async/{887.bbc6e84a.js → 887.c095919a.js} +4 -4
  7. package/__mf/js/async/{888.85a51e69.js → 888.dc262bce.js} +1 -1
  8. package/__mf/js/async/{941.8421dbe6.js → 941.b983cd2a.js} +2 -2
  9. package/__mf/js/async/{953.bbe56839.js → 953.fe311d62.js} +2 -2
  10. package/__mf/js/async/{963.0a826f58.js → 963.7dc7c03f.js} +1 -1
  11. package/__mf/js/async/{__federation_expose_HistogramChart.a9992cd4.js → __federation_expose_HistogramChart.bb5f7535.js} +1 -1
  12. package/__mf/js/main.39390506.js +7 -0
  13. package/mf-manifest.json +16 -16
  14. package/mf-stats.json +16 -16
  15. package/package.json +4 -4
  16. package/__mf/js/async/362.fcbf1223.js +0 -1
  17. package/__mf/js/main.4a790b64.js +0 -7
  18. /package/__mf/js/async/{121.27e8d4f8.js.LICENSE.txt → 121.db4baaec.js.LICENSE.txt} +0 -0
  19. /package/__mf/js/async/{392.5ba26727.js.LICENSE.txt → 392.499edcc0.js.LICENSE.txt} +0 -0
  20. /package/__mf/js/async/{470.2ea03b19.js.LICENSE.txt → 470.3e0b7777.js.LICENSE.txt} +0 -0
  21. /package/__mf/js/async/{887.bbc6e84a.js.LICENSE.txt → 887.c095919a.js.LICENSE.txt} +0 -0
  22. /package/__mf/js/async/{941.8421dbe6.js.LICENSE.txt → 941.b983cd2a.js.LICENSE.txt} +0 -0
  23. /package/__mf/js/async/{953.bbe56839.js.LICENSE.txt → 953.fe311d62.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
- /*! For license information please see 887.bbc6e84a.js.LICENSE.txt */
2
- (self.chunk_HistogramChart_0_13_0_beta_2=self.chunk_HistogramChart_0_13_0_beta_2||[]).push([["887"],{98025(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,requirePropFactory:()=>p,unstable_useId:()=>m.A,debounce:()=>s.A,setRef:()=>f,unstable_useEnhancedEffect:()=>g.A,useEventCallback:()=>x.A,unsupportedProp:()=>v,ownerWindow:()=>h.A,deprecatedPropType:()=>l,mergeSlotProps:()=>w.A,isMuiElement:()=>u.A,useControlled:()=>y.A,ownerDocument:()=>d.A,createChainedFunction:()=>o,unstable_memoTheme:()=>c.A,unstable_ClassNameGenerator:()=>S,useForkRef:()=>b.A,createSvgIcon:()=>a.A});var r=n(71027),i=n(24726);let o=n(37605).A;var a=n(22402),s=n(55403);let l=function(e,t){return()=>null};var u=n(6835),c=n(23434),d=n(1092),h=n(63025);let p=function(e,t){return()=>null},f=n(71849).A;var g=n(54382),m=n(63392);let v=function(e,t,n,r,i){return null};var y=n(2203),x=n(32398),b=n(29424),w=n(64606);let S={configure:e=>{r.A.configure(e)}}},32398(e,t,n){"use strict";n.d(t,{A:()=>r});let r=n(83183).A},63392(e,t,n){"use strict";n.d(t,{A:()=>r});let r=n(54553).A},70158(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var i=n(96844);function o(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,n){var a=t.map(function(t){var a=null==n?t:r(r({},t),{options:r(r({},o(n)),o(t.options))});return(0,i.bind)(e,a)});return function(){a.forEach(function(e){return e()})}}},96844(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var n=t.type,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}},96907(e,t,n){"use strict";t.bindAll=t.bind=void 0;var r=n(96844);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return r.bind}});var i=n(70158);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return i.bindAll}})},1416(e,t,n){e.exports=n(99138)(n(41433),"DataView")},42616(e,t,n){e.exports=n(99138)(n(41433),"Promise")},60157(e,t,n){e.exports=n(99138)(n(41433),"Set")},61527(e,t,n){var r=n(90369),i=n(79912),o=n(23767);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},78499(e,t,n){e.exports=n(99138)(n(41433),"WeakMap")},61414(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},78740(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},57260(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},74403(e,t,n){var r=n(78740),i=n(6397);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},22122(e,t,n){var r=n(42032),i=n(22934);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,a,e,s):t!=t&&n!=n)}},42032(e,t,n){var r=n(86469),i=n(44075),o=n(64622),a=n(62677),s=n(31201),l=n(6397),u=n(30492),c=n(47995),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),x=l(t),b=y?h:s(e),w=x?h:s(t);b=b==d?p:b,w=w==d?p:w;var S=b==p,A=w==p,C=b==w;if(C&&u(e)){if(!u(t))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new r),y||c(e)?i(e,t,n,g,m,v):o(e,t,b,n,g,m,v);if(!(1&n)){var M=S&&f.call(e,"__wrapped__"),k=A&&f.call(t,"__wrapped__");if(M||k){var T=M?e.value():e,_=k?t.value():t;return v||(v=new r),m(T,_,n,g,v)}}return!!C&&(v||(v=new r),a(e,t,n,g,m,v))}},81452(e,t,n){var r=n(67499),i=n(9566),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},68812(e,t,n){var r=n(62140),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},79151(e){e.exports=function(e,t){return e.has(t)}},44075(e,t,n){var r=n(61527),i=n(57260),o=n(79151);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var v=e[f],y=t[f];if(a)var x=u?a(y,v,f,t,e,l):a(v,y,f,e,t,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!i(t,function(e,t){if(!o(m,t)&&(v===e||s(v,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(!(v===y||s(v,y,n,a,l))){g=!1;break}}return l.delete(e),l.delete(t),g}},64622(e,t,n){var r=n(32781),i=n(28944),o=n(39316),a=n(44075),s=n(90953),l=n(15851),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)break;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=a(p(e),p(t),r,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},62677(e,t,n){var r=n(90966),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var v=e[h=u[d]],y=t[h];if(o)var x=l?o(y,v,h,t,e,s):o(v,y,h,e,t,s);if(!(void 0===x?v===y||a(v,y,n,o,s):x)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(e),s.delete(t),g}},90966(e,t,n){var r=n(74403),i=n(88876),o=n(31178);e.exports=function(e){return r(e,o,i)}},88876(e,t,n){var r=n(61414),i=n(53629),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.exports=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return o.call(e,t)})}:i},31201(e,t,n){var r=n(1416),i=n(91955),o=n(42616),a=n(60157),s=n(78499),l=n(87148),u=n(81485),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(r),m=u(i),v=u(o),y=u(a),x=u(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=f||i&&b(new i)!=c||o&&b(o.resolve())!=d||a&&b(new a)!=h||s&&b(new s)!=p)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return f;case m:return c;case v:return d;case y:return h;case x:return p}return t}),e.exports=b},90953(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},9566(e,t,n){e.exports=n(51019)(Object.keys,Object)},79912(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},23767(e){e.exports=function(e){return this.__data__.has(e)}},15851(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},62140(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},46177(e,t,n){var r=n(58953),i=n(43664),o=n(95378),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function x(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||m&&r>=c}function b(){var e,n,r,o=i();if(x(o))return w(o);h=setTimeout(b,(e=o-p,n=o-f,r=t-e,m?s(r,c-n):r))}function w(e){return(h=void 0,v&&l)?y(e):(l=u=void 0,d)}function S(){var e,n=i(),r=x(n);if(l=arguments,u=this,p=n,r){if(void 0===h)return f=e=p,h=setTimeout(b,t),g?y(e):d;if(m)return clearTimeout(h),h=setTimeout(b,t),y(p)}return void 0===h&&(h=setTimeout(b,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?d:w(i())},S}},18264(e,t,n){var r=n(22122);e.exports=function(e,t){return r(e,t)}},75414(e,t,n){var r=n(87148),i=n(22934);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},31178(e,t,n){var r=n(31163),i=n(81452),o=n(18330);e.exports=function(e){return o(e)?r(e):i(e)}},43664(e,t,n){var r=n(41433);e.exports=function(){return r.Date.now()}},53629(e){e.exports=function(){return[]}},95378(e,t,n){var r=n(68812),i=n(58953),o=n(75414),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},24300(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},87275(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},11061(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},29618(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Circle")},7800(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},98029(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},86067(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},53064(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},26684(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Earth")},78536(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},1355(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},17366(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},98599(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},4491(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},29917(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},86742(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},16979(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z","UnfoldLessHorizontal")},9323(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z","UnfoldMoreHorizontal")},12933(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z","ViewColumn")},1448(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(98025),i=n(62540);t.default=function(e,t){return(0,r.createSvgIcon)((0,i.jsx)("path",{d:e}),t)}},40362(e,t,n){"use strict";var r=n(56441);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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:o,resetWarningCache:i};return n.PropTypes=n,n}},62688(e,t,n){e.exports=n(40362)()},56441(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},77440(e,t,n){!function(e,t){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=i,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(i)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i,o,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(r=s)&&(r=[]),n.length!==r.length||n.some(function(e,t){return!Object.is(e,r[t])}))&&(null==(i=(o=this.props).onResetKeysChange)||i.call(o,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,i=t.FallbackComponent,o=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof r)return r(a);if(i)return n.createElement(i,a);else throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),r=t[0],i=t[1];if(null!=e)throw e;if(null!=r)throw r;return i},e.withErrorBoundary=function(e,t){var r=function(r){return n.createElement(o,t,n.createElement(e,r))};return r.displayName="withErrorBoundary("+(e.displayName||e.name||"Unknown")+")",r},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(70451))},23420(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},42915(e){"use strict";var t;t=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],l={types:i,conversions:s,ignore:a};function u(e){var t=N(l.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=N(l.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(e){return e===o?999:l.types.indexOf(e)}function d(e){var t=N(l.types,function(t){return t.test(e)});if(t)return t.name;throw TypeError("Value has unknown type. Value: "+e)}function h(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function p(e){var t=P(e);return!!t&&t.restParam}function f(e){return e.types.some(function(e){return null!=e.conversion})}function g(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return u(t.types[0].name).test;if(2===t.types.length){var n=u(t.types[0].name).test,r=u(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return u(e.name).test});return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}function m(e,t){return t<e.params.length?e.params[t]:p(e.params)?P(e.params):null}function v(e,t,n){var r=m(e,t);return(r?n?r.types.filter(x):r.types:[]).map(y)}function y(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function b(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(B(e,function(e){return v(e,t,!1)}));return -1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,a=e||"unnamed",s=n;for(o=0;o<t.length;o++){var l=s.filter(function(e){var n=g(m(e,o));return(o<e.params.length||p(e.params))&&n(t[o])});if(0===l.length){if((i=b(s,o)).length>0){var u=d(t[o]);return(r=TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+u+", index: "+o+")")).data={category:"wrongType",fn:a,index:o,actual:u,expected:i},r}}else s=l}var c=s.map(function(e){return p(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,c))return(r=TypeError("Too few arguments in function "+a+" (expected: "+(i=b(s,o)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:a,index:t.length,expected:i},r;var h=Math.max.apply(null,c);return t.length>h?(r=TypeError("Too many arguments in function "+a+" (expected: "+h+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:h}:(r=TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:t.map(d)},r}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function A(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(f)-t.params.some(f)))return r;for(n=0;n<i;n++)if(0!=(r=f(e.params[n])-f(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=function(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=f(e)-f(t))||0!=(n=S(e)-S(t))?n:A(e)-A(t)}(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach(function(e){e.conversion&&(o.push(u(e.conversion.from).test),a.push(e.conversion.convert))}),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function k(e,t){return function e(n,r,i){if(!(r<n.length))return[i.map(function(e,t){return{types:e,restParam:t===n.length-1&&p(n)}})];var o,a=n[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);o=l.length<s.length?[l,s]:[s]}else o=s.map(function(e){return[e]});return B(o,function(t){return e(n,r+1,i.concat([t]))})}(e,0,[])}function T(e,r){if(0===Object.keys(r).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(r).map(function(e){var t,n,i;return t=r[e],n=l.conversions,i=[],(""!==e.trim()&&(i=e.split(",").map(D).map(function(e,t,r){var i,o,a,s,l,d,h,p,f=(i=n,o=l=((s=0===e.indexOf("..."))?e.length>3?e.slice(3):"any":e).split("|").map(D).filter(O).filter(I),a={},i.forEach(function(e){-1!==o.indexOf(e.from)||-1===o.indexOf(e.to)||a[e.from]||(a[e.from]=e)}),d=Object.keys(a).map(function(e){return a[e]}),h=l.map(function(e){var t=u(e);return{name:e,typeIndex:c(t),test:t.test,conversion:null,conversionIndex:-1}}),p=d.map(function(e){var t=u(e.from);return{name:e.from,typeIndex:c(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}),{types:h.concat(p),restParam:s});if(f.restParam&&t!==r.length-1)throw SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return f})),i.some(E))?null:{params:i,fn:t}}).filter(R).forEach(function(e){var t=N(o,function(t){return function(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!function(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],-1!==t.indexOf(n))return!0;return!1}(v(e,r,!0),v(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,a=p(e.params),s=p(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}(t,e)});if(t)throw TypeError('Conflicting signatures "'+h(t.params)+'" and "'+h(e.params)+'".');o.push(e)});var a=B(o,function(e){return(e?k(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(R);a.sort(C);var s=a[0]&&a[0].params.length<=2&&!p(a[0].params),d=a[1]&&a[1].params.length<=2&&!p(a[1].params),m=a[2]&&a[2].params.length<=2&&!p(a[2].params),y=a[3]&&a[3].params.length<=2&&!p(a[3].params),x=a[4]&&a[4].params.length<=2&&!p(a[4].params),b=a[5]&&a[5].params.length<=2&&!p(a[5].params),w=a.map(function(e){return function(e){var t,n,r;if(p(e)){var i,o=(t=(i=e).slice(0,i.length-1).map(g)).length,a=g(P(e)),s=function(e){for(var t=o;t<e.length;t++)if(!a(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return s(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=g(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=g(e[0]),r=g(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(g),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}(e.params)}),S=s?g(a[0].params[0]):t,A=d?g(a[1].params[0]):t,T=m?g(a[2].params[0]):t,_=y?g(a[3].params[0]):t,z=x?g(a[4].params[0]):t,j=b?g(a[5].params[0]):t,F=s?g(a[0].params[1]):t,V=d?g(a[1].params[1]):t,$=m?g(a[2].params[1]):t,H=y?g(a[3].params[1]):t,W=x?g(a[4].params[1]):t,G=b?g(a[5].params[1]):t,U=a.map(function(e){return function(e,t){var n=t;if(e.some(f)){var r=p(e),i=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(p(e)){var a=e.length-1;o=function(){return n.apply(this,L(arguments,0,a).concat([L(arguments,a)]))}}return o}(e.params,e.fn)}),q=s?U[0]:n,Y=d?U[1]:n,X=m?U[2]:n,Z=y?U[3]:n,K=x?U[4]:n,Q=b?U[5]:n,J=s?a[0].params.length:-1,ee=d?a[1].params.length:-1,et=m?a[2].params.length:-1,en=y?a[3].params.length:-1,er=x?a[4].params.length:-1,ei=b?a[5].params.length:-1,eo=6*!!(s&&d&&m&&y&&x&&b),ea=a.length,es=function(){for(var t=eo;t<ea;t++)if(w[t](arguments))return U[t].apply(this,arguments);return l.onMismatch(e,arguments,a)},el=function e(t,n){return arguments.length===J&&S(t)&&F(n)?q.apply(e,arguments):arguments.length===ee&&A(t)&&V(n)?Y.apply(e,arguments):arguments.length===et&&T(t)&&$(n)?X.apply(e,arguments):arguments.length===en&&_(t)&&H(n)?Z.apply(e,arguments):arguments.length===er&&z(t)&&W(n)?K.apply(e,arguments):arguments.length===ei&&j(t)&&G(n)?Q.apply(e,arguments):es.apply(e,arguments)};try{Object.defineProperty(el,"name",{value:e})}catch(e){}return i={},a.forEach(function(e){e.params.some(f)||k(e.params,!0).forEach(function(t){i[h(t)]=e.fn})}),el.signatures=i,el}function _(e,t,n){throw w(e,t,n)}function I(e){return -1===l.ignore.indexOf(e)}function D(e){return e.trim()}function O(e){return!!e}function R(e){return null!==e}function E(e){return 0===e.types.length}function P(e){return e[e.length-1]}function L(e,t,n){return Array.prototype.slice.call(e,t,n)}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function B(e,t){return Array.prototype.concat.apply([],e.map(t))}function z(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name){if(""===t)t=r.name;else if(t!==r.name){var i=Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}}return t}function j(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[i];if("object"==typeof o.signatures)for(var a in o.signatures)o.signatures.hasOwnProperty(a)&&(r(a,o.signatures[a]),n[a]=o.signatures[a]);else if("string"==typeof o.signature)r(o.signature,o),n[o.signature]=o;else throw(t=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t}return n}return(l=T("typed",{"string, Object":T,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return T(z(t),e)},"...Function":function(e){return T(z(e),j(e))},"string, ...Function":function(e,t){return T(e,j(t))}})).create=r,l.types=i,l.conversions=s,l.ignore=a,l.onMismatch=_,l.throwMismatchError=_,l.createError=w,l.convert=function(e,t){var n=d(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var i=l.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw Error("Cannot convert from "+n+" to "+t)},l.find=function(e,t){if(!e.signatures)throw TypeError("Function is no typed-function");if("string"==typeof t){n=t.split(",");for(var n,r=0;r<n.length;r++)n[r]=n[r].trim()}else if(Array.isArray(t))n=t;else throw TypeError("String array or a comma separated string expected");var i=n.join(","),o=e.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},l.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==t){for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e)}l.types.push(e)},l.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}()},"function"==typeof define&&define.amd?define([],t):e.exports=t()},1858(e,t,n){"use strict";let r,i;n.r(t),n.d(t,{generateChartsTheme:()=>ae,DensitySelector:()=>xt,applyMergeIndexedColumnsTransform:()=>ai,interpolateSelectionIndividual:()=>o9,DragButton:()=>x8,TimeRangeSelector:()=>YP,getFormatterStats:()=>rc,OptionsEditorGrid:()=>yw,TOOLTIP_MAX_HEIGHT:()=>YF,useMousePosition:()=>YK,TextOverlay:()=>$c,isValidLegendSize:()=>rr,isValidLegendMode:()=>rn,isDateUnit:()=>iR,parseVariables:()=>iJ,UnitSelector:()=>XA,PERCENT_UNIT_CONFIG:()=>it,RepeatGrid:()=>X1,PERCENT_GROUP_CONFIG:()=>r7,YAxisLabel:()=>Xk,replaceVariablesForDisplay:()=>i2,TOOLTIP_MIN_WIDTH:()=>Yz,useId:()=>iq,getTitleAction:()=>n6,getYBuffer:()=>Xs,PINNED_CROSSHAIR_SERIES_NAME:()=>nU,getPixelXFromGrid:()=>Y3,getFormattedAxisLabel:()=>oJ,clearHighlightedSeries:()=>iF,FALLBACK_CHART_WIDTH:()=>YW,restoreChart:()=>ij,FormatControls:()=>XM,transformData:()=>aa,getTimeSeriesValues:()=>u2,DEFAULT_LEGEND:()=>ri,OptionsEditorControl:()=>yb,formatDecimal:()=>ic,DiscardChangesConfirmationDialog:()=>yr,formatTime:()=>rb,SelectionProvider:()=>tO,TimeChartTooltip:()=>Xx,legendModes:()=>n7,EMPTY_TOOLTIP_DATA:()=>YZ,isThroughputUnit:()=>iD,applyJoinTransform:()=>an,TextField:()=>vA,SeriesInfo:()=>Y1,getClosestTimestamp:()=>iW,DropIndicator:()=>xn,applyMergeColumnsTransform:()=>ar,isTemperatureUnit:()=>iE,limitDecimalPlaces:()=>rp,useSnackbar:()=>nH,dateFormatOptionsWithTimeZone:()=>oZ,calculateBarYBounds:()=>Y7,DEFAULT_COLUMN_HEIGHT:()=>40,parseVariablesAndFormat:()=>i0,getCommonTimeScale:()=>u5,isBytesUnit:()=>ik,ModeSelector:()=>$n,OptionsEditorColumn:()=>yp,DECIMAL_UNIT_CONFIG:()=>iu,DEFAULT_PINNED_CROSSHAIR:()=>nq,TEMPERATURE_GROUP_CONFIG:()=>io,NoDataOverlay:()=>$d,getResourceExtendedDisplayName:()=>u6,InterpolationFormat:()=>iY,ErrorBoundary:()=>IO.ErrorBoundary,hasDataFieldPatterns:()=>oi,CURRENCY_UNIT_CONFIG:()=>r8,ToolbarIconButton:()=>Xw,DEFAULT_TOOLTIP_CONFIG:()=>YQ,TRANSFORM_TEXT:()=>iP,calculateBarBandwidth:()=>Y8,ItemActionsProvider:()=>tM,isWithinPercentageRange:()=>Xa,OPTIMIZED_MODE_SERIES_LIMIT:()=>1e3,legendPositions:()=>n9,TIME_GROUP_CONFIG:()=>rg,defaultCursorData:()=>YX,createTimezoneAwareAxisFormatter:()=>Iv,RefreshIntervalPicker:()=>X0,legendSizes:()=>re,BITS_GROUP_CONFIG:()=>rQ,TOOLTIP_LABELS_MAX_WIDTH:()=>YV,applyValueMapping:()=>at,UNIT_GROUP_CONFIG:()=>iv,batchDispatchNearbySeriesActions:()=>i$,DEFAULT_COLUMN_WIDTH:()=>150,getGMTOffset:()=>oQ,getPointInGrid:()=>iV,InfoTooltip:()=>yv,AlignSelector:()=>e$,JSONEditor:()=>V5,CURRENCY_GROUP_CONFIG:()=>r6,TooltipHeader:()=>Xy,SeriesMarker:()=>YN,FontSizeSelector:()=>IE,THROUGHPUT_UNIT_CONFIG:()=>ip,DEFAULT_COLUMN_MAX_WIDTH:()=>1e3,TOOLTIP_PADDING:()=>YH,TimeZoneContext:()=>u8,TimeZoneProvider:()=>u9,useDeepMemo:()=>o5,TransformsEditor:()=>XJ,combineSx:()=>iU,getFormatterFromCache:()=>ru,applyMergeSeriesTransform:()=>ao,Legend:()=>vz,Dialog:()=>yn,getFormattedMultipleYAxes:()=>iN,replaceVariables:()=>i1,DECIMAL_GROUP_CONFIG:()=>il,getResourceDisplayName:()=>u3,SnackbarProvider:()=>n$,formatBytes:()=>r5,getUnitConfig:()=>ib,LoadingOverlay:()=>$h,formatWithTimeZone:()=>oK,legacyCheckforNearbySeries:()=>Xi,replaceVariable:()=>iK,UNIT_CONFIG:()=>iy,testChartsTheme:()=>X_,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>Y$,interpolate:()=>iZ,THROUGHPUT_GROUP_CONFIG:()=>id,BYTES_UNIT_CONFIG:()=>r2,useChartsTheme:()=>tA,calculateBarSegmentBounds:()=>Y9,checkCrosshairPinnedStatus:()=>iH,mockChartsContext:()=>XI,checkforNearbyTimeSeries:()=>Xr,TOOLTIP_DATE_FORMAT:()=>YY,hasDecimalPlaces:()=>rh,isCurrencyUnit:()=>iO,DEFAULT_COLUMN_MIN_WIDTH:()=>60,handleMoveUp:()=>x3,ContentWithLegend:()=>vF,OptionsEditorGroup:()=>yS,isUnitWithDecimalPlaces:()=>i_,SeriesLabelsStack:()=>YB,getDateAndTime:()=>o0,getTableCellLayout:()=>fm,ChartsThemeContext:()=>tw,TooltipContent:()=>Xl,isValidTraceId:()=>u4,formatCurrency:()=>r9,ValueMappingsEditor:()=>Zf,BYTES_GROUP_CONFIG:()=>r1,interpolateSelectionBatch:()=>o7,isLegendItemVisuallySelected:()=>co,getFormattedAxis:()=>iL,getClosestTimestampInFullDataset:()=>iG,ChartsProvider:()=>tb,TimeZoneSelector:()=>YL,LinkEditorForm:()=>$e,SortSelector:()=>$f,formatValue:()=>ix,persesColumnsToTanstackColumns:()=>fv,NEARBY_SERIES_DESCRIPTION:()=>YG,calculateVisualYForSeries:()=>Y6,hasIndexedPatterns:()=>or,ColorPicker:()=>tv,useItemActions:()=>t_,getUnitGroup:()=>iw,formatThroughput:()=>ig,getTheme:()=>X$,shouldShortenValues:()=>rd,MIN_STEP_INTERVAL_MS:()=>u1,buildRelativeTimeOption:()=>n4,useSelection:()=>tP,TEMPERATURE_UNIT_CONFIG:()=>ia,SortSelectorButtons:()=>$g,formatBits:()=>r0,getTimeZoneOptions:()=>n3,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>Xt,isUnitWithShortValues:()=>iI,getTooltipStyles:()=>Y4,interpolateHeaders:()=>o6,ErrorAlert:()=>ID,OptionsColorPicker:()=>ce,getUnitGroupConfig:()=>iS,TOOLTIP_BG_COLOR_FALLBACK:()=>Yq,TOOLTIP_MAX_WIDTH:()=>Yj,DragAndDropElement:()=>x5,extractFieldNames:()=>oo,isBitsUnit:()=>iT,SHOW_FEWER_SERIES_LIMIT:()=>Xn,TIME_UNIT_CONFIG:()=>rm,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>Xe,isPercentUnit:()=>iC,getLegendSize:()=>rs,getSubmitText:()=>n8,handleMoveDown:()=>x6,PIN_TOOLTIP_HELP_TEXT:()=>YJ,Table:()=>vE,typography:()=>XF,formatPercent:()=>ir,assembleTransform:()=>Y5,formatTemperature:()=>is,useTimeZone:()=>u7,createRegexFromString:()=>o3,hasBatchPatterns:()=>on,PersesTimeToIntlTime:()=>rv,parseFormat:()=>i7,FormActions:()=>IP,getNearbySeriesData:()=>Xo,useMemoized:()=>o2,isValidLegendPosition:()=>rt,getLegendMode:()=>ra,EMPHASIZED_SERIES_DESCRIPTION:()=>YU,replaceDataFields:()=>oe,Drawer:()=>bv,getLegendPosition:()=>ro,BITS_UNIT_CONFIG:()=>rJ,EChart:()=>Ig,isTimeUnit:()=>iA,useChartsContext:()=>tS,interpolateQueryParams:()=>o8,UNPIN_TOOLTIP_HELP_TEXT:()=>Y0,DateTimeRangePicker:()=>YE,SettingsAutocomplete:()=>y7,ThresholdsEditor:()=>$D,isDecimalUnit:()=>iM,enableDataZoom:()=>iz,replaceDataFieldsBatch:()=>ot,useDragAndDropMonitor:()=>x2,useLocalStorage:()=>iB,isRegexPattern:()=>o4});var o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T,_=n(62540),I=n(70451),D=n.n(I),O=n(11750),R=n(81023),E=n(59238);function P(e){return I.Children.toArray(e).filter(e=>I.isValidElement(e))}var L=n(24726),N=n(77308),B=n(23434),z=n(26952),j=n(72052),F=n(29009),V=n(46733);function $(e){return(0,V.Ay)("MuiButtonGroup",e)}let H=(0,F.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),W=I.createContext({}),G=I.createContext(void 0),U=(0,N.A)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${H.grouped}`]:t.grouped},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.orientation)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}${(0,L.A)(n.orientation)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}${(0,L.A)(n.color)}`]},{[`& .${H.firstButton}`]:t.firstButton},{[`& .${H.lastButton}`]:t.lastButton},{[`& .${H.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,B.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${H.lastButton},& .${H.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${H.lastButton},& .${H.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${H.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${H.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,z.A)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,E.X4)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${H.lastButton},& .${H.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${H.lastButton},& .${H.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${H.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${H.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,z.A)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${H.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),q=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:c=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:f="outlined",...g}=n,m={...n,color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,orientation:h,size:p,variant:f},v=(e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,a,o&&"fullWidth",i&&"disableElevation",`color${(0,L.A)(n)}`],grouped:["grouped",`grouped${(0,L.A)(a)}`,`grouped${(0,L.A)(s)}`,`grouped${(0,L.A)(s)}${(0,L.A)(a)}`,`grouped${(0,L.A)(s)}${(0,L.A)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,R.A)(l,$,t)})(m),y=I.useMemo(()=>({className:v.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,size:p,variant:f}),[o,s,l,u,c,d,p,f,v.grouped]),x=P(r),b=x.length;return(0,_.jsx)(U,{as:a,role:"group",className:(0,O.A)(v.root,i),ref:t,ownerState:m,...g,children:(0,_.jsx)(W.Provider,{value:y,children:x.map((e,t)=>{let n,r;return(0,_.jsx)(G.Provider,{value:(n=0===t,r=t===b-1,n&&r?"":n?v.firstButton:r?v.lastButton:v.middleButton),children:e},t)})})})});var Y=n(52215),X=n(63392),Z=n(83926);function K(e){try{return e.matches(":focus-visible")}catch(e){}return!1}var Q=n(29424),J=n(32398),ee=n(48731);class et{static create(){return new et}static use(){let e=(0,ee.A)(et.create).current,[t,n]=I.useState(!1);return e.shouldMount=t,e.setShouldMount=n,I.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){let e,t,n;return this.mounted||(this.mounted=((n=new Promise((n,r)=>{e=n,t=r})).resolve=e,n.reject=t,n),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}var en=n(49257),er=n(68102),ei=n(7490),eo=n(33477);function ea(e,t){var n=Object.create(null);return e&&I.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,I.isValidElement)(e)?t(e):e}),n}function es(e,t,n){return null!=n[t]?n[t]:e.props[t]}var el=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},eu=function(e){function t(t,n){var r=e.call(this,t,n)||this,i=r.handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,ei.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?ea(e.children,function(t){return(0,I.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:es(t,"appear",e),enter:es(t,"enter",e),exit:es(t,"exit",e)})}):(Object.keys(r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(i,n=ea(e.children))).forEach(function(t){var a=r[t];if((0,I.isValidElement)(a)){var s=t in i,l=t in n,u=i[t],c=(0,I.isValidElement)(u)&&!u.props.in;l&&(!s||c)?r[t]=(0,I.cloneElement)(a,{onExited:o.bind(null,a),in:!0,exit:es(a,"exit",e),enter:es(a,"enter",e)}):l||!s||c?l&&s&&(0,I.isValidElement)(u)&&(r[t]=(0,I.cloneElement)(a,{onExited:o.bind(null,a),in:u.props.in,exit:es(a,"exit",e),enter:es(a,"enter",e)})):r[t]=(0,I.cloneElement)(a,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=ea(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,er.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,en.A)(e,["component","childFactory"]),i=this.state.contextValue,o=el(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?D().createElement(eo.A.Provider,{value:i},o):D().createElement(eo.A.Provider,{value:i},D().createElement(t,r,o))},t}(D().Component);eu.propTypes={},eu.defaultProps={component:"div",childFactory:function(e){return e}};var ec=n(3725),ed=n(91785);let eh=(0,F.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ep=(0,ed.i7)`
1
+ /*! For license information please see 887.c095919a.js.LICENSE.txt */
2
+ (self.chunk_HistogramChart_0_13_0_beta_3=self.chunk_HistogramChart_0_13_0_beta_3||[]).push([["887"],{98025(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,requirePropFactory:()=>p,unstable_useId:()=>m.A,debounce:()=>s.A,setRef:()=>f,unstable_useEnhancedEffect:()=>g.A,useEventCallback:()=>x.A,unsupportedProp:()=>v,ownerWindow:()=>h.A,deprecatedPropType:()=>l,mergeSlotProps:()=>w.A,isMuiElement:()=>u.A,useControlled:()=>y.A,ownerDocument:()=>d.A,createChainedFunction:()=>o,unstable_memoTheme:()=>c.A,unstable_ClassNameGenerator:()=>S,useForkRef:()=>b.A,createSvgIcon:()=>a.A});var r=n(71027),i=n(24726);let o=n(37605).A;var a=n(22402),s=n(55403);let l=function(e,t){return()=>null};var u=n(6835),c=n(23434),d=n(1092),h=n(63025);let p=function(e,t){return()=>null},f=n(71849).A;var g=n(54382),m=n(63392);let v=function(e,t,n,r,i){return null};var y=n(2203),x=n(32398),b=n(29424),w=n(64606);let S={configure:e=>{r.A.configure(e)}}},32398(e,t,n){"use strict";n.d(t,{A:()=>r});let r=n(83183).A},63392(e,t,n){"use strict";n.d(t,{A:()=>r});let r=n(54553).A},70158(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var i=n(96844);function o(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,n){var a=t.map(function(t){var a=null==n?t:r(r({},t),{options:r(r({},o(n)),o(t.options))});return(0,i.bind)(e,a)});return function(){a.forEach(function(e){return e()})}}},96844(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var n=t.type,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}},96907(e,t,n){"use strict";t.bindAll=t.bind=void 0;var r=n(96844);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return r.bind}});var i=n(70158);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return i.bindAll}})},1416(e,t,n){e.exports=n(99138)(n(41433),"DataView")},42616(e,t,n){e.exports=n(99138)(n(41433),"Promise")},60157(e,t,n){e.exports=n(99138)(n(41433),"Set")},61527(e,t,n){var r=n(90369),i=n(79912),o=n(23767);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},78499(e,t,n){e.exports=n(99138)(n(41433),"WeakMap")},61414(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},78740(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},57260(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},74403(e,t,n){var r=n(78740),i=n(6397);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},22122(e,t,n){var r=n(42032),i=n(22934);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,a,e,s):t!=t&&n!=n)}},42032(e,t,n){var r=n(86469),i=n(44075),o=n(64622),a=n(62677),s=n(31201),l=n(6397),u=n(30492),c=n(47995),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),x=l(t),b=y?h:s(e),w=x?h:s(t);b=b==d?p:b,w=w==d?p:w;var S=b==p,A=w==p,C=b==w;if(C&&u(e)){if(!u(t))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new r),y||c(e)?i(e,t,n,g,m,v):o(e,t,b,n,g,m,v);if(!(1&n)){var M=S&&f.call(e,"__wrapped__"),k=A&&f.call(t,"__wrapped__");if(M||k){var T=M?e.value():e,_=k?t.value():t;return v||(v=new r),m(T,_,n,g,v)}}return!!C&&(v||(v=new r),a(e,t,n,g,m,v))}},81452(e,t,n){var r=n(67499),i=n(9566),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},68812(e,t,n){var r=n(62140),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},79151(e){e.exports=function(e,t){return e.has(t)}},44075(e,t,n){var r=n(61527),i=n(57260),o=n(79151);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var v=e[f],y=t[f];if(a)var x=u?a(y,v,f,t,e,l):a(v,y,f,e,t,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!i(t,function(e,t){if(!o(m,t)&&(v===e||s(v,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(!(v===y||s(v,y,n,a,l))){g=!1;break}}return l.delete(e),l.delete(t),g}},64622(e,t,n){var r=n(32781),i=n(28944),o=n(39316),a=n(44075),s=n(90953),l=n(15851),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)break;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=a(p(e),p(t),r,u,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},62677(e,t,n){var r=n(90966),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var h=u[d];if(!(l?h in t:i.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d<c;){var v=e[h=u[d]],y=t[h];if(o)var x=l?o(y,v,h,t,e,s):o(v,y,h,e,t,s);if(!(void 0===x?v===y||a(v,y,n,o,s):x)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(e),s.delete(t),g}},90966(e,t,n){var r=n(74403),i=n(88876),o=n(31178);e.exports=function(e){return r(e,o,i)}},88876(e,t,n){var r=n(61414),i=n(53629),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.exports=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return o.call(e,t)})}:i},31201(e,t,n){var r=n(1416),i=n(91955),o=n(42616),a=n(60157),s=n(78499),l=n(87148),u=n(81485),c="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(r),m=u(i),v=u(o),y=u(a),x=u(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=f||i&&b(new i)!=c||o&&b(o.resolve())!=d||a&&b(new a)!=h||s&&b(new s)!=p)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return f;case m:return c;case v:return d;case y:return h;case x:return p}return t}),e.exports=b},90953(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},9566(e,t,n){e.exports=n(51019)(Object.keys,Object)},79912(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},23767(e){e.exports=function(e){return this.__data__.has(e)}},15851(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},62140(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},46177(e,t,n){var r=n(58953),i=n(43664),o=n(95378),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function x(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||m&&r>=c}function b(){var e,n,r,o=i();if(x(o))return w(o);h=setTimeout(b,(e=o-p,n=o-f,r=t-e,m?s(r,c-n):r))}function w(e){return(h=void 0,v&&l)?y(e):(l=u=void 0,d)}function S(){var e,n=i(),r=x(n);if(l=arguments,u=this,p=n,r){if(void 0===h)return f=e=p,h=setTimeout(b,t),g?y(e):d;if(m)return clearTimeout(h),h=setTimeout(b,t),y(p)}return void 0===h&&(h=setTimeout(b,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?d:w(i())},S}},18264(e,t,n){var r=n(22122);e.exports=function(e,t){return r(e,t)}},75414(e,t,n){var r=n(87148),i=n(22934);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},31178(e,t,n){var r=n(31163),i=n(81452),o=n(18330);e.exports=function(e){return o(e)?r(e):i(e)}},43664(e,t,n){var r=n(41433);e.exports=function(){return r.Date.now()}},53629(e){e.exports=function(){return[]}},95378(e,t,n){var r=n(68812),i=n(58953),o=n(75414),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},24300(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},87275(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},11061(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},29618(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Circle")},7800(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},98029(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},86067(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},53064(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},26684(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Earth")},78536(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},1355(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},17366(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},98599(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},4491(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},29917(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},86742(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},16979(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z","UnfoldLessHorizontal")},9323(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z","UnfoldMoreHorizontal")},12933(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n(1448))&&r.__esModule?r:{default:r}).default)("M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z","ViewColumn")},1448(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(98025),i=n(62540);t.default=function(e,t){return(0,r.createSvgIcon)((0,i.jsx)("path",{d:e}),t)}},40362(e,t,n){"use strict";var r=n(56441);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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:o,resetWarningCache:i};return n.PropTypes=n,n}},62688(e,t,n){e.exports=n(40362)()},56441(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},77440(e,t,n){!function(e,t){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=i,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(i)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i,o,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(r=s)&&(r=[]),n.length!==r.length||n.some(function(e,t){return!Object.is(e,r[t])}))&&(null==(i=(o=this.props).onResetKeysChange)||i.call(o,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,i=t.FallbackComponent,o=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof r)return r(a);if(i)return n.createElement(i,a);else throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),r=t[0],i=t[1];if(null!=e)throw e;if(null!=r)throw r;return i},e.withErrorBoundary=function(e,t){var r=function(r){return n.createElement(o,t,n.createElement(e,r))};return r.displayName="withErrorBoundary("+(e.displayName||e.name||"Unknown")+")",r},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(70451))},23420(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},42915(e){"use strict";var t;t=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],l={types:i,conversions:s,ignore:a};function u(e){var t=N(l.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=N(l.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(e){return e===o?999:l.types.indexOf(e)}function d(e){var t=N(l.types,function(t){return t.test(e)});if(t)return t.name;throw TypeError("Value has unknown type. Value: "+e)}function h(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function p(e){var t=P(e);return!!t&&t.restParam}function f(e){return e.types.some(function(e){return null!=e.conversion})}function g(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return u(t.types[0].name).test;if(2===t.types.length){var n=u(t.types[0].name).test,r=u(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return u(e.name).test});return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}function m(e,t){return t<e.params.length?e.params[t]:p(e.params)?P(e.params):null}function v(e,t,n){var r=m(e,t);return(r?n?r.types.filter(x):r.types:[]).map(y)}function y(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function b(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(B(e,function(e){return v(e,t,!1)}));return -1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,a=e||"unnamed",s=n;for(o=0;o<t.length;o++){var l=s.filter(function(e){var n=g(m(e,o));return(o<e.params.length||p(e.params))&&n(t[o])});if(0===l.length){if((i=b(s,o)).length>0){var u=d(t[o]);return(r=TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+u+", index: "+o+")")).data={category:"wrongType",fn:a,index:o,actual:u,expected:i},r}}else s=l}var c=s.map(function(e){return p(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,c))return(r=TypeError("Too few arguments in function "+a+" (expected: "+(i=b(s,o)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:a,index:t.length,expected:i},r;var h=Math.max.apply(null,c);return t.length>h?(r=TypeError("Too many arguments in function "+a+" (expected: "+h+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:h}:(r=TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:t.map(d)},r}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function A(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(f)-t.params.some(f)))return r;for(n=0;n<i;n++)if(0!=(r=f(e.params[n])-f(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=function(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=f(e)-f(t))||0!=(n=S(e)-S(t))?n:A(e)-A(t)}(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach(function(e){e.conversion&&(o.push(u(e.conversion.from).test),a.push(e.conversion.convert))}),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function k(e,t){return function e(n,r,i){if(!(r<n.length))return[i.map(function(e,t){return{types:e,restParam:t===n.length-1&&p(n)}})];var o,a=n[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);o=l.length<s.length?[l,s]:[s]}else o=s.map(function(e){return[e]});return B(o,function(t){return e(n,r+1,i.concat([t]))})}(e,0,[])}function T(e,r){if(0===Object.keys(r).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(r).map(function(e){var t,n,i;return t=r[e],n=l.conversions,i=[],(""!==e.trim()&&(i=e.split(",").map(D).map(function(e,t,r){var i,o,a,s,l,d,h,p,f=(i=n,o=l=((s=0===e.indexOf("..."))?e.length>3?e.slice(3):"any":e).split("|").map(D).filter(O).filter(I),a={},i.forEach(function(e){-1!==o.indexOf(e.from)||-1===o.indexOf(e.to)||a[e.from]||(a[e.from]=e)}),d=Object.keys(a).map(function(e){return a[e]}),h=l.map(function(e){var t=u(e);return{name:e,typeIndex:c(t),test:t.test,conversion:null,conversionIndex:-1}}),p=d.map(function(e){var t=u(e.from);return{name:e.from,typeIndex:c(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}),{types:h.concat(p),restParam:s});if(f.restParam&&t!==r.length-1)throw SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return f})),i.some(E))?null:{params:i,fn:t}}).filter(R).forEach(function(e){var t=N(o,function(t){return function(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!function(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],-1!==t.indexOf(n))return!0;return!1}(v(e,r,!0),v(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,a=p(e.params),s=p(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}(t,e)});if(t)throw TypeError('Conflicting signatures "'+h(t.params)+'" and "'+h(e.params)+'".');o.push(e)});var a=B(o,function(e){return(e?k(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(R);a.sort(C);var s=a[0]&&a[0].params.length<=2&&!p(a[0].params),d=a[1]&&a[1].params.length<=2&&!p(a[1].params),m=a[2]&&a[2].params.length<=2&&!p(a[2].params),y=a[3]&&a[3].params.length<=2&&!p(a[3].params),x=a[4]&&a[4].params.length<=2&&!p(a[4].params),b=a[5]&&a[5].params.length<=2&&!p(a[5].params),w=a.map(function(e){return function(e){var t,n,r;if(p(e)){var i,o=(t=(i=e).slice(0,i.length-1).map(g)).length,a=g(P(e)),s=function(e){for(var t=o;t<e.length;t++)if(!a(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return s(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=g(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=g(e[0]),r=g(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(g),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}(e.params)}),S=s?g(a[0].params[0]):t,A=d?g(a[1].params[0]):t,T=m?g(a[2].params[0]):t,_=y?g(a[3].params[0]):t,z=x?g(a[4].params[0]):t,j=b?g(a[5].params[0]):t,F=s?g(a[0].params[1]):t,V=d?g(a[1].params[1]):t,$=m?g(a[2].params[1]):t,H=y?g(a[3].params[1]):t,W=x?g(a[4].params[1]):t,G=b?g(a[5].params[1]):t,U=a.map(function(e){return function(e,t){var n=t;if(e.some(f)){var r=p(e),i=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(p(e)){var a=e.length-1;o=function(){return n.apply(this,L(arguments,0,a).concat([L(arguments,a)]))}}return o}(e.params,e.fn)}),q=s?U[0]:n,Y=d?U[1]:n,X=m?U[2]:n,Z=y?U[3]:n,K=x?U[4]:n,Q=b?U[5]:n,J=s?a[0].params.length:-1,ee=d?a[1].params.length:-1,et=m?a[2].params.length:-1,en=y?a[3].params.length:-1,er=x?a[4].params.length:-1,ei=b?a[5].params.length:-1,eo=6*!!(s&&d&&m&&y&&x&&b),ea=a.length,es=function(){for(var t=eo;t<ea;t++)if(w[t](arguments))return U[t].apply(this,arguments);return l.onMismatch(e,arguments,a)},el=function e(t,n){return arguments.length===J&&S(t)&&F(n)?q.apply(e,arguments):arguments.length===ee&&A(t)&&V(n)?Y.apply(e,arguments):arguments.length===et&&T(t)&&$(n)?X.apply(e,arguments):arguments.length===en&&_(t)&&H(n)?Z.apply(e,arguments):arguments.length===er&&z(t)&&W(n)?K.apply(e,arguments):arguments.length===ei&&j(t)&&G(n)?Q.apply(e,arguments):es.apply(e,arguments)};try{Object.defineProperty(el,"name",{value:e})}catch(e){}return i={},a.forEach(function(e){e.params.some(f)||k(e.params,!0).forEach(function(t){i[h(t)]=e.fn})}),el.signatures=i,el}function _(e,t,n){throw w(e,t,n)}function I(e){return -1===l.ignore.indexOf(e)}function D(e){return e.trim()}function O(e){return!!e}function R(e){return null!==e}function E(e){return 0===e.types.length}function P(e){return e[e.length-1]}function L(e,t,n){return Array.prototype.slice.call(e,t,n)}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function B(e,t){return Array.prototype.concat.apply([],e.map(t))}function z(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name){if(""===t)t=r.name;else if(t!==r.name){var i=Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}}return t}function j(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[i];if("object"==typeof o.signatures)for(var a in o.signatures)o.signatures.hasOwnProperty(a)&&(r(a,o.signatures[a]),n[a]=o.signatures[a]);else if("string"==typeof o.signature)r(o.signature,o),n[o.signature]=o;else throw(t=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t}return n}return(l=T("typed",{"string, Object":T,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return T(z(t),e)},"...Function":function(e){return T(z(e),j(e))},"string, ...Function":function(e,t){return T(e,j(t))}})).create=r,l.types=i,l.conversions=s,l.ignore=a,l.onMismatch=_,l.throwMismatchError=_,l.createError=w,l.convert=function(e,t){var n=d(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var i=l.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw Error("Cannot convert from "+n+" to "+t)},l.find=function(e,t){if(!e.signatures)throw TypeError("Function is no typed-function");if("string"==typeof t){n=t.split(",");for(var n,r=0;r<n.length;r++)n[r]=n[r].trim()}else if(Array.isArray(t))n=t;else throw TypeError("String array or a comma separated string expected");var i=n.join(","),o=e.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},l.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==t){for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e)}l.types.push(e)},l.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}()},"function"==typeof define&&define.amd?define([],t):e.exports=t()},1858(e,t,n){"use strict";let r,i;n.r(t),n.d(t,{generateChartsTheme:()=>ae,DensitySelector:()=>xt,applyMergeIndexedColumnsTransform:()=>ai,interpolateSelectionIndividual:()=>o9,DragButton:()=>x8,TimeRangeSelector:()=>YP,getFormatterStats:()=>rc,OptionsEditorGrid:()=>yw,TOOLTIP_MAX_HEIGHT:()=>YF,useMousePosition:()=>YK,TextOverlay:()=>$c,isValidLegendSize:()=>rr,isValidLegendMode:()=>rn,isDateUnit:()=>iR,parseVariables:()=>iJ,UnitSelector:()=>XA,PERCENT_UNIT_CONFIG:()=>it,RepeatGrid:()=>X1,PERCENT_GROUP_CONFIG:()=>r7,YAxisLabel:()=>Xk,replaceVariablesForDisplay:()=>i2,TOOLTIP_MIN_WIDTH:()=>Yz,useId:()=>iq,getTitleAction:()=>n6,getYBuffer:()=>Xs,PINNED_CROSSHAIR_SERIES_NAME:()=>nU,getPixelXFromGrid:()=>Y3,getFormattedAxisLabel:()=>oJ,clearHighlightedSeries:()=>iF,FALLBACK_CHART_WIDTH:()=>YW,restoreChart:()=>ij,FormatControls:()=>XM,transformData:()=>aa,getTimeSeriesValues:()=>u2,DEFAULT_LEGEND:()=>ri,OptionsEditorControl:()=>yb,formatDecimal:()=>ic,DiscardChangesConfirmationDialog:()=>yr,formatTime:()=>rb,SelectionProvider:()=>tO,TimeChartTooltip:()=>Xx,legendModes:()=>n7,EMPTY_TOOLTIP_DATA:()=>YZ,isThroughputUnit:()=>iD,applyJoinTransform:()=>an,TextField:()=>vA,SeriesInfo:()=>Y1,getClosestTimestamp:()=>iW,DropIndicator:()=>xn,applyMergeColumnsTransform:()=>ar,isTemperatureUnit:()=>iE,limitDecimalPlaces:()=>rp,useSnackbar:()=>nH,dateFormatOptionsWithTimeZone:()=>oZ,calculateBarYBounds:()=>Y7,DEFAULT_COLUMN_HEIGHT:()=>40,parseVariablesAndFormat:()=>i0,getCommonTimeScale:()=>u5,isBytesUnit:()=>ik,ModeSelector:()=>$n,OptionsEditorColumn:()=>yp,DECIMAL_UNIT_CONFIG:()=>iu,DEFAULT_PINNED_CROSSHAIR:()=>nq,TEMPERATURE_GROUP_CONFIG:()=>io,NoDataOverlay:()=>$d,getResourceExtendedDisplayName:()=>u6,InterpolationFormat:()=>iY,ErrorBoundary:()=>IO.ErrorBoundary,hasDataFieldPatterns:()=>oi,CURRENCY_UNIT_CONFIG:()=>r8,ToolbarIconButton:()=>Xw,DEFAULT_TOOLTIP_CONFIG:()=>YQ,TRANSFORM_TEXT:()=>iP,calculateBarBandwidth:()=>Y8,ItemActionsProvider:()=>tM,isWithinPercentageRange:()=>Xa,OPTIMIZED_MODE_SERIES_LIMIT:()=>1e3,legendPositions:()=>n9,TIME_GROUP_CONFIG:()=>rg,defaultCursorData:()=>YX,createTimezoneAwareAxisFormatter:()=>Iv,RefreshIntervalPicker:()=>X0,legendSizes:()=>re,BITS_GROUP_CONFIG:()=>rQ,TOOLTIP_LABELS_MAX_WIDTH:()=>YV,applyValueMapping:()=>at,UNIT_GROUP_CONFIG:()=>iv,batchDispatchNearbySeriesActions:()=>i$,DEFAULT_COLUMN_WIDTH:()=>150,getGMTOffset:()=>oQ,getPointInGrid:()=>iV,InfoTooltip:()=>yv,AlignSelector:()=>e$,JSONEditor:()=>V5,CURRENCY_GROUP_CONFIG:()=>r6,TooltipHeader:()=>Xy,SeriesMarker:()=>YN,FontSizeSelector:()=>IE,THROUGHPUT_UNIT_CONFIG:()=>ip,DEFAULT_COLUMN_MAX_WIDTH:()=>1e3,TOOLTIP_PADDING:()=>YH,TimeZoneContext:()=>u8,TimeZoneProvider:()=>u9,useDeepMemo:()=>o5,TransformsEditor:()=>XJ,combineSx:()=>iU,getFormatterFromCache:()=>ru,applyMergeSeriesTransform:()=>ao,Legend:()=>vz,Dialog:()=>yn,getFormattedMultipleYAxes:()=>iN,replaceVariables:()=>i1,DECIMAL_GROUP_CONFIG:()=>il,getResourceDisplayName:()=>u3,SnackbarProvider:()=>n$,formatBytes:()=>r5,getUnitConfig:()=>ib,LoadingOverlay:()=>$h,formatWithTimeZone:()=>oK,legacyCheckforNearbySeries:()=>Xi,replaceVariable:()=>iK,UNIT_CONFIG:()=>iy,testChartsTheme:()=>X_,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>Y$,interpolate:()=>iZ,THROUGHPUT_GROUP_CONFIG:()=>id,BYTES_UNIT_CONFIG:()=>r2,useChartsTheme:()=>tA,calculateBarSegmentBounds:()=>Y9,checkCrosshairPinnedStatus:()=>iH,mockChartsContext:()=>XI,checkforNearbyTimeSeries:()=>Xr,TOOLTIP_DATE_FORMAT:()=>YY,hasDecimalPlaces:()=>rh,isCurrencyUnit:()=>iO,DEFAULT_COLUMN_MIN_WIDTH:()=>60,handleMoveUp:()=>x3,ContentWithLegend:()=>vF,OptionsEditorGroup:()=>yS,isUnitWithDecimalPlaces:()=>i_,SeriesLabelsStack:()=>YB,getDateAndTime:()=>o0,getTableCellLayout:()=>fm,ChartsThemeContext:()=>tw,TooltipContent:()=>Xl,isValidTraceId:()=>u4,formatCurrency:()=>r9,ValueMappingsEditor:()=>Zf,BYTES_GROUP_CONFIG:()=>r1,interpolateSelectionBatch:()=>o7,isLegendItemVisuallySelected:()=>co,getFormattedAxis:()=>iL,getClosestTimestampInFullDataset:()=>iG,ChartsProvider:()=>tb,TimeZoneSelector:()=>YL,LinkEditorForm:()=>$e,SortSelector:()=>$f,formatValue:()=>ix,persesColumnsToTanstackColumns:()=>fv,NEARBY_SERIES_DESCRIPTION:()=>YG,calculateVisualYForSeries:()=>Y6,hasIndexedPatterns:()=>or,ColorPicker:()=>tv,useItemActions:()=>t_,getUnitGroup:()=>iw,formatThroughput:()=>ig,getTheme:()=>X$,shouldShortenValues:()=>rd,MIN_STEP_INTERVAL_MS:()=>u1,buildRelativeTimeOption:()=>n4,useSelection:()=>tP,TEMPERATURE_UNIT_CONFIG:()=>ia,SortSelectorButtons:()=>$g,formatBits:()=>r0,getTimeZoneOptions:()=>n3,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>Xt,isUnitWithShortValues:()=>iI,getTooltipStyles:()=>Y4,interpolateHeaders:()=>o6,ErrorAlert:()=>ID,OptionsColorPicker:()=>ce,getUnitGroupConfig:()=>iS,TOOLTIP_BG_COLOR_FALLBACK:()=>Yq,TOOLTIP_MAX_WIDTH:()=>Yj,DragAndDropElement:()=>x5,extractFieldNames:()=>oo,isBitsUnit:()=>iT,SHOW_FEWER_SERIES_LIMIT:()=>Xn,TIME_UNIT_CONFIG:()=>rm,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>Xe,isPercentUnit:()=>iC,getLegendSize:()=>rs,getSubmitText:()=>n8,handleMoveDown:()=>x6,PIN_TOOLTIP_HELP_TEXT:()=>YJ,Table:()=>vE,typography:()=>XF,formatPercent:()=>ir,assembleTransform:()=>Y5,formatTemperature:()=>is,useTimeZone:()=>u7,createRegexFromString:()=>o3,hasBatchPatterns:()=>on,PersesTimeToIntlTime:()=>rv,parseFormat:()=>i7,FormActions:()=>IP,getNearbySeriesData:()=>Xo,useMemoized:()=>o2,isValidLegendPosition:()=>rt,getLegendMode:()=>ra,EMPHASIZED_SERIES_DESCRIPTION:()=>YU,replaceDataFields:()=>oe,Drawer:()=>bv,getLegendPosition:()=>ro,BITS_UNIT_CONFIG:()=>rJ,EChart:()=>Ig,isTimeUnit:()=>iA,useChartsContext:()=>tS,interpolateQueryParams:()=>o8,UNPIN_TOOLTIP_HELP_TEXT:()=>Y0,DateTimeRangePicker:()=>YE,SettingsAutocomplete:()=>y7,ThresholdsEditor:()=>$D,isDecimalUnit:()=>iM,enableDataZoom:()=>iz,replaceDataFieldsBatch:()=>ot,useDragAndDropMonitor:()=>x2,useLocalStorage:()=>iB,isRegexPattern:()=>o4});var o,a,s,l,u,c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T,_=n(62540),I=n(70451),D=n.n(I),O=n(11750),R=n(81023),E=n(59238);function P(e){return I.Children.toArray(e).filter(e=>I.isValidElement(e))}var L=n(24726),N=n(77308),B=n(23434),z=n(26952),j=n(72052),F=n(29009),V=n(46733);function $(e){return(0,V.Ay)("MuiButtonGroup",e)}let H=(0,F.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),W=I.createContext({}),G=I.createContext(void 0),U=(0,N.A)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${H.grouped}`]:t.grouped},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.orientation)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}${(0,L.A)(n.orientation)}`]},{[`& .${H.grouped}`]:t[`grouped${(0,L.A)(n.variant)}${(0,L.A)(n.color)}`]},{[`& .${H.firstButton}`]:t.firstButton},{[`& .${H.lastButton}`]:t.lastButton},{[`& .${H.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,B.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${H.lastButton},& .${H.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${H.lastButton},& .${H.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${H.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${H.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,z.A)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,E.X4)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${H.lastButton},& .${H.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${H.lastButton},& .${H.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${H.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${H.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,z.A)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${H.firstButton},& .${H.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${H.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),q=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:c=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:f="outlined",...g}=n,m={...n,color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,orientation:h,size:p,variant:f},v=(e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,a,o&&"fullWidth",i&&"disableElevation",`color${(0,L.A)(n)}`],grouped:["grouped",`grouped${(0,L.A)(a)}`,`grouped${(0,L.A)(s)}`,`grouped${(0,L.A)(s)}${(0,L.A)(a)}`,`grouped${(0,L.A)(s)}${(0,L.A)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,R.A)(l,$,t)})(m),y=I.useMemo(()=>({className:v.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:d,size:p,variant:f}),[o,s,l,u,c,d,p,f,v.grouped]),x=P(r),b=x.length;return(0,_.jsx)(U,{as:a,role:"group",className:(0,O.A)(v.root,i),ref:t,ownerState:m,...g,children:(0,_.jsx)(W.Provider,{value:y,children:x.map((e,t)=>{let n,r;return(0,_.jsx)(G.Provider,{value:(n=0===t,r=t===b-1,n&&r?"":n?v.firstButton:r?v.lastButton:v.middleButton),children:e},t)})})})});var Y=n(52215),X=n(63392),Z=n(83926);function K(e){try{return e.matches(":focus-visible")}catch(e){}return!1}var Q=n(29424),J=n(32398),ee=n(48731);class et{static create(){return new et}static use(){let e=(0,ee.A)(et.create).current,[t,n]=I.useState(!1);return e.shouldMount=t,e.setShouldMount=n,I.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){let e,t,n;return this.mounted||(this.mounted=((n=new Promise((n,r)=>{e=n,t=r})).resolve=e,n.reject=t,n),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}var en=n(49257),er=n(68102),ei=n(7490),eo=n(33477);function ea(e,t){var n=Object.create(null);return e&&I.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,I.isValidElement)(e)?t(e):e}),n}function es(e,t,n){return null!=n[t]?n[t]:e.props[t]}var el=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},eu=function(e){function t(t,n){var r=e.call(this,t,n)||this,i=r.handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,ei.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?ea(e.children,function(t){return(0,I.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:es(t,"appear",e),enter:es(t,"enter",e),exit:es(t,"exit",e)})}):(Object.keys(r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(i,n=ea(e.children))).forEach(function(t){var a=r[t];if((0,I.isValidElement)(a)){var s=t in i,l=t in n,u=i[t],c=(0,I.isValidElement)(u)&&!u.props.in;l&&(!s||c)?r[t]=(0,I.cloneElement)(a,{onExited:o.bind(null,a),in:!0,exit:es(a,"exit",e),enter:es(a,"enter",e)}):l||!s||c?l&&s&&(0,I.isValidElement)(u)&&(r[t]=(0,I.cloneElement)(a,{onExited:o.bind(null,a),in:u.props.in,exit:es(a,"exit",e),enter:es(a,"enter",e)})):r[t]=(0,I.cloneElement)(a,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=ea(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,er.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,en.A)(e,["component","childFactory"]),i=this.state.contextValue,o=el(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?D().createElement(eo.A.Provider,{value:i},o):D().createElement(eo.A.Provider,{value:i},D().createElement(t,r,o))},t}(D().Component);eu.propTypes={},eu.defaultProps={component:"div",childFactory:function(e){return e}};var ec=n(3725),ed=n(91785);let eh=(0,F.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ep=(0,ed.i7)`
3
3
  0% {
4
4
  transform: scale(0);
5
5
  opacity: 0.1;
@@ -99,7 +99,7 @@
99
99
  animation: ${eM} 1.4s linear infinite;
100
100
  `:null,e_="string"!=typeof ek?(0,ed.AH)`
101
101
  animation: ${ek} 1.4s ease-in-out infinite;
102
- `:null,eI=(0,N.A)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,L.A)(n.color)}`]]}})((0,B.A)(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:eT||{animation:`${eM} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),eD=(0,N.A)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),eO=(0,N.A)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${(0,L.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,B.A)(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:e_||{animation:`${ek} 1.4s ease-in-out infinite`}}]}))),eR=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:u=0,variant:c="indeterminate",...d}=n,h={...n,color:i,disableShrink:o,size:a,thickness:l,value:u,variant:c},p=(e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,L.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,L.A)(n)}`,i&&"circleDisableShrink"]};return(0,R.A)(o,eC,t)})(h),f={},g={},m={};if("determinate"===c){let e=2*Math.PI*((44-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(u),f.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,_.jsx)(eI,{className:(0,O.A)(p.root,r),style:{width:a,height:a,...g,...s},ownerState:h,ref:t,role:"progressbar",...m,...d,children:(0,_.jsx)(eD,{className:p.svg,ownerState:h,viewBox:"22 22 44 44",children:(0,_.jsx)(eO,{className:p.circle,style:f,ownerState:h,cx:44,cy:44,r:(44-l)/2,fill:"none",strokeWidth:l})})})});function eE(e){return(0,V.Ay)("MuiButton",e)}let eP=(0,F.A)("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),eL=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],eN=(0,N.A)(eS,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,L.A)(n.color)}`],t[`size${(0,L.A)(n.size)}`],t[`${n.variant}Size${(0,L.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,B.A)(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${eP.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${eP.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${eP.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${eP.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,E.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${eP.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${eP.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${eP.loading}`]:{color:"transparent"}}}]}})),eB=(0,N.A)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,L.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...eL]})),ez=(0,N.A)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,L.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...eL]})),ej=(0,N.A)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),eF=(0,N.A)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),eV=I.forwardRef(function(e,t){let n=I.useContext(W),r=I.useContext(G),i=(0,Y.A)(n,e),o=(0,j.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:u,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:g=!1,id:m,loading:v=null,loadingIndicator:y,loadingPosition:x="center",size:b="medium",startIcon:w,type:S,variant:A="text",...C}=o,M=(0,X.A)(m),k=y??(0,_.jsx)(eR,{"aria-labelledby":M,color:"inherit",size:16}),T={...o,color:s,component:l,disabled:c,disableElevation:d,disableFocusRipple:h,fullWidth:g,loading:v,loadingIndicator:k,loadingPosition:x,size:b,type:S,variant:A},D=(e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:a,loadingPosition:s,classes:l}=e,u={root:["root",a&&"loading",o,`${o}${(0,L.A)(t)}`,`size${(0,L.A)(i)}`,`${o}Size${(0,L.A)(i)}`,`color${(0,L.A)(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${(0,L.A)(s)}`],startIcon:["icon","startIcon",`iconSize${(0,L.A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,L.A)(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=(0,R.A)(u,eE,l);return{...l,...c}})(T),E=(w||v&&"start"===x)&&(0,_.jsx)(eB,{className:D.startIcon,ownerState:T,children:w||(0,_.jsx)(eF,{className:D.loadingIconPlaceholder,ownerState:T})}),P=(p||v&&"end"===x)&&(0,_.jsx)(ez,{className:D.endIcon,ownerState:T,children:p||(0,_.jsx)(eF,{className:D.loadingIconPlaceholder,ownerState:T})}),N="boolean"==typeof v?(0,_.jsx)("span",{className:D.loadingWrapper,style:{display:"contents"},children:v&&(0,_.jsx)(ej,{className:D.loadingIndicator,ownerState:T,children:k})}):null;return(0,_.jsxs)(eN,{ownerState:T,className:(0,O.A)(n.className,D.root,u,r||""),component:l,disabled:c||v,focusRipple:!h,focusVisibleClassName:(0,O.A)(D.focusVisible,f),ref:t,type:S,id:v?M:m,...C,classes:D,children:[E,"end"!==x&&N,a,"end"===x&&N,P]})});function e$({onChange:e,value:t="left",...n}){let r=t=>{e(t)};return(0,_.jsxs)(q,{"aria-label":"Alignement",...n,children:[(0,_.jsx)(eV,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,_.jsx)(eV,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,_.jsx)(eV,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var eH=n(315);function eW(e){return(0,V.Ay)("MuiIconButton",e)}let eG=(0,F.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),eU=(0,N.A)(eS,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,L.A)(n.color)}`],n.edge&&t[`edge${(0,L.A)(n.edge)}`],t[`size${(0,L.A)(n.size)}`]]}})((0,B.A)(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),(0,B.A)(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${eG.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${eG.loading}`]:{color:"transparent"}}))),eq=(0,N.A)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),eY=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:h,...p}=n,f=(0,X.A)(c),g=h??(0,_.jsx)(eR,{"aria-labelledby":f,color:"inherit",size:16}),m={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:g,size:u},v=(e=>{let{classes:t,disabled:n,color:r,edge:i,size:o,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${(0,L.A)(r)}`,i&&`edge${(0,L.A)(i)}`,`size${(0,L.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,R.A)(s,eW,t)})(m);return(0,_.jsxs)(eU,{id:d?f:c,className:(0,O.A)(v.root,o),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...p,ownerState:m,children:["boolean"==typeof d&&(0,_.jsx)("span",{className:v.loadingWrapper,style:{display:"contents"},children:(0,_.jsx)(eq,{className:v.loadingIndicator,ownerState:m,children:d&&g})}),i]})});var eX=n(93648),eZ=n(29618),eK=n(98029);function eQ(){return(eQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eJ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function e0(e){var t=(0,I.useRef)(e),n=(0,I.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var e1,e2=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},e5=function(e){return"touches"in e},e4=function(e){return e&&e.ownerDocument.defaultView||self},e3=function(e,t,n){var r=e.getBoundingClientRect(),i=e5(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:e2((i.pageX-(r.left+e4(e).pageXOffset))/r.width),top:e2((i.pageY-(r.top+e4(e).pageYOffset))/r.height)}},e6=function(e){e5(e)||e.preventDefault()},e8=D().memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=eJ(e,["onMove","onKey","onEnd"]),o=(0,I.useRef)(null),a=e0(t),s=e0(n),l=e0(r),u=(0,I.useRef)(null),c=(0,I.useRef)(!1),d=(0,I.useMemo)(function(){var e=function(e){e6(e),(e5(e)?e.touches.length>0:e.buttons>0)&&o.current?a(e3(o.current,e,u.current)):(n(!1),l())},t=function(){n(!1),l()};function n(n){var r=c.current,i=e4(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(e6(t),(!c.current||e5(t))&&r)){if(e5(t)){c.current=!0;var i=t.changedTouches||[];i.length&&(u.current=i[0].identifier)}r.focus(),a(e3(r,t,u.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&l()},n]},[s,a,l]),h=d[0],p=d[1],f=d[2],g=d[3];return(0,I.useEffect)(function(){return g},[g]),D().createElement("div",eQ({},i,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:p,onKeyUp:f,tabIndex:0,role:"slider"}))}),e9=function(e){return e.filter(Boolean).join(" ")},e7=function(e){var t=e.color,n=e.left,r=e.top,i=e9(["react-colorful__pointer",e.className]);return D().createElement("div",{className:i,style:{top:100*(void 0===r?.5:r)+"%",left:100*n+"%"}},D().createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},te=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},tt=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?te(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?te(parseInt(e.substring(6,8),16)/255,2):1}},tn=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:te(e.h),s:te(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:te(i/2),a:te(r,2)}},tr=function(e){var t=tn(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ti=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:te(255*[r,s,a,a,l,r][u]),g:te(255*[l,r,r,s,a,a][u]),b:te(255*[a,a,l,r,r,s][u]),a:te(i,2)}},to=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ta=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?to(te(255*i)):"";return"#"+to(t)+to(n)+to(r)+o},ts=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:te(60*(s<0?s+6:s)),s:te(o?a/o*100:0),v:te(o/255*100),a:i}},tl=D().memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=e9(["react-colorful__hue",e.className]);return D().createElement("div",{className:i},D().createElement(e8,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:e2(t+360*e.left,0,360)})},onEnd:r,"aria-label":"Hue","aria-valuenow":te(t),"aria-valuemax":"360","aria-valuemin":"0"},D().createElement(e7,{className:"react-colorful__hue-pointer",left:t/360,color:tr({h:t,s:100,v:100,a:1})})))}),tu=D().memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:tr({h:t.h,s:100,v:100,a:1})};return D().createElement("div",{className:"react-colorful__saturation",style:i},D().createElement(e8,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:e2(t.s+100*e.left,0,100),v:e2(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":"Color","aria-valuetext":"Saturation "+te(t.s)+"%, Brightness "+te(t.v)+"%"},D().createElement(e7,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:tr(t)})))}),tc=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},td="u">typeof window?I.useLayoutEffect:I.useEffect,th=new Map,tp=function(e){td(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!th.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',th.set(t,r);var i=e1||n.nc;i&&r.setAttribute("nonce",i),t.head.appendChild(r)}},[])},tf=function(e){var t,n,r,i,o,a,s,l=e.className,u=e.colorModel,c=e.color,d=void 0===c?u.defaultColor:c,h=e.onChange,p=e.onChangeEnd,f=eJ(e,["className","colorModel","color","onChange","onChangeEnd"]),g=(0,I.useRef)(null);tp(g);var m=(t=e0(h),n=e0(p),i=(r=(0,I.useState)(function(){return u.toHsva(d)}))[0],o=r[1],a=(0,I.useRef)({color:d,hsva:i}),s=(0,I.useRef)(!1),(0,I.useEffect)(function(){if(!u.equal(d,a.current.color)){var e=u.toHsva(d);a.current={hsva:e,color:d},o(e),s.current=!1}},[d,u]),(0,I.useEffect)(function(){var e;tc(i,a.current.hsva)||u.equal(e=u.fromHsva(i),a.current.color)||(a.current={hsva:i,color:e},t(e),s.current=!0)},[i,u,t]),[i,(0,I.useCallback)(function(e){o(function(t){return Object.assign({},t,e)})},[]),(0,I.useCallback)(function(){s.current&&(s.current=!1,n(a.current.color))},[n])]),v=m[0],y=m[1],x=m[2],b=e9(["react-colorful",l]);return D().createElement("div",eQ({},f,{ref:g,className:b}),D().createElement(tu,{hsva:v,onChange:y,onChangeEnd:x}),D().createElement(tl,{hue:v.h,onChange:y,onChangeEnd:x,className:"react-colorful__last-control"}))},tg={defaultColor:"000",toHsva:function(e){return ts(tt(e))},fromHsva:function(e){return ta(ti({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||tc(tt(e),tt(t))}},tm=function(e){return D().createElement(tf,eQ({},e,{colorModel:tg}))};let tv=({color:e,onChange:t,onClear:n,palette:r})=>{let[i,o]=(0,I.useState)(e),a=e=>{o(e),t?.(e)};return(0,_.jsxs)(eH.A,{spacing:1,children:[(0,_.jsx)(tm,{color:e,onChange:a,style:{width:"100%"}}),(0,_.jsx)(eH.A,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map((e,t)=>(0,_.jsx)(eY,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,_.jsx)(eZ,{})},t))}),(0,_.jsxs)(eH.A,{direction:"row",gap:1,alignItems:"center",children:[(0,_.jsx)(eX.A,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:i,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),ty(e.target.value)&&t?.(e.target.value)}}),n&&(0,_.jsx)(eY,{onClick:n,children:(0,_.jsx)(eK,{})})]})]})},ty=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var tx=n(91823);function tb(e){let{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:i=!0}=e,[o,a]=(0,I.useState)(null),s=(0,I.useMemo)(()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:o,enableSyncGrouping:i,setLastTooltipPinnedCoords:a}),[n,r,i,o,a]);return(0,_.jsx)(tw.Provider,{value:s,children:t})}let tw=(0,I.createContext)(void 0);function tS(){let e=(0,I.useContext)(tw);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function tA(){return tS().chartsTheme}let tC=(0,I.createContext)(void 0);function tM({children:e}){let[t,n]=(0,I.useState)(new Map),r=(0,I.useCallback)((e,t,r)=>{n(n=>{let i=new Map(n),o=i.get(e)||{loading:!1};if(void 0!==r){let n=new Map(o.itemStatuses||new Map),a=n.get(r)||{loading:!1};n.set(r,{...a,...t}),i.set(e,{...o,itemStatuses:n})}else i.set(e,{...o,...t});return i})},[]),i=(0,I.useCallback)(e=>{n(t=>{if(void 0===e)return new Map;if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),o=(0,I.useMemo)(()=>({actionStatuses:t,setActionStatus:r,clearActionStatus:i}),[t,r,i]);return(0,_.jsx)(tC.Provider,{value:o,children:e})}let tk=()=>{},tT={actionStatuses:new Map,setActionStatus:tk,clearActionStatus:tk,hasContext:!1};function t_(){let e=(0,I.useContext)(tC);return(0,I.useMemo)(()=>e?{...e,hasContext:!0}:tT,[e])}let tI=(0,I.createContext)(void 0),tD=(e,t)=>t;function tO({children:e}){let[t,n]=(0,I.useState)(new Map),r=(0,I.useRef)(tD),i=(0,I.useCallback)(e=>{r.current=e},[]),o=(0,I.useCallback)(e=>{let t=new Map;e.forEach(({item:e,id:n})=>t.set(n,e)),n(t)},[]),a=(0,I.useCallback)((e,t)=>{n(n=>{let r=new Map(n);return r.has(t)?r.delete(t):r.set(t,e),r})},[]),s=(0,I.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),l=(0,I.useCallback)(()=>n(new Map),[]),u=(0,I.useCallback)((e,n)=>t.has(r.current(e,n)),[t]),c=(0,I.useMemo)(()=>({selectionMap:t,setSelection:o,toggleSelection:a,removeFromSelection:s,clearSelection:l,isSelected:u,registerGetId:i}),[t,o,a,s,l,u,i]);return(0,_.jsx)(tI.Provider,{value:c,children:e})}let tR=()=>{},tE={selectionMap:new Map,setSelection:tR,toggleSelection:tR,removeFromSelection:tR,clearSelection:tR,isSelected:()=>!1,hasContext:!1};function tP(e){let t=(0,I.useContext)(tI);return(0,I.useEffect)(()=>{t&&e?.getId&&t.registerGetId(e.getId)},[t,e?.getId]),(0,I.useMemo)(()=>{if(!t)return tE;let{registerGetId:e,...n}=t;return{...n,hasContext:!0}},[t])}var tL=n(20231),tN=n.n(tL);let tB=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(r&&(r+=" "),r+=t);return r},tz={data:""},tj=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,tF=/\/\*[^]*?\*\/| +/g,tV=/\n+/g,t$=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?t$(a,o):o+"{"+t$(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=t$(a,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o="-"==o[1]?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=t$.p?t$.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},tH={},tW=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+tW(e[n]);return t}return e};function tG(e){let t,n,r=this||{},i=e.call?e(r.p):e;return((e,t,n,r,i)=>{var o;let a=tW(e),s=tH[a]||(tH[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(a));if(!tH[s]){let t=a!==e?e:(e=>{let t,n,r=[{}];for(;t=tj.exec(e.replace(tF,""));)t[4]?r.shift():t[3]?(n=t[3].replace(tV," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(tV," ").trim();return r[0]})(e);tH[s]=t$(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}let l=n&&tH.g;return n&&(tH.g=tH[s]),o=tH[s],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s})(i.unshift?i.raw?(t=[].slice.call(arguments,1),n=r.p,i.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":t$(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"")):i.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):i,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||tz})(r.target),r.g,r.o,r.k)}function tU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tq(e,t,n){return t&&tU(e.prototype,t),n&&tU(e,n),e}function tY(){return(tY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function tZ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function tK(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}tG.bind({g:1}),tG.bind({k:1});var tQ=function(){return""},tJ=D().createContext({enqueueSnackbar:tQ,closeSnackbar:tQ}),t0="@media (max-width:599.95px)",t1="@media (min-width:600px)",t2=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t5=function(e){return""+t2(e.vertical)+t2(e.horizontal)},t4=function(e){return!!e||0===e},t3="unmounted",t6="exited",t8="entering",t9="entered",t7="exiting",ne=function(e){function t(t){var n,r=e.call(this,t)||this,i=t.appear;return r.appearStatus=null,t.in?i?(n=t6,r.appearStatus=t8):n=t9:n=t.unmountOnExit||t.mountOnEnter?t3:t6,r.state={status:n},r.nextCallback=null,r}tX(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===t3?{status:t6}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==t8&&n!==t9&&(t=t8):(n===t8||n===t9)&&(t=t7)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===t8?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===t6&&this.setState({status:t3})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:t8},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:t9},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})):this.safeSetState({status:t9},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:t7},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:t6},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:t6},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;!this.node||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e))},n.render=function(){var e=this.state.status;if(e===t3)return null;var t=this.props;return(0,t.children)(e,tZ(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},tq(t,[{key:"node",get:function(){var e,t=null==(e=this.props.nodeRef)?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(D().Component);function nt(){}function nn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function nr(e,t){return(0,I.useMemo)(function(){return null==e&&null==t?null:function(n){nn(e,n),nn(t,n)}},[e,t])}function ni(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:nt,onEntering:nt,onEntered:nt,onExit:nt,onExiting:nt,onExited:nt};var no=function(e){e.scrollTop=e.scrollTop},na=function(e){return Math.round(e)+"ms"};function ns(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,a=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:na(i))+" "+a+" "+("string"==typeof l?l:na(l))}).join(",")}function nl(e){return(e&&e.ownerDocument||document).defaultView||window}function nu(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=nl(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var nc=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,o=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,d=e.onExit,h=e.onExited,p=tZ(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),f=(0,I.useRef)(null),g=nr(n.ref,f),m=nr(g,t),v=(0,I.useCallback)(function(){f.current&&nu(i,f.current)},[i]);return(0,I.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){f.current&&nu(i,f.current)}),t=nl(f.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,I.useEffect)(function(){o||v()},[o,v]),(0,I.createElement)(ne,Object.assign({appear:!0,nodeRef:f,onEnter:function(e,t){nu(i,e),no(e),u&&u(e,t)},onEntered:c,onEntering:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)",n=ni({timeout:l,mode:"enter",style:tY({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ns("-webkit-transform",n),e.style.transition=ns("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)",n=ni({timeout:l,mode:"exit",style:tY({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ns("-webkit-transform",n),e.style.transition=ns("transform",n),nu(i,e),d&&d(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",h&&h(e)},in:o,timeout:l},p),function(e,t){return(0,I.cloneElement)(n,tY({ref:m,style:tY({visibility:"exited"!==e||o?void 0:"hidden"},a,{},n.props.style)},t))})});nc.displayName="Slide";var nd=function(e){return D().createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},nh={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:nc,transitionDuration:{enter:225,exit:195}},np=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:nh.autoHideDuration},nf=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?tY({},nh.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?tY({},nh.transitionDuration,{},t):nh.transitionDuration};function ng(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return tY({},e,((n={})[r]=tG(i),n))},{})}var nm="notistack-CollapseWrapper",nv=ng({root:{height:0},entered:{height:"auto"}}),ny=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,I.useRef)(null),a=(0,I.useRef)(null),s=nr(t,a),l=function(){return o.current?o.current.clientHeight:0};return(0,I.createElement)(ne,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=ni({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){no(e);var t=ni({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return(0,I.createElement)("div",Object.assign({ref:s,className:tB(nv.root,"entered"===e&&nv.entered),style:tY({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:ns("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,I.createElement)("div",{ref:o,className:nm,style:{display:"flex",width:"100%"}},n))})});ny.displayName="Collapse";var nx={right:"left",left:"right",bottom:"up",top:"down"},nb=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return tY({},t,((r={})[n]=e[n],r))},{})},nw=function(){};function nS(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},nw)}var nA="u">typeof window?I.useLayoutEffect:I.useEffect;function nC(e){var t=(0,I.useRef)(e);return nA(function(){t.current=e}),(0,I.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var nM=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,d=void 0===c?{}:c,h=(0,I.useRef)(),p=nC(function(){s&&s.apply(void 0,arguments)}),f=nC(function(e){s&&null!=e&&(h.current&&clearTimeout(h.current),h.current=setTimeout(function(){p(null,"timeout",l)},e))});(0,I.useEffect)(function(){return u&&f(i),function(){h.current&&clearTimeout(h.current)}},[u,i,f]);var g=function(){h.current&&clearTimeout(h.current)},m=(0,I.useCallback)(function(){null!=i&&f(.5*i)},[i,f]);return(0,I.useEffect)(function(){if(!a&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[a,m,u]),(0,I.createElement)("div",Object.assign({ref:t},d,{className:tB("notistack-Snackbar",r),onMouseEnter:function(e){d.onMouseEnter&&d.onMouseEnter(e),g()},onMouseLeave:function(e){d.onMouseLeave&&d.onMouseLeave(e),m()}}),n)});nM.displayName="Snackbar";var nk=ng({root:((sM={display:"flex",flexWrap:"wrap",flexGrow:1})[t1]={flexGrow:"initial",minWidth:"288px"},sM)}),nT=(0,I.forwardRef)(function(e,t){var n=e.className,r=tZ(e,["className"]);return D().createElement("div",Object.assign({ref:t,className:tB(nk.root,n)},r))});nT.displayName="SnackbarContent";var n_=ng({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),nI="notistack-snackbar",nD=(0,I.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,a=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=o[a],d=i;return"function"==typeof d&&(d=d(n)),D().createElement(nT,{ref:t,role:"alert","aria-describedby":nI,style:l,className:tB("notistack-MuiContent","notistack-MuiContent-"+a,n_.root,n_[a],u,!s&&c&&n_.lessPadding)},D().createElement("div",{id:nI,className:n_.message},s?null:c,r),d&&D().createElement("div",{className:n_.action},d))});nD.displayName="MaterialDesignContent";var nO=(0,I.memo)(nD),nR=ng({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nE=function(e){var t,n=(0,I.useRef)(),r=(0,I.useState)(!0),i=r[0],o=r[1],a=nS([e.snack.onClose,e.onClose]),s=(0,I.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,I.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,u=e.classes,c=e.Component,d=(0,I.useMemo)(function(){return nb(u)},[u]),h=l.open,p=l.SnackbarProps,f=l.TransitionComponent,g=l.TransitionProps,m=l.transitionDuration,v=l.disableWindowBlurListener,y=l.content,x=tZ(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),b=tY({direction:"center"!==(t=x.anchorOrigin).horizontal?nx[t.horizontal]:nx[t.vertical],timeout:m},g),w=y;"function"==typeof w&&(w=w(x.id,x.message));var S=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return tY({},t,((r={})[n]=nS([e.snack[n],e[n]],x.id),r))},{});return D().createElement(ny,{in:i,onExited:S.onExited},D().createElement(nM,{open:h,id:x.id,disableWindowBlurListener:v,autoHideDuration:x.autoHideDuration,className:tB(nR.wrappedRoot,d.root,d["anchorOrigin"+t5(x.anchorOrigin)]),SnackbarProps:p,onClose:a},D().createElement(f,Object.assign({},b,{appear:!0,in:h,onExit:S.onExit,onExited:s,onEnter:S.onEnter,onEntered:nS([S.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],x.id)}),w||D().createElement(void 0===c?nO:c,Object.assign({},x)))))},nP=20,nL=6,nN=2,nB="."+nm,nz=ng({root:((sk={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ns(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[nB]={padding:nL+"px 0px",transition:"padding 300ms ease 0ms"},sk.maxWidth="calc(100% - "+2*nP+"px)",sk[t0]={width:"100%",maxWidth:"calc(100% - 32px)"},sk),rootDense:((sT={})[nB]={padding:nN+"px 0px"},sT),top:{top:nP-nL+"px",flexDirection:"column"},bottom:{bottom:nP-nL+"px",flexDirection:"column-reverse"},left:((s_={left:nP+"px"})[t1]={alignItems:"flex-start"},s_[t0]={left:"16px"},s_),right:((sI={right:nP+"px"})[t1]={alignItems:"flex-end"},sI[t0]={right:"16px"},sI),center:((sD={left:"50%",transform:"translateX(-50%)"})[t1]={alignItems:"center"},sD)}),nj=(0,I.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,a=tB("notistack-SnackbarContainer",nz[r.vertical],nz[r.horizontal],nz.root,n.containerRoot,n["containerAnchorOrigin"+t5(r)],i&&nz.rootDense);return D().createElement("div",{className:a},o)}),nF=function(e){return!("string"==typeof e||(0,I.isValidElement)(e))},nV=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var r,i=nF(e)?e:t,o=nF(e)?e.message:e,a=i.key,s=i.preventDuplicate,l=tZ(i,["key","preventDuplicate"]),u=t4(a),c=u?a:new Date().getTime()+Math.random(),d=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?tY({},nh[e],{},r[e],{},l[e]):"autoHideDuration"===e?np(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?nf(l.transitionDuration,r.transitionDuration):l[e]||r[e]||nh[e]}),h=tY({id:c},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:d("persist"),action:d("action"),content:d("content"),variant:d("variant"),anchorOrigin:d("anchorOrigin"),disableWindowBlurListener:d("disableWindowBlurListener"),autoHideDuration:d("autoHideDuration"),hideIconVariant:d("hideIconVariant"),TransitionComponent:d("TransitionComponent"),transitionDuration:d("transitionDuration"),TransitionProps:d("TransitionProps",!0),iconVariant:d("iconVariant",!0),style:d("style",!0),SnackbarProps:d("SnackbarProps",!0),className:tB(n.props.className,l.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===s&&n.props.preventDuplicate||s){var t=function(e){return u?e.id===c:e.message===o},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(tY({},e,{queue:[].concat(e.queue,[h])}))}),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?tY({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?tY({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),tY({},e,{open:!1})):tY({},e,{requestClose:!0})});return tY({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!t4(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?tY({},e,{entered:!0}):tY({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?tY({},e,{open:!1}):tY({},e,{requestClose:!0}):tY({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});t4(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!t4(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(tY({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(tK(n)),closeSnackbar:n.closeSnackbar.bind(tK(n))}},n}return tX(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=n.children,o=n.dense,a=void 0!==o&&o,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce(function(e,t){var n,r=t5(t.anchorOrigin),i=e[r]||[];return tY({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(c).map(function(t){var n=c[t],r=n[0];return D().createElement(nj,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map(function(t){return D().createElement(nE,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:nS([e.handleExitedSnack,e.props.onExited],t.id),onEntered:nS([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return D().createElement(tJ.Provider,{value:t},i,r?(0,tL.createPortal)(d,r):d)},tq(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||nh.maxSnack}}]),t}(I.Component);function n$({children:e,...t}){return(0,_.jsx)(nV,{...t,Components:{error:(0,N.A)(nO)(()=>({"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}}))},children:e})}function nH(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,I.useContext)(tJ),n=nW(e,"error"),r=nW(e,"info"),i=nW(e,"warning"),o=nW(e,"success"),a=(0,I.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:i,successSnackbar:o,exceptionSnackbar:a}}function nW(e,t){return(0,I.useCallback)((n,r)=>e(n,{...r,variant:t}),[e,t])}var nG=n(25632);let nU="Pinned Crosshair",nq={name:nU,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var nY=n(42636);let nX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function nZ(e){return (t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}let nK={date:nZ({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:nZ({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:nZ({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nQ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function nJ(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function n0(e){return(t,n={})=>{let r,i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;let s=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(l,e=>e.test(s)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(l,e=>e.test(s));return r=e.valueCallback?e.valueCallback(u):u,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(s.length)}}}let n1={code:"en-US",formatDistance:(e,t,n)=>{let r,i=nX[e];if(r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix)if(n.comparison&&n.comparison>0)return"in "+r;else return r+" ago";return r},formatLong:nK,formatRelative:(e,t,n,r)=>nQ[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:nJ({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:nJ({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:nJ({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:nJ({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:nJ({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(sS={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{let n=e.match(sS.matchPattern);if(!n)return null;let r=n[0],i=e.match(sS.parsePattern);if(!i)return null;let o=sS.valueCallback?sS.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:n0({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:n0({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:n0({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:n0({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:n0({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},n2={},n5=["years","months","weeks","days","hours","minutes","seconds"];function n4(e){var t,n;let r,i,o,a;return{value:{pastDuration:e},display:`Last ${t=(0,nY.parseDurationString)(e),n={delimiter:", "},r=n?.locale??n2.locale??n1,i=n?.format??n5,o=n?.zero??!1,a=n?.delimiter??" ",!r.formatDistance?"":i.reduce((e,n)=>{let i=`x${n.replace(/(^.)/,e=>e.toUpperCase())}`,a=t[n];return void 0!==a&&(o||t[n])?e.concat(r.formatDistance(i,a)):e},[]).join(a)}`}}function n3(){return["local","UTC",...Intl.supportedValuesOf?.("timeZone")??[]].filter((e,t,n)=>n.indexOf(e)===t).map(e=>({value:e,display:"local"===e?"Local":e.replace(/_/g," ")}))}function n6(e,t){return"read"===e?"View":t&&"create"===e?"Add":t||"create"!==e?"update"===e?"Edit":"":"Create"}function n8(e,t){return t&&"create"===e?"Add":t&&"update"===e?"Apply":t?"":"Save"}let n9=["bottom","right"],n7=["list","table"],re=["small","medium"];function rt(e){return n9.includes(e)}function rn(e){return n7.includes(e)}function rr(e){return re.includes(e)}let ri={position:"bottom",mode:"list",size:"medium"};function ro(e){return void 0===e?ri.position:rt(e)?e:ri.position}function ra(e){return e&&rn(e)?e:ri.mode}function rs(e){return e&&rr(e)?e:ri.size}let rl=new Map([["time",new Map],["decimal",new Map],["bits",new Map],["bytes",new Map],["currency",new Map],["percent",new Map],["temperature",new Map],["throughput",new Map]]);function ru(e,t,n,r="en-US"){let i=`${e.filter(e=>![void 0,null,"",NaN].includes(e)).join("|")}|${r}`,o=rl.get(t);if(!o)throw Error("No formatter found for the input type");let a=o.get(i);if(a)return a.format;let s=Intl.NumberFormat(r,n);return o?.set(`${i}`,s),s.format}let rc=()=>({countCacheItems:e=>"all"!==e?rl.get(e)?.size??0:Array.from(rl.values()).reduce((e,t)=>e+(t?.size??0),0),getKeys:e=>[...rl.get(e)?.keys()||[]]});function rd(e){return!1!==e}function rh(e){return"number"==typeof e}function rp(e){return e&&(e<0?e=0:e>20&&(e=20)),e}let rf="Time",rg={label:"Time",decimalPlaces:!0},rm={nanoseconds:{group:rf,label:"Nanoseconds"},microseconds:{group:rf,label:"Microseconds"},milliseconds:{group:rf,label:"Milliseconds"},seconds:{group:rf,label:"Seconds"},minutes:{group:rf,label:"Minutes"},hours:{group:rf,label:"Hours"},days:{group:rf,label:"Days"},weeks:{group:rf,label:"Weeks"},months:{group:rf,label:"Months"},years:{group:rf,label:"Years"}};var rv=((sA={}).nanoseconds="nanosecond",sA.microseconds="microsecond",sA.milliseconds="millisecond",sA.seconds="second",sA.minutes="minute",sA.hours="hour",sA.days="day",sA.weeks="week",sA.months="month",sA.years="year",sA);let ry={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},rx=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function rb(e,{unit:t,decimalPlaces:n}){var r;if(0===e)return"0s";let i=function(e,t){let n=e*ry[t],r=rx[0]||"years",i=r,o=n/ry[r];for(i of rx)if((o=n/ry[i])>=1)break;return{value:o,unit:i}}(e,t??"seconds"),o={style:"unit",unit:rv[i.unit],unitDisplay:"months"===(r=i.unit)||"years"===r?"long":"narrow"};return rh(n)?(o.minimumFractionDigits=rp(n),o.maximumFractionDigits=rp(n)):o.maximumSignificantDigits=3,ru([o.style,o.unit,o.unitDisplay,o.maximumSignificantDigits,n,t??"seconds"],"time",o,"en-US")(i.value)}var rw="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==n.g?n.g:"u">typeof self?self:{};function rS(){if(sP)return sE;sP=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return sE={unformat:function(n,r){let i,o=rM(),a=o.currentDelimiters(),s=o.currentCurrency().symbol,l=o.currentOrdinal(),u=o.getZeroFormat(),c=o.currentAbbreviations();if("string"==typeof n)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(n,a)){let e,t,r;t=+(e=n.split(":"))[0],r=+e[1],i=+e[2]+60*r+3600*t}else i=function(n,r,i="",o,a,s){if(""!==n)return n===a?0:function n(r,i,o,a,s,l,u){if(!isNaN(+r))return+r;let c="",d=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==r)return -1*n(d,i,o,a,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=r.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==r)return n(c,i,o,a,s,l)*u.factor}if((c=r.replace("%",""))!==r)return n(c,i,o,a,s,l)/100;let h=parseFloat(r);if(isNaN(h))return;let p=a(h);if(p&&"."!==p&&(c=r.replace(RegExp(`${t(p)}$`),""))!==r)return n(c,i,o,a,s,l);let f={};Object.keys(l).forEach(e=>{f[l[e]]=e});let g=Object.keys(f).sort().reverse(),m=g.length;for(let e=0;e<m;e++){let t=g[e],u=f[t];if((c=r.replace(t,""))!==r){let e;switch(u){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return n(c,i,o,a,s,l)*e}}}(n.replace(i,"").replace(RegExp(`([0-9])${t(r.thousands)}([0-9])`,"g"),"$1$2").replace(r.decimal,"."),r,i,o,a,s)}(n,a,s,l,u,c);else{if("number"!=typeof n)return;i=n}if(void 0!==i)return i}}}function rA(){if(sN)return sL;sN=1;let e=rS(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function o(e,t,r,i=!1){let a=Object.keys(e).map(i=>{if(!t[i])return console.error(`${r} Invalid key: ${i}`),!1;let a=e[i],s=t[i];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(a,n,`[Validate ${i}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${i} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:o}=s.restrictions[n];if(!t(a,e))return console.error(`${r} ${i} invalid value: ${o}`),!1}}return s.restriction&&!s.restriction(a,e)?(console.error(`${r} ${i} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(a)?(console.error(`${r} ${i} invalid value: must be among ${JSON.stringify(s.validValues)}, "${a}" provided`),!1):(!s.children||!!o(a,s.children,`[Validate ${i}]`))&&!0});return i||a.push(...Object.keys(t).map(n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0})),a.reduce((e,t)=>e&&t,!0)}function a(e){return o(e,n,"[Validate format]")}return sL={validate:function(e,t){let n=i(e),r=a(t);return n&&r},validateFormat:a,validateInput:i,validateLanguage:function(e){return o(e,r,"[Validate language]")}}}var rC=function(e,t={}){var n,r,i,o,a,s;let l,u,c,d,h;if("string"!=typeof e)return e;r=e=(l=(n=e).match(/^{([^}]*)}/))?(t.prefix=l[1],n.slice(l[0].length)):n,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(u=r.match(/{([^}]*)}$/))?(t.postfix=u[1],r.slice(0,-u[0].length)):r,t),(c=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+c[0]),(d=e.split(".")[0].match(/0+/))&&(t.characteristic=d[0].length),-1!==(i=e).indexOf(".")&&(t.optionalCharacteristic=-1===i.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(o=e).indexOf("K")?t.forceAverage="thousand":-1!==o.indexOf("M")?t.forceAverage="million":-1!==o.indexOf("B")?t.forceAverage="billion":-1!==o.indexOf("T")&&(t.forceAverage="trillion");let p=e.split(".")[1];if(p){let e=p.match(/0+/);e&&(t.mantissa=e[0].length)}return(a=e).match(/\[\.]/)?t.optionalMantissa=!0:a.match(/\./)&&(t.optionalMantissa=!1),(h=e.split(".")[1])&&(t.trimMantissa=-1!==h.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(s=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),s.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function rM(){let e;if(sz)return sB;sz=1;let t=sR?sO:(sR=1,sO={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),n=rA(),r={},i={},o=null,a={};function s(){return i[e]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>e,r.currentBytes=()=>s().bytes||{},r.currentCurrency=()=>s().currency,r.currentAbbreviations=()=>s().abbreviations,r.currentDelimiters=()=>s().delimiters,r.currentOrdinal=()=>s().ordinal,r.currentDefaults=()=>Object.assign({},s().defaults,a),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().timeFormat),r.setDefaults=e=>{e=rC(e),n.validateFormat(e)&&(a=e)},r.getZeroFormat=()=>o,r.setZeroFormat=e=>o="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==o,r.languageData=e=>{if(e){if(i[e])return i[e];throw Error(`Unknown tag "${e}"`)}return s()},r.registerLanguage=(t,r=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");i[t.languageTag]=t,r&&(e=t.languageTag)},r.setLanguage=(n,r=t.languageTag)=>{if(!i[n]){let t=n.split("-")[0],o=Object.keys(i).find(e=>e.split("-")[0]===t);return i[o]?void(e=o):void(e=r)}e=n},r.registerLanguage(t),e=t.languageTag,sB=r}var rk={exports:{}};(function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function u(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var n,r,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function d(e,t,n,r){if(e<t||e>n||e!==i(e))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function h(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function f(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var g,m,v,y,x,b,w,S,A,C=z.prototype={constructor:z,toString:null,valueOf:null},M=new z(1),k=20,T=4,_=-7,I=21,D=-1e7,O=1e7,R=!1,E=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function z(e,t){var r,o,s,l,u,c,h,p,f=this;if(!(f instanceof z))return new z(e,t);if(null==t){if(e&&!0===e._isBigNumber){f.s=e.s,!e.c||e.e>O?f.c=f.e=null:e.e<D?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>O?f.c=f.e=null:(f.e=l,f.c=[e]);return}p=String(e)}else{if(!n.test(p=String(e)))return A(f,p,c);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(u=p.search(/e/i))>0?(l<0&&(l=u),l+=+p.slice(u+1),p=p.substring(0,u)):l<0&&(l=p.length)}else{if(d(t,2,N.length,"Base"),10==t&&B)return $(f=new z(e),k+f.e+1,T);if(p=String(e),c="number"==typeof e){if(0*e!=0)return A(f,p,c,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,z.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=N.slice(0,t),l=u=0,h=p.length;u<h;u++)if(0>r.indexOf(o=p.charAt(u))){if("."==o){if(u>l){l=h;continue}}else if(!s&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){s=!0,u=-1,l=0;continue}return A(f,String(e),c,t)}c=!1,(l=(p=S(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(u=0;48===p.charCodeAt(u);u++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(u,++h)){if(h-=u,c&&z.DEBUG&&h>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(a+f.s*e);if((l=l-u-1)>O)f.c=f.e=null;else if(l<D)f.c=[f.e=0];else{if(f.e=l,f.c=[],u=(l+1)%14,l<0&&(u+=14),u<h){for(u&&f.c.push(+p.slice(0,u)),h-=14;u<h;)f.c.push(+p.slice(u,u+=14));u=14-(p=p.slice(u)).length}else u-=h;for(;u--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,o,a,s,l;if(null==n?n=T:d(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)l=u(e.c),l=1==r||2==r&&(a<=_||a>=I)?p(l,a):f(l,a,"0");else if(o=(e=$(new z(e),t,n)).e,s=(l=u(e.c)).length,1==r||2==r&&(t<=o||o<=_)){for(;s<t;l+="0",s++);l=p(l,o)}else if(t-=a,l=f(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function F(e,t){for(var n,r,i=1,o=new z(e[0]);i<e.length;i++)(r=new z(e[i])).s&&(n=c(o,r))!==t&&(0!==n||o.s!==t)||(o=r);return o}function V(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>O?e.c=e.e=null:n<D?e.c=[e.e=0]:(e.e=n,e.c=t),e}function $(e,t,n,o){var a,l,u,c,d,h,p,f=e.c;if(f){e:{for(a=1,c=f[0];c>=10;c/=10,a++);if((l=t-a)<0)l+=14,u=t,p=i((d=f[h=0])/s[a-u-1]%10);else if((h=r((l+1)/14))>=f.length)if(o){for(;f.length<=h;f.push(0));d=p=0,a=1,l%=14,u=l-14+1}else break e;else{for(a=1,d=c=f[h];c>=10;c/=10,a++);l%=14,p=(u=l-14+a)<0?0:i(d/s[a-u-1]%10)}if(o=o||t<0||null!=f[h+1]||(u<0?d:d%s[a-u-1]),o=n<4?(p||o)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(l>0?u>0?d/s[a-u]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,o?(t-=e.e+1,f[0]=s[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==l?(f.length=h,c=1,h--):(f.length=h+1,c=s[14-l],f[h]=u>0?i(d/s[a-u]%s[u])*c:0),o)for(;;)if(0==h){for(l=1,u=f[0];u>=10;u/=10,l++);for(u=f[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==f[0]&&(f[0]=1));break}else{if(f[h]+=c,1e14!=f[h])break;f[h--]=0,c=1}for(l=f.length;0===f[--l];f.pop());}e.e>O?e.c=e.e=null:e.e<D&&(e.c=[e.e=0])}return e}function H(e){var t,n=e.e;return null===n?e.toString():(t=u(e.c),t=n<=_||n>=I?p(t,n):f(t,n,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,n;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(d(n=e[t],0,1e9,t),k=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(d(n=e[t],0,8,t),T=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(d(n[0],-1e9,0,t),d(n[1],0,1e9,t),_=n[0],I=n[1]):(d(n,-1e9,1e9,t),_=-(I=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)d(n[0],-1e9,-1,t),d(n[1],1,1e9,t),D=n[0],O=n[1];else if(d(n,-1e9,1e9,t),n)D=-(O=n<0?-n:n);else throw Error(o+t+" cannot be zero: "+n);if(e.hasOwnProperty(t="CRYPTO"))if(!!(n=e[t])===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))R=n;else throw R=!n,Error(o+"crypto unavailable");else R=n;else throw Error(o+t+" not true or false: "+n);if(e.hasOwnProperty(t="MODULO_MODE")&&(d(n=e[t],0,9,t),E=n),e.hasOwnProperty(t="POW_PRECISION")&&(d(n=e[t],0,1e9,t),P=n),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(n=e[t]))L=n;else throw Error(o+t+" not an object: "+n);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);B="0123456789"==n.slice(0,10),N=n}}else throw Error(o+"Object expected: "+e);return{DECIMAL_PLACES:k,ROUNDING_MODE:T,EXPONENTIAL_AT:[_,I],RANGE:[D,O],CRYPTO:R,MODULO_MODE:E,POW_PRECISION:P,FORMAT:L,ALPHABET:N}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,n,r=e.c,a=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(r)){if((1===s||-1===s)&&a>=-1e9&&a<=1e9&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return F(arguments,-1)},z.minimum=z.min=function(){return F(arguments,1)},g=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},z.random=function(e){var t,n,a,l,u,c=0,h=[],p=new z(M);if(null==e?e=k:d(e,0,1e9),l=r(e/14),R)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));c<l;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(h.push(u%1e14),c+=2);c=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);c<l;)(u=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(h.push(u%1e14),c+=7);c=l/7}else throw R=!1,Error(o+"crypto unavailable");if(!R)for(;c<l;)(u=g())<9e15&&(h[c++]=u%1e14);for(l=h[--c],e%=14,l&&e&&(u=s[14-e],h[c]=i(l/u)*u);0===h[c];h.pop(),c--);if(c<0)h=[a=0];else{for(a=-1;0===h[0];h.splice(0,1),a-=14);for(c=1,u=h[0];u>=10;u/=10,c++);c<14&&(a-=14-c)}return p.e=a,p.c=h,p},z.sum=function(){for(var e=1,t=arguments,n=new z(t[0]);e<t.length;)n=n.plus(t[e++]);return n},S=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,d,h,p,g,m,v=n.indexOf("."),y=k,x=T;for(v>=0&&(d=P,P=0,n=n.replace(".",""),p=(m=new z(r)).pow(n.length-v),P=d,m.c=t(f(u(p.c),p.e,"0"),10,i,e),m.e=m.c.length),c=d=(g=t(n,r,i,a?(s=N,e):(s=e,N))).length;0==g[--d];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(p.c=g,p.e=c,p.s=o,g=(p=w(p,m,y,x,i)).c,h=p.r,c=p.e),v=g[l=c+y+1],d=i/2,h=h||l<0||null!=g[l+1],h=x<4?(null!=v||h)&&(0==x||x==(p.s<0?3:2)):v>d||v==d&&(4==x||h||6==x&&1&g[l-1]||x==(p.s<0?8:7)),l<1||!g[0])n=h?f(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(g.length=l,h)for(--i;++g[--l]>i;)g[l]=0,l||(++c,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=s.charAt(g[v++]));n=f(n,c,s.charAt(0))}return n}}(),w=function(){function e(e,t,n){var r,i,o,a,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)r=c*(o=e[l]%1e7)+(a=e[l]/1e7|0)*u,s=((i=u*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,e[l]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,a,s,u){var c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T=r.s==o.s?1:-1,_=r.c,I=o.c;if(!_||!_[0]||!I||!I[0])return new z(!r.s||!o.s||(_?I&&_[0]==I[0]:!I)?NaN:_&&0==_[0]||!I?0*T:T/0);for(y=(v=new z(T)).c=[],T=a+(d=r.e-o.e)+1,u||(u=1e14,d=l(r.e/14)-l(o.e/14),T=T/14|0),h=0;I[h]==(_[h]||0);h++);if(I[h]>(_[h]||0)&&d--,T<0)y.push(1),p=!0;else{for(A=_.length,M=I.length,h=0,T+=2,(f=i(u/(I[0]+1)))>1&&(I=e(I,f,u),_=e(_,f,u),M=I.length,A=_.length),S=M,b=(x=_.slice(0,M)).length;b<M;x[b++]=0);k=[0].concat(k=I.slice()),C=I[0],I[1]>=u/2&&C++;do{if(f=0,(c=t(I,x,M,b))<0){if(w=x[0],M!=b&&(w=w*u+(x[1]||0)),(f=i(w/C))>1)for(f>=u&&(f=u-1),m=(g=e(I,f,u)).length,b=x.length;1==t(g,x,m,b);)f--,n(g,M<m?k:I,m,u),m=g.length,c=1;else 0==f&&(c=f=1),m=(g=I.slice()).length;if(m<b&&(g=[0].concat(g)),n(x,g,b,u),b=x.length,-1==c)for(;1>t(I,x,M,b);)f++,n(x,M<b?k:I,b,u),b=x.length}else 0===c&&(f++,x=[0]);y[h++]=f,x[0]?x[b++]=_[S]||0:(x=[_[S]],b=1)}while((S++<A||null!=x[0])&&T--);p=null!=x[0],y[0]||y.splice(0,1)}if(1e14==u){for(h=1,T=y[0];T>=10;T/=10,h++);$(v,a+(v.e=h+14*d-1)+1,s,p)}else v.e=d,v.r=+p;return v}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,A=function(e,t,n,r){var i,a=n?t:t.replace(b,"");if(x.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(m,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,a=a.replace(v,"$1").replace(y,"0.$1")),t!=a))return new z(a,i);if(z.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},C.absoluteValue=C.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return c(this,new z(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,r,i;if(null!=e)return d(e,0,1e9),null==t?t=T:d(t,0,8),$(new z(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-l(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},C.dividedBy=C.div=function(e,t){return w(this,new z(e,t),k,T)},C.dividedToIntegerBy=C.idiv=function(e,t){return w(this,new z(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,a,s,l,u,c,d,p,f,g=this;if((e=new z(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+H(e));if(null!=t&&(t=new z(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return f=new z(Math.pow(+H(g),c?e.s*(2-h(e)):+H(e))),t?f.mod(t):f;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(a=!d&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&h(e)?-0:0,g.e>-1&&(l=1/l),new z(d?1/l:l);P&&(l=r(P/14+2))}for(c?(n=new z(.5),d&&(e.s=1),p=h(e)):p=(s=Math.abs(+H(e)))%2,f=new z(M);;){if(p){if(!(f=f.times(g)).c)break;l?f.c.length>l&&(f.c.length=l):a&&(f=f.mod(t))}if(s){if(0===(s=i(s/2)))break;p=s%2}else if($(e=e.times(n),e.e+1,1),e.e>14)p=h(e);else{if(0==(s=+H(e)))break;p=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):a&&(g=g.mod(t))}return a?f:(d&&(f=M.div(f)),t?f.mod(t):l?$(f,P,T,u):f)},C.integerValue=function(e){var t=new z(this);return null==e?e=T:d(e,0,8),$(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===c(this,new z(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return c(this,new z(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=c(this,new z(e,t)))||0===t},C.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return 0>c(this,new z(e,t))},C.isLessThanOrEqualTo=C.lte=function(e,t){return -1===(t=c(this,new z(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var n,r,i,o,a=this.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,c=this.c,d=e.c;if(!s||!u){if(!c||!d)return c?(e.s=-t,e):new z(d?this:NaN);if(!c[0]||!d[0])return d[0]?(e.s=-t,e):new z(c[0]?this:3==T?-0:0)}if(s=l(s),u=l(u),c=c.slice(),a=s-u){for((o=a<0)?(a=-a,i=c):(u=s,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=d.length))?a:t,a=t=0;t<r;t++)if(c[t]!=d[t]){o=c[t]<d[t];break}if(o&&(i=c,c=d,d=i,e.s=-e.s),(t=(r=d.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=1e14-1;r>a;){if(c[--r]<d[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=1e14}c[r]-=d[r]}for(;0==c[0];c.splice(0,1),--u);return c[0]?V(e,c,u):(e.s=3==T?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var n,r;return(e=new z(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==E?(r=e.s,e.s=1,n=w(this,e,0,3),e.s=r,n.s*=r):n=w(this,e,0,E),(e=this.minus(n.times(e))).c[0]||1!=E||(e.s=this.s),e):new z(this):new z(NaN)},C.multipliedBy=C.times=function(e,t){var n,r,i,o,a,s,u,c,d,h,p,f,g,m=this.c,v=(e=new z(e,t)).c;if(!m||!v||!m[0]||!v[0])return this.s&&e.s&&(!m||m[0]||v)&&(!v||v[0]||m)?(e.s*=this.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(r=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=m.length)<(h=v.length)&&(g=m,m=v,v=g,i=u,u=h,h=i),i=u+h,g=[];i--;g.push(0));for(i=h;--i>=0;){for(n=0,p=v[i]%1e7,f=v[i]/1e7|0,o=i+(a=u);o>i;)s=f*(c=m[--a]%1e7)+(d=m[a]/1e7|0)*p,n=((c=p*c+s%1e7*1e7+g[o]+n)/1e14|0)+(s/1e7|0)+f*d,g[o--]=c%1e14;g[o]=n}return n?++r:g.splice(0,1),V(e,g,r)},C.negated=function(){var e=new z(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this.s;if(t=(e=new z(e,t)).s,!r||!t)return new z(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new z(r/0);if(!a[0]||!s[0])return s[0]?e:new z(a[0]?this:0*r)}if(i=l(i),o=l(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return r&&(a=[r].concat(a),++o),V(e,a,o)},C.precision=C.sd=function(e,t){var n,r,i;if(null!=e&&!!e!==e)return d(e,1,1e9),null==t?t=T:d(t,0,8),$(new z(this),e,t);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},C.shiftedBy=function(e){return d(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o=this.c,a=this.s,s=this.e,c=k+4,d=new z("0.5");if(1!==a||!o||!o[0])return new z(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+H(this)))||a==1/0?(((t=u(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=l((s+1)/2)-(s<0||s%2),n=new z(t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new z(a+""),n.c[0]){for((a=(s=n.e)+c)<3&&(a=0);;)if(i=n,n=d.times(i.plus(w(this,i,c,1))),u(i.c).slice(0,a)===(t=u(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($(n,n.e+k+2,1),e=!n.times(n).eq(this));break}if(!r&&($(i,i.e+k+2,0),i.times(i).eq(this))){n=i;break}c+=4,a+=4,r=1}}return $(n,n.e+k+1,T,e)},C.toExponential=function(e,t){return null!=e&&(d(e,0,1e9),e++),j(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(d(e,0,1e9),e=e+this.e+1),j(this,e,t)},C.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,a=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=a[0],d=a[1],h=this.s<0,p=h?c.slice(1):c,f=p.length;if(l&&(i=s,s=l,l=i,f-=i),s>0&&f>0){for(i=f%s||s,c=p.substr(0,i);i<f;i+=s)c+=u+p.substr(i,s);l>0&&(c+=u+p.slice(i)),h&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},C.toFraction=function(e){var t,n,r,i,a,l,c,d,h,p,f,g,m=this.c;if(null!=e&&(!(c=new z(e)).isInteger()&&(c.c||1!==c.s)||c.lt(M)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+H(c));if(!m)return new z(this);for(t=new z(M),h=n=new z(M),r=d=new z(M),g=u(m),a=t.e=g.length-this.e-1,t.c[0]=s[(l=a%14)<0?14+l:l],e=!e||c.comparedTo(t)>0?a>0?t:h:c,l=O,O=1/0,c=new z(g),d.c[0]=0;p=w(c,t,0,1),1!=(i=n.plus(p.times(r))).comparedTo(e);)n=r,r=i,h=d.plus(p.times(i=h)),d=i,t=c.minus(p.times(i=t)),c=i;return i=w(e.minus(n),r,0,1),d=d.plus(i.times(h)),n=n.plus(i.times(r)),d.s=h.s=this.s,a*=2,f=1>w(h,r,a,T).minus(this).abs().comparedTo(w(d,n,a,T).minus(this).abs())?[h,r]:[d,n],O=l,f},C.toNumber=function(){return+H(this)},C.toPrecision=function(e,t){return null!=e&&d(e,1,1e9),j(this,e,t,2)},C.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=_||i>=I?p(u(n.c),i):f(u(n.c),i,"0"):10===e&&B?t=f(u((n=$(new z(n),k+i+1,T)).c),n.e,"0"):(d(e,2,N.length,"Base"),t=S(f(u(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return H(this)},C._isBigNumber=!0,null!=t&&z.set(t),z}()).default=t.BigNumber=t,rk.exports?rk.exports=t:(e||(e="u">typeof self&&self?self:window),e.BigNumber=t)})(rw);var rT=rk.exports;let r_=rM(),rI=rA(),rD={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},rO={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:rR,decimalSuffixes:rE}=r_.currentBytes(),rP={scale:1024,suffixes:rE,marker:"bd"},rL={scale:1024,suffixes:rR,marker:"b"},rN={scale:1e3,suffixes:rE,marker:"d"};function rB(e,t,n){let r=t[0],i=Math.abs(e);if(i>=n){for(let o=1;o<t.length;++o){let a=Math.pow(n,o),s=Math.pow(n,o+1);if(i>=a&&i<s){r=t[o],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function rz(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function rj({instance:e,providedFormat:t,state:n=r_,decimalSeparator:r,defaults:i=n.currentDefaults()}){var o,a,s,l,u;let c,d,h,p,f,g,m,v=e._value;if(0===v&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(v))return v.toString();let y=Object.assign({},rO,i,t),x=y.totalLength,b=x?0:y.characteristic,w=y.optionalCharacteristic,S=y.forceAverage,A=y.lowPrecision,C=!!x||!!S||y.average,M=x?-1:C&&void 0===t.mantissa?0:y.mantissa,k=!x&&(void 0===t.optionalMantissa?-1===M:y.optionalMantissa),T=y.trimMantissa,_=y.thousandSeparated,I=y.spaceSeparated,D=y.negative,O=y.forceSign,R=y.exponential,E=y.roundingFunction,P="";if(C){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&r[t]&&rD[t]?(s=r[t],e/=rD[t]):l>=rD.trillion||n&&1===a(l/rD.trillion)?(s=r.trillion,e/=rD.trillion):l<rD.trillion&&l>=rD.billion||n&&1===a(l/rD.billion)?(s=r.billion,e/=rD.billion):l<rD.billion&&l>=rD.million||n&&1===a(l/rD.million)?(s=r.million,e/=rD.million):(l<rD.million&&l>=rD.thousand||n&&1===a(l/rD.thousand))&&(s=r.thousand,e/=rD.thousand),s&&(s=(i?" ":"")+s),o){let t=e<0,n=e.toString().split(".")[0];u=Math.max(o-(t?n.length-1:n.length),0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:v,forceAverage:S,lowPrecision:A,abbreviations:n.currentAbbreviations(),spaceSeparated:I,roundingFunction:E,totalLength:x});v=e.value,P+=e.abbreviation,x&&(M=e.mantissaPrecision)}if(R){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),i=+n;return t&&1<t&&(i*=Math.pow(10,t-1),r-=t-1,r=r>=0?`+${r}`:r),{value:i,abbreviation:`e${r}`}}({value:v,characteristicPrecision:b});v=e.value,P=e.abbreviation+P}let L=function(e,t,n,r,i,o){if(-1===r)return e;let a=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,i]=n.split("e"),[o,a=""]=r.split(".");if(+i>0)n=o+a+rz(i-a.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let r=(rz(-i-1)+Math.abs(o)+a).substr(0,t);r.length<t&&(r+=rz(t-r.length)),n=e+r}return+i>0&&t>0&&(n+=`.${rz(t)}`),n}(e,t):new rT(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,o),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||i))return s;let u=l.match(/0+$/);return i&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(v.toString(),v,k,M,T,E);return o=L=function(e,t,n,r){let i=e,[o,a]=i.toString().split(".");if(o.match(/^-?0$/)&&n)return a?`${o.replace("0","")}.${a}`:o.replace("0","");let s=t<0&&0===o.indexOf("-");if(s&&(o=o.slice(1),i=i.slice(1)),o.length<r){let e=r-o.length;for(let t=0;t<e;t++)i=`0${i}`}return s&&(i=`-${i}`),i.toString()}(L,v,w,b),a=v,s=r,d=(c=n.currentDelimiters()).thousands,s=s||c.decimal,h=c.thousandsSize||3,f=(p=o.toString()).split(".")[0],g=p.split(".")[1],m=a<0&&0===f.indexOf("-"),_&&(m&&(f=f.slice(1)),(function(e,t){let n=[],r=0;for(let i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;return n})(f.length,h).forEach((e,t)=>{f=f.slice(0,e+t)+d+f.slice(e+t)}),m&&(f=`-${f}`)),L=p=g?f+s+g:f,(C||R)&&(L+=P),(O||v<0)&&(l=L,L=0===(u=v)?l:0==+l?l.replace("-",""):u>0?`+${l}`:"sign"===D?l:`(${l.replace("-","")})`),L}function rF(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function rV(e,t,n){let r=new rT(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new rT(i),e._value=r.minus(i).toNumber(),e}let r$=rM(),rH=rA(),rW={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}t&&rZ.registerLanguage(t)})}},rG=rS(),rU={format:(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=rC(t)),!rI.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",i=t.postfix||"",o=function(e,t,n){var r,i,o;switch(t.output){case"currency":let a,s,l,u,c,d,h,p,f,g;return r=t=rF(t,r_.currentCurrencyDefaultFormat()),a=r_.currentCurrency(),l=Object.assign({},rO,s=Object.assign({},r)),c="",d=!!l.totalLength||!!l.forceAverage||l.average,h=s.currencyPosition||a.position,p=s.currencySymbol||a.symbol,f=void 0!==l.spaceSeparatedCurrency?l.spaceSeparatedCurrency:l.spaceSeparated,void 0===s.lowPrecision&&(s.lowPrecision=!1),f&&(c=" "),"infix"===h&&(u=c+p+c),g=rj({instance:e,providedFormat:s,state:r_,decimalSeparator:u}),"prefix"===h&&(g=e._value<0&&"sign"===l.negative?`-${c}${p}${g.slice(1)}`:e._value>0&&l.forceSign?`+${c}${p}${g.slice(1)}`:p+c+g),h&&"postfix"!==h||(g=g+(c=!l.spaceSeparatedAbbreviation&&d?"":c)+p),g;case"percent":let m,v,y;return i=t=rF(t,r_.currentPercentageDefaultFormat()),m=i.prefixSymbol,v=rj({instance:n(100*e._value),providedFormat:i,state:r_}),y=Object.assign({},rO,i),m?`%${y.spaceSeparated?" ":""}${v}`:`${v}${y.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,r){let i=t.base||"binary",o=Object.assign({},rO,t),{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes(),l={general:{scale:1024,suffixes:s||rE,marker:"bd"},binary:{scale:1024,suffixes:a||rR,marker:"b"},decimal:{scale:1e3,suffixes:s||rE,marker:"d"}}[i],{value:u,suffix:c}=rB(e._value,l.suffixes,l.scale),d=rj({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${o.spaceSeparated?" ":""}${c}`}(e,t=rF(t,r_.currentByteDefaultFormat()),r_,n);case"time":let x,b,w;return t=rF(t,r_.currentTimeDefaultFormat()),x=Math.floor(e._value/60/60),b=Math.floor((e._value-60*x*60)/60),w=Math.round(e._value-60*x*60-60*b),`${x}:${b<10?"0":""}${b}:${w<10?"0":""}${w}`;case"ordinal":let S,A,C,M;return o=t=rF(t,r_.currentOrdinalDefaultFormat()),S=r_.currentOrdinal(),A=Object.assign({},rO,o),C=rj({instance:e,providedFormat:o,state:r_}),M=S(e._value),`${C}${A.spaceSeparated?" ":""}${M}`;default:return rj({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=r+o)+i})(...e,rZ),getByteUnit:(...e)=>(function(e){return rB(e._value,rP.suffixes,rP.scale).suffix})(...e),getBinaryByteUnit:(...e)=>(function(e){return rB(e._value,rL.suffixes,rL.scale).suffix})(...e),getDecimalByteUnit:(...e)=>(function(e){return rB(e._value,rN.suffixes,rN.scale).suffix})(...e),formatOrDefault:rF},rq={add:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.plus(r).toNumber(),e},subtract:(e,t)=>rV(e,t,rZ),multiply:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.times(r).toNumber(),e},divide:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.dividedBy(r).toNumber(),e},set:(e,t)=>{let n;return n=t,rZ.isNumbro(t)&&(n=t._value),e._value=n,e},difference:(e,t)=>{let n;return rV(n=rZ(e._value),t,rZ),Math.abs(n._value)},BigNumber:rT};class rY{constructor(e){this._value=e}clone(){return rZ(this._value)}format(e={}){return rU.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=rC(e)),(e=rU.formatOrDefault(e,r$.currentCurrencyDefaultFormat())).output="currency",rU.format(this,e)}formatTime(e={}){return e.output="time",rU.format(this,e)}binaryByteUnits(){return rU.getBinaryByteUnit(this)}decimalByteUnits(){return rU.getDecimalByteUnit(this)}byteUnits(){return rU.getByteUnit(this)}difference(e){return rq.difference(this,e)}add(e){return rq.add(this,e)}subtract(e){return rq.subtract(this,e)}multiply(e){return rq.multiply(this,e)}divide(e){return rq.divide(this,e)}set(e){return rq.set(this,rX(e))}value(){return this._value}valueOf(){return this._value}}function rX(e){let t=e;return rZ.isNumbro(e)?t=e._value:"string"==typeof e?t=rZ.unformat(e):isNaN(e)&&(t=NaN),t}function rZ(e){return new rY(rX(e))}rZ.version="2.5.0",rZ.isNumbro=function(e){return e instanceof rY},rZ.language=r$.currentLanguage,rZ.registerLanguage=r$.registerLanguage,rZ.setLanguage=r$.setLanguage,rZ.languages=r$.languages,rZ.languageData=r$.languageData,rZ.zeroFormat=r$.setZeroFormat,rZ.defaultFormat=r$.currentDefaults,rZ.setDefaults=r$.setDefaults,rZ.defaultCurrencyFormat=r$.currentCurrencyDefaultFormat,rZ.validate=rH.validate,rZ.loadLanguagesInNode=rW.loadLanguagesInNode,rZ.unformat=rG.unformat,rZ.BigNumber=rq.BigNumber;var rK=rZ&&rZ.__esModule&&Object.prototype.hasOwnProperty.call(rZ,"default")?rZ.default:rZ;let rQ={label:"Bits",decimalPlaces:!0,shortValues:!0},rJ={bits:{group:"Bits",label:"Bits (IEC)"},decbits:{group:"Bits",label:"Bits (SI)"}};function r0(e,{unit:t="bits",shortValues:n,decimalPlaces:r}){let i="decbits"===t;if(!rd(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"decimal",useGrouping:!0};rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.maximumSignificantDigits,r,n,t];return`${ru(o,"bits",i,"en-US")(e)} bits`}return rK(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:rh(r)?r:2,trimMantissa:!rh(r),optionalMantissa:!rh(r)}).replace(/KB/g,"Kb").replace(/MB/g,"Mb").replace(/GB/g,"Gb").replace(/TB/g,"Tb").replace(/PB/g,"Pb").replace(/EB/g,"Eb").replace(/KiB/g,"Kib").replace(/MiB/g,"Mib").replace(/GiB/g,"Gib").replace(/TiB/g,"Tib").replace(/PiB/g,"Pib").replace(/EiB/g,"Eib")}let r1={label:"Bytes",decimalPlaces:!0,shortValues:!0},r2={bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"}};function r5(e,{unit:t="bytes",shortValues:n,decimalPlaces:r}){let i="decbytes"===t;if(!rd(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3),ru([i.style,i.unit,i.unitDisplay,i.useGrouping,i.maximumSignificantDigits,r,n,t],"bytes",i,"en-US")(e)}return rK(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:rh(r)?r:2,trimMantissa:!rh(r),optionalMantissa:!rh(r)})}var r4=n(40224);let r3="Currency",r6={label:"Currency",decimalPlaces:!0},r8={aud:{group:r3,label:"Australian Dollar (A$)"},cad:{group:r3,label:"Canadian Dollar (CA$)"},chf:{group:r3,label:"Swiss Franc (CHF)"},cny:{group:r3,label:"Renminbi (CN\xa5)"},eur:{group:r3,label:"Euro (€)"},gbp:{group:r3,label:"Pound (\xa3)"},hkd:{group:r3,label:"Hong Kong Dollar (HK$)"},inr:{group:r3,label:"Indian Rupee (₹)"},jpy:{group:r3,label:"Yen (\xa5)"},krw:{group:r3,label:"South Korean Won (₩)"},nok:{group:r3,label:"Norwegian Krone (NOK)"},nzd:{group:r3,label:"New Zealand Dollar (NZ$)"},sek:{group:r3,label:"Swedish Krona (SEK)"},sgd:{group:r3,label:"Singapore Dollar (S$)"},usd:{group:r3,label:"US Dollar ($)"}};function r9(e,{unit:t,decimalPlaces:n}){let r={style:"currency",currency:(0,r4.toUpper)(t),currencyDisplay:"symbol"};return rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3,ru([r.style,r.currency,r.currencyDisplay,r.maximumSignificantDigits,n,t],"currency",r,"en-US")(e)}let r7={label:"percent",decimalPlaces:!0},ie="Percent",it={percent:{group:ie,label:"Percent (0-100)"},"percent-decimal":{group:ie,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:ie,label:"%"}};function ir(e,{unit:t,decimalPlaces:n}){let r={style:"percent",useGrouping:!0};return rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3,"percent"===t&&(e/=100),ru([r.style,r.useGrouping,r.maximumSignificantDigits,n,t],"percent",r,"en-US")(e)}let ii="Temperature",io={label:ii,decimalPlaces:!0},ia={celsius:{group:ii,label:"Celsius (\xb0C)"},fahrenheit:{group:ii,label:"Fahrenheit (\xb0F)"}},is=(e,{unit:t,decimalPlaces:n})=>{let r={unit:t,style:"unit"};rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3;let i="celsius"===t?"en-GB":"en-US";return ru([r.style,r.unit,r.maximumSignificantDigits,n,i],"temperature",r,i)(e)},il={label:"Decimal",decimalPlaces:!0,shortValues:!0},iu={decimal:{group:"Decimal",label:"Decimal"}};function ic(e,{shortValues:t,decimalPlaces:n}){let r={style:"decimal",useGrouping:!0};return rd(t)&&(r.notation="compact"),rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):rd(t)&&(r.maximumSignificantDigits=3),ru([r.style,r.useGrouping,r.notation,r.maximumSignificantDigits,n],"decimal",r,"en-US")(e)}let id={label:"Throughput",decimalPlaces:!0},ih="Throughput",ip={"bits/sec":{group:ih,label:"Bits/sec (IEC)"},"decbits/sec":{group:ih,label:"Bits/sec (SI)"},"bytes/sec":{group:ih,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:ih,label:"Bytes/sec (SI)"},"counts/sec":{group:ih,label:"Counts/sec"},"events/sec":{group:ih,label:"Events/sec"},"messages/sec":{group:ih,label:"Messages/sec"},"ops/sec":{group:ih,label:"Ops/sec"},"packets/sec":{group:ih,label:"Packets/sec"},"reads/sec":{group:ih,label:"Reads/sec"},"requests/sec":{group:ih,label:"Requests/sec"},"records/sec":{group:ih,label:"Records/sec"},"rows/sec":{group:ih,label:"Rows/sec"},"writes/sec":{group:ih,label:"Writes/sec"}};function ig(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bits/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return r0(e,{unit:"bits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbits/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return r0(e,{unit:"decbits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return r5(e,{unit:"decbytes",shortValues:n,decimalPlaces:r})+"/"+t}if("bytes/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return r5(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}let i={style:"decimal",useGrouping:!0};rd(n)&&(i.notation="compact"),rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.notation,i.maximumSignificantDigits,r,n,t];return`${ru(o,"throughput",i,"en-US")(e)} ${t}`}let im="Date",iv={Time:rg,Percent:r7,Decimal:il,Bytes:r1,Bits:rQ,Throughput:id,Currency:r6,Temperature:io,Date:{label:"Date & Time"}},iy={...rm,...it,...iu,...r2,...rJ,...ip,...r8,...ia,"datetime-iso":{group:im,label:"DateTime (GMT)"},"datetime-us":{group:im,label:"DateTime (US-East)"},"datetime-local":{group:im,label:"DateTime (Browser Local)"},"date-iso":{group:im,label:"Date (GMT)"},"date-us":{group:im,label:"Date (US-East)"},"date-local":{group:im,label:"Date (Browser Local)"},"time-local":{group:im,label:"Time (Browser Local)"},"time-iso":{group:im,label:"Time (GMT)"},"time-us":{group:im,label:"Time (US-East)"},"relative-time":{group:im,label:"Relative Time"},"unix-timestamp":{group:im,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:im,label:"Unix Timestamp (ms)"}};function ix(e,t){if(!t)return e.toString();if(ik(t))return r5(e,t);if(iT(t))return r0(e,t);if(iM(t))return ic(e,t);if(iC(t))return ir(e,t);if(iA(t))return rb(e,t);if(iD(t))return ig(e,t);if(iO(t))return r9(e,t);if(iR(t))return function(e,t={}){let n=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:r="datetime-local",locale:i=(()=>{if("u">typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){let e=navigator.languages[0];if(e)return e}let e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"})(),timeZone:o=n,referenceTime:a=Date.now()}=t;if("unix-timestamp"===r)return(e>1e12?Math.floor(e/1e3):e).toString();if("unix-timestamp-ms"===r)return Math.floor(e<1e11?1e3*e:e).toString();let s=function(e){if(e<0)if(Math.abs(e)>1e10)return new Date(e);else return new Date(1e3*e);if(e>=25e10&&e<=26e10){let t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return new Date(e<1e10?1e3*e:e)}(e);if("relative-time"===r){let e=new Date(a),t=s.getTime()-e.getTime();for(let{unit:e,ms:n}of[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}]){let r=Math.round(t/n);if(Math.abs(r)>=1)return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(r,e)}return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"second")}let l={timeZone:o};switch(r){case"datetime-iso":return s.toISOString();case"datetime-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return s.toISOString().split("T")[0];case"date-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",new Intl.DateTimeFormat("en-US",l).format(s);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return s.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);default:throw Error(`Unknown date unit: ${r}`)}return new Intl.DateTimeFormat(i,l).format(s)}(e,t);if(iE(t))return is(e,t);throw Error(`Unknown unit options ${t}`)}function ib(e){return iy[e.unit??"decimal"]}function iw(e){return ib(e).group??"Decimal"}function iS(e){return iv[ib(e).group??"Decimal"]}function iA(e){return"Time"===iw(e)}function iC(e){return"Percent"===iw(e)}function iM(e){return"Decimal"===iw(e)}function ik(e){return"Bytes"===iw(e)}function iT(e){return"Bits"===iw(e)}function i_(e){return!!iS(e).decimalPlaces}function iI(e){return!!iS(e).shortValues}function iD(e){return"Throughput"===iw(e)}function iO(e){return"Currency"===iw(e)}function iR(e){return"Date"===iw(e)}function iE(e){return"Temperature"===iw(e)}let iP={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series",ExtractColumnFields:"Extract column fields"};function iL(e,t){return[nG({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t)}},e)]}function iN(e,t,n,r){let i=[],o=nG({type:"value",position:"left",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t),overflow:"truncate"}},e);i.push(o);let a=0;return n.forEach((t,n)=>{let o,s,l={type:"value",position:"right",offset:a,boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t)},splitLine:{show:!1},show:e?.show};i.push(l),r&&(a+=(o=ix(r[n]??1e3,t),((s=document.createElement("canvas").getContext("2d"))?(s.font="12px sans-serif",s.measureText(o).width):6*o.length)+10))}),i}function iB(e,t){let{value:n,setValueAndStore:r}=function(e,t,n){let[r,i]=(0,I.useState)(()=>{try{let n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n}),o=(0,I.useCallback)(n=>{i(n),e.setItem(t,JSON.stringify(n))},[i,e,t]);return{value:r,setValue:i,setValueAndStore:o}}(window.localStorage,e,t);return[n,r]}function iz(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function ij(e){e.dispatchAction({type:"restore"})}function iF(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function iV(e,t,n){if(void 0===n)return null;let r=[e,t];return n.containPixel("grid",r)?n.convertFromPixel("grid",r):null}function i$(e,t,n,r,i,o){let a=o.length>0?o[o.length-1]:i[i.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay"}),r.length>0&&e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function iH(e){return e[e.length-1]?.name===nU}function iW(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(let[i]of e){let e=Math.abs(i-t);e<r&&(n=i,r=e)}return n}function iG(e,t){if(void 0===t)return null;let n=e.length,r=null;for(let i=0;i<n;i++){let o=n>0?e[i]:null;if(!o)break;r=iW(o.values,t)}return r}function iU(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}function iq(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,I.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var iY=((sC={}).CSV="csv",sC.DISTRIBUTED="distributed",sC.DOUBLEQUOTE="doublequote",sC.GLOB="glob",sC.JSON="json",sC.LUCENE="lucene",sC.PERCENTENCODE="percentencode",sC.PIPE="pipe",sC.PROMETHEUS="prometheus",sC.RAW="raw",sC.REGEX="regex",sC.SINGLEQUOTE="singlequote",sC.SQLSTRING="sqlstring",sC.TEXT="text",sC.QUERYPARAM="queryparam",sC.REGEX_LITERAL="regexliteral",sC);function iX(e){if(!e)return;let t=e.toLowerCase();return Object.values(iY).find(e=>e===t)||void 0}function iZ(e,t,n){switch(n){case"csv":case"raw":return e.join(",");case"distributed":{let[n,...r]=e;return`${[n,...r.map(e=>`${t}=${e}`)].join(",")}`}case"doublequote":return e.map(e=>`"${e}"`).join(",");case"glob":return`{${e.join(",")}}`;case"json":return JSON.stringify(e.map(e=>{try{return JSON.parse(e)}catch{return e}}));case"lucene":return`(${e.map(e=>`"${e}"`).join(" OR ")})`;case"percentencode":return encodeURIComponent(e.join(","));case"pipe":return e.join("|");case"regex":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));return`(${t.join("|")})`}case"regexliteral":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\\\$&"));return`(${t.join("|")})`}case"singlequote":return e.map(e=>`'${e}'`).join(",");case"sqlstring":return e.map(e=>`'${e.replace(/'/g,"''")}'`).join(",");case"text":return e.join(" + ");case"queryparam":return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&");default:return`(${e.join("|")})`}}function iK(e,t,n,r){let i="$"+t,o="${"+t+(r?":"+r:"")+"}",a="";return Array.isArray(n)&&(a=iZ(n,t,r||"prometheus")),"string"==typeof n&&(a=iZ([n],t,r||"raw")),(e=e.replaceAll(i,a)).replaceAll(o,a)}let iQ=/\$(\w+)|\${(\w+)(?:\.([^:^}]+))?(?::([^}]+))?}/gm;function iJ(e){let t,n=new Set;for(;null!==(t=iQ.exec(e));)t&&(t[1]?n.add(t[1]):t[2]&&n.add(t[2]));return Array.from(n.values())}function i0(e){let t,n=new Map;for(;null!==(t=iQ.exec(e));)if(t){let e;t[4]&&(e=t[4]),t[1]?n.set(t[1],iX(e)):t[2]&&n.set(t[2],iX(e))}return n}function i1(e,t){let n=i0(e),r=Array.from(n.keys()),i=e;return r.toSorted((e,t)=>t.length-e.length).forEach(e=>{let r=t[e];r&&void 0!==r.value&&(i=iK(i,e,r?.value,n.get(e)))}),i}function i2(e,t){let n={};for(let[e,r]of Object.entries(t))n[e]=void 0===r.displayValue?r:{...r,value:r.displayValue};return i1(e,n)}let i5=/\$\{__data\.fields(?:\[(?:"|')([^"']+)(?:"|')\]|\.([a-zA-Z_][a-zA-Z0-9_]*))(?::([a-z]+))?\}/g,i4=/\$\{__data\[(\d+)\]\.fields\[(?:"|')([^"']+)(?:"|')\]\}/g,i3=/\$\{__data\.index\}/g,i6=/\$\{__data\.count\}/g,i8=/("|')?\$\{__data(?::([a-z]+))?\}("|')?/g;function i9(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}if(t.includes(".")){let n=t.split("."),r=e;for(let e of n){if(null==r||"object"!=typeof r)return"";r=r[e]}return null==r?"":"object"==typeof r?JSON.stringify(r):String(r)}return""}function i7(e){if(!e)return;let t=e.toLowerCase();return Object.values(iY).find(e=>e===t)}function oe(e,t,n={}){let{urlEncode:r=!0,index:i,count:o}=n,a=e,s=[];return void 0!==i&&(a=a.replaceAll(i3,String(i))),void 0!==o&&(a=a.replaceAll(i6,String(o))),a=a.replaceAll(i8,(e,n,r,i)=>{let o=i7(r)??iY.RAW;return o===iY.JSON?JSON.stringify(t):iZ(Object.values(t).map(e=>JSON.stringify(e)),"",o)}),i5.lastIndex=0,{text:a=a.replaceAll(i5,(e,n,i,o)=>{let a=n??i??"",l=i9(t,a);""===l&&void 0===t[a]&&s.push(`Field "${a}" not found in data`);let u=i7(o);if(u)return iZ([l],a,u);if(r){if(u===iY.RAW)return l;if(u!==iY.QUERYPARAM&&u!==iY.PERCENTENCODE)return encodeURIComponent(l)}return l}),errors:s.length>0?s:void 0}}function ot(e,t,n={}){let{urlEncode:r=!0}=n,i=e,o=[];return i=i.replaceAll(i6,String(t.length)),i4.lastIndex=0,i5.lastIndex=0,{text:i=(i=(i=i.replaceAll(i8,(e,n,r,i)=>{let o=i7(r)??iY.RAW,a=iZ(Object.values(t).map(e=>JSON.stringify(e)),"",o);return n&&i?a:`${n??""}${a}${i??""}`})).replaceAll(i4,(e,n,i)=>{let a=parseInt(n,10);if(a<0||a>=t.length)return o.push(`Index ${a} out of bounds (0-${t.length-1})`),e;let s=i9(t[a],i);return""===s&&void 0===t[a][i]&&o.push(`Field "${i}" not found in data at index ${a}`),r?encodeURIComponent(s):s})).replaceAll(i5,(e,n,r,i)=>{let o=n??r??"";return iZ(t.map(e=>i9(e,o)),o,i7(i)||iY.CSV)}),errors:o.length>0?o:void 0}}function on(e){return i4.lastIndex=0,i4.test(e)||/\$\{__data\.fields(?:\[["'][^"']+["']\]|\.[a-zA-Z_][a-zA-Z0-9_]*):[a-z]+\}/.test(e)}function or(e){return i4.lastIndex=0,i4.test(e)}function oi(e){return i5.lastIndex=0,i4.lastIndex=0,i5.test(e)||i4.test(e)}function oo(e){let t,n=new Set;for(i5.lastIndex=0,i4.lastIndex=0;null!==(t=i5.exec(e));)n.add(t[1]??t[2]);for(;null!==(t=i4.exec(e));)n.add(t[2]);return Array.from(n)}Symbol.for("constructDateFrom");let oa={},os={};function ol(e,t){try{let n=(oa[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];if(n in os)return os[n];return oc(n,n.split(":"))}catch{if(e in os)return os[e];let t=e?.match(ou);if(t)return oc(e,t.slice(1));return NaN}}let ou=/([+-]\d\d):?(\d\d)?/;function oc(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return os[e]=60*n+r>0?60*n+r+i:60*n-r-i}class od extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(ol(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),of(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new od(...t,e):new od(Date.now(),e)}withTimeZone(e){return new od(+this,e)}getTimezoneOffset(){let e=-ol(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),op(this),+this}[Symbol.for("constructDateFrom")](e){return new od(+new Date(e),this.timeZone)}}let oh=/^(get|set)(?!UTC)/;function op(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-(60*ol(e.timeZone,e))))}function of(e,t){var n;let r=Array.isArray(t)?Date.UTC((n=t)[0],n.length>1?n[1]:0,n.length>2?n[2]:1,...n.slice(3)):+e.internal,i=ol(e.timeZone,e),o=i>0?Math.floor(i):Math.ceil(i),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let s=-new Date(+e).getTimezoneOffset(),l=-new Date(+a).getTimezoneOffset(),u=s;if(s-l&&s!==o&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=s-o;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=ol(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===o&&(u=l)}let c=u-o;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let d=new Date(+e);d.setUTCSeconds(0);let h=s>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(60*ol(e.timeZone,e)))%60;(p||h)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+h);let f=ol(e.timeZone,e),g=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-g-c,v=g-o,y=v>0&&og(e)-r==60*v*1e3&&og(e,r-60*g*1e3)!==r;if(g!==o&&m&&!y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+m);let t=ol(e.timeZone,e),n=g-(t>0?Math.floor(t):Math.ceil(t));n&&m<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}op(e);let x=(t?r:r+1e3*p)-e.internal;x&&18e5>Math.abs(x)&&(Date.prototype.setTime.call(e,+e+x),op(e))}function og(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-(60*ol(e.timeZone,n)))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!oh.test(e))return;let t=e.replace(oh,"$1UTC");od.prototype[t]&&(e.startsWith("get")?od.prototype[e]=function(){return this.internal[t]()}:(od.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),of(e),+this},od.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),op(this),+this}))});class om extends od{static tz(e,...t){return t.length?new om(...t,e):new om(Date.now(),e)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),n=String(Math.abs(e)%60).padStart(2,"0");return[e>0?"-":"+",t,n]}withTimeZone(e){return new om(+this,e)}[Symbol.for("constructDateFrom")](e){return new om(+new Date(e),this.timeZone)}}var ov=n(4721);function oy(e){let t=(0,ov.a)(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-n}var ox=n(12015);function ob(e,...t){let n=ox.w.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}var ow=n(30439);function oS(e,t){let n=(0,ov.a)(e,t?.in);return n.setHours(0,0,0,0),n}function oA(e,t){let n=(0,ov.a)(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function oC(e,t){let n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,r=(0,ov.a)(e,t?.in),i=r.getDay();return r.setDate(r.getDate()-(7*(i<n)+i-n)),r.setHours(0,0,0,0),r}function oM(e,t){return oC(e,{...t,weekStartsOn:1})}function ok(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=(0,ox.w)(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let o=oM(i),a=(0,ox.w)(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let s=oM(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function oT(e,t){let n,r,i=(0,ov.a)(e,t?.in);return Math.round((oM(i)-(n=ok(i,void 0),(r=(0,ox.w)(i,0)).setFullYear(n,0,4),r.setHours(0,0,0,0),oM(r)))/ow.my)+1}function o_(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,o=(0,ox.w)(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);let a=oC(o,t),s=(0,ox.w)(t?.in||e,0);s.setFullYear(r,0,i),s.setHours(0,0,0,0);let l=oC(s,t);return+n>=+a?r+1:+n>=+l?r:r-1}function oI(e,t){let n,r,i,o=(0,ov.a)(e,t?.in);return Math.round((oC(o,t)-(n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,r=o_(o,t),(i=(0,ox.w)(t?.in||o,0)).setFullYear(r,0,n),i.setHours(0,0,0,0),oC(i,t)))/ow.my)+1}function oD(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let oO={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return oD("yy"===t?r%100:r,t.length)},M(e,t){let n=e.getMonth();return"M"===t?String(n+1):oD(n+1,2)},d:(e,t)=>oD(e.getDate(),t.length),a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>oD(e.getHours()%12||12,t.length),H:(e,t)=>oD(e.getHours(),t.length),m:(e,t)=>oD(e.getMinutes(),t.length),s:(e,t)=>oD(e.getSeconds(),t.length),S(e,t){let n=t.length;return oD(Math.trunc(e.getMilliseconds()*Math.pow(10,n-3)),t.length)}},oR={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){let t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return oO.y(e,t)},Y:function(e,t,n,r){let i=o_(e,r),o=i>0?i:1-i;return"YY"===t?oD(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):oD(o,t.length)},R:function(e,t){return oD(ok(e),t.length)},u:function(e,t){return oD(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return oD(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return oD(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return oO.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return oD(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let i=oI(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):oD(i,t.length)},I:function(e,t,n){let r=oT(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):oD(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):oO.d(e,t)},D:function(e,t,n){let r,i=function(e,t){let[n,r]=ob(void 0,e,t),i=oS(n),o=oS(r);return Math.round((i-oy(i)-(o-oy(o)))/ow.w4)}(r=(0,ov.a)(e,void 0),oA(r))+1;return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):oD(i,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return oD(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return oD(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return oD(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r,i=e.getHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r,i=e.getHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return oO.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):oO.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):oD(r,t.length)},k:function(e,t,n){let r=e.getHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):oD(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oO.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oO.s(e,t)},S:function(e,t){return oO.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return oP(r);case"XXXX":case"XX":return oL(r);default:return oL(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return oP(r);case"xxxx":case"xx":return oL(r);default:return oL(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oE(r,":");default:return"GMT"+oL(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oE(r,":");default:return"GMT"+oL(r,":")}},t:function(e,t,n){return oD(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return oD(+e,t.length)}};function oE(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+oD(o,2)}function oP(e,t){return e%60==0?(e>0?"-":"+")+oD(Math.abs(e)/60,2):oL(e,t)}function oL(e,t=""){let n=Math.abs(e);return(e>0?"-":"+")+oD(Math.trunc(n/60),2)+t+oD(n%60,2)}let oN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},oB=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},oz={p:oB,P:(e,t)=>{let n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return oN(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",oN(i,t)).replace("{{time}}",oB(o,t))}},oj=/^D+$/,oF=/^Y+$/,oV=["D","DD","YY","YYYY"];function o$(e,t,n){var r,i,o;let a,s=(r=e,i=t,o=n,a="Y"===r[0]?"years":"days of the month",`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${i}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),oV.includes(e))throw RangeError(s)}function oH(e){return!(!(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof e||isNaN(+(0,ov.a)(e)))}let oW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oG=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oU=/^'([^]*?)'?$/,oq=/''/g,oY=/[a-zA-Z]/;function oX(e,t,n){let r=n?.locale??n2.locale??n1,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,a=(0,ov.a)(e,n?.in);if(!oH(a))throw RangeError("Invalid time value");let s=t.match(oG).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,oz[t])(e,r.formatLong):e}).join("").match(oW).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var n;let t;return{isToken:!1,value:(t=(n=e).match(oU))?t[1].replace(oq,"'"):n}}if(oR[t])return{isToken:!0,value:e};if(t.match(oY))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(s=r.localize.preprocessor(a,s));let l={firstWeekContainsDate:i,weekStartsOn:o,locale:r};return s.map(i=>{if(!i.isToken)return i.value;let o=i.value;return(!n?.useAdditionalWeekYearTokens&&oF.test(o)||!n?.useAdditionalDayOfYearTokens&&oj.test(o))&&o$(o,t,String(e)),(0,oR[o[0]])(a,o,r.localize,l)}).join("")}function oZ(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function oK(e,t,n){let r,i=n?.toLowerCase();if(!n||"local"===i||"browser"===i)return oX(e,t);return oX(e,t,{in:(r="utc"===i?"UTC":n,e=>om.tz(r,+new Date(e)))})}function oQ(e){let t=e?.toLowerCase(),n=e;e&&"local"!==t&&"browser"!==t?"utc"===t&&(n="UTC"):n=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let e=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"shortOffset"}).formatToParts(new Date).find(e=>"timeZoneName"===e.type),t=e?.value??"";if("GMT"===t)return"GMT+0";return t}catch{return"GMT+0"}}function oJ(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let o0=(e,t)=>{if(!e)return{formattedDate:"",formattedTime:""};let n=new Date(e);return{formattedDate:t?t(n,"MMM dd, yyyy"):oX(n,"MMM dd, yyyy"),formattedTime:t?t(n,"HH:mm:ss"):oX(n,"HH:mm:ss")}};var o1=n(18264);function o2(e,t){let n=(0,I.useRef)(),r=!0;for(let e=0;e<t.length;e++)if(n.current?.deps[e]!==t[e]){r=!1;break}return(void 0===n.current||!1===r)&&(n.current={value:e(),deps:t}),n.current.value}function o5(e,t){let n=(0,I.useRef)();return(void 0===n.current||!1===o1(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}function o4(e){return!!e?.startsWith("/")}function o3(e){if(!e)throw Error("Input string cannot be empty");if(!o4(e))return RegExp(`^${e}$`);let t=e.match(/^\/(.+)\/([gimy]*)$/);if(!t)throw Error(`Invalid regular expression format: ${e}`);let[,n="",r=""]=t;try{return new RegExp(n,r)}catch(e){throw Error(`Failed to create RegExp ${e}`,{cause:e})}}function o6(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=i1(i,t);return n}function o8(e,t){let n={};for(let[r,i]of Object.entries(e))Array.isArray(i)?n[r]=i.map(e=>i1(e,t)):n[r]=function e(t,n){if(Array.isArray(t))return t.map(t=>e(t,n));for(let[e,r]of i0(t)){let i,o=n[e];if(!o)continue;let a=o.options??[],s=a.map(e=>e.value),l=Array.isArray(o.value),u=void 0!==o.customAllValue;if(l)i=o.value;else if(u)try{let e=o3(o.customAllValue),t=a.filter(t=>e.test(t.value)).map(e=>e.value);i=t.length>0?t:s}catch{i=s}if(i&&(!r||r===iY.QUERYPARAM)){let o="$"+e,a=r?"${"+e+":"+r+"}":"${"+e+"}";return i.map(e=>{let r=t;return i1(r=(r=r.replaceAll(a,e)).replaceAll(o,e),n)})}}return i1(t,n)}(i,t);return n}function o9(e,t,n,r,i){let o=oe(e,t,{index:n,count:r}),a=o.text,s=[];return o.errors&&s.push(...o.errors.map(e=>e.replace("in data","in selection data"))),i&&(a=i1(a,i)),{text:a,errors:s.length>0?s:void 0}}function o7(e,t,n){let r=ot(e,t),i=r.text,o=[];return r.errors&&o.push(...r.errors.map(e=>e.replace("in data","in selection data"))),n&&(i=i1(i,n)),{text:i,errors:o.length>0?o:void 0}}function ae(e,t){let n=e.palette.text?.primary??"#222";return nG({echartsTheme:{title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}},noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}function at(e,t=[]){if(!t.length)return{value:e};let n={value:e};return t.forEach(t=>{switch(t.kind){case"Value":{let r=t.spec;String(r.value)===String(e)&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Range":{let r=t.spec;if(void 0===r.from&&void 0===r.to)break;let i=void 0!==r.from?r.from:-1/0,o=void 0!==r.to?r.to:1/0;e>=i&&e<=o&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Regex":{let r=t.spec,i=e.toString();if(!r.pattern)break;let o=o3(r.pattern);i.match(o)&&null!==r.result.value&&(n.value=i.replace(o,r.result.value.toString()||"")||n.value,n.color=r.result.color);break}case"Misc":{let r=t.spec;(function(e,t){switch(e){case"empty":return""===t;case"null":return null==t;case"NaN":return Number.isNaN(t);case"true":return!0===t;case"false":return!1===t;default:return!1}})(r.value,e)&&(n.value=r.result.value||n.value,n.color=r.result.color)}}}),n}function an(e,t){if(0===t.length)return e;let n={};for(let r of e){let e=Object.keys(r).filter(e=>t.includes(e)).map(e=>r[e]).join("|"),i=n[e];i?n[e]={...i,...r}:n[e]={...r}}return Object.values(n)}function ar(e,t,n){let r=[];for(let i of e){let e=Object.keys(i).filter(e=>t.includes(e)),o={};for(let t of e)o[t]=i[t],delete i[t];for(let t of e)r.push({...i,[n]:o[t]});0===e.length&&r.push(i)}return r}function ai(e,t){let n=[];for(let r of e){let e=Object.keys(r).filter(e=>RegExp("^(("+t+" #\\d+)|("+t+"))$").test(e)),i={};for(let t of e)i[t]=r[t],delete r[t];for(let o of e)n.push({...r,[t]:i[o]});0===e.length&&n.push(r)}return n}function ao(e){let t=[...e],n=Array.from(new Set(e.flatMap(Object.keys).map(e=>e.replace(/ #\d+/,"")).filter(e=>"value"!==e)));for(let e of n)t=ai(t,e);return an(t,n)}function aa(e,t){let n=e;for(let e of t??[])if(!e.spec.disabled)switch(e.kind){case"JoinByColumnValue":e.spec.columns&&e.spec.columns.length>0&&(n=an(n,e.spec.columns));break;case"MergeIndexedColumns":e.spec.column&&(n=ai(n,e.spec.column));break;case"MergeColumns":e.spec.columns&&e.spec.columns.length>0&&e.spec.name&&(n=ar(n,e.spec.columns,e.spec.name));break;case"MergeSeries":n=ao(n)}return n.map(e=>Object.keys(e).toSorted().reduce((t,n)=>(t[n]=e[n],t),{}))}function as(e){return"number"==typeof e}function al(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function au(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function ac(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function ad(e){return e&&!0===e.constructor.prototype.isUnit||!1}function ah(e){return"string"==typeof e}var ap=Array.isArray;function af(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function ag(e){return Array.isArray(e)||af(e)}function am(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function av(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function ay(e){return e&&!0===e.constructor.prototype.isRange||!1}function ax(e){return e&&!0===e.constructor.prototype.isIndex||!1}function ab(e){return"boolean"==typeof e}function aw(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function aS(e){return e&&!0===e.constructor.prototype.isHelp||!1}function aA(e){return"function"==typeof e}function aC(e){return e instanceof Date}function aM(e){return e instanceof RegExp}function ak(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!au(e)&&!ac(e))}function aT(e){return null===e}function a_(e){return void 0===e}function aI(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function aD(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function aO(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function aR(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function aE(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function aP(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function aL(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function aN(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function aB(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function az(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function aj(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function aF(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function aV(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function a$(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function aH(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function aW(e){return e&&!0===e.constructor.prototype.isChain||!1}function aG(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":al(e)?"BigNumber":au(e)?"Complex":ac(e)?"Fraction":af(e)?"Matrix":ad(e)?"Unit":ax(e)?"Index":ay(e)?"Range":aw(e)?"ResultSet":az(e)?e.type:aW(e)?"Chain":aS(e)?"Help":"Object":"function"===t?"Function":t}function aU(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return aU(e)});if(e instanceof Date)return new Date(e.valueOf());if(al(e))return e;if(e instanceof RegExp)throw TypeError("Cannot clone "+e);return aq(e,aU)}function aq(e,t){var n={};for(var r in e)aZ(e,r)&&(n[r]=t(e[r]));return n}function aY(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!aY(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!aY(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}function aX(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function aZ(e,t){return e&&Object.hasOwnProperty.call(e,t)}function aK(e){return Object.keys(e).map(t=>e[t])}var aQ=n(23420);function aJ(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(a1));return function(e,t,n){if(!t.filter(e=>{var t;return!((t=e)&&"?"===t[0])}).every(e=>void 0!==n[e])){var r=t.filter(e=>void 0===n[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map(e=>'"'.concat(e,'"')).join(", "),"."))}}(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function a0(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function a1(e){return e&&"?"===e[0]?e.slice(1):e}function a2(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function a5(e,t,n){var r="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!a2(n))throw Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!a2(e))throw Error("Value must be an integer");e<0&&(e+=2**n),r="i".concat(n)}var i="";return e<0&&(e=-e,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[t]).concat(e.toString(t)).concat(r)}function a4(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),as(t)?n=t:as(t.precision)&&(n=t.precision),t.wordSize)&&"number"!=typeof(r=t.wordSize))throw Error('Option "wordSize" must be a number');switch(i){case"fixed":return a6(e,n);case"exponential":return a8(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a9(a3(e),t),r=n.exponent,i=n.coefficients,o=r%3==0?r:r<0?r-3-r%3:r-r%3;if(as(t))for(;t>i.length||r-o+1>i.length;)i.push(0);else for(var a=Math.abs(r-o)-(i.length-1),s=0;s<a;s++)i.push(0);for(var l=Math.abs(r-o),u=1;l>0;)u++,l--;var c=i.slice(u).join(""),d=as(t)&&c.length||c.match(/[1-9]/)?"."+c:"",h=i.slice(0,u).join("")+d+"e"+(r>=0?"+":"")+o.toString();return n.sign+h}(e,n);case"bin":return a5(e,2,r);case"oct":return a5(e,8,r);case"hex":return a5(e,16,r);case"auto":return(function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=a3(e),a=t?a9(o,t):o;if(a.exponent<r||a.exponent>=i)return a8(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(a7(t-s.length))),s=s.concat(a7(l-s.length+1+(s.length<t?t-s.length:0))),s=a7(-l).concat(s);var u=l>0?l:0;return u<s.length-1&&s.splice(u+1,0,"."),a.sign+s.join("")})(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function a3(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function a6(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a3(e),r="number"==typeof t?a9(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,a=o+(t||0);return i.length<a&&(i=i.concat(a7(a-i.length))),o<0&&(i=a7(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}function a8(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a3(e),r=t?a9(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(a7(t-i.length)));var a=i.shift();return r.sign+a+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function a9(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function a7(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var se=Number.EPSILON||2220446049250313e-31;function st(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<se||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function sn(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!a2(n))throw Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function sr(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function si(e,t){var n=function(e,t){var n;if("number"==typeof e)return a4(e,t);if(al(e))return function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto";if(void 0!==t&&(t.notation&&(n=t.notation),"number"==typeof t?d=t:t.precision&&(d=t.precision),t.wordSize)&&"number"!=typeof(h=t.wordSize))throw Error('Option "wordSize" must be a number');switch(n){case"fixed":return r=e,i=d,r.toFixed(i);case"exponential":return sr(e,d);case"engineering":return o=e,a=d,l=(s=o.e)%3==0?s:s<0?s-3-s%3:s-s%3,-1!==(c=(u=o.mul(Math.pow(10,-l))).toPrecision(a)).indexOf("e")&&(c=u.toString()),c+"e"+(s>=0?"+":"")+l.toString();case"bin":return sn(e,2,h);case"oct":return sn(e,8,h);case"hex":return sn(e,16,h);case"auto":var r,i,o,a,s,l,u,c,d,h,p=t&&void 0!==t.lowerExp?t.lowerExp:-3,f=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var g=e.toSignificantDigits(d),m=g.e;return(m>=p&&m<f?g.toFixed():sr(e,d)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t);if((n=e)&&"object"==typeof n&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d)if(!t||"decimal"!==t.fraction)return e.s*e.n+"/"+e.d;else return e.toString();if(Array.isArray(e))return function e(t,n){if(!Array.isArray(t))return si(t,n);for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}(e,t);if(ah(e))return'"'+e+'"';if("function"==typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"==typeof e)if("function"==typeof e.format)return e.format(t);else return e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+si(e[n],t)).join(", ")+"}";return String(e)}(e,t);return t&&"object"==typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function so(e,t,n){if(!(this instanceof so))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function sa(e,t,n){if(!(this instanceof sa))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function ss(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function sl(e,t){if(0===t.length){if(Array.isArray(e))throw new so(e.length,0)}else!function e(t,n,r){var i,o=t.length;if(o!==n[r])throw new so(o,n[r]);if(r<n.length-1){var a=r+1;for(i=0;i<o;i++){if(!Array.isArray(t[i]))throw new so(n.length-1,n.length,"<");e(t[i],n,a)}}else for(i=0;i<o;i++)if(Array.isArray(t[i]))throw new so(n.length+1,n.length,">")}(e,t,0)}function su(e,t){if(!as(e)||!a2(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new sa(e,t)}function sc(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!as(e)||!a2(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+si(t)+")")}),function e(t,n,r,i){var o,a,s=t.length,l=n[r],u=Math.min(s,l);if(t.length=l,r<n.length-1){var c=r+1;for(o=0;o<u;o++)Array.isArray(a=t[o])||(a=[a],t[o]=a),e(a,n,c,i);for(o=u;o<l;o++)a=[],t[o]=a,e(a,n,c,i)}else{for(o=0;o<u;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=u;o<l;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function sd(e,t){var n=sh(e),r=e.slice(),i=e.indexOf(-1);if(e.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0)if(t%n==0)r[i]=-t/n;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function sh(e){return e.reduce((e,t)=>e*t,1)}function sp(e,t,n,r){var i=r||ss(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function sf(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?sf(o,t):t(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function sg(e,t){return -1!==e.indexOf(t)}function sm(e,t,n,r){if(!(this instanceof sm))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=r?"-"+r:"")+" expected)",this.stack=Error().stack}so.prototype=RangeError(),so.prototype.constructor=RangeError,so.prototype.name="DimensionError",so.prototype.isDimensionError=!0,sa.prototype=RangeError(),sa.prototype.constructor=RangeError,sa.prototype.name="IndexError",sa.prototype.isIndexError=!0,sm.prototype=Error(),sm.prototype.constructor=Error,sm.prototype.name="ArgumentsError",sm.prototype.isArgumentsError=!0;var sv={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},sy=["Matrix","Array"],sx=["number","BigNumber","Fraction"];function sb(e,t,n){var r;void 0!==e[t]&&(r=e[t],-1===n.indexOf(r))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function sw(e,t){var n,r,i,o=(0,er.A)({},sv,t);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var a=((n={isNumber:as,isComplex:au,isBigNumber:al,isFraction:ac,isUnit:ad,isString:ah,isArray:ap,isMatrix:af,isCollection:ag,isDenseMatrix:am,isSparseMatrix:av,isRange:ay,isIndex:ax,isBoolean:ab,isResultSet:aw,isHelp:aS,isFunction:aA,isDate:aC,isRegExp:aM,isObject:ak,isNull:aT,isUndefined:a_,isAccessorNode:aI,isArrayNode:aD,isAssignmentNode:aO,isBlockNode:aR,isConditionalNode:aE,isConstantNode:aP,isFunctionAssignmentNode:aL,isFunctionNode:aN,isIndexNode:aB,isNode:az,isObjectNode:aj,isOperatorNode:aF,isParenthesisNode:aV,isRangeNode:a$,isSymbolNode:aH,isChain:aW}).on=(r=new aQ).on.bind(r),n.off=r.off.bind(r),n.once=r.once.bind(r),n.emit=r.emit.bind(r),n);a.config=function(e,t){function n(n){if(!n)return aq(e,aU);var r=aq(e,aU);sb(n,"matrix",sy),sb(n,"number",sx),function e(t,n){if(Array.isArray(n))throw TypeError("Arrays are not supported by deepExtend");for(var r in n)if(aZ(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else if(Array.isArray(n[r]))throw TypeError("Arrays are not supported by deepExtend");else t[r]=n[r];return t}(e,n);var i=aq(e,aU);return t("config",i,r,aq(n,aU)),i}return n.MATRIX_OPTIONS=sy,n.NUMBER_OPTIONS=sx,Object.keys(sv).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}(o,a.emit),a.expression={transform:{},mathWithTransform:{config:a.config}};var s={},l=function(e,t,n){function r(e,n){n&&"function"==typeof n.transform?(t.expression.transform[e]=n.transform,aZ(a,e)||(t.expression.mathWithTransform[e]=n.transform)):(delete t.expression.transform[e],aZ(a,e)||(t.expression.mathWithTransform[e]=n))}function i(e){return"function"==typeof e&&"object"==typeof e.signatures}function o(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var a={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(s,l){var u=arguments.length;if(1!==u&&2!==u)throw new sm("import",u,1,2);l||(l={});var c={};for(var d in!function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)aZ(n,i)&&e(t,n[i],i);else if(a0(n)||void 0!==r){var a=a0(n)?o(n)?n.fn+".transform":n.fn:r;if(aZ(t,a)&&t[a]!==n&&!l.silent)throw Error('Cannot import "'+a+'" twice');t[a]=n}else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}(c,s),c)if(aZ(c,d)){var h,p=c[d];if(a0(p))!function(r,s){var l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.fn;if(sg(u,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(u));var c=o(r)?t.expression.transform:t,d=u in t.expression.transform,h=aZ(c,u)?c[u]:void 0,p=function(){var n={};r.dependencies.map(a1).forEach(e=>{if(sg(e,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=t:"mathWithTransform"===e?n.mathWithTransform=t.expression.mathWithTransform:"classes"===e?n.classes=t:n[e]=t[e]});var o=r(n);if(o&&"function"==typeof o.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===h||s.override)return o;if(i(h)&&i(o))return e(h,o);if(s.silent)return h;throw Error('Cannot import "'+u+'": already exists')};r.meta&&!1===r.meta.lazy?c[u]=p():aX(c,u,p),h&&d?function(e){delete t.expression.transform[e],aZ(a,e)?delete t.expression.mathWithTransform[e]:t.expression.mathWithTransform[e]=t[e]}(u):!o(r)&&(-1!==(l=r).fn.indexOf(".")||aZ(a,l.fn)||l.meta&&l.meta.isClass)||aX(t.expression.mathWithTransform,u,()=>c[u]),n[u]=r,t.emit("import",u,p)}(p,l);else{if("function"==typeof(h=p)||"number"==typeof h||"string"==typeof h||"boolean"==typeof h||null===h||ad(h)||au(h)||al(h)||ac(h)||af(h)||Array.isArray(h))!function(o,a,s){var l;if(s.wrap&&"function"==typeof a&&(a=function(e){var n=function(){for(var n=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];n[r]=o&&o.valueOf()}return e.apply(t,n)};return e.transform&&(n.transform=e.transform),n}(a)),"function"==typeof(l=a)&&"string"==typeof l.signature&&(a=e(o,{[a.signature]:a})),i(t[o])&&i(a)){a=s.override?e(o,a.signatures):e(t[o],a),t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(void 0===t[o]||s.override){t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(!s.silent)throw Error('Cannot import "'+o+'": already exists')}(d,p,l);else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.typed.apply(a.typed,t)},a,s);return a.import=l,a.on("config",()=>{aK(s).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&l(e,{override:!0})})}),a.create=sw.bind(null,e),a.factory=aJ,a.import(aK((function e(t,n){for(var r in t)if(aZ(t,r)){var i=t[r];"object"==typeof i&&null!==i?e(i,n):n[r]=i}}(e,i={}),i))),a.ArgumentsError=sm,a.DimensionError=so,a.IndexError=sa,a}var sS,sA,sC,sM,sk,sT,s_,sI,sD,sO,sR,sE,sP,sL,sN,sB,sz,sj,sF,sV="0123456789abcdef",s$="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sH="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",sW={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},sG=!0,sU="[DecimalError] ",sq=sU+"Invalid argument: ",sY=sU+"Precision limit exceeded",sX=sU+"crypto unavailable",sZ="[object Decimal]",sK=Math.floor,sQ=Math.pow,sJ=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,s0=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,s1=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,s2=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,s5=s$.length-1,s4=sH.length-1,s3={toStringTag:sZ};function s6(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=ls(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=ls(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function s8(e,t,n){if(e!==~~e||e<t||e>n)throw Error(sq+e)}function s9(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=sQ(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==sQ(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==sQ(10,t-3)-1,a}function s7(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=sV.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}s3.absoluteValue=s3.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),lt(e)},s3.ceil=function(){return lt(new this.constructor(this),this.e+1,2)},s3.clampedTo=s3.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(sq+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},s3.comparedTo=s3.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(i=a.length)?r:i;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},s3.cosine=s3.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/lm(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=lg(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,lv(r,n)),r.precision=e,r.rounding=t,lt(2==sF||3==sF?n.neg():n,e,t,!0)):new r(1):new r(NaN)},s3.cubeRoot=s3.cbrt=function(){var e,t,n,r,i,o,a,s,l,u,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(sG=!1,(o=this.s*sQ(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new c(o.toString()):(n=s6(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=sQ(n,1/3),e=sK((e+1)/3)-(e%3==(e<0?-1:2)),(r=new c(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),a=(e=c.precision)+3;;)if(r=le((u=(l=(s=r).times(s).times(s)).plus(this)).plus(this).times(s),u.plus(l),a+2,1),s6(s.d).slice(0,a)===(n=s6(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(lt(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(lt(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return sG=!0,lt(r,e,c.rounding,t)},s3.decimalPlaces=s3.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-sK(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},s3.dividedBy=s3.div=function(e){return le(this,new this.constructor(e))},s3.dividedToIntegerBy=s3.divToInt=function(e){var t=this.constructor;return lt(le(this,new t(e),0,1,1),t.precision,t.rounding)},s3.equals=s3.eq=function(e){return 0===this.cmp(e)},s3.floor=function(){return lt(new this.constructor(this),this.e+1,3)},s3.greaterThan=s3.gt=function(e){return this.cmp(e)>0},s3.greaterThanOrEqualTo=s3.gte=function(e){var t=this.cmp(e);return 1==t||0===t},s3.hyperbolicCosine=s3.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/lm(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=lg(a,1,o.times(t),new a(1),!0);for(var l,u=e,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return lt(o,a.precision=n,a.rounding=r,!0)},s3.hyperbolicSine=s3.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=lg(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=lg(o,2,i=i.times(1/lm(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=t,o.rounding=n,lt(i,t,n,!0)},s3.hyperbolicTangent=s3.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,le(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},s3.inverseCosine=s3.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?lo(t,r,i):new t(0):new t(NaN):e.isZero()?lo(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},s3.inverseHyperbolicCosine=s3.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,sG=!1,n=n.times(n).minus(1).sqrt().plus(n),sG=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},s3.inverseHyperbolicSine=s3.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,sG=!1,n=n.times(n).plus(1).sqrt().plus(n),sG=!0,r.precision=e,r.rounding=t,n.ln())},s3.inverseHyperbolicTangent=s3.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?lt(new o(i),e,t,!0):(o.precision=n=r-i.e,i=le(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(NaN)},s3.inverseSine=s3.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=lo(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},s3.inverseTangent=s3.atan=function(){var e,t,n,r,i,o,a,s,l,u=this,c=u.constructor,d=c.precision,h=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);else if(u.abs().eq(1)&&d+4<=s4)return(a=lo(c,d+4,h).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(d+4<=s4)return(a=lo(c,d+4,h).times(.5)).s=u.s,a}for(c.precision=s=d+10,c.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(sG=!1,t=Math.ceil(s/7),r=1,l=u.times(u),a=new c(u),i=u;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),sG=!0,lt(a,c.precision=d,c.rounding=h,!0)},s3.isFinite=function(){return!!this.d},s3.isInteger=s3.isInt=function(){return!!this.d&&sK(this.e/7)>this.d.length-2},s3.isNaN=function(){return!this.s},s3.isNegative=s3.isNeg=function(){return this.s<0},s3.isPositive=s3.isPos=function(){return this.s>0},s3.isZero=function(){return!!this.d&&0===this.d[0]},s3.lessThan=s3.lt=function(e){return 0>this.cmp(e)},s3.lessThanOrEqualTo=s3.lte=function(e){return 1>this.cmp(e)},s3.logarithm=s3.log=function(e){var t,n,r,i,o,a,s,l=this.constructor,u=l.precision,c=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new l(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}if(sG=!1,s9((s=le(o=lh(this,a=u+5),t?li(l,a+10):lh(e,a),a,1)).d,r=u,c))do if(a+=10,s=le(o=lh(this,a),t?li(l,a+10):lh(e,a),a,1),!i){+s6(s.d).slice(r+1,r+15)+1==1e14&&(s=lt(s,u+1,0));break}while(s9(s.d,r+=10,c));return sG=!0,lt(s,u,c)},s3.minus=s3.sub=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:NaN):e=new p(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(u=this.d,h=e.d,s=p.precision,l=p.rounding,!u[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(this)}return sG?lt(e,s,l):e}if(n=sK(e.e/7),c=sK(this.e/7),u=u.slice(),o=c-n){for((d=o<0)?(t=u,o=-o,a=h.length):(t=h,n=c,a=u.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=u.length)<(a=h.length))&&(a=r),r=0;r<a;r++)if(u[r]!=h[r]){d=u[r]<h[r];break}o=0}for(d&&(t=u,u=h,h=t,e.s=-e.s),a=u.length,r=h.length-a;r>0;--r)u[a++]=0;for(r=h.length;r>o;){if(u[--r]<h[r]){for(i=r;i&&0===u[--i];)u[i]=1e7-1;--u[i],u[r]+=1e7}u[r]-=h[r]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=lr(u,n),sG?lt(e,s,l):e):new p(3===l?-0:0)},s3.modulo=s3.mod=function(e){var t,n=this.constructor;return(e=new n(e),this.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!this.d||this.d[0])?(sG=!1,9==n.modulo?(t=le(this,e.abs(),0,3,1),t.s*=e.s):t=le(this,e,0,n.modulo,1),t=t.times(e),sG=!0,this.minus(t)):lt(new n(this),n.precision,n.rounding):new n(NaN)},s3.naturalExponential=s3.exp=function(){return ld(this)},s3.naturalLogarithm=s3.ln=function(){return lh(this)},s3.negated=s3.neg=function(){var e=new this.constructor(this);return e.s=-e.s,lt(e)},s3.plus=s3.add=function(e){var t,n,r,i,o,a,s,l,u,c,d=this.constructor;if(e=new d(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new d(e.d||this.s===e.s?this:NaN)):e=new d(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(u=this.d,c=e.d,s=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(this)),sG?lt(e,s,l):e;if(o=sK(this.e/7),r=sK(e.e/7),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,a=c.length):(n=c,r=o,a=u.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,n=c,c=u,u=n),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/1e7|0,u[i]%=1e7;for(t&&(u.unshift(t),++r),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=lr(u,r),sG?lt(e,s,l):e},s3.precision=s3.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(sq+e);return this.d?(t=la(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},s3.round=function(){var e=this.constructor;return lt(new e(this),this.e+1,e.rounding)},s3.sine=s3.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:lg(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=lg(e,2,t=t.times(1/lm(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,lv(r,n)),r.precision=e,r.rounding=t,lt(sF>2?n.neg():n,e,t,!0)):new r(NaN)},s3.squareRoot=s3.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,l=this.s,u=this.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?this:1/0);for(sG=!1,0==(l=Math.sqrt(+this))||l==1/0?(((t=s6(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=sK((s+1)/2)-(s<0||s%2),r=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new u(l.toString()),n=(s=u.precision)+3;;)if(r=(o=r).plus(le(this,o,n+2,1)).times(.5),s6(o.d).slice(0,n)===(t=s6(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(lt(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(lt(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return sG=!0,lt(r,s,u.rounding,e)},s3.tangent=s3.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=le(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,lt(2==sF||4==sF?n.neg():n,e,t,!0)):new r(NaN)},s3.times=s3.mul=function(e){var t,n,r,i,o,a,s,l,u,c=this.constructor,d=this.d,h=(e=new c(e)).d;if(e.s*=this.s,!d||!d[0]||!h||!h[0])return new c(!e.s||d&&!d[0]&&!h||h&&!h[0]&&!d?NaN:!d||!h?e.s/0:0*e.s);for(n=sK(this.e/7)+sK(e.e/7),(l=d.length)<(u=h.length)&&(o=d,d=h,h=o,a=l,l=u,u=a),o=[],r=a=l+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+h[r]*d[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=lr(o,n),sG?lt(e,c.precision,c.rounding):e},s3.toBinary=function(e,t){return ly(this,2,e,t)},s3.toDecimalPlaces=s3.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(s8(e,0,1e9),void 0===t?t=r.rounding:s8(t,0,8),lt(n,e+n.e+1,t))},s3.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=ln(r,!0):(s8(e,0,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},s3.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=ln(this):(s8(e,0,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},s3.toFraction=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.d,f=this.constructor;if(!p)return new f(this);if(u=n=new f(1),r=l=new f(0),a=(o=(t=new f(r)).e=la(p)-this.e-1)%7,t.d[0]=sQ(10,a<0?7+a:a),null==e)e=o>0?t:u;else{if(!(s=new f(e)).isInt()||s.lt(u))throw Error(sq+s);e=s.gt(t)?o>0?t:u:s}for(sG=!1,s=new f(s6(p)),c=f.precision,f.precision=o=7*p.length*2;d=le(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=u,u=l.plus(d.times(i)),l=i,i=t,t=s.minus(d.times(i)),s=i;return i=le(e.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=this.s,h=1>le(u,r,o,1).minus(this).abs().cmp(le(l,n,o,1).minus(this).abs())?[u,r]:[l,n],f.precision=c,sG=!0,h},s3.toHexadecimal=s3.toHex=function(e,t){return ly(this,16,e,t)},s3.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:s8(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(sG=!1,n=le(n,e,0,t,1).times(e),sG=!0,lt(n)):(e.s=n.s,n=e),n},s3.toNumber=function(){return+this},s3.toOctal=function(e,t){return ly(this,8,e,t)},s3.toPower=s3.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=+(e=new l(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new l(sQ(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return lt(s,r,o);if((t=sK(e.e/7))>=e.d.length-1&&(n=u<0?-u:u)<=0x1fffffffffffff)return i=ll(l,s,n,r),e.s<0?new l(1).div(i):lt(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=sQ(+s,u))&&isFinite(n)?new l(n+"").e:sK(u*(Math.log("0."+s6(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(sG=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=ld(e.times(lh(s,r+n)),r)).d&&s9((i=lt(i,r+5,1)).d,r,o)&&(t=r+10,+s6((i=lt(ld(e.times(lh(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=lt(i,r+1,0))),i.s=a,sG=!0,l.rounding=o,lt(i,r,o))},s3.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=ln(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(s8(e,1,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},s3.toSignificantDigits=s3.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(s8(e,1,1e9),void 0===t?t=n.rounding:s8(t,0,8)),lt(new n(this),e,t)},s3.toString=function(){var e=this.constructor,t=ln(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},s3.truncated=s3.trunc=function(){return lt(new this.constructor(this),this.e+1,1)},s3.valueOf=s3.toJSON=function(){var e=this.constructor,t=ln(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var le=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var u,c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T,_,I=r.constructor,D=r.s==i.s?1:-1,O=r.d,R=i.d;if(!O||!O[0]||!R||!R[0])return new I(!r.s||!i.s||(O?R&&O[0]==R[0]:!R)?NaN:O&&0==O[0]||!R?0*D:D/0);for(l?(p=1,c=r.e-i.e):(l=1e7,p=7,c=sK(r.e/p)-sK(i.e/p)),T=R.length,M=O.length,y=(v=new I(D)).d=[],d=0;R[d]==(O[d]||0);d++);if(R[d]>(O[d]||0)&&c--,null==o?(S=o=I.precision,a=I.rounding):S=s?o+(r.e-i.e)+1:o,S<0)y.push(1),f=!0;else{if(S=S/p+2|0,d=0,1==T){for(h=0,R=R[0],S++;(d<M||h)&&S--;d++)A=h*l+(O[d]||0),y[d]=A/R|0,h=A%R|0;f=h||d<M}else{for((h=l/(R[0]+1)|0)>1&&(R=e(R,h,l),O=e(O,h,l),T=R.length,M=O.length),C=T,b=(x=O.slice(0,T)).length;b<T;)x[b++]=0;(_=R.slice()).unshift(0),k=R[0],R[1]>=l/2&&++k;do h=0,(u=t(R,x,T,b))<0?(w=x[0],T!=b&&(w=w*l+(x[1]||0)),(h=w/k|0)>1?(h>=l&&(h=l-1),m=(g=e(R,h,l)).length,b=x.length,1==(u=t(g,x,m,b))&&(h--,n(g,T<m?_:R,m,l))):(0==h&&(u=h=1),g=R.slice()),(m=g.length)<b&&g.unshift(0),n(x,g,b,l),-1==u&&(b=x.length,(u=t(R,x,T,b))<1&&(h++,n(x,T<b?_:R,b,l))),b=x.length):0===u&&(h++,x=[0]),y[d++]=h,u&&x[0]?x[b++]=O[C]||0:(x=[O[C]],b=1);while((C++<M||void 0!==x[0])&&S--);f=void 0!==x[0]}y[0]||y.shift()}if(1==p)v.e=c,sj=f;else{for(d=1,h=y[0];h>=10;h/=10)d++;v.e=d+c*p-1,lt(v,s?o+v.e+1:o,a,f)}return v}}();function lt(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(c=d[h=0])/sQ(10,i-a-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=d.length))if(r){for(;s++<=h;)d.push(0);c=l=0,i=1,o%=7,a=o-7+1}else break e;else{for(i=1,c=s=d[h];s>=10;s/=10)i++;o%=7,l=(a=o-7+i)<0?0:c/sQ(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(a<0?c:c%sQ(10,i-a-1)),u=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?c/sQ(10,i-a):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=sQ(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=sQ(10,7-o),d[h]=a>0?(c/sQ(10,i-a)%sQ(10,a)|0)*s:0),u)for(;;)if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==d[0]&&(d[0]=1));break}else{if(d[h]+=s,1e7!=d[h])break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return sG&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function ln(e,t,n){if(!e.isFinite())return lp(e);var r,i=e.e,o=s6(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+ls(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ls(-i-1)+o,n&&(r=n-a)>0&&(o+=ls(r))):i>=a?(o+=ls(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+ls(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=ls(r))),o}function lr(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function li(e,t,n){if(t>s5)throw sG=!0,n&&(e.precision=n),Error(sY);return lt(new e(s$),t,1,!0)}function lo(e,t,n){if(t>s4)throw Error(sY);return lt(new e(sH),t,n,!0)}function la(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ls(e){for(var t="";e--;)t+="0";return t}function ll(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(sG=!1;;){if(n%2&&lx((o=o.times(t)).d,a)&&(i=!0),0===(n=sK(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}lx((t=t.times(t)).d,a)}return sG=!0,o}function lu(e){return 1&e.d[e.d.length-1]}function lc(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function ld(e,t){var n,r,i,o,a,s,l,u=0,c=0,d=0,h=e.constructor,p=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(sG=!1,l=f):l=t,s=new h(.03125);e.e>-2;)e=e.times(s),d+=5;for(l+=r=Math.log(sQ(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=l;;){if(o=lt(o.times(e),l,1),n=n.times(++c),s6((s=a.plus(le(o,n,l,1))).d).slice(0,l)===s6(a.d).slice(0,l)){for(i=d;i--;)a=lt(a.times(a),l,1);if(null!=t)return h.precision=f,a;if(!(u<3&&s9(a.d,l-r,p,u)))return lt(a,h.precision=f,p,sG=!0);h.precision=l+=10,n=o=s=new h(1),c=0,u++}a=s}}function lh(e,t){var n,r,i,o,a,s,l,u,c,d,h,p=1,f=e,g=f.d,m=f.constructor,v=m.rounding,y=m.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(sG=!1,c=y):c=t,m.precision=c+=10,r=(n=s6(g)).charAt(0),!(15e14>Math.abs(o=f.e)))return u=li(m,c+2,y).times(o+""),f=lh(new m(r+"."+n.slice(1)),c-10).plus(u),m.precision=y,null==t?lt(f,y,v,sG=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=s6((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new m("0."+n),o++):f=new m(r+"."+n.slice(1)),d=f,l=a=f=le(f.minus(1),f.plus(1),c,1),h=lt(f.times(f),c,1),i=3;;){if(a=lt(a.times(h),c,1),s6((u=l.plus(le(a,new m(i),c,1))).d).slice(0,c)===s6(l.d).slice(0,c)){if(l=l.times(2),0!==o&&(l=l.plus(li(m,c+2,y).times(o+""))),l=le(l,new m(p),c,1),null!=t)return m.precision=y,l;if(!s9(l.d,c-10,v,s))return lt(l,m.precision=y,v,sG=!0);m.precision=c+=10,u=a=f=le(d.minus(1),d.plus(1),c,1),h=lt(f.times(f),c,1),i=s=1}l=u,i+=2}}function lp(e){return String(e.s*e.s/0)}function lf(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),sG&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function lg(e,t,n,r,i){var o,a,s,l,u=e.precision,c=Math.ceil(u/7);for(sG=!1,l=n.times(n),s=new e(r);;){if(a=le(s.times(l),new e(t++*t++),u,1),s=i?r.plus(a):r.minus(a),r=le(a.times(l),new e(t++*t++),u,1),void 0!==(a=s.plus(r)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return sG=!0,a.d.length=c+1,a}function lm(e,t){for(var n=e;--t;)n*=e;return n}function lv(e,t){var n,r=t.s<0,i=lo(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return sF=r?4:1,t;if((n=t.divToInt(i)).isZero())sF=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return sF=lu(n)?r?2:3:r?4:1,t;sF=lu(n)?r?1:4:r?3:2}return t.minus(i).abs()}function ly(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor,f=void 0!==n;if(f?(s8(n,1,1e9),void 0===r?r=p.rounding:s8(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(a=(c=ln(e)).indexOf("."),f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,a>=0&&(c=c.replace(".",""),(h=new p(1)).e=c.length-a,h.d=s7(ln(h),10,i),h.e=h.d.length),o=l=(d=s7(c,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=le(e,h,n,r,0,i)).d,o=e.e,u=sj),a=d[n],s=i/2,u=u||void 0!==d[n+1],u=r<4?(void 0!==a||u)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||u||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,u)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(a=0,c="";a<l;a++)c+=sV.charAt(d[a]);if(f){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)c+="0";for(l=(d=s7(c,i,t)).length;!d[l-1];--l);for(a=1,c="1.";a<l;a++)c+=sV.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}else c=f?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=lp(e);return e.s<0?"-"+c:c}function lx(e,t){if(e.length>t)return e.length=t,!0}function lb(e){return new this(e).abs()}function lw(e){return new this(e).acos()}function lS(e){return new this(e).acosh()}function lA(e,t){return new this(e).plus(t)}function lC(e){return new this(e).asin()}function lM(e){return new this(e).asinh()}function lk(e){return new this(e).atan()}function lT(e){return new this(e).atanh()}function l_(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?lo(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=lo(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(le(e,t,o,1)),t=lo(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(le(e,t,o,1)):(n=lo(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function lI(e){return new this(e).cbrt()}function lD(e){return lt(e=new this(e),e.e+1,2)}function lO(e,t,n){return new this(e).clamp(t,n)}function lR(e){if(!e||"object"!=typeof e)throw Error(sU+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=sW[n]),void 0!==(r=e[n]))if(sK(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(sq+n+": "+r);if(n="crypto",i&&(this[n]=sW[n]),void 0!==(r=e[n]))if(!0===r||!1===r||0===r||1===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(sX);else this[n]=!1;else throw Error(sq+n+": "+r);return this}function lE(e){return new this(e).cos()}function lP(e){return new this(e).cosh()}function lL(e,t){return new this(e).div(t)}function lN(e){return new this(e).exp()}function lB(e){return lt(e=new this(e),e.e+1,3)}function lz(){var e,t,n=new this(0);for(e=0,sG=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return sG=!0,new this(1/0);n=t}return sG=!0,n.sqrt()}function lj(e){return e instanceof l6||e&&e.toStringTag===sZ||!1}function lF(e){return new this(e).ln()}function lV(e,t){return new this(e).log(t)}function l$(e){return new this(e).log(2)}function lH(e){return new this(e).log(10)}function lW(){return lc(this,arguments,-1)}function lG(){return lc(this,arguments,1)}function lU(e,t){return new this(e).mod(t)}function lq(e,t){return new this(e).mul(t)}function lY(e,t){return new this(e).pow(t)}function lX(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:s8(e,1,1e9),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(sX);else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],e%=7,r&&e&&(i=sQ(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function lZ(e){return lt(e=new this(e),e.e+1,this.rounding)}function lK(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function lQ(e){return new this(e).sin()}function lJ(e){return new this(e).sinh()}function l0(e){return new this(e).sqrt()}function l1(e,t){return new this(e).sub(t)}function l2(){var e=0,t=arguments,n=new this(t[0]);for(sG=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return sG=!0,lt(n,this.precision,this.rounding)}function l5(e){return new this(e).tan()}function l4(e){return new this(e).tanh()}function l3(e){return lt(e=new this(e),e.e+1,1)}s3[Symbol.for("nodejs.util.inspect.custom")]=s3.toString,s3[Symbol.toStringTag]="Decimal";var l6=s3.constructor=function e(t){var n,r,i;function o(e){var t,n,r;if(!(this instanceof o))return new o(e);if(this.constructor=o,lj(e)){this.s=e.s,sG?!e.d||e.e>o.maxE?(this.e=NaN,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(r=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;sG?t>o.maxE?(this.e=NaN,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=NaN),this.e=NaN,this.d=null;return}return lf(this,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===n&&(e=e.slice(1)),this.s=1),s2.test(e)?lf(this,e):function(e,t){var n,r,i,o,a,s,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),s2.test(t))return lf(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(s0.test(t))n=16,t=t.toLowerCase();else if(sJ.test(t))n=2;else if(s1.test(t))n=8;else throw Error(sq+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=ll(r,new r(n),o,2*o)),o=c=(u=s7(t,n,1e7)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*e.s):(e.e=lr(u,c),e.d=u,sG=!1,a&&(e=le(e,i,4*s)),l&&(e=e.times(54>Math.abs(l)?sQ(2,l):l6.pow(2,l))),sG=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,lf(this,e.toString());throw Error(sq+e)}if(o.prototype=s3,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=lR,o.clone=e,o.isDecimal=lj,o.abs=lb,o.acos=lw,o.acosh=lS,o.add=lA,o.asin=lC,o.asinh=lM,o.atan=lk,o.atanh=lT,o.atan2=l_,o.cbrt=lI,o.ceil=lD,o.clamp=lO,o.cos=lE,o.cosh=lP,o.div=lL,o.exp=lN,o.floor=lB,o.hypot=lz,o.ln=lF,o.log=lV,o.log10=lH,o.log2=l$,o.max=lW,o.min=lG,o.mod=lU,o.mul=lq,o.pow=lY,o.random=lX,o.round=lZ,o.sign=lK,o.sin=lQ,o.sinh=lJ,o.sqrt=l0,o.sub=l1,o.sum=l2,o.tan=l5,o.tanh=l4,o.trunc=l3,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(sW);s$=new l6(s$),sH=new l6(sH);var l8={createBigNumberClass:aJ("BigNumber",["?on","config"],e=>{var{on:t,config:n}=e,r=l6.clone({precision:n.precision,modulo:l6.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0})},l9={createMatrixClass:aJ("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})},l7={MatrixDependencies:l9,createDenseMatrixClass:aJ("DenseMatrix",["Matrix"],e=>{var{Matrix:t}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ah(t))throw Error("Invalid datatype: "+t);if(af(e))"DenseMatrix"===e.type?(this._data=aU(e._data),this._size=aU(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&ap(e.data)&&ap(e.size))this._data=e.data,this._size=e.size,sl(this._data,this._size),this._datatype=t||e.datatype;else if(ap(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];ap(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=ss(this._data),sl(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+aG(e)+")");else this._data=[],this._size=[0],this._datatype=t}function r(e,t,n){if(0===t.length){for(var r=e._data;ap(r);)r=r[0];return r}return e._size=t.slice(0),e._data=sc(e._data,e._size,n),e}function i(e,t,n){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>i[a]&&(i[a]=t[a],o=!0);o&&r(e,i,n)}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return sf(this._data,aG)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return function(e,t){if(!ax(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r=t.size();if(r.length!==e._size.length)throw new so(r.length,e._size.length);for(var i=t.min(),o=t.max(),a=0,s=e._size.length;a<s;a++)su(i[a],e._size[a]),su(o[a],e._size[a]);return new n(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map(function(e){return su(e,t.length),t[e]}).valueOf():a.map(function(o){return su(o,t.length),e(t[o],n,r,i+1)}).valueOf()}(e._data,t,r.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var o,a=t.size(),s=t.isScalar();if(af(n)?(o=n.size(),n=n.valueOf()):o=ss(n),s){if(0!==o.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(a.length<e._size.length)throw new so(a.length,e._size.length,"<");if(o.length<a.length){for(var l=0,u=0;1===a[l]&&1===o[l];)l++;for(;1===a[l];)u++,l++;n=sp(n,a.length,u,o)}if(!aY(a,o))throw new so(a,o,">");i(e,t.max().map(function(e){return e+1}),r);var c=a.length;!function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach(function(e,n){su(e),t[e]=r[n[0]]}):s.forEach(function(a,s){su(a),e(t[a],n,r[s[0]],i,o+1)})}(e._data,t,n,c,0)}return e}(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);for(var t=0;t<e.length;t++)su(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];su(o,n.length),n=n[o]}return n},n.prototype.set=function(e,t,n){if(!ap(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new so(e.length,this._size.length,"<");i(this,e.map(function(e){return e+1}),n);var r,o,a,s=this._data;for(r=0,o=e.length-1;r<o;r++)su(a=e[r],s.length),s=s[a];return su(a=e[e.length-1],s.length),s[a]=t,this},n.prototype.resize=function(e,t,n){if(!ag(e))throw TypeError("Array or Matrix expected");var i=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return r(n?this.clone():this,i,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;n._data=function(e,t){var n=function(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new so(0,r,"!=");var i=sh(t=sd(t,r));if(r!==i)throw new so(i,r,"!=");try{return function(e,t){for(var n,r=e,i=t.length-1;i>0;i--){var o=t[i];n=[];for(var a=r.length/o,s=0;s<a;s++)n.push(r.slice(s*o,(s+1)*o));r=n}return r}(n,t)}catch(e){if(e instanceof so)throw new so(i,r,"!=");throw e}}(n._data,e);var r=n._size.reduce((e,t)=>e*t);return n._size=sd(e,r),n},n.prototype.clone=function(){return new n({data:aU(this._data),size:aU(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,r=function n(r,i){return ap(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),i=void 0!==this._datatype?sf(r,aG):void 0;return new n(r,i)},n.prototype.forEach=function(e){var t=this;!function n(r,i){ap(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},n.prototype[Symbol.iterator]=function*(){var e=function* e(t,n){if(ap(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}};yield*e(this._data,[])},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(r){var o=i.map(e=>[e[r]]);t.push(new n(o,e._datatype))},a=0;a<r[1];a++)o(a);return t},n.prototype.toArray=function(){return aU(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return si(this._data,e)},n.prototype.toString=function(){return si(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),o=[],a=0;a<i;a++)o[a]=this._data[a+r][a+t];return new n({data:o,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!ap(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(al(r)&&(r=r.toNumber()),!as(r)||!a2(r))throw TypeError("The parameter k must be an integer number")}else r=0;var o,a=r>0?r:0,s=r<0?-r:0,l=e[0],u=e[1],c=Math.min(l-s,u-a);if(ap(t)){if(t.length!==c)throw Error("Invalid value array length");o=function(e){return t[e]}}else if(af(t)){var d=t.size();if(1!==d.length||d[0]!==c)throw Error("Invalid matrix length");o=function(e){return t.get([e])}}else o=function(){return t};i||(i=al(o(0))?o(0).mul(0):0);var h=[];if(e.length>0){h=sc(h,e,i);for(var p=0;p<c;p++)h[p+s][p+a]=o(p)}return new n({data:h,size:[l,u]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!as(e)||!a2(e)||!as(t)||!a2(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return su(e,this._size[0]),su(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n},{isClass:!0})};let ue=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},ut=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},un=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},ur=function(){throw SyntaxError("Invalid Param")};function ui(e,t){let n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let uo={re:0,im:0},ua=function(e,t){if(null==e)uo.re=uo.im=0;else if(void 0!==t)uo.re=e,uo.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)uo.re=e.re,uo.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return us.INFINITY;uo.re=e.abs*Math.cos(e.arg),uo.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return us.INFINITY;uo.re=e.r*Math.cos(e.phi),uo.im=e.r*Math.sin(e.phi)}else 2===e.length?(uo.re=e[0],uo.im=e[1]):ur();break;case"string":uo.im=uo.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&ur();for(let e=0;e<n.length;e++){let t=n[e];" "===t||" "===t||"\n"===t||("+"===t?r++:"-"===t?i++:("i"===t||"I"===t?(r+i===0&&ur()," "===n[e+1]||isNaN(n[e+1])?uo.im+=parseFloat((i%2?"-":"")+"1"):(uo.im+=parseFloat((i%2?"-":"")+n[e+1]),e++)):((r+i===0||isNaN(t))&&ur(),"i"===n[e+1]||"I"===n[e+1]?(uo.im+=parseFloat((i%2?"-":"")+t),e++):uo.re+=parseFloat((i%2?"-":"")+t)),r=i=0))}r+i>0&&ur();break;case"number":uo.im=0,uo.re=e;break;default:ur()}return isNaN(uo.re)||isNaN(uo.im),uo};function us(e,t){if(!(this instanceof us))return new us(e,t);let n=ua(e,t);this.re=n.re,this.im=n.im}us.prototype={re:0,im:0,sign:function(){let e=un(this.re,this.im);return new us(this.re/e,this.im/e)},add:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?us.NAN:us.INFINITY:new us(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?us.NAN:us.INFINITY:new us(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;return r&&a||i&&o?us.NAN:r||i?us.INFINITY:0===n.im&&0===this.im?new us(this.re*n.re,0):new us(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;if(o&&a||r&&i)return us.NAN;if(a||r)return us.INFINITY;if(o||i)return us.ZERO;if(0===n.im)return new us(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new us((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=n.im/n.re,t=n.im*e+n.re;return new us((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=ua(e,t),r=0===this.re&&0===this.im;if(0===n.re&&0===n.im)return us.ONE;if(0===n.im){if(0===this.im&&this.re>0)return new us(Math.pow(this.re,n.re),0);else if(0===this.re)switch((n.re%4+4)%4){case 0:return new us(Math.pow(this.im,n.re),0);case 1:return new us(0,Math.pow(this.im,n.re));case 2:return new us(-Math.pow(this.im,n.re),0);case 3:return new us(0,-Math.pow(this.im,n.re))}}if(r&&n.re>0)return us.ZERO;let i=Math.atan2(this.im,this.re),o=ui(this.re,this.im),a=Math.exp(n.re*o-n.im*i),s=n.im*o+n.re*i;return new us(a*Math.cos(s),a*Math.sin(s))},sqrt:function(){let e=this.re,t=this.im;if(0===t)if(e>=0)return new us(Math.sqrt(e),0);else return new us(0,Math.sqrt(-e));let n=Math.sqrt(.5*(un(e,t)+Math.abs(e))),r=Math.abs(t)/(2*n);return e>=0?new us(n,t<0?-r:r):new us(r,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new us(e,0):new us(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e,t=this.re,n=this.im;return new us(Math.expm1(t)*Math.cos(n)+-2*(e=Math.sin(.5*n))*e,Math.exp(t)*Math.sin(n))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new us(Math.log(e),0):new us(ui(e,t),Math.atan2(t,e))},abs:function(){return un(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new us(Math.sin(e)*ue(t),Math.cos(e)*ut(t))},cos:function(){let e=this.re,t=this.im;return new us(Math.cos(e)*ue(t),-Math.sin(e)*ut(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+ue(t);return new us(Math.sin(e)/n,ut(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-ue(t);return new us(-Math.sin(e)/n,ut(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*ue(2*t)+.5*Math.cos(2*e);return new us(Math.cos(e)*ue(t)/n,Math.sin(e)*ut(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*ue(2*t)-.5*Math.cos(2*e);return new us(Math.sin(e)*ue(t)/n,-Math.cos(e)*ut(t)/n)},asin:function(){let e=this.re,t=this.im,n=new us(t*t-e*e+1,-2*e*t).sqrt(),r=new us(n.re-t,n.im+e).log();return new us(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new us(t*t-e*e+1,-2*e*t).sqrt(),r=new us(n.re-t,n.im+e).log();return new us(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new us(0,1/0);if(-1===t)return new us(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new us((1-t*t-e*e)/n,-2*e/n).log();return new us(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new us(Math.atan2(1,e),0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).atan():new us(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(0,1/0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).acos():new us(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(Math.PI/2,1/0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).asin():new us(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new us(ut(e)*Math.cos(t),ue(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new us(ue(e)*Math.cos(t),ut(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=ue(e)+Math.cos(t);return new us(ut(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=ue(e)-Math.cos(t);return new us(ut(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-ue(2*e);return new us(-2*ut(e)*Math.cos(t)/n,2*ue(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+ue(2*e);return new us(2*ue(e)*Math.cos(t)/n,-2*ut(e)*Math.sin(t)/n)},asinh:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new us(0,0);let t=Math.abs(e),n=Math.log(t+Math.sqrt(t*t+1));return new us(e<0?-n:n,0)}let n=new us(e*e-t*t+1,2*e*t).sqrt();return new us(e+n.re,t+n.im).log()},acosh:function(){let e=this.re,t=this.im;if(0===t){if(e>1)return new us(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new us(Math.log(-e+t),Math.PI)}return new us(0,Math.acos(e))}let n=new us(e-1,t).sqrt(),r=new us(e+1,t).sqrt();return new us(e+n.re*r.re-n.im*r.im,t+n.re*r.im+n.im*r.re).log()},atanh:function(){let e=this.re,t=this.im;if(0===t)return 0===e?new us(0,0):1===e?new us(1/0,0):-1===e?new us(-1/0,0):-1<e&&e<1?new us(.5*Math.log((1+e)/(1-e)),0):e>1?new us(.5*Math.log((e+1)/(e-1)),-Math.PI/2):new us(.5*Math.log(-((1+e)/(1-e))),Math.PI/2);let n=1-e,r=1+e,i=n*n+t*t;if(0===i)return new us(-1!==e?e/0:0,0!==t?t/0:0);let o=(r*n-t*t)/i,a=(t*n+r*t)/i;return new us(ui(o,a)/2,Math.atan2(a,o)/2)},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(0,Math.PI/2);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).atanh():new us(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new us(1/0,0);let t=1/e;return new us(Math.log(t+Math.sqrt(t*t+1)),0)}let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).asinh():new us(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return us.INFINITY;let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).acosh():new us(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return us.INFINITY;if(this.isInfinite())return us.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new us(e/n,-t/n)},conjugate:function(){return new us(this.re,-this.im)},neg:function(){return new us(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new us(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new us(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new us(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=ua(e,t);return Math.abs(n.re-this.re)<=us.EPSILON&&Math.abs(n.im-this.im)<=us.EPSILON},clone:function(){return new us(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<us.EPSILON&&(e=0),Math.abs(t)<us.EPSILON&&(t=0),0===t)?n+e:(0!==e?(n+=e,n+=" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},us.ZERO=new us(0,0),us.ONE=new us(1,0),us.I=new us(0,1),us.PI=new us(Math.PI,0),us.E=new us(Math.E,0),us.INFINITY=new us(1/0,1/0),us.NAN=new us(NaN,NaN),us.EPSILON=1e-15;var ul=aJ("Complex",[],()=>(us.prototype.type="Complex",us.prototype.isComplex=!0,us.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},us.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},us.prototype.format=function(e){var t=this.im,n=this.re,r=a4(this.re,e),i=a4(this.im,e),o=as(e)?e:e?e.precision:null;if(null!==o){var a=Math.pow(10,-o);Math.abs(n/t)<a&&(n=0),Math.abs(t/n)<a&&(t=0)}return 0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},us.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return us(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var n=arguments[0],r=arguments[1];if(as(n)){if(ad(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),as(r))return new us({r:n,phi:r});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},us.prototype.valueOf=us.prototype.toString,us.fromJSON=function(e){return new us(e)},us.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},us),{isClass:!0}),uu={s:1,n:0,d:1};function uc(e,t){if(isNaN(e=parseInt(e,10)))throw uv();return e*t}function ud(e,t){if(0===t)throw um();var n=Object.create(ug.prototype);n.s=e<0?-1:1;var r=uf(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function uh(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var up=function(e,t){var n,r=0,i=1,o=1,a=0,s=0,l=0,u=1,c=1,d=0,h=1,p=1,f=1;if(null==e);else if(void 0!==t){if(o=(r=e)*(i=t),r%1!=0||i%1!=0)throw uy()}else switch(typeof e){case"object":if("d"in e&&"n"in e)r=e.n,i=e.d,"s"in e&&(r*=e.s);else if(0 in e)r=e[0],1 in e&&(i=e[1]);else throw uv();o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(c=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=c);h<=1e7&&f<=1e7;){if(e===(n=(d+p)/(h+f))){h+f<=1e7?(r=d+p,i=h+f):f>h?(r=p,i=f):(r=d,i=h);break}e>n?(d+=p,h+=f):(p+=d,f+=h),h>1e7?(r=p,i=f):(r=d,i=h)}r*=c}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(null===(h=e.match(/\d+|./g)))throw uv();if("-"===h[d]?(o=-1,d++):"+"===h[d]&&d++,h.length===d+1?s=uc(h[d++],o):"."===h[d+1]||"."===h[d]?("."!==h[d]&&(a=uc(h[d++],o)),(++d+1===h.length||"("===h[d+1]&&")"===h[d+3]||"'"===h[d+1]&&"'"===h[d+3])&&(s=uc(h[d],o),u=Math.pow(10,h[d].length),d++),("("===h[d]&&")"===h[d+2]||"'"===h[d]&&"'"===h[d+2])&&(l=uc(h[d+1],o),c=Math.pow(10,h[d+1].length)-1,d+=3)):"/"===h[d+1]||":"===h[d+1]?(s=uc(h[d],o),u=uc(h[d+2],1),d+=3):"/"===h[d+3]&&" "===h[d+1]&&(a=uc(h[d],o),s=uc(h[d+2],o),u=uc(h[d+4],1),d+=5),h.length<=d){o=r=l+(i=u*c)*a+c*s;break}default:throw uv()}if(0===i)throw um();uu.s=o<0?-1:1,uu.n=Math.abs(r),uu.d=Math.abs(i)};function uf(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function ug(e,t){if(up(e,t),!(this instanceof ug))return ud(uu.s*uu.n,uu.d);e=uf(uu.d,uu.n),this.s=uu.s,this.n=uu.n/e,this.d=uu.d/e}var um=function(){return Error("Division by Zero")},uv=function(){return Error("Invalid argument")},uy=function(){return Error("Parameters must be integer")};ug.prototype={s:1,n:0,d:1,abs:function(){return ud(this.n,this.d)},neg:function(){return ud(-this.s*this.n,this.d)},add:function(e,t){return up(e,t),ud(this.s*this.n*uu.d+uu.s*this.d*uu.n,this.d*uu.d)},sub:function(e,t){return up(e,t),ud(this.s*this.n*uu.d-uu.s*this.d*uu.n,this.d*uu.d)},mul:function(e,t){return up(e,t),ud(this.s*uu.s*this.n*uu.n,this.d*uu.d)},div:function(e,t){return up(e,t),ud(this.s*uu.s*this.n*uu.d,this.d*uu.n)},clone:function(){return ud(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new ug(NaN);if(void 0===e)return ud(this.s*this.n%this.d,1);if(up(e,t),0===uu.n&&0===this.d)throw um();return ud(this.s*(uu.d*this.n)%(uu.n*this.d),uu.d*this.d)},gcd:function(e,t){return up(e,t),ud(uf(uu.n,this.n)*uf(uu.d,this.d),uu.d*this.d)},lcm:function(e,t){return(up(e,t),0===uu.n&&0===this.n)?ud(0,1):ud(uu.n*this.n,uf(uu.n,this.n)*uf(uu.d,this.d))},ceil:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,t){return up(e,t),ud(this.s*Math.round(this.n*uu.d/(this.d*uu.n))*uu.n,uu.d)},inverse:function(){return ud(this.s*this.d,this.n)},pow:function(e,t){if(up(e,t),1===uu.d)if(uu.s<0)return ud(Math.pow(this.s*this.d,uu.n),Math.pow(this.n,uu.n));else return ud(Math.pow(this.s*this.n,uu.n),Math.pow(this.d,uu.n));if(this.s<0)return null;var n=uh(this.n),r=uh(this.d),i=1,o=1;for(var a in n)if("1"!==a){if("0"===a){i=0;break}if(n[a]*=uu.n,n[a]%uu.d!=0)return null;n[a]/=uu.d,i*=Math.pow(a,n[a])}for(var a in r)if("1"!==a){if(r[a]*=uu.n,r[a]%uu.d!=0)return null;r[a]/=uu.d,o*=Math.pow(a,r[a])}return uu.s<0?ud(o,i):ud(i,o)},equals:function(e,t){return up(e,t),this.s*this.n*uu.d==uu.s*uu.n*this.d},compare:function(e,t){up(e,t);var n=this.s*this.n*uu.d-uu.s*uu.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=ud(n[r-1],1),o=r-2;o>=0;o--)i=i.inverse().add(n[o]);if(Math.abs(i.sub(t).valueOf())<e)return i.mul(this.s)}return this},divisible:function(e,t){return up(e,t),!(!(uu.n*this.d)||this.n*uu.d%(uu.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do r.push(Math.floor(t/n)),e=t%n,t=n,n=e;while(1!==t);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,n>2e3)return 0;return n}(n),i=function(e,t){for(var n=1,r=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,t,e),i=0;i<300;i++){if(n===r)return i;n=10*n%e,r=10*r%e}return 0}(n,r),o=this.s<0?"-":"";if(o+=t/n|0,t%=n,(t*=10)&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var a=r;a--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var a=e;t&&a--;)o+=t/n|0,t%=n,t*=10;return o}};var ux=aJ("Fraction",[],()=>(ug.prototype.type="Fraction",ug.prototype.isFraction=!0,ug.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ug.fromJSON=function(e){return new ug(e)},ug),{isClass:!0}),ub=n(42915);function uw(e,t){return!!e&&"object"==typeof e&&(!!aZ(uA,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function uS(e){return"object"==typeof e&&e&&e.constructor===Object}var uA={length:!0,name:!0},uC={toString:!0,valueOf:!0,toLocaleString:!0};class uM{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){var t,n,r=this.wrappedObject;if(uS(r)&&uw(r,e))return r[e];if("function"==typeof r[e]&&(t=r,n=e,!(null==t||"function"!=typeof t[n]||aZ(t,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(t))&&(aZ(uC,n)||!(n in Object.prototype)&&!(n in Function.prototype))))throw Error('Cannot access method "'+e+'" as a property');throw Error('No access to property "'+e+'"')}set(e,t){return!function(e,t,n){if(uS(e)&&uw(e,t))return e[t]=n;throw Error('No access to property "'+t+'"')}(this.wrappedObject,e,t),this}has(e){return e in this.wrappedObject}}function uk(e){return!!e&&(e instanceof Map||e instanceof uM||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var uT=function(){return uT=ub.create,ub};function u_(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function uI(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function uD(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uO={BigNumberDependencies:l8,ComplexDependencies:{createComplexClass:ul},DenseMatrixDependencies:l7,FractionDependencies:{createFractionClass:ux},createTyped:aJ("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=uT();return o.types=[{name:"number",test:as},{name:"Complex",test:au},{name:"BigNumber",test:al},{name:"Fraction",test:ac},{name:"Unit",test:ad},{name:"string",test:ah},{name:"Chain",test:aW},{name:"Array",test:ap},{name:"Matrix",test:af},{name:"DenseMatrix",test:am},{name:"SparseMatrix",test:av},{name:"Range",test:ay},{name:"Index",test:ax},{name:"boolean",test:ab},{name:"ResultSet",test:aw},{name:"Help",test:aS},{name:"function",test:aA},{name:"Date",test:aC},{name:"RegExp",test:aM},{name:"null",test:aT},{name:"undefined",test:a_},{name:"AccessorNode",test:aI},{name:"ArrayNode",test:aD},{name:"AssignmentNode",test:aO},{name:"BlockNode",test:aR},{name:"ConditionalNode",test:aE},{name:"ConstantNode",test:aP},{name:"FunctionNode",test:aN},{name:"FunctionAssignmentNode",test:aL},{name:"IndexNode",test:aB},{name:"Node",test:az},{name:"ObjectNode",test:aj},{name:"OperatorNode",test:aF},{name:"ParenthesisNode",test:aV},{name:"RangeNode",test:a$},{name:"SymbolNode",test:aH},{name:"Map",test:uk},{name:"Object",test:ak}],o.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||u_(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||uI(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||uI(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||uI(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||uD(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||u_(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||uD(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||uI(e);try{return new n(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||u_(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||uD(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],o})},uR="equalScalar",uE=aJ(uR,["typed","config"],e=>{var{typed:t,config:n}=e;return t(uR,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return st(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||function(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){var r;return r=n.epsilon,st(e.re,t.re,r)&&st(e.im,t.im,r)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw Error("Cannot compare units with different base");return this(e.value,t.value)}})});aJ(uR,["typed","config"],e=>{var{typed:t,config:n}=e;return t(uR,{"number, number":function(e,t){return st(e,t,n.epsilon)}})});var uP={typedDependencies:uO,createEqualScalar:uE},uL=aJ("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ah(t))throw Error("Invalid datatype: "+t);if(af(e)){var n,r,a;n=this,r=e,a=t,"SparseMatrix"===r.type?(n._values=r._values?aU(r._values):void 0,n._index=aU(r._index),n._ptr=aU(r._ptr),n._size=aU(r._size),n._datatype=a||r._datatype):o(n,r.valueOf(),a||r._datatype)}else if(e&&ap(e.index)&&ap(e.ptr)&&ap(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(ap(e))o(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+aG(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,l=0;if(ah(i)&&(s=t.find(n,[i,i])||n,l=t.convert(0,i)),o>0){var u=0;do{e._ptr.push(e._index.length);for(var c=0;c<o;c++){var d=r[c];if(ap(d)){if(0===u&&a<d.length&&(a=d.length),u<d.length){var h=d[u];s(h,l)||(e._values.push(h),e._index.push(c))}}else 0===u&&a<1&&(a=1),s(d,l)||(e._values.push(d),e._index.push(c))}u++}while(u<a)}e._ptr.push(e._index.length),e._size=[o,a]}function a(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function s(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function l(e,r,i,o){var a,s,l,u=o||0,c=n,d=0;ah(e._datatype)&&(c=t.find(n,[e._datatype,e._datatype])||n,d=t.convert(0,e._datatype),u=t.convert(u,e._datatype));var h=!c(u,d),p=e._size[0],f=e._size[1];if(i>f){for(s=f;s<i;s++)if(e._ptr[s]=e._values.length,h)for(a=0;a<p;a++)e._values.push(u),e._index.push(a);e._ptr[i]=e._values.length}else i<f&&(e._ptr.splice(i+1,f-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(f=i,r>p){if(h){var g=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]+g,l=e._ptr[s+1]+g;var m=0;for(a=p;a<r;a++,m++)e._values.splice(l+m,0,u),e._index.splice(l+m,0,a),g++}e._ptr[f]=e._values.length}}else if(r<p){var v=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]-v;var y=e._ptr[s],x=e._ptr[s+1]-v;for(l=y;l<x;l++)(a=e._index[l])>r-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[s]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function u(e,t,n,r,i){var o,a,s=r[0],l=r[1],u=[];for(o=0;o<s;o++)for(a=0,u[o]=[];a<l;a++)u[o][a]=0;for(a=0;a<l;a++)for(var c=n[a],d=n[a+1],h=c;h<d;h++)u[o=t[h]][a]=e?i?aU(e[h]):e[h]:1;return u}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return sf(this._values,aG)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!ax(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,r,o,a,s=t.size();if(s.length!==e._size.length)throw new so(s.length,e._size.length);var l=t.min(),u=t.max();for(n=0,r=e._size.length;n<r;n++)su(l[n],e._size[n]),su(u[n],e._size[n]);var c=e._values,d=e._index,h=e._ptr,p=t.dimension(0),f=t.dimension(1),g=[],m=[];p.forEach(function(e,t){m[e]=t[0],g[e]=!0});var v=c?[]:void 0,y=[],x=[];return f.forEach(function(e){for(x.push(y.length),o=h[e],a=h[e+1];o<a;o++)!0===g[n=d[o]]&&(y.push(m[n]),v&&v.push(c[o]))}),x.push(y.length),new i({values:v,index:y,ptr:x,size:s,datatype:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,o=t.size(),a=t.isScalar();if(af(n)?(i=n.size(),n=n.toArray()):i=ss(n),a){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(1!==o.length&&2!==o.length)throw new so(o.length,e._size.length,"<");if(i.length<o.length){for(var s=0,l=0;1===o[s]&&1===i[s];)s++;for(;1===o[s];)l++,s++;n=sp(n,o.length,l,i)}if(!aY(o,i))throw new so(o,i,">");if(1===o.length)t.dimension(0).forEach(function(t,i){su(t),e.set([t,0],n[i[0]],r)});else{var u=t.dimension(0),c=t.dimension(1);u.forEach(function(t,i){su(t),c.forEach(function(o,a){su(o),e.set([t,o],n[i[0]][a[0]],r)})})}}return e}(this,e,t,n);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];su(t,this._size[0]),su(n,this._size[1]);var r=a(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=e[0],u=e[1],c=this._size[0],d=this._size[1],h=n,p=0;ah(this._datatype)&&(h=t.find(n,[this._datatype,this._datatype])||n,p=t.convert(0,this._datatype)),(o>c-1||u>d-1)&&(l(this,Math.max(o+1,c),Math.max(u+1,d),i),c=this._size[0],d=this._size[1]),su(o,c),su(u,d);var f=a(o,this._ptr[u],this._ptr[u+1],this._index);return f<this._ptr[u+1]&&this._index[f]===o?h(r,p)?function(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}(f,u,this._values,this._index,this._ptr):this._values[f]=r:s(f,o,u,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,n){if(!ag(e))throw TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw Error("Only two dimensions matrix are supported");return r.forEach(function(e){if(!as(e)||!a2(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+si(r)+")")}),l(n?this.clone():this,r[0],r[1],t)},i.prototype.reshape=function(e,t){if(!ap(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!as(t)||!a2(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+si(e)+")")});var n=this._size[0]*this._size[1],r=(e=sd(e,n))[0]*e[1];if(n!==r)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var o=[],l=0;l<i._ptr.length;l++)for(var u=0;u<i._ptr[l+1]-i._ptr[l];u++)o.push(l);for(var c=i._values.slice(),d=i._index.slice(),h=0;h<i._index.length;h++){var p=d[h],f=o[h],g=p*i._size[1]+f;o[h]=g%e[1],d[h]=Math.floor(g/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var m=0;m<i._ptr.length;m++)i._ptr[m]=0;for(var v=0;v<c.length;v++){var y=d[v],x=o[v],b=c[v];s(a(y,i._ptr[x],i._ptr[x+1],i._index),y,x,b,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?aU(this._values):void 0,index:aU(this._index),ptr:aU(this._ptr),size:aU(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var o=this;return function(e,r,o,a,s){var l=[],u=[],c=[],d=n,h=0;ah(e._datatype)&&(d=t.find(n,[e._datatype,e._datatype])||n,h=t.convert(0,e._datatype));for(var p=function(e,t,n){e=a(e,t,n),d(e,h)||(l.push(e),u.push(t))},f=0;f<=o;f++){c.push(l.length);var g=e._ptr[f],m=e._ptr[f+1];if(s)for(var v=g;v<m;v++){var y=e._index[v];y>=0&&y<=r&&p(e._values[v],y-0,f-0)}else{for(var x={},b=g;b<m;b++)x[e._index[b]]=e._values[b];for(var w=0;w<=r;w++)p(w in x?x[w]:0,w-0,f-0)}}return c.push(l.length),new i({values:l,index:u,ptr:c,size:[r-0+1,o-0+1]})}(this,this._size[0]-1,this._size[1]-1,function(t,n,r){return e(t,[n,r],o)},r)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(t)for(var s=o;s<a;s++){var l=this._index[s];e(this._values[s],[l,i],this)}else{for(var u={},c=o;c<a;c++)u[this._index[c]]=this._values[c];for(var d=0;d<n;d++)e(d in u?u[d]:0,[d,i],this)}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},i.prototype.toArray=function(){return u(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return u(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+si(t,e)+" x "+si(n,e)+"] density: "+si(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],l=a;l<s;l++)i+="\n ("+si(this._index[l],e)+", "+si(o,e)+") ==> "+(this._values?si(this._values[l],e):"X");return i},i.prototype.toString=function(){return si(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],o=this._size[1],a=Math.min(r-n,o-t),s=[],l=[],u=[];u[0]=0;for(var c=t;c<o&&s.length<a;c++)for(var d=this._ptr[c],h=this._ptr[c+1],p=d;p<h;p++){var f=this._index[p];if(f===c-t+n){s.push(this._values[p]),l[s.length-1]=f-n;break}}return u.push(s.length),new i({values:s,index:l,ptr:u,size:[a,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,o,a,s){if(!ap(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e)||e<1)throw Error("Size values must be positive integers");return e}),o){if(al(o)&&(o=o.toNumber()),!as(o)||!a2(o))throw TypeError("The parameter k must be an integer number")}else o=0;var l,u=n,c=0;ah(s)&&(u=t.find(n,[s,s])||n,c=t.convert(0,s));var d=o>0?o:0,h=o<0?-o:0,p=e[0],f=e[1],g=Math.min(p-h,f-d);if(ap(r)){if(r.length!==g)throw Error("Invalid value array length");l=function(e){return r[e]}}else if(af(r)){var m=r.size();if(1!==m.length||m[0]!==g)throw Error("Invalid matrix length");l=function(e){return r.get([e])}}else l=function(){return r};for(var v=[],y=[],x=[],b=0;b<f;b++){x.push(v.length);var w=b-d;if(w>=0&&w<g){var S=l(w);u(S,c)||(y.push(w+h),v.push(S))}}return x.push(v.length),new i({values:v,index:y,ptr:x,size:[p,f]})},i.prototype.swapRows=function(e,t){if(!as(e)||!a2(e)||!as(t)||!a2(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return su(e,this._size[0]),su(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},i._swapRows=function(e,t,n,r,i,o){for(var s=0;s<n;s++){var l=o[s],u=o[s+1],c=a(e,l,u,i),d=a(t,l,u,i);if(c<u&&d<u&&i[c]===e&&i[d]===t){if(r){var h=r[c];r[c]=r[d],r[d]=h}continue}if(c<u&&i[c]===e&&(d>=u||i[d]!==t)){var p=r?r[c]:void 0;i.splice(d,0,t),r&&r.splice(d,0,p),i.splice(d<=c?c+1:c,1),r&&r.splice(d<=c?c+1:c,1);continue}if(d<u&&i[d]===t&&(c>=u||i[c]!==e)){var f=r?r[d]:void 0;i.splice(c,0,e),r&&r.splice(c,0,f),i.splice(c<=d?d+1:d,1),r&&r.splice(c<=d?d+1:d,1)}}},i},{isClass:!0}),uN="matrix",uB={DenseMatrixDependencies:l7,MatrixDependencies:l9,SparseMatrixDependencies:{MatrixDependencies:l9,equalScalarDependencies:uP,typedDependencies:uO,createSparseMatrixClass:uL},typedDependencies:uO,createMatrix:aJ(uN,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(uN,{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(e,t,n){if("dense"===t||"default"===t||void 0===t)return new r(e,n);if("sparse"===t)return new i(e,n);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}})},uz="zeros",uj=aJ(uz,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(uz,{"":function(){return"Array"===n.matrix?o([]):o([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return o(e,t)}return"Array"===n.matrix?o(e):o(e,"default")},Array:o,Matrix:function(e){var t=e.storage();return o(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return o(e.valueOf(),t)}});function o(e,t){var n,o=(n=!1,e.forEach(function(e,t,r){al(e)&&(n=!0,r[t]=e.toNumber())}),n)?new i(0):0;if(e.forEach(function(e){if("number"!=typeof e||!a2(e)||e<0)throw Error("Parameters in function zeros must be positive integers")}),t){var a=r(t);return e.length>0?a.resize(e,o):a}var s=[];return e.length>0?sc(s,e,o):s}}),uF=aJ("algorithm11",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=n,g=0,m=i;"string"==typeof d&&(a=d,f=t.find(n,[a,a]),g=t.convert(0,a),r=t.convert(r,a),m=t.find(i,[a,a]));for(var v=[],y=[],x=[],b=0;b<p;b++){x[b]=y.length;for(var w=u[b],S=u[b+1],A=w;A<S;A++){var C=l[A],M=o?m(r,s[A]):m(s[A],r);f(M,g)||(y.push(C),v.push(M))}}return x[p]=y.length,e.createSparseMatrix({values:v,index:y,ptr:x,size:[h,p],datatype:a})}}),uV=aJ("algorithm12",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],S=b;S<w;S++){var A=l[S];m[A]=s[S],v[A]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=o?f(r,0):f(0,r)}return new n({data:g,size:[h,p],datatype:a})}}),u$=aJ("algorithm14",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a=e._data,s=e._size,l=e._datatype,u=r;"string"==typeof l&&(o=l,n=t.convert(n,o),u=t.find(r,[o,o]));var c=s.length>0?function e(t,n,r,i,o,a,s){var l=[];if(n===r.length-1)for(var u=0;u<i;u++)l[u]=s?t(a,o[u]):t(o[u],a);else for(var c=0;c<i;c++)l[c]=e(t,n+1,r,r[n+1],o[c],a,s);return l}(u,0,s,s[0],a,n,i):[];return e.createDenseMatrix({data:c,size:aU(s),datatype:o})}});function uH(e,t){var n;if(!a2(e)||!a2(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}function uW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!a2(t)||t<0||t>15)throw Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(a6(e,t))}uH.signature="number, number";var uG="Number of decimals in function round must be an integer",uU="round",uq=aJ(uU,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:a}=e,s=uF({typed:t,equalScalar:r}),l=uV({typed:t,DenseMatrix:a}),u=u$({typed:t});return t(uU,{number:uW,"number, number":uW,"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return new o(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(uG);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);var n=t.toNumber();return e.round(n)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(uG);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return e.round(t.toNumber())},"Array | Matrix":function(e){return function e(t,n,r){return t&&"function"==typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"Array, number | BigNumber":function(e,t){return u(n(e),t,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})}),uY=aJ("algorithm01",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a,s=e._data,l=e._size,u=e._datatype,c=n._values,d=n._index,h=n._ptr,p=n._size,f=n._datatype;if(l.length!==p.length)throw new so(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var g=l[0],m=l[1],v="string"==typeof u&&u===f?u:void 0,y=v?t.find(r,[v,v]):r,x=[];for(o=0;o<g;o++)x[o]=[];var b=[],w=[];for(a=0;a<m;a++){for(var S=a+1,A=h[a],C=h[a+1],M=A;M<C;M++)b[o=d[M]]=i?y(c[M],s[o][a]):y(s[o][a],c[M]),w[o]=S;for(o=0;o<g;o++)w[o]===S?x[o][a]=b[o]:x[o][a]=s[o][a]}return e.createDenseMatrix({data:x,size:[g,m],datatype:v})}}),uX=aJ("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o,a,s,l,u,c,d=e._values,h=e._index,p=e._ptr,f=e._size,g=e._datatype,m=r._values,v=r._index,y=r._ptr,x=r._size,b=r._datatype;if(f.length!==x.length)throw new so(f.length,x.length);if(f[0]!==x[0]||f[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+x+")");var w=f[0],S=f[1],A=n,C=0,M=i;"string"==typeof g&&g===b&&(o=g,A=t.find(n,[o,o]),C=t.convert(0,o),M=t.find(i,[o,o]));var k=d&&m?[]:void 0,T=[],_=[],I=d&&m?[]:void 0,D=d&&m?[]:void 0,O=[],R=[];for(s=0;s<S;s++){_[s]=T.length;var E=s+1;for(u=p[s],c=p[s+1],l=u;l<c;l++)a=h[l],T.push(a),O[a]=E,I&&(I[a]=d[l]);for(u=y[s],c=y[s+1],l=u;l<c;l++)if(O[a=v[l]]===E){if(I){var P=M(I[a],m[l]);A(P,C)?O[a]=null:I[a]=P}}else T.push(a),R[a]=E,D&&(D[a]=m[l]);if(I&&D)for(l=_[s];l<T.length;)O[a=T[l]]===E?(k[l]=I[a],l++):R[a]===E?(k[l]=D[a],l++):T.splice(l,1)}return _[S]=T.length,e.createSparseMatrix({values:k,index:T,ptr:_,size:[w,S],datatype:o})}}),uZ=aJ("algorithm10",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],S=b;S<w;S++){var A=l[S];m[A]=s[S],v[A]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=r}return new n({data:g,size:[h,p],datatype:a})}}),uK=aJ("algorithm13",["typed"],e=>{var{typed:t}=e;return function(e,n,r){var i,o=e._data,a=e._size,s=e._datatype,l=n._data,u=n._size,c=n._datatype,d=[];if(a.length!==u.length)throw new so(a.length,u.length);for(var h=0;h<a.length;h++){if(a[h]!==u[h])throw RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");d[h]=a[h]}var p=r;"string"==typeof s&&s===c&&(i=s,p=t.find(r,[i,i]));var f=d.length>0?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var l=0;l<i;l++)s[l]=t(o[l],a[l]);else for(var u=0;u<i;u++)s[u]=e(t,n+1,r,r[n+1],o[u],a[u]);return s}(p,0,d,d[0],o,l):[];return e.createDenseMatrix({data:f,size:d,datatype:i})}}),uQ=aJ("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:o}=e,a=uY({typed:t}),s=uX({typed:t,equalScalar:r}),l=uZ({typed:t,DenseMatrix:o}),u=uK({typed:t}),c=u$({typed:t});return t("gcd",{"number, number":uH,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})});let{round:uJ}=sw({roundDependencies:{BigNumberDependencies:l8,DenseMatrixDependencies:l7,equalScalarDependencies:uP,matrixDependencies:uB,typedDependencies:uO,zerosDependencies:{BigNumberDependencies:l8,matrixDependencies:uB,typedDependencies:uO,createZeros:uj},createRound:uq}}),{gcd:u0}=sw({gcdDependencies:{BigNumberDependencies:l8,DenseMatrixDependencies:l7,equalScalarDependencies:uP,matrixDependencies:uB,typedDependencies:uO,createGcd:uQ}}),u1=10;function u2(e,t){let n=t.startMs,r=e.values,i=[];for(let e of r){for(;n<e[0];)i.push([n,null]),n+=t.stepMs;i.push([n,e[1]]),n+=t.stepMs}for(;n<=t.endMs;)i.push([n,null]),n+=t.stepMs;return i}function u5(e){let t,n,r=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(r.push(t.stepMs),void 0===n){n=t.timeRange;continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let r=t.values[e];if(void 0===r)continue;let[i]=r,o=new Date(i),a=new Date(i);if(void 0===n){n={start:o,end:a};continue}o<n.start&&(n.start=o),a>n.end&&(n.end=a)}if(void 0===n)return;let e=n.start.valueOf(),r=n.end.valueOf(),i=r-e;return{startMs:e,endMs:r,rangeMs:i,stepMs:u1}}if(void 0===n)return;if(1===r.length)t=r[0];else{let e=u0(...r);t=e<u1?u1:e}let i=n.start.valueOf(),o=n.end.valueOf();return{startMs:i,endMs:o,stepMs:t,rangeMs:o-i}}function u4(e){return/^[0-9a-fA-F]+$/.test(e)}function u3(e){return e.spec?.spec?.display?.name?e.spec.spec.display.name:e.spec?.display?.name?e.spec.display.name:e.metadata.name}function u6(e){return e.spec?.spec?.display?.name?`${e.spec.spec.display.name} (ID: ${e.metadata.name})`:e.spec?.display?.name?`${e.spec.display.name} (ID: ${e.metadata.name})`:e.metadata.name}let u8=(0,I.createContext)(void 0);function u9(e){let{children:t,timeZone:n}=e;return(0,_.jsx)(u8.Provider,{value:n,children:t})}function u7(){let e=(0,I.useContext)(u8);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>oK(t,n,e),dateFormatOptionsWithUserTimeZone:t=>oZ(t,e)}}function ce({label:e,color:t,size:n="small",onColorChange:r,onClear:i}){let[o,a]=(0,I.useState)(null),s=!!o,{thresholds:{defaultColor:l,palette:u}}=tA();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ct,{size:n,"aria-label":`change ${e} color`,isSelected:s,iconColor:t,onClick:e=>{a(e.currentTarget)},children:(0,_.jsx)(eZ,{})}),(0,_.jsx)(tx.Ay,{"data-testid":"options color picker",open:s,anchorEl:o,onClose:()=>{a(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,_.jsx)(tv,{color:t,palette:[l,...u],onChange:r,onClear:i})})]})}let ct=(0,N.A)(eY,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var cn=n(56599),cr=n(74628),ci=n(43945);function co(e,t){return"ALL"!==t&&!!t[e.id]}var ca=n(54382),cs=n(67214);function cl(e){return(0,V.Ay)("MuiListItemButton",e)}let cu=(0,F.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),cc=(0,N.A)(eS,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,B.A)(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${cu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.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,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),cd=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:d=!1,className:h,...p}=n,f=I.useContext(cs.A),g=I.useMemo(()=>({dense:s||f.dense||!1,alignItems:r,disableGutters:l}),[r,f.dense,s,l]),m=I.useRef(null);(0,ca.A)(()=>{i&&m.current&&m.current.focus()},[i]);let v={...n,alignItems:r,dense:g.dense,disableGutters:l,divider:u,selected:d},y=(e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l=(0,R.A)({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},cl,n);return{...n,...l}})(v),x=(0,Q.A)(m,t);return(0,_.jsx)(cs.A.Provider,{value:g,children:(0,_.jsx)(cc,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:(0,O.A)(y.focusVisible,c),ownerState:v,className:(0,O.A)(y.root,h),...p,classes:y,children:a})})});var ch=n(47599),cp=n(88091);function cf(e){return(0,V.Ay)("MuiListItemText",e)}let cg=(0,F.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var cm=n(73397);let cv=(0,N.A)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cg.primary}`]:t.primary},{[`& .${cg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${ch.A.root}:where(& .${cg.primary})`]:{display:"block"},[`.${ch.A.root}:where(& .${cg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),cy=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:u,secondaryTypographyProps:c,slots:d={},slotProps:h={},...p}=n,{dense:f}=I.useContext(cs.A),g=null!=s?s:r,m=u,v={...n,disableTypography:o,inset:a,primary:!!g,secondary:!!m,dense:f},y=(e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return(0,R.A)({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},cf,t)})(v),x={slots:d,slotProps:{primary:l,secondary:c,...h}},[b,w]=(0,cm.A)("root",{className:(0,O.A)(y.root,i),elementType:cv,externalForwardedProps:{...x,...p},ownerState:v,ref:t}),[S,A]=(0,cm.A)("primary",{className:y.primary,elementType:cp.A,externalForwardedProps:x,ownerState:v}),[C,M]=(0,cm.A)("secondary",{className:y.secondary,elementType:cp.A,externalForwardedProps:x,ownerState:v});return null==g||g.type===cp.A||o||(g=(0,_.jsx)(S,{variant:f?"body2":"body1",component:A?.variant?void 0:"span",...A,children:g})),null==m||m.type===cp.A||o||(m=(0,_.jsx)(C,{variant:"body2",color:"textSecondary",...M,children:m})),(0,_.jsxs)(b,{...w,children:[g,m]})}),cx=(0,I.memo)(function({color:e,sx:t,...n}){return(0,_.jsx)(cr.A,{...n,sx:iU({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),cb=(0,I.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:i,onMouseOver:o,onMouseOut:a,index:s,...l},u){let[c,d]=(0,I.useState)(n);return(0,_.jsxs)(cd,{...l,role:"listitem",sx:iU({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(t,e.id),e.onClick?.(t)},onMouseOver:t=>o?.(t,{id:e.id,index:s}),onMouseOut:t=>a?.(t,{id:e.id,index:s}),selected:i,ref:u,children:[(0,_.jsx)(cr.A,{sx:{display:"flex",alignItems:"center"},children:(0,_.jsx)(cx,{color:e.color})}),(0,_.jsx)(cy,{primary:e.label,primaryTypographyProps:{noWrap:c},onMouseOver:function(){n&&d(!1)},onMouseOut:function(){n&&d(!0)}})]})}),cw=(0,I.memo)(cb);function cS({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:o}){return(0,_.jsx)(cr.A,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,_.jsx)(cw,{item:e,index:t,isVisuallySelected:co(e,n),onMouseOver:i,onMouseOut:o,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}function cA(e){e()}function cC(e,t){return n=>e(t(n))}function cM(e){return void 0!==e}function ck(){}function cT(e,t){return t(e)}function c_(...e){return e}function cI(e){e(2)}function cD(e){return e(4)}function cO(e,t){return e(1,e=>t(0,e))}function cR(e,t){let n=e(1,e=>{n(),t(e)});return n}function cE(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function cP(e,t){return e===t}function cL(e=cP){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function cN(e){return t=>n=>{e(n)&&t(n)}}function cB(e){return t=>cC(t,e)}function cz(e){return t=>()=>{t(e)}}function cj(e,...t){let n=function(...e){return t=>e.reduceRight(cT,t)}(...t);return(t,r)=>{switch(t){case 2:cI(e);return;case 1:return e(1,n(r))}}}function cF(e,t){return n=>r=>{n(t=e(t,r))}}function cV(e){return t=>n=>{e>0?e--:t(n)}}function c$(e){let t=null,n;return r=>i=>{t=i,n||(n=setTimeout(()=>{n=void 0,r(t)},e))}}function cH(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{let s=n;n|=a,t[o]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{let a=()=>{e([o].concat(t))};n===i?a():r=a}}function cW(e){let t=e,n=cU();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function cG(e,t){var n;return n=cW(t),cO(e,n),n}function cU(){let e=[];return(t,n)=>{switch(t){case 0:e.slice().forEach(e=>{e(n)});return;case 2:e.splice(0);return;case 1:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function cq(e){var t;return t=cU(),cO(e,t),t}let cY={singleton:!0};function cX(e,t=[],n=cY){let{singleton:r}=n;return{constructor:e,dependencies:t,id:cZ(),singleton:r}}let cZ=()=>Symbol("id");function cK(...e){let t=cU(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{n[o]=e,(r|=a)===i&&t(0,n)})}),function(e,o){switch(e){case 2:return void cI(t);case 1:return r===i&&o(n),t(1,o)}}}function cQ(e,t=cP){return cj(e,cL(t))}function cJ(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(cA)}}(...e.map(e=>e(1,n)))}}}let c0=1,c1={0:"debug",3:"error",[c0]:"log",2:"warn"},c2=cX(()=>{let e=cW(3);return{log:cW((t,n,r=c0)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??cD(e))&&console[c1[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),c5=new WeakMap;function c4(e){return"self"in e?e.document.documentElement:e}function c3(e){c5.delete(c4(e))}function c6(e,t){return!function(e){let t=c4(e),n=c5.get(t);if(void 0!==n)return n;let r="rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction;return c5.set(t,r),r}(e)?t:-t}function c8(e,t,n){return c9(e,t,n).callbackRef}function c9(e,t,n){let r=D().useRef(null),i=D().useMemo(()=>"u">typeof ResizeObserver?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return{callbackRef:e=>{e&&t?(i?.observe(e),r.current=e):(r.current&&i?.unobserve(r.current),r.current=null)},ref:r}}function c7(e,t,n,r,i,o,a,s,l){return c9(D().useCallback(n=>{let l,u=function(e,t,n,r){let i=e.length;if(0===i)return null;let o=[];for(let a=0;a<i;a++){let i=e.item(a);if(void 0===i.dataset.index)continue;let s=parseInt(i.dataset.index,10),l=parseFloat(i.dataset.knownSize),u=t(i,n);if(0===u&&r("Zero-sized element, this should not happen",{child:i},3),u===l)continue;let c=o[o.length-1];0===o.length||c.size!==u||c.endIndex!==s-1?o.push({endIndex:s,size:u,startIndex:s}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",i),c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;let d=c.lastElementChild?.dataset.viewportType==="window";d&&(l=c.ownerDocument.defaultView);let h=a?s?a.scrollWidth:a.scrollHeight:d?s?l.document.documentElement.scrollWidth:l.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,p=a?s?a.offsetWidth:a.offsetHeight:d?s?l.innerWidth:l.innerHeight:s?c.offsetWidth:c.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(a?s?c6(a,a.scrollLeft):a.scrollTop:d?s?c6(l,l.scrollX||l.document.documentElement.scrollLeft):l.scrollY||l.document.documentElement.scrollTop:s?c6(c,c.scrollLeft):c.scrollTop,0),viewportHeight:p}),o?.(s?de("column-gap",getComputedStyle(n).columnGap,i):de("row-gap",getComputedStyle(n).rowGap,i)),null!==u&&e(u)},[e,t,i,o,a,r,s]),n,l)}function de(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function dt(e,t,n){let r=D().useRef(null),i=D().useCallback(n=>{let i,o;if(!n?.offsetParent)return;let s=n.getBoundingClientRect(),l=s.width;if(t){let e=t.getBoundingClientRect(),n=s.top-e.top;o=e.height-Math.max(0,n),i=n+t.scrollTop}else{let e=a.current.ownerDocument.defaultView;o=e.innerHeight-Math.max(0,s.top),i=s.top+e.scrollY}r.current={listHeight:s.height,offsetTop:i,visibleHeight:o,visibleWidth:l},e(r.current)},[e,t]),{callbackRef:o,ref:a}=c9(i,!0,n),s=D().useCallback(()=>{i(a.current)},[i,a]);return D().useEffect(()=>{if(t){t.addEventListener("scroll",s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}let e=a.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,a]),o}let dn=cX(()=>{let e=cU(),t=cU(),n=cW(0),r=cU(),i=cW(0),o=cU(),a=cU(),s=cW(0),l=cW(0),u=cW(0),c=cW(0),d=cU(),h=cU(),p=cW(!1),f=cW(!1),g=cW(!1);return cO(cj(e,cB(({scrollTop:e})=>e)),t),cO(cj(e,cB(({scrollHeight:e})=>e)),a),cO(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),dr={lvl:0};function di(e,t){let n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]),o=[];for(let a=1;a<n;a++){let{index:n,value:s}=t(e[a]);o.push({end:n-1,start:r,value:i}),r=n,i=s}return o.push({end:1/0,start:r,value:i}),o}function da(e){return e===dr}function ds(e,t){if(!da(e))return t===e.k?e.v:t<e.k?ds(e.l,t):ds(e.r,t)}function dl(e,t,n="k"){if(da(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=dl(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return dl(e.l,t,n)}function du(e,t,n){return da(e)?dg(t,n,1):t===e.k?dp(e,{k:t,v:n}):t<e.k?dv(dm(dp(e,{l:du(e.l,t,n)}))):dv(dm(dp(e,{r:du(e.r,t,n)})))}function dc(e,t,n){if(da(e))return[];let r=dl(e,t)[0];return di(function e(t,n,r){if(da(t))return[];let{k:i,l:o,r:a,v:s}=t,l=[];return i>n&&(l=l.concat(e(o,n,r))),i>=n&&i<=r&&l.push({k:i,v:s}),i<=r&&(l=l.concat(e(a,n,r))),l}(e,r,n),({k:e,v:t})=>({index:e,value:t}))}function dd(e){return da(e)?[]:[...dd(e.l),{k:e.k,v:e.v},...dd(e.r)]}function dh(e){let{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(df(t))return dm(dp(e,{lvl:n-1}));if(!da(t)&&!da(t.r))return dp(t.r,{l:dp(t,{r:t.r.l}),lvl:n,r:dp(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(df(e))return dv(dp(e,{lvl:n-1}));if(!da(r)&&!da(r.l)){let t=r.l,i=df(t)?r.lvl-1:r.lvl;return dp(t,{l:dp(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:dv(dp(r,{l:t.r,lvl:i}))})}throw Error("Unexpected empty nodes")}function dp(e,t){return dg(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function df(e){return da(e)||e.lvl>e.r.lvl}function dg(e,t,n,r=dr,i=dr){return{k:e,l:r,lvl:n,r:i,v:t}}function dm(e){let{l:t}=e;return da(t)||t.lvl!==e.lvl?e:dp(t,{r:dp(e,{l:t.r})})}function dv(e){let{lvl:t,r:n}=e;return da(n)||da(n.r)||n.lvl!==t||n.r.lvl!==t?e:dp(n,{l:dp(e,{r:n.l}),lvl:t+1})}function dy(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function dx(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let db=cX(()=>({recalcInProgress:cW(!1)}),[],{singleton:!0});function dw(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function dS(e,t){return Math.round(e.getBoundingClientRect()[t])}function dA(e){return!da(e.groupOffsetTree)}function dC({index:e},t){return t===e?0:t<e?-1:1}function dM({offset:e},t){return t===e?0:t<e?-1:1}function dk(e,t,n){if(0===t.length)return 0;let{index:r,offset:i,size:o}=t[dw(t,e,dC)],a=e-r,s=o*a+(a-1)*n+i;return s>0?s+n:s}function dT(e,t){if(!dA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function d_(e,t,n){if(void 0!==e.groupIndex)return t.groupIndices[e.groupIndex]+1;let r=dT("LAST"===e.index?n:e.index,t);return Math.max(0,Math.min(n,r))}function dI(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,0);let o=e.sizeTree,a=o,s=0;if(n.length>0&&da(o)&&2===t.length){let e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>du(du(t,n,e),n+1,r),a)}else[a,s]=function(e,t){let n=da(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),da(e)){e=du(e,0,i);continue}let a=dc(e,o-1,t+1);if(a.some(function(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}(r)))continue;let s=!1,l=!1;for(let{end:n,start:r,value:o}of a)s?(t>=r||i===o)&&(e=function e(t,n){if(da(t))return dr;let{k:r,l:i,r:o}=t;if(n===r){if(da(i))return o;if(da(o))return i;let[e,n]=function e(t){return da(t.r)?[t.k,t.v]:e(t.r)}(i);return dh(dp(t,{k:e,l:function e(t){return da(t.r)?t.l:dh(dp(t,{r:e(t.r)}))}(i),v:n}))}return n<r?dh(dp(t,{l:e(i,n)})):dh(dp(t,{r:e(o,n)}))}(e,r)):(l=o!==i,s=!0),n>t&&t>=r&&o!==i&&(e=du(e,t+1,o));l&&(e=du(e,o,i))}return[e,n]}(a,t);if(a===o)return e;let{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=dO(e.offsetTree,s,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>du(e,t,dk(t,d,i)),dr),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function dD(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n!==e)}function dO(e,t,n,r){let i=e,o=0,a=0,s=0,l=0;if(0===t)i=[];else{l=dw(i,t-1,dC),s=i[l].offset;let e=dl(n,t-1);o=e[0],a=e[1],i.length&&i[l].size===dl(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}for(let{start:e,value:l}of dc(n,t,1/0)){let t=e-o,n=t*a+s+t*r;i.push({index:e,offset:n,size:l}),o=e,s=n,a=l}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function dR(e){return{index:e.index,value:e}}let dE={offsetHeight:"height",offsetWidth:"width"},dP=cX(([{log:e},{recalcInProgress:t}])=>{let n=cU(),r=cU(),i=cG(r,0),o=cU(),a=cU(),s=cW(0),l=cW([]),u=cW(void 0),c=cW(void 0),d=cW(void 0),h=cW(void 0),p=cW((e,t)=>dS(e,dE[t])),f=cW(void 0),g=cW(0),m={groupIndices:[],groupOffsetTree:dr,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:dr},v=cG(cj(n,cH(l,e,g),cF(dI,m),cL()),m),y=cG(cj(l,cL(),cF((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),cB(({prev:e})=>e)),[]);cO(cj(l,cN(e=>e.length>0),cH(v,g),cB(([e,t,n])=>{let r=e.reduce((e,r,i)=>du(e,r,dk(r,t.offsetTree,n)||i),dr);return{...t,groupIndices:e,groupOffsetTree:r}})),v),cO(cj(r,cH(v),cN(([e,{lastIndex:t}])=>e<t),cB(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),cO(u,c);let x=cG(cj(u,cB(e=>void 0===e)),!0);cO(cj(c,cN(e=>void 0!==e&&da(cD(v).sizeTree)),cB(e=>{let t=cD(d),n=cD(l).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),cO(cj(h,cN(e=>void 0!==e&&e.length>0&&da(cD(v).sizeTree)),cB(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),cO(cj(l,cH(d,c),cN(([,e,t])=>void 0!==e&&void 0!==t),cB(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==a&&r.push({startIndex:o+1,endIndex:a-1,size:n})}return r})),n);let b=cq(cj(n,cH(v),cF(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),cB(e=>e.changed)));cj(s,cF((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),cB(e=>e.diff))(1,e=>{let{groupIndices:n}=cD(v);if(e>0)t(0,!0),o(0,e+dD(e,n));else if(e<0){let t=cD(y);t.length>0&&(e-=dD(-e,t)),a(0,e)}}),cj(s,cH(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},3)});let w=cq(o);cO(cj(o,cH(v),cB(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=ds(t.sizeTree,0),o=0,a=0;for(;o<e;){let e=t.groupIndices[a],s=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),a++,o+=s+1}let s=dd(t.sizeTree);return o!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return dd(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=cq(cj(a,cH(v,g),cB(([e,{offsetTree:t},n])=>dk(-e,t,n))));return cO(cj(a,cH(v,g),cB(([e,t,n])=>{if(t.groupIndices.length>0){if(da(t.sizeTree))return t;let r=dr,i=cD(y),o=0,a=0,s=0;for(;o<-e;){s=i[a];let e=i[a+1]-s-1;a++,o+=e+1}return r=dd(t.sizeTree).reduce((t,{k:n,v:r})=>du(t,Math.max(0,n+e),r),r),o!==-e&&(r=du(r,0,ds(t.sizeTree,s)),r=du(r,1,dl(t.sizeTree,-e+1)[1])),{...t,sizeTree:r,...dO(t.offsetTree,0,r,n)}}let r=dd(t.sizeTree).reduce((t,{k:n,v:r})=>du(t,Math.max(0,n+e),r),dr);return{...t,sizeTree:r,...dO(t.offsetTree,0,r,n)}})),v),{beforeUnshiftWith:w,data:f,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:b,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:v,statefulTotalCount:i,totalCount:r,trackItemSizes:x,unshiftWith:o}},c_(c2,db),{singleton:!0});function dL(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let dN=cX(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let o=cU(),a=cU(),s=cq(cj(o,cB(dL)));return cO(cj(s,cB(e=>e.totalCount)),n),cO(cj(s,cB(e=>e.groupIndices)),e),cO(cj(cK(i,t,r),cN(([e,t])=>dA(t)),cB(([e,t,n])=>dl(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),cL(),cB(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},c_(dP,dn)),dB=cX(([{log:e}])=>{let t=cW(!1),n=cq(cj(t,cN(e=>e),cL()));return t(1,t=>{t&&cD(e)("props updated",{},0)}),{didMount:n,propsReady:t}},c_(c2),{singleton:!0}),dz="u">typeof document&&"scrollBehavior"in document.documentElement.style;function dj(e){let t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),t.behavior&&dz||(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}let dF=cX(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{let p=cU(),f=cU(),g=cW(0),m=null,v=null,y=null;function x(){null!==m&&(m(),m=null),null!==y&&(y(),y=null),v&&(clearTimeout(v),v=null),l(0,!1)}return cO(cj(p,cH(n,d,r,g,s,a,h),cH(e,o,i),cB(([[e,n,r,i,o,a,s,u],d,h,g])=>{let b=dj(e),{align:w,behavior:S,offset:A}=b,C=i-1,M=d_(b,n,C),k=dk(M,n.offsetTree,d)+a;"end"===w?(k+=h+dl(n.sizeTree,M)[1]-r+g,M===C&&(k+=s)):"center"===w?k+=(h+dl(n.sizeTree,M)[1]-r+g)/2:k-=o,void 0!==A&&0!==A&&(k+=A);let T=t=>{x(),t?(u("retrying to scroll to",{location:e},0),p(0,e)):(f(0,!0),u("list did not change, scroll successful",{},0))};if(x(),"smooth"===S){let e=!1;y=t(1,t=>{e=e||t}),m=cR(c,()=>{T(e)})}else m=cR(cj(t,e=>{let t=setTimeout(()=>{e(!1)},150);return n=>{n&&(e(!0),clearTimeout(t))}}),T);return v=setTimeout(()=>{x()},1200),l(0,!0),u("scrolling from index to",{behavior:S,index:M,top:k},0),{behavior:S,top:k}})),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:g}},c_(dP,dn,c2),{singleton:!0});function dV(e,t){0===e?t():requestAnimationFrame(()=>{dV(e-1,t)})}function d$(e,t){if(void 0===e)return 0;let n=t-1;return Math.max(0,Math.min("number"==typeof e?e:"LAST"===e.index?n:e.index,n))}function dH(e){return void 0===e||("number"==typeof e?0===e:0===e.index&&(void 0===e.align||"start"===e.align)&&(void 0===e.offset||0===e.offset))}let dW=cX(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{let s=cW(!0),l=cW(0),u=cW(!0);return cO(cj(a,cH(l),cN(([e,t])=>!dH(t)),cz(!1)),s),cO(cj(a,cH(l),cN(([e,t])=>!dH(t)),cz(!1)),u),cj(cK(t,a),cH(s,n,e,u),cN(([[,e],t,{sizeTree:n},r,i])=>e&&(!da(n)||cM(r))&&!t&&!i),cH(l))(1,([,e])=>{if(void 0===e){s(0,!0),u(0,!0);return}cR(i,()=>{u(0,!0)}),dV(4,()=>{cR(r,()=>{s(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},c_(dP,dn,dF,dB),{singleton:!0});function dG(e,t){return 1.01>Math.abs(e-t)}let dU="down",dq={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dY=cX(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{let a=cW(!1),s=cW(!0),l=cU(),u=cU(),c=cW(4),d=cW(0),h=cG(cj(cJ(cj(cQ(i),cV(1),cz(!0)),cj(cQ(i),cV(1),cz(!1),cE(100))),cL()),!1),p=cG(cj(cJ(cj(n,cz(!0)),cj(n,cz(!1),cE(200))),cL()),!1);cO(cj(cK(cQ(i),cQ(d)),cB(([e,t])=>e<=t),cL()),s),cO(cj(s,c$(50)),u);let f=cq(cj(cK(r,cQ(o),cQ(t),cQ(e),cQ(c)),cF((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{let s={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:s}}return{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},dq),cL((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),g=cG(cj(r,cF((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!dG(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),cN(e=>e.changed),cB(e=>e.jump)),0);cO(cj(f,cB(e=>e.atBottom)),a),cO(cj(a,c$(50)),l);let m=cW(dU);cO(cj(r,cB(({scrollTop:e})=>e),cL(),cF((e,t)=>cD(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":dU,prevScrollTop:t},{direction:dU,prevScrollTop:0}),cB(e=>e.direction)),m),cO(cj(r,c$(50),cz("none")),m);let v=cW(0);return cO(cj(h,cN(e=>!e),cz(0)),v),cO(cj(i,c$(100),cH(h),cN(([e,t])=>t),cF(([e,t],[n])=>[t,n],[0,0]),cB(([e,t])=>t-e)),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},c_(dn)),dX="bottom",dZ="none";function dK(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===dU&&t===dX?e:0:"up"===n?"top"===t?e.main:e.reverse:t===dX?e.main:e.reverse}function dQ(e,t){return"number"==typeof e?e:e[t]??0}let dJ=cX(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let o=cU(),a=cW(0),s=cW(0),l=cW(0),u=cG(cj(cK(cQ(r),cQ(i),cQ(n),cQ(o,dx),cQ(l),cQ(a),cQ(t),cQ(e),cQ(s)),cB(([e,t,n,[r,i],o,a,s,l,u])=>{let c=e-l,d=Math.max(n-c,0),h=dZ,p=dQ(u,"top"),f=dQ(u,dX);return r-=l,r+=n+s,i+=n+s,r>e+(a+s)-p&&(h="up"),(i-=l)<e-d+t+f&&(h=dU),h!==dZ?[Math.max(c-n-dK(o,"top",h)-p,0),c-d-s+t+dK(o,dX,h)+f]:null}),cN(e=>null!==e),cL(dx)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:u}},c_(dn),{singleton:!0}),d0={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function d1(e,t,n,r,i,o){let{lastIndex:a,lastOffset:s,lastSize:l}=i,u=0,c=0;if(e.length>0){u=e[0].offset;let t=e[e.length-1];c=t.offset+t.size}let d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:o,items:d5(e,i,o),offsetBottom:p,offsetTop:u,top:h,topItems:d5(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function d2(e,t,n,r,i,o){let a=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-a>=e)break;a++}let s=e+a,l=d$(t,s);return d1(Array.from({length:s}).map((e,t)=>({data:o[t+l],index:t+l,offset:0,size:0})),[],s,i,n,r)}function d5(e,t,n){if(0===e.length)return[];if(!dA(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,o=[],a=dc(t.groupOffsetTree,r,i),s,l=0;for(let r of e){let e;(!s||s.end<r.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),e=r.index===s.start?{index:l,type:"group"}:{groupIndex:l,index:r.index-(l+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function d4(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}let d3=cX(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:d},h,{didMount:p},{recalcInProgress:f}])=>{let g=cW([]),m=cW(0),v=cU(),y=cW(0);cO(o.topItemsIndexes,g);let x=cG(cj(cK(p,f,cQ(l,dx),cQ(i),cQ(r),cQ(u),c,cQ(g),cQ(t),cQ(n),cQ(y),e),cN(([e,t,,n,,,,,,,,r])=>{let i=void 0!==r&&r.length!==n;return e&&!t&&!i}),cB(([,,[e,t],n,r,i,o,a,s,l,u,c])=>{var d;let{offsetTree:h,sizeTree:p}=r,f=cD(m);if(0===n)return{...d0,totalCount:n};if(0===e&&0===t)return 0===f?{...d0,totalCount:n}:d2(f,i,r,s,l,c||[]);if(da(p))return f>0?null:d1(function(e,t,n){if(dA(t)){let r=dT(e,t);return[{index:dl(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(d$(i,n),r,c),[],n,l,r,s);let g=[];if(a.length>0){let e=a[0],t=a[a.length-1],n=0;for(let r of dc(p,e,t)){let i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)g.push({data:c?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return d1([],g,n,l,r,s);let v=a.length>0?a[a.length-1]+1:0,y=function(e,t,n,r=0){let i,o;return r>0&&(t=Math.max(t,e[dw(e,r,dC)].offset)),di((i=dw(e,t,dM),o=dw(e,n,dM,i),e.slice(i,o+1)),dR)}(h,e,t,v);if(0===y.length)return null;let x=n-1,b=((n=>{for(let r of y){let i=r.value,o=i.offset,a=r.start,s=i.size;if(i.offset<e){let t=(a+=Math.floor((e-i.offset+l)/(s+l)))-r.start;o+=t*s+t*l}a<v&&(o+=(v-a)*s,a=v);let u=Math.min(r.end,x);for(let e=a;e<=u&&!(o>=t);e++)n.push({data:c?.[e],index:e,offset:o,size:s}),o+=s+l}})(d=[]),d),w=d4(u,"top"),S=d4(u,dX);if(b.length>0&&(w>0||S>0)){let e=b[0],t=b[b.length-1];if(w>0&&e.index>v){let t=Math.min(w,e.index-v),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=dc(p,i,i)[0]?.value??e.size;r-=t+l,n.unshift({data:c?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<x){let e=Math.min(S,x-t.index),n=t.offset+t.size+l;for(let r=t.index+1;r<=t.index+e;r++){let e=dc(p,r,r)[0]?.value??t.size;b.push({data:c?.[r],index:r,offset:n,size:e}),n+=e+l}}}return d1(b,g,n,l,r,s)}),cN(e=>null!==e),cL()),d0);cO(cj(e,cN(cM),cB(e=>e?.length)),i),cO(cj(x,cB(e=>e.topListHeight)),d),cO(d,s),cO(cj(x,cB(e=>[e.top,e.bottom])),a),cO(cj(x,cB(e=>e.items)),v);let b=cq(cj(x,cN(({items:e})=>e.length>0),cH(i,e),cN(([{items:e},t])=>e[e.length-1].originalIndex===t-1),cB(([,e,t])=>[e-1,t]),cL(dx),cB(([e])=>e))),w=cq(cj(x,c$(200),cN(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),cB(({items:e})=>e[0].index),cL())),S=cq(cj(x,cN(({items:e})=>e.length>0),cB(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),cL(dy)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:y,rangeChanged:S,startReached:w,topItemsIndexes:g,...h}},c_(dP,dN,dJ,dW,dF,dY,dB,db),{singleton:!0}),d6=cX(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let o=cU(),a=cG(cj(cK(n,e,r,t,i),cB(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return cO(cQ(a),o),{totalListHeight:a,totalListHeightChanged:o}},c_(dn,d3),{singleton:!0}),d8=cX(([{viewportHeight:e},{totalListHeight:t}])=>{let n=cW(!1),r=cG(cj(cK(n,e,t),cN(([e])=>e),cB(([,e,t])=>Math.max(0,e-t)),c$(0),cL()),0);return{alignToBottom:n,paddingTopAddition:r}},c_(dn,d6),{singleton:!0}),d9=cX(()=>({context:cW(null)})),d7=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>o?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,he=cX(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{let c=cU();return cO(cj(c,cH(t,l,n,o,i,r,s),cH(e),cB(([[e,t,n,r,i,o,s,l],u])=>{let{calculateViewLocation:c=d7,done:d,...h}=e,p=d_(e,t,r-1),f=dk(p,t.offsetTree,u)+i+o,g=c({itemBottom:f+dl(t.sizeTree,p)[1],itemTop:f,locationParams:h,viewportBottom:l+n-s,viewportTop:l+o});return null===g?d?.():d&&cR(cj(a,cN(e=>!e),cV(cD(a)?1:2)),d),g}),cN(e=>null!==e)),u),{scrollIntoView:c}},c_(dP,dn,dF,d3,c2),{singleton:!0});function ht(e){return!1!==e&&("smooth"===e?"smooth":"auto")}let hn=cX(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{let f=cW(!1),g=cU(),m=null;function v(e){a(0,{align:"end",behavior:e,index:"LAST"})}function y(e){setTimeout(cR(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(cD(c)("scrolling to bottom due to increased size",{},0),v("auto"))}),100)}cj(cK(cj(cQ(t),cV(1)),l),cH(cQ(f),o,s,d),cB(([[e,t],n,r,i,o])=>{let a,s=t&&i,l="auto";return s&&(a=r||o,l="function"==typeof n?ht(n(a)):a&&ht(n),s=s&&!1!==l),{followOutputBehavior:l,shouldFollow:s,totalCount:e}}),cN(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0===cD(n)?m=cR(e,()=>{cD(c)("following output to ",{totalCount:r},0),v(t),m=null}):requestAnimationFrame(()=>{cD(c)("following output to ",{totalCount:r},0),v(t)})}),cj(cK(cQ(f),t,u),cN(([e,,t])=>!1!==e&&t),cF(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),cN(({refreshed:e})=>e),cH(f,t))(1,([,e])=>{cD(s)&&y(!1!==e)}),g(1,()=>{y(!1!==cD(f))}),cK(cQ(f),i)(1,([e,t])=>{!1===e||t.atBottom||"VIEWPORT_HEIGHT_DECREASING"!==t.notAtBottomBecause||v("auto")});let x=cW(null),b=cU();return cO(cJ(cj(cQ(r),cB(e=>e?.length??0)),cj(cQ(t))),b),cj(cK(cj(b,cV(1)),l),cH(cQ(x),s,d,h),cB(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),cN(e=>!!e),c$(0))(1,t=>{null!==m&&(m(),m=null),void 0===cD(n)?m=cR(e,()=>{cD(c)("scrolling into view",{}),p(0,t),m=null}):requestAnimationFrame(()=>{cD(c)("scrolling into view",{}),p(0,t)})}),{autoscrollToBottom:g,followOutput:f,scrollIntoViewOnChange:x}},c_(dP,dY,dF,dW,dB,c2,dn,d9,he)),hr=cX(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(cO(cj(s,cH(o),cN(([,e])=>0!==e),cH(i,r,t,n,e),cB(([[,e],t,n,r,i,o=[]])=>d2(e,t,n,r,i,o))),a),{}),c_(dP,dW,d3,dB),{singleton:!0}),hi=cX(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=cW(0);return cj(e,cH(r),cN(([,e])=>0!==e),cB(([,e])=>({top:e})))(1,e=>{cR(cj(n,cV(1),cN(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:r}},c_(dB,dn,d3),{singleton:!0}),ho=cX(([{scrollVelocity:e}])=>{let t=cW(!1),n=cU(),r=cW(!1);return cO(cj(e,cH(r,t,n),cN(([e,t])=>!1!==t&&void 0!==t),cB(([e,t,n,r])=>{let{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),cL()),t),cj(cK(t,e,n),cH(r))(1,([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},c_(dY),{singleton:!0}),ha=cX(([{scrollContainerState:e,scrollTo:t}])=>{let n=cU(),r=cU(),i=cU(),o=cW(!1),a=cW(void 0);return cO(cj(cK(n,r),cB(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),cO(cj(t,cH(r),cB(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},c_(dn)),hs=cX(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{let u=cU(),c=cW(void 0),d=cW(null),h=cW(null);return cO(s,d),cO(l,h),cj(u,cH(t,r,a,d,h,n))(1,([e,t,n,r,i,o,a])=>{let s=dd(t.sizeTree).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}});r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:s,scrollTop:n-=a})}),cO(cj(c,cN(cM),cB(hl)),i),cO(cj(o,cH(c),cN(([,e])=>void 0!==e),cL(),cB(([,e])=>e.ranges)),e),{getState:u,restoreStateFrom:c}},c_(dP,dn,dW,dB,ha));function hl(e){return{align:"start",index:0,offset:e.scrollTop}}let hu=cX(([{topItemsIndexes:e}])=>{let t=cW(0);return cO(cj(t,cN(e=>e>=0),cB(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},c_(d3));function hc(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let hd=hc(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),hh=cX(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{let g=cq(cj(l,cH(a),cF(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},s])=>{let l=r+o,u=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||0!=(u=l-n)&&(u+=s)),[u,i,a,l]},[0,[],0,0]),cN(([e])=>0!==e),cH(r,s,n,i,p,f),cN(([,e,t,n,,,r])=>!r&&!n&&0!==e&&"up"===t),cB(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},0),e))));function m(n){n>0?(t(0,{behavior:"auto",top:-n}),e(0,0)):(e(0,0),t(0,{behavior:"auto",top:-n}))}return cj(g,cH(e,o))(1,([t,n,r])=>{r&&hd()?e(0,n-t):m(-t)}),cj(cK(cG(o,!1),e,f),cN(([e,t,n])=>!e&&!n&&0!==t),cB(([e,t])=>t),c$(1))(1,m),cO(cj(d,cB(e=>({top:-e}))),t),cj(u,cH(h,c),cB(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{if(0===t.length)return e*(n+i);let o=0,a=ds(r,0),s=0,l=0;for(;s<e;){s++,o+=a;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;s+r>e&&(o-=a,r=e-s+1),s+=r,o+=r*(n+i),l++}return o}))(1,n=>{e(0,n),requestAnimationFrame(()=>{t(0,{top:n}),requestAnimationFrame(()=>{e(0,0),f(0,!1)})})}),{deviation:e}},c_(dn,dY,d3,dP,c2,db)),hp=cX(([e,t,n,r,i,o,a,s,l,u,c])=>({...e,...t,...n,...r,...i,...o,...a,...s,...l,...u,...c}),c_(dJ,hr,dB,ho,d6,hi,d8,ha,he,c2,d9)),hf=cX(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:d,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m},v,y,x,b,{scrollToIndex:w},S,{topItemCount:A},{groupCounts:C},M])=>{let{listState:k,minOverscanItemCount:T,topItemsIndexes:_,rangeChanged:I,...D}=b;return cO(I,M.scrollSeekRangeChanged),cO(cj(M.windowViewportRect,cB(e=>e.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:C,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m,sizeRanges:u,topItemCount:A,topItemsIndexes:_,totalCount:h,...x,groupIndices:a,itemSize:l,listState:k,minOverscanItemCount:T,scrollToIndex:w,statefulTotalCount:d,trackItemSizes:p,rangeChanged:I,...D,...M,...v,sizes:c,...y}},c_(dP,dW,dn,hs,hn,d3,dF,hh,hu,dN,hp)),hg=typeof document>"u"?D().useEffect:D().useLayoutEffect;function hm(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=D().createContext({});function l(e,n){for(let i of(void 0!==e.propsReady&&(0,e.propsReady)(0,!1),r))(0,e[t.required[i]])(0,n[i]);for(let r of i)r in n&&(0,e[t.optional[r]])(0,n[r]);void 0!==e.propsReady&&(0,e.propsReady)(0,!0)}function u(e){return a.reduce((n,r)=>{var i;let o,a,s;return n[r]=(i=e[t.events[r]],s=()=>o?.(),function(e,t){switch(e){case 1:return t?a===t?void 0:(s(),a=t,o=i(1,t)):(s(),ck);case 2:s(),a=null;return}}),n},{})}return{Component:D().forwardRef(function(c,d){var h;let{children:p,...f}=c,[g]=D().useState(()=>{var t;let n,r;return n=new Map,l(t=(r=({constructor:e,dependencies:t,id:i,singleton:o})=>{if(o&&n.has(i))return n.get(i);let a=e(t.map(e=>r(e)));return o&&n.set(i,a),a})(e),f),t}),[m]=D().useState(()=>u(g));return hg(()=>{for(let e of a)e in f&&(0,m[e])(1,f[e]);return()=>{Object.values(m).map(cI)}},[f,m,g]),hg(()=>{l(g,f)}),D().useImperativeHandle(d,(h=o.reduce((e,n)=>(e[n]=e=>{(0,g[t.methods[n]])(0,e)},e),{}),()=>h)),(0,_.jsx)(s.Provider,{value:g,children:void 0===n?p:(0,_.jsx)(n,{...function(e,t){let n={},r={},i=0,o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}([...r,...i,...a],f),children:p})})}),useEmitter:(e,t)=>{let n=D().useContext(s)[e];hg(()=>n(1,t),[t,n])},useEmitterValue:parseInt(D().version,10)>=18?e=>{let t=D().useContext(s)[e],n=D().useCallback(e=>t(1,e),[t]);return D().useSyncExternalStore(n,()=>cD(t),()=>cD(t))}:e=>{let t=D().useContext(s)[e],[n,r]=D().useState(()=>cD(t));return hg(()=>t(1,e=>{e!==n&&r(()=>e)}),[t,n]),n},usePublisher:e=>{let t=D().useContext(s);return D().useCallback(n=>{(0,t[e])(0,n)},[t,e])}}}let hv=D().createContext(void 0),hy=D().createContext(void 0),hx="-webkit-sticky",hb="sticky",hw=hc(()=>{if(typeof document>"u")return hb;let e=document.createElement("div");return e.style.position=hx,e.style.position===hx?hx:hb}),hS=typeof document>"u"?D().useEffect:D().useLayoutEffect;function hA(e){return"self"in e}function hC(e,t,n,r=ck,i,o){let a=D().useRef(null),s=D().useRef(null),l=D().useRef(null),u=D().useCallback(n=>{let r,i,a,u=n.target;if("body"in u||hA(u)){let e=hA(u)?u:u.defaultView;a=!0===o?c6(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else a=!0===o?c6(u,u.scrollLeft):u.scrollTop,r=!0===o?u.scrollWidth:u.scrollHeight,i=!0===o?u.offsetWidth:u.offsetHeight;let c=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:i})};!0===n.suppressFlushSync?c():tN().flushSync(c),null!==s.current&&(a===s.current||a<=0||a===r-i)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,o]);return D().useEffect(()=>{let e=i??a.current;return c3(e),r(i??a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{c3(e),r(null),e.removeEventListener("scroll",u)}},[a,u,n,r,i]),{scrollByCallback:function(e){!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:c6(a.current,e.top)}}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){let r,i,u,c=a.current;if(!c||(!0===o?"offsetWidth"in c&&0===c.offsetWidth:"offsetHeight"in c&&0===c.offsetHeight))return;let d="smooth"===n.behavior;hA(c)?(i=Math.max(dS(c.document.documentElement,!0===o?"width":"height"),!0===o?c.document.documentElement.scrollWidth:c.document.documentElement.scrollHeight),r=!0===o?c.innerWidth:c.innerHeight,u=!0===o?c6(c,c.scrollX):c.scrollY):(i=c[!0===o?"scrollWidth":"scrollHeight"],r=dS(c,!0===o?"width":"height"),u=!0===o?c6(c,c.scrollLeft):c.scrollTop);let h=i-r;if(void 0===n.top)return void c.scrollTo(n);let p=Math.ceil(Math.max(Math.min(h,n.top),0));if(n.top=p,dG(r,i)||p===u){e({scrollHeight:i,scrollTop:u,viewportHeight:r}),d&&t(!0);return}d?(s.current=p,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:c6(c,p)}),c.scrollTo(n)}}}function hM(e){return e}let hk=cX(()=>{let e=cW(e=>`Item ${e}`),t=cW(e=>`Group ${e}`),n=cW({}),r=cW(hM),i=cW("div"),o=cW(ck),a=(e,t=null)=>cG(cj(n,cB(t=>t[e]),cL()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),hT=cX(([e,t])=>({...e,...t}),c_(hf,hk)),h_=({height:e})=>(0,_.jsx)("div",{style:{height:e}}),hI={overflowAnchor:"none",position:hw(),zIndex:1},hD={overflowAnchor:"none"},hO={...hD,display:"inline-block",height:"100%"},hR=D().memo(function({showTopList:e=!1}){let t=hX("listState"),n=hZ("sizeRanges"),r=hX("useWindowScroll"),i=hX("customScrollParent"),o=hZ("windowScrollContainerState"),a=hZ("scrollContainerState"),s=hX("itemContent"),l=hX("context"),u=hX("groupContent"),c=hX("trackItemSizes"),d=hX("itemSize"),h=hX("log"),p=hZ("gap"),f=hX("horizontalDirection"),{callbackRef:g}=c7(n,d,c,e?ck:i||r?o:a,h,p,i,f,hX("skipAnimationFrameInResizeObserver")),[m,v]=D().useState(0);hY("deviation",e=>{m!==e&&v(e)});let y=hX("EmptyPlaceholder"),x=hX("ScrollSeekPlaceholder")??h_,b=hX("ListComponent"),w=hX("ItemComponent"),S=hX("GroupComponent"),A=hX("computeItemKey"),C=hX("isSeeking"),M=hX("groupIndices").length>0,k=hX("alignToBottom"),T=hX("initialItemFinalLocationReached"),O=e?{}:{boxSizing:"border-box",...f?{display:"inline-block",height:"100%",marginInlineStart:0===m?k?"auto":0:m,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===m?k?"auto":0:m,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...T?{}:{visibility:"hidden"}};return e||0!==t.totalCount||null==y?(0,_.jsx)(b,{...hz(b,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:O,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=A(n+t.firstItemIndex,e.data,l);return C?(0,I.createElement)(x,{...hz(x,l),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,I.createElement)(S,{...hz(S,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:hI},u(e.index,l)):(0,I.createElement)(w,{...hz(w,l),...hj(w,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:f?hO:hD},M?s(e.index,e.groupIndex,e.data,l):s(e.index,e.data,l))})}):(0,_.jsx)(y,{...hz(y,l)})}),hE={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hP={outline:"none",overflowX:"auto",position:"relative"},hL=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),hN=(e,t,n=0)=>({...hL(e),position:t?"relative":"absolute",top:t?-n:0}),hB={position:hw(),top:0,width:"100%",zIndex:1};function hz(e,t){if("string"!=typeof e)return{context:t}}function hj(e,t){return{item:"string"==typeof e?void 0:t}}let hF=D().memo(function(){let e=hX("HeaderComponent"),t=hZ("headerHeight"),n=hX("HeaderFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,hX("skipAnimationFrameInResizeObserver")),i=hX("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),hV=D().memo(function(){let e=hX("FooterComponent"),t=hZ("footerHeight"),n=hX("HeaderFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,hX("skipAnimationFrameInResizeObserver")),i=hX("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null});function h$({useEmitter:e,useEmitterValue:t,usePublisher:n}){return D().memo(function({children:r,style:i,context:o,...a}){let s=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:f}=hC(s,u,l,c,void 0,d);return e("scrollTo",f),e("scrollBy",h),(0,_.jsx)(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?hP:hE,...i},tabIndex:0,...a,...hz(l,o),children:r})})}function hH({useEmitter:e,useEmitterValue:t,usePublisher:n}){return D().memo(function({children:r,style:i,context:o,...a}){let s=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("totalListHeight"),d=t("deviation"),h=t("customScrollParent"),p=D().useRef(null),{scrollByCallback:f,scrollerRef:g,scrollToCallback:m}=hC(s,u,l,t("scrollerRef"),h);return hS(()=>(g.current=h??p.current?.ownerDocument.defaultView,()=>{g.current=null}),[g,h]),e("windowScrollTo",m),e("scrollBy",f),(0,_.jsx)(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0===c?void 0:{height:c+d}},...a,...hz(l,o),children:r})})}let hW=({children:e})=>{let t=D().useContext(hv),n=hZ("viewportHeight"),r=hZ("fixedItemHeight"),i=hX("alignToBottom"),o=hX("horizontalDirection"),a=c8(D().useMemo(()=>cC(n,e=>dS(e,o?"width":"height")),[n,o]),!0,hX("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"element",ref:a,style:hL(i),children:e})},hG=({children:e})=>{let t=D().useContext(hv),n=hZ("windowViewportRect"),r=hZ("fixedItemHeight"),i=hX("customScrollParent"),o=hX("useWindowScroll"),a=hX("topListHeight"),s=dt(n,i,hX("skipAnimationFrameInResizeObserver")),l=hX("alignToBottom");return D().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"window",ref:s,style:hN(l,o,a),children:e})},hU=({children:e})=>{let t=hX("TopItemListComponent")??"div",n=hX("headerHeight"),r={...hB,marginTop:`${n}px`},i=hX("context");return(0,_.jsx)(t,{style:r,...hz(t,i),children:e})},{Component:hq,useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}=hm(hT,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},D().memo(function(e){let t=hX("useWindowScroll"),n=hX("topItemsIndexes").length>0,r=hX("customScrollParent"),i=hX("context");return(0,_.jsxs)(r||t?hQ:hK,{...e,context:i,children:[n&&(0,_.jsx)(hU,{children:(0,_.jsx)(hR,{showTopList:!0})}),(0,_.jsxs)(r||t?hG:hW,{children:[(0,_.jsx)(hF,{}),(0,_.jsx)(hR,{}),(0,_.jsx)(hV,{})]})]})})),hK=h$({useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}),hQ=hH({useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}),hJ=cX(()=>{let e=cW(e=>(0,_.jsxs)("td",{children:["Item $",e]})),t=cW(null),n=cW(e=>(0,_.jsxs)("td",{colSpan:1e3,children:["Group ",e]})),r=cW(null),i=cW(null),o=cW({}),a=cW(hM),s=cW(ck),l=(e,t=null)=>cG(cj(o,cB(t=>t[e]),cL()),t);return{components:o,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),h0=cX(([e,t])=>({...e,...t}),c_(hf,hJ)),h1=({height:e})=>(0,_.jsx)("tr",{children:(0,_.jsx)("td",{style:{height:e}})}),h2=({height:e})=>(0,_.jsx)("tr",{children:(0,_.jsx)("td",{style:{border:0,height:e,padding:0}})}),h5={overflowAnchor:"none"},h4={position:hw(),zIndex:2,overflowAnchor:"none"},h3=D().memo(function({showTopList:e=!1}){let t=pt("listState"),n=pt("computeItemKey"),r=pt("firstItemIndex"),i=pt("context"),o=pt("isSeeking"),a=pt("fixedHeaderHeight"),s=pt("groupIndices").length>0,l=pt("itemContent"),u=pt("groupContent"),c=pt("ScrollSeekPlaceholder")??h1,d=pt("GroupComponent"),h=pt("TableRowComponent"),p=(e?t.topItems:[]).reduce((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let f=t.originalIndex,g=n(f+r,t.data,i),m=e?0===f?0:p[f-1]:0;return o?(0,I.createElement)(c,{...hz(c,i),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,I.createElement)(d,{...hz(d,i),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...h4,top:a}},u(t.index,i)):(0,I.createElement)(h,{...hz(h,i),...hj(h,t.data),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...h4,top:a+m}:h5},s?l(t.index,t.groupIndex,t.data,i):l(t.index,t.data,i))})}),h6=D().memo(function(){let e=pt("listState"),t=pt("topItemsIndexes").length>0,n=pn("sizeRanges"),r=pt("useWindowScroll"),i=pt("customScrollParent"),o=pn("windowScrollContainerState"),a=pn("scrollContainerState"),s=pt("trackItemSizes"),{callbackRef:l,ref:u}=c7(n,pt("itemSize"),s,i||r?o:a,pt("log"),void 0,i,!1,pt("skipAnimationFrameInResizeObserver")),[c,d]=D().useState(0);pe("deviation",e=>{c!==e&&(u.current.style.marginTop=`${e}px`,d(e))});let h=pt("EmptyPlaceholder"),p=pt("FillerRow")??h2,f=pt("TableBodyComponent"),g=pt("paddingTopAddition"),m=pt("statefulTotalCount"),v=pt("context");if(0===m&&null!=h)return(0,_.jsx)(h,{...hz(h,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),x=e.offsetTop+g+c-y,b=e.offsetBottom,w=x>0?(0,_.jsx)(p,{context:v,height:x},"padding-top"):null,S=b>0?(0,_.jsx)(p,{context:v,height:b},"padding-bottom"):null;return(0,_.jsxs)(f,{"data-testid":"virtuoso-item-list",ref:l,...hz(f,v),children:[w,t&&(0,_.jsx)(h3,{showTopList:!0}),(0,_.jsx)(h3,{}),S]})}),h8=({children:e})=>{let t=D().useContext(hv),n=pn("viewportHeight"),r=pn("fixedItemHeight"),i=c8(D().useMemo(()=>cC(n,e=>dS(e,"height")),[n]),!0,pt("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"element",ref:i,style:hL(!1),children:e})},h9=({children:e})=>{let t=D().useContext(hv),n=pn("windowViewportRect"),r=pn("fixedItemHeight"),i=pt("customScrollParent"),o=pt("useWindowScroll"),a=dt(n,i,pt("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"window",ref:a,style:hN(!1,o),children:e})},{Component:h7,useEmitter:pe,useEmitterValue:pt,usePublisher:pn}=hm(h0,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},D().memo(function(e){let t=pt("useWindowScroll"),n=pt("customScrollParent"),r=pn("fixedHeaderHeight"),i=pn("fixedFooterHeight"),o=pt("fixedHeaderContent"),a=pt("fixedFooterContent"),s=pt("context"),l=c8(D().useMemo(()=>cC(r,e=>dS(e,"height")),[r]),!0,pt("skipAnimationFrameInResizeObserver")),u=c8(D().useMemo(()=>cC(i,e=>dS(e,"height")),[i]),!0,pt("skipAnimationFrameInResizeObserver")),c=n||t?pi:pr,d=n||t?h9:h8,h=pt("TableComponent"),p=pt("TableHeadComponent"),f=pt("TableFooterComponent"),g=o?(0,_.jsx)(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...hz(p,s),children:o()},"TableHead"):null,m=a?(0,_.jsx)(f,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...hz(f,s),children:a()},"TableFoot"):null;return(0,_.jsx)(c,{...e,...hz(c,s),children:(0,_.jsx)(d,{children:(0,_.jsxs)(h,{style:{borderSpacing:0,overflowAnchor:"none"},...hz(h,s),children:[g,(0,_.jsx)(h6,{},"TableBody"),m]})})})})),pr=h$({useEmitter:pe,useEmitterValue:pt,usePublisher:pn}),pi=hH({useEmitter:pe,useEmitterValue:pt,usePublisher:pn}),po={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},pa={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:ps,floor:pl,max:pu,min:pc,round:pd}=Math;function ph(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function pp(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function pf(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}let pg=cX(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b},w])=>{let S=cW(0),A=cW(0),C=cW(po),M=cW({height:0,width:0}),k=cW({height:0,width:0}),T=cU(),_=cU(),I=cW(0),D=cW(null),O=cW({column:0,row:0}),R=cU(),E=cU(),P=cW(!1),L=cW(0),N=cW(!0),B=cW(!1),z=cW(!1);cj(f,cH(L),cN(([e,t])=>!dH(t)))(1,()=>{N(0,!1)}),cj(cK(f,N,k,M,L,B),cN(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i))(1,([,,,,e])=>{void 0===e?N(0,!0):(B(0,!0),dV(1,()=>{T(0,e)}),cR(cj(u),()=>{t(0,[0,0]),N(0,!0)}))}),cO(cj(E,cN(e=>null!=e&&e.scrollTop>0),cz(0)),A),cj(f,cH(E),cN(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),k(0,e.item),O(0,e.gap),e.scrollTop>0&&(P(0,!0),cR(cj(u,cV(1)),e=>{P(0,!1)}),l(0,{top:e.scrollTop})))}),cO(cj(M,cB(({height:e})=>e)),d),cO(cj(cK(cQ(M,pp),cQ(k,pp),cQ(O,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),cQ(u)),cB(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),R),cO(cj(cK(cQ(S),r,cQ(O,pf),cQ(k,pp),cQ(M,pp),cQ(D),cQ(A),cQ(P),cQ(N),cQ(L)),cN(([,,,,,,,e])=>!e),cB(([e,[t,n],r,i,o,a,s,,l,u])=>{let c,d,{column:h,row:p}=r,{height:f,width:g}=i,{width:m}=o;if(0===s&&(0===e||0===m))return po;if(0===g){var v;let t=d$(u,e),n=t+Math.max(s-1,0);return v=ph(t,n,a),{...pa,items:v}}let y=pm(m,g,h);l?0===t&&0===n&&s>0?(c=0,d=s-1):(c=y*pl((t+p)/(f+p)),d=pc(e-1,pu(d=y*ps((n+p)/(f+p))-1,y-1)),c=pc(d,pu(0,c))):(c=0,d=-1);let x=ph(c,d,a),{bottom:b,top:w}=pv(o,r,i,x),S=ps(e/y);return{bottom:b,itemHeight:f,items:x,itemWidth:g,offsetBottom:S*f+(S-1)*p-b,offsetTop:w,top:w}})),C),cO(cj(D,cN(e=>null!==e),cB(e=>e.length)),S),cO(cj(cK(M,k,C,O),cN(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),cB(([e,t,{items:n},r])=>{let{bottom:i,top:o}=pv(e,r,t,n);return[o,i]}),cL(dx)),t);let j=cW(!1);cO(cj(u,cH(j),cB(([e,t])=>t||0!==e)),j);let F=cq(cj(cK(C,S),cN(([{items:e}])=>e.length>0),cH(j),cN(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),cB(([[,e]])=>e-1),cL())),V=cq(cj(cQ(C),cN(({items:e})=>e.length>0&&0===e[0].index),cz(0),cL())),$=cq(cj(cQ(C),cH(P),cN(([{items:e},t])=>e.length>0&&!t),cB(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),cL(dy),c$(0)));cO($,p.scrollSeekRangeChanged),cO(cj(T,cH(M,k,S,O),cB(([e,t,n,r,i])=>{let o=dj(e),{align:a,behavior:s,offset:l}=o,u=o.index;"LAST"===u&&(u=r-1);let c=py(t,i,n,u=pu(0,u,pc(r-1,u)));return"end"===a?c=pd(c-t.height+n.height):"center"===a&&(c=pd(c-t.height/2+n.height/2)),void 0!==l&&0!==l&&(c+=l),{behavior:s,top:c}})),l);let H=cG(cj(C,cB(e=>e.offsetBottom+e.bottom)),0);return cO(cj(b,cB(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:m,data:D,deviation:I,footerHeight:i,gap:O,headerHeight:o,increaseViewportBy:e,initialItemCount:A,itemDimensions:k,overscan:n,restoreStateFrom:E,scrollBy:a,scrollContainerState:s,scrollHeight:_,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b,...p,gridState:C,horizontalDirection:z,initialTopMostItemIndex:L,totalListHeight:H,...h,endReached:F,propsReady:g,rangeChanged:$,startReached:V,stateChanged:R,stateRestoreInProgress:P,...w}},c_(dJ,dn,dY,ho,dB,ha,c2));function pm(e,t,n){return pu(1,pl((e+n)/(pl(t)+n)))}function pv(e,t,n,r){let{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};let o=py(e,t,n,r[0].index);return{bottom:py(e,t,n,r[r.length-1].index)+i,top:o}}function py(e,t,n,r){let i=pl(r/pm(e.width,n.width,t.column)),o=i*n.height+pu(0,i-1)*t.row;return o>0?o+t.row:o}let px=cX(()=>{let e=cW(e=>`Item ${e}`),t=cW({}),n=cW(null),r=cW("virtuoso-grid-item"),i=cW("virtuoso-grid-list"),o=cW(hM),a=cW("div"),s=cW(ck),l=(e,n=null)=>cG(cj(t,cB(t=>t[e]),cL()),n),u=cW(!1),c=cW(!1);return cO(cQ(c),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),pb=cX(([e,t])=>({...e,...t}),c_(pg,px)),pw=D().memo(function(){let e=pT("gridState"),t=pT("listClassName"),n=pT("itemClassName"),r=pT("itemContent"),i=pT("computeItemKey"),o=pT("isSeeking"),a=p_("scrollHeight"),s=pT("ItemComponent"),l=pT("ListComponent"),u=pT("ScrollSeekPlaceholder"),c=pT("context"),d=p_("itemDimensions"),h=p_("gap"),p=pT("log"),f=pT("stateRestoreInProgress"),g=p_("reportReadyState"),m=c8(D().useMemo(()=>e=>{a(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;if(null!==t){let{height:e,width:n}=t.getBoundingClientRect();d({height:e,width:n})}h({column:pO("column-gap",getComputedStyle(e).columnGap,p),row:pO("row-gap",getComputedStyle(e).rowGap,p)})},[a,d,h,p]),!0,!1);return hS(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),f?null:(0,_.jsx)(l,{className:t,ref:m,...hz(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=i(t.index,t.data,c);return o?(0,_.jsx)(u,{...hz(u,c),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,I.createElement)(s,{...hz(s,c),className:n,"data-index":t.index,key:a},r(t.index,t.data,c))})})}),pS=D().memo(function(){let e=pT("HeaderComponent"),t=p_("headerHeight"),n=pT("headerFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,!1),i=pT("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),pA=D().memo(function(){let e=pT("FooterComponent"),t=p_("footerHeight"),n=pT("headerFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,!1),i=pT("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),pC=({children:e})=>{let t=D().useContext(hy),n=p_("itemDimensions"),r=p_("viewportDimensions"),i=c8(D().useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return D().useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,_.jsx)("div",{ref:i,style:hL(!1),children:e})},pM=({children:e})=>{let t=D().useContext(hy),n=p_("windowViewportRect"),r=p_("itemDimensions"),i=pT("customScrollParent"),o=pT("useWindowScroll"),a=dt(n,i,!1);return D().useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,_.jsx)("div",{ref:a,style:hN(!1,o),children:e})},{useEmitter:pk,useEmitterValue:pT,usePublisher:p_}=hm(pb,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},D().memo(function({...e}){let t=pT("useWindowScroll"),n=pT("customScrollParent"),r=n||t?pD:pI,i=n||t?pM:pC,o=pT("context");return(0,_.jsx)(r,{...e,...hz(r,o),children:(0,_.jsxs)(i,{children:[(0,_.jsx)(pS,{}),(0,_.jsx)(pw,{}),(0,_.jsx)(pA,{})]})})})),pI=h$({useEmitter:pk,useEmitterValue:pT,usePublisher:p_}),pD=hH({useEmitter:pk,useEmitterValue:pT,usePublisher:p_});function pO(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function pR({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,_.jsx)(hq,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,_.jsx)(cw,{item:t,index:e,truncateLabel:s,isVisuallySelected:co(t,r),onClick:i,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function pE(e,t){return"function"==typeof e?e(t):e}function pP(e,t){return n=>{t.setState(t=>({...t,[e]:pE(n,t[e])}))}}function pL(e){return e instanceof Function}function pN(e,t,n){let r,i=[];return o=>{let a,s;n.key&&n.debug&&(a=Date.now());let l=e(o);if(!(l.length!==i.length||l.some((e,t)=>i[t]!==e)))return r;if(i=l,n.key&&n.debug&&(s=Date.now()),r=t(...l),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-a)*100)/100,t=Math.round((Date.now()-s)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
102
+ `:null,eI=(0,N.A)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,L.A)(n.color)}`]]}})((0,B.A)(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:eT||{animation:`${eM} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),eD=(0,N.A)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),eO=(0,N.A)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${(0,L.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,B.A)(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:e_||{animation:`${ek} 1.4s ease-in-out infinite`}}]}))),eR=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:u=0,variant:c="indeterminate",...d}=n,h={...n,color:i,disableShrink:o,size:a,thickness:l,value:u,variant:c},p=(e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,L.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,L.A)(n)}`,i&&"circleDisableShrink"]};return(0,R.A)(o,eC,t)})(h),f={},g={},m={};if("determinate"===c){let e=2*Math.PI*((44-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(u),f.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,_.jsx)(eI,{className:(0,O.A)(p.root,r),style:{width:a,height:a,...g,...s},ownerState:h,ref:t,role:"progressbar",...m,...d,children:(0,_.jsx)(eD,{className:p.svg,ownerState:h,viewBox:"22 22 44 44",children:(0,_.jsx)(eO,{className:p.circle,style:f,ownerState:h,cx:44,cy:44,r:(44-l)/2,fill:"none",strokeWidth:l})})})});function eE(e){return(0,V.Ay)("MuiButton",e)}let eP=(0,F.A)("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","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),eL=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],eN=(0,N.A)(eS,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,L.A)(n.color)}`],t[`size${(0,L.A)(n.size)}`],t[`${n.variant}Size${(0,L.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,B.A)(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${eP.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${eP.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${eP.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${eP.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,E.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${eP.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${eP.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${eP.loading}`]:{color:"transparent"}}}]}})),eB=(0,N.A)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,L.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...eL]})),ez=(0,N.A)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,L.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...eL]})),ej=(0,N.A)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),eF=(0,N.A)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),eV=I.forwardRef(function(e,t){let n=I.useContext(W),r=I.useContext(G),i=(0,Y.A)(n,e),o=(0,j.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:u,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:g=!1,id:m,loading:v=null,loadingIndicator:y,loadingPosition:x="center",size:b="medium",startIcon:w,type:S,variant:A="text",...C}=o,M=(0,X.A)(m),k=y??(0,_.jsx)(eR,{"aria-labelledby":M,color:"inherit",size:16}),T={...o,color:s,component:l,disabled:c,disableElevation:d,disableFocusRipple:h,fullWidth:g,loading:v,loadingIndicator:k,loadingPosition:x,size:b,type:S,variant:A},D=(e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:a,loadingPosition:s,classes:l}=e,u={root:["root",a&&"loading",o,`${o}${(0,L.A)(t)}`,`size${(0,L.A)(i)}`,`${o}Size${(0,L.A)(i)}`,`color${(0,L.A)(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${(0,L.A)(s)}`],startIcon:["icon","startIcon",`iconSize${(0,L.A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,L.A)(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=(0,R.A)(u,eE,l);return{...l,...c}})(T),E=(w||v&&"start"===x)&&(0,_.jsx)(eB,{className:D.startIcon,ownerState:T,children:w||(0,_.jsx)(eF,{className:D.loadingIconPlaceholder,ownerState:T})}),P=(p||v&&"end"===x)&&(0,_.jsx)(ez,{className:D.endIcon,ownerState:T,children:p||(0,_.jsx)(eF,{className:D.loadingIconPlaceholder,ownerState:T})}),N="boolean"==typeof v?(0,_.jsx)("span",{className:D.loadingWrapper,style:{display:"contents"},children:v&&(0,_.jsx)(ej,{className:D.loadingIndicator,ownerState:T,children:k})}):null;return(0,_.jsxs)(eN,{ownerState:T,className:(0,O.A)(n.className,D.root,u,r||""),component:l,disabled:c||v,focusRipple:!h,focusVisibleClassName:(0,O.A)(D.focusVisible,f),ref:t,type:S,id:v?M:m,...C,classes:D,children:[E,"end"!==x&&N,a,"end"===x&&N,P]})});function e$({onChange:e,value:t="left",...n}){let r=t=>{e(t)};return(0,_.jsxs)(q,{"aria-label":"Alignement",...n,children:[(0,_.jsx)(eV,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,_.jsx)(eV,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,_.jsx)(eV,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var eH=n(315);function eW(e){return(0,V.Ay)("MuiIconButton",e)}let eG=(0,F.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),eU=(0,N.A)(eS,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,L.A)(n.color)}`],n.edge&&t[`edge${(0,L.A)(n.edge)}`],t[`size${(0,L.A)(n.size)}`]]}})((0,B.A)(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),(0,B.A)(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${eG.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${eG.loading}`]:{color:"transparent"}}))),eq=(0,N.A)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),eY=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:h,...p}=n,f=(0,X.A)(c),g=h??(0,_.jsx)(eR,{"aria-labelledby":f,color:"inherit",size:16}),m={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:g,size:u},v=(e=>{let{classes:t,disabled:n,color:r,edge:i,size:o,loading:a}=e,s={root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${(0,L.A)(r)}`,i&&`edge${(0,L.A)(i)}`,`size${(0,L.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,R.A)(s,eW,t)})(m);return(0,_.jsxs)(eU,{id:d?f:c,className:(0,O.A)(v.root,o),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...p,ownerState:m,children:["boolean"==typeof d&&(0,_.jsx)("span",{className:v.loadingWrapper,style:{display:"contents"},children:(0,_.jsx)(eq,{className:v.loadingIndicator,ownerState:m,children:d&&g})}),i]})});var eX=n(93648),eZ=n(29618),eK=n(98029);function eQ(){return(eQ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eJ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function e0(e){var t=(0,I.useRef)(e),n=(0,I.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var e1,e2=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},e5=function(e){return"touches"in e},e4=function(e){return e&&e.ownerDocument.defaultView||self},e3=function(e,t,n){var r=e.getBoundingClientRect(),i=e5(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:e2((i.pageX-(r.left+e4(e).pageXOffset))/r.width),top:e2((i.pageY-(r.top+e4(e).pageYOffset))/r.height)}},e6=function(e){e5(e)||e.preventDefault()},e8=D().memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=eJ(e,["onMove","onKey","onEnd"]),o=(0,I.useRef)(null),a=e0(t),s=e0(n),l=e0(r),u=(0,I.useRef)(null),c=(0,I.useRef)(!1),d=(0,I.useMemo)(function(){var e=function(e){e6(e),(e5(e)?e.touches.length>0:e.buttons>0)&&o.current?a(e3(o.current,e,u.current)):(n(!1),l())},t=function(){n(!1),l()};function n(n){var r=c.current,i=e4(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(e6(t),(!c.current||e5(t))&&r)){if(e5(t)){c.current=!0;var i=t.changedTouches||[];i.length&&(u.current=i[0].identifier)}r.focus(),a(e3(r,t,u.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&l()},n]},[s,a,l]),h=d[0],p=d[1],f=d[2],g=d[3];return(0,I.useEffect)(function(){return g},[g]),D().createElement("div",eQ({},i,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:o,onKeyDown:p,onKeyUp:f,tabIndex:0,role:"slider"}))}),e9=function(e){return e.filter(Boolean).join(" ")},e7=function(e){var t=e.color,n=e.left,r=e.top,i=e9(["react-colorful__pointer",e.className]);return D().createElement("div",{className:i,style:{top:100*(void 0===r?.5:r)+"%",left:100*n+"%"}},D().createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},te=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},tt=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?te(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?te(parseInt(e.substring(6,8),16)/255,2):1}},tn=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:te(e.h),s:te(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:te(i/2),a:te(r,2)}},tr=function(e){var t=tn(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ti=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:te(255*[r,s,a,a,l,r][u]),g:te(255*[l,r,r,s,a,a][u]),b:te(255*[a,a,l,r,r,s][u]),a:te(i,2)}},to=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ta=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?to(te(255*i)):"";return"#"+to(t)+to(n)+to(r)+o},ts=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:te(60*(s<0?s+6:s)),s:te(o?a/o*100:0),v:te(o/255*100),a:i}},tl=D().memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=e9(["react-colorful__hue",e.className]);return D().createElement("div",{className:i},D().createElement(e8,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:e2(t+360*e.left,0,360)})},onEnd:r,"aria-label":"Hue","aria-valuenow":te(t),"aria-valuemax":"360","aria-valuemin":"0"},D().createElement(e7,{className:"react-colorful__hue-pointer",left:t/360,color:tr({h:t,s:100,v:100,a:1})})))}),tu=D().memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:tr({h:t.h,s:100,v:100,a:1})};return D().createElement("div",{className:"react-colorful__saturation",style:i},D().createElement(e8,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:e2(t.s+100*e.left,0,100),v:e2(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":"Color","aria-valuetext":"Saturation "+te(t.s)+"%, Brightness "+te(t.v)+"%"},D().createElement(e7,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:tr(t)})))}),tc=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},td="u">typeof window?I.useLayoutEffect:I.useEffect,th=new Map,tp=function(e){td(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!th.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',th.set(t,r);var i=e1||n.nc;i&&r.setAttribute("nonce",i),t.head.appendChild(r)}},[])},tf=function(e){var t,n,r,i,o,a,s,l=e.className,u=e.colorModel,c=e.color,d=void 0===c?u.defaultColor:c,h=e.onChange,p=e.onChangeEnd,f=eJ(e,["className","colorModel","color","onChange","onChangeEnd"]),g=(0,I.useRef)(null);tp(g);var m=(t=e0(h),n=e0(p),i=(r=(0,I.useState)(function(){return u.toHsva(d)}))[0],o=r[1],a=(0,I.useRef)({color:d,hsva:i}),s=(0,I.useRef)(!1),(0,I.useEffect)(function(){if(!u.equal(d,a.current.color)){var e=u.toHsva(d);a.current={hsva:e,color:d},o(e),s.current=!1}},[d,u]),(0,I.useEffect)(function(){var e;tc(i,a.current.hsva)||u.equal(e=u.fromHsva(i),a.current.color)||(a.current={hsva:i,color:e},t(e),s.current=!0)},[i,u,t]),[i,(0,I.useCallback)(function(e){o(function(t){return Object.assign({},t,e)})},[]),(0,I.useCallback)(function(){s.current&&(s.current=!1,n(a.current.color))},[n])]),v=m[0],y=m[1],x=m[2],b=e9(["react-colorful",l]);return D().createElement("div",eQ({},f,{ref:g,className:b}),D().createElement(tu,{hsva:v,onChange:y,onChangeEnd:x}),D().createElement(tl,{hue:v.h,onChange:y,onChangeEnd:x,className:"react-colorful__last-control"}))},tg={defaultColor:"000",toHsva:function(e){return ts(tt(e))},fromHsva:function(e){return ta(ti({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||tc(tt(e),tt(t))}},tm=function(e){return D().createElement(tf,eQ({},e,{colorModel:tg}))};let tv=({color:e,onChange:t,onClear:n,palette:r})=>{let[i,o]=(0,I.useState)(e),a=e=>{o(e),t?.(e)};return(0,_.jsxs)(eH.A,{spacing:1,children:[(0,_.jsx)(tm,{color:e,onChange:a,style:{width:"100%"}}),(0,_.jsx)(eH.A,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map((e,t)=>(0,_.jsx)(eY,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,_.jsx)(eZ,{})},t))}),(0,_.jsxs)(eH.A,{direction:"row",gap:1,alignItems:"center",children:[(0,_.jsx)(eX.A,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:i,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),ty(e.target.value)&&t?.(e.target.value)}}),n&&(0,_.jsx)(eY,{onClick:n,children:(0,_.jsx)(eK,{})})]})]})},ty=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var tx=n(91823);function tb(e){let{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:i=!0}=e,[o,a]=(0,I.useState)(null),s=(0,I.useMemo)(()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:o,enableSyncGrouping:i,setLastTooltipPinnedCoords:a}),[n,r,i,o,a]);return(0,_.jsx)(tw.Provider,{value:s,children:t})}let tw=(0,I.createContext)(void 0);function tS(){let e=(0,I.useContext)(tw);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function tA(){return tS().chartsTheme}let tC=(0,I.createContext)(void 0);function tM({children:e}){let[t,n]=(0,I.useState)(new Map),r=(0,I.useCallback)((e,t,r)=>{n(n=>{let i=new Map(n),o=i.get(e)||{loading:!1};if(void 0!==r){let n=new Map(o.itemStatuses||new Map),a=n.get(r)||{loading:!1};n.set(r,{...a,...t}),i.set(e,{...o,itemStatuses:n})}else i.set(e,{...o,...t});return i})},[]),i=(0,I.useCallback)(e=>{n(t=>{if(void 0===e)return new Map;if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),o=(0,I.useMemo)(()=>({actionStatuses:t,setActionStatus:r,clearActionStatus:i}),[t,r,i]);return(0,_.jsx)(tC.Provider,{value:o,children:e})}let tk=()=>{},tT={actionStatuses:new Map,setActionStatus:tk,clearActionStatus:tk,hasContext:!1};function t_(){let e=(0,I.useContext)(tC);return(0,I.useMemo)(()=>e?{...e,hasContext:!0}:tT,[e])}let tI=(0,I.createContext)(void 0),tD=(e,t)=>t;function tO({children:e}){let[t,n]=(0,I.useState)(new Map),r=(0,I.useRef)(tD),i=(0,I.useCallback)(e=>{r.current=e},[]),o=(0,I.useCallback)(e=>{let t=new Map;e.forEach(({item:e,id:n})=>t.set(n,e)),n(t)},[]),a=(0,I.useCallback)((e,t)=>{n(n=>{let r=new Map(n);return r.has(t)?r.delete(t):r.set(t,e),r})},[]),s=(0,I.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),l=(0,I.useCallback)(()=>n(new Map),[]),u=(0,I.useCallback)((e,n)=>t.has(r.current(e,n)),[t]),c=(0,I.useMemo)(()=>({selectionMap:t,setSelection:o,toggleSelection:a,removeFromSelection:s,clearSelection:l,isSelected:u,registerGetId:i}),[t,o,a,s,l,u,i]);return(0,_.jsx)(tI.Provider,{value:c,children:e})}let tR=()=>{},tE={selectionMap:new Map,setSelection:tR,toggleSelection:tR,removeFromSelection:tR,clearSelection:tR,isSelected:()=>!1,hasContext:!1};function tP(e){let t=(0,I.useContext)(tI);return(0,I.useEffect)(()=>{t&&e?.getId&&t.registerGetId(e.getId)},[t,e?.getId]),(0,I.useMemo)(()=>{if(!t)return tE;let{registerGetId:e,...n}=t;return{...n,hasContext:!0}},[t])}var tL=n(20231),tN=n.n(tL);let tB=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(r&&(r+=" "),r+=t);return r},tz={data:""},tj=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,tF=/\/\*[^]*?\*\/| +/g,tV=/\n+/g,t$=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?t$(a,o):o+"{"+t$(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=t$(a,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o="-"==o[1]?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=t$.p?t$.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},tH={},tW=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+tW(e[n]);return t}return e};function tG(e){let t,n,r=this||{},i=e.call?e(r.p):e;return((e,t,n,r,i)=>{var o;let a=tW(e),s=tH[a]||(tH[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(a));if(!tH[s]){let t=a!==e?e:(e=>{let t,n,r=[{}];for(;t=tj.exec(e.replace(tF,""));)t[4]?r.shift():t[3]?(n=t[3].replace(tV," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(tV," ").trim();return r[0]})(e);tH[s]=t$(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}let l=n&&tH.g;return n&&(tH.g=tH[s]),o=tH[s],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s})(i.unshift?i.raw?(t=[].slice.call(arguments,1),n=r.p,i.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":t$(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"")):i.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):i,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||tz})(r.target),r.g,r.o,r.k)}function tU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tq(e,t,n){return t&&tU(e.prototype,t),n&&tU(e,n),e}function tY(){return(tY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function tX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function tZ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function tK(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}tG.bind({g:1}),tG.bind({k:1});var tQ=function(){return""},tJ=D().createContext({enqueueSnackbar:tQ,closeSnackbar:tQ}),t0="@media (max-width:599.95px)",t1="@media (min-width:600px)",t2=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t5=function(e){return""+t2(e.vertical)+t2(e.horizontal)},t4=function(e){return!!e||0===e},t3="unmounted",t6="exited",t8="entering",t9="entered",t7="exiting",ne=function(e){function t(t){var n,r=e.call(this,t)||this,i=t.appear;return r.appearStatus=null,t.in?i?(n=t6,r.appearStatus=t8):n=t9:n=t.unmountOnExit||t.mountOnEnter?t3:t6,r.state={status:n},r.nextCallback=null,r}tX(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===t3?{status:t6}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==t8&&n!==t9&&(t=t8):(n===t8||n===t9)&&(t=t7)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===t8?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===t6&&this.setState({status:t3})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:t8},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:t9},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})):this.safeSetState({status:t9},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:t7},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:t6},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:t6},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;!this.node||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e))},n.render=function(){var e=this.state.status;if(e===t3)return null;var t=this.props;return(0,t.children)(e,tZ(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},tq(t,[{key:"node",get:function(){var e,t=null==(e=this.props.nodeRef)?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(D().Component);function nt(){}function nn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function nr(e,t){return(0,I.useMemo)(function(){return null==e&&null==t?null:function(n){nn(e,n),nn(t,n)}},[e,t])}function ni(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:nt,onEntering:nt,onEntered:nt,onExit:nt,onExiting:nt,onExited:nt};var no=function(e){e.scrollTop=e.scrollTop},na=function(e){return Math.round(e)+"ms"};function ns(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,a=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:na(i))+" "+a+" "+("string"==typeof l?l:na(l))}).join(",")}function nl(e){return(e&&e.ownerDocument||document).defaultView||window}function nu(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=nl(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var nc=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,o=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,d=e.onExit,h=e.onExited,p=tZ(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),f=(0,I.useRef)(null),g=nr(n.ref,f),m=nr(g,t),v=(0,I.useCallback)(function(){f.current&&nu(i,f.current)},[i]);return(0,I.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){f.current&&nu(i,f.current)}),t=nl(f.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,I.useEffect)(function(){o||v()},[o,v]),(0,I.createElement)(ne,Object.assign({appear:!0,nodeRef:f,onEnter:function(e,t){nu(i,e),no(e),u&&u(e,t)},onEntered:c,onEntering:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)",n=ni({timeout:l,mode:"enter",style:tY({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ns("-webkit-transform",n),e.style.transition=ns("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)",n=ni({timeout:l,mode:"exit",style:tY({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ns("-webkit-transform",n),e.style.transition=ns("transform",n),nu(i,e),d&&d(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",h&&h(e)},in:o,timeout:l},p),function(e,t){return(0,I.cloneElement)(n,tY({ref:m,style:tY({visibility:"exited"!==e||o?void 0:"hidden"},a,{},n.props.style)},t))})});nc.displayName="Slide";var nd=function(e){return D().createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},nh={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:D().createElement(function(){return D().createElement(nd,null,D().createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:nc,transitionDuration:{enter:225,exit:195}},np=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:nh.autoHideDuration},nf=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?tY({},nh.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?tY({},nh.transitionDuration,{},t):nh.transitionDuration};function ng(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return tY({},e,((n={})[r]=tG(i),n))},{})}var nm="notistack-CollapseWrapper",nv=ng({root:{height:0},entered:{height:"auto"}}),ny=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,I.useRef)(null),a=(0,I.useRef)(null),s=nr(t,a),l=function(){return o.current?o.current.clientHeight:0};return(0,I.createElement)(ne,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=ni({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){no(e);var t=ni({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return(0,I.createElement)("div",Object.assign({ref:s,className:tB(nv.root,"entered"===e&&nv.entered),style:tY({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:ns("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,I.createElement)("div",{ref:o,className:nm,style:{display:"flex",width:"100%"}},n))})});ny.displayName="Collapse";var nx={right:"left",left:"right",bottom:"up",top:"down"},nb=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return tY({},t,((r={})[n]=e[n],r))},{})},nw=function(){};function nS(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},nw)}var nA="u">typeof window?I.useLayoutEffect:I.useEffect;function nC(e){var t=(0,I.useRef)(e);return nA(function(){t.current=e}),(0,I.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var nM=(0,I.forwardRef)(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,d=void 0===c?{}:c,h=(0,I.useRef)(),p=nC(function(){s&&s.apply(void 0,arguments)}),f=nC(function(e){s&&null!=e&&(h.current&&clearTimeout(h.current),h.current=setTimeout(function(){p(null,"timeout",l)},e))});(0,I.useEffect)(function(){return u&&f(i),function(){h.current&&clearTimeout(h.current)}},[u,i,f]);var g=function(){h.current&&clearTimeout(h.current)},m=(0,I.useCallback)(function(){null!=i&&f(.5*i)},[i,f]);return(0,I.useEffect)(function(){if(!a&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[a,m,u]),(0,I.createElement)("div",Object.assign({ref:t},d,{className:tB("notistack-Snackbar",r),onMouseEnter:function(e){d.onMouseEnter&&d.onMouseEnter(e),g()},onMouseLeave:function(e){d.onMouseLeave&&d.onMouseLeave(e),m()}}),n)});nM.displayName="Snackbar";var nk=ng({root:((sM={display:"flex",flexWrap:"wrap",flexGrow:1})[t1]={flexGrow:"initial",minWidth:"288px"},sM)}),nT=(0,I.forwardRef)(function(e,t){var n=e.className,r=tZ(e,["className"]);return D().createElement("div",Object.assign({ref:t,className:tB(nk.root,n)},r))});nT.displayName="SnackbarContent";var n_=ng({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),nI="notistack-snackbar",nD=(0,I.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,a=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=o[a],d=i;return"function"==typeof d&&(d=d(n)),D().createElement(nT,{ref:t,role:"alert","aria-describedby":nI,style:l,className:tB("notistack-MuiContent","notistack-MuiContent-"+a,n_.root,n_[a],u,!s&&c&&n_.lessPadding)},D().createElement("div",{id:nI,className:n_.message},s?null:c,r),d&&D().createElement("div",{className:n_.action},d))});nD.displayName="MaterialDesignContent";var nO=(0,I.memo)(nD),nR=ng({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nE=function(e){var t,n=(0,I.useRef)(),r=(0,I.useState)(!0),i=r[0],o=r[1],a=nS([e.snack.onClose,e.onClose]),s=(0,I.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,I.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,u=e.classes,c=e.Component,d=(0,I.useMemo)(function(){return nb(u)},[u]),h=l.open,p=l.SnackbarProps,f=l.TransitionComponent,g=l.TransitionProps,m=l.transitionDuration,v=l.disableWindowBlurListener,y=l.content,x=tZ(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),b=tY({direction:"center"!==(t=x.anchorOrigin).horizontal?nx[t.horizontal]:nx[t.vertical],timeout:m},g),w=y;"function"==typeof w&&(w=w(x.id,x.message));var S=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return tY({},t,((r={})[n]=nS([e.snack[n],e[n]],x.id),r))},{});return D().createElement(ny,{in:i,onExited:S.onExited},D().createElement(nM,{open:h,id:x.id,disableWindowBlurListener:v,autoHideDuration:x.autoHideDuration,className:tB(nR.wrappedRoot,d.root,d["anchorOrigin"+t5(x.anchorOrigin)]),SnackbarProps:p,onClose:a},D().createElement(f,Object.assign({},b,{appear:!0,in:h,onExit:S.onExit,onExited:s,onEnter:S.onEnter,onEntered:nS([S.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],x.id)}),w||D().createElement(void 0===c?nO:c,Object.assign({},x)))))},nP=20,nL=6,nN=2,nB="."+nm,nz=ng({root:((sk={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ns(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[nB]={padding:nL+"px 0px",transition:"padding 300ms ease 0ms"},sk.maxWidth="calc(100% - "+2*nP+"px)",sk[t0]={width:"100%",maxWidth:"calc(100% - 32px)"},sk),rootDense:((sT={})[nB]={padding:nN+"px 0px"},sT),top:{top:nP-nL+"px",flexDirection:"column"},bottom:{bottom:nP-nL+"px",flexDirection:"column-reverse"},left:((s_={left:nP+"px"})[t1]={alignItems:"flex-start"},s_[t0]={left:"16px"},s_),right:((sI={right:nP+"px"})[t1]={alignItems:"flex-end"},sI[t0]={right:"16px"},sI),center:((sD={left:"50%",transform:"translateX(-50%)"})[t1]={alignItems:"center"},sD)}),nj=(0,I.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,a=tB("notistack-SnackbarContainer",nz[r.vertical],nz[r.horizontal],nz.root,n.containerRoot,n["containerAnchorOrigin"+t5(r)],i&&nz.rootDense);return D().createElement("div",{className:a},o)}),nF=function(e){return!("string"==typeof e||(0,I.isValidElement)(e))},nV=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var r,i=nF(e)?e:t,o=nF(e)?e.message:e,a=i.key,s=i.preventDuplicate,l=tZ(i,["key","preventDuplicate"]),u=t4(a),c=u?a:new Date().getTime()+Math.random(),d=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?tY({},nh[e],{},r[e],{},l[e]):"autoHideDuration"===e?np(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?nf(l.transitionDuration,r.transitionDuration):l[e]||r[e]||nh[e]}),h=tY({id:c},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:d("persist"),action:d("action"),content:d("content"),variant:d("variant"),anchorOrigin:d("anchorOrigin"),disableWindowBlurListener:d("disableWindowBlurListener"),autoHideDuration:d("autoHideDuration"),hideIconVariant:d("hideIconVariant"),TransitionComponent:d("TransitionComponent"),transitionDuration:d("transitionDuration"),TransitionProps:d("TransitionProps",!0),iconVariant:d("iconVariant",!0),style:d("style",!0),SnackbarProps:d("SnackbarProps",!0),className:tB(n.props.className,l.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===s&&n.props.preventDuplicate||s){var t=function(e){return u?e.id===c:e.message===o},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(tY({},e,{queue:[].concat(e.queue,[h])}))}),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?tY({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?tY({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),tY({},e,{open:!1})):tY({},e,{requestClose:!0})});return tY({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!t4(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?tY({},e,{entered:!0}):tY({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?tY({},e,{open:!1}):tY({},e,{requestClose:!0}):tY({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});t4(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!t4(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(tY({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(tK(n)),closeSnackbar:n.closeSnackbar.bind(tK(n))}},n}return tX(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=n.children,o=n.dense,a=void 0!==o&&o,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce(function(e,t){var n,r=t5(t.anchorOrigin),i=e[r]||[];return tY({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(c).map(function(t){var n=c[t],r=n[0];return D().createElement(nj,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map(function(t){return D().createElement(nE,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:nS([e.handleExitedSnack,e.props.onExited],t.id),onEntered:nS([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return D().createElement(tJ.Provider,{value:t},i,r?(0,tL.createPortal)(d,r):d)},tq(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||nh.maxSnack}}]),t}(I.Component);function n$({children:e,...t}){return(0,_.jsx)(nV,{...t,Components:{error:(0,N.A)(nO)(()=>({"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}}))},children:e})}function nH(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,I.useContext)(tJ),n=nW(e,"error"),r=nW(e,"info"),i=nW(e,"warning"),o=nW(e,"success"),a=(0,I.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:i,successSnackbar:o,exceptionSnackbar:a}}function nW(e,t){return(0,I.useCallback)((n,r)=>e(n,{...r,variant:t}),[e,t])}var nG=n(25632);let nU="Pinned Crosshair",nq={name:nU,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var nY=n(7418);let nX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function nZ(e){return (t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}let nK={date:nZ({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:nZ({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:nZ({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nQ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function nJ(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function n0(e){return(t,n={})=>{let r,i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;let s=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(l,e=>e.test(s)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(l,e=>e.test(s));return r=e.valueCallback?e.valueCallback(u):u,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(s.length)}}}let n1={code:"en-US",formatDistance:(e,t,n)=>{let r,i=nX[e];if(r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix)if(n.comparison&&n.comparison>0)return"in "+r;else return r+" ago";return r},formatLong:nK,formatRelative:(e,t,n,r)=>nQ[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:nJ({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:nJ({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:nJ({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:nJ({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:nJ({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(sS={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{let n=e.match(sS.matchPattern);if(!n)return null;let r=n[0],i=e.match(sS.parsePattern);if(!i)return null;let o=sS.valueCallback?sS.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:n0({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:n0({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:n0({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:n0({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:n0({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},n2={},n5=["years","months","weeks","days","hours","minutes","seconds"];function n4(e){var t,n;let r,i,o,a;return{value:{pastDuration:e},display:`Last ${t=(0,nY.parseDurationString)(e),n={delimiter:", "},r=n?.locale??n2.locale??n1,i=n?.format??n5,o=n?.zero??!1,a=n?.delimiter??" ",!r.formatDistance?"":i.reduce((e,n)=>{let i=`x${n.replace(/(^.)/,e=>e.toUpperCase())}`,a=t[n];return void 0!==a&&(o||t[n])?e.concat(r.formatDistance(i,a)):e},[]).join(a)}`}}function n3(){return["local","UTC",...Intl.supportedValuesOf?.("timeZone")??[]].filter((e,t,n)=>n.indexOf(e)===t).map(e=>({value:e,display:"local"===e?"Local":e.replace(/_/g," ")}))}function n6(e,t){return"read"===e?"View":t&&"create"===e?"Add":t||"create"!==e?"update"===e?"Edit":"":"Create"}function n8(e,t){return t&&"create"===e?"Add":t&&"update"===e?"Apply":t?"":"Save"}let n9=["bottom","right"],n7=["list","table"],re=["small","medium"];function rt(e){return n9.includes(e)}function rn(e){return n7.includes(e)}function rr(e){return re.includes(e)}let ri={position:"bottom",mode:"list",size:"medium"};function ro(e){return void 0===e?ri.position:rt(e)?e:ri.position}function ra(e){return e&&rn(e)?e:ri.mode}function rs(e){return e&&rr(e)?e:ri.size}let rl=new Map([["time",new Map],["decimal",new Map],["bits",new Map],["bytes",new Map],["currency",new Map],["percent",new Map],["temperature",new Map],["throughput",new Map]]);function ru(e,t,n,r="en-US"){let i=`${e.filter(e=>![void 0,null,"",NaN].includes(e)).join("|")}|${r}`,o=rl.get(t);if(!o)throw Error("No formatter found for the input type");let a=o.get(i);if(a)return a.format;let s=Intl.NumberFormat(r,n);return o?.set(`${i}`,s),s.format}let rc=()=>({countCacheItems:e=>"all"!==e?rl.get(e)?.size??0:Array.from(rl.values()).reduce((e,t)=>e+(t?.size??0),0),getKeys:e=>[...rl.get(e)?.keys()||[]]});function rd(e){return!1!==e}function rh(e){return"number"==typeof e}function rp(e){return e&&(e<0?e=0:e>20&&(e=20)),e}let rf="Time",rg={label:"Time",decimalPlaces:!0},rm={nanoseconds:{group:rf,label:"Nanoseconds"},microseconds:{group:rf,label:"Microseconds"},milliseconds:{group:rf,label:"Milliseconds"},seconds:{group:rf,label:"Seconds"},minutes:{group:rf,label:"Minutes"},hours:{group:rf,label:"Hours"},days:{group:rf,label:"Days"},weeks:{group:rf,label:"Weeks"},months:{group:rf,label:"Months"},years:{group:rf,label:"Years"}};var rv=((sA={}).nanoseconds="nanosecond",sA.microseconds="microsecond",sA.milliseconds="millisecond",sA.seconds="second",sA.minutes="minute",sA.hours="hour",sA.days="day",sA.weeks="week",sA.months="month",sA.years="year",sA);let ry={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},rx=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function rb(e,{unit:t,decimalPlaces:n}){var r;if(0===e)return"0s";let i=function(e,t){let n=e*ry[t],r=rx[0]||"years",i=r,o=n/ry[r];for(i of rx)if((o=n/ry[i])>=1)break;return{value:o,unit:i}}(e,t??"seconds"),o={style:"unit",unit:rv[i.unit],unitDisplay:"months"===(r=i.unit)||"years"===r?"long":"narrow"};return rh(n)?(o.minimumFractionDigits=rp(n),o.maximumFractionDigits=rp(n)):o.maximumSignificantDigits=3,ru([o.style,o.unit,o.unitDisplay,o.maximumSignificantDigits,n,t??"seconds"],"time",o,"en-US")(i.value)}var rw="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==n.g?n.g:"u">typeof self?self:{};function rS(){if(sP)return sE;sP=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return sE={unformat:function(n,r){let i,o=rM(),a=o.currentDelimiters(),s=o.currentCurrency().symbol,l=o.currentOrdinal(),u=o.getZeroFormat(),c=o.currentAbbreviations();if("string"==typeof n)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(n,a)){let e,t,r;t=+(e=n.split(":"))[0],r=+e[1],i=+e[2]+60*r+3600*t}else i=function(n,r,i="",o,a,s){if(""!==n)return n===a?0:function n(r,i,o,a,s,l,u){if(!isNaN(+r))return+r;let c="",d=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==r)return -1*n(d,i,o,a,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=r.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==r)return n(c,i,o,a,s,l)*u.factor}if((c=r.replace("%",""))!==r)return n(c,i,o,a,s,l)/100;let h=parseFloat(r);if(isNaN(h))return;let p=a(h);if(p&&"."!==p&&(c=r.replace(RegExp(`${t(p)}$`),""))!==r)return n(c,i,o,a,s,l);let f={};Object.keys(l).forEach(e=>{f[l[e]]=e});let g=Object.keys(f).sort().reverse(),m=g.length;for(let e=0;e<m;e++){let t=g[e],u=f[t];if((c=r.replace(t,""))!==r){let e;switch(u){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return n(c,i,o,a,s,l)*e}}}(n.replace(i,"").replace(RegExp(`([0-9])${t(r.thousands)}([0-9])`,"g"),"$1$2").replace(r.decimal,"."),r,i,o,a,s)}(n,a,s,l,u,c);else{if("number"!=typeof n)return;i=n}if(void 0!==i)return i}}}function rA(){if(sN)return sL;sN=1;let e=rS(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function o(e,t,r,i=!1){let a=Object.keys(e).map(i=>{if(!t[i])return console.error(`${r} Invalid key: ${i}`),!1;let a=e[i],s=t[i];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(a,n,`[Validate ${i}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${i} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:o}=s.restrictions[n];if(!t(a,e))return console.error(`${r} ${i} invalid value: ${o}`),!1}}return s.restriction&&!s.restriction(a,e)?(console.error(`${r} ${i} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(a)?(console.error(`${r} ${i} invalid value: must be among ${JSON.stringify(s.validValues)}, "${a}" provided`),!1):(!s.children||!!o(a,s.children,`[Validate ${i}]`))&&!0});return i||a.push(...Object.keys(t).map(n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0})),a.reduce((e,t)=>e&&t,!0)}function a(e){return o(e,n,"[Validate format]")}return sL={validate:function(e,t){let n=i(e),r=a(t);return n&&r},validateFormat:a,validateInput:i,validateLanguage:function(e){return o(e,r,"[Validate language]")}}}var rC=function(e,t={}){var n,r,i,o,a,s;let l,u,c,d,h;if("string"!=typeof e)return e;r=e=(l=(n=e).match(/^{([^}]*)}/))?(t.prefix=l[1],n.slice(l[0].length)):n,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(u=r.match(/{([^}]*)}$/))?(t.postfix=u[1],r.slice(0,-u[0].length)):r,t),(c=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+c[0]),(d=e.split(".")[0].match(/0+/))&&(t.characteristic=d[0].length),-1!==(i=e).indexOf(".")&&(t.optionalCharacteristic=-1===i.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(o=e).indexOf("K")?t.forceAverage="thousand":-1!==o.indexOf("M")?t.forceAverage="million":-1!==o.indexOf("B")?t.forceAverage="billion":-1!==o.indexOf("T")&&(t.forceAverage="trillion");let p=e.split(".")[1];if(p){let e=p.match(/0+/);e&&(t.mantissa=e[0].length)}return(a=e).match(/\[\.]/)?t.optionalMantissa=!0:a.match(/\./)&&(t.optionalMantissa=!1),(h=e.split(".")[1])&&(t.trimMantissa=-1!==h.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(s=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),s.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function rM(){let e;if(sz)return sB;sz=1;let t=sR?sO:(sR=1,sO={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),n=rA(),r={},i={},o=null,a={};function s(){return i[e]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>e,r.currentBytes=()=>s().bytes||{},r.currentCurrency=()=>s().currency,r.currentAbbreviations=()=>s().abbreviations,r.currentDelimiters=()=>s().delimiters,r.currentOrdinal=()=>s().ordinal,r.currentDefaults=()=>Object.assign({},s().defaults,a),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().timeFormat),r.setDefaults=e=>{e=rC(e),n.validateFormat(e)&&(a=e)},r.getZeroFormat=()=>o,r.setZeroFormat=e=>o="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==o,r.languageData=e=>{if(e){if(i[e])return i[e];throw Error(`Unknown tag "${e}"`)}return s()},r.registerLanguage=(t,r=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");i[t.languageTag]=t,r&&(e=t.languageTag)},r.setLanguage=(n,r=t.languageTag)=>{if(!i[n]){let t=n.split("-")[0],o=Object.keys(i).find(e=>e.split("-")[0]===t);return i[o]?void(e=o):void(e=r)}e=n},r.registerLanguage(t),e=t.languageTag,sB=r}var rk={exports:{}};(function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function u(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var n,r,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function d(e,t,n,r){if(e<t||e>n||e!==i(e))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function h(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function f(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var g,m,v,y,x,b,w,S,A,C=z.prototype={constructor:z,toString:null,valueOf:null},M=new z(1),k=20,T=4,_=-7,I=21,D=-1e7,O=1e7,R=!1,E=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function z(e,t){var r,o,s,l,u,c,h,p,f=this;if(!(f instanceof z))return new z(e,t);if(null==t){if(e&&!0===e._isBigNumber){f.s=e.s,!e.c||e.e>O?f.c=f.e=null:e.e<D?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>O?f.c=f.e=null:(f.e=l,f.c=[e]);return}p=String(e)}else{if(!n.test(p=String(e)))return A(f,p,c);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(u=p.search(/e/i))>0?(l<0&&(l=u),l+=+p.slice(u+1),p=p.substring(0,u)):l<0&&(l=p.length)}else{if(d(t,2,N.length,"Base"),10==t&&B)return $(f=new z(e),k+f.e+1,T);if(p=String(e),c="number"==typeof e){if(0*e!=0)return A(f,p,c,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,z.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=N.slice(0,t),l=u=0,h=p.length;u<h;u++)if(0>r.indexOf(o=p.charAt(u))){if("."==o){if(u>l){l=h;continue}}else if(!s&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){s=!0,u=-1,l=0;continue}return A(f,String(e),c,t)}c=!1,(l=(p=S(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(u=0;48===p.charCodeAt(u);u++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(u,++h)){if(h-=u,c&&z.DEBUG&&h>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(a+f.s*e);if((l=l-u-1)>O)f.c=f.e=null;else if(l<D)f.c=[f.e=0];else{if(f.e=l,f.c=[],u=(l+1)%14,l<0&&(u+=14),u<h){for(u&&f.c.push(+p.slice(0,u)),h-=14;u<h;)f.c.push(+p.slice(u,u+=14));u=14-(p=p.slice(u)).length}else u-=h;for(;u--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,o,a,s,l;if(null==n?n=T:d(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)l=u(e.c),l=1==r||2==r&&(a<=_||a>=I)?p(l,a):f(l,a,"0");else if(o=(e=$(new z(e),t,n)).e,s=(l=u(e.c)).length,1==r||2==r&&(t<=o||o<=_)){for(;s<t;l+="0",s++);l=p(l,o)}else if(t-=a,l=f(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function F(e,t){for(var n,r,i=1,o=new z(e[0]);i<e.length;i++)(r=new z(e[i])).s&&(n=c(o,r))!==t&&(0!==n||o.s!==t)||(o=r);return o}function V(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>O?e.c=e.e=null:n<D?e.c=[e.e=0]:(e.e=n,e.c=t),e}function $(e,t,n,o){var a,l,u,c,d,h,p,f=e.c;if(f){e:{for(a=1,c=f[0];c>=10;c/=10,a++);if((l=t-a)<0)l+=14,u=t,p=i((d=f[h=0])/s[a-u-1]%10);else if((h=r((l+1)/14))>=f.length)if(o){for(;f.length<=h;f.push(0));d=p=0,a=1,l%=14,u=l-14+1}else break e;else{for(a=1,d=c=f[h];c>=10;c/=10,a++);l%=14,p=(u=l-14+a)<0?0:i(d/s[a-u-1]%10)}if(o=o||t<0||null!=f[h+1]||(u<0?d:d%s[a-u-1]),o=n<4?(p||o)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(l>0?u>0?d/s[a-u]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,o?(t-=e.e+1,f[0]=s[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==l?(f.length=h,c=1,h--):(f.length=h+1,c=s[14-l],f[h]=u>0?i(d/s[a-u]%s[u])*c:0),o)for(;;)if(0==h){for(l=1,u=f[0];u>=10;u/=10,l++);for(u=f[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==f[0]&&(f[0]=1));break}else{if(f[h]+=c,1e14!=f[h])break;f[h--]=0,c=1}for(l=f.length;0===f[--l];f.pop());}e.e>O?e.c=e.e=null:e.e<D&&(e.c=[e.e=0])}return e}function H(e){var t,n=e.e;return null===n?e.toString():(t=u(e.c),t=n<=_||n>=I?p(t,n):f(t,n,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,n;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(d(n=e[t],0,1e9,t),k=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(d(n=e[t],0,8,t),T=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(d(n[0],-1e9,0,t),d(n[1],0,1e9,t),_=n[0],I=n[1]):(d(n,-1e9,1e9,t),_=-(I=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)d(n[0],-1e9,-1,t),d(n[1],1,1e9,t),D=n[0],O=n[1];else if(d(n,-1e9,1e9,t),n)D=-(O=n<0?-n:n);else throw Error(o+t+" cannot be zero: "+n);if(e.hasOwnProperty(t="CRYPTO"))if(!!(n=e[t])===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))R=n;else throw R=!n,Error(o+"crypto unavailable");else R=n;else throw Error(o+t+" not true or false: "+n);if(e.hasOwnProperty(t="MODULO_MODE")&&(d(n=e[t],0,9,t),E=n),e.hasOwnProperty(t="POW_PRECISION")&&(d(n=e[t],0,1e9,t),P=n),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(n=e[t]))L=n;else throw Error(o+t+" not an object: "+n);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);B="0123456789"==n.slice(0,10),N=n}}else throw Error(o+"Object expected: "+e);return{DECIMAL_PLACES:k,ROUNDING_MODE:T,EXPONENTIAL_AT:[_,I],RANGE:[D,O],CRYPTO:R,MODULO_MODE:E,POW_PRECISION:P,FORMAT:L,ALPHABET:N}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,n,r=e.c,a=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(r)){if((1===s||-1===s)&&a>=-1e9&&a<=1e9&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return F(arguments,-1)},z.minimum=z.min=function(){return F(arguments,1)},g=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},z.random=function(e){var t,n,a,l,u,c=0,h=[],p=new z(M);if(null==e?e=k:d(e,0,1e9),l=r(e/14),R)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));c<l;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(h.push(u%1e14),c+=2);c=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);c<l;)(u=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(h.push(u%1e14),c+=7);c=l/7}else throw R=!1,Error(o+"crypto unavailable");if(!R)for(;c<l;)(u=g())<9e15&&(h[c++]=u%1e14);for(l=h[--c],e%=14,l&&e&&(u=s[14-e],h[c]=i(l/u)*u);0===h[c];h.pop(),c--);if(c<0)h=[a=0];else{for(a=-1;0===h[0];h.splice(0,1),a-=14);for(c=1,u=h[0];u>=10;u/=10,c++);c<14&&(a-=14-c)}return p.e=a,p.c=h,p},z.sum=function(){for(var e=1,t=arguments,n=new z(t[0]);e<t.length;)n=n.plus(t[e++]);return n},S=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,d,h,p,g,m,v=n.indexOf("."),y=k,x=T;for(v>=0&&(d=P,P=0,n=n.replace(".",""),p=(m=new z(r)).pow(n.length-v),P=d,m.c=t(f(u(p.c),p.e,"0"),10,i,e),m.e=m.c.length),c=d=(g=t(n,r,i,a?(s=N,e):(s=e,N))).length;0==g[--d];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(p.c=g,p.e=c,p.s=o,g=(p=w(p,m,y,x,i)).c,h=p.r,c=p.e),v=g[l=c+y+1],d=i/2,h=h||l<0||null!=g[l+1],h=x<4?(null!=v||h)&&(0==x||x==(p.s<0?3:2)):v>d||v==d&&(4==x||h||6==x&&1&g[l-1]||x==(p.s<0?8:7)),l<1||!g[0])n=h?f(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(g.length=l,h)for(--i;++g[--l]>i;)g[l]=0,l||(++c,g=[1].concat(g));for(d=g.length;!g[--d];);for(v=0,n="";v<=d;n+=s.charAt(g[v++]));n=f(n,c,s.charAt(0))}return n}}(),w=function(){function e(e,t,n){var r,i,o,a,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)r=c*(o=e[l]%1e7)+(a=e[l]/1e7|0)*u,s=((i=u*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,e[l]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,a,s,u){var c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T=r.s==o.s?1:-1,_=r.c,I=o.c;if(!_||!_[0]||!I||!I[0])return new z(!r.s||!o.s||(_?I&&_[0]==I[0]:!I)?NaN:_&&0==_[0]||!I?0*T:T/0);for(y=(v=new z(T)).c=[],T=a+(d=r.e-o.e)+1,u||(u=1e14,d=l(r.e/14)-l(o.e/14),T=T/14|0),h=0;I[h]==(_[h]||0);h++);if(I[h]>(_[h]||0)&&d--,T<0)y.push(1),p=!0;else{for(A=_.length,M=I.length,h=0,T+=2,(f=i(u/(I[0]+1)))>1&&(I=e(I,f,u),_=e(_,f,u),M=I.length,A=_.length),S=M,b=(x=_.slice(0,M)).length;b<M;x[b++]=0);k=[0].concat(k=I.slice()),C=I[0],I[1]>=u/2&&C++;do{if(f=0,(c=t(I,x,M,b))<0){if(w=x[0],M!=b&&(w=w*u+(x[1]||0)),(f=i(w/C))>1)for(f>=u&&(f=u-1),m=(g=e(I,f,u)).length,b=x.length;1==t(g,x,m,b);)f--,n(g,M<m?k:I,m,u),m=g.length,c=1;else 0==f&&(c=f=1),m=(g=I.slice()).length;if(m<b&&(g=[0].concat(g)),n(x,g,b,u),b=x.length,-1==c)for(;1>t(I,x,M,b);)f++,n(x,M<b?k:I,b,u),b=x.length}else 0===c&&(f++,x=[0]);y[h++]=f,x[0]?x[b++]=_[S]||0:(x=[_[S]],b=1)}while((S++<A||null!=x[0])&&T--);p=null!=x[0],y[0]||y.splice(0,1)}if(1e14==u){for(h=1,T=y[0];T>=10;T/=10,h++);$(v,a+(v.e=h+14*d-1)+1,s,p)}else v.e=d,v.r=+p;return v}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,A=function(e,t,n,r){var i,a=n?t:t.replace(b,"");if(x.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(m,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,a=a.replace(v,"$1").replace(y,"0.$1")),t!=a))return new z(a,i);if(z.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},C.absoluteValue=C.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return c(this,new z(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,r,i;if(null!=e)return d(e,0,1e9),null==t?t=T:d(t,0,8),$(new z(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-l(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},C.dividedBy=C.div=function(e,t){return w(this,new z(e,t),k,T)},C.dividedToIntegerBy=C.idiv=function(e,t){return w(this,new z(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,a,s,l,u,c,d,p,f,g=this;if((e=new z(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+H(e));if(null!=t&&(t=new z(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return f=new z(Math.pow(+H(g),c?e.s*(2-h(e)):+H(e))),t?f.mod(t):f;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(a=!d&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&h(e)?-0:0,g.e>-1&&(l=1/l),new z(d?1/l:l);P&&(l=r(P/14+2))}for(c?(n=new z(.5),d&&(e.s=1),p=h(e)):p=(s=Math.abs(+H(e)))%2,f=new z(M);;){if(p){if(!(f=f.times(g)).c)break;l?f.c.length>l&&(f.c.length=l):a&&(f=f.mod(t))}if(s){if(0===(s=i(s/2)))break;p=s%2}else if($(e=e.times(n),e.e+1,1),e.e>14)p=h(e);else{if(0==(s=+H(e)))break;p=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):a&&(g=g.mod(t))}return a?f:(d&&(f=M.div(f)),t?f.mod(t):l?$(f,P,T,u):f)},C.integerValue=function(e){var t=new z(this);return null==e?e=T:d(e,0,8),$(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===c(this,new z(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return c(this,new z(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=c(this,new z(e,t)))||0===t},C.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return 0>c(this,new z(e,t))},C.isLessThanOrEqualTo=C.lte=function(e,t){return -1===(t=c(this,new z(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var n,r,i,o,a=this.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,c=this.c,d=e.c;if(!s||!u){if(!c||!d)return c?(e.s=-t,e):new z(d?this:NaN);if(!c[0]||!d[0])return d[0]?(e.s=-t,e):new z(c[0]?this:3==T?-0:0)}if(s=l(s),u=l(u),c=c.slice(),a=s-u){for((o=a<0)?(a=-a,i=c):(u=s,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=d.length))?a:t,a=t=0;t<r;t++)if(c[t]!=d[t]){o=c[t]<d[t];break}if(o&&(i=c,c=d,d=i,e.s=-e.s),(t=(r=d.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=1e14-1;r>a;){if(c[--r]<d[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=1e14}c[r]-=d[r]}for(;0==c[0];c.splice(0,1),--u);return c[0]?V(e,c,u):(e.s=3==T?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var n,r;return(e=new z(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==E?(r=e.s,e.s=1,n=w(this,e,0,3),e.s=r,n.s*=r):n=w(this,e,0,E),(e=this.minus(n.times(e))).c[0]||1!=E||(e.s=this.s),e):new z(this):new z(NaN)},C.multipliedBy=C.times=function(e,t){var n,r,i,o,a,s,u,c,d,h,p,f,g,m=this.c,v=(e=new z(e,t)).c;if(!m||!v||!m[0]||!v[0])return this.s&&e.s&&(!m||m[0]||v)&&(!v||v[0]||m)?(e.s*=this.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(r=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=m.length)<(h=v.length)&&(g=m,m=v,v=g,i=u,u=h,h=i),i=u+h,g=[];i--;g.push(0));for(i=h;--i>=0;){for(n=0,p=v[i]%1e7,f=v[i]/1e7|0,o=i+(a=u);o>i;)s=f*(c=m[--a]%1e7)+(d=m[a]/1e7|0)*p,n=((c=p*c+s%1e7*1e7+g[o]+n)/1e14|0)+(s/1e7|0)+f*d,g[o--]=c%1e14;g[o]=n}return n?++r:g.splice(0,1),V(e,g,r)},C.negated=function(){var e=new z(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this.s;if(t=(e=new z(e,t)).s,!r||!t)return new z(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new z(r/0);if(!a[0]||!s[0])return s[0]?e:new z(a[0]?this:0*r)}if(i=l(i),o=l(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return r&&(a=[r].concat(a),++o),V(e,a,o)},C.precision=C.sd=function(e,t){var n,r,i;if(null!=e&&!!e!==e)return d(e,1,1e9),null==t?t=T:d(t,0,8),$(new z(this),e,t);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},C.shiftedBy=function(e){return d(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o=this.c,a=this.s,s=this.e,c=k+4,d=new z("0.5");if(1!==a||!o||!o[0])return new z(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+H(this)))||a==1/0?(((t=u(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=l((s+1)/2)-(s<0||s%2),n=new z(t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new z(a+""),n.c[0]){for((a=(s=n.e)+c)<3&&(a=0);;)if(i=n,n=d.times(i.plus(w(this,i,c,1))),u(i.c).slice(0,a)===(t=u(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||($(n,n.e+k+2,1),e=!n.times(n).eq(this));break}if(!r&&($(i,i.e+k+2,0),i.times(i).eq(this))){n=i;break}c+=4,a+=4,r=1}}return $(n,n.e+k+1,T,e)},C.toExponential=function(e,t){return null!=e&&(d(e,0,1e9),e++),j(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(d(e,0,1e9),e=e+this.e+1),j(this,e,t)},C.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,a=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=a[0],d=a[1],h=this.s<0,p=h?c.slice(1):c,f=p.length;if(l&&(i=s,s=l,l=i,f-=i),s>0&&f>0){for(i=f%s||s,c=p.substr(0,i);i<f;i+=s)c+=u+p.substr(i,s);l>0&&(c+=u+p.slice(i)),h&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},C.toFraction=function(e){var t,n,r,i,a,l,c,d,h,p,f,g,m=this.c;if(null!=e&&(!(c=new z(e)).isInteger()&&(c.c||1!==c.s)||c.lt(M)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+H(c));if(!m)return new z(this);for(t=new z(M),h=n=new z(M),r=d=new z(M),g=u(m),a=t.e=g.length-this.e-1,t.c[0]=s[(l=a%14)<0?14+l:l],e=!e||c.comparedTo(t)>0?a>0?t:h:c,l=O,O=1/0,c=new z(g),d.c[0]=0;p=w(c,t,0,1),1!=(i=n.plus(p.times(r))).comparedTo(e);)n=r,r=i,h=d.plus(p.times(i=h)),d=i,t=c.minus(p.times(i=t)),c=i;return i=w(e.minus(n),r,0,1),d=d.plus(i.times(h)),n=n.plus(i.times(r)),d.s=h.s=this.s,a*=2,f=1>w(h,r,a,T).minus(this).abs().comparedTo(w(d,n,a,T).minus(this).abs())?[h,r]:[d,n],O=l,f},C.toNumber=function(){return+H(this)},C.toPrecision=function(e,t){return null!=e&&d(e,1,1e9),j(this,e,t,2)},C.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=_||i>=I?p(u(n.c),i):f(u(n.c),i,"0"):10===e&&B?t=f(u((n=$(new z(n),k+i+1,T)).c),n.e,"0"):(d(e,2,N.length,"Base"),t=S(f(u(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return H(this)},C._isBigNumber=!0,null!=t&&z.set(t),z}()).default=t.BigNumber=t,rk.exports?rk.exports=t:(e||(e="u">typeof self&&self?self:window),e.BigNumber=t)})(rw);var rT=rk.exports;let r_=rM(),rI=rA(),rD={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},rO={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:rR,decimalSuffixes:rE}=r_.currentBytes(),rP={scale:1024,suffixes:rE,marker:"bd"},rL={scale:1024,suffixes:rR,marker:"b"},rN={scale:1e3,suffixes:rE,marker:"d"};function rB(e,t,n){let r=t[0],i=Math.abs(e);if(i>=n){for(let o=1;o<t.length;++o){let a=Math.pow(n,o),s=Math.pow(n,o+1);if(i>=a&&i<s){r=t[o],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function rz(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function rj({instance:e,providedFormat:t,state:n=r_,decimalSeparator:r,defaults:i=n.currentDefaults()}){var o,a,s,l,u;let c,d,h,p,f,g,m,v=e._value;if(0===v&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(v))return v.toString();let y=Object.assign({},rO,i,t),x=y.totalLength,b=x?0:y.characteristic,w=y.optionalCharacteristic,S=y.forceAverage,A=y.lowPrecision,C=!!x||!!S||y.average,M=x?-1:C&&void 0===t.mantissa?0:y.mantissa,k=!x&&(void 0===t.optionalMantissa?-1===M:y.optionalMantissa),T=y.trimMantissa,_=y.thousandSeparated,I=y.spaceSeparated,D=y.negative,O=y.forceSign,R=y.exponential,E=y.roundingFunction,P="";if(C){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&r[t]&&rD[t]?(s=r[t],e/=rD[t]):l>=rD.trillion||n&&1===a(l/rD.trillion)?(s=r.trillion,e/=rD.trillion):l<rD.trillion&&l>=rD.billion||n&&1===a(l/rD.billion)?(s=r.billion,e/=rD.billion):l<rD.billion&&l>=rD.million||n&&1===a(l/rD.million)?(s=r.million,e/=rD.million):(l<rD.million&&l>=rD.thousand||n&&1===a(l/rD.thousand))&&(s=r.thousand,e/=rD.thousand),s&&(s=(i?" ":"")+s),o){let t=e<0,n=e.toString().split(".")[0];u=Math.max(o-(t?n.length-1:n.length),0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:v,forceAverage:S,lowPrecision:A,abbreviations:n.currentAbbreviations(),spaceSeparated:I,roundingFunction:E,totalLength:x});v=e.value,P+=e.abbreviation,x&&(M=e.mantissaPrecision)}if(R){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),i=+n;return t&&1<t&&(i*=Math.pow(10,t-1),r-=t-1,r=r>=0?`+${r}`:r),{value:i,abbreviation:`e${r}`}}({value:v,characteristicPrecision:b});v=e.value,P=e.abbreviation+P}let L=function(e,t,n,r,i,o){if(-1===r)return e;let a=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,i]=n.split("e"),[o,a=""]=r.split(".");if(+i>0)n=o+a+rz(i-a.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let r=(rz(-i-1)+Math.abs(o)+a).substr(0,t);r.length<t&&(r+=rz(t-r.length)),n=e+r}return+i>0&&t>0&&(n+=`.${rz(t)}`),n}(e,t):new rT(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,o),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||i))return s;let u=l.match(/0+$/);return i&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(v.toString(),v,k,M,T,E);return o=L=function(e,t,n,r){let i=e,[o,a]=i.toString().split(".");if(o.match(/^-?0$/)&&n)return a?`${o.replace("0","")}.${a}`:o.replace("0","");let s=t<0&&0===o.indexOf("-");if(s&&(o=o.slice(1),i=i.slice(1)),o.length<r){let e=r-o.length;for(let t=0;t<e;t++)i=`0${i}`}return s&&(i=`-${i}`),i.toString()}(L,v,w,b),a=v,s=r,d=(c=n.currentDelimiters()).thousands,s=s||c.decimal,h=c.thousandsSize||3,f=(p=o.toString()).split(".")[0],g=p.split(".")[1],m=a<0&&0===f.indexOf("-"),_&&(m&&(f=f.slice(1)),(function(e,t){let n=[],r=0;for(let i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;return n})(f.length,h).forEach((e,t)=>{f=f.slice(0,e+t)+d+f.slice(e+t)}),m&&(f=`-${f}`)),L=p=g?f+s+g:f,(C||R)&&(L+=P),(O||v<0)&&(l=L,L=0===(u=v)?l:0==+l?l.replace("-",""):u>0?`+${l}`:"sign"===D?l:`(${l.replace("-","")})`),L}function rF(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function rV(e,t,n){let r=new rT(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new rT(i),e._value=r.minus(i).toNumber(),e}let r$=rM(),rH=rA(),rW={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}t&&rZ.registerLanguage(t)})}},rG=rS(),rU={format:(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=rC(t)),!rI.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",i=t.postfix||"",o=function(e,t,n){var r,i,o;switch(t.output){case"currency":let a,s,l,u,c,d,h,p,f,g;return r=t=rF(t,r_.currentCurrencyDefaultFormat()),a=r_.currentCurrency(),l=Object.assign({},rO,s=Object.assign({},r)),c="",d=!!l.totalLength||!!l.forceAverage||l.average,h=s.currencyPosition||a.position,p=s.currencySymbol||a.symbol,f=void 0!==l.spaceSeparatedCurrency?l.spaceSeparatedCurrency:l.spaceSeparated,void 0===s.lowPrecision&&(s.lowPrecision=!1),f&&(c=" "),"infix"===h&&(u=c+p+c),g=rj({instance:e,providedFormat:s,state:r_,decimalSeparator:u}),"prefix"===h&&(g=e._value<0&&"sign"===l.negative?`-${c}${p}${g.slice(1)}`:e._value>0&&l.forceSign?`+${c}${p}${g.slice(1)}`:p+c+g),h&&"postfix"!==h||(g=g+(c=!l.spaceSeparatedAbbreviation&&d?"":c)+p),g;case"percent":let m,v,y;return i=t=rF(t,r_.currentPercentageDefaultFormat()),m=i.prefixSymbol,v=rj({instance:n(100*e._value),providedFormat:i,state:r_}),y=Object.assign({},rO,i),m?`%${y.spaceSeparated?" ":""}${v}`:`${v}${y.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,r){let i=t.base||"binary",o=Object.assign({},rO,t),{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes(),l={general:{scale:1024,suffixes:s||rE,marker:"bd"},binary:{scale:1024,suffixes:a||rR,marker:"b"},decimal:{scale:1e3,suffixes:s||rE,marker:"d"}}[i],{value:u,suffix:c}=rB(e._value,l.suffixes,l.scale),d=rj({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${o.spaceSeparated?" ":""}${c}`}(e,t=rF(t,r_.currentByteDefaultFormat()),r_,n);case"time":let x,b,w;return t=rF(t,r_.currentTimeDefaultFormat()),x=Math.floor(e._value/60/60),b=Math.floor((e._value-60*x*60)/60),w=Math.round(e._value-60*x*60-60*b),`${x}:${b<10?"0":""}${b}:${w<10?"0":""}${w}`;case"ordinal":let S,A,C,M;return o=t=rF(t,r_.currentOrdinalDefaultFormat()),S=r_.currentOrdinal(),A=Object.assign({},rO,o),C=rj({instance:e,providedFormat:o,state:r_}),M=S(e._value),`${C}${A.spaceSeparated?" ":""}${M}`;default:return rj({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=r+o)+i})(...e,rZ),getByteUnit:(...e)=>(function(e){return rB(e._value,rP.suffixes,rP.scale).suffix})(...e),getBinaryByteUnit:(...e)=>(function(e){return rB(e._value,rL.suffixes,rL.scale).suffix})(...e),getDecimalByteUnit:(...e)=>(function(e){return rB(e._value,rN.suffixes,rN.scale).suffix})(...e),formatOrDefault:rF},rq={add:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.plus(r).toNumber(),e},subtract:(e,t)=>rV(e,t,rZ),multiply:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.times(r).toNumber(),e},divide:(e,t)=>{let n,r;return n=new rT(e._value),r=t,rZ.isNumbro(t)&&(r=t._value),r=new rT(r),e._value=n.dividedBy(r).toNumber(),e},set:(e,t)=>{let n;return n=t,rZ.isNumbro(t)&&(n=t._value),e._value=n,e},difference:(e,t)=>{let n;return rV(n=rZ(e._value),t,rZ),Math.abs(n._value)},BigNumber:rT};class rY{constructor(e){this._value=e}clone(){return rZ(this._value)}format(e={}){return rU.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=rC(e)),(e=rU.formatOrDefault(e,r$.currentCurrencyDefaultFormat())).output="currency",rU.format(this,e)}formatTime(e={}){return e.output="time",rU.format(this,e)}binaryByteUnits(){return rU.getBinaryByteUnit(this)}decimalByteUnits(){return rU.getDecimalByteUnit(this)}byteUnits(){return rU.getByteUnit(this)}difference(e){return rq.difference(this,e)}add(e){return rq.add(this,e)}subtract(e){return rq.subtract(this,e)}multiply(e){return rq.multiply(this,e)}divide(e){return rq.divide(this,e)}set(e){return rq.set(this,rX(e))}value(){return this._value}valueOf(){return this._value}}function rX(e){let t=e;return rZ.isNumbro(e)?t=e._value:"string"==typeof e?t=rZ.unformat(e):isNaN(e)&&(t=NaN),t}function rZ(e){return new rY(rX(e))}rZ.version="2.5.0",rZ.isNumbro=function(e){return e instanceof rY},rZ.language=r$.currentLanguage,rZ.registerLanguage=r$.registerLanguage,rZ.setLanguage=r$.setLanguage,rZ.languages=r$.languages,rZ.languageData=r$.languageData,rZ.zeroFormat=r$.setZeroFormat,rZ.defaultFormat=r$.currentDefaults,rZ.setDefaults=r$.setDefaults,rZ.defaultCurrencyFormat=r$.currentCurrencyDefaultFormat,rZ.validate=rH.validate,rZ.loadLanguagesInNode=rW.loadLanguagesInNode,rZ.unformat=rG.unformat,rZ.BigNumber=rq.BigNumber;var rK=rZ&&rZ.__esModule&&Object.prototype.hasOwnProperty.call(rZ,"default")?rZ.default:rZ;let rQ={label:"Bits",decimalPlaces:!0,shortValues:!0},rJ={bits:{group:"Bits",label:"Bits (IEC)"},decbits:{group:"Bits",label:"Bits (SI)"}};function r0(e,{unit:t="bits",shortValues:n,decimalPlaces:r}){let i="decbits"===t;if(!rd(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"decimal",useGrouping:!0};rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.maximumSignificantDigits,r,n,t];return`${ru(o,"bits",i,"en-US")(e)} bits`}return rK(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:rh(r)?r:2,trimMantissa:!rh(r),optionalMantissa:!rh(r)}).replace(/KB/g,"Kb").replace(/MB/g,"Mb").replace(/GB/g,"Gb").replace(/TB/g,"Tb").replace(/PB/g,"Pb").replace(/EB/g,"Eb").replace(/KiB/g,"Kib").replace(/MiB/g,"Mib").replace(/GiB/g,"Gib").replace(/TiB/g,"Tib").replace(/PiB/g,"Pib").replace(/EiB/g,"Eib")}let r1={label:"Bytes",decimalPlaces:!0,shortValues:!0},r2={bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"}};function r5(e,{unit:t="bytes",shortValues:n,decimalPlaces:r}){let i="decbytes"===t;if(!rd(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3),ru([i.style,i.unit,i.unitDisplay,i.useGrouping,i.maximumSignificantDigits,r,n,t],"bytes",i,"en-US")(e)}return rK(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:rh(r)?r:2,trimMantissa:!rh(r),optionalMantissa:!rh(r)})}var r4=n(40224);let r3="Currency",r6={label:"Currency",decimalPlaces:!0},r8={aud:{group:r3,label:"Australian Dollar (A$)"},cad:{group:r3,label:"Canadian Dollar (CA$)"},chf:{group:r3,label:"Swiss Franc (CHF)"},cny:{group:r3,label:"Renminbi (CN\xa5)"},eur:{group:r3,label:"Euro (€)"},gbp:{group:r3,label:"Pound (\xa3)"},hkd:{group:r3,label:"Hong Kong Dollar (HK$)"},inr:{group:r3,label:"Indian Rupee (₹)"},jpy:{group:r3,label:"Yen (\xa5)"},krw:{group:r3,label:"South Korean Won (₩)"},nok:{group:r3,label:"Norwegian Krone (NOK)"},nzd:{group:r3,label:"New Zealand Dollar (NZ$)"},sek:{group:r3,label:"Swedish Krona (SEK)"},sgd:{group:r3,label:"Singapore Dollar (S$)"},usd:{group:r3,label:"US Dollar ($)"}};function r9(e,{unit:t,decimalPlaces:n}){let r={style:"currency",currency:(0,r4.toUpper)(t),currencyDisplay:"symbol"};return rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3,ru([r.style,r.currency,r.currencyDisplay,r.maximumSignificantDigits,n,t],"currency",r,"en-US")(e)}let r7={label:"percent",decimalPlaces:!0},ie="Percent",it={percent:{group:ie,label:"Percent (0-100)"},"percent-decimal":{group:ie,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:ie,label:"%"}};function ir(e,{unit:t,decimalPlaces:n}){let r={style:"percent",useGrouping:!0};return rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3,"percent"===t&&(e/=100),ru([r.style,r.useGrouping,r.maximumSignificantDigits,n,t],"percent",r,"en-US")(e)}let ii="Temperature",io={label:ii,decimalPlaces:!0},ia={celsius:{group:ii,label:"Celsius (\xb0C)"},fahrenheit:{group:ii,label:"Fahrenheit (\xb0F)"}},is=(e,{unit:t,decimalPlaces:n})=>{let r={unit:t,style:"unit"};rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):r.maximumSignificantDigits=3;let i="celsius"===t?"en-GB":"en-US";return ru([r.style,r.unit,r.maximumSignificantDigits,n,i],"temperature",r,i)(e)},il={label:"Decimal",decimalPlaces:!0,shortValues:!0},iu={decimal:{group:"Decimal",label:"Decimal"}};function ic(e,{shortValues:t,decimalPlaces:n}){let r={style:"decimal",useGrouping:!0};return rd(t)&&(r.notation="compact"),rh(n)?(r.minimumFractionDigits=rp(n),r.maximumFractionDigits=rp(n)):rd(t)&&(r.maximumSignificantDigits=3),ru([r.style,r.useGrouping,r.notation,r.maximumSignificantDigits,n],"decimal",r,"en-US")(e)}let id={label:"Throughput",decimalPlaces:!0},ih="Throughput",ip={"bits/sec":{group:ih,label:"Bits/sec (IEC)"},"decbits/sec":{group:ih,label:"Bits/sec (SI)"},"bytes/sec":{group:ih,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:ih,label:"Bytes/sec (SI)"},"counts/sec":{group:ih,label:"Counts/sec"},"events/sec":{group:ih,label:"Events/sec"},"messages/sec":{group:ih,label:"Messages/sec"},"ops/sec":{group:ih,label:"Ops/sec"},"packets/sec":{group:ih,label:"Packets/sec"},"reads/sec":{group:ih,label:"Reads/sec"},"requests/sec":{group:ih,label:"Requests/sec"},"records/sec":{group:ih,label:"Records/sec"},"rows/sec":{group:ih,label:"Rows/sec"},"writes/sec":{group:ih,label:"Writes/sec"}};function ig(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bits/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return r0(e,{unit:"bits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbits/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return r0(e,{unit:"decbits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return r5(e,{unit:"decbytes",shortValues:n,decimalPlaces:r})+"/"+t}if("bytes/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return r5(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}let i={style:"decimal",useGrouping:!0};rd(n)&&(i.notation="compact"),rh(r)?(i.minimumFractionDigits=rp(r),i.maximumFractionDigits=rp(r)):rd(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.notation,i.maximumSignificantDigits,r,n,t];return`${ru(o,"throughput",i,"en-US")(e)} ${t}`}let im="Date",iv={Time:rg,Percent:r7,Decimal:il,Bytes:r1,Bits:rQ,Throughput:id,Currency:r6,Temperature:io,Date:{label:"Date & Time"}},iy={...rm,...it,...iu,...r2,...rJ,...ip,...r8,...ia,"datetime-iso":{group:im,label:"DateTime (GMT)"},"datetime-us":{group:im,label:"DateTime (US-East)"},"datetime-local":{group:im,label:"DateTime (Browser Local)"},"date-iso":{group:im,label:"Date (GMT)"},"date-us":{group:im,label:"Date (US-East)"},"date-local":{group:im,label:"Date (Browser Local)"},"time-local":{group:im,label:"Time (Browser Local)"},"time-iso":{group:im,label:"Time (GMT)"},"time-us":{group:im,label:"Time (US-East)"},"relative-time":{group:im,label:"Relative Time"},"unix-timestamp":{group:im,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:im,label:"Unix Timestamp (ms)"}};function ix(e,t){if(!t)return e.toString();if(ik(t))return r5(e,t);if(iT(t))return r0(e,t);if(iM(t))return ic(e,t);if(iC(t))return ir(e,t);if(iA(t))return rb(e,t);if(iD(t))return ig(e,t);if(iO(t))return r9(e,t);if(iR(t))return function(e,t={}){let n=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:r="datetime-local",locale:i=(()=>{if("u">typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){let e=navigator.languages[0];if(e)return e}let e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"})(),timeZone:o=n,referenceTime:a=Date.now()}=t;if("unix-timestamp"===r)return(e>1e12?Math.floor(e/1e3):e).toString();if("unix-timestamp-ms"===r)return Math.floor(e<1e11?1e3*e:e).toString();let s=function(e){if(e<0)if(Math.abs(e)>1e10)return new Date(e);else return new Date(1e3*e);if(e>=25e10&&e<=26e10){let t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return new Date(e<1e10?1e3*e:e)}(e);if("relative-time"===r){let e=new Date(a),t=s.getTime()-e.getTime();for(let{unit:e,ms:n}of[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}]){let r=Math.round(t/n);if(Math.abs(r)>=1)return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(r,e)}return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"second")}let l={timeZone:o};switch(r){case"datetime-iso":return s.toISOString();case"datetime-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return s.toISOString().split("T")[0];case"date-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",new Intl.DateTimeFormat("en-US",l).format(s);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return s.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);default:throw Error(`Unknown date unit: ${r}`)}return new Intl.DateTimeFormat(i,l).format(s)}(e,t);if(iE(t))return is(e,t);throw Error(`Unknown unit options ${t}`)}function ib(e){return iy[e.unit??"decimal"]}function iw(e){return ib(e).group??"Decimal"}function iS(e){return iv[ib(e).group??"Decimal"]}function iA(e){return"Time"===iw(e)}function iC(e){return"Percent"===iw(e)}function iM(e){return"Decimal"===iw(e)}function ik(e){return"Bytes"===iw(e)}function iT(e){return"Bits"===iw(e)}function i_(e){return!!iS(e).decimalPlaces}function iI(e){return!!iS(e).shortValues}function iD(e){return"Throughput"===iw(e)}function iO(e){return"Currency"===iw(e)}function iR(e){return"Date"===iw(e)}function iE(e){return"Temperature"===iw(e)}let iP={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series",ExtractColumnFields:"Extract column fields"};function iL(e,t){return[nG({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t)}},e)]}function iN(e,t,n,r){let i=[],o=nG({type:"value",position:"left",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t),overflow:"truncate"}},e);i.push(o);let a=0;return n.forEach((t,n)=>{let o,s,l={type:"value",position:"right",offset:a,boundaryGap:[0,"10%"],axisLabel:{formatter:e=>ix(e,t)},splitLine:{show:!1},show:e?.show};i.push(l),r&&(a+=(o=ix(r[n]??1e3,t),((s=document.createElement("canvas").getContext("2d"))?(s.font="12px sans-serif",s.measureText(o).width):6*o.length)+10))}),i}function iB(e,t){let{value:n,setValueAndStore:r}=function(e,t,n){let[r,i]=(0,I.useState)(()=>{try{let n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n}),o=(0,I.useCallback)(n=>{i(n),e.setItem(t,JSON.stringify(n))},[i,e,t]);return{value:r,setValue:i,setValueAndStore:o}}(window.localStorage,e,t);return[n,r]}function iz(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function ij(e){e.dispatchAction({type:"restore"})}function iF(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function iV(e,t,n){if(void 0===n)return null;let r=[e,t];return n.containPixel("grid",r)?n.convertFromPixel("grid",r):null}function i$(e,t,n,r,i,o){let a=o.length>0?o[o.length-1]:i[i.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay"}),r.length>0&&e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function iH(e){return e[e.length-1]?.name===nU}function iW(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(let[i]of e){let e=Math.abs(i-t);e<r&&(n=i,r=e)}return n}function iG(e,t){if(void 0===t)return null;let n=e.length,r=null;for(let i=0;i<n;i++){let o=n>0?e[i]:null;if(!o)break;r=iW(o.values,t)}return r}function iU(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}function iq(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,I.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var iY=((sC={}).CSV="csv",sC.DISTRIBUTED="distributed",sC.DOUBLEQUOTE="doublequote",sC.GLOB="glob",sC.JSON="json",sC.LUCENE="lucene",sC.PERCENTENCODE="percentencode",sC.PIPE="pipe",sC.PROMETHEUS="prometheus",sC.RAW="raw",sC.REGEX="regex",sC.SINGLEQUOTE="singlequote",sC.SQLSTRING="sqlstring",sC.TEXT="text",sC.QUERYPARAM="queryparam",sC.REGEX_LITERAL="regexliteral",sC);function iX(e){if(!e)return;let t=e.toLowerCase();return Object.values(iY).find(e=>e===t)||void 0}function iZ(e,t,n){switch(n){case"csv":case"raw":return e.join(",");case"distributed":{let[n,...r]=e;return`${[n,...r.map(e=>`${t}=${e}`)].join(",")}`}case"doublequote":return e.map(e=>`"${e}"`).join(",");case"glob":return`{${e.join(",")}}`;case"json":return JSON.stringify(e.map(e=>{try{return JSON.parse(e)}catch{return e}}));case"lucene":return`(${e.map(e=>`"${e}"`).join(" OR ")})`;case"percentencode":return encodeURIComponent(e.join(","));case"pipe":return e.join("|");case"regex":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));return`(${t.join("|")})`}case"regexliteral":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\\\$&"));return`(${t.join("|")})`}case"singlequote":return e.map(e=>`'${e}'`).join(",");case"sqlstring":return e.map(e=>`'${e.replace(/'/g,"''")}'`).join(",");case"text":return e.join(" + ");case"queryparam":return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&");default:return`(${e.join("|")})`}}function iK(e,t,n,r){let i="$"+t,o="${"+t+(r?":"+r:"")+"}",a="";return Array.isArray(n)&&(a=iZ(n,t,r||"prometheus")),"string"==typeof n&&(a=iZ([n],t,r||"raw")),(e=e.replaceAll(i,a)).replaceAll(o,a)}let iQ=/\$(\w+)|\${(\w+)(?:\.([^:^}]+))?(?::([^}]+))?}/gm;function iJ(e){let t,n=new Set;for(;null!==(t=iQ.exec(e));)t&&(t[1]?n.add(t[1]):t[2]&&n.add(t[2]));return Array.from(n.values())}function i0(e){let t,n=new Map;for(;null!==(t=iQ.exec(e));)if(t){let e;t[4]&&(e=t[4]),t[1]?n.set(t[1],iX(e)):t[2]&&n.set(t[2],iX(e))}return n}function i1(e,t){let n=i0(e),r=Array.from(n.keys()),i=e;return r.toSorted((e,t)=>t.length-e.length).forEach(e=>{let r=t[e];r&&void 0!==r.value&&(i=iK(i,e,r?.value,n.get(e)))}),i}function i2(e,t){let n={};for(let[e,r]of Object.entries(t))n[e]=void 0===r.displayValue?r:{...r,value:r.displayValue};return i1(e,n)}let i5=/\$\{__data\.fields(?:\[(?:"|')([^"']+)(?:"|')\]|\.([a-zA-Z_][a-zA-Z0-9_]*))(?::([a-z]+))?\}/g,i4=/\$\{__data\[(\d+)\]\.fields\[(?:"|')([^"']+)(?:"|')\]\}/g,i3=/\$\{__data\.index\}/g,i6=/\$\{__data\.count\}/g,i8=/("|')?\$\{__data(?::([a-z]+))?\}("|')?/g;function i9(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}if(t.includes(".")){let n=t.split("."),r=e;for(let e of n){if(null==r||"object"!=typeof r)return"";r=r[e]}return null==r?"":"object"==typeof r?JSON.stringify(r):String(r)}return""}function i7(e){if(!e)return;let t=e.toLowerCase();return Object.values(iY).find(e=>e===t)}function oe(e,t,n={}){let{urlEncode:r=!0,index:i,count:o}=n,a=e,s=[];return void 0!==i&&(a=a.replaceAll(i3,String(i))),void 0!==o&&(a=a.replaceAll(i6,String(o))),a=a.replaceAll(i8,(e,n,r,i)=>{let o=i7(r)??iY.RAW;return o===iY.JSON?JSON.stringify(t):iZ(Object.values(t).map(e=>JSON.stringify(e)),"",o)}),i5.lastIndex=0,{text:a=a.replaceAll(i5,(e,n,i,o)=>{let a=n??i??"",l=i9(t,a);""===l&&void 0===t[a]&&s.push(`Field "${a}" not found in data`);let u=i7(o);if(u)return iZ([l],a,u);if(r){if(u===iY.RAW)return l;if(u!==iY.QUERYPARAM&&u!==iY.PERCENTENCODE)return encodeURIComponent(l)}return l}),errors:s.length>0?s:void 0}}function ot(e,t,n={}){let{urlEncode:r=!0}=n,i=e,o=[];return i=i.replaceAll(i6,String(t.length)),i4.lastIndex=0,i5.lastIndex=0,{text:i=(i=(i=i.replaceAll(i8,(e,n,r,i)=>{let o=i7(r)??iY.RAW,a=iZ(Object.values(t).map(e=>JSON.stringify(e)),"",o);return n&&i?a:`${n??""}${a}${i??""}`})).replaceAll(i4,(e,n,i)=>{let a=parseInt(n,10);if(a<0||a>=t.length)return o.push(`Index ${a} out of bounds (0-${t.length-1})`),e;let s=i9(t[a],i);return""===s&&void 0===t[a][i]&&o.push(`Field "${i}" not found in data at index ${a}`),r?encodeURIComponent(s):s})).replaceAll(i5,(e,n,r,i)=>{let o=n??r??"";return iZ(t.map(e=>i9(e,o)),o,i7(i)||iY.CSV)}),errors:o.length>0?o:void 0}}function on(e){return i4.lastIndex=0,i4.test(e)||/\$\{__data\.fields(?:\[["'][^"']+["']\]|\.[a-zA-Z_][a-zA-Z0-9_]*):[a-z]+\}/.test(e)}function or(e){return i4.lastIndex=0,i4.test(e)}function oi(e){return i5.lastIndex=0,i4.lastIndex=0,i5.test(e)||i4.test(e)}function oo(e){let t,n=new Set;for(i5.lastIndex=0,i4.lastIndex=0;null!==(t=i5.exec(e));)n.add(t[1]??t[2]);for(;null!==(t=i4.exec(e));)n.add(t[2]);return Array.from(n)}Symbol.for("constructDateFrom");let oa={},os={};function ol(e,t){try{let n=(oa[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];if(n in os)return os[n];return oc(n,n.split(":"))}catch{if(e in os)return os[e];let t=e?.match(ou);if(t)return oc(e,t.slice(1));return NaN}}let ou=/([+-]\d\d):?(\d\d)?/;function oc(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return os[e]=60*n+r>0?60*n+r+i:60*n-r-i}class od extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(ol(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),of(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new od(...t,e):new od(Date.now(),e)}withTimeZone(e){return new od(+this,e)}getTimezoneOffset(){let e=-ol(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),op(this),+this}[Symbol.for("constructDateFrom")](e){return new od(+new Date(e),this.timeZone)}}let oh=/^(get|set)(?!UTC)/;function op(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-(60*ol(e.timeZone,e))))}function of(e,t){var n;let r=Array.isArray(t)?Date.UTC((n=t)[0],n.length>1?n[1]:0,n.length>2?n[2]:1,...n.slice(3)):+e.internal,i=ol(e.timeZone,e),o=i>0?Math.floor(i):Math.ceil(i),a=new Date(+e);a.setUTCHours(a.getUTCHours()-1);let s=-new Date(+e).getTimezoneOffset(),l=-new Date(+a).getTimezoneOffset(),u=s;if(s-l&&s!==o&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=s-o;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=ol(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===o&&(u=l)}let c=u-o;c&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+c);let d=new Date(+e);d.setUTCSeconds(0);let h=s>0?d.getSeconds():(d.getSeconds()-60)%60,p=Math.round(-(60*ol(e.timeZone,e)))%60;(p||h)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+h);let f=ol(e.timeZone,e),g=f>0?Math.floor(f):Math.ceil(f),m=-new Date(+e).getTimezoneOffset()-g-c,v=g-o,y=v>0&&og(e)-r==60*v*1e3&&og(e,r-60*g*1e3)!==r;if(g!==o&&m&&!y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+m);let t=ol(e.timeZone,e),n=g-(t>0?Math.floor(t):Math.ceil(t));n&&m<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}op(e);let x=(t?r:r+1e3*p)-e.internal;x&&18e5>Math.abs(x)&&(Date.prototype.setTime.call(e,+e+x),op(e))}function og(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-(60*ol(e.timeZone,n)))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!oh.test(e))return;let t=e.replace(oh,"$1UTC");od.prototype[t]&&(e.startsWith("get")?od.prototype[e]=function(){return this.internal[t]()}:(od.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),of(e),+this},od.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),op(this),+this}))});class om extends od{static tz(e,...t){return t.length?new om(...t,e):new om(Date.now(),e)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),n=String(Math.abs(e)%60).padStart(2,"0");return[e>0?"-":"+",t,n]}withTimeZone(e){return new om(+this,e)}[Symbol.for("constructDateFrom")](e){return new om(+new Date(e),this.timeZone)}}var ov=n(4721);function oy(e){let t=(0,ov.a)(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-n}var ox=n(12015);function ob(e,...t){let n=ox.w.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}var ow=n(30439);function oS(e,t){let n=(0,ov.a)(e,t?.in);return n.setHours(0,0,0,0),n}function oA(e,t){let n=(0,ov.a)(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function oC(e,t){let n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,r=(0,ov.a)(e,t?.in),i=r.getDay();return r.setDate(r.getDate()-(7*(i<n)+i-n)),r.setHours(0,0,0,0),r}function oM(e,t){return oC(e,{...t,weekStartsOn:1})}function ok(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=(0,ox.w)(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let o=oM(i),a=(0,ox.w)(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let s=oM(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function oT(e,t){let n,r,i=(0,ov.a)(e,t?.in);return Math.round((oM(i)-(n=ok(i,void 0),(r=(0,ox.w)(i,0)).setFullYear(n,0,4),r.setHours(0,0,0,0),oM(r)))/ow.my)+1}function o_(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,o=(0,ox.w)(t?.in||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);let a=oC(o,t),s=(0,ox.w)(t?.in||e,0);s.setFullYear(r,0,i),s.setHours(0,0,0,0);let l=oC(s,t);return+n>=+a?r+1:+n>=+l?r:r-1}function oI(e,t){let n,r,i,o=(0,ov.a)(e,t?.in);return Math.round((oC(o,t)-(n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,r=o_(o,t),(i=(0,ox.w)(t?.in||o,0)).setFullYear(r,0,n),i.setHours(0,0,0,0),oC(i,t)))/ow.my)+1}function oD(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let oO={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return oD("yy"===t?r%100:r,t.length)},M(e,t){let n=e.getMonth();return"M"===t?String(n+1):oD(n+1,2)},d:(e,t)=>oD(e.getDate(),t.length),a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>oD(e.getHours()%12||12,t.length),H:(e,t)=>oD(e.getHours(),t.length),m:(e,t)=>oD(e.getMinutes(),t.length),s:(e,t)=>oD(e.getSeconds(),t.length),S(e,t){let n=t.length;return oD(Math.trunc(e.getMilliseconds()*Math.pow(10,n-3)),t.length)}},oR={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){let t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return oO.y(e,t)},Y:function(e,t,n,r){let i=o_(e,r),o=i>0?i:1-i;return"YY"===t?oD(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):oD(o,t.length)},R:function(e,t){return oD(ok(e),t.length)},u:function(e,t){return oD(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return oD(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return oD(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return oO.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return oD(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let i=oI(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):oD(i,t.length)},I:function(e,t,n){let r=oT(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):oD(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):oO.d(e,t)},D:function(e,t,n){let r,i=function(e,t){let[n,r]=ob(void 0,e,t),i=oS(n),o=oS(r);return Math.round((i-oy(i)-(o-oy(o)))/ow.w4)}(r=(0,ov.a)(e,void 0),oA(r))+1;return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):oD(i,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return oD(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return oD(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return oD(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r,i=e.getHours();switch(r=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r,i=e.getHours();switch(r=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return oO.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):oO.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):oD(r,t.length)},k:function(e,t,n){let r=e.getHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):oD(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oO.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oO.s(e,t)},S:function(e,t){return oO.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return oP(r);case"XXXX":case"XX":return oL(r);default:return oL(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return oP(r);case"xxxx":case"xx":return oL(r);default:return oL(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oE(r,":");default:return"GMT"+oL(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oE(r,":");default:return"GMT"+oL(r,":")}},t:function(e,t,n){return oD(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return oD(+e,t.length)}};function oE(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+t+oD(o,2)}function oP(e,t){return e%60==0?(e>0?"-":"+")+oD(Math.abs(e)/60,2):oL(e,t)}function oL(e,t=""){let n=Math.abs(e);return(e>0?"-":"+")+oD(Math.trunc(n/60),2)+t+oD(n%60,2)}let oN=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},oB=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},oz={p:oB,P:(e,t)=>{let n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return oN(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",oN(i,t)).replace("{{time}}",oB(o,t))}},oj=/^D+$/,oF=/^Y+$/,oV=["D","DD","YY","YYYY"];function o$(e,t,n){var r,i,o;let a,s=(r=e,i=t,o=n,a="Y"===r[0]?"years":"days of the month",`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${i}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),oV.includes(e))throw RangeError(s)}function oH(e){return!(!(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof e||isNaN(+(0,ov.a)(e)))}let oW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oG=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oU=/^'([^]*?)'?$/,oq=/''/g,oY=/[a-zA-Z]/;function oX(e,t,n){let r=n?.locale??n2.locale??n1,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??n2.firstWeekContainsDate??n2.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,a=(0,ov.a)(e,n?.in);if(!oH(a))throw RangeError("Invalid time value");let s=t.match(oG).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,oz[t])(e,r.formatLong):e}).join("").match(oW).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var n;let t;return{isToken:!1,value:(t=(n=e).match(oU))?t[1].replace(oq,"'"):n}}if(oR[t])return{isToken:!0,value:e};if(t.match(oY))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});r.localize.preprocessor&&(s=r.localize.preprocessor(a,s));let l={firstWeekContainsDate:i,weekStartsOn:o,locale:r};return s.map(i=>{if(!i.isToken)return i.value;let o=i.value;return(!n?.useAdditionalWeekYearTokens&&oF.test(o)||!n?.useAdditionalDayOfYearTokens&&oj.test(o))&&o$(o,t,String(e)),(0,oR[o[0]])(a,o,r.localize,l)}).join("")}function oZ(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function oK(e,t,n){let r,i=n?.toLowerCase();if(!n||"local"===i||"browser"===i)return oX(e,t);return oX(e,t,{in:(r="utc"===i?"UTC":n,e=>om.tz(r,+new Date(e)))})}function oQ(e){let t=e?.toLowerCase(),n=e;e&&"local"!==t&&"browser"!==t?"utc"===t&&(n="UTC"):n=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let e=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"shortOffset"}).formatToParts(new Date).find(e=>"timeZoneName"===e.type),t=e?.value??"";if("GMT"===t)return"GMT+0";return t}catch{return"GMT+0"}}function oJ(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let o0=(e,t)=>{if(!e)return{formattedDate:"",formattedTime:""};let n=new Date(e);return{formattedDate:t?t(n,"MMM dd, yyyy"):oX(n,"MMM dd, yyyy"),formattedTime:t?t(n,"HH:mm:ss"):oX(n,"HH:mm:ss")}};var o1=n(18264);function o2(e,t){let n=(0,I.useRef)(),r=!0;for(let e=0;e<t.length;e++)if(n.current?.deps[e]!==t[e]){r=!1;break}return(void 0===n.current||!1===r)&&(n.current={value:e(),deps:t}),n.current.value}function o5(e,t){let n=(0,I.useRef)();return(void 0===n.current||!1===o1(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}function o4(e){return!!e?.startsWith("/")}function o3(e){if(!e)throw Error("Input string cannot be empty");if(!o4(e))return RegExp(`^${e}$`);let t=e.match(/^\/(.+)\/([gimy]*)$/);if(!t)throw Error(`Invalid regular expression format: ${e}`);let[,n="",r=""]=t;try{return new RegExp(n,r)}catch(e){throw Error(`Failed to create RegExp ${e}`,{cause:e})}}function o6(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=i1(i,t);return n}function o8(e,t){let n={};for(let[r,i]of Object.entries(e))Array.isArray(i)?n[r]=i.map(e=>i1(e,t)):n[r]=function e(t,n){if(Array.isArray(t))return t.map(t=>e(t,n));for(let[e,r]of i0(t)){let i,o=n[e];if(!o)continue;let a=o.options??[],s=a.map(e=>e.value),l=Array.isArray(o.value),u=void 0!==o.customAllValue;if(l)i=o.value;else if(u)try{let e=o3(o.customAllValue),t=a.filter(t=>e.test(t.value)).map(e=>e.value);i=t.length>0?t:s}catch{i=s}if(i&&(!r||r===iY.QUERYPARAM)){let o="$"+e,a=r?"${"+e+":"+r+"}":"${"+e+"}";return i.map(e=>{let r=t;return i1(r=(r=r.replaceAll(a,e)).replaceAll(o,e),n)})}}return i1(t,n)}(i,t);return n}function o9(e,t,n,r,i){let o=oe(e,t,{index:n,count:r}),a=o.text,s=[];return o.errors&&s.push(...o.errors.map(e=>e.replace("in data","in selection data"))),i&&(a=i1(a,i)),{text:a,errors:s.length>0?s:void 0}}function o7(e,t,n){let r=ot(e,t),i=r.text,o=[];return r.errors&&o.push(...r.errors.map(e=>e.replace("in data","in selection data"))),n&&(i=i1(i,n)),{text:i,errors:o.length>0?o:void 0}}function ae(e,t){let n=e.palette.text?.primary??"#222";return nG({echartsTheme:{title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}},noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}function at(e,t=[]){if(!t.length)return{value:e};let n={value:e};return t.forEach(t=>{switch(t.kind){case"Value":{let r=t.spec;String(r.value)===String(e)&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Range":{let r=t.spec;if(void 0===r.from&&void 0===r.to)break;let i=void 0!==r.from?r.from:-1/0,o=void 0!==r.to?r.to:1/0;e>=i&&e<=o&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Regex":{let r=t.spec,i=e.toString();if(!r.pattern)break;let o=o3(r.pattern);i.match(o)&&null!==r.result.value&&(n.value=i.replace(o,r.result.value.toString()||"")||n.value,n.color=r.result.color);break}case"Misc":{let r=t.spec;(function(e,t){switch(e){case"empty":return""===t;case"null":return null==t;case"NaN":return Number.isNaN(t);case"true":return!0===t;case"false":return!1===t;default:return!1}})(r.value,e)&&(n.value=r.result.value||n.value,n.color=r.result.color)}}}),n}function an(e,t){if(0===t.length)return e;let n={};for(let r of e){let e=Object.keys(r).filter(e=>t.includes(e)).map(e=>r[e]).join("|"),i=n[e];i?n[e]={...i,...r}:n[e]={...r}}return Object.values(n)}function ar(e,t,n){let r=[];for(let i of e){let e=Object.keys(i).filter(e=>t.includes(e)),o={};for(let t of e)o[t]=i[t],delete i[t];for(let t of e)r.push({...i,[n]:o[t]});0===e.length&&r.push(i)}return r}function ai(e,t){let n=[];for(let r of e){let e=Object.keys(r).filter(e=>RegExp("^(("+t+" #\\d+)|("+t+"))$").test(e)),i={};for(let t of e)i[t]=r[t],delete r[t];for(let o of e)n.push({...r,[t]:i[o]});0===e.length&&n.push(r)}return n}function ao(e){let t=[...e],n=Array.from(new Set(e.flatMap(Object.keys).map(e=>e.replace(/ #\d+/,"")).filter(e=>"value"!==e)));for(let e of n)t=ai(t,e);return an(t,n)}function aa(e,t){let n=e;for(let e of t??[])if(!e.spec.disabled)switch(e.kind){case"JoinByColumnValue":e.spec.columns&&e.spec.columns.length>0&&(n=an(n,e.spec.columns));break;case"MergeIndexedColumns":e.spec.column&&(n=ai(n,e.spec.column));break;case"MergeColumns":e.spec.columns&&e.spec.columns.length>0&&e.spec.name&&(n=ar(n,e.spec.columns,e.spec.name));break;case"MergeSeries":n=ao(n)}return n.map(e=>Object.keys(e).toSorted().reduce((t,n)=>(t[n]=e[n],t),{}))}function as(e){return"number"==typeof e}function al(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function au(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function ac(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function ad(e){return e&&!0===e.constructor.prototype.isUnit||!1}function ah(e){return"string"==typeof e}var ap=Array.isArray;function af(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function ag(e){return Array.isArray(e)||af(e)}function am(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function av(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function ay(e){return e&&!0===e.constructor.prototype.isRange||!1}function ax(e){return e&&!0===e.constructor.prototype.isIndex||!1}function ab(e){return"boolean"==typeof e}function aw(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function aS(e){return e&&!0===e.constructor.prototype.isHelp||!1}function aA(e){return"function"==typeof e}function aC(e){return e instanceof Date}function aM(e){return e instanceof RegExp}function ak(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!au(e)&&!ac(e))}function aT(e){return null===e}function a_(e){return void 0===e}function aI(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function aD(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function aO(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function aR(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function aE(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function aP(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function aL(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function aN(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function aB(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function az(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function aj(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function aF(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function aV(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function a$(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function aH(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function aW(e){return e&&!0===e.constructor.prototype.isChain||!1}function aG(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":al(e)?"BigNumber":au(e)?"Complex":ac(e)?"Fraction":af(e)?"Matrix":ad(e)?"Unit":ax(e)?"Index":ay(e)?"Range":aw(e)?"ResultSet":az(e)?e.type:aW(e)?"Chain":aS(e)?"Help":"Object":"function"===t?"Function":t}function aU(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return aU(e)});if(e instanceof Date)return new Date(e.valueOf());if(al(e))return e;if(e instanceof RegExp)throw TypeError("Cannot clone "+e);return aq(e,aU)}function aq(e,t){var n={};for(var r in e)aZ(e,r)&&(n[r]=t(e[r]));return n}function aY(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!aY(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!aY(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}function aX(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function aZ(e,t){return e&&Object.hasOwnProperty.call(e,t)}function aK(e){return Object.keys(e).map(t=>e[t])}var aQ=n(23420);function aJ(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(a1));return function(e,t,n){if(!t.filter(e=>{var t;return!((t=e)&&"?"===t[0])}).every(e=>void 0!==n[e])){var r=t.filter(e=>void 0===n[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map(e=>'"'.concat(e,'"')).join(", "),"."))}}(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function a0(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function a1(e){return e&&"?"===e[0]?e.slice(1):e}function a2(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function a5(e,t,n){var r="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!a2(n))throw Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!a2(e))throw Error("Value must be an integer");e<0&&(e+=2**n),r="i".concat(n)}var i="";return e<0&&(e=-e,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[t]).concat(e.toString(t)).concat(r)}function a4(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),as(t)?n=t:as(t.precision)&&(n=t.precision),t.wordSize)&&"number"!=typeof(r=t.wordSize))throw Error('Option "wordSize" must be a number');switch(i){case"fixed":return a6(e,n);case"exponential":return a8(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a9(a3(e),t),r=n.exponent,i=n.coefficients,o=r%3==0?r:r<0?r-3-r%3:r-r%3;if(as(t))for(;t>i.length||r-o+1>i.length;)i.push(0);else for(var a=Math.abs(r-o)-(i.length-1),s=0;s<a;s++)i.push(0);for(var l=Math.abs(r-o),u=1;l>0;)u++,l--;var c=i.slice(u).join(""),d=as(t)&&c.length||c.match(/[1-9]/)?"."+c:"",h=i.slice(0,u).join("")+d+"e"+(r>=0?"+":"")+o.toString();return n.sign+h}(e,n);case"bin":return a5(e,2,r);case"oct":return a5(e,8,r);case"hex":return a5(e,16,r);case"auto":return(function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=a3(e),a=t?a9(o,t):o;if(a.exponent<r||a.exponent>=i)return a8(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(a7(t-s.length))),s=s.concat(a7(l-s.length+1+(s.length<t?t-s.length:0))),s=a7(-l).concat(s);var u=l>0?l:0;return u<s.length-1&&s.splice(u+1,0,"."),a.sign+s.join("")})(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function a3(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function a6(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a3(e),r="number"==typeof t?a9(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,a=o+(t||0);return i.length<a&&(i=i.concat(a7(a-i.length))),o<0&&(i=a7(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}function a8(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=a3(e),r=t?a9(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(a7(t-i.length)));var a=i.shift();return r.sign+a+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function a9(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function a7(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var se=Number.EPSILON||2220446049250313e-31;function st(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<se||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function sn(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!a2(n))throw Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function sr(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function si(e,t){var n=function(e,t){var n;if("number"==typeof e)return a4(e,t);if(al(e))return function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto";if(void 0!==t&&(t.notation&&(n=t.notation),"number"==typeof t?d=t:t.precision&&(d=t.precision),t.wordSize)&&"number"!=typeof(h=t.wordSize))throw Error('Option "wordSize" must be a number');switch(n){case"fixed":return r=e,i=d,r.toFixed(i);case"exponential":return sr(e,d);case"engineering":return o=e,a=d,l=(s=o.e)%3==0?s:s<0?s-3-s%3:s-s%3,-1!==(c=(u=o.mul(Math.pow(10,-l))).toPrecision(a)).indexOf("e")&&(c=u.toString()),c+"e"+(s>=0?"+":"")+l.toString();case"bin":return sn(e,2,h);case"oct":return sn(e,8,h);case"hex":return sn(e,16,h);case"auto":var r,i,o,a,s,l,u,c,d,h,p=t&&void 0!==t.lowerExp?t.lowerExp:-3,f=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var g=e.toSignificantDigits(d),m=g.e;return(m>=p&&m<f?g.toFixed():sr(e,d)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t);if((n=e)&&"object"==typeof n&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d)if(!t||"decimal"!==t.fraction)return e.s*e.n+"/"+e.d;else return e.toString();if(Array.isArray(e))return function e(t,n){if(!Array.isArray(t))return si(t,n);for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}(e,t);if(ah(e))return'"'+e+'"';if("function"==typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"==typeof e)if("function"==typeof e.format)return e.format(t);else return e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+si(e[n],t)).join(", ")+"}";return String(e)}(e,t);return t&&"object"==typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function so(e,t,n){if(!(this instanceof so))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function sa(e,t,n){if(!(this instanceof sa))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function ss(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function sl(e,t){if(0===t.length){if(Array.isArray(e))throw new so(e.length,0)}else!function e(t,n,r){var i,o=t.length;if(o!==n[r])throw new so(o,n[r]);if(r<n.length-1){var a=r+1;for(i=0;i<o;i++){if(!Array.isArray(t[i]))throw new so(n.length-1,n.length,"<");e(t[i],n,a)}}else for(i=0;i<o;i++)if(Array.isArray(t[i]))throw new so(n.length+1,n.length,">")}(e,t,0)}function su(e,t){if(!as(e)||!a2(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new sa(e,t)}function sc(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!as(e)||!a2(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+si(t)+")")}),function e(t,n,r,i){var o,a,s=t.length,l=n[r],u=Math.min(s,l);if(t.length=l,r<n.length-1){var c=r+1;for(o=0;o<u;o++)Array.isArray(a=t[o])||(a=[a],t[o]=a),e(a,n,c,i);for(o=u;o<l;o++)a=[],t[o]=a,e(a,n,c,i)}else{for(o=0;o<u;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=u;o<l;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function sd(e,t){var n=sh(e),r=e.slice(),i=e.indexOf(-1);if(e.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0)if(t%n==0)r[i]=-t/n;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function sh(e){return e.reduce((e,t)=>e*t,1)}function sp(e,t,n,r){var i=r||ss(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function sf(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?sf(o,t):t(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function sg(e,t){return -1!==e.indexOf(t)}function sm(e,t,n,r){if(!(this instanceof sm))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=r?"-"+r:"")+" expected)",this.stack=Error().stack}so.prototype=RangeError(),so.prototype.constructor=RangeError,so.prototype.name="DimensionError",so.prototype.isDimensionError=!0,sa.prototype=RangeError(),sa.prototype.constructor=RangeError,sa.prototype.name="IndexError",sa.prototype.isIndexError=!0,sm.prototype=Error(),sm.prototype.constructor=Error,sm.prototype.name="ArgumentsError",sm.prototype.isArgumentsError=!0;var sv={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},sy=["Matrix","Array"],sx=["number","BigNumber","Fraction"];function sb(e,t,n){var r;void 0!==e[t]&&(r=e[t],-1===n.indexOf(r))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function sw(e,t){var n,r,i,o=(0,er.A)({},sv,t);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var a=((n={isNumber:as,isComplex:au,isBigNumber:al,isFraction:ac,isUnit:ad,isString:ah,isArray:ap,isMatrix:af,isCollection:ag,isDenseMatrix:am,isSparseMatrix:av,isRange:ay,isIndex:ax,isBoolean:ab,isResultSet:aw,isHelp:aS,isFunction:aA,isDate:aC,isRegExp:aM,isObject:ak,isNull:aT,isUndefined:a_,isAccessorNode:aI,isArrayNode:aD,isAssignmentNode:aO,isBlockNode:aR,isConditionalNode:aE,isConstantNode:aP,isFunctionAssignmentNode:aL,isFunctionNode:aN,isIndexNode:aB,isNode:az,isObjectNode:aj,isOperatorNode:aF,isParenthesisNode:aV,isRangeNode:a$,isSymbolNode:aH,isChain:aW}).on=(r=new aQ).on.bind(r),n.off=r.off.bind(r),n.once=r.once.bind(r),n.emit=r.emit.bind(r),n);a.config=function(e,t){function n(n){if(!n)return aq(e,aU);var r=aq(e,aU);sb(n,"matrix",sy),sb(n,"number",sx),function e(t,n){if(Array.isArray(n))throw TypeError("Arrays are not supported by deepExtend");for(var r in n)if(aZ(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else if(Array.isArray(n[r]))throw TypeError("Arrays are not supported by deepExtend");else t[r]=n[r];return t}(e,n);var i=aq(e,aU);return t("config",i,r,aq(n,aU)),i}return n.MATRIX_OPTIONS=sy,n.NUMBER_OPTIONS=sx,Object.keys(sv).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}(o,a.emit),a.expression={transform:{},mathWithTransform:{config:a.config}};var s={},l=function(e,t,n){function r(e,n){n&&"function"==typeof n.transform?(t.expression.transform[e]=n.transform,aZ(a,e)||(t.expression.mathWithTransform[e]=n.transform)):(delete t.expression.transform[e],aZ(a,e)||(t.expression.mathWithTransform[e]=n))}function i(e){return"function"==typeof e&&"object"==typeof e.signatures}function o(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var a={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(s,l){var u=arguments.length;if(1!==u&&2!==u)throw new sm("import",u,1,2);l||(l={});var c={};for(var d in!function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)aZ(n,i)&&e(t,n[i],i);else if(a0(n)||void 0!==r){var a=a0(n)?o(n)?n.fn+".transform":n.fn:r;if(aZ(t,a)&&t[a]!==n&&!l.silent)throw Error('Cannot import "'+a+'" twice');t[a]=n}else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}(c,s),c)if(aZ(c,d)){var h,p=c[d];if(a0(p))!function(r,s){var l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.fn;if(sg(u,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(u));var c=o(r)?t.expression.transform:t,d=u in t.expression.transform,h=aZ(c,u)?c[u]:void 0,p=function(){var n={};r.dependencies.map(a1).forEach(e=>{if(sg(e,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=t:"mathWithTransform"===e?n.mathWithTransform=t.expression.mathWithTransform:"classes"===e?n.classes=t:n[e]=t[e]});var o=r(n);if(o&&"function"==typeof o.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===h||s.override)return o;if(i(h)&&i(o))return e(h,o);if(s.silent)return h;throw Error('Cannot import "'+u+'": already exists')};r.meta&&!1===r.meta.lazy?c[u]=p():aX(c,u,p),h&&d?function(e){delete t.expression.transform[e],aZ(a,e)?delete t.expression.mathWithTransform[e]:t.expression.mathWithTransform[e]=t[e]}(u):!o(r)&&(-1!==(l=r).fn.indexOf(".")||aZ(a,l.fn)||l.meta&&l.meta.isClass)||aX(t.expression.mathWithTransform,u,()=>c[u]),n[u]=r,t.emit("import",u,p)}(p,l);else{if("function"==typeof(h=p)||"number"==typeof h||"string"==typeof h||"boolean"==typeof h||null===h||ad(h)||au(h)||al(h)||ac(h)||af(h)||Array.isArray(h))!function(o,a,s){var l;if(s.wrap&&"function"==typeof a&&(a=function(e){var n=function(){for(var n=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];n[r]=o&&o.valueOf()}return e.apply(t,n)};return e.transform&&(n.transform=e.transform),n}(a)),"function"==typeof(l=a)&&"string"==typeof l.signature&&(a=e(o,{[a.signature]:a})),i(t[o])&&i(a)){a=s.override?e(o,a.signatures):e(t[o],a),t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(void 0===t[o]||s.override){t[o]=a,delete n[o],r(o,a),t.emit("import",o,function(){return a});return}if(!s.silent)throw Error('Cannot import "'+o+'": already exists')}(d,p,l);else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.typed.apply(a.typed,t)},a,s);return a.import=l,a.on("config",()=>{aK(s).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&l(e,{override:!0})})}),a.create=sw.bind(null,e),a.factory=aJ,a.import(aK((function e(t,n){for(var r in t)if(aZ(t,r)){var i=t[r];"object"==typeof i&&null!==i?e(i,n):n[r]=i}}(e,i={}),i))),a.ArgumentsError=sm,a.DimensionError=so,a.IndexError=sa,a}var sS,sA,sC,sM,sk,sT,s_,sI,sD,sO,sR,sE,sP,sL,sN,sB,sz,sj,sF,sV="0123456789abcdef",s$="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sH="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",sW={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},sG=!0,sU="[DecimalError] ",sq=sU+"Invalid argument: ",sY=sU+"Precision limit exceeded",sX=sU+"crypto unavailable",sZ="[object Decimal]",sK=Math.floor,sQ=Math.pow,sJ=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,s0=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,s1=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,s2=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,s5=s$.length-1,s4=sH.length-1,s3={toStringTag:sZ};function s6(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=ls(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=ls(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function s8(e,t,n){if(e!==~~e||e<t||e>n)throw Error(sq+e)}function s9(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=sQ(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==sQ(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==sQ(10,t-3)-1,a}function s7(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=sV.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}s3.absoluteValue=s3.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),lt(e)},s3.ceil=function(){return lt(new this.constructor(this),this.e+1,2)},s3.clampedTo=s3.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(sq+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},s3.comparedTo=s3.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(i=a.length)?r:i;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},s3.cosine=s3.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/lm(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=lg(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,lv(r,n)),r.precision=e,r.rounding=t,lt(2==sF||3==sF?n.neg():n,e,t,!0)):new r(1):new r(NaN)},s3.cubeRoot=s3.cbrt=function(){var e,t,n,r,i,o,a,s,l,u,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(sG=!1,(o=this.s*sQ(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new c(o.toString()):(n=s6(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=sQ(n,1/3),e=sK((e+1)/3)-(e%3==(e<0?-1:2)),(r=new c(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),a=(e=c.precision)+3;;)if(r=le((u=(l=(s=r).times(s).times(s)).plus(this)).plus(this).times(s),u.plus(l),a+2,1),s6(s.d).slice(0,a)===(n=s6(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(lt(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(lt(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return sG=!0,lt(r,e,c.rounding,t)},s3.decimalPlaces=s3.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-sK(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},s3.dividedBy=s3.div=function(e){return le(this,new this.constructor(e))},s3.dividedToIntegerBy=s3.divToInt=function(e){var t=this.constructor;return lt(le(this,new t(e),0,1,1),t.precision,t.rounding)},s3.equals=s3.eq=function(e){return 0===this.cmp(e)},s3.floor=function(){return lt(new this.constructor(this),this.e+1,3)},s3.greaterThan=s3.gt=function(e){return this.cmp(e)>0},s3.greaterThanOrEqualTo=s3.gte=function(e){var t=this.cmp(e);return 1==t||0===t},s3.hyperbolicCosine=s3.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/lm(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=lg(a,1,o.times(t),new a(1),!0);for(var l,u=e,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return lt(o,a.precision=n,a.rounding=r,!0)},s3.hyperbolicSine=s3.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=lg(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=lg(o,2,i=i.times(1/lm(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=t,o.rounding=n,lt(i,t,n,!0)},s3.hyperbolicTangent=s3.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,le(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},s3.inverseCosine=s3.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?lo(t,r,i):new t(0):new t(NaN):e.isZero()?lo(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},s3.inverseHyperbolicCosine=s3.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,sG=!1,n=n.times(n).minus(1).sqrt().plus(n),sG=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},s3.inverseHyperbolicSine=s3.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,sG=!1,n=n.times(n).plus(1).sqrt().plus(n),sG=!0,r.precision=e,r.rounding=t,n.ln())},s3.inverseHyperbolicTangent=s3.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?lt(new o(i),e,t,!0):(o.precision=n=r-i.e,i=le(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(NaN)},s3.inverseSine=s3.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=lo(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},s3.inverseTangent=s3.atan=function(){var e,t,n,r,i,o,a,s,l,u=this,c=u.constructor,d=c.precision,h=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);else if(u.abs().eq(1)&&d+4<=s4)return(a=lo(c,d+4,h).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(d+4<=s4)return(a=lo(c,d+4,h).times(.5)).s=u.s,a}for(c.precision=s=d+10,c.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(sG=!1,t=Math.ceil(s/7),r=1,l=u.times(u),a=new c(u),i=u;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),sG=!0,lt(a,c.precision=d,c.rounding=h,!0)},s3.isFinite=function(){return!!this.d},s3.isInteger=s3.isInt=function(){return!!this.d&&sK(this.e/7)>this.d.length-2},s3.isNaN=function(){return!this.s},s3.isNegative=s3.isNeg=function(){return this.s<0},s3.isPositive=s3.isPos=function(){return this.s>0},s3.isZero=function(){return!!this.d&&0===this.d[0]},s3.lessThan=s3.lt=function(e){return 0>this.cmp(e)},s3.lessThanOrEqualTo=s3.lte=function(e){return 1>this.cmp(e)},s3.logarithm=s3.log=function(e){var t,n,r,i,o,a,s,l=this.constructor,u=l.precision,c=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new l(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}if(sG=!1,s9((s=le(o=lh(this,a=u+5),t?li(l,a+10):lh(e,a),a,1)).d,r=u,c))do if(a+=10,s=le(o=lh(this,a),t?li(l,a+10):lh(e,a),a,1),!i){+s6(s.d).slice(r+1,r+15)+1==1e14&&(s=lt(s,u+1,0));break}while(s9(s.d,r+=10,c));return sG=!0,lt(s,u,c)},s3.minus=s3.sub=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:NaN):e=new p(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(u=this.d,h=e.d,s=p.precision,l=p.rounding,!u[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(this)}return sG?lt(e,s,l):e}if(n=sK(e.e/7),c=sK(this.e/7),u=u.slice(),o=c-n){for((d=o<0)?(t=u,o=-o,a=h.length):(t=h,n=c,a=u.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=u.length)<(a=h.length))&&(a=r),r=0;r<a;r++)if(u[r]!=h[r]){d=u[r]<h[r];break}o=0}for(d&&(t=u,u=h,h=t,e.s=-e.s),a=u.length,r=h.length-a;r>0;--r)u[a++]=0;for(r=h.length;r>o;){if(u[--r]<h[r]){for(i=r;i&&0===u[--i];)u[i]=1e7-1;--u[i],u[r]+=1e7}u[r]-=h[r]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=lr(u,n),sG?lt(e,s,l):e):new p(3===l?-0:0)},s3.modulo=s3.mod=function(e){var t,n=this.constructor;return(e=new n(e),this.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!this.d||this.d[0])?(sG=!1,9==n.modulo?(t=le(this,e.abs(),0,3,1),t.s*=e.s):t=le(this,e,0,n.modulo,1),t=t.times(e),sG=!0,this.minus(t)):lt(new n(this),n.precision,n.rounding):new n(NaN)},s3.naturalExponential=s3.exp=function(){return ld(this)},s3.naturalLogarithm=s3.ln=function(){return lh(this)},s3.negated=s3.neg=function(){var e=new this.constructor(this);return e.s=-e.s,lt(e)},s3.plus=s3.add=function(e){var t,n,r,i,o,a,s,l,u,c,d=this.constructor;if(e=new d(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new d(e.d||this.s===e.s?this:NaN)):e=new d(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(u=this.d,c=e.d,s=d.precision,l=d.rounding,!u[0]||!c[0])return c[0]||(e=new d(this)),sG?lt(e,s,l):e;if(o=sK(this.e/7),r=sK(e.e/7),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,a=c.length):(n=c,r=o,a=u.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,n=c,c=u,u=n),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/1e7|0,u[i]%=1e7;for(t&&(u.unshift(t),++r),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=lr(u,r),sG?lt(e,s,l):e},s3.precision=s3.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(sq+e);return this.d?(t=la(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},s3.round=function(){var e=this.constructor;return lt(new e(this),this.e+1,e.rounding)},s3.sine=s3.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:lg(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=lg(e,2,t=t.times(1/lm(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,lv(r,n)),r.precision=e,r.rounding=t,lt(sF>2?n.neg():n,e,t,!0)):new r(NaN)},s3.squareRoot=s3.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,l=this.s,u=this.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?this:1/0);for(sG=!1,0==(l=Math.sqrt(+this))||l==1/0?(((t=s6(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=sK((s+1)/2)-(s<0||s%2),r=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new u(l.toString()),n=(s=u.precision)+3;;)if(r=(o=r).plus(le(this,o,n+2,1)).times(.5),s6(o.d).slice(0,n)===(t=s6(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(lt(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(lt(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return sG=!0,lt(r,s,u.rounding,e)},s3.tangent=s3.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=le(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,lt(2==sF||4==sF?n.neg():n,e,t,!0)):new r(NaN)},s3.times=s3.mul=function(e){var t,n,r,i,o,a,s,l,u,c=this.constructor,d=this.d,h=(e=new c(e)).d;if(e.s*=this.s,!d||!d[0]||!h||!h[0])return new c(!e.s||d&&!d[0]&&!h||h&&!h[0]&&!d?NaN:!d||!h?e.s/0:0*e.s);for(n=sK(this.e/7)+sK(e.e/7),(l=d.length)<(u=h.length)&&(o=d,d=h,h=o,a=l,l=u,u=a),o=[],r=a=l+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+h[r]*d[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=lr(o,n),sG?lt(e,c.precision,c.rounding):e},s3.toBinary=function(e,t){return ly(this,2,e,t)},s3.toDecimalPlaces=s3.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(s8(e,0,1e9),void 0===t?t=r.rounding:s8(t,0,8),lt(n,e+n.e+1,t))},s3.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=ln(r,!0):(s8(e,0,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},s3.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=ln(this):(s8(e,0,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},s3.toFraction=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,p=this.d,f=this.constructor;if(!p)return new f(this);if(u=n=new f(1),r=l=new f(0),a=(o=(t=new f(r)).e=la(p)-this.e-1)%7,t.d[0]=sQ(10,a<0?7+a:a),null==e)e=o>0?t:u;else{if(!(s=new f(e)).isInt()||s.lt(u))throw Error(sq+s);e=s.gt(t)?o>0?t:u:s}for(sG=!1,s=new f(s6(p)),c=f.precision,f.precision=o=7*p.length*2;d=le(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=u,u=l.plus(d.times(i)),l=i,i=t,t=s.minus(d.times(i)),s=i;return i=le(e.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=this.s,h=1>le(u,r,o,1).minus(this).abs().cmp(le(l,n,o,1).minus(this).abs())?[u,r]:[l,n],f.precision=c,sG=!0,h},s3.toHexadecimal=s3.toHex=function(e,t){return ly(this,16,e,t)},s3.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:s8(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(sG=!1,n=le(n,e,0,t,1).times(e),sG=!0,lt(n)):(e.s=n.s,n=e),n},s3.toNumber=function(){return+this},s3.toOctal=function(e,t){return ly(this,8,e,t)},s3.toPower=s3.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=+(e=new l(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new l(sQ(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return lt(s,r,o);if((t=sK(e.e/7))>=e.d.length-1&&(n=u<0?-u:u)<=0x1fffffffffffff)return i=ll(l,s,n,r),e.s<0?new l(1).div(i):lt(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=sQ(+s,u))&&isFinite(n)?new l(n+"").e:sK(u*(Math.log("0."+s6(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(sG=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=ld(e.times(lh(s,r+n)),r)).d&&s9((i=lt(i,r+5,1)).d,r,o)&&(t=r+10,+s6((i=lt(ld(e.times(lh(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=lt(i,r+1,0))),i.s=a,sG=!0,l.rounding=o,lt(i,r,o))},s3.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=ln(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(s8(e,1,1e9),void 0===t?t=i.rounding:s8(t,0,8),n=ln(r=lt(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},s3.toSignificantDigits=s3.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(s8(e,1,1e9),void 0===t?t=n.rounding:s8(t,0,8)),lt(new n(this),e,t)},s3.toString=function(){var e=this.constructor,t=ln(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},s3.truncated=s3.trunc=function(){return lt(new this.constructor(this),this.e+1,1)},s3.valueOf=s3.toJSON=function(){var e=this.constructor,t=ln(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var le=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var u,c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k,T,_,I=r.constructor,D=r.s==i.s?1:-1,O=r.d,R=i.d;if(!O||!O[0]||!R||!R[0])return new I(!r.s||!i.s||(O?R&&O[0]==R[0]:!R)?NaN:O&&0==O[0]||!R?0*D:D/0);for(l?(p=1,c=r.e-i.e):(l=1e7,p=7,c=sK(r.e/p)-sK(i.e/p)),T=R.length,M=O.length,y=(v=new I(D)).d=[],d=0;R[d]==(O[d]||0);d++);if(R[d]>(O[d]||0)&&c--,null==o?(S=o=I.precision,a=I.rounding):S=s?o+(r.e-i.e)+1:o,S<0)y.push(1),f=!0;else{if(S=S/p+2|0,d=0,1==T){for(h=0,R=R[0],S++;(d<M||h)&&S--;d++)A=h*l+(O[d]||0),y[d]=A/R|0,h=A%R|0;f=h||d<M}else{for((h=l/(R[0]+1)|0)>1&&(R=e(R,h,l),O=e(O,h,l),T=R.length,M=O.length),C=T,b=(x=O.slice(0,T)).length;b<T;)x[b++]=0;(_=R.slice()).unshift(0),k=R[0],R[1]>=l/2&&++k;do h=0,(u=t(R,x,T,b))<0?(w=x[0],T!=b&&(w=w*l+(x[1]||0)),(h=w/k|0)>1?(h>=l&&(h=l-1),m=(g=e(R,h,l)).length,b=x.length,1==(u=t(g,x,m,b))&&(h--,n(g,T<m?_:R,m,l))):(0==h&&(u=h=1),g=R.slice()),(m=g.length)<b&&g.unshift(0),n(x,g,b,l),-1==u&&(b=x.length,(u=t(R,x,T,b))<1&&(h++,n(x,T<b?_:R,b,l))),b=x.length):0===u&&(h++,x=[0]),y[d++]=h,u&&x[0]?x[b++]=O[C]||0:(x=[O[C]],b=1);while((C++<M||void 0!==x[0])&&S--);f=void 0!==x[0]}y[0]||y.shift()}if(1==p)v.e=c,sj=f;else{for(d=1,h=y[0];h>=10;h/=10)d++;v.e=d+c*p-1,lt(v,s?o+v.e+1:o,a,f)}return v}}();function lt(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(c=d[h=0])/sQ(10,i-a-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=d.length))if(r){for(;s++<=h;)d.push(0);c=l=0,i=1,o%=7,a=o-7+1}else break e;else{for(i=1,c=s=d[h];s>=10;s/=10)i++;o%=7,l=(a=o-7+i)<0?0:c/sQ(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(a<0?c:c%sQ(10,i-a-1)),u=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?c/sQ(10,i-a):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,u?(t-=e.e+1,d[0]=sQ(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=sQ(10,7-o),d[h]=a>0?(c/sQ(10,i-a)%sQ(10,a)|0)*s:0),u)for(;;)if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==d[0]&&(d[0]=1));break}else{if(d[h]+=s,1e7!=d[h])break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return sG&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function ln(e,t,n){if(!e.isFinite())return lp(e);var r,i=e.e,o=s6(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+ls(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ls(-i-1)+o,n&&(r=n-a)>0&&(o+=ls(r))):i>=a?(o+=ls(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+ls(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=ls(r))),o}function lr(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function li(e,t,n){if(t>s5)throw sG=!0,n&&(e.precision=n),Error(sY);return lt(new e(s$),t,1,!0)}function lo(e,t,n){if(t>s4)throw Error(sY);return lt(new e(sH),t,n,!0)}function la(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ls(e){for(var t="";e--;)t+="0";return t}function ll(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(sG=!1;;){if(n%2&&lx((o=o.times(t)).d,a)&&(i=!0),0===(n=sK(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}lx((t=t.times(t)).d,a)}return sG=!0,o}function lu(e){return 1&e.d[e.d.length-1]}function lc(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function ld(e,t){var n,r,i,o,a,s,l,u=0,c=0,d=0,h=e.constructor,p=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(sG=!1,l=f):l=t,s=new h(.03125);e.e>-2;)e=e.times(s),d+=5;for(l+=r=Math.log(sQ(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=l;;){if(o=lt(o.times(e),l,1),n=n.times(++c),s6((s=a.plus(le(o,n,l,1))).d).slice(0,l)===s6(a.d).slice(0,l)){for(i=d;i--;)a=lt(a.times(a),l,1);if(null!=t)return h.precision=f,a;if(!(u<3&&s9(a.d,l-r,p,u)))return lt(a,h.precision=f,p,sG=!0);h.precision=l+=10,n=o=s=new h(1),c=0,u++}a=s}}function lh(e,t){var n,r,i,o,a,s,l,u,c,d,h,p=1,f=e,g=f.d,m=f.constructor,v=m.rounding,y=m.precision;if(f.s<0||!g||!g[0]||!f.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=f.s?NaN:g?0:f);if(null==t?(sG=!1,c=y):c=t,m.precision=c+=10,r=(n=s6(g)).charAt(0),!(15e14>Math.abs(o=f.e)))return u=li(m,c+2,y).times(o+""),f=lh(new m(r+"."+n.slice(1)),c-10).plus(u),m.precision=y,null==t?lt(f,y,v,sG=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=s6((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new m("0."+n),o++):f=new m(r+"."+n.slice(1)),d=f,l=a=f=le(f.minus(1),f.plus(1),c,1),h=lt(f.times(f),c,1),i=3;;){if(a=lt(a.times(h),c,1),s6((u=l.plus(le(a,new m(i),c,1))).d).slice(0,c)===s6(l.d).slice(0,c)){if(l=l.times(2),0!==o&&(l=l.plus(li(m,c+2,y).times(o+""))),l=le(l,new m(p),c,1),null!=t)return m.precision=y,l;if(!s9(l.d,c-10,v,s))return lt(l,m.precision=y,v,sG=!0);m.precision=c+=10,u=a=f=le(d.minus(1),d.plus(1),c,1),h=lt(f.times(f),c,1),i=s=1}l=u,i+=2}}function lp(e){return String(e.s*e.s/0)}function lf(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),sG&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function lg(e,t,n,r,i){var o,a,s,l,u=e.precision,c=Math.ceil(u/7);for(sG=!1,l=n.times(n),s=new e(r);;){if(a=le(s.times(l),new e(t++*t++),u,1),s=i?r.plus(a):r.minus(a),r=le(a.times(l),new e(t++*t++),u,1),void 0!==(a=s.plus(r)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return sG=!0,a.d.length=c+1,a}function lm(e,t){for(var n=e;--t;)n*=e;return n}function lv(e,t){var n,r=t.s<0,i=lo(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return sF=r?4:1,t;if((n=t.divToInt(i)).isZero())sF=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return sF=lu(n)?r?2:3:r?4:1,t;sF=lu(n)?r?1:4:r?3:2}return t.minus(i).abs()}function ly(e,t,n,r){var i,o,a,s,l,u,c,d,h,p=e.constructor,f=void 0!==n;if(f?(s8(n,1,1e9),void 0===r?r=p.rounding:s8(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(a=(c=ln(e)).indexOf("."),f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,a>=0&&(c=c.replace(".",""),(h=new p(1)).e=c.length-a,h.d=s7(ln(h),10,i),h.e=h.d.length),o=l=(d=s7(c,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=le(e,h,n,r,0,i)).d,o=e.e,u=sj),a=d[n],s=i/2,u=u||void 0!==d[n+1],u=r<4?(void 0!==a||u)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||u||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,u)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(a=0,c="";a<l;a++)c+=sV.charAt(d[a]);if(f){if(l>1)if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)c+="0";for(l=(d=s7(c,i,t)).length;!d[l-1];--l);for(a=1,c="1.";a<l;a++)c+=sV.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}else c=f?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=lp(e);return e.s<0?"-"+c:c}function lx(e,t){if(e.length>t)return e.length=t,!0}function lb(e){return new this(e).abs()}function lw(e){return new this(e).acos()}function lS(e){return new this(e).acosh()}function lA(e,t){return new this(e).plus(t)}function lC(e){return new this(e).asin()}function lM(e){return new this(e).asinh()}function lk(e){return new this(e).atan()}function lT(e){return new this(e).atanh()}function l_(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?lo(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=lo(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(le(e,t,o,1)),t=lo(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(le(e,t,o,1)):(n=lo(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function lI(e){return new this(e).cbrt()}function lD(e){return lt(e=new this(e),e.e+1,2)}function lO(e,t,n){return new this(e).clamp(t,n)}function lR(e){if(!e||"object"!=typeof e)throw Error(sU+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=sW[n]),void 0!==(r=e[n]))if(sK(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(sq+n+": "+r);if(n="crypto",i&&(this[n]=sW[n]),void 0!==(r=e[n]))if(!0===r||!1===r||0===r||1===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(sX);else this[n]=!1;else throw Error(sq+n+": "+r);return this}function lE(e){return new this(e).cos()}function lP(e){return new this(e).cosh()}function lL(e,t){return new this(e).div(t)}function lN(e){return new this(e).exp()}function lB(e){return lt(e=new this(e),e.e+1,3)}function lz(){var e,t,n=new this(0);for(e=0,sG=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return sG=!0,new this(1/0);n=t}return sG=!0,n.sqrt()}function lj(e){return e instanceof l6||e&&e.toStringTag===sZ||!1}function lF(e){return new this(e).ln()}function lV(e,t){return new this(e).log(t)}function l$(e){return new this(e).log(2)}function lH(e){return new this(e).log(10)}function lW(){return lc(this,arguments,-1)}function lG(){return lc(this,arguments,1)}function lU(e,t){return new this(e).mod(t)}function lq(e,t){return new this(e).mul(t)}function lY(e,t){return new this(e).pow(t)}function lX(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:s8(e,1,1e9),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(sX);else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],e%=7,r&&e&&(i=sQ(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function lZ(e){return lt(e=new this(e),e.e+1,this.rounding)}function lK(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function lQ(e){return new this(e).sin()}function lJ(e){return new this(e).sinh()}function l0(e){return new this(e).sqrt()}function l1(e,t){return new this(e).sub(t)}function l2(){var e=0,t=arguments,n=new this(t[0]);for(sG=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return sG=!0,lt(n,this.precision,this.rounding)}function l5(e){return new this(e).tan()}function l4(e){return new this(e).tanh()}function l3(e){return lt(e=new this(e),e.e+1,1)}s3[Symbol.for("nodejs.util.inspect.custom")]=s3.toString,s3[Symbol.toStringTag]="Decimal";var l6=s3.constructor=function e(t){var n,r,i;function o(e){var t,n,r;if(!(this instanceof o))return new o(e);if(this.constructor=o,lj(e)){this.s=e.s,sG?!e.d||e.e>o.maxE?(this.e=NaN,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(r=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;sG?t>o.maxE?(this.e=NaN,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=NaN),this.e=NaN,this.d=null;return}return lf(this,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===n&&(e=e.slice(1)),this.s=1),s2.test(e)?lf(this,e):function(e,t){var n,r,i,o,a,s,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),s2.test(t))return lf(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(s0.test(t))n=16,t=t.toLowerCase();else if(sJ.test(t))n=2;else if(s1.test(t))n=8;else throw Error(sq+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=ll(r,new r(n),o,2*o)),o=c=(u=s7(t,n,1e7)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*e.s):(e.e=lr(u,c),e.d=u,sG=!1,a&&(e=le(e,i,4*s)),l&&(e=e.times(54>Math.abs(l)?sQ(2,l):l6.pow(2,l))),sG=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,lf(this,e.toString());throw Error(sq+e)}if(o.prototype=s3,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=lR,o.clone=e,o.isDecimal=lj,o.abs=lb,o.acos=lw,o.acosh=lS,o.add=lA,o.asin=lC,o.asinh=lM,o.atan=lk,o.atanh=lT,o.atan2=l_,o.cbrt=lI,o.ceil=lD,o.clamp=lO,o.cos=lE,o.cosh=lP,o.div=lL,o.exp=lN,o.floor=lB,o.hypot=lz,o.ln=lF,o.log=lV,o.log10=lH,o.log2=l$,o.max=lW,o.min=lG,o.mod=lU,o.mul=lq,o.pow=lY,o.random=lX,o.round=lZ,o.sign=lK,o.sin=lQ,o.sinh=lJ,o.sqrt=l0,o.sub=l1,o.sum=l2,o.tan=l5,o.tanh=l4,o.trunc=l3,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(sW);s$=new l6(s$),sH=new l6(sH);var l8={createBigNumberClass:aJ("BigNumber",["?on","config"],e=>{var{on:t,config:n}=e,r=l6.clone({precision:n.precision,modulo:l6.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0})},l9={createMatrixClass:aJ("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})},l7={MatrixDependencies:l9,createDenseMatrixClass:aJ("DenseMatrix",["Matrix"],e=>{var{Matrix:t}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ah(t))throw Error("Invalid datatype: "+t);if(af(e))"DenseMatrix"===e.type?(this._data=aU(e._data),this._size=aU(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&ap(e.data)&&ap(e.size))this._data=e.data,this._size=e.size,sl(this._data,this._size),this._datatype=t||e.datatype;else if(ap(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];ap(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=ss(this._data),sl(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+aG(e)+")");else this._data=[],this._size=[0],this._datatype=t}function r(e,t,n){if(0===t.length){for(var r=e._data;ap(r);)r=r[0];return r}return e._size=t.slice(0),e._data=sc(e._data,e._size,n),e}function i(e,t,n){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>i[a]&&(i[a]=t[a],o=!0);o&&r(e,i,n)}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return sf(this._data,aG)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return function(e,t){if(!ax(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r=t.size();if(r.length!==e._size.length)throw new so(r.length,e._size.length);for(var i=t.min(),o=t.max(),a=0,s=e._size.length;a<s;a++)su(i[a],e._size[a]),su(o[a],e._size[a]);return new n(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map(function(e){return su(e,t.length),t[e]}).valueOf():a.map(function(o){return su(o,t.length),e(t[o],n,r,i+1)}).valueOf()}(e._data,t,r.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var o,a=t.size(),s=t.isScalar();if(af(n)?(o=n.size(),n=n.valueOf()):o=ss(n),s){if(0!==o.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(a.length<e._size.length)throw new so(a.length,e._size.length,"<");if(o.length<a.length){for(var l=0,u=0;1===a[l]&&1===o[l];)l++;for(;1===a[l];)u++,l++;n=sp(n,a.length,u,o)}if(!aY(a,o))throw new so(a,o,">");i(e,t.max().map(function(e){return e+1}),r);var c=a.length;!function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach(function(e,n){su(e),t[e]=r[n[0]]}):s.forEach(function(a,s){su(a),e(t[a],n,r[s[0]],i,o+1)})}(e._data,t,n,c,0)}return e}(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);for(var t=0;t<e.length;t++)su(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];su(o,n.length),n=n[o]}return n},n.prototype.set=function(e,t,n){if(!ap(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new so(e.length,this._size.length,"<");i(this,e.map(function(e){return e+1}),n);var r,o,a,s=this._data;for(r=0,o=e.length-1;r<o;r++)su(a=e[r],s.length),s=s[a];return su(a=e[e.length-1],s.length),s[a]=t,this},n.prototype.resize=function(e,t,n){if(!ag(e))throw TypeError("Array or Matrix expected");var i=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return r(n?this.clone():this,i,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;n._data=function(e,t){var n=function(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new so(0,r,"!=");var i=sh(t=sd(t,r));if(r!==i)throw new so(i,r,"!=");try{return function(e,t){for(var n,r=e,i=t.length-1;i>0;i--){var o=t[i];n=[];for(var a=r.length/o,s=0;s<a;s++)n.push(r.slice(s*o,(s+1)*o));r=n}return r}(n,t)}catch(e){if(e instanceof so)throw new so(i,r,"!=");throw e}}(n._data,e);var r=n._size.reduce((e,t)=>e*t);return n._size=sd(e,r),n},n.prototype.clone=function(){return new n({data:aU(this._data),size:aU(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,r=function n(r,i){return ap(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),i=void 0!==this._datatype?sf(r,aG):void 0;return new n(r,i)},n.prototype.forEach=function(e){var t=this;!function n(r,i){ap(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},n.prototype[Symbol.iterator]=function*(){var e=function* e(t,n){if(ap(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}};yield*e(this._data,[])},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(r){var o=i.map(e=>[e[r]]);t.push(new n(o,e._datatype))},a=0;a<r[1];a++)o(a);return t},n.prototype.toArray=function(){return aU(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return si(this._data,e)},n.prototype.toString=function(){return si(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),o=[],a=0;a<i;a++)o[a]=this._data[a+r][a+t];return new n({data:o,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!ap(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(al(r)&&(r=r.toNumber()),!as(r)||!a2(r))throw TypeError("The parameter k must be an integer number")}else r=0;var o,a=r>0?r:0,s=r<0?-r:0,l=e[0],u=e[1],c=Math.min(l-s,u-a);if(ap(t)){if(t.length!==c)throw Error("Invalid value array length");o=function(e){return t[e]}}else if(af(t)){var d=t.size();if(1!==d.length||d[0]!==c)throw Error("Invalid matrix length");o=function(e){return t.get([e])}}else o=function(){return t};i||(i=al(o(0))?o(0).mul(0):0);var h=[];if(e.length>0){h=sc(h,e,i);for(var p=0;p<c;p++)h[p+s][p+a]=o(p)}return new n({data:h,size:[l,u]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!as(e)||!a2(e)||!as(t)||!a2(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return su(e,this._size[0]),su(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n},{isClass:!0})};let ue=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},ut=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},un=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},ur=function(){throw SyntaxError("Invalid Param")};function ui(e,t){let n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let uo={re:0,im:0},ua=function(e,t){if(null==e)uo.re=uo.im=0;else if(void 0!==t)uo.re=e,uo.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)uo.re=e.re,uo.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return us.INFINITY;uo.re=e.abs*Math.cos(e.arg),uo.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return us.INFINITY;uo.re=e.r*Math.cos(e.phi),uo.im=e.r*Math.sin(e.phi)}else 2===e.length?(uo.re=e[0],uo.im=e[1]):ur();break;case"string":uo.im=uo.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&ur();for(let e=0;e<n.length;e++){let t=n[e];" "===t||" "===t||"\n"===t||("+"===t?r++:"-"===t?i++:("i"===t||"I"===t?(r+i===0&&ur()," "===n[e+1]||isNaN(n[e+1])?uo.im+=parseFloat((i%2?"-":"")+"1"):(uo.im+=parseFloat((i%2?"-":"")+n[e+1]),e++)):((r+i===0||isNaN(t))&&ur(),"i"===n[e+1]||"I"===n[e+1]?(uo.im+=parseFloat((i%2?"-":"")+t),e++):uo.re+=parseFloat((i%2?"-":"")+t)),r=i=0))}r+i>0&&ur();break;case"number":uo.im=0,uo.re=e;break;default:ur()}return isNaN(uo.re)||isNaN(uo.im),uo};function us(e,t){if(!(this instanceof us))return new us(e,t);let n=ua(e,t);this.re=n.re,this.im=n.im}us.prototype={re:0,im:0,sign:function(){let e=un(this.re,this.im);return new us(this.re/e,this.im/e)},add:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?us.NAN:us.INFINITY:new us(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?us.NAN:us.INFINITY:new us(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;return r&&a||i&&o?us.NAN:r||i?us.INFINITY:0===n.im&&0===this.im?new us(this.re*n.re,0):new us(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=ua(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;if(o&&a||r&&i)return us.NAN;if(a||r)return us.INFINITY;if(o||i)return us.ZERO;if(0===n.im)return new us(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new us((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=n.im/n.re,t=n.im*e+n.re;return new us((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=ua(e,t),r=0===this.re&&0===this.im;if(0===n.re&&0===n.im)return us.ONE;if(0===n.im){if(0===this.im&&this.re>0)return new us(Math.pow(this.re,n.re),0);else if(0===this.re)switch((n.re%4+4)%4){case 0:return new us(Math.pow(this.im,n.re),0);case 1:return new us(0,Math.pow(this.im,n.re));case 2:return new us(-Math.pow(this.im,n.re),0);case 3:return new us(0,-Math.pow(this.im,n.re))}}if(r&&n.re>0)return us.ZERO;let i=Math.atan2(this.im,this.re),o=ui(this.re,this.im),a=Math.exp(n.re*o-n.im*i),s=n.im*o+n.re*i;return new us(a*Math.cos(s),a*Math.sin(s))},sqrt:function(){let e=this.re,t=this.im;if(0===t)if(e>=0)return new us(Math.sqrt(e),0);else return new us(0,Math.sqrt(-e));let n=Math.sqrt(.5*(un(e,t)+Math.abs(e))),r=Math.abs(t)/(2*n);return e>=0?new us(n,t<0?-r:r):new us(r,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new us(e,0):new us(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e,t=this.re,n=this.im;return new us(Math.expm1(t)*Math.cos(n)+-2*(e=Math.sin(.5*n))*e,Math.exp(t)*Math.sin(n))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new us(Math.log(e),0):new us(ui(e,t),Math.atan2(t,e))},abs:function(){return un(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new us(Math.sin(e)*ue(t),Math.cos(e)*ut(t))},cos:function(){let e=this.re,t=this.im;return new us(Math.cos(e)*ue(t),-Math.sin(e)*ut(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+ue(t);return new us(Math.sin(e)/n,ut(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-ue(t);return new us(-Math.sin(e)/n,ut(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*ue(2*t)+.5*Math.cos(2*e);return new us(Math.cos(e)*ue(t)/n,Math.sin(e)*ut(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*ue(2*t)-.5*Math.cos(2*e);return new us(Math.sin(e)*ue(t)/n,-Math.cos(e)*ut(t)/n)},asin:function(){let e=this.re,t=this.im,n=new us(t*t-e*e+1,-2*e*t).sqrt(),r=new us(n.re-t,n.im+e).log();return new us(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new us(t*t-e*e+1,-2*e*t).sqrt(),r=new us(n.re-t,n.im+e).log();return new us(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new us(0,1/0);if(-1===t)return new us(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new us((1-t*t-e*e)/n,-2*e/n).log();return new us(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new us(Math.atan2(1,e),0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).atan():new us(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(0,1/0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).acos():new us(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(Math.PI/2,1/0);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).asin():new us(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new us(ut(e)*Math.cos(t),ue(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new us(ue(e)*Math.cos(t),ut(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=ue(e)+Math.cos(t);return new us(ut(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=ue(e)-Math.cos(t);return new us(ut(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-ue(2*e);return new us(-2*ut(e)*Math.cos(t)/n,2*ue(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+ue(2*e);return new us(2*ue(e)*Math.cos(t)/n,-2*ut(e)*Math.sin(t)/n)},asinh:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new us(0,0);let t=Math.abs(e),n=Math.log(t+Math.sqrt(t*t+1));return new us(e<0?-n:n,0)}let n=new us(e*e-t*t+1,2*e*t).sqrt();return new us(e+n.re,t+n.im).log()},acosh:function(){let e=this.re,t=this.im;if(0===t){if(e>1)return new us(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new us(Math.log(-e+t),Math.PI)}return new us(0,Math.acos(e))}let n=new us(e-1,t).sqrt(),r=new us(e+1,t).sqrt();return new us(e+n.re*r.re-n.im*r.im,t+n.re*r.im+n.im*r.re).log()},atanh:function(){let e=this.re,t=this.im;if(0===t)return 0===e?new us(0,0):1===e?new us(1/0,0):-1===e?new us(-1/0,0):-1<e&&e<1?new us(.5*Math.log((1+e)/(1-e)),0):e>1?new us(.5*Math.log((e+1)/(e-1)),-Math.PI/2):new us(.5*Math.log(-((1+e)/(1-e))),Math.PI/2);let n=1-e,r=1+e,i=n*n+t*t;if(0===i)return new us(-1!==e?e/0:0,0!==t?t/0:0);let o=(r*n-t*t)/i,a=(t*n+r*t)/i;return new us(ui(o,a)/2,Math.atan2(a,o)/2)},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new us(0,Math.PI/2);let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).atanh():new us(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new us(1/0,0);let t=1/e;return new us(Math.log(t+Math.sqrt(t*t+1)),0)}let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).asinh():new us(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return us.INFINITY;let n=e*e+t*t;return 0!==n?new us(e/n,-t/n).acosh():new us(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return us.INFINITY;if(this.isInfinite())return us.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new us(e/n,-t/n)},conjugate:function(){return new us(this.re,-this.im)},neg:function(){return new us(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new us(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new us(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new us(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=ua(e,t);return Math.abs(n.re-this.re)<=us.EPSILON&&Math.abs(n.im-this.im)<=us.EPSILON},clone:function(){return new us(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<us.EPSILON&&(e=0),Math.abs(t)<us.EPSILON&&(t=0),0===t)?n+e:(0!==e?(n+=e,n+=" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},us.ZERO=new us(0,0),us.ONE=new us(1,0),us.I=new us(0,1),us.PI=new us(Math.PI,0),us.E=new us(Math.E,0),us.INFINITY=new us(1/0,1/0),us.NAN=new us(NaN,NaN),us.EPSILON=1e-15;var ul=aJ("Complex",[],()=>(us.prototype.type="Complex",us.prototype.isComplex=!0,us.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},us.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},us.prototype.format=function(e){var t=this.im,n=this.re,r=a4(this.re,e),i=a4(this.im,e),o=as(e)?e:e?e.precision:null;if(null!==o){var a=Math.pow(10,-o);Math.abs(n/t)<a&&(n=0),Math.abs(t/n)<a&&(t=0)}return 0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},us.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return us(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var n=arguments[0],r=arguments[1];if(as(n)){if(ad(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),as(r))return new us({r:n,phi:r});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},us.prototype.valueOf=us.prototype.toString,us.fromJSON=function(e){return new us(e)},us.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},us),{isClass:!0}),uu={s:1,n:0,d:1};function uc(e,t){if(isNaN(e=parseInt(e,10)))throw uv();return e*t}function ud(e,t){if(0===t)throw um();var n=Object.create(ug.prototype);n.s=e<0?-1:1;var r=uf(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function uh(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var up=function(e,t){var n,r=0,i=1,o=1,a=0,s=0,l=0,u=1,c=1,d=0,h=1,p=1,f=1;if(null==e);else if(void 0!==t){if(o=(r=e)*(i=t),r%1!=0||i%1!=0)throw uy()}else switch(typeof e){case"object":if("d"in e&&"n"in e)r=e.n,i=e.d,"s"in e&&(r*=e.s);else if(0 in e)r=e[0],1 in e&&(i=e[1]);else throw uv();o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(c=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=c);h<=1e7&&f<=1e7;){if(e===(n=(d+p)/(h+f))){h+f<=1e7?(r=d+p,i=h+f):f>h?(r=p,i=f):(r=d,i=h);break}e>n?(d+=p,h+=f):(p+=d,f+=h),h>1e7?(r=p,i=f):(r=d,i=h)}r*=c}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(null===(h=e.match(/\d+|./g)))throw uv();if("-"===h[d]?(o=-1,d++):"+"===h[d]&&d++,h.length===d+1?s=uc(h[d++],o):"."===h[d+1]||"."===h[d]?("."!==h[d]&&(a=uc(h[d++],o)),(++d+1===h.length||"("===h[d+1]&&")"===h[d+3]||"'"===h[d+1]&&"'"===h[d+3])&&(s=uc(h[d],o),u=Math.pow(10,h[d].length),d++),("("===h[d]&&")"===h[d+2]||"'"===h[d]&&"'"===h[d+2])&&(l=uc(h[d+1],o),c=Math.pow(10,h[d+1].length)-1,d+=3)):"/"===h[d+1]||":"===h[d+1]?(s=uc(h[d],o),u=uc(h[d+2],1),d+=3):"/"===h[d+3]&&" "===h[d+1]&&(a=uc(h[d],o),s=uc(h[d+2],o),u=uc(h[d+4],1),d+=5),h.length<=d){o=r=l+(i=u*c)*a+c*s;break}default:throw uv()}if(0===i)throw um();uu.s=o<0?-1:1,uu.n=Math.abs(r),uu.d=Math.abs(i)};function uf(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function ug(e,t){if(up(e,t),!(this instanceof ug))return ud(uu.s*uu.n,uu.d);e=uf(uu.d,uu.n),this.s=uu.s,this.n=uu.n/e,this.d=uu.d/e}var um=function(){return Error("Division by Zero")},uv=function(){return Error("Invalid argument")},uy=function(){return Error("Parameters must be integer")};ug.prototype={s:1,n:0,d:1,abs:function(){return ud(this.n,this.d)},neg:function(){return ud(-this.s*this.n,this.d)},add:function(e,t){return up(e,t),ud(this.s*this.n*uu.d+uu.s*this.d*uu.n,this.d*uu.d)},sub:function(e,t){return up(e,t),ud(this.s*this.n*uu.d-uu.s*this.d*uu.n,this.d*uu.d)},mul:function(e,t){return up(e,t),ud(this.s*uu.s*this.n*uu.n,this.d*uu.d)},div:function(e,t){return up(e,t),ud(this.s*uu.s*this.n*uu.d,this.d*uu.n)},clone:function(){return ud(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new ug(NaN);if(void 0===e)return ud(this.s*this.n%this.d,1);if(up(e,t),0===uu.n&&0===this.d)throw um();return ud(this.s*(uu.d*this.n)%(uu.n*this.d),uu.d*this.d)},gcd:function(e,t){return up(e,t),ud(uf(uu.n,this.n)*uf(uu.d,this.d),uu.d*this.d)},lcm:function(e,t){return(up(e,t),0===uu.n&&0===this.n)?ud(0,1):ud(uu.n*this.n,uf(uu.n,this.n)*uf(uu.d,this.d))},ceil:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new ug(NaN):ud(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,t){return up(e,t),ud(this.s*Math.round(this.n*uu.d/(this.d*uu.n))*uu.n,uu.d)},inverse:function(){return ud(this.s*this.d,this.n)},pow:function(e,t){if(up(e,t),1===uu.d)if(uu.s<0)return ud(Math.pow(this.s*this.d,uu.n),Math.pow(this.n,uu.n));else return ud(Math.pow(this.s*this.n,uu.n),Math.pow(this.d,uu.n));if(this.s<0)return null;var n=uh(this.n),r=uh(this.d),i=1,o=1;for(var a in n)if("1"!==a){if("0"===a){i=0;break}if(n[a]*=uu.n,n[a]%uu.d!=0)return null;n[a]/=uu.d,i*=Math.pow(a,n[a])}for(var a in r)if("1"!==a){if(r[a]*=uu.n,r[a]%uu.d!=0)return null;r[a]/=uu.d,o*=Math.pow(a,r[a])}return uu.s<0?ud(o,i):ud(i,o)},equals:function(e,t){return up(e,t),this.s*this.n*uu.d==uu.s*uu.n*this.d},compare:function(e,t){up(e,t);var n=this.s*this.n*uu.d-uu.s*uu.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=ud(n[r-1],1),o=r-2;o>=0;o--)i=i.inverse().add(n[o]);if(Math.abs(i.sub(t).valueOf())<e)return i.mul(this.s)}return this},divisible:function(e,t){return up(e,t),!(!(uu.n*this.d)||this.n*uu.d%(uu.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do r.push(Math.floor(t/n)),e=t%n,t=n,n=e;while(1!==t);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,n>2e3)return 0;return n}(n),i=function(e,t){for(var n=1,r=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,t,e),i=0;i<300;i++){if(n===r)return i;n=10*n%e,r=10*r%e}return 0}(n,r),o=this.s<0?"-":"";if(o+=t/n|0,t%=n,(t*=10)&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var a=r;a--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var a=e;t&&a--;)o+=t/n|0,t%=n,t*=10;return o}};var ux=aJ("Fraction",[],()=>(ug.prototype.type="Fraction",ug.prototype.isFraction=!0,ug.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ug.fromJSON=function(e){return new ug(e)},ug),{isClass:!0}),ub=n(42915);function uw(e,t){return!!e&&"object"==typeof e&&(!!aZ(uA,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function uS(e){return"object"==typeof e&&e&&e.constructor===Object}var uA={length:!0,name:!0},uC={toString:!0,valueOf:!0,toLocaleString:!0};class uM{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){var t,n,r=this.wrappedObject;if(uS(r)&&uw(r,e))return r[e];if("function"==typeof r[e]&&(t=r,n=e,!(null==t||"function"!=typeof t[n]||aZ(t,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(t))&&(aZ(uC,n)||!(n in Object.prototype)&&!(n in Function.prototype))))throw Error('Cannot access method "'+e+'" as a property');throw Error('No access to property "'+e+'"')}set(e,t){return!function(e,t,n){if(uS(e)&&uw(e,t))return e[t]=n;throw Error('No access to property "'+t+'"')}(this.wrappedObject,e,t),this}has(e){return e in this.wrappedObject}}function uk(e){return!!e&&(e instanceof Map||e instanceof uM||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var uT=function(){return uT=ub.create,ub};function u_(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function uI(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function uD(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uO={BigNumberDependencies:l8,ComplexDependencies:{createComplexClass:ul},DenseMatrixDependencies:l7,FractionDependencies:{createFractionClass:ux},createTyped:aJ("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=uT();return o.types=[{name:"number",test:as},{name:"Complex",test:au},{name:"BigNumber",test:al},{name:"Fraction",test:ac},{name:"Unit",test:ad},{name:"string",test:ah},{name:"Chain",test:aW},{name:"Array",test:ap},{name:"Matrix",test:af},{name:"DenseMatrix",test:am},{name:"SparseMatrix",test:av},{name:"Range",test:ay},{name:"Index",test:ax},{name:"boolean",test:ab},{name:"ResultSet",test:aw},{name:"Help",test:aS},{name:"function",test:aA},{name:"Date",test:aC},{name:"RegExp",test:aM},{name:"null",test:aT},{name:"undefined",test:a_},{name:"AccessorNode",test:aI},{name:"ArrayNode",test:aD},{name:"AssignmentNode",test:aO},{name:"BlockNode",test:aR},{name:"ConditionalNode",test:aE},{name:"ConstantNode",test:aP},{name:"FunctionNode",test:aN},{name:"FunctionAssignmentNode",test:aL},{name:"IndexNode",test:aB},{name:"Node",test:az},{name:"ObjectNode",test:aj},{name:"OperatorNode",test:aF},{name:"ParenthesisNode",test:aV},{name:"RangeNode",test:a$},{name:"SymbolNode",test:aH},{name:"Map",test:uk},{name:"Object",test:ak}],o.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||u_(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||uI(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||uI(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||uI(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||uD(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||u_(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||uD(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||uI(e);try{return new n(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||u_(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||uD(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],o})},uR="equalScalar",uE=aJ(uR,["typed","config"],e=>{var{typed:t,config:n}=e;return t(uR,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return st(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||function(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){var r;return r=n.epsilon,st(e.re,t.re,r)&&st(e.im,t.im,r)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw Error("Cannot compare units with different base");return this(e.value,t.value)}})});aJ(uR,["typed","config"],e=>{var{typed:t,config:n}=e;return t(uR,{"number, number":function(e,t){return st(e,t,n.epsilon)}})});var uP={typedDependencies:uO,createEqualScalar:uE},uL=aJ("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ah(t))throw Error("Invalid datatype: "+t);if(af(e)){var n,r,a;n=this,r=e,a=t,"SparseMatrix"===r.type?(n._values=r._values?aU(r._values):void 0,n._index=aU(r._index),n._ptr=aU(r._ptr),n._size=aU(r._size),n._datatype=a||r._datatype):o(n,r.valueOf(),a||r._datatype)}else if(e&&ap(e.index)&&ap(e.ptr)&&ap(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(ap(e))o(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+aG(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,l=0;if(ah(i)&&(s=t.find(n,[i,i])||n,l=t.convert(0,i)),o>0){var u=0;do{e._ptr.push(e._index.length);for(var c=0;c<o;c++){var d=r[c];if(ap(d)){if(0===u&&a<d.length&&(a=d.length),u<d.length){var h=d[u];s(h,l)||(e._values.push(h),e._index.push(c))}}else 0===u&&a<1&&(a=1),s(d,l)||(e._values.push(d),e._index.push(c))}u++}while(u<a)}e._ptr.push(e._index.length),e._size=[o,a]}function a(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function s(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function l(e,r,i,o){var a,s,l,u=o||0,c=n,d=0;ah(e._datatype)&&(c=t.find(n,[e._datatype,e._datatype])||n,d=t.convert(0,e._datatype),u=t.convert(u,e._datatype));var h=!c(u,d),p=e._size[0],f=e._size[1];if(i>f){for(s=f;s<i;s++)if(e._ptr[s]=e._values.length,h)for(a=0;a<p;a++)e._values.push(u),e._index.push(a);e._ptr[i]=e._values.length}else i<f&&(e._ptr.splice(i+1,f-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(f=i,r>p){if(h){var g=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]+g,l=e._ptr[s+1]+g;var m=0;for(a=p;a<r;a++,m++)e._values.splice(l+m,0,u),e._index.splice(l+m,0,a),g++}e._ptr[f]=e._values.length}}else if(r<p){var v=0;for(s=0;s<f;s++){e._ptr[s]=e._ptr[s]-v;var y=e._ptr[s],x=e._ptr[s+1]-v;for(l=y;l<x;l++)(a=e._index[l])>r-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[s]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function u(e,t,n,r,i){var o,a,s=r[0],l=r[1],u=[];for(o=0;o<s;o++)for(a=0,u[o]=[];a<l;a++)u[o][a]=0;for(a=0;a<l;a++)for(var c=n[a],d=n[a+1],h=c;h<d;h++)u[o=t[h]][a]=e?i?aU(e[h]):e[h]:1;return u}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return sf(this._values,aG)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!ax(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,r,o,a,s=t.size();if(s.length!==e._size.length)throw new so(s.length,e._size.length);var l=t.min(),u=t.max();for(n=0,r=e._size.length;n<r;n++)su(l[n],e._size[n]),su(u[n],e._size[n]);var c=e._values,d=e._index,h=e._ptr,p=t.dimension(0),f=t.dimension(1),g=[],m=[];p.forEach(function(e,t){m[e]=t[0],g[e]=!0});var v=c?[]:void 0,y=[],x=[];return f.forEach(function(e){for(x.push(y.length),o=h[e],a=h[e+1];o<a;o++)!0===g[n=d[o]]&&(y.push(m[n]),v&&v.push(c[o]))}),x.push(y.length),new i({values:v,index:y,ptr:x,size:s,datatype:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,o=t.size(),a=t.isScalar();if(af(n)?(i=n.size(),n=n.toArray()):i=ss(n),a){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(1!==o.length&&2!==o.length)throw new so(o.length,e._size.length,"<");if(i.length<o.length){for(var s=0,l=0;1===o[s]&&1===i[s];)s++;for(;1===o[s];)l++,s++;n=sp(n,o.length,l,i)}if(!aY(o,i))throw new so(o,i,">");if(1===o.length)t.dimension(0).forEach(function(t,i){su(t),e.set([t,0],n[i[0]],r)});else{var u=t.dimension(0),c=t.dimension(1);u.forEach(function(t,i){su(t),c.forEach(function(o,a){su(o),e.set([t,o],n[i[0]][a[0]],r)})})}}return e}(this,e,t,n);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];su(t,this._size[0]),su(n,this._size[1]);var r=a(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!ap(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new so(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=e[0],u=e[1],c=this._size[0],d=this._size[1],h=n,p=0;ah(this._datatype)&&(h=t.find(n,[this._datatype,this._datatype])||n,p=t.convert(0,this._datatype)),(o>c-1||u>d-1)&&(l(this,Math.max(o+1,c),Math.max(u+1,d),i),c=this._size[0],d=this._size[1]),su(o,c),su(u,d);var f=a(o,this._ptr[u],this._ptr[u+1],this._index);return f<this._ptr[u+1]&&this._index[f]===o?h(r,p)?function(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}(f,u,this._values,this._index,this._ptr):this._values[f]=r:s(f,o,u,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,n){if(!ag(e))throw TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw Error("Only two dimensions matrix are supported");return r.forEach(function(e){if(!as(e)||!a2(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+si(r)+")")}),l(n?this.clone():this,r[0],r[1],t)},i.prototype.reshape=function(e,t){if(!ap(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!as(t)||!a2(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+si(e)+")")});var n=this._size[0]*this._size[1],r=(e=sd(e,n))[0]*e[1];if(n!==r)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var o=[],l=0;l<i._ptr.length;l++)for(var u=0;u<i._ptr[l+1]-i._ptr[l];u++)o.push(l);for(var c=i._values.slice(),d=i._index.slice(),h=0;h<i._index.length;h++){var p=d[h],f=o[h],g=p*i._size[1]+f;o[h]=g%e[1],d[h]=Math.floor(g/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var m=0;m<i._ptr.length;m++)i._ptr[m]=0;for(var v=0;v<c.length;v++){var y=d[v],x=o[v],b=c[v];s(a(y,i._ptr[x],i._ptr[x+1],i._index),y,x,b,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?aU(this._values):void 0,index:aU(this._index),ptr:aU(this._ptr),size:aU(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var o=this;return function(e,r,o,a,s){var l=[],u=[],c=[],d=n,h=0;ah(e._datatype)&&(d=t.find(n,[e._datatype,e._datatype])||n,h=t.convert(0,e._datatype));for(var p=function(e,t,n){e=a(e,t,n),d(e,h)||(l.push(e),u.push(t))},f=0;f<=o;f++){c.push(l.length);var g=e._ptr[f],m=e._ptr[f+1];if(s)for(var v=g;v<m;v++){var y=e._index[v];y>=0&&y<=r&&p(e._values[v],y-0,f-0)}else{for(var x={},b=g;b<m;b++)x[e._index[b]]=e._values[b];for(var w=0;w<=r;w++)p(w in x?x[w]:0,w-0,f-0)}}return c.push(l.length),new i({values:l,index:u,ptr:c,size:[r-0+1,o-0+1]})}(this,this._size[0]-1,this._size[1]-1,function(t,n,r){return e(t,[n,r],o)},r)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(t)for(var s=o;s<a;s++){var l=this._index[s];e(this._values[s],[l,i],this)}else{for(var u={},c=o;c<a;c++)u[this._index[c]]=this._values[c];for(var d=0;d<n;d++)e(d in u?u[d]:0,[d,i],this)}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},i.prototype.toArray=function(){return u(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return u(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+si(t,e)+" x "+si(n,e)+"] density: "+si(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],l=a;l<s;l++)i+="\n ("+si(this._index[l],e)+", "+si(o,e)+") ==> "+(this._values?si(this._values[l],e):"X");return i},i.prototype.toString=function(){return si(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],o=this._size[1],a=Math.min(r-n,o-t),s=[],l=[],u=[];u[0]=0;for(var c=t;c<o&&s.length<a;c++)for(var d=this._ptr[c],h=this._ptr[c+1],p=d;p<h;p++){var f=this._index[p];if(f===c-t+n){s.push(this._values[p]),l[s.length-1]=f-n;break}}return u.push(s.length),new i({values:s,index:l,ptr:u,size:[a,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,o,a,s){if(!ap(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(al(e)&&(e=e.toNumber()),!as(e)||!a2(e)||e<1)throw Error("Size values must be positive integers");return e}),o){if(al(o)&&(o=o.toNumber()),!as(o)||!a2(o))throw TypeError("The parameter k must be an integer number")}else o=0;var l,u=n,c=0;ah(s)&&(u=t.find(n,[s,s])||n,c=t.convert(0,s));var d=o>0?o:0,h=o<0?-o:0,p=e[0],f=e[1],g=Math.min(p-h,f-d);if(ap(r)){if(r.length!==g)throw Error("Invalid value array length");l=function(e){return r[e]}}else if(af(r)){var m=r.size();if(1!==m.length||m[0]!==g)throw Error("Invalid matrix length");l=function(e){return r.get([e])}}else l=function(){return r};for(var v=[],y=[],x=[],b=0;b<f;b++){x.push(v.length);var w=b-d;if(w>=0&&w<g){var S=l(w);u(S,c)||(y.push(w+h),v.push(S))}}return x.push(v.length),new i({values:v,index:y,ptr:x,size:[p,f]})},i.prototype.swapRows=function(e,t){if(!as(e)||!a2(e)||!as(t)||!a2(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return su(e,this._size[0]),su(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},i._swapRows=function(e,t,n,r,i,o){for(var s=0;s<n;s++){var l=o[s],u=o[s+1],c=a(e,l,u,i),d=a(t,l,u,i);if(c<u&&d<u&&i[c]===e&&i[d]===t){if(r){var h=r[c];r[c]=r[d],r[d]=h}continue}if(c<u&&i[c]===e&&(d>=u||i[d]!==t)){var p=r?r[c]:void 0;i.splice(d,0,t),r&&r.splice(d,0,p),i.splice(d<=c?c+1:c,1),r&&r.splice(d<=c?c+1:c,1);continue}if(d<u&&i[d]===t&&(c>=u||i[c]!==e)){var f=r?r[d]:void 0;i.splice(c,0,e),r&&r.splice(c,0,f),i.splice(c<=d?d+1:d,1),r&&r.splice(c<=d?d+1:d,1)}}},i},{isClass:!0}),uN="matrix",uB={DenseMatrixDependencies:l7,MatrixDependencies:l9,SparseMatrixDependencies:{MatrixDependencies:l9,equalScalarDependencies:uP,typedDependencies:uO,createSparseMatrixClass:uL},typedDependencies:uO,createMatrix:aJ(uN,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(uN,{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(e,t,n){if("dense"===t||"default"===t||void 0===t)return new r(e,n);if("sparse"===t)return new i(e,n);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}})},uz="zeros",uj=aJ(uz,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(uz,{"":function(){return"Array"===n.matrix?o([]):o([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return o(e,t)}return"Array"===n.matrix?o(e):o(e,"default")},Array:o,Matrix:function(e){var t=e.storage();return o(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return o(e.valueOf(),t)}});function o(e,t){var n,o=(n=!1,e.forEach(function(e,t,r){al(e)&&(n=!0,r[t]=e.toNumber())}),n)?new i(0):0;if(e.forEach(function(e){if("number"!=typeof e||!a2(e)||e<0)throw Error("Parameters in function zeros must be positive integers")}),t){var a=r(t);return e.length>0?a.resize(e,o):a}var s=[];return e.length>0?sc(s,e,o):s}}),uF=aJ("algorithm11",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=n,g=0,m=i;"string"==typeof d&&(a=d,f=t.find(n,[a,a]),g=t.convert(0,a),r=t.convert(r,a),m=t.find(i,[a,a]));for(var v=[],y=[],x=[],b=0;b<p;b++){x[b]=y.length;for(var w=u[b],S=u[b+1],A=w;A<S;A++){var C=l[A],M=o?m(r,s[A]):m(s[A],r);f(M,g)||(y.push(C),v.push(M))}}return x[p]=y.length,e.createSparseMatrix({values:v,index:y,ptr:x,size:[h,p],datatype:a})}}),uV=aJ("algorithm12",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],S=b;S<w;S++){var A=l[S];m[A]=s[S],v[A]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=o?f(r,0):f(0,r)}return new n({data:g,size:[h,p],datatype:a})}}),u$=aJ("algorithm14",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a=e._data,s=e._size,l=e._datatype,u=r;"string"==typeof l&&(o=l,n=t.convert(n,o),u=t.find(r,[o,o]));var c=s.length>0?function e(t,n,r,i,o,a,s){var l=[];if(n===r.length-1)for(var u=0;u<i;u++)l[u]=s?t(a,o[u]):t(o[u],a);else for(var c=0;c<i;c++)l[c]=e(t,n+1,r,r[n+1],o[c],a,s);return l}(u,0,s,s[0],a,n,i):[];return e.createDenseMatrix({data:c,size:aU(s),datatype:o})}});function uH(e,t){var n;if(!a2(e)||!a2(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}function uW(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!a2(t)||t<0||t>15)throw Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(a6(e,t))}uH.signature="number, number";var uG="Number of decimals in function round must be an integer",uU="round",uq=aJ(uU,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:a}=e,s=uF({typed:t,equalScalar:r}),l=uV({typed:t,DenseMatrix:a}),u=u$({typed:t});return t(uU,{number:uW,"number, number":uW,"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return new o(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(uG);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);var n=t.toNumber();return e.round(n)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(uG);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(uG);return e.round(t.toNumber())},"Array | Matrix":function(e){return function e(t,n,r){return t&&"function"==typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"Array, number | BigNumber":function(e,t){return u(n(e),t,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(e,t){return u(n(t),e,this,!0).valueOf()}})}),uY=aJ("algorithm01",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a,s=e._data,l=e._size,u=e._datatype,c=n._values,d=n._index,h=n._ptr,p=n._size,f=n._datatype;if(l.length!==p.length)throw new so(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var g=l[0],m=l[1],v="string"==typeof u&&u===f?u:void 0,y=v?t.find(r,[v,v]):r,x=[];for(o=0;o<g;o++)x[o]=[];var b=[],w=[];for(a=0;a<m;a++){for(var S=a+1,A=h[a],C=h[a+1],M=A;M<C;M++)b[o=d[M]]=i?y(c[M],s[o][a]):y(s[o][a],c[M]),w[o]=S;for(o=0;o<g;o++)w[o]===S?x[o][a]=b[o]:x[o][a]=s[o][a]}return e.createDenseMatrix({data:x,size:[g,m],datatype:v})}}),uX=aJ("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o,a,s,l,u,c,d=e._values,h=e._index,p=e._ptr,f=e._size,g=e._datatype,m=r._values,v=r._index,y=r._ptr,x=r._size,b=r._datatype;if(f.length!==x.length)throw new so(f.length,x.length);if(f[0]!==x[0]||f[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+x+")");var w=f[0],S=f[1],A=n,C=0,M=i;"string"==typeof g&&g===b&&(o=g,A=t.find(n,[o,o]),C=t.convert(0,o),M=t.find(i,[o,o]));var k=d&&m?[]:void 0,T=[],_=[],I=d&&m?[]:void 0,D=d&&m?[]:void 0,O=[],R=[];for(s=0;s<S;s++){_[s]=T.length;var E=s+1;for(u=p[s],c=p[s+1],l=u;l<c;l++)a=h[l],T.push(a),O[a]=E,I&&(I[a]=d[l]);for(u=y[s],c=y[s+1],l=u;l<c;l++)if(O[a=v[l]]===E){if(I){var P=M(I[a],m[l]);A(P,C)?O[a]=null:I[a]=P}}else T.push(a),R[a]=E,D&&(D[a]=m[l]);if(I&&D)for(l=_[s];l<T.length;)O[a=T[l]]===E?(k[l]=I[a],l++):R[a]===E?(k[l]=D[a],l++):T.splice(l,1)}return _[S]=T.length,e.createSparseMatrix({values:k,index:T,ptr:_,size:[w,S],datatype:o})}}),uZ=aJ("algorithm10",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,d=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h=c[0],p=c[1],f=i;"string"==typeof d&&(a=d,r=t.convert(r,a),f=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<p;y++){for(var x=y+1,b=u[y],w=u[y+1],S=b;S<w;S++){var A=l[S];m[A]=s[S],v[A]=x}for(var C=0;C<h;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?f(r,m[C]):f(m[C],r):g[C][y]=r}return new n({data:g,size:[h,p],datatype:a})}}),uK=aJ("algorithm13",["typed"],e=>{var{typed:t}=e;return function(e,n,r){var i,o=e._data,a=e._size,s=e._datatype,l=n._data,u=n._size,c=n._datatype,d=[];if(a.length!==u.length)throw new so(a.length,u.length);for(var h=0;h<a.length;h++){if(a[h]!==u[h])throw RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");d[h]=a[h]}var p=r;"string"==typeof s&&s===c&&(i=s,p=t.find(r,[i,i]));var f=d.length>0?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var l=0;l<i;l++)s[l]=t(o[l],a[l]);else for(var u=0;u<i;u++)s[u]=e(t,n+1,r,r[n+1],o[u],a[u]);return s}(p,0,d,d[0],o,l):[];return e.createDenseMatrix({data:f,size:d,datatype:i})}}),uQ=aJ("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:o}=e,a=uY({typed:t}),s=uX({typed:t,equalScalar:r}),l=uZ({typed:t,DenseMatrix:o}),u=uK({typed:t}),c=u$({typed:t});return t("gcd",{"number, number":uH,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})});let{round:uJ}=sw({roundDependencies:{BigNumberDependencies:l8,DenseMatrixDependencies:l7,equalScalarDependencies:uP,matrixDependencies:uB,typedDependencies:uO,zerosDependencies:{BigNumberDependencies:l8,matrixDependencies:uB,typedDependencies:uO,createZeros:uj},createRound:uq}}),{gcd:u0}=sw({gcdDependencies:{BigNumberDependencies:l8,DenseMatrixDependencies:l7,equalScalarDependencies:uP,matrixDependencies:uB,typedDependencies:uO,createGcd:uQ}}),u1=10;function u2(e,t){let n=t.startMs,r=e.values,i=[];for(let e of r){for(;n<e[0];)i.push([n,null]),n+=t.stepMs;i.push([n,e[1]]),n+=t.stepMs}for(;n<=t.endMs;)i.push([n,null]),n+=t.stepMs;return i}function u5(e){let t,n,r=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(r.push(t.stepMs),void 0===n){n=t.timeRange;continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let r=t.values[e];if(void 0===r)continue;let[i]=r,o=new Date(i),a=new Date(i);if(void 0===n){n={start:o,end:a};continue}o<n.start&&(n.start=o),a>n.end&&(n.end=a)}if(void 0===n)return;let e=n.start.valueOf(),r=n.end.valueOf(),i=r-e;return{startMs:e,endMs:r,rangeMs:i,stepMs:u1}}if(void 0===n)return;if(1===r.length)t=r[0];else{let e=u0(...r);t=e<u1?u1:e}let i=n.start.valueOf(),o=n.end.valueOf();return{startMs:i,endMs:o,stepMs:t,rangeMs:o-i}}function u4(e){return/^[0-9a-fA-F]+$/.test(e)}function u3(e){return e.spec?.spec?.display?.name?e.spec.spec.display.name:e.spec?.display?.name?e.spec.display.name:e.metadata.name}function u6(e){return e.spec?.spec?.display?.name?`${e.spec.spec.display.name} (ID: ${e.metadata.name})`:e.spec?.display?.name?`${e.spec.display.name} (ID: ${e.metadata.name})`:e.metadata.name}let u8=(0,I.createContext)(void 0);function u9(e){let{children:t,timeZone:n}=e;return(0,_.jsx)(u8.Provider,{value:n,children:t})}function u7(){let e=(0,I.useContext)(u8);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>oK(t,n,e),dateFormatOptionsWithUserTimeZone:t=>oZ(t,e)}}function ce({label:e,color:t,size:n="small",onColorChange:r,onClear:i}){let[o,a]=(0,I.useState)(null),s=!!o,{thresholds:{defaultColor:l,palette:u}}=tA();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ct,{size:n,"aria-label":`change ${e} color`,isSelected:s,iconColor:t,onClick:e=>{a(e.currentTarget)},children:(0,_.jsx)(eZ,{})}),(0,_.jsx)(tx.Ay,{"data-testid":"options color picker",open:s,anchorEl:o,onClose:()=>{a(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,_.jsx)(tv,{color:t,palette:[l,...u],onChange:r,onClear:i})})]})}let ct=(0,N.A)(eY,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var cn=n(56599),cr=n(74628),ci=n(43945);function co(e,t){return"ALL"!==t&&!!t[e.id]}var ca=n(54382),cs=n(67214);function cl(e){return(0,V.Ay)("MuiListItemButton",e)}let cu=(0,F.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),cc=(0,N.A)(eS,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,B.A)(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${cu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${cu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${cu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.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,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${cu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${cu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),cd=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:d=!1,className:h,...p}=n,f=I.useContext(cs.A),g=I.useMemo(()=>({dense:s||f.dense||!1,alignItems:r,disableGutters:l}),[r,f.dense,s,l]),m=I.useRef(null);(0,ca.A)(()=>{i&&m.current&&m.current.focus()},[i]);let v={...n,alignItems:r,dense:g.dense,disableGutters:l,divider:u,selected:d},y=(e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l=(0,R.A)({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},cl,n);return{...n,...l}})(v),x=(0,Q.A)(m,t);return(0,_.jsx)(cs.A.Provider,{value:g,children:(0,_.jsx)(cc,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:(0,O.A)(y.focusVisible,c),ownerState:v,className:(0,O.A)(y.root,h),...p,classes:y,children:a})})});var ch=n(47599),cp=n(88091);function cf(e){return(0,V.Ay)("MuiListItemText",e)}let cg=(0,F.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var cm=n(73397);let cv=(0,N.A)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cg.primary}`]:t.primary},{[`& .${cg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${ch.A.root}:where(& .${cg.primary})`]:{display:"block"},[`.${ch.A.root}:where(& .${cg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),cy=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:u,secondaryTypographyProps:c,slots:d={},slotProps:h={},...p}=n,{dense:f}=I.useContext(cs.A),g=null!=s?s:r,m=u,v={...n,disableTypography:o,inset:a,primary:!!g,secondary:!!m,dense:f},y=(e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return(0,R.A)({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},cf,t)})(v),x={slots:d,slotProps:{primary:l,secondary:c,...h}},[b,w]=(0,cm.A)("root",{className:(0,O.A)(y.root,i),elementType:cv,externalForwardedProps:{...x,...p},ownerState:v,ref:t}),[S,A]=(0,cm.A)("primary",{className:y.primary,elementType:cp.A,externalForwardedProps:x,ownerState:v}),[C,M]=(0,cm.A)("secondary",{className:y.secondary,elementType:cp.A,externalForwardedProps:x,ownerState:v});return null==g||g.type===cp.A||o||(g=(0,_.jsx)(S,{variant:f?"body2":"body1",component:A?.variant?void 0:"span",...A,children:g})),null==m||m.type===cp.A||o||(m=(0,_.jsx)(C,{variant:"body2",color:"textSecondary",...M,children:m})),(0,_.jsxs)(b,{...w,children:[g,m]})}),cx=(0,I.memo)(function({color:e,sx:t,...n}){return(0,_.jsx)(cr.A,{...n,sx:iU({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),cb=(0,I.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:i,onMouseOver:o,onMouseOut:a,index:s,...l},u){let[c,d]=(0,I.useState)(n);return(0,_.jsxs)(cd,{...l,role:"listitem",sx:iU({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(t,e.id),e.onClick?.(t)},onMouseOver:t=>o?.(t,{id:e.id,index:s}),onMouseOut:t=>a?.(t,{id:e.id,index:s}),selected:i,ref:u,children:[(0,_.jsx)(cr.A,{sx:{display:"flex",alignItems:"center"},children:(0,_.jsx)(cx,{color:e.color})}),(0,_.jsx)(cy,{primary:e.label,primaryTypographyProps:{noWrap:c},onMouseOver:function(){n&&d(!1)},onMouseOut:function(){n&&d(!0)}})]})}),cw=(0,I.memo)(cb);function cS({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:o}){return(0,_.jsx)(cr.A,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,_.jsx)(cw,{item:e,index:t,isVisuallySelected:co(e,n),onMouseOver:i,onMouseOut:o,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}function cA(e){e()}function cC(e,t){return n=>e(t(n))}function cM(e){return void 0!==e}function ck(){}function cT(e,t){return t(e)}function c_(...e){return e}function cI(e){e(2)}function cD(e){return e(4)}function cO(e,t){return e(1,e=>t(0,e))}function cR(e,t){let n=e(1,e=>{n(),t(e)});return n}function cE(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function cP(e,t){return e===t}function cL(e=cP){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function cN(e){return t=>n=>{e(n)&&t(n)}}function cB(e){return t=>cC(t,e)}function cz(e){return t=>()=>{t(e)}}function cj(e,...t){let n=function(...e){return t=>e.reduceRight(cT,t)}(...t);return(t,r)=>{switch(t){case 2:cI(e);return;case 1:return e(1,n(r))}}}function cF(e,t){return n=>r=>{n(t=e(t,r))}}function cV(e){return t=>n=>{e>0?e--:t(n)}}function c$(e){let t=null,n;return r=>i=>{t=i,n||(n=setTimeout(()=>{n=void 0,r(t)},e))}}function cH(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{let s=n;n|=a,t[o]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{let a=()=>{e([o].concat(t))};n===i?a():r=a}}function cW(e){let t=e,n=cU();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function cG(e,t){var n;return n=cW(t),cO(e,n),n}function cU(){let e=[];return(t,n)=>{switch(t){case 0:e.slice().forEach(e=>{e(n)});return;case 2:e.splice(0);return;case 1:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function cq(e){var t;return t=cU(),cO(e,t),t}let cY={singleton:!0};function cX(e,t=[],n=cY){let{singleton:r}=n;return{constructor:e,dependencies:t,id:cZ(),singleton:r}}let cZ=()=>Symbol("id");function cK(...e){let t=cU(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,o)=>{let a=2**o;e(1,e=>{n[o]=e,(r|=a)===i&&t(0,n)})}),function(e,o){switch(e){case 2:return void cI(t);case 1:return r===i&&o(n),t(1,o)}}}function cQ(e,t=cP){return cj(e,cL(t))}function cJ(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(cA)}}(...e.map(e=>e(1,n)))}}}let c0=1,c1={0:"debug",3:"error",[c0]:"log",2:"warn"},c2=cX(()=>{let e=cW(3);return{log:cW((t,n,r=c0)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??cD(e))&&console[c1[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0}),c5=new WeakMap;function c4(e){return"self"in e?e.document.documentElement:e}function c3(e){c5.delete(c4(e))}function c6(e,t){return!function(e){let t=c4(e),n=c5.get(t);if(void 0!==n)return n;let r="rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction;return c5.set(t,r),r}(e)?t:-t}function c8(e,t,n){return c9(e,t,n).callbackRef}function c9(e,t,n){let r=D().useRef(null),i=D().useMemo(()=>"u">typeof ResizeObserver?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return{callbackRef:e=>{e&&t?(i?.observe(e),r.current=e):(r.current&&i?.unobserve(r.current),r.current=null)},ref:r}}function c7(e,t,n,r,i,o,a,s,l){return c9(D().useCallback(n=>{let l,u=function(e,t,n,r){let i=e.length;if(0===i)return null;let o=[];for(let a=0;a<i;a++){let i=e.item(a);if(void 0===i.dataset.index)continue;let s=parseInt(i.dataset.index,10),l=parseFloat(i.dataset.knownSize),u=t(i,n);if(0===u&&r("Zero-sized element, this should not happen",{child:i},3),u===l)continue;let c=o[o.length-1];0===o.length||c.size!==u||c.endIndex!==s-1?o.push({endIndex:s,size:u,startIndex:s}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",i),c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;let d=c.lastElementChild?.dataset.viewportType==="window";d&&(l=c.ownerDocument.defaultView);let h=a?s?a.scrollWidth:a.scrollHeight:d?s?l.document.documentElement.scrollWidth:l.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,p=a?s?a.offsetWidth:a.offsetHeight:d?s?l.innerWidth:l.innerHeight:s?c.offsetWidth:c.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(a?s?c6(a,a.scrollLeft):a.scrollTop:d?s?c6(l,l.scrollX||l.document.documentElement.scrollLeft):l.scrollY||l.document.documentElement.scrollTop:s?c6(c,c.scrollLeft):c.scrollTop,0),viewportHeight:p}),o?.(s?de("column-gap",getComputedStyle(n).columnGap,i):de("row-gap",getComputedStyle(n).rowGap,i)),null!==u&&e(u)},[e,t,i,o,a,r,s]),n,l)}function de(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function dt(e,t,n){let r=D().useRef(null),i=D().useCallback(n=>{let i,o;if(!n?.offsetParent)return;let s=n.getBoundingClientRect(),l=s.width;if(t){let e=t.getBoundingClientRect(),n=s.top-e.top;o=e.height-Math.max(0,n),i=n+t.scrollTop}else{let e=a.current.ownerDocument.defaultView;o=e.innerHeight-Math.max(0,s.top),i=s.top+e.scrollY}r.current={listHeight:s.height,offsetTop:i,visibleHeight:o,visibleWidth:l},e(r.current)},[e,t]),{callbackRef:o,ref:a}=c9(i,!0,n),s=D().useCallback(()=>{i(a.current)},[i,a]);return D().useEffect(()=>{if(t){t.addEventListener("scroll",s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}let e=a.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,a]),o}let dn=cX(()=>{let e=cU(),t=cU(),n=cW(0),r=cU(),i=cW(0),o=cU(),a=cU(),s=cW(0),l=cW(0),u=cW(0),c=cW(0),d=cU(),h=cU(),p=cW(!1),f=cW(!1),g=cW(!1);return cO(cj(e,cB(({scrollTop:e})=>e)),t),cO(cj(e,cB(({scrollHeight:e})=>e)),a),cO(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),dr={lvl:0};function di(e,t){let n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]),o=[];for(let a=1;a<n;a++){let{index:n,value:s}=t(e[a]);o.push({end:n-1,start:r,value:i}),r=n,i=s}return o.push({end:1/0,start:r,value:i}),o}function da(e){return e===dr}function ds(e,t){if(!da(e))return t===e.k?e.v:t<e.k?ds(e.l,t):ds(e.r,t)}function dl(e,t,n="k"){if(da(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=dl(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return dl(e.l,t,n)}function du(e,t,n){return da(e)?dg(t,n,1):t===e.k?dp(e,{k:t,v:n}):t<e.k?dv(dm(dp(e,{l:du(e.l,t,n)}))):dv(dm(dp(e,{r:du(e.r,t,n)})))}function dc(e,t,n){if(da(e))return[];let r=dl(e,t)[0];return di(function e(t,n,r){if(da(t))return[];let{k:i,l:o,r:a,v:s}=t,l=[];return i>n&&(l=l.concat(e(o,n,r))),i>=n&&i<=r&&l.push({k:i,v:s}),i<=r&&(l=l.concat(e(a,n,r))),l}(e,r,n),({k:e,v:t})=>({index:e,value:t}))}function dd(e){return da(e)?[]:[...dd(e.l),{k:e.k,v:e.v},...dd(e.r)]}function dh(e){let{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(df(t))return dm(dp(e,{lvl:n-1}));if(!da(t)&&!da(t.r))return dp(t.r,{l:dp(t,{r:t.r.l}),lvl:n,r:dp(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(df(e))return dv(dp(e,{lvl:n-1}));if(!da(r)&&!da(r.l)){let t=r.l,i=df(t)?r.lvl-1:r.lvl;return dp(t,{l:dp(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:dv(dp(r,{l:t.r,lvl:i}))})}throw Error("Unexpected empty nodes")}function dp(e,t){return dg(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function df(e){return da(e)||e.lvl>e.r.lvl}function dg(e,t,n,r=dr,i=dr){return{k:e,l:r,lvl:n,r:i,v:t}}function dm(e){let{l:t}=e;return da(t)||t.lvl!==e.lvl?e:dp(t,{r:dp(e,{l:t.r})})}function dv(e){let{lvl:t,r:n}=e;return da(n)||da(n.r)||n.lvl!==t||n.r.lvl!==t?e:dp(n,{l:dp(e,{r:n.l}),lvl:t+1})}function dy(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function dx(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let db=cX(()=>({recalcInProgress:cW(!1)}),[],{singleton:!0});function dw(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function dS(e,t){return Math.round(e.getBoundingClientRect()[t])}function dA(e){return!da(e.groupOffsetTree)}function dC({index:e},t){return t===e?0:t<e?-1:1}function dM({offset:e},t){return t===e?0:t<e?-1:1}function dk(e,t,n){if(0===t.length)return 0;let{index:r,offset:i,size:o}=t[dw(t,e,dC)],a=e-r,s=o*a+(a-1)*n+i;return s>0?s+n:s}function dT(e,t){if(!dA(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function d_(e,t,n){if(void 0!==e.groupIndex)return t.groupIndices[e.groupIndex]+1;let r=dT("LAST"===e.index?n:e.index,t);return Math.max(0,Math.min(n,r))}function dI(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,0);let o=e.sizeTree,a=o,s=0;if(n.length>0&&da(o)&&2===t.length){let e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>du(du(t,n,e),n+1,r),a)}else[a,s]=function(e,t){let n=da(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),da(e)){e=du(e,0,i);continue}let a=dc(e,o-1,t+1);if(a.some(function(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}(r)))continue;let s=!1,l=!1;for(let{end:n,start:r,value:o}of a)s?(t>=r||i===o)&&(e=function e(t,n){if(da(t))return dr;let{k:r,l:i,r:o}=t;if(n===r){if(da(i))return o;if(da(o))return i;let[e,n]=function e(t){return da(t.r)?[t.k,t.v]:e(t.r)}(i);return dh(dp(t,{k:e,l:function e(t){return da(t.r)?t.l:dh(dp(t,{r:e(t.r)}))}(i),v:n}))}return n<r?dh(dp(t,{l:e(i,n)})):dh(dp(t,{r:e(o,n)}))}(e,r)):(l=o!==i,s=!0),n>t&&t>=r&&o!==i&&(e=du(e,t+1,o));l&&(e=du(e,o,i))}return[e,n]}(a,t);if(a===o)return e;let{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=dO(e.offsetTree,s,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>du(e,t,dk(t,d,i)),dr),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function dD(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n!==e)}function dO(e,t,n,r){let i=e,o=0,a=0,s=0,l=0;if(0===t)i=[];else{l=dw(i,t-1,dC),s=i[l].offset;let e=dl(n,t-1);o=e[0],a=e[1],i.length&&i[l].size===dl(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}for(let{start:e,value:l}of dc(n,t,1/0)){let t=e-o,n=t*a+s+t*r;i.push({index:e,offset:n,size:l}),o=e,s=n,a=l}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function dR(e){return{index:e.index,value:e}}let dE={offsetHeight:"height",offsetWidth:"width"},dP=cX(([{log:e},{recalcInProgress:t}])=>{let n=cU(),r=cU(),i=cG(r,0),o=cU(),a=cU(),s=cW(0),l=cW([]),u=cW(void 0),c=cW(void 0),d=cW(void 0),h=cW(void 0),p=cW((e,t)=>dS(e,dE[t])),f=cW(void 0),g=cW(0),m={groupIndices:[],groupOffsetTree:dr,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:dr},v=cG(cj(n,cH(l,e,g),cF(dI,m),cL()),m),y=cG(cj(l,cL(),cF((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),cB(({prev:e})=>e)),[]);cO(cj(l,cN(e=>e.length>0),cH(v,g),cB(([e,t,n])=>{let r=e.reduce((e,r,i)=>du(e,r,dk(r,t.offsetTree,n)||i),dr);return{...t,groupIndices:e,groupOffsetTree:r}})),v),cO(cj(r,cH(v),cN(([e,{lastIndex:t}])=>e<t),cB(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),cO(u,c);let x=cG(cj(u,cB(e=>void 0===e)),!0);cO(cj(c,cN(e=>void 0!==e&&da(cD(v).sizeTree)),cB(e=>{let t=cD(d),n=cD(l).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),cO(cj(h,cN(e=>void 0!==e&&e.length>0&&da(cD(v).sizeTree)),cB(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),cO(cj(l,cH(d,c),cN(([,e,t])=>void 0!==e&&void 0!==t),cB(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==a&&r.push({startIndex:o+1,endIndex:a-1,size:n})}return r})),n);let b=cq(cj(n,cH(v),cF(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),cB(e=>e.changed)));cj(s,cF((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),cB(e=>e.diff))(1,e=>{let{groupIndices:n}=cD(v);if(e>0)t(0,!0),o(0,e+dD(e,n));else if(e<0){let t=cD(y);t.length>0&&(e-=dD(-e,t)),a(0,e)}}),cj(s,cH(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},3)});let w=cq(o);cO(cj(o,cH(v),cB(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=ds(t.sizeTree,0),o=0,a=0;for(;o<e;){let e=t.groupIndices[a],s=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),a++,o+=s+1}let s=dd(t.sizeTree);return o!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return dd(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=cq(cj(a,cH(v,g),cB(([e,{offsetTree:t},n])=>dk(-e,t,n))));return cO(cj(a,cH(v,g),cB(([e,t,n])=>{if(t.groupIndices.length>0){if(da(t.sizeTree))return t;let r=dr,i=cD(y),o=0,a=0,s=0;for(;o<-e;){s=i[a];let e=i[a+1]-s-1;a++,o+=e+1}return r=dd(t.sizeTree).reduce((t,{k:n,v:r})=>du(t,Math.max(0,n+e),r),r),o!==-e&&(r=du(r,0,ds(t.sizeTree,s)),r=du(r,1,dl(t.sizeTree,-e+1)[1])),{...t,sizeTree:r,...dO(t.offsetTree,0,r,n)}}let r=dd(t.sizeTree).reduce((t,{k:n,v:r})=>du(t,Math.max(0,n+e),r),dr);return{...t,sizeTree:r,...dO(t.offsetTree,0,r,n)}})),v),{beforeUnshiftWith:w,data:f,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:d,gap:g,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:b,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:v,statefulTotalCount:i,totalCount:r,trackItemSizes:x,unshiftWith:o}},c_(c2,db),{singleton:!0});function dL(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let dN=cX(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let o=cU(),a=cU(),s=cq(cj(o,cB(dL)));return cO(cj(s,cB(e=>e.totalCount)),n),cO(cj(s,cB(e=>e.groupIndices)),e),cO(cj(cK(i,t,r),cN(([e,t])=>dA(t)),cB(([e,t,n])=>dl(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),cL(),cB(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},c_(dP,dn)),dB=cX(([{log:e}])=>{let t=cW(!1),n=cq(cj(t,cN(e=>e),cL()));return t(1,t=>{t&&cD(e)("props updated",{},0)}),{didMount:n,propsReady:t}},c_(c2),{singleton:!0}),dz="u">typeof document&&"scrollBehavior"in document.documentElement.style;function dj(e){let t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),t.behavior&&dz||(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}let dF=cX(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{let p=cU(),f=cU(),g=cW(0),m=null,v=null,y=null;function x(){null!==m&&(m(),m=null),null!==y&&(y(),y=null),v&&(clearTimeout(v),v=null),l(0,!1)}return cO(cj(p,cH(n,d,r,g,s,a,h),cH(e,o,i),cB(([[e,n,r,i,o,a,s,u],d,h,g])=>{let b=dj(e),{align:w,behavior:S,offset:A}=b,C=i-1,M=d_(b,n,C),k=dk(M,n.offsetTree,d)+a;"end"===w?(k+=h+dl(n.sizeTree,M)[1]-r+g,M===C&&(k+=s)):"center"===w?k+=(h+dl(n.sizeTree,M)[1]-r+g)/2:k-=o,void 0!==A&&0!==A&&(k+=A);let T=t=>{x(),t?(u("retrying to scroll to",{location:e},0),p(0,e)):(f(0,!0),u("list did not change, scroll successful",{},0))};if(x(),"smooth"===S){let e=!1;y=t(1,t=>{e=e||t}),m=cR(c,()=>{T(e)})}else m=cR(cj(t,e=>{let t=setTimeout(()=>{e(!1)},150);return n=>{n&&(e(!0),clearTimeout(t))}}),T);return v=setTimeout(()=>{x()},1200),l(0,!0),u("scrolling from index to",{behavior:S,index:M,top:k},0),{behavior:S,top:k}})),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:g}},c_(dP,dn,c2),{singleton:!0});function dV(e,t){0===e?t():requestAnimationFrame(()=>{dV(e-1,t)})}function d$(e,t){if(void 0===e)return 0;let n=t-1;return Math.max(0,Math.min("number"==typeof e?e:"LAST"===e.index?n:e.index,n))}function dH(e){return void 0===e||("number"==typeof e?0===e:0===e.index&&(void 0===e.align||"start"===e.align)&&(void 0===e.offset||0===e.offset))}let dW=cX(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{let s=cW(!0),l=cW(0),u=cW(!0);return cO(cj(a,cH(l),cN(([e,t])=>!dH(t)),cz(!1)),s),cO(cj(a,cH(l),cN(([e,t])=>!dH(t)),cz(!1)),u),cj(cK(t,a),cH(s,n,e,u),cN(([[,e],t,{sizeTree:n},r,i])=>e&&(!da(n)||cM(r))&&!t&&!i),cH(l))(1,([,e])=>{if(void 0===e){s(0,!0),u(0,!0);return}cR(i,()=>{u(0,!0)}),dV(4,()=>{cR(r,()=>{s(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},c_(dP,dn,dF,dB),{singleton:!0});function dG(e,t){return 1.01>Math.abs(e-t)}let dU="down",dq={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dY=cX(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{let a=cW(!1),s=cW(!0),l=cU(),u=cU(),c=cW(4),d=cW(0),h=cG(cj(cJ(cj(cQ(i),cV(1),cz(!0)),cj(cQ(i),cV(1),cz(!1),cE(100))),cL()),!1),p=cG(cj(cJ(cj(n,cz(!0)),cj(n,cz(!1),cE(200))),cL()),!1);cO(cj(cK(cQ(i),cQ(d)),cB(([e,t])=>e<=t),cL()),s),cO(cj(s,c$(50)),u);let f=cq(cj(cK(r,cQ(o),cQ(t),cQ(e),cQ(c)),cF((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{let s={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:s}}return{atBottom:!1,notAtBottomBecause:s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:s}},dq),cL((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),g=cG(cj(r,cF((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!dG(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),cN(e=>e.changed),cB(e=>e.jump)),0);cO(cj(f,cB(e=>e.atBottom)),a),cO(cj(a,c$(50)),l);let m=cW(dU);cO(cj(r,cB(({scrollTop:e})=>e),cL(),cF((e,t)=>cD(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":dU,prevScrollTop:t},{direction:dU,prevScrollTop:0}),cB(e=>e.direction)),m),cO(cj(r,c$(50),cz("none")),m);let v=cW(0);return cO(cj(h,cN(e=>!e),cz(0)),v),cO(cj(i,c$(100),cH(h),cN(([e,t])=>t),cF(([e,t],[n])=>[t,n],[0,0]),cB(([e,t])=>t-e)),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},c_(dn)),dX="bottom",dZ="none";function dK(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===dU&&t===dX?e:0:"up"===n?"top"===t?e.main:e.reverse:t===dX?e.main:e.reverse}function dQ(e,t){return"number"==typeof e?e:e[t]??0}let dJ=cX(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let o=cU(),a=cW(0),s=cW(0),l=cW(0),u=cG(cj(cK(cQ(r),cQ(i),cQ(n),cQ(o,dx),cQ(l),cQ(a),cQ(t),cQ(e),cQ(s)),cB(([e,t,n,[r,i],o,a,s,l,u])=>{let c=e-l,d=Math.max(n-c,0),h=dZ,p=dQ(u,"top"),f=dQ(u,dX);return r-=l,r+=n+s,i+=n+s,r>e+(a+s)-p&&(h="up"),(i-=l)<e-d+t+f&&(h=dU),h!==dZ?[Math.max(c-n-dK(o,"top",h)-p,0),c-d-s+t+dK(o,dX,h)+f]:null}),cN(e=>null!==e),cL(dx)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:u}},c_(dn),{singleton:!0}),d0={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function d1(e,t,n,r,i,o){let{lastIndex:a,lastOffset:s,lastSize:l}=i,u=0,c=0;if(e.length>0){u=e[0].offset;let t=e[e.length-1];c=t.offset+t.size}let d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:o,items:d5(e,i,o),offsetBottom:p,offsetTop:u,top:h,topItems:d5(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function d2(e,t,n,r,i,o){let a=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-a>=e)break;a++}let s=e+a,l=d$(t,s);return d1(Array.from({length:s}).map((e,t)=>({data:o[t+l],index:t+l,offset:0,size:0})),[],s,i,n,r)}function d5(e,t,n){if(0===e.length)return[];if(!dA(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,o=[],a=dc(t.groupOffsetTree,r,i),s,l=0;for(let r of e){let e;(!s||s.end<r.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),e=r.index===s.start?{index:l,type:"group"}:{groupIndex:l,index:r.index-(l+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function d4(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}let d3=cX(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:d},h,{didMount:p},{recalcInProgress:f}])=>{let g=cW([]),m=cW(0),v=cU(),y=cW(0);cO(o.topItemsIndexes,g);let x=cG(cj(cK(p,f,cQ(l,dx),cQ(i),cQ(r),cQ(u),c,cQ(g),cQ(t),cQ(n),cQ(y),e),cN(([e,t,,n,,,,,,,,r])=>{let i=void 0!==r&&r.length!==n;return e&&!t&&!i}),cB(([,,[e,t],n,r,i,o,a,s,l,u,c])=>{var d;let{offsetTree:h,sizeTree:p}=r,f=cD(m);if(0===n)return{...d0,totalCount:n};if(0===e&&0===t)return 0===f?{...d0,totalCount:n}:d2(f,i,r,s,l,c||[]);if(da(p))return f>0?null:d1(function(e,t,n){if(dA(t)){let r=dT(e,t);return[{index:dl(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(d$(i,n),r,c),[],n,l,r,s);let g=[];if(a.length>0){let e=a[0],t=a[a.length-1],n=0;for(let r of dc(p,e,t)){let i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)g.push({data:c?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return d1([],g,n,l,r,s);let v=a.length>0?a[a.length-1]+1:0,y=function(e,t,n,r=0){let i,o;return r>0&&(t=Math.max(t,e[dw(e,r,dC)].offset)),di((i=dw(e,t,dM),o=dw(e,n,dM,i),e.slice(i,o+1)),dR)}(h,e,t,v);if(0===y.length)return null;let x=n-1,b=((n=>{for(let r of y){let i=r.value,o=i.offset,a=r.start,s=i.size;if(i.offset<e){let t=(a+=Math.floor((e-i.offset+l)/(s+l)))-r.start;o+=t*s+t*l}a<v&&(o+=(v-a)*s,a=v);let u=Math.min(r.end,x);for(let e=a;e<=u&&!(o>=t);e++)n.push({data:c?.[e],index:e,offset:o,size:s}),o+=s+l}})(d=[]),d),w=d4(u,"top"),S=d4(u,dX);if(b.length>0&&(w>0||S>0)){let e=b[0],t=b[b.length-1];if(w>0&&e.index>v){let t=Math.min(w,e.index-v),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=dc(p,i,i)[0]?.value??e.size;r-=t+l,n.unshift({data:c?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<x){let e=Math.min(S,x-t.index),n=t.offset+t.size+l;for(let r=t.index+1;r<=t.index+e;r++){let e=dc(p,r,r)[0]?.value??t.size;b.push({data:c?.[r],index:r,offset:n,size:e}),n+=e+l}}}return d1(b,g,n,l,r,s)}),cN(e=>null!==e),cL()),d0);cO(cj(e,cN(cM),cB(e=>e?.length)),i),cO(cj(x,cB(e=>e.topListHeight)),d),cO(d,s),cO(cj(x,cB(e=>[e.top,e.bottom])),a),cO(cj(x,cB(e=>e.items)),v);let b=cq(cj(x,cN(({items:e})=>e.length>0),cH(i,e),cN(([{items:e},t])=>e[e.length-1].originalIndex===t-1),cB(([,e,t])=>[e-1,t]),cL(dx),cB(([e])=>e))),w=cq(cj(x,c$(200),cN(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),cB(({items:e})=>e[0].index),cL())),S=cq(cj(x,cN(({items:e})=>e.length>0),cB(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),cL(dy)));return{endReached:b,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:y,rangeChanged:S,startReached:w,topItemsIndexes:g,...h}},c_(dP,dN,dJ,dW,dF,dY,dB,db),{singleton:!0}),d6=cX(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let o=cU(),a=cG(cj(cK(n,e,r,t,i),cB(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return cO(cQ(a),o),{totalListHeight:a,totalListHeightChanged:o}},c_(dn,d3),{singleton:!0}),d8=cX(([{viewportHeight:e},{totalListHeight:t}])=>{let n=cW(!1),r=cG(cj(cK(n,e,t),cN(([e])=>e),cB(([,e,t])=>Math.max(0,e-t)),c$(0),cL()),0);return{alignToBottom:n,paddingTopAddition:r}},c_(dn,d6),{singleton:!0}),d9=cX(()=>({context:cW(null)})),d7=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>o?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,he=cX(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{let c=cU();return cO(cj(c,cH(t,l,n,o,i,r,s),cH(e),cB(([[e,t,n,r,i,o,s,l],u])=>{let{calculateViewLocation:c=d7,done:d,...h}=e,p=d_(e,t,r-1),f=dk(p,t.offsetTree,u)+i+o,g=c({itemBottom:f+dl(t.sizeTree,p)[1],itemTop:f,locationParams:h,viewportBottom:l+n-s,viewportTop:l+o});return null===g?d?.():d&&cR(cj(a,cN(e=>!e),cV(cD(a)?1:2)),d),g}),cN(e=>null!==e)),u),{scrollIntoView:c}},c_(dP,dn,dF,d3,c2),{singleton:!0});function ht(e){return!1!==e&&("smooth"===e?"smooth":"auto")}let hn=cX(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{let f=cW(!1),g=cU(),m=null;function v(e){a(0,{align:"end",behavior:e,index:"LAST"})}function y(e){setTimeout(cR(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(cD(c)("scrolling to bottom due to increased size",{},0),v("auto"))}),100)}cj(cK(cj(cQ(t),cV(1)),l),cH(cQ(f),o,s,d),cB(([[e,t],n,r,i,o])=>{let a,s=t&&i,l="auto";return s&&(a=r||o,l="function"==typeof n?ht(n(a)):a&&ht(n),s=s&&!1!==l),{followOutputBehavior:l,shouldFollow:s,totalCount:e}}),cN(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0===cD(n)?m=cR(e,()=>{cD(c)("following output to ",{totalCount:r},0),v(t),m=null}):requestAnimationFrame(()=>{cD(c)("following output to ",{totalCount:r},0),v(t)})}),cj(cK(cQ(f),t,u),cN(([e,,t])=>!1!==e&&t),cF(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),cN(({refreshed:e})=>e),cH(f,t))(1,([,e])=>{cD(s)&&y(!1!==e)}),g(1,()=>{y(!1!==cD(f))}),cK(cQ(f),i)(1,([e,t])=>{!1===e||t.atBottom||"VIEWPORT_HEIGHT_DECREASING"!==t.notAtBottomBecause||v("auto")});let x=cW(null),b=cU();return cO(cJ(cj(cQ(r),cB(e=>e?.length??0)),cj(cQ(t))),b),cj(cK(cj(b,cV(1)),l),cH(cQ(x),s,d,h),cB(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),cN(e=>!!e),c$(0))(1,t=>{null!==m&&(m(),m=null),void 0===cD(n)?m=cR(e,()=>{cD(c)("scrolling into view",{}),p(0,t),m=null}):requestAnimationFrame(()=>{cD(c)("scrolling into view",{}),p(0,t)})}),{autoscrollToBottom:g,followOutput:f,scrollIntoViewOnChange:x}},c_(dP,dY,dF,dW,dB,c2,dn,d9,he)),hr=cX(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(cO(cj(s,cH(o),cN(([,e])=>0!==e),cH(i,r,t,n,e),cB(([[,e],t,n,r,i,o=[]])=>d2(e,t,n,r,i,o))),a),{}),c_(dP,dW,d3,dB),{singleton:!0}),hi=cX(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=cW(0);return cj(e,cH(r),cN(([,e])=>0!==e),cB(([,e])=>({top:e})))(1,e=>{cR(cj(n,cV(1),cN(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:r}},c_(dB,dn,d3),{singleton:!0}),ho=cX(([{scrollVelocity:e}])=>{let t=cW(!1),n=cU(),r=cW(!1);return cO(cj(e,cH(r,t,n),cN(([e,t])=>!1!==t&&void 0!==t),cB(([e,t,n,r])=>{let{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),cL()),t),cj(cK(t,e,n),cH(r))(1,([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},c_(dY),{singleton:!0}),ha=cX(([{scrollContainerState:e,scrollTo:t}])=>{let n=cU(),r=cU(),i=cU(),o=cW(!1),a=cW(void 0);return cO(cj(cK(n,r),cB(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),cO(cj(t,cH(r),cB(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},c_(dn)),hs=cX(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{let u=cU(),c=cW(void 0),d=cW(null),h=cW(null);return cO(s,d),cO(l,h),cj(u,cH(t,r,a,d,h,n))(1,([e,t,n,r,i,o,a])=>{let s=dd(t.sizeTree).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}});r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:s,scrollTop:n-=a})}),cO(cj(c,cN(cM),cB(hl)),i),cO(cj(o,cH(c),cN(([,e])=>void 0!==e),cL(),cB(([,e])=>e.ranges)),e),{getState:u,restoreStateFrom:c}},c_(dP,dn,dW,dB,ha));function hl(e){return{align:"start",index:0,offset:e.scrollTop}}let hu=cX(([{topItemsIndexes:e}])=>{let t=cW(0);return cO(cj(t,cN(e=>e>=0),cB(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},c_(d3));function hc(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let hd=hc(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),hh=cX(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{let g=cq(cj(l,cH(a),cF(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},s])=>{let l=r+o,u=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||0!=(u=l-n)&&(u+=s)),[u,i,a,l]},[0,[],0,0]),cN(([e])=>0!==e),cH(r,s,n,i,p,f),cN(([,e,t,n,,,r])=>!r&&!n&&0!==e&&"up"===t),cB(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},0),e))));function m(n){n>0?(t(0,{behavior:"auto",top:-n}),e(0,0)):(e(0,0),t(0,{behavior:"auto",top:-n}))}return cj(g,cH(e,o))(1,([t,n,r])=>{r&&hd()?e(0,n-t):m(-t)}),cj(cK(cG(o,!1),e,f),cN(([e,t,n])=>!e&&!n&&0!==t),cB(([e,t])=>t),c$(1))(1,m),cO(cj(d,cB(e=>({top:-e}))),t),cj(u,cH(h,c),cB(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{if(0===t.length)return e*(n+i);let o=0,a=ds(r,0),s=0,l=0;for(;s<e;){s++,o+=a;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;s+r>e&&(o-=a,r=e-s+1),s+=r,o+=r*(n+i),l++}return o}))(1,n=>{e(0,n),requestAnimationFrame(()=>{t(0,{top:n}),requestAnimationFrame(()=>{e(0,0),f(0,!1)})})}),{deviation:e}},c_(dn,dY,d3,dP,c2,db)),hp=cX(([e,t,n,r,i,o,a,s,l,u,c])=>({...e,...t,...n,...r,...i,...o,...a,...s,...l,...u,...c}),c_(dJ,hr,dB,ho,d6,hi,d8,ha,he,c2,d9)),hf=cX(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:d,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m},v,y,x,b,{scrollToIndex:w},S,{topItemCount:A},{groupCounts:C},M])=>{let{listState:k,minOverscanItemCount:T,topItemsIndexes:_,rangeChanged:I,...D}=b;return cO(I,M.scrollSeekRangeChanged),cO(cj(M.windowViewportRect,cB(e=>e.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:C,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:g,scrolledToInitialItem:m,sizeRanges:u,topItemCount:A,topItemsIndexes:_,totalCount:h,...x,groupIndices:a,itemSize:l,listState:k,minOverscanItemCount:T,scrollToIndex:w,statefulTotalCount:d,trackItemSizes:p,rangeChanged:I,...D,...M,...v,sizes:c,...y}},c_(dP,dW,dn,hs,hn,d3,dF,hh,hu,dN,hp)),hg=typeof document>"u"?D().useEffect:D().useLayoutEffect;function hm(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=D().createContext({});function l(e,n){for(let i of(void 0!==e.propsReady&&(0,e.propsReady)(0,!1),r))(0,e[t.required[i]])(0,n[i]);for(let r of i)r in n&&(0,e[t.optional[r]])(0,n[r]);void 0!==e.propsReady&&(0,e.propsReady)(0,!0)}function u(e){return a.reduce((n,r)=>{var i;let o,a,s;return n[r]=(i=e[t.events[r]],s=()=>o?.(),function(e,t){switch(e){case 1:return t?a===t?void 0:(s(),a=t,o=i(1,t)):(s(),ck);case 2:s(),a=null;return}}),n},{})}return{Component:D().forwardRef(function(c,d){var h;let{children:p,...f}=c,[g]=D().useState(()=>{var t;let n,r;return n=new Map,l(t=(r=({constructor:e,dependencies:t,id:i,singleton:o})=>{if(o&&n.has(i))return n.get(i);let a=e(t.map(e=>r(e)));return o&&n.set(i,a),a})(e),f),t}),[m]=D().useState(()=>u(g));return hg(()=>{for(let e of a)e in f&&(0,m[e])(1,f[e]);return()=>{Object.values(m).map(cI)}},[f,m,g]),hg(()=>{l(g,f)}),D().useImperativeHandle(d,(h=o.reduce((e,n)=>(e[n]=e=>{(0,g[t.methods[n]])(0,e)},e),{}),()=>h)),(0,_.jsx)(s.Provider,{value:g,children:void 0===n?p:(0,_.jsx)(n,{...function(e,t){let n={},r={},i=0,o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}([...r,...i,...a],f),children:p})})}),useEmitter:(e,t)=>{let n=D().useContext(s)[e];hg(()=>n(1,t),[t,n])},useEmitterValue:parseInt(D().version,10)>=18?e=>{let t=D().useContext(s)[e],n=D().useCallback(e=>t(1,e),[t]);return D().useSyncExternalStore(n,()=>cD(t),()=>cD(t))}:e=>{let t=D().useContext(s)[e],[n,r]=D().useState(()=>cD(t));return hg(()=>t(1,e=>{e!==n&&r(()=>e)}),[t,n]),n},usePublisher:e=>{let t=D().useContext(s);return D().useCallback(n=>{(0,t[e])(0,n)},[t,e])}}}let hv=D().createContext(void 0),hy=D().createContext(void 0),hx="-webkit-sticky",hb="sticky",hw=hc(()=>{if(typeof document>"u")return hb;let e=document.createElement("div");return e.style.position=hx,e.style.position===hx?hx:hb}),hS=typeof document>"u"?D().useEffect:D().useLayoutEffect;function hA(e){return"self"in e}function hC(e,t,n,r=ck,i,o){let a=D().useRef(null),s=D().useRef(null),l=D().useRef(null),u=D().useCallback(n=>{let r,i,a,u=n.target;if("body"in u||hA(u)){let e=hA(u)?u:u.defaultView;a=!0===o?c6(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else a=!0===o?c6(u,u.scrollLeft):u.scrollTop,r=!0===o?u.scrollWidth:u.scrollHeight,i=!0===o?u.offsetWidth:u.offsetHeight;let c=()=>{e({scrollHeight:r,scrollTop:Math.max(a,0),viewportHeight:i})};!0===n.suppressFlushSync?c():tN().flushSync(c),null!==s.current&&(a===s.current||a<=0||a===r-i)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,o]);return D().useEffect(()=>{let e=i??a.current;return c3(e),r(i??a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{c3(e),r(null),e.removeEventListener("scroll",u)}},[a,u,n,r,i]),{scrollByCallback:function(e){!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:c6(a.current,e.top)}}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){let r,i,u,c=a.current;if(!c||(!0===o?"offsetWidth"in c&&0===c.offsetWidth:"offsetHeight"in c&&0===c.offsetHeight))return;let d="smooth"===n.behavior;hA(c)?(i=Math.max(dS(c.document.documentElement,!0===o?"width":"height"),!0===o?c.document.documentElement.scrollWidth:c.document.documentElement.scrollHeight),r=!0===o?c.innerWidth:c.innerHeight,u=!0===o?c6(c,c.scrollX):c.scrollY):(i=c[!0===o?"scrollWidth":"scrollHeight"],r=dS(c,!0===o?"width":"height"),u=!0===o?c6(c,c.scrollLeft):c.scrollTop);let h=i-r;if(void 0===n.top)return void c.scrollTo(n);let p=Math.ceil(Math.max(Math.min(h,n.top),0));if(n.top=p,dG(r,i)||p===u){e({scrollHeight:i,scrollTop:u,viewportHeight:r}),d&&t(!0);return}d?(s.current=p,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:c6(c,p)}),c.scrollTo(n)}}}function hM(e){return e}let hk=cX(()=>{let e=cW(e=>`Item ${e}`),t=cW(e=>`Group ${e}`),n=cW({}),r=cW(hM),i=cW("div"),o=cW(ck),a=(e,t=null)=>cG(cj(n,cB(t=>t[e]),cL()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),hT=cX(([e,t])=>({...e,...t}),c_(hf,hk)),h_=({height:e})=>(0,_.jsx)("div",{style:{height:e}}),hI={overflowAnchor:"none",position:hw(),zIndex:1},hD={overflowAnchor:"none"},hO={...hD,display:"inline-block",height:"100%"},hR=D().memo(function({showTopList:e=!1}){let t=hX("listState"),n=hZ("sizeRanges"),r=hX("useWindowScroll"),i=hX("customScrollParent"),o=hZ("windowScrollContainerState"),a=hZ("scrollContainerState"),s=hX("itemContent"),l=hX("context"),u=hX("groupContent"),c=hX("trackItemSizes"),d=hX("itemSize"),h=hX("log"),p=hZ("gap"),f=hX("horizontalDirection"),{callbackRef:g}=c7(n,d,c,e?ck:i||r?o:a,h,p,i,f,hX("skipAnimationFrameInResizeObserver")),[m,v]=D().useState(0);hY("deviation",e=>{m!==e&&v(e)});let y=hX("EmptyPlaceholder"),x=hX("ScrollSeekPlaceholder")??h_,b=hX("ListComponent"),w=hX("ItemComponent"),S=hX("GroupComponent"),A=hX("computeItemKey"),C=hX("isSeeking"),M=hX("groupIndices").length>0,k=hX("alignToBottom"),T=hX("initialItemFinalLocationReached"),O=e?{}:{boxSizing:"border-box",...f?{display:"inline-block",height:"100%",marginInlineStart:0===m?k?"auto":0:m,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===m?k?"auto":0:m,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...T?{}:{visibility:"hidden"}};return e||0!==t.totalCount||null==y?(0,_.jsx)(b,{...hz(b,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:O,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=A(n+t.firstItemIndex,e.data,l);return C?(0,I.createElement)(x,{...hz(x,l),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,I.createElement)(S,{...hz(S,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:hI},u(e.index,l)):(0,I.createElement)(w,{...hz(w,l),...hj(w,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:f?hO:hD},M?s(e.index,e.groupIndex,e.data,l):s(e.index,e.data,l))})}):(0,_.jsx)(y,{...hz(y,l)})}),hE={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},hP={outline:"none",overflowX:"auto",position:"relative"},hL=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),hN=(e,t,n=0)=>({...hL(e),position:t?"relative":"absolute",top:t?-n:0}),hB={position:hw(),top:0,width:"100%",zIndex:1};function hz(e,t){if("string"!=typeof e)return{context:t}}function hj(e,t){return{item:"string"==typeof e?void 0:t}}let hF=D().memo(function(){let e=hX("HeaderComponent"),t=hZ("headerHeight"),n=hX("HeaderFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,hX("skipAnimationFrameInResizeObserver")),i=hX("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),hV=D().memo(function(){let e=hX("FooterComponent"),t=hZ("footerHeight"),n=hX("HeaderFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,hX("skipAnimationFrameInResizeObserver")),i=hX("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null});function h$({useEmitter:e,useEmitterValue:t,usePublisher:n}){return D().memo(function({children:r,style:i,context:o,...a}){let s=n("scrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:f}=hC(s,u,l,c,void 0,d);return e("scrollTo",f),e("scrollBy",h),(0,_.jsx)(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?hP:hE,...i},tabIndex:0,...a,...hz(l,o),children:r})})}function hH({useEmitter:e,useEmitterValue:t,usePublisher:n}){return D().memo(function({children:r,style:i,context:o,...a}){let s=n("windowScrollContainerState"),l=t("ScrollerComponent"),u=n("smoothScrollTargetReached"),c=t("totalListHeight"),d=t("deviation"),h=t("customScrollParent"),p=D().useRef(null),{scrollByCallback:f,scrollerRef:g,scrollToCallback:m}=hC(s,u,l,t("scrollerRef"),h);return hS(()=>(g.current=h??p.current?.ownerDocument.defaultView,()=>{g.current=null}),[g,h]),e("windowScrollTo",m),e("scrollBy",f),(0,_.jsx)(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0===c?void 0:{height:c+d}},...a,...hz(l,o),children:r})})}let hW=({children:e})=>{let t=D().useContext(hv),n=hZ("viewportHeight"),r=hZ("fixedItemHeight"),i=hX("alignToBottom"),o=hX("horizontalDirection"),a=c8(D().useMemo(()=>cC(n,e=>dS(e,o?"width":"height")),[n,o]),!0,hX("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"element",ref:a,style:hL(i),children:e})},hG=({children:e})=>{let t=D().useContext(hv),n=hZ("windowViewportRect"),r=hZ("fixedItemHeight"),i=hX("customScrollParent"),o=hX("useWindowScroll"),a=hX("topListHeight"),s=dt(n,i,hX("skipAnimationFrameInResizeObserver")),l=hX("alignToBottom");return D().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"window",ref:s,style:hN(l,o,a),children:e})},hU=({children:e})=>{let t=hX("TopItemListComponent")??"div",n=hX("headerHeight"),r={...hB,marginTop:`${n}px`},i=hX("context");return(0,_.jsx)(t,{style:r,...hz(t,i),children:e})},{Component:hq,useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}=hm(hT,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},D().memo(function(e){let t=hX("useWindowScroll"),n=hX("topItemsIndexes").length>0,r=hX("customScrollParent"),i=hX("context");return(0,_.jsxs)(r||t?hQ:hK,{...e,context:i,children:[n&&(0,_.jsx)(hU,{children:(0,_.jsx)(hR,{showTopList:!0})}),(0,_.jsxs)(r||t?hG:hW,{children:[(0,_.jsx)(hF,{}),(0,_.jsx)(hR,{}),(0,_.jsx)(hV,{})]})]})})),hK=h$({useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}),hQ=hH({useEmitter:hY,useEmitterValue:hX,usePublisher:hZ}),hJ=cX(()=>{let e=cW(e=>(0,_.jsxs)("td",{children:["Item $",e]})),t=cW(null),n=cW(e=>(0,_.jsxs)("td",{colSpan:1e3,children:["Group ",e]})),r=cW(null),i=cW(null),o=cW({}),a=cW(hM),s=cW(ck),l=(e,t=null)=>cG(cj(o,cB(t=>t[e]),cL()),t);return{components:o,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),h0=cX(([e,t])=>({...e,...t}),c_(hf,hJ)),h1=({height:e})=>(0,_.jsx)("tr",{children:(0,_.jsx)("td",{style:{height:e}})}),h2=({height:e})=>(0,_.jsx)("tr",{children:(0,_.jsx)("td",{style:{border:0,height:e,padding:0}})}),h5={overflowAnchor:"none"},h4={position:hw(),zIndex:2,overflowAnchor:"none"},h3=D().memo(function({showTopList:e=!1}){let t=pt("listState"),n=pt("computeItemKey"),r=pt("firstItemIndex"),i=pt("context"),o=pt("isSeeking"),a=pt("fixedHeaderHeight"),s=pt("groupIndices").length>0,l=pt("itemContent"),u=pt("groupContent"),c=pt("ScrollSeekPlaceholder")??h1,d=pt("GroupComponent"),h=pt("TableRowComponent"),p=(e?t.topItems:[]).reduce((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let f=t.originalIndex,g=n(f+r,t.data,i),m=e?0===f?0:p[f-1]:0;return o?(0,I.createElement)(c,{...hz(c,i),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,I.createElement)(d,{...hz(d,i),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...h4,top:a}},u(t.index,i)):(0,I.createElement)(h,{...hz(h,i),...hj(h,t.data),"data-index":f,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...h4,top:a+m}:h5},s?l(t.index,t.groupIndex,t.data,i):l(t.index,t.data,i))})}),h6=D().memo(function(){let e=pt("listState"),t=pt("topItemsIndexes").length>0,n=pn("sizeRanges"),r=pt("useWindowScroll"),i=pt("customScrollParent"),o=pn("windowScrollContainerState"),a=pn("scrollContainerState"),s=pt("trackItemSizes"),{callbackRef:l,ref:u}=c7(n,pt("itemSize"),s,i||r?o:a,pt("log"),void 0,i,!1,pt("skipAnimationFrameInResizeObserver")),[c,d]=D().useState(0);pe("deviation",e=>{c!==e&&(u.current.style.marginTop=`${e}px`,d(e))});let h=pt("EmptyPlaceholder"),p=pt("FillerRow")??h2,f=pt("TableBodyComponent"),g=pt("paddingTopAddition"),m=pt("statefulTotalCount"),v=pt("context");if(0===m&&null!=h)return(0,_.jsx)(h,{...hz(h,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),x=e.offsetTop+g+c-y,b=e.offsetBottom,w=x>0?(0,_.jsx)(p,{context:v,height:x},"padding-top"):null,S=b>0?(0,_.jsx)(p,{context:v,height:b},"padding-bottom"):null;return(0,_.jsxs)(f,{"data-testid":"virtuoso-item-list",ref:l,...hz(f,v),children:[w,t&&(0,_.jsx)(h3,{showTopList:!0}),(0,_.jsx)(h3,{}),S]})}),h8=({children:e})=>{let t=D().useContext(hv),n=pn("viewportHeight"),r=pn("fixedItemHeight"),i=c8(D().useMemo(()=>cC(n,e=>dS(e,"height")),[n]),!0,pt("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"element",ref:i,style:hL(!1),children:e})},h9=({children:e})=>{let t=D().useContext(hv),n=pn("windowViewportRect"),r=pn("fixedItemHeight"),i=pt("customScrollParent"),o=pt("useWindowScroll"),a=dt(n,i,pt("skipAnimationFrameInResizeObserver"));return D().useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,_.jsx)("div",{"data-viewport-type":"window",ref:a,style:hN(!1,o),children:e})},{Component:h7,useEmitter:pe,useEmitterValue:pt,usePublisher:pn}=hm(h0,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},D().memo(function(e){let t=pt("useWindowScroll"),n=pt("customScrollParent"),r=pn("fixedHeaderHeight"),i=pn("fixedFooterHeight"),o=pt("fixedHeaderContent"),a=pt("fixedFooterContent"),s=pt("context"),l=c8(D().useMemo(()=>cC(r,e=>dS(e,"height")),[r]),!0,pt("skipAnimationFrameInResizeObserver")),u=c8(D().useMemo(()=>cC(i,e=>dS(e,"height")),[i]),!0,pt("skipAnimationFrameInResizeObserver")),c=n||t?pi:pr,d=n||t?h9:h8,h=pt("TableComponent"),p=pt("TableHeadComponent"),f=pt("TableFooterComponent"),g=o?(0,_.jsx)(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...hz(p,s),children:o()},"TableHead"):null,m=a?(0,_.jsx)(f,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...hz(f,s),children:a()},"TableFoot"):null;return(0,_.jsx)(c,{...e,...hz(c,s),children:(0,_.jsx)(d,{children:(0,_.jsxs)(h,{style:{borderSpacing:0,overflowAnchor:"none"},...hz(h,s),children:[g,(0,_.jsx)(h6,{},"TableBody"),m]})})})})),pr=h$({useEmitter:pe,useEmitterValue:pt,usePublisher:pn}),pi=hH({useEmitter:pe,useEmitterValue:pt,usePublisher:pn}),po={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},pa={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:ps,floor:pl,max:pu,min:pc,round:pd}=Math;function ph(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function pp(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function pf(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}let pg=cX(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b},w])=>{let S=cW(0),A=cW(0),C=cW(po),M=cW({height:0,width:0}),k=cW({height:0,width:0}),T=cU(),_=cU(),I=cW(0),D=cW(null),O=cW({column:0,row:0}),R=cU(),E=cU(),P=cW(!1),L=cW(0),N=cW(!0),B=cW(!1),z=cW(!1);cj(f,cH(L),cN(([e,t])=>!dH(t)))(1,()=>{N(0,!1)}),cj(cK(f,N,k,M,L,B),cN(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i))(1,([,,,,e])=>{void 0===e?N(0,!0):(B(0,!0),dV(1,()=>{T(0,e)}),cR(cj(u),()=>{t(0,[0,0]),N(0,!0)}))}),cO(cj(E,cN(e=>null!=e&&e.scrollTop>0),cz(0)),A),cj(f,cH(E),cN(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),k(0,e.item),O(0,e.gap),e.scrollTop>0&&(P(0,!0),cR(cj(u,cV(1)),e=>{P(0,!1)}),l(0,{top:e.scrollTop})))}),cO(cj(M,cB(({height:e})=>e)),d),cO(cj(cK(cQ(M,pp),cQ(k,pp),cQ(O,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),cQ(u)),cB(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),R),cO(cj(cK(cQ(S),r,cQ(O,pf),cQ(k,pp),cQ(M,pp),cQ(D),cQ(A),cQ(P),cQ(N),cQ(L)),cN(([,,,,,,,e])=>!e),cB(([e,[t,n],r,i,o,a,s,,l,u])=>{let c,d,{column:h,row:p}=r,{height:f,width:g}=i,{width:m}=o;if(0===s&&(0===e||0===m))return po;if(0===g){var v;let t=d$(u,e),n=t+Math.max(s-1,0);return v=ph(t,n,a),{...pa,items:v}}let y=pm(m,g,h);l?0===t&&0===n&&s>0?(c=0,d=s-1):(c=y*pl((t+p)/(f+p)),d=pc(e-1,pu(d=y*ps((n+p)/(f+p))-1,y-1)),c=pc(d,pu(0,c))):(c=0,d=-1);let x=ph(c,d,a),{bottom:b,top:w}=pv(o,r,i,x),S=ps(e/y);return{bottom:b,itemHeight:f,items:x,itemWidth:g,offsetBottom:S*f+(S-1)*p-b,offsetTop:w,top:w}})),C),cO(cj(D,cN(e=>null!==e),cB(e=>e.length)),S),cO(cj(cK(M,k,C,O),cN(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),cB(([e,t,{items:n},r])=>{let{bottom:i,top:o}=pv(e,r,t,n);return[o,i]}),cL(dx)),t);let j=cW(!1);cO(cj(u,cH(j),cB(([e,t])=>t||0!==e)),j);let F=cq(cj(cK(C,S),cN(([{items:e}])=>e.length>0),cH(j),cN(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),cB(([[,e]])=>e-1),cL())),V=cq(cj(cQ(C),cN(({items:e})=>e.length>0&&0===e[0].index),cz(0),cL())),$=cq(cj(cQ(C),cH(P),cN(([{items:e},t])=>e.length>0&&!t),cB(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),cL(dy),c$(0)));cO($,p.scrollSeekRangeChanged),cO(cj(T,cH(M,k,S,O),cB(([e,t,n,r,i])=>{let o=dj(e),{align:a,behavior:s,offset:l}=o,u=o.index;"LAST"===u&&(u=r-1);let c=py(t,i,n,u=pu(0,u,pc(r-1,u)));return"end"===a?c=pd(c-t.height+n.height):"center"===a&&(c=pd(c-t.height/2+n.height/2)),void 0!==l&&0!==l&&(c+=l),{behavior:s,top:c}})),l);let H=cG(cj(C,cB(e=>e.offsetBottom+e.bottom)),0);return cO(cj(b,cB(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:m,data:D,deviation:I,footerHeight:i,gap:O,headerHeight:o,increaseViewportBy:e,initialItemCount:A,itemDimensions:k,overscan:n,restoreStateFrom:E,scrollBy:a,scrollContainerState:s,scrollHeight:_,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b,...p,gridState:C,horizontalDirection:z,initialTopMostItemIndex:L,totalListHeight:H,...h,endReached:F,propsReady:g,rangeChanged:$,startReached:V,stateChanged:R,stateRestoreInProgress:P,...w}},c_(dJ,dn,dY,ho,dB,ha,c2));function pm(e,t,n){return pu(1,pl((e+n)/(pl(t)+n)))}function pv(e,t,n,r){let{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};let o=py(e,t,n,r[0].index);return{bottom:py(e,t,n,r[r.length-1].index)+i,top:o}}function py(e,t,n,r){let i=pl(r/pm(e.width,n.width,t.column)),o=i*n.height+pu(0,i-1)*t.row;return o>0?o+t.row:o}let px=cX(()=>{let e=cW(e=>`Item ${e}`),t=cW({}),n=cW(null),r=cW("virtuoso-grid-item"),i=cW("virtuoso-grid-list"),o=cW(hM),a=cW("div"),s=cW(ck),l=(e,n=null)=>cG(cj(t,cB(t=>t[e]),cL()),n),u=cW(!1),c=cW(!1);return cO(cQ(c),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),pb=cX(([e,t])=>({...e,...t}),c_(pg,px)),pw=D().memo(function(){let e=pT("gridState"),t=pT("listClassName"),n=pT("itemClassName"),r=pT("itemContent"),i=pT("computeItemKey"),o=pT("isSeeking"),a=p_("scrollHeight"),s=pT("ItemComponent"),l=pT("ListComponent"),u=pT("ScrollSeekPlaceholder"),c=pT("context"),d=p_("itemDimensions"),h=p_("gap"),p=pT("log"),f=pT("stateRestoreInProgress"),g=p_("reportReadyState"),m=c8(D().useMemo(()=>e=>{a(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;if(null!==t){let{height:e,width:n}=t.getBoundingClientRect();d({height:e,width:n})}h({column:pO("column-gap",getComputedStyle(e).columnGap,p),row:pO("row-gap",getComputedStyle(e).rowGap,p)})},[a,d,h,p]),!0,!1);return hS(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),f?null:(0,_.jsx)(l,{className:t,ref:m,...hz(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=i(t.index,t.data,c);return o?(0,_.jsx)(u,{...hz(u,c),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,I.createElement)(s,{...hz(s,c),className:n,"data-index":t.index,key:a},r(t.index,t.data,c))})})}),pS=D().memo(function(){let e=pT("HeaderComponent"),t=p_("headerHeight"),n=pT("headerFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,!1),i=pT("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),pA=D().memo(function(){let e=pT("FooterComponent"),t=p_("footerHeight"),n=pT("headerFooterTag"),r=c8(D().useMemo(()=>e=>{t(dS(e,"height"))},[t]),!0,!1),i=pT("context");return null!=e?(0,_.jsx)(n,{ref:r,children:(0,_.jsx)(e,{...hz(e,i)})}):null}),pC=({children:e})=>{let t=D().useContext(hy),n=p_("itemDimensions"),r=p_("viewportDimensions"),i=c8(D().useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return D().useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,_.jsx)("div",{ref:i,style:hL(!1),children:e})},pM=({children:e})=>{let t=D().useContext(hy),n=p_("windowViewportRect"),r=p_("itemDimensions"),i=pT("customScrollParent"),o=pT("useWindowScroll"),a=dt(n,i,!1);return D().useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,_.jsx)("div",{ref:a,style:hN(!1,o),children:e})},{useEmitter:pk,useEmitterValue:pT,usePublisher:p_}=hm(pb,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},D().memo(function({...e}){let t=pT("useWindowScroll"),n=pT("customScrollParent"),r=n||t?pD:pI,i=n||t?pM:pC,o=pT("context");return(0,_.jsx)(r,{...e,...hz(r,o),children:(0,_.jsxs)(i,{children:[(0,_.jsx)(pS,{}),(0,_.jsx)(pw,{}),(0,_.jsx)(pA,{})]})})})),pI=h$({useEmitter:pk,useEmitterValue:pT,usePublisher:p_}),pD=hH({useEmitter:pk,useEmitterValue:pT,usePublisher:p_});function pO(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,2),"normal"===t?0:parseInt(t??"0",10)}function pR({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,_.jsx)(hq,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,_.jsx)(cw,{item:t,index:e,truncateLabel:s,isVisuallySelected:co(t,r),onClick:i,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function pE(e,t){return"function"==typeof e?e(t):e}function pP(e,t){return n=>{t.setState(t=>({...t,[e]:pE(n,t[e])}))}}function pL(e){return e instanceof Function}function pN(e,t,n){let r,i=[];return o=>{let a,s;n.key&&n.debug&&(a=Date.now());let l=e(o);if(!(l.length!==i.length||l.some((e,t)=>i[t]!==e)))return r;if(i=l,n.key&&n.debug&&(s=Date.now()),r=t(...l),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-a)*100)/100,t=Math.round((Date.now()-s)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
103
103
  font-size: .6rem;
104
104
  font-weight: bold;
105
105
  color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function pB(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}let pz="debugHeaders";function pj(e,t,n){var r;let i={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(i),e},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(i,e)}),i}function pF(e,t,n,r){var i,o;let a=0,s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)},0)};s(e);let l=[],u=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},o=[];e.forEach(e=>{let a,s=[...o].reverse()[0],l=e.column.depth===i.depth,u=!1;if(l&&e.column.parent?a=e.column.parent:(a=e.column,u=!0),s&&(null==s?void 0:s.column)===a)s.subHeaders.push(e);else{let i=pj(n,a,{id:[r,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:u,placeholderId:u?`${o.filter(e=>e.column===a).length}`:void 0,depth:t,index:o.length});i.subHeaders.push(e),o.push(i)}i.headers.push(e),e.headerGroup=i}),l.push(i),t>0&&u(o,t-1)};u(t.map((e,t)=>pj(n,e,{depth:a,index:t})),a-1),l.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(null!=(i=null==(o=l[0])?void 0:o.headers)?i:[]),l}let pV=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return n.columnDef.getUniqueValues?s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r):s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=o?o:[],getLeafRows:()=>{var e,t;let n,r;return e=s.subRows,t=e=>e.subRows,n=[],(r=e=>{e.forEach(e=>{n.push(e);let i=t(e);null!=i&&i.length&&r(i)})})(e),n},getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:pN(()=>[e.getAllLeafColumns()],t=>t.map(t=>{var n;let r;return n=t.id,r={id:`${s.id}_${t.id}`,row:s,column:t,getValue:()=>s.getValue(n),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:pN(()=>[e,t,s,r],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),pB(e.options,"debugCells","cell.getContext"))},e._features.forEach(n=>{null==n.createCell||n.createCell(r,t,s,e)},{}),r}),pB(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:pN(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),pB(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){let n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},p$=(e,t,n)=>{var r,i;let o=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!!(null==(i=e.getValue(t))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))};p$.autoRemove=e=>pQ(e);let pH=(e,t,n)=>{var r;return!!(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};pH.autoRemove=e=>pQ(e);let pW=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};pW.autoRemove=e=>pQ(e);let pG=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};pG.autoRemove=e=>pQ(e);let pU=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});pU.autoRemove=e=>pQ(e)||!(null!=e&&e.length);let pq=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});pq.autoRemove=e=>pQ(e)||!(null!=e&&e.length);let pY=(e,t,n)=>e.getValue(t)===n;pY.autoRemove=e=>pQ(e);let pX=(e,t,n)=>e.getValue(t)==n;pX.autoRemove=e=>pQ(e);let pZ=(e,t,n)=>{let[r,i]=n,o=e.getValue(t);return o>=r&&o<=i};pZ.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,i="number"!=typeof n?parseFloat(n):n,o=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(i)?1/0:i;if(o>a){let e=o;o=a,a=e}return[o,a]},pZ.autoRemove=e=>pQ(e)||pQ(e[0])&&pQ(e[1]);let pK={includesString:p$,includesStringSensitive:pH,equalsString:pW,arrIncludes:pG,arrIncludesAll:pU,arrIncludesSome:pq,equals:pY,weakEquals:pX,inNumberRange:pZ};function pQ(e){return null==e||""===e}function pJ(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}let p0={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);null!=i&&(i*=1)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!(Array.isArray(n)&&n.every(e=>"number"==typeof e)))return;if(1===n.length)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2!=0?i[r]:(i[r-1]+i[r])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},p1=()=>({left:[],right:[]}),p2={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},p5=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),p4=null;function p3(e){return"touchstart"===e.type}function p6(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let p8=()=>({pageIndex:0,pageSize:10}),p9=()=>({top:[],bottom:[]}),p7=(e,t,n,r,i)=>{var o;let a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(o=a.subRows)&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(t=>p7(e,t.id,n,r,i))};function fe(e,t){let n=e.getState().rowSelection,r=[],i={},o=function(e,t){return e.map(e=>{var t;let a=ft(e,n);if(a&&(r.push(e),i[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:o(e.subRows)}),a)return e}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function ft(e,t){var n;return null!=(n=t[e.id])&&n}function fn(e,t,n){var r;if(!(null!=(r=e.subRows)&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(e=>{if((!o||i)&&(e.getCanSelect()&&(ft(e,t)?o=!0:i=!1),e.subRows&&e.subRows.length)){let n=fn(e,t);"all"===n?o=!0:("some"===n&&(o=!0),i=!1)}}),i?"all":!!o&&"some"}let fr=/([0-9]+)/gm;function fi(e,t){return e===t?0:e>t?1:-1}function fo(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function fa(e,t){let n=e.split(fr).filter(Boolean),r=t.split(fr).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),o=parseInt(t,10),a=[i,o].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>o)return 1;if(o>i)return -1}return n.length-r.length}let fs={alphanumeric:(e,t,n)=>fa(fo(e.getValue(n)).toLowerCase(),fo(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>fa(fo(e.getValue(n)),fo(t.getValue(n))),text:(e,t,n)=>fi(fo(e.getValue(n)).toLowerCase(),fo(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>fi(fo(e.getValue(n)),fo(t.getValue(n))),datetime:(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic:(e,t,n)=>fi(e.getValue(n),t.getValue(n))},fl=[{createTable:e=>{e.getHeaderGroups=pN(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;let s=null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],l=null!=(a=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return pF(t,[...s,...n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),...l],e)},pB(e.options,pz,"getHeaderGroups")),e.getCenterHeaderGroups=pN(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>pF(t,n=n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),e,"center"),pB(e.options,pz,"getCenterHeaderGroups")),e.getLeftHeaderGroups=pN(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;return pF(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"left")},pB(e.options,pz,"getLeftHeaderGroups")),e.getRightHeaderGroups=pN(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;return pF(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"right")},pB(e.options,pz,"getRightHeaderGroups")),e.getFooterGroups=pN(()=>[e.getHeaderGroups()],e=>[...e].reverse(),pB(e.options,pz,"getFooterGroups")),e.getLeftFooterGroups=pN(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),pB(e.options,pz,"getLeftFooterGroups")),e.getCenterFooterGroups=pN(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),pB(e.options,pz,"getCenterFooterGroups")),e.getRightFooterGroups=pN(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),pB(e.options,pz,"getRightFooterGroups")),e.getFlatHeaders=pN(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),pB(e.options,pz,"getFlatHeaders")),e.getLeftFlatHeaders=pN(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),pB(e.options,pz,"getLeftFlatHeaders")),e.getCenterFlatHeaders=pN(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),pB(e.options,pz,"getCenterFlatHeaders")),e.getRightFlatHeaders=pN(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),pB(e.options,pz,"getRightFlatHeaders")),e.getCenterLeafHeaders=pN(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),pB(e.options,pz,"getCenterLeafHeaders")),e.getLeftLeafHeaders=pN(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),pB(e.options,pz,"getLeftLeafHeaders")),e.getRightLeafHeaders=pN(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),pB(e.options,pz,"getRightLeafHeaders")),e.getLeafHeaders=pN(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,i,o,a,s,l;return[...null!=(r=null==(i=e[0])?void 0:i.headers)?r:[],...null!=(o=null==(a=t[0])?void 0:a.headers)?o:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map(e=>e.getLeafHeaders()).flat()},pB(e.options,pz,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:pP("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;let i=e.columns;return null==(n=i.length?i.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=pN(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),pB(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=pN(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],pB(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>pN(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),pB(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:pP("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=pN(e=>[p6(t,e)],t=>t.findIndex(t=>t.id===e.id),pB(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return(null==(r=p6(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;let i=p6(t,n);return(null==(r=i[i.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=pN(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(null!=e&&e.length){let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}else i=r;var o=i;if(!(null!=t&&t.length)||!n)return o;let a=o.filter(e=>!t.includes(e.id));return"remove"===n?a:[...t.map(e=>o.find(t=>t.id===e)).filter(Boolean),...a]},pB(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:p1(),...e}),getDefaultOptions:e=>({onColumnPinningChange:pP("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,i,o,a,s,l;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(i=null==e?void 0:e.right)?i:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,i;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(i=t.options.enableColumnPinning)?i:t.options.enablePinning)||r)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[i])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=pN(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},pB(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=pN(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),pB(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=pN(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),pB(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?p1():null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:p1())},e.getIsSomeColumnsPinned=t=>{var n,r,i;let o=e.getState().columnPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.left)?void 0:r.length)||(null==(i=o.right)?void 0:i.length))},e.getLeftLeafColumns=pN(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),pB(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=pN(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),pB(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=pN(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},pB(e.options,"debugColumns","getCenterLeafColumns"))}},{createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:pP("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?pK.includesString:"number"==typeof r?pK.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?pK.equals:Array.isArray(r)?pK.arrIncludes:pK.weakEquals},e.getFilterFn=()=>{var n,r;return pL(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:pK[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(i=t.options.enableFilters)||i)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var r,i;let o=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),s=pE(n,a?a.value:void 0);if(pJ(o,s,e))return null!=(r=null==t?void 0:t.filter(t=>t.id!==e.id))?r:[];let l={id:e.id,value:s};return a?null!=(i=null==t?void 0:t.map(t=>t.id===e.id?l:t))?i:[]:null!=t&&t.length?[...t,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var r;return null==(r=pE(t,e))?void 0:r.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&pJ(t.getFilterFn(),e.value,t))&&!0})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel)?e.getPreFilteredRowModel():e._getFilteredRowModel()}},{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:pP("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(i=t.options.enableFilters)||i)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>pK.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return pL(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:pK[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:pP("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return fs.datetime;if("string"==typeof n&&(r=!0,n.split(fr).length>1))return fs.alphanumeric}return r?fs.text:fs.basic},e.getAutoSortDir=()=>{let n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw Error();return pL(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:fs[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),o=null!=n;t.setSorting(a=>{let s,l=null==a?void 0:a.find(t=>t.id===e.id),u=null==a?void 0:a.findIndex(t=>t.id===e.id),c=[],d=o?n:"desc"===i;if("toggle"!=(s=null!=a&&a.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=a&&a.length&&u!==a.length-1?"replace":l?"toggle":"replace")||o||i||(s="remove"),"add"===s){var h;(c=[...a,{id:e.id,desc:d}]).splice(0,c.length-(null!=(h=t.options.maxMultiSortColCount)?h:Number.MAX_SAFE_INTEGER))}else c="toggle"===s?a.map(t=>t.id===e.id?{...t,desc:d}:t):"remove"===s?a.filter(t=>t.id!==e.id):[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;let o=e.getFirstSortDir(),a=e.getIsSorted();return a?(a===o||null!=(r=t.options.enableSortingRemoval)&&!r||!!n&&null!=(i=t.options.enableMultiRemove)&&!i)&&("desc"===a?"asc":"desc"):o},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel)?e.getPreSortedRowModel():e._getSortedRowModel()}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:pP("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?p0.sum:"[object Date]"===Object.prototype.toString.call(r)?p0.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return pL(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:p0[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel)?e.getPreGroupedRowModel():e._getGroupedRowModel()},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!(null!=(t=n.subRows)&&t.length)}}},{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:pP("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t)return void e._queue(()=>{t=!0});if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel)?e.getPreExpandedRowModel():e._getExpandedRowModel()},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;let o=!0===r||!!(null!=r&&r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n=null!=(i=n)?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,i;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!!(null!=(i=e.subRows)&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)n=(r=t.getRow(r.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...p8(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:pP("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t)return void e._queue(()=>{t=!0});if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>pE(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?p8():null!=(n=e.initialState.pagination)?n:p8())},e.setPageIndex=t=>{e.setPagination(n=>{let r=pE(t,n.pageIndex);return r=Math.max(0,Math.min(r,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,pE(t,e.pageSize)),r=Math.floor(e.pageSize*e.pageIndex/n);return{...e,pageIndex:r,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let i=pE(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof i&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=pN(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},pB(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return -1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel)?e.getPrePaginationRowModel():e._getPaginationRowModel(),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:p9(),...e}),getDefaultOptions:e=>({onRowPinningChange:pP("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let o=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],a=new Set([...i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...o]);t.setRowPinning(e=>{var t,r,i,o,s,l;return"bottom"===n?{top:(null!=(i=null==e?void 0:e.top)?i:[]).filter(e=>!(null!=a&&a.has(e))),bottom:[...(null!=(o=null==e?void 0:e.bottom)?o:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter(e=>!(null!=a&&a.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=a&&a.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=a&&a.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:i}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:i)||n},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();if(!i)return -1;let o=null==(n="top"===i?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==o?void 0:o.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?p9():null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:p9())},e.getIsSomeRowsPinned=t=>{var n,r,i;let o=e.getState().rowPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.top)?void 0:r.length)||(null==(i=o.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var i;return(null==(i=e.options.keepPinnedRows)||i?(null!=n?n:[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=pN(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),pB(e.options,"debugRows","getTopRows")),e.getBottomRows=pN(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),pB(e.options,"debugRows","getBottomRows")),e.getCenterRows=pN(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},pB(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:pP("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=void 0!==t?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(t=>{p7(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=pN(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?fe(e,n):{rows:[],flatRows:[],rowsById:{}},pB(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=pN(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?fe(e,n):{rows:[],flatRows:[],rowsById:{}},pB(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=pN(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?fe(e,n):{rows:[],flatRows:[],rowsById:{}},pB(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=void 0!==n?n:!i,e.getCanSelect()&&i===n)return o;let s={...o};return p7(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return ft(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===fn(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===fn(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},{getDefaultColumnDef:()=>p2,getInitialState:e=>({columnSizing:{},columnSizingInfo:p5(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:pP("columnSizing",e),onColumnSizingInfoChange:pP("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;let o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:p2.minSize,null!=(r=null!=o?o:e.columnDef.size)?r:p2.size),null!=(i=e.columnDef.maxSize)?i:p2.maxSize)},e.getStart=pN(e=>[e,p6(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),pB(t.options,"debugColumns","getStart")),e.getAfter=pN(e=>[e,p6(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),pB(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var r;t+=null!=(r=e.column.getSize())?r:0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=null==r?void 0:r.getCanResize();return o=>{if(!r||!i||(null==o.persist||o.persist(),p3(o)&&o.touches&&o.touches.length>1))return;let a=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],l=p3(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,i;let o="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*o,s=Math.max(a/(null!=(i=null==e?void 0:e.startSize)?i:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100}),{...e,deltaOffset:a,deltaPercentage:s}}),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing(e=>({...e,...u})))},d=e=>{c("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||("u">typeof document?document:null),p={moveHandler:e=>c("move",e.clientX),upHandler:e=>{null==h||h.removeEventListener("mousemove",p.moveHandler),null==h||h.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},f={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),c("move",e.touches[0].clientX),!1),upHandler:e=>{var t;null==h||h.removeEventListener("touchmove",f.moveHandler),null==h||h.removeEventListener("touchend",f.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof p4)return p4;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return p4=e}()&&{passive:!1};p3(o)?(null==h||h.addEventListener("touchmove",f.moveHandler,g),null==h||h.addEventListener("touchend",f.upHandler,g)):(null==h||h.addEventListener("mousemove",p.moveHandler,g),null==h||h.addEventListener("mouseup",p.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?p5():null!=(n=e.initialState.columnSizingInfo)?n:p5())},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}}];function fu(e){let t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}let fc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},fd=RegExp(Object.keys(fc).join("|"),"g"),fh={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function fp(e,t,n){let r;return(e=ff(e,n),(t=ff(t,n)).length>e.length)?fh.NO_MATCH:e===t?fh.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?fh.EQUAL:e.startsWith(t)?fh.STARTS_WITH:e.includes(` ${t}`)?fh.WORD_STARTS_WITH:e.includes(t)?fh.CONTAINS:1===t.length?fh.NO_MATCH:(r="",e.split(" ").forEach(e=>{e.split("-").forEach(e=>{r+=e.substr(0,1)})}),r).includes(t)?fh.ACRONYM:function(e,t){var n;let r,i=0,o=0;function a(e,t,n){for(let r=n,o=t.length;r<o;r++)if(t[r]===e)return i+=1,r+1;return -1}let s=a(t[0],e,0);if(s<0)return fh.NO_MATCH;o=s;for(let n=1,r=t.length;n<r;n++)if(!((o=a(t[n],e,o))>-1))return fh.NO_MATCH;return n=o-s,r=i/t.length,fh.MATCHES+1/n*r}(e,t)}function ff(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(fd,e=>fc[e])),e}let fg={maxRanking:1/0,minRanking:-1/0};function fm(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:i,defaultColumnHeight:o}={}){var a,s;let l=e.spacing(1),u=e.spacing(1.25),c=e.spacing(2),d=i?c:u,h=r?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize;"compact"===t&&(l=e.spacing(.5),u=e.spacing(.5),c=e.spacing(1),d=i?c:u,h=r?c:u,p=e.typography.body2.lineHeight,f=e.typography.body2.fontSize),"comfortable"===t&&(l=e.spacing(2),u=e.spacing(1.5),c=e.spacing(2),d=i?c:u,h=r?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize);let g=n||!o||"auto"===o?(a=p,s=l,("string"==typeof a?parseInt(a,10):a??0)+2*("string"==typeof s?parseInt(s,10):s)):o;return{padding:`${l} ${h} ${l} ${d}`,height:g,fontSize:f,lineHeight:p}}function fv(e,t){return e.map(({width:e,align:n,headerDescription:r,cellDescription:i,enableSorting:o,dataLink:a,enableResizing:s,...l})=>{var u,c,d,h,p,f,g;let m=s??t?.enableResizing??!1,v="auto"===e||void 0===e?(u=m,c=t?.minWidth,d=t?.maxWidth,u?{size:150,minSize:c??60,maxSize:d??1e3}:{size:0,minSize:0,maxSize:0}):(h=m,p=e,f=t?.minWidth,g=t?.maxWidth,h?{size:p,minSize:f??60,maxSize:g??1e3}:{size:p});return{...l,...v,enableSorting:!!o,enableResizing:m,meta:{align:n,headerDescription:r,cellDescription:i,dataLink:a}}})}var fy=n(2203),fx=n(42872);function fb(e){return(0,V.Ay)("PrivateSwitchBase",e)}(0,F.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);let fw=(0,N.A)(eS,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),fS=(0,N.A)("input",{name:"MuiSwitchBase",shouldForwardProp:Z.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),fA=I.forwardRef(function(e,t){let{autoFocus:n,checked:r,checkedIcon:i,defaultChecked:o,disabled:a,disableFocusRipple:s=!1,edge:l=!1,icon:u,id:c,inputProps:d,inputRef:h,name:p,onBlur:f,onChange:g,onFocus:m,readOnly:v,required:y=!1,tabIndex:x,type:b,value:w,slots:S={},slotProps:A={},...C}=e,[M,k]=(0,fy.A)({controlled:r,default:!!o,name:"SwitchBase",state:"checked"}),T=(0,fx.A)(),I=a;T&&void 0===I&&(I=T.disabled);let D="checkbox"===b||"radio"===b,O={...e,checked:M,disabled:I,disableFocusRipple:s,edge:l},E=(e=>{let{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${(0,L.A)(i)}`],input:["input"]};return(0,R.A)(o,fb,t)})(O),P={slots:S,slotProps:{input:d,...A}},[N,B]=(0,cm.A)("root",{ref:t,elementType:fw,className:E.root,shouldForwardComponentProp:!0,externalForwardedProps:{...P,component:"span",...C},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),m&&m(t),T&&T.onFocus&&T.onFocus(t)},onBlur:t=>{e.onBlur?.(t),f&&f(t),T&&T.onBlur&&T.onBlur(t)}}),ownerState:O,additionalProps:{centerRipple:!0,focusRipple:!s,disabled:I,role:void 0,tabIndex:null}}),[z,j]=(0,cm.A)("input",{ref:h,elementType:fS,className:E.input,externalForwardedProps:P,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked;k(t),g&&g(e,t)})(t)}}),ownerState:O,additionalProps:{autoFocus:n,checked:r,defaultChecked:o,disabled:I,id:D?c:void 0,name:p,readOnly:v,required:y,tabIndex:x,type:b,..."checkbox"===b&&void 0===w?{}:{value:w}}});return(0,_.jsxs)(N,{...B,children:[(0,_.jsx)(z,{...j}),M?i:u]})});var fC=n(22402);let fM=(0,fC.A)((0,_.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"),fk=(0,fC.A)((0,_.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"),fT=(0,fC.A)((0,_.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 f_(e){return(0,V.Ay)("MuiCheckbox",e)}let fI=(0,F.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var fD=n(64606);let fO=(0,N.A)(fA,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,L.A)(n.size)}`],"default"!==n.color&&t[`color${(0,L.A)(n.color)}`]]}})((0,B.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{[`&.${fI.checked}, &.${fI.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${fI.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),fR=(0,_.jsx)(fk,{}),fE=(0,_.jsx)(fM,{}),fP=(0,_.jsx)(fT,{}),fL=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:r=fR,color:i="primary",icon:o=fE,indeterminate:a=!1,indeterminateIcon:s=fP,inputProps:l,size:u="medium",disableRipple:c=!1,className:d,slots:h={},slotProps:p={},...f}=n,g=a?s:o,m=a?s:r,v={...n,disableRipple:c,color:i,indeterminate:a,size:u},y=(e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${(0,L.A)(r)}`,`size${(0,L.A)(i)}`]},a=(0,R.A)(o,f_,t);return{...t,...a}})(v),x=p.input??l,[b,w]=(0,cm.A)("root",{ref:t,elementType:fO,className:(0,O.A)(y.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:p,...f},ownerState:v,additionalProps:{type:"checkbox",icon:I.cloneElement(g,{fontSize:g.props.fontSize??u}),checkedIcon:I.cloneElement(m,{fontSize:m.props.fontSize??u}),disableRipple:c,slots:h,slotProps:{input:(0,fD.A)("function"==typeof x?x(v):x,{"data-indeterminate":a})}}});return(0,_.jsx)(b,{...w,classes:y})});function fN({color:e,density:t,...n}){let r="compact"===t;return(0,_.jsx)(fL,{size:r?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(r?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,E.X4)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:r?16:18}}})}let fB=I.createContext();function fz(e){return(0,V.Ay)("MuiTableRow",e)}let fj=(0,F.A)("MuiTableRow",["root","selected","hover","head","footer"]),fF=(0,N.A)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,B.A)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${fj.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${fj.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),fV=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiTableRow"}),{className:r,component:i="tr",hover:o=!1,selected:a=!1,...s}=n,l=I.useContext(fB),u={...n,component:i,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant},c=(e=>{let{classes:t,selected:n,hover:r,head:i,footer:o}=e;return(0,R.A)({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},fz,t)})(u);return(0,_.jsx)(fF,{as:i,ref:t,className:(0,O.A)(c.root,r),role:"tr"===i?null:"row",ownerState:u,...s})});var f$=n(76746);function fH(e){return(0,V.Ay)("MuiDivider",e)}let fW=(0,F.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),fG=(0,F.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function fU(e){return(0,V.Ay)("MuiMenuItem",e)}let fq=(0,F.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),fY=(0,N.A)(eS,{shouldForwardProp:e=>(0,Z.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,B.A)(({theme:e})=>({...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","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${fq.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${fq.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${fq.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.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,E.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${fq.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${fq.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${fW.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${fW.inset}`]:{marginLeft:52},[`& .${cg.root}`]:{marginTop:0,marginBottom:0},[`& .${cg.inset}`]:{paddingLeft:36},[`& .${fG.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${fG.root} svg`]:{fontSize:"1.25rem"}}}]}))),fX=I.forwardRef(function(e,t){let n,r=(0,j.b)({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:c="menuitem",tabIndex:d,className:h,...p}=r,f=I.useContext(cs.A),g=I.useMemo(()=>({dense:a||f.dense||!1,disableGutters:l}),[f.dense,a,l]),m=I.useRef(null);(0,ca.A)(()=>{i&&m.current&&m.current.focus()},[i]);let v={...r,dense:g.dense,divider:s,disableGutters:l},y=(e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s=(0,R.A)({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},fU,a);return{...a,...s}})(r),x=(0,Q.A)(m,t);return r.disabled||(n=void 0!==d?d:-1),(0,_.jsx)(cs.A.Provider,{value:g,children:(0,_.jsx)(fY,{ref:x,role:c,tabIndex:n,component:o,focusVisibleClassName:(0,O.A)(y.focusVisible,u),className:(0,O.A)(y.root,h),...p,ownerState:v,classes:y})})});var fZ=n(76795);let fK=I.createContext();function fQ(e){return(0,V.Ay)("MuiTableCell",e)}let fJ=(0,F.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),f0=(0,N.A)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,L.A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,L.A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,L.A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,B.A)(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
@@ -141,4 +141,4 @@
141
141
  transparent
142
142
  )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:$s||{"&::after":{animation:`${$o} 2s linear 0.5s infinite`}}}]}})),$u=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:i,component:o="span",height:a,style:s,variant:l="text",width:u,...c}=n,d={...n,animation:r,component:o,variant:l,hasChildren:!!c.children},h=(e=>{let{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:a}=e;return(0,R.A)({root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!a&&"heightAuto"]},$r,t)})(d);return(0,_.jsx)($l,{as:o,ref:t,className:(0,O.A)(h.root,i),ownerState:d,...c,style:{width:u,height:a,...s}})});function $c(e){let{message:t}=e;return(0,_.jsx)(eH.A,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,_.jsx)(cp.A,{children:t})})}function $d(e){let{resource:t}=e;return(0,_.jsx)($c,{message:`No ${t}`})}function $h(e){let{variant:t="rounded"}=e;return(0,_.jsx)(eH.A,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,_.jsx)($u,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}let $p=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function $f({onChange:e,value:t="desc"}){return(0,_.jsx)(yb,{label:"Sort",control:(0,_.jsx)(y7,{value:$p.find(e=>e.id===t),options:$p,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function $g({onChange:e,value:t,...n}){let r=t=>{e(t)};return(0,_.jsxs)(q,{"aria-label":"Sort",...n,children:[(0,_.jsx)(eV,{onClick:()=>r(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,_.jsx)(eV,{onClick:()=>r("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,_.jsx)(eV,{onClick:()=>r("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}function $m(e){return(0,V.Ay)("MuiToggleButtonGroup",e)}let $v=(0,F.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),$y=I.createContext({}),$x=I.createContext(void 0);function $b(e){return(0,V.Ay)("MuiToggleButton",e)}let $w=(0,F.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),$S=(0,N.A)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${$v.grouped}`]:t.grouped},{[`& .${$v.grouped}`]:t[`grouped${(0,L.A)(n.orientation)}`]},{[`& .${$v.firstButton}`]:t.firstButton},{[`& .${$v.lastButton}`]:t.lastButton},{[`& .${$v.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,B.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${$v.grouped}`]:{[`&.${$v.selected} + .${$v.grouped}.${$v.selected}`]:{borderTop:0,marginTop:0}},[`& .${$v.firstButton},& .${$v.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${$v.lastButton},& .${$v.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${$v.lastButton}.${$w.disabled},& .${$v.middleButton}.${$w.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${$v.grouped}`]:{[`&.${$v.selected} + .${$v.grouped}.${$v.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${$v.firstButton},& .${$v.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${$v.lastButton},& .${$v.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${$v.lastButton}.${$w.disabled},& .${$v.middleButton}.${$w.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),$A=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:o="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:u,orientation:c="horizontal",size:d="medium",value:h,...p}=n,f={...n,disabled:a,fullWidth:l,orientation:c,size:d},g=(e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e,o={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,L.A)(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,R.A)(o,$m,t)})(f),m=I.useCallback((e,t)=>{let n;if(!u)return;let r=h&&h.indexOf(t);h&&r>=0?(n=h.slice()).splice(r,1):n=h?h.concat(t):[t],u(e,n)},[u,h]),v=I.useCallback((e,t)=>{u&&u(e,h===t?null:t)},[u,h]),y=I.useMemo(()=>({className:g.grouped,onChange:s?v:m,value:h,size:d,fullWidth:l,color:o,disabled:a}),[g.grouped,s,v,m,h,d,l,o,a]),x=P(r),b=x.length;return(0,_.jsx)($S,{role:"group",className:(0,O.A)(g.root,i),ref:t,ownerState:f,...p,children:(0,_.jsx)($y.Provider,{value:y,children:x.map((e,t)=>{let n,r;return(0,_.jsx)($x.Provider,{value:(n=0===t,r=t===b-1,n&&r?"":n?g.firstButton:r?g.lastButton:g.middleButton),children:e},t)})})})}),$C=(0,N.A)(eS,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${(0,L.A)(n.size)}`]]}})((0,B.A)(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${$w.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${$w.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.X4)(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,z.A)()).map(([t])=>({props:{color:t},style:{[`&.${$w.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,E.X4)(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),$M=I.forwardRef(function(e,t){var n;let{value:r,...i}=I.useContext($y),o=I.useContext($x),a=(0,Y.A)({...i,selected:(n=e.value,void 0!==r&&void 0!==n&&(Array.isArray(r)?r.includes(n):n===r))},e),s=(0,j.b)({props:a,name:"MuiToggleButton"}),{children:l,className:u,color:c="standard",disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p=!1,onChange:f,onClick:g,selected:m,size:v="medium",value:y,...x}=s,b={...s,color:c,disabled:d,disableFocusRipple:h,fullWidth:p,size:v},w=(e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:o,color:a}=e,s={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${(0,L.A)(o)}`,a]};return(0,R.A)(s,$b,t)})(b);return(0,_.jsx)($C,{className:(0,O.A)(i.className,w.root,u,o||""),disabled:d,focusRipple:!h,ref:t,onClick:e=>{g&&(g(e,y),e.defaultPrevented)||f&&f(e,y)},onChange:f,value:y,ownerState:b,"aria-pressed":m,...x,children:l})}),$k=(0,n(68335).A)();var $T=n(86742),$_=n(86067);function $I({inputRef:e,label:t,color:n,value:r,mode:i,onChange:o,onColorChange:a,onBlur:s,onDelete:l}){let[u,c]=(0,I.useState)(0);return(0,_.jsxs)(eH.A,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,_.jsx)(ce,{label:t,color:n,onColorChange:a}),(0,_.jsx)(yg.A,{htmlFor:t,children:t}),(0,_.jsx)(eX.A,{id:t,inputRef:e,type:"number",value:0===r?"":r,placeholder:"0",onChange:o,onBlur:s,onKeyDown:e=>{"Enter"===e.key&&(s(),c(u+1))},InputProps:{endAdornment:"percent"===i?(0,_.jsx)(cr.A,{paddingX:1,children:"%"}):void 0}},u),(0,_.jsx)(eY,{"aria-label":`delete threshold ${t}`,size:"small",onClick:l,children:(0,_.jsx)($_,{})})]})}function $D({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:r}){let{thresholds:{defaultColor:i,palette:o}}=tA(),a=e?.defaultColor??i,s=e?.steps,l=(0,I.useRef)(null),u=(0,I.useRef)(!1);(0,I.useEffect)(()=>{l.current&&u.current&&(l.current?.focus(),u.current=!1)},[s?.length]);let c=()=>{if(void 0!==s){let n=[...s];n.sort((e,t)=>e.value-t.value),void 0!==e&&t((0,ci.produce)(e,e=>{e.steps=n}))}};return(0,_.jsxs)(yS,{title:"Thresholds",icon:(0,_.jsx)(yv,{description:"Add threshold",children:(0,_.jsx)(eY,{size:"small","aria-label":"add threshold",onClick:()=>{u.current=!0,void 0===e?t({steps:[{value:10}]}):e&&void 0===e.steps?t((0,ci.produce)(e,e=>{e.steps=[{value:10}]})):t((0,ci.produce)(e,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=o[t.length]??$O();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},children:(0,_.jsx)($T,{})})}),children:[(0,_.jsx)(yb,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,_.jsxs)($A,{exclusive:!0,disabled:r,value:e?.mode??"absolute",onChange:(n,r)=>{let i="percent"===r?"percent":void 0;void 0!==e?t((0,ci.produce)(e,e=>{e.mode=i})):t({mode:i})},sx:{height:"36px",marginLeft:"auto"},children:[(0,_.jsx)($M,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,_.jsx)($M,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),s&&s.map((n,r)=>(0,_.jsx)($I,{inputRef:r===s.length-1?l:void 0,label:`T${r+1}`,color:n.color??o[r]??a,value:n.value,mode:e?.mode,onColorChange:n=>{void 0!==e&&t((0,ci.produce)(e,e=>{if(void 0!==e.steps){let t=e.steps[r];t&&(t.color=n)}}))},onChange:n=>{void 0!==e&&t((0,ci.produce)(e,e=>{let t=e.steps?.[r];t&&(t.value=Number(n.target.value))}))},onDelete:()=>{void 0!==e&&t((0,ci.produce)(e,e=>{e.steps&&e.steps.splice(r,1)}))},onBlur:c},r)).toReversed(),!n&&(0,_.jsxs)($k,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,_.jsx)(ce,{label:"default",color:a,onColorChange:n=>{void 0!==e?t((0,ci.produce)(e,e=>{e.defaultColor=n})):t({defaultColor:n})}}),(0,_.jsx)(cp.A,{children:"Default"})]})]})}let $O=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0");var $R=n(24300),$E=n(26684),$P=n(51327),$L=n(87169);function $N({props:e,name:t}){return(0,$P.A)({props:e,name:t,defaultTheme:$L.A,themeId:bn.A})}let $B=["localeText"],$z=I.createContext(null),$j=function(e){let{localeText:t}=e,n=(0,en.A)(e,$B),{utils:r,localeText:i}=I.useContext($z)??{utils:void 0,localeText:void 0},{children:o,dateAdapter:a,dateFormats:s,dateLibInstance:l,adapterLocale:u,localeText:c}=$N({props:n,name:"MuiLocalizationProvider"}),d=I.useMemo(()=>(0,er.A)({},c,i,t),[c,i,t]),h=I.useMemo(()=>{if(!a)return r||null;let e=new a({locale:u,formats:s,instance:l});if(!e.isMUIAdapter)throw Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
143
143
  `));return e},[a,u,s,l,r]),p=I.useMemo(()=>h?{minDate:h.date("1900-01-01T00:00:00.000"),maxDate:h.date("2099-12-31T00:00:00.000")}:null,[h]),f=I.useMemo(()=>({utils:h,defaultDates:p,localeText:d}),[p,h,d]);return(0,_.jsx)($z.Provider,{value:f,children:o})};var $F=n(62688),$V=n.n($F);let $$={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(null===t||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"};(0,er.A)({},$$);let $H=()=>{let e=I.useContext($z);if(null===e)throw Error("MUI X: Can not find the date and time pickers localization context.\nIt looks like you forgot to wrap your component in LocalizationProvider.\nThis can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package");if(null===e.utils)throw Error("MUI X: Can not find the date and time pickers adapter from its localization context.\nIt looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.");let t=I.useMemo(()=>(0,er.A)({},$$,e.localeText),[e.localeText]);return I.useMemo(()=>(0,er.A)({},e,{localeText:t}),[e,t])},$W=e=>{let t=$H().utils,n=I.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},$G=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n))},$U=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:a,timezone:s})=>{let l=$G(a,a.date(void 0,s),e);n&&a.isBefore(i,l)&&(i=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,i)&&(u=i,c=null),a.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&a.isAfter(u,r)&&(u=null),c&&a.isBefore(c,i)&&(c=null),u){if(!o(u))return u;u=a.addDays(u,1)}if(c){if(!o(c))return c;c=a.addDays(c,-1)}}return null},$q=(e,t,n)=>null!=t&&e.isValid(t)?t:n,$Y=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},$X=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),$Z=(e,t)=>{let n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},$K=["year","month","day"],$Q=e=>$K.includes(e);function $J(e){return(0,V.Ay)("MuiTab",e)}let $0=(0,F.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),$1=(0,N.A)(eS,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,L.A)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${$0.iconWrapper}`]:t.iconWrapper},{[`& .${$0.icon}`]:t.icon}]}})((0,B.A)(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${$0.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${$0.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${$0.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${$0.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${$0.selected}`]:{opacity:1},[`&.${$0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${$0.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${$0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${$0.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${$0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),$2=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:u,label:c,onChange:d,onClick:h,onFocus:p,selected:f,selectionFollowsFocus:g,textColor:m="inherit",value:v,wrapped:y=!1,...x}=n,b={...n,disabled:i,disableFocusRipple:o,selected:f,icon:!!s,iconPosition:l,label:!!c,fullWidth:a,textColor:m,wrapped:y},w=(e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,u={root:["root",o&&a&&"labelIcon",`textColor${(0,L.A)(n)}`,r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return(0,R.A)(u,$J,t)})(b),S=s&&c&&I.isValidElement(s)?I.cloneElement(s,{className:(0,O.A)(w.icon,s.props.className)}):s;return(0,_.jsxs)($1,{focusRipple:!o,className:(0,O.A)(w.root,r),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:e=>{!f&&d&&d(e,v),h&&h(e)},onFocus:e=>{g&&!f&&d&&d(e,v),p&&p(e)},ownerState:b,tabIndex:f?0:-1,...x,children:["top"===l||"start"===l?(0,_.jsxs)(I.Fragment,{children:[S,c]}):(0,_.jsxs)(I.Fragment,{children:[c,S]}),u]})});function $5(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}let $4={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function $3(e){return(0,V.Ay)("MuiTabScrollButton",e)}let $6=(0,F.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),$8=(0,N.A)(eS,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${$6.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$9=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:o={},direction:a,orientation:s,disabled:l,...u}=n,c=(0,f3.I)(),d={isRtl:c,...n},h=(e=>{let{classes:t,orientation:n,disabled:r}=e;return(0,R.A)({root:["root",n,r&&"disabled"]},$3,t)})(d),p=i.StartScrollButtonIcon??f6,f=i.EndScrollButtonIcon??f8,g=(0,m8.A)({elementType:p,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=(0,m8.A)({elementType:f,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,_.jsx)($8,{component:"div",className:(0,O.A)(h.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...u,style:{...u.style,..."vertical"===s&&{"--TabScrollButton-svgRotate":`rotate(${c?-90:90}deg)`}},children:"left"===a?(0,_.jsx)(p,{...g}):(0,_.jsx)(f,{...m})})});function $7(e){return(0,V.Ay)("MuiTabs",e)}let He=(0,F.A)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var Ht=n(1092);let Hn=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Hr=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Hi=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},Ho=(0,N.A)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${He.scrollButtons}`]:t.scrollButtons},{[`& .${He.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,B.A)(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${He.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),Ha=(0,N.A)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Hs=(0,N.A)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),Hl=(0,N.A)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,B.A)(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),Hu=(0,N.A)(function(e){let{onChange:t,...n}=e,r=I.useRef(),i=I.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,ca.A)(()=>{let e=(0,bo.A)(()=>{let e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,bs.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),I.useEffect(()=>{o(),t(r.current)},[t]),(0,_.jsx)("div",{style:$4,...n,ref:i})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Hc={},Hd=I.forwardRef(function(e,t){let n,r,i=(0,j.b)({props:e,name:"MuiTabs"}),o=(0,cn.A)(),a=(0,f3.I)(),{"aria-label":s,"aria-labelledby":l,action:u,centered:c=!1,children:d,className:h,component:p="div",allowScrollButtonsMobile:f=!1,indicatorColor:g="primary",onChange:m,orientation:v="horizontal",ScrollButtonComponent:y,scrollButtons:x="auto",selectionFollowsFocus:b,slots:w={},slotProps:S={},TabIndicatorProps:A={},TabScrollButtonProps:C={},textColor:M="primary",value:k,variant:T="standard",visibleScrollbar:D=!1,...E}=i,P="scrollable"===T,L="vertical"===v,N=L?"scrollTop":"scrollLeft",B=L?"top":"left",z=L?"bottom":"right",F=L?"clientHeight":"clientWidth",V=L?"height":"width",$={...i,component:p,allowScrollButtonsMobile:f,indicatorColor:g,orientation:v,vertical:L,scrollButtons:x,textColor:M,variant:T,visibleScrollbar:D,fixed:!P,hideScrollbar:P&&!D,scrollableX:P&&!L,scrollableY:P&&L,centered:c&&!P,scrollButtonsHideMobile:!f},H=(e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return(0,R.A)({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},$7,l)})($),W=(0,m8.A)({elementType:w.StartScrollButtonIcon,externalSlotProps:S.startScrollButtonIcon,ownerState:$}),G=(0,m8.A)({elementType:w.EndScrollButtonIcon,externalSlotProps:S.endScrollButtonIcon,ownerState:$}),[U,q]=I.useState(!1),[Y,X]=I.useState(Hc),[Z,K]=I.useState(!1),[Q,ee]=I.useState(!1),[et,en]=I.useState(!1),[er,ei]=I.useState({overflow:"hidden",scrollbarWidth:0}),eo=new Map,ea=I.useRef(null),es=I.useRef(null),el={slots:w,slotProps:{indicator:A,scrollButton:C,...S}},eu=()=>{let e,t,n=ea.current;if(n){let t=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(n&&!1!==k){let e=es.current.children;if(e.length>0){let n=e[eo.get(k)];t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ec=(0,J.A)(()=>{let e,{tabsMeta:t,tabMeta:n}=eu(),r=0;L?(e="top",n&&t&&(r=n.top-t.top+t.scrollTop)):(e=a?"right":"left",n&&t&&(r=(a?-1:1)*(n[e]-t[e]+t.scrollLeft)));let i={[e]:r,[V]:n?n[V]:0};if("number"!=typeof Y[e]||"number"!=typeof Y[V])X(i);else{let t=Math.abs(Y[e]-i[e]),n=Math.abs(Y[V]-i[V]);(t>=1||n>=1)&&X(i)}}),ed=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=()=>{}){let{ease:o=$5,duration:a=300}=r,s=null,l=t[e],u=!1,c=r=>{if(u)return void i(Error("Animation cancelled"));null===s&&(s=r);let d=Math.min(1,(r-s)/a);(t[e]=o(d)*(n-l)+l,d>=1)?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(c)};l===n?i(Error("Element already at target position")):requestAnimationFrame(c)}(N,ea.current,e,{duration:o.transitions.duration.standard}):ea.current[N]=e},eh=e=>{let t=ea.current[N];L?t+=e:t+=e*(a?-1:1),ed(t)},ep=()=>{let e=ea.current[F],t=0,n=Array.from(es.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[F]>e){0===r&&(t=e);break}t+=i[F]}return t},[ef,{onChange:eg,...em}]=(0,cm.A)("scrollbar",{className:(0,O.A)(H.scrollableX,H.hideScrollbar),elementType:Hu,shouldForwardComponentProp:!0,externalForwardedProps:el,ownerState:$}),ev=I.useCallback(e=>{eg?.(e),ei({overflow:null,scrollbarWidth:e})},[eg]),[ey,ex]=(0,cm.A)("scrollButtons",{className:(0,O.A)(H.scrollButtons,C.className),elementType:$9,externalForwardedProps:el,ownerState:$,additionalProps:{orientation:v,slots:{StartScrollButtonIcon:w.startScrollButtonIcon||w.StartScrollButtonIcon,EndScrollButtonIcon:w.endScrollButtonIcon||w.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:W,endScrollButtonIcon:G}}}),eb=(0,J.A)(e=>{let{tabsMeta:t,tabMeta:n}=eu();n&&t&&(n[B]<t[B]?ed(t[N]+(n[B]-t[B]),{animation:e}):n[z]>t[z]&&ed(t[N]+(n[z]-t[z]),{animation:e}))}),ew=(0,J.A)(()=>{P&&!1!==x&&en(!et)});I.useEffect(()=>{let e,t,n=(0,bo.A)(()=>{ea.current&&ec()}),r=(0,bs.A)(ea.current);return r.addEventListener("resize",n),"u">typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(es.current.children).forEach(t=>{e.observe(t)})),"u">typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{e?.unobserve(t)}),t.addedNodes.forEach(t=>{e?.observe(t)})}),n(),ew()})).observe(es.current,{childList:!0}),()=>{n.clear(),r.removeEventListener("resize",n),t?.disconnect(),e?.disconnect()}},[ec,ew]),I.useEffect(()=>{let e=Array.from(es.current.children),t=e.length;if("u">typeof IntersectionObserver&&t>0&&P&&!1!==x){let n=e[0],r=e[t-1],i={root:ea.current,threshold:.99},o=new IntersectionObserver(e=>{K(!e[0].isIntersecting)},i);o.observe(n);let a=new IntersectionObserver(e=>{ee(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,x,et,d?.length]),I.useEffect(()=>{q(!0)},[]),I.useEffect(()=>{ec()}),I.useEffect(()=>{eb(Hc!==Y)},[eb,Y]),I.useImperativeHandle(u,()=>({updateIndicator:ec,updateScrollButtons:ew}),[ec,ew]);let[eS,eA]=(0,cm.A)("indicator",{className:(0,O.A)(H.indicator,A.className),elementType:Hl,externalForwardedProps:el,ownerState:$,additionalProps:{style:Y}}),eC=(0,_.jsx)(eS,{...eA}),eM=0,ek=I.Children.map(d,e=>{if(!I.isValidElement(e))return null;let t=void 0===e.props.value?eM:e.props.value;eo.set(t,eM);let n=t===k;return eM+=1,I.cloneElement(e,{fullWidth:"fullWidth"===T,indicator:n&&!U&&eC,selected:n,selectionFollowsFocus:b,onChange:m,textColor:M,value:t,...1===eM&&!1===k&&!e.props.tabIndex?{tabIndex:0}:{}})}),eT=((n={}).scrollbarSizeListener=P?(0,_.jsx)(ef,{...em,onChange:ev}):null,n.scrollButtonStart=(r=P&&("auto"===x&&(Z||Q)||!0===x))?(0,_.jsx)(ey,{direction:a?"right":"left",onClick:()=>{eh(-1*ep())},disabled:!Z,...ex}):null,n.scrollButtonEnd=r?(0,_.jsx)(ey,{direction:a?"left":"right",onClick:()=>{eh(ep())},disabled:!Q,...ex}):null,n),[e_,eI]=(0,cm.A)("root",{ref:t,className:(0,O.A)(H.root,h),elementType:Ho,externalForwardedProps:{...el,...E,component:p},ownerState:$}),[eD,eO]=(0,cm.A)("scroller",{ref:ea,className:H.scroller,elementType:Ha,externalForwardedProps:el,ownerState:$,additionalProps:{style:{overflow:er.overflow,[L?`margin${a?"Left":"Right"}`:"marginBottom"]:D?void 0:-er.scrollbarWidth}}}),[eR,eE]=(0,cm.A)("list",{ref:es,className:(0,O.A)(H.list,H.flexContainer),elementType:Hs,externalForwardedProps:el,ownerState:$,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=es.current,n=(0,Ht.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===v?"ArrowLeft":"ArrowUp",i="horizontal"===v?"ArrowRight":"ArrowDown";switch("horizontal"===v&&a&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),Hi(t,n,Hr);break;case i:e.preventDefault(),Hi(t,n,Hn);break;case"Home":e.preventDefault(),Hi(t,null,Hn);break;case"End":e.preventDefault(),Hi(t,null,Hr)}})(t),e.onKeyDown?.(t)}})});return(0,_.jsxs)(e_,{...eI,children:[eT.scrollButtonStart,eT.scrollbarSizeListener,(0,_.jsxs)(eD,{...eO,children:[(0,_.jsx)(eR,{"aria-label":s,"aria-labelledby":l,"aria-orientation":"vertical"===v?"vertical":null,role:"tablist",...eE,children:ek}),U&&eC]}),eT.scrollButtonEnd]})}),Hh=(0,fC.A)((0,_.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Hp=(0,fC.A)((0,_.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Hf=(0,fC.A)((0,_.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");(0,fC.A)((0,_.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,fC.A)((0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,_.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");let Hg=(0,fC.A)((0,_.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Hm=(0,fC.A)((0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,_.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Hv=(0,fC.A)((0,_.jsx)("path",{d:"M19 6.41 17.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");function Hy(e){return(0,V.Ay)("MuiDateTimePickerTabs",e)}(0,F.A)("MuiDateTimePickerTabs",["root"]);let Hx=(0,N.A)(Hd,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${He.indicator}`]:{bottom:"auto",top:0}}})),Hb=function(e){let t=$N({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,_.jsx)(Hg,{}),onViewChange:r,timeIcon:i=(0,_.jsx)(Hm,{}),view:o,hidden:a="u"<typeof window||window.innerHeight<667,className:s,sx:l}=t,u=$H().localeText,c=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},Hy,t)})(t);return a?null:(0,_.jsxs)(Hx,{ownerState:t,variant:"fullWidth",value:$Q(o)?"date":"time",onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,O.A)(s,c.root),sx:l,children:[(0,_.jsx)($2,{value:"date","aria-label":u.dateTableLabel,icon:(0,_.jsx)(I.Fragment,{children:n})}),(0,_.jsx)($2,{value:"time","aria-label":u.timeTableLabel,icon:(0,_.jsx)(I.Fragment,{children:i})})]})};function Hw(e){return(0,V.Ay)("MuiPickersToolbarText",e)}let HS=(0,F.A)("MuiPickersToolbarText",["root","selected"]),HA=["className","selected","value"],HC=(0,N.A)(cp.A,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${HS.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${HS.selected}`]:{color:(e.vars||e).palette.text.primary}})),HM=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,o=(0,en.A)(n,HA),a=(e=>{let{classes:t,selected:n}=e;return(0,R.A)({root:["root",n&&"selected"]},Hw,t)})(n);return(0,_.jsx)(HC,(0,er.A)({ref:t,className:(0,O.A)(a.root,r),component:"span"},o,{children:i}))});function Hk(e){return(0,V.Ay)("MuiPickersToolbar",e)}let HT=(0,F.A)("MuiPickersToolbar",["root","content"]),H_=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],HI=(0,N.A)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),HD=(0,N.A)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),HO=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:o,hidden:a,titleId:s}=n,l=(0,en.A)(n,H_),u=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],content:["content"]},Hk,t)})(n);return a?null:(0,_.jsxs)(HI,(0,er.A)({ref:t,className:(0,O.A)(u.root,i),ownerState:n},l,{children:[(0,_.jsx)(cp.A,{color:"text.secondary",variant:"overline",id:s,children:o}),(0,_.jsx)(HD,{className:u.content,ownerState:n,children:r})]}))}),HR=["align","className","selected","typographyClassName","value","variant","width"],HE=(0,N.A)(eV,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),HP=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:a,value:s,variant:l,width:u}=n,c=(0,en.A)(n,HR),d=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},Hk,t)})(n);return(0,_.jsx)(HE,(0,er.A)({variant:"text",ref:t,className:(0,O.A)(d.root,i)},u?{sx:{width:u}}:{},c,{children:(0,_.jsx)(HM,{align:r,className:a,variant:l,value:s,selected:o})}))});function HL(e){return(0,V.Ay)("MuiDateTimePickerToolbar",e)}let HN=(0,F.A)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),HB=["hours","minutes","seconds"],Hz=e=>HB.includes(e),Hj=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,HF=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),HV=(e,t)=>(n,r)=>e?t.isAfter(n,r):HF(n,t)>HF(r,t);function H$(e,t,n,r){let i=$H().utils;return{meridiemMode:e?i.getHours(e)>=12?"pm":"am":null,handleMeridiemChange:I.useCallback(o=>{var a;let s;n(null==e?null:(a=!!t,s=Hj(i.getHours(e),o,a),i.setHours(e,s)),r??"partial")},[t,e,n,r,i])}}let HH=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],HW=(0,N.A)(HO,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${HT.content} .${HS.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),HG=(0,N.A)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),HU=(0,N.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&"desktop"!==t&&n,style:{flexDirection:"column-reverse"}}]}),Hq=(0,N.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),HY=(0,N.A)(HM,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),HX=(0,N.A)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${HN.ampmLabel}`]:t.ampmLabel},{[`&.${HN.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${HN.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function HZ(e){let t=$N({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:o,view:a,isLandscape:s,onViewChange:l,toolbarFormat:u,toolbarPlaceholder:c="––",views:d,disabled:h,readOnly:p,toolbarVariant:f="mobile",toolbarTitle:g,className:m}=t,v=(0,en.A)(t,HH),y=(0,f3.I)(),x=(0,er.A)({},t,{isRtl:y}),b=$H().utils,{meridiemMode:w,handleMeridiemChange:S}=H$(i,n,o),A=!!(n&&!r),C="desktop"===f,M=$H().localeText,k=(e=>{let{classes:t,isLandscape:n,isRtl:r}=e;return(0,R.A)({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},HL,t)})(x),T=g??M.dateTimePickerToolbarTitle,D=I.useMemo(()=>i?u?b.formatByString(i,u):b.format(i,"shortDate"):c,[i,u,c,b]);return(0,_.jsxs)(HW,(0,er.A)({isLandscape:s,className:(0,O.A)(k.root,m),toolbarTitle:T},v,{ownerState:x,children:[(0,_.jsxs)(HG,{className:k.dateContainer,ownerState:x,children:[d.includes("year")&&(0,_.jsx)(HP,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:"year"===a,value:i?b.format(i,"year"):"–"}),d.includes("day")&&(0,_.jsx)(HP,{tabIndex:-1,variant:C?"h5":"h4",onClick:()=>l("day"),selected:"day"===a,value:D})]}),(0,_.jsxs)(HU,{className:k.timeContainer,ownerState:x,children:[(0,_.jsxs)(Hq,{className:k.timeDigitsContainer,ownerState:x,children:[d.includes("hours")&&(0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)(HP,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("hours"),selected:"hours"===a,value:i?n?b.format(i,"hours12h"):b.format(i,"hours24h"):"--"}),(0,_.jsx)(HY,{variant:C?"h5":"h3",value:":",className:k.separator,ownerState:x}),(0,_.jsx)(HP,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("minutes"),selected:"minutes"===a||!d.includes("minutes")&&"hours"===a,value:i?b.format(i,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&(0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)(HY,{variant:C?"h5":"h3",value:":",className:k.separator,ownerState:x}),(0,_.jsx)(HP,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("seconds"),selected:"seconds"===a,value:i?b.format(i,"seconds"):"--"})]})]}),A&&!C&&(0,_.jsxs)(HX,{className:k.ampmSelection,ownerState:x,children:[(0,_.jsx)(HP,{variant:"subtitle2",selected:"am"===w,typographyClassName:k.ampmLabel,value:$Z(b,"am"),onClick:p?void 0:()=>S("am"),disabled:h}),(0,_.jsx)(HP,{variant:"subtitle2",selected:"pm"===w,typographyClassName:k.ampmLabel,value:$Z(b,"pm"),onClick:p?void 0:()=>S("pm"),disabled:h})]}),n&&C&&(0,_.jsx)(HP,{variant:"h5",onClick:()=>l("meridiem"),selected:"meridiem"===a,value:i&&w?$Z(b,w):"--",width:48})]})]}))}function HK(e){return(0,V.Ay)("MuiPickersArrowSwitcher",e)}(0,F.A)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);let HQ=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],HJ=["ownerState"],H0=["ownerState"],H1=(0,N.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),H2=(0,N.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),H5=(0,N.A)(eY,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),H4=I.forwardRef(function(e,t){let n=(0,f3.I)(),r=$N({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:u,onGoToNext:c,nextLabel:d,isPreviousDisabled:h,isPreviousHidden:p,onGoToPrevious:f,previousLabel:g,labelId:m}=r,v=(0,en.A)(r,HQ),y=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},HK,t)})(r),x=a?.previousIconButton??H5,b=(0,m8.A)({elementType:x,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:g,"aria-label":g,disabled:h,edge:"end",onClick:f},ownerState:(0,er.A)({},r,{hidden:p}),className:(0,O.A)(y.button,y.previousIconButton)}),w=a?.nextIconButton??H5,S=(0,m8.A)({elementType:w,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:d,"aria-label":d,disabled:l,edge:"start",onClick:c},ownerState:(0,er.A)({},r,{hidden:u}),className:(0,O.A)(y.button,y.nextIconButton)}),A=a?.leftArrowIcon??Hp,C=(0,m8.A)({elementType:A,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:y.leftArrowIcon}),M=(0,en.A)(C,HJ),k=a?.rightArrowIcon??Hf,T=(0,m8.A)({elementType:k,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:y.rightArrowIcon}),I=(0,en.A)(T,H0);return(0,_.jsxs)(H1,(0,er.A)({ref:t,className:(0,O.A)(y.root,o),ownerState:r},v,{children:[(0,_.jsx)(x,(0,er.A)({},b,{children:n?(0,_.jsx)(k,(0,er.A)({},I)):(0,_.jsx)(A,(0,er.A)({},M))})),i?(0,_.jsx)(cp.A,{variant:"subtitle1",component:"span",id:m,children:i}):(0,_.jsx)(H2,{className:y.spacer,ownerState:r}),(0,_.jsx)(w,(0,er.A)({},S,{children:n?(0,_.jsx)(A,(0,er.A)({},M)):(0,_.jsx)(k,(0,er.A)({},I))}))]}))});function H3({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:a,onFocusedViewChange:s}){let l=I.useRef(n),u=I.useRef(i),c=I.useRef(i.includes(n)?n:i[0]),[d,h]=(0,yA.A)({name:"useViews",state:"view",controlled:r,default:c.current}),p=I.useRef(o?d:null),[f,g]=(0,yA.A)({name:"useViews",state:"focusedView",controlled:a,default:p.current});I.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),u.current=i,l.current=n)},[n,h,d,i]);let m=i.indexOf(d),v=i[m-1]??null,y=i[m+1]??null,x=(0,yC.A)((e,t)=>{t?g(e):g(t=>e===t?null:t),s?.(e,t)}),b=(0,yC.A)(e=>{x(e,!0),e!==d&&(h(e),t&&t(e))}),w=(0,yC.A)(()=>{y&&b(y)}),S=(0,yC.A)((t,n,r)=>{let o="finish"===n,a=r?i.indexOf(r)<i.length-1:!!y;if(e(t,o&&a?"partial":n,r),r&&r!==d){let e=i[i.indexOf(r)+1];e&&b(e)}else o&&w()});return{view:d,setView:b,focusedView:f,setFocusedView:x,nextView:y,previousView:v,defaultView:i.includes(n)?n:i[0],goToNextView:w,setValueAndGoToNextView:S}}let H6=(0,N.A)("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function H8(e){return(0,V.Ay)("MuiTimeClock",e)}function H9(e){return(0,V.Ay)("MuiClockPointer",e)}(0,F.A)("MuiTimeClock",["root","arrowSwitcher"]),(0,F.A)("MuiClockPointer",["root","thumb"]);let H7=["className","hasSelected","isInner","type","viewValue"],We=(0,N.A)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),Wt=(0,N.A)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function Wn(e){let t,n=$N({props:e,name:"MuiClockPointer"}),{className:r,isInner:i,type:o,viewValue:a}=n,s=(0,en.A)(n,H7),l=I.useRef(o);I.useEffect(()=>{l.current=o},[o]);let u=(0,er.A)({},n,{shouldAnimate:l.current!==o}),c=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],thumb:["thumb"]},H9,t)})(u);return(0,_.jsx)(We,(0,er.A)({style:(t=360/("hours"===o?12:60)*a,"hours"===o&&a>12&&(t-=360),{height:Math.round((i?.26:.4)*220),transform:`rotateZ(${t}deg)`}),className:(0,O.A)(c.root,r),ownerState:u},s,{children:(0,_.jsx)(Wt,{ownerState:u,className:c.thumb})}))}let Wr=110,Wi=110,Wo=Wr,Wa=0,Ws=Wo-Wr,Wl=Wa-Wi,Wu=(e,t,n)=>{let r=t-Wr,i=n-Wi,o=180/Math.PI*(Math.atan2(Ws,Wl)-Math.atan2(r,i));return{value:Math.floor((o=Math.round(o/e)*e%360)/e)||0,distance:Math.sqrt(r**2+i**2)}};function Wc(e){return(0,V.Ay)("MuiClock",e)}(0,F.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);let Wd=(0,N.A)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),Wh=(0,N.A)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Wp=(0,N.A)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Wf=(0,N.A)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Wg=(0,N.A)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),Wm=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Wv=(0,N.A)(eY,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>(0,er.A)({},Wm(e,"am"),{position:"absolute",left:8})),Wy=(0,N.A)(eY,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>(0,er.A)({},Wm(e,"pm"),{position:"absolute",right:8})),Wx=(0,N.A)(cp.A,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Wb(e){let t=$N({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:u,minutesStep:c=1,onChange:d,selectedId:h,type:p,viewValue:f,viewRange:[g,m],disabled:v=!1,readOnly:y,className:x}=t,b=$H().utils,w=$H().localeText,S=I.useRef(!1),A=(e=>{let{classes:t,meridiemMode:n}=e;return(0,R.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]},Wc,t)})(t),C=l(f,p),M=!n&&"hours"===p&&(f<1||f>12),k=(e,t)=>{v||y||l(e,p)||d(e,t)},T=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){let t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}k("seconds"===p||"minutes"===p?((e,t,n=1)=>{let{value:r}=Wu(6*n,e,t);return r*n%60})(r,i,c):((e,t,n)=>{let{value:r,distance:i}=Wu(30,e,t),o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(r,i,!!n),t)},D=e=>{S.current=!0,T(e,"shallow")},E=I.useMemo(()=>"hours"===p||f%5==0,[p,f]),P="minutes"===p?c:1,L=I.useRef(null);(0,mr.A)(()=>{i&&L.current.focus()},[i]);let N=e=>Math.max(g,Math.min(m,e)),B=e=>(e+(m+1))%(m+1);return(0,_.jsxs)(Wd,{className:(0,O.A)(A.root,x),children:[(0,_.jsxs)(Wh,{className:A.clock,children:[(0,_.jsx)(Wf,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{S.current&&(T(e,"finish"),S.current=!1),e.preventDefault()},onMouseUp:e=>{S.current&&(S.current=!1),T(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&T(e.nativeEvent,"shallow")},ownerState:{disabled:v},className:A.squareMask}),!C&&(0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)(Wg,{className:A.pin}),null!=a&&(0,_.jsx)(Wn,{type:p,viewValue:f,isInner:M,hasSelected:E})]}),(0,_.jsx)(Wp,{"aria-activedescendant":h,"aria-label":w.clockLabelText(p,a,b,null==a?null:b.format(a,"fullTime")),ref:L,role:"listbox",onKeyDown:e=>{if(!S.current)switch(e.key){case"Home":k(g,"partial"),e.preventDefault();break;case"End":k(m,"partial"),e.preventDefault();break;case"ArrowUp":k(B(f+P),"partial"),e.preventDefault();break;case"ArrowDown":k(B(f-P),"partial"),e.preventDefault();break;case"PageUp":k(N(f+5),"partial"),e.preventDefault();break;case"PageDown":k(N(f-5),"partial"),e.preventDefault();break;case"Enter":case" ":k(f,"finish"),e.preventDefault()}},tabIndex:0,className:A.wrapper,children:o})]}),n&&r&&(0,_.jsxs)(I.Fragment,{children:[(0,_.jsx)(Wv,{onClick:y?void 0:()=>s("am"),disabled:v||null===u,ownerState:t,className:A.amButton,title:$Z(b,"am"),children:(0,_.jsx)(Wx,{variant:"caption",className:A.meridiemText,children:$Z(b,"am")})}),(0,_.jsx)(Wy,{disabled:v||null===u,onClick:y?void 0:()=>s("pm"),ownerState:t,className:A.pmButton,title:$Z(b,"pm"),children:(0,_.jsx)(Wx,{variant:"caption",className:A.meridiemText,children:$Z(b,"pm")})})]})]})}function Ww(e){return(0,V.Ay)("MuiClockNumber",e)}let WS=(0,F.A)("MuiClockNumber",["root","selected","disabled"]),WA=["className","disabled","index","inner","label","selected"],WC=(0,N.A)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${WS.disabled}`]:t.disabled},{[`&.${WS.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${WS.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${WS.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,er.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function WM(e){let t=$N({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:a,selected:s}=t,l=(0,en.A)(t,WA),u=(e=>{let{classes:t,selected:n,disabled:r}=e;return(0,R.A)({root:["root",n&&"selected",r&&"disabled"]},Ww,t)})(t),c=i%12/12*Math.PI*2-Math.PI/2,d=91*(o?.65:1),h=Math.round(Math.cos(c)*d),p=Math.round(Math.sin(c)*d);return(0,_.jsx)(WC,(0,er.A)({className:(0,O.A)(u.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${h}px, ${p+92}px`},ownerState:t},l,{children:a}))}let Wk=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],a)=>{let s=e===t;return(0,_.jsx)(WM,{label:o,id:s?i:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(o)},e)})},WT=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:i,valueManager:o})=>{let a,s=$H().utils,l=I.useRef(n),u=t??l.current??o.emptyValue,c=I.useMemo(()=>o.getTimezone(s,u),[s,o,u]),d=(0,yC.A)(e=>null==c?e:o.setTimezone(s,c,e));return a=e||c||(r?s.getTimezone(r):"default"),{value:I.useMemo(()=>o.setTimezone(s,a,u),[o,s,a,u]),handleValueChange:(0,yC.A)((e,...t)=>{let n=d(e);i?.(n,...t)}),timezone:a}},W_=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:o,valueManager:a})=>{let[s,l]=(0,yA.A)({name:e,state:"value",controlled:n,default:r??a.emptyValue});return WT({timezone:t,value:s,defaultValue:void 0,referenceDate:i,onChange:(0,yC.A)((e,...t)=>{l(e),o?.(e,...t)}),valueManager:a})},WI={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},WD=(e,t,n)=>{if(t===WI.year)return e.startOfYear(n);if(t===WI.month)return e.startOfMonth(n);if(t===WI.day)return e.startOfDay(n);let r=n;return t<WI.minutes&&(r=e.setMinutes(r,0)),t<WI.seconds&&(r=e.setSeconds(r,0)),t<WI.milliseconds&&(r=e.setMilliseconds(r,0)),r},WO=(e,t)=>{let n=e.formatTokenMap[t];if(null==n)throw Error(`MUI X: The token "${t}" is not supported by the Date and Time Pickers.
144
- Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.`);return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},WR=(e,t)=>{let n=[],r=e.date(void 0,"default"),i=e.startOfWeek(r),o=e.endOfWeek(r),a=i;for(;e.isBefore(a,o);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},WE=(e,t,n,r)=>{switch(n){case"month":return $Y(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return WR(e,r);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},WP=["0","1","2","3","4","5","6","7","8","9"],WL=(e,t)=>{if("0"===t[0])return e;let n=[],r="";for(let i=0;i<e.length;i+=1){r+=e[i];let o=t.indexOf(r);o>-1&&(n.push(o.toString()),r="")}return n.join("")},WN=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),WB=(e,t)=>{let n=WL(e,t);return" "!==n&&!Number.isNaN(Number(n))},Wz=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},Wj=(e,t,n,r,i)=>{if("day"===i.type&&"digit-with-letter"===i.contentType){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let o=t.toString();return i.hasLeadingZerosInInput&&(o=Wz(o,i.maxLength)),WN(o,r)},WF=(e,t,n)=>{let r=e.value||e.placeholder,i="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(WL(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!i&&1===r.length&&(r=`${r}\u200e`),"input-rtl"===t&&(r=`\u2068${r}\u2069`),r},WV=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),W$=(e,t,n,r)=>{if("digit"!==t)return!1;let i=e.date(void 0,"default");switch(n){case"year":if("dayjs"===e.lib&&"YY"===r)return!0;return e.formatByString(e.setYear(i,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(i),r).length>1;case"day":return e.formatByString(e.startOfMonth(i),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),r).length>1;case"hours":return e.formatByString(e.setHours(i,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error("Invalid section type")}},WH=(e,t)=>{},WW={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},WG=(e,t,n,r,i)=>[...n].sort((e,t)=>WW[e.type]-WW[t.type]).reduce((n,r)=>!i||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=WR(e,t.format),i=e.formatByString(n,t.format),o=r.indexOf(i),a=r.indexOf(t.value);return e.addDays(n,a-o)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),i=e.getHours(r);if(t&&i>=12)return e.addHours(r,-12);if(!t&&i<12)return e.addHours(r,12);return r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),WU=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){let n=t.findIndex(t=>t.type===e);return -1===n?null:n}return e},Wq=["value","referenceDate"],WY={emptyValue:null,getTodayValue:$X,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,en.A)(e,Wq);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():WD(t,n,$X(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=WD(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=WD(t,n,e.maxDate));let a=HV(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=WD(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:$G(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=WD(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:$G(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!(e.isValid(t)||null==t||e.isValid(n))&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},WX={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let r=e.map(e=>{let r=WF(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`\u2066${r}\u2069`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},WZ=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],WK=(0,N.A)(H6,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),WQ=(0,N.A)(H4,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),WJ=["hours","minutes"],W0=I.forwardRef(function(e,t){let n=$H().utils,r=$N({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:a,slots:s,slotProps:l,value:u,defaultValue:c,referenceDate:d,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:p,minTime:f,disableFuture:g,disablePast:m,minutesStep:v=1,shouldDisableTime:y,showViewSwitcher:x,onChange:b,view:w,views:S=WJ,openTo:A,onViewChange:C,focusedView:M,onFocusedViewChange:k,className:T,disabled:D,readOnly:E,timezone:P}=r,L=(0,en.A)(r,WZ),{value:N,handleValueChange:B,timezone:z}=W_({name:"TimeClock",timezone:P,value:u,defaultValue:c,referenceDate:d,onChange:b,valueManager:WY}),j=(({value:e,referenceDate:t,utils:n,props:r,timezone:i})=>{let o=I.useMemo(()=>WY.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:WI.day,timezone:i,getTodayDate:()=>$X(n,i,"date")}),[]);return e??o})({value:N,referenceDate:d,utils:n,props:r,timezone:z}),F=$H().localeText,V=$W(z),{view:$,setView:H,previousView:W,nextView:G,setValueAndGoToNextView:U}=H3({view:w,views:S,openTo:A,onViewChange:C,onChange:B,focusedView:M,onFocusedViewChange:k}),{meridiemMode:q,handleMeridiemChange:Y}=H$(j,i,U),X=I.useCallback((e,t)=>{let r=HV(h,n),o="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(f&&r(f,t)||p&&r(e,p)||g&&r(e,V)||m&&r(V,o?t:e)),s=(e,r=1)=>{if(e%r!=0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(j,e),"hours");case"minutes":return!y(n.setMinutes(j,e),"minutes");case"seconds":return!y(n.setSeconds(j,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=Hj(e,q,i),r=n.setHours(j,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{let t=n.setMinutes(j,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,v)}case"seconds":{let t=n.setSeconds(j,e);return!a({start:t,end:t})||!s(e)}default:throw Error("not supported")}},[i,j,h,p,q,f,v,y,n,g,m,V,S]),Z=(0,vX.A)(),K=I.useMemo(()=>{switch($){case"hours":{let e,t=(e,t)=>{let r=Hj(e,q,i);U(n.setHours(j,r),t,"hours")},r=n.getHours(j);return e=i?r>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:r,children:(({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:o})=>{let a=t?o.getHours(t):null,s=[],l=+!!e,u=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=l;t<=u;t+=1){let a=t.toString();0===t&&(a="00");let l=!e&&(0===t||t>12);a=o.formatNumber(a);let u=c(t);s.push((0,_.jsx)(WM,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s})({value:N,utils:n,ampm:i,onChange:t,getClockNumberText:F.hoursClockNumberText,isDisabled:e=>D||X(e,"hours"),selectedId:Z}),viewRange:e}}case"minutes":{let e=n.getMinutes(j),t=(e,t)=>{U(n.setMinutes(j,e),t,"minutes")};return{viewValue:e,onChange:t,children:Wk({utils:n,value:e,onChange:t,getClockNumberText:F.minutesClockNumberText,isDisabled:e=>D||X(e,"minutes"),selectedId:Z}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(j),t=(e,t)=>{U(n.setSeconds(j,e),t,"seconds")};return{viewValue:e,onChange:t,children:Wk({utils:n,value:e,onChange:t,getClockNumberText:F.secondsClockNumberText,isDisabled:e=>D||X(e,"seconds"),selectedId:Z}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[$,n,N,i,F.hoursClockNumberText,F.minutesClockNumberText,F.secondsClockNumberText,q,U,j,X,Z,D]),Q=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},H8,t)})(r);return(0,_.jsxs)(WK,(0,er.A)({ref:t,className:(0,O.A)(Q.root,T),ownerState:r},L,{children:[(0,_.jsx)(Wb,(0,er.A)({autoFocus:a??!!M,ampmInClock:o&&S.includes("hours"),value:N,type:$,ampm:i,minutesStep:v,isTimeDisabled:X,meridiemMode:q,handleMeridiemChange:Y,selectedId:Z,disabled:D,readOnly:E},K)),x&&(0,_.jsx)(WQ,{className:Q.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>H(W),isPreviousDisabled:!W,previousLabel:F.openPreviousView,onGoToNext:()=>H(G),isNextDisabled:!G,nextLabel:F.openNextView,ownerState:r})]}))}),W1=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:A,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T})=>(0,_.jsx)(W0,{view:e,onViewChange:t,focusedView:n&&Hz(n)?n:null,onFocusedViewChange:r,views:i.filter(Hz),value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:A,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T}),W2=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;let{shouldDisableDate:i,shouldDisableMonth:o,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=$q(r.utils,e.minDate,r.defaultDates.minDate),d=$q(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(i&&i(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};W2.valueManager=WY;let W5=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a,timezone:s})=>{let l=$H();return I.useCallback(u=>null!==W2({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a}}),[l,e,t,n,r,i,o,a,s])},W4=e=>(0,V.Ay)("MuiPickersFadeTransitionGroup",e);(0,F.A)("MuiPickersFadeTransitionGroup",["root"]);let W3=(0,N.A)(eu,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function W6(e){let t=$N({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},W4,t)})(t),s=(0,cn.A)();return i?n:(0,_.jsx)(W3,{className:(0,O.A)(a.root,r),children:(0,_.jsx)(vK.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},o)})}function W8(e){return(0,V.Ay)("MuiPickersDay",e)}let W9=(0,F.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),W7=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Ge=({theme:e})=>(0,er.A)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${W9.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${W9.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${W9.disabled}:not(.${W9.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${W9.disabled}&.${W9.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${W9.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Gt=(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Gn=(0,N.A)(eS,{name:"MuiPickersDay",slot:"Root",overridesResolver:Gt})(Ge),Gr=(0,N.A)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Gt})(({theme:e})=>(0,er.A)({},Ge({theme:e}),{opacity:0,pointerEvents:"none"})),Gi=()=>{},Go=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:u,onClick:c,onDaySelect:d,onFocus:h=Gi,onBlur:p=Gi,onKeyDown:f=Gi,onMouseDown:g=Gi,onMouseEnter:m=Gi,outsideCurrentMonth:v,selected:y=!1,showDaysOutsideCurrentMonth:x=!1,children:b,today:w=!1}=n,S=(0,en.A)(n,W7),A=(0,er.A)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:y,showDaysOutsideCurrentMonth:x,today:w}),C=(e=>{let{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return(0,R.A)({root:["root",t&&!u&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},W8,l)})(A),M=$H().utils,k=I.useRef(null),T=(0,mn.A)(k,t);return((0,mr.A)(()=>{!r||a||u||v||k.current.focus()},[r,a,u,v]),v&&!x)?(0,_.jsx)(Gr,{className:(0,O.A)(C.root,C.hiddenDaySpacingFiller,i),ownerState:A,role:S.role}):(0,_.jsx)(Gn,(0,er.A)({className:(0,O.A)(C.root,i),ref:T,centerRipple:!0,disabled:a,tabIndex:y?0:-1,onKeyDown:e=>f(e,o),onFocus:e=>h(e,o),onBlur:e=>p(e,o),onMouseEnter:e=>m(e,o),onClick:e=>{a||d(o),v&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{g(e),v&&e.preventDefault()}},S,{ownerState:A,children:b||M.format(o,"dayOfMonth")}))}),Ga=I.memo(Go);function Gs(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Gl=n(64863),Gu=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Gs(e.className,t):e.setAttribute("class",Gs(e.className&&e.className.baseVal||"",t))})},Gc=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r&&n?n+"-":"",o=r?""+i+e:n[e],a=r?o+"-active":n[e+"Active"],s=r?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:a,doneClassName:s}},t}(0,ei.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,Gl.F)(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.split(" ").forEach(function(t){e.classList?e.classList.add(t):(e.classList?t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" "))||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&Gu(e,r),i&&Gu(e,i),o&&Gu(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,en.A)(e,["classNames"]));return D().createElement(bi.Ay,(0,er.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(D().Component);Gc.defaultProps={classNames:""},Gc.propTypes={};let Gd=e=>(0,V.Ay)("MuiPickersSlideTransition",e),Gh=(0,F.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Gp=["children","className","reduceAnimations","slideDirection","transKey","classes"],Gf=(0,N.A)(eu,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Gh["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Gh["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Gh.slideEnterActive}`]:t.slideEnterActive},{[`.${Gh.slideExit}`]:t.slideExit},{[`.${Gh["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Gh["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{let t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Gh["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Gh["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Gh.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Gh.slideExit}`]:{transform:"translate(0%)"},[`& .${Gh["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Gh["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),Gg=e=>(0,V.Ay)("MuiDayCalendar",e);(0,F.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let Gm=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Gv=["ownerState"],Gy=(0,N.A)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gx=(0,N.A)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Gb=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),Gw=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),GS=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,er.A)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),GA=(0,N.A)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),GC=(0,N.A)(function(e){let t=$N({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(0,en.A)(t,Gp),s=(e=>{let{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,R.A)(r,Gd,t)})(t),l=(0,cn.A)();if(i)return(0,_.jsx)("div",{className:(0,O.A)(s.root,r),children:n});let u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,_.jsx)(Gf,{className:(0,O.A)(s.root,r),childFactory:e=>I.cloneElement(e,{classNames:u}),role:"presentation",children:(0,_.jsx)(Gc,(0,er.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),o)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),GM=(0,N.A)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Gk=(0,N.A)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function GT(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:o,currentMonthNumber:a,isViewFocused:s}=e,l=(0,en.A)(e,Gm),{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:h,slots:p,slotProps:f,timezone:g}=t,m=$H().utils,v=$W(g),y=null!==r&&m.isSameDay(n,r),x=i.some(e=>m.isSameDay(e,n)),b=m.isSameDay(n,v),w=p?.day??Ga,S=(0,m8.A)({elementType:w,externalSlotProps:f?.day,additionalProps:(0,er.A)({disableHighlightToday:c,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:d,"data-timestamp":m.toJsDate(n).valueOf()},l),ownerState:(0,er.A)({},t,{day:n,selected:x})}),A=(0,en.A)(S,Gv),C=I.useMemo(()=>u||o(n),[u,o,n]),M=I.useMemo(()=>m.getMonth(n)!==a,[m,n,a]),k=I.useMemo(()=>{let e=m.startOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.startOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]),T=I.useMemo(()=>{let e=m.endOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.endOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]);return(0,_.jsx)(w,(0,er.A)({},A,{day:n,disabled:C,autoFocus:s&&y,today:b,outsideCurrentMonth:M,isFirstVisibleCell:k,isLastVisibleCell:T,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":b?"date":void 0}))}function G_(e){let t,n=$N({props:e,name:"MuiDayCalendar"}),r=$H().utils,{onFocusedDayChange:i,className:o,currentMonth:a,selectedDays:s,focusedDay:l,loading:u,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:d,readOnly:h,reduceAnimations:p,renderLoading:f=()=>(0,_.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:m,disablePast:v,disableFuture:y,minDate:x,maxDate:b,shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:A,dayOfWeekFormatter:C=e=>r.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:k,gridLabelId:T,displayWeekNumber:D,fixedWeekNumber:E,autoFocus:P,timezone:L}=n,N=$W(L),B=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Gg,t)})(n),z=(0,f3.I)(),j=W5({shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:A,minDate:x,maxDate:b,disablePast:v,disableFuture:y,timezone:L}),F=$H().localeText,[V,$]=(0,yA.A)({name:"DayCalendar",state:"hasFocus",controlled:M,default:P??!1}),[H,W]=I.useState(()=>l||N),G=(0,yC.A)(e=>{h||c(e)}),U=e=>{j(e)||(i(e),W(e),k?.(!0),$(!0))},q=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":U(r.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":U(r.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let n=r.addDays(t,z?1:-1),i=r.addMonths(t,z?1:-1);U($U({utils:r,date:n,minDate:z?n:r.startOfMonth(i),maxDate:z?r.endOfMonth(i):n,isDateDisabled:j,timezone:L})||n),e.preventDefault();break}case"ArrowRight":{let n=r.addDays(t,z?-1:1),i=r.addMonths(t,z?-1:1);U($U({utils:r,date:n,minDate:z?r.startOfMonth(i):n,maxDate:z?n:r.endOfMonth(i),isDateDisabled:j,timezone:L})||n),e.preventDefault();break}case"Home":U(r.startOfWeek(t)),e.preventDefault();break;case"End":U(r.endOfWeek(t)),e.preventDefault();break;case"PageUp":U(r.addMonths(t,1)),e.preventDefault();break;case"PageDown":U(r.addMonths(t,-1)),e.preventDefault()}}),Y=(0,yC.A)((e,t)=>U(t)),X=(0,yC.A)((e,t)=>{V&&r.isSameDay(H,t)&&k?.(!1)}),Z=r.getMonth(a),K=r.getYear(a),Q=I.useMemo(()=>s.filter(e=>!!e).map(e=>r.startOfDay(e)),[r,s]),J=`${K}-${Z}`,ee=I.useMemo(()=>I.createRef(),[J]),et=I.useMemo(()=>{let e=r.startOfMonth(a),t=r.endOfMonth(a);return j(H)||r.isAfterDay(H,t)||r.isBeforeDay(H,e)?$U({utils:r,date:H,minDate:e,maxDate:t,disablePast:v,disableFuture:y,isDateDisabled:j,timezone:L}):H},[a,y,v,H,j,r,L]),en=I.useMemo(()=>{let e=r.getWeekArray(a),t=r.addMonths(a,1);for(;E&&e.length<E;){let n=r.getWeekArray(t),i=r.isSameDay(e[e.length-1][0],n[0][0]);n.slice(+!!i).forEach(t=>{e.length<E&&e.push(t)}),t=r.addMonths(t,1)}return e},[a,E,r]);return(0,_.jsxs)(Gy,{role:"grid","aria-labelledby":T,className:B.root,children:[(0,_.jsxs)(Gx,{role:"row",className:B.header,children:[D&&(0,_.jsx)(Gw,{variant:"caption",role:"columnheader","aria-label":F.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:F.calendarWeekNumberHeaderText}),(t=r.startOfWeek(N),[0,1,2,3,4,5,6].map(e=>r.addDays(t,e))).map((e,t)=>(0,_.jsx)(Gb,{variant:"caption",role:"columnheader","aria-label":r.format(e,"weekday"),className:B.weekDayLabel,children:C(e)},t.toString()))]}),u?(0,_.jsx)(GA,{className:B.loadingContainer,children:f()}):(0,_.jsx)(GC,(0,er.A)({transKey:J,onExited:d,reduceAnimations:p,slideDirection:g,className:(0,O.A)(o,B.slideTransition)},m,{nodeRef:ee,children:(0,_.jsx)(GM,{ref:ee,role:"rowgroup",className:B.monthContainer,children:en.map((e,t)=>(0,_.jsxs)(Gk,{role:"row",className:B.weekContainer,"aria-rowindex":t+1,children:[D&&(0,_.jsx)(GS,{className:B.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(r.getWeekNumber(e[0])),children:F.calendarWeekNumberText(r.getWeekNumber(e[0]))}),e.map((e,t)=>(0,_.jsx)(GT,{parentProps:n,day:e,selectedDays:Q,focusableDay:et,onKeyDown:q,onFocus:Y,onBlur:X,onDaySelect:G,isDateDisabled:j,currentMonthNumber:Z,isViewFocused:V,"aria-colindex":t+1},e.toString()))]},`week-${e[0]}`))})}))]})}function GI(e){return(0,V.Ay)("MuiPickersMonth",e)}let GD=(0,F.A)("MuiPickersMonth",["root","monthButton","disabled","selected"]),GO=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],GR=(0,N.A)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),GE=(0,N.A)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${GD.disabled}`]:t.disabled},{[`&.${GD.selected}`]:t.selected}]})(({theme:e})=>(0,er.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GD.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GD.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),GP=I.memo(function(e){let t=$N({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,"aria-label":f,slots:g,slotProps:m}=t,v=(0,en.A)(t,GO),y=I.useRef(null),x=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,R.A)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},GI,r)})(t);(0,mr.A)(()=>{n&&y.current?.focus()},[n]);let b=g?.monthButton??GE,w=(0,m8.A)({elementType:b,externalSlotProps:m?.monthButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:y,type:"button",role:"radio","aria-current":p,"aria-checked":a,"aria-label":f,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:x.monthButton});return(0,_.jsx)(GR,(0,er.A)({className:(0,O.A)(x.root,r),ownerState:t},v,{children:(0,_.jsx)(b,(0,er.A)({},w))}))});function GL(e){return(0,V.Ay)("MuiMonthCalendar",e)}(0,F.A)("MuiMonthCalendar",["root"]);let GN=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],GB=(0,N.A)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),Gz=I.forwardRef(function(e,t){let n,r,i,o=(n=$H().utils,r=$H().defaultDates,i=$N({props:e,name:"MuiMonthCalendar"}),(0,er.A)({disableFuture:!1,disablePast:!1},i,{minDate:$q(n,i.minDate,r.minDate),maxDate:$q(n,i.maxDate,r.maxDate)})),{className:a,value:s,defaultValue:l,referenceDate:u,disabled:c,disableFuture:d,disablePast:h,maxDate:p,minDate:f,onChange:g,shouldDisableMonth:m,readOnly:v,autoFocus:y=!1,onMonthFocus:x,hasFocus:b,onFocusedViewChange:w,monthsPerRow:S=3,timezone:A,gridLabelId:C,slots:M,slotProps:k}=o,T=(0,en.A)(o,GN),{value:D,handleValueChange:E,timezone:P}=W_({name:"MonthCalendar",timezone:A,value:s,defaultValue:l,referenceDate:u,onChange:g,valueManager:WY}),L=$W(P),N=(0,f3.I)(),B=$H().utils,z=I.useMemo(()=>WY.getInitialReferenceValue({value:D,utils:B,props:o,timezone:P,referenceDate:u,granularity:WI.month}),[]),j=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},GL,t)})(o),F=I.useMemo(()=>B.getMonth(L),[B,L]),V=I.useMemo(()=>null!=D?B.getMonth(D):null,[D,B]),[$,H]=I.useState(()=>V||B.getMonth(z)),[W,G]=(0,yA.A)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:y??!1}),U=(0,yC.A)(e=>{G(e),w&&w(e)}),q=I.useCallback(e=>{let t=B.startOfMonth(h&&B.isAfter(L,f)?L:f),n=B.startOfMonth(d&&B.isBefore(L,p)?L:p),r=B.startOfMonth(e);return!!(B.isBefore(r,t)||B.isAfter(r,n))||!!m&&m(r)},[d,h,p,f,L,m,B]),Y=(0,yC.A)((e,t)=>{v||E(B.setMonth(D??z,t))}),X=(0,yC.A)(e=>{!q(B.setMonth(D??z,e))&&(H(e),U(!0),x&&x(e))});I.useEffect(()=>{H(e=>null!==V&&e!==V?V:e)},[V]);let Z=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":X((12+t-3)%12),e.preventDefault();break;case"ArrowDown":X((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":X((12+t+(N?1:-1))%12),e.preventDefault();break;case"ArrowRight":X((12+t+(N?-1:1))%12),e.preventDefault()}}),K=(0,yC.A)((e,t)=>{X(t)}),Q=(0,yC.A)((e,t)=>{$===t&&U(!1)});return(0,_.jsx)(GB,(0,er.A)({ref:t,className:(0,O.A)(j.root,a),ownerState:o,role:"radiogroup","aria-labelledby":C},T,{children:$Y(B,D??z).map(e=>{let t=B.getMonth(e),n=B.format(e,"monthShort"),r=B.format(e,"month"),i=c||q(e);return(0,_.jsx)(GP,{selected:t===V,value:t,onClick:Y,onKeyDown:Z,autoFocus:W&&t===$,disabled:i,tabIndex:t!==$||i?-1:0,onFocus:K,onBlur:Q,"aria-current":F===t?"date":void 0,"aria-label":r,monthsPerRow:S,slots:M,slotProps:k,children:n},n)})}))});function Gj(e){return(0,V.Ay)("MuiPickersYear",e)}let GF=(0,F.A)("MuiPickersYear",["root","yearButton","selected","disabled"]),GV=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],G$=(0,N.A)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),GH=(0,N.A)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${GF.disabled}`]:t.disabled},{[`&.${GF.selected}`]:t.selected}]})(({theme:e})=>(0,er.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GF.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GF.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),GW=I.memo(function(e){let t=$N({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,slots:f,slotProps:g}=t,m=(0,en.A)(t,GV),v=I.useRef(null),y=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,R.A)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Gj,r)})(t);(0,mr.A)(()=>{n&&v.current?.focus()},[n]);let x=f?.yearButton??GH,b=(0,m8.A)({elementType:x,externalSlotProps:g?.yearButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:v,type:"button",role:"radio","aria-current":p,"aria-checked":a,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:y.yearButton});return(0,_.jsx)(G$,(0,er.A)({className:(0,O.A)(y.root,r),ownerState:t},m,{children:(0,_.jsx)(x,(0,er.A)({},b))}))});function GG(e){return(0,V.Ay)("MuiYearCalendar",e)}(0,F.A)("MuiYearCalendar",["root"]);let GU=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Gq=(0,N.A)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),GY=I.forwardRef(function(e,t){let n,r,i,o=(n=$H().utils,r=$H().defaultDates,i=$N({props:e,name:"MuiYearCalendar"}),(0,er.A)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:$q(n,i.minDate,r.minDate),maxDate:$q(n,i.maxDate,r.maxDate)})),{autoFocus:a,className:s,value:l,defaultValue:u,referenceDate:c,disabled:d,disableFuture:h,disablePast:p,maxDate:f,minDate:g,onChange:m,readOnly:v,shouldDisableYear:y,onYearFocus:x,hasFocus:b,onFocusedViewChange:w,yearsOrder:S="asc",yearsPerRow:A,timezone:C,gridLabelId:M,slots:k,slotProps:T}=o,D=(0,en.A)(o,GU),{value:E,handleValueChange:P,timezone:L}=W_({name:"YearCalendar",timezone:C,value:l,defaultValue:u,referenceDate:c,onChange:m,valueManager:WY}),N=$W(L),B=(0,f3.I)(),z=$H().utils,j=I.useMemo(()=>WY.getInitialReferenceValue({value:E,utils:z,props:o,timezone:L,referenceDate:c,granularity:WI.year}),[]),F=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},GG,t)})(o),V=I.useMemo(()=>z.getYear(N),[z,N]),$=I.useMemo(()=>null!=E?z.getYear(E):null,[E,z]),[H,W]=I.useState(()=>$||z.getYear(j)),[G,U]=(0,yA.A)({name:"YearCalendar",state:"hasFocus",controlled:b,default:a??!1}),q=(0,yC.A)(e=>{U(e),w&&w(e)}),Y=I.useCallback(e=>!!(p&&z.isBeforeYear(e,N)||h&&z.isAfterYear(e,N)||g&&z.isBeforeYear(e,g)||f&&z.isAfterYear(e,f))||!!y&&y(z.startOfYear(e)),[h,p,f,g,N,y,z]),X=(0,yC.A)((e,t)=>{v||P(z.setYear(E??j,t))}),Z=(0,yC.A)(e=>{Y(z.setYear(E??j,e))||(W(e),q(!0),x?.(e))});I.useEffect(()=>{W(e=>null!==$&&e!==$?$:e)},[$]);let K="desc"!==S?+A:-1*A,Q=B&&"asc"===S||!B&&"desc"===S?-1:1,J=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":Z(t-K),e.preventDefault();break;case"ArrowDown":Z(t+K),e.preventDefault();break;case"ArrowLeft":Z(t-Q),e.preventDefault();break;case"ArrowRight":Z(t+Q),e.preventDefault()}}),ee=(0,yC.A)((e,t)=>{Z(t)}),et=(0,yC.A)((e,t)=>{H===t&&q(!1)}),ei=I.useRef(null),eo=(0,mn.A)(t,ei);I.useEffect(()=>{if(a||null===ei.current)return;let e=ei.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,r=ei.current.clientHeight,i=ei.current.scrollTop;t>r||n<i||(ei.current.scrollTop=n+t-r/2-t/2)},[a]);let ea=z.getYearRange([g,f]);return"desc"===S&&ea.reverse(),(0,_.jsx)(Gq,(0,er.A)({ref:eo,className:(0,O.A)(F.root,s),ownerState:o,role:"radiogroup","aria-labelledby":M},D,{children:ea.map(e=>{let t=z.getYear(e),n=d||Y(e);return(0,_.jsx)(GW,{selected:t===$,value:t,onClick:X,onKeyDown:J,autoFocus:G&&t===H,disabled:n,tabIndex:t!==H||n?-1:0,onFocus:ee,onBlur:et,"aria-current":V===t?"date":void 0,yearsPerRow:A,slots:k,slotProps:T,children:z.format(e,"year")},z.format(e,"year"))})}))}),GX=e=>(0,V.Ay)("MuiPickersCalendarHeader",e),GZ=(0,F.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),GK=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],GQ=["ownerState"],GJ=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),G0=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,er.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),G1=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),G2=(0,N.A)(eY,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${GZ.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),G5=(0,N.A)(Hh,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),G4=I.forwardRef(function(e,t){let n=$H().localeText,r=$H().utils,i=$N({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:a,currentMonth:s,disabled:l,disableFuture:u,disablePast:c,maxDate:d,minDate:h,onMonthChange:p,onViewChange:f,view:g,reduceAnimations:m,views:v,labelId:y,className:x,timezone:b,format:w=`${r.formats.month} ${r.formats.year}`}=i,S=(0,en.A)(i,GK),A=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},GX,t)})(i),C=o?.switchViewButton??G2,M=(0,m8.A)({elementType:C,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(g)},ownerState:i,className:A.switchViewButton}),k=o?.switchViewIcon??G5,T=(0,m8.A)({elementType:k,externalSlotProps:a?.switchViewIcon,ownerState:i,className:A.switchViewIcon}),D=(0,en.A)(T,GQ),E=function(e,{disableFuture:t,maxDate:n,timezone:r}){let i=$H().utils;return I.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isBefore(o,n)?o:n);return!i.isAfter(a,e)},[t,n,e,i,r])}(s,{disableFuture:u,maxDate:d,timezone:b}),P=function(e,{disablePast:t,minDate:n,timezone:r}){let i=$H().utils;return I.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isAfter(o,n)?o:n);return!i.isBefore(a,e)},[t,n,e,i,r])}(s,{disablePast:c,minDate:h,timezone:b});if(1===v.length&&"year"===v[0])return null;let L=r.formatByString(s,w);return(0,_.jsxs)(GJ,(0,er.A)({},S,{ownerState:i,className:(0,O.A)(A.root,x),ref:t,children:[(0,_.jsxs)(G0,{role:"presentation",onClick:()=>{if(1!==v.length&&f&&!l)if(2===v.length)f(v.find(e=>e!==g)||v[0]);else{let e=+(0===v.indexOf(g));f(v[e])}},ownerState:i,"aria-live":"polite",className:A.labelContainer,children:[(0,_.jsx)(W6,{reduceAnimations:m,transKey:L,children:(0,_.jsx)(G1,{id:y,ownerState:i,className:A.label,children:L})}),v.length>1&&!l&&(0,_.jsx)(C,(0,er.A)({},M,{children:(0,_.jsx)(k,(0,er.A)({},D))}))]}),(0,_.jsx)(vK.A,{in:"day"===g,appear:!m,enter:!m,children:(0,_.jsx)(H4,{slots:o,slotProps:a,onGoToPrevious:()=>p(r.addMonths(s,-1),"right"),isPreviousDisabled:P,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(s,1),"left"),isNextDisabled:E,nextLabel:n.nextMonth})})]}))}),G3="u">typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),G6=G3&&G3[1]?parseInt(G3[1],10):null,G8=G3&&G3[2]?parseInt(G3[2],10):null,G9=G6&&G6<10||G8&&G8<13||!1,G7=e=>(0,V.Ay)("MuiDateCalendar",e);(0,F.A)("MuiDateCalendar",["root","viewTransitionContainer"]);let Ue=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Ut=(0,N.A)(H6,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Un=(0,N.A)(W6,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ur=I.forwardRef(function(e,t){let n,r,i,o,a=$H().utils,s=(0,vX.A)(),l=(n=$H().utils,r=$H().defaultDates,i=br("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||G9,o=$N({props:e,name:"MuiDateCalendar"}),(0,er.A)({},o,{loading:o.loading??!1,disablePast:o.disablePast??!1,disableFuture:o.disableFuture??!1,openTo:o.openTo??"day",views:o.views??["year","day"],reduceAnimations:o.reduceAnimations??i,renderLoading:o.renderLoading??(()=>(0,_.jsx)("span",{children:"..."})),minDate:$q(n,o.minDate,r.minDate),maxDate:$q(n,o.maxDate,r.maxDate)})),{autoFocus:u,onViewChange:c,value:d,defaultValue:h,referenceDate:p,disableFuture:f,disablePast:g,onChange:m,onYearChange:v,onMonthChange:y,reduceAnimations:x,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,view:A,views:C,openTo:M,className:k,disabled:T,readOnly:D,minDate:E,maxDate:P,disableHighlightToday:L,focusedView:N,onFocusedViewChange:B,showDaysOutsideCurrentMonth:z,fixedWeekNumber:j,dayOfWeekFormatter:F,slots:V,slotProps:$,loading:H,renderLoading:W,displayWeekNumber:G,yearsOrder:U,yearsPerRow:q,monthsPerRow:Y,timezone:X}=l,Z=(0,en.A)(l,Ue),{value:K,handleValueChange:Q,timezone:J}=W_({name:"DateCalendar",timezone:X,value:d,defaultValue:h,referenceDate:p,onChange:m,valueManager:WY}),{view:ee,setView:et,focusedView:ei,setFocusedView:eo,goToNextView:ea,setValueAndGoToNextView:es}=H3({view:A,views:C,openTo:M,onChange:Q,onViewChange:c,autoFocus:u,focusedView:N,onFocusedViewChange:B}),{referenceDate:el,calendarState:eu,changeFocusedDay:ec,changeMonth:ed,handleChangeMonth:eh,isDateDisabled:ep,onMonthSwitchingAnimationEnd:ef}=(e=>{let t,{value:n,referenceDate:r,disableFuture:i,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:l,onMonthChange:u,reduceAnimations:c,shouldDisableDate:d,timezone:h}=e,p=$H().utils,f=I.useRef((t=!!c,(e,n)=>{switch(n.type){case"changeMonth":return(0,er.A)({},e,{slideDirection:n.direction,currentMonth:n.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{let t=n.newTimezone;if(p.getTimezone(e.currentMonth)===t)return e;let r=p.setTimezone(e.currentMonth,t);return p.getMonth(r)!==p.getMonth(e.currentMonth)&&(r=p.setMonth(r,p.getMonth(e.currentMonth))),(0,er.A)({},e,{currentMonth:r})}case"finishMonthSwitchingAnimation":return(0,er.A)({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=e.focusedDay&&null!=n.focusedDay&&p.isSameDay(n.focusedDay,e.focusedDay))return e;let r=null!=n.focusedDay&&!a&&!p.isSameMonth(e.currentMonth,n.focusedDay);return(0,er.A)({},e,{focusedDay:n.focusedDay,isMonthSwitchingAnimating:r&&!t&&!n.withoutMonthSwitchingAnimation,currentMonth:r?p.startOfMonth(n.focusedDay):e.currentMonth,slideDirection:null!=n.focusedDay&&p.isAfterDay(n.focusedDay,e.currentMonth)?"left":"right"})}default:throw Error("missing support")}})).current,g=I.useMemo(()=>WY.getInitialReferenceValue({value:n,utils:p,timezone:h,props:e,referenceDate:r,granularity:WI.day}),[r,h]),[m,v]=I.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:p.startOfMonth(g),slideDirection:"left"});I.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(g)})},[g,p]);let y=I.useCallback(e=>{v((0,er.A)({type:"changeMonth"},e)),u&&u(e.newMonth)},[u]),x=I.useCallback(e=>{p.isSameMonth(e,m.currentMonth)||y({newMonth:p.startOfMonth(e),direction:p.isAfterDay(e,m.currentMonth)?"left":"right"})},[m.currentMonth,y,p]),b=W5({shouldDisableDate:d,minDate:l,maxDate:s,disableFuture:i,disablePast:o,timezone:h}),w=I.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:m,changeMonth:x,changeFocusedDay:(0,yC.A)((e,t)=>{b(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:b,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}})({value:K,referenceDate:p,reduceAnimations:x,onMonthChange:y,minDate:E,maxDate:P,shouldDisableDate:b,disablePast:g,disableFuture:f,timezone:J}),eg=T&&K||E,em=T&&K||P,ev=`${s}-grid-label`,ey=null!==ei,ex=V?.calendarHeader??G4,eb=(0,m8.A)({elementType:ex,externalSlotProps:$?.calendarHeader,additionalProps:{views:C,view:ee,currentMonth:eu.currentMonth,onViewChange:et,onMonthChange:(e,t)=>eh({newMonth:e,direction:t}),minDate:eg,maxDate:em,disabled:T,disablePast:g,disableFuture:f,reduceAnimations:x,timezone:J,labelId:ev},ownerState:l}),ew=(0,yC.A)(e=>{let t=a.startOfMonth(e),n=a.endOfMonth(e),r=ep(e)?$U({utils:a,date:e,minDate:a.isBefore(E,t)?t:E,maxDate:a.isAfter(P,n)?n:P,disablePast:g,disableFuture:f,isDateDisabled:ep,timezone:J}):e;r?(es(r,"finish"),y?.(t)):(ea(),ed(t)),ec(r,!0)}),eS=(0,yC.A)(e=>{let t=a.startOfYear(e),n=a.endOfYear(e),r=ep(e)?$U({utils:a,date:e,minDate:a.isBefore(E,t)?t:E,maxDate:a.isAfter(P,n)?n:P,disablePast:g,disableFuture:f,isDateDisabled:ep,timezone:J}):e;r?(es(r,"finish"),v?.(r)):(ea(),ed(t)),ec(r,!0)}),eA=(0,yC.A)(e=>e?Q($G(a,e,K??el),"finish",ee):Q(e,"finish",ee));I.useEffect(()=>{null!=K&&a.isValid(K)&&ed(K)},[K]);let eC=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},G7,t)})(l),eM={disablePast:g,disableFuture:f,maxDate:P,minDate:E},ek={disableHighlightToday:L,readOnly:D,disabled:T,timezone:J,gridLabelId:ev,slots:V,slotProps:$},eT=I.useRef(ee);I.useEffect(()=>{eT.current!==ee&&(ei===eT.current&&eo(ee,!0),eT.current=ee)},[ei,eo,ee]);let e_=I.useMemo(()=>[K],[K]);return(0,_.jsxs)(Ut,(0,er.A)({ref:t,className:(0,O.A)(eC.root,k),ownerState:l},Z,{children:[(0,_.jsx)(ex,(0,er.A)({},eb,{slots:V,slotProps:$})),(0,_.jsx)(Un,{reduceAnimations:x,className:eC.viewTransitionContainer,transKey:ee,ownerState:l,children:(0,_.jsxs)("div",{children:["year"===ee&&(0,_.jsx)(GY,(0,er.A)({},eM,ek,{value:K,onChange:eS,shouldDisableYear:S,hasFocus:ey,onFocusedViewChange:e=>eo("year",e),yearsOrder:U,yearsPerRow:q,referenceDate:el})),"month"===ee&&(0,_.jsx)(Gz,(0,er.A)({},eM,ek,{hasFocus:ey,className:k,value:K,onChange:ew,shouldDisableMonth:w,onFocusedViewChange:e=>eo("month",e),monthsPerRow:Y,referenceDate:el})),"day"===ee&&(0,_.jsx)(G_,(0,er.A)({},eu,eM,ek,{onMonthSwitchingAnimationEnd:ef,onFocusedDayChange:ec,reduceAnimations:x,selectedDays:e_,onSelectedDaysChange:eA,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,hasFocus:ey,onFocusedViewChange:e=>eo("day",e),showDaysOutsideCurrentMonth:z,fixedWeekNumber:j,dayOfWeekFormatter:F,displayWeekNumber:G,loading:H,renderLoading:W}))]})})]}))}),Ui=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:A,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:I,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:z})=>(0,_.jsx)(Ur,{view:e,onViewChange:t,views:n.filter($Q),focusedView:r&&$Q(r)?r:null,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:A,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:I,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:z});function Uo(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,a=$H(),s=I.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:i,props:t}),u=n.valueManager.hasError(l);return I.useEffect(()=>{o&&!n.valueManager.isSameError(l,s.current)&&o(l,r),s.current=l},[n,o,l,r]),{validationError:l,hasValidationError:u,getValidationErrorForNewValue:(0,yC.A)(e=>n({adapter:a,value:e,timezone:i,props:t}))}}let Ua=["className","sx"],Us=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Us(t.shadowRoot):t:null};function Ul(){return"u"<typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function Uu(e){return(0,V.Ay)("MuiPickersLayout",e)}let Uc=(0,F.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Ud=["onAccept","onClear","onCancel","onSetToday","actions"];function Uh(e){let{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,en.A)(e,Ud),s=$H().localeText;if(null==o||0===o.length)return null;let l=o?.map(e=>{switch(e){case"clear":return(0,_.jsx)(eV,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return(0,_.jsx)(eV,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return(0,_.jsx)(eV,{onClick:t,children:s.okButtonLabel},e);case"today":return(0,_.jsx)(eV,{onClick:i,children:s.todayButtonLabel},e);default:return null}});return(0,_.jsx)(v7,(0,er.A)({},a,{children:l}))}var Up=n(76477),Uf=n(79223),Ug=n(6835);function Um(e){return(0,V.Ay)("MuiListItem",e)}function Uv(e){return(0,V.Ay)("MuiListItemSecondaryAction",e)}(0,F.A)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,F.A)("MuiListItemSecondaryAction",["root","disableGutters"]);let Uy=(0,N.A)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Ux=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...i}=n,o=I.useContext(cs.A),a={...n,disableGutters:o.disableGutters},s=(e=>{let{disableGutters:t,classes:n}=e;return(0,R.A)({root:["root",t&&"disableGutters"]},Uv,n)})(a);return(0,_.jsx)(Uy,{className:(0,O.A)(s.root,r),ownerState:a,ref:t,...i})});Ux.muiName="ListItemSecondaryAction";let Ub=(0,N.A)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,B.A)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${cu.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),Uw=(0,N.A)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),US=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",children:i,className:o,component:a,components:s={},componentsProps:l={},ContainerComponent:u="li",ContainerProps:{className:c,...d}={},dense:h=!1,disableGutters:p=!1,disablePadding:f=!1,divider:g=!1,secondaryAction:m,slotProps:v={},slots:y={},...x}=n,b=I.useContext(cs.A),w=I.useMemo(()=>({dense:h||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,h,p]),S=I.useRef(null),A=I.Children.toArray(i),C=A.length&&(0,Ug.A)(A[A.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:r,dense:w.dense,disableGutters:p,disablePadding:f,divider:g,hasSecondaryAction:C},k=(e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:a,hasSecondaryAction:s}=e;return(0,R.A)({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Um,n)})(M),T=(0,Q.A)(S,t),D=y.root||s.Root||Ub,E=v.root||l.root||{},P={className:(0,O.A)(k.root,E.className,o),...x},L=a||"li";return C?(L=P.component||a?L:"div","li"===u&&("li"===L?L="div":"li"===P.component&&(P.component="div")),(0,_.jsx)(cs.A.Provider,{value:w,children:(0,_.jsxs)(Uw,{as:u,className:(0,O.A)(k.container,c),ref:T,ownerState:M,...d,children:[(0,_.jsx)(D,{...E,...!(0,Uf.A)(D)&&{as:L,ownerState:{...M,...E.ownerState}},...P,children:A}),A.pop()]})})):(0,_.jsx)(cs.A.Provider,{value:w,children:(0,_.jsxs)(D,{...E,as:L,ref:T,...!(0,Uf.A)(D)&&{ownerState:{...M,...E.ownerState}},...P,children:[A,m&&(0,_.jsx)(Ux,{children:m})]})})}),UA=["items","changeImportance","isLandscape","onChange","isValid"],UC=["getValue"];function UM(e){let{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,o=(0,en.A)(e,UA);if(null==t||0===t.length)return null;let a=t.map(e=>{let{getValue:t}=e,o=(0,en.A)(e,UC),a=t({isValid:i});return(0,er.A)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})});return(0,_.jsx)(Up.A,(0,er.A)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(e=>(0,_.jsx)(US,{children:(0,_.jsx)(y$,(0,er.A)({},e))},e.id??e.label))}))}let Uk=(0,N.A)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Uc.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Uc.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Uc.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Uc.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Uc.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Uc.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Uc.shortcuts}`]:{gridColumn:3}}}]}),UT=(0,N.A)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),U_=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:o,actionBar:a,shortcuts:s}=(e=>{let{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:o,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:d,isValid:h,isLandscape:p,disabled:f,readOnly:g,children:m,slots:v,slotProps:y}=e,x=(e=>{let{classes:t,isLandscape:n}=e;return(0,R.A)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Uu,t)})(e),b=v?.actionBar??Uh,w=(0,m8.A)({elementType:b,externalSlotProps:y?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,er.A)({},e,{wrapperVariant:t})}),S=(0,_.jsx)(b,(0,er.A)({},w)),A=v?.toolbar,C=(0,m8.A)({elementType:A,externalSlotProps:y?.toolbar,additionalProps:{isLandscape:p,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:f,readOnly:g},className:x.toolbar,ownerState:(0,er.A)({},e,{wrapperVariant:t})}),M=null!==C.view&&A?(0,_.jsx)(A,(0,er.A)({},C)):null,k=v?.tabs,T=a&&k?(0,_.jsx)(k,(0,er.A)({view:a,onViewChange:l,className:x.tabs},y?.tabs)):null,I=v?.shortcuts??UM,D=(0,m8.A)({elementType:I,externalSlotProps:y?.shortcuts,additionalProps:{isValid:h,isLandscape:p,onChange:d},className:x.shortcuts,ownerState:{isValid:h,isLandscape:p,onChange:d,wrapperVariant:t}});return{toolbar:M,content:m,tabs:T,actionBar:S,shortcuts:a&&I?(0,_.jsx)(I,(0,er.A)({},D)):null}})(n),{sx:l,className:u,isLandscape:c,wrapperVariant:d}=n,h=(e=>{let{isLandscape:t,classes:n}=e;return(0,R.A)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},Uu,n)})(n);return(0,_.jsxs)(Uk,{ref:t,sx:l,className:(0,O.A)(h.root,u),ownerState:n,children:[c?s:r,c?r:s,(0,_.jsx)(UT,{className:h.contentWrapper,children:"desktop"===d?(0,_.jsxs)(I.Fragment,{children:[i,o]}):(0,_.jsxs)(I.Fragment,{children:[o,i]})}),a]})}),UI=["props","ref"],UD=(0,N.A)(U_)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),UO=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;let{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,d=e.utils.date(void 0,n),h=HV(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(i&&h(i,t)):return"minTime";case!!(o&&h(t,o)):return"maxTime";case!!(c&&e.utils.isAfter(t,d)):return"disableFuture";case!!(u&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};UO.valueManager=WY;let UR=({adapter:e,value:t,timezone:n,props:r})=>{let i=W2({adapter:e,value:t,timezone:n,props:r});return null!==i?i:UO({adapter:e,value:t,timezone:n,props:r})};UR.valueManager=WY;let UE=I.forwardRef(function(e,t){let n,r,i,o,a,s=(n=$H().utils,r=$H().defaultDates,o=(i=$N({props:e,name:"MuiStaticDateTimePicker"})).ampm??n.is12HourCycleInCurrentLocale(),a=I.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:(0,er.A)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]),(0,er.A)({},i,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i,o=n??r;if(null!=e)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}})({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:a,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:$q(n,i.minDateTime??i.minDate,r.minDate),maxDate:$q(n,i.maxDateTime??i.maxDate,r.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,er.A)({toolbar:HZ,tabs:Hb},i.slots),slotProps:(0,er.A)({},i.slotProps,{toolbar:(0,er.A)({ampm:o},i.slotProps?.toolbar)})})),l=s.displayStaticWrapperAs??"mobile",u=s.ampmInClock??"desktop"===l,c=(0,er.A)({day:Ui,month:Ui,year:Ui,hours:W1,minutes:W1,seconds:W1},s.viewRenderers),{renderPicker:d}=(e=>{let{props:t,ref:n}=e,r=(0,en.A)(e,UI),{localeText:i,slots:o,slotProps:a,className:s,sx:l,displayStaticWrapperAs:u,autoFocus:c}=t,{layoutProps:d,renderCurrentView:h}=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:i,validator:o,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{let u=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i})=>{let{onAccept:o,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===r,timezone:c,referenceDate:d}=e,{current:h}=I.useRef(l),{current:p}=I.useRef(void 0!==s),[f,g]=I.useState(c),m=$H().utils,v=$H(),{isOpen:y,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{let r=I.useRef("boolean"==typeof e).current,[i,o]=I.useState(!1);return I.useEffect(()=>{if(r){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[r,e]),{isOpen:i,setIsOpen:I.useCallback(e=>{r||o(e),e&&t&&t(),!e&&n&&n()},[r,t,n])}})(e),{timezone:b,value:w,handleValueChange:S}=WT({timezone:c,value:s,defaultValue:h,referenceDate:d,onChange:a,valueManager:t}),[A,C]=I.useState(()=>{let e;return{draft:e=void 0!==w?w:void 0!==h?h:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(m,A.draft);f!==c&&(g(c),c&&M&&c!==M&&C(e=>(0,er.A)({},e,{draft:t.setTimezone(m,c,e.draft)})));let{getValidationErrorForNewValue:k}=Uo({props:e,validator:i,timezone:b,value:A.draft,onError:e.onError}),T=(0,yC.A)(e=>{let n={action:e,dateState:A,hasChanged:n=>!t.areValuesEqual(m,e.value,n),isControlled:p,closeOnSelect:u},r=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i}=e,o=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(r.lastPublishedValue)))})(n),i=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i,closeOnSelect:o}=e,a=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(a&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),a=(e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);C(t=>(0,er.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let s=null,l=()=>(s||(s={validationError:"setValueFromField"===e.name?e.context.validationError:k(e.value)},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)),s);r&&S(e.value,l()),i&&o&&o(e.value,l()),a&&x(!1)});if(A.lastControlledValue!==s){let e=t.areValuesEqual(m,A.draft,w);C(t=>(0,er.A)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:w,lastPublishedValue:w,draft:w,hasBeenModifiedSinceMount:!0}))}let _=(0,yC.A)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),D=(0,yC.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),O=(0,yC.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=(0,yC.A)(()=>{T({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),E=(0,yC.A)(()=>{T({value:t.getTodayValue(m,b,n),name:"setValueFromAction",pickerAction:"today"})}),P=(0,yC.A)(e=>{e.preventDefault(),x(!0)}),L=(0,yC.A)(e=>{e?.preventDefault(),x(!1)}),N=(0,yC.A)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),B=(0,yC.A)((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),z=(0,yC.A)((e,t)=>T({name:"setValueFromField",value:e,context:t})),j={onClear:_,onAccept:D,onDismiss:O,onCancel:R,onSetToday:E,onOpen:P,onClose:L},F={value:A.draft,onChange:z},V=I.useMemo(()=>t.cleanValue(m,A.draft),[m,t,A.draft]),$=(0,er.A)({},j,{value:V,onChange:N,onSelectShortcut:B,isValid:n=>{let r=i({adapter:v,value:n,timezone:b,props:e});return!t.hasError(r)}}),H=I.useMemo(()=>({onOpen:P,onClose:L,open:y}),[y,L,P]);return{open:y,fieldProps:F,viewProps:{value:V,onChange:N,onClose:L,open:y},layoutProps:$,actions:j,contextValue:H}})({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:i,fieldRef:o})=>{let{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:d,onViewChange:h,viewRenderers:p,timezone:f}=e,g=(0,en.A)(e,Ua),{view:m,setView:v,defaultView:y,focusedView:x,setFocusedView:b,setValueAndGoToNextView:w}=H3({view:u,views:c,openTo:d,onChange:a,onViewChange:h,autoFocus:r}),{hasUIView:S,viewModeLookup:A}=I.useMemo(()=>c.reduce((e,t)=>{let n;return n=null!=p[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[p,c]),C=I.useMemo(()=>c.reduce((e,t)=>null!=p[t]&&Hz(t)?e+1:e,0),[p,c]),M=A[m],k=(0,yC.A)(()=>"UI"===M),[T,_]=I.useState("UI"===M?m:null);return T!==m&&"UI"===A[m]&&_(m),(0,mr.A)(()=>{"field"===M&&s&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(m),o?.current?.focusField(m)}))},[m]),(0,mr.A)(()=>{if(!s)return;let e=m;"field"===M&&null!=T&&(e=T),e!==y&&"UI"===A[e]&&"UI"===A[y]&&(e=y),e!==m&&v(e),b(e,!0)},[s]),{hasUIView:S,shouldRestoreFocus:k,layoutProps:{views:c,view:T,onViewChange:v},renderCurrentView:()=>{if(null==T)return null;let e=p[T];if(null==e)return null;let r=(0,er.A)({},g,n,t,{views:c,timezone:f,onChange:w,view:T,onViewChange:v,focusedView:x,onFocusedViewChange:b,showViewSwitcher:C>1,timeViewsCount:C});return i?i(p,T,r):e(r)}}})({props:e,additionalViewProps:i,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),d=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{let{orientation:i}=e,o=((e,t)=>{var n;let[r,i]=I.useState(Ul);return(0,mr.A)(()=>{let e=()=>{i(Ul())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),(Array.isArray(n=["hours","minutes","seconds"])?!n.every(t=>-1!==e.indexOf(t)):-1===e.indexOf(n))&&"landscape"===(t||r)})(n.views,i),a=(0,f3.I)();return{layoutProps:(0,er.A)({},n,t,{isLandscape:o,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),h=function(e){let{props:t,pickerValueResponse:n}=e;return I.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:u.contextValue,ownerState:h}})((0,er.A)({},r,{props:t,autoFocusView:c??!1,additionalViewProps:{},wrapperVariant:u})),p=o?.layout??UD;return{renderPicker:()=>(0,_.jsx)($j,{localeText:i,children:(0,_.jsx)(p,(0,er.A)({},d,a?.layout,{slots:o,slotProps:a,sx:[...Array.isArray(l)?l:[l],...Array.isArray(a?.layout?.sx)?a.layout.sx:[a?.layout?.sx]],className:(0,O.A)(s,a?.layout?.className),ref:n,children:h()}))})}})({props:(0,er.A)({},s,{viewRenderers:c,displayStaticWrapperAs:l,ampmInClock:u,yearsPerRow:s.yearsPerRow??("mobile"===l?3:4),slotProps:(0,er.A)({},s.slotProps,{tabs:(0,er.A)({hidden:"desktop"===l},s.slotProps?.tabs),toolbar:(0,er.A)({hidden:"desktop"===l,ampmInClock:u},s.slotProps?.toolbar)})}),valueManager:WY,valueType:"date-time",validator:UR,ref:t});return d()});UE.propTypes={ampm:$V().bool,ampmInClock:$V().bool,autoFocus:$V().bool,className:$V().string,dayOfWeekFormatter:$V().func,defaultValue:$V().object,disabled:$V().bool,disableFuture:$V().bool,disableHighlightToday:$V().bool,disableIgnoringDatePartForTimeValidation:$V().bool,disablePast:$V().bool,displayStaticWrapperAs:$V().oneOf(["desktop","mobile"]),displayWeekNumber:$V().bool,fixedWeekNumber:$V().number,loading:$V().bool,localeText:$V().object,maxDate:$V().object,maxDateTime:$V().object,maxTime:$V().object,minDate:$V().object,minDateTime:$V().object,minTime:$V().object,minutesStep:$V().number,monthsPerRow:$V().oneOf([3,4]),onAccept:$V().func,onChange:$V().func,onClose:$V().func,onError:$V().func,onMonthChange:$V().func,onViewChange:$V().func,onYearChange:$V().func,openTo:$V().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:$V().oneOf(["landscape","portrait"]),readOnly:$V().bool,reduceAnimations:$V().bool,referenceDate:$V().object,renderLoading:$V().func,shouldDisableDate:$V().func,shouldDisableMonth:$V().func,shouldDisableTime:$V().func,shouldDisableYear:$V().func,showDaysOutsideCurrentMonth:$V().bool,slotProps:$V().object,slots:$V().object,sx:$V().oneOfType([$V().arrayOf($V().oneOfType([$V().func,$V().object,$V().bool])),$V().func,$V().object]),timezone:$V().string,value:$V().object,view:$V().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:$V().shape({day:$V().func,hours:$V().func,minutes:$V().func,month:$V().func,seconds:$V().func,year:$V().func}),views:$V().arrayOf($V().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:$V().oneOf(["asc","desc"]),yearsPerRow:$V().oneOf([3,4])};let UP=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:o,token:a,startSeparator:s})=>{if(""===a)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=WO(e,a),u=W$(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,d=null!=t&&e.isValid(t),h=d?e.formatByString(t,a):"",p=null;if(c)if(u)p=""===h?e.formatByString(o,a).length:h.length;else{if(null==l.maxLength)throw Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(h=WN(Wz(WL(h,i),p),i))}return(0,er.A)({},l,{format:a,maxLength:p,value:h,placeholder:((e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}})(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},UL=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),(n-=1)<0)throw Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=(({utils:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,o=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,"g"),a=null;for(;a=o.exec(t);)n.push({start:a.index,end:o.lastIndex-1});return n})((0,er.A)({},e,{expandedFormat:t})),r=(e=>{let{utils:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),o=[],a="",s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,u=RegExp(`^(${s.join("|")})*$`),c=RegExp(`^(${s.join("|")})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),h=0;for(;h<n.length;){let t=d(h),r=null!=t,s=l.exec(n.slice(h))?.[1];if(!r&&null!=s&&u.test(s)){let t=s;for(;t.length>0;){let n=c.exec(t)[1];t=t.slice(n.length),o.push(UP((0,er.A)({},e,{now:i,token:n,startSeparator:a}))),a=""}h+=s.length}else{let e=n[h];r&&t?.start===h||t?.end===h||(0===o.length?a+=e:o[o.length-1].endSeparator+=e),h+=1}}return 0===o.length&&a.length>0&&o.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),o})((0,er.A)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`\u2069${r}\u2066`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))((0,er.A)({},e,{sections:r}))},UN=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:i,onClick:o,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:d,applyCharacterEditing:h,resetCharacterQuery:p,setSelectedSections:f,parsedSelectedSections:g,state:m,clearActiveSection:v,clearValue:y,updateSectionValue:x,updateValueFromValueStr:b,sectionOrder:w,areAllSectionsEmpty:S,sectionsValueBoundaries:A}=e,C=I.useRef(null),M=(0,mn.A)(r,C),k=$H().localeText,T=$H().utils,_=(0,vX.A)(),[D,O]=I.useState(!1),R=I.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!C.current)return;let t=document.getSelection();if(!t)return;if(null==g){t.rangeCount>0&&C.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),D&&C.current.getRoot().blur();return}if(!C.current.getRoot().contains(Us(document)))return;let n=new window.Range;e="all"===g?C.current.getRoot():"empty"===m.sections[g].type?C.current.getSectionContainer(g):C.current.getSectionContent(g),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=Us(document);return e&&C.current&&C.current.getRoot().contains(e)?C.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!C.current||null!=R.getActiveSectionIndexFromDOM())return;let t=WU(e,m.sections);O(!0),C.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!C.current)return;let t=WU(e,m.sections);O(null!==("all"===t?0:t)),f(e)},isFieldFocused:()=>{let e=Us(document);return!!C.current&&C.current.getRoot().contains(e)}}),[g,f,m.sections,D]),E=(0,yC.A)(e=>{if(!C.current)return;let t=m.sections[e];C.current.getSectionContent(e).innerHTML=t.value||t.placeholder,R.syncSelectionToDOM()}),P=(0,yC.A)((e,...t)=>{!e.isDefaultPrevented()&&C.current&&(O(!0),o?.(e,...t),"all"===g?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void f(w.startIndex);let t=0,n=0;for(;n<e&&t<m.sections.length;){let e=m.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}f(t-1)}):D?C.current.getRoot().contains(e.target)||f(w.startIndex):(O(!0),f(w.startIndex)))}),L=(0,yC.A)(e=>{if(s?.(e),!C.current||"all"!==g)return;let t=e.target.textContent??"";C.current.getRoot().innerHTML=m.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),R.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(p(),y(),f("all")):t.length>1?b(t):("all"===g&&f(0),h({keyPressed:t,sectionIndex:0}))}),N=(0,yC.A)(e=>{if(l?.(e),n||"all"!==g)return void e.preventDefault();let t=e.clipboardData.getData("text");e.preventDefault(),p(),b(t)}),B=(0,yC.A)((...e)=>{a?.(...e),D||!C.current||(O(!0),null==C.current.getSectionIndexFromDOMElement(Us(document))&&f(w.startIndex))}),z=(0,yC.A)((...e)=>{i?.(...e),setTimeout(()=>{if(!C.current)return;let e=Us(document);C.current.getRoot().contains(e)||(O(!1),f(null))})}),j=(0,yC.A)(e=>t=>{t.isDefaultPrevented()||f(e)}),F=(0,yC.A)(e=>{e.preventDefault()}),V=(0,yC.A)(e=>()=>{f(e)}),$=(0,yC.A)(e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;let r=m.sections[g],i=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(i),a=/^[0-9]+$/.test(i),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(i);"letter"===r.contentType&&o||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(p(),x({activeSection:r,newSectionValue:i,shouldGoToNextSection:!0})):o||a||(p(),b(i))}),H=(0,yC.A)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),W=(0,yC.A)(e=>{if(!C.current)return;let t=e.target,r=t.textContent??"",i=C.current.getSectionIndexFromDOMElement(t),o=m.sections[i];if(n||!C.current)return void E(i);if(0===r.length){if(""===o.value)return void E(i);let t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void E(i):(p(),void v())}h({keyPressed:r,sectionIndex:i}),E(i)});(0,mr.A)(()=>{if(D&&C.current){if("all"===g)C.current.getRoot().focus();else if("number"==typeof g){let e=C.current.getSectionContent(g);e&&e.focus()}}},[g,D]);let G=I.useMemo(()=>m.sections.reduce((e,t)=>(e[t.type]=A[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[A,m.sections]),U="all"===g,q=I.useMemo(()=>m.sections.map((e,r)=>{let i=!U&&!t&&!n;return{container:{"data-sectionindex":r,onClick:j(r)},content:{tabIndex:U||r>0?-1:0,contentEditable:!U&&!t&&!n,role:"spinbutton",id:`${_}-${e.type}`,"aria-labelledby":`${_}-${e.type}`,"aria-readonly":n,"aria-valuenow":((e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);if(n)return+(t.getHours(n)>=12);return}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}})(e,T),"aria-valuemin":G[e.type].minimum,"aria-valuemax":G[e.type].maximum,"aria-valuetext":e.value?((e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");let n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}})(e,T):k.empty,"aria-label":k[e.type],"aria-disabled":t,spellCheck:!i&&void 0,autoCapitalize:i?"off":void 0,autoCorrect:i?"off":void 0,[parseInt(I.version,10)>=17?"enterKeyHint":"enterkeyhint"]:i?"next":void 0,children:e.value||e.placeholder,onInput:W,onPaste:$,onFocus:V(r),onDragOver:H,onMouseUp:F,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[m.sections,V,$,H,W,j,F,t,n,U,k,T,G,_]),Y=(0,yC.A)(e=>{b(e.target.value)}),X=I.useMemo(()=>S?"":d.getV7HiddenInputValueFromSections(m.sections),[S,m.sections,d]);return I.useEffect(()=>{if(null==C.current)throw Error("MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`\nYou probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.\n\nIf you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:\n\n<DatePicker slots={{ textField: MyCustomTextField }} />\n\nLearn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element");c&&C.current&&C.current.getSectionContent(w.startIndex).focus()},[]),{interactions:R,returnedValue:{autoFocus:c,readOnly:n,focused:u??D,sectionListRef:M,onBlur:z,onClick:P,onFocus:B,onInput:L,onPaste:N,enableAccessibleFieldDOMStructure:!0,elements:q,tabIndex:0===g?-1:0,contentEditable:U,value:X,onChange:Y,areAllSectionsEmpty:S}}},UB=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Uz=e=>{let t=(0,f3.I)(),n=I.useRef(void 0),r=I.useRef(void 0),{forwardedProps:{onFocus:i,onClick:o,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:d=!1},parsedSelectedSections:h,activeSectionIndex:p,state:f,fieldValueManager:g,valueManager:m,applyCharacterEditing:v,resetCharacterQuery:y,updateSectionValue:x,updateValueFromValueStr:b,clearActiveSection:w,clearValue:S,setTempAndroidValueStr:A,setSelectedSections:C,getSectionsFromValue:M,areAllSectionsEmpty:k,localizedDigits:T}=e,_=I.useRef(null),D=(0,mn.A)(l,_),O=I.useMemo(()=>((e,t,n)=>{let r=0,i=+!!n,o=[];for(let a=0;a<e.length;a+=1){let s=e[a],l=WF(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=UB(u).length,d=u.length,h=UB(l),p=i+(""===h?0:l.indexOf(h[0]))+s.startSeparator.length,f=p+h.length;o.push((0,er.A)({},s,{start:r,end:r+c,startInInput:p,endInInput:f})),r+=c,i+=d}return o})(f.sections,T,t),[f.sections,T,t]),R=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!_.current)return;if(null==h){_.current.scrollLeft&&(_.current.scrollLeft=0);return}if(_.current!==Us(document))return;let e=_.current.scrollTop;if("all"===h)_.current.select();else{let e=O[h],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==_.current.selectionStart||n!==_.current.selectionEnd)&&_.current===Us(document)&&_.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout(()=>{_.current&&_.current===Us(document)&&_.current.selectionStart===_.current.selectionEnd&&(_.current.selectionStart!==t||_.current.selectionEnd!==n)&&R.syncSelectionToDOM()})}_.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=_.current.selectionStart??0,t=_.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=O[0].startInInput?1:O.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?O.length-1:n-1},focusField:(e=0)=>{Us(document)!==_.current&&(_.current?.focus(),C(e))},setSelectedSections:e=>C(e),isFieldFocused:()=>_.current===Us(document)}),[_,h,O,C]),E=()=>{let e,t=_.current.selectionStart??0;C(-1===(e=t<=O[0].startInInput||t>=O[O.length-1].endInInput?1:O.findIndex(e=>e.startInInput-e.startSeparator.length>t))?O.length-1:e-1)},P=(0,yC.A)((...e)=>{i?.(...e);let t=_.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===_.current&&null==p&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?C("all"):E())})}),L=(0,yC.A)((e,...t)=>{e.isDefaultPrevented()||(o?.(e,...t),E())}),N=(0,yC.A)(e=>{if(a?.(e),e.preventDefault(),c||d)return;let t=e.clipboardData.getData("text");if("number"==typeof h){let e=f.sections[h],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&i){y(),x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||r)return}y(),b(t)}),B=(0,yC.A)((...e)=>{s?.(...e),C(null)}),z=(0,yC.A)(e=>{let n;if(c)return;let r=e.target.value;if(""===r){y(),S();return}let i=e.nativeEvent.data,o=i&&i.length>1,a=o?i:r,s=UB(a);if("all"===h&&C(p),null==p||o)return void b(o?i:s);if("all"===h&&1===s.length)n=s;else{let e=UB(g.getV6InputValueFromSections(O,T,t)),r=-1,i=-1;for(let t=0;t<e.length;t+=1)-1===r&&e[t]!==s[t]&&(r=t),-1===i&&e[e.length-t-1]!==s[s.length-t-1]&&(i=t);let o=O[p];if(r<o.start||e.length-i-1>o.end)return;let a=s.length-e.length+o.end-UB(o.endSeparator||"").length;n=s.slice(o.start+UB(o.startSeparator||"").length,a)}if(0===n.length){navigator.userAgent.toLowerCase().includes("android")&&A(a),y(),w();return}v({keyPressed:n,sectionIndex:p})}),j=I.useMemo(()=>void 0!==u?u:g.getV6InputValueFromSections(M(m.emptyValue),T,t),[u,g,M,m.emptyValue,T,t]),F=I.useMemo(()=>f.tempValueStrAndroid??g.getV6InputValueFromSections(f.sections,T,t),[f.sections,g,f.tempValueStrAndroid,T,t]);return I.useEffect(()=>(_.current&&_.current===Us(document)&&C("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]),{interactions:R,returnedValue:{readOnly:c,onBlur:B,onClick:L,onFocus:P,onPaste:N,inputRef:D,enableAccessibleFieldDOMStructure:!1,placeholder:j,inputMode:I.useMemo(()=>null==p||"letter"===f.sections[p].contentType?"text":"numeric",[p,f.sections]),autoComplete:"off",value:!(_.current&&_.current===Us(document))&&k?"":F,onChange:z}}},Uj=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],UF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],UV=["minDateTime","maxDateTime"];[...Uj,...UF,...UV];let U$=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],UH=["clearable","onClear","InputProps","sx","slots","slotProps"],UW=["ownerState"];var UG=n(54227),UU=n(75472);function Uq(e){return(0,V.Ay)("MuiPickersTextField",e)}function UY(e){return(0,V.Ay)("MuiPickersInputBase",e)}(0,F.A)("MuiPickersTextField",["root","focused","disabled","error","required"]);let UX=(0,F.A)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function UZ(e){return(0,V.Ay)("MuiPickersOutlinedInput",e)}let UK=(0,er.A)({},UX,(0,F.A)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),UQ=["children","className","label","notched","shrink"],UJ=(0,N.A)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),U0=(0,N.A)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),U1=(0,N.A)("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function U2(e){let{className:t,label:n}=e,r=(0,en.A)(e,UQ),i=null!=n&&""!==n,o=(0,er.A)({},e,{withLabel:i});return(0,_.jsx)(UJ,(0,er.A)({"aria-hidden":!0,className:t},r,{ownerState:o,children:(0,_.jsx)(U1,{ownerState:o,children:i?(0,_.jsx)(U0,{children:n}):(0,_.jsx)(U0,{className:"notranslate",children:"​"})})}))}var U5=n(85235);function U4(e){return(0,V.Ay)("MuiPickersSectionList",e)}let U3=(0,F.A)("MuiPickersSectionList",["root","section","sectionContent"]),U6=["slots","slotProps","elements","sectionListRef"],U8=(0,N.A)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),U9=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),U7=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),qe=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function qt(e){let{slots:t,slotProps:n,element:r,classes:i}=e,o=t?.section??U9,a=(0,m8.A)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),s=t?.sectionContent??qe,l=(0,m8.A)({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),u=t?.sectionSeparator??U7,c=(0,m8.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=(0,m8.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,_.jsxs)(o,(0,er.A)({},a,{children:[(0,_.jsx)(u,(0,er.A)({},c)),(0,_.jsx)(s,(0,er.A)({},l)),(0,_.jsx)(u,(0,er.A)({},d))]}))}let qn=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:o,sectionListRef:a}=n,s=(0,en.A)(n,U6),l=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],section:["section"],sectionContent:["sectionContent"]},U4,t)})(n),u=I.useRef(null),c=(0,mn.A)(t,u),d=e=>{if(!u.current)throw Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return u.current};I.useImperativeHandle(a,()=>({getRoot:()=>d("getRoot"),getSectionContainer:e=>d("getSectionContainer").querySelector(`.${U3.section}[data-sectionindex="${e}"]`),getSectionContent:e=>d("getSectionContent").querySelector(`.${U3.section}[data-sectionindex="${e}"] .${U3.sectionContent}`),getSectionIndexFromDOMElement(e){let t=d("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(U3.section)?n=e:e.classList.contains(U3.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let h=r?.root??U8,p=(0,m8.A)({elementType:h,externalSlotProps:i?.root,externalForwardedProps:s,additionalProps:{ref:c,suppressContentEditableWarning:!0},className:l.root,ownerState:{}});return(0,_.jsx)(h,(0,er.A)({},p,{children:p.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,_.jsx)(I.Fragment,{children:o.map((e,t)=>(0,_.jsx)(qt,{slots:r,slotProps:i,element:e,classes:l},t))})}))}),qr=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],qi=(0,N.A)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,er.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Math.round(.15/16*1e5)/1e5}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),qo=(0,N.A)(U8,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),qa=(0,N.A)(U9,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),qs=(0,N.A)(qe,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),ql=(0,N.A)(U7,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),qu=(0,N.A)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,er.A)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),qc=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:a,id:s,endAdornment:l,startAdornment:u,renderSuffix:c,slots:d,slotProps:h,contentEditable:p,tabIndex:f,onInput:g,onPaste:m,onKeyDown:v,name:y,readOnly:x,inputProps:b,inputRef:w,sectionListRef:S}=n,A=(0,en.A)(n,qr),C=I.useRef(null),M=(0,mn.A)(t,C),k=(0,mn.A)(b?.ref,w),T=(0,f3.I)(),D=(0,fx.A)();if(!D)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");I.useEffect(()=>{D&&D.setAdornedStart(!!u)},[D,u]),I.useEffect(()=>{D&&(i?D.onEmpty():D.onFilled())},[D,i]);let O=(0,er.A)({},n,D,{isRtl:T}),E=(e=>{let{focused:t,disabled:n,error:r,classes:i,fullWidth:o,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",o&&"fullWidth",`color${(0,U5.A)(s)}`,"small"===l&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,R.A)(d,UY,i)})(O),P=d?.root||qi,L=(0,m8.A)({elementType:P,externalSlotProps:h?.root,externalForwardedProps:A,additionalProps:{"aria-invalid":D.error,ref:M},className:E.root,ownerState:O}),N=d?.input||qo;return(0,_.jsxs)(P,(0,er.A)({},L,{children:[u,(0,_.jsx)(qn,{sectionListRef:S,elements:r,contentEditable:p,tabIndex:f,className:E.sectionsContainer,onFocus:e=>{D.disabled?e.stopPropagation():D.onFocus?.(e)},onBlur:D.onBlur,onInput:g,onPaste:m,onKeyDown:v,slots:{root:N,section:qa,sectionContent:qs,sectionSeparator:ql},slotProps:{root:{ownerState:O},sectionContent:{className:UX.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?UX.sectionBefore:UX.sectionAfter})}}),l,c?c((0,er.A)({},D)):null,(0,_.jsx)(qu,(0,er.A)({name:y,className:E.input,value:o,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:D.required,disabled:D.disabled},b,{ref:k}))]}))}),qd=["label","autoFocus","ownerState","notched"],qh=(0,N.A)(qi,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${UK.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${UK.focused} .${UK.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${UK.disabled}`]:{[`& .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${UK.error} .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{color:t},style:{[`&.${UK.focused}:not(.${UK.error}) .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),qp=(0,N.A)(qo,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),qf=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:o}=n,a=(0,en.A)(n,qd),s=(0,fx.A)(),l=(0,er.A)({},n,i,s,{color:s?.color||"primary"}),u=(e=>{let{classes:t}=e,n=(0,R.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},UZ,t);return(0,er.A)({},t,n)})(l);return(0,_.jsx)(qc,(0,er.A)({slots:{root:qh,input:qp},renderSuffix:e=>(0,_.jsx)(U2,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:u.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,_.jsxs)(I.Fragment,{children:[r," ","*"]}):r,ownerState:l})},a,{label:r,classes:u,ref:t}))});qf.muiName="Input";var qg=n(57867);function qm(e){return(0,V.Ay)("MuiPickersFilledInput",e)}let qv=(0,er.A)({},UX,(0,F.A)("MuiPickersFilledInput",["root","underline","input"])),qy=["label","autoFocus","disableUnderline","ownerState"],qx=(0,N.A)(qi,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,qg.MC)(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,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:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${qv.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${qv.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{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"},[`&.${qv.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qv.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})`:t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,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(.${qv.disabled}, .${qv.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${qv.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),qb=(0,N.A)(qo,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),qw=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,en.A)(n,qy),s=(0,fx.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,R.A)({root:["root",!n&&"underline"],input:["input"]},qm,t);return(0,er.A)({},t,r)})((0,er.A)({},n,o,s,{color:s?.color||"primary"}));return(0,_.jsx)(qc,(0,er.A)({slots:{root:qx,input:qb},slotProps:{root:{disableUnderline:i}}},a,{label:r,classes:l,ref:t}))});function qS(e){return(0,V.Ay)("MuiPickersFilledInput",e)}qw.muiName="Input";let qA=(0,er.A)({},UX,(0,F.A)("MuiPickersInput",["root","input"])),qC=["label","autoFocus","disableUnderline","ownerState"],qM=(0,N.A)(qi,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",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"},[`&.${qA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qA.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,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(.${qA.disabled}, .${qA.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${qA.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),qk=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,en.A)(n,qC),s=(0,fx.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,R.A)({root:["root",!n&&"underline"],input:["input"]},qS,t);return(0,er.A)({},t,r)})((0,er.A)({},n,o,s,{disableUnderline:i,color:s?.color||"primary"}));return(0,_.jsx)(qc,(0,er.A)({slots:{root:qM}},a,{label:r,classes:l,ref:t}))});qk.muiName="Input";let qT=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],q_={standard:qk,filled:qw,outlined:qf},qI=(0,N.A)(yf.A,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),qD=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:o,color:a="primary",disabled:s=!1,error:l=!1,variant:u="outlined",required:c=!1,InputProps:d,inputProps:h,inputRef:p,sectionListRef:f,elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onPaste:b,onInput:w,endAdornment:S,startAdornment:A,tabIndex:C,contentEditable:M,focused:k,value:T,onChange:D,fullWidth:E,id:P,name:L,helperText:N,FormHelperTextProps:B,label:z,InputLabelProps:j}=n,F=(0,en.A)(n,qT),V=I.useRef(null),$=(0,mn.A)(t,V),H=(0,vX.A)(P),W=N&&H?`${H}-helper-text`:void 0,G=z&&H?`${H}-label`:void 0,U=(0,er.A)({},n,{color:a,disabled:s,error:l,focused:k,required:c,variant:u}),q=(e=>{let{focused:t,disabled:n,classes:r,required:i}=e;return(0,R.A)({root:["root",t&&!n&&"focused",n&&"disabled",i&&"required"]},Uq,r)})(U),Y=q_[u];return(0,_.jsxs)(qI,(0,er.A)({className:(0,O.A)(q.root,o),ref:$,focused:k,onFocus:r,onBlur:i,disabled:s,variant:u,error:l,color:a,fullWidth:E,required:c,ownerState:U},F,{children:[(0,_.jsx)(UG.A,(0,er.A)({htmlFor:H,id:G},j,{children:z})),(0,_.jsx)(Y,(0,er.A)({elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onInput:w,onPaste:b,endAdornment:S,startAdornment:A,tabIndex:C,contentEditable:M,value:T,onChange:D,id:H,fullWidth:E,inputProps:h,inputRef:p,sectionListRef:f,label:z,name:L,role:"group","aria-labelledby":G,"aria-describedby":W,"aria-live":W?"polite":void 0},d)),N&&(0,_.jsx)(UU.A,(0,er.A)({id:W},B,{children:N}))]}))}),qO=["enableAccessibleFieldDOMStructure"],qR=["InputProps","readOnly"],qE=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],qP=["slots","slotProps","InputProps","inputProps"],qL=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:o,inputProps:a}=n,s=(0,en.A)(n,qP),l=r?.textField??(e.enableAccessibleFieldDOMStructure?qD:eX.A),u=(0,m8.A)({elementType:l,externalSlotProps:i?.textField,externalForwardedProps:s,ownerState:n,additionalProps:{ref:t}});u.inputProps=(0,er.A)({},a,u.inputProps),u.InputProps=(0,er.A)({},o,u.InputProps);let c=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,en.A)(e,qO);if(t){let{InputProps:e,readOnly:t}=n,r=(0,en.A)(n,qR);return(0,er.A)({},r,{InputProps:(0,er.A)({},e??{},{readOnly:t})})}let{onPaste:r,onKeyDown:i,inputMode:o,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,en.A)(n,qE);return(0,er.A)({},c,{InputProps:(0,er.A)({},s??{},{readOnly:a}),inputProps:(0,er.A)({},l??{},{inputMode:o,onPaste:r,onKeyDown:i,ref:u})})})((e=>{let t,n,r,i,o,{forwardedProps:a,internalProps:s}=(t=$H().utils,n=$H().defaultDates,r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h,i=(0,er.A)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:$q(t,e.minDateTime??e.minDate,n.minDate),maxDate:$q(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),o="date-time",I.useMemo(()=>{let e=(0,er.A)({},i),t={},n=n=>{e.hasOwnProperty(n)&&(t[n]=e[n],delete e[n])};return U$.forEach(n),Uj.forEach(n),UF.forEach(n),UV.forEach(n),{forwardedProps:e,internalProps:t}},[i,o]));return(e=>{let t=$H().utils,{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:i,enableAccessibleFieldDOMStructure:o=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:d},fieldValueManager:h,valueManager:p,validator:f}=e,g=(0,f3.I)(),m=(e=>{let t=$H().utils,n=$H().localeText,r=$H(),i=(0,f3.I)(),{valueManager:o,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:d,referenceDate:h,onChange:p,format:f,formatDensity:g="dense",selectedSections:m,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:x,enableAccessibleFieldDOMStructure:b=!1}}=e,{timezone:w,value:S,handleValueChange:A}=WT({timezone:x,value:c,defaultValue:d,referenceDate:h,onChange:p,valueManager:o}),C=I.useMemo(()=>{let e;return e=t.date(void 0),"0"===t.formatByString(t.setSeconds(e,0),"s")?WP:Array.from({length:10}).map((n,r)=>t.formatByString(t.setSeconds(e,r),"s"))},[t]),M=I.useMemo(()=>((e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=$Y(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:4===e.formatByString(e.date(void 0,"system"),t).length?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){let n=WR(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(o);return WL(e.formatByString(e.endOfDay(r),n),t)!==i.toString()?{minimum:1,maximum:Number(WL(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:i}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,C,w),[t,C,w]),k=I.useCallback((e,r=null)=>a.getSectionsFromValue(t,e,r,e=>UL({utils:t,localeText:n,localizedDigits:C,format:f,date:e,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i})),[a,f,n,C,i,y,t,g,b]),[T,_]=I.useState(()=>{let e=k(S);WH(e,s);let n={sections:e,value:S,referenceValue:o.emptyValue,tempValueStrAndroid:null},r=Math.max(...e.map(e=>WI[e.type]??1)),i=o.getInitialReferenceValue({referenceDate:h,value:S,utils:t,props:u,granularity:r,timezone:w});return(0,er.A)({},n,{referenceValue:i})}),[D,O]=(0,yA.A)({controlled:m,default:null,name:"useField",state:"selectedSections"}),R=e=>{O(e),v?.(e)},E=I.useMemo(()=>WU(D,T.sections),[D,T.sections]),P="all"===E?0:E,L=({value:e,referenceValue:n,sections:i})=>{if(_(t=>(0,er.A)({},t,{sections:i,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,T.value,e))return;let a={validationError:l({adapter:r,value:e,timezone:w,props:u})};A(e,a)},N=(e,t)=>{let n=[...T.sections];return n[e]=(0,er.A)({},n[e],{value:t,modified:!0}),n};return I.useEffect(()=>{let e=k(T.value);WH(e,s),_(t=>(0,er.A)({},t,{sections:e}))},[f,t.locale,i]),I.useEffect(()=>{o.areValuesEqual(t,T.value,S)&&o.getTimezone(t,T.value)===o.getTimezone(t,S)||_(e=>(0,er.A)({},e,{value:S,referenceValue:a.updateReferenceValue(t,S,e.referenceValue),sections:k(S)}))},[S]),{state:T,activeSectionIndex:P,parsedSelectedSections:E,setSelectedSections:R,clearValue:()=>{L({value:o.emptyValue,referenceValue:T.referenceValue,sections:k(o.emptyValue)})},clearActiveSection:()=>{if(null==P)return;let e=T.sections[P],n=a.getActiveDateManager(t,T,e),r=n.getSections(T.sections).filter(e=>""!==e.value).length===+(""!==e.value),i=N(P,""),o=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(o);L((0,er.A)({},s,{sections:i}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{let i,o;r&&P<T.sections.length-1&&R(P+1);let s=a.getActiveDateManager(t,T,e),l=N(P,n),u=s.getSections(l),c=((e,t,n)=>{let r=t.some(e=>"day"===e.type),i=[],o=[];for(let e=0;e<t.length;e+=1){let a=t[e];r&&"weekDay"===a.type||(i.push(a.format),o.push(WF(a,"non-input",n)))}let a=i.join(" "),s=o.join(" ");return e.parse(s,a)})(t,u,C);if(null!=c&&t.isValid(c)){let e=WG(t,c,u,s.referenceDate,!0);i=s.getNewValuesFromNewActiveDate(e),o=!0}else i=s.getNewValuesFromNewActiveDate(c),o=(null!=c&&!t.isValid(c))!=(null!=s.date&&!t.isValid(s.date));return o?L((0,er.A)({},i,{sections:l})):_(e=>(0,er.A)({},e,i,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let r=a.parseValueStr(e,T.referenceValue,(e,r)=>{let o=t.parse(e,f);if(null==o||!t.isValid(o))return null;let a=UL({utils:t,localeText:n,localizedDigits:C,format:f,date:o,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i});return WG(t,o,a,r,!1)}),o=a.updateReferenceValue(t,r,T.referenceValue);L({value:r,referenceValue:o,sections:k(r,T.sections)})},setTempAndroidValueStr:e=>_(t=>(0,er.A)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:k,sectionsValueBoundaries:M,localizedDigits:C,timezone:w}})(e),{state:v,activeSectionIndex:y,parsedSelectedSections:x,setSelectedSections:b,clearValue:w,clearActiveSection:S,updateSectionValue:A,setTempAndroidValueStr:C,sectionsValueBoundaries:M,localizedDigits:k,timezone:T}=m,_=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:i,timezone:o})=>{let a=$H().utils,[s,l]=I.useState(null),u=(0,yC.A)(()=>l(null));I.useEffect(()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),I.useEffect(()=>{if(null!=s){let e=setTimeout(()=>u(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[s,u]);let c=({keyPressed:t,sectionIndex:n},r,i)=>{let o=t.toLowerCase(),a=e[n];if(null!=s&&(!i||i(s.value))&&s.sectionIndex===n){let e=`${s.value}${o}`,t=r(e,a);if(null==t.saveQuery)return l({sectionIndex:n,value:e,sectionType:a.type}),t}let c=r(o,a);return null==c.saveQuery||c.saveQuery?(l({sectionIndex:n,value:o,sectionType:a.type}),null!=c.saveQuery?null:c):(u(),null)};return{applyCharacterEditing:(0,yC.A)(s=>{var l;let u,d,h,p=e[s.sectionIndex],f=WB(s.keyPressed,r)?(l=(0,er.A)({},s,{keyPressed:WN(s.keyPressed,r)}),u=(e,t)=>{let i=WL(e,r),o=Number(i),s=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(o>s.maximum)return{saveQuery:!1};if(o<s.minimum)return{saveQuery:!0};let l=10*o>s.maximum||i.length===s.maximum.toString().length;return{sectionValue:Wj(a,o,s,r,t),shouldGoToNextSection:l}},c(l,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return u(e,t);if("month"===t.type){let n=W$(a,"digit","month","MM"),r=u(e,{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(null!=r.saveQuery)return r;let i=WV(a,r.sectionValue,"MM",t.format);return(0,er.A)({},r,{sectionValue:i})}if("weekDay"===t.type){let n=u(e,t);if(null!=n.saveQuery)return n;let r=WR(a,t.format)[Number(n.sectionValue)-1];return(0,er.A)({},n,{sectionValue:r})}return{saveQuery:!1}},e=>WB(e,r))):(d=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},h=(e,t,n,r)=>{let i=e=>WE(a,o,t.type,e);if("letter"===t.contentType)return d(t.format,i(t.format),e);if(n&&null!=r&&"letter"===WO(a,n).contentType){let t=i(n),o=d(n,t,e);return null!=o.saveQuery?{saveQuery:!1}:(0,er.A)({},o,{sectionValue:r(o.sectionValue,t)})}return{saveQuery:!1}},c(s,(e,t)=>{switch(t.type){case"month":return h(e,t,a.formats.month,e=>WV(a,e,a.formats.month,t.format));case"weekDay":return h(e,t,a.formats.weekday,(e,t)=>t.indexOf(e).toString());case"meridiem":return h(e,t);default:return{saveQuery:!1}}}));null==f?i(null):t({activeSection:p,newSectionValue:f.sectionValue,shouldGoToNextSection:f.shouldGoToNextSection})}),resetCharacterQuery:u}})({sections:v.sections,updateSectionValue:A,sectionsValueBoundaries:M,localizedDigits:k,setTempAndroidValueStr:C,timezone:T}),{resetCharacterQuery:D}=_,O=p.areValuesEqual(t,v.value,p.emptyValue),R=o?UN:Uz,E=I.useMemo(()=>((e,t)=>{let n={};if(!t)return e.forEach((t,r)=>{let i=r===e.length-1?null:r+1;n[r]={leftIndex:0===r?null:r-1,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let r={},i={},o=0,a=0,s=e.length-1;for(;s>=0;){-1===(a=e.findIndex((e,t)=>t>=o&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator))&&(a=e.length-1);for(let e=a;e>=o;e-=1)i[e]=s,r[s]=e,s-=1;o=a+1}return e.forEach((t,o)=>{let a=i[o],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[o]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(v.sections,g&&!o),[v.sections,g,o]),{returnedValue:P,interactions:L}=R((0,er.A)({},e,m,_,{areAllSectionsEmpty:O,sectionOrder:E})),N=(0,yC.A)(e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),b("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)b(E.startIndex);else if("all"===x)b(E.endIndex);else{let e=E.neighbors[x].rightIndex;null!==e&&b(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)b(E.endIndex);else if("all"===x)b(E.startIndex);else{let e=E.neighbors[x].leftIndex;null!==e&&b(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?w():S(),D();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==y)break;"all"===x&&b(y);let n=v.sections[y],r=h.getActiveDateManager(t,v,n),o=((e,t,n,r,i,o,a,s)=>{let l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;if("digit"===n.contentType||"digit-with-letter"===n.contentType){let r,h=i[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);r=l>0||u?h.minimum:h.maximum}else r=parseInt(WL(n.value,o),10)+l*p;return(r%p!=0&&((l<0||u)&&(r+=p-(p+r)%p),(l>0||c)&&(r-=r%p)),r>h.maximum)?Wj(e,h.minimum+(r-h.maximum-1)%(h.maximum-h.minimum+1),h,o,n):r<h.minimum?Wj(e,h.maximum-(h.minimum-r-1)%(h.maximum-h.minimum+1),h,o,n):Wj(e,r,h,o,n)}let h=WE(e,t,n.type,n.format);if(0===h.length)return n.value;if(d)return l>0||u?h[0]:h[h.length-1];let p=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[p]})(t,T,n,e.key,M,k,r.date,{minutesStep:i});A({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,mr.A)(()=>{L.syncSelectionToDOM()});let{hasValidationError:B}=Uo({props:n,validator:f,timezone:T,value:v.value,onError:n.onError}),z=I.useMemo(()=>void 0!==u?u:B,[B,u]);I.useEffect(()=>{z||null!=y||D()},[v.referenceValue,y,z]),I.useEffect(()=>{null!=v.tempValueStrAndroid&&null!=y&&(D(),S())},[v.sections]),I.useImperativeHandle(r,()=>({getSections:()=>v.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused}));let j={onKeyDown:N,onClear:(0,yC.A)((e,...t)=>{e.preventDefault(),d?.(e,...t),w(),L.isFieldFocused()?b(E.startIndex):L.focusField(0)}),error:z,clearable:!!(c&&!O&&!s&&!a)};return(0,er.A)({},e.forwardedProps,j,{disabled:a,readOnly:s},P)})({forwardedProps:a,internalProps:s,valueManager:WY,fieldValueManager:WX,validator:UR,valueType:"date-time"})})(u)),d=(e=>{let t=$H().localeText,{clearable:n,onClear:r,InputProps:i,sx:o,slots:a,slotProps:s}=e,l=(0,en.A)(e,UH),u=a?.clearButton??eY,c=(0,m8.A)({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=(0,en.A)(c,UW),h=a?.clearIcon??Hv,p=(0,m8.A)({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return(0,er.A)({},l,{InputProps:(0,er.A)({},i,{endAdornment:(0,_.jsxs)(I.Fragment,{children:[n&&(0,_.jsx)(g7,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,_.jsx)(u,(0,er.A)({},d,{onClick:r,children:(0,_.jsx)(h,(0,er.A)({fontSize:"small"},p))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})})((0,er.A)({},c,{slots:r,slotProps:i}));return(0,_.jsx)(l,(0,er.A)({},d))});var qN=n(65130);function qB(e,t,n){return(0,ox.w)(n?.in||e,+(0,ov.a)(e)+t)}var qz=n(38086);function qj(e,t){let n=(0,ov.a)(e,t?.in);return n.setHours(23,59,59,999),n}function qF(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function qV(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=(0,ox.w)(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function q$(e,t){return+(0,ov.a)(e)>+(0,ov.a)(t)}function qH(e,t){return+(0,ov.a)(e)<+(0,ov.a)(t)}function qW(e,t){let n=(0,ov.a)(e,t?.in);return n.setMinutes(0,0,0),n}class qG{subPriority=0;validate(e,t){return!0}}class qU extends qG{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class qq extends qG{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>(0,ox.w)(t,e))}set(e,t){var n,r;let i;if(t.timestampIsSet)return e;return(0,ox.w)(e,((i="function"==typeof(r=n=this.context)&&r.prototype?.constructor===r?new n(0):(0,ox.w)(n,0)).setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),i))}}class qY{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new qU(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}}let qX=/^(1[0-2]|0?\d)/,qZ=/^(3[0-1]|[0-2]?\d)/,qK=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,qQ=/^(5[0-3]|[0-4]?\d)/,qJ=/^(2[0-3]|[0-1]?\d)/,q0=/^(2[0-4]|[0-1]?\d)/,q1=/^(1[0-1]|0?\d)/,q2=/^(1[0-2]|0?\d)/,q5=/^[0-5]?\d/,q4=/^[0-5]?\d/,q3=/^\d/,q6=/^\d{1,2}/,q8=/^\d{1,3}/,q9=/^\d{1,4}/,q7=/^-?\d+/,Ye=/^-?\d/,Yt=/^-?\d{1,2}/,Yn=/^-?\d{1,3}/,Yr=/^-?\d{1,4}/,Yi=/^([+-])(\d{2})(\d{2})?|Z/,Yo=/^([+-])(\d{2})(\d{2})|Z/,Ya=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ys=/^([+-])(\d{2}):(\d{2})|Z/,Yl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Yu(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Yc(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Yd(e,t){let n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};let r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(i*ow.s0+6e4*o+1e3*a),rest:t.slice(n[0].length)}}function Yh(e,t){switch(e){case 1:return Yc(q3,t);case 2:return Yc(q6,t);case 3:return Yc(q8,t);case 4:return Yc(q9,t);default:return Yc(RegExp("^\\d{1,"+e+"}"),t)}}function Yp(e,t){switch(e){case 1:return Yc(Ye,t);case 2:return Yc(Yt,t);case 3:return Yc(Yn,t);case 4:return Yc(Yr,t);default:return Yc(RegExp("^-?\\d{1,"+e+"}"),t)}}function Yf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Yg(e,t){let n,r=t>0,i=r?t:1-t;if(i<=50)n=e||100;else{let t=i+50;n=e+100*Math.trunc(t/100)-100*(e>=t%100)}return r?n:1-n}function Ym(e){return e%400==0||e%4==0&&e%100!=0}let Yv=[31,28,31,30,31,30,31,31,30,31,30,31],Yy=[31,29,31,30,31,30,31,31,30,31,30,31];function Yx(e,t,n){let r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,i=(0,ov.a)(e,n?.in),o=i.getDay(),a=7-r,s=t<0||t>6?t-(o+a)%7:((t%7+7)%7+a)%7-(o+a)%7;return(0,qN.f)(i,s,n)}let Yb={G:new class extends qY{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends qY{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Yu(Yh(4,e),r);case"yo":return Yu(n.ordinalNumber(e,{unit:"year"}),r);default:return Yu(Yh(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Yg(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends qY{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Yu(Yh(4,e),r);case"Yo":return Yu(n.ordinalNumber(e,{unit:"year"}),r);default:return Yu(Yh(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=o_(e,r);if(n.isTwoDigitYear){let t=Yg(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),oC(e,r)}let o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),oC(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends qY{priority=130;parse(e,t){return"R"===t?Yp(4,e):Yp(t.length,e)}set(e,t,n){let r=(0,ox.w)(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oM(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends qY{priority=130;parse(e,t){return"u"===t?Yp(4,e):Yp(t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends qY{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Yh(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends qY{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Yh(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends qY{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case"M":return Yu(Yc(qX,e),r);case"MM":return Yu(Yh(2,e),r);case"Mo":return Yu(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends qY{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case"L":return Yu(Yc(qX,e),r);case"LL":return Yu(Yh(2,e),r);case"Lo":return Yu(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends qY{priority=100;parse(e,t,n){switch(t){case"w":return Yc(qQ,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){let i,o;return oC((o=oI(i=(0,ov.a)(e,r?.in),r)-n,i.setDate(i.getDate()-7*o),(0,ov.a)(i,r?.in)),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends qY{priority=100;parse(e,t,n){switch(t){case"I":return Yc(qQ,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){let r,i;return oM((i=oT(r=(0,ov.a)(e,void 0),void 0)-n,r.setDate(r.getDate()-7*i),r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends qY{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Yc(qZ,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Yh(t.length,e)}}validate(e,t){let n=Ym(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Yy[r]:t>=1&&t<=Yv[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends qY{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Yc(qK,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Yh(t.length,e)}}validate(e,t){return Ym(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends qY{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends qY{priority=90;parse(e,t,n,r){let i=e=>{let t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Yu(Yh(t.length,e),i);case"eo":return Yu(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends qY{priority=90;parse(e,t,n,r){let i=e=>{let t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Yu(Yh(t.length,e),i);case"co":return Yu(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends qY{priority=90;parse(e,t,n){let r=e=>0===e?7:e;switch(t){case"i":case"ii":return Yh(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Yu(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Yu(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Yu(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Yu(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){var r,i;let o,a,s;return r=e,o=(0,ov.a)(r,void 0),i=void 0,s=0===(a=(0,ov.a)(o,i?.in).getDay())?7:a,(e=(0,qN.f)(o,n-s,void 0)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends qY{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends qY{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends qY{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends qY{priority=70;parse(e,t,n){switch(t){case"h":return Yc(q2,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends qY{priority=70;parse(e,t,n){switch(t){case"H":return Yc(qJ,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends qY{priority=70;parse(e,t,n){switch(t){case"K":return Yc(q1,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends qY{priority=70;parse(e,t,n){switch(t){case"k":return Yc(q0,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){return e.setHours(n<=24?n%24:n,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends qY{priority=60;parse(e,t,n){switch(t){case"m":return Yc(q5,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends qY{priority=50;parse(e,t,n){switch(t){case"s":return Yc(q4,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends qY{priority=30;parse(e,t){return Yu(Yh(t.length,e),e=>Math.trunc(e*Math.pow(10,-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends qY{priority=10;parse(e,t){switch(t){case"X":return Yd(Yi,e);case"XX":return Yd(Yo,e);case"XXXX":return Yd(Ya,e);case"XXXXX":return Yd(Yl,e);default:return Yd(Ys,e)}}set(e,t,n){return t.timestampIsSet?e:(0,ox.w)(e,e.getTime()-oy(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends qY{priority=10;parse(e,t){switch(t){case"x":return Yd(Yi,e);case"xx":return Yd(Yo,e);case"xxxx":return Yd(Ya,e);case"xxxxx":return Yd(Yl,e);default:return Yd(Ys,e)}}set(e,t,n){return t.timestampIsSet?e:(0,ox.w)(e,e.getTime()-oy(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends qY{priority=40;parse(e){return Yc(q7,e)}set(e,t,n){return[(0,ox.w)(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends qY{priority=20;parse(e){return Yc(q7,e)}set(e,t,n){return[(0,ox.w)(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Yw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YA=/^'([^]*?)'?$/,YC=/''/g,YM=/\S/,Yk=/[a-zA-Z]/,YT={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Y_={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class YI{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=YT,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=(0,er.A)({},Y_,n),this.longFormatters=r,this.lib=i||"date-fns"}}class YD extends YI{constructor({locale:e,formats:t}={}){super({locale:e??n1,formats:t,longFormatters:oz}),this.parse=(e,t)=>""===e?null:function(e,t,n,r){let i=()=>(0,ox.w)(r?.in||n,NaN),o=Object.assign({},n2),a=r?.locale??o.locale??n1,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?i():(0,ov.a)(n,r?.in);let u={firstWeekContainsDate:s,weekStartsOn:l,locale:a},c=[new qq(r?.in,n)],d=t.match(YS).map(e=>{let t=e[0];return t in oz?(0,oz[t])(e,a.formatLong):e}).join("").match(Yw),h=[];for(let n of d){var p,f;!r?.useAdditionalWeekYearTokens&&(p=n,oF.test(p))&&o$(n,t,e),!r?.useAdditionalDayOfYearTokens&&(f=n,oj.test(f))&&o$(n,t,e);let o=n[0],s=Yb[o];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=h.find(e=>t.includes(e.token)||e.token===o);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&h.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:o,fullToken:n});let r=s.run(e,n,a.match,u);if(!r)return i();c.push(r.setter),e=r.rest}else{if(o.match(Yk))throw RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");if("''"===n?n="'":"'"===o&&(n=n.match(YA)[1].replace(YC,"'")),0!==e.indexOf(n))return i();e=e.slice(n.length)}}if(e.length>0&&YM.test(e))return i();let g=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=(0,ov.a)(n,r?.in);if(isNaN(+m))return i();let v={};for(let e of g){if(!e.validate(m,u))return i();let t=e.set(m,v,u);Array.isArray(t)?(m=t[0],Object.assign(v,t[1])):m=t}return m}(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&oH(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>oX(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&+(0,ov.a)(e)==+(0,ov.a)(t),this.isSameYear=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return n.getFullYear()===r.getFullYear()})(e,t),this.isSameMonth=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()})(e,t),this.isSameDay=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return+oS(n)==+oS(r)})(e,t),this.isSameHour=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return+qW(n)==+qW(r)})(e,t),this.isAfter=(e,t)=>q$(e,t),this.isAfterYear=(e,t)=>q$(e,qF(t)),this.isAfterDay=(e,t)=>q$(e,qj(t)),this.isBefore=(e,t)=>qH(e,t),this.isBeforeYear=(e,t)=>qH(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>qH(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(function(e,t){let n=+(0,ov.a)(e,void 0),[r,i]=[+(0,ov.a)(t.start,void 0),+(0,ov.a)(t.end,void 0)].sort((e,t)=>e-t);return n>=r&&n<=i})(e,{start:t,end:n}),this.startOfYear=e=>oA(e),this.startOfMonth=e=>{let t;return(t=(0,ov.a)(e,void 0)).setDate(1),t.setHours(0,0,0,0),t},this.startOfWeek=e=>oC(e,{locale:this.locale}),this.startOfDay=e=>oS(e),this.endOfYear=e=>qF(e),this.endOfMonth=e=>{let t,n;return n=(t=(0,ov.a)(e,void 0)).getMonth(),t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t},this.endOfWeek=e=>{var t;let n,r,i;return t={locale:this.locale},n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,i=(r=(0,ov.a)(e,t?.in)).getDay(),r.setDate(r.getDate()+((i<n?-7:0)+6-(i-n))),r.setHours(23,59,59,999),r},this.endOfDay=e=>qj(e),this.addYears=(e,t)=>(0,qz.P)(e,12*t,void 0),this.addMonths=(e,t)=>(0,qz.P)(e,t),this.addWeeks=(e,t)=>(0,qN.f)(e,7*t,void 0),this.addDays=(e,t)=>(0,qN.f)(e,t),this.addHours=(e,t)=>qB(e,t*ow.s0,void 0),this.addMinutes=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setTime(n.getTime()+6e4*t),n},this.addSeconds=(e,t)=>qB(e,1e3*t,void 0),this.getYear=e=>(0,ov.a)(e,void 0).getFullYear(),this.getMonth=e=>(0,ov.a)(e,void 0).getMonth(),this.getDate=e=>(0,ov.a)(e,void 0).getDate(),this.getHours=e=>(0,ov.a)(e,void 0).getHours(),this.getMinutes=e=>(0,ov.a)(e,void 0).getMinutes(),this.getSeconds=e=>(0,ov.a)(e).getSeconds(),this.getMilliseconds=e=>(0,ov.a)(e).getMilliseconds(),this.setYear=(e,t)=>{let n;return isNaN(+(n=(0,ov.a)(e,void 0)))?(0,ox.w)(e,NaN):(n.setFullYear(t),n)},this.setMonth=(e,t)=>{let n,r,i,o,a;return r=(n=(0,ov.a)(e,void 0)).getFullYear(),i=n.getDate(),(o=(0,ox.w)(e,0)).setFullYear(r,t,15),o.setHours(0,0,0,0),a=qV(o),n.setMonth(t,Math.min(i,a)),n},this.setDate=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setDate(t),n},this.setHours=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setHours(t),n},this.setMinutes=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setMinutes(t),n},this.setSeconds=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setSeconds(t),n},this.setMilliseconds=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setMilliseconds(t),n},this.getDaysInMonth=e=>qV(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,o=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);o[e]=o[e]||[],o[e].push(i),i=this.addDays(i,1),r+=1}return o},this.getWeekNumber=e=>oI(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}}let YO="yyyy-MM-dd HH:mm:ss";function YR(e,t){let n,r;return e?(0,nY.isRelativeTimeRange)(e)?e.pastDuration:(n=oK(e.start,YO,t),r=oK(e.end,YO,t),`${n} - ${r}`):"Custom Time Range"}let YE=({initialTimeRange:e,onChange:t,onCancel:n,timeZone:r})=>{let i=["local","browser"].includes(r.toLowerCase())?Intl.DateTimeFormat().resolvedOptions().timeZone:r,[o,a]=(0,I.useState)(e),[s,l]=(0,I.useState)(!0),u=(e,t)=>{a(n=>({...n,[t]:e}))},c=e=>{u(e,"start")},d=e=>{u(e,"end")},h=()=>{var e,t;let n={start:o.start,end:o.end};if(e=n.start,t=n.end,oH(e)&&oH(t)?!!qH(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return n};return(0,_.jsx)($j,{dateAdapter:YD,children:(0,_.jsxs)(eH.A,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[s&&(0,_.jsxs)(cr.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,_.jsx)(cp.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,_.jsx)(UE,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new om(o.start,i),onChange:e=>{null!==e&&c(e)},onAccept:()=>{l(!1)}})]}),!s&&(0,_.jsxs)(cr.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,_.jsx)(cp.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,_.jsx)(UE,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new om(o.end,i),minDateTime:new om(o.start,i),onChange:e=>{null!==e&&d(e)},onAccept:e=>{null!==e&&(l(!0),d(e))}})]}),(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,_.jsx)(IO.ErrorBoundary,{FallbackComponent:ID,children:(0,_.jsx)(qL,{"data-testid":"start_time_input",timezone:i,label:"Start Time",value:new om(o.start,i),onChange:e=>{e&&c(e)},onBlur:()=>h(),format:YO})}),(0,_.jsx)(IO.ErrorBoundary,{FallbackComponent:ID,children:(0,_.jsx)(qL,{"data-testid":"end_time_input",timezone:i,label:"End Time",value:new om(o.end,i),onChange:e=>{e&&d(e)},onBlur:()=>h(),format:YO})})]}),(0,_.jsxs)(eH.A,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,_.jsx)(eV,{variant:"contained",onClick:()=>{let e;(e=h())&&t(e)},fullWidth:!0,children:"Apply"}),(0,_.jsx)(eV,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function YP({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:i=!0,timeZone:o,timeZoneOptions:a,onTimeZoneChange:s}){let l,{timeZone:u}=u7(),c=o??u,d=(0,I.useRef)(),[h,p]=(0,I.useState)(!1),f=(0,I.useMemo)(()=>(0,nY.isRelativeTimeRange)(e)?(0,nY.toAbsoluteTimeRange)(e):e,[e]),g=(0,I.useMemo)(()=>{var t;return{value:t=(0,nY.isRelativeTimeRange)(e)?void 0:e,display:YR(t,c)}},[e,c]),[m,v]=(0,I.useState)(!1),y=a??n3(),[x,b]=(0,I.useState)(null),w=y.find(e=>e.value===c)?.display??c,S=oQ(c),A=oQ("local"),C=y.map(e=>({id:e.value,label:e.display}));{let e=y.find(e=>e.value===c);e&&(l={id:e.value,label:e.display})}return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(tx.Ay,{anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:!!x,onClose:()=>b(null),sx:e=>({padding:e.spacing(1)}),children:(0,_.jsx)(cr.A,{sx:{p:1,minWidth:260},onClick:e=>{e.stopPropagation()},children:(0,_.jsx)(y7,{options:C,value:l,onChange:(e,t)=>{if(t){let e=y.find(e=>e.value===t.id);e&&s?.(e)}b(null)},disableClearable:!0,renderInput:e=>(0,_.jsx)(eX.A,{...e,placeholder:"Search timezones",size:"small"})})})}),(0,_.jsx)(tx.Ay,{anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:h,onClose:()=>p(!1),sx:e=>({padding:e.spacing(2)}),children:(0,_.jsx)(YE,{initialTimeRange:f,onChange:e=>{n(e),p(!1),v(!1)},onCancel:()=>p(!1),timeZone:c})}),(0,_.jsx)(cr.A,{ref:d,children:(0,_.jsxs)(fZ.A,{open:m,value:YR(e,c),onClick:()=>v(!m),IconComponent:$R,renderValue:()=>(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,_.jsx)("span",{children:t.find(t=>YR(t.value,c)===YR(e,c))?.display??YR(e,c)}),S!==A&&(0,_.jsxs)(cr.A,{sx:{typography:"caption",color:"text.secondary"},children:["\xb7 ",S]})]}),inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[(0,_.jsx)(fX,{disableRipple:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{cursor:"default","&:hover":{backgroundColor:"transparent"},py:.5,px:1},children:(0,_.jsxs)(cr.A,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,_.jsxs)(cr.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,_.jsx)(cr.A,{sx:{typography:"subtitle1"},children:"Time Range"}),(0,_.jsxs)(cr.A,{sx:{color:"text.secondary",typography:"caption",mt:.25},children:["Timezone: ",w]})]}),(0,_.jsx)(cr.A,{sx:{display:"flex",alignItems:"center",pr:1,ml:1.5},children:(0,_.jsx)(eY,{size:"small","aria-label":"Select timezone",onClick:e=>{e.preventDefault(),e.stopPropagation(),b(e.currentTarget)},children:(0,_.jsx)($E,{fontSize:"small"})})})]})}),t.map((e,t)=>(0,_.jsx)(fX,{value:YR(e.value,c),onClick:()=>{n(e.value)},children:e.display},t)),i&&(0,_.jsx)(fX,{value:YR(g.value,c),onClick:()=>p(!0),children:g.display})]})})]})}function YL({value:e,onChange:t,timeZoneOptions:n,variant:r="standard",heightPx:i,...o}){let a,s=(0,I.useMemo)(()=>n??n3(),[n]);i&&(a="number"==typeof i?`${i}px`:i);let l=(0,I.useMemo)(()=>({minWidth:"compact"===r?"80px":"150px",...a&&{lineHeight:a,paddingY:0},...o.sx}),[r,a,o.sx]);return(0,_.jsx)(fZ.A,{...o,value:e,onChange:(e,n)=>{var r;let i;r=e.target.value,(i=s.find(e=>e.value===r))&&t&&t(i)},sx:l,size:"compact"===r?"small":"medium",children:s.map(e=>(0,_.jsx)(fX,{value:e.value,children:e.display},e.value))})}function YN(e){let{markerColor:t,sx:n}=e;return(0,_.jsx)(cr.A,{sx:iU({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function YB(e){let{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,_.jsxs)(eH.A,{spacing:.5,children:[(0,_.jsxs)(cr.A,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,_.jsx)(YN,{markerColor:n,sx:{marginTop:.25}}),(0,_.jsxs)(cr.A,{component:"span",children:[r,(0,_.jsx)(cr.A,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,_.jsx)(g2,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,_.jsx)(cr.A,{sx:e=>({color:e.palette.common.white}),children:i.map(e=>{if(e){let[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,_.jsxs)(cr.A,{sx:{display:"flex",gap:"4px"},children:[(0,_.jsx)(cp.A,{sx:{fontSize:"11px"},children:r}),(0,_.jsx)(cp.A,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}})})]})}let Yz=375,Yj=650,YF=650,YV=500,Y$=.75,YH=8,YW=750,YG="nearby series showing in tooltip",YU="emphasized series showing as bold in tooltip",Yq="#2E313E",YY=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),YX={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},YZ=[],YK=()=>{let[e,t]=(0,I.useState)(null);return(0,I.useEffect)(()=>{let e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),e},YQ={wrapLabels:!0,enablePinning:!0},YJ="Click chart to pin",Y0="Click chart to unpin";function Y1(e){let{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),l=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&l.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,_.jsx)(YB,{formattedY:n,metricName:e,metricLabels:l,markerColor:r})}let u=t.replace(/[,]/g,", ");return(0,_.jsxs)(cr.A,{sx:{display:"table-row",paddingTop:.5},children:[(0,_.jsxs)(cr.A,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,_.jsx)(YN,{markerColor:r,sx:{marginTop:.5}}),(0,_.jsx)(cr.A,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:YV,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?YU:YG,children:u})]}),(0,_.jsx)(cr.A,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}function Y2(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}function Y5(e,t,n,r,i){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let o=n>0?n:YF,a=r>0?r:Yj,s=e.page.x+32,l=e.page.y+16;if(i){let e=i.getBoundingClientRect();s=s-e.left+i.scrollLeft,l=l-e.top+i.scrollTop;let t=e.top+i.scrollHeight;l+o>t&&(l=Math.max(t-o-16,YH/2))}else l+o>window.innerHeight+window.scrollY&&(l=Math.max(window.innerHeight+window.scrollY-o-16,YH/2));return s+a>window.innerWidth&&(s=e.page.x-a-32),s<32&&(s=32),l<YH/2&&(l=YH/2),`translate3d(${s}px, ${l}px, 0)`}function Y4(e,t,n){return{minWidth:Yz,maxWidth:Yj,maxHeight:(n?n-YH:void 0)??YF,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??Yq,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"opacity 0.1s ease-out, visibility 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}function Y3(e,t){try{let n=t.convertToPixel("grid",[e,0]);return n?.[0]??null}catch{return null}}function Y6(e,t,n,r){let i=n[e];if(!i)return t;let o=i.stack;if(!o)return t;let a=o.toString(),s=(r.get(a)??0)+t;return r.set(a,s),s}function Y8(e,t,n){let r,i,o=t.indexOf(e);if(-1===o)return 20;let a=o>0?t[o-1]??null:null,s=o<t.length-1?t[o+1]??null:null,l=Y3(e,n);if(null===l)return 20;if(null!==a&&null!==s){let e=Y3(a,n)??l,t=Y3(s,n)??l;r=(l+e)/2,i=(l+t)/2}else if(null!==a){let e=Y3(a,n)??l;r=(l+e)/2,i=l+(l-r)}else{if(null===s)return 20;let e=Y3(s,n)??l;i=(l+e)/2,r=l-(i-l)}return Math.max(1,i-r)}function Y9(e,t,n,r){let i=t/Math.max(1,r),o=n-t/2+e*i;return{left:o,right:o+i}}function Y7(e,t,n){try{let r=n.convertToPixel("grid",[0,e]),i=n.convertToPixel("grid",[0,t]);if(!r||!i||void 0===r[1]||void 0===i[1])return null;return{top:Math.min(i[1],r[1]),bottom:Math.max(i[1],r[1])}}catch{return null}}let Xe=5.5,Xt=30,Xn=5;function Xr(e,t,n,r,i,o,a,s,l){let u=n[0]??null,c=n[1]??null;if(null===u||null===c||void 0===i.dispatchAction||!Array.isArray(e))return YZ;let d=iW(e[0]?.values,u);if(null===d)return YZ;let h=null;if(void 0!==s){let e=i.convertToPixel("grid",[0,c]),t=i.convertToPixel("grid",[0,c+r]);e&&t&&void 0!==e[1]&&void 0!==t[1]&&(h=Math.abs(t[1]-e[1]))}let p=l??Y3(d,i),f=function(e,t,n,r,i,o,a,s,l){let u=[],c=e.length,d=new Map,h=[],p=e[0]?.values;if(p&&p.length>0){let e=new Set;for(let[t]of p)e.has(t)||(e.add(t),h.push(t));h=h.toSorted((e,t)=>e-t)}let f=[];for(let e=0;e<c;e++)(t[e]?.type??"line")==="bar"&&f.push(e);let g=null,m=null;f.length>0&&null!==i&&(g=Y8(n,h,l),m=Y3(n,l));for(let h=0;h<c;h++){let c,p=t[h];if(!p)continue;let v=e[h];if(!v)continue;let y=v.values;if(!y||!Array.isArray(y))continue;let x=p.type??"line",b=p.name?p.name.toString():"",w=p.id?p.id.toString():"",S=(p.color??"#000").toString(),A=-1,C=0;for(let e=0;e<y.length;e++){let t=y[e];if(t&&t[0]===n){A=e,C=t[0],c=t[1];break}}if(-1===A||null==c)continue;let M=!1,k=c,T=1/0;if("line"===x)if(k=Y6(h,c,t,d),void 0!==o&&null!==s)try{let e=l.convertToPixel({seriesIndex:h},[A,k]);if(e&&void 0!==e[1]){let t=Math.abs(o-e[1]);M=t<=s,T=t}else{let e=Math.abs(k-r);M=e<=a,T=e}}catch{let e=Math.abs(k-r);M=e<=a,T=e}else{let e=Math.abs(k-r);M=e<=a,T=e}else if("bar"===x){if(null===i||null===g||null===m)continue;let e=f.indexOf(h);if(-1===e)continue;let n=Y9(e,g,m,f.length);if(!(i>=n.left&&i<=n.right))continue;let o=p.stack,a=!0;if(o){let e=o.toString(),n=Y7(d.get(e)??0,k=Y6(h,c,t,d),l);if(n){let e=l.convertToPixel("grid",[0,r]);e&&void 0!==e[1]&&(a=e[1]>=n.top&&e[1]<=n.bottom)}}else k=c;if(!a)continue;T=Math.abs(i-(n.left+n.right)/2),M=!0}M&&u.push({seriesIdx:h,datumIdx:A,seriesId:w,seriesName:b,date:n,markerColor:S,x:C,y:c,visualY:k,distance:T})}return u}(e,t,d,c,p,s,r,h,i),g=function(e){if(0===e.length)return null;let t=null;for(let n of e)(null===t||n.distance<t.distance)&&(t=n);return t}(f),m=new Set;for(let e of f)m.add(e.seriesIdx);let v=[];for(let t=0;t<e.length;t++)m.has(t)||v.push(t);return function(e,t,n,r,i,o){let a=[],s=[],l=[...o],u=[],c=[],d=new Map,h=[];for(let i of e){let e=r?.get(i.seriesId)??n,o=i.y,p=ix(o,e),f=null!==t&&i.seriesIdx===t.seriesIdx;if(f){s.push(i.seriesIdx);let e=d.get(o)??0;d.set(o,e+1),e>0&&c.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o}),u.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o})}else l.push(i.seriesIdx);h.push({seriesIdx:i.seriesIdx,datumIdx:i.datumIdx,seriesName:i.seriesName,date:i.date,x:i.x,y:o,formattedY:p,markerColor:i.markerColor,isClosestToCursor:f}),a.push(i.seriesIdx)}return i$(i,a,s,l,u,c),h}(f,g,o,a,i,v)}function Xi(e,t,n,r,i){let o=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return o;let l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<d;t++){let h=e.timeSeries[t];if(void 0===h||o.length>=1e3)break;let p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let g=0;g<h.data.length;g++){let m=e.xAxis[g]??0,v=h.data[g];if(null!=v&&a===g&&"-"!==v&&s<=v+n&&s>=v-n){let e=Xa({valueToCheck:s,baseValue:v,percentage:Math.max(d>Xn?2:5,100/d)});e?u.push(t):(c.push(t),r?.dispatchAction!==void 0&&r.dispatchAction({type:"downplay",seriesIndex:t}));let n=m>0x174876e7ff?m:1e3*m,a=ix(v,i);o.push({seriesIdx:t,datumIdx:g,seriesName:p,date:n,x:m,y:v,formattedY:a,markerColor:f.toString(),isClosestToCursor:e}),l.push(t)}}}return r?.dispatchAction!==void 0&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function Xo({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:i,format:o,seriesFormatMap:a,showAllSeries:s=!1}){if(void 0===i||null===e)return YZ;let l=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(l=!0)}}if(null!==t&&(e=t,l=!0),!1===l||null===n||void 0===i._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return YZ;let u=e.plotCanvas.y,c=e.plotCanvas.x,d=iV(c,u,i);if(null!==d){let e=i._model.getComponent("yAxis").axis.scale,t="log"===e.type,l=e._interval;if(t&&e.base){let t=e.base,n=e._extent,r=t**n[0];l=(t**n[1]-r)/100}let h=Xs({yInterval:l,totalSeries:n.length,showAllSeries:s}),p=r.some(e=>void 0!==e.yAxisIndex&&e.yAxisIndex>0);return Xr(n,r,d,h,i,o,a,p?u:void 0,c)}return YZ}function Xa({valueToCheck:e,baseValue:t,percentage:n}){let r=n/100*t;return e>=t-r&&e<=t+r}function Xs({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let r=.3*e;return t>Xn?Math.max(r,e*Xt/t):Math.max(r,e*Xe)}function Xl(e){let{series:t,wrapLabels:n}=e,r=(0,I.useMemo)(()=>null===t?null:t.toSorted((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===r?null:(0,_.jsx)(cr.A,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map(({datumIdx:e,seriesIdx:t,seriesName:i,y:o,formattedY:a,markerColor:s,isClosestToCursor:l})=>{if(null===e||null===t)return null;let u=t.toString()+e.toString();return(0,_.jsx)(Y1,{seriesName:i,y:o,formattedY:a,markerColor:s,totalSeries:r.length,wrapLabels:n,emphasizeText:l},u)})})}function Xu(e){return(0,V.Ay)("MuiSwitch",e)}let Xc=(0,F.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Xd=(0,N.A)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,L.A)(n.edge)}`],t[`size${(0,L.A)(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,[`& .${Xc.thumb}`]:{width:16,height:16},[`& .${Xc.switchBase}`]:{padding:4,[`&.${Xc.checked}`]:{transform:"translateX(16px)"}}}}]}),Xh=(0,N.A)(fA,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${Xc.input}`]:t.input},"default"!==n.color&&t[`color${(0,L.A)(n.color)}`]]}})((0,B.A)(({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}),[`&.${Xc.checked}`]:{transform:"translateX(20px)"},[`&.${Xc.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Xc.checked} + .${Xc.track}`]:{opacity:.5},[`&.${Xc.disabled} + .${Xc.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${Xc.input}`]:{left:"-100%",width:"300%"}})),(0,B.A)(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,z.A)(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Xc.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xc.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,E.a)(e.palette[t].main,.62):(0,E.e$)(e.palette[t].main,.55)}`}},[`&.${Xc.checked} + .${Xc.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),Xp=(0,N.A)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,B.A)(({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}`}))),Xf=(0,N.A)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,B.A)(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Xg=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s,slots:l={},slotProps:u={},...c}=n,d={...n,color:i,edge:o,size:a},h=(e=>{let{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&`edge${(0,L.A)(n)}`,`size${(0,L.A)(r)}`],switchBase:["switchBase",`color${(0,L.A)(i)}`,o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,R.A)(s,Xu,t);return{...t,...l}})(d),p={slots:l,slotProps:u},[f,g]=(0,cm.A)("root",{className:(0,O.A)(h.root,r),elementType:Xd,externalForwardedProps:p,ownerState:d,additionalProps:{sx:s}}),[m,v]=(0,cm.A)("thumb",{className:h.thumb,elementType:Xf,externalForwardedProps:p,ownerState:d}),y=(0,_.jsx)(m,{...v}),[x,b]=(0,cm.A)("track",{className:h.track,elementType:Xp,externalForwardedProps:p,ownerState:d});return(0,_.jsxs)(f,{...g,children:[(0,_.jsx)(Xh,{type:"checkbox",icon:y,checkedIcon:y,ref:t,ownerState:d,...c,classes:{...h,root:h.switchBase},slots:{...l.switchBase&&{root:l.switchBase},...l.input&&{input:l.input}},slotProps:{...u.switchBase&&{root:"function"==typeof u.switchBase?u.switchBase(d):u.switchBase},...u.input&&{input:"function"==typeof u.input?u.input(d):u.input}}}),(0,_.jsx)(x,{...b})]})});var Xm=n(4491),Xv=n(29917);let Xy=(0,I.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:o,onUnpinClick:a}){let s,l,u,{formatWithUserTimeZone:c}=u7(),d=e[0]?.date??null;if(null===d)return null;let h=i&&t>5;return(0,_.jsxs)(cr.A,{sx:e=>({width:"100%",maxWidth:Yj,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??Yq,position:"sticky",top:0,left:0}),children:[(0,_.jsxs)(cr.A,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(l=c(s=new Date(d),"MMM dd, yyyy - "),u=c(s,"HH:mm:ss"),(0,_.jsxs)(cr.A,{children:[(0,_.jsx)(cp.A,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:l}),(0,_.jsx)(cp.A,{variant:"caption",children:(0,_.jsx)("strong",{children:u})})]})),(0,_.jsxs)(eH.A,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[h&&(0,_.jsxs)(eH.A,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,_.jsx)(cp.A,{sx:{fontSize:11},children:"Show All"}),(0,_.jsx)(Xg,{checked:r,size:"small",onChange:(e,t)=>{if(void 0!==o)return o(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),i&&(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",children:[(0,_.jsx)(cp.A,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?Y0:YJ}),n?(0,_.jsx)(Xm,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,_.jsx)(Xv,{sx:{fontSize:16}})]})]})]}),(0,_.jsx)(g2,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})}),Xx=(0,I.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:i=!0,wrapLabels:o,format:a,seriesFormatMap:s,onUnpinClick:l,pinnedPos:u}){var c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k;let[T,D]=(0,I.useState)(!1),O=(0,I.useRef)(),R=(0,I.useRef)(null),E=YK(),{height:P,width:L,ref:N}=(void 0===c&&(c={}),d=c.onResize,(h=(0,I.useRef)(void 0)).current=d,p=c.round||Math.round,f=(0,I.useRef)(),m=(g=(0,I.useState)({width:void 0,height:void 0}))[0],v=g[1],y=(0,I.useRef)(!1),(0,I.useEffect)(function(){return y.current=!1,function(){y.current=!0}},[]),x=(0,I.useRef)({width:void 0,height:void 0}),b=(0,I.useCallback)(function(e){return f.current&&f.current.box===c.box&&f.current.round===p||(f.current={box:c.box,round:p,instance:new ResizeObserver(function(e){var t=e[0],n="border-box"===c.box?"borderBoxSize":"device-pixel-content-box"===c.box?"devicePixelContentBoxSize":"contentBoxSize",r=Y2(t,n,"inlineSize"),i=Y2(t,n,"blockSize"),o=r?p(r):void 0,a=i?p(i):void 0;if(x.current.width!==o||x.current.height!==a){var s={width:o,height:a};x.current.width=o,x.current.height=a,h.current?h.current(s):y.current||v(s)}})}),f.current.instance.observe(e,{box:c.box}),function(){f.current&&f.current.instance.unobserve(e)}},[c.box,p]),w=c.ref,S=(0,I.useRef)(null),(A=(0,I.useRef)(null)).current=w,C=(0,I.useRef)(null),(0,I.useEffect)(function(){M()}),M=(0,I.useCallback)(function(){var e=C.current,t=A.current,n=e||(t?t instanceof Element?t:t.current:null);S.current&&S.current.element===n&&S.current.subscriber===b||(S.current&&S.current.cleanup&&S.current.cleanup(),S.current={element:n,subscriber:b,cleanup:n?b(n):void 0})},[b]),(0,I.useEffect)(function(){return function(){S.current&&S.current.cleanup&&(S.current.cleanup(),S.current=null)}},[]),k=(0,I.useCallback)(function(e){C.current=e,M()},[M]),(0,I.useMemo)(function(){return{ref:k,width:m.width,height:m.height}},[k,m.width,m.height])),B=null!==u&&i,z=(0,I.useCallback)(e=>{R.current=e,N(e)},[N]),j=e?document.querySelector(e):void 0;if((0,I.useLayoutEffect)(()=>{if(null===E)return;let e=R.current;if(!e)return;let t=e.getBoundingClientRect();if(0===t.height||0===t.width)return;let n=Y5(E,u,t.height,t.width,j);n&&n!==O.current&&(O.current=n,e.style.transform=n)}),null===E||null===E.target||null===n||null===u&&"CANVAS"!==E.target.tagName)return null;let F=t.current,V=j?j.getBoundingClientRect().height:void 0;O.current=Y5(E,u,P??0,L??0,j);let $=Xo({mousePos:E,data:n,seriesMapping:r,pinnedPos:u,chart:F,format:a,seriesFormatMap:s,showAllSeries:T});if(0===$.length)return null;let H=n.length;return(0,_.jsx)(m9.A,{container:j,children:(0,_.jsx)(cr.A,{ref:z,sx:e=>Y4(e,u,V),style:{transform:O.current},children:(0,_.jsxs)(eH.A,{spacing:.5,children:[(0,_.jsx)(Xy,{nearbySeries:$,totalSeries:H,enablePinning:i,isTooltipPinned:B,showAllSeries:T,onShowAllClick:e=>D(e),onUnpinClick:l}),(0,_.jsx)(Xl,{series:$,wrapLabels:o})]})})})}),Xb=(0,N.A)(eV)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),Xw=(0,I.forwardRef)(function(e,t){return(0,_.jsx)(Xb,{ref:t,variant:"outlined",color:"secondary",...e})}),XS=Object.entries(iy).map(([e,t])=>({...t,id:e,group:t.group||"Decimal"})).filter(e=>!e.disableSelectorOption);function XA({value:e,onChange:t,disabled:n=!1,...r}){let i=iy[e?.unit||"decimal"];return(0,_.jsx)(y7,{value:{id:e?.unit||"decimal",...i},options:XS,groupBy:e=>e.group??"Decimal",onChange:(e,n)=>{null===n?t(void 0):t({unit:n.id})},disabled:n,disableClearable:!0,renderInput:({InputProps:e,...r})=>(0,_.jsx)(eX.A,{...r,slotProps:{input:{...e,endAdornment:(0,_.jsxs)(_.Fragment,{children:[e.endAdornment,(0,_.jsx)(g7,{position:"end",children:(0,_.jsx)(eY,{size:"small","aria-label":"clear unit",onClick:()=>t(void 0),disabled:n,tabIndex:-1,children:(0,_.jsx)(vv,{fontSize:"small"})})})]})}}}),...r})}let XC=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function XM({value:e,onChange:t,disabled:n=!1}){var r;let i=i_(e),o=iI(e);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(yb,{label:"Short values",control:(0,_.jsx)(Xg,{checked:!!o&&rd(e.shortValues),onChange:(n,r)=>{o&&t({...e,shortValues:r})},disabled:!o})}),(0,_.jsx)(yb,{label:"Unit",control:(0,_.jsx)(XA,{value:e,onChange:e=>{t(e||{unit:"decimal"})},disabled:n})}),(0,_.jsx)(yb,{label:"Decimals",control:(0,_.jsx)(y7,{value:(r=e.decimalPlaces,XC.find(e=>e.decimalPlaces===r)),options:XC,getOptionLabel:e=>e.label,onChange:(n,r)=>(({decimalPlaces:n})=>{i&&t({...e,decimalPlaces:n})})(r),disabled:!i,disableClearable:!0})})]})}function Xk({name:e,height:t}){return(0,_.jsx)(cr.A,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,_.jsx)(cp.A,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var XT=n(74626);let X_=ae((0,XT.A)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),XI={chartsTheme:X_,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null},XD={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${Ix.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${Ix.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${Ix.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${Ix.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${Ix.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${Ix.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${Ix.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${Ix.icon}`]:{color:e.palette.warning.main}},root:{["& ."+gI.root]:{textDecoration:"underline"}}}},XO={styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},XR={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},XE="#FFFFFF",XP={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},XL={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},XN={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},XB={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},Xz={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},Xj=e=>"light"===e?{main:XR["500"],dark:XR["600"],light:XR["50"]}:{main:XR["400"],dark:XR["800"],light:XR["200"]},XF={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontSize:"1.5rem",fontWeight:600,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:600,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:600,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:600,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},XV=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function X$(e,t={},n=!1){var r,i;let o;return(0,XT.A)({palette:function(e){let t,n,r,i;return{mode:e,primary:Xj(e),secondary:"light"===e?{main:XP["600"],dark:XP["900"],light:XP["100"]}:{main:XE,dark:XE,light:XE},grey:"light"===e?{50:XP["50"],100:XP["100"],200:XP["200"],300:XP["300"],400:XP["400"],500:XP["500"],600:XP["600"],700:XP["700"],800:XP["800"],900:XP["900"],950:XP["950"]}:{50:XP["950"],100:XP["900"],200:XP["800"],300:XP["700"],400:XP["600"],500:XP["500"],600:XP["400"],700:XP["300"],800:XP["200"],900:XP["100"],950:XP["50"]},background:(t=XR["150"],n="rgba(21, 23, 33, 0.75)","light"===e?{navigation:t,overlay:n,default:XE,paper:XP["50"],code:XP["50"],tooltip:XP["100"],lighter:XP["50"],border:XP["100"]}:{navigation:t,overlay:n,default:XP["900"],paper:XP["850"],code:XP["800"],tooltip:XP["600"],lighter:XP["700"],border:XP["600"]}),text:(r=XP["800"],i=XP["300"],"light"===e?{navigation:r,accent:i,primary:XP["800"],secondary:XP["700"],disabled:XP["300"],link:XR["500"],linkHover:XR["600"]}:{navigation:r,accent:i,primary:XE,secondary:XP["50"],disabled:XP["600"],link:XR["400"],linkHover:XR["500"]}),error:"light"===e?{main:Xz["500"],dark:Xz["600"],light:Xz["50"]}:{main:Xz["400"],dark:Xz["800"],light:Xz["300"]},warning:"light"===e?{main:XN["500"],dark:XN["700"],light:XN["50"]}:{main:XN["400"],dark:XN["800"],light:XN["300"]},info:Xj(e),success:"light"===e?{main:XL["500"],dark:XL["700"],light:XL["50"]}:{main:XL["400"],dark:XL["800"],light:XL["300"]},common:{white:XE,black:"#000000"},designSystem:{blue:XR,green:XL,grey:XP,orange:XN,purple:XB,red:Xz}}}(e),typography:XF,mixins:{},components:(r=e,i=n,o={MuiAlert:XD,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:XO,MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:XV}},MuiDialog:{styleOverrides:{paper:XV}},MuiPopover:{styleOverrides:{paper:XV}}},i?o:{MuiCssBaseline:{styleOverrides:{body:{colorScheme:r}}},...o}),...t})}var XH=n(87275),XW=n(11061),XG=n(78536),XU=n(1355);function Xq({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",children:[(0,_.jsx)(y9,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,_.jsx)(eX.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XY({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",gap:1,alignItems:"center",children:[(0,_.jsx)(y9,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,_.jsx)(eX.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,_.jsx)(vA,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XX({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",children:[(0,_.jsx)(vA,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XZ({value:e,onChange:t}){return(0,_.jsx)(eH.A,{direction:"row",children:(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function XK({value:e,onChange:t,...n}){return(0,_.jsxs)(eH.A,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,_.jsxs)(vA,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,_.jsx)(fX,{value:"JoinByColumnValue",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Join by column value"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,_.jsx)(fX,{value:"MergeColumns",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge columns"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,_.jsx)(fX,{value:"MergeIndexedColumns",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge indexed columns"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,_.jsx)(fX,{value:"MergeSeries",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge series"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,_.jsx)(Xq,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,_.jsx)(XY,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,_.jsx)(XX,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,_.jsx)(XZ,{value:e,onChange:t})]})}function XQ({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:o,...a}){return(0,_.jsxs)(eH.A,{...a,children:[(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,_.jsxs)(eH.A,{direction:"row",gap:1,children:[(0,_.jsx)(eY,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,_.jsx)(XW,{}):(0,_.jsx)(XH,{})}),(0,_.jsx)(cp.A,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,_.jsx)("span",{children:(0,_.jsx)("strong",{children:iP[t.kind]})}):(0,_.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,_.jsxs)(eH.A,{direction:"row",gap:1,children:[n&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(vg,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,_.jsx)(XG,{}):(0,_.jsx)(XU,{})})}),(0,_.jsx)(g2,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,_.jsx)(vg,{title:"Remove transformation",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,_.jsx)($_,{})})})]})]}),!n&&(0,_.jsx)(XK,{value:t,onChange:r})]})}function XJ({value:e,onChange:t,...n}){let[r,i]=(0,I.useState)(e.map(()=>!0));return(0,_.jsxs)(eH.A,{gap:1,...n,children:[e.map((n,o)=>(0,_.jsx)(XQ,{index:o,value:n,isCollapsed:r[o]??!0,onChange:n=>{let r;(r=[...e])[o]=n,t(r)},onDelete:()=>{let n;(n=[...e]).splice(o,1),t(n),i(e=>(e.splice(o,1),[...e]))},onCollapse:e=>{i(t=>(t[o]=e,[...t]))}},o)),(0,_.jsx)(eV,{variant:"contained",startIcon:(0,_.jsx)($T,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),i(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function X0(e){let{value:t,onChange:n,timeOptions:r,height:i}=e,o=(0,I.useMemo)(()=>{if(t&&!r.some(e=>e.value.pastDuration===t))return(0,_.jsx)(fX,{value:t,children:t})},[r,t]);return(0,_.jsx)(yf.A,{children:(0,_.jsx)(cr.A,{children:(0,_.jsxs)(fZ.A,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map((e,t)=>(0,_.jsx)(fX,{value:e.value.pastDuration,children:e.display},t)),o]})})})}function X1({repeatItems:e,maxPer:t,gap:n,renderItem:r,containerSx:i,rowSx:o}){let{rows:a,perRow:s}=(0,I.useMemo)(()=>{let n=Math.max(1,t),r=[];for(let t=0;t<e.length;t+=n)r.push(e.slice(t,t+n));return{rows:r,perRow:n}},[t,e]);return(0,_.jsx)(cr.A,{sx:[{display:"flex",flexDirection:"column",width:"100%",height:"100%",gap:`${n}px`},...Array.isArray(i)?i:[i]],children:a.map((e,t)=>(0,_.jsx)(cr.A,{sx:[{display:"flex",gap:`${n}px`},...Array.isArray(o)?o:[o]],children:e.map((e,i)=>(0,_.jsx)(cr.A,{sx:{width:`calc((100% - ${n*(s-1)}px) / ${s})`,overflow:"hidden"},children:r(e,{rowIndex:t,colIndex:i})},`${t}-${i}`))},t))})}var X2=n(94237),X5=n(7939),X4=n(26041),X3=n(80787);let X6=(e,t,n)=>{let r=e.keys[0];if(Array.isArray(t))t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)});else if(t&&"object"==typeof t){let i,o;(Object.keys(t).length>e.keys.length?e.keys:(i=e.keys,o=Object.keys(t),i.filter(e=>o.includes(e)))).forEach(i=>{if(e.keys.includes(i)){let o=t[i];void 0!==o&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},o)}})}else("number"==typeof t||"string"==typeof t)&&n((e,t)=>{Object.assign(e,t)},t)};function X8(e){return`--Grid-${e}Spacing`}function X9(e){return`--Grid-parent-${e}Spacing`}let X7="--Grid-columns",Ze="--Grid-parent-columns",Zt=({theme:e,ownerState:t})=>{let n={};return X6(e.breakpoints,t.size,(e,t)=>{let r={};"grow"===t&&(r={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(r={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${Ze}) - (var(${Ze}) - ${t}) * (var(${X9("column")}) / var(${Ze})))`}),e(n,r)}),n},Zn=({theme:e,ownerState:t})=>{let n={};return X6(e.breakpoints,t.offset,(e,t)=>{let r={};"auto"===t&&(r={marginLeft:"auto"}),"number"==typeof t&&(r={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${Ze}) + var(${X9("column")}) * ${t} / var(${Ze}))`}),e(n,r)}),n},Zr=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[X7]:12};return X6(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[X7]:r,"> *":{[Ze]:r}})}),n},Zi=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.rowSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[X8("row")]:i,"> *":{[X9("row")]:i}})}),n},Zo=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.columnSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[X8("column")]:i,"> *":{[X9("column")]:i}})}),n},Za=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Zs=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${X8("row")}) var(${X8("column")})`}}),Zl=(0,X3.A)(),Zu=(0,X5.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Zc(e){return(0,$P.A)({props:e,name:"MuiGrid",defaultTheme:Zl})}let Zd=function(e={}){let{createStyledComponent:t=Zu,useThemeProps:n=Zc,useTheme:r=X4.A,componentName:i="MuiGrid"}=e;function o(e,t,n=()=>!0){let r={};return null===e||(Array.isArray(e)?e.forEach((e,i)=>{null!==e&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let i=e[t];null!=i&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let a=t(Zr,Zo,Zi,Zt,Za,Zs,Zn),s=I.forwardRef(function(e,t){var s;let l,u=r(),c=n(e),d=(0,yo.A)(c);s=u.breakpoints,l=[],void 0!==d.item&&(delete d.item,l.push("item")),void 0!==d.zeroMinWidth&&(delete d.zeroMinWidth,l.push("zeroMinWidth")),s.keys.forEach(e=>{void 0!==d[e]&&(l.push(e),delete d[e])});let{className:h,children:p,columns:f=12,container:g=!1,component:m="div",direction:v="row",wrap:y="wrap",size:x={},offset:b={},spacing:w=0,rowSpacing:S=w,columnSpacing:A=w,unstable_level:C=0,...M}=d,k=o(x,u.breakpoints,e=>!1!==e),T=o(b,u.breakpoints),D=e.columns??(C?void 0:f),E=e.spacing??(C?void 0:w),P=e.rowSpacing??e.spacing??(C?void 0:S),L=e.columnSpacing??e.spacing??(C?void 0:A),N={...d,level:C,columns:D,container:g,direction:v,wrap:y,spacing:E,rowSpacing:P,columnSpacing:L,size:k,offset:T},B=((e,t)=>{let n,{container:r,direction:o,spacing:a,wrap:s,size:l}=e,u={root:["root",r&&"container","wrap"!==s&&`wrap-xs-${String(s)}`,...void 0===o?[]:"object"==typeof o?Object.entries(o).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(o)}`],...(n=[],Object.entries(l).forEach(([e,t])=>{!1!==t&&void 0!==t&&n.push(`grid-${e}-${String(t)}`)}),n),...r?((e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]})(a,t.breakpoints.keys[0]):[]]};return(0,R.A)(u,e=>(0,V.Ay)(i,e),{})})(N,u);return(0,_.jsx)(a,{ref:t,as:m,ownerState:N,className:(0,O.A)(B.root,h),...M,children:I.Children.map(p,e=>I.isValidElement(e)&&(0,X2.A)(e,["Grid"])&&g&&e.props.container?I.cloneElement(e,{unstable_level:e.props?.unstable_level??C+1}):e)})});return s.muiName="Grid",s}({createStyledComponent:(0,N.A)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,j.b)({props:e,name:"MuiGrid2"}),useTheme:cn.A}),Zh=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsx)(eX.A,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,_.jsxs)(eH.A,{gap:1,direction:"row",...n,children:[(0,_.jsx)(eX.A,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,_.jsx)(eX.A,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsx)(eX.A,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsxs)(eX.A,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,_.jsx)(fX,{value:"empty",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Empty"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches empty string"})]})}),(0,_.jsx)(fX,{value:"null",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Null"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches null or undefined"})]})}),(0,_.jsx)(fX,{value:"NaN",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"NaN"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,_.jsx)(fX,{value:"true",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"True"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches true boolean"})]})}),(0,_.jsx)(fX,{value:"false",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"False"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},Zp=({mapping:e,onChange:t,onDelete:n,...r})=>{let i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,_.jsxs)(Zd,{container:!0,spacing:2,...r,children:[(0,_.jsx)(Zd,{size:{xs:5},children:(0,_.jsxs)(eH.A,{direction:"row",gap:1,width:"100%",children:[(0,_.jsxs)(eX.A,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,_.jsx)(fX,{value:"Value",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Value"}),"Value"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches an exact text value"})]})}),(0,_.jsx)(fX,{value:"Range",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Range"}),"Range"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,_.jsx)(fX,{value:"Regex",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Regex"}),"Regex"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,_.jsx)(fX,{value:"Misc",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Misc"}),"Misc"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,_.jsx)(Zh,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,_.jsx)(Zd,{size:{xs:4},children:(0,_.jsx)(eX.A,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,_.jsx)(Zd,{size:{xs:1},children:(0,_.jsx)(eH.A,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,_.jsx)(ce,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,_.jsx)(eY,{onClick:()=>i("#000"),children:(0,_.jsx)($T,{})})})}),(0,_.jsx)(Zd,{size:{xs:1},textAlign:"end",children:(0,_.jsx)(vg,{title:"Remove mapping settings",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,_.jsx)($_,{})})})})]})},Zf=({mappings:e,onChange:t})=>{let[n,r]=(0,I.useState)(e);return(0,_.jsxs)(eH.A,{spacing:1,children:[(0,_.jsxs)(Zd,{container:!0,spacing:2,children:[(0,_.jsx)(Zd,{size:{xs:5},children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Condition"})}),(0,_.jsx)(Zd,{size:{xs:4},children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Display Text"})}),(0,_.jsx)(Zd,{size:{xs:1},textAlign:"center",children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Color"})}),(0,_.jsx)(Zd,{size:{xs:1}})]}),(0,_.jsx)(eH.A,{gap:1.5,divider:(0,_.jsx)(g2,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,i)=>(0,_.jsx)(Zp,{mapping:e,onChange:e=>{let o;(o=[...n])[i]=e,r(o),t(o)},onDelete:()=>{let e;(e=[...n]).splice(i,1),r(e),t(e)}},i))}),(0,_.jsx)(eV,{variant:"contained",startIcon:(0,_.jsx)($T,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}},65130(e,t,n){"use strict";n.d(t,{f:()=>o});var r=n(12015),i=n(4721);function o(e,t,n){let o=(0,i.a)(e,n?.in);return isNaN(t)?(0,r.w)(n?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}},38086(e,t,n){"use strict";n.d(t,{P:()=>o});var r=n(12015),i=n(4721);function o(e,t,n){let o=(0,i.a)(e,n?.in);if(isNaN(t))return(0,r.w)(n?.in||e,NaN);if(!t)return o;let a=o.getDate(),s=(0,r.w)(n?.in||e,o.getTime());return(s.setMonth(o.getMonth()+t+1,0),a>=s.getDate())?s:(o.setFullYear(s.getFullYear(),s.getMonth(),a),o)}},30439(e,t,n){"use strict";n.d(t,{_P:()=>a,my:()=>r,s0:()=>o,w4:()=>i});let r=6048e5,i=864e5,o=36e5,a=Symbol.for("constructDateFrom")},12015(e,t,n){"use strict";n.d(t,{w:()=>i});var r=n(30439);function i(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&r._P in e?e[r._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},4721(e,t,n){"use strict";n.d(t,{a:()=>i});var r=n(12015);function i(e,t){return(0,r.w)(t||e,e)}}}]);
144
+ Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.`);return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},WR=(e,t)=>{let n=[],r=e.date(void 0,"default"),i=e.startOfWeek(r),o=e.endOfWeek(r),a=i;for(;e.isBefore(a,o);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},WE=(e,t,n,r)=>{switch(n){case"month":return $Y(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return WR(e,r);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},WP=["0","1","2","3","4","5","6","7","8","9"],WL=(e,t)=>{if("0"===t[0])return e;let n=[],r="";for(let i=0;i<e.length;i+=1){r+=e[i];let o=t.indexOf(r);o>-1&&(n.push(o.toString()),r="")}return n.join("")},WN=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),WB=(e,t)=>{let n=WL(e,t);return" "!==n&&!Number.isNaN(Number(n))},Wz=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},Wj=(e,t,n,r,i)=>{if("day"===i.type&&"digit-with-letter"===i.contentType){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let o=t.toString();return i.hasLeadingZerosInInput&&(o=Wz(o,i.maxLength)),WN(o,r)},WF=(e,t,n)=>{let r=e.value||e.placeholder,i="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(WL(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!i&&1===r.length&&(r=`${r}\u200e`),"input-rtl"===t&&(r=`\u2068${r}\u2069`),r},WV=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),W$=(e,t,n,r)=>{if("digit"!==t)return!1;let i=e.date(void 0,"default");switch(n){case"year":if("dayjs"===e.lib&&"YY"===r)return!0;return e.formatByString(e.setYear(i,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(i),r).length>1;case"day":return e.formatByString(e.startOfMonth(i),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),r).length>1;case"hours":return e.formatByString(e.setHours(i,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error("Invalid section type")}},WH=(e,t)=>{},WW={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},WG=(e,t,n,r,i)=>[...n].sort((e,t)=>WW[e.type]-WW[t.type]).reduce((n,r)=>!i||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=WR(e,t.format),i=e.formatByString(n,t.format),o=r.indexOf(i),a=r.indexOf(t.value);return e.addDays(n,a-o)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),i=e.getHours(r);if(t&&i>=12)return e.addHours(r,-12);if(!t&&i<12)return e.addHours(r,12);return r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),WU=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){let n=t.findIndex(t=>t.type===e);return -1===n?null:n}return e},Wq=["value","referenceDate"],WY={emptyValue:null,getTodayValue:$X,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,en.A)(e,Wq);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():WD(t,n,$X(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=WD(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=WD(t,n,e.maxDate));let a=HV(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=WD(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:$G(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=WD(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:$G(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!(e.isValid(t)||null==t||e.isValid(n))&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},WX={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let r=e.map(e=>{let r=WF(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`\u2066${r}\u2069`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},WZ=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],WK=(0,N.A)(H6,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),WQ=(0,N.A)(H4,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),WJ=["hours","minutes"],W0=I.forwardRef(function(e,t){let n=$H().utils,r=$N({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:a,slots:s,slotProps:l,value:u,defaultValue:c,referenceDate:d,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:p,minTime:f,disableFuture:g,disablePast:m,minutesStep:v=1,shouldDisableTime:y,showViewSwitcher:x,onChange:b,view:w,views:S=WJ,openTo:A,onViewChange:C,focusedView:M,onFocusedViewChange:k,className:T,disabled:D,readOnly:E,timezone:P}=r,L=(0,en.A)(r,WZ),{value:N,handleValueChange:B,timezone:z}=W_({name:"TimeClock",timezone:P,value:u,defaultValue:c,referenceDate:d,onChange:b,valueManager:WY}),j=(({value:e,referenceDate:t,utils:n,props:r,timezone:i})=>{let o=I.useMemo(()=>WY.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:WI.day,timezone:i,getTodayDate:()=>$X(n,i,"date")}),[]);return e??o})({value:N,referenceDate:d,utils:n,props:r,timezone:z}),F=$H().localeText,V=$W(z),{view:$,setView:H,previousView:W,nextView:G,setValueAndGoToNextView:U}=H3({view:w,views:S,openTo:A,onViewChange:C,onChange:B,focusedView:M,onFocusedViewChange:k}),{meridiemMode:q,handleMeridiemChange:Y}=H$(j,i,U),X=I.useCallback((e,t)=>{let r=HV(h,n),o="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(f&&r(f,t)||p&&r(e,p)||g&&r(e,V)||m&&r(V,o?t:e)),s=(e,r=1)=>{if(e%r!=0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(j,e),"hours");case"minutes":return!y(n.setMinutes(j,e),"minutes");case"seconds":return!y(n.setSeconds(j,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=Hj(e,q,i),r=n.setHours(j,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{let t=n.setMinutes(j,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,v)}case"seconds":{let t=n.setSeconds(j,e);return!a({start:t,end:t})||!s(e)}default:throw Error("not supported")}},[i,j,h,p,q,f,v,y,n,g,m,V,S]),Z=(0,vX.A)(),K=I.useMemo(()=>{switch($){case"hours":{let e,t=(e,t)=>{let r=Hj(e,q,i);U(n.setHours(j,r),t,"hours")},r=n.getHours(j);return e=i?r>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:r,children:(({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:o})=>{let a=t?o.getHours(t):null,s=[],l=+!!e,u=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=l;t<=u;t+=1){let a=t.toString();0===t&&(a="00");let l=!e&&(0===t||t>12);a=o.formatNumber(a);let u=c(t);s.push((0,_.jsx)(WM,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s})({value:N,utils:n,ampm:i,onChange:t,getClockNumberText:F.hoursClockNumberText,isDisabled:e=>D||X(e,"hours"),selectedId:Z}),viewRange:e}}case"minutes":{let e=n.getMinutes(j),t=(e,t)=>{U(n.setMinutes(j,e),t,"minutes")};return{viewValue:e,onChange:t,children:Wk({utils:n,value:e,onChange:t,getClockNumberText:F.minutesClockNumberText,isDisabled:e=>D||X(e,"minutes"),selectedId:Z}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(j),t=(e,t)=>{U(n.setSeconds(j,e),t,"seconds")};return{viewValue:e,onChange:t,children:Wk({utils:n,value:e,onChange:t,getClockNumberText:F.secondsClockNumberText,isDisabled:e=>D||X(e,"seconds"),selectedId:Z}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[$,n,N,i,F.hoursClockNumberText,F.minutesClockNumberText,F.secondsClockNumberText,q,U,j,X,Z,D]),Q=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},H8,t)})(r);return(0,_.jsxs)(WK,(0,er.A)({ref:t,className:(0,O.A)(Q.root,T),ownerState:r},L,{children:[(0,_.jsx)(Wb,(0,er.A)({autoFocus:a??!!M,ampmInClock:o&&S.includes("hours"),value:N,type:$,ampm:i,minutesStep:v,isTimeDisabled:X,meridiemMode:q,handleMeridiemChange:Y,selectedId:Z,disabled:D,readOnly:E},K)),x&&(0,_.jsx)(WQ,{className:Q.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>H(W),isPreviousDisabled:!W,previousLabel:F.openPreviousView,onGoToNext:()=>H(G),isNextDisabled:!G,nextLabel:F.openNextView,ownerState:r})]}))}),W1=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:A,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T})=>(0,_.jsx)(W0,{view:e,onViewChange:t,focusedView:n&&Hz(n)?n:null,onFocusedViewChange:r,views:i.filter(Hz),value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:A,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T}),W2=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;let{shouldDisableDate:i,shouldDisableMonth:o,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=$q(r.utils,e.minDate,r.defaultDates.minDate),d=$q(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(i&&i(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};W2.valueManager=WY;let W5=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a,timezone:s})=>{let l=$H();return I.useCallback(u=>null!==W2({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a}}),[l,e,t,n,r,i,o,a,s])},W4=e=>(0,V.Ay)("MuiPickersFadeTransitionGroup",e);(0,F.A)("MuiPickersFadeTransitionGroup",["root"]);let W3=(0,N.A)(eu,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function W6(e){let t=$N({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},W4,t)})(t),s=(0,cn.A)();return i?n:(0,_.jsx)(W3,{className:(0,O.A)(a.root,r),children:(0,_.jsx)(vK.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},o)})}function W8(e){return(0,V.Ay)("MuiPickersDay",e)}let W9=(0,F.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),W7=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Ge=({theme:e})=>(0,er.A)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,E.X4)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${W9.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${W9.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${W9.disabled}:not(.${W9.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${W9.disabled}&.${W9.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${W9.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Gt=(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Gn=(0,N.A)(eS,{name:"MuiPickersDay",slot:"Root",overridesResolver:Gt})(Ge),Gr=(0,N.A)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Gt})(({theme:e})=>(0,er.A)({},Ge({theme:e}),{opacity:0,pointerEvents:"none"})),Gi=()=>{},Go=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:u,onClick:c,onDaySelect:d,onFocus:h=Gi,onBlur:p=Gi,onKeyDown:f=Gi,onMouseDown:g=Gi,onMouseEnter:m=Gi,outsideCurrentMonth:v,selected:y=!1,showDaysOutsideCurrentMonth:x=!1,children:b,today:w=!1}=n,S=(0,en.A)(n,W7),A=(0,er.A)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:y,showDaysOutsideCurrentMonth:x,today:w}),C=(e=>{let{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return(0,R.A)({root:["root",t&&!u&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},W8,l)})(A),M=$H().utils,k=I.useRef(null),T=(0,mn.A)(k,t);return((0,mr.A)(()=>{!r||a||u||v||k.current.focus()},[r,a,u,v]),v&&!x)?(0,_.jsx)(Gr,{className:(0,O.A)(C.root,C.hiddenDaySpacingFiller,i),ownerState:A,role:S.role}):(0,_.jsx)(Gn,(0,er.A)({className:(0,O.A)(C.root,i),ref:T,centerRipple:!0,disabled:a,tabIndex:y?0:-1,onKeyDown:e=>f(e,o),onFocus:e=>h(e,o),onBlur:e=>p(e,o),onMouseEnter:e=>m(e,o),onClick:e=>{a||d(o),v&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{g(e),v&&e.preventDefault()}},S,{ownerState:A,children:b||M.format(o,"dayOfMonth")}))}),Ga=I.memo(Go);function Gs(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Gl=n(64863),Gu=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Gs(e.className,t):e.setAttribute("class",Gs(e.className&&e.className.baseVal||"",t))})},Gc=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r&&n?n+"-":"",o=r?""+i+e:n[e],a=r?o+"-active":n[e+"Active"],s=r?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:a,doneClassName:s}},t}(0,ei.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,Gl.F)(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.split(" ").forEach(function(t){e.classList?e.classList.add(t):(e.classList?t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" "))||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&Gu(e,r),i&&Gu(e,i),o&&Gu(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,en.A)(e,["classNames"]));return D().createElement(bi.Ay,(0,er.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(D().Component);Gc.defaultProps={classNames:""},Gc.propTypes={};let Gd=e=>(0,V.Ay)("MuiPickersSlideTransition",e),Gh=(0,F.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Gp=["children","className","reduceAnimations","slideDirection","transKey","classes"],Gf=(0,N.A)(eu,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Gh["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Gh["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Gh.slideEnterActive}`]:t.slideEnterActive},{[`.${Gh.slideExit}`]:t.slideExit},{[`.${Gh["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Gh["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{let t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Gh["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Gh["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Gh.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Gh.slideExit}`]:{transform:"translate(0%)"},[`& .${Gh["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Gh["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),Gg=e=>(0,V.Ay)("MuiDayCalendar",e);(0,F.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let Gm=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Gv=["ownerState"],Gy=(0,N.A)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Gx=(0,N.A)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Gb=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),Gw=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),GS=(0,N.A)(cp.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,er.A)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),GA=(0,N.A)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),GC=(0,N.A)(function(e){let t=$N({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(0,en.A)(t,Gp),s=(e=>{let{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,R.A)(r,Gd,t)})(t),l=(0,cn.A)();if(i)return(0,_.jsx)("div",{className:(0,O.A)(s.root,r),children:n});let u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,_.jsx)(Gf,{className:(0,O.A)(s.root,r),childFactory:e=>I.cloneElement(e,{classNames:u}),role:"presentation",children:(0,_.jsx)(Gc,(0,er.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),o)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),GM=(0,N.A)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Gk=(0,N.A)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function GT(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:o,currentMonthNumber:a,isViewFocused:s}=e,l=(0,en.A)(e,Gm),{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:h,slots:p,slotProps:f,timezone:g}=t,m=$H().utils,v=$W(g),y=null!==r&&m.isSameDay(n,r),x=i.some(e=>m.isSameDay(e,n)),b=m.isSameDay(n,v),w=p?.day??Ga,S=(0,m8.A)({elementType:w,externalSlotProps:f?.day,additionalProps:(0,er.A)({disableHighlightToday:c,showDaysOutsideCurrentMonth:h,role:"gridcell",isAnimating:d,"data-timestamp":m.toJsDate(n).valueOf()},l),ownerState:(0,er.A)({},t,{day:n,selected:x})}),A=(0,en.A)(S,Gv),C=I.useMemo(()=>u||o(n),[u,o,n]),M=I.useMemo(()=>m.getMonth(n)!==a,[m,n,a]),k=I.useMemo(()=>{let e=m.startOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.startOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]),T=I.useMemo(()=>{let e=m.endOfMonth(m.setMonth(n,a));return h?m.isSameDay(n,m.endOfWeek(e)):m.isSameDay(n,e)},[a,n,h,m]);return(0,_.jsx)(w,(0,er.A)({},A,{day:n,disabled:C,autoFocus:s&&y,today:b,outsideCurrentMonth:M,isFirstVisibleCell:k,isLastVisibleCell:T,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":b?"date":void 0}))}function G_(e){let t,n=$N({props:e,name:"MuiDayCalendar"}),r=$H().utils,{onFocusedDayChange:i,className:o,currentMonth:a,selectedDays:s,focusedDay:l,loading:u,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:d,readOnly:h,reduceAnimations:p,renderLoading:f=()=>(0,_.jsx)("span",{children:"..."}),slideDirection:g,TransitionProps:m,disablePast:v,disableFuture:y,minDate:x,maxDate:b,shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:A,dayOfWeekFormatter:C=e=>r.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:k,gridLabelId:T,displayWeekNumber:D,fixedWeekNumber:E,autoFocus:P,timezone:L}=n,N=$W(L),B=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Gg,t)})(n),z=(0,f3.I)(),j=W5({shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:A,minDate:x,maxDate:b,disablePast:v,disableFuture:y,timezone:L}),F=$H().localeText,[V,$]=(0,yA.A)({name:"DayCalendar",state:"hasFocus",controlled:M,default:P??!1}),[H,W]=I.useState(()=>l||N),G=(0,yC.A)(e=>{h||c(e)}),U=e=>{j(e)||(i(e),W(e),k?.(!0),$(!0))},q=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":U(r.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":U(r.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let n=r.addDays(t,z?1:-1),i=r.addMonths(t,z?1:-1);U($U({utils:r,date:n,minDate:z?n:r.startOfMonth(i),maxDate:z?r.endOfMonth(i):n,isDateDisabled:j,timezone:L})||n),e.preventDefault();break}case"ArrowRight":{let n=r.addDays(t,z?-1:1),i=r.addMonths(t,z?-1:1);U($U({utils:r,date:n,minDate:z?r.startOfMonth(i):n,maxDate:z?n:r.endOfMonth(i),isDateDisabled:j,timezone:L})||n),e.preventDefault();break}case"Home":U(r.startOfWeek(t)),e.preventDefault();break;case"End":U(r.endOfWeek(t)),e.preventDefault();break;case"PageUp":U(r.addMonths(t,1)),e.preventDefault();break;case"PageDown":U(r.addMonths(t,-1)),e.preventDefault()}}),Y=(0,yC.A)((e,t)=>U(t)),X=(0,yC.A)((e,t)=>{V&&r.isSameDay(H,t)&&k?.(!1)}),Z=r.getMonth(a),K=r.getYear(a),Q=I.useMemo(()=>s.filter(e=>!!e).map(e=>r.startOfDay(e)),[r,s]),J=`${K}-${Z}`,ee=I.useMemo(()=>I.createRef(),[J]),et=I.useMemo(()=>{let e=r.startOfMonth(a),t=r.endOfMonth(a);return j(H)||r.isAfterDay(H,t)||r.isBeforeDay(H,e)?$U({utils:r,date:H,minDate:e,maxDate:t,disablePast:v,disableFuture:y,isDateDisabled:j,timezone:L}):H},[a,y,v,H,j,r,L]),en=I.useMemo(()=>{let e=r.getWeekArray(a),t=r.addMonths(a,1);for(;E&&e.length<E;){let n=r.getWeekArray(t),i=r.isSameDay(e[e.length-1][0],n[0][0]);n.slice(+!!i).forEach(t=>{e.length<E&&e.push(t)}),t=r.addMonths(t,1)}return e},[a,E,r]);return(0,_.jsxs)(Gy,{role:"grid","aria-labelledby":T,className:B.root,children:[(0,_.jsxs)(Gx,{role:"row",className:B.header,children:[D&&(0,_.jsx)(Gw,{variant:"caption",role:"columnheader","aria-label":F.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:F.calendarWeekNumberHeaderText}),(t=r.startOfWeek(N),[0,1,2,3,4,5,6].map(e=>r.addDays(t,e))).map((e,t)=>(0,_.jsx)(Gb,{variant:"caption",role:"columnheader","aria-label":r.format(e,"weekday"),className:B.weekDayLabel,children:C(e)},t.toString()))]}),u?(0,_.jsx)(GA,{className:B.loadingContainer,children:f()}):(0,_.jsx)(GC,(0,er.A)({transKey:J,onExited:d,reduceAnimations:p,slideDirection:g,className:(0,O.A)(o,B.slideTransition)},m,{nodeRef:ee,children:(0,_.jsx)(GM,{ref:ee,role:"rowgroup",className:B.monthContainer,children:en.map((e,t)=>(0,_.jsxs)(Gk,{role:"row",className:B.weekContainer,"aria-rowindex":t+1,children:[D&&(0,_.jsx)(GS,{className:B.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(r.getWeekNumber(e[0])),children:F.calendarWeekNumberText(r.getWeekNumber(e[0]))}),e.map((e,t)=>(0,_.jsx)(GT,{parentProps:n,day:e,selectedDays:Q,focusableDay:et,onKeyDown:q,onFocus:Y,onBlur:X,onDaySelect:G,isDateDisabled:j,currentMonthNumber:Z,isViewFocused:V,"aria-colindex":t+1},e.toString()))]},`week-${e[0]}`))})}))]})}function GI(e){return(0,V.Ay)("MuiPickersMonth",e)}let GD=(0,F.A)("MuiPickersMonth",["root","monthButton","disabled","selected"]),GO=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],GR=(0,N.A)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),GE=(0,N.A)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${GD.disabled}`]:t.disabled},{[`&.${GD.selected}`]:t.selected}]})(({theme:e})=>(0,er.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GD.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GD.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),GP=I.memo(function(e){let t=$N({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,"aria-label":f,slots:g,slotProps:m}=t,v=(0,en.A)(t,GO),y=I.useRef(null),x=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,R.A)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},GI,r)})(t);(0,mr.A)(()=>{n&&y.current?.focus()},[n]);let b=g?.monthButton??GE,w=(0,m8.A)({elementType:b,externalSlotProps:m?.monthButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:y,type:"button",role:"radio","aria-current":p,"aria-checked":a,"aria-label":f,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:x.monthButton});return(0,_.jsx)(GR,(0,er.A)({className:(0,O.A)(x.root,r),ownerState:t},v,{children:(0,_.jsx)(b,(0,er.A)({},w))}))});function GL(e){return(0,V.Ay)("MuiMonthCalendar",e)}(0,F.A)("MuiMonthCalendar",["root"]);let GN=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],GB=(0,N.A)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),Gz=I.forwardRef(function(e,t){let n,r,i,o=(n=$H().utils,r=$H().defaultDates,i=$N({props:e,name:"MuiMonthCalendar"}),(0,er.A)({disableFuture:!1,disablePast:!1},i,{minDate:$q(n,i.minDate,r.minDate),maxDate:$q(n,i.maxDate,r.maxDate)})),{className:a,value:s,defaultValue:l,referenceDate:u,disabled:c,disableFuture:d,disablePast:h,maxDate:p,minDate:f,onChange:g,shouldDisableMonth:m,readOnly:v,autoFocus:y=!1,onMonthFocus:x,hasFocus:b,onFocusedViewChange:w,monthsPerRow:S=3,timezone:A,gridLabelId:C,slots:M,slotProps:k}=o,T=(0,en.A)(o,GN),{value:D,handleValueChange:E,timezone:P}=W_({name:"MonthCalendar",timezone:A,value:s,defaultValue:l,referenceDate:u,onChange:g,valueManager:WY}),L=$W(P),N=(0,f3.I)(),B=$H().utils,z=I.useMemo(()=>WY.getInitialReferenceValue({value:D,utils:B,props:o,timezone:P,referenceDate:u,granularity:WI.month}),[]),j=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},GL,t)})(o),F=I.useMemo(()=>B.getMonth(L),[B,L]),V=I.useMemo(()=>null!=D?B.getMonth(D):null,[D,B]),[$,H]=I.useState(()=>V||B.getMonth(z)),[W,G]=(0,yA.A)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:y??!1}),U=(0,yC.A)(e=>{G(e),w&&w(e)}),q=I.useCallback(e=>{let t=B.startOfMonth(h&&B.isAfter(L,f)?L:f),n=B.startOfMonth(d&&B.isBefore(L,p)?L:p),r=B.startOfMonth(e);return!!(B.isBefore(r,t)||B.isAfter(r,n))||!!m&&m(r)},[d,h,p,f,L,m,B]),Y=(0,yC.A)((e,t)=>{v||E(B.setMonth(D??z,t))}),X=(0,yC.A)(e=>{!q(B.setMonth(D??z,e))&&(H(e),U(!0),x&&x(e))});I.useEffect(()=>{H(e=>null!==V&&e!==V?V:e)},[V]);let Z=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":X((12+t-3)%12),e.preventDefault();break;case"ArrowDown":X((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":X((12+t+(N?1:-1))%12),e.preventDefault();break;case"ArrowRight":X((12+t+(N?-1:1))%12),e.preventDefault()}}),K=(0,yC.A)((e,t)=>{X(t)}),Q=(0,yC.A)((e,t)=>{$===t&&U(!1)});return(0,_.jsx)(GB,(0,er.A)({ref:t,className:(0,O.A)(j.root,a),ownerState:o,role:"radiogroup","aria-labelledby":C},T,{children:$Y(B,D??z).map(e=>{let t=B.getMonth(e),n=B.format(e,"monthShort"),r=B.format(e,"month"),i=c||q(e);return(0,_.jsx)(GP,{selected:t===V,value:t,onClick:Y,onKeyDown:Z,autoFocus:W&&t===$,disabled:i,tabIndex:t!==$||i?-1:0,onFocus:K,onBlur:Q,"aria-current":F===t?"date":void 0,"aria-label":r,monthsPerRow:S,slots:M,slotProps:k,children:n},n)})}))});function Gj(e){return(0,V.Ay)("MuiPickersYear",e)}let GF=(0,F.A)("MuiPickersYear",["root","yearButton","selected","disabled"]),GV=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],G$=(0,N.A)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),GH=(0,N.A)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${GF.disabled}`]:t.disabled},{[`&.${GF.selected}`]:t.selected}]})(({theme:e})=>(0,er.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GF.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GF.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),GW=I.memo(function(e){let t=$N({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:d,onBlur:h,"aria-current":p,slots:f,slotProps:g}=t,m=(0,en.A)(t,GV),v=I.useRef(null),y=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,R.A)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Gj,r)})(t);(0,mr.A)(()=>{n&&v.current?.focus()},[n]);let x=f?.yearButton??GH,b=(0,m8.A)({elementType:x,externalSlotProps:g?.yearButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:v,type:"button",role:"radio","aria-current":p,"aria-checked":a,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>d(e,s),onBlur:e=>h(e,s)},ownerState:t,className:y.yearButton});return(0,_.jsx)(G$,(0,er.A)({className:(0,O.A)(y.root,r),ownerState:t},m,{children:(0,_.jsx)(x,(0,er.A)({},b))}))});function GG(e){return(0,V.Ay)("MuiYearCalendar",e)}(0,F.A)("MuiYearCalendar",["root"]);let GU=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Gq=(0,N.A)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),GY=I.forwardRef(function(e,t){let n,r,i,o=(n=$H().utils,r=$H().defaultDates,i=$N({props:e,name:"MuiYearCalendar"}),(0,er.A)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:$q(n,i.minDate,r.minDate),maxDate:$q(n,i.maxDate,r.maxDate)})),{autoFocus:a,className:s,value:l,defaultValue:u,referenceDate:c,disabled:d,disableFuture:h,disablePast:p,maxDate:f,minDate:g,onChange:m,readOnly:v,shouldDisableYear:y,onYearFocus:x,hasFocus:b,onFocusedViewChange:w,yearsOrder:S="asc",yearsPerRow:A,timezone:C,gridLabelId:M,slots:k,slotProps:T}=o,D=(0,en.A)(o,GU),{value:E,handleValueChange:P,timezone:L}=W_({name:"YearCalendar",timezone:C,value:l,defaultValue:u,referenceDate:c,onChange:m,valueManager:WY}),N=$W(L),B=(0,f3.I)(),z=$H().utils,j=I.useMemo(()=>WY.getInitialReferenceValue({value:E,utils:z,props:o,timezone:L,referenceDate:c,granularity:WI.year}),[]),F=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"]},GG,t)})(o),V=I.useMemo(()=>z.getYear(N),[z,N]),$=I.useMemo(()=>null!=E?z.getYear(E):null,[E,z]),[H,W]=I.useState(()=>$||z.getYear(j)),[G,U]=(0,yA.A)({name:"YearCalendar",state:"hasFocus",controlled:b,default:a??!1}),q=(0,yC.A)(e=>{U(e),w&&w(e)}),Y=I.useCallback(e=>!!(p&&z.isBeforeYear(e,N)||h&&z.isAfterYear(e,N)||g&&z.isBeforeYear(e,g)||f&&z.isAfterYear(e,f))||!!y&&y(z.startOfYear(e)),[h,p,f,g,N,y,z]),X=(0,yC.A)((e,t)=>{v||P(z.setYear(E??j,t))}),Z=(0,yC.A)(e=>{Y(z.setYear(E??j,e))||(W(e),q(!0),x?.(e))});I.useEffect(()=>{W(e=>null!==$&&e!==$?$:e)},[$]);let K="desc"!==S?+A:-1*A,Q=B&&"asc"===S||!B&&"desc"===S?-1:1,J=(0,yC.A)((e,t)=>{switch(e.key){case"ArrowUp":Z(t-K),e.preventDefault();break;case"ArrowDown":Z(t+K),e.preventDefault();break;case"ArrowLeft":Z(t-Q),e.preventDefault();break;case"ArrowRight":Z(t+Q),e.preventDefault()}}),ee=(0,yC.A)((e,t)=>{Z(t)}),et=(0,yC.A)((e,t)=>{H===t&&q(!1)}),ei=I.useRef(null),eo=(0,mn.A)(t,ei);I.useEffect(()=>{if(a||null===ei.current)return;let e=ei.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,r=ei.current.clientHeight,i=ei.current.scrollTop;t>r||n<i||(ei.current.scrollTop=n+t-r/2-t/2)},[a]);let ea=z.getYearRange([g,f]);return"desc"===S&&ea.reverse(),(0,_.jsx)(Gq,(0,er.A)({ref:eo,className:(0,O.A)(F.root,s),ownerState:o,role:"radiogroup","aria-labelledby":M},D,{children:ea.map(e=>{let t=z.getYear(e),n=d||Y(e);return(0,_.jsx)(GW,{selected:t===$,value:t,onClick:X,onKeyDown:J,autoFocus:G&&t===H,disabled:n,tabIndex:t!==H||n?-1:0,onFocus:ee,onBlur:et,"aria-current":V===t?"date":void 0,yearsPerRow:A,slots:k,slotProps:T,children:z.format(e,"year")},z.format(e,"year"))})}))}),GX=e=>(0,V.Ay)("MuiPickersCalendarHeader",e),GZ=(0,F.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),GK=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],GQ=["ownerState"],GJ=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),G0=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,er.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),G1=(0,N.A)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),G2=(0,N.A)(eY,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${GZ.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),G5=(0,N.A)(Hh,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),G4=I.forwardRef(function(e,t){let n=$H().localeText,r=$H().utils,i=$N({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:a,currentMonth:s,disabled:l,disableFuture:u,disablePast:c,maxDate:d,minDate:h,onMonthChange:p,onViewChange:f,view:g,reduceAnimations:m,views:v,labelId:y,className:x,timezone:b,format:w=`${r.formats.month} ${r.formats.year}`}=i,S=(0,en.A)(i,GK),A=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},GX,t)})(i),C=o?.switchViewButton??G2,M=(0,m8.A)({elementType:C,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(g)},ownerState:i,className:A.switchViewButton}),k=o?.switchViewIcon??G5,T=(0,m8.A)({elementType:k,externalSlotProps:a?.switchViewIcon,ownerState:i,className:A.switchViewIcon}),D=(0,en.A)(T,GQ),E=function(e,{disableFuture:t,maxDate:n,timezone:r}){let i=$H().utils;return I.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isBefore(o,n)?o:n);return!i.isAfter(a,e)},[t,n,e,i,r])}(s,{disableFuture:u,maxDate:d,timezone:b}),P=function(e,{disablePast:t,minDate:n,timezone:r}){let i=$H().utils;return I.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isAfter(o,n)?o:n);return!i.isBefore(a,e)},[t,n,e,i,r])}(s,{disablePast:c,minDate:h,timezone:b});if(1===v.length&&"year"===v[0])return null;let L=r.formatByString(s,w);return(0,_.jsxs)(GJ,(0,er.A)({},S,{ownerState:i,className:(0,O.A)(A.root,x),ref:t,children:[(0,_.jsxs)(G0,{role:"presentation",onClick:()=>{if(1!==v.length&&f&&!l)if(2===v.length)f(v.find(e=>e!==g)||v[0]);else{let e=+(0===v.indexOf(g));f(v[e])}},ownerState:i,"aria-live":"polite",className:A.labelContainer,children:[(0,_.jsx)(W6,{reduceAnimations:m,transKey:L,children:(0,_.jsx)(G1,{id:y,ownerState:i,className:A.label,children:L})}),v.length>1&&!l&&(0,_.jsx)(C,(0,er.A)({},M,{children:(0,_.jsx)(k,(0,er.A)({},D))}))]}),(0,_.jsx)(vK.A,{in:"day"===g,appear:!m,enter:!m,children:(0,_.jsx)(H4,{slots:o,slotProps:a,onGoToPrevious:()=>p(r.addMonths(s,-1),"right"),isPreviousDisabled:P,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(s,1),"left"),isNextDisabled:E,nextLabel:n.nextMonth})})]}))}),G3="u">typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),G6=G3&&G3[1]?parseInt(G3[1],10):null,G8=G3&&G3[2]?parseInt(G3[2],10):null,G9=G6&&G6<10||G8&&G8<13||!1,G7=e=>(0,V.Ay)("MuiDateCalendar",e);(0,F.A)("MuiDateCalendar",["root","viewTransitionContainer"]);let Ue=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Ut=(0,N.A)(H6,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Un=(0,N.A)(W6,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Ur=I.forwardRef(function(e,t){let n,r,i,o,a=$H().utils,s=(0,vX.A)(),l=(n=$H().utils,r=$H().defaultDates,i=br("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||G9,o=$N({props:e,name:"MuiDateCalendar"}),(0,er.A)({},o,{loading:o.loading??!1,disablePast:o.disablePast??!1,disableFuture:o.disableFuture??!1,openTo:o.openTo??"day",views:o.views??["year","day"],reduceAnimations:o.reduceAnimations??i,renderLoading:o.renderLoading??(()=>(0,_.jsx)("span",{children:"..."})),minDate:$q(n,o.minDate,r.minDate),maxDate:$q(n,o.maxDate,r.maxDate)})),{autoFocus:u,onViewChange:c,value:d,defaultValue:h,referenceDate:p,disableFuture:f,disablePast:g,onChange:m,onYearChange:v,onMonthChange:y,reduceAnimations:x,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,view:A,views:C,openTo:M,className:k,disabled:T,readOnly:D,minDate:E,maxDate:P,disableHighlightToday:L,focusedView:N,onFocusedViewChange:B,showDaysOutsideCurrentMonth:z,fixedWeekNumber:j,dayOfWeekFormatter:F,slots:V,slotProps:$,loading:H,renderLoading:W,displayWeekNumber:G,yearsOrder:U,yearsPerRow:q,monthsPerRow:Y,timezone:X}=l,Z=(0,en.A)(l,Ue),{value:K,handleValueChange:Q,timezone:J}=W_({name:"DateCalendar",timezone:X,value:d,defaultValue:h,referenceDate:p,onChange:m,valueManager:WY}),{view:ee,setView:et,focusedView:ei,setFocusedView:eo,goToNextView:ea,setValueAndGoToNextView:es}=H3({view:A,views:C,openTo:M,onChange:Q,onViewChange:c,autoFocus:u,focusedView:N,onFocusedViewChange:B}),{referenceDate:el,calendarState:eu,changeFocusedDay:ec,changeMonth:ed,handleChangeMonth:eh,isDateDisabled:ep,onMonthSwitchingAnimationEnd:ef}=(e=>{let t,{value:n,referenceDate:r,disableFuture:i,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:l,onMonthChange:u,reduceAnimations:c,shouldDisableDate:d,timezone:h}=e,p=$H().utils,f=I.useRef((t=!!c,(e,n)=>{switch(n.type){case"changeMonth":return(0,er.A)({},e,{slideDirection:n.direction,currentMonth:n.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{let t=n.newTimezone;if(p.getTimezone(e.currentMonth)===t)return e;let r=p.setTimezone(e.currentMonth,t);return p.getMonth(r)!==p.getMonth(e.currentMonth)&&(r=p.setMonth(r,p.getMonth(e.currentMonth))),(0,er.A)({},e,{currentMonth:r})}case"finishMonthSwitchingAnimation":return(0,er.A)({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=e.focusedDay&&null!=n.focusedDay&&p.isSameDay(n.focusedDay,e.focusedDay))return e;let r=null!=n.focusedDay&&!a&&!p.isSameMonth(e.currentMonth,n.focusedDay);return(0,er.A)({},e,{focusedDay:n.focusedDay,isMonthSwitchingAnimating:r&&!t&&!n.withoutMonthSwitchingAnimation,currentMonth:r?p.startOfMonth(n.focusedDay):e.currentMonth,slideDirection:null!=n.focusedDay&&p.isAfterDay(n.focusedDay,e.currentMonth)?"left":"right"})}default:throw Error("missing support")}})).current,g=I.useMemo(()=>WY.getInitialReferenceValue({value:n,utils:p,timezone:h,props:e,referenceDate:r,granularity:WI.day}),[r,h]),[m,v]=I.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:p.startOfMonth(g),slideDirection:"left"});I.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(g)})},[g,p]);let y=I.useCallback(e=>{v((0,er.A)({type:"changeMonth"},e)),u&&u(e.newMonth)},[u]),x=I.useCallback(e=>{p.isSameMonth(e,m.currentMonth)||y({newMonth:p.startOfMonth(e),direction:p.isAfterDay(e,m.currentMonth)?"left":"right"})},[m.currentMonth,y,p]),b=W5({shouldDisableDate:d,minDate:l,maxDate:s,disableFuture:i,disablePast:o,timezone:h}),w=I.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:m,changeMonth:x,changeFocusedDay:(0,yC.A)((e,t)=>{b(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:b,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}})({value:K,referenceDate:p,reduceAnimations:x,onMonthChange:y,minDate:E,maxDate:P,shouldDisableDate:b,disablePast:g,disableFuture:f,timezone:J}),eg=T&&K||E,em=T&&K||P,ev=`${s}-grid-label`,ey=null!==ei,ex=V?.calendarHeader??G4,eb=(0,m8.A)({elementType:ex,externalSlotProps:$?.calendarHeader,additionalProps:{views:C,view:ee,currentMonth:eu.currentMonth,onViewChange:et,onMonthChange:(e,t)=>eh({newMonth:e,direction:t}),minDate:eg,maxDate:em,disabled:T,disablePast:g,disableFuture:f,reduceAnimations:x,timezone:J,labelId:ev},ownerState:l}),ew=(0,yC.A)(e=>{let t=a.startOfMonth(e),n=a.endOfMonth(e),r=ep(e)?$U({utils:a,date:e,minDate:a.isBefore(E,t)?t:E,maxDate:a.isAfter(P,n)?n:P,disablePast:g,disableFuture:f,isDateDisabled:ep,timezone:J}):e;r?(es(r,"finish"),y?.(t)):(ea(),ed(t)),ec(r,!0)}),eS=(0,yC.A)(e=>{let t=a.startOfYear(e),n=a.endOfYear(e),r=ep(e)?$U({utils:a,date:e,minDate:a.isBefore(E,t)?t:E,maxDate:a.isAfter(P,n)?n:P,disablePast:g,disableFuture:f,isDateDisabled:ep,timezone:J}):e;r?(es(r,"finish"),v?.(r)):(ea(),ed(t)),ec(r,!0)}),eA=(0,yC.A)(e=>e?Q($G(a,e,K??el),"finish",ee):Q(e,"finish",ee));I.useEffect(()=>{null!=K&&a.isValid(K)&&ed(K)},[K]);let eC=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},G7,t)})(l),eM={disablePast:g,disableFuture:f,maxDate:P,minDate:E},ek={disableHighlightToday:L,readOnly:D,disabled:T,timezone:J,gridLabelId:ev,slots:V,slotProps:$},eT=I.useRef(ee);I.useEffect(()=>{eT.current!==ee&&(ei===eT.current&&eo(ee,!0),eT.current=ee)},[ei,eo,ee]);let e_=I.useMemo(()=>[K],[K]);return(0,_.jsxs)(Ut,(0,er.A)({ref:t,className:(0,O.A)(eC.root,k),ownerState:l},Z,{children:[(0,_.jsx)(ex,(0,er.A)({},eb,{slots:V,slotProps:$})),(0,_.jsx)(Un,{reduceAnimations:x,className:eC.viewTransitionContainer,transKey:ee,ownerState:l,children:(0,_.jsxs)("div",{children:["year"===ee&&(0,_.jsx)(GY,(0,er.A)({},eM,ek,{value:K,onChange:eS,shouldDisableYear:S,hasFocus:ey,onFocusedViewChange:e=>eo("year",e),yearsOrder:U,yearsPerRow:q,referenceDate:el})),"month"===ee&&(0,_.jsx)(Gz,(0,er.A)({},eM,ek,{hasFocus:ey,className:k,value:K,onChange:ew,shouldDisableMonth:w,onFocusedViewChange:e=>eo("month",e),monthsPerRow:Y,referenceDate:el})),"day"===ee&&(0,_.jsx)(G_,(0,er.A)({},eu,eM,ek,{onMonthSwitchingAnimationEnd:ef,onFocusedDayChange:ec,reduceAnimations:x,selectedDays:e_,onSelectedDaysChange:eA,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,hasFocus:ey,onFocusedViewChange:e=>eo("day",e),showDaysOutsideCurrentMonth:z,fixedWeekNumber:j,dayOfWeekFormatter:F,displayWeekNumber:G,loading:H,renderLoading:W}))]})})]}))}),Ui=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:A,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:I,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:z})=>(0,_.jsx)(Ur,{view:e,onViewChange:t,views:n.filter($Q),focusedView:r&&$Q(r)?r:null,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:d,disablePast:h,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:A,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:I,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:z});function Uo(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,a=$H(),s=I.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:i,props:t}),u=n.valueManager.hasError(l);return I.useEffect(()=>{o&&!n.valueManager.isSameError(l,s.current)&&o(l,r),s.current=l},[n,o,l,r]),{validationError:l,hasValidationError:u,getValidationErrorForNewValue:(0,yC.A)(e=>n({adapter:a,value:e,timezone:i,props:t}))}}let Ua=["className","sx"],Us=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Us(t.shadowRoot):t:null};function Ul(){return"u"<typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function Uu(e){return(0,V.Ay)("MuiPickersLayout",e)}let Uc=(0,F.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),Ud=["onAccept","onClear","onCancel","onSetToday","actions"];function Uh(e){let{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,en.A)(e,Ud),s=$H().localeText;if(null==o||0===o.length)return null;let l=o?.map(e=>{switch(e){case"clear":return(0,_.jsx)(eV,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return(0,_.jsx)(eV,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return(0,_.jsx)(eV,{onClick:t,children:s.okButtonLabel},e);case"today":return(0,_.jsx)(eV,{onClick:i,children:s.todayButtonLabel},e);default:return null}});return(0,_.jsx)(v7,(0,er.A)({},a,{children:l}))}var Up=n(76477),Uf=n(79223),Ug=n(6835);function Um(e){return(0,V.Ay)("MuiListItem",e)}function Uv(e){return(0,V.Ay)("MuiListItemSecondaryAction",e)}(0,F.A)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,F.A)("MuiListItemSecondaryAction",["root","disableGutters"]);let Uy=(0,N.A)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Ux=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...i}=n,o=I.useContext(cs.A),a={...n,disableGutters:o.disableGutters},s=(e=>{let{disableGutters:t,classes:n}=e;return(0,R.A)({root:["root",t&&"disableGutters"]},Uv,n)})(a);return(0,_.jsx)(Uy,{className:(0,O.A)(s.root,r),ownerState:a,ref:t,...i})});Ux.muiName="ListItemSecondaryAction";let Ub=(0,N.A)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,B.A)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${cu.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),Uw=(0,N.A)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),US=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",children:i,className:o,component:a,components:s={},componentsProps:l={},ContainerComponent:u="li",ContainerProps:{className:c,...d}={},dense:h=!1,disableGutters:p=!1,disablePadding:f=!1,divider:g=!1,secondaryAction:m,slotProps:v={},slots:y={},...x}=n,b=I.useContext(cs.A),w=I.useMemo(()=>({dense:h||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,h,p]),S=I.useRef(null),A=I.Children.toArray(i),C=A.length&&(0,Ug.A)(A[A.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:r,dense:w.dense,disableGutters:p,disablePadding:f,divider:g,hasSecondaryAction:C},k=(e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:a,hasSecondaryAction:s}=e;return(0,R.A)({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Um,n)})(M),T=(0,Q.A)(S,t),D=y.root||s.Root||Ub,E=v.root||l.root||{},P={className:(0,O.A)(k.root,E.className,o),...x},L=a||"li";return C?(L=P.component||a?L:"div","li"===u&&("li"===L?L="div":"li"===P.component&&(P.component="div")),(0,_.jsx)(cs.A.Provider,{value:w,children:(0,_.jsxs)(Uw,{as:u,className:(0,O.A)(k.container,c),ref:T,ownerState:M,...d,children:[(0,_.jsx)(D,{...E,...!(0,Uf.A)(D)&&{as:L,ownerState:{...M,...E.ownerState}},...P,children:A}),A.pop()]})})):(0,_.jsx)(cs.A.Provider,{value:w,children:(0,_.jsxs)(D,{...E,as:L,ref:T,...!(0,Uf.A)(D)&&{ownerState:{...M,...E.ownerState}},...P,children:[A,m&&(0,_.jsx)(Ux,{children:m})]})})}),UA=["items","changeImportance","isLandscape","onChange","isValid"],UC=["getValue"];function UM(e){let{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,o=(0,en.A)(e,UA);if(null==t||0===t.length)return null;let a=t.map(e=>{let{getValue:t}=e,o=(0,en.A)(e,UC),a=t({isValid:i});return(0,er.A)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})});return(0,_.jsx)(Up.A,(0,er.A)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(e=>(0,_.jsx)(US,{children:(0,_.jsx)(y$,(0,er.A)({},e))},e.id??e.label))}))}let Uk=(0,N.A)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Uc.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Uc.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Uc.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Uc.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Uc.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Uc.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Uc.shortcuts}`]:{gridColumn:3}}}]}),UT=(0,N.A)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),U_=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:o,actionBar:a,shortcuts:s}=(e=>{let{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:o,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:d,isValid:h,isLandscape:p,disabled:f,readOnly:g,children:m,slots:v,slotProps:y}=e,x=(e=>{let{classes:t,isLandscape:n}=e;return(0,R.A)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Uu,t)})(e),b=v?.actionBar??Uh,w=(0,m8.A)({elementType:b,externalSlotProps:y?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,er.A)({},e,{wrapperVariant:t})}),S=(0,_.jsx)(b,(0,er.A)({},w)),A=v?.toolbar,C=(0,m8.A)({elementType:A,externalSlotProps:y?.toolbar,additionalProps:{isLandscape:p,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:f,readOnly:g},className:x.toolbar,ownerState:(0,er.A)({},e,{wrapperVariant:t})}),M=null!==C.view&&A?(0,_.jsx)(A,(0,er.A)({},C)):null,k=v?.tabs,T=a&&k?(0,_.jsx)(k,(0,er.A)({view:a,onViewChange:l,className:x.tabs},y?.tabs)):null,I=v?.shortcuts??UM,D=(0,m8.A)({elementType:I,externalSlotProps:y?.shortcuts,additionalProps:{isValid:h,isLandscape:p,onChange:d},className:x.shortcuts,ownerState:{isValid:h,isLandscape:p,onChange:d,wrapperVariant:t}});return{toolbar:M,content:m,tabs:T,actionBar:S,shortcuts:a&&I?(0,_.jsx)(I,(0,er.A)({},D)):null}})(n),{sx:l,className:u,isLandscape:c,wrapperVariant:d}=n,h=(e=>{let{isLandscape:t,classes:n}=e;return(0,R.A)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},Uu,n)})(n);return(0,_.jsxs)(Uk,{ref:t,sx:l,className:(0,O.A)(h.root,u),ownerState:n,children:[c?s:r,c?r:s,(0,_.jsx)(UT,{className:h.contentWrapper,children:"desktop"===d?(0,_.jsxs)(I.Fragment,{children:[i,o]}):(0,_.jsxs)(I.Fragment,{children:[o,i]})}),a]})}),UI=["props","ref"],UD=(0,N.A)(U_)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),UO=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;let{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,d=e.utils.date(void 0,n),h=HV(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(i&&h(i,t)):return"minTime";case!!(o&&h(t,o)):return"maxTime";case!!(c&&e.utils.isAfter(t,d)):return"disableFuture";case!!(u&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};UO.valueManager=WY;let UR=({adapter:e,value:t,timezone:n,props:r})=>{let i=W2({adapter:e,value:t,timezone:n,props:r});return null!==i?i:UO({adapter:e,value:t,timezone:n,props:r})};UR.valueManager=WY;let UE=I.forwardRef(function(e,t){let n,r,i,o,a,s=(n=$H().utils,r=$H().defaultDates,o=(i=$N({props:e,name:"MuiStaticDateTimePicker"})).ampm??n.is12HourCycleInCurrentLocale(),a=I.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:(0,er.A)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]),(0,er.A)({},i,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i,o=n??r;if(null!=e)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}})({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:a,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:$q(n,i.minDateTime??i.minDate,r.minDate),maxDate:$q(n,i.maxDateTime??i.maxDate,r.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,er.A)({toolbar:HZ,tabs:Hb},i.slots),slotProps:(0,er.A)({},i.slotProps,{toolbar:(0,er.A)({ampm:o},i.slotProps?.toolbar)})})),l=s.displayStaticWrapperAs??"mobile",u=s.ampmInClock??"desktop"===l,c=(0,er.A)({day:Ui,month:Ui,year:Ui,hours:W1,minutes:W1,seconds:W1},s.viewRenderers),{renderPicker:d}=(e=>{let{props:t,ref:n}=e,r=(0,en.A)(e,UI),{localeText:i,slots:o,slotProps:a,className:s,sx:l,displayStaticWrapperAs:u,autoFocus:c}=t,{layoutProps:d,renderCurrentView:h}=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:i,validator:o,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{let u=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i})=>{let{onAccept:o,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===r,timezone:c,referenceDate:d}=e,{current:h}=I.useRef(l),{current:p}=I.useRef(void 0!==s),[f,g]=I.useState(c),m=$H().utils,v=$H(),{isOpen:y,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{let r=I.useRef("boolean"==typeof e).current,[i,o]=I.useState(!1);return I.useEffect(()=>{if(r){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[r,e]),{isOpen:i,setIsOpen:I.useCallback(e=>{r||o(e),e&&t&&t(),!e&&n&&n()},[r,t,n])}})(e),{timezone:b,value:w,handleValueChange:S}=WT({timezone:c,value:s,defaultValue:h,referenceDate:d,onChange:a,valueManager:t}),[A,C]=I.useState(()=>{let e;return{draft:e=void 0!==w?w:void 0!==h?h:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(m,A.draft);f!==c&&(g(c),c&&M&&c!==M&&C(e=>(0,er.A)({},e,{draft:t.setTimezone(m,c,e.draft)})));let{getValidationErrorForNewValue:k}=Uo({props:e,validator:i,timezone:b,value:A.draft,onError:e.onError}),T=(0,yC.A)(e=>{let n={action:e,dateState:A,hasChanged:n=>!t.areValuesEqual(m,e.value,n),isControlled:p,closeOnSelect:u},r=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i}=e,o=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(r.lastPublishedValue)))})(n),i=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i,closeOnSelect:o}=e,a=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(a&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),a=(e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);C(t=>(0,er.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let s=null,l=()=>(s||(s={validationError:"setValueFromField"===e.name?e.context.validationError:k(e.value)},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)),s);r&&S(e.value,l()),i&&o&&o(e.value,l()),a&&x(!1)});if(A.lastControlledValue!==s){let e=t.areValuesEqual(m,A.draft,w);C(t=>(0,er.A)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:w,lastPublishedValue:w,draft:w,hasBeenModifiedSinceMount:!0}))}let _=(0,yC.A)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),D=(0,yC.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),O=(0,yC.A)(()=>{T({value:A.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=(0,yC.A)(()=>{T({value:A.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),E=(0,yC.A)(()=>{T({value:t.getTodayValue(m,b,n),name:"setValueFromAction",pickerAction:"today"})}),P=(0,yC.A)(e=>{e.preventDefault(),x(!0)}),L=(0,yC.A)(e=>{e?.preventDefault(),x(!1)}),N=(0,yC.A)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),B=(0,yC.A)((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),z=(0,yC.A)((e,t)=>T({name:"setValueFromField",value:e,context:t})),j={onClear:_,onAccept:D,onDismiss:O,onCancel:R,onSetToday:E,onOpen:P,onClose:L},F={value:A.draft,onChange:z},V=I.useMemo(()=>t.cleanValue(m,A.draft),[m,t,A.draft]),$=(0,er.A)({},j,{value:V,onChange:N,onSelectShortcut:B,isValid:n=>{let r=i({adapter:v,value:n,timezone:b,props:e});return!t.hasError(r)}}),H=I.useMemo(()=>({onOpen:P,onClose:L,open:y}),[y,L,P]);return{open:y,fieldProps:F,viewProps:{value:V,onChange:N,onClose:L,open:y},layoutProps:$,actions:j,contextValue:H}})({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o}),c=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:i,fieldRef:o})=>{let{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:d,onViewChange:h,viewRenderers:p,timezone:f}=e,g=(0,en.A)(e,Ua),{view:m,setView:v,defaultView:y,focusedView:x,setFocusedView:b,setValueAndGoToNextView:w}=H3({view:u,views:c,openTo:d,onChange:a,onViewChange:h,autoFocus:r}),{hasUIView:S,viewModeLookup:A}=I.useMemo(()=>c.reduce((e,t)=>{let n;return n=null!=p[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[p,c]),C=I.useMemo(()=>c.reduce((e,t)=>null!=p[t]&&Hz(t)?e+1:e,0),[p,c]),M=A[m],k=(0,yC.A)(()=>"UI"===M),[T,_]=I.useState("UI"===M?m:null);return T!==m&&"UI"===A[m]&&_(m),(0,mr.A)(()=>{"field"===M&&s&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(m),o?.current?.focusField(m)}))},[m]),(0,mr.A)(()=>{if(!s)return;let e=m;"field"===M&&null!=T&&(e=T),e!==y&&"UI"===A[e]&&"UI"===A[y]&&(e=y),e!==m&&v(e),b(e,!0)},[s]),{hasUIView:S,shouldRestoreFocus:k,layoutProps:{views:c,view:T,onViewChange:v},renderCurrentView:()=>{if(null==T)return null;let e=p[T];if(null==e)return null;let r=(0,er.A)({},g,n,t,{views:c,timezone:f,onChange:w,view:T,onViewChange:v,focusedView:x,onFocusedViewChange:b,showViewSwitcher:C>1,timeViewsCount:C});return i?i(p,T,r):e(r)}}})({props:e,additionalViewProps:i,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),d=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{let{orientation:i}=e,o=((e,t)=>{var n;let[r,i]=I.useState(Ul);return(0,mr.A)(()=>{let e=()=>{i(Ul())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),(Array.isArray(n=["hours","minutes","seconds"])?!n.every(t=>-1!==e.indexOf(t)):-1===e.indexOf(n))&&"landscape"===(t||r)})(n.views,i),a=(0,f3.I)();return{layoutProps:(0,er.A)({},n,t,{isLandscape:o,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),h=function(e){let{props:t,pickerValueResponse:n}=e;return I.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:u.contextValue,ownerState:h}})((0,er.A)({},r,{props:t,autoFocusView:c??!1,additionalViewProps:{},wrapperVariant:u})),p=o?.layout??UD;return{renderPicker:()=>(0,_.jsx)($j,{localeText:i,children:(0,_.jsx)(p,(0,er.A)({},d,a?.layout,{slots:o,slotProps:a,sx:[...Array.isArray(l)?l:[l],...Array.isArray(a?.layout?.sx)?a.layout.sx:[a?.layout?.sx]],className:(0,O.A)(s,a?.layout?.className),ref:n,children:h()}))})}})({props:(0,er.A)({},s,{viewRenderers:c,displayStaticWrapperAs:l,ampmInClock:u,yearsPerRow:s.yearsPerRow??("mobile"===l?3:4),slotProps:(0,er.A)({},s.slotProps,{tabs:(0,er.A)({hidden:"desktop"===l},s.slotProps?.tabs),toolbar:(0,er.A)({hidden:"desktop"===l,ampmInClock:u},s.slotProps?.toolbar)})}),valueManager:WY,valueType:"date-time",validator:UR,ref:t});return d()});UE.propTypes={ampm:$V().bool,ampmInClock:$V().bool,autoFocus:$V().bool,className:$V().string,dayOfWeekFormatter:$V().func,defaultValue:$V().object,disabled:$V().bool,disableFuture:$V().bool,disableHighlightToday:$V().bool,disableIgnoringDatePartForTimeValidation:$V().bool,disablePast:$V().bool,displayStaticWrapperAs:$V().oneOf(["desktop","mobile"]),displayWeekNumber:$V().bool,fixedWeekNumber:$V().number,loading:$V().bool,localeText:$V().object,maxDate:$V().object,maxDateTime:$V().object,maxTime:$V().object,minDate:$V().object,minDateTime:$V().object,minTime:$V().object,minutesStep:$V().number,monthsPerRow:$V().oneOf([3,4]),onAccept:$V().func,onChange:$V().func,onClose:$V().func,onError:$V().func,onMonthChange:$V().func,onViewChange:$V().func,onYearChange:$V().func,openTo:$V().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:$V().oneOf(["landscape","portrait"]),readOnly:$V().bool,reduceAnimations:$V().bool,referenceDate:$V().object,renderLoading:$V().func,shouldDisableDate:$V().func,shouldDisableMonth:$V().func,shouldDisableTime:$V().func,shouldDisableYear:$V().func,showDaysOutsideCurrentMonth:$V().bool,slotProps:$V().object,slots:$V().object,sx:$V().oneOfType([$V().arrayOf($V().oneOfType([$V().func,$V().object,$V().bool])),$V().func,$V().object]),timezone:$V().string,value:$V().object,view:$V().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:$V().shape({day:$V().func,hours:$V().func,minutes:$V().func,month:$V().func,seconds:$V().func,year:$V().func}),views:$V().arrayOf($V().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:$V().oneOf(["asc","desc"]),yearsPerRow:$V().oneOf([3,4])};let UP=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:o,token:a,startSeparator:s})=>{if(""===a)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=WO(e,a),u=W$(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,d=null!=t&&e.isValid(t),h=d?e.formatByString(t,a):"",p=null;if(c)if(u)p=""===h?e.formatByString(o,a).length:h.length;else{if(null==l.maxLength)throw Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(h=WN(Wz(WL(h,i),p),i))}return(0,er.A)({},l,{format:a,maxLength:p,value:h,placeholder:((e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}})(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},UL=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),(n-=1)<0)throw Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=(({utils:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,o=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,"g"),a=null;for(;a=o.exec(t);)n.push({start:a.index,end:o.lastIndex-1});return n})((0,er.A)({},e,{expandedFormat:t})),r=(e=>{let{utils:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),o=[],a="",s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,u=RegExp(`^(${s.join("|")})*$`),c=RegExp(`^(${s.join("|")})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),h=0;for(;h<n.length;){let t=d(h),r=null!=t,s=l.exec(n.slice(h))?.[1];if(!r&&null!=s&&u.test(s)){let t=s;for(;t.length>0;){let n=c.exec(t)[1];t=t.slice(n.length),o.push(UP((0,er.A)({},e,{now:i,token:n,startSeparator:a}))),a=""}h+=s.length}else{let e=n[h];r&&t?.start===h||t?.end===h||(0===o.length?a+=e:o[o.length-1].endSeparator+=e),h+=1}}return 0===o.length&&a.length>0&&o.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),o})((0,er.A)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`\u2069${r}\u2066`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))((0,er.A)({},e,{sections:r}))},UN=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:i,onClick:o,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:d,applyCharacterEditing:h,resetCharacterQuery:p,setSelectedSections:f,parsedSelectedSections:g,state:m,clearActiveSection:v,clearValue:y,updateSectionValue:x,updateValueFromValueStr:b,sectionOrder:w,areAllSectionsEmpty:S,sectionsValueBoundaries:A}=e,C=I.useRef(null),M=(0,mn.A)(r,C),k=$H().localeText,T=$H().utils,_=(0,vX.A)(),[D,O]=I.useState(!1),R=I.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!C.current)return;let t=document.getSelection();if(!t)return;if(null==g){t.rangeCount>0&&C.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),D&&C.current.getRoot().blur();return}if(!C.current.getRoot().contains(Us(document)))return;let n=new window.Range;e="all"===g?C.current.getRoot():"empty"===m.sections[g].type?C.current.getSectionContainer(g):C.current.getSectionContent(g),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=Us(document);return e&&C.current&&C.current.getRoot().contains(e)?C.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!C.current||null!=R.getActiveSectionIndexFromDOM())return;let t=WU(e,m.sections);O(!0),C.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!C.current)return;let t=WU(e,m.sections);O(null!==("all"===t?0:t)),f(e)},isFieldFocused:()=>{let e=Us(document);return!!C.current&&C.current.getRoot().contains(e)}}),[g,f,m.sections,D]),E=(0,yC.A)(e=>{if(!C.current)return;let t=m.sections[e];C.current.getSectionContent(e).innerHTML=t.value||t.placeholder,R.syncSelectionToDOM()}),P=(0,yC.A)((e,...t)=>{!e.isDefaultPrevented()&&C.current&&(O(!0),o?.(e,...t),"all"===g?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void f(w.startIndex);let t=0,n=0;for(;n<e&&t<m.sections.length;){let e=m.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}f(t-1)}):D?C.current.getRoot().contains(e.target)||f(w.startIndex):(O(!0),f(w.startIndex)))}),L=(0,yC.A)(e=>{if(s?.(e),!C.current||"all"!==g)return;let t=e.target.textContent??"";C.current.getRoot().innerHTML=m.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),R.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(p(),y(),f("all")):t.length>1?b(t):("all"===g&&f(0),h({keyPressed:t,sectionIndex:0}))}),N=(0,yC.A)(e=>{if(l?.(e),n||"all"!==g)return void e.preventDefault();let t=e.clipboardData.getData("text");e.preventDefault(),p(),b(t)}),B=(0,yC.A)((...e)=>{a?.(...e),D||!C.current||(O(!0),null==C.current.getSectionIndexFromDOMElement(Us(document))&&f(w.startIndex))}),z=(0,yC.A)((...e)=>{i?.(...e),setTimeout(()=>{if(!C.current)return;let e=Us(document);C.current.getRoot().contains(e)||(O(!1),f(null))})}),j=(0,yC.A)(e=>t=>{t.isDefaultPrevented()||f(e)}),F=(0,yC.A)(e=>{e.preventDefault()}),V=(0,yC.A)(e=>()=>{f(e)}),$=(0,yC.A)(e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;let r=m.sections[g],i=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(i),a=/^[0-9]+$/.test(i),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(i);"letter"===r.contentType&&o||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(p(),x({activeSection:r,newSectionValue:i,shouldGoToNextSection:!0})):o||a||(p(),b(i))}),H=(0,yC.A)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),W=(0,yC.A)(e=>{if(!C.current)return;let t=e.target,r=t.textContent??"",i=C.current.getSectionIndexFromDOMElement(t),o=m.sections[i];if(n||!C.current)return void E(i);if(0===r.length){if(""===o.value)return void E(i);let t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void E(i):(p(),void v())}h({keyPressed:r,sectionIndex:i}),E(i)});(0,mr.A)(()=>{if(D&&C.current){if("all"===g)C.current.getRoot().focus();else if("number"==typeof g){let e=C.current.getSectionContent(g);e&&e.focus()}}},[g,D]);let G=I.useMemo(()=>m.sections.reduce((e,t)=>(e[t.type]=A[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[A,m.sections]),U="all"===g,q=I.useMemo(()=>m.sections.map((e,r)=>{let i=!U&&!t&&!n;return{container:{"data-sectionindex":r,onClick:j(r)},content:{tabIndex:U||r>0?-1:0,contentEditable:!U&&!t&&!n,role:"spinbutton",id:`${_}-${e.type}`,"aria-labelledby":`${_}-${e.type}`,"aria-readonly":n,"aria-valuenow":((e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);if(n)return+(t.getHours(n)>=12);return}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}})(e,T),"aria-valuemin":G[e.type].minimum,"aria-valuemax":G[e.type].maximum,"aria-valuetext":e.value?((e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");let n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}})(e,T):k.empty,"aria-label":k[e.type],"aria-disabled":t,spellCheck:!i&&void 0,autoCapitalize:i?"off":void 0,autoCorrect:i?"off":void 0,[parseInt(I.version,10)>=17?"enterKeyHint":"enterkeyhint"]:i?"next":void 0,children:e.value||e.placeholder,onInput:W,onPaste:$,onFocus:V(r),onDragOver:H,onMouseUp:F,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[m.sections,V,$,H,W,j,F,t,n,U,k,T,G,_]),Y=(0,yC.A)(e=>{b(e.target.value)}),X=I.useMemo(()=>S?"":d.getV7HiddenInputValueFromSections(m.sections),[S,m.sections,d]);return I.useEffect(()=>{if(null==C.current)throw Error("MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`\nYou probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.\n\nIf you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:\n\n<DatePicker slots={{ textField: MyCustomTextField }} />\n\nLearn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element");c&&C.current&&C.current.getSectionContent(w.startIndex).focus()},[]),{interactions:R,returnedValue:{autoFocus:c,readOnly:n,focused:u??D,sectionListRef:M,onBlur:z,onClick:P,onFocus:B,onInput:L,onPaste:N,enableAccessibleFieldDOMStructure:!0,elements:q,tabIndex:0===g?-1:0,contentEditable:U,value:X,onChange:Y,areAllSectionsEmpty:S}}},UB=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Uz=e=>{let t=(0,f3.I)(),n=I.useRef(void 0),r=I.useRef(void 0),{forwardedProps:{onFocus:i,onClick:o,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:d=!1},parsedSelectedSections:h,activeSectionIndex:p,state:f,fieldValueManager:g,valueManager:m,applyCharacterEditing:v,resetCharacterQuery:y,updateSectionValue:x,updateValueFromValueStr:b,clearActiveSection:w,clearValue:S,setTempAndroidValueStr:A,setSelectedSections:C,getSectionsFromValue:M,areAllSectionsEmpty:k,localizedDigits:T}=e,_=I.useRef(null),D=(0,mn.A)(l,_),O=I.useMemo(()=>((e,t,n)=>{let r=0,i=+!!n,o=[];for(let a=0;a<e.length;a+=1){let s=e[a],l=WF(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=UB(u).length,d=u.length,h=UB(l),p=i+(""===h?0:l.indexOf(h[0]))+s.startSeparator.length,f=p+h.length;o.push((0,er.A)({},s,{start:r,end:r+c,startInInput:p,endInInput:f})),r+=c,i+=d}return o})(f.sections,T,t),[f.sections,T,t]),R=I.useMemo(()=>({syncSelectionToDOM:()=>{if(!_.current)return;if(null==h){_.current.scrollLeft&&(_.current.scrollLeft=0);return}if(_.current!==Us(document))return;let e=_.current.scrollTop;if("all"===h)_.current.select();else{let e=O[h],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==_.current.selectionStart||n!==_.current.selectionEnd)&&_.current===Us(document)&&_.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout(()=>{_.current&&_.current===Us(document)&&_.current.selectionStart===_.current.selectionEnd&&(_.current.selectionStart!==t||_.current.selectionEnd!==n)&&R.syncSelectionToDOM()})}_.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=_.current.selectionStart??0,t=_.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=O[0].startInInput?1:O.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?O.length-1:n-1},focusField:(e=0)=>{Us(document)!==_.current&&(_.current?.focus(),C(e))},setSelectedSections:e=>C(e),isFieldFocused:()=>_.current===Us(document)}),[_,h,O,C]),E=()=>{let e,t=_.current.selectionStart??0;C(-1===(e=t<=O[0].startInInput||t>=O[O.length-1].endInInput?1:O.findIndex(e=>e.startInInput-e.startSeparator.length>t))?O.length-1:e-1)},P=(0,yC.A)((...e)=>{i?.(...e);let t=_.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===_.current&&null==p&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?C("all"):E())})}),L=(0,yC.A)((e,...t)=>{e.isDefaultPrevented()||(o?.(e,...t),E())}),N=(0,yC.A)(e=>{if(a?.(e),e.preventDefault(),c||d)return;let t=e.clipboardData.getData("text");if("number"==typeof h){let e=f.sections[h],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&i){y(),x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||r)return}y(),b(t)}),B=(0,yC.A)((...e)=>{s?.(...e),C(null)}),z=(0,yC.A)(e=>{let n;if(c)return;let r=e.target.value;if(""===r){y(),S();return}let i=e.nativeEvent.data,o=i&&i.length>1,a=o?i:r,s=UB(a);if("all"===h&&C(p),null==p||o)return void b(o?i:s);if("all"===h&&1===s.length)n=s;else{let e=UB(g.getV6InputValueFromSections(O,T,t)),r=-1,i=-1;for(let t=0;t<e.length;t+=1)-1===r&&e[t]!==s[t]&&(r=t),-1===i&&e[e.length-t-1]!==s[s.length-t-1]&&(i=t);let o=O[p];if(r<o.start||e.length-i-1>o.end)return;let a=s.length-e.length+o.end-UB(o.endSeparator||"").length;n=s.slice(o.start+UB(o.startSeparator||"").length,a)}if(0===n.length){navigator.userAgent.toLowerCase().includes("android")&&A(a),y(),w();return}v({keyPressed:n,sectionIndex:p})}),j=I.useMemo(()=>void 0!==u?u:g.getV6InputValueFromSections(M(m.emptyValue),T,t),[u,g,M,m.emptyValue,T,t]),F=I.useMemo(()=>f.tempValueStrAndroid??g.getV6InputValueFromSections(f.sections,T,t),[f.sections,g,f.tempValueStrAndroid,T,t]);return I.useEffect(()=>(_.current&&_.current===Us(document)&&C("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]),{interactions:R,returnedValue:{readOnly:c,onBlur:B,onClick:L,onFocus:P,onPaste:N,inputRef:D,enableAccessibleFieldDOMStructure:!1,placeholder:j,inputMode:I.useMemo(()=>null==p||"letter"===f.sections[p].contentType?"text":"numeric",[p,f.sections]),autoComplete:"off",value:!(_.current&&_.current===Us(document))&&k?"":F,onChange:z}}},Uj=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],UF=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],UV=["minDateTime","maxDateTime"];[...Uj,...UF,...UV];let U$=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],UH=["clearable","onClear","InputProps","sx","slots","slotProps"],UW=["ownerState"];var UG=n(54227),UU=n(75472);function Uq(e){return(0,V.Ay)("MuiPickersTextField",e)}function UY(e){return(0,V.Ay)("MuiPickersInputBase",e)}(0,F.A)("MuiPickersTextField",["root","focused","disabled","error","required"]);let UX=(0,F.A)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function UZ(e){return(0,V.Ay)("MuiPickersOutlinedInput",e)}let UK=(0,er.A)({},UX,(0,F.A)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),UQ=["children","className","label","notched","shrink"],UJ=(0,N.A)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{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%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),U0=(0,N.A)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),U1=(0,N.A)("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function U2(e){let{className:t,label:n}=e,r=(0,en.A)(e,UQ),i=null!=n&&""!==n,o=(0,er.A)({},e,{withLabel:i});return(0,_.jsx)(UJ,(0,er.A)({"aria-hidden":!0,className:t},r,{ownerState:o,children:(0,_.jsx)(U1,{ownerState:o,children:i?(0,_.jsx)(U0,{children:n}):(0,_.jsx)(U0,{className:"notranslate",children:"​"})})}))}var U5=n(85235);function U4(e){return(0,V.Ay)("MuiPickersSectionList",e)}let U3=(0,F.A)("MuiPickersSectionList",["root","section","sectionContent"]),U6=["slots","slotProps","elements","sectionListRef"],U8=(0,N.A)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),U9=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),U7=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),qe=(0,N.A)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function qt(e){let{slots:t,slotProps:n,element:r,classes:i}=e,o=t?.section??U9,a=(0,m8.A)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),s=t?.sectionContent??qe,l=(0,m8.A)({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),u=t?.sectionSeparator??U7,c=(0,m8.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=(0,m8.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,_.jsxs)(o,(0,er.A)({},a,{children:[(0,_.jsx)(u,(0,er.A)({},c)),(0,_.jsx)(s,(0,er.A)({},l)),(0,_.jsx)(u,(0,er.A)({},d))]}))}let qn=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:o,sectionListRef:a}=n,s=(0,en.A)(n,U6),l=(e=>{let{classes:t}=e;return(0,R.A)({root:["root"],section:["section"],sectionContent:["sectionContent"]},U4,t)})(n),u=I.useRef(null),c=(0,mn.A)(t,u),d=e=>{if(!u.current)throw Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return u.current};I.useImperativeHandle(a,()=>({getRoot:()=>d("getRoot"),getSectionContainer:e=>d("getSectionContainer").querySelector(`.${U3.section}[data-sectionindex="${e}"]`),getSectionContent:e=>d("getSectionContent").querySelector(`.${U3.section}[data-sectionindex="${e}"] .${U3.sectionContent}`),getSectionIndexFromDOMElement(e){let t=d("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(U3.section)?n=e:e.classList.contains(U3.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let h=r?.root??U8,p=(0,m8.A)({elementType:h,externalSlotProps:i?.root,externalForwardedProps:s,additionalProps:{ref:c,suppressContentEditableWarning:!0},className:l.root,ownerState:{}});return(0,_.jsx)(h,(0,er.A)({},p,{children:p.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,_.jsx)(I.Fragment,{children:o.map((e,t)=>(0,_.jsx)(qt,{slots:r,slotProps:i,element:e,classes:l},t))})}))}),qr=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],qi=(0,N.A)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,er.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Math.round(.15/16*1e5)/1e5}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),qo=(0,N.A)(U8,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),qa=(0,N.A)(U9,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),qs=(0,N.A)(qe,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),ql=(0,N.A)(U7,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),qu=(0,N.A)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,er.A)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),qc=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:a,id:s,endAdornment:l,startAdornment:u,renderSuffix:c,slots:d,slotProps:h,contentEditable:p,tabIndex:f,onInput:g,onPaste:m,onKeyDown:v,name:y,readOnly:x,inputProps:b,inputRef:w,sectionListRef:S}=n,A=(0,en.A)(n,qr),C=I.useRef(null),M=(0,mn.A)(t,C),k=(0,mn.A)(b?.ref,w),T=(0,f3.I)(),D=(0,fx.A)();if(!D)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");I.useEffect(()=>{D&&D.setAdornedStart(!!u)},[D,u]),I.useEffect(()=>{D&&(i?D.onEmpty():D.onFilled())},[D,i]);let O=(0,er.A)({},n,D,{isRtl:T}),E=(e=>{let{focused:t,disabled:n,error:r,classes:i,fullWidth:o,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",o&&"fullWidth",`color${(0,U5.A)(s)}`,"small"===l&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,R.A)(d,UY,i)})(O),P=d?.root||qi,L=(0,m8.A)({elementType:P,externalSlotProps:h?.root,externalForwardedProps:A,additionalProps:{"aria-invalid":D.error,ref:M},className:E.root,ownerState:O}),N=d?.input||qo;return(0,_.jsxs)(P,(0,er.A)({},L,{children:[u,(0,_.jsx)(qn,{sectionListRef:S,elements:r,contentEditable:p,tabIndex:f,className:E.sectionsContainer,onFocus:e=>{D.disabled?e.stopPropagation():D.onFocus?.(e)},onBlur:D.onBlur,onInput:g,onPaste:m,onKeyDown:v,slots:{root:N,section:qa,sectionContent:qs,sectionSeparator:ql},slotProps:{root:{ownerState:O},sectionContent:{className:UX.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?UX.sectionBefore:UX.sectionAfter})}}),l,c?c((0,er.A)({},D)):null,(0,_.jsx)(qu,(0,er.A)({name:y,className:E.input,value:o,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:D.required,disabled:D.disabled},b,{ref:k}))]}))}),qd=["label","autoFocus","ownerState","notched"],qh=(0,N.A)(qi,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${UK.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${UK.focused} .${UK.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${UK.disabled}`]:{[`& .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${UK.error} .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{color:t},style:{[`&.${UK.focused}:not(.${UK.error}) .${UK.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),qp=(0,N.A)(qo,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),qf=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:o}=n,a=(0,en.A)(n,qd),s=(0,fx.A)(),l=(0,er.A)({},n,i,s,{color:s?.color||"primary"}),u=(e=>{let{classes:t}=e,n=(0,R.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},UZ,t);return(0,er.A)({},t,n)})(l);return(0,_.jsx)(qc,(0,er.A)({slots:{root:qh,input:qp},renderSuffix:e=>(0,_.jsx)(U2,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:u.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,_.jsxs)(I.Fragment,{children:[r," ","*"]}):r,ownerState:l})},a,{label:r,classes:u,ref:t}))});qf.muiName="Input";var qg=n(57867);function qm(e){return(0,V.Ay)("MuiPickersFilledInput",e)}let qv=(0,er.A)({},UX,(0,F.A)("MuiPickersFilledInput",["root","underline","input"])),qy=["label","autoFocus","disableUnderline","ownerState"],qx=(0,N.A)(qi,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,qg.MC)(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,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:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${qv.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${qv.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{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"},[`&.${qv.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qv.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})`:t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,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(.${qv.disabled}, .${qv.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${qv.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),qb=(0,N.A)(qo,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),qw=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,en.A)(n,qy),s=(0,fx.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,R.A)({root:["root",!n&&"underline"],input:["input"]},qm,t);return(0,er.A)({},t,r)})((0,er.A)({},n,o,s,{color:s?.color||"primary"}));return(0,_.jsx)(qc,(0,er.A)({slots:{root:qx,input:qb},slotProps:{root:{disableUnderline:i}}},a,{label:r,classes:l,ref:t}))});function qS(e){return(0,V.Ay)("MuiPickersFilledInput",e)}qw.muiName="Input";let qA=(0,er.A)({},UX,(0,F.A)("MuiPickersInput",["root","input"])),qC=["label","autoFocus","disableUnderline","ownerState"],qM=(0,N.A)(qi,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",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"},[`&.${qA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qA.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,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(.${qA.disabled}, .${qA.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${qA.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),qk=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,en.A)(n,qC),s=(0,fx.A)(),l=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,R.A)({root:["root",!n&&"underline"],input:["input"]},qS,t);return(0,er.A)({},t,r)})((0,er.A)({},n,o,s,{disableUnderline:i,color:s?.color||"primary"}));return(0,_.jsx)(qc,(0,er.A)({slots:{root:qM}},a,{label:r,classes:l,ref:t}))});qk.muiName="Input";let qT=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],q_={standard:qk,filled:qw,outlined:qf},qI=(0,N.A)(yf.A,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),qD=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:o,color:a="primary",disabled:s=!1,error:l=!1,variant:u="outlined",required:c=!1,InputProps:d,inputProps:h,inputRef:p,sectionListRef:f,elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onPaste:b,onInput:w,endAdornment:S,startAdornment:A,tabIndex:C,contentEditable:M,focused:k,value:T,onChange:D,fullWidth:E,id:P,name:L,helperText:N,FormHelperTextProps:B,label:z,InputLabelProps:j}=n,F=(0,en.A)(n,qT),V=I.useRef(null),$=(0,mn.A)(t,V),H=(0,vX.A)(P),W=N&&H?`${H}-helper-text`:void 0,G=z&&H?`${H}-label`:void 0,U=(0,er.A)({},n,{color:a,disabled:s,error:l,focused:k,required:c,variant:u}),q=(e=>{let{focused:t,disabled:n,classes:r,required:i}=e;return(0,R.A)({root:["root",t&&!n&&"focused",n&&"disabled",i&&"required"]},Uq,r)})(U),Y=q_[u];return(0,_.jsxs)(qI,(0,er.A)({className:(0,O.A)(q.root,o),ref:$,focused:k,onFocus:r,onBlur:i,disabled:s,variant:u,error:l,color:a,fullWidth:E,required:c,ownerState:U},F,{children:[(0,_.jsx)(UG.A,(0,er.A)({htmlFor:H,id:G},j,{children:z})),(0,_.jsx)(Y,(0,er.A)({elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onInput:w,onPaste:b,endAdornment:S,startAdornment:A,tabIndex:C,contentEditable:M,value:T,onChange:D,id:H,fullWidth:E,inputProps:h,inputRef:p,sectionListRef:f,label:z,name:L,role:"group","aria-labelledby":G,"aria-describedby":W,"aria-live":W?"polite":void 0},d)),N&&(0,_.jsx)(UU.A,(0,er.A)({id:W},B,{children:N}))]}))}),qO=["enableAccessibleFieldDOMStructure"],qR=["InputProps","readOnly"],qE=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],qP=["slots","slotProps","InputProps","inputProps"],qL=I.forwardRef(function(e,t){let n=$N({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:o,inputProps:a}=n,s=(0,en.A)(n,qP),l=r?.textField??(e.enableAccessibleFieldDOMStructure?qD:eX.A),u=(0,m8.A)({elementType:l,externalSlotProps:i?.textField,externalForwardedProps:s,ownerState:n,additionalProps:{ref:t}});u.inputProps=(0,er.A)({},a,u.inputProps),u.InputProps=(0,er.A)({},o,u.InputProps);let c=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,en.A)(e,qO);if(t){let{InputProps:e,readOnly:t}=n,r=(0,en.A)(n,qR);return(0,er.A)({},r,{InputProps:(0,er.A)({},e??{},{readOnly:t})})}let{onPaste:r,onKeyDown:i,inputMode:o,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,en.A)(n,qE);return(0,er.A)({},c,{InputProps:(0,er.A)({},s??{},{readOnly:a}),inputProps:(0,er.A)({},l??{},{inputMode:o,onPaste:r,onKeyDown:i,ref:u})})})((e=>{let t,n,r,i,o,{forwardedProps:a,internalProps:s}=(t=$H().utils,n=$H().defaultDates,r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h,i=(0,er.A)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:$q(t,e.minDateTime??e.minDate,n.minDate),maxDate:$q(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),o="date-time",I.useMemo(()=>{let e=(0,er.A)({},i),t={},n=n=>{e.hasOwnProperty(n)&&(t[n]=e[n],delete e[n])};return U$.forEach(n),Uj.forEach(n),UF.forEach(n),UV.forEach(n),{forwardedProps:e,internalProps:t}},[i,o]));return(e=>{let t=$H().utils,{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:i,enableAccessibleFieldDOMStructure:o=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:d},fieldValueManager:h,valueManager:p,validator:f}=e,g=(0,f3.I)(),m=(e=>{let t=$H().utils,n=$H().localeText,r=$H(),i=(0,f3.I)(),{valueManager:o,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:d,referenceDate:h,onChange:p,format:f,formatDensity:g="dense",selectedSections:m,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:x,enableAccessibleFieldDOMStructure:b=!1}}=e,{timezone:w,value:S,handleValueChange:A}=WT({timezone:x,value:c,defaultValue:d,referenceDate:h,onChange:p,valueManager:o}),C=I.useMemo(()=>{let e;return e=t.date(void 0),"0"===t.formatByString(t.setSeconds(e,0),"s")?WP:Array.from({length:10}).map((n,r)=>t.formatByString(t.setSeconds(e,r),"s"))},[t]),M=I.useMemo(()=>((e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=$Y(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:4===e.formatByString(e.date(void 0,"system"),t).length?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){let n=WR(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(o);return WL(e.formatByString(e.endOfDay(r),n),t)!==i.toString()?{minimum:1,maximum:Number(WL(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:i}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,C,w),[t,C,w]),k=I.useCallback((e,r=null)=>a.getSectionsFromValue(t,e,r,e=>UL({utils:t,localeText:n,localizedDigits:C,format:f,date:e,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i})),[a,f,n,C,i,y,t,g,b]),[T,_]=I.useState(()=>{let e=k(S);WH(e,s);let n={sections:e,value:S,referenceValue:o.emptyValue,tempValueStrAndroid:null},r=Math.max(...e.map(e=>WI[e.type]??1)),i=o.getInitialReferenceValue({referenceDate:h,value:S,utils:t,props:u,granularity:r,timezone:w});return(0,er.A)({},n,{referenceValue:i})}),[D,O]=(0,yA.A)({controlled:m,default:null,name:"useField",state:"selectedSections"}),R=e=>{O(e),v?.(e)},E=I.useMemo(()=>WU(D,T.sections),[D,T.sections]),P="all"===E?0:E,L=({value:e,referenceValue:n,sections:i})=>{if(_(t=>(0,er.A)({},t,{sections:i,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,T.value,e))return;let a={validationError:l({adapter:r,value:e,timezone:w,props:u})};A(e,a)},N=(e,t)=>{let n=[...T.sections];return n[e]=(0,er.A)({},n[e],{value:t,modified:!0}),n};return I.useEffect(()=>{let e=k(T.value);WH(e,s),_(t=>(0,er.A)({},t,{sections:e}))},[f,t.locale,i]),I.useEffect(()=>{o.areValuesEqual(t,T.value,S)&&o.getTimezone(t,T.value)===o.getTimezone(t,S)||_(e=>(0,er.A)({},e,{value:S,referenceValue:a.updateReferenceValue(t,S,e.referenceValue),sections:k(S)}))},[S]),{state:T,activeSectionIndex:P,parsedSelectedSections:E,setSelectedSections:R,clearValue:()=>{L({value:o.emptyValue,referenceValue:T.referenceValue,sections:k(o.emptyValue)})},clearActiveSection:()=>{if(null==P)return;let e=T.sections[P],n=a.getActiveDateManager(t,T,e),r=n.getSections(T.sections).filter(e=>""!==e.value).length===+(""!==e.value),i=N(P,""),o=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(o);L((0,er.A)({},s,{sections:i}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{let i,o;r&&P<T.sections.length-1&&R(P+1);let s=a.getActiveDateManager(t,T,e),l=N(P,n),u=s.getSections(l),c=((e,t,n)=>{let r=t.some(e=>"day"===e.type),i=[],o=[];for(let e=0;e<t.length;e+=1){let a=t[e];r&&"weekDay"===a.type||(i.push(a.format),o.push(WF(a,"non-input",n)))}let a=i.join(" "),s=o.join(" ");return e.parse(s,a)})(t,u,C);if(null!=c&&t.isValid(c)){let e=WG(t,c,u,s.referenceDate,!0);i=s.getNewValuesFromNewActiveDate(e),o=!0}else i=s.getNewValuesFromNewActiveDate(c),o=(null!=c&&!t.isValid(c))!=(null!=s.date&&!t.isValid(s.date));return o?L((0,er.A)({},i,{sections:l})):_(e=>(0,er.A)({},e,i,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let r=a.parseValueStr(e,T.referenceValue,(e,r)=>{let o=t.parse(e,f);if(null==o||!t.isValid(o))return null;let a=UL({utils:t,localeText:n,localizedDigits:C,format:f,date:o,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:i});return WG(t,o,a,r,!1)}),o=a.updateReferenceValue(t,r,T.referenceValue);L({value:r,referenceValue:o,sections:k(r,T.sections)})},setTempAndroidValueStr:e=>_(t=>(0,er.A)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:k,sectionsValueBoundaries:M,localizedDigits:C,timezone:w}})(e),{state:v,activeSectionIndex:y,parsedSelectedSections:x,setSelectedSections:b,clearValue:w,clearActiveSection:S,updateSectionValue:A,setTempAndroidValueStr:C,sectionsValueBoundaries:M,localizedDigits:k,timezone:T}=m,_=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:i,timezone:o})=>{let a=$H().utils,[s,l]=I.useState(null),u=(0,yC.A)(()=>l(null));I.useEffect(()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),I.useEffect(()=>{if(null!=s){let e=setTimeout(()=>u(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[s,u]);let c=({keyPressed:t,sectionIndex:n},r,i)=>{let o=t.toLowerCase(),a=e[n];if(null!=s&&(!i||i(s.value))&&s.sectionIndex===n){let e=`${s.value}${o}`,t=r(e,a);if(null==t.saveQuery)return l({sectionIndex:n,value:e,sectionType:a.type}),t}let c=r(o,a);return null==c.saveQuery||c.saveQuery?(l({sectionIndex:n,value:o,sectionType:a.type}),null!=c.saveQuery?null:c):(u(),null)};return{applyCharacterEditing:(0,yC.A)(s=>{var l;let u,d,h,p=e[s.sectionIndex],f=WB(s.keyPressed,r)?(l=(0,er.A)({},s,{keyPressed:WN(s.keyPressed,r)}),u=(e,t)=>{let i=WL(e,r),o=Number(i),s=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(o>s.maximum)return{saveQuery:!1};if(o<s.minimum)return{saveQuery:!0};let l=10*o>s.maximum||i.length===s.maximum.toString().length;return{sectionValue:Wj(a,o,s,r,t),shouldGoToNextSection:l}},c(l,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return u(e,t);if("month"===t.type){let n=W$(a,"digit","month","MM"),r=u(e,{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(null!=r.saveQuery)return r;let i=WV(a,r.sectionValue,"MM",t.format);return(0,er.A)({},r,{sectionValue:i})}if("weekDay"===t.type){let n=u(e,t);if(null!=n.saveQuery)return n;let r=WR(a,t.format)[Number(n.sectionValue)-1];return(0,er.A)({},n,{sectionValue:r})}return{saveQuery:!1}},e=>WB(e,r))):(d=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},h=(e,t,n,r)=>{let i=e=>WE(a,o,t.type,e);if("letter"===t.contentType)return d(t.format,i(t.format),e);if(n&&null!=r&&"letter"===WO(a,n).contentType){let t=i(n),o=d(n,t,e);return null!=o.saveQuery?{saveQuery:!1}:(0,er.A)({},o,{sectionValue:r(o.sectionValue,t)})}return{saveQuery:!1}},c(s,(e,t)=>{switch(t.type){case"month":return h(e,t,a.formats.month,e=>WV(a,e,a.formats.month,t.format));case"weekDay":return h(e,t,a.formats.weekday,(e,t)=>t.indexOf(e).toString());case"meridiem":return h(e,t);default:return{saveQuery:!1}}}));null==f?i(null):t({activeSection:p,newSectionValue:f.sectionValue,shouldGoToNextSection:f.shouldGoToNextSection})}),resetCharacterQuery:u}})({sections:v.sections,updateSectionValue:A,sectionsValueBoundaries:M,localizedDigits:k,setTempAndroidValueStr:C,timezone:T}),{resetCharacterQuery:D}=_,O=p.areValuesEqual(t,v.value,p.emptyValue),R=o?UN:Uz,E=I.useMemo(()=>((e,t)=>{let n={};if(!t)return e.forEach((t,r)=>{let i=r===e.length-1?null:r+1;n[r]={leftIndex:0===r?null:r-1,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let r={},i={},o=0,a=0,s=e.length-1;for(;s>=0;){-1===(a=e.findIndex((e,t)=>t>=o&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator))&&(a=e.length-1);for(let e=a;e>=o;e-=1)i[e]=s,r[s]=e,s-=1;o=a+1}return e.forEach((t,o)=>{let a=i[o],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[o]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(v.sections,g&&!o),[v.sections,g,o]),{returnedValue:P,interactions:L}=R((0,er.A)({},e,m,_,{areAllSectionsEmpty:O,sectionOrder:E})),N=(0,yC.A)(e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),b("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)b(E.startIndex);else if("all"===x)b(E.endIndex);else{let e=E.neighbors[x].rightIndex;null!==e&&b(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)b(E.endIndex);else if("all"===x)b(E.startIndex);else{let e=E.neighbors[x].leftIndex;null!==e&&b(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?w():S(),D();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==y)break;"all"===x&&b(y);let n=v.sections[y],r=h.getActiveDateManager(t,v,n),o=((e,t,n,r,i,o,a,s)=>{let l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;if("digit"===n.contentType||"digit-with-letter"===n.contentType){let r,h=i[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);r=l>0||u?h.minimum:h.maximum}else r=parseInt(WL(n.value,o),10)+l*p;return(r%p!=0&&((l<0||u)&&(r+=p-(p+r)%p),(l>0||c)&&(r-=r%p)),r>h.maximum)?Wj(e,h.minimum+(r-h.maximum-1)%(h.maximum-h.minimum+1),h,o,n):r<h.minimum?Wj(e,h.maximum-(h.minimum-r-1)%(h.maximum-h.minimum+1),h,o,n):Wj(e,r,h,o,n)}let h=WE(e,t,n.type,n.format);if(0===h.length)return n.value;if(d)return l>0||u?h[0]:h[h.length-1];let p=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[p]})(t,T,n,e.key,M,k,r.date,{minutesStep:i});A({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,mr.A)(()=>{L.syncSelectionToDOM()});let{hasValidationError:B}=Uo({props:n,validator:f,timezone:T,value:v.value,onError:n.onError}),z=I.useMemo(()=>void 0!==u?u:B,[B,u]);I.useEffect(()=>{z||null!=y||D()},[v.referenceValue,y,z]),I.useEffect(()=>{null!=v.tempValueStrAndroid&&null!=y&&(D(),S())},[v.sections]),I.useImperativeHandle(r,()=>({getSections:()=>v.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused}));let j={onKeyDown:N,onClear:(0,yC.A)((e,...t)=>{e.preventDefault(),d?.(e,...t),w(),L.isFieldFocused()?b(E.startIndex):L.focusField(0)}),error:z,clearable:!!(c&&!O&&!s&&!a)};return(0,er.A)({},e.forwardedProps,j,{disabled:a,readOnly:s},P)})({forwardedProps:a,internalProps:s,valueManager:WY,fieldValueManager:WX,validator:UR,valueType:"date-time"})})(u)),d=(e=>{let t=$H().localeText,{clearable:n,onClear:r,InputProps:i,sx:o,slots:a,slotProps:s}=e,l=(0,en.A)(e,UH),u=a?.clearButton??eY,c=(0,m8.A)({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=(0,en.A)(c,UW),h=a?.clearIcon??Hv,p=(0,m8.A)({elementType:h,externalSlotProps:s?.clearIcon,ownerState:{}});return(0,er.A)({},l,{InputProps:(0,er.A)({},i,{endAdornment:(0,_.jsxs)(I.Fragment,{children:[n&&(0,_.jsx)(g7,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,_.jsx)(u,(0,er.A)({},d,{onClick:r,children:(0,_.jsx)(h,(0,er.A)({fontSize:"small"},p))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})})((0,er.A)({},c,{slots:r,slotProps:i}));return(0,_.jsx)(l,(0,er.A)({},d))});var qN=n(65130);function qB(e,t,n){return(0,ox.w)(n?.in||e,+(0,ov.a)(e)+t)}var qz=n(38086);function qj(e,t){let n=(0,ov.a)(e,t?.in);return n.setHours(23,59,59,999),n}function qF(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function qV(e,t){let n=(0,ov.a)(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=(0,ox.w)(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function q$(e,t){return+(0,ov.a)(e)>+(0,ov.a)(t)}function qH(e,t){return+(0,ov.a)(e)<+(0,ov.a)(t)}function qW(e,t){let n=(0,ov.a)(e,t?.in);return n.setMinutes(0,0,0),n}class qG{subPriority=0;validate(e,t){return!0}}class qU extends qG{constructor(e,t,n,r,i){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,i&&(this.subPriority=i)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class qq extends qG{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>(0,ox.w)(t,e))}set(e,t){var n,r;let i;if(t.timestampIsSet)return e;return(0,ox.w)(e,((i="function"==typeof(r=n=this.context)&&r.prototype?.constructor===r?new n(0):(0,ox.w)(n,0)).setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),i))}}class qY{run(e,t,n,r){let i=this.parse(e,t,n,r);return i?{setter:new qU(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,t,n){return!0}}let qX=/^(1[0-2]|0?\d)/,qZ=/^(3[0-1]|[0-2]?\d)/,qK=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,qQ=/^(5[0-3]|[0-4]?\d)/,qJ=/^(2[0-3]|[0-1]?\d)/,q0=/^(2[0-4]|[0-1]?\d)/,q1=/^(1[0-1]|0?\d)/,q2=/^(1[0-2]|0?\d)/,q5=/^[0-5]?\d/,q4=/^[0-5]?\d/,q3=/^\d/,q6=/^\d{1,2}/,q8=/^\d{1,3}/,q9=/^\d{1,4}/,q7=/^-?\d+/,Ye=/^-?\d/,Yt=/^-?\d{1,2}/,Yn=/^-?\d{1,3}/,Yr=/^-?\d{1,4}/,Yi=/^([+-])(\d{2})(\d{2})?|Z/,Yo=/^([+-])(\d{2})(\d{2})|Z/,Ya=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ys=/^([+-])(\d{2}):(\d{2})|Z/,Yl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Yu(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Yc(e,t){let n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Yd(e,t){let n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};let r="+"===n[1]?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(i*ow.s0+6e4*o+1e3*a),rest:t.slice(n[0].length)}}function Yh(e,t){switch(e){case 1:return Yc(q3,t);case 2:return Yc(q6,t);case 3:return Yc(q8,t);case 4:return Yc(q9,t);default:return Yc(RegExp("^\\d{1,"+e+"}"),t)}}function Yp(e,t){switch(e){case 1:return Yc(Ye,t);case 2:return Yc(Yt,t);case 3:return Yc(Yn,t);case 4:return Yc(Yr,t);default:return Yc(RegExp("^-?\\d{1,"+e+"}"),t)}}function Yf(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Yg(e,t){let n,r=t>0,i=r?t:1-t;if(i<=50)n=e||100;else{let t=i+50;n=e+100*Math.trunc(t/100)-100*(e>=t%100)}return r?n:1-n}function Ym(e){return e%400==0||e%4==0&&e%100!=0}let Yv=[31,28,31,30,31,30,31,31,30,31,30,31],Yy=[31,29,31,30,31,30,31,31,30,31,30,31];function Yx(e,t,n){let r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,i=(0,ov.a)(e,n?.in),o=i.getDay(),a=7-r,s=t<0||t>6?t-(o+a)%7:((t%7+7)%7+a)%7-(o+a)%7;return(0,qN.f)(i,s,n)}let Yb={G:new class extends qY{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends qY{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return Yu(Yh(4,e),r);case"yo":return Yu(n.ordinalNumber(e,{unit:"year"}),r);default:return Yu(Yh(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){let r=e.getFullYear();if(n.isTwoDigitYear){let t=Yg(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}let i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},Y:new class extends qY{priority=130;parse(e,t,n){let r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return Yu(Yh(4,e),r);case"Yo":return Yu(n.ordinalNumber(e,{unit:"year"}),r);default:return Yu(Yh(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){let i=o_(e,r);if(n.isTwoDigitYear){let t=Yg(n.year,i);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),oC(e,r)}let o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),oC(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends qY{priority=130;parse(e,t){return"R"===t?Yp(4,e):Yp(t.length,e)}set(e,t,n){let r=(0,ox.w)(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oM(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends qY{priority=130;parse(e,t){return"u"===t?Yp(4,e):Yp(t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends qY{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Yh(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends qY{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Yh(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth((n-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends qY{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case"M":return Yu(Yc(qX,e),r);case"MM":return Yu(Yh(2,e),r);case"Mo":return Yu(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends qY{priority=110;parse(e,t,n){let r=e=>e-1;switch(t){case"L":return Yu(Yc(qX,e),r);case"LL":return Yu(Yh(2,e),r);case"Lo":return Yu(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends qY{priority=100;parse(e,t,n){switch(t){case"w":return Yc(qQ,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){let i,o;return oC((o=oI(i=(0,ov.a)(e,r?.in),r)-n,i.setDate(i.getDate()-7*o),(0,ov.a)(i,r?.in)),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends qY{priority=100;parse(e,t,n){switch(t){case"I":return Yc(qQ,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){let r,i;return oM((i=oT(r=(0,ov.a)(e,void 0),void 0)-n,r.setDate(r.getDate()-7*i),r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends qY{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Yc(qZ,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Yh(t.length,e)}}validate(e,t){let n=Ym(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Yy[r]:t>=1&&t<=Yv[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends qY{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Yc(qK,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Yh(t.length,e)}}validate(e,t){return Ym(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends qY{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends qY{priority=90;parse(e,t,n,r){let i=e=>{let t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Yu(Yh(t.length,e),i);case"eo":return Yu(n.ordinalNumber(e,{unit:"day"}),i);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends qY{priority=90;parse(e,t,n,r){let i=e=>{let t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Yu(Yh(t.length,e),i);case"co":return Yu(n.ordinalNumber(e,{unit:"day"}),i);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Yx(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends qY{priority=90;parse(e,t,n){let r=e=>0===e?7:e;switch(t){case"i":case"ii":return Yh(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Yu(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Yu(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Yu(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return Yu(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){var r,i;let o,a,s;return r=e,o=(0,ov.a)(r,void 0),i=void 0,s=0===(a=(0,ov.a)(o,i?.in).getDay())?7:a,(e=(0,qN.f)(o,n-s,void 0)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends qY{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends qY{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends qY{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Yf(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends qY{priority=70;parse(e,t,n){switch(t){case"h":return Yc(q2,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){let r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends qY{priority=70;parse(e,t,n){switch(t){case"H":return Yc(qJ,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends qY{priority=70;parse(e,t,n){switch(t){case"K":return Yc(q1,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends qY{priority=70;parse(e,t,n){switch(t){case"k":return Yc(q0,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Yh(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){return e.setHours(n<=24?n%24:n,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends qY{priority=60;parse(e,t,n){switch(t){case"m":return Yc(q5,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends qY{priority=50;parse(e,t,n){switch(t){case"s":return Yc(q4,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Yh(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends qY{priority=30;parse(e,t){return Yu(Yh(t.length,e),e=>Math.trunc(e*Math.pow(10,-t.length+3)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends qY{priority=10;parse(e,t){switch(t){case"X":return Yd(Yi,e);case"XX":return Yd(Yo,e);case"XXXX":return Yd(Ya,e);case"XXXXX":return Yd(Yl,e);default:return Yd(Ys,e)}}set(e,t,n){return t.timestampIsSet?e:(0,ox.w)(e,e.getTime()-oy(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends qY{priority=10;parse(e,t){switch(t){case"x":return Yd(Yi,e);case"xx":return Yd(Yo,e);case"xxxx":return Yd(Ya,e);case"xxxxx":return Yd(Yl,e);default:return Yd(Ys,e)}}set(e,t,n){return t.timestampIsSet?e:(0,ox.w)(e,e.getTime()-oy(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends qY{priority=40;parse(e){return Yc(q7,e)}set(e,t,n){return[(0,ox.w)(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends qY{priority=20;parse(e){return Yc(q7,e)}set(e,t,n){return[(0,ox.w)(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Yw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YA=/^'([^]*?)'?$/,YC=/''/g,YM=/\S/,Yk=/[a-zA-Z]/,YT={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Y_={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class YI{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=YT,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=(0,er.A)({},Y_,n),this.longFormatters=r,this.lib=i||"date-fns"}}class YD extends YI{constructor({locale:e,formats:t}={}){super({locale:e??n1,formats:t,longFormatters:oz}),this.parse=(e,t)=>""===e?null:function(e,t,n,r){let i=()=>(0,ox.w)(r?.in||n,NaN),o=Object.assign({},n2),a=r?.locale??o.locale??n1,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?i():(0,ov.a)(n,r?.in);let u={firstWeekContainsDate:s,weekStartsOn:l,locale:a},c=[new qq(r?.in,n)],d=t.match(YS).map(e=>{let t=e[0];return t in oz?(0,oz[t])(e,a.formatLong):e}).join("").match(Yw),h=[];for(let n of d){var p,f;!r?.useAdditionalWeekYearTokens&&(p=n,oF.test(p))&&o$(n,t,e),!r?.useAdditionalDayOfYearTokens&&(f=n,oj.test(f))&&o$(n,t,e);let o=n[0],s=Yb[o];if(s){let{incompatibleTokens:t}=s;if(Array.isArray(t)){let e=h.find(e=>t.includes(e.token)||e.token===o);if(e)throw RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&h.length>0)throw RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:o,fullToken:n});let r=s.run(e,n,a.match,u);if(!r)return i();c.push(r.setter),e=r.rest}else{if(o.match(Yk))throw RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");if("''"===n?n="'":"'"===o&&(n=n.match(YA)[1].replace(YC,"'")),0!==e.indexOf(n))return i();e=e.slice(n.length)}}if(e.length>0&&YM.test(e))return i();let g=c.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>c.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]),m=(0,ov.a)(n,r?.in);if(isNaN(+m))return i();let v={};for(let e of g){if(!e.validate(m,u))return i();let t=e.set(m,v,u);Array.isArray(t)?(m=t[0],Object.assign(v,t[1])):m=t}return m}(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&oH(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>oX(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&+(0,ov.a)(e)==+(0,ov.a)(t),this.isSameYear=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return n.getFullYear()===r.getFullYear()})(e,t),this.isSameMonth=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()})(e,t),this.isSameDay=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return+oS(n)==+oS(r)})(e,t),this.isSameHour=(e,t)=>(function(e,t){let[n,r]=ob(void 0,e,t);return+qW(n)==+qW(r)})(e,t),this.isAfter=(e,t)=>q$(e,t),this.isAfterYear=(e,t)=>q$(e,qF(t)),this.isAfterDay=(e,t)=>q$(e,qj(t)),this.isBefore=(e,t)=>qH(e,t),this.isBeforeYear=(e,t)=>qH(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>qH(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(function(e,t){let n=+(0,ov.a)(e,void 0),[r,i]=[+(0,ov.a)(t.start,void 0),+(0,ov.a)(t.end,void 0)].sort((e,t)=>e-t);return n>=r&&n<=i})(e,{start:t,end:n}),this.startOfYear=e=>oA(e),this.startOfMonth=e=>{let t;return(t=(0,ov.a)(e,void 0)).setDate(1),t.setHours(0,0,0,0),t},this.startOfWeek=e=>oC(e,{locale:this.locale}),this.startOfDay=e=>oS(e),this.endOfYear=e=>qF(e),this.endOfMonth=e=>{let t,n;return n=(t=(0,ov.a)(e,void 0)).getMonth(),t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t},this.endOfWeek=e=>{var t;let n,r,i;return t={locale:this.locale},n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n2.weekStartsOn??n2.locale?.options?.weekStartsOn??0,i=(r=(0,ov.a)(e,t?.in)).getDay(),r.setDate(r.getDate()+((i<n?-7:0)+6-(i-n))),r.setHours(23,59,59,999),r},this.endOfDay=e=>qj(e),this.addYears=(e,t)=>(0,qz.P)(e,12*t,void 0),this.addMonths=(e,t)=>(0,qz.P)(e,t),this.addWeeks=(e,t)=>(0,qN.f)(e,7*t,void 0),this.addDays=(e,t)=>(0,qN.f)(e,t),this.addHours=(e,t)=>qB(e,t*ow.s0,void 0),this.addMinutes=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setTime(n.getTime()+6e4*t),n},this.addSeconds=(e,t)=>qB(e,1e3*t,void 0),this.getYear=e=>(0,ov.a)(e,void 0).getFullYear(),this.getMonth=e=>(0,ov.a)(e,void 0).getMonth(),this.getDate=e=>(0,ov.a)(e,void 0).getDate(),this.getHours=e=>(0,ov.a)(e,void 0).getHours(),this.getMinutes=e=>(0,ov.a)(e,void 0).getMinutes(),this.getSeconds=e=>(0,ov.a)(e).getSeconds(),this.getMilliseconds=e=>(0,ov.a)(e).getMilliseconds(),this.setYear=(e,t)=>{let n;return isNaN(+(n=(0,ov.a)(e,void 0)))?(0,ox.w)(e,NaN):(n.setFullYear(t),n)},this.setMonth=(e,t)=>{let n,r,i,o,a;return r=(n=(0,ov.a)(e,void 0)).getFullYear(),i=n.getDate(),(o=(0,ox.w)(e,0)).setFullYear(r,t,15),o.setHours(0,0,0,0),a=qV(o),n.setMonth(t,Math.min(i,a)),n},this.setDate=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setDate(t),n},this.setHours=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setHours(t),n},this.setMinutes=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setMinutes(t),n},this.setSeconds=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setSeconds(t),n},this.setMilliseconds=(e,t)=>{let n;return(n=(0,ov.a)(e,void 0)).setMilliseconds(t),n},this.getDaysInMonth=e=>qV(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,o=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);o[e]=o[e]||[],o[e].push(i),i=this.addDays(i,1),r+=1}return o},this.getWeekNumber=e=>oI(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}}let YO="yyyy-MM-dd HH:mm:ss";function YR(e,t){let n,r;return e?(0,nY.isRelativeTimeRange)(e)?e.pastDuration:(n=oK(e.start,YO,t),r=oK(e.end,YO,t),`${n} - ${r}`):"Custom Time Range"}let YE=({initialTimeRange:e,onChange:t,onCancel:n,timeZone:r})=>{let i=["local","browser"].includes(r.toLowerCase())?Intl.DateTimeFormat().resolvedOptions().timeZone:r,[o,a]=(0,I.useState)(e),[s,l]=(0,I.useState)(!0),u=(e,t)=>{a(n=>({...n,[t]:e}))},c=e=>{u(e,"start")},d=e=>{u(e,"end")},h=()=>{var e,t;let n={start:o.start,end:o.end};if(e=n.start,t=n.end,oH(e)&&oH(t)?!!qH(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return n};return(0,_.jsx)($j,{dateAdapter:YD,children:(0,_.jsxs)(eH.A,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[s&&(0,_.jsxs)(cr.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,_.jsx)(cp.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,_.jsx)(UE,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new om(o.start,i),onChange:e=>{null!==e&&c(e)},onAccept:()=>{l(!1)}})]}),!s&&(0,_.jsxs)(cr.A,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,_.jsx)(cp.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,_.jsx)(UE,{timezone:i,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new om(o.end,i),minDateTime:new om(o.start,i),onChange:e=>{null!==e&&d(e)},onAccept:e=>{null!==e&&(l(!0),d(e))}})]}),(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,_.jsx)(IO.ErrorBoundary,{FallbackComponent:ID,children:(0,_.jsx)(qL,{"data-testid":"start_time_input",timezone:i,label:"Start Time",value:new om(o.start,i),onChange:e=>{e&&c(e)},onBlur:()=>h(),format:YO})}),(0,_.jsx)(IO.ErrorBoundary,{FallbackComponent:ID,children:(0,_.jsx)(qL,{"data-testid":"end_time_input",timezone:i,label:"End Time",value:new om(o.end,i),onChange:e=>{e&&d(e)},onBlur:()=>h(),format:YO})})]}),(0,_.jsxs)(eH.A,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,_.jsx)(eV,{variant:"contained",onClick:()=>{let e;(e=h())&&t(e)},fullWidth:!0,children:"Apply"}),(0,_.jsx)(eV,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function YP({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:i=!0,timeZone:o,timeZoneOptions:a,onTimeZoneChange:s}){let{timeZone:l}=u7(),u=o??l,c=(0,I.useRef)(),[d,h]=(0,I.useState)(!1),p=(0,I.useMemo)(()=>(0,nY.isRelativeTimeRange)(e)?(0,nY.toAbsoluteTimeRange)(e):e,[e]),f=(0,I.useMemo)(()=>{var t;return{value:t=(0,nY.isRelativeTimeRange)(e)?void 0:e,display:YR(t,u)}},[e,u]),[g,m]=(0,I.useState)(!1),v=a??n3(),[y,x]=(0,I.useState)(null),b=v.find(e=>e.value===u)?.display??u,w=oQ(u),S=oQ("local"),A=v.map(e=>({id:e.value,label:e.display})),C=A.find(e=>e.id===u);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(tx.Ay,{anchorEl:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:!!y,onClose:()=>x(null),sx:e=>({padding:e.spacing(1)}),children:(0,_.jsx)(cr.A,{sx:{p:1,minWidth:260},onClick:e=>{e.stopPropagation()},children:(0,_.jsx)(y7,{options:A,value:C,onChange:(e,t)=>{if(t){let e=v.find(e=>e.value===t.id);e&&s?.(e)}x(null)},disableClearable:!0,renderInput:e=>(0,_.jsx)(eX.A,{...e,placeholder:"Search timezones",size:"small"})})})}),(0,_.jsx)(tx.Ay,{anchorEl:c.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:d,onClose:()=>h(!1),sx:e=>({padding:e.spacing(2)}),children:(0,_.jsx)(YE,{initialTimeRange:p,onChange:e=>{n(e),h(!1),m(!1)},onCancel:()=>h(!1),timeZone:u})}),(0,_.jsx)(cr.A,{ref:c,children:(0,_.jsxs)(fZ.A,{open:g,value:YR(e,u),onClick:()=>m(!g),IconComponent:$R,renderValue:()=>(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,_.jsx)("span",{children:t.find(t=>YR(t.value,u)===YR(e,u))?.display??YR(e,u)}),w!==S&&(0,_.jsxs)(cr.A,{sx:{typography:"caption",color:"text.secondary"},children:["\xb7 ",w]})]}),inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[(0,_.jsx)(fX,{disableRipple:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{cursor:"default","&:hover":{backgroundColor:"transparent"},py:.5,px:1},children:(0,_.jsxs)(cr.A,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,_.jsxs)(cr.A,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,_.jsx)(cr.A,{sx:{typography:"subtitle1"},children:"Time Range"}),(0,_.jsxs)(cr.A,{sx:{color:"text.secondary",typography:"caption",mt:.25},children:["Timezone: ",b]})]}),(0,_.jsx)(cr.A,{sx:{display:"flex",alignItems:"center",pr:1,ml:1.5},children:(0,_.jsx)(eY,{size:"small","aria-label":"Select timezone",onClick:e=>{e.preventDefault(),e.stopPropagation(),x(e.currentTarget)},children:(0,_.jsx)($E,{fontSize:"small"})})})]})}),t.map((e,t)=>(0,_.jsx)(fX,{value:YR(e.value,u),onClick:()=>{n(e.value)},children:e.display},t)),i&&(0,_.jsx)(fX,{value:YR(f.value,u),onClick:()=>h(!0),children:f.display})]})})]})}function YL({value:e,onChange:t,timeZoneOptions:n,variant:r="standard",heightPx:i,...o}){let a,s=(0,I.useMemo)(()=>n??n3(),[n]);i&&(a="number"==typeof i?`${i}px`:i);let l=(0,I.useMemo)(()=>({minWidth:"compact"===r?"80px":"150px",...a&&{lineHeight:a,paddingY:0},...o.sx}),[r,a,o.sx]);return(0,_.jsx)(fZ.A,{...o,value:e,onChange:(e,n)=>{var r;let i;r=e.target.value,(i=s.find(e=>e.value===r))&&t&&t(i)},sx:l,size:"compact"===r?"small":"medium",children:s.map(e=>(0,_.jsx)(fX,{value:e.value,children:e.display},e.value))})}function YN(e){let{markerColor:t,sx:n}=e;return(0,_.jsx)(cr.A,{sx:iU({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function YB(e){let{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,_.jsxs)(eH.A,{spacing:.5,children:[(0,_.jsxs)(cr.A,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,_.jsx)(YN,{markerColor:n,sx:{marginTop:.25}}),(0,_.jsxs)(cr.A,{component:"span",children:[r,(0,_.jsx)(cr.A,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,_.jsx)(g2,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,_.jsx)(cr.A,{sx:e=>({color:e.palette.common.white}),children:i.map(e=>{if(e){let[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,_.jsxs)(cr.A,{sx:{display:"flex",gap:"4px"},children:[(0,_.jsx)(cp.A,{sx:{fontSize:"11px"},children:r}),(0,_.jsx)(cp.A,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}})})]})}let Yz=375,Yj=650,YF=650,YV=500,Y$=.75,YH=8,YW=750,YG="nearby series showing in tooltip",YU="emphasized series showing as bold in tooltip",Yq="#2E313E",YY=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),YX={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},YZ=[],YK=()=>{let[e,t]=(0,I.useState)(null);return(0,I.useEffect)(()=>{let e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),e},YQ={wrapLabels:!0,enablePinning:!0},YJ="Click chart to pin",Y0="Click chart to unpin";function Y1(e){let{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),l=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&l.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,_.jsx)(YB,{formattedY:n,metricName:e,metricLabels:l,markerColor:r})}let u=t.replace(/[,]/g,", ");return(0,_.jsxs)(cr.A,{sx:{display:"table-row",paddingTop:.5},children:[(0,_.jsxs)(cr.A,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,_.jsx)(YN,{markerColor:r,sx:{marginTop:.5}}),(0,_.jsx)(cr.A,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:YV,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?YU:YG,children:u})]}),(0,_.jsx)(cr.A,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}function Y2(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}function Y5(e,t,n,r,i){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let o=n>0?n:YF,a=r>0?r:Yj,s=e.page.x+32,l=e.page.y+16;if(i){let e=i.getBoundingClientRect();s=s-e.left+i.scrollLeft,l=l-e.top+i.scrollTop;let t=e.top+i.scrollHeight;l+o>t&&(l=Math.max(t-o-16,YH/2))}else l+o>window.innerHeight+window.scrollY&&(l=Math.max(window.innerHeight+window.scrollY-o-16,YH/2));return s+a>window.innerWidth&&(s=e.page.x-a-32),s<32&&(s=32),l<YH/2&&(l=YH/2),`translate3d(${s}px, ${l}px, 0)`}function Y4(e,t,n){return{minWidth:Yz,maxWidth:Yj,maxHeight:(n?n-YH:void 0)??YF,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??Yq,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"opacity 0.1s ease-out, visibility 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}function Y3(e,t){try{let n=t.convertToPixel("grid",[e,0]);return n?.[0]??null}catch{return null}}function Y6(e,t,n,r){let i=n[e];if(!i)return t;let o=i.stack;if(!o)return t;let a=o.toString(),s=(r.get(a)??0)+t;return r.set(a,s),s}function Y8(e,t,n){let r,i,o=t.indexOf(e);if(-1===o)return 20;let a=o>0?t[o-1]??null:null,s=o<t.length-1?t[o+1]??null:null,l=Y3(e,n);if(null===l)return 20;if(null!==a&&null!==s){let e=Y3(a,n)??l,t=Y3(s,n)??l;r=(l+e)/2,i=(l+t)/2}else if(null!==a){let e=Y3(a,n)??l;r=(l+e)/2,i=l+(l-r)}else{if(null===s)return 20;let e=Y3(s,n)??l;i=(l+e)/2,r=l-(i-l)}return Math.max(1,i-r)}function Y9(e,t,n,r){let i=t/Math.max(1,r),o=n-t/2+e*i;return{left:o,right:o+i}}function Y7(e,t,n){try{let r=n.convertToPixel("grid",[0,e]),i=n.convertToPixel("grid",[0,t]);if(!r||!i||void 0===r[1]||void 0===i[1])return null;return{top:Math.min(i[1],r[1]),bottom:Math.max(i[1],r[1])}}catch{return null}}let Xe=5.5,Xt=30,Xn=5;function Xr(e,t,n,r,i,o,a,s,l){let u=n[0]??null,c=n[1]??null;if(null===u||null===c||void 0===i.dispatchAction||!Array.isArray(e))return YZ;let d=iW(e[0]?.values,u);if(null===d)return YZ;let h=null;if(void 0!==s){let e=i.convertToPixel("grid",[0,c]),t=i.convertToPixel("grid",[0,c+r]);e&&t&&void 0!==e[1]&&void 0!==t[1]&&(h=Math.abs(t[1]-e[1]))}let p=l??Y3(d,i),f=function(e,t,n,r,i,o,a,s,l){let u=[],c=e.length,d=new Map,h=[],p=e[0]?.values;if(p&&p.length>0){let e=new Set;for(let[t]of p)e.has(t)||(e.add(t),h.push(t));h=h.toSorted((e,t)=>e-t)}let f=[];for(let e=0;e<c;e++)(t[e]?.type??"line")==="bar"&&f.push(e);let g=null,m=null;f.length>0&&null!==i&&(g=Y8(n,h,l),m=Y3(n,l));for(let h=0;h<c;h++){let c,p=t[h];if(!p)continue;let v=e[h];if(!v)continue;let y=v.values;if(!y||!Array.isArray(y))continue;let x=p.type??"line",b=p.name?p.name.toString():"",w=p.id?p.id.toString():"",S=(p.color??"#000").toString(),A=-1,C=0;for(let e=0;e<y.length;e++){let t=y[e];if(t&&t[0]===n){A=e,C=t[0],c=t[1];break}}if(-1===A||null==c)continue;let M=!1,k=c,T=1/0;if("line"===x)if(k=Y6(h,c,t,d),void 0!==o&&null!==s)try{let e=l.convertToPixel({seriesIndex:h},[A,k]);if(e&&void 0!==e[1]){let t=Math.abs(o-e[1]);M=t<=s,T=t}else{let e=Math.abs(k-r);M=e<=a,T=e}}catch{let e=Math.abs(k-r);M=e<=a,T=e}else{let e=Math.abs(k-r);M=e<=a,T=e}else if("bar"===x){if(null===i||null===g||null===m)continue;let e=f.indexOf(h);if(-1===e)continue;let n=Y9(e,g,m,f.length);if(!(i>=n.left&&i<=n.right))continue;let o=p.stack,a=!0;if(o){let e=o.toString(),n=Y7(d.get(e)??0,k=Y6(h,c,t,d),l);if(n){let e=l.convertToPixel("grid",[0,r]);e&&void 0!==e[1]&&(a=e[1]>=n.top&&e[1]<=n.bottom)}}else k=c;if(!a)continue;T=Math.abs(i-(n.left+n.right)/2),M=!0}M&&u.push({seriesIdx:h,datumIdx:A,seriesId:w,seriesName:b,date:n,markerColor:S,x:C,y:c,visualY:k,distance:T})}return u}(e,t,d,c,p,s,r,h,i),g=function(e){if(0===e.length)return null;let t=null;for(let n of e)(null===t||n.distance<t.distance)&&(t=n);return t}(f),m=new Set;for(let e of f)m.add(e.seriesIdx);let v=[];for(let t=0;t<e.length;t++)m.has(t)||v.push(t);return function(e,t,n,r,i,o){let a=[],s=[],l=[...o],u=[],c=[],d=new Map,h=[];for(let i of e){let e=r?.get(i.seriesId)??n,o=i.y,p=ix(o,e),f=null!==t&&i.seriesIdx===t.seriesIdx;if(f){s.push(i.seriesIdx);let e=d.get(o)??0;d.set(o,e+1),e>0&&c.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o}),u.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o})}else l.push(i.seriesIdx);h.push({seriesIdx:i.seriesIdx,datumIdx:i.datumIdx,seriesName:i.seriesName,date:i.date,x:i.x,y:o,formattedY:p,markerColor:i.markerColor,isClosestToCursor:f}),a.push(i.seriesIdx)}return i$(i,a,s,l,u,c),h}(f,g,o,a,i,v)}function Xi(e,t,n,r,i){let o=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return o;let l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<d;t++){let h=e.timeSeries[t];if(void 0===h||o.length>=1e3)break;let p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let g=0;g<h.data.length;g++){let m=e.xAxis[g]??0,v=h.data[g];if(null!=v&&a===g&&"-"!==v&&s<=v+n&&s>=v-n){let e=Xa({valueToCheck:s,baseValue:v,percentage:Math.max(d>Xn?2:5,100/d)});e?u.push(t):(c.push(t),r?.dispatchAction!==void 0&&r.dispatchAction({type:"downplay",seriesIndex:t}));let n=m>0x174876e7ff?m:1e3*m,a=ix(v,i);o.push({seriesIdx:t,datumIdx:g,seriesName:p,date:n,x:m,y:v,formattedY:a,markerColor:f.toString(),isClosestToCursor:e}),l.push(t)}}}return r?.dispatchAction!==void 0&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function Xo({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:i,format:o,seriesFormatMap:a,showAllSeries:s=!1}){if(void 0===i||null===e)return YZ;let l=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(l=!0)}}if(null!==t&&(e=t,l=!0),!1===l||null===n||void 0===i._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return YZ;let u=e.plotCanvas.y,c=e.plotCanvas.x,d=iV(c,u,i);if(null!==d){let e=i._model.getComponent("yAxis").axis.scale,t="log"===e.type,l=e._interval;if(t&&e.base){let t=e.base,n=e._extent,r=t**n[0];l=(t**n[1]-r)/100}let h=Xs({yInterval:l,totalSeries:n.length,showAllSeries:s}),p=r.some(e=>void 0!==e.yAxisIndex&&e.yAxisIndex>0);return Xr(n,r,d,h,i,o,a,p?u:void 0,c)}return YZ}function Xa({valueToCheck:e,baseValue:t,percentage:n}){let r=n/100*t;return e>=t-r&&e<=t+r}function Xs({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let r=.3*e;return t>Xn?Math.max(r,e*Xt/t):Math.max(r,e*Xe)}function Xl(e){let{series:t,wrapLabels:n}=e,r=(0,I.useMemo)(()=>null===t?null:t.toSorted((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===r?null:(0,_.jsx)(cr.A,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map(({datumIdx:e,seriesIdx:t,seriesName:i,y:o,formattedY:a,markerColor:s,isClosestToCursor:l})=>{if(null===e||null===t)return null;let u=t.toString()+e.toString();return(0,_.jsx)(Y1,{seriesName:i,y:o,formattedY:a,markerColor:s,totalSeries:r.length,wrapLabels:n,emphasizeText:l},u)})})}function Xu(e){return(0,V.Ay)("MuiSwitch",e)}let Xc=(0,F.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Xd=(0,N.A)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,L.A)(n.edge)}`],t[`size${(0,L.A)(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,[`& .${Xc.thumb}`]:{width:16,height:16},[`& .${Xc.switchBase}`]:{padding:4,[`&.${Xc.checked}`]:{transform:"translateX(16px)"}}}}]}),Xh=(0,N.A)(fA,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${Xc.input}`]:t.input},"default"!==n.color&&t[`color${(0,L.A)(n.color)}`]]}})((0,B.A)(({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}),[`&.${Xc.checked}`]:{transform:"translateX(20px)"},[`&.${Xc.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Xc.checked} + .${Xc.track}`]:{opacity:.5},[`&.${Xc.disabled} + .${Xc.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${Xc.input}`]:{left:"-100%",width:"300%"}})),(0,B.A)(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,z.A)(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Xc.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,E.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xc.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,E.a)(e.palette[t].main,.62):(0,E.e$)(e.palette[t].main,.55)}`}},[`&.${Xc.checked} + .${Xc.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),Xp=(0,N.A)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,B.A)(({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}`}))),Xf=(0,N.A)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,B.A)(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Xg=I.forwardRef(function(e,t){let n=(0,j.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s,slots:l={},slotProps:u={},...c}=n,d={...n,color:i,edge:o,size:a},h=(e=>{let{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&`edge${(0,L.A)(n)}`,`size${(0,L.A)(r)}`],switchBase:["switchBase",`color${(0,L.A)(i)}`,o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,R.A)(s,Xu,t);return{...t,...l}})(d),p={slots:l,slotProps:u},[f,g]=(0,cm.A)("root",{className:(0,O.A)(h.root,r),elementType:Xd,externalForwardedProps:p,ownerState:d,additionalProps:{sx:s}}),[m,v]=(0,cm.A)("thumb",{className:h.thumb,elementType:Xf,externalForwardedProps:p,ownerState:d}),y=(0,_.jsx)(m,{...v}),[x,b]=(0,cm.A)("track",{className:h.track,elementType:Xp,externalForwardedProps:p,ownerState:d});return(0,_.jsxs)(f,{...g,children:[(0,_.jsx)(Xh,{type:"checkbox",icon:y,checkedIcon:y,ref:t,ownerState:d,...c,classes:{...h,root:h.switchBase},slots:{...l.switchBase&&{root:l.switchBase},...l.input&&{input:l.input}},slotProps:{...u.switchBase&&{root:"function"==typeof u.switchBase?u.switchBase(d):u.switchBase},...u.input&&{input:"function"==typeof u.input?u.input(d):u.input}}}),(0,_.jsx)(x,{...b})]})});var Xm=n(4491),Xv=n(29917);let Xy=(0,I.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:o,onUnpinClick:a}){let s,l,u,{formatWithUserTimeZone:c}=u7(),d=e[0]?.date??null;if(null===d)return null;let h=i&&t>5;return(0,_.jsxs)(cr.A,{sx:e=>({width:"100%",maxWidth:Yj,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??Yq,position:"sticky",top:0,left:0}),children:[(0,_.jsxs)(cr.A,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(l=c(s=new Date(d),"MMM dd, yyyy - "),u=c(s,"HH:mm:ss"),(0,_.jsxs)(cr.A,{children:[(0,_.jsx)(cp.A,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:l}),(0,_.jsx)(cp.A,{variant:"caption",children:(0,_.jsx)("strong",{children:u})})]})),(0,_.jsxs)(eH.A,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[h&&(0,_.jsxs)(eH.A,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,_.jsx)(cp.A,{sx:{fontSize:11},children:"Show All"}),(0,_.jsx)(Xg,{checked:r,size:"small",onChange:(e,t)=>{if(void 0!==o)return o(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),i&&(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",children:[(0,_.jsx)(cp.A,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?Y0:YJ}),n?(0,_.jsx)(Xm,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,_.jsx)(Xv,{sx:{fontSize:16}})]})]})]}),(0,_.jsx)(g2,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})}),Xx=(0,I.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:i=!0,wrapLabels:o,format:a,seriesFormatMap:s,onUnpinClick:l,pinnedPos:u}){var c,d,h,p,f,g,m,v,y,x,b,w,S,A,C,M,k;let[T,D]=(0,I.useState)(!1),O=(0,I.useRef)(),R=(0,I.useRef)(null),E=YK(),{height:P,width:L,ref:N}=(void 0===c&&(c={}),d=c.onResize,(h=(0,I.useRef)(void 0)).current=d,p=c.round||Math.round,f=(0,I.useRef)(),m=(g=(0,I.useState)({width:void 0,height:void 0}))[0],v=g[1],y=(0,I.useRef)(!1),(0,I.useEffect)(function(){return y.current=!1,function(){y.current=!0}},[]),x=(0,I.useRef)({width:void 0,height:void 0}),b=(0,I.useCallback)(function(e){return f.current&&f.current.box===c.box&&f.current.round===p||(f.current={box:c.box,round:p,instance:new ResizeObserver(function(e){var t=e[0],n="border-box"===c.box?"borderBoxSize":"device-pixel-content-box"===c.box?"devicePixelContentBoxSize":"contentBoxSize",r=Y2(t,n,"inlineSize"),i=Y2(t,n,"blockSize"),o=r?p(r):void 0,a=i?p(i):void 0;if(x.current.width!==o||x.current.height!==a){var s={width:o,height:a};x.current.width=o,x.current.height=a,h.current?h.current(s):y.current||v(s)}})}),f.current.instance.observe(e,{box:c.box}),function(){f.current&&f.current.instance.unobserve(e)}},[c.box,p]),w=c.ref,S=(0,I.useRef)(null),(A=(0,I.useRef)(null)).current=w,C=(0,I.useRef)(null),(0,I.useEffect)(function(){M()}),M=(0,I.useCallback)(function(){var e=C.current,t=A.current,n=e||(t?t instanceof Element?t:t.current:null);S.current&&S.current.element===n&&S.current.subscriber===b||(S.current&&S.current.cleanup&&S.current.cleanup(),S.current={element:n,subscriber:b,cleanup:n?b(n):void 0})},[b]),(0,I.useEffect)(function(){return function(){S.current&&S.current.cleanup&&(S.current.cleanup(),S.current=null)}},[]),k=(0,I.useCallback)(function(e){C.current=e,M()},[M]),(0,I.useMemo)(function(){return{ref:k,width:m.width,height:m.height}},[k,m.width,m.height])),B=null!==u&&i,z=(0,I.useCallback)(e=>{R.current=e,N(e)},[N]),j=e?document.querySelector(e):void 0;if((0,I.useLayoutEffect)(()=>{if(null===E)return;let e=R.current;if(!e)return;let t=e.getBoundingClientRect();if(0===t.height||0===t.width)return;let n=Y5(E,u,t.height,t.width,j);n&&n!==O.current&&(O.current=n,e.style.transform=n)}),null===E||null===E.target||null===n||null===u&&"CANVAS"!==E.target.tagName)return null;let F=t.current,V=j?j.getBoundingClientRect().height:void 0;O.current=Y5(E,u,P??0,L??0,j);let $=Xo({mousePos:E,data:n,seriesMapping:r,pinnedPos:u,chart:F,format:a,seriesFormatMap:s,showAllSeries:T});if(0===$.length)return null;let H=n.length;return(0,_.jsx)(m9.A,{container:j,children:(0,_.jsx)(cr.A,{ref:z,sx:e=>Y4(e,u,V),style:{transform:O.current},children:(0,_.jsxs)(eH.A,{spacing:.5,children:[(0,_.jsx)(Xy,{nearbySeries:$,totalSeries:H,enablePinning:i,isTooltipPinned:B,showAllSeries:T,onShowAllClick:e=>D(e),onUnpinClick:l}),(0,_.jsx)(Xl,{series:$,wrapLabels:o})]})})})}),Xb=(0,N.A)(eV)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),Xw=(0,I.forwardRef)(function(e,t){return(0,_.jsx)(Xb,{ref:t,variant:"outlined",color:"secondary",...e})}),XS=Object.entries(iy).map(([e,t])=>({...t,id:e,group:t.group||"Decimal"})).filter(e=>!e.disableSelectorOption);function XA({value:e,onChange:t,disabled:n=!1,...r}){let i=iy[e?.unit||"decimal"];return(0,_.jsx)(y7,{value:{id:e?.unit||"decimal",...i},options:XS,groupBy:e=>e.group??"Decimal",onChange:(e,n)=>{null===n?t(void 0):t({unit:n.id})},disabled:n,disableClearable:!0,renderInput:({InputProps:e,...r})=>(0,_.jsx)(eX.A,{...r,slotProps:{input:{...e,endAdornment:(0,_.jsxs)(_.Fragment,{children:[e.endAdornment,(0,_.jsx)(g7,{position:"end",children:(0,_.jsx)(eY,{size:"small","aria-label":"clear unit",onClick:()=>t(void 0),disabled:n,tabIndex:-1,children:(0,_.jsx)(vv,{fontSize:"small"})})})]})}}}),...r})}let XC=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function XM({value:e,onChange:t,disabled:n=!1}){var r;let i=i_(e),o=iI(e);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(yb,{label:"Short values",control:(0,_.jsx)(Xg,{checked:!!o&&rd(e.shortValues),onChange:(n,r)=>{o&&t({...e,shortValues:r})},disabled:!o})}),(0,_.jsx)(yb,{label:"Unit",control:(0,_.jsx)(XA,{value:e,onChange:e=>{t(e||{unit:"decimal"})},disabled:n})}),(0,_.jsx)(yb,{label:"Decimals",control:(0,_.jsx)(y7,{value:(r=e.decimalPlaces,XC.find(e=>e.decimalPlaces===r)),options:XC,getOptionLabel:e=>e.label,onChange:(n,r)=>(({decimalPlaces:n})=>{i&&t({...e,decimalPlaces:n})})(r),disabled:!i,disableClearable:!0})})]})}function Xk({name:e,height:t}){return(0,_.jsx)(cr.A,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,_.jsx)(cp.A,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var XT=n(74626);let X_=ae((0,XT.A)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),XI={chartsTheme:X_,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null},XD={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${Ix.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${Ix.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${Ix.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${Ix.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${Ix.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${Ix.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${Ix.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${Ix.icon}`]:{color:e.palette.warning.main}},root:{["& ."+gI.root]:{textDecoration:"underline"}}}},XO={styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},XR={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},XE="#FFFFFF",XP={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},XL={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},XN={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},XB={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},Xz={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},Xj=e=>"light"===e?{main:XR["500"],dark:XR["600"],light:XR["50"]}:{main:XR["400"],dark:XR["800"],light:XR["200"]},XF={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontSize:"1.5rem",fontWeight:600,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:600,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:600,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:600,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},XV=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function X$(e,t={},n=!1){var r,i;let o;return(0,XT.A)({palette:function(e){let t,n,r,i;return{mode:e,primary:Xj(e),secondary:"light"===e?{main:XP["600"],dark:XP["900"],light:XP["100"]}:{main:XE,dark:XE,light:XE},grey:"light"===e?{50:XP["50"],100:XP["100"],200:XP["200"],300:XP["300"],400:XP["400"],500:XP["500"],600:XP["600"],700:XP["700"],800:XP["800"],900:XP["900"],950:XP["950"]}:{50:XP["950"],100:XP["900"],200:XP["800"],300:XP["700"],400:XP["600"],500:XP["500"],600:XP["400"],700:XP["300"],800:XP["200"],900:XP["100"],950:XP["50"]},background:(t=XR["150"],n="rgba(21, 23, 33, 0.75)","light"===e?{navigation:t,overlay:n,default:XE,paper:XP["50"],code:XP["50"],tooltip:XP["100"],lighter:XP["50"],border:XP["100"]}:{navigation:t,overlay:n,default:XP["900"],paper:XP["850"],code:XP["800"],tooltip:XP["600"],lighter:XP["700"],border:XP["600"]}),text:(r=XP["800"],i=XP["300"],"light"===e?{navigation:r,accent:i,primary:XP["800"],secondary:XP["700"],disabled:XP["300"],link:XR["500"],linkHover:XR["600"]}:{navigation:r,accent:i,primary:XE,secondary:XP["50"],disabled:XP["600"],link:XR["400"],linkHover:XR["500"]}),error:"light"===e?{main:Xz["500"],dark:Xz["600"],light:Xz["50"]}:{main:Xz["400"],dark:Xz["800"],light:Xz["300"]},warning:"light"===e?{main:XN["500"],dark:XN["700"],light:XN["50"]}:{main:XN["400"],dark:XN["800"],light:XN["300"]},info:Xj(e),success:"light"===e?{main:XL["500"],dark:XL["700"],light:XL["50"]}:{main:XL["400"],dark:XL["800"],light:XL["300"]},common:{white:XE,black:"#000000"},designSystem:{blue:XR,green:XL,grey:XP,orange:XN,purple:XB,red:Xz}}}(e),typography:XF,mixins:{},components:(r=e,i=n,o={MuiAlert:XD,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:XO,MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:XV}},MuiDialog:{styleOverrides:{paper:XV}},MuiPopover:{styleOverrides:{paper:XV}}},i?o:{MuiCssBaseline:{styleOverrides:{body:{colorScheme:r}}},...o}),...t})}var XH=n(87275),XW=n(11061),XG=n(78536),XU=n(1355);function Xq({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",children:[(0,_.jsx)(y9,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,_.jsx)(eX.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XY({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",gap:1,alignItems:"center",children:[(0,_.jsx)(y9,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,_.jsx)(eX.A,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,_.jsx)(vA,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XX({value:e,onChange:t}){return(0,_.jsxs)(eH.A,{direction:"row",children:[(0,_.jsx)(vA,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function XZ({value:e,onChange:t}){return(0,_.jsx)(eH.A,{direction:"row",children:(0,_.jsx)(V7,{label:"Enabled",labelPlacement:"start",control:(0,_.jsx)(Xg,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function XK({value:e,onChange:t,...n}){return(0,_.jsxs)(eH.A,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,_.jsxs)(vA,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,_.jsx)(fX,{value:"JoinByColumnValue",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Join by column value"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,_.jsx)(fX,{value:"MergeColumns",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge columns"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,_.jsx)(fX,{value:"MergeIndexedColumns",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge indexed columns"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,_.jsx)(fX,{value:"MergeSeries",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Merge series"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,_.jsx)(Xq,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,_.jsx)(XY,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,_.jsx)(XX,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,_.jsx)(XZ,{value:e,onChange:t})]})}function XQ({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:o,...a}){return(0,_.jsxs)(eH.A,{...a,children:[(0,_.jsxs)(eH.A,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,_.jsxs)(eH.A,{direction:"row",gap:1,children:[(0,_.jsx)(eY,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,_.jsx)(XW,{}):(0,_.jsx)(XH,{})}),(0,_.jsx)(cp.A,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,_.jsx)("span",{children:(0,_.jsx)("strong",{children:iP[t.kind]})}):(0,_.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,_.jsxs)(eH.A,{direction:"row",gap:1,children:[n&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(vg,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,_.jsx)(XG,{}):(0,_.jsx)(XU,{})})}),(0,_.jsx)(g2,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,_.jsx)(vg,{title:"Remove transformation",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,_.jsx)($_,{})})})]})]}),!n&&(0,_.jsx)(XK,{value:t,onChange:r})]})}function XJ({value:e,onChange:t,...n}){let[r,i]=(0,I.useState)(e.map(()=>!0));return(0,_.jsxs)(eH.A,{gap:1,...n,children:[e.map((n,o)=>(0,_.jsx)(XQ,{index:o,value:n,isCollapsed:r[o]??!0,onChange:n=>{let r;(r=[...e])[o]=n,t(r)},onDelete:()=>{let n;(n=[...e]).splice(o,1),t(n),i(e=>(e.splice(o,1),[...e]))},onCollapse:e=>{i(t=>(t[o]=e,[...t]))}},o)),(0,_.jsx)(eV,{variant:"contained",startIcon:(0,_.jsx)($T,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),i(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function X0(e){let{value:t,onChange:n,timeOptions:r,height:i}=e,o=(0,I.useMemo)(()=>{if(t&&!r.some(e=>e.value.pastDuration===t))return(0,_.jsx)(fX,{value:t,children:t})},[r,t]);return(0,_.jsx)(yf.A,{children:(0,_.jsx)(cr.A,{children:(0,_.jsxs)(fZ.A,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map((e,t)=>(0,_.jsx)(fX,{value:e.value.pastDuration,children:e.display},t)),o]})})})}function X1({repeatItems:e,maxPer:t,gap:n,renderItem:r,containerSx:i,rowSx:o}){let{rows:a,perRow:s}=(0,I.useMemo)(()=>{let n=Math.max(1,t),r=[];for(let t=0;t<e.length;t+=n)r.push(e.slice(t,t+n));return{rows:r,perRow:n}},[t,e]);return(0,_.jsx)(cr.A,{sx:[{display:"flex",flexDirection:"column",width:"100%",height:"100%",gap:`${n}px`},...Array.isArray(i)?i:[i]],children:a.map((e,t)=>(0,_.jsx)(cr.A,{sx:[{display:"flex",gap:`${n}px`},...Array.isArray(o)?o:[o]],children:e.map((e,i)=>(0,_.jsx)(cr.A,{sx:{width:`calc((100% - ${n*(s-1)}px) / ${s})`,overflow:"hidden"},children:r(e,{rowIndex:t,colIndex:i})},`${t}-${i}`))},t))})}var X2=n(94237),X5=n(7939),X4=n(26041),X3=n(80787);let X6=(e,t,n)=>{let r=e.keys[0];if(Array.isArray(t))t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)});else if(t&&"object"==typeof t){let i,o;(Object.keys(t).length>e.keys.length?e.keys:(i=e.keys,o=Object.keys(t),i.filter(e=>o.includes(e)))).forEach(i=>{if(e.keys.includes(i)){let o=t[i];void 0!==o&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},o)}})}else("number"==typeof t||"string"==typeof t)&&n((e,t)=>{Object.assign(e,t)},t)};function X8(e){return`--Grid-${e}Spacing`}function X9(e){return`--Grid-parent-${e}Spacing`}let X7="--Grid-columns",Ze="--Grid-parent-columns",Zt=({theme:e,ownerState:t})=>{let n={};return X6(e.breakpoints,t.size,(e,t)=>{let r={};"grow"===t&&(r={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(r={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${Ze}) - (var(${Ze}) - ${t}) * (var(${X9("column")}) / var(${Ze})))`}),e(n,r)}),n},Zn=({theme:e,ownerState:t})=>{let n={};return X6(e.breakpoints,t.offset,(e,t)=>{let r={};"auto"===t&&(r={marginLeft:"auto"}),"number"==typeof t&&(r={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${Ze}) + var(${X9("column")}) * ${t} / var(${Ze}))`}),e(n,r)}),n},Zr=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[X7]:12};return X6(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[X7]:r,"> *":{[Ze]:r}})}),n},Zi=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.rowSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[X8("row")]:i,"> *":{[X9("row")]:i}})}),n},Zo=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.columnSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[X8("column")]:i,"> *":{[X9("column")]:i}})}),n},Za=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return X6(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Zs=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${X8("row")}) var(${X8("column")})`}}),Zl=(0,X3.A)(),Zu=(0,X5.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Zc(e){return(0,$P.A)({props:e,name:"MuiGrid",defaultTheme:Zl})}let Zd=function(e={}){let{createStyledComponent:t=Zu,useThemeProps:n=Zc,useTheme:r=X4.A,componentName:i="MuiGrid"}=e;function o(e,t,n=()=>!0){let r={};return null===e||(Array.isArray(e)?e.forEach((e,i)=>{null!==e&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let i=e[t];null!=i&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let a=t(Zr,Zo,Zi,Zt,Za,Zs,Zn),s=I.forwardRef(function(e,t){var s;let l,u=r(),c=n(e),d=(0,yo.A)(c);s=u.breakpoints,l=[],void 0!==d.item&&(delete d.item,l.push("item")),void 0!==d.zeroMinWidth&&(delete d.zeroMinWidth,l.push("zeroMinWidth")),s.keys.forEach(e=>{void 0!==d[e]&&(l.push(e),delete d[e])});let{className:h,children:p,columns:f=12,container:g=!1,component:m="div",direction:v="row",wrap:y="wrap",size:x={},offset:b={},spacing:w=0,rowSpacing:S=w,columnSpacing:A=w,unstable_level:C=0,...M}=d,k=o(x,u.breakpoints,e=>!1!==e),T=o(b,u.breakpoints),D=e.columns??(C?void 0:f),E=e.spacing??(C?void 0:w),P=e.rowSpacing??e.spacing??(C?void 0:S),L=e.columnSpacing??e.spacing??(C?void 0:A),N={...d,level:C,columns:D,container:g,direction:v,wrap:y,spacing:E,rowSpacing:P,columnSpacing:L,size:k,offset:T},B=((e,t)=>{let n,{container:r,direction:o,spacing:a,wrap:s,size:l}=e,u={root:["root",r&&"container","wrap"!==s&&`wrap-xs-${String(s)}`,...void 0===o?[]:"object"==typeof o?Object.entries(o).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(o)}`],...(n=[],Object.entries(l).forEach(([e,t])=>{!1!==t&&void 0!==t&&n.push(`grid-${e}-${String(t)}`)}),n),...r?((e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]})(a,t.breakpoints.keys[0]):[]]};return(0,R.A)(u,e=>(0,V.Ay)(i,e),{})})(N,u);return(0,_.jsx)(a,{ref:t,as:m,ownerState:N,className:(0,O.A)(B.root,h),...M,children:I.Children.map(p,e=>I.isValidElement(e)&&(0,X2.A)(e,["Grid"])&&g&&e.props.container?I.cloneElement(e,{unstable_level:e.props?.unstable_level??C+1}):e)})});return s.muiName="Grid",s}({createStyledComponent:(0,N.A)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,j.b)({props:e,name:"MuiGrid2"}),useTheme:cn.A}),Zh=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsx)(eX.A,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,_.jsxs)(eH.A,{gap:1,direction:"row",...n,children:[(0,_.jsx)(eX.A,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,_.jsx)(eX.A,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsx)(eX.A,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,_.jsx)(eH.A,{gap:1,direction:"row",...n,children:(0,_.jsxs)(eX.A,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,_.jsx)(fX,{value:"empty",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Empty"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches empty string"})]})}),(0,_.jsx)(fX,{value:"null",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Null"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches null or undefined"})]})}),(0,_.jsx)(fX,{value:"NaN",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"NaN"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,_.jsx)(fX,{value:"true",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"True"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches true boolean"})]})}),(0,_.jsx)(fX,{value:"false",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"False"}),(0,_.jsx)(cp.A,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},Zp=({mapping:e,onChange:t,onDelete:n,...r})=>{let i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,_.jsxs)(Zd,{container:!0,spacing:2,...r,children:[(0,_.jsx)(Zd,{size:{xs:5},children:(0,_.jsxs)(eH.A,{direction:"row",gap:1,width:"100%",children:[(0,_.jsxs)(eX.A,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,_.jsx)(fX,{value:"Value",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Value"}),"Value"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches an exact text value"})]})}),(0,_.jsx)(fX,{value:"Range",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Range"}),"Range"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,_.jsx)(fX,{value:"Regex",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Regex"}),"Regex"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,_.jsx)(fX,{value:"Misc",children:(0,_.jsxs)(eH.A,{children:[(0,_.jsx)(cp.A,{children:"Misc"}),"Misc"!==e.kind&&(0,_.jsx)(cp.A,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,_.jsx)(Zh,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,_.jsx)(Zd,{size:{xs:4},children:(0,_.jsx)(eX.A,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,_.jsx)(Zd,{size:{xs:1},children:(0,_.jsx)(eH.A,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,_.jsx)(ce,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,_.jsx)(eY,{onClick:()=>i("#000"),children:(0,_.jsx)($T,{})})})}),(0,_.jsx)(Zd,{size:{xs:1},textAlign:"end",children:(0,_.jsx)(vg,{title:"Remove mapping settings",placement:"top",children:(0,_.jsx)(eY,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,_.jsx)($_,{})})})})]})},Zf=({mappings:e,onChange:t})=>{let[n,r]=(0,I.useState)(e);return(0,_.jsxs)(eH.A,{spacing:1,children:[(0,_.jsxs)(Zd,{container:!0,spacing:2,children:[(0,_.jsx)(Zd,{size:{xs:5},children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Condition"})}),(0,_.jsx)(Zd,{size:{xs:4},children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Display Text"})}),(0,_.jsx)(Zd,{size:{xs:1},textAlign:"center",children:(0,_.jsx)(cp.A,{variant:"subtitle1",children:"Color"})}),(0,_.jsx)(Zd,{size:{xs:1}})]}),(0,_.jsx)(eH.A,{gap:1.5,divider:(0,_.jsx)(g2,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,i)=>(0,_.jsx)(Zp,{mapping:e,onChange:e=>{let o;(o=[...n])[i]=e,r(o),t(o)},onDelete:()=>{let e;(e=[...n]).splice(i,1),r(e),t(e)}},i))}),(0,_.jsx)(eV,{variant:"contained",startIcon:(0,_.jsx)($T,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}},65130(e,t,n){"use strict";n.d(t,{f:()=>o});var r=n(12015),i=n(4721);function o(e,t,n){let o=(0,i.a)(e,n?.in);return isNaN(t)?(0,r.w)(n?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}},38086(e,t,n){"use strict";n.d(t,{P:()=>o});var r=n(12015),i=n(4721);function o(e,t,n){let o=(0,i.a)(e,n?.in);if(isNaN(t))return(0,r.w)(n?.in||e,NaN);if(!t)return o;let a=o.getDate(),s=(0,r.w)(n?.in||e,o.getTime());return(s.setMonth(o.getMonth()+t+1,0),a>=s.getDate())?s:(o.setFullYear(s.getFullYear(),s.getMonth(),a),o)}},30439(e,t,n){"use strict";n.d(t,{_P:()=>a,my:()=>r,s0:()=>o,w4:()=>i});let r=6048e5,i=864e5,o=36e5,a=Symbol.for("constructDateFrom")},12015(e,t,n){"use strict";n.d(t,{w:()=>i});var r=n(30439);function i(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&r._P in e?e[r._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},4721(e,t,n){"use strict";n.d(t,{a:()=>i});var r=n(12015);function i(e,t){return(0,r.w)(t||e,e)}}}]);